summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfgsch <fgsch@openbsd.org>2002-05-13 17:07:28 +0000
committerfgsch <fgsch@openbsd.org>2002-05-13 17:07:28 +0000
commitb55d46928a2b71c17e5349c93fca2971ba1cafa1 (patch)
treee6847cad50812fee457111457894f95986854198
parentFor strncpy(), dst is not NUL terminated if strlen(src) >= len. (diff)
downloadwireguard-openbsd-b55d46928a2b71c17e5349c93fca2971ba1cafa1.tar.xz
wireguard-openbsd-b55d46928a2b71c17e5349c93fca2971ba1cafa1.zip
resolve conflicts.
-rw-r--r--gnu/usr.bin/binutils/Makefile.in364
-rw-r--r--gnu/usr.bin/binutils/bfd/COPYING2
-rw-r--r--gnu/usr.bin/binutils/bfd/ChangeLog9702
-rw-r--r--gnu/usr.bin/binutils/bfd/Makefile.in1059
-rw-r--r--gnu/usr.bin/binutils/bfd/README2
-rw-r--r--gnu/usr.bin/binutils/bfd/aclocal.m4776
-rw-r--r--gnu/usr.bin/binutils/bfd/aix386-core.c145
-rw-r--r--gnu/usr.bin/binutils/bfd/aout-adobe.c468
-rw-r--r--gnu/usr.bin/binutils/bfd/aout-arm.c43
-rw-r--r--gnu/usr.bin/binutils/bfd/aout-ns32k.c31
-rw-r--r--gnu/usr.bin/binutils/bfd/aout-target.h20
-rw-r--r--gnu/usr.bin/binutils/bfd/aoutf1.h21
-rw-r--r--gnu/usr.bin/binutils/bfd/aoutx.h143
-rw-r--r--gnu/usr.bin/binutils/bfd/archive.c294
-rw-r--r--gnu/usr.bin/binutils/bfd/archures.c259
-rw-r--r--gnu/usr.bin/binutils/bfd/bfd-in.h64
-rw-r--r--gnu/usr.bin/binutils/bfd/bfd-in2.h1319
-rw-r--r--gnu/usr.bin/binutils/bfd/bfd.c106
-rw-r--r--gnu/usr.bin/binutils/bfd/binary.c16
-rw-r--r--gnu/usr.bin/binutils/bfd/bout.c51
-rw-r--r--gnu/usr.bin/binutils/bfd/cache.c21
-rw-r--r--gnu/usr.bin/binutils/bfd/cisco-core.c22
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-a29k.c297
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-alpha.c56
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-apollo.c15
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-arm.c524
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-aux.c10
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-go32.c6
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-h8300.c146
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-h8500.c19
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-i386.c42
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-i860.c196
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-i960.c23
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-m68k.c112
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-m88k.c8
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-mips.c27
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-ppc.c789
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-rs6000.c1333
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-sh.c69
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-sparc.c10
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-w65.c63
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-we32k.c4
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-z8k.c17
-rw-r--r--gnu/usr.bin/binutils/bfd/coffcode.h1048
-rw-r--r--gnu/usr.bin/binutils/bfd/coffgen.c103
-rw-r--r--gnu/usr.bin/binutils/bfd/cofflink.c121
-rw-r--r--gnu/usr.bin/binutils/bfd/coffswap.h115
-rw-r--r--gnu/usr.bin/binutils/bfd/config.bfd178
-rw-r--r--gnu/usr.bin/binutils/bfd/config.in21
-rw-r--r--gnu/usr.bin/binutils/bfd/configure1615
-rw-r--r--gnu/usr.bin/binutils/bfd/configure.host6
-rw-r--r--gnu/usr.bin/binutils/bfd/configure.in109
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-alpha.c4
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-arm.c16
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-h8300.c26
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-h8500.c40
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-hppa.c10
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-i386.c45
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-i960.c98
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-m68k.c26
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-mips.c85
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-ns32k.c18
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-powerpc.c138
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-sh.c20
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-sparc.c46
-rw-r--r--gnu/usr.bin/binutils/bfd/cpu-w65.c7
-rw-r--r--gnu/usr.bin/binutils/bfd/dep-in.sed1
-rw-r--r--gnu/usr.bin/binutils/bfd/doc/ChangeLog36
-rw-r--r--gnu/usr.bin/binutils/bfd/doc/Makefile.in7
-rw-r--r--gnu/usr.bin/binutils/bfd/doc/bfd.texinfo411
-rw-r--r--gnu/usr.bin/binutils/bfd/doc/chew.c1810
-rw-r--r--gnu/usr.bin/binutils/bfd/ecoff.c115
-rw-r--r--gnu/usr.bin/binutils/bfd/ecofflink.c53
-rw-r--r--gnu/usr.bin/binutils/bfd/ecoffswap.h120
-rw-r--r--gnu/usr.bin/binutils/bfd/elf-bfd.h87
-rw-r--r--gnu/usr.bin/binutils/bfd/elf.c1168
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-gen.c32
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-hppa.c5040
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-hppa.h14
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-i386.c621
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-i860.c1091
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-m68k.c195
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-m88k.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-mips.c1443
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-ppc.c457
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-sparc.c229
-rw-r--r--gnu/usr.bin/binutils/bfd/elf64-alpha.c248
-rw-r--r--gnu/usr.bin/binutils/bfd/elf64-gen.c42
-rw-r--r--gnu/usr.bin/binutils/bfd/elf64-mips.c48
-rw-r--r--gnu/usr.bin/binutils/bfd/elf64-sparc.c365
-rw-r--r--gnu/usr.bin/binutils/bfd/elfcode.h124
-rw-r--r--gnu/usr.bin/binutils/bfd/elfcore.h79
-rw-r--r--gnu/usr.bin/binutils/bfd/elflink.c47
-rw-r--r--gnu/usr.bin/binutils/bfd/elflink.h732
-rw-r--r--gnu/usr.bin/binutils/bfd/elfxx-target.h22
-rw-r--r--gnu/usr.bin/binutils/bfd/format.c272
-rw-r--r--gnu/usr.bin/binutils/bfd/freebsd.h4
-rw-r--r--gnu/usr.bin/binutils/bfd/gen-aout.c3
-rw-r--r--gnu/usr.bin/binutils/bfd/genlink.h2
-rw-r--r--gnu/usr.bin/binutils/bfd/hash.c7
-rw-r--r--gnu/usr.bin/binutils/bfd/host-aout.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/hp300hpux.c17
-rw-r--r--gnu/usr.bin/binutils/bfd/hppabsd-core.c18
-rw-r--r--gnu/usr.bin/binutils/bfd/hpux-core.c12
-rw-r--r--gnu/usr.bin/binutils/bfd/i386aout.c3
-rw-r--r--gnu/usr.bin/binutils/bfd/i386linux.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/i386lynx.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/i386mach3.c3
-rw-r--r--gnu/usr.bin/binutils/bfd/i386msdos.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/i386netbsd.c3
-rw-r--r--gnu/usr.bin/binutils/bfd/i386os9k.c3
-rw-r--r--gnu/usr.bin/binutils/bfd/ieee.c69
-rw-r--r--gnu/usr.bin/binutils/bfd/ihex.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/irix-core.c5
-rw-r--r--gnu/usr.bin/binutils/bfd/libaout.h6
-rw-r--r--gnu/usr.bin/binutils/bfd/libbfd-in.h24
-rw-r--r--gnu/usr.bin/binutils/bfd/libbfd.c196
-rw-r--r--gnu/usr.bin/binutils/bfd/libbfd.h204
-rw-r--r--gnu/usr.bin/binutils/bfd/libcoff-in.h18
-rw-r--r--gnu/usr.bin/binutils/bfd/libcoff.h66
-rw-r--r--gnu/usr.bin/binutils/bfd/libecoff.h2
-rw-r--r--gnu/usr.bin/binutils/bfd/libhppa.h812
-rw-r--r--gnu/usr.bin/binutils/bfd/libieee.h2
-rw-r--r--gnu/usr.bin/binutils/bfd/liboasys.h3
-rw-r--r--gnu/usr.bin/binutils/bfd/linker.c40
-rw-r--r--gnu/usr.bin/binutils/bfd/lynx-core.c11
-rw-r--r--gnu/usr.bin/binutils/bfd/m68k4knetbsd.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/m68klinux.c14
-rw-r--r--gnu/usr.bin/binutils/bfd/m68knetbsd.c5
-rw-r--r--gnu/usr.bin/binutils/bfd/mipsbsd.c39
-rw-r--r--gnu/usr.bin/binutils/bfd/netbsd-core.c19
-rw-r--r--gnu/usr.bin/binutils/bfd/netbsd.h14
-rw-r--r--gnu/usr.bin/binutils/bfd/nlm-target.h14
-rw-r--r--gnu/usr.bin/binutils/bfd/nlm.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/nlm32-alpha.c18
-rw-r--r--gnu/usr.bin/binutils/bfd/nlm32-i386.c10
-rw-r--r--gnu/usr.bin/binutils/bfd/nlm32-ppc.c538
-rw-r--r--gnu/usr.bin/binutils/bfd/nlm32-sparc.c39
-rw-r--r--gnu/usr.bin/binutils/bfd/nlmcode.h53
-rw-r--r--gnu/usr.bin/binutils/bfd/ns32knetbsd.c6
-rw-r--r--gnu/usr.bin/binutils/bfd/oasys.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/opncls.c5
-rw-r--r--gnu/usr.bin/binutils/bfd/osf-core.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/pc532-mach.c18
-rw-r--r--gnu/usr.bin/binutils/bfd/pe-arm.c6
-rw-r--r--gnu/usr.bin/binutils/bfd/pe-i386.c3
-rw-r--r--gnu/usr.bin/binutils/bfd/pe-ppc.c3
-rw-r--r--gnu/usr.bin/binutils/bfd/pei-arm.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/pei-ppc.c2
-rw-r--r--gnu/usr.bin/binutils/bfd/peicode.h314
-rw-r--r--gnu/usr.bin/binutils/bfd/ppcboot.c7
-rw-r--r--gnu/usr.bin/binutils/bfd/ptrace-core.c25
-rw-r--r--gnu/usr.bin/binutils/bfd/reloc.c363
-rw-r--r--gnu/usr.bin/binutils/bfd/reloc16.c121
-rw-r--r--gnu/usr.bin/binutils/bfd/riscix.c60
-rw-r--r--gnu/usr.bin/binutils/bfd/rs6000-core.c621
-rw-r--r--gnu/usr.bin/binutils/bfd/section.c583
-rw-r--r--gnu/usr.bin/binutils/bfd/som.c1392
-rw-r--r--gnu/usr.bin/binutils/bfd/som.h15
-rw-r--r--gnu/usr.bin/binutils/bfd/sparclynx.c8
-rw-r--r--gnu/usr.bin/binutils/bfd/sparcnetbsd.c5
-rw-r--r--gnu/usr.bin/binutils/bfd/srec.c100
-rw-r--r--gnu/usr.bin/binutils/bfd/stab-syms.c9
-rw-r--r--gnu/usr.bin/binutils/bfd/stabs.c6
-rw-r--r--gnu/usr.bin/binutils/bfd/sunos.c58
-rw-r--r--gnu/usr.bin/binutils/bfd/syms.c35
-rw-r--r--gnu/usr.bin/binutils/bfd/sysdep.h15
-rw-r--r--gnu/usr.bin/binutils/bfd/targets.c219
-rw-r--r--gnu/usr.bin/binutils/bfd/tekhex.c21
-rw-r--r--gnu/usr.bin/binutils/bfd/trad-core.c37
-rw-r--r--gnu/usr.bin/binutils/bfd/vaxnetbsd.c4
-rw-r--r--gnu/usr.bin/binutils/bfd/versados.c34
-rw-r--r--gnu/usr.bin/binutils/bfd/xcofflink.c213
-rw-r--r--gnu/usr.bin/binutils/binutils/ChangeLog7885
-rw-r--r--gnu/usr.bin/binutils/binutils/Makefile.in178
-rw-r--r--gnu/usr.bin/binutils/binutils/NEWS20
-rw-r--r--gnu/usr.bin/binutils/binutils/README2
-rw-r--r--gnu/usr.bin/binutils/binutils/aclocal.m4788
-rw-r--r--gnu/usr.bin/binutils/binutils/ar.1392
-rw-r--r--gnu/usr.bin/binutils/binutils/ar.c25
-rw-r--r--gnu/usr.bin/binutils/binutils/arlex.l2
-rw-r--r--gnu/usr.bin/binutils/binutils/arparse.y2
-rw-r--r--gnu/usr.bin/binutils/binutils/arsup.c2
-rw-r--r--gnu/usr.bin/binutils/binutils/arsup.h2
-rw-r--r--gnu/usr.bin/binutils/binutils/binutils.texi530
-rw-r--r--gnu/usr.bin/binutils/binutils/bucomm.c6
-rw-r--r--gnu/usr.bin/binutils/binutils/bucomm.h13
-rw-r--r--gnu/usr.bin/binutils/binutils/coffdump.c2
-rw-r--r--gnu/usr.bin/binutils/binutils/coffgrok.c4
-rw-r--r--gnu/usr.bin/binutils/binutils/config.texi2
-rw-r--r--gnu/usr.bin/binutils/binutils/configure1218
-rw-r--r--gnu/usr.bin/binutils/binutils/configure.in36
-rw-r--r--gnu/usr.bin/binutils/binutils/debug.c2
-rw-r--r--gnu/usr.bin/binutils/binutils/deflex.l2
-rw-r--r--gnu/usr.bin/binutils/binutils/defparse.y2
-rw-r--r--gnu/usr.bin/binutils/binutils/dlltool.c12
-rw-r--r--gnu/usr.bin/binutils/binutils/dllwrap.c144
-rw-r--r--gnu/usr.bin/binutils/binutils/filemode.c3
-rw-r--r--gnu/usr.bin/binutils/binutils/ieee.c31
-rw-r--r--gnu/usr.bin/binutils/binutils/nlmconv.1396
-rw-r--r--gnu/usr.bin/binutils/binutils/nlmconv.c10
-rw-r--r--gnu/usr.bin/binutils/binutils/nlmheader.c8
-rw-r--r--gnu/usr.bin/binutils/binutils/nlmheader.y2
-rw-r--r--gnu/usr.bin/binutils/binutils/nm.1392
-rw-r--r--gnu/usr.bin/binutils/binutils/nm.c42
-rw-r--r--gnu/usr.bin/binutils/binutils/objcopy.1804
-rw-r--r--gnu/usr.bin/binutils/binutils/objcopy.c228
-rw-r--r--gnu/usr.bin/binutils/binutils/objdump.1389
-rw-r--r--gnu/usr.bin/binutils/binutils/objdump.c55
-rw-r--r--gnu/usr.bin/binutils/binutils/prdbg.c2
-rw-r--r--gnu/usr.bin/binutils/binutils/rdcoff.c24
-rw-r--r--gnu/usr.bin/binutils/binutils/rddbg.c2
-rw-r--r--gnu/usr.bin/binutils/binutils/resrc.c44
-rw-r--r--gnu/usr.bin/binutils/binutils/size.c20
-rw-r--r--gnu/usr.bin/binutils/binutils/srconv.c34
-rw-r--r--gnu/usr.bin/binutils/binutils/stabs.c22
-rw-r--r--gnu/usr.bin/binutils/binutils/strings.1390
-rw-r--r--gnu/usr.bin/binutils/binutils/strings.c13
-rw-r--r--gnu/usr.bin/binutils/binutils/strip.1392
-rw-r--r--gnu/usr.bin/binutils/binutils/sysdump.c6
-rw-r--r--gnu/usr.bin/binutils/binutils/sysinfo.y19
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/ChangeLog171
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/binutils-all/ar.exp2
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/binutils-all/hppa/objdump.exp8
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/binutils-all/nm.exp2
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objcopy.exp15
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objdump.exp35
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/binutils-all/size.exp2
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/binutils-all/testprog.c5
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/config/default.exp17
-rw-r--r--gnu/usr.bin/binutils/binutils/testsuite/lib/utils-lib.exp12
-rw-r--r--gnu/usr.bin/binutils/binutils/version.c5
-rw-r--r--gnu/usr.bin/binutils/binutils/wrstabs.c2
-rw-r--r--gnu/usr.bin/binutils/config-ml.in159
-rw-r--r--gnu/usr.bin/binutils/config.guess547
-rw-r--r--gnu/usr.bin/binutils/config.sub129
-rw-r--r--gnu/usr.bin/binutils/config/ChangeLog17
-rw-r--r--gnu/usr.bin/binutils/config/mh-sparcpic2
-rw-r--r--gnu/usr.bin/binutils/config/mt-sparcpic2
-rw-r--r--gnu/usr.bin/binutils/configure35
-rw-r--r--gnu/usr.bin/binutils/configure.in351
-rw-r--r--gnu/usr.bin/binutils/gas/COPYING2
-rw-r--r--gnu/usr.bin/binutils/gas/ChangeLog8914
-rw-r--r--gnu/usr.bin/binutils/gas/Makefile.in1611
-rw-r--r--gnu/usr.bin/binutils/gas/NEWS22
-rw-r--r--gnu/usr.bin/binutils/gas/README2
-rw-r--r--gnu/usr.bin/binutils/gas/aclocal.m4770
-rw-r--r--gnu/usr.bin/binutils/gas/app.c127
-rw-r--r--gnu/usr.bin/binutils/gas/as.c214
-rw-r--r--gnu/usr.bin/binutils/gas/as.h208
-rw-r--r--gnu/usr.bin/binutils/gas/atof-generic.c52
-rw-r--r--gnu/usr.bin/binutils/gas/cond.c153
-rw-r--r--gnu/usr.bin/binutils/gas/config/atof-ieee.c230
-rw-r--r--gnu/usr.bin/binutils/gas/config/atof-tahoe.c260
-rw-r--r--gnu/usr.bin/binutils/gas/config/atof-vax.c59
-rw-r--r--gnu/usr.bin/binutils/gas/config/m68k-parse.h6
-rw-r--r--gnu/usr.bin/binutils/gas/config/m68k-parse.y2
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-aout.c142
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-aout.h12
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-bout.c165
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-bout.h19
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-coff.c327
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-coff.h75
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-ecoff.c33
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-ecoff.h3
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-elf.c343
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-elf.h45
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-ieee.c196
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-multi.h65
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-som.c48
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-som.h6
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-vms.c114
-rw-r--r--gnu/usr.bin/binutils/gas/config/obj-vms.h21
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-a29k.c30
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-a29k.h3
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-alpha.c923
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-alpha.h10
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-arm.c3879
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-arm.h45
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-generic.h2
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-h8300.c254
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-h8300.h8
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-h8500.c268
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-h8500.h5
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-hppa.c2258
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-hppa.h89
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-i386.c4094
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-i386.h338
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-i860.c1388
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-i860.h75
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-i960.c76
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-i960.h12
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-m68k.c958
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-m68k.h28
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-m88k.c49
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-m88k.h11
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-mips.c1720
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-mips.h14
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-mn10200.c284
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-mn10200.h4
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-mn10300.c616
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-mn10300.h21
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-ns32k.c1030
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-ns32k.h12
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-ppc.c492
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-ppc.h35
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-sh.c1200
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-sh.h59
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-sparc.c842
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-sparc.h30
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-tahoe.c552
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-vax.c464
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-vax.h7
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-w65.c268
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-w65.h5
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-z8k.c919
-rw-r--r--gnu/usr.bin/binutils/gas/config/tc-z8k.h9
-rw-r--r--gnu/usr.bin/binutils/gas/config/te-go32.h6
-rw-r--r--gnu/usr.bin/binutils/gas/config/te-ic960.h9
-rw-r--r--gnu/usr.bin/binutils/gas/config/te-nbsd.h11
-rw-r--r--gnu/usr.bin/binutils/gas/config/te-sparcaout.h13
-rw-r--r--gnu/usr.bin/binutils/gas/config/vms-conf.h2
-rw-r--r--gnu/usr.bin/binutils/gas/configure1906
-rw-r--r--gnu/usr.bin/binutils/gas/configure.in155
-rw-r--r--gnu/usr.bin/binutils/gas/doc/Makefile.in12
-rw-r--r--gnu/usr.bin/binutils/gas/doc/all.texi6
-rw-r--r--gnu/usr.bin/binutils/gas/doc/as.1392
-rw-r--r--gnu/usr.bin/binutils/gas/doc/as.texinfo1037
-rw-r--r--gnu/usr.bin/binutils/gas/doc/c-hppa.texi3
-rw-r--r--gnu/usr.bin/binutils/gas/doc/c-i386.texi285
-rw-r--r--gnu/usr.bin/binutils/gas/doc/c-i960.texi3
-rw-r--r--gnu/usr.bin/binutils/gas/doc/c-m68k.texi94
-rw-r--r--gnu/usr.bin/binutils/gas/doc/c-mips.texi67
-rw-r--r--gnu/usr.bin/binutils/gas/doc/c-sh.texi3
-rw-r--r--gnu/usr.bin/binutils/gas/doc/c-sparc.texi3
-rw-r--r--gnu/usr.bin/binutils/gas/doc/c-vax.texi3
-rw-r--r--gnu/usr.bin/binutils/gas/doc/internals.texi72
-rw-r--r--gnu/usr.bin/binutils/gas/ecoff.c442
-rw-r--r--gnu/usr.bin/binutils/gas/ecoff.h3
-rw-r--r--gnu/usr.bin/binutils/gas/emul.h20
-rw-r--r--gnu/usr.bin/binutils/gas/expr.c547
-rw-r--r--gnu/usr.bin/binutils/gas/expr.h21
-rw-r--r--gnu/usr.bin/binutils/gas/flonum-konst.c185
-rw-r--r--gnu/usr.bin/binutils/gas/flonum.h18
-rw-r--r--gnu/usr.bin/binutils/gas/frags.c182
-rw-r--r--gnu/usr.bin/binutils/gas/frags.h81
-rw-r--r--gnu/usr.bin/binutils/gas/gasp.c815
-rw-r--r--gnu/usr.bin/binutils/gas/hash.c63
-rw-r--r--gnu/usr.bin/binutils/gas/hash.h2
-rw-r--r--gnu/usr.bin/binutils/gas/input-file.c47
-rw-r--r--gnu/usr.bin/binutils/gas/input-scrub.c194
-rw-r--r--gnu/usr.bin/binutils/gas/listing.c282
-rw-r--r--gnu/usr.bin/binutils/gas/listing.h2
-rw-r--r--gnu/usr.bin/binutils/gas/m68k-parse.c6
-rw-r--r--gnu/usr.bin/binutils/gas/macro.c133
-rw-r--r--gnu/usr.bin/binutils/gas/macro.h43
-rw-r--r--gnu/usr.bin/binutils/gas/messages.c160
-rw-r--r--gnu/usr.bin/binutils/gas/obj.h11
-rw-r--r--gnu/usr.bin/binutils/gas/output-file.c2
-rw-r--r--gnu/usr.bin/binutils/gas/read.c1191
-rw-r--r--gnu/usr.bin/binutils/gas/read.h43
-rw-r--r--gnu/usr.bin/binutils/gas/sb.h8
-rw-r--r--gnu/usr.bin/binutils/gas/stabs.c127
-rw-r--r--gnu/usr.bin/binutils/gas/struc-symbol.h21
-rw-r--r--gnu/usr.bin/binutils/gas/subsegs.c25
-rw-r--r--gnu/usr.bin/binutils/gas/subsegs.h26
-rw-r--r--gnu/usr.bin/binutils/gas/symbols.c458
-rw-r--r--gnu/usr.bin/binutils/gas/symbols.h6
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/ChangeLog770
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/config/default.exp8
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/all/gas.exp27
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm.exp10
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.s34
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/h8300.exp12
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/coprmem.s6
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/fmemLRbug.s2
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/callinfobug.s2
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/linesepbug.s2
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/parse.exp5
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/regpopbug.s10
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/applybug.s24
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/funcrelocbug.s24
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/longcall.s4
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/r_no_reloc.s11
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce.s2
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce3.s10
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reloc.exp60
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/common.s2
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/unsorted.exp18
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/ieee-fp/x930509a.exp6
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/m68k/all.exp14
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/macros/macros.exp23
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/abs.d10
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/add.d22
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/and.d50
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/beq.d32
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/bge.d58
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/bgeu.d52
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/blt.d58
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/bltu.d52
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/div.d172
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/dli.d210
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-empic.d4
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.d41
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.s7
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-xgot.d49
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal.d4
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-empic.d130
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-svr4pic.d607
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-xgot.d799
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.d430
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.s7
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-empic.d126
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-svr4pic.d206
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-xgot.d270
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb.d458
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-empic.d209
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-svr4pic.d262
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-xgot.d326
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld.d738
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/li.d14
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-empic.d20
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-svr4pic.d22
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-xgot.d22
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/lifloat.d16
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips.exp87
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips4.d26
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul.d116
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/rol.d56
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/sb.d460
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/trunc.d24
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/uld.d364
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-empic.d132
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-svr4pic.d158
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-xgot.d190
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh.d572
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulw.d364
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/usd.d364
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/ush.d734
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/usw.d364
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mn10300/basic.exp2
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mri/mri.exp13
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/sparc/sparc.exp1
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/vax/quad.exp2
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gasp/macro.out96
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/lib/gas-defs.exp11
-rw-r--r--gnu/usr.bin/binutils/gas/write.c827
-rw-r--r--gnu/usr.bin/binutils/gas/write.h25
-rw-r--r--gnu/usr.bin/binutils/gprof/ChangeLog207
-rw-r--r--gnu/usr.bin/binutils/gprof/Makefile.in172
-rw-r--r--gnu/usr.bin/binutils/gprof/basic_blocks.c333
-rw-r--r--gnu/usr.bin/binutils/gprof/basic_blocks.h41
-rw-r--r--gnu/usr.bin/binutils/gprof/call_graph.c75
-rw-r--r--gnu/usr.bin/binutils/gprof/call_graph.h27
-rw-r--r--gnu/usr.bin/binutils/gprof/cg_arcs.c4
-rw-r--r--gnu/usr.bin/binutils/gprof/cg_print.c421
-rw-r--r--gnu/usr.bin/binutils/gprof/cg_print.h30
-rw-r--r--gnu/usr.bin/binutils/gprof/configure1659
-rw-r--r--gnu/usr.bin/binutils/gprof/configure.in55
-rw-r--r--gnu/usr.bin/binutils/gprof/gmon.h36
-rw-r--r--gnu/usr.bin/binutils/gprof/gmon_io.c251
-rw-r--r--gnu/usr.bin/binutils/gprof/gmon_io.h43
-rw-r--r--gnu/usr.bin/binutils/gprof/gprof.c24
-rw-r--r--gnu/usr.bin/binutils/gprof/gprof.texi418
-rw-r--r--gnu/usr.bin/binutils/gprof/hist.c470
-rw-r--r--gnu/usr.bin/binutils/gprof/i386.c4
-rw-r--r--gnu/usr.bin/binutils/gprof/search_list.c43
-rw-r--r--gnu/usr.bin/binutils/gprof/search_list.h22
-rw-r--r--gnu/usr.bin/binutils/gprof/source.c157
-rw-r--r--gnu/usr.bin/binutils/gprof/source.h73
-rw-r--r--gnu/usr.bin/binutils/gprof/sym_ids.c218
-rw-r--r--gnu/usr.bin/binutils/gprof/symtab.c164
-rw-r--r--gnu/usr.bin/binutils/gprof/symtab.h153
-rw-r--r--gnu/usr.bin/binutils/gprof/tahoe.c4
-rw-r--r--gnu/usr.bin/binutils/gprof/utils.c5
-rw-r--r--gnu/usr.bin/binutils/gprof/vax.c4
-rw-r--r--gnu/usr.bin/binutils/include/COPYING6
-rw-r--r--gnu/usr.bin/binutils/include/ChangeLog304
-rw-r--r--gnu/usr.bin/binutils/include/ansidecl.h11
-rw-r--r--gnu/usr.bin/binutils/include/aout/ChangeLog13
-rw-r--r--gnu/usr.bin/binutils/include/aout/aout64.h34
-rw-r--r--gnu/usr.bin/binutils/include/aout/stab.def2
-rw-r--r--gnu/usr.bin/binutils/include/aout/stab_gnu.h17
-rw-r--r--gnu/usr.bin/binutils/include/bfdlink.h27
-rw-r--r--gnu/usr.bin/binutils/include/coff/ChangeLog129
-rw-r--r--gnu/usr.bin/binutils/include/coff/a29k.h20
-rw-r--r--gnu/usr.bin/binutils/include/coff/alpha.h20
-rw-r--r--gnu/usr.bin/binutils/include/coff/apollo.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/arm.h2
-rw-r--r--gnu/usr.bin/binutils/include/coff/ecoff.h24
-rw-r--r--gnu/usr.bin/binutils/include/coff/h8300.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/h8500.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/i386.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/i860.h21
-rw-r--r--gnu/usr.bin/binutils/include/coff/i960.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/internal.h27
-rw-r--r--gnu/usr.bin/binutils/include/coff/m68k.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/m88k.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/mips.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/pe.h191
-rw-r--r--gnu/usr.bin/binutils/include/coff/powerpc.h24
-rw-r--r--gnu/usr.bin/binutils/include/coff/sh.h21
-rw-r--r--gnu/usr.bin/binutils/include/coff/sparc.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/w65.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/we32k.h18
-rw-r--r--gnu/usr.bin/binutils/include/coff/z8k.h18
-rw-r--r--gnu/usr.bin/binutils/include/demangle.h3
-rw-r--r--gnu/usr.bin/binutils/include/dis-asm.h35
-rw-r--r--gnu/usr.bin/binutils/include/elf/ChangeLog316
-rw-r--r--gnu/usr.bin/binutils/include/elf/common.h98
-rw-r--r--gnu/usr.bin/binutils/include/elf/dwarf.h2
-rw-r--r--gnu/usr.bin/binutils/include/elf/external.h5
-rw-r--r--gnu/usr.bin/binutils/include/elf/hppa.h578
-rw-r--r--gnu/usr.bin/binutils/include/elf/internal.h5
-rw-r--r--gnu/usr.bin/binutils/include/elf/mips.h143
-rw-r--r--gnu/usr.bin/binutils/include/elf/ppc.h16
-rw-r--r--gnu/usr.bin/binutils/include/elf/sparc.h7
-rw-r--r--gnu/usr.bin/binutils/include/floatformat.h5
-rw-r--r--gnu/usr.bin/binutils/include/fnmatch.h2
-rw-r--r--gnu/usr.bin/binutils/include/getopt.h12
-rw-r--r--gnu/usr.bin/binutils/include/hp-symtab.h2
-rw-r--r--gnu/usr.bin/binutils/include/ieee.h270
-rw-r--r--gnu/usr.bin/binutils/include/libiberty.h52
-rw-r--r--gnu/usr.bin/binutils/include/mpw/ChangeLog4
-rw-r--r--gnu/usr.bin/binutils/include/obstack.h4
-rw-r--r--gnu/usr.bin/binutils/include/opcode/ChangeLog335
-rw-r--r--gnu/usr.bin/binutils/include/opcode/h8300.h15
-rw-r--r--gnu/usr.bin/binutils/include/opcode/hppa.h93
-rw-r--r--gnu/usr.bin/binutils/include/opcode/i386.h2113
-rw-r--r--gnu/usr.bin/binutils/include/opcode/i960.h52
-rw-r--r--gnu/usr.bin/binutils/include/opcode/m68k.h7
-rw-r--r--gnu/usr.bin/binutils/include/opcode/mips.h597
-rw-r--r--gnu/usr.bin/binutils/include/opcode/mn10300.h2
-rw-r--r--gnu/usr.bin/binutils/include/opcode/ppc.h10
-rw-r--r--gnu/usr.bin/binutils/include/opcode/sparc.h6
-rw-r--r--gnu/usr.bin/binutils/ld/ChangeLog10939
-rw-r--r--gnu/usr.bin/binutils/ld/Makefile.in231
-rw-r--r--gnu/usr.bin/binutils/ld/NEWS30
-rw-r--r--gnu/usr.bin/binutils/ld/aclocal.m4769
-rw-r--r--gnu/usr.bin/binutils/ld/configure1642
-rw-r--r--gnu/usr.bin/binutils/ld/configure.host59
-rw-r--r--gnu/usr.bin/binutils/ld/configure.in27
-rw-r--r--gnu/usr.bin/binutils/ld/configure.tgt96
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh16
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh15
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh53
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh1
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/aix.em9
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/elf32.em1338
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/generic.em10
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/gld960.em9
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/gld960c.em10
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/hppaelf.em513
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/linux.em7
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/lnk960.em7
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/mipsecoff.em9
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/pe.em584
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/sunos.em6
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/vanilla.em9
-rw-r--r--gnu/usr.bin/binutils/ld/genscripts.sh31
-rw-r--r--gnu/usr.bin/binutils/ld/ld.1439
-rw-r--r--gnu/usr.bin/binutils/ld/ld.h51
-rw-r--r--gnu/usr.bin/binutils/ld/ld.texinfo706
-rw-r--r--gnu/usr.bin/binutils/ld/ldcref.c18
-rw-r--r--gnu/usr.bin/binutils/ld/ldctor.c11
-rw-r--r--gnu/usr.bin/binutils/ld/ldctor.h11
-rw-r--r--gnu/usr.bin/binutils/ld/ldemul.c153
-rw-r--r--gnu/usr.bin/binutils/ld/ldemul.h24
-rw-r--r--gnu/usr.bin/binutils/ld/ldexp.c713
-rw-r--r--gnu/usr.bin/binutils/ld/ldexp.h26
-rw-r--r--gnu/usr.bin/binutils/ld/ldfile.c192
-rw-r--r--gnu/usr.bin/binutils/ld/ldfile.h15
-rw-r--r--gnu/usr.bin/binutils/ld/ldgram.y13
-rw-r--r--gnu/usr.bin/binutils/ld/ldint.texinfo398
-rw-r--r--gnu/usr.bin/binutils/ld/ldlang.c1109
-rw-r--r--gnu/usr.bin/binutils/ld/ldlang.h201
-rw-r--r--gnu/usr.bin/binutils/ld/ldlex.h5
-rw-r--r--gnu/usr.bin/binutils/ld/ldlex.l21
-rw-r--r--gnu/usr.bin/binutils/ld/ldmain.c83
-rw-r--r--gnu/usr.bin/binutils/ld/ldmain.h3
-rw-r--r--gnu/usr.bin/binutils/ld/ldmisc.c68
-rw-r--r--gnu/usr.bin/binutils/ld/ldmisc.h4
-rw-r--r--gnu/usr.bin/binutils/ld/ldver.c12
-rw-r--r--gnu/usr.bin/binutils/ld/ldver.h2
-rw-r--r--gnu/usr.bin/binutils/ld/ldwrite.c165
-rw-r--r--gnu/usr.bin/binutils/ld/lexsup.c239
-rw-r--r--gnu/usr.bin/binutils/ld/mpw-eppcmac.c9
-rw-r--r--gnu/usr.bin/binutils/ld/mri.c359
-rw-r--r--gnu/usr.bin/binutils/ld/mri.h2
-rw-r--r--gnu/usr.bin/binutils/ld/scripttempl/elf.sc125
-rw-r--r--gnu/usr.bin/binutils/ld/scripttempl/h8300.sc100
-rw-r--r--gnu/usr.bin/binutils/ld/scripttempl/h8300h.sc107
-rw-r--r--gnu/usr.bin/binutils/ld/scripttempl/i386go32.sc28
-rw-r--r--gnu/usr.bin/binutils/ld/sysdep.h2
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ChangeLog245
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/config/default.exp3
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp55
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-cdtest/cdtest.exp2
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-empic/empic.exp2
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-scripts/defined.exp16
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-scripts/script.exp26
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-scripts/sizeof.exp16
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-sh/sh.exp4
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-shared/main.c2
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-shared/shared.exp34
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-srec/srec.exp60
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-undefined/undefined.exp18
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-versados/versados.exp2
-rw-r--r--gnu/usr.bin/binutils/opcodes/ChangeLog6335
-rw-r--r--gnu/usr.bin/binutils/opcodes/Makefile.in395
-rw-r--r--gnu/usr.bin/binutils/opcodes/a29k-dis.c3
-rw-r--r--gnu/usr.bin/binutils/opcodes/aclocal.m4770
-rw-r--r--gnu/usr.bin/binutils/opcodes/alpha-dis.c2
-rw-r--r--gnu/usr.bin/binutils/opcodes/arm-dis.c71
-rw-r--r--gnu/usr.bin/binutils/opcodes/arm-opc.h76
-rw-r--r--gnu/usr.bin/binutils/opcodes/configure1103
-rw-r--r--gnu/usr.bin/binutils/opcodes/configure.in54
-rw-r--r--gnu/usr.bin/binutils/opcodes/dis-buf.c3
-rw-r--r--gnu/usr.bin/binutils/opcodes/disassemble.c55
-rw-r--r--gnu/usr.bin/binutils/opcodes/h8300-dis.c237
-rw-r--r--gnu/usr.bin/binutils/opcodes/h8500-dis.c48
-rw-r--r--gnu/usr.bin/binutils/opcodes/h8500-opc.h22
-rw-r--r--gnu/usr.bin/binutils/opcodes/hppa-dis.c130
-rw-r--r--gnu/usr.bin/binutils/opcodes/i386-dis.c2371
-rw-r--r--gnu/usr.bin/binutils/opcodes/i960-dis.c3
-rw-r--r--gnu/usr.bin/binutils/opcodes/m68k-dis.c47
-rw-r--r--gnu/usr.bin/binutils/opcodes/m68k-opc.c262
-rw-r--r--gnu/usr.bin/binutils/opcodes/m88k-dis.c2
-rw-r--r--gnu/usr.bin/binutils/opcodes/mips-dis.c458
-rw-r--r--gnu/usr.bin/binutils/opcodes/mips-opc.c1223
-rw-r--r--gnu/usr.bin/binutils/opcodes/ns32k-dis.c3
-rw-r--r--gnu/usr.bin/binutils/opcodes/ppc-dis.c16
-rw-r--r--gnu/usr.bin/binutils/opcodes/ppc-opc.c1140
-rw-r--r--gnu/usr.bin/binutils/opcodes/sh-dis.c168
-rw-r--r--gnu/usr.bin/binutils/opcodes/sh-opc.h103
-rw-r--r--gnu/usr.bin/binutils/opcodes/sparc-dis.c19
-rw-r--r--gnu/usr.bin/binutils/opcodes/sparc-opc.c44
-rw-r--r--gnu/usr.bin/binutils/opcodes/sysdep.h4
-rw-r--r--gnu/usr.bin/binutils/opcodes/w65-dis.c71
-rw-r--r--gnu/usr.bin/binutils/opcodes/w65-opc.h25
-rw-r--r--gnu/usr.bin/binutils/opcodes/z8k-dis.c23
-rw-r--r--gnu/usr.bin/binutils/opcodes/z8kgen.c25
-rw-r--r--gnu/usr.bin/binutils/symlink-tree5
644 files changed, 87590 insertions, 79744 deletions
diff --git a/gnu/usr.bin/binutils/Makefile.in b/gnu/usr.bin/binutils/Makefile.in
index 360c85b3c57..334d4c95824 100644
--- a/gnu/usr.bin/binutils/Makefile.in
+++ b/gnu/usr.bin/binutils/Makefile.in
@@ -1,7 +1,7 @@
#
# Makefile for directory with subdirs to build.
-# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
-# Free Software Foundation
+# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+# 1999, 2000, 2001 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -37,7 +37,8 @@ infodir=${prefix}/info
mandir=${prefix}/man
gxx_include_dir=${includedir}/g++
-tooldir = $(exec_prefix)/$(target)
+tooldir = $(exec_prefix)/$(target_alias)
+build_tooldir = $(exec_prefix)/$(target_alias)
program_transform_name =
@@ -97,9 +98,9 @@ CHILL_LIB = -lchill
CXX = c++
# Use -O2 to stress test the compiler.
-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions
+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
-LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions
+LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
RANLIB = ranlib
@@ -111,6 +112,7 @@ NM = nm
LD = ld
BZIPPROG = bzip2
+MD5PROG = md5sum
# These values are substituted by configure.
DEFAULT_YACC = yacc
@@ -167,9 +169,7 @@ OTHERS =
# This is set by the configure script to the list of directories which
# should be built using the target tools.
-
-
-TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon
+TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon libf2c libchill libobjc
# Target libraries are put under this directory:
# Changed by configure to $(target_alias) if cross.
@@ -186,14 +186,19 @@ SET_LIB_PATH =
# the libraries. This may be changed by configure.in.
RPATH_ENVVAR = LD_LIBRARY_PATH
+# This is the list of directories that may be needed in RPATH_ENVVAR
+# so that programs built for the host machine work.
+HOST_LIB_PATH = $$r/bfd:$$r/opcodes
+
+# This is the list of directories that may be needed in RPATH_ENVVAR
+# so that prorgams built for the target machine work.
+TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$r/$(TARGET_SUBDIR)/libstdc++
+
# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
+# Some platforms don't like blank entries, so we remove duplicate,
+# leading and trailing colons.
REALLY_SET_LIB_PATH = \
- if [ x"$$$(RPATH_ENVVAR)" != x ]; then \
- $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
- else \
- $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \
- fi; \
- export $(RPATH_ENVVAR);
+ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
ALL = all.normal
INSTALL_TARGET = installdirs \
@@ -210,66 +215,17 @@ INSTALL_TARGET_CROSS = installdirs \
$(INSTALL_X11_MODULES) \
$(INSTALL_DOSREL)
-CC_FOR_TARGET = ` \
- if [ -f $$r/gcc/xgcc ] ; then \
- if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
- case "$(target_canonical)" in \
- i[3456]86-*-cygwin*) \
- echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
- ;; \
- *) \
- echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
- ;; \
- esac \
- else \
- echo $$r/gcc/xgcc -B$$r/gcc/; \
- fi; \
- else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
- echo $(CC); \
- else \
- t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
- fi; \
- fi`
+# Should be substed by configure.in
+FLAGS_FOR_TARGET =
+CC_FOR_TARGET =
+CHILL_FOR_TARGET =
+CXX_FOR_TARGET =
-# If CC_FOR_TARGET is not overriden on the command line, then this
+# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
# build libgcc2.a. We define it here so that it can itself be
# overridden on the command line.
-GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
-
-CHILL_FOR_TARGET = ` \
- if [ -f $$r/gcc/xgcc ] ; then \
- echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
- else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
- echo $(CC); \
- else \
- t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
- fi; \
- fi`
-
-CXX_FOR_TARGET = ` \
- if [ -f $$r/gcc/xgcc ] ; then \
- if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
- case "$(target_canonical)" in \
- i[3456]86-*-cygwin*) \
- echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
- ;; \
- *) \
- echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
- ;; \
- esac \
- else \
- echo $$r/gcc/xgcc -B$$r/gcc/; \
- fi; \
- else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
- echo $(CXX); \
- else \
- t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
- fi; \
- fi`
+GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
AS_FOR_TARGET = ` \
if [ -f $$r/gas/as-new ] ; then \
@@ -422,6 +378,7 @@ BASE_FLAGS_TO_PASS = \
"sharedstatedir=$(sharedstatedir)" \
"sysconfdir=$(sysconfdir)" \
"tooldir=$(tooldir)" \
+ "build_tooldir=$(build_tooldir)" \
"gxx_include_dir=$(gxx_include_dir)" \
"gcc_version=$(gcc_version)" \
"gcc_version_trigger=$(gcc_version_trigger)" \
@@ -521,6 +478,7 @@ ALL_MODULES = \
all-bison \
all-byacc \
all-bzip2 \
+ all-cgen \
all-cvssrc \
all-db \
all-dejagnu \
@@ -563,7 +521,9 @@ ALL_MODULES = \
all-sed \
all-send-pr \
all-shellutils \
+ all-sid \
all-sim \
+ all-snavigator \
all-tar \
all-tcl \
all-tcl8.1 \
@@ -574,6 +534,7 @@ ALL_MODULES = \
all-uudecode \
all-wdiff \
all-zip \
+ all-zlib \
$(EXTRA_TARGET_HOST_ALL_MODULES)
# This is a list of the check targets for all of the modules which are
@@ -597,6 +558,7 @@ CROSS_CHECK_MODULES = \
check-bfd \
check-binutils \
check-bzip2 \
+ check-cgen \
check-cvssrc \
check-db \
check-dejagnu \
@@ -635,6 +597,8 @@ CROSS_CHECK_MODULES = \
check-sed \
check-send-pr \
check-shellutils \
+ check-snavigator \
+ check-sid \
check-sim \
check-tar \
check-tcl \
@@ -667,6 +631,7 @@ INSTALL_MODULES = \
install-binutils \
install-bison \
install-byacc \
+ install-cgen \
install-cvssrc \
install-db \
install-dejagnu \
@@ -709,7 +674,9 @@ INSTALL_MODULES = \
install-sed \
install-send-pr \
install-shellutils \
+ install-sid \
install-sim \
+ install-snavigator \
install-tar \
install-textutils \
install-tgas \
@@ -764,9 +731,13 @@ INSTALL_X11_MODULES = \
ALL_TARGET_MODULES = \
all-target-libio \
all-target-libstdc++ \
+ all-target-libstdc++-v3 \
all-target-librx \
all-target-libg++ \
all-target-newlib \
+ all-target-libf2c \
+ all-target-libchill \
+ all-target-libobjc \
all-target-libtermcap \
all-target-winsup \
all-target-libgloss \
@@ -774,6 +745,11 @@ ALL_TARGET_MODULES = \
all-target-gperf \
all-target-examples \
all-target-libstub \
+ all-target-libffi \
+ all-target-libjava \
+ all-target-zlib \
+ all-target-boehm-gc \
+ all-target-qthreads \
all-target-bsp \
all-target-cygmon
@@ -782,9 +758,13 @@ ALL_TARGET_MODULES = \
CONFIGURE_TARGET_MODULES = \
configure-target-libio \
configure-target-libstdc++ \
+ configure-target-libstdc++-v3 \
configure-target-librx \
configure-target-libg++ \
configure-target-newlib \
+ configure-target-libf2c \
+ configure-target-libchill \
+ configure-target-libobjc \
configure-target-libtermcap \
configure-target-winsup \
configure-target-libgloss \
@@ -792,6 +772,11 @@ CONFIGURE_TARGET_MODULES = \
configure-target-gperf \
configure-target-examples \
configure-target-libstub \
+ configure-target-libffi \
+ configure-target-libjava \
+ configure-target-zlib \
+ configure-target-boehm-gc \
+ configure-target-qthreads \
configure-target-bsp \
configure-target-cygmon
@@ -800,10 +785,19 @@ CONFIGURE_TARGET_MODULES = \
CHECK_TARGET_MODULES = \
check-target-libio \
check-target-libstdc++ \
+ check-target-libstdc++-v3 \
check-target-libg++ \
check-target-newlib \
+ check-target-libf2c \
+ check-target-libchill \
+ check-target-libobjc \
check-target-winsup \
check-target-libiberty \
+ check-target-libffi \
+ check-target-libjava \
+ check-target-zlib \
+ check-target-boehm-gc \
+ check-target-qthreads \
check-target-gperf
# This is a list of the install targets for all of the modules which are
@@ -811,13 +805,21 @@ CHECK_TARGET_MODULES = \
INSTALL_TARGET_MODULES = \
install-target-libio \
install-target-libstdc++ \
+ install-target-libstdc++-v3 \
install-target-libg++ \
install-target-newlib \
+ install-target-libf2c \
+ install-target-libchill \
+ install-target-libobjc \
install-target-libtermcap \
install-target-winsup \
install-target-libgloss \
install-target-libiberty \
install-target-bsp \
+ install-target-libjava \
+ install-target-zlib \
+ install-target-boehm-gc \
+ install-target-qthreads \
install-target-gperf
# This is a list of the targets for which we can do a clean-{target}.
@@ -832,6 +834,7 @@ CLEAN_MODULES = \
clean-bison \
clean-byacc \
clean-bzip2 \
+ clean-cgen \
clean-cvssrc \
clean-db \
clean-dejagnu \
@@ -874,7 +877,9 @@ CLEAN_MODULES = \
clean-sed \
clean-send-pr \
clean-shellutils \
+ clean-sid \
clean-sim \
+ clean-snavigator \
clean-tar \
clean-tcl \
clean-texinfo \
@@ -883,21 +888,31 @@ CLEAN_MODULES = \
clean-time \
clean-uudecode \
clean-wdiff \
- clean-zip
+ clean-zip \
+ clean-zlib
# All of the target modules that can be cleaned
CLEAN_TARGET_MODULES = \
clean-target-libio \
clean-target-libstdc++ \
+ clean-target-libstdc++-v3 \
clean-target-librx \
clean-target-libg++ \
clean-target-newlib \
+ clean-target-libf2c \
+ clean-target-libchill \
+ clean-target-libobjc \
clean-target-winsup \
clean-target-libgloss \
clean-target-libiberty \
clean-target-gperf \
clean-target-examples \
clean-target-libstub \
+ clean-target-libffi \
+ clean-target-libjava \
+ clean-target-zlib \
+ clean-target-boehm-gc \
+ clean-target-qthreads \
clean-target-bsp \
clean-target-cygmon
@@ -1052,7 +1067,12 @@ $(CLEAN_TARGET_MODULES):
true; \
fi
-clean-target: $(CLEAN_TARGET_MODULES)
+clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
+clean-target-libgcc:
+ test ! -d gcc/libgcc || \
+ (cd gcc/libgcc && find . -type d -print) | \
+ while read d; do rm -f gcc/$$d/libgcc.a || : ; done
+ -rm -rf gcc/libgcc
# Check target.
@@ -1154,7 +1174,6 @@ gcc-no-fixedincludes:
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
-
# This rule is used to build the modules which use FLAGS_TO_PASS. To
# build a target all-X means to cd to X and make all.
#
@@ -1433,12 +1452,12 @@ all-gcc:
# in parallel.
#
.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
-bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
+bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-bootstrap
@r=`pwd`; export r; \
s=`cd $(srcdir); pwd`; export s; \
$(SET_LIB_PATH) \
echo "Bootstrapping the compiler"; \
- cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
@r=`pwd`; export r; \
s=`cd $(srcdir); pwd`; export s; \
case "$@" in \
@@ -1454,7 +1473,7 @@ bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean b
esac; \
$(SET_LIB_PATH) \
echo "$$msg"; \
- cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
@r=`pwd`; export r; \
s=`cd $(srcdir); pwd` ; export s; \
$(SET_LIB_PATH) \
@@ -1467,7 +1486,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
s=`cd $(srcdir); pwd`; export s; \
$(SET_LIB_PATH) \
echo "Building the C and C++ compiler"; \
- cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
@r=`pwd`; export r; \
s=`cd $(srcdir); pwd` ; export s; \
$(SET_LIB_PATH) \
@@ -1533,20 +1552,23 @@ all-bash:
all-bfd: all-libiberty all-intl
all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
all-bison: all-texinfo
-configure-target-bsp: $(ALL_GCC)
-all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib
+configure-target-boehm-gc: $(ALL_GCC_CXX) configure-target-qthreads
+all-target-boehm-gc: configure-target-boehm-gc
+configure-target-bsp: $(ALL_GCC_C)
+all-target-bsp: configure-target-bsp
all-byacc:
all-bzip2:
+all-cgen: all-libiberty
all-cvssrc:
-configure-target-cygmon: $(ALL_GCC)
-all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub all-target-bsp
+configure-target-cygmon: $(ALL_GCC_C)
+all-target-cygmon: configure-target-cygmon all-target-libiberty all-target-libio all-target-libstub all-target-bsp
all-db:
all-dejagnu: all-tcl all-expect all-tk
all-diff: all-libiberty
all-emacs:
all-emacs19: all-bison all-byacc
all-etc:
-configure-target-examples: $(ALL_GCC)
+configure-target-examples: $(ALL_GCC_C)
all-target-examples: configure-target-examples
all-expect: all-tcl all-tk
all-fileutils: all-libiberty
@@ -1557,15 +1579,18 @@ all-gas: all-libiberty all-opcodes all-bfd all-intl
all-gash: all-tcl
all-gawk:
ALL_GCC = all-gcc
-all-gcc: all-bison all-byacc all-binutils all-gas all-ld
-all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
+ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
+ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++ all-target-libstdc++-v3
+all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
+all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
all-gettext:
all-gnuserv:
-configure-target-gperf: $(ALL_GCC)
+configure-target-gperf: $(ALL_GCC_C)
all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
all-gprof: all-libiberty all-bfd all-opcodes all-intl
+all-grep: all-libiberty
all-grez: all-libiberty all-bfd all-opcodes
all-gui: all-gdb all-libproc all-target-librx
all-guile:
@@ -1577,40 +1602,56 @@ all-intl:
all-ispell: all-emacs19
all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
-configure-target-libg++: $(ALL_GCC) configure-target-librx
-all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
+configure-target-libg++: $(ALL_GCC_CXX) configure-target-librx
+all-target-libg++: configure-target-libg++ all-target-libiberty all-target-librx
configure-target-libgloss: $(ALL_GCC)
all-target-libgloss: configure-target-libgloss configure-target-newlib
-configure-target-libio: $(ALL_GCC)
+configure-target-libio: $(ALL_GCC_C)
all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
-check-target-libio:
+check-target-libio: all-target-libstdc++
all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
all-libiberty:
-configure-target-librx: $(ALL_GCC) configure-target-newlib
+configure-target-libffi: $(ALL_GCC_C)
+all-target-libffi: configure-target-libffi
+configure-target-libjava: $(ALL_GCC_CXX) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
+all-target-libjava: configure-target-libjava all-zip all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
+configure-target-librx: $(ALL_GCC_C)
all-target-librx: configure-target-librx
-configure-target-libstdc++: $(ALL_GCC)
-all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
-configure-target-libstub: $(ALL_GCC)
+configure-target-libstdc++: $(ALL_GCC_C)
+all-target-libstdc++: configure-target-libstdc++ all-target-libiberty all-target-libio
+configure-target-libstdc++-v3: $(ALL_GCC_C)
+all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty
+configure-target-libstub: $(ALL_GCC_C)
all-target-libstub: configure-target-libstub
all-libtool:
+configure-target-libf2c: $(ALL_GCC_C)
+all-target-libf2c: configure-target-libf2c all-target-libiberty
+configure-target-libchill: $(ALL_GCC_C)
+all-target-libchill: configure-target-libchill all-target-libiberty
+configure-target-libobjc: $(ALL_GCC_C)
+all-target-libobjc: configure-target-libobjc all-target-libiberty
all-m4: all-libiberty
all-make: all-libiberty
all-mmalloc:
configure-target-newlib: $(ALL_GCC)
-configure-target-libtermcap: $(ALL_GCC)
-all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
-all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc
-all-opcodes: all-bfd all-libiberty
+all-target-newlib: configure-target-newlib
+configure-target-libtermcap: $(ALL_GCC_C)
+all-target-libtermcap: configure-target-libtermcap
+all-opcodes: all-bfd all-libiberty all-cgen
all-patch: all-libiberty
all-perl:
all-prms: all-libiberty
+configure-target-qthreads: $(ALL_GCC_C)
+all-target-qthreads: configure-target-qthreads
all-rcs:
all-readline:
all-recode: all-libiberty
all-sed: all-libiberty
all-send-pr: all-prms
all-shellutils:
-all-sim: all-libiberty all-bfd all-opcodes all-readline
+all-sid: all-tcl all-tk
+all-sim: all-libiberty all-bfd all-opcodes all-readline all-cgen
+all-snavigator: all-tcl all-tk all-itcl all-db all-grep all-libgui
all-tar: all-libiberty
all-tcl:
all-tcl8.1:
@@ -1623,15 +1664,19 @@ all-tgas: all-libiberty all-bfd all-opcodes
all-time:
all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
all-wdiff:
-all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup
-configure-target-winsup: configure-target-newlib
+configure-target-winsup: $(ALL_GCC_C)
+all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup
all-uudecode: all-libiberty
all-zip:
-configure-target-libiberty: $(ALL_GCC)
-all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
+all-zlib:
+configure-target-zlib: $(ALL_GCC_C)
+all-target-zlib: configure-target-zlib
+configure-target-libiberty: $(ALL_GCC_C)
+all-target-libiberty: configure-target-libiberty
all-target: $(ALL_TARGET_MODULES)
install-target: $(INSTALL_TARGET_MODULES)
#install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
+install-sid: install-tcl install-tk
### other supporting targets
MAKEDIRS= \
@@ -1677,22 +1722,69 @@ DEVO_SUPPORT= README Makefile.in configure configure.in \
config.guess config.if config.sub config move-if-change \
mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
- mkinstalldirs ltconfig ltmain.sh missing ylwrap
+ mkinstalldirs ltconfig ltmain.sh missing ylwrap \
+ libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh
# Files in devo/etc used in any net release.
# ChangeLog omitted because it may refer to files which are not in this
# distribution (perhaps it would be better to include it anyway).
ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
make-stds.texi standards.info* configure.texi configure.info* \
- configbuild.* configdev.*
+ configbuild.* configdev.*
+
# When you use `make setup-dirs' or `make taz' you should always redefine
# this macro.
SUPPORT_FILES = list-of-support-files-for-tool-in-question
-.PHONY: taz
+# NOTE: No double quotes in the below. It is used within shell script
+# as VER="$(VER)"
+VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \
+ sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
+ elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
+ sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
+ else \
+ sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
+ fi`
+PACKAGE = $(TOOL)
+.PHONY: taz
taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+ $(MAKE) -f Makefile.in do-proto-toplev \
+ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ MD5PROG="$(MD5PROG)" \
+ SUPPORT_FILES="$(SUPPORT_FILES)"
+ $(MAKE) -f Makefile.in do-md5sum \
+ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ MD5PROG="$(MD5PROG)" \
+ SUPPORT_FILES="$(SUPPORT_FILES)"
+ $(MAKE) -f Makefile.in do-tar-bz2 \
+ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ MD5PROG="$(MD5PROG)" \
+ SUPPORT_FILES="$(SUPPORT_FILES)"
+
+.PHONY: gdb-taz
+gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+ $(MAKE) -f Makefile.in do-proto-toplev \
+ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ MD5PROG="$(MD5PROG)" \
+ SUPPORT_FILES="$(SUPPORT_FILES)"
+ $(MAKE) -f Makefile.in do-md5sum \
+ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ MD5PROG="$(MD5PROG)" \
+ SUPPORT_FILES="$(SUPPORT_FILES)"
+ $(MAKE) -f Makefile.in do-djunpack \
+ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ MD5PROG="$(MD5PROG)" \
+ SUPPORT_FILES="$(SUPPORT_FILES)"
+ $(MAKE) -f Makefile.in do-tar-bz2 \
+ TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ MD5PROG="$(MD5PROG)" \
+ SUPPORT_FILES="$(SUPPORT_FILES)"
+
+.PHONY: do-proto-toplev
+do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+ echo "==> Making $(PACKAGE)-$(VER)/"
# Take out texinfo from a few places.
sed -e '/^all\.normal: /s/\all-texinfo //' \
-e '/^ install-texinfo /d' \
@@ -1701,7 +1793,8 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
#
./configure sun4
[ -z "$(CONFIGURE_TARGET_MODULES)" ] \
- || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
+ || $(MAKE) $(CONFIGURE_TARGET_MODULES) \
+ ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \
CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
# Make links, and run "make diststuff" or "make info" when needed.
rm -rf proto-toplev ; mkdir proto-toplev
@@ -1721,7 +1814,7 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
fi ; \
else ln -s ../$$d proto-toplev/$$d ; fi ; \
done
- cd etc ; $(MAKE) info
+ cd etc && $(MAKE) info
$(MAKE) distclean
#
mkdir proto-toplev/etc
@@ -1742,25 +1835,35 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
else true; fi
chmod -R og=u . || chmod og=u `find . -print`
- if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
- ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
- else \
- ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
- fi; \
- if test x"$(PACKAGE)" = x; then \
- package="$(TOOL)"; \
- else \
- package="$(PACKAGE)"; \
- fi; \
- $(MAKE) -f Makefile.in do-tar-bz2 TOOL=$(TOOL) VER=$$ver PACKAGE=$$package
+ #
+ -rm -f $(PACKAGE)-$(VER)
+ ln -s proto-toplev $(PACKAGE)-$(VER)
+.PHONY: do-tar-bz2
do-tar-bz2:
echo "==> Making $(PACKAGE)-$(VER).tar.bz2"
- -rm -f $(PACKAGE)-$(VER)
- ln -s proto-toplev $(PACKAGE)-$(VER)
- tar cfh $(PACKAGE)-$(VER).tar $(PACKAGE)-$(VER)
+ -rm -f $(PACKAGE)-$(VER).tar.bz2
+ find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \
+ | tar cTfh - $(PACKAGE)-$(VER).tar
$(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
+.PHONY: do-md5sum
+do-md5sum:
+ echo "==> Adding md5 checksum to top-level directory"
+ cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \
+ | xargs $(MD5PROG) > ../md5.sum
+ mv md5.sum proto-toplev
+
+.PHONY: do-djunpack
+do-djunpack:
+ echo "==> Adding updated djunpack.bat to top-level directory"
+ echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/'
+ sed < djunpack.bat > djunpack.new \
+ -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/'
+ mv djunpack.new djunpack.bat
+ -rm -f proto-toplev/djunpack.bat
+ ln -s ../djunpack.bat proto-toplev/djunpack.bat
+
TEXINFO_SUPPORT= texinfo/texinfo.tex
DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
@@ -1768,6 +1871,7 @@ DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep
gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
$(MAKE) -f Makefile.in taz TOOL=gas \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
# The FSF "binutils" release includes gprof and ld.
@@ -1775,53 +1879,62 @@ gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep
binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
$(MAKE) -f Makefile.in taz TOOL=binutils \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
.PHONY: gas+binutils.tar.bz2
GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
$(MAKE) -f Makefile.in taz TOOL=gas \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
.PHONY: libg++.tar.bz2
LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
libg++.tar.bz2: $(DIST_SUPPORT) libg++
$(MAKE) -f Makefile.in taz TOOL=libg++ \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
GNATS_SUPPORT_DIRS=include libiberty send-pr
gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
$(MAKE) -f Makefile.in taz TOOL=gnats \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
.PHONY: gdb.tar.bz2
GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
- $(MAKE) -f Makefile.in taz TOOL=gdb \
+ $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
.PHONY: dejagnu.tar.bz2
DEJAGNU_SUPPORT_DIRS= tcl expect libiberty
dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu
$(MAKE) -f Makefile.in taz TOOL=dejagnu \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)"
.PHONY: gdb+dejagnu.tar.bz2
GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu
gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
- $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=gdb+dejagnu \
+ $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
.PHONY: insight.tar.bz2
INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui
insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
- $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=insight \
+ $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
.PHONY: insight+dejagnu.tar.bz2
INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu
insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
- $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE="insight+dejagnu" \
+ $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
.PHONY: newlib.tar.bz2
@@ -1839,6 +1952,7 @@ NEWLIB_SUPPORT_DIRS=libgloss
# supports newlib (if only minimally).
newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
$(MAKE) -f Makefile.in taz TOOL=newlib \
+ MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
diff --git a/gnu/usr.bin/binutils/bfd/COPYING b/gnu/usr.bin/binutils/bfd/COPYING
index 60549be514a..c27986e64cd 100644
--- a/gnu/usr.bin/binutils/bfd/COPYING
+++ b/gnu/usr.bin/binutils/bfd/COPYING
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ Copyright 1989, 1991, 1997 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/gnu/usr.bin/binutils/bfd/ChangeLog b/gnu/usr.bin/binutils/bfd/ChangeLog
index 638ea679922..62274388981 100644
--- a/gnu/usr.bin/binutils/bfd/ChangeLog
+++ b/gnu/usr.bin/binutils/bfd/ChangeLog
@@ -1,6581 +1,4949 @@
-2000-11-07 Alan Modra <alan@linuxcare.com.au>
-
- * coff-h8300.c (special): Adjust reloc address.
-
- From mainline 2000-04-03 Kazu Hirata <kazu@hxi.com>
- * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
- the R_PCRWORD_B case.
-
-2000-11-05 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
- BFDs containing no sections to be merged, regardless of their flags.
-
-2000-11-04 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
- if a relocation for an undefined symbol also results in an
- overflow.
-
-2000-10-31 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
- EF_SOFT_FLOAT if it is defined.
-
- From 2000-05-23 H.J. Lu <hjl@gnu.org>
- * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
-
-2000-10-27 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
- attempts to mix PIC code with non-PIC, just mark the output as
- being position dependent.
- (elf32_arm_merge_private_bfd_data): Likewise. Print an error
- message for EF_SOFT_FLOAT mismatches. Display diagnostics for
- all mismatches, not just the first one.
-
-2000-10-23 Philip Blundell <pb@futuretv.com>
-
- From 2000-05-23 H.J. Lu <hjl@gnu.org>
- * elf64-alpha.c (elf64_alpha_relocate_section): Check
- h->root.other not h->other.
- * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
-
-2000-10-23 Philip Blundell <pb@futuretv.com>
-
- * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Undo previous
- accidental checkin.
-
-2000-10-22 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make
- PLT entries that could serve as a definition for a weak symbol.
-
- From 2000-06-05 H.J. Lu <hjl@gnu.org>
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
- an error when seeing an undefined symbol with hidden/internal
- attribute. It is handled in *_relocate_section ().
-
- From 2000-05-23 H.J. Lu <hjl@gnu.org>
- * elf32-i386.c (elf_i386_relocate_section): Don't allow the
- undefined symbol with the non-default visibility attributes.
- * elf-hppa.h (elf_hppa_relocate_section): Likewise.
- * elf32-arm.h (elf32_arm_relocate_section): Likewise.
- * elf32-i370.c (i370_elf_relocate_section): Likewise.
- * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
- * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
- * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
- * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
- * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
- * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
-
-2000-10-16 Geoffrey Keating <geoffk@cygnus.com>
-
- From 2000-10-14 Geoffrey Keating <geoffk@cygnus.com>
- * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
- entries that could serve as a definition for a weak symbol.
-
-2000-10-15 Philip Blundell <philb@gnu.org>
-
- From 2000-09-08 Nick Clifton <nickc@redhat.com>
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
- initialise flags in output bfd if the input bfd is the default
- architecture with the default flags.
-
- From 2000-09-03 Philip Blundell <philb@gnu.org>
- * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
- references to undefined symbols in debugging sections.
+2001-06-19 Philip Blundell <philb@gnu.org>
- From 2000-05-30 H.J. Lu <hjl@gnu.org>
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
- visibility bits if the symbol is undefined. Correctly handle
- weak undefined symbols with hidden and internal attributes.
- * elflink.h (elf_link_add_object_symbols): Always turn the
- symbol into local if it has the hidden or internal attribute.
-
- From 2000-05-22 H.J. Lu <hjl@gnu.org>
- * elflink.h (elf_link_output_extsym): Clear the visibility
- field for symbols not defined locally.
-
- From 2000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>
- * elflink.h (elf_link_add_object_symbols): Reset dynindx for
- hidden and internal symbols.
- (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
- visibility.
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
- assign a PLT or GOT entry to symbols with hidden and
- internal visibility.
-
-2000-10-16 Philip Blundell <pb@futuretv.com>
-
- * configure.in: Set version to 2.10.1.
- * configure: Regenerate.
-
-2000-09-24 H.J. Lu <hjl@gnu.org>
-
- From 2000-04-20 H.J. Lu <hjl@gnu.org>
- * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
- patch to symbols defined by a shared object.
-
-2000-09-06 Philip Blundell <philb@gnu.org>
-
- Merge from mainline:
-
- 2000-05-31 Ulrich Drepper <drepper@redhat.com>
-
- * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
- definitions. We must not assume they are sorted in the file
- according to their index numbers.
-
-2000-09-06 Philip Blundell <philb@gnu.org>
-
- * config.bfd (arm*-*-uclinux*): New target.
- (armeb-*-elf, arm*b-*-linux-gnu*): Likewise.
-
-2000-08-22 Doug Kwan <dkwan@transmeta.com>
-
- * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
- * coffcode.h (coff_set_flags): Add detection of w65 architecture.
-
-2000-04-14 Matthew Green <mrg@cygnus.com>
-
- * config.bfd: Add NetBSD/sparc64 support.
-
-2000-05-31 Mark Kettenis <kettenis@gnu.org>
-
- Add support for FreeBSD/Alpha.
- * configure.in: Add alpha*-*-freebsd* entry to prevent including
- OSF core file support.
+ * configure.in: Set version to 2.11.2.
* configure: Regenerate.
-2000-05-29 Philip Blundell <philb@gnu.org>
-
- * ppcboot.c: Add packed attribute if compiling with GCC.
-
-2000-05-29 Anatoly Vorobey <mellon@pobox.com>
-
- * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
-
-2000-05-26 Alan Modra <alan@linuxcare.com.au>
-
- * sysdep.h (gettext, dgettext, dcgettext, textdomain,
- bindtextdomain): Replace defines with those from intl/libgettext.h
- to quieten gcc warnings.
-
-2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
-
- * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
-
- * archive.c (normalize, bfd_bsd_truncate_arname,
- bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
- file names with backslashes.
-
- * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
- before opening it.
-
- * sysdep.h: Include filenames.h.
+2001-06-19 Andreas Jaeger <aj@suse.de>
-2000-05-26 Alan Modra <alan@linuxcare.com.au>
-
- * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
-
-2000-05-23 Philip Blundell <pb@futuretv.com>
-
- * configure.in: Set version to 2.10.
- * configure: Regenerate.
-
-Sat Jul 3 10:35:19 CDT 1999 Joel Sherrill <joel@OARcorp.com>
-
- * config.bfd (sparc-rtemself): Added.
- (sparc-rtemsaout): Added as alternate name for current sparc-rtems.
- (sparc-rtems): Switched to ELF from a.out
- (i386-rtemscoff): Added as alternate name for current i386-rtems.
- (i386-rtems): Switched to ELF.
-
-2000-05-09 Alan Modra <alan@linuxcare.com.au>
-
- * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
- section is empty.
- (copy_private_bfd_data): Allow for space possibly taken up by elf
- headers when calculating segment physical address from lma.
-
-2000-05-08 Alan Modra <alan@linuxcare.com.au>
-
- * versados.c (versados_scan): Init stringlen and pass_2_done.
-
- * trad-core.c (trad_unix_core_file_p): Return
- bfd_error_wrong_format rather than bfd_error_file_truncated.
-
- * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
- add_data_entry. DataDirectory virtual address is relative.
- (pe_print_idata): Account for relative DataDirectory virtual
- addresses. Don't trash datasize inside POWERPC_LE_PE code.
- (pe_print_edata): Similarly.
-
- From Szabolcs Szakacsits <szaka@F-Secure.com>
- * peigen.c (dir_names): Add Delay Import Directory.
- (pe_print_idata): Always search for bfd section containing
- idata address rather than looking up section name. Print this
- section name rather than .idata.
- (pe_print_edata): Similarly. Also print some fields as %08lx.
- (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
- Win32Version.
-
-2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
-
- * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
- the .bss section.
- * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
-
-2000-05-02 H.J. Lu <hjl@gnu.org>
-
- * elf.c (prep_headers): Use ELFOSABI_NONE instead of
- ELFOSABI_SYSV.
-
-2000-04-29 Andreas Jaeger <aj@suse.de>
+ Merge from mainline sources:
+ 2001-06-19 Andreas Jaeger <aj@suse.de>
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
+ dynamic symbols.
+ 2001-06-07 Andreas Jaeger <aj@suse.de>
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
+ assertion.
+ (elf64_x86_64_check_relocs): Set an alignment of 8 for .rela
+ sections; handle further relocations.
+ 2001-06-01 Andreas Jaeger <aj@suse.de>
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
+ relocation, small reformatting.
+
+2001-06-14 Nick Clifton <nickc@redhat.com>
+
+ Merge from mainline sources:
+ 2001-04-27 Sean McNeil <sean@mcneil.com>
+ * config.bfd: Add arm-vxworks target.
+ * coff-arm (coff_arm_relocate_section): Add in symbol value to
+ addend (fro VXworks targets).
+ 2001-03-06 Nick Clifton <nickc@redhat.com>
+ * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
+ of offset in BLX(1) instruction.
+ * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
+ offset in BLX(1) instruction.
+ Fix formatting.
+ 2001-03-06 Nick Clifton <nickc@redhat.com>
+ * coff-arm.c (coff_arm_reloc_type_lookup): Add
+ BFD_RELOC_THUMB_PCREL_BLX.
+ 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
+ * elf32-arm.h (elf32_arm_final_link_relocate): Set
+ EF_ARM_HASENTRY if the start address is set.
+
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in (<COREFILE case stmt>): Move powerpc-*-*bsd* after
+ powerpc-*-freebsd*.
+
+ Merge from mainline.
+ 2001-06-02 H.J. Lu <hjl@gnu.org>
+ * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
+ and ELFOSABI_HPUX.
+ * elf64-hppa.c (elf64_hppa_object_p): Likewise.
+
+ 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
+ * section.c (_bfd_strip_section_from_output): Handle NULL
+ output_section.
+
+ 2001-05-30 Alan Modra <amodra@one.net.au>
+ * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
+ millicode. Don't allocate .got and .rela.got space here..
+ (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
+ (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
+ .rela.plt here..
+ (hppa_handle_PIC_calls): ..nor here..
+ (allocate_plt_and_got): ..instead do it all here. New function.
+ (elf32_hppa_size_dynamic_sections): Allocate local .got space and
+ call allocate_plt_and_got. No need to zap .got if not dynamic.
+ (elf32_hppa_final_link): Call regular bfd_final_link instead of
+ gc_common_final_link.
+ (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
+ (elf32_hppa_relocate_section): Use it here.
+ (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
+ dynamic_sections_created.
+ (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
- * libbfd-in.h: Correctly check GCC version.
- * bfd-in.h: Likewise.
- * libhppa.h: Likewise.
+ 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
+ a zeroing loop.
+ (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
+ (elf_link_input_bfd): Likewise.
+ (elf_reloc_link_order): Likewise.
+ (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
+ relocations correctly.
+
+ 2001-05-28 Alan Modra <amodra@one.net.au>
+ * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
+ for symbols forced local that need plabels.
+ (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
+ .plt.rela for local syms if non-shared.
+ (hppa_build_one_stub): Mask lsb of plt.offset.
+ (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
+ (clobber_millicode_symbols): Correct comment.
+ (elf32_hppa_relocate_section): Likewise.
+ (elf32_hppa_finish_dynamic_symbol): Likewise.
+
+ 2001-05-25 Alan Modra <amodra@one.net.au>
+ * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
+ undefined millicode syms in shared libs.
+ (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
+ (elf32_hppa_check_relocs): Likewise.
+ (elf32_hppa_adjust_dynamic_symbol): Likewise.
+ (elf32_hppa_size_dynamic_sections): Likewise.
+ (elf32_hppa_relocate_section): Likewise.
+ (elf32_hppa_finish_dynamic_symbol): Likewise.
+ (elf32_hppa_finish_dynamic_sections): Likewise.
+
+ 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
+ * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
+ s/ENTIRES/ENTRIES/.
+
+ 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
-
-2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- K&R compiler fixes.
- * dwarf2.c (concat_filename): Avoid string literal concatenation.
- * ieee.c (ieee_get_symtab): Don't initialise union in struct.
-
-2000-04-12 Alan Modra <alan@linuxcare.com.au>
-
- * dep-in.sed: Match space before file name, not after.
- * Makefile.am: Regenerate dependencies.
- * Makefile.in: Regenerate.
-
- * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
- case, allow address wrap-around stupidly removed 2000-03-17. Sign
- extend without an if statement.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * po/bfd.pot: Regenerate.
-
- * Makefile.am: Remove extraneous mkdep comment.
- (MKDEP): Use gcc -MM rather than mkdep.
- (DEP): Quote when passing vars to sub-make. Add warning
- message to end.
- (DEP1): Rewrite for "gcc -MM".
- (CLEANFILES): Add DEP2.
- Update dependencies.
- * Makefile.in: Regenerate.
-
-2000-04-03 H.J. Lu <hjl@gnu.org>
-
- * cache.c (bfd_open_file): Unlink the output file only if
- it has non-zero size.
-
-2000-04-01 Ken Block USG <block@zk3.dec.com>
-
- * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
- relative relocations for non-loaded sections in shared objects.
- (elf64_alpha_check_relocs): Similarly.
-
-2000-03-31 Thomas de Lellis <tdel@wrs.com>
-
- * srec.c : Set CHUNK size to 16 bytes to prevent download failures
- on some targets.
- * ihex.c : Ditto.
-
-Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
-
- * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
- HOWTO references to bfd_elf_generic_reloc, that have
- partial_inplace == true, now use the new function. The function
- is based on the recent rewrite of m32r_elf_lo16_reloc(), and
- extends its fixes to the R_M32R_{16,24,32} relocs.
- The new logic in m32r_elf_lo16_reloc() has been removed, and
- it instead calls the new routine to obtain that functionality.
-
-2000-03-27 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
- elf32_avr_check_relocs, avr_final_link_relocate,
- elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
- elf32_avr_object_p): Add prototypes.
- (elf32_avr_gc_mark_hook): Add default for h->root.type.
- (bfd_elf_avr_final_write_processing): Make static.
-
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * cpu-avr.c: New file. BFD support routines for AVR architecture.
- * archures.c (bfd_architecture): Add AVR architecture.
- (bfd_archures_list): Add reference to AVR architecture info.
- * elf.c (prep_headers): Handle bfd_arch_avr.
- * reloc.c: Add various AVR relocation enums.
- * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
- list.
- * Makefile.am: Add support for AVR elf.
- * configure.in: Likewise.
- * config.bfd: Likewise.
- * Makefile.in: Regenerate.
- * configure: This too.
- * bfd-in2.h: And this.
- * libbfd.h: And this.
-
-2000-03-24 H.J. Lu <hjl@gnu.org>
-
- * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
- (elf64_alpha_find_reloc_at_ofs): Likewise.
-
-2000-03-17 Alan Modra <alan@linuxcare.com.au>
-
- * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
- flag an overflow if the bitfield is outside -2**n to 2**n-1. The
- allowable range used to be -2**(n-1) to 2**n-1.
- * reloc.c (_bfd_relocate_contents): Same here. Also replace
- "boolean overflow" with "bfd_reloc_status_type flag".
-
-2000-03-14 Doug Evans <dje@casey.transmeta.com>
-
- * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
-
-2000-03-14 Kazu Hirata <kazu@hxi.com>
-
- * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
- of shrinks properly, including the last reloc.
-
-2000-03-13 Kazu Hirata <kazu@hxi.com>
-
- * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
- check for R_MOVL2.
-
-2000-03-11 Alan Modra <alan@linuxcare.com.au>
-
- * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
- a format mismatch rather than an "error" from bfd_read such as
- bfd_error_file_truncated.
-
-2000-03-10 Geoff Keating <geoffk@cygnus.com>
-
- * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
- sign-extension and big-endian compensation for
- R_MIPS_64 even in ld -r.
-
-2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
-
- * elf32-mips.c (mips_elf_next_relocation): Rename from
- mips_elf_next_lo16_relocation, and generalize to look
- for any relocation type.
- (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
- (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
- (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
- (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
- (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
- (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
- (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
- (mips_rtype_to_howto): Likewise.
- (mips_elf_calculate_relocation): Handle new relocs.
- (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
- are paired. The addend for R_MIPS_GNU_REL16_S2
- is shifted right two bits.
-
-2000-03-10 Alan Modra <alan@linuxcare.com.au>
-
- * reloc.c (bfd_perform_relocation): Undo emacs formatting of
- comment, and ensure it doesn't happen again.
- (bfd_install_relocation): Same here.
- (_bfd_relocate_contents): Don't bother assigning unused signmask
- shift result. Fix typos in comments.
- Remove trailing whitespace throughout file.
-
-2000-03-07 Doug Evans <dje@casey.transmeta.com>
-
- * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
- * bfd-in2.h: Rebuild.
-
-2000-03-06 Nick Clifton <nickc@cygnus.com>
-
- * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
- sym_ptr_ptr fields.
- (SIZEOF_ILF_SYM_PTR_TABLE): Define.
- (SIZEOF_ILF_STRINGS): Redefine.
- (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
- relative reloc, as opposed to a section relative reloc.
- (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
- not C_LABEL.
- Add length of symbol's prefix to string pointer.
- Store a pointer to the symbol in the symbol pointer table.
- (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
- Initialise the symbol pointer table.
- Store the hint in the Hint/Name table.
- Make the jump reloc be symbol realtive, not section relative.
- Create an import symbol for imported code.
-
-2000-03-06 Catherine Moore <clm@cygnus.com>
-
- * elf.c (swap_out_syms): Check for null type_ptr.
-
-2000-03-01 Hans-Peter Nilsson <hp@axis.com>
-
- * aout-target.h (MY(write_object_contents)): Remove unused
- and unusable "#if CHOOSE_RELOC_SIZE".
- * pc532-mach.c (MY(write_object_contents)): Ditto.
- * netbsd.h (MY(write_object_contents)): Ditto.
- * hp300hpux.c (MY(write_object_contents)): Ditto.
- * freebsd.h (MY(write_object_contents)): Ditto.
- * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
-
-2000-02-29 H.J. Lu <hjl@gnu.org>
-
- * peicode.h (jtab): Make it static.
-
- * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
- defined and COFF_IMAGE_WITH_PE is not defined.
- (_bfd_sh_align_load_span): Defined as sh_align_load_span if
- COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
-
-2000-03-01 Nick Clifton <nickc@cygnus.com>
-
- * coff-arm.c (bfd_arm_process_before_allocation): Make
- 'symndx' signed to prevent compile time warning.
-
- * coff-mcore.c: Remove unused prototype for pe_object_p.
-
- * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
- functions that are not used when COFF_IMAGE_WITH_PE is
- defined.
- (struct sh_opcode): Change type of 'flags' field to unsigned
- long so that it can hold the USESAS flag.
-
- * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
-
- * elf-m10300.c (mn10300_elf_relax_section): Initialise
- 'sym_sec'.
-
- * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
- parameters.
- Remove unusued variables and code.
- (elf_backend_add_symbol_hook): Fix prototype.
-
- * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
- 'srelgot'.
-
- * elf32-mcore.c (mcore_elf_relocate_section): Initialise
- 'oldinst'.
-
- * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
- parameters.
- Remove unusued variables and code.
- (elf_backend_add_symbol_hook): Fix prototype.
-
- * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
-
- * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
- to unused function parameter.
-
- * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
- parameters.
- Use EMPTY_HOWTO to initialise empty howto slots.
- Remove unused variables.
-
- * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
-
-2000-03-01 H.J. Lu <hjl@gnu.org>
-
- * aoutx.h (aout_link_input_section_std): Pass "true" to
- the undefined_symbol callback.
- (aout_link_input_section_ext): Likewise.
- * bout.c (get_value): Likewise.
- * coff-a29k.c (coff_a29k_relocate_section): Likewise.
- * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
- Likewise.
- (alpha_relocate_section): Likewise.
- * coff-arm.c (coff_arm_relocate_section): Likewise.
- * coff-i960.c (coff_i960_relocate_section): Likewise.
- * coff-mcore.c (coff_mcore_relocate_section): Likewise.
- * coff-mips.c (mips_relocate_section): Likewise.
- * coff-ppc.c (coff_ppc_relocate_section): Likewise.
- * coff-sh.c (sh_relocate_section): Likewise.
- * coff-tic80.c (coff_tic80_relocate_section): Likewise.
- * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
- * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
- * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
- * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
- * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
- * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
- * elf32-i370.c (i370_elf_relocate_section): Likewise.
- * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
- * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
- * elf32-sh.c (sh_elf_relocate_section): Likewise.
- * elf32-v850.c (v850_elf_relocate_section): Likewise.
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
- * elflink.h (elf_link_output_extsym): Likewise.
- * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
- * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
- * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
-
- * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
- undefined_symbol callback when building shared library with
- -Bsymbolic and undefined symbols are allowed. Otherwise, pass
- "true".
- * elf32-arm.h (elf32_arm_relocate_section): Likewise.
- * elf32-i386.c (elf_i386_relocate_section): Likewise.
- * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
- * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
- (elf32_mips_get_relocated_section_content): Likewise.
- * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
- * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
- * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
-
-2000-02-28 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
- * Makefile.in: Regenerate.
-
- * configure.in: Add support for mips and sh pe vectors.
- * configure: regenerate.
-
- * config.bfd: Add support for arm-wince, mips-pe and sh-pe
- targets.
-
- * targets.c: Add mips and sh pe vectors.
-
- * libpei.h (coff_final_link_postscript): Only define if not
- already defined.
-
- * coffcode.h: Add support for WinCE magic numbers.
-
- * peigen.c (pe_print_reloc): Update comment and rearrange
- appending of newline character.
-
- * peicode.h: Add support for Image Library Format.
- (pe_ILF_vars): Structure containing data used by ILF code.
- (pe_ILF_make_a_section): New function. Create a section based
- on ILF data.
- (pe_ILF_make_a_reloc): New function. Create a reloc based on
- ILF data.
- (pe_ILF_make_a_symbol): New function. Create a symbol based
- on ILF data.
- (pe_ILF_save_relocs): New function. Store the relocs created
- by pe_ILF_make_a_reloc in a section.
- (pe_ILF_build_a_bfd): New function. Create a BFD describing
- an ILF object.
- (pe_ILF_object_p): New function. Return a bfd_target pointer
- for an ILF object.
- (pe_bfd_object_p): If an ILF object is detected call
- pe_ILF_object_p on it.
-
- * coff-arm.c: Add support for WinCE relocs which are different
- from normal ARM COFF relocs.
- * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
-
- * coff-sh.c: Add support for sh-pe target.
- * pe-sh.c: New file. Support code for sh-pe target.
- * pei-sh.c: New file. Support code for sh-pe target.
-
- * pe-mips.c: New file. Support code for mips-pe target.
- * pei-mips.c: New file. Support code for mips-pe target.
-
-2000-02-27 Jakub Jelinek <jakub@redhat.com>
-
- * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
- architecture if the object causing the bump is dynamic.
- * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
- and also don't it for memory ordering.
- (sparc64_elf_write_relocs): Take src_rela out of the loop.
-
-2000-02-27 Ian Lance Taylor <ian@zembu.com>
-
- * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
- calling bfd_get_section_size_before_reloc.
- (decode_line_info): Likewise.
- (_bfd_dwarf2_find_nearest_line): Likewise.
-
-2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
-
- * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
- name of the libtool directory.
- * Makefile.in: Rebuild.
-
-Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
-
- * som.c (SOM_HOWTO): Define.
- (som_hppa_howto_table): Use it.
-
-2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
-
- * config.bfd: Enable 64 bit support for Solaris7+/sparc.
-
-2000-02-24 Catherine Moore <clm@cygnus.com>
-
- * som.c (som_misc_symbol_info): Add field
- secondary_def.
- (som_bfd_derive_misc_symbol_info): Initialize
- secondary_def.
- (som_build_and_write_symbol_table): Keep track
- of secondary_def field.
- (som_slurp_symbol_table): Set BSF_WEAK symbol flag
- if secondary_def field is set.
- (som_bfd_ar_write_symbol_stuff): Initialize
- secondary_def.
-
-2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
-
- * dwarf2.c (read_address): Read 16-bits addresses.
- (parse_comp_unit): Accept addr_size == 2.
-
-2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * bfd-in.h: Update copyright date.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * cpu-i370.c: New file.
- * elf32-i370.c: New file.
- * archures.c (enum bfd_architecture): Add bfd_arch_i370.
- (bfd_i370_arch): New.
- (bfd_archures_list): Add bfd_i370_arch.
- * elf.c (prep_headers): Add bfd_arch_i370.
- * Makefile.am: Add support for IBM 370 elf.
- * config.bfd: Likewise.
- * configure.in: Likewise.
- * libbfd.h (bfd_reloc_code_real_names): Likewise.
- * reloc.c (bfd_reloc_code_type): Likewise.
- * targets.c: Likewise.
-
- * Makefile.in: Regenerate.
- * configure: Regenerate.
- * bfd-in2.h: Regenerate.
-
-2000-02-22 Ian Lance Taylor <ian@zembu.com>
-
- * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
- invalid relocation types, and change them to R_386_NONE.
-
-2000-02-22 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (elf_link_add_object_symbols): If a version symbol is
- not defined, don't add a second ELF_VER_CHR.
-
- * elflink.h (elf_bfd_final_link): Call output_extsym for global
- symbols converted to local symbols even when stripping all
- symbols.
- (elf_link_output_extsym): Process global symbols converted to
- local symbols even if they are being stripped.
-
-2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * archures.c (bfd_octets_per_byte): Return unsigned int.
- (bfd_arch_mach_octets_per_byte): Ditto.
- * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
- comparison warning.
- * section.c (bfd_get_section_size_before_reloc): Quell signed
- vs. unsigned comparison warning.
- (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
- * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
- change. What was I thinking?
+ * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
+ * archures.c (bfd_mach_mips12000): Define.
+ * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
+ * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
+ support.
+ (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
* bfd-in2.h: Regenerate.
-
- * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
- (elf_gc_sections): Same here.
- (elf_gc_common_finalize_got_offsets): And here.
-
-2000-02-21 Ian Lance Taylor <ian@zembu.com>
-
- ELF HPPA doesn't work at present; remove it until it does.
- * config.bfd: Comment out setting targ_defvec to
- bfd_elf32_hppa_vec.
- * Makefile.am: Rebuild dependencies.
- (BFD32_BACKENDS): Remove elf32-hppa.lo.
- (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
- (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
- * Makefile.in: Rebuild.
- * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
-
-2000-02-18 Geoff Keating <geoffk@cygnus.com>
-
- * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
- is no bfd_free(). Revert bfd_free part of previous change.
-
-2000-02-18 Geoff Keating <geoffk@cygnus.com>
-
- * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
- arrays.
- (coff_compute_section_file_positions): Use bfd_free to pair
- bfd_malloc.
- (coff_write_object_contents): Likewise.
-
- * coff-rs6000.c (xcoff_howto_table_16): New variable.
- (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
-
-2000-02-18 Ulrich Drepper <drepper@cygnus.com>
-
- * coff-rs6000.c (XCOFFARMAGBIG): New macro.
- (xcoff_ar_file_hdr_big): New structure.
- (SIZEOF_AR_FILE_HDR_BIG): New macro.
- (xcoff_ar_hdr_big): New structure.
- (SIZEOF_AR_HDR_BIG): New macro.
- (xcoff_big_format_p): New macro.
- (xcoff_ardata_big): New macro.
- (arch_xhdr_big): New macro.
- (xcoff_slurp_armap): Handle large archives.
- (xcoff_archive_p): Detect large archives.
- (xcoff_read_ar_hdr): Handle large archives.
- (xcoff_openr_next_archived_file): Handle large archives.
- (xcoff_generic_stat_arch_elt): Handle large archives.
- (xcoff_write_armap_old): Rename from xcoff_write_armap.
- (xcoff_write_armap_big): New function.
- (xcoff_write_armap): New function, dispatch to _old or _big.
- (xcoff_write_archive_contents_old): Rename from
- xcoff_write_archive_contents.
- (xcoff_write_archive_contents_big): New function.
- (xcoff_write_archive_contents): New function, dispatch to _old or
- _big.
-
-2000-02-18 Richard Henderson <rth@cygnus.com>
-
- * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
- and hide_symbol members.
- (elf_link_hash_copy_indirect): Remove.
- (elf_link_hash_hide_symbol): Remove.
- (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
- and elf_backend_hide_symbol.
- (_bfd_elf_link_hash_copy_indirect): Declare.
- (_bfd_elf_link_hash_hide_symbol): Declare.
- * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
- (_bfd_elf_link_hash_hide_symbol): Likewise.
- (_bfd_elf_link_hash_table_init): Don't init killed members.
- * elflink.h (elf_link_add_object_symbols): Use the bed function
- pointers not elf_link_hash_{copy_indirect,hide_symbol}.
- (elf_link_assign_sym_version): Likewise.
- * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
- (elf_backend_hide_symbol): Likewise.
- (elfNN_bed): Update for new members.
-
-2000-02-17 Kevin Buettner <kevinb@redhat.com>
-
- * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
- STACK_END_ADDR): Define for new core file format.
- (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
- for handling the vagaries of the various core file structures used
- by AIX over the years.
- (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
- Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
- core_dumpx structure.
-
-Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
- (bfd_mach_sh3_dsp): Likewise.
- (bfd_mach_sh4): Reinstate.
- (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
+ * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
+
+ 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
+ * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
+ of entries in a structured section.
+ * elf.c: Use new macro.
+ * elf32-i386.c: Use new macro.
+ * elf32-mips.c: Use new macro.
+ * elf64-alpha.c: Use new macro.
+ * elf64-sparc.c: Use new macro.
+ * elfcode.h: Use new macro.
+ * elflink.h: Use new macro.
+
+ 2001-05-21 Andreas Jaeger <aj@suse.de>
+ * dwarf2.c (decode_line_info): Fix error message.
+ (read_abbrevs): Fix test for offset as suggested by Alan Modra and
+ adjust error message.
+
+ 2001-05-17 H.J. Lu <hjl@gnu.org>
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
+ version definition to basename of the output filename.
+
+ 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
+ * elf-m10300.c (mn10300_elf_relax_section): Don't relax
+ negative 32-bit operands to 16 operands when the operand is
+ going to be zero-extended by the modified opcode.
+
+ 2001-05-11 Jakub Jelinek <jakub@redhat.com>
+ * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
+ sections as well.
+ (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
+ to .gnu.linkonce.t.FOO text section.
+
+ 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
+ * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
+ to be unsigned long, in order to match its use.
+
+ 2001-05-10 H.J. Lu <hjl@gnu.org>
+ * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
+ indirect symbols.
+
+ 2001-05-09 H.J. Lu <hjl@gnu.org>
+ * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
+ versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
+ Remove the unused veriable `dynver'.
+
+ 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
+ is always a positive integer. Cast away sign mismatch.
+ * elf32-mips.c: Fix misleading comment and typo.
+ (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
+ correct data type.
+ * elflink.c: Fix typo.
+ (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
+ * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
+
+ 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
+ * targets.c (_bfd_target_vector_entries): Compute value based on
+ the size of the _bfd_target_vector and not bfd_target_vector.
+
+ 2001-05-03 Andreas Jaeger <aj@suse.de>
+ * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
+ (elf_generic_info_to_howto_rel): Likewise.
+ * coff-alpha.c (reloc_nil): Likewise.
+ (alpha_ecoff_bad_format_hook): Likewise.
+ (alpha_adjust_reloc_out): Likewise.
+ (alpha_bfd_reloc_type_lookup): Likewise.
+ (alpha_convert_external_reloc): Likewise.
+ * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
+ (elf64_alpha_reloc_bad): Likewise.
+ (elf64_alpha_reloc_gpdisp): Likewise.
+ (elf64_alpha_bfd_reloc_type_lookup): Likewise.
+ (elf64_alpha_info_to_howto): Likewise.
+ (elf64_alpha_add_symbol_hook): Likewise.
+ (elf64_alpha_create_got_section): Likewise.
+ (elf64_alpha_is_local_label_name): Likewise.
+ (elf64_alpha_merge_ind_symbols): Likewise.
+ * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
+ (mips_elf64_get_reloc_upper_bound): Likewise.
+ * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
+ (nlm_alpha_get_public_offset): Likewise.
+
+ 2001-04-30 H.J. Lu <hjl@gnu.org>
+ * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
+ only for ELF_LINK_FORCED_LOCAL.
+ * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
+ * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
+ if the symbol has hidden or internal visibility.
+
+ 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
+ * coffcode.h (coff_write_object_contents): Use
+ bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
+
+ 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
+ * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
+ only hide symbols marked STV_INTERNAL or STV_HIDDEN.
+
+ 2001-04-05 Steven J. Hill <sjhill@cotw.com>
+ * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
+ endian MIPS ELF target.
+ (mips*-*-linux-gnu*): Use traditional big endian MIPS ELF target.
+ * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
+ 64bit big endian MIPS ELF target.
+ (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
+ endian MIPS ELF target.
+ * configure: Regenerated.
+ * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
+ little endian targets.
+ (mips_elf_sym_is_global): Handle traditional targets.
+ * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
+ 64bit big endian MIPS ELF target.
+ (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
+ endian MIPS ELF target.
+ * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
+ and bfd_elf64_tradlittlemips_vec.
+
+ 2001-04-04 Alan Modra <alan@linuxcare.com.au>
+ * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
+ when -Bsymbolic causes a symbol to no longer need a .plt entry.
+
+ 2001-04-03 David Mosberger <davidm@hpl.hp.com>
+ * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
+
+ 2001-03-30 H.J. Lu <hjl@gnu.org>
+ * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
+ (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
+
+ 2001-03-23 Nick Clifton <nickc@redhat.com>
+ * Makefile.am (BUILD_CFILES): New variable: List of C source
+ files created in build directory.
+ (BUILD_HFILES): New variable: List of header files created in
+ build directory.
+ (POTFILES): Delete.
+ (po/POTFILES.in): Replace rule with empty entry.
+ (po/SRC-POTFILES.in): New rule: Create a list of source files
+ in the source directory.
+ (po/BLD-POTFILES.in): New rule: Create a list of source files
+ in the build directory.
+ (MOSTLYCLEAN): Do not delete source files created in build
+ directory.
+ * Makefile.in: Regenerate.
+ * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
+ into po/Makefile.
+ * configure: Regenerate.
+ * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
+ and BLD_POTFILES.
+ Add .. to the search path when building bfd.pot.
+ Delete POTFILES when performing distclean.
+ Add comment describing why distclean is broken in maintainer mode.
+ * po/POTFILES.in: Delete.
+ * po/SRC-POTFILES.in: New file.
+ * po/BLD-POTFILES.in: New file.
+ * po/bfd.pot: Regenerate.
+
+ 2001-03-06 Igor Shevlyakov <igor@windriver.com>
+ * archures.c (bfd_default_scan): Add Coldfire CPUs.
* bfd-in2.h: Regenerate.
- * coff-sh.c (struct sh_opcode): flags is no longer short.
- (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
- (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
- (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
- (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
- (sh_opcodes): No longer const.
- (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
- (sh_insn_uses_reg): Check for USESAS and USESR8.
- (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
- (_bfd_sh_align_load_span): Return early for SH4.
- Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
- Take into account that field b of a parallel processing insn
- could be mistaken for a separate insn.
- * cpu-sh.c (arch_info_struct): New array elements for
- sh2, sh-dsp and sh3-dsp.
- Reinstate element for sh4.
- (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
- (SH4_NEXT): Reinstate.
- (SH3_NEXT, SH3E_NEXT): Adjust.
- * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
- * elf32-sh.c (sh_elf_set_private_flags): New function.
- (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
- (sh_elf_merge_private_data): New function.
- (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
- (bfd_elf32_bfd_copy_private_bfd_data): Define.
- (bfd_elf32_bfd_merge_private_bfd_data): Change to
- sh_elf_merge_private_data.
-
-2000-02-13 Richard Henderson <rth@cygnus.com>
-
- * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
- hide_symbol members.
- (elf_link_hash_copy_indirect): New.
- (elf_link_hash_hide_symbol): New.
- * elflink.h (elf_link_add_object_symbols): Break out copy from
- indirect new new symbol to elf.c.
- (elf_link_assign_sym_version): Break out privatization of
- non-exported symbol to elf.c.
- * elf.c (_bfd_elf_link_hash_copy_indirect): New.
- (_bfd_elf_link_hash_hide_symbol): New.
- (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
-
-2000-02-13 Ian Lance Taylor <ian@zembu.com>
-
- * section.c (_bfd_strip_section_from_output): Add info parameter.
- If it passed as non-NULL, use it to check whether any input BFD
- has an input section which uses this output section. Change all
- callers.
- * bfd-in2.h: Rebuild.
-
- * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
- bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
- 1999-11-29.
- * bfd-in2.h: Rebuild.
-
-2000-02-10 Timothy Wall <twall@cygnus.com>
-
- * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
- allow final modifications of swapped-in symbol.
- (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
- * coffcode.h (coff_write_relocs): Use macro
- SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
- symbol index should be set to -1.
-
-Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
-
- * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
- USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
- * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
- * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
- sh_insns_uses_or_sets_freg): New functions.
- * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
- * (sh_insns_conflict): Use new functions and new macros to
- detect conflicts when two instructions both set same integer registers,
- both set same fp register, and both set special register.
-
-2000-02-09 Timothy Wall <twall@cygnus.com>
-
- * coffgen.c (coff_real_object_p): Set arch/mach info prior to
- swapping in sections, so that the swapping routines have access to
- the arch/mach info.
-
-2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
-
- * coff-go32.c: Update comment. Update copyright.
-
-2000-01-27 Thomas de Lellis <tdel@windriver.com>
-
- * syms.c (bfd_decode_symclass)
- Two new class characters were added - 'V' and 'v'. The
- meaning of 'W' is now restricted to just weak non-object
- symbols. This allows differentiation between, for example,
- weak functions vs weak objects. nm for example now dumps:
- 'W' = weak global
- 'w' = weak unresolved
- 'V' = weak global object
- 'v' = weak unresolved object
-
- (bfd_is_undefined_symclass): New function. Return true if the
- given symbol class represents and undefined/unresolved symbol.
-
- (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
- unresolved symbols.
-
- * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
-
- * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
- STT_ARM_16BIT flag set, but it is not attached to a data object
- return STT_ARM_16BIT so that it will be treated as code by the
- disassembler.
-
-2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * coff-i386.c (i3coff_object_p): Remove prototype.
- Update copyright.
-
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
- to name. Update copyright.
-
- * trad-core.c (trad_unix_core_file_p): Cast core_regsec
- assignment to avoid warning. Update copyright.
-
-2000-01-24 Robert Lipe (robertl@sco.com)
-
- * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
- instead of using GNU C extension.
-
-2000-01-21 Nick Clifton <nickc@cygnus.com>
-
- * libbfd.c (bfd_read): Do not attempt to get a negativly sized
- amount from a bfd_in_memory structure.
- (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
- structure.
-
-2000-01-14 Nick Clifton <nickc@cygnus.com>
-
- * linker.c (default_indirect_link_order): oops - fix incorrectly
- applied patch from Tim Wall.
-
-2000-01-13 Timothy Wall (twall@tiac.net>
-
- * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
- = scnhsz, filhsz, relsz, aoutsz, etc)
-
- * coffswap.h: Ditto.
-
-2000-01-13 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
- interwork thumb to arm stub.
-
-2000-01-13 Timothy Wall (twall@tiac.net>
-
- * archures.c (bfd_octets_per_byte): New function: Return
- target byte size.
- (bfd_arch_mach_octets_per_byte): New function: Return target
- byte size.
-
- * section.c: Distinguish between octets and bytes for usage of
- _cooked_size, _raw_size, and output_offset. Clarify
- description of bfd_set_section_contents.
+ * cpu-m68k.c: Add Coldfire CPUs for arch table.
+ * ieee.c (ieee_write_processor): Set proper id for
+ Coldfire CPUs.
+
+ 2001-02-27 H.J. Lu <hjl@gnu.org>
+ * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
+ abfd->tdata.aout_data == NULL.
+
+ 2001-02-26 Nick Clifton <nickc@redhat.com>
+ * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
+ up, replacing multiple if statements with a switch.
+ (handle_COMDAT): New function.
+
+ 2001-02-26 H.J. Lu <hjl@gnu.org>
+ * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
+ a warning for section flags we do not handle instead of
+ aborting.
+
+ 2001-02-19 Jakub Jelinek <jakub@redhat.com>
+ * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
+ entries that could serve as a definition for a weak symbol.
+ * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
+
+ 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
+ * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
+ multiarch needs it).
+
+ 2001-02-18 H.J. Lu <hjl@gnu.org>
+ * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
+ index.
+
+ 2001-02-18 Kazu Hirata <kazu@hxi.com>
+ * vms-misc.c: Fix formatting.
+
+ 2001-02-16 Kazu Hirata <kazu@hxi.com>
+ * vms.c: Fix formatting.
+
+ 2001-02-14 H.J. Lu <hjl@gnu.org>
+ * elf.c (elf_find_function): New function.
+ (_bfd_elf_find_nearest_line): Call elf_find_function () to find
+ the file name and function name.
+
+ 2001-02-14 Nick Clifton <nickc@redhat.com>
+ * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
+ (BFD64_BACKENDS): Add pepigen.c
+ Add rules to create peigen.c and pepigen.c from peXXigen.c.
+
+ 2001-02-14 H.J. Lu <hjl@gnu.org>
+ * libcoff-in.h (pe_tdata): Add members target_subsystem and
+ force_minimum_alignment.
+
+ 2001-02-13 Kazu Hirata <kazu@hxi.com>
+ * vms.c (vms_print_symbol): Remove unreachable code.
+ * rs6000-core.c: Fix formatting.
+
+ 2001-02-13 David Mosberger <davidm@hpl.hp.com>
+ * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
+ as _bfd_XXi_only_swap_filehdr_out.
+ (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
+ pe->force_minimum_alignment to TRUE.
+ (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
+ PEI_TARGET_SUBSYSTEM.
+ (pe_print_private_bfd_data): Call
+ _bfd_XX_print_private_bfd_data_common() instead of
+ _bfd_pe_print_private_bfd_data_common().
+ (pe_bfd_copy_private_bfd_data): Call
+ _bfd_XX_bfd_copy_private_bfd_data_common() instead of
+ _bfd_pe_bfd_copy_private_bfd_data_common().
+ (coff_bfd_copy_private_section_data): Define as
+ _bfd_XX_bfd_copy_private_section_data instead of
+ _bfd_pe_bfd_copy_private_section_data.
+ (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
+ of a _bfd_pe_get_symbol_info.
+ * peigen.c: Delete.
+ * peXXigen.c: Renamed from peigen.c.
+ (COFF_WITH_XX): Define this macro (will get expanded into
+ COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
+ compiled as peigen.c or pepigen.c.
+ [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
+ define the canonical PEP structures and definitions.
+ (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
+ effect, enforce minimum file and section alignments. If
+ extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
+ pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
+ so, by default, this is a no-op).
+ * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
+ (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
+ _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
+ _bfd_pefoo if it's not defined. Use these macros to define
+ coff swap macros.
+ * libcoff.h (pe_tdata): Add members target_subsystem and
+ force_minimum_alignment.
+ * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
+ COFF_WITH_pep.
+ (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
+ * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
+ peigen.lo.
+ * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
+ (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
+ PEPAOUTHDR.
+ * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
+ (BFD64_BACKENDS_CFILES): Mention pepigen.c
+ (peigen.c): Add rule to generate from peXXigen.c.
+ (pepigen.c): Ditto.
+ (pepigen.lo): List dependencies for pepigen.lo.
+
+ 2001-02-11 H.J. Lu <hjl@gnu.org>
+ * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
+ alignment.
+
+ 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
+ from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
+ relocations against dynsym symbols.
+ * elf32-mips.c (elf_mips_howto_table): Fix the comment on
+ the R_MIPS_26 relocation.
+ (mips_elf_calculate_relocation): Use (p + 4) instead of p for
+ the R_MIPS_26 relocation.
+ (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
+ relocation.
+ * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
+ the R_MIPS_26 relocation.
+ (mips_elf64_howto_table_rela): Likewise.
+ * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
+ member to mark symbols that have non-CALL relocations against
+ them.
+ (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
+ (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
+ R_MIPS_GOT16.
+ (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
+ non-CALL relocation against it is encountered.
+ (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
+ no_fn_stub is not set.
+ * elf32-mips.c (mips_elf_output_extsym): Get the output section
+ information from the real symbol for indirect ones.
+ Check no_fn_stub to find out if a symbol has a function stub
+ indeed.
+
+ 2001-02-09 Jakub Jelinek <jakub@redhat.com>
+ * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
+
+ 2001-02-09 Mark Kettenis <kettenis@gnu.org>
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
+ similar to R_SPARC_32.
+ * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
+
+ 2001-02-08 Richard Henderson <rth@redhat.com>
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
+ before visibility. Locally defined protected symbols are not
+ dynamic.
- * bfd-in2.h: Regenerate.
+ 2001-02-07 Jakub Jelinek <jakub@redhat.com>
+ * elflink.h (is_global_symbol_definition): Rename to
+ is_global_data_symbol_definition and have it reject function
+ symbols.
+ (elf_link_is_defined_archive_symbol): Use renamed function.
- * coffgen.c: Indicate that the offset parameter is in bytes, not
- octets.
-
- * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
- where appropriate to get the octet offset when calling
- bfd_set_section_contents.
- (bfd_coff_reloc_link_order): Ditto.
-
- * linker.c (bfd_generic_reloc_link_order): Ditto.
- (_bfd_default_link_order): Ditto.
-
- * reloc.c (bfd_perform_relocation): Distinguish between octets
- and bytes. Use octets when indexing into octet data; use bytes
- when calculating target addresses.
- (bfd_install_relocation): Ditto.
-
- * srec.c (srec_write_section): Ditto.
-
-2000-01-13 Nick Clifton <nickc@cygnus.com>
+ 2001-02-07 Todd Vierling <tv@wasabisystems.com>
+ * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
+ * libbfd.h (bfd_target_vector): Likewise.
+ * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
+ make static; create pointer reference named bfd_target_vector.
+ (_bfd_target_vector_entries): Calculate this based on the array
+ typed _bfd_target_vector.
- * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
- 3 to 2. This allows 4 byte sized sections, which is necessary for
- dlltool to build funcitoning DLLs.
+ 2001-02-06 H.J. Lu <hjl@gnu.org>
+ * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
+ internal symbols are not dynamic.
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
-2000-01-10 Philip Blundell <pb@futuretv.com>
+ 2001-02-06 Kazu Hirata <kazu@hxi.com>
+ * elf-m10200.c: Fix formatting.
- * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
- (arm*-*-conix*): New target.
+ 2001-02-01 Kazu Hirata <kazu@hxi.com>
+ * elf-m10300.c: Fix formatting.
-2000-01-10 Egor Duda <deo@logos-m.ru>
+2001-06-10 Philip Blundell <philb@gnu.org>
- * config.bfd: Include elf32_i386 vector to target list for cygwin
- and mingw.
-
- * config.in: Undefine HAVE_WIN32_PSTATUS_T.
- * configure.in: Test for structure win32_pstatus_t in
- <sys/procfs.h>
+ * configure.in: Set version to 2.11.1.
* configure: Regenerate.
-
- * elf.c (elfcore_grok_win32pstatus): New function: process
- win32_pstatus_t notes in elf core file.
- (elfcore_grok_note): Detect win32_pstatus notes.
-
-2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
-
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
- visibility.
- * elflink.h (elf_link_add_object_symbols): Combine visibilities.
- * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
-
-1999-12-29 Richard Henderson <rth@cygnus.com>
-
- * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
- if no dynamic sections created.
-
-1999-12-27 Nick Clifton <nickc@cygnus.com>
-
- * peicode.h (pe_bfd_object_p): Only define for PE format
- targets.
-
-1999-12-17 Nick Clifton <nickc@cygnus.com>
-
- * coff-i386.c (i3coff_object_p): Delete.
- (i386coff_vec): Replace reference to i3coff_object_p with a
- reference to coff_object_p.
-
- * coff-mcore.c (pe_object_p): Delete.
-
- * peicode.h (pe_bfd_object_p): New function: Detect the
- presence of a PE format COFF object file. Also detect and
- warn about the presence of LINK6 format Image Library Format
- object files.
-
-1999-12-16 Nick Clifton <nickc@cygnus.com>
-
- * coff-arm.c (NUM_ELEM): New macro.
- (NUM_RELOCS): New macro: The number of known ARM relocs.
- (RTYPE2HOWTO): Return NULL if the reloc type is out of range.
- (coff_arm_rtype_to_howto): Return NULL if the reloc type is out
- of range.
- (bfd_arm_process_before_allocation): Produce a warning message if
- an out of range symbol index is encountered.
-
-1999-12-14 Nick Clifton <nickc@cygnus.com>
-
- * elflink.h (is_global_symbol_definition): New Function: Return
- true iff the symbol is being given a global definition in this
- bfd.
- (elf_link_is_defined_archive_symbol): Do not bother processing
- symbols for an archive element that has already been included
- in the link.
- Use is_global_symbol_definition().
-
-1999-12-09 Andrew Cagney <cagney@cygnus.com>
-
- * config.bfd: Add support for sparc-*-netbsdelf* and
- sparc-*-netbsdaout*.
-
-1999-12-13 Nick Clifton <nickc@cygnus.com>
-
- * elflink.h (elf_link_is_defined_archive_symbol): Check to see
- if the symbol is in the common section.
-
-1999-12-10 Nick Clifton <nickc@cygnus.com>
-
- * elflink.h (elf_link_is_defined_archive_symbol): New
- function: Decide if a symbol, in an archive map is there
- because it is defined in the archive element, or because it is
- just another common declaration of it.
- (elf_link_add_archive_symbols): Use
- elf_link_is_defined_archive_symbol to decide if an archive
- element contain a reference to a common symbol should be
- linked in or not.
-
-1999-12-10 Nick Clifton <nickc@cygnus.com>
-
- * elflink.h: Revert previous patch.
- * targets.c: Revert previous patch.
- * libbfd-in2.h: Revert previous patch.
- * libbfd.h: Revert previous patch.
- * elfxx-target.h: Revert previous patch.
- * archive.c: Revert previous patch.
- * aout-target.h: Revert previous patch.
- * aout-tic30.h: Revert previous patch.
- * bfd.c: Revert previous patch.
- * coff-alpha.c: Revert previous patch.
- * coff-rs6000.c: Revert previous patch.
- * elf64-mips.c: Revert previous patch.
- * ieee.c: Revert previous patch.
- * libecoff.h: Revert previous patch.
- * oasys.c: Revert previous patch.
- * som.c: Revert previous patch.
- * vms.c: Revert previous patch.
-
-1999-12-09 Nick Clifton <nickc@cygnus.com>
-
- * elflink.h (elf_link_add_archive_symbols): Add an archive
- element even if contains a symbol which is currently only
- considered to be a common.
-
- * targets.c (struct bfd_target): Add new field
- _bfd_allow_commons_in_armap.
- * bfd-in2.h:Regenerate.
-
- * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap):
- Define.
- (_bfd_archive_bsd_allow_commons_in_armap): Define.
- * libbfd.h: Regenerate.
- * elfxx-target.h: If using COFF archive map, override
- definition of allow_commons_in_armap and replace with
- bfd_false.
+2001-06-09 Philip Blundell <philb@gnu.org>
- * archive.c (bfd_compute_and_write_armap): Do not place common
- symbols into the archive map unless _bfd_allow_commons_in_armap
- returns true.
+ * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
+ change.
+ (elf32_arm_plt_entry): Likewise.
- * aout-target.h (MY_allow_commons_in_armap): Define.
- * aout-tic30.h (MY_allow_commons_in_armap): Define.
- * bfd.c (bfd_allow_commons_in_armap): Define.
- * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define.
- * coff-rs6000.h (xcoff_allow_commons_in_armap): Define.
- * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define.
- * ieee.c (ieee_ecoff_allow_commons_in_armap): Define.
- * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define.
- * oasys.c (oasys_allow_commons_in_armap): Define.
- * som.c (som_allow_commons_in_armap): Define.
- * vms.c (vms_allow_commons_in_armap): Define.
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
-1999-12-07 Jim Blandy <jimb@cygnus.com>
+ * Most files: Update copyright notices.
- Add support for SSE registers in ELF core files.
- * elf.c (elfcore_make_note_pseudosection): New function.
- (elfcore_grok_prfpreg): Use it.
- (elfcore_grok_prxfpreg): New function.
- (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.
+2001-05-29 Andreas Jaeger <aj@suse.de>
-1999-12-03 Ian Lance Taylor <ian@zembu.com>
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
+ (elf64_x86_64_relocate_section): Likewise.
- * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
- value by 4 before storing it back in the field. From
- Koundinya. K <kk@ddeorg.soft.net>.
+2001-05-28 Andreas Jaeger <aj@suse.de>
-Tue Nov 30 22:41:14 1999 Jeffrey A Law (law@cygnus.com)
+ * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
+ generic version since we want a hashsize of 4.
+ (elf_backend_size_info): Likewise.
- * archures.c (bfd_mach_am33): Define.
- * bfd-in2.h: Rebuilt.
- * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
- * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
- (compute_function_info): Handle additional registers saved by
- movm on the am33.
- (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
- (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
-
-1999-11-29 Jim Blandy <jimb@cygnus.com>
-
- * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
- functions.
- * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
- declarations.
-
-1999-11-27 Michael Meissner <meissner@cygnus.com>
+2001-05-28 Nicolas Pitre <nico@cam.org>
- * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for
- internal use within gas for alpha explicit relocations.
- (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto.
- (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto.
- (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto.
- (BFD_RELOC_ALPHA_USER_GPDISP): Ditto.
- (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto.
- (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto.
+ * elf32-arm.h: Fix PLT generation for big endian ARM.
- * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for
- BFD_RELOC_ALPHA_USER_*.
+2001-05-28 Jeff Sturm <jsturm@one-point.com>
+ * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
+ * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
+ and BFD_RELOC_SPARC_UA64 mapping
+ * elf64-sparc.c: Likewise.
-1999-11-26 Fred Fish <fnf@cygnus.com>
-
- * elf.c (elfcore_read_notes): Add prototype for static function.
- (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr.
- (bfd_section_from_phdr): Replacement function that calls
- _bfd_elf_make_section_from_phdr for generic segment types and
- backend fucntion pointed to by elf_backend_section_from_phdr for
- backend specific segment types.
- (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes,
- now called by _bfd_elf_make_section_from_phdr. Note that this func
- is now just a stub between the caller and bfd_section_from_phdr.
-
- * elf-bfd.h (struct elf_backend_data): Add new function pointer
- elf_backend_section_from_phdr.
- (elf_backend_section_from_phdr): Add prototype.
-
- * elfxx-target.h (elf_backend_section_from_phdr): Define default.
- (elfNN_bed): Add elf_backend_section_from_phdr.
-
-1999-11-25 Nick Clifton <nickc@cygnus.com>
-
- * coff-arm.c (bfd_arm_get_bfd_for_interworking): Add
- SEC_CODE and SEC_READONLY flags to glue sections.
-
- * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add
- SEC_CODE and SEC_READONLY flags to glue sections.
+2001-05-23 Alan Modra <amodra@one.net.au>
-1999-11-20 Nick Clifton <nickc@cygnus.com>
+ Merge from mainline.
+ 2001-05-17 Alan Modra <amodra@one.net.au>
+ * elf32-hppa.c (hppa_build_one_stub): Add an assert to check
+ plt.offset.
- * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous
- delta.
+ 2001-05-16 Alan Modra <amodra@one.net.au>
+ * section.c (asection): Add linker_has_input field.
+ (STD_SECTION): Adjust initialization to suit.
+ * ecoff.c (bfd_debug_section): Likewise.
+ * bfd-in2.h: Regenerate.
-1999-11-19 Catherine Moore <clm@cygnus.com>
+ 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * ecoff.c (bfd_debug_section): Fix initialization.
- * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
- (elf_cpu32_plt_entry): Likewise.
+ 2001-05-12 Peter Targett <peter.targett@arccores.com>
+ * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
+ name for 'arc5' core versions.
+ (bfd_arc_arch): Make bfd_mach_arc_6 default.
+ * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
+ architecture.
+ (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
-1999-11-18 Nick Clifton <nickc@cygnus.com>
+ 2001-05-08 Ian Lance Taylor <ian@zembu.com>
+ * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
+ NULL or is not COFF.
+ (coff_i386_rtype_to_howto): Don't dump core if output section
+ owner is not COFF.
- * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling
- for RVA relocs.
- (coff_mcore_relocate_section): Initialise addend to 0.
- Special case processing of RVA reloc.
+ 2001-04-13 Roger Sayle <roger@metaphorics.com>
+ * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
+ flag on pe-i386 targets.
-1999-11-17 Richard Henderson <rth@cygnus.com>
+ 2001-04-26 H.J. Lu <hjl@gnu.org>
+ * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
+ valid.
- * elf-bfd.h (struct elf_backend_data): Reorder collect and
- type_change_ok; add sign_extend_vma.
- * elf32-mips.c (elf_backend_sign_extend_vma): Define.
- * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
- (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
- * elfxx-target.h (elf_backend_sign_extend_vma): Default.
- (elfNN_bed): Follow struture changes.
+ 2001-04-05 David Mosberger <davidm@hpl.hp.com>
+ * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
+ ordinary "progbits" section.
-1999-11-09 Ian Lance Taylor <ian@zembu.com>
+2001-05-04 Richard Henderson <rth@redhat.com>
- * libbfd.c (bfd_read): Check result of read against desired result
- using !=, not <.
- (_bfd_generic_get_section_contents): Set bfd_error if the seek is
- invalid compared to the section size.
+ * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
- * ieee.c (ieee_slurp_debug): Get the length of the debug
- information right if there is no data part.
+2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
-Tue Nov 2 01:44:41 1999 Jeffrey A Law (law@cygnus.com)
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
+ R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
- * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
- R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
+2001-04-27 Andreas Jaeger <aj@suse.de>
-1999-10-28 Ian Lance Taylor <ian@zembu.com>
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
+ out handled entries.
+ (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
+ (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
+ (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
+ GOT32.
- * elflink.h (elf_bfd_final_link): Make last_local signed.
+2001-04-30 Alan Modra <amodra@one.net.au>
-1999-10-27 Ian Lance Taylor <ian@zembu.com>
+ * elf32-hppa.c (final_link_relocate): Branch to .+8 for
+ calls to undefined weak symbols.
- * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
- starts with a zero.
+2001-04-19 Andreas Jaeger <aj@suse.de>
-Sat Oct 23 17:36:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
+ * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
+ (elf64_x86_64_plt_entry): Likewise.
+ (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
+ (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
- * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and
- bfd_mach_d10v_ts3.
- * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add.
- * bfd-in2.h: Regenerate.
-
-1999-10-15 Andrew Haley <aph@cygnus.com>
+2001-03-31 Philip Blundell <philb@gnu.org>
- * dwarf1.c (parse_die): Fail to parse a die if its length is zero.
+ From 2001-03-26 H.J. Lu <hjl@gnu.org>
+ * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
+ if there are any relocations for generic ELF.
+ (bfd_elf32_bfd_link_add_symbols): Defined to
+ elf32_generic_link_add_symbols.
+ * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
+ if there are any relocations for generic ELF.
+ (bfd_elf64_bfd_link_add_symbols): Defined to
+ elf64_generic_link_add_symbols.
-Sun Oct 17 17:19:00 1999 Jeffrey A Law (law@cygnus.com)
+2001-03-21 Alan Modra <alan@linuxcare.com.au>
- * libhppa.h (bfd_hppa_insn2fmt): Change to return an int.
+ * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
+ non-NULL before attempting to dereference.
-1999-10-08 Ian Lance Taylor <ian@zembu.com>
+2001-03-20 Andreas Schwab <schwab@suse.de>
- * elflink.h (elf_merge_symbol): When overriding a weak symbol with
- a defined symbol in a shared library, clear the DEF_DYNAMIC flag
- too.
+ * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
+ relocation value when resolving a reference from a debugging
+ section.
-Fri Oct 8 13:03:45 1999 Geoffrey Keating <geoffk@cygnus.com>
-
- * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
- relocs also need the GP value.
- (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
- properly. Handle sign-extension for R_MIPS_64 correctly. Correct
- the GP value for R_MIPS_LITERAL relocs too. Handle
- R_MIPS_64 relocs properly on big-endian MIPS.
- (mips_elf_sign_extend): Behave properly with 'long long'.
- (mips_elf_highest): Correct typo.
-
-Mon Oct 4 17:49:45 1999 Nick Clifton <nickc@cygnus.com>
-
- * cpu-m32r.c (arch_info_struct): New static global.
- (bfd_m32r_arch): Refer to it.
- * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
- (m32r_elf_print_private_bfd_data): Ditto.
- (m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
- * archures.c (bfd_mach_m32rx): Define it.
- * bfd-in2.h: Rebuild.
+2001-03-16 Philip Blundell <philb@gnu.org>
-1999-09-28 Fred Fish <fnf@cygnus.com>
-
- * targets.c (cisco_core_vec): Replaced with two new vecs ...
- (cisco_core_big_vec): Add new bigendian vec.
- (cisco_core_little_vec): Add new little endian vec.
-
- * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
- (crash_info_locs): Add array of possible offsets.
- (MASK_ADDR): Mask to apply to crash info offset.
- (crashinfo_external): Add textbase, database, bssbase and
- turn into a typedef.
- (cisco_core_file_validate): Renamed from cisco_core_file_p.
- Many small changes to account for additional hardware versions.
- Pick a reasonable size for ".reg" section. Add a ".crash"
- section to allow access to crashinfo_external struct.
- (cisco_core_file_p): New version of this function that
- iterates over crash_info_locs, calling cisco_core_file_validate.
- (cisco_core_vec): Old big endian only vec replaced with ...
- (cisco_core_big_vec): Add big endian version.
- (cisco_core_little_vec): Add little endian version.
-
- * configure.in (cisco_core_vec): Split to two new vectors ...
- (cisco_core_big_vec): New target vector.
- (cisco_core_little_vec): New target vector.
* configure: Regenerate.
- * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
- to cisco_core_big_vec in targ_selvecs.
-
-1999-09-28 Geoffrey Keating <geoffk@cygnus.com>
-
- * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
- (mips_elf_relocate_got_local): Unused, delete.
- (mips_elf_relocate_global_got): Unused, delete.
-
-1999-09-24 Fred Fish <fnf@cygnus.com>
- * elf.c (bfd_section_from_phdr): Add typename variable. Use p_type
- to initialize it to something meaningful. Then use it to generate
- more useful segment names.
+2001-03-16 Alan Modra <alan@linuxcare.com.au>
-Sun Sep 19 12:16:47 1999 Jeffrey A Law (law@cygnus.com)
+ * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
+ (hppa_link_hash_newfunc): Init it.
+ (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
+ section appears to be non-PIC.
+ (final_link_relocate): Likewise.
+ (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
+ possible candidate function, and set pic_call for those that will
+ only have a .plt entry for the PIC call stub.
+ (hppa_handle_PIC_calls): Set maybe_pic_call.
- * som.c (NO_PCREL_MODES): Define if the system does not define
- R_SHORT_PCREL_MODE.
- (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
- (som_write_fixups): Eliminate redundant pcrel mode relocs. Handle
- R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
- * libhppa.h (dis_assemble_22): New function.
- (bfd_hppa_insn2fmt): Handle long branch.
+ * elf32-hppa.c: Correct field selector in stub comments.
+ (clobber_millicode_symbols): Formatting fix.
- * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
- in PA2.0.
+2001-03-11 Philip Blundell <philb@gnu.org>
-1999-09-17 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * configure.in: Set version to 2.11.
- * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16,
- BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs.
- (reloc_howto_type howto_table): Tidy comments and whitespace.
-
-1999-09-17 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo
- previous delta. Set sec->gc_mark instead.
+ * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
+ entries that could serve as a definition for a weak symbol.
-Thu Sep 16 11:21:13 1999 Catherine Moore <clm@cygnus.com>
+2001-03-07 Andreas Jaeger <aj@suse.de>
- * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0.
- (elf_cpu32_plt_entry): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
+ some relocation values.
-Thu Sep 16 10:48:17 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-28 Andreas Jaeger <aj@suse.de>
- * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
+ to addend.
- * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
- symbol table, then just compute a suitable value (but do not
- create a __gp symbol).
+2001-02-26 Andreas Jaeger <aj@suse.de>
- * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
- symbols when building shared libraries.
- (elf_hppa_final_link_relocate): Correct handling of PCREL
- relocations against undefined symbols.
+ * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
-1999-09-16 Nick Clifton <nickc@cygnus.com>
+2001-02-21 David Mosberger <davidm@hpl.hp.com>
- * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark
- interworking sections as linker created so that they will not
- be removed by garbage collection.
+ * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
+ C8 said "1" instead of "8". Clarify error string for IMM22:
+ "signed integer" instead of just "integer".
-Wed Sep 15 02:31:57 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-20 Andreas Jaeger <aj@suse.de>
- * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
- (elf_hppa_final_link_relocate): Consistently create an absolute
- address, then subtract out the value of __gp.
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
+ PLT entries that could serve as a definition for a weak symbol.
-1999-09-14 Michael Meissner <meissner@cygnus.com>
+2001-02-18 David O'Brien <obrien@FreeBSD>
- * configure.in (Canonicalization of target names): Remove adding
- ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
- generates $ac_config_sub with a ${CONFIG_SHELL} already.
+ * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
+ FreeBSD/i386-CURRENT differently until I can figure out the needed
+ corefile changes.
* configure: Regenerate.
+ * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
+ FreeBSD/PowerPC, and FreeBSD/sparc64.
-1999-09-14 Nick Clifton <nickc@cygnus.com>
+2001-02-14 Philip Blundell <pb@futuretv.com>
- * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of
- Mitsubishi).
+ From 2001-02-06 H.J. Lu <hjl@gnu.org>
+ * bfd/peicode.h (coff_swap_filehdr_in): Remove the e_magic
+ checking.
+ (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
+ external_PEI_IMAGE_hdr.
-Mon Sep 13 20:01:47 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-14 Bo Thorsen <bo@suse.de>
- * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
- (elf_hppa_final_link): Initialize text_segment_base and
- data_segment_base.
- (elf_hppa_final_link_relocate): Handle SEGREL relocations.
+ * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
+ (elf64_86_64_size_info): Struct added to fix a problem
+ with the hashtable string entries.
+ (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
+ (elf64_x86_64_size_dynamic_sections): A FIXME removed.
+ (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
+ remove the FIXME for this.
+ (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
+ section. Also removed the FIXME for it.
+ (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
+ (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
+ (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
- * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
- (elf_hppa_final_link_relocate): Likewise.
- (elf_hppa_relocate_insn): Likewise.
- (elf_hppa_relocate_section): Initialize HOWTO.
+2001-02-14 Philip Blundell <pb@futuretv.com>
-1999-09-13 Donn Terry <donn@interix.com>
+ From 2001-02-08 H.J. Lu <hjl@gnu.org>
+ * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_32
+ relocation entries for weak definitions when building DSO with
+ -Bsymbolic.
- * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
- handling to support both GNU and MS objects.
+2001-02-13 Richard Henderson <rth@redhat.com>
- * coffcode.h (coff_write_object_contents): Don't check reloc_count
- when determining whether to set F_RELFLG.
+ * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
+ and not user provided.
-1999-09-13 Philip Blundell <pb@nexus.co.uk>
+2001-02-13 Alan Modra <alan@linuxcare.com.au>
- * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check
- PC24 relocs if the target is an undefined weak symbol.
- (arm_add_to_rel): Fix compiler warning.
- (elf32_arm_plt0_entry): Correct comments.
-
-1999-09-13 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
+ $global$ referenced but not defined, set its value here.
- * elfcode.h (write_relocs): Check for the_bfd NULL when handling
- an absolute symbol in REL relocs.
+2001-02-09 Bo Thorsen <bo@suse.de>
-Sun Sep 12 23:47:58 1999 Jeffrey A Law (law@cygnus.com)
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
+ alignment to 3.
+ (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
+ and relocation.
+ (elf64_x86_64_relocate_section): Fix formatting.
+ (elf64_x86_64_relocate_section): Fix addend for relocation of
+ R_X86_64_(8|16|32|PC8|PC16|PC32).
- * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
- Stub SEGREL32. Return an error for any relocation not handled.
+Mon Feb 12 17:44:39 CET 2001 Jan Hubicka <jh@suse.cz>
-1999-09-12 Ian Lance Taylor <ian@zembu.com>
+ * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
- * cofflink.c (coff_link_add_symbols): Look for special MSVC string
- constant symbols, and avoid multiple definition errors on them.
+2001-02-10 Nick Clifton <nickc@redhat.com>
-1999-09-12 Donn Terry <donn@interix.com>
+ * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
+ rel, it will be handled later on.
- * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
- significant bit is set.
+2001-02-09 David Mosberger <davidm@hpl.hp.com>
-1999-09-11 Ian Lance Taylor <ian@zembu.com>
+ * elfxx-ia64.c (is_unwind_section_name): New function. Returns
+ true if section name is an unwind table section name.
+ (elfNN_ia64_additional_program_headers): Count each unwind section
+ separately.
+ (elfNN_ia64_modify_segment_map): Install one unwind program header
+ for each unwind separate section. Note: normally the linker
+ script merges the unwind sections that go into a single segment,
+ so this still generates at most one unwind program header per
+ segment.
- * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
+ * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
+ name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
+ (elfNN_ia64_fake_sections): Mark sections with names that start
+ with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
+ unwind section.
- * elfcode.h (write_relocs): Handle an absolute symbol in REL
- relocs as we do for RELA relocs.
+ * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
+ Use it to make sh_info in unwind section point to the text section
+ it applies to.
-1999-09-11 Donn Terry <donn@interix.com>
+2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
- * libpei.h (_bfd_pei_final_link_postscript): Declare.
- (coff_final_link_postscript): Define.
- * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
- directory entries here.
- (_bfd_pei_final_link_postscript): New function.
+ * coffgen.c (coff_find_nearest_line): If stabs info is successfully
+ found, do not attempt to find dwarf2 info before returning.
- * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
- section flags based on the section name.
+2001-01-30 Alan Modra <alan@linuxcare.com.au>
- * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
- get the overflow of the s_nlnno field from the s_nreloc field.
- * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
- the s_nlnno overflow of the .text section into the s_nreloc
- field.
+ * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
+ (elf_backend_get_symbol_type): Define.
+ (elf64_hppa_object_p): Set architecture and machine from elf
+ header flags.
- * peigen.c (add_data_entry): Declare.
- (pei_swap_aouthdr_out): Get image size right. Set linker version
- more intuitively.
- (pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
- (pe_print_idata): Code cleanup, print more info, get rid of (now)
- extraneous ImageBase.
- (pe_print_edata): Likewise.
- (pe_print_pdata): Likewise. Print exception entries.
- (pe_print_reloc): Likewise. Print MIPS_JMPADDR.
- (tbl): Make const, add "UNKNOWN".
- (_bfd_pe_print_private_bfd_data_common): Print timestamp.
- (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
- section data directory.
- (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
-
- * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
- * peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
- * peicode.h (coff_get_symbol_info): Define.
-
- * config.bfd (i[3456]86-*-interix*): Set targ_cflags to
- -DSTRICT_PE_FORMAT.
- * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
- than __INTERIX.
- (coff_classify_symbol): Re-revert 1999-08-08 patch if
- STRICT_PE_FORMAT.
-
- * libpei.h: New file, broken out of peicode.h.
- * peigen.c: New file, broken out of peicode.h.
- * peicode.h: A bunch of code moved out to libpei.h and peigen.c.
- * configure.in: Add peigen.lo to list of files required for each
- PE target.
- * Makefile.am: Rebuild dependencies.
- (BFD32_BACKENDS): Add peigen.lo.
- (BFD32_BACKENDS_CFILES): Add peigen.c.
- (SOURCE_HFILES): Add libpei.h.
- * configure, Makefile.in: Rebuild.
-
- * peicode.h (coff_swap_scnhdr_in): Don't check for a special
- section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
- instead. Don't clear the s_paddr field for an uninitialized data
- section.
+2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
- * coffcode.h (coff_mkobject_hook): Set timestamp field in
- coff_data_type to f_timdat.
- * peicode.h (pe_mkobject_hook): Likewise.
-
- * peicode.h (coff_swap_filehdr_in): Check the NT executable magic
- number if COFF_IMAGE_WITH_PE.
-
- * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
- to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
- (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
- there is no SEC_DEBUGGING section.
- * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
- IMAGE_FILE_DEBUG_STRIPPED.
-
- * pe-i386.c (COFF_LONG_FILENAMES): Define.
- (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
- * pei-i386.c (COFF_LONG_FILENAMES): Define.
- (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
-
- * coffswap.h (IMAGE_BASE): Don't define.
- * pei-arm.c (IMAGE_BASE): Don't define.
- * pei-i386.c (IMAGE_BASE): Don't define.
- * pei-mcore.c (IMAGE_BASE): Don't define.
- * pei-ppc.c (IMAGE_BASE): Don't define.
-
- * cofflink.c (_bfd_coff_link_input_bfd): When writing out a
- symbol, switch on the class when determining whether to modify the
- value. For PE, don't modify the value of a C_FCN symbol not named
- .bf.
-
- * libbfd-in.h (_bfd_abort): Declare.
- (abort): Define.
- * bfd.c (_bfd_abort): New function.
- * libbfd.h: Rebuild.
+ * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
+ before mdebug.
- * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
- special handling.
+2001-01-26 Richard Henderson <rth@redhat.com>
- * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
- don't write out the associated line numbers.
+ * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
+ for non-default visibility.
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
+ delete ugly macro and replace with pretty function.
- * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
- aux entries.
+2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
- * cofflink.c (coff_link_add_symbols): Don't warn about symbol type
- changes when the base type is unknown.
+ * coff-go32.c: Update copyright.
+ * coff-stgo32.c: Likewise.
+ * coff-go32.c (COFF_LONG_FILENAMES): Define.
+ * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
+ * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
+ * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
- * coffgen.c (coff_print_symbol): Fix printing of aux record for
- function symbols.
+2001-01-25 Kazu Hirata <kazu@hxi.com>
- * syms.c (BSF_DEBUGGING_RELOC): Define.
- * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
- for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
- symbols named .bf.
- * coffgen.c (fixup_symbol_value): Relocate a symbol which has
- BSF_DEBUGGING_RELOC set.
* bfd-in2.h: Rebuild.
+ * libbfd.h: Likewise.
-1999-09-10 Ian Lance Taylor <ian@zembu.com>
-
- * ecoff.c (bfd_debug_section): Update initialization for new
- comdat_info field.
- (_bfd_ecoff_styp_to_sec_flags): Add section parameter.
- * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.
-
-1999-09-10 H.J. Lu <hjl@gnu.org>
-
- * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
- _bfd_filnmlen field.
- * coff-mips.c (mips_ecoff_backend_data): Likewise.
-
-Fri Sep 10 00:35:14 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
- for FPTR relocs involving local symbols.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
- value for the stub address in a call through a stub.
- Install the value for a local symbol directly into the DLT
- instead of generating a reloc. Correctly handle FPTR64 relocs.
-
- * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
- (elf_hppa_remark_useless_dynamic_symbols): Similarly.
- (elf_hppa_final_link): Call them.
-
-1999-09-10 Ian Lance Taylor <ian@zembu.com>
-
- * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
- (elf_adjust_dynamic_symbol): ...from here.
-
-Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
- relocation, remove them. SECREL64->LTOFF16WF.
- (elf_hppa_final_link_relocate): Handle LTOFF* relocations. Handle
- DIR* relocations.
- (elf_hppa_relocate_insn): Similarly.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
- (elf_hppa_relocate_insn): Similarly.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
- GPREL* relocations.
- (elf_hppa_relocate_insn): Similarly.
-
- * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
- Handle LTOFF_TP* relocs.
- (elf_hppa_relocate_insn): Similarly.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
- Consistently deal with addends. Handle DLTIND14F and DLTREL14F.
- (elf_hppa_relocate_insn): Handle PCREL* relocs.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
- DIR32, DIR64 and FPTR64 relocations.
- (elf_hppa_relocate_insn): Similarly.
-
- * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
- address of the .PARISC.global section.
- (elf_hppa_relocate_section): Lookup and pass the PA64 hash
- table entry elf_hppa_final_link_relocate. Do not give a warning
- for a reloc against an external symbol if it has a PA64 hash
- table entry.
- (elf_hppa_final_link_relocate): Significantly rework. Handle
- DLTIND relocations. Compute the final value of the relocation
- before passing the value of elf_hppa_relocate_insn.
- (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
- relocation support. Handle DLTIND relocation requests just like
- DLTREL relocation requests. Simplify branch handling.
-
-1999-09-08 Ulrich Drepper <drepper@cygnus.com>
-
- * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
- non-allocated section as done in i386 version.
- (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
- statement since this is no know relocation.
-
-Tue Sep 7 17:25:12 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
- relocs.
- (elf_hppa_relocate_insn): Similarly.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
- DLTREL14WD relocs.
- (elf_hppa_relocate_insn): Similarly.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
- DLTREL21L relocs. Pass the output bfd to elf_hppa_relocate_insn.
- Pass the relocate type rather than the insn format to
- elf_hppa_relocate_insn.
- (elf_hppa_relocate_insn): Make switch dependent on relocation type
- rather than the opcode. Handle DLTREL21L and DLTREL14R relocs.
-
-1999-09-07 Ian Lance Taylor <ian@zembu.com>
-
- * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
- (bfd_coff_filnmlen): Define.
- (bfd_coff_std_swap_table): Initialize new field.
- * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
- than FILNMLEN.
- (coff_write_symbols): Likewise.
- (coff_get_normalized_symtab): Likewise.
- * coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
- * libcoff.h: Rebuild.
-
-1999-09-06 Donn Terry <donn@interix.com>
-
- * coffcode.h (sort_by_secaddr): New static function if
- COFF_IMAGE_WITH_PE.
- (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
- sections by VMA when assigning target_index values. Always set
- virt_size.
-
- * libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
- * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set
- pe_flags field.
- * libcoff.h: Rebuild.
-
- * coffcode.h (coff_set_custom_section_alignment): Add const to
- declaration to match definition.
- (coff_write_object_contents): Don't set F_AR32W(R)? if
- COFF_WITH_PE.
-
- * coff-i386.c (in_reloc_p): Add declaration.
- (i386coff_vec): Simplify initialization of
- application_section_flags.
-
- * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
- version. Move COFF_WITH_PE specific code to new version.
- (stype_to_sec_flags): Likewise. Add section parameter.
- * coffgen.c (make_a_section_from_file): Set target_index before
- calling styp_to_sec_flags. Pass section to styp_to_sec_flags.
- * libcoff.h: Rebuild.
-
- * syms.c (stt): Add some PE/PEI section names.
- (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
- symbol.
- (bfd_symbol_info): Check for 'w'.
+2001-01-23 H.J. Lu <hjl@gnu.org>
- * section.c (struct bfd_comdat_info): Define.
- (asection): Add comdat field.
- (STD_SECTION): Initialize comdat field.
- (bfd_make_section_anyway): Likewise.
* bfd-in2.h: Rebuild.
-1999-09-06 Andreas Schwab <schwab@suse.de>
-
- * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
- to version symbols.
+2001-01-23 H.J. Lu <hjl@gnu.org>
-1999-09-06 Nick Clifton <nickc@cygnus.com>
+ * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
+ is NULL or PRIV(vms_rec) is outside of the buffer.
- * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and
- bfd_realloc instead of calloc and realloc.
+2001-01-23 Kazu Hirata <kazu@hxi.com>
-1999-09-04 Steve Chamberlain <sac@pobox.com>
-
- * cpu-pj.c: New file.
- * elf32-pj.c: New file.
- * config.bfd (pj*): New cpu.
- (pj-*-*, pjl-*-*): New targets.
- * configure.in (bfd_elf32_pj_vec): New target vector.
- (bfd_elf32_pjl_vec): New target vector.
- * archures.c (bfd_arch_pj): Define.
- * elf.c (prep_headers): Handle bfd_arch_pj.
- * reloc.c: Define BFD_RELOC_PJ_* relocations.
- * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
- to target vector list.
- * Makefile.am: Rebuild dependencies.
- (ALL_MACHINES): Add cpu-pj.lo.
- (ALL_MACHINES_CFILES): Add cpu-pj.c.
- (BFD32_BACKENDS): Add elf32-pj.lo.
- (BFD32_BACKENDS_CFILES): Add elf32-pj.c.
- * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
-
-1999-09-04 Ian Lance Taylor <ian@zembu.com>
-
- * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
- * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
- and NON_GOT_REF from weak defined symbol to real symbol.
- * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
- (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
- create a COPY reloc.
- * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
- (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
- don't create a COPY reloc.
-
-1999-09-03 Ian Lance Taylor <ian@zembu.com>
-
- * elflink.h (elf_bfd_final_link): When counting relocations, don't
- count those in sections we are not including in the link.
-
-Thu Sep 2 17:41:20 1999 Jeffrey A Law (law@cygnus.com)
-
- * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
- field in hpux11 shared libraries.
-
-1999-09-02 Nick Clifton <nickc@cygnus.com>
-
- * elflink.h (elf_gc_record_vtentry): Fix memory leak.
-
-Wed Sep 1 13:34:29 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
- (elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
- (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
-
-1999-08-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
-
- * elflink.h (record_link_assignment): When possible, keep the
- original type of the symbol.
-
-Mon Aug 30 15:26:48 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
- R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
- tools were configured.
- * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
-
-1999-08-26 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
- GOT entries for GOT16 relocations; they're not required.
+ * coff64-rs6000.c: Fix formatting.
+ * coff-arm.c: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-pmac.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * elf32.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i860.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elflink.c: Likewise.
+ * elflink.h: Likewise.
+ * elf-m10200.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+
+ * aoutx.h: Fix formatting.
+ * bfd.c: Likewise.
+ * bfd-in2.h: Likewise.
+ * bfd-in.h: Likewise.
+ * cpu-i386.c: Likewise.
+ * cpu-m68hc11.c: Likewise.
+ * dwarf2.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * format.c: Likewise.
+ * freebsd.h: Likewise.
+ * hash.c: Likewise.
+ * hp300hpux.c: Likewise.
+ * hppabsd-core.c: Likewise.
+ * hpux-core.c: Likewise.
-1999-08-24 Nick Clifton <nickc@cygnus.com>
+2001-01-22 Bo Thorsen <bo@suse.de>
- From a patch submitted by Roland McGrath <roland@baalperazim.frob.com>
+ * elf64-x86-64.c: Added PIC support for X86-64.
+ (elf64_x86_64_link_hash_newfunc): Function added.
+ (elf64_x86_64_link_hash_table_create): Likewise.
+ (elf64_x86_64_check_relocs): Likewise.
+ (elf64_x86_64_gc_mark_hook): Likewise.
+ (elf64_x86_64_gc_sweep_hook): Likewise.
+ (elf64_x86_64_adjust_dynamic_symbol): Likewise.
+ (elf64_x86_64_size_dynamic_sections): Likewise.
+ (elf64_x86_64_discard_copies): Likewise.
+ (elf64_x86_64_finish_dynamic_symbol): Likewise.
+ (elf64_x86_64_finish_dynamic_sections): Likewise.
+ (elf64_x86_64_relocate_section): Add relocation of PIC sections.
- * config.bfd (arm-*-netbsd*): New target.
- * configure.in (armnetbsd_vec): New target vector.
- * configure: Regenerate
- * targets.c (bfd_target_vector): Add &armnetbsd_vec.
+2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo.
- (ALL_MACHINES_CFILES): Add armnetbsd.c.
- (armnetbsd.lo): New rule with deps.
+ * Makefile.am (install-data-local): Make use of $(DESTDIR).
* Makefile.in: Regenerate.
-
- * armnetbsd.c: New file: Definitions specific to arm-netbsd
- target.
-
-Tue Aug 24 00:25:58 1999 Jeffrey A Law (law@cygnus.com)
-
- * som.c (som_slurp_symbol_table): Fix typo in comment.
-
-Fri Aug 20 17:01:23 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
- here instead of using elf_section_data...
-
-1999-08-19 Nick Clifton <nickc@cygnus.com>
-
- * coff-mcore.c (mcore_emit_base_file_entry): New function: Emit
- relocations into the base file.
- (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if
- we are building a base file.
-
-1999-08-19 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.h (arm_add_to_rel): New function. Add a value to
- a REL style reloc.
- (elf32_arm_relocate_section): Use arm_add_to_rel to increment
- REL relocs when performing a partial relocation.
-
-1999-08-18 Donn Terry <donn@interix.com>
-
- * cofflink.c: Move definitions of N_TMASK, et. al., out of
- _bfd_coff_link_input_bfd into top level.
-
- * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
- (RTYPE2HOWTO): Return NULL if reloc type is out of range.
- (coff_i386_rtype_to_howto): Likewise.
- * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
- Completely ignore symbols which are all zero.
- (dummy_reloc16_estimate): Add return 0.
- * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
- variable copy to name_copy to avoid shadowing outer scope
- variable.
- * libcoff-in.h (coff_data_type): Change raw_syment_count field
- from unsigned int to unsigned long. Add timestamp field.
- * libcoff.h: Rebuild.
-
-1999-08-17 H.J. Lu <hjl@gnu.org>
- * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
- macro definition.
+2001-01-21 Kazu Hirata <kazu@hxi.com>
-1999-08-17 Ian Lance Taylor <ian@zembu.com>
+ * coff-a29k.c: Fix formatting.
- * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
- for special section symbols.
- * elflink.h (elf_merge_symbol): If we have no old BFD, check
- BSF_DYNAMIC on the section symbol to see whether the old BFD is
- dynamic.
-
-1999-08-15 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
- coincidence of variable names between old and new code.
-
-1999-08-12 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.h (elf32_arm_to_thumb_stub): Make 'offset' parameter
- into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'.
- (elf32_thumb_to_arm_stub): Make 'offset' parameter into a bfd_vma
- and 'addend' parameter a 'bfd_signed_vma'.
- (elf32_arm_final_link_relocate): Do not involve stubs in
- R_ARM_THM_PC22 relocs relative to section symbols, they are long
- jumps, not function calls.
-
-1999-08-11 Robin Farine <advanc@dial.eunet.ch>
-
- * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow
- in R_ARM_PC24 relocs.
-
-Tue Aug 10 12:48:09 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h (elf_hppa_fake_sections): New function.
- * elf32-hppa.c (elf_backend_fake_sections): Define.
-
- * elf-hppa.h (elf_hppa_final_write_processing): Update for
- recent changes to the arch_info structure.
-
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
- R_HPPA_SEGBASE and R_HPPA_SEGREL32.
- * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
- list.
-
-Tue Aug 10 00:34:29 1999 Mark P. Mitchell <mark@codesourcery.com>
- Ralf Baechle <ralf@uni-koblenz.de>
-
- * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
- output DT_MIPS_GOTSYM.
- (_bfd_mips_elf_finish_dynamic_sections): Use the same value as
- DT_MIPS_SYMTABNO if there are no global GOT symbols.
-
-Tue Aug 10 00:21:08 1999 Mark P. Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
- prototype. Handle local symbols. Add commentary.
- (mips_elf_calculate_relocation): Adjust accordingly.
- (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
- relocations.
-
- * elflink.h (elf_bfd_final_link): Tweak last change.
-
-1999-08-09 Mark Mitchell <mark@codesourcery.com>
+2001-01-19 H.J. Lu <hjl@gnu.org>
- * elflink.h (elf_link_size_reloc_section): Use the counts in the
- elf-section data to allocate just the right amount of relocation
- space. Don't allocate the hash space twice.
- (elf_bfd_final_link): Calculate the amount of space to allocate in
- each relocation section.
+ * elf32-i386.c (elf_i386_check_relocs): Report files with bad
+ relocation section names.
+ (elf_i386_relocate_section): Report files with bad relocation
+ section names and return false.
-Mon Aug 9 17:37:30 1999 Jeffrey A Law (law@cygnus.com)
+2001-01-17 Bo Thorsen <bo@suse.de>
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
- 64bit mode, generate a section relative relocation for a 32bit
- wide relocation.
- (elf_hppa_is_local_label_name): New function.
- * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted. To be
- shared between 32bit and 64bit port.
+ * targets.c: Alphabetize list of xvecs.
-1999-08-09 Mark Mitchell <mark@codesourcery.com>
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
- * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
- R_MIPS_GOT16 and R_MIPS_CALL16.
- (mips_elf_got16_entry): Use mips_elf_high to calculate the value
- to use when looking for a preexisting GOT entry.
+ * config.bfd: Add linux target variant for elfxx-hppa.
+ * configure.in: Recognize bfd_elf32_hppa_linux_vec and
+ bfd_elf64_hppa_linux_vec.
+ * configure: Regenerate.
+ * elf64-hppa.c: Include elf64-target.h again to support linux
+ target variant.
+ (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
+ * elf32-hppa.c: Include elf32-target.h again to support linux
+ target variant.
+ (elf32_hppa_post_process_headers): New function.
+ (elf_backend_post_process_headers): Define.
+ * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
+ bfd_elf32_hppa_linux_vec.
-1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
+ * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
+ and data_segment_base fields.
+ (elf32_hppa_link_hash_table_create ): Init them.
+ (elf32_hppa_check_relocs): Update comments.
+ (hppa_record_segment_addr): New function.
+ (elf32_hppa_relocate_section): Call it.
+ (final_link_relocate): Handle R_PARISC_SEGREL32.
+ (elf32_hppa_final_link): New function.
+ (bfd_elf32_bfd_final_link): Define to call it.
+ (hppa_unwind_entry_compare): New function.
+ * cache.c (bfd_open_file): Create files in write+read mode.
- * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
- the Sep. 4th, 1998 change. glibc 2.0.x dynamic linker had bug,
- not binutils.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
+ SEGREL32 and numerous other relocs. Change duplicate
+ R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
-1999-08-09 Geoff Keating <geoffk@cygnus.com>
+ * opncls.c (bfd_fdopenr): Add parens like the comment says around
+ O_ACCMODE.
- * elflink.h (elf_link_output_extsym): Don't output a weak
- reference to an undefined symbol just because it was defined weak
- in a shared object.
+ * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
+ .plt entries for DT_INIT and DT_FINI.
+ (elf32_hppa_finish_dynamic_sections): Remove special handling of
+ DT_INIT and DT_FINI.
-1999-08-09 Eli Zaretskii <eliz@is.elta.co.il>
+ * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
+ offsets for stub .plt access if wide mode. Check offset in range.
- * coffgen.c (coff_find_nearest_line): When looking for file, use
- last best match rather than first. If address is beyond last line
- number record, don't return the last line as the correct value.
+2001-01-13 Nick Clifton <nickc@redhat.com>
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
-
- * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
- * bfd-in2.h: Rebuild.
+ * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
+ line.
-1999-08-08 Mark Elbrecht <snowball3@bigfoot.com>
+ * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
+ line.
- * libcoff-in.h (struct coff_section_alignment_entry): Define.
- * coffcode.h (coff_set_custom_section_alignment): New static
- function.
- (coff_section_alignment_table): New static array.
- (coff_new_section_hook): Use coff_set_customer_section_alignment.
- * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
- * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
- * libcoff.h: Rebuild.
+2001-01-12 Alan Modra <alan@linuxcare.com.au>
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
+ * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
+ * configure: Regenerate.
- * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
- MKDEP.
- * Makefile.in: Rebuild.
+2001-01-11 Peter Targett <peter.targett@arccores.com>
-1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
+ * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
+ bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
+ * cpu-arc.c (arch_info_struct): Add entries for variants.
+ (bfd_arc_arch) Set default to bfd_mach_arc_5.
+ (arc_get_mach) Don't assume machine names prefixed arc- before
+ testing.
+ * elf32-arc.c (arc_elf_object_p): Set machine number based on new
+ selections.
+ (arc_elf_final_write_processing) Likewise.
+ (ELF_MACHINE_CODE) Use EM_ARC.
- * section.c (SEC_SHARED): Define.
- * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
- (styp_to_sec_flags): Likewise.
- * peicode.h (coff_swap_scnhdr_out): Likewise.
- * bfd-in2.h: Rebuild.
+2001-01-10 Nick Clifton <nickc@redhat.com>
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
+ * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
- * coffcode.h (coff_classify_symbol): Comment out part of
- 1999-08-05 change which breaks cygwin DLLs.
+2001-01-07 Philip Blundell <philb@gnu.org>
- * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
- * aclocal.m4, configure: Rebuild.
+ * README: Replace `bug-gnu-utils@gnu.org' with
+ `bug-binutils@gnu.org'.
-1999-08-06 Ian Lance Taylor <ian@zembu.com>
+2001-01-04 Kazu Hirata <kazu@hxi.com>
- * section.c (global_syms): Only initialize union field if
- __STDC__.
+ * som.c: Fix formatting.
-1999-08-04 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
- the size of a GOT entry here.
- (mips_elf_calculate_relocation): Don't create a local GOT entry
- for the symbol in a GOT16 relocation; just for it's high-order bit
- (_bfd_mips_elf_relocate_section): Fix thinko.
+2001-01-03 Kazu Hirata <kazu@hxi.com>
-1999-08-05 Ian Lance Taylor <ian@zembu.com>
-
- Based on patches from Donn Terry <donn@interix.com>:
- * coffcode.h (enum coff_symbol_classification): Define.
- (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
- _bfd_coff_classify_symbol. Change return type.
- (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
- (coff_slurp_symbol_table): Use coff_classify_symbol.
- (coff_classify_symbol): New static function.
- (coff_sym_is_global): Never define.
- (bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
- * cofflink.c (coff_link_check_ar_symbols): Use
- bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
- (coff_link_add_symbols): Likewise.
- (_bfd_coff_link_input_bfd): Likewise.
- * coff-sh.c (bfd_coff_small_swap_table): Initialize with
- coff_classify_symbol.
- * libcoff.h: Rebuild.
-
-Wed Aug 4 18:08:07 1999 Jeffrey A Law (law@cygnus.com)
-
- * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
- (e_ltpsel, e_rtpsel): Similarly.
-
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
- and 14bit ertpsel. Handle 64bit psel.
-
-1999-08-04 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
- handling for REL relocations. And only left-shift R_MIPS26
- relocation addends where necessary.
-
-1999-08-03 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
- (mips_elf_next_lo16_relocation): Don't compute the addend here.
- Just return the relocation found.
- (mips_elf_relocate_section): Pull the LO16 addend out of the
- section itself when using REL relocations.
-
- * elf32-mips.c (mips_elf_calculate_relocation): Restore
- _DYNAMIC_LINK handling and handling of undefined symbols in shared
- libraries.
-
-1999-08-03 Ian Lance Taylor <ian@zembu.com>
-
- * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
- value of a symbol in a SEC_DEBUGGING section. Warn when doing a
- relocation against a symbol in an input section with no output
- section. From Daniel Jacobowitz <drow@false.org>.
-
- * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used.
-
- * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
- look for generated file correctly.
- * aclocal.m4, configure: Rebuild.
-
-1999-08-02 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
- and R_MIPS16_26 relocations correctly when relocating.
- (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
- and R_MIPS_CALL_LO16 are for global symbols.
-
-1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
-
- * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
- some fields.
- * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
- variables and initialize them.
-
-1999-08-01 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
- there are no global symbols requiring GOT entries.
- (_bfd_mips_elf_size_dynamic_sections): Likewise.
- (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
- (_bfd_mips_elf_finish_dynamic_sections): Likewise.
-
- * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
- symbols are considered to have the value zero.
- (_bfd_mips_elf_relocate_section): Don't try to perform a
- relocation for an undefined symbol.
- (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
- GOT16 relocations.
-
-1999-07-30 Jakub Jelinek <jj@ultra.linux.cz>
-
- * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
- wants ba,a,pt %xcc instead of %icc.
- Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
- of large PLT entries.
- (sparc64_elf_plt_ptr_offset): Fix calculation.
- (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
- addend should be relative to load address, not .plt section start.
- (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
-
-1999-07-30 Jakub Jelinek <jj@ultra.linux.cz>
-
- * elf-bfd.h (struct elf_backend_data): Add
- print_symbol_all and output_arch_syms backend methods.
+ * ecoffswap.h: Fix formatting.
+ * elf-bfd.h: Likewise.
+ * elfarm-nabi.c: Likewise.
+ * elfarm-oabi.c: Likewise.
+ * elfcode.h: Likewise.
+ * elfcore.h: Likewise.
+ * elflink.c: Likewise.
+ * elflink.h: Likewise.
+ * elfxx-ia64.c: Likewise.
* elfxx-target.h: Likewise.
- * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
- sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
- sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
- functions.
- (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
- symbols in .dynsym, add their names into .dynstr. Put those symbols
- into dynlocal.
- (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
- pointers to STT_REGISTER symbols in dynsym section.
- (sparc64_elf_print_symbol_all): New function.
- * elf.c (bfd_elf_print_symbol): Allow special backend symbol
- printing using the print_symbol_all hook.
-
-1999-07-30 Catherine Moore <clm@cygnus.com>
-
- * elf32-arm.h (elf32_arm_check_relocs): Use r_offset for
- R_ARM_GNU_VTENTRY.
-
-1999-07-29 Richard Henderson <rth@cygnus.com>
-
- * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
- dynamic_sections_created.
-
-1999-07-29 Richard Henderson <rth@cygnus.com>
-
- * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
- (mips_rtype_to_howto): ... new function.
- (_bfd_mips_elf_relocate_section): Use it.
-
-1999-07-28 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo.
-
-1999-07-27 Nick Clifton <nickc@cygnus.com>
-
- Patch generated by Bernd Schmidt. <bernds@cygnus.co.uk>
-
- * coff-arm.c (coff_arm_is_local_label_name): Change to strip
- out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'.
-
-1999-07-23 Donn Terry <donn@interix.com>
-
- * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
- field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
- * cofflink.c (coff_link_add_symbols): If PE, handle section
- symbols specially.
- * libcoff.h: Rebuild.
-
- * config.bfd (i[3456]86-*-interix*): New target.
-
-1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
-
- * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
- COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
- .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
- * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
- (COFF_SUPPORT_GNU_LINKONCE): Define.
- * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
- (COFF_SUPPORT_GNU_LINKONCE): Define.
-
-1999-07-21 Ian Lance Taylor <ian@zembu.com>
-
- From Mark Elbrecht:
- * makefile.dos: Remove; obsolete.
- * configure.bat: Remove; obsolete.
-
-1999-07-21 H.J. Lu <hjl@gnu.org>
-
- * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
-
-1999-07-21 Philippe De Muyter <phdm@macqel.be>
-
- * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
- message and fail if a symbol index is out of range.
-
-1999-07-21 Ian Lance Taylor <ian@zembu.com>
-
- * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
- when looking at a R_MIPS_GOT16 relocation.
-
-1999-07-20 Nick Clifton <nickc@cygnus.com>
-
- * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC.
-
-Mon Jul 19 14:03:44 1999 Mark P. Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
- removed in previous change.
- (_bfd_mips_elf_relocate_section): Adjust GP relative relocations
- in relocateable output.
-
-1999-07-19 Ian Lance Taylor <ian@zembu.com>
-
- * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
- structure.
-
- * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
- if they appear to be specially created by the linker.
-
-1999-07-19 Nick Clifton <nickc@cygnus.com>
-
- * targets.c (alternative_target): New field in bfd_target
- structure.
- (bfd_search_for_target): New function: Find a target that
- satisifies a search function.
- * bfd-in2.h: Regenerate.
+ * libbfd.c: Likewise
+ * linker.c: Likewise.
+ * lynx-core.c: Likewise.
- * elfxx-target.h: Initialise the alternative_target field of
- the bfd_target structures to point to the other target (if
- defined).
- * nlm-target.h: Initialise the alternative_target field of
- the bfd_target structures to point to the other target (if
- defined).
-
- * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro.
- (CREATE_LITTLE_COFF_TARGET_VEC): New macro.
-
- * aix386-core.c: Initialise new field of bfd_target structure.
- * aout-adobe.c: Initialise new field of bfd_target structure.
- * aout-arm.c: Initialise new field of bfd_target structure.
- * aout-target.h: Initialise new field of bfd_target structure.
- * aout-tic30.c: Initialise new field of bfd_target structure.
- * binary.c: Initialise new field of bfd_target structure.
- * bout.c: Initialise new field of bfd_target structure.
- * cisco-core.c: Initialise new field of bfd_target structure.
- * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * coff-alpha.c: Initialise new field of bfd_target structure.
- * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
- * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * coff-i386.c: Initialise new field of bfd_target structure.
- * coff-i860.c: Initialise new field of bfd_target structure.
- * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
- * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
- * coff-mips.c: Initialise new field of bfd_target structure.
- * coff-ppc.c: Initialise new field of bfd_target structure.
- * coff-rs6000.c: Initialise new field of bfd_target structure.
- * coff-sh.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
- * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * coff-tic30.c: Initialise new field of bfd_target structure.
- * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
- * coff-w65.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
- * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * coff-z8k.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * hppabsd-core.c: Initialise new field of bfd_target structure.
- * hpux-core.c: Initialise new field of bfd_target structure.
- * i386msdos.c: Initialise new field of bfd_target structure.
- * i386os9k.c: Initialise new field of bfd_target structure.
- * ieee.c: Initialise new field of bfd_target structure.
- * ihex.c: Initialise new field of bfd_target structure.
- * irix-core.c: Initialise new field of bfd_target structure.
- * mipsbsd.c: Initialise new field of bfd_target structure.
- * netbsd-core.c: Initialise new field of bfd_target structure.
- * oasys.c: Initialise new field of bfd_target structure.
- * osf-core.c: Initialise new field of bfd_target structure.
- * ppcboot.c: Initialise new field of bfd_target structure.
- * ptrace-core.c: Initialise new field of bfd_target structure.
- * sco5-core.c: Initialise new field of bfd_target structure.
- * som.c: Initialise new field of bfd_target structure.
- * srec.c: Initialise new field of bfd_target structure.
- * tekhex.c: Initialise new field of bfd_target structure.
- * trad-core.c: Initialise new field of bfd_target structure.
- * versados.c: Initialise new field of bfd_target structure.
- * vms.c: Initialise new field of bfd_target structure.
-
-1999-07-19 Andreas Schwab <schwab@suse.de>
-
- * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
- and rel_hdr.
-
-Sat Jul 17 02:28:28 1999 Mark P. Mitchell <mark@codesourcery.com>
-
- * elflink.h (elf_link_adjust_relocs): New function.
- (elf_bfd_final_link): Use it.
- (elf_link_input_bfd): Deal with the fact that there can be
- two relocation sections for a single section.
- (elf_reloc_link_order): Likewise.
+2001-01-02 Kazu Hirata <kazu@hxi.com>
- * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
- a relocateable object.
- (_bfd_mips_elf_relocate_section): Handle relocateable links.
+ * pc532-mach.c: Fix formatting.
+ * pe-arm.c: Likewise.
+ * pe-i386.c: Likewise.
+ * pe-mips.c: Likewise.
+ * pe-ppc.c: Likewise.
+ * pe-sh.c: Likewise.
+ * pei-mips.c: Likewise.
+ * pei-sh.c: Likewise.
+ * peicode.h: Likewise.
+ * ppcboot.c: Likewise.
+ * ptrace-core.c: Likewise.
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
+2001-01-01 Kazu Hirata <kazu@hxi.com>
- * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
- (sparc64_elf_get_reloc_upper_bound,
- sparc64_elf_get_dynamic_reloc_upper_bound,
- sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
- sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
- New functions.
- (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
- ELF64_R_TYPE_ID/DATA where appropriate.
+ * reloc.c: Fix formatting.
+ * riscix.c: Likewise.
+ * rs6000-core.c: Likewise.
+ * xcoff-target.h: Likewise.
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
+2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
- * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
- DT_SPARC_PLTFMT.
+ * elfcode.h (elf_object_p): Also restore the bfd mach field on
+ error, by calling bfd_default_set_arch_mach with incoming
+ values.
-1999-07-16 Ian Lance Taylor <ian@zembu.com>
+2000-12-26 Kazu Hirata <kazu@hxi.com>
- * elf32-mips.c (mips_elf_local_relocation_p): New static
- function.
- (mips_elf_next_lo16_addend): Call bfd_set_error on failure.
- (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
- Always set *require_jalxp.
- (mips_elf_stub_section_p): Mark abfd parameter as unused.
- (_bfd_mips_elf_relocate_section): Only look for LO16 following
- GOT16 if the GOT16 is against a local symbol. Don't return false
- for an undefined symbol. If there is an overflow, assert that we
- have a name.
+ * vaxnetbsd.c: Fix formatting.
+ * versados.c: Likewise.
+ * vms-gsd.c: Likewise.
+ * vms-hdr.c: Likewise.
+ * vms-misc.c: Likewise.
-1999-07-16 Andreas Schwab <schwab@suse.de>
+2000-12-25 Alexandre Oliva <aoliva@redhat.com>
- * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
- variables `link' and `elfsec'.
- (elf_bfd_final_link): Remove unused variable `os'.
+ * archive.c (coff_write_armap): Don't write more than symbol_count
+ `archive_member_file_ptr's.
-Thu Jul 15 17:55:31 1999 Mark P. Mitchell <mark@codesourcery.com>
+2000-12-25 Kazu Hirata <kazu@hxi.com>
- * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
- a PT_PHDR program headers.
- (_bfd_mips_elf_final_link): Don't assume there are going to be
- section symbols when we're not building a shared object.
- (_bfd_mips_elf_check_relocs): Make sure we have a GOT when
- we need one.
+ * vms-tir.c: Fix formatting.
-1999-07-15 J.T. Conklin <jtc@redback.com>
+2000-12-23 Kazu Hirata <kazu@hxi.com>
- * config.bfd (i[3456]86-*-vxworks*): New target.
+ * vms.c: Fix formatting.
+ * vms.h: Likewise.
-1999-07-15 Mark Mitchell <mark@codesourcery.com>
+2000-12-21 Santeri Paavolainen <santtu@ssh.com>
- * elf32-mips.c (mips_elf_stub_section_p): New function.
- (mips_elf_calculate_relocation): Handle MIPS16 stub functions.
- (mips_elf_relocate_section): Adjust calling sequence for
- mips_elf_calculate_relocation and mips_elf_perform_relocation.
- (mips_elf_perform_relocation): Turn `jal' into `jalx' where
- required.
+ * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
-1999-07-15 Ian Lance Taylor <ian@zembu.com>
+ * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
- * configure.in: Bump version number to 2.9.5.
- * configure: Rebuild.
+ * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
+ arithmetic.
-Thu Jul 15 02:56:15 1999 Jeffrey A Law (law@cygnus.com)
+ * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
- 64bit format.
- (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
- to derive final type instead of hardwiring a selection.
+ * coffcode.h (styp_to_sec_flags): Add empty statement after label.
-1999-07-14 Mark Mitchell <mark@codesourcery.com>
+2000-12-21 Richard Sandiford <rsandifo@redhat.com>
- * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
- things relocated by R_MIPS16_GPREL.
- (mips_elf_perform_relocation): Likewise.
+ * libbfd.c (bfd_get_bits): Added
+ (bfd_put_bits): Likewise
+ * bfd-in.h: Declared the above.
+ * bfd-in2.h: Regenerated.
-Wed Jul 14 15:23:19 1999 Jim Wilson <wilson@cygnus.com>
+2000-12-20 Kazu Hirata <kazu@hxi.com>
- * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.
+ * targets.c: Fix formatting.
+ * tekhex.c: Likewise.
+ * trad-core.c: Likewise.
-1999-07-14 Richard Henderson <rth@cygnus.com>
+2000-12-19 Kazu Hirata <kazu@hxi.com>
- * elf32-mips.c (struct mips_got_info): Add global_gotno.
- (_bfd_mips_elf_size_dynamic_sections): Set it.
- (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
- (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
- new argument max_local.
+ * sco5-core.c: Fix formatting.
+ * section.c: Likewise.
+ * sparclinux.c: Likewise.
+ * sparclynx.c: Likewise.
+ * sparcnetbsd.c: Likewise.
+ * srec.c: Likewise.
+ * stabs.c: Likewise.
+ * stab-syms.c: Likewise.
+ * sunos.c: Likewise.
+ * syms.c: Likewise.
+ * sysdep.h: Likewise.
-1999-07-14 Mark Mitchell <mark@codesourcery.com>
+2000-12-18 Nick Clifton <nickc@redhat.com>
- * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
- subwords when handling an R_MIPS16_26 relocation.
- (mips_elf_perform_relocation): Don't be paranoid abour right-shift
- semantics.
-
- * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
- dst_mask to match reality.
- (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
- (mips_elf_obtain_contents): Use bfd_get.
- (mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
- (mips_elf_relocate_section): Likewise.
+ * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
+ defined.
+ * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
+ * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
-1999-07-13 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
- (mips_elf_relocate_section): Adjust calling sequence for
- mips_elf_perform_relocation.
- (mips_elf_perform_relocation): Take additional argument. Handle
- R_MIPS16_26. Use bfd_put for convenience.
-
-1999-07-13 Richard Henderson <rth@cygnus.com>
-
- * elf.c (assign_file_positions_for_segments): Thinko last change.
- Always overwrite p_flags.
-
-1999-07-13 Richard Henderson <rth@cygnus.com>
-
- * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
- * elflink.c (_bfd_elf_create_dynamic_sections): Only create
- .dynbss and .rel[a].bss if want_dynbss.
- * elfxx-target.h (elf_backend_want_dynbss): Provide default.
-
-1999-07-13 Richard Henderson <rth@cygnus.com>
-
- * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
-
-1999-07-13 Richard Henderson <rth@cygnus.com>
-
- * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
- (struct elf_link_hash_table): Add dynlocal.
- (_bfd_elf_link_lookup_local_dynindx): Prototype.
- (_bfd_elf_link_adjust_dynindx): Delete.
- (_bfd_elf_link_renumber_dynsyms): Prototype.
- (_bfd_elf,link_record_local_dynamic_symbol): Prototype.
- * elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
- * elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
- (_bfd_elf_link_lookup_local_dynindx): New function.
- (elf_link_renumber_hash_table_dynsyms): New function.
- (_bfd_elf_link_renumber_dynsyms): New function.
- * elflink.h (elf_link_record_local_dynamic_symbol): New function.
- (struct elf_assign_sym_version_info): Delete removed_dynamic.
- (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
- instead of elf_link_remove_section_and_adjust_dynindices.
- Remove removed_dynamic code. Use _bfd_elf_link_renumber_dynsyms.
- (elf_link_assign_sym_version): Remove removed_dynamic code.
- (elf_link_renumber_dynsyms): Delete.
- (elf_bfd_final_link): Install section and local symbols into .dynsym.
-
- * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
- (elf_m68k_size_dynamic_sections): Don't set section dynindicies.
- (elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
- * elf32-mips.c: Similarly.
- * elf32-ppc.c: Similarly.
- * elf32-sparc.c: Similarly.
- * elf64-alpha.c: Similarly.
- * elf64-sparc.c: Similarly.
-
-1999-07-13 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
- when _gp_disp is undefined. Do not check R_MIPS_LO16 for overflow
- when the relocation is against _gp_disp.
-
-1999-07-12 Mark Mitchell <mark@codesourcery.com>
-
- * dwarf2.c (read_attribute): Support DW_FORM_ref8.
- * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
- to possibly_dynamic_relocs. Adjust usage throughout code.
- (elf_mips_howto_table): Handle R_MIPS_64 correctly.
- (elf_mips_ctor64_howto): Likewise.
- (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
- Adjust indentation.
- (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
- (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
- Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
- * elf64-mips.c (elf_backend_may_use_rel_p): Define.
-
-1999-07-12 Ian Lance Taylor <ian@zembu.com>
+2000-12-18 Nick Clifton <nickc@redhat.com>
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
+ * vms-misc.c (_bfd_vms_get_record): Add default case to
+ file_format switch.
- * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
- * bfd-in2.h: Rebuild.
+2000-12-15 Miloslav Trmac <mitr@volny.cz>
- * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
- as appropriate. Use EMPTY_HOWTO as appropriate. Fill in
- structure initializations. Add casts.
- * reloc.c (EMPTY_HOWTO): Define.
- * bfd-in2.h: Rebuild.
- * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
- comparisons against 0.
- * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
- previous_ibfd_e_flags to unsigned long.
- * vms.h (struct vms_private_data_struct): Change section_count to
- unsigned.
- * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
- (_bfd_vms_write_gsd): Change symnum to unsigned.
- * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
- * vms-tir.c (etir_sta): Change psect to unsigned.
- (alloc_section): Change idx to unsigned.
- (tir_sta, tir_ctl): Change psect to unsigned.
- (_bfd_vms_write_tir): Change len and before to bfd_size_type.
- * vms.c (priv_section_count): Change to unsigned.
-
-1999-07-12 Andreas Schwab <schwab@suse.de>
-
- * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
- * m68klinux.c: Likewise.
-
-1999-07-12 Ian Lance Taylor <ian@zembu.com>
-
- * Many files: Changes to avoid gcc warnings: Remove unused local
- variables. Add default case to enum switches.
- * coff-arm.c (bfd_arm_allocate_interworking_sections): Only
- compile if not COFF_IMAGE_WITH_PE.
- (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
- (bfd_arm_get_bfd_for_interworking): Likewise.
- (bfd_arm_process_before_allocation): Likewise.
- * epoc-pei-arm.c: Don't rename bfd_arm functions.
- * pei-arm.c: Likewise.
- * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
- (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
- (mips_elf_got16_entry): Put parens around & in body of ==.
- (mips_elf_calculate_relocation): Correct test for empty string.
- * vms-gsd.c: Use _bfd_error_handler rather than fprintf to
- stderr.
- * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
- format.
-
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
-
- * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
- as appropriate. Fill in structure initializations. Add variable
- initializations. Add casts.
- * dwarf1.c (parse_line_table): Change eachLine to unsigned long.
- (dwarf1_unit_find_nearest_line): Change i to unsigned long.
-
- * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
- char *.
- * elf-bfd.h (bfd_elf_hash): Update declaration.
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
- when calling bfd_elf_hash.
-
-1999-07-11 Mark Mitchell <mark@codesourcery.com>
-
- * libbfd.c (bfd_put_8): Make it of type `void'.
- * bfd-in2.h: Regenerated.
- * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
- for 32-bit hosts.
- (_bfd_mips_elf_final_link): Likewise.
-
- * elflink.h (elf_link_read_relocs_from_section): Be type-correct.
-
-Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * config.bfd (hppa*-*-linux-gnu*): New target
-
-1999-07-07 Mark Mitchell <mark@codesourcery.com>
-
- * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
- (_bfd_mips_elf_create_dynamic_sections): New function.
- (_bfd_mips_elf_add_symbol_hook): Likewise.
- (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
- (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
- (_bfd_mips_elf_finish_dynamic_sections): Likewise.
- (_bfd_mips_elf_gc_mark_hook): Likewise.
- (_bfd_mips_elf_gc_sweep_hook): Likewise.
- (_bfd_mips_elf_always_size_sections): Likewise.
- (_bfd_mips_elf_size_dynamic_sections): Likewise.
- (_bfd_mips_elf_check_relocs): Likewise.
- (_bfd_mips_elf_link_hash_table_create): Likewise.
- (_bfd_mips_elf_print_private_data): Likewise.
- (_bfd_mips_elf_link_output_symbol_hook): Likewise.
- (_bfd_mips_elf_final_link): Likewise.
- (_bfd_mips_elf_additional_program_headers): Likewise.
- (_bfd_mips_elf_modify_segment_map): Likewise.
- (_bfd_mips_elf_relocate_section): Likewise.
- * elf32-mips.c (mips_elf32_object_p): Move contents into
- _bfd_mips_elf_object_p.
- (mips_elf_additional_program_headers): Rename to
- _bfd_mips_elf_additional_program_headers.
- (mips_elf_modify_segment_map): Rename to
- _bfd_mips_elf_modify_segment_map.
- (elf_mips_abi_name): Change prototype.
- (mips_elf32_section_from_shdr): Merge into
- _bfd_mips_elf_section_from_shdr.
- (mips_elf32_section_processing): Merge into
- _bfd_mips_elf_section_processing.
- (mips_elf_final_link): Rename to _bfd_mips_elf_final_link. Invoke
- the right back-end ELF linker.
- (mips_elf_relocate_section): Rename to
- _bfd_mips_elf_relocate_section. Clean up. Adjust for 64-bit code.
- (mips_elf_link_output_symbol_hook): Rename to
- _bfd_mips_elf_link_output_symbol_hook.
- (mips_elf_create_dynamic_section): Rename to
- _bfd_mips_elf_create_dynamic_section.
- (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
- Adjust for 64-bit code. Use mips_elf_got_section.
- (mips_elf_adjust_dynamic_symbol): Rename to
- _bfd_mips_elf_adjust_dynamic_symbol. Use
- mips_elf_allocate_dynamic_relocations.
- (mips_elf_finish_dynamic_symbol): Rename to
- _bfd_mips_elf_finish_dynamic_symbol. Use mips_elf_got_section.
- Adjust for 64-bit code.
- (mips_elf_finish_dynamic_sections): Rename to
- _bfd_mips_elf_finish_dynamic_sections. Adjust for 64-bit code.
- (mips_elf_always_size_sections): Rename to
- _bfd_mips_elf_always_size_sections.
- (mips_elf_add_symbol_hook): Rename to
- _bfd_mips_elf_add_symbol_hook.
- (mips_elf_next_lo16_addend): Constify.
- (mips_elf_calculate_relocation): Likewise.
- (mips_elf_obtain_contents): Likewise.
- (mips_elf_perform_relocation): Likewise.
- (mips_elf_create_dynamic_relocation): Likewise.
- (mips_elf_allocate_dynamic_relocations): New function.
- (MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
- (MIPS_ELF_REL_SIZE): Likewise.
- (MIPS_ELF_DYN_SIZE): Likewise.
- (MIPS_ELF_GOT_SIZE): Likewise.
- (MIPS_ELF_SYM_SIZE): Likewise.
- (MIPS_ELF_LOG_FILE_ALIGN): Likewise.
- (MIPS_ELF_GET_WORD): Likewise.
- (MIPS_ELF_PUT_WORD): Likewise.
- (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
- (STUB_LW): Conditionalize for 64-bit value.
- (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
- entries.
- (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
- Check it for inconsistency.
- (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
- ABI.
- (_bfd_mips_elf_fake_sections): Remove duplicate handling of
- .msym.
- (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
- (mips_elf_got_offset_from_index): Use misp_elf_got_section.
- (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
- (mips_elf_local_got_index): Likewise.
- (mips_elf_got_page): Likewise.
- (mips_elf_got_info): Likewise.
- (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
- (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
- (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
- instead of constant `2'.
- (mips_elf_create_got_section): Tidy. Use MIPS_ELF_GOT_SIZE.
- (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
- (mips_elf_size_dynamic_sections): Use
- MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
- MIPS_ELF_ADD_DYNAMIC_ENTRY. Remove #if 0'd code.
- Adjust all releveant entries in elf backend table.
- * elf64-mips.c (mips_elf64_section_from_shdr): Remove.
- (mips_elf64_section_processing): Likewise.
- Adjust elf backend entries to use _bfd_mips_elf variants now
- publicly available.
-
- * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
- hash-entry sizes.
- (size_dynamic_sections): Likewise.
- (elf_link_output_extsym): Likewise.
- * elf.c: (elf_fake_sections): Likewise.
- * libbfd.c (bfd_get): New macro.
- (bfd_put): Likewise.
- * bfd-in2.h: Regenerated.
+ * elfcore.h (elf_core_file_p): Move to the start of the program
+ headers before attempting to read them.
-1999-07-07 Mark Mitchell <mark@codesourcery.com>
+2000-12-14 Kazu Hirata <kazu@hxi.com>
- * elf-bfd.h (elf_size_info): Add hash_entry_size,
- int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
- wap_reloca_in, and swap_reloca_out.
- * elflink.h (elf_link_read_relocs_from_section): Adjust to handle
- multiple internal relocations per external relocation.
- (link_read_relocs): Likewise.
- (elf_bfd_final_link): Likewise.
- (elf_link_input_bfd): Likewise.
- (elf_gc_mark): Likewise.
- (elf_gc_smash_unused_vtentry_relocs): Likewise.
- * elfcode.h (elf_swap_dyn_out): Adjust type to match
- elf_swap_dyn_in.
- (size_info): Add entries for new fields.
- * elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
- (mips_elf64_be_swap_reloc_in): New function.
- (mips_elf64_be_swap_reloc_out): Likewise.
- (mips_elf64_be_swap_reloca_in): Likewise.
- (mips_elf64_be_swap_reloca_out): Likewise.
- (mips_elf64_size_info): Add entries for new fields.
-
-1999-07-07 Ian Lance Taylor <ian@zembu.com>
-
- * elflink.h (elf_bfd_final_link): Assert that section reloc_count
- field equals the new rel_count field.
- (elf_link_input_bfd): When doing a relocateable link, use the new
- rel_count field rather than the reloc_count field.
- (elf_reloc_link_order): Likewise.
- (elf_finish_pointer_linker_section): Likewise.
+ * peigen.c: Fix formatting.
+ * som.c: Likewise.
+ * som.h: Likewise.
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * elflink.h (elf_merge_symbol): Permit a non-weak definition in a
- shared library to override a weak definition in a regular object.
+2000-12-13 Kazu Hirata <kazu@hxi.com>
-Tue Jul 6 10:23:39 1999 Jeffrey A Law (law@cygnus.com)
+ * peigen.c: Fix formatting.
- * libhppa.h: Revert July 2, 1999 patch.
+2000-12-12 Jim Wilson <wilson@redhat.com>
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
- need to generate DLTIND relocations, not DLTREL relocations.
+ * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
-1999-07-05 Nick Clifton <nickc@cygnus.com>
+2000-12-08 Mark Salter <msalter@redhat.com>
- * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5
- architectures.
- (coff_set_flags): Recognise arm 5 architectures.
+ * binary.c (binary_set_section_contents): Ignore sections
+ with zero size.
- * cpu-arm.c: Add support for strongarm and arm9 cpus.
- Add support for armv5 architecture.
+2000-12-12 Kazu Hirata <kazu@hxi.com>
- * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T.
-
- * reloc.c: Add new, assembler only, ARM reloc:
- BFD_RELOC_ARM_ADRL_IMMEDIATE.
-
- * bfd-in2.h: Regenerate.
+ * m68klinux.c: Fix formatting.
+ * m68knetbsd.c: Likewise.
+ * mipsbsd.c: Likewise.
+ * netbsd-core.c: Likewise.
+ * netbsd.h: Likewise.
+ * newsos3.c: Likewise.
+ * nlm32-alpha.c: Likewise.
+ * nlm32-i386.c: Likewise.
+ * nlm32-ppc.c: Likewise.
+ * nlm32-sparc.c: Likewise.
+ * nlmcode.h: Likewise.
+ * nlmswap.h: Likewise.
+ * nlm-target.h: Likewise.
+ * ns32knetbsd.c: Likewise.
+
+2000-12-10 Fred Fish <fnf@be.com>
+
+ * elflink.h (elf_link_output_extsym): Don't complain about undefined
+ symbols in shared objects if allow_shlib_undefined is true.
+
+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * cpu-sh.c: Fix formattng.
+ * elf.c: Fix formattng.
+ * elf32-mips.c: Fix formattng.
+ * elf32-sh.c: Fix formattng.
+ * elf64-alpha.c: Fix formattng.
+
+2000-12-09 Nick Clifton <nickc@redhat.com>
+
+ * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
+ dwarf2_find_line_info as last parameter to invocation of
+ _bfd_dwarf2_find_nearest_line.
+ * elf32-arm.h (elf32_arm_find_nearest_line): Pass
+ dwarf2_find_line_info as last parameter to invocation of
+ _bfd_dwarf2_find_nearest_line.
-1999-07-02 Mark Mitchell <mark@codesourcery.com>
+2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
- * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
- (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
- * elf.c (_bfd_elf_find_nearest_line): Pass it.
- * elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
- * elf32-mips.c (ABI_64_P): New macro.
- (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
- (_bfd_mips_elf_find_nearest_line): Adjust call to
+ * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
+ (BFD_LIBS): ...to here.
+ (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
+ (BFD_LIBS_CFILES): ...to here.
+ * Makefile.in: Regenerate.
+ * configure.in: Remove dwarf.lo from the elf shell variable.
+ * configure: Regenerate.
+ * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
+ * libcoff.h: Regenerate.
+ * coffgen.c (coff_find_nearest_line): Call
_bfd_dwarf2_find_nearest_line.
+ * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
+ accordingly.
+ (read_abbrevs): Likewise
+ (decode_line_info): Likewise.
+ (parse_comp_unit): Likewise.
+ (comp_unit_find_nearest_line): Likewise.
* libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
- * libbfd.h: Regenerated.
-
-1999-07-02 Ian Lance Taylor <ian@zembu.com>
-
- * config.bfd: Add * at the end of i[3456]86-*-unixware.
-
-Fri Jul 2 12:21:10 1999 Jeffrey A Law (law@cygnus.com)
-
- * libhppa.h (HPPA_R_ARG_RELOC): Delete.
- (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
-
-1999-07-01 Mark Mitchell <mark@codesourcery.com>
-
- * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
- fields.
- (_bfd_elf_init_reloc_shdr): New function.
- * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
- bfd_alloc followed by memset.
- (_bfd_elf_init_reloc_shdr): New function, split out from ...
- (elf_fake_sections): Here.
- (assign_section_numbers): Assign section numbers for the second
- relocation section, if required.
- * elflink.h (elf_link_output_relocs): New function.
- (elf_link_size_reloc_section): Likewise.
- (elf_bfd_final_link): Use elf_link_size_reloc_section.
- (elf_link_input_bfd): Use elf_link_output_relocs.
-
- * elf32-mips.c (_bfd_mips_elf_fake_sections): Use
- _bfd_elf_init_reloc_shdr to initialize rel_hdr2.
-
-Thu Jul 1 13:58:48 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
- with 22bit format.
-
-1999-06-28 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (mips_elf_got_info): Move declaration before
- prototypes. Change global_gotsym to be a pointer to a hash entry,
- rather than a number index.
- (mips_elf_link_hash_entry): Move declaration before prototypes.
- (mips_elf_irix6_finish_dynamic_symbol): New function.
- (mips_elf_sign_extend): Likewise.
- (mips_elf_high): Likewise.
- (mips_elf_higher): Likewise.
- (mips_elf_highest): Likewise.
- (mips_elf_global_got_index): Likewise.
- (mips_elf_local_got_index): Likewise.
- (mips_elf_got_offset_from_index): Likeiwse.
- (mips_elf_record_global_got_symbol): Likewise.
- (mips_elf_got_page): Likewise.
- (mips_elf_next_lo16_addend): Likewise.
- (mips_elf_calculate_relocation): Likewise.
- (mips_elf_obtain_contents): Likewise.
- (mips_elf_perform_relocation): Likewise.
- (mips_elf_assign_gp): Likewise.
- (mips_elf_sort_hash_table_f): Likewise.
- (mips_elf_sort_hash_table): Likewise.
- (mips_elf_got_section): Likewise.
- (mips_elf_got_info): Likewise.
- (mips_elf_create_local_got_entry): Likewise.
- (mips_elf_got16_entry): Likewise.
- (mips_elf_create_dynamic_relocation): Likewise.
- (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
- (mips_elf_final_gp): Use mips_elf_assign_gp.
- (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
- into SHN_SCOMMON automatically on IRIX6.
- (mips_elf_add_symbol_hook): Likewise.
- (mips_elf_relocate_section): Rewrite, using
- mips_elf_calculate_relocation and mips_elf_perform_relocation.
- (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
- Don't deal with .rld_map on IRIX6.
- (mips_elf_create_got_section): Adjust use of global_gotsym. Set
- section flags appropriately for .got.
- (mips_elf_check_relocs): Handle IRIX6 relocations making use of
- the got. Call mips_elf_record_global_got_symbol and allocate
- local got space appropriately.
- (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
- char *. Rework calculation of GOT size. Sort dynamic symbol
- table entries so entries that do not require GOT entries appear at
- the beginning. Don't use DT_MIPS_HIPAGENO on IRIX6. Remove dead
- code dealing with DT_INIT and DT_FINI. Remove fiddling with
- global_gotsym.
- (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
- entries.
- (mips_elf_finish_dynamic_symbol): Use
- mips_elf_irix6_finish_dynamic_symbol.
- (mips_elf_finish_dynamic_sections): Correct off-by-one error
- setting DT_MIPS_UNREFEXTNO. Adjust setting of DT_MIPS_GOTSYM for
- change to global_gotsym. Set DT_MIPS_OPTIONS on IRIX6.
-
-1999-06-30 Ian Lance Taylor <ian@zembu.com>
-
- * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
- relocateable link. From Ralf Baechle <ralf@uni-koblenz.de>.
-
-1999-06-04 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf_backend_got_header_size): Define.
- (elf_backend_plt_header_size): Likewise.
-
-1999-06-28 Jim Pick <jim@jimpick.com>
-
- * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined
-
-Tue Jun 29 02:25:03 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
- relocation function.
- * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
-
-1999-06-27 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
- (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
- (MIPS_ELF_STUB_SECTION_NAME): Likewise.
- (_bfd_mips_elf_section_from_shdr): Use them.
- (_bfd_mips_elf_fake_sections): Likewise. Add .srdata to the list
- of GP-relative sections.
- (_bfd_mips_elf_set_section_contents): Use them.
- (_bfd_mips_elf_section_processing): Share code between .sdata and
- .lit4/.lit8 sections. Set appropriate flags for .srdata.
- (mips_elf_additional_program_headers): Add handling for
- PT_MIPS_OPTIONS segment on IRIX6.
- (mips_elf_modify_segment_map): Likeiwse.
- (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
- Include the options sections on IRIX6. Don't look for GP-relative
- sections by name; use SHF_MIPS_GPREL instead.
- (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
- the N32 ABI.
- (mips_elf_create_dynamic_sections): Don't muck about with section
- alignments and such on IRIX6.
- (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
- (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
- fact that ELF_DYNAMIC_INTERPRETER is no longer a constant. Use
- bfd_zalloc rather than bfd_alloc and memset.
- (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
- Don't assert the existence of .rld_map on IRIX6.
- (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
-
- * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
- (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
- instead.
-
-1999-06-26 Mark Mitchell <mark@codesourcery.com>
-
- * elf32-mips.c (mips_elf_swap_msym_in): New function.
- (mips_elf_swap_msym_out): New function.
- (mips_elf_create_msym_section): Likewise.
- (MIPS_ELF_MSYM_SECTION_NAME): New macro.
- (_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
- (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
- section not named .msym.
- (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
- .msym directly. Set appropriate attributes for the .msym
- section.
- (mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
- (mips_elf_link_hash_newfunc): Clear it.
- (mips_elf_create_dynamic_sections): Create the .msym section
- on IRIX6.
- (mips_elf_size_dynamic_sections): Allocate space for the
- .msym section. Add a DT_MIPS_MSYM entry.
- (mips_elf_finish_dynamic_symbol): Write out a .msym entry for
- the symbol.
- (mips_elf_finish_dynamic_sections): Assign a value for
- DT_MIPS_MSYM. Add .msym entries for the section symbols as well.
-
- * elf32-mips.c (irix_compat_t): New enumeration.
- (ABI_N32_P): New macro.
- (IRIX_COMPAT): Likewise.
- (SGI_COMPAT): Implement in terms of IRIX_COMPAT.
- (mips_elf_relocate_section): Fix typo.
-
-1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
-
- * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
- as writable PE sections.
-
-1999-06-26 David Mosberger <davidm@hpl.hp.com>
-
- * dwarf2.c (struct arange): New type.
- (struct comp_unit): Replace LOW and HIGH by member ARANGE.
- (arange_add): New function.
- (decode_line_info): Keep track of address ranges that a compilation
- unit covers.
- (comp_unit_contains_address): Return true if address is contained
- in _any_ of the address ranges associated with a compilation unit.
- (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
- on the first comp_unit that contains the address.
-
-1999-06-26 David Mosberger <davidm@hpl.hp.com>
-
- * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
- (decode_line_info): Add variable STASH and initialize it to point
- to the per-bfd dwarf2_debug info. Remove static variable
- dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
-
-1999-06-26 Ian Lance Taylor <ian@zembu.com>
-
- * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
- shared library to have an undefined symbol.
-
- From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
- * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
-
-Thu Jun 24 20:59:11 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.c (elf_hppa_final_write_processing): New function.
- * elf32-hppa.c: Remove everything related to symbol extension
- sections & records. Use the common elf_hppa_final_write_processing.
-
-1999-06-22 Mark Mitchell <mark@codesourcery.com>
-
- * elflink.h (size_dynamic_sections): Use user-specified init/fini
- functions instead of _init/_fini if requested.
-
-1999-06-23 Ian Lance Taylor <ian@zembu.com>
-
- * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
- field.
-
-1999-06-22 Ian Lance Taylor <ian@zembu.com>
-
- From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
- field to 0, not -1.
- (ppc_elf_finish_dynamic_sections): Check for positive section
- dynindx field, rather than comparing against -1.
- (ppc_elf_relocate_section): Only return false if undefined_symbol
- or reloc_overflow fail, not always upon encountering an error.
-
-1999-06-22 Mark Mitchell <mark@codesourcery.com>
-
- * elflink.h (link_read_relocs): Explicitly cast external_relocs to
- bfd_byte * before performing pointer arithmetic.
-
-Tue Jun 22 13:06:25 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf-hppa.h: New file. Common stuff for elf32 and elf64 PA
- support.
- * elf32-hppa.c: Include elf-hppa.h.
- (ARCH_SIZE): Define.
- (elf_hppa_reloc_type_lookup): Delete. Found in the common code
- now.
- (elf32_hppa_info_to_howto): Similarly.
- (elf_hppa_howto_table): Similarly.
- (elf_hppa_reloc_type_lookup): Similarly.
- (hppa_elf_gen_reloc_type): Similarly.
- * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
-
-1999-06-22 Nick Clifton <nickc@cygnus.com>
-
- * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow
- handling R_V850_22_PCREL relocation.
-
-1999-06-21 Ian Lance Taylor <ian@zembu.com>
-
- * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
- type.
+ * libbfd.h: Regenerate.
+ * elf.c (_bfd_elf_find_nearest_line): Update call.
+ * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
+ * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
+ * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
+ (sec_to_styp_flags): Use them. Handle DWARF2 sections.
+ (styp_to_sec_flags): Handle DWARF2 sections.
+ * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
+ to _bfd_find_nearest_line.
+ * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
+ call to _bfd_find_nearest_line.
+
+2000-12-08 Kazu Hirata <kazu@hxi.com>
+
+ * coffgen.c: Fix formatting.
+ * elf-m10300.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-i960.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-sparc.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-mips.c: Likewise.
+ * elf64-sparc.c: Likewise.
-Sun Jun 20 14:13:57 1999 Richard Henderson <rth@cygnus.com>
+2000-12-07 Kazu Hirata <kazu@hxi.com>
- * section.c (_bfd_strip_section_from_output): Ignore sections
- DISCARDed by the link script.
+ * elf32-ppc.c: Fix formatting.
+ * elf64-x86-64.c: Likewise.
-1999-06-19 Ian Lance Taylor <ian@zembu.com>
+2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
- * elflink.h (elf_link_remove_section_and_adjust_dynindices):
- Remove unused local variable spp.
+ From Ralf Baechle <ralf@gnu.org>
- * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
- the entry symbol is not set.
+ * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
+ BFDs containing no sections or empty .text, .data or .bss sections
+ to be merged, regardless of their flags.
-Fri Jun 18 04:24:57 1999 Richard Henderson <rth@cygnus.com>
+2000-12-06 Kazu Hirata <kazu@hxi.com>
- * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
- GPDISP or LITUSE in a relocatable link.
+ * elf32-m32r.c: Fix formatting.
+ * elf32-m68hc11.c: Likewise.
+ * elf32-m68hc12.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-pj.c: Likewise.
+ * elf32-ppc.c: Likewise.
-Thu Jun 17 21:24:43 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+2000-12-05 Kazu Hirata <kazu@hxi.com>
+
+ * elf32-fr30.c: Fix formatting.
+ * elf32-hppa.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-i860.c: Likewise.
+ * elf32-i960.c: Likewise.
+
+2000-12-03 Kazu Hirata <kazu@hxi.com>
+
+ * elf32-arm.h: Fix formatting.
+ * elf32-avr.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-d10v.c: Likewise.
+ * elf32-d30v.c: Likewise.
+ * elf-hppa.h: Likewise.
+ * elf-m10200.c: Likewise.
+ * elf-m10300.c: Likewise.
+
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
+ bfd_mach_mips32_4k. Update FIXME comment.
+ * archures.c (bfd_mach_mips32): New constant.
+ (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
+ the latter, renumber it.
+ * bfd-in2.h (bfd_mach_mips32): New constant.
+ (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
+ the latter, renumber it.
+ * cpu-mips.c (I_mips32): New constant.
+ (I_mips4K, I_mips32_4k): Rename the former to the latter.
+ (arch_info_struct): Add bfd_mach_mips32 entry, replace
+ bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
+ * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
+ (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
+ with E_MIPS_MACH_MIPS32_4K.
+ (_bfd_mips_elf_final_write_processing): Replace
+ bfd_mach_mips4K with bfd_mach_mips32_4k case, add
+ bfd_mach_mips32 case.
+ (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
+ comparison with support for MIPS32.
+ (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
+ MIPS32.
+
+ * aoutx.h (NAME(aout,machine_type)): Add cases for
+ bfd_mach_mips5 and bfd_mach_mips64.
+ * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
+ * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
+ * cpu_mips.c (I_mips5, I_mips64): New definitions.
+ (arch_info_struct): Add entries for bfd_mach_mips5 and
+ bfd_mach_mips64.
+ * elf32-mips.c (elf_mips_isa, elf_mips_mach,
+ _bfd_mips_elf_print_private_bfd_data): Add cases for
+ E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
+ (_bfd_mips_elf_final_write_processing): Add cases for
+ bfd_mach_mips5 and bfd_mach_mips64.
+
+ * bfd/aoutx.h (NAME(aout,machine_type)): Add a
+ bfd_mach_mips_sb1 case.
+ * bfd/archures.c (bfd_mach_mips_sb1): New constant.
+ * bfd/bfd-in2.h (bfd_mach_mips_sb1): New constant.
+ * bfd/cpu-mips.c (I_sb1): New constant.
+ (arch_info_struct): Add entry for bfd_mach_mips_sb1.
+ * bfd/elf32-mips.c (elf_mips_mach): Add case for
+ E_MIPS_MACH_SB1.
+ (_bfd_mips_elf_final_write_processing): Add case for
+ bfd_mach_mips_sb1.
+
+2000-12-01 Joel Sherrill <joel@OARcorp.com>
+
+ * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
+ (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
+ (sparc*-*-rtems*): Switched from a.out to ELF.
+
+2000-11-30 Jan Hubicka <jh@suse.cz>
+
+ * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
+ BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
+ (elf64-x86-64.lo): Add dependencies.
+ * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
+ bfd_mach_x86_64_intel_syntax.
+ * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
+ * config.bfd (x86_64): Add.
+ * configure.in: Add support for bfd_elf64_x86_64_vec.
+ * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
+ (bfd_i386_arch, i8086_ar): Link in.
+ * elf64-x86-64.c: New file.
+ * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
+ * targets.c (bfd_elf64_x86_64_vec): Add.
+ (bfd_target_vect): Add bfd_elf64_x86_64_vec.
+
+2000-11-30 Kazu Hirata <kazu@hxi.com>
+
+ * xcofflink.c: Fix formatting.
+
+2000-11-28 Kazu Hirata <kazu@hxi.com>
+
+ * aoutx.h: Fix formatting.
+ * bfd-in.h: Likewise.
+ * bfd-in2.h: Likewise.
+ * cache.c: Likewise.
+ * cisco-core.c: Likewise.
+ * coff64-rs6000.c: Likewise.
+ * coffcode.h: Likewise.
+ * coffswap.h: Likewise.
+ * corefile.c: Likewise.
+ * elf32-mips.c: Likewise.
- * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
- * (alloc_dwarf1_func): Likewise.
+2000-11-27 Kazu Hirata <kazu@hxi.com>
-Wed Jun 16 03:09:57 1999 Jeffrey A Law (law@cygnus.com)
+ * aout-adobe.c: Fix formatting.
+ * coff64-rs6000.c: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
- * libhppa.h: Fix various formatting errors.
- (assemble_3); Rewrite using CATENATE.
- (assemble_17): Fix various bugs.
+2000-11-27 Philip Blundell <pb@futuretv.com>
-1999-06-16 Nick Clifton <nickc@cygnus.com>
+ * libcoff-in.h (coff_tdata): Add `strings_written' flag.
+ (obj_coff_strings_written): New accessor macro for above.
+ * libcoff.h: Regenerate.
+ * cofflink.c (_bfd_coff_final_link): Say that we wrote the
+ strings.
+ * coffcode.h (coff_write_object_contents): No need to write out
+ the string table if it's already been done.
- * elf32-mcore.c (R_MCORE_RAW): Fix definition.
+2000-11-22 Philip Blundell <pb@futuretv.com>
-1999-06-15 Richard Henderson <rth@cygnus.com>
+ * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
+ weak undefined symbols.
- * section.c (SEC_SHORT): Define.
- * bfd-in2.h: Rebuild.
+2000-11-24 Nick Clifton <nickc@redhat.com>
-1999-06-13 Mark Mitchell <mark@codesourcery.com>
+ * archures.c (bfd_mach_arm_5TE): Define.
+ (bfd_mach_arm+XScale): Define.
+ * bfd-in2.h: Regenerate.
- * elflink.h (elf_link_remove_section_and_adjust_dynindices):
- Remove abfd parameter. Use _bfd_strip_section_from_output.
- (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
-
- * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
- * elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
- * elflink.h (elf_link_remove_section_and_adjust_dynindices): New
- function.
- (bfd_elf_size_dynamic_sections): Use it.
+ * coff-arm.c (coff_arm_reloc_type_lookup): Accept
+ BFD_RELOC_ARM_PCREL_BLX.
-1999-06-13 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
+ XScale machine numbers.
- * elf32-i386.c (elf_howto_table): Change R_386_PC8 from
- complain_overflow_bitfield to complain_overflow_signed.
+ * config.bfd (xscale-elf): Add target.
+ (xscale-coff): Add target.
-1999-06-13 Mark Mitchell <mark@codesourcery.com>
+ * cpu-arm.c: Add xscale machine name.
+ Add v5t, v5te and XScale machine numbers.
- * elflink.h (elf_link_read_relocs_from_section): New function,
- split out from ...
- (elf_link_read_relocs): Here. Use it for both relocation
- sections.
+2000-11-23 Kazu Hirata <kazu@hxi.com>
-1999-06-12 Mark Mitchell <mark@codesourcery.com>
+ * aix386-core.c: Fix formatting.
- * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
- asect->reloc_count is valid.
+2000-11-22 Jim Wilson <wilson@redhat.com>
-1999-06-12 Ian Lance Taylor <ian@zembu.com>
+ * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
+ (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
+ * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
+ (ins_imms_scaled): Initialize sign_bit at function entry.
+ (elf64_ia64_operands): Add missing initializers.
+ * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
+ elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
+ elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
+ elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
+ elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
+ parameters.
+ (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
+ and free_extsyms at function entry.
+ (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
+ (elfNN_ia64_create_dynamic_sections): Delete unused local h.
+ (get_got): Delete unused local srel.
+ (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
+ (elfNN_ia64_relocate_section): Delete unused local dynindx.
+
+2000-11-21 Kazu Hirata <kazu@hxi.com>
+
+ * coff-a29k.c: Fix formatting.
+ * coff-h8500.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-stgo32.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * coff-w65.c: Likewise.
+ * cpu-h8500.c: Likewise.
+ * cpu-hppa.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * ecoff.c: Likewise.
+ * ecofflink.c: Likewise.
+
+2000-11-21 Nick Clifton <nickc@redhat.com>
+
+ * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
+ remove possibility of infinite loop.
+
+2000-11-20 Kazu Hirata <kazu@hxi.com>
+
+ * aix386-core.c: Fix formatting.
+ * aout-adobe.c: Likewise.
+ * aout-arm.c: Likewise.
+ * aout-encap.c: Likewise.
+ * aout-ns32k.c: Likewise.
+ * aout-target.h: Likewise.
+ * aout-tic30.c: Likewise.
+ * aoutf1.h: Likewise.
+ * aoutx.h: Likewise.
+ * archive.c: Likewise.
+ * bfd-in.h: Likewise.
+ * bfd-in2.h: Likewise.
+ * bfd.c: Likewise.
+ * bout.c: Likewise.
- * elf32-mips.c (mips_elf32_section_processing): Permit a
- SHT_MIPS_REGINFO section to have a size of 0.
+2000-11-17 H.J. Lu <hjl@gnu.org>
-1999-06-12 David O'Brien <obrien@freebsd.org>
+ * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
+ pltoff entries for DT_INIT and DT_FINI.
+ (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
+ (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
+ entries.
- * config.bfd (alpha*-*-freebsd*): New target.
- (i[3456]86-*-freebsd*): Now defaults to ELF.
+2000-11-16 Richard Henderson <rth@redhat.com>
+
+ * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
+ (allocate_dynrel_entries): Likewise.
+ (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
+ (set_pltoff_entry): Likewise.
+ (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
+ (elfNN_ia64_reloc_type_lookup): Likewise.
+ (elfNN_ia64_install_value): Likewise.
+ (elfNN_ia64_relocate_section): Likewise.
+ * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
+ (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
+
+2000-11-16 Kazu Hirata <kazu@hxi.com>
+
+ * cpu-a29k.c: Fix formatting.
+ * cpu-alpha.c: Likewise.
+ * cpu-arm.c: Likewise.
+ * cpu-avr.c: Likewise.
+ * cpu-d10v.c: Likewise.
+ * cpu-h8500.c: Likewise.
+ * cpu-hppa.c: Likewise.
+ * cpu-i370.c: Likewise.
+ * cpu-i386.c: Likewise.
+ * cpu-i960.c: Likewise.
+ * cpu-ia64-opc.c: Likewise.
+ * cpu-ia64.c: Likewise.
+ * cpu-m32r.c: Likewise.
+ * cpu-m68hc11.c: Likewise.
+ * cpu-m68hc12.c: Likewise.
+ * cpu-m68k.c: Likewise.
+ * cpu-m88k.c: Likewise.
+ * cpu-mips.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * cpu-pj.c: Likewise.
+ * cpu-powerpc.c: Likewise.
+ * cpu-sh.c: Likewise.
+ * cpu-sparc.c: Likewise.
+ * cpu-tic54x.c: Likewise.
+ * cpu-v850.c: Likewise.
+ * cpu-vax.c: Likewise.
+ * cpu-w65.c: Likewise.
+ * cpu-we32k.c: Likewise.
+ * cpu-z8k.c: Likewise.
+ * dwarf1.c: Likewise.
+ * dwarf2.c: Likewise.
+
+2000-11-15 Kazu Hirata <kazu@hxi.com>
+
+ * coff-arm.c: Fix formatting.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-sparc.c: Likewise.
+ * coff-tic30.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * coff-w65.c: Likewise.
+ * coff-we32k.c: Likewise.
+ * coff-z8k.c: Likewise.
+
+2000-11-15 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
+ section with the same ALLOC|LOAD flags as the source section.
+
+2000-11-14 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
+ by STO_ALPHA constants.
+
+2000-11-14 Kazu Hirata <kazu@hxi.com>
+
+ * coff-pmac.c: Fix formatting.
+ * coff-ppc.c: Likewise.
+
+2000-11-13 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_add_object_symbols): Also add indirect
+ symbols for common symbols with the default version.
+
+2000-11-09 Philip Blundell <pb@futuretv.com>
+
+ * section.c (STD_SECTION): Set gc_mark flag.
+
+2000-11-11 Kazu Hirata <kazu@hxi.com>
+
+ * coff-i960.c: Likewise.
+ * coff-m68k.c: Likewise.
+ * coff-m88k.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-mips.c: Likewise.
+
+2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
+
+ * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
+
+2000-11-10 Kazu Hirata <kazu@hxi.com>
+
+ * coff-h8300.c: Fix formatting.
+ * coff-h8500.c: Likewise.
+ * coff-i386.c: Likewise.
+ * coff-i860.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-ia64.c: Likewise.
+
+2000-11-09 Kazu Hirata <kazu@hxi.com>
+
+ * archive.c: Fix formatting.
+ * archures.c: Likewise.
+
+2000-11-07 Richard Henderson <rth@redhat.com>
+
+ * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
+ Set it before bfd_elf64_bfd_final_link call. Use it after the call.
+ * section.c (bfd_set_section_contents): Call memcpy if
+ section->contents set and location not equal to contents plus offset.
+
+2000-11-08 Kazu Hirata <kazu@hxi.com>
+
+ * bfd-in.h: Fix formatting.
+ * bfd-in2.h: Likewise.
+ * bfd.c: Likewise.
+ * binary.c: Likewise.
+ * bout.c: Likewise.
+ * coff-a29k.c: Likewise.
+ * coff-alpha.c: Likewise.
+ * coff-apollo.c: Likewise.
+ * coff-aux.c: Likewise.
-1999-06-11 Ian Lance Taylor <ian@zembu.com>
+2000-11-07 Kazu Hirata <kazu@hxi.com>
- * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
- wrap if the relocation covers the high bit of an address.
+ * aix386-core.c: Fix formatting.
+ * aoutf1.h: Likewise.
+ * aoutx.h: Likewise.
+ * archures.c: Likewise.
+ * armnetbsd.c: Likewise.
- * dwarf2.c (decode_line_info): Remove unused variable first_time.
+2000-11-07 Alan Modra <alan@linuxcare.com.au>
-1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
+ * coff-h8300.c (special): Adjust reloc address.
- * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
- instead of R_SPARC_max.
- (sparc64_elf_info_to_howto): Likewise.
- * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
- (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
+2000-11-06 Steve Ellcey <sje@cup.hp.com>
-1999-06-07 Richard Henderson <rth@cygnus.com>
+ * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
+ to differentiate elf32 and elf64 on ia64.
+ * bfd-in2.h: Regenerate.
+ * config.bfd: Add target for "ia64*-*-hpux*".
+ * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
+ * configure: Regenerate.
+ * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
+ * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
- * section.c (_bfd_strip_section_from_output): Remove output
- sections with no initial link_order.
+ * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
+ from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
+ * Makefile.in: Regnerate.
+ * elf64-ia64.c: Deleted.
+ * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
-1999-06-07 Nick Clifton <nickc@cygnus.com>
+2000-11-06 Kazu Hirata <kazu@hxi.com>
- * elf32-m88k.c (ELF_MAXPAGESIZE): Define.
+ * aout-adobe.c: Fix formatting.
+ * aout-arm.c: Likewise.
+ * aout-cris.c: Likewise.
+ * aout-encap.c: Likewise.
+ * aout-ns32k.c: Likewise.
+ * aout-target.h: Likewise.
+ * aout-tic30.c: Likewise.
-Mon Jun 7 11:49:43 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+2000-11-05 Philip Blundell <philb@gnu.org>
- * Makefile.am (SOURCE_HFILES): Add missing headers.
- * Makefile.in: Regenerated.
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
+ BFDs containing no sections to be merged, regardless of their flags.
-1999-06-06 Mark Mitchell <mark@codesourcery.com>
+2000-11-04 Philip Blundell <philb@gnu.org>
- * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
- the N32 ABI.
+ * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
+ if a relocation for an undefined symbol also results in an
+ overflow.
-1999-06-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+2000-11-06 Christopher Faylor <cgf@cygnus.com>
- * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
- range undefweak symbols.
- * hash.c: Add missing comma after @xref{}
- * linker.c: Likewise.
+ * config.bfd: Add support for Sun Chorus.
-1999-06-04 Nick Clifton <nickc@cygnus.com>
+2000-11-05 David O'Brien <obrien@FreeBSD.org>
- * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message
- if not defined.
- * elf32-gen.c (ELF_MAXPAGESIZE): Define.
- * elf32-i860.c (ELF_MAXPAGESIZE): Define.
- * elf32-i960.c (ELF_MAXPAGESIZE): Define.
- * elf64-gen.c (ELF_MAXPAGESIZE): Define.
+ * configure.in: Recognize alpha-*-freebsd*.
+ * configure: Regenerate.
-1999-06-04 Ian Lance Taylor <ian@zembu.com>
+2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
- * Makefile.am: Rebuild dependencies.
- (BFD32_BACKENDS): Add dwarf1.lo.
- (BFD32_BACKENDS_CFILES): Add dwarf1.c.
- * Makefile.in: Rebuild.
+ * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
+ (Chunk): New global variable set by a parameter in objcopy.c.
+ (S3Forced): New global variable set by a parameter in
+ objcopy.c.
+ (srec_set_section_contents): If S3Forced is true, always generate
+ S3 records.
+ (srec_write_section): Use 'Chunk' to limit maximum length of S
+ records.
-1999-06-04 Nick Clifton <nickc@cygnus.com>
+2000-11-02 Per Lundberg <plundis@chaosdev.org>
- * Makefile.am: Add epoc-arm-pe target.
+ * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
* Makefile.in: Regenerate.
- * pe-arm.c: Only redefine interworking function names if they have
- not already been redefined.
- * pei-arm.c: Only redefine interworking function names if they have
- not already been redefined.
- * epoc-pe-arm.c: Redefine interworking function names to avoid a
- name space clash.
- * epoc-pei-arm.c: Redefine interworking function names to avoid a
- name space clash.
-
-1999-06-03 Nick Clifton <nickc@cygnus.com>
-
- * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1.
-
-Fri Jun 4 10:05:11 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * elf.c (elf_fake_sections): Undo change of 1999-05-10.
-
-Fri Jun 4 03:10:49 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
- start / stop for recalculating of r_addend of R_SH_SWITCH*.
-
-Fri Jun 4 02:53:13 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
- in other text sections.
-
-Fri Jun 4 02:29:34 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libbfd.c (_bfd_generic_verify_endian_match): New function.
- * libbfd-in.h (_bfd_generic_verify_endian_match): Declare.
- * libbfd.h: Regenerate.
- * coff-sh.c (sh_merge_private_data): Delete.
- (coff_bfd_merge_private_bfd_data): Change to
- _bfd_generic_verify_endian_match.
- (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define.
-
-1999-06-03 Ulrich Drepper <drepper@cygnus.com>
-
- * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE.
-
-1999-06-03 Ian Lance Taylor <ian@zembu.com>
-
- * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
- prototype.
- (bfd_elf32_arm_process_before_allocation): Likewise.
- * bfd-in2.h: Rebuild.
-
-1999-06-03 David Mosberger <davidm@hpl.hp.com>
-
- * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep
- track of end_sequence markers.
- (add_line_info): Add END_SEQUENCE arg.
- (decode_line_info): Don't try to infer lo_pc and hi_pc from the
- debug-line info---it doesn't work right if a compilation unit
- consists of multiple discontiguous code-sequences. It would be
- worthwhile to optimize for the common case where a compilation
- unit results in a contiguous set of code sequences, but this is
- quite tricky to get right for arbitrary DWARF2 files.
- (lookup_address_in_line_info_table): Don't use the last line entry
- for a compilation unit for anything with an address higher than
- this line entry. Also, check for end_sequence markers to
- correctly handle discontinuities.
- (_bfd_dwarf2_find_nearest_line): When checking previously loaded
- compilation units, check all compilation units with each->high==0
- just like when reading compilation units.
-
- * dwarf2.c (decode_line_info): Initialize table->files and
- table->last_line to NULL to avoid segfaults due to random
- values in these members.
- (concat_filename): Check for out-of-range file number before
- indexing filename table. Segfaults suck.
-
- * dwarf2.c (decode_line_info): Don't truncate address to least
- significant 32 bits (breaks 64 bit targets).
- (lookup_address_in_function_table): Ditto.
- (comp_unit_contains_address): Ditto.
-
-1999-06-02 Mark Mitchell <Mark Mitchell <mark@codesourcery.com>>
-
- * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
- * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
- (mips_elf64_howto_table_rela): Likewise.
-
- * elfcode.h (elf_slurp_reloc_table_from_section): New function,
- split out from ...
- (elf_slurp_reloc_table): Here. Use it to handle the case where a
- single section has two associated relocation sections.
-
-1999-06-02 Mark Salter <msalter@cygnus.com>
-
- * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
- COFF_WITH_PE defined.
-
-1999-06-02 Nick Clifton <nickc@cygnus.com>
-
- * pe-arm.c: Rename global arm interworking functions to avoid name
- collision when all targets BFD is built.
- * pei-arm.c: Ditto.
-
-1999-05-31 Mark Mitchell <mark@codesourcery.com>
-
- * elf-bfd.h (elf_backend_data): Remove use_rela_p. Add
- may_use_rel_p, may_use_rela_p, default_use_rela_p.
- (bfd_elf_section_data): Add use_rela_p.
- * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
- (_bfd_elf_new_section_hook): Likewise.
- (elf_fake_sections): Use may_use_rela_p, etc., instead of
- use_rela_p.
- (_bfd_elf_copy_private_section_data): Copy use_rela_p.
- * elfcode.h (write_relocs): Determine whether or not use rela
- relocs based on the relocation section header.
- * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
- instead of use_rela_p.
- * elfxx-target.h (elf_backend_may_use_relp): New macro.
- (elf_backend_may_use_rela_p): Likewise.
- (elf_backend_default_use_rela_p): Likewise.
- (elfNN_bed): Use them.
-
-Wed Jun 2 12:38:49 1999 Miodrag Vallat <miodrag@multimania.com>
-
- * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
-
-Tue Jun 1 17:57:58 1999 Mark P. Mitchell <mitchell@n02.acl.lanl.gov>
-
- * reloc.c (BFD_RELOC_MIPS_SUB): New relocation.
- (BFD_RELOC_MIPS_GOT_PAGE): Likewise.
- (BFD_RELOC_MIPS_GOT_OFST): Likewise.
- (BFD_RELOC_MIPS_GOT_DISP): Likewise.
- * bfd-in2.h: Regenerated.
- * libbfd.h: Likewise.
- * elf32-mips.c (mips_info_to_howto_rela): New function.
- (USE_REL): Adjust for new conventions.
- (MINUS_ONE): New macro.
- (elf_mips_howto_table): Add R_MIPS_SUB.
- (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST,
- and MIPS_GOT_DISP.
- (mips_elf_final_write_processing): Set sh_link, not sh_info, for a
- .MIPS.content section.
- (_bfd_mips_elf_fake_sections): Treat all sections that begin
- with .MIPS.content as .MIPS.content sections. Set
- SHF_MNIPS_NOSTRIP for such section.
- (elf_info_to_howto): Define to mips_info_to_howto_rela.
- * elf64-mips.c (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE,
- MIPS_GOT_OFST, and MIPS_GOT_DISP.
-
-Wed Jun 2 11:51:12 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized
- variable.
+ * bfd-in2.h: Regenerate.
+ * po/bfd.pot: Regenerate.
- * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous
- `else'.
+2000-10-31 Philip Blundell <philb@gnu.org>
-1999-05-30 Philip Blundell <philb@gnu.org>
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
+ EF_SOFT_FLOAT if it is defined.
- * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of
- 1993-03-25 (!!). Take into account the bitmasks for the reloc so
- the addend does not overflow into the rest of the word.
+2000-10-27 Philip Blundell <philb@gnu.org>
-1999-05-29 Nick Clifton <nickc@cygnus.com>
+ * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
+ attempts to mix PIC code with non-PIC, just mark the output as
+ being position dependent.
+ (elf32_arm_merge_private_bfd_data): Likewise. Print an error
+ message for EF_SOFT_FLOAT mismatches. Display diagnostics for
+ all mismatches, not just the first one.
- * bfd-in.h: Amend prototype for
- bfd_elf32_arm_process_before_allocation .
- * bfd-in.h: Regenerate.
+2000-10-25 Chris Demetriou <cgd@sibyte.com>
- * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of
- elements in a fixed sized array.
- (ARM_ELF_ABI_VERSION): Define.
- (ARM_ELF_OS_ABI_VERSION): Define.
- (R_ARM_THM_ABS5): Fix rightshift and size.
- (R_ARM_THM_PC22): Fix size.
- (R_ARM_PLT32): Define Howto.
- (find_howto): New function: Locate a howto based on a reloc
- number.
- (elf32_arm_info_to_howto): Use find_howto if necessary.
- (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
- bfd_reloc_code_real_type.
- (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT
- and BFD_RELOC_VTABLE_ENTRY.
- (elf32_arm_reloc_type_lookup): Use find_howto if necessary.
-
- * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of
- elements in a fixed sized array.
- (ARM_ELF_ABI_VERSION): Define.
- (ARM_ELF_OS_ABI_VERSION): Define.
- (R_ARM_THM_ABS5): Fix rightshift and size.
- (R_ARM_THM_PC22): Fix size.
- (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto.
- (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
- bfd_reloc_code_real_type.
-
- * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field:
- no_pipeline_knowledge.
- (elf32_arm_link_hash_create): Initialise new field to zero.
- (bfd_elf32_arm_process_before_allocation): Add new paraemter:
- no_pipeline_knowledge. Use this parameter to initialise the field
- in the globals data structure.
- (elf32_arm_final_link_relocate): Only add in pipeline offset if
- no_pipeline_knowledge is false and the binary is from an old
- toolchain.
- (elf32_arm_merge_private_data): Generate an error if an attempt is
- made to linl together big endian and little endian code.
- (elf32_arm_post_process_headers): New function: Initialise the
- EI_OSABI and EI_ABIVERSION fields of the newly created ELF program
- header.
- (elf_backend_post_process_headers): Define.
+ * ieee.c (ieee_archive_p): Plug one of many possible
+ memory leaks in error handling.
-1999-05-28 Nick Clifton <nickc@cygnus.com>
-
- * elf-bfd.h (struct elf_backend_data): Add new field:
- elf_backend_post_process_headers.
-
- * elfxx-target.h (elf_backend_post_process_headers): Define to
- NULL if not already defined.
- (elfNN_bed): Initialise elf_backend_post_process_headers field.
-
- * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields
- to zero.
- (_bfd_elf_compute_section_file_positions): Call
- elf_backend_post_process_headers if defined.
-
-1999-05-28 Ian Lance Taylor <ian@zembu.com>
-
- * configure.in: Check whether getuid and getgid exist.
- * archive.c: Define getuid and getgid as macros if HAVE_GETUID or
- HAVE_GETGID are not defined, respectively.
- (bfd_write_armap): Don't special case on _WIN32 for getuid and
- getgid.
- * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*.
- * configure, config.in: Rebuild.
-
-1999-05-28 Martin Dorey <mdorey@madge.com>
-
- * elf32-i960.c: New file.
- * elf.c (prep_headers): Handle bfd_arch_i960.
- * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
- * config.bfd (i960-*-elf*): New target.
- * configure.in (bfd_elf32_i960_vec): New target vector.
- * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
- (BFD32_BACKENDS_CFILES): Add elf32-i960.c.
- * Makefile.in, aclocal.m4, configure: Rebuild.
-
-1999-05-27 Nick Clifton <nickc@cygnus.com>
-
- * elfarm-oabi.c (elf32_arm_howto_table): Add entry for
- R_ARM_PLT32.
- (find_howto): New function: Find entries in the
- elf32_arm_howto_table.
- (elf32_arm_info_to_howto): Use find_howto if the entry cannot be
- computed simply.
- (elf32_arm_reloc_type_lookup): Add lookup for
- BFD_RELOC_ARM_PLT32.
-
-1999-05-25 Philip Blundell <pb@nexus.co.uk>
-
- * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function.
- (elf32_arm_link_hash_table_create): Use above function as the
- constructor for hash table entries.
- (elf32_arm_relocate_section): Avoid crash when there is no output
- section.
- (elf32_arm_final_link_relocate): New parameter h.
- (elf32_arm_relocate_section): Pass symbol hash entry to above
- routine.
- (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct
- comments.
+2000-10-20 Jakub Jelinek <jakub@redhat.com>
-1999-05-25 Catherine Moore <clm@cygnus.com>
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
+ elf32_sparc_object_p, elf32_sparc_final_write_processing):
+ Support v8plusb.
+ * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
+ sparc64_elf_object_p): Support v9b.
+ * archures.c: Declare v8plusb and v9b machines.
+ * bfd-in2.h: Ditto.
+ * cpu-sparc.c: Ditto.
- * coff-arm.c (coff_arm_relocate_section): Don't emit
- base file entries for pc-relative values.
+2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
-1999-05-25 DJ Delorie <dj@cygnus.com>
+ * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
+ of a GOT reloc.
- * peicode.h (coff_swap_sym_in): When we create the actual section
- to reflect the not-there section C_SECTION symbols refer to,
- change the symbol class to C_STAT as the section is now really
- there.
+ * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
+ (SYMBOL_CALLS_LOCAL): New macro.
+ (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
+ (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
+ (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
+ (ppc_elf_relocate_section): Use flag variable to determine
+ whether the relocation refers to a local symbol.
+ Test whether a PLTREL24 reloc will produce a reloc by looking
+ to see whether a PLT entry was made.
-1999-05-24 Philip Blundell <pb@nexus.co.uk>
+2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
- * elf32-arm.h (elf32_arm_relocate_section): Undo change of
- 1999-03-25.
+ * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
+ entries that could serve as a definition for a weak symbol.
-Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
+2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
- * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed
- F_PIC_INT to F_PIC.
- * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and
- F_ARM_3M labels. Changed F_PIC_INT to F_PIC.
+ From Ralf Baechle <ralf@gnu.org>
-1999-05-16 Nick Clifton <nickc@cygnus.com>
+ * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
+ local_p. Add symbol value only for non-R_MIPS_REL32 relocations
+ against local symbols.
+ (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
- * coff-mcore.c (in_reloc_p): Reinstate.
+2000-10-12 Alan Modra <alan@linuxcare.com.au>
-1999-05-15 Nick Clifton <nickc@cygnus.com>
+ * section.c (struct sec): Add kept_section.
+ (struct bfd_comdat_info): Remove sec, we can use above.
+ (STD_SECTION): Add initializer.
+ (bfd_make_section_anyway): Init here too.
- * reloc.c (BFD_RELOC_MCORE_RVA): Define.
- * bfd-in2.h: Regenerate.
- * coff-mcore.c (in_reloc_p): Remove defintion.
- (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA.
- (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to
- IMAGE_REL_MCORE_RVA.
- (coff_mcore_rtype_to_howto): Add special processing for
- IMAGE_REL_MCORE_RVA.
- (coff_mcore_relocate_section): Add support for
- IMAGE_REL_MCORE_RVA.
- * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE.
- (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to
- R_MCORE_RELATIVE.
- (mcore_elf_relocate_section): Delete redundant case labels.
-
-Fri May 14 10:59:55 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * elf32-arm.h (elf32_arm_relocate_section): Fix operator
- precedence between bit-and and comparison.
-
-Thu May 13 09:45:23 1999 Joel Sherrill (joel@OARcorp.com)
-
- * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to
- list of target formats (targ_selvecs).
- (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets.
- (powerpcle*-*rtems*, sh-*-rtemself*): New targets.
-
-1999-05-10 DJ Delorie <dj@cygnus.com>
-
- * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
- reasonable mode until "ar x" is smart enough to skip it (fixes
- gcc/libgcc.a builds on mips-ecoff targets
-
- * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed
- to work. Hack to support MS import libraries, which use different
- COMDAT types than GNU.
- (coff_slurp_symbol_table): C_SECTION symbols are local; they refer
- to implied zero-length sections (see peicode below)
- * coffgen.c (coff_get_normalized_symtab): Properly read long MS
- filename symbols, which use one *or more* auxents.
- * coffswap.h (coff_swap_aux_in): ditto
- * peicode.h (coff_swap_sym_in): Build the implied zero-length
- sections
-
-Tue May 11 15:51:58 1999 Jeffrey A Law (law@cygnus.com)
-
- * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false
- for all relocations.
-
-1999-05-10 Catherine Moore <clm@cygnus.com>
-
- * bfd-in.h (bfd_arm_allocate_interworking_sections): Static
- if COFF_IMAGE_WITH_PE.
- (bfd_arm_process_before_allocation): Likewise.
- (bfd_arm_get_bfd_for_interworking): Likewise.
- * coff-arm.c: Likewise.
* bfd-in2.h: Regenerate.
- * configure.in (armpe_little_vec): Remove coff-arm.lo.
- (armpe_big_vec): Likewise.
- * configure: Rebuild.
-
-1999-05-10 Nick Clifton <nickc@cygnus.com>
-
- * elf.c (elf_fake_sections): Check for .rel. as start of rel
- section, not just .rel. Same for .rela.
-
-1999-05-07 Nick Clifton <nickc@cygnus.com>
- * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
- endianism with an error message.
+ * elflink.h (elf_link_add_object_symbols): Remove unnecessary
+ zeroing of `flags'.
+ (elf_link_input_bfd): Set all asection->symbol->value's here, and
+ fudge values for discarded link-once section symbols.
-Thu May 6 17:09:09 1999 Fred Fish <fnf@be.com>
+ * elf64-hppa.c: Include alloca-conf.h
- * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
- assignment from "unsigned char *" to "char *".
- (decode_line_info): Likewise for dwarf_line_buffer assignment.
+2000-10-11 Alan Modra <alan@linuxcare.com.au>
-1999-05-05 Catherine Moore <clm@cygnus.com>
+ * elf.c (swap_out_syms): Revert 2000-10-07 changes.
- * coff-arm.c (coff_arm_relocate_section): Add one to
- address of ARM_RVA32 thumb functions.
+ * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
-1999-05-05 Catherine Moore <clm@cygnus.com>
+2000-10-10 Alan Modra <alan@linuxcare.com.au>
- * elf32-m68k.c (elf32_m68k_set_private_flags): New.
- (elf32_m68k_copy_private_bfd_data): New.
- (elf32_m68k_merge_private_bfd_data): New.
- (elf32_m68k_print_private_bfd_data): New.
- (CPU32_FLAG): Define.
- (PLT_CPU32_ENTRY_SIZE): Define.
- (elf_cpu32_plt0_entry): Declare.
- (elf_cpu32_plt_entry): Declare.
- (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries.
- (elf_m68k_finish_dynamic_symbol): Likewise.
- (elf_m68k_finish_dynamic_sections): Likewise.
- (elf_backend_plt_header_size): Remove definition.
- (bfd_elf32_bfd_copy_private_bfd_data): Define.
- (bfd_elf32_bfd_merge_private_bfd_data): Define.
- (bfd_elf32_bfd_set_private_flags): Define.
- (bfd_elf32_bfd_print_private_bfd_data): Define.
-
-Mon May 3 09:24:49 1999 Jeffrey A Law (law@cygnus.com)
-
- * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
- and R_LONG_PCREL_MODE.
-
-1999-04-29 Nick Clifton <nickc@cygnus.com>
-
- * coff-mcore.c (coff_mcore_relocate_section): Fix typos.
+ * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
-Fri Apr 28 16:36:19 1999 Stan Cox <scox@cygnus.com>
+2000-10-10 Tom Rix <trix@redhat.com>
- * elf32-sh.c (sh_elf_relocate_section): Include relocation addend
- in relocation calculation.
+ * section.c (bfd_make_section_anyway): Release newsect ptr when
+ newsect->symbol fails to alloc. Use bfd_release instead of free.
-1999-04-26 Tom Tromey <tromey@cygnus.com>
+2000-10-09 Richard Henderson <rth@cygnus.com
- * aclocal.m4, configure: Updated for new version of libtool.
+ * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
+ (elf64_ia64_unwind_entry_compare): New.
+ (elf64_ia64_final_link): Sort the .IA_64.unwind section.
-1999-04-21 Nick Clifton <nickc@cygnus.com>
+2000-10-07 Alan Modra <alan@linuxcare.com.au>
- * coff-mcore.c: Add support for mcore relocs.
+ * elflink.h (size_dynamic_sections): Don't create various tags if
+ .dynstr is excluded from the link. Don't set first dynsym entry
+ if dynsymcount is zero.
+ (elf_bfd_final_link): Don't try to swap out dynamic syms if
+ .dynsym excluded from the link. Don't try to write any dynamic
+ sections excluded from the link.
-1999-04-20 Gavin Romig-Koch <gavin@cygnus.com>
+ * elf.c (swap_out_syms): Handle global section symbols.
- * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the
- incorrect use EF_MIPS_xxBITPTRS.
+2000-10-05 DJ Delorie <dj@redhat.com>
-1999-04-18 Ian Lance Taylor <ian@zembu.com>
-
- * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local
- variable insn.
-
- * bfd-in2.h: Rebuild.
- * libbfd.h: Rebuild.
+ * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
+ * coffcode.h (coff_set_alignment_hook): read extended reloc count
+ (coff_write_relocs): write extended reloc count
+ (coff_write_object_contents): account for extended relocs
-Sat Apr 17 20:55:15 1999 Catherine Moore <clm@cygnus.com>
+2000-10-05 Jim Wilson <wilson@cygnus.com>
- * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform.
- (coff_arm_relocate_section): Add ARM26D transform. Only
- change to ARM26D for relocateable links.
-
-1999-04-16 Gavin Romig-Koch <gavin@cygnus.com>
-
- * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New.
- (bfd_elf32_bfd_print_private_bfd_data): New.
-
-1999-04-15 Doug Evans <devans@casey.cygnus.com>
-
- * elf32-arm.h (elf32_arm_final_link_relocate): For R_ARM_THM_ABS5,
- refetch addend if USE_REL, add many comments regarding current state.
- For R_ARM_THM_PC22, refetch addend if USE_REL, simplify.
- * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix
- size and rightshift. For R_ARM_THM_PC22, fix bitsize.
- * elfarm-oabi.c (elf32_arm_howto_table): Ditto.
-
-Wed Apr 14 14:33:08 1999 Richard Henderson <rth@cygnus.com>
-
- * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'.
- * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise.
-
-1999-04-13 David Mosberger <davidm@hpl.hp.com>
+ * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
+ field.
+ * elf.c (_bfd_elf_make_section_from_shdr): Call the
+ elf_backend_section_flags function.
+ * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
+ code.
+ (elf64_ia64_section_flags): New function containing flag conversion
+ code.
+ (elf_backend_section_flags): Define to elf64_ia64_section_flags.
+ * elfxx-target.h (elf_backend_section_flags): Define.
+ (elfNN_bed): Initialize elf_backend_section_flags field.
- * dwarf2.c (decode_line_info): Don't truncate address to least
- significant 32 bits (breaks 64 bit targets).
- (lookup_address_in_function_table): Ditto.
- (comp_unit_contains_address): Ditto.
+2000-10-02 Alan Modra <alan@linuxcare.com.au>
-Tue Apr 13 21:27:19 1999 Catherine Moore <clm@cygnus.com>
+ * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
+ _bfd_elf32_gc_record_vtable. Correct a comment.
- * coff-arm.c (arm_emit_base_file_entry): New routine.
- (A2T3_OFFSET): Define.
- (T2A3_OFFSET): Define.
- (coff_arm_relocate_section): Emit base file entries for interworking
- stubs.
+2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
-1999-04-13 Philip Blundell <philb@gnu.org>
+ From Ralf Baechle <ralf@gnu.org>
- * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for
- relocs 17 through 19.
+ * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
+ produces binaries with got[1] = 0x80000001 to differenciate them
+ for the dynamic linker from the broken binaries produced by old
+ versions.
-Sun Apr 11 01:25:17 1999 Richard Henderson <rth@cygnus.com>
+2000-09-30 Petr Sorfa <petrs@sco.com>
- * elfcode.h: Remove fnmatch.h.
- * elflink.h (elf_link_assign_sym_version): Call back to ld
- instead of calling fnmatch.
+ * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
+ (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
+ * configure.in: Add check for pxstatus_t and lwpxstatus_t.
+ * configure: Regenerate.
- * config.bfd (i?86-*-beoself): Include pe vecs.
+2000-09-27 Hans-Peter Nilsson <hp@axis.com>
+
+ Define two bfd_targets for absence and presence of leading
+ underscore on symbols. Make sure to only link same kind.
+ * elf32-cris.c (cris_elf_object_p,
+ cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
+ cris_elf_merge_private_bfd_data): New.
+ (elf_backend_object_p, elf_backend_final_write_processing,
+ bfd_elf32_bfd_print_private_bfd_data,
+ bfd_elf32_bfd_merge_private_bfd_data): Define.
+ <Target vector definition>: Include elf32-target.h twice with
+ different macro settings:
+ (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
+ bfd_elf32_us_cris_vec.
+ (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
+ (elf_symbol_leading_char): First as 0, then '_'.
+ (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
+ * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
+ * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
+ * configure: Regenerate.
+ * targets.c: Declare bfd_elf32_us_cris_vec.
+ * po/bfd.pot: Regenerate.
-Sun Apr 11 01:14:06 1999 Richard Henderson <rth@cygnus.com>
+2000-09-29 Momchil Velikov <velco@fadata.bg>
- * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt
- to go missing.
+ * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
+ R_ARM_THM_PC22 relocations.
-1999-04-10 Richard Henderson <rth@cygnus.com>
+2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
- * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined
- when trying to resolve dynamic symbol references.
- * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
- * elf32-mips.c (mips_elf_relocate_section): Likewise.
- * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
- * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
- * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
- * elflink.h (elf_link_output_extsym): Likewise.
+ * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
-Sat Apr 10 15:12:09 1999 Richard Henderson <rth@cygnus.com>
+2000-09-29 Momchil Velikov <velco@fadata.bg>
- * section.c (_bfd_strip_section_from_output): New function moved from
- * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here.
- * elf32-i386.c (elf_i386_size_dynamic_sections): Use it.
- * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
- * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
- * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
- * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
- * bfd-in2.h: Update.
+ * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
+ is has the SEC_HAS_CONTENTS flag set.
-1999-04-09 Ian Lance Taylor <ian@zembu.com>
+2000-09-28 Örjan Friberg <orjanf@axis.com>
+ Hans-Peter Nilsson <hp@axis.com>
- * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow.
+ * aout-cris.c (N_TXTADDR): Define.
-1999-04-08 Nick Clifton <nickc@cygnus.com>
+2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
- * coff-mcore.c: New File: Support for mcore-pe targets.
- * cpu-mcore.c: New File: Support for mcore targets.
- * elf32-mcore.c: New File: Support for mcore-elf target.
- * pe-mcore.c: New File: Definitions for mcore-pe target.
- * pei-mcore.c: New File: Definitions for mcore-pei target.
- * Makefile.am: Add support for MCore targets.
+ * som.c: Include alloca-conf.h.
+ * Makefile.am: "make dep-am"
* Makefile.in: Regenerate.
- * config.bfd: Add support for MCore targets.
- * configure.in: Add support for MCore targets.
- * configure: Regenerate.
- * archures.c: Add support for MCore architecture.
- * bfd-in2.h: Regenerate.
- * coffcode.h: Add support for mcore-pe targets.
- * elf.c: Add support for mcore-elf target.
- * reloc.c: Add support for MCore relocs.
- * targets.c: Add support for MCore targets.
-1999-04-07 Nick Clifton <nickc@cygnus.com>
-
- * elfarm-nabi.c (elf32_arm_howto_table): Add entries for
- R_ARM_XPC25 and R_ARM_THM_XPC22.
- (elf32_arm_reloc_map): Remove redundant entries.
-
-1999-04-06 Ian Lance Taylor <ian@zembu.com>
-
- * sysdep.h (LC_MESSAGES): Never define.
-
-1999-04-06 Chris Torek <torek@bsdi.com>
-
- * reloc.c (bfd_check_overflow): Add addrsize parameter. Change
- all callers. Rewrite completely.
- (_bfd_relocate_contents): Rewrite overflow checking.
- * bfd-in2.h: Rebuild.
-
-1999-04-05 Ian Lance Taylor <ian@zembu.com>
-
- From Gabriel Paubert <paubert@iram.es>:
- * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO,
- R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont.
- Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to
- have a rightshift of 16 and use ppc_elf_addr16_ha_reloc.
- * ppcboot.c (ppcboot_vec): Use little endian routines for
- headers.
+2000-09-27 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (plt_stub): New.
+ (PLT_STUB_ENTRY): Define.
+ (elf32_hppa_link_hash_table): Change multi_subspace to packed
+ boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
+ (elf32_hppa_link_hash_table_create): Init to suit.
+ (elf32_hppa_check_relocs): Set has_12bit_branch and
+ has_17bit_branch as appropriate.
+ (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
+ non-local functions.
+ (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
+ Add space for plt_stub as needed.
+ (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
+ functions at plt_stub.
+ (elf32_hppa_finish_dynamic_sections): Write plt_stub.
+ (elf32_hppa_create_dynamic_sections): Leave .plt executable.
+
+ * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
+ * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
+ of fixed size, and if negative, disable handling of input sections
+ before stub section. Set up default stub group size depending
+ on detected branch relocs.
+ (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
+ ensure different offsets from sym_value aren't rounded to
+ different 2k blocks. Use lrsel and rrsel for other stubs too for
+ consistency rather than necessity.
+ (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
+ (final_link_relocate): Likewise.
+ (elf32_hppa_relocate_section): Likewise.
+
+ * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
+ (_bfd_elf_hppa_gen_reloc_type): Generate them.
+ (elf_hppa_final_link_relocate): Handle them.
+ (elf_hppa_relocate_insn): Likewise.
+ (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
- * elf.c (elfcore_strndup): Only define if it will be used.
- * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel
- and irelend.
- (ppc_elf_check_relocs): Remove unused local i.
- (ppc_elf_gc_mark_hook): Add default case to switch.
+2000-09-26 Hans-Peter Nilsson <hp@axis.com>
- From Bernd Nitzler <nitzler@kagcpd01.ag01.kodak.COM>:
- * srec.c (srec_scan): Accept \r in symbol definitions.
- (srec_object_p): Set HAS_SYMS if we saw any symbols.
- (symbolsrec_object_p): Likewise.
+ * elfcode.h (elf_object_p): Preserve and clear abfd section
+ information. Restore at error.
-1999-04-04 Don Bowman <don@pixsci.com>
+2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
- * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*.
+ * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
+ is empty, make sure that its rva also 0. NT loader dislikes
+ having otherwise.
-1999-04-04 Ian Lance Taylor <ian@zembu.com>
+2000-09-26 Steve Ellcey <sje@cup.hp.com>
- * dwarf1.c (parse_line_table): Remove unused locals last_pc and
- last_line.
- * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare.
- * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to
- switch.
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused
- local i.
- * syms.c (_bfd_stab_section_find_nearest_line): Remove unused
- local val.
+ * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
+ global by default.
-1999-03-31 Nick Clifton <nickc@cygnus.com>
+2000-09-21 Alan Modra <alan@linuxcare.com.au>
- * config.bfd: Add support for arm-epoc-pe target.
- * configure.in: Add support for arm-epoc-pe target.
- * configure: Regenerate.
- * targets.c: Add support for arm-epoc-pe target.
- * coff-arm.c: Allow header files to override definition of
- TARGET_UNDERSCORE and USER_LABEL_PREFIX.
- * pe-arm.h: Allow previous header files to override definition of
- TARGET_LITTLE_SYM and TARGET_BIG_SYM.
- * pei-arm.h: Allow previous header files to override definition of
- TARGET_LITTLE_SYM and TARGET_BIG_SYM.
- * epoc-pe-arm.c: New file. Support arm-epoc-pe target.
- * epoc-pei-arm.c: New file. Support arm-epoc-pei target.
+ * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
+ currently unused RELATIVE_DYNAMIC_RELOCS code.
+ (hppa_discard_copies): Likewise.
+ (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
+ comments. Don't check non-code output sections for stub grouping.
-1999-03-30 Nick Clifton <nickc@cygnus.com>
+2000-09-20 Alan Modra <alan@linuxcare.com.au>
- * elf.c (elf_map_symbols): Handle the case where section
- symbols are generated for content-less sections which are
- not mapped to the output file.
+ * section.c (bfd_get_unique_section_name): Return NULL if
+ bfd_malloc fails.
- * linker.c: Replace direct references to fields in BFD structure
- with accessor macros.
+2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * elflink.h: Replace direct references to fields in BFD structure
- with accessor macros.
+ * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
+ instruction sequence to actually work.
+ (elf_m68k_finish_dynamic_sections): Change the patch-in offset
+ accordingly.
-1999-03-25 Philip Blundell <pb@nexus.co.uk>
+2000-09-18 Alexandre Oliva <aoliva@redhat.com>
- * config.bfd: Eliminate redundancy in checks for Linux/ARM.
+ * elf32-sh.c (sh_elf_relocate_section): Use
+ _bfd_final_link_relocate to apply the relocation against a section
+ symbol, when doing relocatable links.
- * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into
- account when adjusting section symbols during a partial link.
+2000-09-18 Alan Modra <alan@linuxcare.com.au>
-1999-03-24 Nick Clifton <nickc@cygnus.com>
+ * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
+ to id_sec.
+ (stub_hash_newfunc): Here too.
+ (hppa_add_stub): And here.
+ (elf32_hppa_link_hash_table): Remove stub_section_created,
+ reloc_section_created, first_init_sec and first_fini_sec. Add
+ stub_group.
+ (elf32_hppa_link_hash_table_create): Init to suit.
+ (hppa_get_stub_entry): Add support for grouping stub sections.
+ (hppa_add_stub): Likewise. Remove sec_count param and init/fini
+ section code. Index stub vars by section->id.
+ (elf32_hppa_size_stubs): Likewise. Remove duplicated function
+ exit paths. Zap allocation of above removed vars. Refine
+ link-once test.
- * coff-sparc.c (struct coff_reloc_map): Change type of field
- 'bfd_reloc_val' to bfd_reloc_code_real_type.
- * elf-m10200.c (struct mn10200_reloc_map): Ditto.
- * elf-m10300.c (struct mn10300_reloc_map): Ditto.
- * elf32-arc.c (struct arc_reloc_map): Ditto.
- * elf32-d10v.c (struct d10v_reloc_map): Ditto.
- * elf32-d30v.c (struct d30v_reloc_map): Ditto.
- * elf32-fr30.c (struct fr30_reloc_map): Ditto.
- * elf32-m32r.c (struct m32r_reloc_map): Ditto.
- * elf32-sh.c (struct elf_reloc_map): Ditto.
- * elf32-sparc.c (struct elf_reloc_map): Ditto.
- * elf32-v850.c (struct v850_reloc_map): Ditto.
- * elf64-sparc.c (struct elf_reloc_map): Ditto.
- * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto.
- * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto.
+ * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
+ * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
+ (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
+ rather than pointer to bfd_link_info.
+ (hppa_add_stub): Likewise.
+ (final_link_relocate): Likewise.
-1999-03-17 Martin Hunt <hunt@cygnus.com>
+2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
- * syms.c (_bfd_stab_section_find_nearest_line): Changed this
- function so source-level assembly works. If multiple N_SOs
- are seen without and N_FUNs, create an indextable entry with
- a NULL function name.
+ (elf32_hppa_size_stubs): Don't try to build stubs for discarded
+ link-once sections.
-1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
+2000-09-16 Alexandre Oliva <aoliva@redhat.com>
- * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging
- of certian similar cpus.
+ * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
+ ld/emulparams/shelf.sh.
-1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
+2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * elf32-mips.c (_bfd_mips_elf_final_write_processing):
- Add the 5000. Change the architecture for the 5400 to mips4.
- (elf_mips_mach): Add r5000.
+ * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
+ * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
+ * bfd-in2.h: Regenerate.
-1999-03-11 Doug Evans <devans@casey.cygnus.com>
+2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
+
+ * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
+ LITUSE relocations incorrectly if -relax is specified on the ld
+ command line and the displacement field of the load or store
+ instruction is non-zero. (Patch by paul.winalski@compaq.com)
+
+2000-09-15 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
+ first_fini_sec here.
+ (elf32_hppa_size_stubs): Instead correctly find the first .init
+ and .fini section here.
+
+2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
+
+ * elf32-hppa.c (clobber_millicode_symbols): New function.
+ (elf32_hppa_size_dynamic_sections): Call it.
+
+2000-09-14 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
+ packed. Add plabel, plt_abs packed booleans.
+ (hppa_link_hash_newfunc): Init new fields.
+ (PLABEL_PLT_ENTRY_SIZE): Define.
+ (hppa_stub_name): Use size_t len vars.
+ (hppa_add_stub): Likewise.
+ (elf32_hppa_build_stubs): Likewise.
+ (hppa_build_one_stub): Kill some compiler warnings.
+ (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
+ if dynamic linking. Munge the local plt offsets into
+ local_got_refcounts. Set h->plabel for all global PLABELs. Use
+ size_t len vars. Add assert for plabel addend.
+ (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
+ (elf32_hppa_hide_symbol): New function.
+ (elf_backend_hide_symbol): Define.
+ (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
+ with h->plabel set. Don't make plt entries to have dynamic syms
+ when they have been forced local. If plt entry is used by a
+ plabel, make it PLABEL_PLT_ENTRY_SIZE.
+ (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
+ Set up .plt offsets for local syms.
+ (elf32_hppa_relocate_section): Initialise plt entries for local
+ syms. Leave weak undefined plabels zero. Make global plabel
+ relocs against function symbol, and leave the addend zero.
+ Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
+ (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
+ non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
+ relocs instead of SEGREL32 for dynamic got relocs.
+ (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
+ (elf_backend_got_header_size): Adjust.
+ (elf32_hppa_set_gp): Calculate an "ideal" LTP.
+
+ * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
+ (hppa_type_of_stub): Use it instead of #if 0
+ (hppa_discard_copies): Use it here too.
+ (elf32_hppa_size_dynamic_sections): And here.
+
+ * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
+ (elf32_hppa_link_hash_table_create): And here.
+ (hppa_build_one_stub): And here. Instead keep track of stub
+ offset using _raw_size.
+ (elf32_hppa_size_stubs): Likewise.
+ (elf32_hppa_build_stubs): Likewise.
+ (hppa_size_one_stub): Likewise. Resize reloc section too.
+
+ * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
+ first_fini_sec handling. Don't search for reloc section or set
+ hplink->reloc_section_created here.
+ (elf32_hppa_size_stubs): Instead search for reloc sections, and
+ set reloc_section_created here.
+ (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
+ (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
+ and DT_FINI.
+ (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
+
+ * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
+ with `hplink->root.'.
+ (elf32_hppa_check_relocs): Likewise.
+ (elf32_hppa_gc_sweep_hook): Likewise.
+ (elf32_hppa_adjust_dynamic_symbol): Likewise.
+ (hppa_handle_PIC_calls): Likewise.
+ (elf32_hppa_size_dynamic_sections): Likewise.
+ (elf32_hppa_set_gp): Likewise.
+ (elf32_hppa_relocate_section): Likewise.
+ (elf32_hppa_finish_dynamic_symbol): Likewise.
+ (elf32_hppa_finish_dynamic_sections): Likewise.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
+ defined weak symbols in shared links.
+ (final_link_relocate): Calls to defined weak symbols in shared
+ objects must go via import stubs, as the target might not be known
+ at link time.
+
+2000-09-14 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
+ R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
+ R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
+ the original entries with EMPTY_HOWTOs, and added new ones to fill
+ in the gap.
+ (sh_elf_info_to_howto): Make sure the new gap isn't used.
+ (sh_elf_relocate_section): Likewise.
+
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
+
+ * cpu-mips.c (arch_info_struct): Add mips:4K
+ * bfd-in2.h (bfd_mach_mips4K): New define.
+ * archures.c: Add bfd_mach_mips4K to comment.
+ * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
+ E_MIPS_ARCH_2 for bfd_mach_mips4K.
+
+2000-09-13 Marco Franzen <marcof@thyron.com>
+
+ * som.c (som_write_symbol_strings): Do not used fixed buffers,
+ use size_t as a counter.
+ (som_write_space_strings): Similarly.
+
+2000-09-12 Jason Eckhardt <jle@cygnus.com>
+
+ * elf32-i860.c (elf32_i860_relocate_pc26): New function
+ and prototype.
+ (elf32_i860_relocate_section): Invoke new function from here.
+
+2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
+ static.
+
+2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
+ target section name instead of dumping core when the target symbol is
+ undefined.
+
+2000-09-09 Kazu Hirata <kazu@hxi.com>
+
+ * riscix.c: Remove DEFUN.
+
+2000-09-08 Nick Clifton <nickc@redhat.com>
- * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb.
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
+ initialise flags in output bfd if the input bfd is the default
+ architecture with the default flags.
-1999-03-11 Nick Clifton <nickc@cygnus.com>
+2000-09-08 Kazu Hirata <kazu@hxi.com>
- * binary.c (binary_set_section_contents): Generate warning about
- huge file offsets for any section that will occupy file space, not
- just those that are loadable.
+ * archive.c: Fix formatting.
+ * coff-arm.c: Likewise.
+ * doc/chew.c: Likewise.
-1999-02-24 Jim Blandy <jimb@zwingli.cygnus.com>
+2000-09-08 Alan Modra <alan@linuxcare.com.au>
- * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes.
+ * section.c (bfd_get_unique_section_name): Put a dot before the
+ numeric suffix.
-1999-02-22 Jim Lemke <jlemke@cygnus.com>
+2000-09-07 Kazu Hirata <kazu@hxi.com>
- * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0.
+ * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
+ * elf.c: Fix formatting.
-Mon Feb 22 18:26:51 1999 Ian Lance Taylor <ian@cygnus.com>
+2000-09-07 Alexandre Oliva <aoliva@redhat.com>
- * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define.
- * elflink.h: Revert all changes since Feb 16. Instead:
- (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if
- appropriate. Copy it to version symbols.
- (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF
- symbols if appropriate.
- (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef
- symbol if appropriate.
- (elf_link_output_extsym): If symbol is marked as undefined, and
- has no nonweak references, mark it as weak undefined.
+ * config.bfd (sh-*-linux*): Added.
+ * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
+ * targets.c: Declare them.
+ * elf32-sh-lin.c: New file.
+ * Makefile.am: Compile it.
+ * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
+ * configure, Makefile.in: Rebuilt.
-Fri Feb 19 16:01:12 1999 Ian Lance Taylor <ian@cygnus.com>
+2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
- * elflink.h (elf_merge_symbol): When overriding a dynamic
- definition with a weak undefined symbol, set NEEDS_PLT if it is a
- function.
- (elf_link_add_object_symbols): Don't copy the other field if we
- are overridding.
+ * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
+ pseduo-section when determining where the TOC ends.
-Thu Feb 18 18:07:43 1999 Ian Lance Taylor <ian@cygnus.com>
+ * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
+ output x_tvndx as it is only two bytes wide.
- * elflink.h (elf_merge_symbol): Do not merge any symbol from a
- shared object with a weak undefined symbol.
+ * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
+ reloc is 26 or 32 bits wide.
-1999-02-18 Nick Clifton <nickc@cygnus.com>
+ * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
+ for relocs that don't change anything. Also look at the full
+ 6 bits of bitsize.
- * elfarm-nabi.c: Set partial_inplace back to false.
+2000-09-06 Philip Blundell <philb@gnu.org>
-1999-02-17 Nick Clifton <nickc@cygnus.com>
+ * config.bfd (arm*-*-uclinux*): New target.
- * coff-arm.c (TARGET_UNDERSCORE): Re-enable.
- (USER_LABEL_PREFIX): Set to "_".
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
- The following patches are from: Scott Bambrough
- <scottb@corelcomputer.com>
+ * configure: Rebuilt with new libtool.m4.
- * libaout.h (M_ARM6_NETBSD): Set to 143.
+2000-09-06 Alan Modra <alan@linuxcare.com.au>
- * reloc.c: Add ARM PIC relocs: BFD_RELOC_ARM_GOT12,
- BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY,
- BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32,
- BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC.
+ * section.c (bfd_get_unique_section_name): Avoid c++ reserved
+ word for variable name.
* bfd-in2.h: Regenerate.
- * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to
- 'true' as REL relocs are now being used. Add new PIC relocs:
- R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE,
- R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32.
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order
- of targets.
- (elf32_arm_final_link_relocate): Change parameters so that entire
- reloc is passed. Add support for PIC relocs.
- (elf32_arm_relocate_section): Pass entire reloc to
- elf32_arm_final_link_relocate.
- (elf32_arm_check_relocs): Handle new PIC relocs.
- (elf32_arm_adjust_dynamic_symbol): New function.
- (elf32_arm_size_dynamic_sections): New function.
- (elf32_arm_discard_copies): New function.
- (elf32_arm_finish_dynamic_symbol): New function.
- (elf32_arm_finish_dynamic_sections): New function.
- (ELF_MAXPAGE_SIZE): Define.
- (bfd_elf32_bfd_reloc_type_lookup): Define.
- (elf_backend_relocate_section): Define.
- (elf_backend_adjust_dynamic_symbol): Define.
- (elf_backend_create_dynamic_sections): Define.
+2000-09-05 Nick Clifton <nickc@redhat.com>
+
+ * config.in: Regenerate.
+ * libbfd.h: Regenerate.
+ * po/bfd.pot: Regenerate.
+ * doc/bfdint.texi: Remove CVS date string - it foils compares with
+ local versions.
+
+2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
+
+ * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ Shared library and PIC support.
+ * elf32-hppa.c (PLT_ENTRY_SIZE): New.
+ (GOT_ENTRY_SIZE): New.
+ (ELF_DYNAMIC_INTERPRETER): New.
+ (STUB_SUFFIX): Define.
+ (LONG_BRANCH_PIC_IN_SHLIB): Define.
+ (RELATIVE_DYNAMIC_RELOCS): Define.
+ (enum elf32_hppa_stub_type): New.
+ (struct elf32_hppa_stub_hash_entry): Rename offset to
+ stub_offset. Add a number of new fields.
+ (struct elf32_hppa_link_hash_entry): New.
+ (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
+ global_value.
+ (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
+ (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
+ (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
+ new fields.
+ (hppa_link_hash_newfunc): New function.
+ (elf32_hppa_link_hash_table_create): Use above function. Init new
+ fields.
+ (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
+ instead of addend, and remove sym_name from args. Don't use
+ symbol name for local syms, instead use sym index.
+ (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
+ stub type rather than size. Pass in hash and handle import stub
+ case. Also pass in reloc instead of offset so we can calculate
+ PCREL22F and PCREL12F branches properly.
+ (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
+ import and export stubs too.
+ (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
+ import and export stub sizing.
+ (elf32_hppa_check_relocs): New function.
+ (elf32_hppa_adjust_dynamic_symbol): New function.
+ (hppa_discard_copies): New function.
+ (elf32_hppa_size_dynamic_sections): New function.
+ (elf_backend_size_dynamic_sections): Define.
+ (elf32_hppa_finish_dynamic_symbol): New function.
(elf_backend_finish_dynamic_symbol): Define.
+ (elf32_hppa_size_stubs): Stash params in link hash table, and move
+ some local vars into the link hash table too. For shared links,
+ trundle over function syms, generating export stubs. Handle
+ PCREL22F branches. Break out stub creation code from here..
+ (hppa_add_stub): .. to here. New function.
+ (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
+ call the bfd linker. Use elf_gp to record global pointer.
+ Calculate a value from sections if $global$ is missing.
+ (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
+ (elf32_hppa_gc_mark_hook): New function.
+ (elf_backend_gc_mark_hook): Define.
+ (elf32_hppa_gc_sweep_hook): New function.
+ (elf_backend_gc_sweep_hook): Define.
+ (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
+ Add rel to args, and remove howto, input_bfd, offset, addend,
+ sym_name as we can recalculate these locally. Handle calls to
+ dynamic objects, extra PIC relocs, PCREL22F branches. Change
+ handling of undefined weak syms. Check that stubs are in range.
+ Only look for import stubs on PCREL17F and PCREL22F relocs. Add
+ message on hitting a DPREL21L reloc that needs fixing. Subtract
+ off PC for PCREL14F. Break out code that does a stub lookup from
+ here..
+ (hppa_get_stub_entry): ..to here. New function.
+ (elf32_hppa_relocate_insn): Merge into final_link_relocate.
+ (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
+ relocs, etc. etc.
+ (elf32_hppa_finish_dynamic_sections): New function.
(elf_backend_finish_dynamic_sections): Define.
- (elf_backend_size_dynamic_sections): Define.
- (elf_backend_plt_readonly): Define.
+ (elf_backend_final_write_processing) Define.
+ (hppa_handle_PIC_calls): New function.
+ (elf32_hppa_build_stubs): Call it. Pass link_info to
+ hppa_build_one_stub.
+ (elf32_hppa_create_dynamic_sections): New function
+ to create .plt and .got then set .plt flags correctly.
+ (elf_backend_create_dynamic_sections): Define.
+ (elf32_hppa_object_p): New function.
+ (elf_backend_object_p): Define.
+ (elf32_hppa_elf_get_symbol_type): New function.
+ (elf_backend_get_symbol_type): Define.
+ (elf_backend_can_gc_sections): Define.
(elf_backend_want_got_plt): Define.
+ (elf_backend_plt_alignment): Set to 2.
+ (elf_backend_plt_readonly): Define.
(elf_backend_want_plt_sym): Define.
+ (elf_backend_got_header_size): Reserve one entry.
-Wed Feb 17 12:02:26 1999 Stan Cox <scox@cygnus.com>
-
- * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo
- sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE.
- (_bfd_mips_elf_fake_sections): Likewise.
-
-Wed Feb 17 12:07:23 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections,
- bfd_elf32_arm_get_bfd_for_interworking,
- bfd_elf32_arm_process_before_allocation): Define to avoid clash
- with elfarm-nabi.c.
-
- * elf32-arm.h: Don't declare elf32_arm_info_to_howto.
- (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
- elf32_arm_find_nearest_line): Make them static.
+ * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
+ (elf32_hppa_size_stubs): Pass in multi_subspace.
+ (elf32_hppa_set_gp): Declare.
-Tue Feb 16 22:44:37 1999 Ian Lance Taylor <ian@cygnus.com>
+ * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
+ (bfd_get_unique_section_name): New function.
+ * bfd_in2.h: Regenerate.
- * elflink.h (elf_merge_symbol): Add pflags parameter. Change all
- callers. Do not merge a definition from a shared object with a
- weak undefined symbol.
- (elf_link_add_object_symbols): Do not change the symbol type or
- size if the old symbol overrides the new one.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
+ (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
+ comment.
-1999-02-08 Nick Clifton <nickc@cygnus.com>
-
- * config.bfd: Add support for strongarm target.
-
-Mon Feb 8 11:18:14 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * elf32-m68k.c (reloc_map): Use the correct types for the struct
- fields instead of unsigned char.
-
-Fri Feb 5 00:22:36 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
-
-Thu Feb 4 22:30:13 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Change AC_PREREQ to 2.13. Remove AM_CYGWIN32.
- Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to
- AC_PROG_INSTALL. Add comments to uses of AC_DEFINE.
- * acinclude.m4: Add comments to uses of AC_DEFINE.
- * acconfig.h: Remove.
- * configure: Rebuild with current autoconf/automake.
- * aclocal.m4: Likewise.
- * config.in: Likewise.
- * Makefile.in: Likewise.
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
+ (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
+ (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
+ been updated in finish_dynamic_symbol before modifying function
+ symbol.
-1999-02-04 DJ Delorie <dj@cygnus.com>
+ * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
+ eight entries. Replace NULL with bfd_elf_generic_reloc. Add
+ R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
+ (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
+ comments. Handle format == 12 for R_HPPA_PCREL_CALL.
+ (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
+ (elf_hppa_relocate_insn): Likewise. Reformat some comments.
+ (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
- * libbfd.c (real_read): don't call fread for zero bytes. This
- covers up a bug (or misuse of bfd) that's exposed by Solaris.
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
+ style of local labels as well.
-Thu Feb 4 12:38:10 1999 Stan Cox <scox@cygnus.com>
+2000-09-03 Philip Blundell <philb@gnu.org>
- * elf32-mips.c (mips_elf_relocate_section): Insure that the target
- of a jump is in the current 256 MB region.
+ * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
+ references to undefined symbols in debugging sections.
-Thu Feb 4 12:15:38 1999 Ian Lance Taylor <ian@cygnus.com>
+2000-09-02 H.J. Lu <hjl@gnu.org>
- * format.c (bfd_check_format_matches): Change last patch to only
- take effect for the binary target.
+ * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
+ BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
+ BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
+ section.
-Wed Feb 3 19:40:12 1999 Ian Lance Taylor <ian@cygnus.com>
+2000-09-02 Jason Eckhardt <jle@cygnus.com>
- * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR.
+ * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
+ (elf32_i860_is_local_label_name): New function and prototype.
-Wed Feb 3 15:02:44 1999 Catherine Moore <clm@cygnus.com>
+2000-09-02 Nick Clifton <nickc@redhat.com>
- * elf32-fr30.c (fr30_elf_check_relocs): New routine.
+ * configure.in: Increase version number to 2.10.91.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/bfd.pot: Regenerate.
-Tue Feb 2 21:38:28 1999 Ian Lance Taylor <ian@cygnus.com>
+2000-09-02 Daniel Berlin <dberlin@redhat.com>
- * format.c (bfd_check_format_matches): If the target was
- previously specified, don't check other targets when checking for
- an archive file.
+ * elf.c (_bfd_elf_make_section_from_shdr): Add
+ .gnu.linkobce.wi. to the list of debug section names.
-Tue Feb 2 18:16:43 1999 Catherine Moore <clm@cygnus.com>
+2000-09-02 Nick Clifton <nickc@redhat.com>
- * elf32-arm.h (elf32_arm_reloc_map): Removed.
- (elf32_arm_reloc_type_lookup): Removed
- * elfarm-nabi.c (elf32_arm_reloc_map): New.
- (elf32_arm_reloc_type_lookup): New.
- * elfarm-oabi.c (elf32_arm_reloc_map): New.
- (elf32_arm_reloc_type_lookup): New.
+ * dwarf2.c (find_debug_info): New function: Locate a section
+ containing dwarf2 debug information.
+ (bfd_dwarf2_find_nearest_line): Find all sections containing
+ debug information and include them in the stash.
-Mon Feb 1 19:49:21 1999 Catherine Moore <clm@cygnus.com>
+2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
- * elfarm-nabi.c: Renamed from elf32-arm-newabi.c.
- * elfarm-oabi.c: Renamed from elf32-arm-oldabi.c
- * Makefile.am: Use new files.
- * Makefile.in: Regenerate.
- * configure.in: Use new files.
- * configure: Regenerate.
+ * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
+ R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
+ (sh_reloc_map): Add new relocs.
+ (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
+ sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
+ sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
+ sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
+ functions.
+ (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
+ (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
+ elf_sh_plt_entry_be, elf_sh_plt_entry_le,
+ elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
+ New array constants.
+ (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
+ New variables.
+ (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
+ elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
+ elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
+ elf_sh_plt_reloc_offset): Define.
+ (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
+ elf_sh_link_hash_table): New structs.
+ (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
+ (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
+ relocation types.
+ (elf_backend_create_dynamic_sections,
+ bfd_elf32_bfd_link_hash_table_create,
+ elf_backend_adjust_dynamic_symbol,
+ elf_backend_size_dynamic_sections,
+ elf_backend_finish_dynamic_symbol,
+ elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
+ elf_backend_plt_readonly, elf_backend_want_plt_sym,
+ elf_backend_got_header_size, elf_backend_plt_header_size):
+ Define.
+ * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
+ BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
+ New relocs.
+ * bfd-in2.h, libbfd.h: Rebuilt.
-1999-02-01 Nick Clifton <nickc@cygnus.com>
+2000-09-01 Alan Modra <alan@linuxcare.com.au>
- * elf32-fr30.c (fr30_elf_gc_mark_hook): New function.
- (fr30_elf_gc_sweep_hook): New function.
- (elf_backend_can_gc_sections): Define.
+ * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
+ change.
-Mon Feb 1 12:21:47 1999 Catherine Moore <clm@cygnus.com>
+2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
- * targets.c (bfd_target_vector): Add bfd_elf32_littlearm_oabi_vec
- and bfd_elf32_bigarm_oabi_vec.
+ * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
+ not initialized, set them to indicate the SH1 instruction set.
-Mon Feb 1 11:46:31 1999 Catherine Moore <clm@cygnus.com>
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
- * Makefile.am (elf32-arm-oldabi.lo): New.
- (elf32-arm-newabi.lo): New.
- * Makefile.in: Regenerate.
- * config.bfd (thumb-*-elf): Remove definition of targ_underscore.
- (arm-*-elf): Likewise.
- (arm-*-oabi): New.
- (thumb-*-oabi): New.
- * configure: Regenerate.
- * configure.in (bfd_elf32_littlearm_oabi_vec): New.
- (bfd_elf32_bigarm_oabi_vec): New.
- * elf32-arm-newabi.c: New.
- * elf32-arm-oldabi.c: New.
- * elf32-arm.c: Removed.
- * elf32-arm.h: New.
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
-Mon Feb 1 11:52:12 1999 Frank Ch. Eigler <fche@cygnus.com>
+2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
- * binary.c (binary_set_section_contents): Omit warnings for
- unloadable sections.
+ * elf.c: Eliminate references to __sparcv9 macro; replace with
+ autoconf variables HAVE_PSINFO32_T etc.
+ * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
+ HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
+ * config.in: Ditto.
+ * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
+ detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
+ * aclocal.m4: Ditto.
+ * configure: Regenerate.
-1999-01-31 Michael Meissner <meissner@cygnus.com>
+2000-08-27 Alan Modra <alan@linuxcare.com.au>
- * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to
- powerpc{,le}-*-eabi.
+ * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
+ for any shared link, not just shared -Bsymbolic.
+ (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
+ any shared link, and pass link info to it.
+ (elf_i386_size_dynamic_sections): Update comment.
+ (elf_i386_discard_copies): Modify to discard relocs for symbols
+ that have been forced local.
+ (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
+ that have been forced local.
-1999-01-29 Nick Clifton <nickc@cygnus.com>
+2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
- * dwarf2.c (read_unsigned_leb128): Remove unused variables.
- * dwarf2.c (read_signed_leb128): Remove unused variables.
+ * elflink.h (elf_link_add_object_symbols): Allow common
+ symbols to have an alignment of 1 if explicitly requested, and
+ not overridden by other definitions.
-Fri Jan 29 00:47:21 1999 H.J. Lu <hjl@gnu.org>
+2000-08-22 Doug Kwan <dkwan@transmeta.com>
- * elf.c (assign_file_positions_for_segments): Only adjust
- p_align when needed.
+ * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
+ * coffcode.h (coff_set_flags): Add detection of w65 architecture.
-Thu Jan 28 20:05:22 1999 Ian Lance Taylor <ian@cygnus.com>
+2000-08-22 H.J. Lu <hjl@gnu.org>
- * binary.c (binary_set_section_contents): Don't return early for a
- non-loadable section, in case the first section is non-loadable.
- Don't set the low lma for a SEC_NEVER_LOAD section. From Maciej
- W. Rozycki <macro@ds2.pg.gda.pl>.
+ * elf-bfd.h (elf_link_hash_table): Add runpath.
-1999-01-28 Nick Clifton <nickc@cygnus.com>
+ * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
+ * bfd-in2.h: Rebuilt.
- * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and
- R_FR30_GNU_VTENTRY relocs.
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize the
+ "runpath" field to NULL.
+ (bfd_elf_get_runpath_list): New function.
-Thu Jan 28 11:08:16 1999 Catherine Moore <clm@cygnus.com>
+ * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
+ DT_RUNPATH entries.
- * elflink.h (elf_link_output_sym): Zero syms which are
- part of sections which have been excluded.
+2000-08-22 Alexandre Oliva <aoliva@redhat.com>
-Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
+ * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
+ R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
+ explicitly. Improve validation of r_type.
- * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC
- to F_PIC_INT.
- * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and
- F_ARM_3M labels. Changed F_PIC to F_PIC_INT.
+2000-08-21 H.J. Lu <hjl@gnu.org>
-1999-01-27 Nick Clifton <nickc@cygnus.com>
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
+ dynamic allocated content space. Add a comment to remind us that
+ one day this ought to be fixed.
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
+ * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
- * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48
- relocation.
- (fr30_final_link_relocate): Use computed value as result of
- relocation.
+2000-08-21 Jason Eckhardt <jle@cygnus.com>
-1999-01-26 Frank Ch. Eigler <fche@cygnus.com>
+ * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
+ field with the newly relocated value instead of adding it to the
+ existing immediate field.
+ (elf32_i860_relocate_splitn): Likewise.
+ (elf32_i860_relocate_highadj): Likewise.
- * binary.c (binary_set_section_contents): Emit warning for
- huge file offsets due to widely-dispersed section LMAs.
+2000-08-16 Jason Eckhardt <jle@cygnus.com>
-Mon Jan 18 03:35:35 1999 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
+ was previously just a stub).
- * elf.c (assign_file_positions_for_segments): If not D_PAGED,
- align first section to largest section alignment, not first
- section alignment.
+2000-08-16 Alexandre Oliva <aoliva@redhat.com>
-1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
+ * elflink.c (_bfd_elf_create_got_section): Don't abort().
+ Formatting fixes.
+ (_bfd_elf_create_dynamic_sections): Likewise.
- * configure.in: Require autoconf 2.12.1 or higher.
+2000-08-16 Andrew Macleod <amacleod@cygnus.com>
-Tue Dec 22 15:21:41 1998 Catherine Moore <clm@cygnus.com>
+ * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
+ for undefined symbols to be the beginning of the section.
- * archures.c (bfd_mach_i386_i386_intel_syntax): Define.
- * bfd-in2.h: Likewise.
- * cpu-i386.c (bfd_i386_arch_intel_syntax): New.
+ * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
+ four extra entries at the beginning of the .rela.plt section.
+ (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
+ section to account for the four reserved entries in the .plt section.
-1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
+2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
- * archures.c,bfd-in2.h (bfd_mach_mips4111): New.
- * cpu-mips.c: Add support for and independent 4111.
- * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111.
- (_bfd_mips_elf_final_write_processing):
- bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111.
+ * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
+ to the list of NOPs we recognize after a branch-and-link.
+ Use the ori NOP when one is needed.
-1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
+ * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
+ for large archives.
- * elf32-mips.c (elf_mips_abi_name): New.
- (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.
+2000-08-14 Jim Wilson <wilson@cygnus.com>
-1998-12-12 Gavin Romig-Koch <gavin@cygnus.com>
+ * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
+ EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
+ (elf64_ia64_print_private_bfd_data): Likewise. Also handle
+ EF_IA_64_ABSOLUTE.
- * elf32-mips.c (_bfd_mips_elf_final_write_processing):
- Handle bfd_mach_mips4300.
+2000-08-11 Alexandre Oliva <aoliva@redhat.com>
-1998-12-11 Ulrich Drepper <drepper@cygnus.com>
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
- * elf32-i386.c: Remove leaked development code from patch
- 1998-12-10 by Richard Henderson.
+2000-08-10 Jason Eckhardt <jle@cygnus.com>
-1998-12-10 Richard Henderson <rth@cygnus.com>
+ * elf32-i860.c (elf32_i860_relocate_section): New function.
+ (i860_final_link_relocate): New function.
+ (elf32_i860_relocate_splitn): New function.
+ (elf32_i860_relocate_pc16): New function.
+ (elf32_i860_relocate_highadj): New function.
+ (elf32_i860_howto): Minor adjustments to some relocations.
+ (elf_info_to_howto_rel): Define.
+ (elf_backend_relocate_section): Define.
- * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
- in debug sections for symbol defined externally.
+2000-08-10 Nick Clifton <nickc@cygnus.com>
-Thu Dec 10 10:58:38 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+ * elf32-arm.h: Fix formatting.
- * targets.c (bfd_target_vector): Remove duplicate entry for
- tekhex_vec.
+2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
-1998-12-09 Nick Clifton <nickc@cygnus.com>
+ * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
- * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0
- since we are using RELAs.
+2000-08-08 Jason Eckhardt <jle@cygnus.com>
-Tue Dec 8 22:15:48 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
- SCO Open Server Release 5 core file support, from Jouke Numan
- <jnuman@hiscom.nl>:
- * sco5-core.c: New file.
- * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo.
- (sco5-core.lo): Define SCO5_CORE in COREFLAG.
- * Makefile.am: Rebuild dependencies.
- (OPTIONAL_BACKENDS): Add sco5-core.lo.
- (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c.
- * bfd.c (struct _bfd): Add sco5_core_data field to tdata.
- * targets.c (sco5_core_vec): Add to target list if SCO5_CORE.
- * bfd-in2.h, configure, Makefile.in: Rebuild.
-
-Tue Dec 8 19:38:42 1998 Mark Klein <mklein@dis.com>
-
- * config.bfd (hppa*-*-mpeix*): New target.
- * configure.in: Add AC_HEADER_DIRENT.
- (hppa*-*-mpeix*): New target.
- * configure.host (hppa*-*-mpeix*): New host.
- * hpux-core.c: Check HOST_HPPAMPEIX. Use HAVE_DIRENT_H and
- friends rather than just including <sys/dir.h>.
- * som.h (struct som_symbol): Add hppa_priv_level and apto
- tc_data. Change all users.
- (struct somdata): Add comp_unit field.
- (obj_som_compilation_unit): Define.
- (bfd_som_attach_compilation_unix): Declare.
- * som.c: Check HOST_HPPAMPEIX.
- (struct som_misc_symbol_info): Add new field priv_level.
- (som_object_setup): Add current_offset parameter. Change all
- callers.
- (setup_sections): Likewise.
- (som_object_p): For EXECLIBMAGIC, read the lst header.
- (som_write_symbol_strings): Add compilation_unit parameter.
- Change all callers.
- (som_finish_writing): Write out compilation_unit.
- (som_bfd_derive_misc_symbol_info): Set priv_level.
- (som_build_and_write_symbol_table): Set xleast field to 3.
- (som_slurp_symbol_table): Set symbol priv_level.
- (bfd_som_attach_compilation_unit): New function.
- (som_bfd_ar_write_symbol_stuff): Set xleast field to 3. Set
- priv_level into symbol_value.
- * configure, config.in: Rebuild.
-
-Tue Dec 8 16:21:35 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent
- warning function to call _bfd_error_handler instead.
-
- * libbfd.c (COERCE32): Cast through unsigned long and long to
- avoid bug in old version of gcc.
-
- * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove.
- (elf_backend_additional_program_headers): Don't define.
-
-1998-12-08 Nick Clifton <nickc@cygnus.com>
-
- * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative
- relocations to include offset of 2 included in the insns, and the
- offset of the relocs within the section.
-
-Wed Dec 2 15:03:59 1998 David Taylor <taylor@texas.cygnus.com>
-
- The following changes were made by David Taylor
- <taylor@texas.cygnus.com>, Edith Epstein
- <eepstein@sophia.cygnus.com>, Jim Blandy
- <jimb@zwingli.cygnus.com>, and Elena Zannoni
- <ezannoni@kwikemart.cygnus.com> as part of the project to merge in
- changes originally made by HP; HP did not create ChangeLog
- entries.
+2000-08-07 Kazu Hirata <kazu@hxi.com>
- * aclocal.m4, configure, Makefile.in: Rebuilt using latest
- automake macro library.
-
- * hpux-core.c (hpux_core_core_file_p): this function now
- understands HPUX 10.30 thread info. Yes, the thread stacks can be
- found in the corefile! Also, in hpux_core_core_file_p, if we
- encounter a section with an unknown type, don't punt. Instead,
- just skip it. Also, count the number of sections of known type
- that we encounter. If we encounter at least one good one, then
- we'll declare that the file is a core file. If we encounter any
- unknown ones but some known ones, then we'll issue a warning (but
- still declare it to be a core file). Also, correctly decide when a
- file is not a core.
- (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined.
- (CORE_ANON_SHMEM): define if not defined.
- (hpux_core_struct): add members lwpid and user_tid.
- (core_kernel_thread_id, core_user_thread_id): new macros.
- (make_bfd_asection): use bfd_alloc to allocate room for a copy of
- the name before storing it in the bfd.
- (hpux_core_core_file_p): handle threads.
-
- * libhppa.h (GET_FIELD): protect against redefinition.
- (HPPA_WIDE): define.
- (GET_FIELD): define.
- (GET_BIT): define.
- (MASK): define.
- (CATENATE): define.
- (ELEVEN): define.
- (sign_extend): redefine.
- (assemble_6): define.
- (assemble_12): rewrite.
- (assemble_16): define.
- (assemble_16a): define.
- (assemble_17): rewrite.
- (assemble_22): define.
-
-1998-12-07 Nick Clifton <nickc@cygnus.com>
-
- * elf32-fr30.c (fr30_final_link_relocate): Using signed
- relocations for signed values.
-
-Sun Dec 6 16:30:33 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * mipsbsd.c (MY(set_arch_mach)): Make static.
- * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use
- bfd_mach_mips* macros rather than simple numbers.
-
- COFF weak symbol support, based on patches from Mark Elbrecht
- <snowball3@usa.net>:
- * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT.
- * coffgen.c (coff_renumber_symbols): Handle weak symbols.
- (coff_write_alien_symbol): Likewise.
- * cofflink.c (coff_link_check_ar_symbols): Likewise.
- (coff_link_add_symbols): Likewise.
- (_bfd_coff_link_input_bfd): Likewise.
- (_bfd_coff_write_global_sym): Likewise.
-
- * elf.c (copy_private_bfd_data): Always initialize the
- includes_phdrs field.
-
- * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
- file defines a symbol first mentioned in an ELF file.
-
- * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
- possible, rather than only if BFD64.
- * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
- not __GNUC__.
- * bfd-in2.h: Rebuild.
+ * ieee.c (ieee_write_debug_part): Rewrite a comment.
+ * elf64-ia64.c: Fix a typo.
- * srec.c (srec_set_section_contents): Correct test to avoid
- switching to 4 byte addresses after seeing a second section which
- requires 3 byte addresses. From Joel Schantz
- <joel.schantz@argosys.boeing.com>.
+2000-08-05 Jason Eckhardt <jle@cygnus.com>
- * config.bfd (m68*-*-gnu*): New target. From Aymeric Vincent
- <aymeric.vincent@emi.u-bordeaux.fr>.
+ * elf32-i860 (elf32_i860_howto_table): New structure.
+ (lookup_howto): New function.
+ (elf32_i860_reloc_type_lookup): New function.
+ (elf32_i860_info_to_howto_rela): New function.
+ (elf_code_to_howto_index): New structure.
+ (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
+ (bfd_elf32_bfd_reloc_type_lookup): Re-define as
+ elf32_i860_reloc_type_lookup.
-1998-12-04 Jim Blandy <jimb@zwingli.cygnus.com>
+2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
- * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to
- decide whether the output file is -mrelocatable-lib,
- -mrelocatable, or neither. (gdb.base/nodebug.exp)
+ * som.c (struct fixup_format): Constify `format'.
+ (som_hppa_howto_table): Use SOM_HOWTO macro.
+ (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
+ (som_bfd_reloc_type_lookup): Likewise.
+ (compare_subspaces): Remove unused `count1', `count2'.
+ (som_begin_writing): Remove unused `total_reloc_size'.
+ (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
+ (som_print_symbol, som_bfd_is_local_label_name): Likewise.
+ (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
+ (som_find_nearest_line): Decorate unused parameter(s).
+ (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
+ (som_bfd_link_split_section): Likewise.
-1998-12-03 Nick Clifton <nickc@cygnus.com>
+2000-08-03 Nick Clifton <nickc@cygnus.com>
- * elf32-fr30.c: Add support for R_FR30_48 reloc.
- * reloc.c: Add BFD_RELOC_FR30_48 relocation.
+ * section.c: Restore backed out code.
+ * elf.c: Restore backed out code.
+ (copy_private_bfd_data): Fix bug preventing stipped dynamic
+ binaries from working.
* bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate
-
-Wed Dec 2 00:58:37 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
- link against a dynamic symbol with no type or size.
-1998-12-01 Ulrich Drepper <drepper@cygnus.com>
+2000-08-03 H.J. Lu <hjl@gnu.org>
- * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit
- relocation for section which does not get loaded.
- (elf_i386_relocate_section) [R_386_32]: Likewise.
+ * section.c: Back out the change made by Nick Clifton
+ <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
+ binaries.
+ * bfd-in2.h: Likewise.
+ * elf.c: Likewise.
-Tue Dec 1 11:33:33 1998 Jim Wilson <wilson@cygnus.com>
+2000-08-03 Alexandre Oliva <aoliva@redhat.com>
- * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size,
- reloc_count and i long instead of unsigned long. Handle error
- return from bfd_canonicalize_reloc.
+ * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
-1998-12-01 Nick Clifton <nickc@cygnus.com>
+2000-07-31 Jason Eckhardt <jle@cygnus.com>
- * elf32-v850.c (v850_elf_relocate_section): Detect the absence of
- a hash table.
+ * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
+ * bfd-in2.h, libbfd.h: Regenerate.
-Mon Nov 30 15:28:09 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+2000-07-31 Nick Clifton <nickc@cygnus.com>
- * elf32-sh.c (elf/sh.h): Include.
- sh_reloc_type: Delete. Changed all references to elf_sh_reloc_type.
- (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8.
- (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8.
- (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
- * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h.
+ * section.c (struct sec): Add new boolean field 'segment_mark'.
+ (STD_SECTION): Initialise new field to zero.
-Fri Nov 27 17:51:38 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * elflink.h (compute_bucket_count): Don't allow minsize==0, it
- causes division by zero later on.
-
-Thu Nov 26 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
-
- * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
- needed.
-
-1998-11-25 DJ Delorie <dj@cygnus.com>
-
- * coff-i386.c (i3coff_object_p): Remove hack. Use new emulation
- hook now.
-
-Tue Nov 24 10:25:27 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf32-fr30.c (fr30_elf_relocate_section): Call
- fr30_final_link_relocate.
- (fr30_final_link_relocate): New function: Handle I20 and I32
- relocs.
- (fr30_elf_i32_reloc): New function: Handle I32 relocs.
- (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs.
- (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs.
-
- * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc
- chain to empty.
-
- The following changes are based on a patch submitted by Gianluca
- Moro <glctr@abc.it>:
-
- (v850_elf_perform_relocation): Only update a hi16s reloc if it has
- not already been updated.
- (find_remembered_hi16s_reloc): New parameter 'already_found'
- returns state of remembered hi16s reloc.
- (remember_hi16s_reloc): Set 'found' field to false.
- (hi16s_location): Add 'found' field.
-
-1998-11-23 DJ Delorie <dj@cygnus.com>
-
- * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants
- to see .DLL files as unrecognized.
- (i3coff_object_p): Sorry, had to hack it to not recognize these
- files (pei-i386) on request.
-
-1998-11-23 DJ Delorie <dj@cygnus.com>
-
- * opncls.c (bfd_make_readable): need more cleanup for symbols and
- relents. Call bfd_check_format to reinitialize.
-
-Fri Nov 20 14:21:36 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious
- warnings.
-
-Thu Nov 19 14:42:15 1998 Geoffrey Noer <noer@cygnus.com>
-
- * aclocal.m4: regenerate
- * configure: regenerate
-
-Tue Nov 17 20:23:35 1998 Richard Henderson <rth@cygnus.com>
-
- * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size.
- * elf.c (_bfd_elf_link_hash_newfunc): Clear it.
- * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and
- respect it as an upper bound on what memory to reference.
- (elf_gc_smash_unused_vtentry_relocs): Likewise.
- (elf_gc_record_vtentry): Handle as-yet undefined vtables. Set and
- update vtable_entries_size appropriately.
-
-Tue Nov 17 15:28:31 1998 Nick Clifton <nickc@cygnus.com>
+ * bfd-in2.h: Regenerate.
- * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold
- reloc number.
+ * elf.c (copy_private_bfd_data): Reorganise section to segment
+ mapping to cope with moved sections requiring new segments,
+ and overlapping segments.
+ (SEGMENT_END): New macro: Return the end address of a segment.
+ (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
+ contains a section by comparing their VMA addresses.
+ (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
+ contains a section by comparing their LMA addresses.
+ (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
+ section should be included in a segment.
+ (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
+ follows another in memory.
+ (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
+ segments overlap.
+
+2000-07-22 Jason Eckhardt <jle@cygnus.com>
+
+ * cpu-i860.c: Added comments.
+
+ * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
+ bfd_elf32_i860_little_vec.
+ (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
+ (ELF_MAXPAGESIZE): Changed to 4096.
+
+ * targets.c (bfd_elf32_i860_little_vec): Declaration of
+ new target.
+ (bfd_target_vector): Added bfd_elf32_i860_little_vec.
+
+ * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
+ config for little endian elf32 i860.
+ (targ_defvec): Define for the new config above
+ as "bfd_elf32_i860_little_vec".
+ (targ_selvecs): Define for the new config above
+ as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
+
+ * configure.in (bfd_elf32_i860_little_vec): Added recognition
+ of new target vec.
-Mon Nov 16 22:19:21 1998 DJ Delorie <dj@cygnus.com>
+ * configure: Regenerated.
- * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY
- bfds; they have no "file" so we fake it.
- * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen)
- * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by
- resizing the memory buffer.
- * opncls.c (bfd_make_writable): New function; lets you write a
- bfd_create'd bfd to an in-memory buffer.
- (bfd_make_readable): New function; lets you read back that buffer
- as if it were from bfd_openr. Used to build generated archive
- members (winsup's ld's dlltool)
+2000-07-27 H.J. Lu <hjl@gnu.org>
-Mon Nov 16 19:15:19 1998 Dave Brolley <brolley@cygnus.com>
+ * elflink.h (elf_merge_symbol): Take one more argument,
+ dt_needed, to indicate if the symbol comes from a DT_NEEDED
+ entry. Don't overide the existing weak definition if dt_needed
+ is true.
+ (elf_link_add_object_symbols): Pass dt_needed to
+ elf_merge_symbol ().
- * po/bfd.pot: Regenerated.
+2000-07-27 Nick Clifton <nickc@cygnus.com>
-Mon Nov 16 10:57:06 1998 Nick Clifton <nickc@cygnus.com>
+ * elflink.h (elf_link_size_reloc_section): Zeroes the section's
+ allocated contents.
- * elf32-v850.c (hi16s_location): Replaced fixed size array with
- linked list.
+2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
-Sun Nov 15 20:28:25 1998 Richard Henderson <rth@cygnus.com>
+ * configure.host (*-*-aix*): AIX has 'long long' always.
- * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper
- element of the gotentry list for local symbols too.
- (elf64_alpha_relocate_section): Unify local and global handling.
- Assert that gotent->use_count > 0.
+ * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
+ (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
+ (xcoff_write_archive_contents_big): Don't update the offset
+ of the symbol table, xcoff_write_armap will do it.
-Sat Nov 14 15:16:01 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
- * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and
- update for file name changes of July 2, 1998.
- (vms_vax_vec): New.
- * configure: Rebuild.
+ * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
+ of dynobj for SGI_COMPAT checks.
-Thu Nov 12 19:19:54 1998 Dave Brolley <brolley@cygnus.com>
+2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * po/bfd.pot: Regenerated.
+ * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
+ * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
+ * bfd-in2.h: Regenerate.
-Tue Nov 10 16:17:06 1998 Geoffrey Noer <noer@cygnus.com>
+2000-07-21 Nick Clifton <nickc@cygnus.com>
- * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*.
- * aclocal.m4, configure: regenerate
+ * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
+ range symbol indices in relocs and issue an error message.
-Tue Nov 10 15:13:59 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-20 H.J. Lu <hjl@gnu.org>
- * elf.c (prep_headers): Add support for bfd_arch_fr30.
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
+ info->new_dtags when setting DT_FLAGS_1. It will only be set
+ by the new linker options. It shouldn't break anything.
-Tue Nov 10 13:37:36 1998 Felix Lee <flee@cygnus.com>
+2000-07-20 H.J. Lu <hjl@gnu.org>
- * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE,
- BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value
- was cached.
- * aclocal.m4, configure: regenerated.
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
+ only if info->new_dtags is true.
-Tue Nov 10 14:31:01 1998 Catherine Moore <clm@cygnus.com>
+2000-07-20 H.J. Lu <hjl@gnu.org>
- * elf32-d10v.c (reloc_type): Add R_D10V_GNU_VTINHERIT and
- R_D10V_GNU_VTENTRY relocs.
- (elf_d10v_howto_table): Likewise.
- (d10v_reloc_map d10v_reloc_map): Likewise.
- (elf32_d10v_gc_mark_hook): New.
- (elf32_d10v_gc_sweep_hook): New.
- (elf32_d10v_check_relocs): New.
- (elf32_d10v_relocate_section): New.
- (elf_backend_relocate_section): Define.
- (elf_backend_can_gc_sections): Define.
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
+ DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
-Sat Nov 7 18:07:51 1998 Peter Schauer <peter.schauer@regent.e-technik.tu-muenchen.de>
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
- * Makefile.am (BFD32_BACKENDS): Move vms files here...
- (BFD64_BACKENDS): ...from here.
- (BFD32_BACKENDS_CFILES): Move vms files here...
- (BFD64_BACKENDS_CFILES): ...from here.
+ * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
+ (ALL_MACHINES_CFILES): Add cpu-cris.c.
+ (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
+ (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
+ (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
* Makefile.in: Rebuild.
-
-Wed Nov 4 15:58:48 1998 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Add FR30 target.
- * Makefile.in: Add FR30 target.
- * archures.c: Add support for FR30.
- * config.bfd: Add support for FR30.
- * configure.in: Add support for FR30.
- * reloc.c: Add support for FR30 relocations.
- * targets.c: Add support for FR30 relocations.
- * bfd-in2.h: Regenerate.
- * configure: Regenerate.
- * libbfd.h: Regenerate.
- * cpu-fr30.c: New file.
- * elf32-fr30.c: New file.
-
-Mon Nov 2 14:59:33 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: detect cygwin* instead of cygwin32*
- * configure: regenerate
-
-Sun Nov 1 19:32:28 1998 Jeffrey A Law (law@cygnus.com)
-
- * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca,
- use bfd_malloc and free instead and check return value from bfd_malloc.
-
-Sun Nov 1 16:20:35 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare.
+ * aclocal.m4: Rebuild.
+ * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
+ * archures.c (enum bfd_architecture): Add bfd_arch_cris.
+ (bfd_cris_arch): Declare.
+ (bfd_archures_list): Add bfd_cris_arch.
+ * bfd-in2.h: Rebuild.
+ * config.bfd: (cris-*-*): New target.
+ * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
+ * configure: Rebuild.
+ * elf.c (prep_headers): Add bfd_arch_cris.
* libbfd.h: Rebuild.
+ * libaout.h (enum machine_type): Add M_CRIS.
+ * reloc.c: Add CRIS relocations.
+ * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
+ (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
+ * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
+ * po/POTFILES.in, po/bfd.pot: Regenerate.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
+ DF_TEXTREL if DT_TEXTREL is set.
+ * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
+ * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+ * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
- * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out.
- (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise.
- (MIPS_TEXT_DYNSYM_SECN): Likewise.
- (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash
- section.
- (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex
- field.
- (mips_elf_link_hash_table_create): Don't initialize
- dynsym_sec_strindex.
- (mips_elf_gc_mark_hook): Add default case to avoid warning.
- (mips_elf_size_dynamic_sections): Generate a section symbol for
- every output section.
- (mips_elf_finish_dynamic_sections): Count all sections for
- DT_MIPS_UNREFEXTNO.
- (mips_elf_finish_dynamic_sections): Use dynamic symbols for all
- output sections.
-
-Sun Nov 1 12:46:53 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots
- for later PLT entries in large PLTs.
- (ppc_elf_finish_dynamic_symbol): Allow for the extra slots.
-
-Sat Oct 31 20:10:09 1998 Jeffrey A Law (law@cygnus.com)
-
- * elf32-ppc.c (ppc_elf_reload_section): Fix typo.
-
-1998-10-26 15:58 Ulrich Drepper <drepper@cygnus.com>
-
- * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value.
- * elflink.h (elf_collect_hash_codes): New function. This function is
- called for each exported symbol and we compute the ELF hash value for
- it.
- (compute_bucket_value): New function. It is called from
- size_dynamic_sections to determine the hash table size. When we are
- optimizing a better, but slower, algorithm is used.
- (size_dynamic_sections): Call compute_bucket_value.
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
+ set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
+ DT_RPATH is set.
+ Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
- * elf.c (bfd_elf_hash): Optimize the hash function a bit.
+2000-07-19 H.J. Lu <hjl@gnu.org>
-Mon Oct 19 20:03:21 1998 Catherine Moore <clm@cygnus.com>
+ * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
+ * bfd-in2.h: Rebuild.
- * elf32-sh.c: Add HOWTO entries for R_SH_GNU_VTINHERIT and
- R_SH_GNU_VTENTRY.
- (sh_elf_gc_mark_hook): New.
- (sh_elf_gc_sweep_hook): New.
- (sh_elf_check_relocs): New.
- (elf_backend_can_gc_sections): Define.
+ * elf-bfd.h (elf_obj_tdata): Add dt_soname.
+ (elf_dt_soname): New.
-Mon Oct 19 16:57:05 1998 Felix Lee <flee@cygnus.com>
+ * elf.c (bfd_elf_set_dt_needed_soname): New.
- * acinclude.m4: undo previous gettext change
- * aclocal.m4: rebuild with right version of aclocal.
+ * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
+ entry if the shared object loaded by DT_NEEDED is used to
+ resolve the reference in a regular object.
-Mon Oct 19 01:47:21 1998 Felix Lee <flee@cygnus.com>
+2000-07-19 H.J. Lu <hjl@gnu.org>
- * acinclude.m4, aclocal.m4: move gettext-related fragments from
- aclocal.m4 to acinclude.m4, so they don't get lost.
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
+ DT_DEPAUDIT and DT_AUDIT as strings.
- * elfcore.h: rewrite for better corefile support.
- * elf.c (elfcore_*): new functions.
- * elf-bfd.h (elf_obj_tdata): new structure members.
- * acconfig.h, acinclude.m4, configure.in: add feature-tests for
- flavor of procfs.
- * aclocal.m4, config.in, configure, Makefile.in: regenerated.
+2000-07-19 Nick Clifton <nickc@cygnus.com>
-Fri Oct 16 14:07:45 1998 Catherine Moore <clm@cygnus.com>
+ * format.c: Fix formatting.
- * elf32-m32r.c: Add HOWTO entries for R_M32R_GNU_VTINHERIT
- and R_M32R_GNU_VTENTRY.
- (elf_backend_can_gc_sections): Define.
- (m32r_elf_check_relocs): New.
- (m32r_elf_gc_mark_hook): New.
- (m32r_elf_gc_sweep_hook): New.
- (m32r_elf_relocate_section): Handle VT relocs.
+2000-07-19 H.J. Lu <hjl@gnu.org>
-Mon Oct 12 14:18:40 1998 Nick Clifton <nickc@cygnus.com>
+ * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
- * coff-arm.c (arm_relocate_section): Remove redundant test.
+2000-07-19 H.J. Lu <hjl@gnu.org>
- * bfd-in2.h (struct reloc_howto_struct): Improve comment to make
- cleat that the 'bitsize' field is the size of the bitfield AFTER
- relocation not before.
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
+ DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
+ DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
+ DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
+ DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
+ DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
+ DT_FLAGS_1, DT_USED and DT_CHECKSUM.
- * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield.
+2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
- * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo
- relocs.
+ * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
+ renamed functions from here...
+ (assign_section_numbers): Use renamed functions.
+ (prep_headers): Use renamed functions.
-Tue Oct 6 09:20:44 1998 Catherine Moore <clm@cygnus.com>
+ * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
+ * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
+ * bfd-in2.h: Regenerate.
- * elf32-sparc.c: Add HOWTO entries for R_SPARC_GNU_VTINHERIT and
- R_SPARC_GNU_VTENTRY.
- (elf32_sparc_check_relocs): Handle them.
- (elf32_sparc_reloc_type_lookup): Likewise.
- (elf32_sparc_relocate_section): Likewise.
- (elf32_sparc_gc_mark_hook): New.
- (elf32_sparc_gc_sweep_hook): New.
+2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
+ parenthesis in if statement.
+
+2000-07-17 Koundinya K <kk@ddeorg.soft.net>
+
+ Enable the support for Traditional MIPS.
+ * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
+ return ict_none appropriately for traditional mips targets.
+ (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
+ (STUB_MOVE): Conditionalize for traditonal mips.
+ (STUB_LI16): Likewise.
+ (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
+ room for RTPROC header.
+ (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
+ the permission for the PT_DYNAMIC as read, write and execute.
+ (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
+ for traditonal mips.
+ (_bfd_mips_elf_create_dynamic_sections): Add the symbol
+ _DYNAMIC_LINKING for traditonal mips.
+ (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
+ in case of traditonal mips.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
+ entry is required. For a function if PLT is not required then set the
+ corresponding hash table entry to 0.
+ (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
+ traditonal mips.
+ (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
+ shared object set the value to 0.
+ (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
+ _DYNAMIC_LINKING for traditonal mips.
+ (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
+ for traditonal mips.
+
+2000-07-15 H.J. Lu <hjl@gnu.org>
+
+ * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
+
+2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
+ out a structure that is BFD_IN_MEMORY.
+
+2000-07-11 Alan Modra <alan@linuxcare.com.au>
+
+ * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
+ bfd pointer. Print section id instead of bfd pointer for local
+ syms. Prefix addend with `+' for global syms as well as local.
+ Correct calculation of name component lengths.
+ (elf64_hppa_check_relocs): Update call to get_dyn_name.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
+ (elf64_hppa_modify_segment_map): Likewise.
+
+2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
+ addresses to be "naturally" sign extended. Return -1 if unknown.
+ * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
+ * bfd-in2.h: Regenerate.
-Mon Oct 5 14:55:30 1998 Jeffrey A Law (law@cygnus.com)
+2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
+ and ECOF_SIGNED_64 to list ways to extract an offset.
+ (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
+ ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
+ Update.
+ * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
+ * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
+
+2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * elfcode.h (elf_object_p): Use bfd_set_start_address and not
+ bfd_get_start_address.
+ (elf_swap_ehdr_in): Sign extend e_entry when applicable.
+ (elf_swap_ehdr_out): Ditto.
+
+2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
+
+ * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
+ compatibility with older binutils.
+
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
+
+ * section.c (bfd_make_section_anyway): Start section_id at 0x10.
+ (STD_SECTION): Avoid negative ids, instead use 0 to 3.
+
+ From Ryan Bradetich <rbradetich@uswest.net>
+ * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
+ (parse_line_table): Ditto.
+ (_bfd_dwarf1_find_nearest_line): Ditto.
+ * syms.c (cmpindexentry): Remove extra `*' from params.
+
+2000-07-09 Koundinya K <kk@ddeorg.soft.net>
+
+ * elf32-mips.c (sort_dynamic_relocs): New Function.
+ (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
+ via qsort to sort the dynamic relocations in increasing r_symndx
+ value.
+
+2000-07-09 Alan Modra <alan@linuxcare.com.au>
+
+ * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
+ ATTRIBUTE_UNUSED to unused args.
+ (get_opd): Likewise.
+ (get_plt): Likewise.
+ (get_dlt): Likewise.
+ (get_stub): Likewise.
+ (elf64_hppa_adjust_dynamic_symbol): Likewise.
+ (elf64_hppa_link_output_symbol_hook): Likewise.
+ (elf64_hppa_check_relocs): Delete unused var.
+ (elf64_hppa_size_dynamic_sections): Likewise.
+ (elf64_hppa_finalize_opd): Likewise.
+ (elf64_hppa_finalize_dynreloc): Likewise.
+ (elf64_hppa_modify_segment_map): Likewise.
+ (elf64_hppa_finish_dynamic_sections): Likewise.
+
+ * elf-hppa.h (elf_hppa_final_write_processing): Add
+ ATTRIBUTE_UNUSED to unused args.
+ (elf_hppa_final_link_relocate): Likewise.
+ (elf_hppa_record_segment_addrs): Add paretheses.
+ (elf_hppa_relocate_section): Constify dyn_name.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
+ rearrange case statement so that it gets preferred to 32-bit ones.
+
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
+ asection->id instead of address of asection structure.
+ (elf32_hppa_size_stubs): Likewise.
+
+ * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
+ for .init* and .fini*.
+
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
+ and addends used in stub names to 32 bits.
+ (elf32_hppa_size_stubs): Likewise.
+
+ * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
+ twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
+ not bfd_put_64. Fix minor comment typo and formatting.
+
+ Changes to create multiple linker stubs, positioned immediately
+ before the section where they are required.
+ * elf32-hppa.c: Don't include hppa_stubs.h.
+ (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
+ (elf32_hppa_stub_hash_table): Delete.
+ (elf32_hppa_link_hash_entry): Delete.
+ (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
+ stub_hash_table, and store the struct here rather than a pointer.
+ Delete output_symbol_count. Add offset array. Change
+ global_value to a bfd_vma.
+ (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
+ (elf32_hppa_stub_hash_traverse): Delete.
+ (elf32_hppa_name_of_stub): Delete.
+ (elf32_hppa_link_hash_lookup): Delete.
+ (elf32_hppa_link_hash_traverse): Delete.
+ (elf32_hppa_stub_hash_table_init): Delete.
+ (elf32_hppa_size_of_stub): Pass input section and offset rather
+ than location and calculate location here. Don't pass name as all
+ stubs are now the same size.
+ (elf32_hppa_stub_hash_newfunc): Init new fields.
+ (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
+ too.
+ (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
+ comparing against ints. Rewrite stub handling code.
+ (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
+ Case enums to int before comparing against ints. Remove
+ bfd_reloc_dangerous case.
+ (elf32_hppa_build_one_stub): Rewrite.
+ (elf32_hppa_size_one_stub): New function.
+ (elf32_hppa_build_stubs): Rewrite.
+ (elf32_hppa_size_stubs): Pass in linker call-back functions.
+ Rewrite stub-handling specific code.
+
+ * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
+
+ * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
+
+ * hppa_stubs.h: Delete.
+ * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
+ (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
+ * Makefile.in: Regenerate.
- * som.c (som_finish_writing): Perform some sanity checks when
- writing an executable or shared library.
+ * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
+ e_nlrsel.
+
+ * libhppa.h (hppa_field_adjust): Correct e_nsel case.
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
+ and section name for bfd_reloc_notsupported error message.
+ (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
+ bfd_reloc_notsupported.
+ (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
+
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
+ undefined weak symbols for all relocs.
+ (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
+ offsets are relative to one past the delay slot.
+ (elf32_hppa_size_stubs): Account for reloc addend when calculating
+ branch destination. Put addend into stub name too.
+ (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
+ adjust by 8 when deciding whether a linker stub is needed. Put
+ addend into stub name as for above.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
+ various args and vars.
+ (elf32_hppa_bfd_final_link_relocate): Here too.
+ (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
+ inner block var to avoid shadowing.
+
+ * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
+ unsigned.
+ * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
+ * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
+ (elf_hppa_fake_sections): Rename local var to avoid shadowing.
+
+ * libhppa.h: Change practically all unsigned ints to plain ints.
+ Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
+ prototypes.
+
+ From Ryan Bradetich <rbradetich@uswest.net>
+ * libhppa.h (hppa_opcode_type): New enum to replace #define's.
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
+ suit above.
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
+ to the new OP_* ones.
+
+ * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
+ error exit. Bail out earlier on plabel relocs that we aren't
+ interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
+ string, and then don't free our copy.
+ (elf32_hppa_build_one_stub): Make insn unsigned int.
+
+ * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
+ available with BL, not BE and BLE.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
+ code for elf arg relocs.
+ (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
+ argument with elf_link_hash_entry h. Handle undefined weak
+ symbols. Move $global$ lookup from here...
+ (elf32_hppa_relocate_section): ...to here. Return correct error
+ message for non-handled relocs.
+ (elf32_hppa_size_of_stub): Correctly test branch range. Previous
+ wrong test was -0x3ffff to +0x40000.
+
+ * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
+ R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
+ Handle them as such.
+ (elf_hppa_relocate_insn): Fix a typo.
+
+ * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
+ (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
+ assemble_17, assemble_21): Delete.
+ Supply defines for all 64 possible opcodes.
+ (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
+ formats. Handle COMICLR.
+ (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
+ -10, -16, 16, 22.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
+ (elf32_hppa_bfd_final_link_relocate): Major rewrite.
+ (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
+ to suit.
+ (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
+ the local syms - did this code get deleted accidentally? Ignore
+ undefined and undefweak syms.
+
+ * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
+ block. Use it instead of elf64_hppa_hash_table (info).
+ (elf_hppa_final_link_relocate): Use hppa_info instead of
+ elf64_hppa_hash_table (info).
+
+ * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
+ re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
+ (hppa_rebuild_insn): Mask immediate bits here instead.
+ * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
+
+2000-07-08 Alan Modra <alan@linuxcare.com.au>
+
+ * section.c (struct sec): Add id field. Tidy comment formatting.
+ (bfd_make_section_anyway): Set id.
+ (STD_SECTION): Init id too.
+ Change CONST to const throughout.
+ * archures.c (bfd_arch_info): Tidy comment.
+ (bfd_arch_list): Change a CONST to const.
+ * libbfd-in.h: Tidy comments and replace CONST with const.
+ * elf-bfd.h: Likewise.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * libcoff.h: Regenerate.
-Mon Oct 5 12:02:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
+2000-07-07 DJ Delorie <dj@redhat.com>
- * dwarf1.c : New file. Adds _bfd_dwarf1_find_nearest_line.
- * configure.in (elf): Add dwarf1.lo.
- * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info.
- * elf.c (_bfd_elf_find_nearest_line): Add call to
- _bfd_dwarf1_find_nearest_line.
- * elf32-mips.c (_bfd_mips_elf_find_nearest_line):
- Add call to _bfd_dwarf1_find_nearest_line.
- * configure: Rebuilt.
+ * archive.c (_bfd_write_archive_contents): Add an informative
+ comment.
-Mon Oct 5 10:06:22 1998 Catherine Moore <clm@cygnus.com>
+2000-07-06 Kazu Hirata <kazu@hxi.com>
- * elflink.h (elf_gc_sections): Do not allow garbage
- collection if dynamic sections have been created.
+ * srec.c: Fix formatting.
-Mon Oct 5 09:07:37 1998 Catherine Moore <clm@cygnus.com>
+2000-06-05 DJ Delorie <dj@redhat.com>
- * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and
- R_V850_GNU_VTENTRY.
- (v850_elf_check_relocs): Handle VTINHERIT and VTENTRY relocs.
- (v850_elf_perform_relocation): Likewise.
- (v850_elf_final_link_relocate): Likewise.
- (v850_elf_relocate_section): Likewise.
- (v850_elf_gc_sweep_hook): New routine.
- (v850_elf_gc_mark_hook): New routine.
- (elf_backend_can_gc_sections): Define.
+ * MAINTAINERS: new
-Mon Oct 5 09:04:25 1998 Catherine Moore <clm@cygnus.com>
+2000-07-04 Alexandre Oliva <aoliva@redhat.com>
- * elf32-m68k.c (elf_m68k_gc_sweep_hook): Don't assume
- that dynobj exists.
+ * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
+ value of PC-relative offsets.
-Sun Oct 4 23:29:34 1998 David Edelsohn <edelsohn@mhpcc.edu>
+2000-07-03 Jim Wilson <wilson@cygnus.com>
- * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
- Declare size as bfd_size_type.
- (rs6000coff_get_section_contents): Declare count as bfd_size_type.
+ * elf64-alpha.c (alpha_elf_size_info): New.
+ (elf_backend_size_info): Define to alpha_elf_size_info.
+ * elfcode.h (elf_size_info): Change hash bucket size to 4.
-Sun Oct 4 20:38:29 1998 Jeffrey A Law (law@cygnus.com)
+2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
- * cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_arch
- structure.
- * som.c (CPU_PA_RISC2_0): Define.
- (_PA_RISC2_0_ID): Likewise.
- (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed.
+ * elf32-mips.c: Include elf32-target.h again for the traditional
+ MIPS targets.
-Sun Oct 4 21:19:09 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
- * elflink.h (elf_link_add_object_symbols): When a versioned symbol
- has a base which is already defined, only add the referenced
- symbol to the dynamic symbol table if it is defined or referenced
- by a regular file.
+ * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
+ Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
+ (avr_info_to_howto_rela): Likewise.
+ (elf32_avr_gc_mark_hook): Likewise.
+ (elf32_avr_gc_sweep_hook): Likewise.
+ (elf32_avr_relocate_section): Likewise.
- * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
- correctly.
+2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
-1998-09-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
+ an external symbol for a non-shared, non-relocatable link.
- * elflink.h (elf_link_add_object_symbols): Undo last change.
+2000-07-03 Nick Clifton <nickc@redhat.com>
-Wed Sep 23 16:09:31 1998 Richard Henderson <rth@cygnus.com>
+ * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
+ is an external symbol.
+ (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
+ external symbol.
- * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
- symbol for the indirect alias to a versioned symbol.
+2000-07-03 Kazu Hirata <kazu@hxi.com>
-Mon Sep 21 12:15:22 1998 Catherine Moore <clm@cygnus.com>
+ * reloc16.c: Fix formatting.
- * elf32-i386.c (elf32_i386_vtinherit_howto): New.
- (elf32_i386_vtentry_howto): New.
- (elf_i386_reloc_type_lookup): Return elf32_i386_vtentry_howto
- or elf32_i386_vtinherit_howto on lookup.
+2000-07-01 Koundinya K <kk@ddeorg.soft.net>
-Sun Sep 20 00:48:07 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
+ to add a new target for traditional mips i.e
+ bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
+ * configure.in: Likewise.
+ * configure: Rebuild.
+ * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
+ bfd_target_vector.
+ (bfd_elf32_tradlittlemips_vec): Likewise.
+ * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
+ to see that elfNN_bed does not get redefined even if the target file
+ is included twice for a chip. See elf32-mips.c.
- * elf32-m68k.c: Include "elf/m68k.h". Remove definition of enum
- reloc_type. Rename R_68K__max to R_68K_max.
- (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY
- reloc.
+2000-07-01 Alan Modra <alan@linuxcare.com.au>
-Sun Sep 20 00:09:25 1998 Chris Torek <torek@bsdi.com>
+ * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
+ (CLEANFILES): Add DEPA.
+ * Makefile.in: Regenerate.
- * libbfd.c (bfd_getb32): Rewrite expression to get better code.
- (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
+2000-06-30 DJ Delorie <dj@cygnus.com>
- * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
- after.
+ * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
+ can't assume the PE header is at 0x80.
-Sat Sep 19 22:42:23 1998 Doug Rabson <dfr@nlsystems.com>
+2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
- * elflink.h (elf_link_add_object_symbols): Ensure that the warning
- message has a null byte terminator.
+ * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
-Fri Sep 18 14:35:29 1998 Nick Clifton <nickc@cygnus.com>
+2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
- * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of
- word subject to R_V850_32 relocation.
+ * go32stub.h: Update stub.
-Thu Sep 17 17:20:36 1998 Nick Clifton <nickc@cygnus.com>
+2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
- * dwarf2.c: Add comment describing problem computing line numbers
- for undefined symbols at link time.
+ * archures.c (bfd_mach_avr5): Define.
+ * bfd-in2.h (bfd_mach_avr5): Define.
+ * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
+ bfd_mach_avr5, add bfd_mach_avr4. Update comments.
+ (compatible): Update comment. Add missing test.
+ * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
+ for avr2 and avr4. Simplify 8K wrap code.
+ (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
+ (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
-Thu Sep 17 16:03:28 1998 Richard Henderson <rth@cygnus.com>
+2000-06-26 Kazu Hirata <kazu@hxi.com>
- * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
- transform a defweak into a plt entry.
- (elf64_alpha_calc_dynrel_sizes): Allow room for secondary
- plt entry references to receive a RELATIVE reloc.
- (elf64_alpha_finish_dynamic_symbol): Fill them in.
- (elf64_alpha_relocate_section): Assert we don't overrun
- the allocated relocation space.
+ * coff-h8300.c: Fix formatting.
+ * cpu-h8300.c: Likewise.
-Wed Sep 16 18:03:13 1998 Nick Clifton <nickc@cygnus.com>
+2000-06-24 Alexandre Oliva <aoliva@redhat.com>
- * elf.c (swap_out_syms): Always treat section symbols as
- special, even if they are attached to a common section.
+ * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
+ for local symbols whose names are unknown.
-Wed Sep 16 10:34:13 1998 Nick Clifton <nickc@cygnus.com>
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
- * elf32-v850.c (v850_elf_symbol_processing): Move symbols in
- sections with v850 common section attributes into named v850
- common sections.
- (v850_elf_add_symbol_hook): Move symbols in sections with v850
- common section attributes into named v850 common sections.
+ * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
+ find one.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
-Wed Sep 16 11:26:49 CDT 1998 Catherine Moore <clm@cygnus.com>
+2000-06-20 H.J. Lu <hjl@gnu.org>
- * elf32-arm.c (elf32_arm_gc_mark_hook): Remove print
- statement.
+ * Makefile.am: Rebuild dependency.
+ * Makefile.in: Rebuild.
-1998-09-15 Geoff Keating <geoffk@ozemail.com.au>
+2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset
- part of Vladimir's change of 1998-08-19. Make a R_PPC_SDAREL16
- reloc to the wrong section a warning, not an error. .dynsbss
- is not an output section, so there is no need to check for it.
+ * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
+ (elf_backend_copy_indirect_symbol): Map to the new function.
-Tue Sep 15 12:40:05 1998 Catherine Moore <clm@cygnus.com>
+2000-06-20 Alan Modra <alan@linuxcare.com.au>
- * elf-bfd.h: Add argument to elf_backend_get_symbol_type.
+ * archive.c (normalize): Correct pointer comparison when checking
+ for backslashes.
+ (bfd_bsd_truncate_arname): Likewise.
+ (bfd_gnu_truncate_arname): Likewise.
-Tue Sep 15 08:34:40 1998 Catherine Moore <clm@cygnus.com>
+2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
- * elf.c (swap_out_syms): Pass type to elf_backend_get_symbol_type.
- * elf32-arm.c: Add HOWTO entries for R_ARM_GNU_VTINHERIT and
- R_ARM_GNU_VTENTRY.
- (elf32_arm_gc_mark_hook): New.
- (elf32_arm_gc_sweep_hook): New.
- (elf32_arm_check_relocs): New.
- (elf32_arm_final_link_relocate): Handle VTINHERIT and VTENTRY
- relocations.
- (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
+ * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
+ sections elf_{text,data}_{section,symbol}.
+ * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
+ (_bfd_mips_elf_hide_symbol): New function.
+ (elf_backend_hide_symbol): Map to the new function.
+ (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
+ definitions of mips_elf_{text,data}_{section,symbol}.
+ (mips_elf_local_relocation_p): Try to find the direct symbol
+ based on new check_forced argument.
+ (mips_elf_calculate_relocation): Use new version of
+ mips_elf_local_relocation_p.
+ (mips_elf_relocate_section): Likewise.
+ (_bfd_mips_elf_relocate_section): Likewise.
+ (mips_elf_sort_hash_table): Only assert that have enough GOT
+ space.
+ (mips_elf_got16_entry): Match all 32 bits to the existing GOT
+ entry if the relocation based on the new external argument.
+ (mips_elf_create_dynamic_relocation): Assert that we have a
+ section contents allocated where we can swap out the dynamic
relocations.
+ (mips_elf_calculate_relocation): Find the real hash-table entry
+ correctly by using h->root.root.type. Only create a dynamic
+ relocation entry if the symbol is defined in a shared library.
+ Create an external GOT entry for the GOT16 relocation if the
+ symbol was forced local.
+ (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
+ dynamic index if the symbol was forced local.
+
+2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * elf32-mips.c: Fix typos in comments.
+
+2000-06-19 Mark Kettenis <kettenis@gnu.org>
+
+ * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
+ CORE_VERSION_1.
+
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
+ * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
+ BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
+ * configure.in (bfd_elf32_m68hc12_vec): Recognize.
+ (bfd_elf32_m68hc11_vec): Likewise.
+ * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
+ Supports 68hc11 & 68hc12 at the same time.
+ * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
+ bfd_target_vector.
+ (bfd_elf32_m68hc11_vec): Likewise.
+ * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
+ * archures.c (bfd_m68hc12_arch): Define and register in global list
+ (bfd_m68hc11_arch): Likewise.
+ * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
+ BFD_RELOC_M68HC11_3B): Define.
+ * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
+ * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
+
+2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elf_bfd.h (struct elf_backend_data): Add info argument to
+ elf_backend_hide_symbol.
+ (_bfd_elf_link_hash_hide_symbol): Likewise.
+ * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
+ * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
+ * elflink.h (elf_link_add_object_symbols): Likewise.
+ (elf_link_assign_sym_version): Likewise.
-1998-09-10 Geoff Keating <geoffk@ozemail.com.au>
-
- * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
- assume there is no PLT or GOT.
-
-Wed Sep 9 14:24:12 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.c (elf32_arm_find_nearest_line): New function: just
- like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is
- also accepted as a function symbol type.
-
-Mon Sep 7 13:24:03 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * rs6000-core.c (_LONG_LONG): Define for AIX 4.x only.
-
-Sat Sep 5 20:40:18 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
- match definition of _bfd_gc_sections field.
- * libbfd.h: Rebuild.
-
-Fri Sep 4 13:54:23 1998 David Miller <davem@dm.cobaltmicro.com>
-
- * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust
- the addend of a dynamic relocation referencing a section.
- * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
- (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset.
-
-Thu Sep 3 17:28:50 1998 Richard Henderson <rth@cygnus.com>
-
- * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
- bed has a size_dynamic_sections routine before trying to use it.
-
-Mon Aug 31 14:49:22 1998 Richard Henderson <rth@cygnus.com>
-
- * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
- _bfd_elf_rel_vtable_reloc_fn.
-
-Mon Aug 31 10:23:40 1998 Catherine Moore <clm@cygnus.com>
-
- * Makefile.am: Add elf32-arm.c.
- * Makefile.in: Rebuild.
- * elf-bfd.h: Add elf_backend_get_symbol_type.
- * elf.c (swap_out_syms): If defined, call
- elf_backend_get_symbol_type.
- * elf32-arm.c: Define elf_backend_get_symbol_type.
- (elf32_arm_get_symbol-type): New routine.
- (record_thumb_to_arm_glue): Change to use STT_ARM_TFUNC.
- (bfd_elf32_arm_process_before_allocation): Change to
- check for STT_ARM_TFUNC.
- (elf32_arm_final_link_relocate): Likewise.
- * elfxx-target.h: Add elf_backend_get_symbol_type.
-
-Fri Aug 28 19:44:07 1998 Richard Henderson <rth@cygnus.com>
-
- * archures.c (bfd_mach_alpha_ev[456]): New.
- * cpu-alpha.c: Rework to match these types.
- * bfd-in2.h: Rebuild.
-
-Fri Aug 28 19:38:53 1998 Richard Henderson <rth@cygnus.com>
-
- * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
- * elf.c (_bfd_elf_rel_vtable_reloc_fn): New.
-
- * elf32-i386.c (elf_howto_table): Add vtable relocs.
- (elf_i386_reloc_type_lookup): Recognize them.
- (elf_i386_check_relocs): Pass them off to generic code.
- (elf_i386_relocate_section): Ignore them.
- (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New.
- (elf_backend_can_gc_sections): True.
-
-Thu Aug 20 15:03:45 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL
- before looking at owner field.
- (elf32_arm_to_thumb_stub): Ditto.
- (elf32_arm_relocate_section): Compute name before calling
- elf32_arm_final_link_relocate().
-
-Thu Aug 20 11:30:17 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * elf.c: comment and formatting cleanups.
- * elfcore.h: ditto.
-
-Wed Aug 19 15:43:26 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * elfcode.h (elf_object_p): Reject files of header type ET_CORE
- (core files are treated differently than object files).
- * elf-bfd.h (_bfd_elf_write_corefile_contents,
- bfd_elf_mkcorefile): declare.
- * elfxx-target.h (_bfd_elf_write_corefile_contents,
- bfd_elf_mkcorefile): add to bfd_target vector.
- * elfcore.h (elf_core_file_p): save the program header table,
- and set the bfd architecture from the elf file header.
- * elf.c (bfd_elf_mkcorefile): new function.
- (_bfd_elf_write_corefile_contents): new function.
- (assign_file_positions_for_segments): add cases for handling
- PT_NOTE segments. (assign_file_positions_except_relocs):
- core files should be handled the same as exec files.
- (prep_headers): identify core files as type ET_CORE.
- (copy_private_bfd_data): identify the sections belonging to
- the PT_NOTE segment.
-
- * elf32-sparc.c (elf32_sparc_final_write_processing):
- add break statement to default case.
+2000-06-18 H.J. Lu <hjl@gnu.org>
-1998-08-19 Vladimir N. Makarov <vmakarov@cygnus.com>
+ * coff-i386.c (coff_i386_reloc): Don't return in case of
+ output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
+ Compensate PE relocations when linking with non-PE object
+ files to generate a non-PE executable.
- * elf32-ppc.c (ppc_elf_relocate_section): Check that output
- section (not input) will be in sections ".sbss", ".sbss2",
- ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
- R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA. In all these cases also ignore
- output_offset for correct evaluation of addend.
+2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
-Tue Aug 18 11:48:12 1998 Catherine Moore <clm@cygnus.com>
+ * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
+ GOT entries if we're doing a static link or -Bsymbolic link.
- * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
- elf32_arm_allocate_interworking_sections and
- elf32_arm_process_before_allocation.
+2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
-Tue Aug 18 11:46:00 1998 Nick Clifton <nickc@cygnus.com>
+ * elflink.h (elf_link_adjust_relocs): Check for and call backend
+ specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
+ available.
+ (elf_link_output_relocs): Likewise.
+ (elf_reloc_link_order): Likewise.
- * bfd-in.h: Ammend prototype for
- elf32_arm_process_before_allocation to remove surplus third
- argument.
+2000-06-16 Nicholas Duffek <nsd@redhat.com>
+ * archures.c (enum bfd_architecture): #define constants for
+ PowerPc and RS6000 machine numbers.
* bfd-in2.h: Regenerate.
+ * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
+ to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
+ and RS6000 machine numbers using #defined constants from
+ archures.c.
+ * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
+ machine numbers using #defined constants from archures.c. Add
+ entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
+ 64-bit words in 620 entry.
+ * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
+ RSC, and RS2.
+ (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
+
+2000-06-16 Nicholas Duffek <nsd@cygnus.com>
+
+ * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
+ * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
+ * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
+
+2000-06-16 Nicholas Duffek <nsd@redhat.com>
+
+ * bfd-in.h (bfd_family_coff): Define.
+ * bfd-in2.h: Regenerate.
+ * coffgen.c (coff_count_linenumbers, coff_symbol_from,
+ coff_find_nearest_line): Check COFFness using bfd_family_coff()
+ instead of bfd_target_coff_flavour.
+ * cofflink.c (_bfd_coff_final_link): Likewise.
+ * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
+ exclude XCOFF files.
+ * reloc.c (bfd_perform_relocation, bfd_install_relocation):
+ Likewise.
+ * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
+ * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
+ * xcofflink.c (XCOFF_XVECP): Delete.
+ (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
+ bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
+ bfd_xcoff_record_link_assignment,
+ bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
+ check for bfd_target_xcoff_flavour.
-Sat Aug 15 20:55:08 1998 Richard Henderson <rth@cygnus.com>
-
- * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols.
-
-Fri Aug 14 09:12:28 1998 Stan Cox <scox@cygnus.com>
-
- * aoutx.h (aout_link_input_section_ext): Use the relocation already
- calculated for RELOC_SPARC_REV32 case.
-
-Thu Aug 13 14:02:02 1998 Catherine Moore <clm@cygnus.com>
-
- * bfd-in.h: Add prototypes for elf32_arm_get_bfd_for_interworking,
- elf32_arm_allocate_interworking_sections and
- elf32_arm_process_before_allocation.
- * bfd-in2.h: Regenerated.
- * elf32-arm.c Define elf32_arm_link_hash_table.
- (insert_thumb_branch): New routine.
- (find_thumb_glue): New routine.
- (find_arm_glue): New routine.
- (record_arm_to_thumb_glue): New routine.
- (record_thumb_to_arm_glue): New routine.
- (elf32_arm_link_hash_table_create): New routine.
- (elf32_arm_get_bfd_for_interworking): New routine.
- (elf32_arm_allocate_interworking_sections) New routine.
- (elf32_arm_process_before_allocation) New routine.
- (elf32_thumb_to_arm_stub): New routine.
- (elf32_arm_to_thumb_stub): New routine.
- (elf32_print_private_bfd_data): Fix typo.
- (elf32_arm_final_link_relocate): Add argument sym_sec.
- Check for branches to thumb symbols in case R_ARM_PC24.
- Check for branches to arm symbols in case R_ARM_THM_PC22.
- (elf32_arm_relocate_section): Pass symbol section to
- elf32_arm_final_link_relocate.
-
-Wed Aug 12 19:00:39 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
- entries unless the symbol is defined in the executable; in
- particular, undefined weak symbols get a PLT entry.
-
-Wed Aug 12 14:48:33 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * libaout.h: Remove nested comment to avoid warning.
-
-Wed Aug 12 08:10:11 1998 Catherine Moore <clm@cygnus.com>
-
- * elf32-arm.c (elf32_arm_final_link_relocate): Rework
- R_ARM_PC24 relocation.
-
-Tue Aug 11 14:42:26 1998 Catherine Moore <clm@cygnus.com>
-
- * elf32-arm.c (elf32_arm_final_link_relocate): Remove unused
- argument is_local. Add argument sym_flags. Check sym_flags
- in R_ARM_ABS32 case. Include addend for R_ARM_THM_PC22 case.
- (elf32_arm_relocate_section): Don't pass local sym and pass
- sym_flags to elf32_arm_final_link_relocate.
-
-Mon Aug 10 20:38:39 1998 Richard Henderson <rth@cygnus.com>
-
- * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
- to not count too few relocs for dynamicly linked executables.
-
-Mon Aug 10 15:35:34 1998 Richard Henderson <rth@cygnus.com>
-
- * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider
- symbols without a dynamic index dynamic. Consider all weak
- symbols dynamic.
- (elf64_alpha_strip_section_from_output): Don't assume 1-1
- correspondance between input and output sections.
-
-Mon Aug 10 15:31:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * elflink.h (elf_gc_common_finalize_got_offsets): For backends
- that use a .got.plt section start the got offset at zero.
-
-Mon Aug 10 17:31:21 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (ieee_write_processor): Correct the processor ID written
- out for bfd_arch_m68k, accommodating change of March 25.
-
-Sun Aug 9 20:55:44 1998 Catherine Moore <clm@cygnus.com>
-
- * elf32-arm.c (elf32_arm_final_link_relocate): Rework
- R_ARM_THM_RPC22 relocations.
-
-Sat Aug 8 15:15:30 1998 Richard Henderson <rth@cygnus.com>
-
- * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols
- are always dynamic.
- (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE
- .got relocs in -Bsymbolic shared objects.
-
-Wed Aug 5 15:48:08 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.c: Add private flags to ELF header.
- (elf32_arm_print_private_bfd_data): New Function.
- (elf32_arm_set_private_flags): New Function.
- (elf32_arm_copy_private_flags): New Function.
- (elf32_arm_merge_private_bfd_data): New Function.
-
-Mon Aug 3 17:10:15 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
- a local symbol.
- (elf32_sparc_relocate_section): Likewise.
-
-Sun Aug 2 03:19:23 1998 Richard Henderson <rth@cygnus.com>
+2000-06-16 Nicholas Duffek <nsd@redhat.com>
- * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL. Create the
- .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
- (ppc_elf_relocate_section): Pull sgot and splt search to the start
- of the function. Recognize no .plt as static linking.
+ * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
+ files on AIX 4.3.
+ (read_hdr): New function.
+ (rs6000coff_core_p): Store mstsave or __context64 struct instead
+ of trying to extract individual registers. Set abfd->arch_info
+ to match the architecture that created the core file.
+ (rs6000coff_get_section_contents): Delete.
+ * xcoff-target.h (rs6000coff_get_section_contents): Delete.
-1998-08-01 Ulrich Drepper <drepper@cygnus.com>
+2000-06-14 H.J. Lu <hjl@gnu.org>
- * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
- ".liblist" string through gettext.
+ * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
+ is NULL.
-Fri Jul 31 16:38:14 1998 Catherine Moore <clm@cygnus.com>
+2000-06-13 H.J. Lu <hjl@gnu.org>
- * Makefile.am: Add support for elf32-arm.lo.
- * Makefile.in: Rebuild.
- * config.bfd (arm-*-elf): Define targ_defvec and targ_selvecs.
- (thumb-*-elf): Define targ_defvec and targ_selvecs.
- * configure.in: Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
* configure: Regenerate.
- * elf.c: (prep_headers): Support arch_type of EM_ARM.
- * targets.c: Support new targets bfd_elf32_bigarm_vec and
- bfd_target bfd_elf32_littlearm_vec.
- * elf32-arm.c: New file.
-Tue Jun 28 19:05:28 1998 Stan Cox <scox@cygnus.com>
+2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
- * libaout.h (M_SPARCLITE_LE): New machine.
- * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE.
- * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE.
- (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le
- * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32.
- (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le
- (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support.
- * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
- elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32
- * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to
- be BFD_RELOC_SPARC_REV32.
- * reloc.c: Ditto.
- * config.bfd (sparc86x-*-aout): New
+ * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
+ armpei_little_vec.
-Fri Jul 24 13:54:19 1998 Nick Clifton <nickc@cygnus.com>
+2000-06-08 David O'Brien <obrien@FreeBSD.org>
- * linker.c (_bfd_generic_final_link): Allocate NULL symbol before
- actually mapping the output sections.
+ * configure.in (VERSION): Update to show this is the CVS mainline.
-Fri Jul 24 11:24:29 1998 Jeffrey A Law (law@cygnus.com)
+2000-06-07 Alan Modra <alan@linuxcare.com.au>
+ * elf32-d10v.c: Include elf/d10v.h
+ (enum reloc_type): Delete.
+ * elf32-d30v.c: Include elf/d30v.h
+ (enum reloc_type): Delete.
- * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
- (mn10300_elf_reloc_map): Similarly.
- (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
-
-Fri Jul 24 12:36:04 1998 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am: Run "make dep-am" to regenerate dependencies.
+ * Makefile.in: Regenerate.
- * elf32-mips.c (elf_mips_howto_table): Add reloc types used on
- Irix 6.
- (bfd_elf32_bfd_reloc_type_lookup): Add default case.
- * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
- elf_mips_reloc_type defined in elf/mips.h.
+ * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
+ (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
+ move HOWTOs into elf_howto_table.
+ (R_386_standard, R_386_ext_offset): Define.
+ (R_386_ext, R_386_vt_offset, R_386_vt): Define.
+ (elf_i386_reloc_type_lookup): Modify calculation of index into
+ elf_howto_table since we've removed the padding.
+ (elf_i386_info_to_howto_rel): Likewise.
+ (elf_i386_relocate_section): Likewise.
-1998-07-24 Ulrich Drepper <drepper@cygnus.com>
+2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
- * elf64-mips.c: Remove reloc_type definition completely. It's now
- in elf/mips.h.
+ * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
-Thu Jul 23 13:33:19 1998 Doug Evans <devans@canuck.cygnus.com>
+2000-06-05 H.J. Lu <hjl@gnu.org>
- * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
- as they are defined in elf/mips.h now.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
+ an error when seeing an undefined symbol with hidden/internal
+ attribute. It is handled in *_relocate_section ().
-Thu Jul 23 11:29:43 1998 Jeffrey A Law (law@cygnus.com)
+2000-06-05 H.J. Lu <hjl@gnu.org>
+ * elflink.h (elf_fix_symbol_flags): Follow the link for the
+ indirect symbol for the ELF_LINK_NON_ELF bit.
+ (elf_link_output_extsym): Don't output the indirect symbol even
+ if the ELF_LINK_NON_ELF bit is set.
- * Re-add lost change:
- * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
- "movm_stack_size".
- (mn10300_elf_relax_section): Include stack space for register saves
- in the imm8 field of a "call" instruction.
- (compute_function_info): Determine how much stack is allocated by
- the movm instruction. Fix typo.
- (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
+2000-06-01 J.T. Conklin <jtc@redback.com>
-Thu Jul 23 11:38:05 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config.bfd (i[3456]86-*-netbsdelf*): New target.
+ (i[3456]86-*-netbsdaout*): New target.
+ (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
+ (i[3456]86-*-openbsd*): Likewise.
- * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
- * elf64-sparc.c (elf_backend_got_header_size): Define as 8.
+2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
-1998-07-22 Ulrich Drepper <drepper@cygnus.com>
+ * trad-core.c: From hpux-core.c, include <dirent.h> or
+ <sys/ndir.h> when possible.
- * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type.
+2000-05-31 Nick Clifton <nickc@cygnus.com>
-Wed Jul 22 16:27:18 1998 Nick Clifton <nickc@cygnus.com>
+ * opintl.h (_(String)): Explain why dgettext is used instead
+ of gettext.
- * elf32-hppa.h: Let ELF header define the enum containing the
- external reloc numbers.
- * elf32-i386.h: Likewise.
+2000-05-31 Ulrich Drepper <drepper@redhat.com>
-1998-07-22 14:57 Ulrich Drepper <drepper@cygnus.com>
+ * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
+ definitions. We must not assume they are sorted in the file
+ according to their index numbers.
- * elf-m10300.c: Let ELF header now define the macros to get the enum.
- * elf32-mips.c: Likewise.
- * elf32-ppc.c: Likewise.
+2000-05-31 Alan Modra <alan@linuxcare.com.au>
-Wed Jul 22 13:53:52 1998 Nick Clifton <nickc@cygnus.com>
+ * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
+ selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
+ R_PARISC_DIR17F are for absolute branches; Handle them as such.
- * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in
- bfd_coff_set_symbol_class(), in order to avoid K&R compatability
- prblems.
- * bfd-in.h: Regenerate.
- * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class'
- parameter to 'unsigned int' to avoid K&R compatability problems.
+2000-05-30 Nick Clifton <nickc@cygnus.com>
-Wed Jul 22 16:43:24 1998 Ian Lance Taylor <ian@cygnus.com>
+ * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
+ 80960CA, 80960MC as valid machine names.
- * ieee.c (ieee_find_nearest_line): Change filename_ptr and
- functionname_ptr to be const. Change line_ptr to be unsigned.
+2000-05-30 H.J. Lu <hjl@gnu.org>
- * coffcode.h (coff_link_output_has_begun): Simplify handling when
- macro is not defined. Change second parameter from bfd_link_info
- to coff_final_link_info. Add prototype.
- (coff_final_link_postscript): Simplify handling when macro is not
- defined. Add prototype.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
+ visibility bits if the symbol is undefined. Correctly handle
+ weak undefined symbols with hidden and internal attributes.
-1998-07-22 13:08 Ulrich Drepper <drepper@cygnus.com>
+ * elflink.h (elf_link_add_object_symbols): Always turn the
+ symbol into local if it has the hidden or internal attribute.
- * elf-mn10300.c: Before include system specific ELF header define
- START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
- * elf32-mips.c: Likewise.
- * elf32-ppc.c: Likewise.
+2000-05-29 Philip Blundell <philb@gnu.org>
-Wed Jul 22 13:46:51 1998 Ian Lance Taylor <ian@cygnus.com>
+ * ppcboot.c: Add packed attribute if compiling with GCC.
- * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
- temporary patch over to elf64-mips.c as well.
+2000-05-29 Anatoly Vorobey <mellon@pobox.com>
-1998-07-21 Ulrich Drepper <drepper@cygnus.com>
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
- * elf32-mips.c (reloc_type): Temporarily disable definition of
- standard relocation since they are now defined in elf/mips.h.
+2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
-Tue Jul 21 09:47:00 1998 Catherine Moore <clm@cygnus.com>
+ * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
+ elfcore_grok_psinfo): Add code to allow debugging a 32-bit
+ corefile on a 64-bit (Sparc Solaris) host. Also clean up
+ a few old comments.
- * elf-m10200.c (mn10200_elf_final_link_relocate):
- Modify range test for case R_MN10200_8.
+2000-05-26 Alan Modra <alan@linuxcare.com.au>
- * elf-m10300.c (mn10300_elf_final_link_relocate):
- Modify range test for case R_MN10300_8.
+ * Makefile.am: Update dependencies with "make dep-am"
+ * Makefile.in: Regenerate.
-Mon Jul 20 18:50:54 1998 Richard Henderson <rth@cygnus.com>
+ * sysdep.h (gettext, dgettext, dcgettext, textdomain,
+ bindtextdomain): Replace defines with those from intl/libgettext.h
+ to quieten gcc warnings.
- * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
- * elf32-i386.c (elf_backend_got_header_size): Define.
- (elf_backend_plt_header_size): Define.
- * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
- * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
- * elfxx-target.h: Provide a default of zero.
- * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
- * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
+2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
- * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
- entry from an executable, even if the plt refcount goes to 0.
+ * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
-Mon Jul 20 12:47:26 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * archive.c (normalize, bfd_bsd_truncate_arname,
+ bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
+ file names with backslashes.
- * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
- directory name at the line number.
+ * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
+ before opening it.
- * elf.c (_bfd_elf_find_nearest_line): Also consider symbols
- with an unspecified type.
+ * sysdep.h: Include filenames.h.
-Wed Jul 15 11:20:01 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-05-26 Alan Modra <alan@linuxcare.com.au>
- * sunos.c: Add undef of valid to avoid problem on SunOS.
+ * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
-Tue Jul 14 15:30:59 1998 Richard Henderson <rth@cygnus.com>
+2000-05-26 Jakub Jelinek <jakub@redhat.com>
- * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize.
+ * elf64-sparc.c (sparc64_elf_relax_section): New.
+ (sparc64_elf_relocate_section): Optimize tail call into branch always
+ if possible.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ (elf32_sparc_relax_section): New.
-Tue Jul 14 11:22:21 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-05-26 Jakub Jelinek <jakub@redhat.com>
- * elf32-m68k.c (elf_m68k_check_relocs): Also reference count
- R_68K_PCxx and R_68K_xx relocations. Make sure that
- ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
- (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
- R_68K_xx relocations.
- (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
- that has no plt entry.
- (elf_m68k_relocate_section): Ignore the plt offset in a static
- link.
- * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
- an ignored symbol.
- (elf_gc_common_finalize_got_offsets): Set the got offsets also in
- a static link.
+ * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
+ Remove unusued variables.
+ (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
+ (sparc64_elf_merge_private_bfd_data): Fix shared library case from
+ previous fix, so that shared libs really don't influence targets
+ extension mask and memory model.
- * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
- types.
- (howto_table, reloc_map): Add entries for them.
- (elf_m68k_check_relocs): Handle them. Implement reference
- counting for got and plt entries.
- (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
- (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
- symbols.
- (rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
- (elf_m68k_relocate_section): Handle the new reloc types.
- (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
- elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
- * elflink.h (elf_link_add_object_symbols): When creating an
- indirect reference for symbol versioning also copy the plt
- offset.
- (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
- flag also reset the plt offset.
- (elf_link_assign_sym_version): Likewise.
- (elf_gc_common_finalize_got_offsets): Increment the got offset by
- the size of the entry in bytes.
- (elf_gc_allocate_got_offsets): Likewise.
+2000-05-23 H.J. Lu <hjl@gnu.org>
-Tue Jul 14 11:18:14 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf64-alpha.c (elf64_alpha_relocate_section): Check
+ h->root.other not h->other.
+ * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
- * elflink.h (elf_gc_sections): Return true rather than falling off
- the bottom.
+ * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
- * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
- xmalloc.
+2000-05-23 H.J. Lu <hjl@gnu.org>
-Mon Jul 13 11:06:31 1998 Nick Clifton <nickc@cygnus.com>
+ * elf32-i386.c (elf_i386_relocate_section): Don't allow the
+ undefined symbol with the non-default visibility attributes.
+ * elf-hppa.h (elf_hppa_relocate_section): Likewise.
+ * elf32-arm.h (elf32_arm_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
- * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a
- comment describing when it should be enabled.
- Changed definition of USER_LABEL_PREFIX to "", to fall into line
- with GCC sources.
+2000-05-22 Richard Henderson <rth@cygnus.com>
-Mon Jul 13 13:06:54 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
+ PCREL22, PCREL64I. Zero size of special relocs.
+ (elf64_ia64_reloc_type_lookup): Likewise.
+ (USE_BRL, oor_brl, oor_ip): New.
+ (elf64_ia64_relax_section): New.
+ (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
+ (elf64_ia64_install_value): Likewise, plus PCREL21BI.
+ (elf64_ia64_relocate_section): Likewise.
+ (bfd_elf64_bfd_relax_section): New.
+ * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
+ (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
+ * bfd-in2.h, libbfd.h: Regenerate.
- * ieee.c (ieee_slurp_external_symbols): Handle call optimization
- information ATN records.
+2000-05-22 Nick Clifton <nickc@cygnus.com>
-Fri Jul 10 16:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
+ * configure.in : Add peigen.lo to MIPS PE targets.
+ * configure: Regenerate.
- * ieee.c (ieee_slurp_external_symbols): Select an appropriate
- section for an absolute symbol in a fully linked file. Based on
- patch from Christian Holland <CHolland@de.lucent.com>.
+2000-05-22 Momchil Velikov <velco@fadata.bg>
-Wed Jul 8 11:29:56 1998 Manfred Hollstein <manfred@s-direktnet.de>
+ * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
+ only if it is known for both input and output bfds. Separate
+ error message strings as in some languages, it may be necessary
+ to change more than one place in the string to change between
+ 'big' and 'little'.
- * coff-m88k.c (m88k_special_reloc): Don't lose the information
- that a symbol is undefined.
+ * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
+ endianess checks, call _bfd_generic_verify_endian_match() instead.
-Tue Jul 7 21:47:02 1998 Jeffrey A Law (law@cygnus.com)
+ * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
- * som.c (som_bfd_gc_sections): Define.
+ * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
-Mon Jul 6 11:35:50 1998 Nick Clifton <nickc@cygnus.com>
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
+ endianess before checking bfd flavours.
- * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about
- overflows in ARM_26D patches, since they have already been
- implmented. Patch submitted by Dr. R.J. Black <rjb@dcs.gla.ac.uk>
+2000-05-22 H.J. Lu <hjl@gnu.org>
-Sat Jul 4 12:25:36 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (elf_link_output_extsym): Clear the visibility
+ field for symbols not defined locally.
- * coffcode.h (coff_write_object_contents): If we have any long
- section names, call coff_write_symbols even if there are no
- symbols.
+2000-05-18 Alan Modra <alan@linuxcare.com.au>
-Fri Jul 3 13:11:35 1998 Ian Lance Taylor <ian@cygnus.com>
+ * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
+ re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
+ (hppa_rebuild_insn): Mask immediate bits here instead.
+ * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
- * elf.c (copy_private_bfd_data): Only set phdr_included once for a
- PT_LOAD segment, rather than only setting it once for the entire
- file.
+2000-05-18 Momchil Velikov <velco@fadata.bg>
- * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
- rather than ignoring every phdr with a p_paddr of 0, ignore all
- the phdrs if they all have a p_paddr of 0.
+ * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
+ relocs for an executable, ensure that they are virtual addresses.
- * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
- section was discarded from the link.
+2000-05-18 Jeffrey A Law (law@cygnus.com)
-Fri Jul 3 14:39:05 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+ * config.bfd (hppa*64*-*-hpux11*): New target triplet.
- * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
+2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
+ Rick Gorton <gorton@scrugs.lkg.dec.com>
-Fri Jul 3 14:35:48 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+ * elflink.h: Add emitrelocations support: when enabled, relocation
+ information and relocation sections are put into final output
+ executables. If the emitrelocations flag is set, do the following:
+ (elf_bfd_final_link): Emit relocation sections.
+ (elf_link_input_bfd): Compute relocation section contents.
+ (elf_gc_sections): Don't clean relocation sections.
- * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
- floating point operations.
+2000-05-16 Catherine Moore <clm@cygnus.com>
-Thu Jul 2 18:37:25 1998 Ian Lance Taylor <ian@cygnus.com>
+ * som.c (som_decode_symclass): Recognize weak symbols.
- * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
- function symbols.
+2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
-Thu Jul 2 14:59:42 1998 Klaus Kaempf <kkaempf@rmi.de>
+ * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
+ read idata section only from dataoff.
+ (pe_print_edata): Correctly check for valid eat_member.
- Merge of vax/vms (read-only) support
- * configure.com: Support Vax target.
- * makefile.vms: Support Vax target.
- * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
- * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
- support.
- * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
- support.
- * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
- support.
- * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
- support.
- * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
- support.
- * libbfd.c (real_read): Use unbuffered read on VMS/Vax.
- * targets.c (bfd_target_ovax_flavour): New flavour.
- (vms_alpha_vec): Renamed from evax_alpha_vec.
- (vms_vax_vec): New.
- (target_vector): Update accordingly.
- * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
- evax_alpha_vec.
- (vax*-*-*vms*): New target.
- * Makefile.am: Update for renamed files. Rebuild dependencies.
- * bfd-in2.h: Rebuild.
- * configure.in, Makefile.in, aclocal.m4: Rebuild.
-
-Thu Jul 2 13:31:55 1998 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patch from Matt Semersky <matts@scd.hp.com>:
- * linker.c (_bfd_generic_final_link): Force a trailing NULL
- pointer on abfd->outsymbols.
- (generic_add_output_symbol): Handle NULL sym parameter.
-
-Wed Jul 1 17:05:53 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf.c (copy_private_bfd_data): Add support for changing VMA or
- LMA of sections.
-
-Wed Jul 1 16:58:50 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
- when handling 32 bit immediate relocs.
- * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
-
-Tue Jun 30 09:55:03 1998 Jeffrey A Law (law@cygnus.com)
-
- * section.c (STD_SECTION): Account for recently added gc_mark
- field in struct asection.
-
- * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function.
- (bfd_elf32_bfd_merge_private_bfd_data): Define.
-
-Thu Jun 25 18:31:41 1998 Richard Henderson <rth@cygnus.com>
-
- ELF Section-level Garbage Collection:
- * bfd.c (bfd_gc_sections): New.
- * aout-adobe.c: Hook to default implementation.
- * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise.
- * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise.
- * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise.
- * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise.
- * tekhex.c, versados.c: Likewise.
- * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New.
- * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections.
-
- * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New.
- (bfd_generic_gc_sections): New.
- * section.c (SEC_KEEP): New.
- (asection): Add gc_mark member.
-
- * elfcode.h (elf_gc*): New name remappings.
- * elflink.h (elf_link_input_bfd): Don't set contents on stabs
- sections to be excluded.
- (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New.
- (elf_gc_propogate_vtable_entries_used): New.
- (elf_gc_smash_unused_vtentry_relocs): New.
- (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New.
- (elf_gc_common_finalize_got_offsets): New.
- (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New.
- * elfxx-target.h: Add and default gc hooks.
-
- * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset
- for unions.
- (struct elf_obj_tdata): Likewise for local_got_offsets.
- * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses.
- * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise.
- * elf64-sparc.c, elflink.h: Likewise.
-
- * elf-bfd.h (struct elf_link_hash_entry): Add vtable members.
- (ELF_LINK_HASH_MARK): Define.
- (struct elf_backend_data): Add GC hooks.
- * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members.
-
- * elf-m10300.c (mn10300_elf_check_relocs): New.
- (mn10300_elf_gc_mark_hook): New.
- (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New.
- (elf_mn10300_howto, mn10300_reloc_map): Handle them.
- (mn10300_elf_final_link_relocate): Likewise.
- (mn10300_elf_relocate_section): Likewise.
- (elf_backend_can_gc_sections): Define.
- * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New.
- (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New.
- (bfd_elf32_bfd_reloc_type_lookup): Handle them.
- (mips_info_to_howto_rel): Likewise.
- (mips_elf_relocate_section): Likewise.
- (mips_elf_check_relocs): Likewise.
- (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New.
- (elf_backend_can_gc_sections): Define.
- * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New.
- (ppc_elf_howto_raw): Handle them.
- (ppc_elf_reloc_type_lookup): Likewise.
- (ppc_elf_relocate_section): Likewise.
- (ppc_elf_check_relocs): Reference count .got and .plt entries.
- Handle new vtable relocs.
- (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries.
- (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New.
- (elf_backend_can_gc_sections): Define.
+2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
-Fri Jun 26 10:48:23 1998 Jeffrey A Law (law@cygnus.com)
+ * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
- * archures.c (bfd_mach_mn10300): Define.
- * elf-m10300.c: Include elf/mn10300.h
- (elf_mn10300_mach): New function.
- (_bfd_mn10300_elf_final_write_processing): Likewise.
- (_bfd_mn10300_elf_object_p): Likewise.
- (elf_backendfinal_write_processing): Define.
- (elf_backend_object_p): Likewise.
+2000-05-14 Philip Blundell <philb@gnu.org>
-Thu Jun 25 18:31:08 1998 Nick Clifton <nickc@cygnus.com>
+ * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
- * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S
- relocation.
+2000-05-12 Alan Modra <alan@linuxcare.com.au>
-Wed Jun 24 17:17:57 1998 Ian Lance Taylor <ian@cygnus.com>
+ * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
- * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
- link_next field, not the next field.
+ * peigen.c (pe_print_idata): Look for .idata section and print
+ info even if data directory has zero entries. Read idata section
+ starting from dataoff, and adjust all data offsets to suit. Cast
+ all bfd_vma vars to unsigned long before passing to fprintf.
+ * peigen.c (pe_print_edata): Similarly, look for .edata section
+ and print info even if data directory has zero entries. Cast
+ all bfd_vma vars to unsigned long before passing to fprintf.
-Sun Jun 21 19:38:39 1998 Ian Lance Taylor <ian@cygnus.com>
+ From Szabolcs Szakacsits <szaka@F-Secure.com>
+ * peigen.c (pe_print_idata): Use bfd_section_size rather than data
+ directory size which may be bogus.
+ * peigen.c (pe_print_edata): Similarly.
- * elf.c (map_sections_to_segments): Check the section address
- against the phdr size both with and without a modulo of
- maxpagesize.
+2000-05-09 Alan Modra <alan@linuxcare.com.au>
-Fri Jun 19 17:08:18 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
+ section is empty.
+ (copy_private_bfd_data): Allow for space possibly taken up by elf
+ headers when calculating segment physical address from lma.
- * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
- linker created empty input section if the output section has the
- same name.
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
- * elflink.h (elf_link_output_extsym): Print an error message if
- _bfd_elf_section_from_bfd_section fails.
+ * versados.c (versados_scan): Init stringlen and pass_2_done.
- * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
- failure.
+ * trad-core.c (trad_unix_core_file_p): Return
+ bfd_error_wrong_format rather than bfd_error_file_truncated.
-Tue Jun 16 11:55:55 1998 Ian Lance Taylor <ian@cygnus.com>
+ * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
+ add_data_entry. DataDirectory virtual address is relative.
+ (pe_print_idata): Account for relative DataDirectory virtual
+ addresses. Don't trash datasize inside POWERPC_LE_PE code.
+ (pe_print_edata): Similarly.
- * elf.c (copy_private_bfd_data): Improve handling of Solaris
- native linker output. Avoid putting an empty section in more than
- one segment.
+ From Szabolcs Szakacsits <szaka@F-Secure.com>
+ * peigen.c (dir_names): Add Delay Import Directory.
+ (pe_print_idata): Always search for bfd section containing
+ idata address rather than looking up section name. Print this
+ section name rather than .idata.
+ (pe_print_edata): Similarly. Also print some fields as %08lx.
+ (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
+ Win32Version.
-Fri Jun 12 13:30:17 1998 Tom Tromey <tromey@cygnus.com>
+2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
- * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
- ($(PACKAGE).pot): Unconditionally depend on POTFILES.
+ * xcoff.h: Rename to xcoff-target.h
+ * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
+ * coff-rs6000.c: Ditto.
+ * coff64-rs6000.c: Ditto.
+ * coff-pmac.c: Ditto.
+ * Makefile.in: Regenerate.
-Fri Jun 12 13:34:02 1998 Doug Evans <devans@canuck.cygnus.com>
+2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
- * elf.c (swap_out_syms): New arg relocatable_p.
- Don't add section VMA to symbols for relocatable output.
- (_bfd_elf_compute_section_file_positions): Update call to
- swap_out_syms.
+ * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
+ Change U802TOC64MAGIC to U803XTOCMAGIC.
-Mon Jun 8 15:20:57 1998 Nick Clifton <nickc@cygnus.com>
+2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
- * elf32-v850.c (v850_elf_perform_relocation): Make comparisons
- against 'addend' be signed rather than unsigned.
+ * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
+ * bfd-in.h: Prototype bfd_elf_get_arch_size.
+ * bfd-in2.h: Prototype bfd_elf_get_arch_size.
-Sat Jun 6 00:31:21 1998 Nick Clifton <nickc@cygnus.com>
+2000-05-04 Alan Modra <alan@linuxcare.com.au>
- * elf32-m32r.c: Add prototyps for static functions.
+ * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
- * coff-arm.c: Add prototypes for static functions.
+2000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>
-Fri Jun 5 17:21:51 1998 Nick Clifton <nickc@cygnus.com>
+ * elflink.h (elf_link_add_object_symbols): Reset dynindx for
+ hidden and internal symbols.
+ (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
+ visibility.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
+ assign a PLT or GOT entry to symbols with hidden and
+ internal visibility.
- * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the
- LMA is used to order sections in a segment.
+2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
- * elf32-v850.c: Add prototypes for static functions.
- Change type of addend parameter to bfd_vma in various functions.
+ * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
+ the .bss section.
+ * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
-Fri Jun 5 18:09:58 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-05-02 H.J. Lu <hjl@gnu.org>
- * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
- complain_overflow_signed instead of complain_overflow_bitfield.
+ * elf.c (prep_headers): Use ELFOSABI_NONE instead of
+ ELFOSABI_SYSV.
-Fri Jun 5 15:11:11 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-05-02 Alan Modra <alan@linuxcare.com.au>
- * elf.c (elf_map_symbols): Don't add section VMA to symbol value
- when comparing against 0.
+ * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
+ * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
+ dependencies.
+ * Makefile.in: Regenerate.
-Wed Jun 3 17:52:49 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-05-01 Jim Wilson <wilson@cygnus.com>
- * Makefile.am (config.status): New target.
+ * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
+ (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
+ (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
+ (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
* Makefile.in: Rebuild.
-Wed Jun 3 12:18:24 1998 Stan Cox <scox@equinox.cygnus.com>
-
- * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an
- error if previous object endianness doesn't match current object.
-
-Tue Jun 2 17:50:59 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf32-v850.c (v850_elf_print_private_bfd_data): Call
- _bfd_elf_print_private)bfd_data ().
-
-Tue Jun 2 15:29:35 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * elflink.h (elf_merge_symbol): Don't always set type_change_ok
- and size_change_ok.
- (elf_link_add_object_symbols): Set type_change_ok and
- size_change_ok before calling elf_merge_symbol.
-
- * elf32-mips.c (mips_elf_relocate_section): If we issue an
- undefined symbol error, don't also issue an overflow error.
-
-Tue Jun 2 13:51:00 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * elf32-ppc.c (ppc_elf_relocate_section): The target of an
- R_PPC_LOCAL24PC relocation should be local; if not, print an error
- message instead of crashing.
+2000-05-02 Alan Modra <alan@linuxcare.com.au>
+
+ * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
+ doesn't work very well.
+
+ * elf-hppa.h (elf_hppa_internal_shdr): Define.
+ (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
+ Set hdr->s_type to 1 if ARCH_SIZE == 32.
+ (_bfd_elf_hppa_gen_reloc_type): Add prototype.
+ (elf_hppa_info_to_howto): Likewise.
+ (elf_hppa_info_to_howto_rel): Likewise.
+ (elf_hppa_reloc_type_lookup): Likewise.
+ (elf_hppa_is_local_label_name): Likewise.
+ (elf_hppa_fake_sections): Likewise.
+ (elf_hppa_final_write_processing): Likewise.
+ (elf_hppa_howto_table): Fully initialise all entries.
+ (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
+ (elf_hppa_info_to_howto): Likewise.
+ (elf_hppa_info_to_howto_rel): Likewise.
+ (elf_hppa_reloc_type_lookup): Likewise.
+ (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
+ elf_hppa_unmark_useless_dynamic_symbols,
+ elf_hppa_remark_useless_dynamic_symbols,
+ elf_hppa_record_segment_addrs, elf_hppa_final_link,
+ elf_hppa_relocate_section, elf_hppa_final_link_relocate,
+ elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
+ elf32-hppa.c mess is cleaned up.
+ (elf_hppa_final_link_relocate): Make insn and r_type unsigned
+ int. Delete r_field. In case R_PARISC_PCREL21L, don't set
+ r_field then call hppa_field_adjust inline func with variable
+ r_field arg, instead call hppa_field_adjust with fixed arg.
+ In case R_PARISC_PCREL22F, don't set r_field.
+ (elf_hppa_relocate_insn): Change args and return type to unsigned
+ int. Call re_assemble_* funcs to do the work.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
+ sign extending.
+
+ * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
+ extending.
+ (sign_extend): Mask first before sign extending.
+ (low_sign_extend): Rewrite without condition expression.
+ (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
+ dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
+ (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
+ assemble_17, assemble_21, sign_unext, low_sign_unext): Return
+ result as function return value rather than through pointer arg.
+ Accept unsigned int args, and return unsigned int.
+ (re_assemble_3): New. Combines function of dis_assemble_3 with
+ re-assembly of opcode and immediate.
+ (re_assemble_12): Likewise.
+ (re_assemble_16): Likewise.
+ (re_assemble_17): Likewise.
+ (re_assemble_21): Likewise.
+ (re_assemble_22): Likewise.
+ (hppa_field_adjust): Rewrite and document, paying attention to
+ size of types and signed/unsigned issues.
+ (get_opcode): Shift before masking.
+ (FDLW): Rename to FLDW.
+ (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
+ (hppa_rebuild_insn): Change args and return value to unsigned
+ int. Make use of re_assemble_*. Correct case 11.
+
+ * dep-in.sed: Handle ../opcodes/.
+ * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
+ elf64-hppa.h, hppa_stubs.h, xcoff.h.
+ (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
+ Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
+ elfarm-nabi.lo dependencies outside of auto-dependency area.
+ Regenerate dependencies.
+ * Makefile.in: Regenerate.
-Mon Jun 1 18:23:12 1998 Yuli Barcohen <yuli.barcohen@telrad.co.il>
+ * configure.in (TRAD_HEADER): Test non-null before
+ AC_DEFINE_UNQUOTED.
+ * configure: Regenerate.
- * archures.c (bfd_mach_cpu32): Define.
- (bfd_default_scan): Add case for 68060. Fix 68332 case to use
- bfd_mach_cpu32.
- * cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
- * ieee.c: Include <ctype.h>.
- (ieee_object_p): Parse out process ID string to make it more
- likely to be acceptable for bfd_scan_arch.
- * bfd-in2.h: Rebuild.
+ * reloc.c: Fix mis-spelling in comment.
-Mon Jun 1 11:12:02 1998 Nick Clifton <nickc@cygnus.com>
+2000-05-01 Alan Modra <alan@linuxcare.com.au>
- * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call
- _bfd_elf_print_private_bfd_data() so that the program header will
- be displayed.
+ * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
+ * vms.c (vms_openr_next_archived_file): Return NULL.
-Mon Jun 1 12:14:28 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
- * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
- 0x68. Reindent. Add some comments.
+ * coffcode.h Copy changes mistakenly done to libcoff.h in
+ 4/24/2000 patch.
-Fri May 29 09:58:08 1998 Nick Clifton <nickc@cygnus.com>
+2000-04-29 Andreas Jaeger <aj@suse.de>
- * elf.c (copy_private_bfd_data): Adjust physical address of
- segment in output BFD to contain LMAs of its sections.
+ * libbfd-in.h: Correctly check GCC version.
+ * bfd-in.h: Likewise.
+ * libhppa.h: Likewise.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
-Tue May 26 19:37:47 1998 Stan Cox <scox@equinox.cygnus.com>
+2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
- * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
- elf32_sparc_relocate_section): Added R_SPARC_32LE for little
- endian data 32 bit relocations.
- (elf32_sparc_merge_private_bfd_data): Check if linking little
- endian objects with big endian objects.
- (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le.
- (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags.
- * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE.
- * reloc.c: Same.
- * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le
- * archures.c (bfd_mach_sparc_sparclite_le): New.
- * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New.
+ * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
+ coffdu-rs6000.{lo,c}.
+ (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
+ on xcoff.h
+ * Makefile.in: Regenerate.
+ * xcoff.h: New file.
+ * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
+ * coff-rs6000.c: Move all declarations and defines that are
+ common to the xcoff backends into xcoff.h
+ * coff64-rs6000.c: Ditto,
-Thu May 21 16:59:28 1998 Nick Clifton <nickc@cygnus.com>
+2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
- * peicode.h (add_data_entry): Fix precedence of operators in if ()
- statement.
+ * coff-mips.c (mips_ecoff_backend_data): Add initialization of
+ _bfd_coff_force_symnames in strings and
+ _bfd_coff_debug_string_prefix_length to their default values.
+ * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
-Tue May 19 18:41:19 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
- * bfd-in.h: Move over patch to bfd-in2.h.
+ * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
+ _bfd_coff_force_symnames in strings and
+ _bfd_coff_debug_string_prefix_length to their default values.
- * reloc.c (bfd_check_overflow): Add casts before shifts which may
- not fit in 32 bits.
- (_bfd_relocate_contents): Likewise.
+2000-04-27 Alan Modra <alan@linuxcare.com.au>
-Mon May 18 14:44:15 1998 Nick Clifton <nickc@cygnus.com>
+ * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
+ Check local_got_refcounts before dereferencing.
- * peicode.h (add_data_entry): If the section has no private data
- then do not create a Data Dictionary entry for it.
+ * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
+ before deciding we don't need R_PPC_PLT32 relocation.
+ (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
+ dereferencing.
-Mon May 18 00:09:28 1998 Richard Henderson <rth@cygnus.com>
+ * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
- * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes.
- (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots,
- elf64_alpha_size_got_sections): Rewrite, handling multiple got
- subsections during relaxation more correctly.
+ * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
+ .plt entries.
+ (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
+ (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
+ (elf_i386_relocate_section): Allow for .plt to go missing.
+ (elf_i386_finish_dynamic_symbol): Use same test to decide if we
+ can use a relative reloc for got as elf_i386_relocate_section.
+ (bfd_elf32_bfd_final_link): Define to use gc form of final link.
-Thu May 14 14:22:58 1998 Nick Clifton <nickc@cygnus.com>
+2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
- * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class ().
- Add extra argument to bfd_arm_process_before_allocation ().
- * bfd-in.h: Reflect changes made in bfd-in2.h.
- * coffgen.c (bfd_coff_set_symbol_class): New function. Set the
- coff class of a BFD symbol.
- * coff-arm.c: Add support for interworking between Thumb code and
- non-interworking aware ARM code.
+ * config.bfd: Remove extraneous bfd_powerpc_64_arch.
-Sun May 10 22:33:59 1998 Jeffrey A Law (law@cygnus.com)
+2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
- * po/Make-in (install-info): New target.
+ * Makefile.am (coff64-rs6000.lo): New rule.
+ * Makefile.in: Regenerate.
+ * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
+ xcoff_is_local_label_name, xcoff_rtype2howto,
+ xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
+ xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
+ xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
+ (NO_COFF_SYMBOLS): Define.
+ (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
+ xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
+ internally.
+ (MINUS_ONE): New macro.
+ (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
+ relocation.
+ (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
+ coff_SWAP_aux_out): Map to the new functions.
+ * coff64-rs6000.c: New file.
+ * libcoff.h (bfd_coff_backend_data): Add new fields
+ _bfd_coff_force_symnames_in_strings and
+ _bfd_coff_debug_string_prefix_length.
+ (bfd_coff_force_symnames_in_strings,
+ bfd_coff_debug_string_prefix_length): New macros for above fields.
+ * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
+ Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
+ of using coff_swap_sym_in directly.
+ (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
+ (coff_set_flags) Set magic for XCOFF64.
+ (coff_compute_section_file_positions): Add symbol name length to
+ string section length if bfd_coff_debug_string_prefix_length is
+ true.
+ (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
+ (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
+ using coff_swap_lineno_in directly.
+ (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
+ and _bfd_coff_debug_string_prefix_length fields.
+ * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
+ symbol names into strings table when
+ bfd_coff_force_symnames_in_strings is true.
+ * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
+ SET_RELOC_VADDR): New macros.
+ (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
+ (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
+ code.
+ (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
+ changes within RS6000COFF_C specific code.
+ (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
+ MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
+ * reloc.c (bfd_perform_relocation, bfd_install_relocation):
+ Extend existing hack on target name.
+ * xcofflink.c (XCOFF_XVECP): Extend existing hack on
+ target name.
+ * coff-tic54x.c (ticof): Keep up to date with new fields
+ in bfd_coff_backend_data.
+ * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
+ targ_selvecs to include rs6000coff64_vec for rs6000.
+ * configure.in: Add rs6000coff64_vec case.
+ * cpu-powerpc.c: New bfd_arch_info_type.
+
+2000-04-24 Jeffrey A Law (law@cygnus.com)
+
+ * config.bfd: Only disable elf32-hppa vectors, not all of the
+ BSD and OSF configuration support. Provide (disabled) clauses
+ for PA64 support.
+ * configure.in: Add clause for PA64 support.
+ * configure: Rebuilt.
-Thu May 7 17:40:56 1998 Ian Lance Taylor <ian@cygnus.com>
+ * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
+ (bfd_elf64_hppa_vec): Declare.
- * filemode.c: Remove; not used.
+ * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
+ (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
+ (elf64-hppa.lo): Add dependencies.
+ * Makefile.in: Rebuilt.
- If sysdep.h includes a header file, don't include it again:
- * aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
- <errno.h>.
- * aoutx.h: Don't include <string.h>. Use "sysdep.h" rather than
- <sysdep.h>.
- * archive.c: Don't include <string.h> or <errno.h>.
- * evax-alpha.c; Don't include <stdio.h>.
- * evax-egsd.c: Likewise.
- * evax-etir.c: Likewise.
- * evax-misc.c: Likewise.
- * evax-emh.c: Likewise. Also, don't include <sys/types.h>.
- * hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
- <errno.h>.
- * hpux-core.c: Likewise.
- * netbsd-core.c: Likewise.
- * som.c: Likewise.
- * libbfd.c: Don't include <sys/types.h>.
- * nlmcode.h: Don't include <string.h>.
- * osf-core.c: Don't include <string.h> or <stdio.h>.
- * ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
- <errno.h>, or <unistd.h>.
- * trad-core.c: Don't include <stdio.h> or <sys/types.h>.
+ * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
-Thu May 7 13:12:50 1998 Klaus Kaempf <kkaempf@progis.de>
+2000-04-24 Jason Eckhardt <jle@cygnus.com>
- * configure.com: If the version number can not be found in
- configure.in, set it to "unknown" rather than "2.8.1".
+ * libhppa.h (dis_assemble_16): New function.
+ (pa_arch): Added pa20w element.
-Wed May 6 09:46:05 1998 Gavin Koch <gavin@cygnus.com>
+2000-04-24 Ulrich Drepper <drepper@cygnus.com>
- * elf32-mips.c (elf_mips_mach): New.
- (_bfd_mips_elf_object_p): Use elf_mips_mach.
- (_bfd_mips_elf_final_write_processing): Use the names
- of machines, rather than the numbers. Set both the ARCH
- and MACH in e_flags. Handle a few more specific machines.
- (_bfd_mips_elf_merge_private_bfd_data): Merge both
- EF_MIPS_ARCH and EF_MIPS_MACH.
+ * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
+ bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
+ bfd_elf64_slurp_reloc_table.
-Tue May 5 21:01:53 1998 Richard Henderson <rth@cygnus.com>
+ * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
+ definitions to get external names.
+ (elf_write_relocs): Renamed from write_relocs and make global.
+ (elf_slurp_reloc_table): Make global.
+ (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
- * syms.c (bfd_is_local_label): Revert last change.
- * srec.c (srec_write_symbols): Discard debugging symbols.
+ * archive.c (hpux_uid_gid_encode): New function.
+ (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
+ defined and the ID is greater than 99999.
+ (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
+ special uid/gid fields into 32 bit values.
-Tue May 5 23:36:06 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-21 Matthew Green <mrg@cygnus.com>
- * som.c: Include <ctype.h>.
- * som.h: Don't include sysdep.h.
+ * config.bfd: Add NetBSD/sparc64 support.
-Tue May 5 18:29:24 1998 Tom Tromey <tromey@cygnus.com>
+Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+ Timothy Wall <twall@cygnus.com>
+ Jim Wilson <wilson@cygnus.com>
- * libbfd.h: Rebuilt.
- * libbfd-in.h: Removed gettext includes and defines.
- * sysdep.h: Moved gettext-related includes and defines here.
+ * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
+ (ALL_MACHINES_CFILES): Add cpu-ia64.c.
+ (BFD64_BACKENDS): Add elf64-ia64.lo.
+ (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
+ (cpu-ia64.lo, elf64-ia64.lo): New rules.
+ * Makefile.in: Rebuild.
+ * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
+ (bfd_ia64_arch): Declare.
+ (bfd_archures_list): Add bfd_ia64_arch.
+ * bfd-in2.h: Rebuild.
+ * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
+ * configure: Rebuild.
+ * configure.host: (ia64-*-linux*): New host.
+ * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
+ bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
+ * elf.c (prep_headers): Add bfd_arch_ia64.
+ * libbfd.h: Rebuild.
+ * reloc.c: Add IA-64 relocations.
+ * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
+ Declare.
+ (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
+ * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
-Tue May 5 16:47:54 1998 Richard Henderson <rth@cygnus.com>
+2000-04-21 Richard Henderson <rth@cygnus.com>
- * srec.c (srec_write_symbols): Use bfd_is_local_label rather than
- an ad-hoc test. Kill bogus #if 0 code.
- * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.
+ * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
+ contents when performing a partial link.
+ (bfd_elf_d30v_reloc_21): Likewise.
-Mon May 4 16:10:33 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-20 H.J. Lu <hjl@gnu.org>
- * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address
- when generating a normal executable for a symbol defined in a
- regular file. When copying a reloc into the output file, adjust
- the addend for a PC relative reloc against a global symbol.
+ * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
+ patch to symbols defined by a shared object.
+ * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
-Mon May 4 10:08:18 1998 Tom Tromey <tromey@cygnus.com>
+2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * libbfd.h: Rebuilt.
- * libbfd-in.h (_): Define as dgettext.
+ K&R compiler fixes.
+ * dwarf2.c (concat_filename): Avoid string literal concatenation.
+ * ieee.c (ieee_get_symtab): Don't initialise union in struct.
-Mon May 4 11:02:23 1998 Ian Lance Taylor <ian@cygnus.com>
+Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
- * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma,
- not signed.
- * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
- when declaring parameter types.
- (pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
+ * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
+ (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
+ (coff-ia64.lo): Add dependency.
+ * Makefile.in: Regenerate.
+ * coff-ia64.c: New file.
+ * efi-app-ia32.c: Ditto.
+ * efi-app-ia64.c: Ditto.
+ * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
+ (coff_set_flags): Ditto.
+ (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
+ * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
+ * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
+ * configure: Regenerate.
+ * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
+ (PUT_OPTHDR_IMAGE_BASE): Ditto.
+ (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
+ (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
+ (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
+ (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
+ (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
+ (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
+ (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
+ (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
+ (GET_PDATA_ENTRY): Ditto.
+ * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
+ data_start. Use above macros to read fields that are 64 bit wide for
+ COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
+ (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
+ FileAlignment and SectionAlignment to minimum alignment if they
+ are zero.
+ (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
+ Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
+ (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
+ Use above macros to write fields that are 64 bit wide for
+ COFF_WITH_PEP64.
+ (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
+ 5*4 otherwise. This should be right for IA-32 and IA-64, but may
+ be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
+ value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
+ begin address, end address, and unwind info address only. Use
+ GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
+ print addresses.
+ (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
+ HIGH3ADJ relocation names.
+ (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
+ * targets.c: Declare bfd_efi_app_ia32_vec and
+ bfd_efi_app_ia64_vec.
+ (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
+ bfd_efi_app_ia64_vec.
+
+2000-04-17 Timothy Wall <twall@cygnus.com>
+
+ * bfd-in2.h: Add prototypes for tic54x load page access.
+ * bfd-in.h: Regenerate.
+ * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
+ in customized _set_arch_mach function.
+ * coffcode.h (coff_set_alignment_hook): Set section load page if
+ the appropriate macro is defined.
+ (write_object_contents): Read section load page.
-Wed Apr 29 15:35:03 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-13 Alan Modra <alan@linuxcare.com.au>
- * config.bfd: If we include any ELF targets in targ_defvec and/or
- targ_selvecs, then add the generic ELF targets to targ_selvecs.
- * elf32-gen.c (dummy): New static const variable.
- (elf_generic_info_to_howto): New static function.
- (elf_generic_info_to_howto_rel): New static function.
- (elf_info_to_howto): Define as elf_generic_info_to_howto.
- (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
- * elf64-gen.c: Same changes as elf32-gen.c.
- * elfcode.h (elf_object_p): For the generic target, ignore a
- failure of bfd_default_set_arch_mach. Fix indentation a bit.
+ * elf32-hppa.h: Update copyright date.
-Tue Apr 28 20:05:52 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
+ * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
- * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
- * configure: Rebuild.
+ * elf32-d30v.c (MAX32): Don't use LL suffix.
+ (MIN32): Define in terms of MAX32.
+ (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
-Tue Apr 28 12:16:57 1998 Jason Molenda (crash@bugshack.cygnus.com)
+ * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
+ expression.
- * config.bfd: Update OSR5/Unixware patterns.
+ * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
-Mon Apr 27 18:02:24 1998 Richard Henderson <rth@cygnus.com>
+2000-04-12 Alan Modra <alan@linuxcare.com.au>
- * elf.c (assign_file_positions_for_segments): Allow for holes
- between sections added by a link script.
+ * dep-in.sed: Match space before file name, not after.
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
-Mon Apr 27 11:49:55 1998 Ian Lance Taylor <ian@cygnus.com>
+ * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
+ case, allow address wrap-around stupidly removed 2000-03-17. Sign
+ extend without an if statement.
- * configure.in: Change version number to 2.9.4
- * configure: Rebuild.
+2000-04-11 Alan Modra <alan@linuxcare.com.au>
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * elf.c (bfd_elf_get_bfd_needed_list): New function.
- * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
- * bfd-in2.h: Rebuild.
+ * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
+ signed quantites.
+ * elf32-mips.c (gprel16_with_gp): Likewise.
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
+ here using -0x40000, not (int)0xfffc0000.
+ (elf32_hppa_size_of_stub): Likewise.
-Sat Apr 25 20:07:53 1998 Richard Henderson <rth@cygnus.com>
+2000-04-11 Timothy Wall <twall@cygnus.com>
- * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
- Change all users.
+ * coff-tic54x.c: Now builds with all targets.
+ * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
+ * Makefile.in: Regenerate.
+ * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
+ unitialized variable.
-Sat Apr 25 18:29:07 1998 Richard Henderson <rth@cygnus.com>
+Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
- * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members.
- (elf64_alpha_relax_section): Fill them in.
- (elf64_alpha_relax_opt_call): Implement more than a stub.
- (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
- alignment on .scommon.
- (elf64_alpha_merge_gots): Merge use counts as well.
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure: Re-generate.
-Sat Apr 25 14:07:29 1998 Richard Henderson <rth@cygnus.com>
+2000-04-07 Nick Clifton <nickc@cygnus.com>
- * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
- for calculating a local symbol's address.
- (elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
- Set the .got's cooked size as well as the raw size.
+ * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
+ BFD_RELOC_THUMB_PCREL_BLX.
-Fri Apr 24 09:16:00 1998 Nick Clifton <nickc@cygnus.com>
+ * elf32-arm.h (elf32_arm_final_link_relocate): Handle
+ R_ARM_XPC25 and R_ARM_THM_PC22.
- * elf32-v850.c (v850_elf_print_private_bfd_data): Add
- internationalisation of printed information.
+ * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
+ R_ARM_XPC25 and R_ARM_THM_XPC22.
+ (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
+ R_ARM_[XPC25|THM_XPC22].
- * coff-arm.c (coff_arm_print_private_bfd_data): Add
- internationalisation of printed information.
+ * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
+ elf/arm-oabi.h to elf/arm.h
-Fri Apr 24 12:09:18 1998 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am: Fix dependency for elfarm-oabi.c
+ * Makefile.in: Regenerate.
- * syms.c (struct indexentry): Change directory_name, file_name,
- and function_name fields to char *.
- (struct stab_find_info): Change cached_file_name field to char *.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
-Thu Apr 23 08:13:04 1998 Nick Clifton <nickc@cygnus.com>
+2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
- * peicode.h (dir_names): Add missing N_() macros to dir_names array.
+ * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
+ and restore it on failure. Release newly allocated tdata on
+ failure.
-Wed Apr 22 13:06:15 1998 Tom Tromey <tromey@cygnus.com>
+Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
- * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
+ * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
+ (decode_line_info): Set it. Report error if unit->line_offset is
+ equal to or larger than it.
-Wed Apr 22 17:48:48 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-07 Timothy Wall <twall@cygnus.com>
- * Makefile.am (install-data-local): Make $(includedir).
- * Makefile.in: Rebuild.
+ * targets.c: Added vecs for tic54x.
+ * reloc.c: Added relocs for tic54x.
+ * libbfd.h: Regenerated.
+ * configure: Add TI COFF vecs for tic54x.
+ * configure.in: Ditto.
+ * config.bfd (targ_cpu): Recognize new tic54x target.
+ * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
+ * bfd-in2.h: Add tic54x target and relocations.
+ * Makefile.am, Makefile.in: Add tic54x target.
+ * archures.c (bfd_archures_list): Add tic54x target.
+ * coff-tic54x.c: New.
+ * cpu-tic54x.c: New.
+
+2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * elfcore.h (elf_core_file_p): call backend_object_p which
+ thereby gets an opportunity to update the arch/machine type.
+
+2000-04-06 Timothy Wall <twall@cygnus.com>
+
+ * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
+ class. Handle SEC_CLINK and SEC_BLOCK flags.
+ * section.c: Add SEC_CLINK and SEC_BLOCK flags.
+ * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
+
+2000-04-06 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-arm.h (elf32_arm_set_private_flags): Only check for
+ EF_INTERWORK if this is an unknown EABI.
+ (elf32_arm_merge_private_bfd_data): Check EABI version
+ numbers. Only check EF_xxx flags if the EABI version number
+ is unknown.
+ (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
+ if the EABI version number is unknown.
+ (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
+ if the EABI version number is unknown.
+
+Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
+ BFD_RELOC_SH_LOOP_END.
+ * elf32-sh.c (sh_elf_howto_tab): Change special_func to
+ sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
+ Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
+ (sh_elf_reloc_loop): New function.
+ (sh_elf_reloc): No need to test for always-to-be-ignored relocs
+ any more.
+ (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
+ (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
+ * bfd-in2.h, libbfd.h: Regenerate.
-Wed Apr 22 13:06:15 1998 Tom Tromey <tromey@cygnus.com>
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
- * libbfd-in.h: Use `gettext' and not `dgettext' for now.
+ * po/bfd.pot: Regenerate.
-Wed Apr 22 12:53:40 1998 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am: Remove extraneous mkdep comment.
+ (MKDEP): Use gcc -MM rather than mkdep.
+ (DEP): Quote when passing vars to sub-make. Add warning
+ message to end.
+ (DEP1): Rewrite for "gcc -MM".
+ (CLEANFILES): Add DEP2.
+ Update dependencies.
+ * Makefile.in: Regenerate.
- * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl.
- * Makefile.in: Rebuild.
+2000-04-03 Kevin Buettner <kevinb@redhat.com>
- * bfd-in2.h: Rebuild for Nick's changes.
+ * configure.in: Added corefile support for AIX 4.3. In particular,
+ AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
+ compiling rs6000-core.c.
+ * configure: Regenerated.
-Tue Apr 21 23:11:51 1998 Richard Henderson <rth@cygnus.com>
+2000-04-03 H.J. Lu <hjl@gnu.org>
- * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
- change wrt length == max_namelen.
+ * cache.c (bfd_open_file): Unlink the output file only if
+ it has non-zero size.
-Tue Apr 21 21:19:36 1998 Tom Tromey <tromey@scribbles.cygnus.com>
+2000-04-01 Ken Block USG <block@zk3.dec.com>
- * Many files: Added gettext invocations around user-visible
- strings.
- * libbfd-in.h: Added gettext includes and defines.
- * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
- HAVE_LC_MESSAGES): Define.
- * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
- po/Makefile.
- * Makefile.am (SUBDIRS): Added po.
- (POTFILES): New macro.
- (po/POTFILES.in): New target.
- (SOURCE_HFILES): New macro.
- (HFILES): Use it.
- * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
-
-Tue Apr 21 13:38:18 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * elfcore.h (bfd_prstatus): Copy core_prstatus from the first
- NT_PRSTATUS note section encountered, it contains the status of
- the currently executing thread when the core file was written.
-
-Tue Apr 21 10:00:12 1998 Nick Clifton <nickc@cygnus.com>
-
- * libcoff.h: Add extra parameter to
- bfd_coff_link_output_has_begun overrideable function.
- * cofflink.c: Pass extra parameter to
- bfd_coff_link_output_has_begun function.
- * bfd-in.h: Add prototypes for exported ARM interworking
- functions.
- * peicode.h: ARM specific code reorganised to conform to BFD
- coding conventions.
- * coffcode.h: ARM specific code reorganised to conform to BFD
- coding conventions.
- * coff-arm.c: Code reorganised to conform to the BFD coding
- conventions. Global variables have been moved into an ARM
- specific hash table structure and a new function:
- bfd_arm_get_bfd_for_interworking() has been created which is
- called from the linker scripts.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
+ relative relocations for non-loaded sections in shared objects.
+ (elf64_alpha_check_relocs): Similarly.
-Tue Apr 21 00:11:51 1998 Richard Henderson <rth@cygnus.com>
+Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
- * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
+ * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
+ BFD_RELOC_16 to switch for extended relocs.
+ (MY_swap_ext_reloc_in): New.
+ (MY_swap_ext_reloc_out): New.
+ (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
+ than NAME(aout,swap_ext_reloc_in) for extended relocs.
+ (NAME(aout,squirt_out_relocs)): Similarly use
+ MY_swap_ext_reloc_out.
+ (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
- * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from
- elf64_alpha_relax_find_reloc_ofs. Changed all callers.
- (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
- (elf64_alpha_size_got_sections): Don't merge .got sections twice.
+2000-04-03 Kazu Hirata <kazu@hxi.com>
-Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com>
+ * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
+ the R_PCRWORD_B case.
- * config.bfd: Added sparc86x support.
+2000-03-31 Thomas de Lellis <tdel@wrs.com>
-Fri Apr 17 22:29:04 1998 Ian Lance Taylor <ian@cygnus.com>
+ * srec.c : Set CHUNK size to 16 bytes to prevent download failures
+ on some targets.
+ * ihex.c : Ditto.
- * elf32-mips.c (mips_elf_relocate_section): Do not complain about
- an out of range pc-relative jump/call to an undefined weak symbol.
+Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
-Thu Apr 16 13:49:00 1998 Richard Henderson <rth@cygnus.com>
+ * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
+ HOWTO references to bfd_elf_generic_reloc, that have
+ partial_inplace == true, now use the new function. The function
+ is based on the recent rewrite of m32r_elf_lo16_reloc(), and
+ extends its fixes to the R_M32R_{16,24,32} relocs.
+ The new logic in m32r_elf_lo16_reloc() has been removed, and
+ it instead calls the new routine to obtain that functionality.
- * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
- comparisons signed.
+2000-03-27 Alan Modra <alan@linuxcare.com.au>
-Thu Apr 16 11:43:33 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
+ elf32_avr_check_relocs, avr_final_link_relocate,
+ elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
+ elf32_avr_object_p): Add prototypes.
+ (elf32_avr_gc_mark_hook): Add default for h->root.type.
+ (bfd_elf_avr_final_write_processing): Make static.
- * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
- an error other than bfd_error_system_call, set the error to
- bfd_error_wrong_format.
+2000-03-27 Denis Chertykov <denisc@overta.ru>
- * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
- bfd_elf32_powerpcle_vec.
+ * cpu-avr.c: New file. BFD support routines for AVR architecture.
+ * archures.c (bfd_architecture): Add AVR architecture.
+ (bfd_archures_list): Add reference to AVR architecture info.
+ * elf.c (prep_headers): Handle bfd_arch_avr.
+ * reloc.c: Add various AVR relocation enums.
+ * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
+ list.
+ * Makefile.am: Add support for AVR elf.
+ * configure.in: Likewise.
+ * config.bfd: Likewise.
+ * Makefile.in: Regenerate.
+ * configure: This too.
+ * bfd-in2.h: And this.
+ * libbfd.h: And this.
- * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
- program segments are zero, don't set p_paddr_valid.
+2000-03-24 H.J. Lu <hjl@gnu.org>
-Wed Apr 15 22:15:16 1998 Richard Henderson <rth@cygnus.com>
+ * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
+ (elf64_alpha_find_reloc_at_ofs): Likewise.
- * elf64-alpha.c: Initial implementation of relaxation --
- (struct alpha_elf_link_hash_entry): Add use_count member.
- (elf64_alpha_check_relocs): Initialize and increment it.
- (elf64_alpha_can_merge_gots): Check it when considering merging.
- (elf64_alpha_merge_gots): Drop entries with zero use.
- (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
- (elf64_alpha_always_size_sections): Split out got sizing ...
- (elf64_alpha_size_got_sections): ... here. New function.
- (elf64_alpha_relax_find_reloc_ofs): New function.
- (elf64_alpha_relax_with_lituse): Likewise.
- (elf64_alpha_relax_without_lituse): Likewise.
- (elf64_alpha_relax_opt_call): Likewise.
- (elf64_alpha_relax_section): Likewise.
- (elf64_alpha_add_symbol_hook): Likewise.
- (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16.
- (elf64_alpha_relocate_section): Likewise.
- (bfd_elf64_bfd_relax_section): Define.
- (elf_backend_add_symbol_hook): Likewise.
+2000-03-17 Alan Modra <alan@linuxcare.com.au>
-Wed Apr 15 16:08:46 1998 Richard Henderson <rth@cygnus.com>
+ * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
+ flag an overflow if the bitfield is outside -2**n to 2**n-1. The
+ allowable range used to be -2**(n-1) to 2**n-1.
+ * reloc.c (_bfd_relocate_contents): Same here. Also replace
+ "boolean overflow" with "bfd_reloc_status_type flag".
- * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
- * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
- (ELF_MACHINE_ALT1): New. Set to EM_OLD_SPARC64.
+2000-03-14 Doug Evans <dje@casey.transmeta.com>
-Wed Apr 15 11:34:33 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
- * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
- * configure: Rebuild.
+2000-03-14 Kazu Hirata <kazu@hxi.com>
-Mon Apr 13 16:46:27 1998 Ian Lance Taylor <ian@cygnus.com>
+ * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
+ of shrinks properly, including the last reloc.
- * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
- (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@.
- * configure.in: Define and substitute WIN32LDFLAGS and
- WIN32LIBADD.
- * aclocal.m4: Rebuild with new libtool.
- * configure, Makefile.in: Rebuild.
+2000-03-13 Kazu Hirata <kazu@hxi.com>
-Fri Apr 10 13:44:27 1998 Ian Lance Taylor <ian@cygnus.com>
+ * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
+ check for R_MOVL2.
- * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
- before any other symbols in the same section.
+2000-03-11 Alan Modra <alan@linuxcare.com.au>
-Wed Apr 8 14:50:23 1998 Michael Meissner <meissner@cygnus.com>
+ * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
+ a format mismatch rather than an "error" from bfd_read such as
+ bfd_error_file_truncated.
- * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
- systems.
+2000-03-10 Geoff Keating <geoffk@cygnus.com>
-Tue Apr 7 16:25:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
+ * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
+ sign-extension and big-endian compensation for
+ R_MIPS_64 even in ld -r.
- * dwarf2.c (comp_unit): Move it earlier in the source. Add
- addr_size.
- (read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
- Use addr_size for address size, rather than sizeof(bfd_vma).
- (read_attribute): Replace bdf* argument with 'comp_unit*' argument.
- Fix call to read_address.
- (decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
- Scrap other unneeded arguments. Fix call to read_address.
- (scan_unit_for_functions): Fix call to read_attribute.
- (parse_comp_unit): We now handle more values for addr_size.
- Set addr_size in unit. Fix call to read_attribute and
- decode_line_info.
+2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
-Tue Apr 7 15:44:47 1998 Gavin Romig-Koch <gavin@cygnus.com>
+ * elf32-mips.c (mips_elf_next_relocation): Rename from
+ mips_elf_next_lo16_relocation, and generalize to look
+ for any relocation type.
+ (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
+ (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
+ (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
+ (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
+ (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
+ (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
+ (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
+ (mips_rtype_to_howto): Likewise.
+ (mips_elf_calculate_relocation): Handle new relocs.
+ (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
+ are paired. The addend for R_MIPS_GNU_REL16_S2
+ is shifted right two bits.
- * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
+2000-03-10 Alan Modra <alan@linuxcare.com.au>
-Tue Apr 7 12:35:18 1998 Ian Lance Taylor <ian@cygnus.com>
+ * reloc.c (bfd_perform_relocation): Undo emacs formatting of
+ comment, and ensure it doesn't happen again.
+ (bfd_install_relocation): Same here.
+ (_bfd_relocate_contents): Don't bother assigning unused signmask
+ shift result. Fix typos in comments.
+ Remove trailing whitespace throughout file.
- * archures.c (bfd_default_scan): Add m68k cases back to default
- switch, reverting patch of March 25, since IEEE support depends
- upon them.
+2000-03-07 Doug Evans <dje@casey.transmeta.com>
-Mon Apr 6 14:06:40 1998 Ian Lance Taylor <ian@cygnus.com>
+ * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
+ * bfd-in2.h: Rebuild.
- * Makefile.am (diststuff): New target.
- * Makefile.in: Rebuild.
+2000-03-06 Nick Clifton <nickc@cygnus.com>
-Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com)
+ * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
+ sym_ptr_ptr fields.
+ (SIZEOF_ILF_SYM_PTR_TABLE): Define.
+ (SIZEOF_ILF_STRINGS): Redefine.
+ (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
+ relative reloc, as opposed to a section relative reloc.
+ (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
+ not C_LABEL.
+ Add length of symbol's prefix to string pointer.
+ Store a pointer to the symbol in the symbol pointer table.
+ (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
+ Initialise the symbol pointer table.
+ Store the hint in the Hint/Name table.
+ Make the jump reloc be symbol realtive, not section relative.
+ Create an import symbol for imported code.
- * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
- som_offset when we have an extended name table.
+2000-03-06 Catherine Moore <clm@cygnus.com>
-Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
+ * elf.c (swap_out_syms): Check for null type_ptr.
- * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
- trying to copy it.
- * Makefile.in: Rebuild.
+2000-03-01 Hans-Peter Nilsson <hp@axis.com>
-Fri Apr 3 11:09:42 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * aout-target.h (MY(write_object_contents)): Remove unused
+ and unusable "#if CHOOSE_RELOC_SIZE".
+ * pc532-mach.c (MY(write_object_contents)): Ditto.
+ * netbsd.h (MY(write_object_contents)): Ditto.
+ * hp300hpux.c (MY(write_object_contents)): Ditto.
+ * freebsd.h (MY(write_object_contents)): Ditto.
+ * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
- * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
- symbols when creating a shared library.
- (elf_m68k_adjust_dynindx): New function, used by above code.
- (elf_m68k_finish_dynamic_sections): Initialize the section
- symbols.
- (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
+2000-02-29 H.J. Lu <hjl@gnu.org>
-Wed Apr 1 16:04:02 1998 Nick Clifton <nickc@cygnus.com>
+ * peicode.h (jtab): Make it static.
- * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
- value 11.
+ * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
+ defined and COFF_IMAGE_WITH_PE is not defined.
+ (_bfd_sh_align_load_span): Defined as sh_align_load_span if
+ COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
-Wed Apr 1 13:36:58 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-03-01 Nick Clifton <nickc@cygnus.com>
- * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
- assertion.
+ * coff-arm.c (bfd_arm_process_before_allocation): Make
+ 'symndx' signed to prevent compile time warning.
-Tue Mar 31 00:12:12 1998 Jeffrey A Law (law@cygnus.com)
+ * coff-mcore.c: Remove unused prototype for pe_object_p.
- * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
- absolute symbols.
+ * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
+ functions that are not used when COFF_IMAGE_WITH_PE is
+ defined.
+ (struct sh_opcode): Change type of 'flags' field to unsigned
+ long so that it can hold the USESAS flag.
-Mon Mar 30 12:46:15 1998 Ian Lance Taylor <ian@cygnus.com>
+ * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
- * configure.in: Set version to 2.9.1.
- * configure: Rebuild.
+ * elf-m10300.c (mn10300_elf_relax_section): Initialise
+ 'sym_sec'.
- * Branched binutils 2.9.
+ * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
+ parameters.
+ Remove unusued variables and code.
+ (elf_backend_add_symbol_hook): Fix prototype.
-Mon Mar 30 12:20:50 1998 Brent Baccala <baccala@freesoft.org>
+ * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
+ 'srelgot'.
- * syms.c (ENABLE_CACHING): Define.
- (struct indexentry): Define.
- (struct stab_cache): Remove.
- (cmpindexentry): New static function.
- (struct stab_find_info): Add new fields: indextable,
- indextablesize, cached_indexentry, cached_offset, cached_stab, and
- cached_file_name. Remove fields: file_cache, function_cache, and
- line_cache.
- (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
- index table and search it.
+ * elf32-mcore.c (mcore_elf_relocate_section): Initialise
+ 'oldinst'.
-Mon Mar 30 10:39:34 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
+ parameters.
+ Remove unusued variables and code.
+ (elf_backend_add_symbol_hook): Fix prototype.
- * elf.c (_bfd_elf_copy_private_section_data): Call
- copy_private_bfd_data once we've seen the last SEC_ALLOC section.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
- * cpu-mips.c: Remove trailing comma at end of enumeration list.
+ * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
+ to unused function parameter.
-Sat Mar 28 16:33:02 1998 Ian Lance Taylor <ian@cygnus.com>
+ * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
+ parameters.
+ Use EMPTY_HOWTO to initialise empty howto slots.
+ Remove unused variables.
- * coff-arm.c: Define all globally visible variables and functions
- only when COFF_WITH_PE is not defined.
- * configure.in (armpe_little_vec, armpe_big_vec): Add
- coff-arm.lo.
- * configure: Rebuild.
+ * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
-Fri Mar 27 16:06:02 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-03-01 H.J. Lu <hjl@gnu.org>
- Fix some gcc -Wall warnings:
- * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
- * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
- * archures.c (bfd_default_scan): Likewise.
- * bfd.c (bfd_scan_vma): Likewise.
- * binary.c (mangle_name): Likewise
- * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
+ * aoutx.h (aout_link_input_section_std): Pass "true" to
+ the undefined_symbol callback.
+ (aout_link_input_section_ext): Likewise.
+ * bout.c (get_value): Likewise.
+ * coff-a29k.c (coff_a29k_relocate_section): Likewise.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
+ Likewise.
+ (alpha_relocate_section): Likewise.
+ * coff-arm.c (coff_arm_relocate_section): Likewise.
+ * coff-i960.c (coff_i960_relocate_section): Likewise.
+ * coff-mcore.c (coff_mcore_relocate_section): Likewise.
+ * coff-mips.c (mips_relocate_section): Likewise.
+ * coff-ppc.c (coff_ppc_relocate_section): Likewise.
* coff-sh.c (sh_relocate_section): Likewise.
- * coff-stgo32.c (create_go32_stub): Likewise.
- * coffcode.h (coff_slurp_line_table): Likewise.
- * ecoff.c (_bfd_ecoff_write_armap): Likewise.
- * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
- (assign_file_positions_for_segments): Likewise.
- * elf32-mips.c (mips_elf_relocate_section): Likewise.
- * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
- * oasys.c (oasys_write_sections): Likewise.
- * ppcboot.c (ppcboot_object_p): Likewise.
- (mangle_name): Likewise.
- * riscix.c (riscix_fix_pcrel_26): Likewise.
- * srec.c (srec_scan): Likewise.
- * stabs.c (_bfd_write_section_stabs): Likewise.
- * sunos.c (sunos_add_dynamic_symbols): Likewise.
- * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
- switch. Declare parameters for function pointers.
- * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
- warning.
- * elf.c (elf_sort_sections): Likewise.
- * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
- Add default cases to switches.
- (coff_arm_relocate_section): Remove unused local variables.
- Always set rstat.
- (coff_arm_bfd_set_private_flags): Change flag variable to type
- flagword.
- * coff-mips.c (mips_relocate_section): Initialize use_lo.
- * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
- (dump_toc): Change cat to const, and initialize it.
- * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
- * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
- (sh_elf_relocate_section): Initialize r_symndx.
- * coffcode.h (coff_compute_section_file_positions): Only declare
- old_sofar if ALIGN_SECTIONS_IN_FILE.
- (coff_write_object_contents): Initialize csym.
- * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
- * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
- switch.
- * dwarf2.c: Include libiberty.h.
- (read_2_signed_bytes, read_4_signed_bytes): Comment out.
- (decode_line_info): Remove unused local variables.
- * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
- (m32r_elf_relocate_section): Likewise.
- * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
- (v850_elf_reloc): Likewise.
- * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
- (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
- * elf.c (assign_file_positions_for_segments): Always set adjust.
- * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr. Fully
- parenthesize expression.
- * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
- (m32r_elf_object_p): Return a value.
- (m32r_elf_print_private_bfd_data): Change fprintf format string.
- * elf32-mips.c (mips_elf_final_link): Initialize last.
- (mips_elf_finish_dynamic_sections): Initialize last and dindx.
- * elf32-v850.c (v850_elf_object_p): Return a value.
- (v850_elf_print_private_bfd_data): Change fprintf format string.
- * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
- unsigned long.
- * elflink.h (elf_link_add_object_symbols): Change vernum to
- unsigned int, and initialize it. Change fprintf format string.
- (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
- when setting or comparing to soname_indx.
- (elf_create_pointer_linker_section): Change num_symbols to
- unsigned int.
- * libcoff-in.h (coff_data_type): Change flags to flagword.
- * peicode.h (pe_print_idata): Initialize idx. Change j to
- bfd_size_type. Initialize hint_member. Remove useless test to
- time_stamp.
- (pe_print_edata): Change num_functions and num_names in struct
- EDT_type to unsigned long. Remove cast. Change fprintf format
- string.
- * ppcboot.c (ppcboot_object_p): Change i to size_t.
- * reloc.c (bfd_get_reloc_size): Change return type to unsigned
- int.
- * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
- int *. Update uses. Change j to long.
- * bfd-in2.h, libcoff.h: Rebuild.
-
-Fri Mar 27 10:10:46 1998 Catherine Moore <clm@cygnus.com>
-
- * elf32-v850.c Remove definition of USE_REL.
- (v850_elf_info_to_howto_rela): New function.
- (v850_elf_perform_relocation): Renamed from
- v850_elf_store_addend_in_insn. Removed replace argument.
- (v850_elf_reloc): store the relocation in the addend field instead
- of the insn.
- (v850_elf_final_link_relocate): Now calls
- v850_elf_perform_relocation.
- (v850_elf_relocate_section): Remove code to generate REL
- relocations.
-
-Thu Mar 26 13:32:17 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * coffcode.h (coff_new_section_hook): Set the type and storage
- class in the native symbol information allocated for a new section
- symbol.
-
-Thu Mar 26 10:13:41 1998 Nick Clifton <nickc@cygnus.com>
+ * coff-tic80.c (coff_tic80_relocate_section): Likewise.
+ * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
+ * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
+ * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+ * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+ * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_relocate_section): Likewise.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
+ * elflink.h (elf_link_output_extsym): Likewise.
+ * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
+ * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
+ * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
- * peicode.h: Chain together calls to
- coff_bfd_copy_private_bfd_data and
- coff_bfd_print_private_bfd_data.
+ * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
+ undefined_symbol callback when building shared library with
+ -Bsymbolic and undefined symbols are allowed. Otherwise, pass
+ "true".
+ * elf32-arm.h (elf32_arm_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
+ (elf32_mips_get_relocated_section_content): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
- * coff-arm.c: Add prototypes for
- coff_arm_bfd_print_private_bfd_data and
- coff_arm_bfd_copy_private_bfd_data.
+2000-02-28 Nick Clifton <nickc@cygnus.com>
-Wed Mar 25 15:45:55 1998 Nick Clifton <nickc@cygnus.com>
+ * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
+ * Makefile.in: Regenerate.
- * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
- build.
+ * configure.in: Add support for mips and sh pe vectors.
+ * configure: regenerate.
- * peicode.h: Call arm-coff private data functions after handling
- pe private data.
+ * config.bfd: Add support for arm-wince, mips-pe and sh-pe
+ targets.
- * coff-arm.c: Turn statics into globals so that they can be shared
- both pe and pei backends.
+ * targets.c: Add mips and sh pe vectors.
-Wed Mar 25 15:19:38 1998 Ian Lance Taylor <ian@cygnus.com>
+ * libpei.h (coff_final_link_postscript): Only define if not
+ already defined.
- * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
- plain numbers.
- (sunos_write_object_contents): Likewise.
- * aoutx.h (NAME(aout,machine_type)): Likewise.
- * coffcode.h (coff_set_arch_mach_hook): Likewise.
+ * coffcode.h: Add support for WinCE magic numbers.
-Wed Mar 25 13:59:24 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * peigen.c (pe_print_reloc): Update comment and rearrange
+ appending of newline character.
- * archures.c (bfd_mach_m68*): Add definitions for various m68k
- variants.
- (bfd_default_scan): Remove m68k special cases.
- * bfd-in2.h: Rebuild.
- * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
- than plain numbers.
- * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
- * cpu-m68k.c (arch_info_struct): Likewise. Add entry for
- m68k:68000.
- (bfd_m68k_arch): Set mach field to zero to signal no explicit
- selection, change printable_name to just "m68k" and make that the
- default instead of m68k:68020.
+ * peicode.h: Add support for Image Library Format.
+ (pe_ILF_vars): Structure containing data used by ILF code.
+ (pe_ILF_make_a_section): New function. Create a section based
+ on ILF data.
+ (pe_ILF_make_a_reloc): New function. Create a reloc based on
+ ILF data.
+ (pe_ILF_make_a_symbol): New function. Create a symbol based
+ on ILF data.
+ (pe_ILF_save_relocs): New function. Store the relocs created
+ by pe_ILF_make_a_reloc in a section.
+ (pe_ILF_build_a_bfd): New function. Create a BFD describing
+ an ILF object.
+ (pe_ILF_object_p): New function. Return a bfd_target pointer
+ for an ILF object.
+ (pe_bfd_object_p): If an ILF object is detected call
+ pe_ILF_object_p on it.
- * aout-tic30.c (NAME): Define this to avoid multiple definitions
- from aoutx.h.
- (MY_get_section_contents): Define as aout_32_get_section_contents
- rather than NAME(aout,get_section_contents).
+ * coff-arm.c: Add support for WinCE relocs which are different
+ from normal ARM COFF relocs.
+ * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
- * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
+ * coff-sh.c: Add support for sh-pe target.
+ * pe-sh.c: New file. Support code for sh-pe target.
+ * pei-sh.c: New file. Support code for sh-pe target.
- * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
- and call bfd_default_set_arch_mach to do the real work.
+ * pe-mips.c: New file. Support code for mips-pe target.
+ * pei-mips.c: New file. Support code for mips-pe target.
-Wed Mar 25 10:41:35 1998 Richard Henderson <rth@cygnus.com>
+2000-02-27 Jakub Jelinek <jakub@redhat.com>
- * bout.c (BALX): Include return register g14 as part of the insn.
- (BALX_MASK): New.
- (calljx_callback): Use it.
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
+ architecture if the object causing the bump is dynamic.
+ * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
+ and also don't it for memory ordering.
+ (sparc64_elf_write_relocs): Take src_rela out of the loop.
-Wed Mar 25 11:19:28 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-27 Ian Lance Taylor <ian@zembu.com>
- * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
- * libbfd.h: Rebuild.
+ * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
+ calling bfd_get_section_size_before_reloc.
+ (decode_line_info): Likewise.
+ (_bfd_dwarf2_find_nearest_line): Likewise.
- * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
- byte_count to unsigned int.
- (mn10300_elf_relax_section): Initialize internal_relocs. Remove
- unused local variables.
+2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
- * evax-alpha.c (evax_close_and_cleanup): Remove unused local
- variables er and er1.
+ * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
+ name of the libtool directory.
+ * Makefile.in: Rebuild.
- * cpu-v850.c: Include <ctype.h>.
- (scan): Case isdigit argument to unsigned char.
+Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
- From Yan Meroth <YAN.MEROTH@st.com>:
- * ihex.c (ihex_scan): Add extbase variable so that getting an
- extended linear address record does not ignore any previous
- extended address.
- (ihex_write_object_contents): When writing out an extended linear
- address record, zero out any previous extended address.
+ * som.c (SOM_HOWTO): Define.
+ (som_hppa_howto_table): Use it.
-Tue Mar 24 16:09:43 1998 Manfred Hollstein <manfred@s-direktnet.de>
+2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
- * ieee.c (do_one): Check section before dereferencing it.
- (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
- (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
+ * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
-Mon Mar 23 18:51:47 1998 Joel Sherrill <joel@OARcorp.com>
+ * config.bfd: Enable 64 bit support for Solaris7+/sparc.
- * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
+2000-02-24 Catherine Moore <clm@cygnus.com>
-Mon Mar 23 14:23:36 1998 Nick Clifton <nickc@cygnus.com>
+ * som.c (som_misc_symbol_info): Add field
+ secondary_def.
+ (som_bfd_derive_misc_symbol_info): Initialize
+ secondary_def.
+ (som_build_and_write_symbol_table): Keep track
+ of secondary_def field.
+ (som_slurp_symbol_table): Set BSF_WEAK symbol flag
+ if secondary_def field is set.
+ (som_bfd_ar_write_symbol_stuff): Initialize
+ secondary_def.
- * coff-arm.c: Add interworking functions to pe backends.
+2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
-Fri Mar 20 18:47:20 1998 Ian Lance Taylor <ian@cygnus.com>
+ * dwarf2.c (read_address): Read 16-bits addresses.
+ (parse_comp_unit): Accept addr_size == 2.
- * configure.in: Use AM_DISABLE_SHARED.
- * aclocal.m4, configure: Rebuild with libtool 1.2.
+2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
-Fri Mar 20 11:25:41 1998 Nick Clifton <nickc@cygnus.com>
+ * bfd-in.h: Update copyright date.
- * coff-arm.c (coff_arm_relocate_section): Better error messages
- when interowrking conflucts occur. Courtesy of Jonathan Walton
- and Tony Thompson.
- (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
- relocations. Patch courtesy of Jonathan Walton and Tony
- Thompson.
+2000-02-23 Linas Vepstas <linas@linas.org>
-Fri Mar 20 02:26:43 1998 Richard Henderson <rth@cygnus.com>
+ * cpu-i370.c: New file.
+ * elf32-i370.c: New file.
+ * archures.c (enum bfd_architecture): Add bfd_arch_i370.
+ (bfd_i370_arch): New.
+ (bfd_archures_list): Add bfd_i370_arch.
+ * elf.c (prep_headers): Add bfd_arch_i370.
+ * Makefile.am: Add support for IBM 370 elf.
+ * config.bfd: Likewise.
+ * configure.in: Likewise.
+ * libbfd.h (bfd_reloc_code_real_names): Likewise.
+ * reloc.c (bfd_reloc_code_type): Likewise.
+ * targets.c: Likewise.
- * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
- part of Feb 22 change controling when to override the existing
- symbol with the .plt entry.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * bfd-in2.h: Regenerate.
-Wed Mar 18 09:26:25 1998 Nick Clifton <nickc@cygnus.com>
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
- * config.bfd (targ_cpu): Add thumb-pe target.
+ * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
+ invalid relocation types, and change them to R_386_NONE.
- * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
- functions in PE build.
+2000-02-22 H.J. Lu <hjl@gnu.org>
-Sun Mar 8 23:37:26 1998 Stan Cox <scox@equinox.cygnus.com>
+ * elflink.h (elf_link_add_object_symbols): If a version symbol is
+ not defined, don't add a second ELF_VER_CHR.
- * config.bfd (sparclite-*-elf*): Added.
+ * elflink.h (elf_bfd_final_link): Call output_extsym for global
+ symbols converted to local symbols even when stripping all
+ symbols.
+ (elf_link_output_extsym): Process global symbols converted to
+ local symbols even if they are being stripped.
-Mon Feb 23 19:31:19 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
- * configure.in: Add elf.lo to elf shell variable.
- * Makefile.am (BFD_LIBS): Remove elf.lo.
- (BFD_LIBS_CFILES): Remove elf.c.
- (BFD32_BACKENDS): Add elf.lo.
- (BFD32_BACKENDS_CFILES): Add elf.c.
- * configure, Makefile.in: Rebuild.
+ * archures.c (bfd_octets_per_byte): Return unsigned int.
+ (bfd_arch_mach_octets_per_byte): Ditto.
+ * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
+ comparison warning.
+ * section.c (bfd_get_section_size_before_reloc): Quell signed
+ vs. unsigned comparison warning.
+ (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
+ * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
+ change. What was I thinking?
+ * bfd-in2.h: Regenerate.
-1998-02-23 15:53 Richard Henderson <rth@cygnus.com>
+ * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
+ (elf_gc_sections): Same here.
+ (elf_gc_common_finalize_got_offsets): And here.
- * elf32-i386.c (elf_i386_relocate_section): A pc-relative
- relocation against a non-local symbol should not have a dynamic
- relocation.
+2000-02-21 Ian Lance Taylor <ian@zembu.com>
-Mon Feb 23 16:17:08 1998 Ian Lance Taylor <ian@cygnus.com>
+ ELF HPPA doesn't work at present; remove it until it does.
+ * config.bfd: Comment out setting targ_defvec to
+ bfd_elf32_hppa_vec.
+ * Makefile.am: Rebuild dependencies.
+ (BFD32_BACKENDS): Remove elf32-hppa.lo.
+ (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
+ (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
+ * Makefile.in: Rebuild.
+ * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
- * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
- COFF filehdr flags.
- (pe_print_private_bfd_data): Print PE flags. From Mikey
- <jeffdb@netzone.com>.
+2000-02-18 Geoff Keating <geoffk@cygnus.com>
-Sun Feb 22 20:39:00 1998 Richard Henderson <rth@cygnus.com>
+ * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
+ is no bfd_free(). Revert bfd_free part of previous change.
- * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
- a plt entry when we can determine that we authoritatively define
- the symbol.
+2000-02-18 Geoff Keating <geoffk@cygnus.com>
-Sun Feb 22 20:33:05 1998 Richard Henderson <rth@cygnus.com>
+ * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
+ arrays.
+ (coff_compute_section_file_positions): Use bfd_free to pair
+ bfd_malloc.
+ (coff_write_object_contents): Likewise.
- * configure.in (COREFILE selection): Remove sparc-*-linux*. They
- don't actually use trad-core, but a SunOS-style core file handled
- by gdb directly.
- * hosts/sparclinux.h: Remove.
+ * coff-rs6000.c (xcoff_howto_table_16): New variable.
+ (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
-Wed Feb 18 15:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-18 Ulrich Drepper <drepper@cygnus.com>
- * peicode.h (pe_print_idata): If there is no .idata section, look
- for the import tables in some other section. Make the initial
- label line up better with the data. Print the import address
- table even if there is no import name table. If the import
- address table holds actual addresses, print them.
+ * coff-rs6000.c (XCOFFARMAGBIG): New macro.
+ (xcoff_ar_file_hdr_big): New structure.
+ (SIZEOF_AR_FILE_HDR_BIG): New macro.
+ (xcoff_ar_hdr_big): New structure.
+ (SIZEOF_AR_HDR_BIG): New macro.
+ (xcoff_big_format_p): New macro.
+ (xcoff_ardata_big): New macro.
+ (arch_xhdr_big): New macro.
+ (xcoff_slurp_armap): Handle large archives.
+ (xcoff_archive_p): Detect large archives.
+ (xcoff_read_ar_hdr): Handle large archives.
+ (xcoff_openr_next_archived_file): Handle large archives.
+ (xcoff_generic_stat_arch_elt): Handle large archives.
+ (xcoff_write_armap_old): Rename from xcoff_write_armap.
+ (xcoff_write_armap_big): New function.
+ (xcoff_write_armap): New function, dispatch to _old or _big.
+ (xcoff_write_archive_contents_old): Rename from
+ xcoff_write_archive_contents.
+ (xcoff_write_archive_contents_big): New function.
+ (xcoff_write_archive_contents): New function, dispatch to _old or
+ _big.
-Tue Feb 17 12:58:34 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-18 Richard Henderson <rth@cygnus.com>
- * libbfd.c (bfd_seek): If fseek fails, save errno around call to
- bfd_tell. If errno is EINVAL, set bfd_error_file_truncated, not
- bfd_error_system_call.
+ * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
+ and hide_symbol members.
+ (elf_link_hash_copy_indirect): Remove.
+ (elf_link_hash_hide_symbol): Remove.
+ (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
+ and elf_backend_hide_symbol.
+ (_bfd_elf_link_hash_copy_indirect): Declare.
+ (_bfd_elf_link_hash_hide_symbol): Declare.
+ * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
+ (_bfd_elf_link_hash_hide_symbol): Likewise.
+ (_bfd_elf_link_hash_table_init): Don't init killed members.
+ * elflink.h (elf_link_add_object_symbols): Use the bed function
+ pointers not elf_link_hash_{copy_indirect,hide_symbol}.
+ (elf_link_assign_sym_version): Likewise.
+ * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
+ (elf_backend_hide_symbol): Likewise.
+ (elfNN_bed): Update for new members.
-Fri Feb 13 13:11:33 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-17 Kevin Buettner <kevinb@redhat.com>
- * Makefile.am (AUTOMAKE_OPTIONS): Define.
- * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
+ * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
+ STACK_END_ADDR): Define for new core file format.
+ (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
+ for handling the vagaries of the various core file structures used
+ by AIX over the years.
+ (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
+ Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
+ core_dumpx structure.
- From H.J. Lu <hjl@gnu.org>:
- * Makefile.am (libbfd_la_LDFLAGS): Define.
- * Makefile.in: Rebuild.
+Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-Thu Feb 12 17:31:11 1998 Ian Lance Taylor <ian@cygnus.com>
-
- NetBSD patches from Gordon W. Ross <gwr@mc.com>:
- * netbsd.h (MACHTYPE_OK): Define.
- (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
- calling N_SET_MACHTYPE, rather than having a switch.
- * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
- and M_ALPHA_NETBSD.
- * i386netbsd.c (MACHTYPE_OK): Don't define.
- (DEFAULT_MID): Define.
- * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
- (MACHTYPE_OK): Don't define.
- (DEFAULT_MID): Define.
- * m68knetbsd.c: (MACHTYPE_OK): Don't define.
- (DEFAULT_MID): Define.
- * ns32knetbsd.c (MACHTYPE_OK): Don't define.
- (DEFAULT_MID): Define.
- * sparcnetbsd.c (MACHTYPE_OK): Don't define.
- (DEFAULT_MID): Define.
-
- NetBSD patches from Gordon W. Ross <gwr@mc.com>:
- * vaxnetbsd.c: New file.
- * netbsd-core.c: Clean up. Remove unused macros. Use netbsd
- rather than netbsd_core.
- * targets.c (vaxnetbsd_vec): Declare.
- (bfd_target_vector): Add vaxnetbsd_vec. If NETBSD_CORE is
- defined, add netbsd_core_vec.
- * configure.in: Set COREFILE for alpha*-*-netbsd* and
- powerpc-*-netbsd* to netbsd-core.lo. If COREFILE is
- netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
- * config.bfd (alpha*-*-netbsd*): New target.
- * Makefile.am: Rebuild dependencies.
- (BFD32_BACKENDS): Add vaxnetbsd.lo.
- (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
- * configure, Makefile.in: Rebuild.
+ * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
+ (bfd_mach_sh3_dsp): Likewise.
+ (bfd_mach_sh4): Reinstate.
+ (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
+ * bfd-in2.h: Regenerate.
+ * coff-sh.c (struct sh_opcode): flags is no longer short.
+ (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
+ (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
+ (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
+ (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
+ (sh_opcodes): No longer const.
+ (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
+ (sh_insn_uses_reg): Check for USESAS and USESR8.
+ (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
+ (_bfd_sh_align_load_span): Return early for SH4.
+ Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
+ Take into account that field b of a parallel processing insn
+ could be mistaken for a separate insn.
+ * cpu-sh.c (arch_info_struct): New array elements for
+ sh2, sh-dsp and sh3-dsp.
+ Reinstate element for sh4.
+ (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
+ (SH4_NEXT): Reinstate.
+ (SH3_NEXT, SH3E_NEXT): Adjust.
+ * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
+ * elf32-sh.c (sh_elf_set_private_flags): New function.
+ (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
+ (sh_elf_merge_private_data): New function.
+ (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
+ (bfd_elf32_bfd_copy_private_bfd_data): Define.
+ (bfd_elf32_bfd_merge_private_bfd_data): Change to
+ sh_elf_merge_private_data.
- * configure.host: Remove the old shared library build stuff. We
- now use libtool instead.
+2000-02-13 Richard Henderson <rth@cygnus.com>
-Wed Feb 11 17:13:09 1998 Richard Henderson <rth@cygnus.com>
+ * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
+ hide_symbol members.
+ (elf_link_hash_copy_indirect): New.
+ (elf_link_hash_hide_symbol): New.
+ * elflink.h (elf_link_add_object_symbols): Break out copy from
+ indirect new new symbol to elf.c.
+ (elf_link_assign_sym_version): Break out privatization of
+ non-exported symbol to elf.c.
+ * elf.c (_bfd_elf_link_hash_copy_indirect): New.
+ (_bfd_elf_link_hash_hide_symbol): New.
+ (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
- * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
+2000-02-13 Ian Lance Taylor <ian@zembu.com>
-Tue Feb 10 19:23:28 1998 H.J. Lu <hjl@gnu.org>
+ * section.c (_bfd_strip_section_from_output): Add info parameter.
+ If it passed as non-NULL, use it to check whether any input BFD
+ has an input section which uses this output section. Change all
+ callers.
+ * bfd-in2.h: Rebuild.
- * configure.in: Take stab-syms.lo out of sparclinux_vec list.
- * configure: Rebuild.
+ * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
+ bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
+ 1999-11-29.
+ * bfd-in2.h: Rebuild.
-Tue Feb 10 15:16:38 1998 Nick Clifton <nickc@cygnus.com>
- * elf32-v850.c (remember_hi16s_reloc): New function.
- (find_remembered_hi16s_reloc): New function.
- (v850_elf_store_addend_in_insn): Use the above new functions to
- match up HI6S relocs with LO16 relocs.
+2000-02-10 Timothy Wall <twall@cygnus.com>
-Tue Feb 10 15:01:39 1998 Ian Lance Taylor <ian@cygnus.com>
+ * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
+ allow final modifications of swapped-in symbol.
+ (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
+ * coffcode.h (coff_write_relocs): Use macro
+ SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
+ symbol index should be set to -1.
- * configure.in: Change -linux* to -linux-gnu*.
- * config.bfd, configure.host: Likewise.
- * configure: Rebuild.
+Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
-Mon Feb 9 19:40:59 1998 Nick Clifton <nickc@cygnus.com>
+ * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
+ USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
+ * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
+ * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
+ sh_insns_uses_or_sets_freg): New functions.
+ * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
+ * (sh_insns_conflict): Use new functions and new macros to
+ detect conflicts when two instructions both set same integer registers,
+ both set same fp register, and both set special register.
- * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
- LO16/HI16S bug and improve comments about what is going on.
+2000-02-09 Timothy Wall <twall@cygnus.com>
-Sat Feb 7 15:27:03 1998 Ian Lance Taylor <ian@cygnus.com>
+ * coffgen.c (coff_real_object_p): Set arch/mach info prior to
+ swapping in sections, so that the swapping routines have access to
+ the arch/mach info.
- * configure, aclocal.m4: Rebuild with new libtool.
+2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
-Fri Feb 6 14:48:20 1998 Nick Clifton <nickc@cygnus.com>
+ * coff-go32.c: Update comment. Update copyright.
- * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain
- when merging v850 code into v850e/v850ea code. Do not initialise
- output flags if the input is the default architecture.
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
-Fri Feb 6 11:50:22 1998 Jeffrey A Law (law@cygnus.com)
+ * syms.c (bfd_decode_symclass)
+ Two new class characters were added - 'V' and 'v'. The
+ meaning of 'W' is now restricted to just weak non-object
+ symbols. This allows differentiation between, for example,
+ weak functions vs weak objects. nm for example now dumps:
+ 'W' = weak global
+ 'w' = weak unresolved
+ 'V' = weak global object
+ 'v' = weak unresolved object
- * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
- get the size from bfd_arch_bits_per_address instead of directly
- from the isa.
+ (bfd_is_undefined_symclass): New function. Return true if the
+ given symbol class represents and undefined/unresolved symbol.
-Thu Feb 5 14:21:34 1998 Michael Meissner <meissner@cygnus.com>
+ (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
+ unresolved symbols.
- * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
- to wrap, just return all 1's bits instead.
- * libbfd.h: Regenerate.
+ * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
-Thu Feb 5 11:51:05 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
+ STT_ARM_16BIT flag set, but it is not attached to a data object
+ return STT_ARM_16BIT so that it will be treated as code by the
+ disassembler.
- * coff-i386.c (coff_pe_i386_relocate_section): New static function
- if COFF_WITH_PE.
- (coff_relocate_section): If COFF_WITH_PE, define as
- coff_pe_i386_relocate_section.
- * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
- skip empty sections, to match coff_write_object_contents.
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
- * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
- rather than swapping out r_offset twice. From Luke Deller
- <luked@cse.unsw.edu.au>.
+ * coff-i386.c (i3coff_object_p): Remove prototype.
+ Update copyright.
-Wed Feb 4 19:11:28 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
+ to name. Update copyright.
- * configure.in: Set libtool_enable_shared rather than
- libtool_shared. Remove diversion hack.
- * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
- with new libtool.
+ * trad-core.c (trad_unix_core_file_p): Cast core_regsec
+ assignment to avoid warning. Update copyright.
-Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org>
+2000-01-24 Robert Lipe (robertl@sco.com)
- * syms.c (struct stab_cache): Define.
- (struct stab_find_info): Remove cached_offset, cached_stab,
- cached_str, and cached_stroff fields. Add file_cache,
- function_cache, and line_cache fields.
- (_bfd_stab_section_find_nearest_line): Use extensive caching to
- speed up searches.
+ * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
+ instead of using GNU C extension.
-Wed Feb 4 13:34:22 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-01-21 Nick Clifton <nickc@cygnus.com>
- * peicode.h (pe_print_idata): Check for import of ordinal rather
- than name.
- (pe_print_edata): If there is no .edata section, look for the
- export data in some other section.
+ * libbfd.c (bfd_read): Do not attempt to get a negativly sized
+ amount from a bfd_in_memory structure.
+ (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
+ structure.
-Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
+2000-01-14 Nick Clifton <nickc@cygnus.com>
- * configure.in: Change version to 2.8.4.
- * configure: Regenerated.
+ * linker.c (default_indirect_link_order): oops - fix incorrectly
+ applied patch from Tim Wall.
-Mon Feb 2 17:39:39 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- Add tms320c30 support:
- * cpu-tic30.c: New file.
- * aout-tic30.c: New file.
- * coff-tic30.c: New file.
- * archures.c (bfd_arch_tic30): Define.
- (bfd_tic30_arch): Declare.
- (bfd_archures_list): Add bfd_tic30_arch.
- * targets.c (bfd_target_vector): Add tic30_aout_vec and
- tic30_coff_vec.
- * reloc.c (BFD_RELOC_TIC30_LDP): Define.
- * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
- (coff_set_flags): Likewise.
- * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
- * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
- * Makefile.am: Rebuild dependencies.
- (ALL_MACHINES): Add cpu-tic30.lo.
- (ALL_MACHINES_CFILES): Add cpu-tic30.c.
- (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
- (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
- * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
-
-Mon Feb 2 12:25:12 1998 Nick Clifton <nickc@cygnus.com>
-
- * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
- to lag behind LO16 reloc by a couple of instructions.
-
-Mon Feb 2 14:09:46 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
- make to reexamine the file timestamp.
- ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
-
- * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
- 0x100000.
-
-Fri Jan 30 19:07:07 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
- to create .dynsbss and .rela.sbss sections.
- (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
- copied from dynamic objects into .sbss.
- (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
- use it. Correct typo of .rela.sdata2.
- (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
- put the data, which may now be in .sbss.
- (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
- (elf_backend_create_dynamic_sections): Define as
- ppc_elf_create_dynamic_sections.
-
- * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
- against _GLOBAL_OFFSET_TABLE_.
- (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
- shared libraries which refer to local symbols. Make sure that the
- test for allocating space for a reloc in a shared object is the
- same as the test for emitting a reloc.
-
-Thu Jan 29 15:55:35 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
-
- * config.bfd (i[3456]-*-mingw32*): New target.
- * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
- * aclocal.m4, configure: Rebuild.
-
-Wed Jan 28 13:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
- have a bfd_object.
-
-Tue Jan 27 21:43:55 1998 Richard Henderson <rth@cygnus.com>
-
- Sparc v9 ABI compliant PLT:
- * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
- (plt_templates, sparc64_elf_build_plt_entry): Delete.
- (LARGE_PLT_THRESHOLD): New define.
- (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
- (sparc64_elf_build_plt): New function.
- (sparc64_elf_plt_entry_offset): Likewise.
- (sparc64_elf_plt_ptr_offset): Likewise.
- (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
- contain the index for convenience. Skip the initial entries
- in .rela.plt.
- (sparc64_elf_size_dynamic_sections): Zero the allocated contents
- memory for the benefit of .rela.plt.
- (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
- (sparc64_elf_finish_dynamic_symbol): Kill template stuff. Use
- sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
- (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
- Call sparc64_elf_build_plt.
- (elf_backend_want_got_plt): No.
- (elf_backend_plt_readonly): No.
- (elf_backend_plt_alignment): 8.
-
- * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
- * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
- * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
- to be called.
-
-Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com)
-
- * archures.c (bfd_mach_mips*): Add definitions for various MIPS
- processors.
- * cpu-mips.c (arch_info_struct): Add mips variants.
- * bfd-in2.h: Rebuilt.
+2000-01-13 Timothy Wall (twall@tiac.net>
-Tue Jan 27 15:06:04 1998 Nick Clifton <nickc@cygnus.com>
+ * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
+ = scnhsz, filhsz, relsz, aoutsz, etc)
- * coff-arm.c (coff_arm_relocate_section): Preserve the contents of
- t2a3_b_insn.
+ * coffswap.h: Ditto.
-Tue Jan 27 12:47:27 1998 Robert Lipe <robertl@dgii.com>
+2000-01-13 Nick Clifton <nickc@cygnus.com>
- * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
- (i[3456]86sco3.2v5*coff): New target.
+ * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
+ interwork thumb to arm stub.
-Mon Jan 26 15:41:30 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-01-13 Timothy Wall (twall@tiac.net>
- * bfd-in2.h: Rebuild with changes to chew--tab expansion.
+ * archures.c (bfd_octets_per_byte): New function: Return
+ target byte size.
+ (bfd_arch_mach_octets_per_byte): New function: Return target
+ byte size.
-Thu Jan 22 21:26:48 1998 Richard Henderson <rth@cygnus.com>
+ * section.c: Distinguish between octets and bytes for usage of
+ _cooked_size, _raw_size, and output_offset. Clarify
+ description of bfd_set_section_contents.
- * bfd.c (bfd_get_error_handler): Add orthogonal function.
* bfd-in2.h: Regenerate.
-Thu Jan 22 21:13:39 1998 Richard Henderson <rth@cygnus.com>
+ * coffgen.c: Indicate that the offset parameter is in bytes, not
+ octets.
- * tekhex.c (tekhex_write_object_contents): Check for no symbols.
+ * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
+ where appropriate to get the octet offset when calling
+ bfd_set_section_contents.
+ (bfd_coff_reloc_link_order): Ditto.
-Wed Jan 21 21:19:03 1998 Ian Lance Taylor <ian@cygnus.com>
+ * linker.c (bfd_generic_reloc_link_order): Ditto.
+ (_bfd_default_link_order): Ditto.
- * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
- adjust addend for an output common symbol (from Jimmy Blair
- <jimmyb@wrs.com>). If COFF_WITH_PE, adjust addend for PC relative
- defined symbol to counteract adjustment made in generic relocation
- code.
+ * reloc.c (bfd_perform_relocation): Distinguish between octets
+ and bytes. Use octets when indexing into octet data; use bytes
+ when calculating target addresses.
+ (bfd_install_relocation): Ditto.
- * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
+ * srec.c (srec_write_section): Ditto.
-Wed Jan 21 21:16:06 1998 Manfred Hollstein <manfred@s-direktnet.de>
+2000-01-13 Nick Clifton <nickc@cygnus.com>
- * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
- (GET_SCNDHR_NLNNO): Likewise.
+ * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
+ 3 to 2. This allows 4 byte sized sections, which is necessary for
+ dlltool to build functioning DLLs.
-Mon Jan 19 12:49:52 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-01-10 Philip Blundell <pb@futuretv.com>
- * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
+ * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
+ (arm*-*-conix*): New target.
-Wed Jan 14 17:23:27 1998 Nick Clifton <nickc@cygnus.com>
+2000-01-10 Egor Duda <deo@logos-m.ru>
- * elf32-m32r.c: Add macros to handle NOP insertion.
+ * config.bfd: Include elf32_i386 vector to target list for cygwin
+ and mingw.
-Wed Jan 14 16:15:22 1998 Richard Henderson <rth@cygnus.com>
+ * config.in: Undefine HAVE_WIN32_PSTATUS_T.
+ * configure.in: Test for structure win32_pstatus_t in
+ <sys/procfs.h>
+ * configure: Regenerate.
- * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
- (xcoff_mark): Likewise.
- (xcoff_build_ldsyms): Mark absolute symbols.
+ * elf.c (elfcore_grok_win32pstatus): New function: process
+ win32_pstatus_t notes in elf core file.
+ (elfcore_grok_note): Detect win32_pstatus notes.
-Wed Jan 14 16:03:11 1998 Richard Henderson <rth@cygnus.com>
+2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
- * bout.c (b_out_write_object_contents): Sort symbols before output
- to keep {CALL,BAL}NAME symbols adjacent.
- (b_out_symbol_cmp): New function.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
+ visibility.
+ * elflink.h (elf_link_add_object_symbols): Combine visibilities.
+ * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
-For older changes see ChangeLog-9697
+For older changes see ChangeLog-9899
Local Variables:
mode: change-log
diff --git a/gnu/usr.bin/binutils/bfd/Makefile.in b/gnu/usr.bin/binutils/bfd/Makefile.in
index 8b3372466b5..fec8d7ad40c 100644
--- a/gnu/usr.bin/binutils/bfd/Makefile.in
+++ b/gnu/usr.bin/binutils/bfd/Makefile.in
@@ -75,10 +75,14 @@ CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
@@ -96,10 +100,12 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+STRIP = @STRIP@
TDEFINES = @TDEFINES@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
@@ -125,6 +131,9 @@ docdir = doc
lib_LTLIBRARIES = libbfd.la
+WARN_CFLAGS = @WARN_CFLAGS@
+AM_CFLAGS = $(WARN_CFLAGS)
+
# bfd.h goes here, for now
BFD_H = bfd.h
@@ -139,14 +148,16 @@ BFD_LIBS = \
archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
format.lo init.lo libbfd.lo opncls.lo reloc.lo \
section.lo syms.lo targets.lo hash.lo linker.lo \
- srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo
+ srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
+ dwarf2.lo
BFD_LIBS_CFILES = \
archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
format.c init.c libbfd.c opncls.c reloc.c \
section.c syms.c targets.c hash.c linker.c \
- srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c
+ srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
+ dwarf2.c
# This list is alphabetized to make it easier to keep in sync
@@ -157,17 +168,21 @@ ALL_MACHINES = \
cpu-arc.lo \
cpu-arm.lo \
cpu-avr.lo \
+ cpu-cris.lo \
cpu-d10v.lo \
cpu-d30v.lo \
cpu-fr30.lo \
cpu-h8300.lo \
cpu-h8500.lo \
cpu-hppa.lo \
+ cpu-ia64.lo \
cpu-i370.lo \
cpu-i386.lo \
cpu-i860.lo \
cpu-i960.lo \
cpu-m32r.lo \
+ cpu-m68hc11.lo \
+ cpu-m68hc12.lo \
cpu-m68k.lo \
cpu-m88k.lo \
cpu-m10200.lo \
@@ -181,6 +196,7 @@ ALL_MACHINES = \
cpu-sh.lo \
cpu-sparc.lo \
cpu-tic30.lo \
+ cpu-tic54x.lo \
cpu-tic80.lo \
cpu-v850.lo \
cpu-vax.lo \
@@ -195,17 +211,21 @@ ALL_MACHINES_CFILES = \
cpu-arc.c \
cpu-arm.c \
cpu-avr.c \
+ cpu-cris.c \
cpu-d10v.c \
cpu-d30v.c \
cpu-fr30.c \
cpu-h8300.c \
cpu-h8500.c \
cpu-hppa.c \
+ cpu-ia64.c \
cpu-i370.c \
cpu-i386.c \
cpu-i860.c \
cpu-i960.c \
cpu-m32r.c \
+ cpu-m68hc11.c \
+ cpu-m68hc12.c \
cpu-m68k.c \
cpu-m88k.c \
cpu-m10200.c \
@@ -219,6 +239,7 @@ ALL_MACHINES_CFILES = \
cpu-sh.c \
cpu-sparc.c \
cpu-tic30.c \
+ cpu-tic54x.c \
cpu-tic80.c \
cpu-v850.c \
cpu-vax.c \
@@ -232,6 +253,7 @@ ALL_MACHINES_CFILES = \
BFD32_BACKENDS = \
aout-adobe.lo \
aout-arm.lo \
+ aout-cris.lo \
aout-ns32k.lo \
aout-sparcle.lo \
aout-tic30.lo \
@@ -262,6 +284,7 @@ BFD32_BACKENDS = \
coff-stgo32.lo \
coff-svm68k.lo \
coff-tic30.lo \
+ coff-tic54x.lo \
coff-tic80.lo \
coff-u68k.lo \
coff-we32k.lo \
@@ -269,23 +292,28 @@ BFD32_BACKENDS = \
coff-z8k.lo \
cofflink.lo \
dwarf1.lo \
- dwarf2.lo \
ecoff.lo \
ecofflink.lo \
+ efi-app-ia32.lo \
elf.lo \
elf32-arc.lo \
elfarm-oabi.lo \
elfarm-nabi.lo \
elf32-avr.lo \
+ elf32-cris.lo \
elf32-d10v.lo \
elf32-d30v.lo \
elf32-fr30.lo \
elf32-gen.lo \
+ elf32-hppa.lo \
elf32-i370.lo \
elf32-i386.lo \
elf32-i860.lo \
elf32-i960.lo \
+ elf32-ia64.lo \
elf32-m32r.lo \
+ elf32-m68hc11.lo \
+ elf32-m68hc12.lo \
elf32-m68k.lo \
elf32-m88k.lo \
elf-m10200.lo \
@@ -295,6 +323,7 @@ BFD32_BACKENDS = \
elf32-pj.lo \
elf32-ppc.lo \
elf32-sh.lo \
+ elf32-sh-lin.lo \
elf32-sparc.lo \
elf32-v850.lo \
elf32.lo \
@@ -363,6 +392,7 @@ BFD32_BACKENDS = \
BFD32_BACKENDS_CFILES = \
aout-adobe.c \
aout-arm.c \
+ aout-cris.c \
aout-ns32k.c \
aout-sparcle.c \
aout-tic30.c \
@@ -393,6 +423,7 @@ BFD32_BACKENDS_CFILES = \
coff-stgo32.c \
coff-svm68k.c \
coff-tic30.c \
+ coff-tic54x.c \
coff-tic80.c \
coff-u68k.c \
coff-we32k.c \
@@ -400,24 +431,28 @@ BFD32_BACKENDS_CFILES = \
coff-z8k.c \
cofflink.c \
dwarf1.c \
- dwarf2.c \
ecoff.c \
ecofflink.c \
+ efi-app-ia32.c \
elf.c \
elf32-arc.c \
elfarm-oabi.c \
elfarm-nabi.c \
elf32-avr.c \
+ elf32-cris.c \
elf32-d10v.c \
elf32-d30v.c \
elf32-fr30.c \
elf32-gen.c \
+ elf32-hppa.c \
elf32-i370.c \
elf32-i386.c \
elf32-i860.c \
elf32-i960.c \
elf32-m32r.c \
elf32-m68k.c \
+ elf32-m68hc11.c \
+ elf32-m68hc12.c \
elf32-m88k.c \
elf-m10200.c \
elf-m10300.c \
@@ -426,6 +461,7 @@ BFD32_BACKENDS_CFILES = \
elf32-pj.c \
elf32-ppc.c \
elf32-sh.c \
+ elf32-sh-lin.c \
elf32-sparc.c \
elf32-v850.c \
elf32.c \
@@ -473,7 +509,6 @@ BFD32_BACKENDS_CFILES = \
pei-sh.c \
pe-mips.c \
pei-mips.c \
- peigen.c \
ppcboot.c \
reloc16.c \
riscix.c \
@@ -497,21 +532,31 @@ BFD32_BACKENDS_CFILES = \
BFD64_BACKENDS = \
aout64.lo \
coff-alpha.lo \
+ coff64-rs6000.lo \
demo64.lo \
+ efi-app-ia64.lo \
+ elf64-x86-64.lo \
elf64-alpha.lo \
+ elf64-hppa.lo \
+ elf64-ia64.lo \
elf64-gen.lo \
elf64-mips.lo \
elf64-sparc.lo \
elf64.lo \
nlm32-alpha.lo \
- nlm64.lo
+ nlm64.lo \
+ pepigen.lo
BFD64_BACKENDS_CFILES = \
aout64.c \
coff-alpha.c \
+ coff64-rs6000.c \
demo64.c \
+ efi-app-ia64.c \
+ elf64-x86-64.c \
elf64-alpha.c \
+ elf64-hppa.c \
elf64-gen.c \
elf64-mips.c \
elf64-sparc.c \
@@ -552,7 +597,7 @@ TDEFAULTS = @tdefaults@
INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
# C source files that correspond to .o's.
-CFILES = \
+SOURCE_CFILES = \
$(BFD_LIBS_CFILES) \
$(ALL_MACHINES_CFILES) \
$(BFD32_BACKENDS_CFILES) \
@@ -560,21 +605,29 @@ 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 elf32-arm.h elfcode.h elfcore.h \
- elflink.h freebsd.h genlink.h go32stub.h libaout.h \
- libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \
- libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h nlmcode.h \
- nlmswap.h ns32k.h peicode.h som.h vms.h
+ aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
+ elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h \
+ elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \
+ libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
+ libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
+ nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
-HFILES = \
- elf32-target.h elf64-target.h targmatch.h \
- $(SOURCE_HFILES)
+BUILD_HFILES = \
+ elf32-target.h elf64-target.h targmatch.h
-POTFILES = $(CFILES) $(SOURCE_HFILES)
+HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
+
+SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
+BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
# Various kinds of .o files to put in libbfd.a:
# BFD_BACKENDS Routines the configured targets need.
@@ -604,13 +657,13 @@ BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
-MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \
- targmatch.h
-
+MOSTLYCLEANFILES = ofiles stamp-ofiles
-CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEP1 DEP2 libbfd.a stamp-lib \
+CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
+
+DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
@@ -629,7 +682,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo \
corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo \
syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo \
-ihex.lo stabs.lo stab-syms.lo
+ihex.lo stabs.lo stab-syms.lo dwarf2.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -649,7 +702,7 @@ OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .s
+.SUFFIXES: .S .c .lo .o .obj .s
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
@@ -704,6 +757,11 @@ maintainer-clean-noinstLIBRARIES:
.c.o:
$(COMPILE) -c $<
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
.s.o:
$(COMPILE) -c $<
@@ -712,6 +770,7 @@ maintainer-clean-noinstLIBRARIES:
mostlyclean-compile:
-rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
clean-compile:
@@ -957,6 +1016,7 @@ clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \
@@ -1014,9 +1074,22 @@ installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-po/POTFILES.in: @MAINT@ Makefile
- for file in $(POTFILES); do echo $$file; done | sort > tmp \
- && mv tmp $(srcdir)/po/POTFILES.in
+po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
+ for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/SRC-POTFILES.in
+
+po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
+ for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/BLD-POTFILES.in
+
+# The following target is retained for upgrade purposes.
+# This target used to exist in older versions of this makefile, and was
+# referenced by <builddir>/po/Makefile (which is created from <srcdir>/po/Make-in)
+# So old versions of <builddir>/po/Makefile will try to regenerate themselves
+# when make is next run, but that dependency cannot be completed without a build
+# of po/POTFILES.in. Hence the presence of this rule. This rule will be deleted
+# once it is no longer needed - probably in the fall of 2001.
+po/POTFILES.in:
diststuff: info
@@ -1039,6 +1112,7 @@ stamp-lib: libbfd.la
libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
if [ -f $$libtooldir/libbfd.a ]; then \
cp $$libtooldir/libbfd.a libbfd.tmp; \
+ $(RANLIB) libbfd.tmp; \
$(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
else true; fi
touch stamp-lib
@@ -1071,6 +1145,26 @@ elf64-target.h : elfxx-target.h
rm -f elf64-target.h
sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
mv -f elf64-target.new elf64-target.h
+
+elf32-ia64.c : elfxx-ia64.c
+ rm -f elf32-ia64.c
+ sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new
+ mv -f elf32-ia64.new elf32-ia64.c
+
+elf64-ia64.c : elfxx-ia64.c
+ rm -f elf64-ia64.c
+ sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new
+ mv -f elf64-ia64.new elf64-ia64.c
+
+peigen.c : peXXigen.c
+ rm -f peigen.c
+ sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new
+ mv -f peigen.new peigen.c
+
+pepigen.c : peXXigen.c
+ rm -f pepigen.c
+ sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
+ mv -f pepigen.new pepigen.c
$(BFD_LIBS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
$(BFD_MACHINES): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
$(BFD_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
@@ -1088,8 +1182,13 @@ install-data-local: $(BFD_H)
DEP: dep.sed $(CFILES) $(HFILES) bfd.h
rm -f DEP1
$(MAKE) MKDEP="$(MKDEP)" DEP1
- sed -f dep.sed < DEP1 > $@
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
+ sed -f dep.sed < DEP1 > DEPA
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
+ if grep ' /' DEPA > /dev/null 2> /dev/null; then \
+ echo 'make DEP failed!'; exit 1; \
+ else \
+ mv -f DEPA $@; \
+ fi
DEP1: $(CFILES)
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
@@ -1174,483 +1273,605 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
$(SHELL) ./config.status --recheck
-elfarm-oabi.lo: elfarm-oabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-
-elfarm-nabi.lo: elfarm-nabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-archive.lo: archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
-archures.lo: archures.c
-bfd.lo: bfd.c $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h libcoff.h \
- libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
-cache.lo: cache.c
-coffgen.lo: coffgen.c $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h
-corefile.lo: corefile.c
-format.lo: format.c
-init.lo: init.c
-libbfd.lo: libbfd.c
-opncls.lo: opncls.c $(INCDIR)/objalloc.h
-reloc.lo: reloc.c $(INCDIR)/bfdlink.h
-section.lo: section.c $(INCDIR)/bfdlink.h
-syms.lo: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
+archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
+ $(INCDIR)/aout/ranlib.h
+archures.lo: archures.c $(INCDIR)/filenames.h
+bfd.lo: bfd.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+cache.lo: cache.c $(INCDIR)/filenames.h
+coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h
+corefile.lo: corefile.c $(INCDIR)/filenames.h
+format.lo: format.c $(INCDIR)/filenames.h
+init.lo: init.c $(INCDIR)/filenames.h
+libbfd.lo: libbfd.c $(INCDIR)/filenames.h
+opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
+reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
+section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
+syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \
+ targmatch.h
+hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
+linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ genlink.h
+srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
+binary.lo: binary.c $(INCDIR)/filenames.h
+tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
+ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
+stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def
-targets.lo: targets.c $(INCDIR)/fnmatch.h targmatch.h
-hash.lo: hash.c $(INCDIR)/objalloc.h
-linker.lo: linker.c $(INCDIR)/bfdlink.h genlink.h
-srec.lo: srec.c $(INCDIR)/libiberty.h
-binary.lo: binary.c
-tekhex.lo: tekhex.c $(INCDIR)/libiberty.h
-ihex.lo: ihex.c $(INCDIR)/libiberty.h
-stabs.lo: stabs.c $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
-cpu-a29k.lo: cpu-a29k.c
-cpu-alpha.lo: cpu-alpha.c
-cpu-arc.lo: cpu-arc.c
-cpu-arm.lo: cpu-arm.c
-cpu-avr.lo: cpu-avr.c
-cpu-d10v.lo: cpu-d10v.c
-cpu-d30v.lo: cpu-d30v.c
-cpu-fr30.lo: cpu-fr30.c
-cpu-h8300.lo: cpu-h8300.c
-cpu-h8500.lo: cpu-h8500.c
-cpu-hppa.lo: cpu-hppa.c
-cpu-i370.lo: cpu-i370.c
-cpu-i386.lo: cpu-i386.c
-cpu-i860.lo: cpu-i860.c
-cpu-i960.lo: cpu-i960.c
-cpu-m32r.lo: cpu-m32r.c
-cpu-m68k.lo: cpu-m68k.c
-cpu-m88k.lo: cpu-m88k.c
-cpu-m10200.lo: cpu-m10200.c
-cpu-m10300.lo: cpu-m10300.c
-cpu-mcore.lo: cpu-mcore.c
-cpu-mips.lo: cpu-mips.c
-cpu-ns32k.lo: cpu-ns32k.c ns32k.h
-cpu-pj.lo: cpu-pj.c
-cpu-powerpc.lo: cpu-powerpc.c
-cpu-rs6000.lo: cpu-rs6000.c
-cpu-sh.lo: cpu-sh.c
-cpu-sparc.lo: cpu-sparc.c
-cpu-tic30.lo: cpu-tic30.c
-cpu-tic80.lo: cpu-tic80.c
-cpu-v850.lo: cpu-v850.c
-cpu-vax.lo: cpu-vax.c
-cpu-we32k.lo: cpu-we32k.c
-cpu-w65.lo: cpu-w65.c
-cpu-z8k.lo: cpu-z8k.c
-aout-adobe.lo: aout-adobe.c $(INCDIR)/aout/adobe.h \
+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
+cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
+cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
+cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
+cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h
+cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
+cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
+cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
+cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
+cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h
+cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h
+cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h
+cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h
+cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h cpu-ia64-opc.c \
+ $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h
+cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h
+cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h
+cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
+cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
+cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
+cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
+cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
+cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h
+cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h
+cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h
+cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
+cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
+cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
+cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
+cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
+cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
+cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h
+cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
+cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
+cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
+cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h
+cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h
+cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h
+cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h
+cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h
+cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h
+cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h
+aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
$(INCDIR)/bfdlink.h
-aout-arm.lo: aout-arm.c libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h aoutx.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
+aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
+aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \
ns32k.h libaout.h $(INCDIR)/bfdlink.h
aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
- libaout.h aoutf1.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
-aout-tic30.lo: aout-tic30.c libaout.h $(INCDIR)/bfdlink.h \
+ libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aoutx.h
-aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
+ $(INCDIR)/aout/ar.h aout-target.h
+aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-aout32.lo: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h
-armnetbsd.lo: armnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h
+aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
+ libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
+aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-bout.lo: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
-cf-i386lynx.lo: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
-cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/coff/m68k.h \
+armnetbsd.lo: armnetbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ genlink.h $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def libaout.h
+cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \
+ coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-a29k.lo: coff-a29k.c $(INCDIR)/filenames.h $(INCDIR)/coff/a29k.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/coff/sparc.h \
+coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/apollo.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/coff/arm.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-a29k.lo: coff-a29k.c $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h \
+coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h coff-m68k.c \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-apollo.lo: coff-apollo.c $(INCDIR)/coff/apollo.h \
+coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
+coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/h8500.h $(INCDIR)/coff/internal.h libcoff.h \
+ coffcode.h coffswap.h
+coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-arm.lo: coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-aux.lo: coff-aux.c $(INCDIR)/coff/aux-coff.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m68k.h coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h \
+coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/coff/i860.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-h8300.lo: coff-h8300.c $(INCDIR)/bfdlink.h genlink.h \
- $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h \
+coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/coff/i960.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-h8500.lo: coff-h8500.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-i386.lo: coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-i860.lo: coff-i860.c $(INCDIR)/coff/i860.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/coff/i386.h \
+coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m68k.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-i960.lo: coff-i960.c $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-m68k.lo: coff-m68k.c $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-m88k.lo: coff-m88k.c $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-mips.lo: coff-mips.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/mips.h libcoff.h libecoff.h coffswap.h \
- ecoffswap.h
-coff-pmac.lo: coff-pmac.c coff-rs6000.c $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
+coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m88k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-rs6000.lo: coff-rs6000.c $(INCDIR)/coff/internal.h \
+coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h libcoff.h \
+ libecoff.h coffswap.h ecoffswap.h
+coff-pmac.lo: coff-pmac.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
+ xcoff-target.h coffcode.h coffswap.h
+coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h libcoff.h \
+ $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h
+coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h libcoff.h \
coffcode.h coffswap.h
-coff-sh.lo: coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-sparc.lo: coff-sparc.c $(INCDIR)/coff/sparc.h \
+coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
+coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \
go32stub.h
-coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/tic30.h $(INCDIR)/coff/internal.h libcoff.h \
coffcode.h coffswap.h
-coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \
+coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic80.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/tic80.h $(INCDIR)/coff/internal.h libcoff.h \
coffcode.h coffswap.h
-coff-we32k.lo: coff-we32k.c $(INCDIR)/coff/we32k.h \
+coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/coff/we32k.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-w65.lo: coff-w65.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-z8k.lo: coff-z8k.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-cofflink.lo: cofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
- libcoff.h
-dwarf1.lo: dwarf1.c $(INCDIR)/libiberty.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf.h
-dwarf2.lo: dwarf2.c $(INCDIR)/libiberty.h elf-bfd.h \
+coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/w65.h $(INCDIR)/coff/internal.h libcoff.h \
+ coffcode.h coffswap.h
+coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/internal.h libcoff.h \
+ coffcode.h coffswap.h
+cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/internal.h libcoff.h
+dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf.h
+ecoff.lo: ecoff.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h
+ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h
+efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
+ coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h
+elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
-ecoff.lo: ecoff.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/ar.h \
- $(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
- libcoff.h libecoff.h
-ecofflink.lo: ecofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/objalloc.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
- libcoff.h libecoff.h
-elf.lo: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
-elf32-arc.lo: elf32-arc.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm-oabi.h \
- $(INCDIR)/elf/reloc-macros.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
+elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-arm.h elf32-target.h
elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-arm.h \
- elf32-target.h
-elf32-avr.lo: elf32-avr.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-d10v.lo: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-arm.h elf32-target.h
+elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-d30v.lo: elf32-d30v.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-i370.lo: elf32-i370.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/i370.h elf32-target.h
-elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
+elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-i860.lo: elf32-i860.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-i960.lo: elf32-i960.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/i960.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-m32r.lo: elf32-m32r.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-m68k.lo: elf32-m68k.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-m88k.lo: elf32-m88k.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/bfdlink.h elf32-target.h
+elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
+ libhppa.h elf32-hppa.h elf-hppa.h elf32-target.h
+elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h elf32-target.h
+elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf-m10200.lo: elf-m10200.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf-m10300.lo: elf-m10300.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/reloc-macros.h \
+elf32-i960.lo: elf32-i960.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-mcore.lo: elf32-mcore.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-mips.lo: elf32-mips.c $(INCDIR)/bfdlink.h genlink.h \
+elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-pj.lo: elf32-pj.c $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/bfdlink.h elf32-target.h
+elf-m10200.lo: elf-m10200.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-sparc.lo: elf32-sparc.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/bfdlink.h elf32-target.h
+elf-m10300.lo: elf-m10300.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-v850.lo: elf32-v850.c $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32.lo: elf32.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elfcore.h elflink.h
-elflink.lo: elflink.c $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
-epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
-hp300bsd.lo: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
+ elf32-target.h
+elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
+elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
+elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
+elf32-sh-lin.lo: elf32-sh-lin.c elf32-sh.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \
+ elf32-target.h
+elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
+elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h elfcore.h elflink.h
+elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h
+epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \
+ coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \
+ coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
- aoutx.h $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
-som.lo: som.c
-i386aout.lo: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386bsd.lo: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
+som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h
+i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
+i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
-i386freebsd.lo: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386linux.lo: i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h
-i386lynx.lo: i386lynx.c libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386msdos.lo: i386msdos.c libaout.h $(INCDIR)/bfdlink.h
-i386netbsd.lo: i386netbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386mach3.lo: i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h
-i386os9k.lo: i386os9k.c $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/os9k.h
-ieee.lo: ieee.c $(INCDIR)/ieee.h libieee.h
-m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h libaout.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h
+i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h
+i386netbsd.lo: i386netbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h
+i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ libaout.h $(INCDIR)/os9k.h
+ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/ieee.h \
+ libieee.h
+m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h
+m68klynx.lo: m68klynx.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+m88kmach3.lo: m88kmach3.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-m68klinux.lo: m68klinux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h
-m68klynx.lo: m68klynx.c libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-m68knetbsd.lo: m68knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-m88kmach3.lo: m88kmach3.c libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-mipsbsd.lo: mipsbsd.c libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-newsos3.lo: newsos3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h
-nlm.lo: nlm.c libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- $(INCDIR)/nlm/external.h
-nlm32-i386.lo: nlm32-i386.c $(INCDIR)/nlm/i386-ext.h \
+mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h
+nlm.lo: nlm.c $(INCDIR)/filenames.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/nlm/i386-ext.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
-nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/nlm/sparc32-ext.h \
+nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/nlm/sparc32-ext.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
+ nlm-target.h
+nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/nlm/ppc-ext.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
-nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/nlm/ppc-ext.h libnlm.h \
- $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
- nlmswap.h nlm-target.h
-nlm32.lo: nlm32.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
- $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
-ns32knetbsd.lo: ns32knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-oasys.lo: oasys.c $(INCDIR)/oasys.h liboasys.h
-pc532-mach.lo: pc532-mach.c libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-pe-arm.lo: pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pei-arm.lo: pei-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pe-i386.lo: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pei-i386.lo: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pe-mcore.lo: pe-mcore.c coff-mcore.c $(INCDIR)/coff/mcore.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pei-mcore.lo: pei-mcore.c coff-mcore.c $(INCDIR)/coff/mcore.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pe-ppc.lo: pe-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pei-ppc.lo: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pe-sh.lo: pe-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- coffcode.h peicode.h libpei.h
-pei-sh.lo: pei-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- coffcode.h peicode.h libpei.h
-pe-mips.lo: pe-mips.c $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h \
+nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/oasys.h \
+ liboasys.h
+pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
+ libpei.h
+pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
+ libpei.h
+pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
+ libpei.h
+pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
+ libpei.h
+pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
+ libpei.h
+pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
+ libpei.h
+pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
+ $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
-pei-mips.lo: pei-mips.c pe-mips.c $(INCDIR)/coff/mipspe.h \
+pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
+ $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
+ libcoff.h coffcode.h peicode.h libpei.h
+pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
+ libpei.h
+pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/coff/mipspe.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-peigen.lo: peigen.c $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
-ppcboot.lo: ppcboot.c
-reloc16.lo: reloc16.c $(INCDIR)/bfdlink.h genlink.h \
- $(INCDIR)/coff/internal.h libcoff.h
-riscix.lo: riscix.c libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h
-sparclinux.lo: sparclinux.c $(INCDIR)/aout/aout64.h \
+pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \
+ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
+ libpei.h
+ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h
+reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ genlink.h $(INCDIR)/coff/internal.h libcoff.h
+riscix.lo: riscix.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h
-sparclynx.lo: sparclynx.c $(INCDIR)/aout/sun4.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-sparcnetbsd.lo: sparcnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
- $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-vaxnetbsd.lo: vaxnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-versados.lo: versados.c $(INCDIR)/libiberty.h
-vms.lo: vms.c $(INCDIR)/bfdlink.h vms.h
-vms-gsd.lo: vms-gsd.c $(INCDIR)/bfdlink.h vms.h
-vms-hdr.lo: vms-hdr.c $(INCDIR)/bfdlink.h vms.h
-vms-misc.lo: vms-misc.c $(INCDIR)/bfdlink.h vms.h
-vms-tir.lo: vms-tir.c $(INCDIR)/bfdlink.h vms.h
-xcofflink.lo: xcofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
- libcoff.h
-aout64.lo: aout64.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h
-coff-alpha.lo: coff-alpha.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
- libecoff.h coffswap.h ecoffswap.h
-demo64.lo: demo64.c aoutf1.h $(INCDIR)/aout/sun4.h \
+sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
aout-target.h
-elf64-alpha.lo: elf64-alpha.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+sparcnetbsd.lo: sparcnetbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
+ $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
+vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
+vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ vms.h
+vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ vms.h
+vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ vms.h
+vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ vms.h
+vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ vms.h
+xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/internal.h libcoff.h
+aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
- libcoff.h libecoff.h ecoffswap.h elf64-target.h
-elf64-gen.lo: elf64-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf64-target.h
-elf64-mips.lo: elf64-mips.c $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h \
- genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \
- elf64-target.h
-elf64-sparc.lo: elf64-sparc.c elf-bfd.h $(INCDIR)/elf/common.h \
+ libcoff.h libecoff.h coffswap.h ecoffswap.h
+coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6k64.h libcoff.h \
+ $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h
+demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \
+ $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
+efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
+ coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \
+ $(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)/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/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h elf64-target.h
+elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
+ $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
+ ecoffswap.h elf64-target.h
+elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
-elf64.lo: elf64.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
+elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h elfcore.h elflink.h
+nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
+ $(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
+ nlm-target.h
+nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h
+hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h
+irix-core.lo: irix-core.c $(INCDIR)/filenames.h
+lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h
+osf-core.lo: osf-core.c $(INCDIR)/filenames.h
+sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h
+trad-core.lo: trad-core.c $(INCDIR)/filenames.h libaout.h \
+ $(INCDIR)/bfdlink.h
+cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h
+elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elfcore.h elflink.h
-nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/nlm/alpha-ext.h \
- libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
-nlm64.lo: nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
- $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
-aix386-core.lo: aix386-core.c $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
-hpux-core.lo: hpux-core.c
-irix-core.lo: irix-core.c
-lynx-core.lo: lynx-core.c
-osf-core.lo: osf-core.c
-sco5-core.lo: sco5-core.c libaout.h $(INCDIR)/bfdlink.h
-trad-core.lo: trad-core.c libaout.h $(INCDIR)/bfdlink.h
-cisco-core.lo: cisco-core.c
+ $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \
+ $(INCDIR)/elf/reloc-macros.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 elf64-target.h
+peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h libpei.h
+pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/ia64.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h libpei.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/gnu/usr.bin/binutils/bfd/README b/gnu/usr.bin/binutils/bfd/README
index 51ce133355f..992c28552f4 100644
--- a/gnu/usr.bin/binutils/bfd/README
+++ b/gnu/usr.bin/binutils/bfd/README
@@ -34,7 +34,7 @@ BFD supports the following configure options:
Use mmap when accessing files. This is faster on some hosts,
but slower on others. It may not work on all hosts.
-Report bugs with BFD to bug-gnu-utils@gnu.org.
+Report bugs with BFD to bug-binutils@gnu.org.
Patches are encouraged. When sending patches, always send the output
of diff -u or diff -c from the original file to the new file. Do not
diff --git a/gnu/usr.bin/binutils/bfd/aclocal.m4 b/gnu/usr.bin/binutils/bfd/aclocal.m4
index ca9d432d712..9f18aaf7290 100644
--- a/gnu/usr.bin/binutils/bfd/aclocal.m4
+++ b/gnu/usr.bin/binutils/bfd/aclocal.m4
@@ -86,7 +86,9 @@ dnl Check for existence of a type $1 in sys/procfs.h
AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE,
[AC_MSG_CHECKING([for $1 in sys/procfs.h])
AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
- [AC_TRY_COMPILE([#include <sys/procfs.h>],
+ [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
@@ -104,7 +106,9 @@ dnl Check for existence of member $2 in type $1 in sys/procfs.h
AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
- [AC_TRY_COMPILE([#include <sys/procfs.h>],
+ [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
@@ -116,7 +120,21 @@ AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
])
+sinclude(../libtool.m4)
+dnl The lines below arrange for aclocal not to bring libtool.m4
+dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
+dnl to add a definition of LIBTOOL to Makefile.in.
+ifelse(yes,no,[
+AC_DEFUN([AM_PROG_LIBTOOL],)
+AC_DEFUN([AM_DISABLE_SHARED],)
+AC_SUBST(LIBTOOL)
+])
+sinclude(../gettext.m4)
+ifelse(yes,no,[
+AC_DEFUN([CY_WITH_NLS],)
+AC_SUBST(INTLLIBS)
+])
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
@@ -210,415 +228,6 @@ else
fi
AC_SUBST($1)])
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$lt_target" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$lt_target" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
@@ -675,348 +284,3 @@ else
$1_FALSE=
fi])
-# This file is derived from `gettext.m4'. The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-AC_DEFUN(CY_WITH_NLS,
- [AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
-
- USE_INCLUDED_LIBINTL=no
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
- AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH(included-gettext,
- [ --with-included-gettext use the GNU gettext library included here],
- nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If gettext or catgets are available (in this order) we
- dnl use this. Else we have to fall back to GNU NLS library.
- dnl catgets is only used if permitted by option --with-catgets.
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- AC_CHECK_HEADER(libintl.h,
- [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
- [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
- gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for gettext in libintl],
- gt_cv_func_gettext_libintl,
- [AC_TRY_LINK([], [return (int) gettext ("")],
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)])])
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT, 1,
- [Define as 1 if you have gettext and don't want to use GNU gettext.])
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- AC_CHECK_FUNCS(dcgettext)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- INSTOBJEXT=.mo
- fi
- fi
- ])
-
- dnl In the standard gettext, we would now check for catgets.
- dnl However, we never want to use catgets for our releases.
-
- if test "$CATOBJEXT" = "NONE"; then
- dnl Neither gettext nor catgets in included in the C library.
- dnl Fall back on GNU gettext library.
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_SUBST(MSGFMT)
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext programs is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLDEPS)
- AC_SUBST(INTLLIBS)
- AC_SUBST(INTLOBJS)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
-
-AC_DEFUN(CY_GNU_GETTEXT,
- [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
-
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h])
- AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- AC_CHECK_FUNCS(stpcpy)
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
- fi
-
- AM_LC_MESSAGES
- CY_WITH_NLS
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- dnl The reference to <locale.h> in the installed <libintl.h> file
- dnl must be resolved because we cannot expect the users of this
- dnl to define HAVE_LOCALE_H.
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
- AC_SUBST(INCLUDE_LOCALE_H)
-
- dnl Determine which catalog format we have (if any is needed)
- dnl For now we know about two different formats:
- dnl Linux libc-5 and the normal X/Open format
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
- dnl Transform the SED scripts while copying because some dumb SEDs
- dnl cannot handle comments.
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- dnl po2tbl.sed is always needed.
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- dnl In the intl/Makefile.in we have a special dependency which makes
- dnl only sense for gettext. We comment this out for non-gettext
- dnl packages.
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
- AC_SUBST(GT_NO)
- AC_SUBST(GT_YES)
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
- AC_SUBST(MKINSTALLDIRS)
-
- dnl *** For now the libtool support in intl/Makefile is not for real.
- l=
- AC_SUBST(l)
-
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile. But only do this if the po directory
- dnl exists in srcdir.
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
- ])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your locale.h file contains LC_MESSAGES.])
- fi
- fi])
-
diff --git a/gnu/usr.bin/binutils/bfd/aix386-core.c b/gnu/usr.bin/binutils/bfd/aix386-core.c
index fb67b17081f..09d409809fe 100644
--- a/gnu/usr.bin/binutils/bfd/aix386-core.c
+++ b/gnu/usr.bin/binutils/bfd/aix386-core.c
@@ -1,7 +1,7 @@
/* BFD back-end for AIX on PS/2 core files.
This was based on trad-core.c, which was written by John Gilmore of
Cygnus Support.
- Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Minh Tran-Le <TRANLE@INTELLICORP.COM>.
Converted to back end form by Ian Lance Taylor <ian@cygnus.com>.
@@ -32,13 +32,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <signal.h>
#if defined (_AIX) && defined (_I386)
-#define NOCHECKS /* this is for coredump.h */
-#define _h_USER /* avoid including user.h from coredump.h */
+#define NOCHECKS /* This is for coredump.h. */
+#define _h_USER /* Avoid including user.h from coredump.h. */
#include <uinfo.h>
#include <sys/i386/coredump.h>
#endif /* _AIX && _I386 */
-/* maybe this could work on some other i386 but I have not tried it
+/* Maybe this could work on some other i386 but I have not tried it
* mtranle@paris - Tue Sep 24 12:49:35 1991
*/
@@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define COR_MAGIC "core"
#endif
-/* need this cast because ptr is really void * */
+/* Need this cast because ptr is really void *. */
#define core_hdr(bfd) \
(((bfd->tdata.trad_core_data))->hdr)
#define core_section(bfd,n) \
@@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define core_reg2sec(bfd) \
(((bfd)->tdata.trad_core_data)->reg2_section)
-/* These are stored in the bfd's tdata */
+/* These are stored in the bfd's tdata. */
struct trad_core_struct {
struct corehdr *hdr; /* core file header */
asection *reg_section;
@@ -70,7 +70,7 @@ static const bfd_target *
aix386_core_file_p (abfd)
bfd *abfd;
{
- int i,n;
+ int i, n;
unsigned char longbuf[4]; /* Raw bytes of various header fields */
int core_size = sizeof (struct corehdr);
struct corehdr *core;
@@ -79,18 +79,20 @@ aix386_core_file_p (abfd)
struct corehdr internal_core;
} *mergem;
- if (bfd_read ((PTR)longbuf, 1, sizeof (longbuf), abfd) != sizeof (longbuf))
+ if (bfd_read ((PTR) longbuf, 1, sizeof (longbuf), abfd) != sizeof (longbuf))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return 0;
}
- if (strncmp(longbuf,COR_MAGIC,4)) return 0;
+ if (strncmp (longbuf, COR_MAGIC, 4))
+ return 0;
- if (bfd_seek (abfd, 0L, false) < 0) return 0;
+ if (bfd_seek (abfd, 0L, false) < 0)
+ return 0;
- mergem = (struct mergem *)bfd_zalloc (abfd, sizeof (struct mergem));
+ mergem = (struct mergem *) bfd_zalloc (abfd, sizeof (struct mergem));
if (mergem == NULL)
return 0;
@@ -100,45 +102,45 @@ aix386_core_file_p (abfd)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- bfd_release (abfd, (char *)mergem);
+ bfd_release (abfd, (char *) mergem);
return 0;
}
set_tdata (abfd, &mergem->coredata);
core_hdr (abfd) = core;
- /* create the sections. This is raunchy, but bfd_close wants to reclaim
- them */
+ /* Create the sections. This is raunchy, but bfd_close wants to
+ reclaim them. */
core_regsec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
if (core_regsec (abfd) == NULL)
{
loser:
- bfd_release (abfd, (char *)mergem);
+ bfd_release (abfd, (char *) mergem);
return 0;
}
core_reg2sec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
if (core_reg2sec (abfd) == NULL)
{
loser1:
- bfd_release (abfd, core_regsec (abfd));
+ bfd_release (abfd, core_regsec (abfd));
goto loser;
}
- for (i=0, n=0 ; (i < MAX_CORE_SEGS) && (core->cd_segs[i].cs_type) ; i++)
+ for (i = 0, n = 0; (i < MAX_CORE_SEGS) && (core->cd_segs[i].cs_type); i++)
{
if (core->cd_segs[i].cs_offset == 0)
continue;
- core_section (abfd,n) =
+ core_section (abfd, n) =
(asection *) bfd_zalloc (abfd, sizeof (asection));
- if (core_section (abfd,n) == NULL)
+ if (core_section (abfd, n) == NULL)
{
int j;
if (n > 0)
{
- for (j=0; j < n; j++)
- bfd_release (abfd, core_section(abfd, j));
+ for (j = 0; j < n; j++)
+ bfd_release (abfd, core_section (abfd, j));
}
- bfd_release (abfd, (char *)mergem);
+ bfd_release (abfd, (char *) mergem);
goto loser1;
}
@@ -177,7 +179,7 @@ aix386_core_file_p (abfd)
core_section (abfd, n)->alignment_power = 2;
core_section (abfd, n)->next = NULL;
if (n > 0)
- core_section (abfd, (n-1))->next = core_section (abfd, n);
+ core_section (abfd, (n - 1))->next = core_section (abfd, n);
abfd->section_count = ++n;
}
@@ -188,18 +190,19 @@ aix386_core_file_p (abfd)
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS;
- core_regsec (abfd)->_raw_size = sizeof(core->cd_regs);
- core_reg2sec (abfd)->_raw_size = sizeof(core->cd_fpregs);
+ core_regsec (abfd)->_raw_size = sizeof (core->cd_regs);
+ core_reg2sec (abfd)->_raw_size = sizeof (core->cd_fpregs);
core_regsec (abfd)->vma = -1;
core_reg2sec (abfd)->vma = -1;
- /* We'll access the regs afresh in the core file, like any section: */
- core_regsec (abfd)->filepos = (file_ptr)offsetof(struct corehdr,cd_regs[0]);
- core_reg2sec (abfd)->filepos = (file_ptr)offsetof(struct corehdr,
- cd_fpregs);
+ /* We'll access the regs afresh in the core file, like any section. */
+ core_regsec (abfd)->filepos =
+ (file_ptr) offsetof (struct corehdr, cd_regs[0]);
+ core_reg2sec (abfd)->filepos =
+ (file_ptr) offsetof (struct corehdr, cd_fpregs);
- /* add the 2 reg fake sections to abfd */
+ /* Add the 2 reg fake sections to abfd. */
abfd->section_count += 2;
abfd->sections = core_regsec (abfd);
core_regsec (abfd)->next = core_reg2sec (abfd);
@@ -227,59 +230,61 @@ aix386_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd;
bfd *exec_bfd;
{
- return true; /* FIXME, We have no way of telling at this
- point */
+ /* FIXME: We have no way of telling at this point. */
+ return true;
}
/* If somebody calls any byte-swapping routines, shoot them. */
+
static void
-swap_abort()
+swap_abort ()
{
- abort(); /* This way doesn't require any declaration for ANSI to fuck up */
+ /* This way doesn't require any declaration for ANSI to fuck up. */
+ abort ();
}
+
#define NO_GET ((PROTO(bfd_vma, (*), ( const bfd_byte *))) swap_abort )
#define NO_GETS ((PROTO(bfd_signed_vma, (*), (const bfd_byte *))) swap_abort )
#define NO_PUT ((PROTO(void, (*), (bfd_vma, bfd_byte *))) swap_abort )
-const bfd_target aix386_core_vec =
- {
- "aix386-core",
- bfd_target_unknown_flavour,
- BFD_ENDIAN_BIG, /* target byte order */
- BFD_ENDIANG_BIG, /* target headers byte order */
+const bfd_target aix386_core_vec = {
+ "aix386-core",
+ bfd_target_unknown_flavour,
+ BFD_ENDIAN_BIG, /* target byte order */
+ BFD_ENDIANG_BIG, /* target headers byte order */
(HAS_RELOC | EXEC_P | /* object flags */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading underscore */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
- NO_GET, NO_GETS, NO_PUT,
- NO_GET, NO_GETS, NO_PUT,
- NO_GET, NO_GETS, NO_PUT, /* data */
- NO_GET, NO_GETS, NO_PUT,
- NO_GET, NO_GETS, NO_PUT,
- NO_GET, NO_GETS, NO_PUT, /* hdrs */
-
- {_bfd_dummy_target, _bfd_dummy_target,
- _bfd_dummy_target, aix386_core_file_p},
- {bfd_false, bfd_false, /* bfd_create_object */
- bfd_false, bfd_false},
- {bfd_false, bfd_false, /* bfd_write_contents */
- bfd_false, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (aix386),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
- BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
- BFD_JUMP_TABLE_WRITE (_bfd_generic),
- BFD_JUMP_TABLE_LINK (_bfd_nolink),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- NULL,
-
- (PTR) 0
+ 0, /* leading underscore */
+ ' ', /* ar_pad_char */
+ 16, /* ar_max_namelen */
+ NO_GET, NO_GETS, NO_PUT,
+ NO_GET, NO_GETS, NO_PUT,
+ NO_GET, NO_GETS, NO_PUT, /* data */
+ NO_GET, NO_GETS, NO_PUT,
+ NO_GET, NO_GETS, NO_PUT,
+ NO_GET, NO_GETS, NO_PUT, /* hdrs */
+
+ {_bfd_dummy_target, _bfd_dummy_target,
+ _bfd_dummy_target, aix386_core_file_p},
+ {bfd_false, bfd_false, /* bfd_create_object */
+ bfd_false, bfd_false},
+ {bfd_false, bfd_false, /* bfd_write_contents */
+ bfd_false, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (aix386),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ NULL,
+
+ (PTR) 0
};
diff --git a/gnu/usr.bin/binutils/bfd/aout-adobe.c b/gnu/usr.bin/binutils/bfd/aout-adobe.c
index 8216c7ea509..03acacb69c9 100644
--- a/gnu/usr.bin/binutils/bfd/aout-adobe.c
+++ b/gnu/usr.bin/binutils/bfd/aout-adobe.c
@@ -1,5 +1,5 @@
/* BFD back-end for a.out.adobe binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Cygnus Support. Based on bout.c.
@@ -28,7 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "aout/stab_gnu.h"
#include "libaout.h" /* BFD a.out internal data structures */
-extern const bfd_target a_out_adobe_vec; /* Forward decl */
+/* Forward decl. */
+extern const bfd_target a_out_adobe_vec;
static const bfd_target *aout_adobe_callback PARAMS ((bfd *));
@@ -42,14 +43,14 @@ static void aout_adobe_write_section PARAMS ((bfd *abfd, sec_ptr sect));
void aout_adobe_swap_exec_header_in
PARAMS ((bfd *abfd, struct external_exec *raw_bytes,
struct internal_exec *execp));
-
+
void
aout_adobe_swap_exec_header_in (abfd, raw_bytes, execp)
bfd *abfd;
struct external_exec *raw_bytes;
struct internal_exec *execp;
{
- struct external_exec *bytes = (struct external_exec *)raw_bytes;
+ 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 = bfd_h_get_32 (abfd, bytes->e_info);
@@ -75,9 +76,10 @@ aout_adobe_swap_exec_header_out (abfd, execp, raw_bytes)
struct internal_exec *execp;
struct external_exec *raw_bytes;
{
- struct external_exec *bytes = (struct external_exec *)raw_bytes;
+ struct external_exec *bytes = (struct external_exec *) raw_bytes;
- /* Now fill in fields in the raw data, from the fields in the exec struct. */
+ /* Now fill in fields in the raw data, from the fields in the exec
+ struct. */
bfd_h_put_32 (abfd, execp->a_info , bytes->e_info);
PUT_WORD (abfd, execp->a_text , bytes->e_text);
PUT_WORD (abfd, execp->a_data , bytes->e_data);
@@ -88,7 +90,6 @@ aout_adobe_swap_exec_header_out (abfd, execp, raw_bytes)
PUT_WORD (abfd, execp->a_drsize, bytes->e_drsize);
}
-
static const bfd_target *
aout_adobe_object_p (abfd)
bfd *abfd;
@@ -98,11 +99,12 @@ aout_adobe_object_p (abfd)
char *targ;
if (bfd_read ((PTR) &exec_bytes, 1, EXEC_BYTES_SIZE, abfd)
- != EXEC_BYTES_SIZE) {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
+ != EXEC_BYTES_SIZE)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
anexec.a_info = bfd_h_get_32 (abfd, exec_bytes.e_info);
@@ -112,22 +114,23 @@ aout_adobe_object_p (abfd)
If the environment variable GNUTARGET is set to "a.out.adobe", we will
take just about any a.out file as an Adobe a.out file. FIXME! */
- if (N_BADMAG (anexec)) {
- targ = getenv ("GNUTARGET");
- if (targ && !strcmp (targ, a_out_adobe_vec.name))
- ; /* Just continue anyway, if specifically set to this format */
- else
- {
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
- }
+ if (N_BADMAG (anexec))
+ {
+ targ = getenv ("GNUTARGET");
+ if (targ && !strcmp (targ, a_out_adobe_vec.name))
+ /* Just continue anyway, if specifically set to this format. */
+ ;
+ else
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+ }
aout_adobe_swap_exec_header_in (abfd, &exec_bytes, &anexec);
return aout_32_some_aout_object_p (abfd, &anexec, aout_adobe_callback);
}
-
/* Finish up the opening of a b.out file for reading. Fill in all the
fields that are not handled by common code. */
@@ -145,7 +148,7 @@ aout_adobe_callback (abfd)
flagword flags;
/* Architecture and machine type -- unknown in this format. */
- bfd_set_arch_mach(abfd, bfd_arch_unknown, 0);
+ bfd_set_arch_mach (abfd, bfd_arch_unknown, 0);
/* The positions of the string table and symbol table. */
obj_str_filepos (abfd) = N_STROFF (*execp);
@@ -153,97 +156,106 @@ aout_adobe_callback (abfd)
/* Suck up the section information from the file, one section at a time. */
- for (;;) {
- if (bfd_read ((PTR) ext, 1, sizeof (*ext), abfd) != sizeof (*ext)) {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
- switch (ext->e_type[0]) {
- case N_TEXT:
- section_name = ".text";
- flags = SEC_CODE | SEC_LOAD | SEC_ALLOC | SEC_HAS_CONTENTS;
- break;
-
- case N_DATA:
- section_name = ".data";
- flags = SEC_DATA | SEC_LOAD | SEC_ALLOC | SEC_HAS_CONTENTS;
- break;
-
- case N_BSS:
- section_name = ".bss";
- flags = SEC_DATA | SEC_HAS_CONTENTS;
- break;
-
- case 0:
- goto no_more_sections;
-
- default:
- (*_bfd_error_handler)
- (_("%s: Unknown section type in a.out.adobe file: %x\n"),
- bfd_get_filename (abfd), ext->e_type[0]);
- goto no_more_sections;
- }
-
- /* First one is called ".text" or whatever; subsequent ones are
- ".text1", ".text2", ... */
-
- bfd_set_error (bfd_error_no_error);
- sect = bfd_make_section (abfd, section_name);
- trynum = 0;
- while (!sect) {
- if (bfd_get_error () != bfd_error_no_error)
- return 0; /* Some other error -- slide into the sunset */
- sprintf (try_again, "%s%d", section_name, ++trynum);
- sect = bfd_make_section (abfd, try_again);
- }
-
- /* Fix the name, if it is a sprintf'd name. */
- if (sect->name == try_again) {
- newname = (char *) bfd_zalloc(abfd, strlen (sect->name));
- if (newname == NULL)
- return 0;
- strcpy (newname, sect->name);
- sect->name = newname;
- }
-
- /* Now set the section's attributes. */
- bfd_set_section_flags (abfd, sect, flags);
- sect->_raw_size = ((ext->e_size[0] << 8) /* Assumed big-endian */
- | ext->e_size[1] << 8)
- | ext->e_size[2];
- sect->_cooked_size = sect->_raw_size;
- sect->vma = bfd_h_get_32 (abfd, ext->e_virtbase);
- sect->filepos = bfd_h_get_32 (abfd, ext->e_filebase);
- /* FIXME XXX alignment? */
-
- /* Set relocation information for first section of each type. */
- if (trynum == 0) switch (ext->e_type[0]) {
- case N_TEXT:
- sect->rel_filepos = N_TRELOFF (*execp);
- sect->reloc_count = execp->a_trsize;
- break;
-
- case N_DATA:
- sect->rel_filepos = N_DRELOFF (*execp);
- sect->reloc_count = execp->a_drsize;
- break;
+ for (;;)
+ {
+ if (bfd_read ((PTR) ext, 1, sizeof (*ext), abfd) != sizeof (*ext))
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+ switch (ext->e_type[0])
+ {
+ case N_TEXT:
+ section_name = ".text";
+ flags = SEC_CODE | SEC_LOAD | SEC_ALLOC | SEC_HAS_CONTENTS;
+ break;
+
+ case N_DATA:
+ section_name = ".data";
+ flags = SEC_DATA | SEC_LOAD | SEC_ALLOC | SEC_HAS_CONTENTS;
+ break;
+
+ case N_BSS:
+ section_name = ".bss";
+ flags = SEC_DATA | SEC_HAS_CONTENTS;
+ break;
+
+ case 0:
+ goto no_more_sections;
+
+ default:
+ (*_bfd_error_handler)
+ (_("%s: Unknown section type in a.out.adobe file: %x\n"),
+ bfd_get_filename (abfd), ext->e_type[0]);
+ goto no_more_sections;
+ }
+
+ /* First one is called ".text" or whatever; subsequent ones are
+ ".text1", ".text2", ... */
+
+ bfd_set_error (bfd_error_no_error);
+ sect = bfd_make_section (abfd, section_name);
+ trynum = 0;
+ while (!sect)
+ {
+ if (bfd_get_error () != bfd_error_no_error)
+ /* Some other error -- slide into the sunset. */
+ return 0;
+ sprintf (try_again, "%s%d", section_name, ++trynum);
+ sect = bfd_make_section (abfd, try_again);
+ }
+
+ /* Fix the name, if it is a sprintf'd name. */
+ if (sect->name == try_again)
+ {
+ newname = (char *) bfd_zalloc (abfd, strlen (sect->name));
+ if (newname == NULL)
+ return 0;
+ strcpy (newname, sect->name);
+ sect->name = newname;
+ }
+
+ /* Now set the section's attributes. */
+ bfd_set_section_flags (abfd, sect, flags);
+ /* Assumed big-endian. */
+ sect->_raw_size = ((ext->e_size[0] << 8)
+ | ext->e_size[1] << 8)
+ | ext->e_size[2];
+ sect->_cooked_size = sect->_raw_size;
+ sect->vma = bfd_h_get_32 (abfd, ext->e_virtbase);
+ sect->filepos = bfd_h_get_32 (abfd, ext->e_filebase);
+ /* FIXME XXX alignment? */
+
+ /* Set relocation information for first section of each type. */
+ if (trynum == 0)
+ switch (ext->e_type[0])
+ {
+ case N_TEXT:
+ sect->rel_filepos = N_TRELOFF (*execp);
+ sect->reloc_count = execp->a_trsize;
+ break;
+
+ case N_DATA:
+ sect->rel_filepos = N_DRELOFF (*execp);
+ sect->reloc_count = execp->a_drsize;
+ break;
+ }
}
- }
-no_more_sections:
+ no_more_sections:
- adata(abfd).reloc_entry_size = sizeof (struct reloc_std_external);
- adata(abfd).symbol_entry_size = sizeof (struct external_nlist);
- adata(abfd).page_size = 1; /* Not applicable. */
- adata(abfd).segment_size = 1; /* Not applicable. */
- adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
+ adata (abfd).reloc_entry_size = sizeof (struct reloc_std_external);
+ adata (abfd).symbol_entry_size = sizeof (struct external_nlist);
+ adata (abfd).page_size = 1; /* Not applicable. */
+ adata (abfd).segment_size = 1; /* Not applicable. */
+ adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return abfd->xvec;
}
struct bout_data_struct {
- struct aoutdata a;
- struct internal_exec e;
+ struct aoutdata a;
+ struct internal_exec e;
};
static boolean
@@ -254,32 +266,31 @@ aout_adobe_mkobject (abfd)
rawptr = (struct bout_data_struct *) bfd_zalloc (abfd, sizeof (struct bout_data_struct));
if (rawptr == NULL)
- return false;
+ return false;
abfd->tdata.bout_data = rawptr;
exec_hdr (abfd) = &rawptr->e;
- adata(abfd).reloc_entry_size = sizeof (struct reloc_std_external);
- adata(abfd).symbol_entry_size = sizeof (struct external_nlist);
- adata(abfd).page_size = 1; /* Not applicable. */
- adata(abfd).segment_size = 1; /* Not applicable. */
- adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
+ adata (abfd).reloc_entry_size = sizeof (struct reloc_std_external);
+ adata (abfd).symbol_entry_size = sizeof (struct external_nlist);
+ adata (abfd).page_size = 1; /* Not applicable. */
+ adata (abfd).segment_size = 1; /* Not applicable. */
+ adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return true;
}
-
static boolean
aout_adobe_write_object_contents (abfd)
bfd *abfd;
{
struct external_exec swapped_hdr;
- static struct external_segdesc sentinel[1]; /* Initialized to zero */
+ static struct external_segdesc sentinel[1]; /* Initialized to zero. */
asection *sect;
exec_hdr (abfd)->a_info = ZMAGIC;
- /* Calculate text size as total of text sections, etc. */
+ /* Calculate text size as total of text sections, etc. */
exec_hdr (abfd)->a_text = 0;
exec_hdr (abfd)->a_data = 0;
@@ -287,22 +298,28 @@ aout_adobe_write_object_contents (abfd)
exec_hdr (abfd)->a_trsize = 0;
exec_hdr (abfd)->a_drsize = 0;
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (sect->flags & SEC_CODE) {
- exec_hdr (abfd)->a_text += sect->_raw_size;
- exec_hdr (abfd)->a_trsize += sect->reloc_count *
- sizeof (struct reloc_std_external);
- } else if (sect->flags & SEC_DATA) {
- exec_hdr (abfd)->a_data += sect->_raw_size;
- exec_hdr (abfd)->a_drsize += sect->reloc_count *
- sizeof (struct reloc_std_external);
- } else if (sect->flags & SEC_ALLOC && !(sect->flags & SEC_LOAD)) {
- exec_hdr (abfd)->a_bss += sect->_raw_size;
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (sect->flags & SEC_CODE)
+ {
+ exec_hdr (abfd)->a_text += sect->_raw_size;
+ exec_hdr (abfd)->a_trsize += sect->reloc_count *
+ sizeof (struct reloc_std_external);
+ }
+ else if (sect->flags & SEC_DATA)
+ {
+ exec_hdr (abfd)->a_data += sect->_raw_size;
+ exec_hdr (abfd)->a_drsize += sect->reloc_count *
+ sizeof (struct reloc_std_external);
+ }
+ else if (sect->flags & SEC_ALLOC && !(sect->flags & SEC_LOAD))
+ {
+ exec_hdr (abfd)->a_bss += sect->_raw_size;
+ }
}
- }
exec_hdr (abfd)->a_syms = bfd_get_symcount (abfd)
- * sizeof (struct external_nlist);
+ * sizeof (struct external_nlist);
exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
aout_adobe_swap_exec_header_out (abfd, exec_hdr (abfd), &swapped_hdr);
@@ -315,58 +332,68 @@ aout_adobe_write_object_contents (abfd)
/* Now write out the section information. Text first, data next, rest
afterward. */
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (sect->flags & SEC_CODE) {
- aout_adobe_write_section (abfd, sect);
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (sect->flags & SEC_CODE)
+ {
+ aout_adobe_write_section (abfd, sect);
+ }
}
- }
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (sect->flags & SEC_DATA) {
- aout_adobe_write_section (abfd, sect);
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (sect->flags & SEC_DATA)
+ {
+ aout_adobe_write_section (abfd, sect);
+ }
}
- }
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (!(sect->flags & (SEC_CODE|SEC_DATA))) {
- aout_adobe_write_section (abfd, sect);
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (!(sect->flags & (SEC_CODE | SEC_DATA)))
+ {
+ aout_adobe_write_section (abfd, sect);
+ }
}
- }
/* Write final `sentinel` section header (with type of 0). */
if (bfd_write ((PTR) sentinel, 1, sizeof (*sentinel), abfd)
!= sizeof (*sentinel))
return false;
- /* Now write out reloc info, followed by syms and strings */
- if (bfd_get_symcount (abfd) != 0)
+ /* Now write out reloc info, followed by syms and strings. */
+ if (bfd_get_symcount (abfd) != 0)
{
- 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_TRELOFF(*exec_hdr(abfd))), SEEK_SET)
+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*exec_hdr (abfd))), SEEK_SET)
!= 0)
return false;
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (sect->flags & SEC_CODE) {
- if (!aout_32_squirt_out_relocs (abfd, sect))
- return false;
- }
- }
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (sect->flags & SEC_CODE)
+ {
+ if (!aout_32_squirt_out_relocs (abfd, sect))
+ return false;
+ }
+ }
- if (bfd_seek (abfd, (file_ptr)(N_DRELOFF(*exec_hdr(abfd))), SEEK_SET)
+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*exec_hdr (abfd))), SEEK_SET)
!= 0)
return false;
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (sect->flags & SEC_DATA) {
- if (!aout_32_squirt_out_relocs (abfd, sect))
- return false;
- }
- }
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (sect->flags & SEC_DATA)
+ {
+ if (!aout_32_squirt_out_relocs (abfd, sect))
+ return false;
+ }
+ }
}
return true;
}
@@ -390,46 +417,55 @@ aout_adobe_set_section_contents (abfd, section, location, offset, count)
file_ptr section_start;
sec_ptr sect;
- if (abfd->output_has_begun == false) { /* set by bfd.c handler */
-
- /* Assign file offsets to sections. Text sections are first, and
- are contiguous. Then data sections. Everything else at the end. */
-
- section_start = N_TXTOFF (ignore<-->me);
-
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (sect->flags & SEC_CODE) {
- sect->filepos = section_start;
- /* FIXME: Round to alignment */
- section_start += sect->_raw_size;
- }
- }
-
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (sect->flags & SEC_DATA) {
- sect->filepos = section_start;
- /* FIXME: Round to alignment */
- section_start += sect->_raw_size;
- }
- }
-
- for (sect = abfd->sections; sect; sect = sect->next) {
- if (sect->flags & SEC_HAS_CONTENTS &&
- !(sect->flags & (SEC_CODE|SEC_DATA))) {
- sect->filepos = section_start;
- /* FIXME: Round to alignment */
- section_start += sect->_raw_size;
- }
+ /* Set by bfd.c handler. */
+ if (abfd->output_has_begun == false)
+ {
+ /* Assign file offsets to sections. Text sections are first, and
+ are contiguous. Then data sections. Everything else at the end. */
+
+ section_start = N_TXTOFF (ignore<-->me);
+
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (sect->flags & SEC_CODE)
+ {
+ sect->filepos = section_start;
+ /* FIXME: Round to alignment. */
+ section_start += sect->_raw_size;
+ }
+ }
+
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (sect->flags & SEC_DATA)
+ {
+ sect->filepos = section_start;
+ /* FIXME: Round to alignment. */
+ section_start += sect->_raw_size;
+ }
+ }
+
+ for (sect = abfd->sections; sect; sect = sect->next)
+ {
+ if (sect->flags & SEC_HAS_CONTENTS &&
+ !(sect->flags & (SEC_CODE | SEC_DATA)))
+ {
+ sect->filepos = section_start;
+ /* FIXME: Round to alignment. */
+ section_start += sect->_raw_size;
+ }
+ }
}
- }
- /* regardless, once we know what we're doing, we might as well get going */
+ /* Regardless, once we know what we're doing, we might as well get
+ going. */
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0)
return false;
- if (count != 0) {
- return (bfd_write ((PTR)location, 1, count, abfd) == count) ?true:false;
- }
+ if (count != 0)
+ {
+ return (bfd_write ((PTR) location, 1, count, abfd) == count) ? true : false;
+ }
return true;
}
@@ -449,17 +485,14 @@ aout_adobe_set_arch_mach (abfd, arch, machine)
return false;
}
-static int
+static int
aout_adobe_sizeof_headers (ignore_abfd, ignore)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
boolean ignore ATTRIBUTE_UNUSED;
{
- return sizeof(struct internal_exec);
+ return sizeof (struct internal_exec);
}
-
-
-
/* Build the transfer vector for Adobe A.Out files. */
#define aout_32_close_and_cleanup aout_32_bfd_free_cached_info
@@ -486,8 +519,7 @@ aout_adobe_sizeof_headers (ignore_abfd, ignore)
#define aout_32_bfd_final_link _bfd_generic_final_link
#define aout_32_bfd_link_split_section _bfd_generic_link_split_section
-const bfd_target a_out_adobe_vec =
-{
+const bfd_target a_out_adobe_vec = {
"a.out.adobe", /* name */
bfd_target_aout_flavour,
BFD_ENDIAN_BIG, /* data byte order is unknown (big assumed) */
@@ -502,29 +534,29 @@ const bfd_target a_out_adobe_vec =
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_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, aout_adobe_object_p, /* bfd_check_format */
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ {_bfd_dummy_target, aout_adobe_object_p, /* bfd_check_format */
bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, aout_adobe_mkobject, /* bfd_set_format */
+ {bfd_false, aout_adobe_mkobject, /* bfd_set_format */
_bfd_generic_mkarchive, bfd_false},
- {bfd_false, aout_adobe_write_object_contents, /* bfd_write_contents */
+ {bfd_false, aout_adobe_write_object_contents, /* bfd_write_contents */
_bfd_write_archive_contents, bfd_false},
- BFD_JUMP_TABLE_GENERIC (aout_32),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd),
- BFD_JUMP_TABLE_SYMBOLS (aout_32),
- BFD_JUMP_TABLE_RELOCS (aout_32),
- BFD_JUMP_TABLE_WRITE (aout_32),
- BFD_JUMP_TABLE_LINK (aout_32),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ BFD_JUMP_TABLE_GENERIC (aout_32),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd),
+ BFD_JUMP_TABLE_SYMBOLS (aout_32),
+ BFD_JUMP_TABLE_RELOCS (aout_32),
+ BFD_JUMP_TABLE_WRITE (aout_32),
+ BFD_JUMP_TABLE_LINK (aout_32),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0
};
diff --git a/gnu/usr.bin/binutils/bfd/aout-arm.c b/gnu/usr.bin/binutils/bfd/aout-arm.c
index 7365f9d8e35..ddb03257f41 100644
--- a/gnu/usr.bin/binutils/bfd/aout-arm.c
+++ b/gnu/usr.bin/binutils/bfd/aout-arm.c
@@ -1,7 +1,8 @@
/* BFD back-end for raw ARM a.out binaries.
- Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
+
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -18,7 +19,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
#define N_TXTADDR(x) \
((N_MAGIC(x) == NMAGIC) ? 0x8000 : \
(N_MAGIC(x) != ZMAGIC) ? 0 : \
@@ -44,7 +44,7 @@ reloc_howto_type *MYARM(bfd_reloc_type_lookup)
PARAMS((bfd *, bfd_reloc_code_real_type));
static boolean MYARM(write_object_contents) PARAMS((bfd *));
-/* Avoid multiple defininitions from aoutx if supporting standarad a.out
+/* Avoid multiple defininitions from aoutx if supporting standarad a.out
as well as our own. */
#define NAME(x,y) CAT3(aoutarm,_32_,y)
@@ -63,7 +63,7 @@ MY(fix_pcrel_26) PARAMS ((bfd *, arelent *, asymbol *, PTR,
static void MY(swap_std_reloc_in) PARAMS ((bfd *, struct reloc_std_external *,
arelent *, asymbol **,
bfd_size_type));
-void MY(swap_std_reloc_out) PARAMS ((bfd *, arelent *,
+void MY(swap_std_reloc_out) PARAMS ((bfd *, arelent *,
struct reloc_std_external *));
reloc_howto_type MY(howto_table)[] =
@@ -98,7 +98,7 @@ reloc_howto_type MY(howto_table)[] =
#define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10)
reloc_howto_type *
-MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel)
+MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel)
bfd *abfd;
struct reloc_std_external *rel;
int *r_index;
@@ -139,12 +139,12 @@ MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel)
return MY(howto_table) + index;
}
-
+
#define MY_reloc_howto(BFD, REL, IN, EX, PC) \
MY(reloc_howto) (BFD, REL, &IN, &EX, &PC)
void
-MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc)
+MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc)
bfd *abfd;
int r_extern;
int r_index;
@@ -159,7 +159,7 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc)
PUT_WORD (abfd, value, reloc->r_address);
r_length = howto->size ; /* Size as a power of two */
- /* Special case for branch relocations. */
+ /* Special case for branch relocations. */
if (howto->type == 3 || howto->type == 7)
r_length = 3;
@@ -188,12 +188,12 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc)
| (r_length << RELOC_STD_BITS_LENGTH_SH_LITTLE));
}
}
-
+
#define MY_put_reloc(BFD, EXT, IDX, VAL, HOWTO, RELOC) \
- MY(put_reloc)(BFD, EXT, IDX, VAL, HOWTO, RELOC)
+ MY(put_reloc) (BFD, EXT, IDX, VAL, HOWTO, RELOC)
void
-MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr)
+MY(relocatable_reloc) (howto, abfd, reloc, amount, r_addr)
reloc_howto_type *howto;
bfd *abfd;
struct reloc_std_external *reloc;
@@ -202,11 +202,11 @@ MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr)
{
if (howto->type == 3)
{
- if (reloc->r_type[0]
+ if (reloc->r_type[0]
& (bfd_header_big_endian (abfd)
? RELOC_STD_BITS_EXTERN_BIG : RELOC_STD_BITS_EXTERN_LITTLE))
{
- /* The reloc is still external, so don't modify anything. */
+ /* The reloc is still external, so don't modify anything. */
*amount = 0;
}
else
@@ -225,7 +225,7 @@ MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr)
}
#define MY_relocatable_reloc(HOW, BFD, REL, AMOUNT, ADDR) \
- MY(relocatable_reloc)(HOW, BFD, REL, &(AMOUNT), ADDR)
+ MY(relocatable_reloc) (HOW, BFD, REL, &(AMOUNT), ADDR)
static bfd_reloc_status_type
MY(fix_pcrel_26_done) (abfd, reloc_entry, symbol, data, input_section,
@@ -257,7 +257,7 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
bfd_size_type addr = reloc_entry->address;
long target = bfd_get_32 (abfd, (bfd_byte *) data + addr);
bfd_reloc_status_type flag = bfd_reloc_ok;
-
+
/* If this is an undefined symbol, return error */
if (symbol->section == &bfd_und_section
&& (symbol->flags & BSF_WEAK) == 0)
@@ -297,12 +297,12 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
/* Now the ARM magic... Change the reloc type so that it is marked as done.
Strictly this is only necessary if we are doing a partial relocation. */
reloc_entry->howto = &MY(howto_table)[7];
-
+
return flag;
}
reloc_howto_type *
-MY(bfd_reloc_type_lookup)(abfd,code)
+MY(bfd_reloc_type_lookup) (abfd,code)
bfd *abfd;
bfd_reloc_code_real_type code;
{
@@ -392,11 +392,10 @@ MY_swap_std_reloc_out (abfd, g, natptr)
r_pcrel = 0;
}
else if (g->howto->type == 7)
- {
+ {
r_length = 3;
r_pcrel = 1;
}
-
#if 0
/* For a standard reloc, the addend is in the object file. */
@@ -506,7 +505,7 @@ const bfd_target aout_arm_little_vec =
BFD_JUMP_TABLE_DYNAMIC (MY),
& aout_arm_big_vec,
-
+
(PTR) MY_backend_data,
};
@@ -547,6 +546,6 @@ const bfd_target aout_arm_big_vec =
BFD_JUMP_TABLE_DYNAMIC (MY),
& aout_arm_little_vec,
-
+
(PTR) MY_backend_data,
};
diff --git a/gnu/usr.bin/binutils/bfd/aout-ns32k.c b/gnu/usr.bin/binutils/bfd/aout-ns32k.c
index 05ac84e86bf..dc651cced54 100644
--- a/gnu/usr.bin/binutils/bfd/aout-ns32k.c
+++ b/gnu/usr.bin/binutils/bfd/aout-ns32k.c
@@ -1,5 +1,6 @@
/* BFD back-end for ns32k a.out-ish binaries.
- Copyright (C) 1990, 91, 92, 94, 95, 96, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2000
+ Free Software Foundation, Inc.
Contributed by Ian Dall (idall@eleceng.adelaide.edu.au).
This file is part of BFD, the Binary File Descriptor library.
@@ -89,7 +90,7 @@ MY_swap_std_reloc_out PARAMS ((bfd *abfd, arelent *g,
*
*/
-reloc_howto_type MY(howto_table)[] =
+reloc_howto_type MY(howto_table)[] =
{
/* ns32k immediate operands */
HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, false, 0, true,
@@ -146,7 +147,6 @@ reloc_howto_type MY(howto_table)[] =
"PCREL_32", true, 0xffffffff,0xffffffff, false),
};
-
#define CTOR_TABLE_RELOC_HOWTO(BFD) (MY(howto_table) + 14)
#define RELOC_STD_BITS_NS32K_TYPE_BIG 0x06
@@ -155,7 +155,7 @@ reloc_howto_type MY(howto_table)[] =
#define RELOC_STD_BITS_NS32K_TYPE_SH_LITTLE 5
reloc_howto_type *
-MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel)
+MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel)
bfd *abfd ATTRIBUTE_UNUSED;
struct reloc_std_external *rel;
int *r_index;
@@ -177,10 +177,10 @@ MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel)
return (MY(howto_table) + r_length + 3 * (*r_pcrel) + 6 * r_ns32k_type);
}
-#define MY_reloc_howto(BFD,REL,IN,EX,PC) MY(reloc_howto)(BFD, REL, &IN, &EX, &PC)
+#define MY_reloc_howto(BFD,REL,IN,EX,PC) MY(reloc_howto) (BFD, REL, &IN, &EX, &PC)
void
-MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc)
+MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc)
bfd *abfd;
int r_extern;
int r_index;
@@ -207,7 +207,7 @@ 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)
#define STAT_FOR_EXEC
@@ -217,7 +217,7 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc)
#include <aoutx.h>
reloc_howto_type *
-MY(bfd_reloc_type_lookup)(abfd,code)
+MY(bfd_reloc_type_lookup) (abfd,code)
bfd *abfd;
bfd_reloc_code_real_type code;
{
@@ -259,7 +259,6 @@ MY(bfd_reloc_type_lookup)(abfd,code)
#undef ENTRY
}
-
static void
MY_swap_std_reloc_in (abfd, bytes, cache_ptr, symbols, symcount)
bfd *abfd;
@@ -295,10 +294,10 @@ MY_swap_std_reloc_out (abfd, g, natptr)
asection *output_section = sym->section->output_section;
r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma;
-
+
/* name was clobbered by aout_write_syms to be symbol index */
- /* If this relocation is relative to a symbol then set the
+ /* 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
@@ -307,7 +306,7 @@ MY_swap_std_reloc_out (abfd, g, natptr)
if (bfd_is_com_section (output_section)
|| output_section == &bfd_abs_section
- || output_section == &bfd_und_section)
+ || output_section == &bfd_und_section)
{
if (bfd_abs_section.symbol == sym)
{
@@ -316,21 +315,21 @@ MY_swap_std_reloc_out (abfd, g, natptr)
r_index = 0;
r_extern = 0;
}
- else
+ else
{
/* Fill in symbol */
r_extern = 1;
#undef KEEPIT
#define KEEPIT udata.i
r_index = (*(g->sym_ptr_ptr))->KEEPIT;
-#undef KEEPIT
+#undef KEEPIT
}
}
- else
+ else
{
/* Just an ordinary section */
r_extern = 0;
- r_index = output_section->target_index;
+ r_index = output_section->target_index;
}
MY_put_reloc (abfd, r_extern, r_index, g->address, g->howto, natptr);
diff --git a/gnu/usr.bin/binutils/bfd/aout-target.h b/gnu/usr.bin/binutils/bfd/aout-target.h
index 046417bb958..2e74e37bd18 100644
--- a/gnu/usr.bin/binutils/bfd/aout-target.h
+++ b/gnu/usr.bin/binutils/bfd/aout-target.h
@@ -1,5 +1,6 @@
/* Define a target vector and some small routines for a variant of a.out.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -61,7 +62,7 @@ MY(callback) (abfd)
bfd_vma adjust;
adjust = execp->a_entry - obj_textsec (abfd)->vma;
- /* Adjust only by whole pages. */
+ /* Adjust only by whole pages. */
adjust &= ~(TARGET_PAGE_SIZE - 1);
obj_textsec (abfd)->vma += adjust;
obj_datasec (abfd)->vma += adjust;
@@ -84,7 +85,7 @@ MY(callback) (abfd)
/* The file offsets of the string table and symbol table. */
obj_sym_filepos (abfd) = N_SYMOFF (*execp);
obj_str_filepos (abfd) = N_STROFF (*execp);
-
+
/* Determine the architecture and machine type of the object file. */
#ifdef SET_ARCH_MACH
SET_ARCH_MACH(abfd, *execp);
@@ -164,7 +165,7 @@ MY(object_p) (abfd)
if (!(MACHTYPE_OK (N_MACHTYPE (exec)))) return 0;
#endif
- NAME(aout,swap_exec_header_in)(abfd, &exec_bytes, &exec);
+ NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
#ifdef SWAP_MAGIC
/* swap_exec_header_in read in a_info with the wrong byte order */
@@ -178,7 +179,7 @@ MY(object_p) (abfd)
* means that it isn't obvious if EXEC_P should be set.
* All of the following must be true for an executable:
* There must be no relocations, the bfd can be neither an
- * archive nor an archive element, and the file must be executable. */
+ * archive nor an archive element, and the file must be executable. */
if (exec.a_trsize + exec.a_drsize == 0
&& bfd_get_format(abfd) == bfd_object && abfd->my_archive == NULL)
@@ -197,7 +198,6 @@ MY(object_p) (abfd)
#define MY_object_p MY(object_p)
#endif
-
#ifndef MY_mkobject
static boolean MY(mkobject) PARAMS ((bfd *));
@@ -206,7 +206,7 @@ static boolean
MY(mkobject) (abfd)
bfd *abfd;
{
- if (NAME(aout,mkobject)(abfd) == false)
+ if (NAME(aout,mkobject) (abfd) == false)
return false;
#if 0 /* Sizes get set in set_sizes callback, later, after we know
the architecture and machine. */
@@ -230,7 +230,6 @@ MY(mkobject) (abfd)
static boolean MY_bfd_copy_private_section_data
PARAMS ((bfd *, asection *, bfd *, asection *));
-/*ARGSUSED*/
static boolean
MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd *ibfd;
@@ -530,7 +529,6 @@ MY_bfd_final_link (abfd, info)
#define MY_bfd_link_split_section _bfd_generic_link_split_section
#endif
-
#ifndef MY_bfd_copy_private_bfd_data
#define MY_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
#endif
@@ -581,7 +579,7 @@ MY_bfd_final_link (abfd, info)
#endif
/* Aout symbols normally have leading underscores */
-#ifndef MY_symbol_leading_char
+#ifndef MY_symbol_leading_char
#define MY_symbol_leading_char '_'
#endif
@@ -643,7 +641,7 @@ const bfd_target MY(vec) =
/* Alternative_target */
NULL,
-
+
(PTR) MY_backend_data
};
#endif /* MY_BFD_TARGET */
diff --git a/gnu/usr.bin/binutils/bfd/aoutf1.h b/gnu/usr.bin/binutils/bfd/aoutf1.h
index fdf95b5b117..a62c68d8d0d 100644
--- a/gnu/usr.bin/binutils/bfd/aoutf1.h
+++ b/gnu/usr.bin/binutils/bfd/aoutf1.h
@@ -1,5 +1,5 @@
/* A.out "format 1" file handling code for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This is needed to reject a NewsOS file, e.g. in
gdb/testsuite/gdb.t10/crossload.exp. <kingdon@cygnus.com>
I needed to add M_UNKNOWN to recognize a 68000 object, so this will
- probably no longer reject a NewsOS object. <ian@cygnus.com>. */
+ probably no longer reject a NewsOS object. <ian@cygnus.com>. */
#ifndef MACHTYPE_OK
#define MACHTYPE_OK(mtype) \
(((mtype) == M_SPARC && bfd_lookup_arch (bfd_arch_sparc, 0) != NULL) \
@@ -123,7 +123,7 @@ sunos_set_arch_mach (abfd, machtype)
case M_UNKNOWN:
/* Some Sun3s make magic numbers without cpu types in them, so
- we'll default to the 68000. */
+ we'll default to the 68000. */
arch = bfd_arch_m68k;
machine = bfd_mach_m68000;
break;
@@ -180,7 +180,7 @@ sunos_set_arch_mach (abfd, machtype)
}
#define SET_ARCH_MACH(ABFD, EXEC) \
- NAME(sunos,set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
+ NAME(sunos,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
choose_reloc_size(ABFD);
/* Determine the size of a relocation entry, based on the architecture */
@@ -275,11 +275,11 @@ sunos_write_object_contents (abfd)
Unfortunately, they don't document the FPA structure, or at least I
can't find it easily. Fortunately the core header contains its own
length. So this shouldn't cause problems, except for c_ucode, which
- so far we don't use but is easy to find with a little arithmetic. */
+ so far we don't use but is easy to find with a little arithmetic. */
/* But the reg structure can be gotten from the SPARC processor handbook.
This really should be in a GNU include file though so that gdb can use
- the same info. */
+ the same info. */
struct regs
{
int r_psr;
@@ -439,7 +439,7 @@ swapcore_sun3 (abfd, ext, intcore)
intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize);
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
intcore->fp_stuff_pos = (long) (((struct external_sun3_core *) 0)->fp_stuff);
- /* FP stuff takes up whole rest of struct, except c_ucode. */
+ /* FP stuff takes up whole rest of struct, except c_ucode. */
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
(file_ptr) (((struct external_sun3_core *) 0)->fp_stuff);
/* Ucode is the last thing in the struct -- just before the end */
@@ -449,7 +449,6 @@ swapcore_sun3 (abfd, ext, intcore)
intcore->c_stacktop = 0x0E000000; /* By experimentation */
}
-
/* byte-swap in the Sparc core structure */
static void
swapcore_sparc (abfd, ext, intcore)
@@ -476,7 +475,7 @@ swapcore_sparc (abfd, ext, intcore)
intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize);
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
intcore->fp_stuff_pos = (long) (((struct external_sparc_core *) 0)->fp_stuff);
- /* FP stuff takes up whole rest of struct, except c_ucode. */
+ /* FP stuff takes up whole rest of struct, except c_ucode. */
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
(file_ptr) (((struct external_sparc_core *) 0)->fp_stuff);
/* Ucode is the last thing in the struct -- just before the end */
@@ -544,7 +543,7 @@ swapcore_solaris_bcp (abfd, ext, intcore)
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
intcore->fp_stuff_pos =
(long) (((struct external_solaris_bcp_core *) 0)->fp_stuff);
- /* FP stuff takes up whole rest of struct, except c_ucode. */
+ /* FP stuff takes up whole rest of struct, except c_ucode. */
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
(file_ptr) (((struct external_solaris_bcp_core *) 0)->fp_stuff);
/* Ucode is the last thing in the struct -- just before the end */
@@ -764,7 +763,7 @@ sunos4_core_file_matches_executable_p (core_bfd, exec_bfd)
return false;
}
- /* Solaris core files do not include an aouthdr. */
+ /* Solaris core files do not include an aouthdr. */
if ((core_hdr (core_bfd)->hdr)->c_len == SOLARIS_BCP_CORE_LEN)
return true;
diff --git a/gnu/usr.bin/binutils/bfd/aoutx.h b/gnu/usr.bin/binutils/bfd/aoutx.h
index 920661b1c40..490ead742d1 100644
--- a/gnu/usr.bin/binutils/bfd/aoutx.h
+++ b/gnu/usr.bin/binutils/bfd/aoutx.h
@@ -1,5 +1,6 @@
/* BFD semi-generic back-end for a.out binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
+ 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -23,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
SECTION
a.out backends
-
DESCRIPTION
BFD supports a number of different flavours of a.out format,
@@ -165,10 +165,18 @@ DESCRIPTION
#define MY_swap_std_reloc_in NAME(aout,swap_std_reloc_in)
#endif
+#ifndef MY_swap_ext_reloc_in
+#define MY_swap_ext_reloc_in NAME(aout,swap_ext_reloc_in)
+#endif
+
#ifndef MY_swap_std_reloc_out
#define MY_swap_std_reloc_out NAME(aout,swap_std_reloc_out)
#endif
+#ifndef MY_swap_ext_reloc_out
+#define MY_swap_ext_reloc_out NAME(aout,swap_ext_reloc_out)
+#endif
+
#ifndef MY_final_link_relocate
#define MY_final_link_relocate _bfd_final_link_relocate
#endif
@@ -260,7 +268,7 @@ EMPTY_HOWTO (-1),
HOWTO(40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false),
};
-#define TABLE_SIZE(TABLE) (sizeof(TABLE)/sizeof(TABLE[0]))
+#define TABLE_SIZE(TABLE) (sizeof (TABLE)/sizeof (TABLE[0]))
reloc_howto_type *
NAME(aout,reloc_type_lookup) (abfd,code)
@@ -283,6 +291,8 @@ NAME(aout,reloc_type_lookup) (abfd,code)
if (ext)
switch (code)
{
+ EXT (BFD_RELOC_8, 0);
+ EXT (BFD_RELOC_16, 1);
EXT (BFD_RELOC_32, 2);
EXT (BFD_RELOC_HI22, 8);
EXT (BFD_RELOC_LO10, 11);
@@ -353,7 +363,7 @@ NAME(aout,swap_exec_header_in) (abfd, raw_bytes, execp)
/* The internal_exec structure has some fields that are unused in this
configuration (IE for i960), so ensure that all such uninitialized
fields are zero'd out. There are places where two of these structs
- are memcmp'd, and thus the contents do matter. */
+ are memcmp'd, and thus the contents do matter. */
memset ((PTR) execp, 0, sizeof (struct internal_exec));
/* Now fill in fields in the execp, from the bytes in the raw data. */
execp->a_info = bfd_h_get_32 (abfd, bytes->e_info);
@@ -390,7 +400,7 @@ NAME(aout,swap_exec_header_out) (abfd, execp, raw_bytes)
{
struct external_exec *bytes = (struct external_exec *)raw_bytes;
- /* Now fill in fields in the raw data, from the fields in the exec struct. */
+ /* Now fill in fields in the raw data, from the fields in the exec struct. */
bfd_h_put_32 (abfd, execp->a_info , bytes->e_info);
PUT_WORD (abfd, execp->a_text , bytes->e_text);
PUT_WORD (abfd, execp->a_data , bytes->e_data);
@@ -426,7 +436,7 @@ FUNCTION
SYNOPSIS
const bfd_target *aout_@var{size}_some_aout_object_p
(bfd *abfd,
- const bfd_target *(*callback_to_real_object_p)());
+ const bfd_target *(*callback_to_real_object_p) ());
DESCRIPTION
Some a.out variant thinks that the file open in @var{abfd}
@@ -507,7 +517,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
/* The default relocation entry size is that of traditional V7 Unix. */
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
- /* The default symbol entry size is that of traditional Unix. */
+ /* The default symbol entry size is that of traditional Unix. */
obj_symbol_entry_size (abfd) = EXTERNAL_NLIST_SIZE;
#ifdef USE_MMAP
@@ -591,7 +601,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
header, should cope with them in this callback as well. */
#endif /* DOCUMENTATION */
- result = (*callback_to_real_object_p)(abfd);
+ result = (*callback_to_real_object_p) (abfd);
/* Now that the segment addresses have been worked out, take a better
guess at whether the file is executable. If the entry point
@@ -606,7 +616,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
To fix this, we now accept any non-zero entry point as an indication of
executability. This will work most of the time, since only the linker
- sets the entry point, and that is likely to be non-zero for most systems. */
+ sets the entry point, and that is likely to be non-zero for most systems. */
if (execp->a_entry != 0
|| (execp->a_entry >= obj_textsec(abfd)->vma
@@ -683,7 +693,6 @@ NAME(aout,mkobject) (abfd)
return true;
}
-
/*
FUNCTION
aout_@var{size}_machine_type
@@ -747,7 +756,7 @@ NAME(aout,machine_type) (arch, machine, unknown)
case bfd_arch_arm:
if (machine == 0) arch_flags = M_ARM;
break;
-
+
case bfd_arch_mips:
switch (machine) {
case 0:
@@ -767,8 +776,14 @@ NAME(aout,machine_type) (arch, machine, unknown)
case bfd_mach_mips4650:
case bfd_mach_mips8000:
case bfd_mach_mips10000:
+ case bfd_mach_mips12000:
case bfd_mach_mips16:
- /* FIXME: These should be MIPS3 or MIPS4. */
+ case bfd_mach_mips32:
+ case bfd_mach_mips32_4k:
+ case bfd_mach_mips5:
+ case bfd_mach_mips64:
+ case bfd_mach_mips_sb1:
+ /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */
arch_flags = M_MIPS2;
break;
default:
@@ -790,6 +805,10 @@ NAME(aout,machine_type) (arch, machine, unknown)
*unknown = false;
break;
+ case bfd_arch_cris:
+ if (machine == 0 || machine == 255) arch_flags = M_CRIS;
+ break;
+
default:
arch_flags = M_UNKNOWN;
}
@@ -800,7 +819,6 @@ NAME(aout,machine_type) (arch, machine, unknown)
return arch_flags;
}
-
/*
FUNCTION
aout_@var{size}_set_arch_mach
@@ -927,7 +945,7 @@ adjust_z_magic (abfd, execp)
file_ptr text_end;
CONST struct aout_backend_data *abdp;
int ztih; /* Nonzero if text includes exec header. */
-
+
abdp = aout_backend_info (abfd);
/* Text. */
@@ -995,7 +1013,7 @@ adjust_z_magic (abfd, execp)
}
obj_datasec(abfd)->filepos = (obj_textsec(abfd)->filepos
+ obj_textsec(abfd)->_raw_size);
-
+
/* Fix up exec header while we're at it. */
execp->a_text = obj_textsec(abfd)->_raw_size;
if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
@@ -1040,7 +1058,7 @@ adjust_n_magic (abfd, execp)
file_ptr pos = adata(abfd).exec_bytes_size;
bfd_vma vma = 0;
int pad;
-
+
/* Text. */
obj_textsec(abfd)->filepos = pos;
if (!obj_textsec(abfd)->user_set_vma)
@@ -1055,7 +1073,7 @@ adjust_n_magic (abfd, execp)
if (!obj_datasec(abfd)->user_set_vma)
obj_datasec(abfd)->vma = BFD_ALIGN (vma, adata(abfd).segment_size);
vma = obj_datasec(abfd)->vma;
-
+
/* Since BSS follows data immediately, see if it needs alignment. */
vma += obj_datasec(abfd)->_raw_size;
pad = align_power (vma, obj_bsssec(abfd)->alignment_power) - vma;
@@ -1100,7 +1118,7 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
(TARGET_PAGE_SIZE). However, newer versions of SUNOS start the text
segment right after the exec header; the latter is counted in the
text segment size, and is paged in by the kernel with the rest of
- the text. */
+ the text. */
/* This perhaps isn't the right way to do this, but made it simpler for me
to understand enough to implement it. Better would probably be to go
@@ -1187,7 +1205,6 @@ NAME(aout,new_section_hook) (abfd, newsect)
/* align to double at least */
newsect->alignment_power = bfd_get_arch_info(abfd)->section_align_power;
-
if (bfd_get_format (abfd) == bfd_object)
{
if (obj_textsec(abfd) == NULL && !strcmp(newsect->name, ".text")) {
@@ -1297,7 +1314,7 @@ aout_get_external_symbols (abfd)
obj_aout_external_syms (abfd) = syms;
obj_aout_external_sym_count (abfd) = count;
}
-
+
if (obj_aout_external_strings (abfd) == NULL
&& exec_hdr (abfd)->a_syms != 0)
{
@@ -1626,7 +1643,7 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
file. */
(*_bfd_error_handler)
(_("%s: can not represent section for symbol `%s' in a.out object file format"),
- bfd_get_filename (abfd),
+ bfd_get_filename (abfd),
cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*"));
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
@@ -1671,6 +1688,8 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
sym_pointer->e_type[0] = ((aout_symbol_type *) cache_ptr)->type;
else if ((cache_ptr->flags & BSF_GLOBAL) != 0)
sym_pointer->e_type[0] |= N_EXT;
+ else if ((cache_ptr->flags & BSF_LOCAL) != 0)
+ sym_pointer->e_type[0] &= ~N_EXT;
if ((cache_ptr->flags & BSF_CONSTRUCTOR) != 0)
{
@@ -1706,7 +1725,7 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
return true;
}
-/* Native-level interface to symbols. */
+/* Native-level interface to symbols. */
asymbol *
NAME(aout,make_empty_symbol) (abfd)
@@ -1773,7 +1792,7 @@ NAME(aout,translate_symbol_table) (abfd, in, ext, count, str, strsize, dynamic)
/* We read the symbols into a buffer, which is discarded when this
function exits. We read the strings into a buffer large enough to
- hold them all plus all the cached symbol entries. */
+ hold them all plus all the cached symbol entries. */
boolean
NAME(aout,slurp_symbol_table) (abfd)
@@ -1960,7 +1979,6 @@ error_return:
_bfd_stringtab_free (strtab);
return false;
}
-
long
NAME(aout,get_symtab) (abfd, location)
@@ -1970,18 +1988,17 @@ NAME(aout,get_symtab) (abfd, location)
unsigned int counter = 0;
aout_symbol_type *symbase;
- if (!NAME(aout,slurp_symbol_table)(abfd))
+ if (!NAME(aout,slurp_symbol_table) (abfd))
return -1;
for (symbase = obj_aout_symbols(abfd); counter++ < bfd_get_symcount (abfd);)
- *(location++) = (asymbol *)( symbase++);
+ *(location++) = (asymbol *) ( symbase++);
*location++ =0;
return bfd_get_symcount (abfd);
}
-
/* Standard reloc stuff */
-/* Output standard relocation information to a file in target byte order. */
+/* Output standard relocation information to a file in target byte order. */
extern void NAME(aout,swap_std_reloc_out)
PARAMS ((bfd *, arelent *, struct reloc_std_external *));
@@ -2024,7 +2041,6 @@ NAME(aout,swap_std_reloc_out) (abfd, g, natptr)
check for that here
*/
-
if (bfd_is_com_section (output_section)
|| bfd_is_abs_section (output_section)
|| bfd_is_und_section (output_section))
@@ -2077,9 +2093,8 @@ NAME(aout,swap_std_reloc_out) (abfd, g, natptr)
}
}
-
/* Extended stuff */
-/* Output extended relocation information to a file in target byte order. */
+/* Output extended relocation information to a file in target byte order. */
extern void NAME(aout,swap_ext_reloc_out)
PARAMS ((bfd *, arelent *, struct reloc_ext_external *));
@@ -2161,7 +2176,6 @@ NAME(aout,swap_ext_reloc_out) (abfd, g, natptr)
contain 60. This macro subs the base of each section from the value
to give the true offset from the section */
-
#define MOVE_ADDRESS(ad) \
if (r_extern) { \
/* undefined symbol */ \
@@ -2381,8 +2395,8 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
(struct reloc_ext_external *) relocs;
for (; counter < count; counter++, rptr++, cache_ptr++)
- NAME(aout,swap_ext_reloc_in) (abfd, rptr, cache_ptr, symbols,
- bfd_get_symcount (abfd));
+ MY_swap_ext_reloc_in (abfd, rptr, cache_ptr, symbols,
+ bfd_get_symcount (abfd));
}
else
{
@@ -2432,7 +2446,8 @@ NAME(aout,squirt_out_relocs) (abfd, section)
for (natptr = native;
count != 0;
--count, natptr += each_size, ++generic)
- NAME(aout,swap_ext_reloc_out) (abfd, *generic, (struct reloc_ext_external *)natptr);
+ MY_swap_ext_reloc_out (abfd, *generic,
+ (struct reloc_ext_external *) natptr);
}
else
{
@@ -2468,7 +2483,7 @@ NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols)
return 0;
}
- if (!(tblptr || NAME(aout,slurp_reloc_table)(abfd, section, symbols)))
+ if (!(tblptr || NAME(aout,slurp_reloc_table) (abfd, section, symbols)))
return -1;
if (section->flags & SEC_CONSTRUCTOR) {
@@ -2523,19 +2538,17 @@ NAME(aout,get_reloc_upper_bound) (abfd, asect)
bfd_set_error (bfd_error_invalid_operation);
return -1;
}
-
long
NAME(aout,get_symtab_upper_bound) (abfd)
bfd *abfd;
{
- if (!NAME(aout,slurp_symbol_table)(abfd))
+ if (!NAME(aout,slurp_symbol_table) (abfd))
return -1;
return (bfd_get_symcount (abfd)+1) * (sizeof (aout_symbol_type *));
}
-/*ARGSUSED*/
alent *
NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -2544,7 +2557,6 @@ NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
return (alent *)NULL;
}
-/*ARGSUSED*/
void
NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -2561,18 +2573,17 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
if (stab_name == NULL)
{
- sprintf(buf, "(%d)", type_code);
+ sprintf (buf, "(%d)", type_code);
stab_name = buf;
}
ret->type = '-';
ret->stab_type = type_code;
- ret->stab_other = (unsigned)(aout_symbol(symbol)->other & 0xff);
- ret->stab_desc = (unsigned)(aout_symbol(symbol)->desc & 0xffff);
+ ret->stab_other = (unsigned) (aout_symbol(symbol)->other & 0xff);
+ ret->stab_desc = (unsigned) (aout_symbol(symbol)->desc & 0xffff);
ret->stab_name = stab_name;
}
}
-/*ARGSUSED*/
void
NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -2585,27 +2596,26 @@ NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
switch (how) {
case bfd_print_symbol_name:
if (symbol->name)
- fprintf(file,"%s", symbol->name);
+ fprintf (file,"%s", symbol->name);
break;
case bfd_print_symbol_more:
- fprintf(file,"%4x %2x %2x",(unsigned)(aout_symbol(symbol)->desc & 0xffff),
- (unsigned)(aout_symbol(symbol)->other & 0xff),
- (unsigned)(aout_symbol(symbol)->type));
+ fprintf (file,"%4x %2x %2x",(unsigned) (aout_symbol(symbol)->desc & 0xffff),
+ (unsigned) (aout_symbol(symbol)->other & 0xff),
+ (unsigned) (aout_symbol(symbol)->type));
break;
case bfd_print_symbol_all:
{
CONST char *section_name = symbol->section->name;
-
bfd_print_symbol_vandf((PTR)file,symbol);
- fprintf(file," %-5s %04x %02x %02x",
+ fprintf (file," %-5s %04x %02x %02x",
section_name,
- (unsigned)(aout_symbol(symbol)->desc & 0xffff),
- (unsigned)(aout_symbol(symbol)->other & 0xff),
- (unsigned)(aout_symbol(symbol)->type & 0xff));
+ (unsigned) (aout_symbol(symbol)->desc & 0xffff),
+ (unsigned) (aout_symbol(symbol)->other & 0xff),
+ (unsigned) (aout_symbol(symbol)->type & 0xff));
if (symbol->name)
- fprintf(file," %s", symbol->name);
+ fprintf (file," %s", symbol->name);
}
break;
}
@@ -2705,8 +2715,8 @@ NAME(aout,find_nearest_line)
CONST char *directory_name = NULL;
CONST char *main_file_name = NULL;
CONST char *current_file_name = NULL;
- CONST char *line_file_name = NULL; /* Value of current_file_name at line number. */
- CONST char *line_directory_name = NULL; /* Value of directory_name at line number. */
+ CONST char *line_file_name = NULL; /* Value of current_file_name at line number. */
+ CONST char *line_directory_name = NULL; /* Value of directory_name at line number. */
bfd_vma low_line_vma = 0;
bfd_vma low_func_vma = 0;
asymbol *func = 0;
@@ -2718,7 +2728,7 @@ NAME(aout,find_nearest_line)
*line_ptr = 0;
if (symbols != (asymbol **)NULL) {
for (p = symbols; *p; p++) {
- aout_symbol_type *q = (aout_symbol_type *)(*p);
+ aout_symbol_type *q = (aout_symbol_type *) (*p);
next:
switch (q->type){
case N_TEXT:
@@ -2765,15 +2775,15 @@ NAME(aout,find_nearest_line)
}
main_file_name = current_file_name = q->symbol.name;
- /* Look ahead to next symbol to check if that too is an N_SO. */
+ /* Look ahead to next symbol to check if that too is an N_SO. */
p++;
if (*p == NULL)
break;
- q = (aout_symbol_type *)(*p);
+ q = (aout_symbol_type *) (*p);
if (q->type != (int)N_SO)
goto next;
- /* Found a second N_SO First is directory; second is filename. */
+ /* Found a second N_SO First is directory; second is filename. */
directory_name = current_file_name;
main_file_name = current_file_name = q->symbol.name;
if (obj_textsec(abfd) != section)
@@ -2881,7 +2891,6 @@ NAME(aout,find_nearest_line)
return true;
}
-/*ARGSUSED*/
int
NAME(aout,sizeof_headers) (abfd, execable)
bfd *abfd;
@@ -2899,7 +2908,8 @@ NAME(aout,bfd_free_cached_info) (abfd)
{
asection *o;
- if (bfd_get_format (abfd) != bfd_object)
+ if (bfd_get_format (abfd) != bfd_object
+ || abfd->tdata.aout_data == NULL)
return true;
#define BFCI_FREE(x) if (x != NULL) { free (x); x = NULL; }
@@ -4125,7 +4135,7 @@ aout_link_write_symbols (finfo, input_bfd)
/* We have saved the hash table entry for this symbol, if
there is one. Note that we could just look it up again
in the hash table, provided we first check that it is an
- external symbol. */
+ external symbol. */
h = *sym_hash;
/* Use the name from the hash table, in case the symbol was
@@ -4789,7 +4799,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
#ifdef MY_reloc_howto
howto = MY_reloc_howto(input_bfd, rel, r_index, r_extern, r_pcrel);
-#else
+#else
{
int r_jmptable;
int r_relative;
@@ -5671,6 +5681,10 @@ aout_link_reloc_link_order (finfo, o, p)
}
else
{
+#ifdef MY_put_ext_reloc
+ MY_put_ext_reloc (finfo->output_bfd, r_extern, r_index, p->offset,
+ howto, &erel, pr->addend);
+#else
PUT_WORD (finfo->output_bfd, p->offset, erel.r_address);
if (bfd_header_big_endian (finfo->output_bfd))
@@ -5693,6 +5707,7 @@ aout_link_reloc_link_order (finfo, o, p)
}
PUT_WORD (finfo->output_bfd, pr->addend, erel.r_addend);
+#endif /* MY_put_ext_reloc */
rel_ptr = (PTR) &erel;
}
diff --git a/gnu/usr.bin/binutils/bfd/archive.c b/gnu/usr.bin/binutils/bfd/archive.c
index 27dfd39b681..0a6f0236eeb 100644
--- a/gnu/usr.bin/binutils/bfd/archive.c
+++ b/gnu/usr.bin/binutils/bfd/archive.c
@@ -1,5 +1,6 @@
/* BFD back-end for archive files (libraries).
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
@@ -152,10 +153,8 @@ extern int errno;
the cache when we actually read one. We also don't sort the cache;
it's generally short enough to search linearly.
Note that the pointers here point to the front of the ar_hdr, not
- to the front of the contents!
-*/
-struct ar_cache
-{
+ to the front of the contents! */
+struct ar_cache {
file_ptr ptr;
bfd *arelt;
struct ar_cache *next;
@@ -164,7 +163,7 @@ struct ar_cache
#define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char)
#define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen)
-#define arch_eltdata(bfd) ((struct areltdata *)((bfd)->arelt_data))
+#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
#define arch_hdr(bfd) ((struct ar_hdr *)arch_eltdata(bfd)->arch_header)
static char *get_extended_arelt_filename PARAMS ((bfd *arch,
@@ -316,7 +315,7 @@ _bfd_add_bfd_to_archive_cache (arch_bfd, filepos, new_elt)
}
/* The name begins with space. Hence the rest of the name is an index into
- the string table. */
+ the string table. */
static char *
get_extended_arelt_filename (arch, name)
@@ -326,9 +325,9 @@ get_extended_arelt_filename (arch, name)
unsigned long index = 0;
/* Should extract string so that I can guarantee not to overflow into
- the next region, but I'm too lazy. */
+ the next region, but I'm too lazy. */
errno = 0;
- /* Skip first char, which is '/' in SVR4 or ' ' in some other variants. */
+ /* Skip first char, which is '/' in SVR4 or ' ' in some other variants. */
index = strtol (name + 1, NULL, 10);
if (errno != 0)
{
@@ -411,7 +410,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
}
}
/* BSD4.4-style long filename.
- Only implemented for reading, so far! */
+ Only implemented for reading, so far! */
else if (hdr.ar_name[0] == '#'
&& hdr.ar_name[1] == '1'
&& hdr.ar_name[2] == '/'
@@ -440,15 +439,15 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
{
/* We judge the end of the name by looking for '/' or ' '.
Note: The SYSV format (terminated by '/') allows embedded
- spaces, so only look for ' ' if we don't find '/'. */
+ spaces, so only look for ' ' if we don't find '/'. */
char *e;
e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
if (e == NULL)
{
- e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
+ e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
if (e == NULL)
- e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
+ e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
}
if (e != NULL)
@@ -526,7 +525,7 @@ _bfd_get_elt_at_filepos (archive, filepos)
if (_bfd_add_bfd_to_archive_cache (archive, filepos, n_nfd))
return n_nfd;
- /* huh? */
+ /* Huh? */
bfd_release (archive, (PTR) n_nfd);
bfd_release (archive, (PTR) new_areldata);
return NULL;
@@ -560,7 +559,6 @@ DESCRIPTION
the archive and the previous return value to return a created
BFD to the next contained element. NULL is returned when there
are no more.
-
*/
bfd *
@@ -595,7 +593,7 @@ bfd_generic_openr_next_archived_file (archive, last_file)
unsigned int size = arelt_size (last_file);
/* Pad to an even boundary...
Note that last_file->origin can be odd in the case of
- BSD-4.4-style element with a long odd size. */
+ BSD-4.4-style element with a long odd size. */
filestart = last_file->origin + size;
filestart += filestart % 2;
}
@@ -603,7 +601,6 @@ bfd_generic_openr_next_archived_file (archive, last_file)
return _bfd_get_elt_at_filepos (archive, filestart);
}
-
const bfd_target *
bfd_generic_archive_p (abfd)
bfd *abfd;
@@ -630,7 +627,7 @@ bfd_generic_archive_p (abfd)
#endif
/* We are setting bfd_ardata(abfd) here, but since bfd_ardata
- involves a cast, we can't do it as the left operand of assignment. */
+ involves a cast, we can't do it as the left operand of assignment. */
abfd->tdata.aout_ar_data = ((struct artdata *)
bfd_zalloc (abfd, sizeof (struct artdata)));
@@ -737,7 +734,7 @@ do_slurp_bsd_armap (abfd)
if (mapdata == NULL)
return false;
parsed_size = mapdata->parsed_size;
- bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */
+ bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */
raw_armap = (bfd_byte *) bfd_zalloc (abfd, parsed_size);
if (raw_armap == (bfd_byte *) NULL)
@@ -782,16 +779,17 @@ do_slurp_bsd_armap (abfd)
}
ardata->first_file_filepos = bfd_tell (abfd);
- /* Pad to an even boundary if you have to */
+ /* Pad to an even boundary if you have to. */
ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
/* FIXME, we should provide some way to free raw_ardata when
we are done using the strings from it. For now, it seems
- to be allocated on an objalloc anyway... */
+ to be allocated on an objalloc anyway... */
bfd_has_map (abfd) = true;
return true;
}
-/* Returns false on error, true otherwise */
+/* Returns false on error, true otherwise. */
+
static boolean
do_slurp_coff_armap (abfd)
bfd *abfd;
@@ -803,7 +801,7 @@ do_slurp_coff_armap (abfd)
unsigned int stringsize;
unsigned int parsed_size;
carsym *carsyms;
- unsigned int nsymz; /* Number of symbols in armap. */
+ unsigned int nsymz; /* Number of symbols in armap. */
bfd_vma (*swap) PARAMS ((const bfd_byte *));
char int_buf[sizeof (long)];
unsigned int carsym_size, ptrsize, i;
@@ -812,7 +810,7 @@ do_slurp_coff_armap (abfd)
if (mapdata == NULL)
return false;
parsed_size = mapdata->parsed_size;
- bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */
+ bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */
if (bfd_read ((PTR) int_buf, 1, 4, abfd) != 4)
{
@@ -821,7 +819,7 @@ do_slurp_coff_armap (abfd)
return false;
}
/* It seems that all numeric information in a coff archive is always
- in big endian format, nomatter the host or target. */
+ in big endian format, nomatter the host or target. */
swap = bfd_getb32;
nsymz = bfd_getb32 ((PTR) int_buf);
stringsize = parsed_size - (4 * nsymz) - 4;
@@ -836,7 +834,7 @@ do_slurp_coff_armap (abfd)
&& bfd_get_arch (abfd) == bfd_arch_i960
&& bfd_get_flavour (abfd) == bfd_target_coff_flavour)
{
- /* This looks dangerous, let's do it the other way around */
+ /* This looks dangerous, let's do it the other way around. */
nsymz = bfd_getl32 ((PTR) int_buf);
stringsize = parsed_size - (4 * nsymz) - 4;
swap = bfd_getl32;
@@ -844,7 +842,7 @@ do_slurp_coff_armap (abfd)
#endif
/* The coff armap must be read sequentially. So we construct a
- bsd-style one in core all at once, for simplicity. */
+ bsd-style one in core all at once, for simplicity. */
carsym_size = (nsymz * sizeof (carsym));
ptrsize = (4 * nsymz);
@@ -855,7 +853,7 @@ do_slurp_coff_armap (abfd)
carsyms = ardata->symdefs;
stringbase = ((char *) ardata->symdefs) + carsym_size;
- /* Allocate and read in the raw offsets. */
+ /* Allocate and read in the raw offsets. */
raw_armap = (int *) bfd_alloc (abfd, ptrsize);
if (raw_armap == NULL)
goto release_symdefs;
@@ -867,7 +865,7 @@ do_slurp_coff_armap (abfd)
goto release_raw_armap;
}
- /* OK, build the carsyms */
+ /* OK, build the carsyms. */
for (i = 0; i < nsymz; i++)
{
rawptr = raw_armap + i;
@@ -880,27 +878,25 @@ do_slurp_coff_armap (abfd)
ardata->symdef_count = nsymz;
ardata->first_file_filepos = bfd_tell (abfd);
- /* Pad to an even boundary if you have to */
+ /* Pad to an even boundary if you have to. */
ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
-
bfd_has_map (abfd) = true;
bfd_release (abfd, (PTR) raw_armap);
-
- /* Check for a second archive header (as used by PE) */
+ /* Check for a second archive header (as used by PE). */
{
struct areltdata *tmp;
bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET);
tmp = (struct areltdata *) _bfd_read_ar_hdr (abfd);
- if (tmp != NULL)
+ if (tmp != NULL)
{
if (tmp->arch_header[0] == '/'
- && tmp->arch_header[1] == ' ')
+ && tmp->arch_header[1] == ' ')
{
ardata->first_file_filepos +=
- (tmp->parsed_size + sizeof(struct ar_hdr) + 1) & ~1;
+ (tmp->parsed_size + sizeof (struct ar_hdr) + 1) & ~1;
}
bfd_release (abfd, tmp);
}
@@ -952,7 +948,7 @@ bfd_slurp_armap (abfd)
/* Returns false on error, true otherwise */
/* flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the
header is in a slightly different order and the map name is '/'.
- This flavour is used by hp300hpux. */
+ This flavour is used by hp300hpux. */
#define HPUX_SYMDEF_COUNT_SIZE 2
@@ -975,7 +971,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
if (i != 16)
return false;
- /* The archive has at least 16 bytes in it */
+ /* The archive has at least 16 bytes in it. */
if (bfd_seek (abfd, -16L, SEEK_CUR) != 0)
return false;
@@ -1024,7 +1020,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
ardata->cache = 0;
stringsize = bfd_h_get_32 (abfd, raw_armap + HPUX_SYMDEF_COUNT_SIZE);
- /* skip sym count and string sz */
+ /* Skip sym count and string sz. */
stringbase = ((char *) raw_armap
+ HPUX_SYMDEF_COUNT_SIZE
+ BSD_STRING_COUNT_SIZE);
@@ -1044,11 +1040,11 @@ bfd_slurp_bsd_armap_f2 (abfd)
}
ardata->first_file_filepos = bfd_tell (abfd);
- /* Pad to an even boundary if you have to */
+ /* Pad to an even boundary if you have to. */
ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
/* FIXME, we should provide some way to free raw_ardata when
we are done using the strings from it. For now, it seems
- to be allocated on an objalloc anyway... */
+ to be allocated on an objalloc anyway... */
bfd_has_map (abfd) = true;
return true;
}
@@ -1061,9 +1057,10 @@ bfd_slurp_bsd_armap_f2 (abfd)
element (the first in the archive, or second if there is an armap);
the name in the ar_hdr is replaced by <space><index into filename
element>. Index is the P.R. of an int (decimal). Data General have
- extended the format by using the prefix // for the special element */
+ extended the format by using the prefix // for the special element. */
+
+/* Returns false on error, true otherwise. */
-/* Returns false on error, true otherwise */
boolean
_bfd_slurp_extended_name_table (abfd)
bfd *abfd;
@@ -1117,22 +1114,25 @@ _bfd_slurp_extended_name_table (abfd)
{
char *temp = bfd_ardata (abfd)->extended_names;
char *limit = temp + namedata->parsed_size;
- for (; temp < limit; ++temp) {
- if (*temp == '\012')
- temp[temp[-1] == '/' ? -1 : 0] = '\0';
- if (*temp == '\\')
- *temp = '/';
- }
+ for (; temp < limit; ++temp)
+ {
+ if (*temp == '\012')
+ temp[temp[-1] == '/' ? -1 : 0] = '\0';
+ if (*temp == '\\')
+ *temp = '/';
+ }
}
- /* Pad to an even boundary if you have to */
+ /* Pad to an even boundary if you have to. */
bfd_ardata (abfd)->first_file_filepos = bfd_tell (abfd);
bfd_ardata (abfd)->first_file_filepos +=
(bfd_ardata (abfd)->first_file_filepos) % 2;
/* FIXME, we can't release namedata here because it was allocated
- below extended_names on the objalloc... */
- /* bfd_release (abfd, namedata); */
+ below extended_names on the objalloc... */
+#if 0
+ bfd_release (abfd, namedata);
+#endif
}
return true;
}
@@ -1140,7 +1140,8 @@ _bfd_slurp_extended_name_table (abfd)
#ifdef VMS
/* Return a copy of the stuff in the filename between any :]> and a
- semicolon */
+ semicolon. */
+
static const char *
normalize (abfd, file)
bfd *abfd;
@@ -1183,12 +1184,11 @@ normalize (abfd, file)
{
const char *filename = strrchr (file, '/');
-
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (file, '\\');
- if (bslash > filename)
+ if (filename == NULL || (bslash != NULL && bslash > filename))
filename = bslash;
if (filename == NULL && file[0] != '\0' && file[1] == ':')
filename = file + 1;
@@ -1250,7 +1250,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
*tablen = 0;
- /* Figure out how long the table should be */
+ /* Figure out how long the table should be. */
for (current = abfd->archive_head; current != NULL; current = current->next)
{
const char *normal;
@@ -1318,7 +1318,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
{
/* Works for now; may need to be re-engineered if we
encounter an oddball archive format and want to
- generalise this hack. */
+ generalise this hack. */
struct ar_hdr *hdr = arch_hdr (current);
strcpy (strptr, normal);
if (! trailing_slash)
@@ -1330,10 +1330,10 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
}
hdr->ar_name[0] = ar_padchar (current);
/* We know there will always be enough room (one of the few
- cases where you may safely use sprintf). */
+ cases where you may safely use sprintf). */
sprintf ((hdr->ar_name) + 1, "%-d", (unsigned) (strptr - *tabloc));
/* Kinda Kludgy. We should just use the returned value of
- sprintf but not all implementations get this right */
+ sprintf but not all implementations get this right. */
{
char *temp = hdr->ar_name + 2;
for (; temp < hdr->ar_name + maxname; temp++)
@@ -1351,6 +1351,24 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
/** A couple of functions for creating ar_hdrs */
+#ifdef HPUX_LARGE_AR_IDS
+/* Function to encode large UID/GID values according to HP. */
+
+static void
+hpux_uid_gid_encode (str, id)
+ char str[6];
+ long int id;
+{
+ int cnt;
+
+ str[5] = '@' + (id & 3);
+ id >>= 2;
+
+ for (cnt = 4; cnt >= 0; ++cnt, id >>= 6)
+ str[cnt] = ' ' + (id & 0x3f);
+}
+#endif /* HPUX_LARGE_AR_IDS */
+
#ifndef HAVE_GETUID
#define getuid() 0
#endif
@@ -1362,7 +1380,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
/* Takes a filename, returns an arelt_data for it, or NULL if it can't
make one. The filename must refer to a filename in the filesystem.
The filename field of the ar_hdr will NOT be initialized. If member
- is set, and it's an in-memory bfd, we fake it. */
+ is set, and it's an in-memory bfd, we fake it. */
static struct areltdata *
bfd_ar_hdr_from_filesystem (abfd, filename, member)
@@ -1377,11 +1395,11 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
if (member && (member->flags & BFD_IN_MEMORY) != 0)
{
- /* Assume we just "made" the member, and fake it */
+ /* Assume we just "made" the member, and fake it. */
struct bfd_in_memory *bim = (struct bfd_in_memory *) member->iostream;
- time(&status.st_mtime);
- status.st_uid = getuid();
- status.st_gid = getgid();
+ time (&status.st_mtime);
+ status.st_uid = getuid ();
+ status.st_gid = getgid ();
status.st_mode = 0644;
status.st_size = bim->size;
}
@@ -1397,20 +1415,34 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
return NULL;
hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata));
- /* ar headers are space padded, not null padded! */
+ /* ar headers are space padded, not null padded! */
memset ((PTR) hdr, ' ', sizeof (struct ar_hdr));
strncpy (hdr->ar_fmag, ARFMAG, 2);
- /* Goddamned sprintf doesn't permit MAXIMUM field lengths */
+ /* Goddamned sprintf doesn't permit MAXIMUM field lengths. */
sprintf ((hdr->ar_date), "%-12ld", (long) status.st_mtime);
- sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid);
+#ifdef HPUX_LARGE_AR_IDS
+ /* HP has a very "special" way to handle UID/GID's with numeric values
+ > 99999. */
+ if (status.st_uid > 99999)
+ hpux_uid_gid_encode (hdr->ar_gid, (long) status.st_uid);
+ else
+#endif
+ sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid);
+#ifdef HPUX_LARGE_AR_IDS
+ /* HP has a very "special" way to handle UID/GID's with numeric values
+ > 99999. */
+ if (status.st_gid > 99999)
+ hpux_uid_gid_encode (hdr->ar_uid, (long) status.st_gid);
+ else
+#endif
sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid);
sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode);
sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size);
/* Correct for a lossage in sprintf whereby it null-terminates. I cannot
understand how these C losers could design such a ramshackle bunch of
- IO operations */
+ IO operations. */
temp = (char *) hdr;
temp1 = temp + sizeof (struct ar_hdr) - 2;
for (; temp < temp1; temp++)
@@ -1426,9 +1458,9 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
}
/* This is magic required by the "ar" program. Since it's
- undocumented, it's undocumented. You may think that it would take
- a strong stomach to write this, and it does, but it takes even a
- stronger stomach to try to code around such a thing! */
+ undocumented, it's undocumented. You may think that it would take
+ a strong stomach to write this, and it does, but it takes even a
+ stronger stomach to try to code around such a thing! */
struct ar_hdr *bfd_special_undocumented_glue PARAMS ((bfd *, const char *));
@@ -1443,8 +1475,8 @@ bfd_special_undocumented_glue (abfd, filename)
return (struct ar_hdr *) ar_elt->arch_header;
}
+/* Analogous to stat call. */
-/* Analogous to stat call */
int
bfd_generic_stat_arch_elt (abfd, buf)
bfd *abfd;
@@ -1461,13 +1493,40 @@ bfd_generic_stat_arch_elt (abfd, buf)
hdr = arch_hdr (abfd);
-#define foo(arelt, stelt, size) \
- buf->stelt = strtol (hdr->arelt, &aloser, size); \
- if (aloser == hdr->arelt) return -1;
+#define foo(arelt, stelt, size) \
+ buf->stelt = strtol (hdr->arelt, &aloser, size); \
+ if (aloser == hdr->arelt) \
+ return -1;
+
+ /* Some platforms support special notations for large IDs. */
+#ifdef HPUX_LARGE_AR_IDS
+# define foo2(arelt, stelt, size) \
+ if (hdr->arelt[5] == ' ') \
+ { \
+ foo (arelt, stelt, size); \
+ } \
+ else \
+ { \
+ int cnt; \
+ for (buf->stelt = cnt = 0; cnt < 5; ++cnt) \
+ { \
+ if (hdr->arelt[cnt] < ' ' || hdr->arelt[cnt] > ' ' + 0x3f) \
+ return -1; \
+ buf->stelt <<= 6; \
+ buf->stelt += hdr->arelt[cnt] - ' '; \
+ } \
+ if (hdr->arelt[5] < '@' || hdr->arelt[5] > '@' + 3) \
+ return -1; \
+ buf->stelt <<= 2; \
+ buf->stelt += hdr->arelt[5] - '@'; \
+ }
+#else
+# define foo2(arelt, stelt, size) foo (arelt, stelt, size)
+#endif
foo (ar_date, st_mtime, 10);
- foo (ar_uid, st_uid, 10);
- foo (ar_gid, st_gid, 10);
+ foo2 (ar_uid, st_uid, 10);
+ foo2 (ar_gid, st_gid, 10);
foo (ar_mode, st_mode, 8);
buf->st_size = arch_eltdata (abfd)->parsed_size;
@@ -1484,7 +1543,7 @@ bfd_dont_truncate_arname (abfd, pathname, arhdr)
/* FIXME: This interacts unpleasantly with ar's quick-append option.
Fortunately ic960 users will never use that option. Fixing this
is very hard; fortunately I know how to do it and will do so once
- intel's release is out the door. */
+ intel's release is out the door. */
struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
size_t length;
@@ -1530,7 +1589,7 @@ bfd_bsd_truncate_arname (abfd, pathname, arhdr)
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (pathname, '\\');
- if (bslash > filename)
+ if (filename == NULL || (bslash != NULL && bslash > filename))
filename = bslash;
if (filename == NULL && pathname[0] != '\0' && pathname[1] == ':')
filename = pathname + 1;
@@ -1564,7 +1623,7 @@ bfd_bsd_truncate_arname (abfd, pathname, arhdr)
4> truncate it before the .o, append .o, stuff THAT in. */
/* This is what gnu ar does. It's better but incompatible with the
- bsd ar. */
+ bsd ar. */
void
bfd_gnu_truncate_arname (abfd, pathname, arhdr)
@@ -1581,7 +1640,7 @@ bfd_gnu_truncate_arname (abfd, pathname, arhdr)
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (pathname, '\\');
- if (bslash > filename)
+ if (filename == NULL || (bslash != NULL && bslash > filename))
filename = bslash;
if (filename == NULL && pathname[0] != '\0' && pathname[1] == ':')
filename = pathname + 1;
@@ -1612,7 +1671,7 @@ bfd_gnu_truncate_arname (abfd, pathname, arhdr)
(hdr->ar_name)[length] = ar_padchar (abfd);
}
-/* The BFD is open for write and has its format set to bfd_archive */
+/* The BFD is open for write and has its format set to bfd_archive. */
boolean
_bfd_write_archive_contents (arch)
@@ -1623,7 +1682,7 @@ _bfd_write_archive_contents (arch)
bfd_size_type elength = 0;
const char *ename = NULL;
boolean makemap = bfd_has_map (arch);
- boolean hasobjects = false; /* if no .o's, don't bother to make a map */
+ boolean hasobjects = false; /* If no .o's, don't bother to make a map. */
bfd_size_type wrote;
unsigned int i;
int tries;
@@ -1633,6 +1692,11 @@ _bfd_write_archive_contents (arch)
then construct a fresh ar_hdr for them. */
for (current = arch->archive_head; current; current = current->next)
{
+ /* This check is checking the bfds for the objects we're reading
+ from (which are usually either an object file or archive on
+ disk), not the archive entries we're writing to. We don't
+ actually create bfds for the archive members, we just copy
+ them byte-wise when we write out the archive. */
if (bfd_write_p (current))
{
bfd_set_error (bfd_error_invalid_operation);
@@ -1645,14 +1709,14 @@ _bfd_write_archive_contents (arch)
if (!current->arelt_data)
return false;
- /* Put in the file name */
+ /* Put in the file name. */
BFD_SEND (arch, _bfd_truncate_arname, (arch,
current->filename,
(char *) arch_hdr (current)));
}
if (makemap && ! hasobjects)
- { /* don't bother if we won't make a map! */
+ { /* Don't bother if we won't make a map! */
if ((bfd_check_format (current, bfd_object))
#if 0 /* FIXME -- these are not set correctly */
&& ((bfd_get_file_flags (current) & HAS_SYMS))
@@ -1712,7 +1776,7 @@ _bfd_write_archive_contents (arch)
unsigned int remaining = arelt_size (current);
struct ar_hdr *hdr = arch_hdr (current);
- /* write ar header */
+ /* Write ar header. */
if (bfd_write ((char *) hdr, 1, sizeof (*hdr), arch) != sizeof (*hdr))
return false;
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
@@ -1762,7 +1826,7 @@ _bfd_write_archive_contents (arch)
return true;
}
-/* Note that the namidx for the first symbol is 0 */
+/* Note that the namidx for the first symbol is 0. */
boolean
_bfd_compute_and_write_armap (arch, elength)
@@ -1780,7 +1844,7 @@ _bfd_compute_and_write_armap (arch, elength)
long syms_max = 0;
boolean ret;
- /* Dunno if this is the best place for this info... */
+ /* Dunno if this is the best place for this info... */
if (elength != 0)
elength += sizeof (struct ar_hdr);
elength += elength % 2;
@@ -1795,13 +1859,12 @@ _bfd_compute_and_write_armap (arch, elength)
if (first_name == NULL)
goto error_return;
- /* Drop all the files called __.SYMDEF, we're going to make our
- own */
+ /* Drop all the files called __.SYMDEF, we're going to make our own. */
while (arch->archive_head &&
strcmp (arch->archive_head->filename, "__.SYMDEF") == 0)
arch->archive_head = arch->archive_head->next;
- /* Map over each element */
+ /* Map over each element. */
for (current = arch->archive_head;
current != (bfd *) NULL;
current = current->next, elt_no++)
@@ -1832,7 +1895,8 @@ _bfd_compute_and_write_armap (arch, elength)
if (symcount < 0)
goto error_return;
- /* Now map over all the symbols, picking out the ones we want */
+ /* Now map over all the symbols, picking out the ones we
+ want. */
for (src_count = 0; src_count < symcount; src_count++)
{
flagword flags = (syms[src_count])->flags;
@@ -1847,7 +1911,7 @@ _bfd_compute_and_write_armap (arch, elength)
size_t namelen;
struct orl *new_map;
- /* This symbol will go into the archive header */
+ /* This symbol will go into the archive header. */
if (orl_count == orl_max)
{
orl_max *= 2;
@@ -1886,7 +1950,7 @@ _bfd_compute_and_write_armap (arch, elength)
}
}
- /* OK, now we have collected all the data, let's write them out */
+ /* OK, now we have collected all the data, let's write them out. */
ret = BFD_SEND (arch, write_armap,
(arch, elength, map, orl_count, stridx));
@@ -1921,7 +1985,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
int padit = stridx & 1;
unsigned int ranlibsize = orl_count * BSD_SYMDEF_SIZE;
unsigned int stringsize = stridx + padit;
- /* Include 8 bytes to store ranlibsize and stringsize in output. */
+ /* Include 8 bytes to store ranlibsize and stringsize in output. */
unsigned int mapsize = ranlibsize + stringsize + 8;
file_ptr firstreal;
bfd *current = arch->archive_head;
@@ -1978,7 +2042,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
return false;
}
- /* now write the strings themselves */
+ /* Now write the strings themselves. */
bfd_h_put_32 (arch, stringsize, temp);
if (bfd_write (temp, 1, sizeof (temp), arch) != sizeof (temp))
return false;
@@ -1991,7 +2055,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
}
/* The spec sez this should be a newline. But in order to be
- bug-compatible for sun's ar we use a null. */
+ bug-compatible for sun's ar we use a null. */
if (padit)
{
if (bfd_write ("", 1, 1, arch) != 1)
@@ -2021,10 +2085,13 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
if (bfd_stat (arch, &archstat) == -1)
{
perror (_("Reading archive file mod timestamp"));
- return true; /* Can't read mod time for some reason */
+
+ /* Can't read mod time for some reason. */
+ return true;
}
if (archstat.st_mtime <= bfd_ardata (arch)->armap_timestamp)
- return true; /* OK by the linker's rules */
+ /* OK by the linker's rules. */
+ return true;
/* Update the timestamp. */
bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET;
@@ -2045,10 +2112,13 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
{
/* FIXME: bfd can't call perror. */
perror (_("Writing updated armap timestamp"));
- return true; /* Some error while writing */
+
+ /* Some error while writing. */
+ return true;
}
- return false; /* We updated the timestamp successfully. */
+ /* We updated the timestamp successfully. */
+ return false;
}
/* A coff armap looks like :
@@ -2074,7 +2144,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
int stridx;
{
/* The size of the ranlib is the number of exported symbols in the
- archive * the number of bytes in a int, + an int for the count */
+ archive * the number of bytes in a int, + an int for the count. */
unsigned int ranlibsize = (symbol_count * 4) + 4;
unsigned int stringsize = stridx;
unsigned int mapsize = stringsize + ranlibsize;
@@ -2088,7 +2158,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
if (padit)
mapsize++;
- /* work out where the first object file will go in the archive */
+ /* Work out where the first object file will go in the archive. */
archive_member_file_ptr = (mapsize
+ elength
+ sizeof (struct ar_hdr)
@@ -2098,7 +2168,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
hdr.ar_name[0] = '/';
sprintf (hdr.ar_size, "%-10d", (int) mapsize);
sprintf (hdr.ar_date, "%ld", (long) time (NULL));
- /* This, at least, is what Intel coff sets the values to.: */
+ /* This, at least, is what Intel coff sets the values to. */
sprintf ((hdr.ar_uid), "%d", 0);
sprintf ((hdr.ar_gid), "%d", 0);
sprintf ((hdr.ar_mode), "%-7o", (unsigned) 0);
@@ -2108,7 +2178,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
if (((char *) (&hdr))[i] == '\0')
(((char *) (&hdr))[i]) = ' ';
- /* Write the ar header for this item and the number of symbols */
+ /* Write the ar header for this item and the number of symbols. */
if (bfd_write ((PTR) &hdr, 1, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
@@ -2126,23 +2196,23 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
count = 0;
while (current != (bfd *) NULL && count < symbol_count)
{
- /* For each symbol which is used defined in this object, write out
- the object file's address in the archive */
+ /* For each symbol which is used defined in this object, write
+ out the object file's address in the archive. */
- while (((bfd *) (map[count]).pos) == current)
+ while (count < symbol_count && ((bfd *) (map[count]).pos) == current)
{
bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr);
count++;
}
- /* Add size of this archive entry */
+ /* Add size of this archive entry. */
archive_member_file_ptr += (arelt_size (current)
+ sizeof (struct ar_hdr));
- /* remember aboout the even alignment */
+ /* Remember aboout the even alignment. */
archive_member_file_ptr += archive_member_file_ptr % 2;
current = current->next;
}
- /* now write the strings themselves */
+ /* Now write the strings themselves. */
for (count = 0; count < symbol_count; count++)
{
size_t len = strlen (*map[count].name) + 1;
@@ -2152,7 +2222,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
}
/* The spec sez this should be a newline. But in order to be
- bug-compatible for arc960 we use a null. */
+ bug-compatible for arc960 we use a null. */
if (padit)
{
if (bfd_write ("", 1, 1, arch) != 1)
diff --git a/gnu/usr.bin/binutils/bfd/archures.c b/gnu/usr.bin/binutils/bfd/archures.c
index 7462592742f..8f7f9de3085 100644
--- a/gnu/usr.bin/binutils/bfd/archures.c
+++ b/gnu/usr.bin/binutils/bfd/archures.c
@@ -1,5 +1,6 @@
/* BFD library support routines for architectures.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
@@ -31,7 +32,7 @@ SECTION
BFD keeps one atom in a BFD describing the
architecture of the data attached to the BFD: a pointer to a
- <<bfd_arch_info_type>>.
+ <<bfd_arch_info_type>>.
Pointers to structures can be requested independently of a BFD
so that an architecture's information can be interrogated
@@ -41,13 +42,13 @@ SECTION
The set of default architectures is selected by the macro
<<SELECT_ARCHITECTURES>>. This is normally set up in the
@file{config/@var{target}.mt} file of your choice. If the name is not
- defined, then all the architectures supported are included.
+ defined, then all the architectures supported are included.
When BFD starts up, all the architectures are called with an
initialize method. It is up to the architecture back end to
insert as many items into the list of architectures as it wants to;
generally this would be one for each machine and one for the
- default case (an item with a machine field of 0).
+ default case (an item with a machine field of 0).
BFD's idea of an architecture is implemented in @file{archures.c}.
*/
@@ -64,9 +65,9 @@ DESCRIPTION
the family is in use. The machine gives a number which
distinguishes different versions of the architecture,
containing, for example, 2 and 3 for Intel i960 KA and i960 KB,
- and 68020 and 68030 for Motorola 68020 and 68030.
+ and 68020 and 68030 for Motorola 68020 and 68030.
-.enum bfd_architecture
+.enum bfd_architecture
.{
. bfd_arch_unknown, {* File arch not known *}
. bfd_arch_obscure, {* Arch known, not one of these *}
@@ -79,14 +80,18 @@ DESCRIPTION
.#define bfd_mach_m68040 6
.#define bfd_mach_m68060 7
.#define bfd_mach_cpu32 8
-. bfd_arch_vax, {* DEC Vax *}
+.#define bfd_mach_mcf5200 9
+.#define bfd_mach_mcf5206e 10
+.#define bfd_mach_mcf5307 11
+.#define bfd_mach_mcf5407 12
+. bfd_arch_vax, {* DEC Vax *}
. bfd_arch_i960, {* Intel 960 *}
. {* The order of the following is important.
-. lower number indicates a machine type that
+. lower number indicates a machine type that
. only accepts a subset of the instructions
. available to machines with higher numbers.
. The exception is the "ca", which is
-. incompatible with all other machines except
+. incompatible with all other machines except
. "core". *}
.
.#define bfd_mach_i960_core 1
@@ -109,9 +114,12 @@ DESCRIPTION
.#define bfd_mach_sparc_sparclite_le 6
.#define bfd_mach_sparc_v9 7
.#define bfd_mach_sparc_v9a 8 {* with ultrasparc add'ns *}
+.#define bfd_mach_sparc_v8plusb 9 {* with cheetah add'ns *}
+.#define bfd_mach_sparc_v9b 10 {* with cheetah add'ns *}
.{* Nonzero if MACH has the v9 instruction set. *}
.#define bfd_mach_sparc_v9_p(mach) \
-. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
+. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
+. && (mach) != bfd_mach_sparc_sparclite_le)
. bfd_arch_mips, {* MIPS Rxxxx *}
.#define bfd_mach_mips3000 3000
.#define bfd_mach_mips3900 3900
@@ -127,11 +135,19 @@ DESCRIPTION
.#define bfd_mach_mips6000 6000
.#define bfd_mach_mips8000 8000
.#define bfd_mach_mips10000 10000
+.#define bfd_mach_mips12000 12000
.#define bfd_mach_mips16 16
+.#define bfd_mach_mips32 32
+.#define bfd_mach_mips32_4k 3204113 {* 32, 04, octal 'K' *}
+.#define bfd_mach_mips5 5
+.#define bfd_mach_mips64 64
+.#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *}
. bfd_arch_i386, {* Intel 386 *}
.#define bfd_mach_i386_i386 0
.#define bfd_mach_i386_i8086 1
.#define bfd_mach_i386_i386_intel_syntax 2
+.#define bfd_mach_x86_64 3
+.#define bfd_mach_x86_64_intel_syntax 4
. bfd_arch_we32k, {* AT&T WE32xxx *}
. bfd_arch_tahoe, {* CCI/Harris Tahoe *}
. bfd_arch_i860, {* Intel 860 *}
@@ -146,13 +162,36 @@ DESCRIPTION
.#define bfd_mach_h8300h 2
.#define bfd_mach_h8300s 3
. bfd_arch_powerpc, {* PowerPC *}
+.#define bfd_mach_ppc 0
+.#define bfd_mach_ppc_403 403
+.#define bfd_mach_ppc_403gc 4030
+.#define bfd_mach_ppc_505 505
+.#define bfd_mach_ppc_601 601
+.#define bfd_mach_ppc_602 602
+.#define bfd_mach_ppc_603 603
+.#define bfd_mach_ppc_ec603e 6031
+.#define bfd_mach_ppc_604 604
+.#define bfd_mach_ppc_620 620
+.#define bfd_mach_ppc_630 630
+.#define bfd_mach_ppc_750 750
+.#define bfd_mach_ppc_860 860
+.#define bfd_mach_ppc_a35 35
+.#define bfd_mach_ppc_rs64ii 642
+.#define bfd_mach_ppc_rs64iii 643
+.#define bfd_mach_ppc_7400 7400
. bfd_arch_rs6000, {* IBM RS/6000 *}
+.#define bfd_mach_rs6k 0
+.#define bfd_mach_rs6k_rs1 6001
+.#define bfd_mach_rs6k_rsc 6003
+.#define bfd_mach_rs6k_rs2 6002
. bfd_arch_hppa, {* HP PA RISC *}
. bfd_arch_d10v, {* Mitsubishi D10V *}
.#define bfd_mach_d10v 0
.#define bfd_mach_d10v_ts2 2
.#define bfd_mach_d10v_ts3 3
. bfd_arch_d30v, {* Mitsubishi D30V *}
+. bfd_arch_m68hc11, {* Motorola 68HC11 *}
+. bfd_arch_m68hc12, {* Motorola 68HC12 *}
. bfd_arch_z8k, {* Zilog Z8000 *}
.#define bfd_mach_z8001 1
.#define bfd_mach_z8002 2
@@ -178,16 +217,22 @@ DESCRIPTION
.#define bfd_mach_arm_4T 6
.#define bfd_mach_arm_5 7
.#define bfd_mach_arm_5T 8
+.#define bfd_mach_arm_5TE 9
+.#define bfd_mach_arm_XScale 10
. bfd_arch_ns32k, {* National Semiconductors ns32000 *}
. bfd_arch_w65, {* WDC 65816 *}
. bfd_arch_tic30, {* Texas Instruments TMS320C30 *}
+. bfd_arch_tic54x, {* Texas Instruments TMS320C54X *}
. bfd_arch_tic80, {* TI TMS320c80 (MVP) *}
. bfd_arch_v850, {* NEC V850 *}
.#define bfd_mach_v850 0
.#define bfd_mach_v850e 'E'
.#define bfd_mach_v850ea 'A'
-. bfd_arch_arc, {* Argonaut RISC Core *}
-.#define bfd_mach_arc_base 0
+. bfd_arch_arc, {* ARC Cores *}
+.#define bfd_mach_arc_5 0
+.#define bfd_mach_arc_6 1
+.#define bfd_mach_arc_7 2
+.#define bfd_mach_arc_8 3
. bfd_arch_m32r, {* Mitsubishi M32R/D *}
.#define bfd_mach_m32r 0 {* backwards compatibility *}
.#define bfd_mach_m32rx 'x'
@@ -198,20 +243,22 @@ DESCRIPTION
. bfd_arch_fr30,
.#define bfd_mach_fr30 0x46523330
. bfd_arch_mcore,
+. bfd_arch_ia64, {* HP/Intel ia64 *}
+.#define bfd_mach_ia64_elf64 0
+.#define bfd_mach_ia64_elf32 1
. bfd_arch_pj,
. bfd_arch_avr, {* Atmel AVR microcontrollers *}
.#define bfd_mach_avr1 1
.#define bfd_mach_avr2 2
.#define bfd_mach_avr3 3
.#define bfd_mach_avr4 4
+.#define bfd_mach_avr5 5
+. bfd_arch_cris, {* Axis CRIS *}
. bfd_arch_last
. };
-
-
*/
/*
-
SUBSECTION
bfd_arch_info
@@ -220,7 +267,7 @@ DESCRIPTION
within BFD.
.
-.typedef struct bfd_arch_info
+.typedef struct bfd_arch_info
.{
. int bits_per_word;
. int bits_per_address;
@@ -230,8 +277,8 @@ DESCRIPTION
. const char *arch_name;
. const char *printable_name;
. unsigned int section_align_power;
-. {* true if this is the default machine for the architecture *}
-. boolean the_default;
+. {* True if this is the default machine for the architecture. *}
+. boolean the_default;
. const struct bfd_arch_info * (*compatible)
. PARAMS ((const struct bfd_arch_info *a,
. const struct bfd_arch_info *b));
@@ -246,6 +293,7 @@ extern const bfd_arch_info_type bfd_a29k_arch;
extern const bfd_arch_info_type bfd_alpha_arch;
extern const bfd_arch_info_type bfd_arc_arch;
extern const bfd_arch_info_type bfd_arm_arch;
+extern const bfd_arch_info_type bfd_cris_arch;
extern const bfd_arch_info_type bfd_d10v_arch;
extern const bfd_arch_info_type bfd_d30v_arch;
extern const bfd_arch_info_type bfd_h8300_arch;
@@ -256,6 +304,8 @@ extern const bfd_arch_info_type bfd_i386_arch;
extern const bfd_arch_info_type bfd_i860_arch;
extern const bfd_arch_info_type bfd_i960_arch;
extern const bfd_arch_info_type bfd_m32r_arch;
+extern const bfd_arch_info_type bfd_m68hc11_arch;
+extern const bfd_arch_info_type bfd_m68hc12_arch;
extern const bfd_arch_info_type bfd_m68k_arch;
extern const bfd_arch_info_type bfd_m88k_arch;
extern const bfd_arch_info_type bfd_mips_arch;
@@ -267,6 +317,7 @@ extern const bfd_arch_info_type bfd_pj_arch;
extern const bfd_arch_info_type bfd_sh_arch;
extern const bfd_arch_info_type bfd_sparc_arch;
extern const bfd_arch_info_type bfd_tic30_arch;
+extern const bfd_arch_info_type bfd_tic54x_arch;
extern const bfd_arch_info_type bfd_tic80_arch;
extern const bfd_arch_info_type bfd_vax_arch;
extern const bfd_arch_info_type bfd_we32k_arch;
@@ -277,9 +328,9 @@ extern const bfd_arch_info_type bfd_v850_arch;
extern const bfd_arch_info_type bfd_fr30_arch;
extern const bfd_arch_info_type bfd_mcore_arch;
extern const bfd_arch_info_type bfd_avr_arch;
+extern const bfd_arch_info_type bfd_ia64_arch;
-static const bfd_arch_info_type * const bfd_archures_list[] =
-{
+static const bfd_arch_info_type * const bfd_archures_list[] = {
#ifdef SELECT_ARCHITECTURES
SELECT_ARCHITECTURES,
#else
@@ -287,6 +338,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_alpha_arch,
&bfd_arc_arch,
&bfd_arm_arch,
+ &bfd_cris_arch,
&bfd_d10v_arch,
&bfd_d30v_arch,
&bfd_h8300_arch,
@@ -297,6 +349,8 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_i860_arch,
&bfd_i960_arch,
&bfd_m32r_arch,
+ &bfd_m68hc11_arch,
+ &bfd_m68hc12_arch,
&bfd_m68k_arch,
&bfd_m88k_arch,
&bfd_mips_arch,
@@ -307,6 +361,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_sh_arch,
&bfd_sparc_arch,
&bfd_tic30_arch,
+ &bfd_tic54x_arch,
&bfd_tic80_arch,
&bfd_vax_arch,
&bfd_we32k_arch,
@@ -317,6 +372,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_fr30_arch,
&bfd_mcore_arch,
&bfd_avr_arch,
+ &bfd_ia64_arch,
#endif
0
};
@@ -341,8 +397,6 @@ bfd_printable_name (abfd)
return abfd->arch_info->printable_name;
}
-
-
/*
FUNCTION
bfd_scan_arch
@@ -354,7 +408,6 @@ DESCRIPTION
Figure out if BFD supports any cpu which could be described with
the name @var{string}. Return a pointer to an <<arch_info>>
structure if a machine is found, otherwise NULL.
-
*/
const bfd_arch_info_type *
@@ -363,7 +416,7 @@ bfd_scan_arch (string)
{
const bfd_arch_info_type * const *app, *ap;
- /* Look through all the installed architectures */
+ /* Look through all the installed architectures. */
for (app = bfd_archures_list; *app != NULL; app++)
{
for (ap = *app; ap != NULL; ap = ap->next)
@@ -376,8 +429,6 @@ bfd_scan_arch (string)
return NULL;
}
-
-
/*
FUNCTION
bfd_arch_list
@@ -388,7 +439,6 @@ SYNOPSIS
DESCRIPTION
Return a freshly malloced NULL-terminated vector of the names
of all the valid BFD architectures. Do not modify the names.
-
*/
const char **
@@ -399,7 +449,7 @@ bfd_arch_list ()
const char **name_list;
const bfd_arch_info_type * const *app;
- /* Determine the number of architectures */
+ /* Determine the number of architectures. */
vec_length = 0;
for (app = bfd_archures_list; *app != NULL; app++)
{
@@ -410,12 +460,12 @@ bfd_arch_list ()
}
}
- name_list = (CONST char **)
+ name_list = (const char **)
bfd_malloc ((vec_length + 1) * sizeof (char **));
if (name_list == NULL)
return NULL;
- /* Point the list at each of the names */
+ /* Point the list at each of the names. */
name_ptr = name_list;
for (app = bfd_archures_list; *app != NULL; app++)
{
@@ -431,8 +481,6 @@ bfd_arch_list ()
return name_list;
}
-
-
/*
FUNCTION
bfd_arch_get_compatible
@@ -458,15 +506,14 @@ bfd_arch_get_compatible (abfd, bbfd)
/* If either architecture is unknown, then all we can do is assume
the user knows what he's doing. */
if (abfd->arch_info->arch == bfd_arch_unknown)
- return bbfd->arch_info;
+ return bbfd->arch_info;
if (bbfd->arch_info->arch == bfd_arch_unknown)
- return abfd->arch_info;
+ return abfd->arch_info;
/* Otherwise architecture-specific code has to decide. */
return abfd->arch_info->compatible (abfd->arch_info, bbfd->arch_info);
}
-
/*
INTERNAL_DEFINITION
bfd_default_arch_struct
@@ -479,15 +526,13 @@ DESCRIPTION
architecture of the file.
.extern const bfd_arch_info_type bfd_default_arch_struct;
-
*/
-const bfd_arch_info_type bfd_default_arch_struct =
-{
- 32,32,8,bfd_arch_unknown,0,"unknown","unknown",2,true,
- bfd_default_compatible,
- bfd_default_scan,
- 0,
+const bfd_arch_info_type bfd_default_arch_struct = {
+ 32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, true,
+ bfd_default_compatible,
+ bfd_default_scan,
+ 0,
};
/*
@@ -522,7 +567,7 @@ DESCRIPTION
Set the architecture and machine type in BFD @var{abfd}
to @var{arch} and @var{mach}. Find the correct
pointer to a structure and insert it into the <<arch_info>>
- pointer.
+ pointer.
*/
boolean
@@ -552,7 +597,6 @@ bfd_default_set_arch_mach (abfd, arch, mach)
return false;
}
-
/*
FUNCTION
bfd_get_arch
@@ -563,14 +607,13 @@ SYNOPSIS
DESCRIPTION
Return the enumerated type which describes the BFD @var{abfd}'s
architecture.
-
*/
enum bfd_architecture
bfd_get_arch (abfd)
bfd *abfd;
{
- return abfd->arch_info->arch;
+ return abfd->arch_info->arch;
}
/*
@@ -585,11 +628,11 @@ DESCRIPTION
machine.
*/
-unsigned long
+unsigned long
bfd_get_mach (abfd)
bfd *abfd;
{
- return abfd->arch_info->mach;
+ return abfd->arch_info->mach;
}
/*
@@ -602,7 +645,6 @@ SYNOPSIS
DESCRIPTION
Return the number of bits in one of the BFD @var{abfd}'s
architecture's bytes.
-
*/
unsigned int
@@ -631,9 +673,8 @@ bfd_arch_bits_per_address (abfd)
return abfd->arch_info->bits_per_address;
}
-
/*
-INTERNAL_FUNCTION
+INTERNAL_FUNCTION
bfd_default_compatible
SYNOPSIS
@@ -646,7 +687,7 @@ DESCRIPTION
*/
const bfd_arch_info_type *
-bfd_default_compatible (a,b)
+bfd_default_compatible (a, b)
const bfd_arch_info_type *a;
const bfd_arch_info_type *b;
{
@@ -662,7 +703,6 @@ bfd_default_compatible (a,b)
return a;
}
-
/*
INTERNAL_FUNCTION
bfd_default_scan
@@ -675,7 +715,7 @@ DESCRIPTION
architecture hit and a machine hit.
*/
-boolean
+boolean
bfd_default_scan (info, string)
const struct bfd_arch_info *info;
const char *string;
@@ -687,17 +727,17 @@ bfd_default_scan (info, string)
const char *printable_name_colon;
/* Exact match of the architecture name (ARCH_NAME) and also the
- default architecture? */
+ default architecture? */
if (strcasecmp (string, info->arch_name) == 0
&& info->the_default)
return true;
- /* Exact match of the machine name (PRINTABLE_NAME)? */
+ /* Exact match of the machine name (PRINTABLE_NAME)? */
if (strcasecmp (string, info->printable_name) == 0)
return true;
-
+
/* Given that printable_name contains no colon, attempt to match:
- ARCH_NAME [ ":" ] PRINTABLE_NAME? */
+ ARCH_NAME [ ":" ] PRINTABLE_NAME? */
printable_name_colon = strchr (info->printable_name, ':');
if (printable_name_colon == NULL)
{
@@ -720,7 +760,7 @@ bfd_default_scan (info, string)
}
/* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>;
- Attempt to match: <arch> <mach>? */
+ Attempt to match: <arch> <mach>? */
if (printable_name_colon != NULL)
{
int colon_index = printable_name_colon - info->printable_name;
@@ -732,48 +772,61 @@ bfd_default_scan (info, string)
/* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>; Do not
attempt to match just <mach>, it could be ambigious. This test
- is left until later. */
+ is left until later. */
- /* NOTE: The below is retained for compatibility only. Please do not
- add to this code */
+ /* NOTE: The below is retained for compatibility only. Please do
+ not add to this code. */
/* See how much of the supplied string matches with the
architecture, eg the string m68k:68020 would match the 68k entry
- up to the :, then we get left with the machine number */
+ up to the :, then we get left with the machine number. */
- for (ptr_src = string, ptr_tst = info->arch_name;
+ for (ptr_src = string, ptr_tst = info->arch_name;
*ptr_src && *ptr_tst;
- ptr_src++, ptr_tst++)
+ ptr_src++, ptr_tst++)
{
- if (*ptr_src != *ptr_tst) break;
+ if (*ptr_src != *ptr_tst)
+ break;
}
/* Chewed up as much of the architecture as will match, skip any
- colons */
+ colons. */
if (*ptr_src == ':')
ptr_src++;
-
+
if (*ptr_src == 0)
{
- /* nothing more, then only keep this one if it is the default
- machine for this architecture */
+ /* Nothing more, then only keep this one if it is the default
+ machine for this architecture. */
return info->the_default;
}
number = 0;
while (isdigit ((unsigned char) *ptr_src))
{
- number = number * 10 + *ptr_src - '0';
+ number = number * 10 + *ptr_src - '0';
ptr_src++;
}
/* NOTE: The below is retained for compatibility only.
- PLEASE DO NOT ADD TO THIS CODE. */
+ PLEASE DO NOT ADD TO THIS CODE. */
- switch (number)
+ switch (number)
{
/* FIXME: These are needed to parse IEEE objects. */
- case 68000:
+ /* The following seven case's are here only for compatibility with
+ older binutils (at least IEEE objects from binutils 2.9.1 require
+ them). */
+ case bfd_mach_m68000:
+ case bfd_mach_m68010:
+ case bfd_mach_m68020:
+ case bfd_mach_m68030:
+ case bfd_mach_m68040:
+ case bfd_mach_m68060:
+ case bfd_mach_cpu32:
+ arch = bfd_arch_m68k;
+ break;
+ case 68000:
arch = bfd_arch_m68k;
number = bfd_mach_m68000;
break;
@@ -801,6 +854,22 @@ bfd_default_scan (info, string)
arch = bfd_arch_m68k;
number = bfd_mach_cpu32;
break;
+ case 5200:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_mcf5200;
+ break;
+ case 5206:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_mcf5206e;
+ break;
+ case 5307:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_mcf5307;
+ break;
+ case 5407:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_mcf5407;
+ break;
case 32000:
arch = bfd_arch_we32k;
@@ -840,11 +909,11 @@ bfd_default_scan (info, string)
number = bfd_mach_sh4;
break;
- default:
+ default:
return false;
}
- if (arch != info->arch)
+ if (arch != info->arch)
return false;
if (number != info->mach)
@@ -853,7 +922,6 @@ bfd_default_scan (info, string)
return true;
}
-
/*
FUNCTION
bfd_get_arch_info
@@ -872,7 +940,6 @@ bfd_get_arch_info (abfd)
return abfd->arch_info;
}
-
/*
FUNCTION
bfd_lookup_arch
@@ -890,7 +957,7 @@ DESCRIPTION
default.
*/
-const bfd_arch_info_type *
+const bfd_arch_info_type *
bfd_lookup_arch (arch, machine)
enum bfd_architecture arch;
unsigned long machine;
@@ -911,7 +978,6 @@ bfd_lookup_arch (arch, machine)
return NULL;
}
-
/*
FUNCTION
bfd_printable_arch_mach
@@ -922,7 +988,7 @@ SYNOPSIS
DESCRIPTION
Return a printable string representing the architecture and
- machine type.
+ machine type.
This routine is depreciated.
*/
@@ -932,11 +998,11 @@ bfd_printable_arch_mach (arch, machine)
enum bfd_architecture arch;
unsigned long machine;
{
- const bfd_arch_info_type * ap = bfd_lookup_arch (arch, machine);
+ const bfd_arch_info_type *ap = bfd_lookup_arch (arch, machine);
- if (ap)
- return ap->printable_name;
- return "UNKNOWN!";
+ if (ap)
+ return ap->printable_name;
+ return "UNKNOWN!";
}
/*
@@ -950,15 +1016,14 @@ DESCRIPTION
Return the number of octets (8-bit quantities) per target byte
(minimum addressable unit). In most cases, this will be one, but some
DSP targets have 16, 32, or even 48 bits per byte.
-
*/
unsigned int
bfd_octets_per_byte (abfd)
- bfd * abfd;
+ bfd *abfd;
{
- return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd),
- bfd_get_mach (abfd));
+ return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd),
+ bfd_get_mach (abfd));
}
/*
@@ -971,19 +1036,19 @@ SYNOPSIS
DESCRIPTION
See bfd_octets_per_byte.
-
+
This routine is provided for those cases where a bfd * is not
available
*/
unsigned int
bfd_arch_mach_octets_per_byte (arch, mach)
- enum bfd_architecture arch;
- unsigned long mach;
+ enum bfd_architecture arch;
+ unsigned long mach;
{
- const bfd_arch_info_type * ap = bfd_lookup_arch (arch, mach);
-
- if (ap)
- return ap->bits_per_byte / 8;
- return 1;
+ const bfd_arch_info_type *ap = bfd_lookup_arch (arch, mach);
+
+ if (ap)
+ return ap->bits_per_byte / 8;
+ return 1;
}
diff --git a/gnu/usr.bin/binutils/bfd/bfd-in.h b/gnu/usr.bin/binutils/bfd/bfd-in.h
index 09753c27535..62ce58b919e 100644
--- a/gnu/usr.bin/binutils/bfd/bfd-in.h
+++ b/gnu/usr.bin/binutils/bfd/bfd-in.h
@@ -1,5 +1,6 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -23,7 +24,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* bfd.h -- The only header file required by users of the bfd library
+/* bfd.h -- The only header file required by users of the bfd library
The bfd.h file is generated from bfd-in.h and various .c files; if you
change it, your changes will probably be lost.
@@ -84,7 +85,7 @@ typedef struct _bfd bfd;
/* General rules: functions which are boolean return true on success
and false on failure (unless they're a predicate). -- bfd.doc */
/* I'm sure this is going to break something and someone is going to
- force me to change it. */
+ force me to change it. */
/* typedef enum boolean {false, true} boolean; */
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
@@ -93,7 +94,7 @@ typedef struct _bfd bfd;
#define TRUE_FALSE_ALREADY_DEFINED
#endif
#ifdef MPW
-/* Pre-emptive strike - get the file with the enum. */
+/* Pre-emptive strike - get the file with the enum. */
#include <Types.h>
#define TRUE_FALSE_ALREADY_DEFINED
#endif /* MPW */
@@ -109,7 +110,7 @@ typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean;
/* FIXME: This should be using off_t from <sys/types.h>.
For now, try to avoid breaking stuff by not including <sys/types.h> here.
This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
- Probably the best long-term answer is to avoid using file_ptr AND off_t
+ Probably the best long-term answer is to avoid using file_ptr AND off_t
in this header file, and to handle this in the BFD implementation
rather than in its interface. */
/* typedef off_t file_ptr; */
@@ -177,8 +178,8 @@ typedef unsigned long symvalue;
typedef unsigned long bfd_size_type;
/* Print a bfd_vma x on stream s. */
-#define fprintf_vma(s,x) fprintf(s, "%08lx", x)
-#define sprintf_vma(s,x) sprintf(s, "%08lx", x)
+#define fprintf_vma(s,x) fprintf (s, "%08lx", x)
+#define sprintf_vma(s,x) sprintf (s, "%08lx", x)
#endif /* not BFD64 */
@@ -284,19 +285,17 @@ typedef struct carsym {
file_ptr file_offset; /* look here to find the file */
} carsym; /* to make these you call a carsymogen */
-
/* Used in generating armaps (archive tables of contents).
Perhaps just a forward definition would do? */
struct orl { /* output ranlib */
- char **name; /* symbol name */
+ char **name; /* symbol name */
file_ptr pos; /* bfd* or file position */
int namidx; /* index into string table */
};
-
/* Linenumber stuff */
typedef struct lineno_cache_entry {
- unsigned int line_number; /* Linenumber from start of function*/
+ unsigned int line_number; /* Linenumber from start of function*/
union {
struct symbol_cache_entry *sym; /* Function name */
unsigned long offset; /* Offset into section */
@@ -327,15 +326,15 @@ typedef struct sec *sec_ptr;
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
-typedef struct stat stat_type;
+typedef struct stat stat_type;
typedef enum bfd_print_symbol
-{
+{
bfd_print_symbol_name,
bfd_print_symbol_more,
bfd_print_symbol_all
} bfd_print_symbol_type;
-
+
/* Information about a symbol that nm needs. */
typedef struct _symbol_info
@@ -344,7 +343,7 @@ typedef struct _symbol_info
char type;
CONST char *name; /* Symbol name. */
unsigned char stab_type; /* Stab type. */
- char stab_other; /* Stab other. */
+ char stab_other; /* Stab other. */
short stab_desc; /* Stab desc. */
CONST char *stab_name; /* String for stab type. */
} symbol_info;
@@ -481,7 +480,6 @@ extern long bfd_tell PARAMS ((bfd *abfd));
extern int bfd_flush PARAMS ((bfd *abfd));
extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
-
/* Cast from const char * to char * so that caller can assign to
a char * without a warning. */
#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
@@ -489,6 +487,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
#define bfd_get_format(abfd) ((abfd)->format)
#define bfd_get_target(abfd) ((abfd)->xvec->name)
#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
+#define bfd_family_coff(abfd) \
+ (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
+ bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
#define bfd_header_big_endian(abfd) \
@@ -511,7 +512,7 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean)(bool)), true)
+#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true)
extern boolean bfd_record_phdr
PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
@@ -537,6 +538,11 @@ void bfd_putb32 PARAMS ((bfd_vma, unsigned char *));
void bfd_putl32 PARAMS ((bfd_vma, unsigned char *));
void bfd_putb16 PARAMS ((bfd_vma, unsigned char *));
void bfd_putl16 PARAMS ((bfd_vma, unsigned char *));
+
+/* Byte swapping routines which take size and endiannes as arguments. */
+
+bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean));
+void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean));
/* Externally visible ECOFF routines. */
@@ -624,7 +630,10 @@ extern boolean bfd_elf64_size_dynamic_sections
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
+extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
+extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
+ PARAMS ((bfd *, struct bfd_link_info *));
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
@@ -640,6 +649,16 @@ extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd));
error occurs; bfd_get_error will return an appropriate code. */
extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs));
+/* Return the arch_size field of an elf bfd, or -1 if not elf. */
+extern int bfd_get_arch_size PARAMS ((bfd *));
+
+/* Return true if address "naturally" sign extends, or -1 if not elf. */
+extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
+
+extern boolean bfd_m68k_elf32_create_embedded_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
+ char **));
+
/* SunOS shared library support routines for the linker. */
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
@@ -718,6 +737,10 @@ extern boolean bfd_coff_get_auxent
extern boolean bfd_coff_set_symbol_class
PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
+extern boolean bfd_m68k_coff_create_embedded_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
+ char **));
+
/* ARM Interworking support. Called from linker. */
extern boolean bfd_arm_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
@@ -748,4 +771,11 @@ extern boolean bfd_elf32_arm_process_before_allocation
extern boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
+/* TI COFF load page support. */
+extern void bfd_ticoff_set_section_load_page
+ PARAMS ((struct sec *, int));
+
+extern int bfd_ticoff_get_section_load_page
+ PARAMS ((struct sec *));
+
/* And more from the source. */
diff --git a/gnu/usr.bin/binutils/bfd/bfd-in2.h b/gnu/usr.bin/binutils/bfd/bfd-in2.h
index 4c3eea02af4..08456db6011 100644
--- a/gnu/usr.bin/binutils/bfd/bfd-in2.h
+++ b/gnu/usr.bin/binutils/bfd/bfd-in2.h
@@ -1,5 +1,6 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -23,7 +24,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* bfd.h -- The only header file required by users of the bfd library
+/* bfd.h -- The only header file required by users of the bfd library
The bfd.h file is generated from bfd-in.h and various .c files; if you
change it, your changes will probably be lost.
@@ -84,7 +85,7 @@ typedef struct _bfd bfd;
/* General rules: functions which are boolean return true on success
and false on failure (unless they're a predicate). -- bfd.doc */
/* I'm sure this is going to break something and someone is going to
- force me to change it. */
+ force me to change it. */
/* typedef enum boolean {false, true} boolean; */
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
@@ -93,7 +94,7 @@ typedef struct _bfd bfd;
#define TRUE_FALSE_ALREADY_DEFINED
#endif
#ifdef MPW
-/* Pre-emptive strike - get the file with the enum. */
+/* Pre-emptive strike - get the file with the enum. */
#include <Types.h>
#define TRUE_FALSE_ALREADY_DEFINED
#endif /* MPW */
@@ -109,7 +110,7 @@ typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean;
/* FIXME: This should be using off_t from <sys/types.h>.
For now, try to avoid breaking stuff by not including <sys/types.h> here.
This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
- Probably the best long-term answer is to avoid using file_ptr AND off_t
+ Probably the best long-term answer is to avoid using file_ptr AND off_t
in this header file, and to handle this in the BFD implementation
rather than in its interface. */
/* typedef off_t file_ptr; */
@@ -177,8 +178,8 @@ typedef unsigned long symvalue;
typedef unsigned long bfd_size_type;
/* Print a bfd_vma x on stream s. */
-#define fprintf_vma(s,x) fprintf(s, "%08lx", x)
-#define sprintf_vma(s,x) sprintf(s, "%08lx", x)
+#define fprintf_vma(s,x) fprintf (s, "%08lx", x)
+#define sprintf_vma(s,x) sprintf (s, "%08lx", x)
#endif /* not BFD64 */
@@ -284,19 +285,17 @@ typedef struct carsym {
file_ptr file_offset; /* look here to find the file */
} carsym; /* to make these you call a carsymogen */
-
/* Used in generating armaps (archive tables of contents).
Perhaps just a forward definition would do? */
struct orl { /* output ranlib */
- char **name; /* symbol name */
+ char **name; /* symbol name */
file_ptr pos; /* bfd* or file position */
int namidx; /* index into string table */
};
-
/* Linenumber stuff */
typedef struct lineno_cache_entry {
- unsigned int line_number; /* Linenumber from start of function*/
+ unsigned int line_number; /* Linenumber from start of function*/
union {
struct symbol_cache_entry *sym; /* Function name */
unsigned long offset; /* Offset into section */
@@ -327,15 +326,15 @@ typedef struct sec *sec_ptr;
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
-typedef struct stat stat_type;
+typedef struct stat stat_type;
typedef enum bfd_print_symbol
-{
+{
bfd_print_symbol_name,
bfd_print_symbol_more,
bfd_print_symbol_all
} bfd_print_symbol_type;
-
+
/* Information about a symbol that nm needs. */
typedef struct _symbol_info
@@ -344,7 +343,7 @@ typedef struct _symbol_info
char type;
CONST char *name; /* Symbol name. */
unsigned char stab_type; /* Stab type. */
- char stab_other; /* Stab other. */
+ char stab_other; /* Stab other. */
short stab_desc; /* Stab desc. */
CONST char *stab_name; /* String for stab type. */
} symbol_info;
@@ -481,7 +480,6 @@ extern long bfd_tell PARAMS ((bfd *abfd));
extern int bfd_flush PARAMS ((bfd *abfd));
extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
-
/* Cast from const char * to char * so that caller can assign to
a char * without a warning. */
#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
@@ -489,6 +487,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
#define bfd_get_format(abfd) ((abfd)->format)
#define bfd_get_target(abfd) ((abfd)->xvec->name)
#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
+#define bfd_family_coff(abfd) \
+ (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
+ bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
#define bfd_header_big_endian(abfd) \
@@ -511,7 +512,7 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean)(bool)), true)
+#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true)
extern boolean bfd_record_phdr
PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
@@ -537,6 +538,11 @@ void bfd_putb32 PARAMS ((bfd_vma, unsigned char *));
void bfd_putl32 PARAMS ((bfd_vma, unsigned char *));
void bfd_putb16 PARAMS ((bfd_vma, unsigned char *));
void bfd_putl16 PARAMS ((bfd_vma, unsigned char *));
+
+/* Byte swapping routines which take size and endiannes as arguments. */
+
+bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean));
+void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean));
/* Externally visible ECOFF routines. */
@@ -624,7 +630,10 @@ extern boolean bfd_elf64_size_dynamic_sections
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
+extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
+extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
+ PARAMS ((bfd *, struct bfd_link_info *));
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
@@ -640,6 +649,16 @@ extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd));
error occurs; bfd_get_error will return an appropriate code. */
extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs));
+/* Return the arch_size field of an elf bfd, or -1 if not elf. */
+extern int bfd_get_arch_size PARAMS ((bfd *));
+
+/* Return true if address "naturally" sign extends, or -1 if not elf. */
+extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
+
+extern boolean bfd_m68k_elf32_create_embedded_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
+ char **));
+
/* SunOS shared library support routines for the linker. */
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
@@ -718,6 +737,10 @@ extern boolean bfd_coff_get_auxent
extern boolean bfd_coff_set_symbol_class
PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
+extern boolean bfd_m68k_coff_create_embedded_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
+ char **));
+
/* ARM Interworking support. Called from linker. */
extern boolean bfd_arm_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
@@ -748,8 +771,15 @@ extern boolean bfd_elf32_arm_process_before_allocation
extern boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
+/* TI COFF load page support. */
+extern void bfd_ticoff_set_section_load_page
+ PARAMS ((struct sec *, int));
+
+extern int bfd_ticoff_get_section_load_page
+ PARAMS ((struct sec *));
+
/* And more from the source. */
-void
+void
bfd_init PARAMS ((void));
bfd *
@@ -764,32 +794,32 @@ bfd_openstreamr PARAMS ((const char *, const char *, PTR));
bfd *
bfd_openw PARAMS ((CONST char *filename, CONST char *target));
-boolean
+boolean
bfd_close PARAMS ((bfd *abfd));
-boolean
+boolean
bfd_close_all_done PARAMS ((bfd *));
bfd *
bfd_create PARAMS ((CONST char *filename, bfd *templ));
-boolean
+boolean
bfd_make_writable PARAMS ((bfd *abfd));
-boolean
+boolean
bfd_make_readable PARAMS ((bfd *abfd));
- /* Byte swapping macros for user section data. */
+/* Byte swapping macros for user section data. */
#define bfd_put_8(abfd, val, ptr) \
- ((void) (*((unsigned char *)(ptr)) = (unsigned char)(val)))
+ ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
#define bfd_put_signed_8 \
bfd_put_8
#define bfd_get_8(abfd, ptr) \
- (*(unsigned char *)(ptr))
+ (*(unsigned char *) (ptr))
#define bfd_get_signed_8(abfd, ptr) \
- ((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
+ ((*(unsigned char *) (ptr) ^ 0x80) - 0x80)
#define bfd_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
@@ -833,7 +863,7 @@ bfd_make_readable PARAMS ((bfd *abfd));
: (abort (), (void) 0))
- /* Byte swapping macros for file header data. */
+/* Byte swapping macros for file header data. */
#define bfd_h_put_8(abfd, val, ptr) \
bfd_put_8 (abfd, val, ptr)
@@ -871,355 +901,381 @@ bfd_make_readable PARAMS ((bfd *abfd));
#define bfd_h_get_signed_64(abfd, ptr) \
BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
- /* This structure is used for a comdat section, as in PE. A comdat
- section is associated with a particular symbol. When the linker
- sees a comdat section, it keeps only one of the sections with a
- given name and associated with a given symbol. */
+/* This structure is used for a comdat section, as in PE. A comdat
+ section is associated with a particular symbol. When the linker
+ sees a comdat section, it keeps only one of the sections with a
+ given name and associated with a given symbol. */
struct bfd_comdat_info
{
- /* The name of the symbol associated with a comdat section. */
+ /* The name of the symbol associated with a comdat section. */
const char *name;
- /* The local symbol table index of the symbol associated with a
+ /* The local symbol table index of the symbol associated with a
comdat section. This is only meaningful to the object file format
specific code; it is not an index into the list returned by
bfd_canonicalize_symtab. */
long symbol;
-
- /* If this section is being discarded, the linker uses this field
- to point to the input section which is being kept. */
- struct sec *sec;
};
typedef struct sec
{
- /* The name of the section; the name isn't a copy, the pointer is
- the same as that passed to bfd_make_section. */
+ /* The name of the section; the name isn't a copy, the pointer is
+ the same as that passed to bfd_make_section. */
- CONST char *name;
+ const char *name;
- /* Which section is it; 0..nth. */
+ /* A unique sequence number. */
- int index;
+ int id;
- /* The next section in the list belonging to the BFD, or NULL. */
+ /* Which section is it; 0..nth. */
- struct sec *next;
+ int index;
- /* The field flags contains attributes of the section. Some
- flags are read in from the object file, and some are
- synthesized from other information. */
+ /* The next section in the list belonging to the BFD, or NULL. */
- flagword flags;
+ struct sec *next;
+
+ /* The field flags contains attributes of the section. Some
+ flags are read in from the object file, and some are
+ synthesized from other information. */
+
+ flagword flags;
#define SEC_NO_FLAGS 0x000
- /* Tells the OS to allocate space for this section when loading.
- This is clear for a section containing debug information
- only. */
+ /* Tells the OS to allocate space for this section when loading.
+ This is clear for a section containing debug information only. */
#define SEC_ALLOC 0x001
- /* Tells the OS to load the section from the file when loading.
- This is clear for a .bss section. */
+ /* Tells the OS to load the section from the file when loading.
+ This is clear for a .bss section. */
#define SEC_LOAD 0x002
- /* The section contains data still to be relocated, so there is
- some relocation information too. */
+ /* The section contains data still to be relocated, so there is
+ some relocation information too. */
#define SEC_RELOC 0x004
-#if 0 /* Obsolete ? */
+#if 0 /* Obsolete ? */
#define SEC_BALIGN 0x008
#endif
- /* A signal to the OS that the section contains read only
- data. */
+ /* A signal to the OS that the section contains read only data. */
#define SEC_READONLY 0x010
- /* The section contains code only. */
+ /* The section contains code only. */
#define SEC_CODE 0x020
- /* The section contains data only. */
+ /* The section contains data only. */
#define SEC_DATA 0x040
- /* The section will reside in ROM. */
+ /* The section will reside in ROM. */
#define SEC_ROM 0x080
- /* The section contains constructor information. This section
- type is used by the linker to create lists of constructors and
- destructors used by <<g++>>. When a back end sees a symbol
- which should be used in a constructor list, it creates a new
- section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
- the symbol to it, and builds a relocation. To build the lists
- of constructors, all the linker has to do is catenate all the
- sections called <<__CTOR_LIST__>> and relocate the data
- contained within - exactly the operations it would peform on
- standard data. */
+ /* The section contains constructor information. This section
+ type is used by the linker to create lists of constructors and
+ destructors used by <<g++>>. When a back end sees a symbol
+ which should be used in a constructor list, it creates a new
+ section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
+ the symbol to it, and builds a relocation. To build the lists
+ of constructors, all the linker has to do is catenate all the
+ sections called <<__CTOR_LIST__>> and relocate the data
+ contained within - exactly the operations it would peform on
+ standard data. */
#define SEC_CONSTRUCTOR 0x100
- /* The section is a constructor, and should be placed at the
- end of the text, data, or bss section(?). */
+ /* The section is a constructor, and should be placed at the
+ end of the text, data, or bss section(?). */
#define SEC_CONSTRUCTOR_TEXT 0x1100
#define SEC_CONSTRUCTOR_DATA 0x2100
#define SEC_CONSTRUCTOR_BSS 0x3100
- /* The section has contents - a data section could be
- <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
- <<SEC_HAS_CONTENTS>> */
+ /* 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
- /* An instruction to the linker to not output the section
- even if it has information which would normally be written. */
+ /* An instruction to the linker to not output the section
+ even if it has information which would normally be written. */
#define SEC_NEVER_LOAD 0x400
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
+ /* The section is a COFF shared library section. This flag is
+ only for the linker. If this type of section appears in
+ the input file, the linker must copy it to the output file
+ without changing the vma or size. FIXME: Although this
+ was originally intended to be general, it really is COFF
+ specific (and the flag was renamed to indicate this). It
+ might be cleaner to have some more general mechanism to
+ allow the back end to control what the linker does with
+ sections. */
#define SEC_COFF_SHARED_LIBRARY 0x800
- /* The section contains common symbols (symbols may be defined
- multiple times, the value of a symbol is the amount of
- space it requires, and the largest symbol value is the one
- used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
+ /* The section has GOT references. This flag is only for the
+ linker, and is currently only used by the elf32-hppa back end.
+ It will be set if global offset table references were detected
+ in this section, which indicate to the linker that the section
+ contains PIC code, and must be handled specially when doing a
+ static link. */
+#define SEC_HAS_GOT_REF 0x4000
+
+ /* The section contains common symbols (symbols may be defined
+ multiple times, the value of a symbol is the amount of
+ space it requires, and the largest symbol value is the one
+ used). Most targets have exactly one of these (which we
+ translate to bfd_com_section_ptr), but ECOFF has two. */
#define SEC_IS_COMMON 0x8000
- /* The section contains only debugging information. For
- example, this is set for ELF .debug and .stab sections.
- strip tests this flag to see if a section can be
- discarded. */
+ /* The section contains only debugging information. For
+ example, this is set for ELF .debug and .stab sections.
+ strip tests this flag to see if a section can be
+ discarded. */
#define SEC_DEBUGGING 0x10000
- /* The contents of this section are held in memory pointed to
- by the contents field. This is checked by
- bfd_get_section_contents, and the data is retrieved from
- memory if appropriate. */
+ /* The contents of this section are held in memory pointed to
+ by the contents field. This is checked by bfd_get_section_contents,
+ and the data is retrieved from memory if appropriate. */
#define SEC_IN_MEMORY 0x20000
- /* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
+ /* The contents of this section are to be excluded by the
+ linker for executable and shared objects unless those
+ objects are to be further relocated. */
#define SEC_EXCLUDE 0x40000
- /* The contents of this section are to be sorted by the
- based on the address specified in the associated symbol
- table. */
+ /* The contents of this section are to be sorted by the
+ based on the address specified in the associated symbol
+ table. */
#define SEC_SORT_ENTRIES 0x80000
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
+ /* When linking, duplicate sections of the same name should be
+ discarded, rather than being combined into a single section as
+ is usually done. This is similar to how common symbols are
+ handled. See SEC_LINK_DUPLICATES below. */
#define SEC_LINK_ONCE 0x100000
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
+ /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
+ should handle duplicate sections. */
#define SEC_LINK_DUPLICATES 0x600000
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
+ /* This value for SEC_LINK_DUPLICATES means that duplicate
+ sections with the same name should simply be discarded. */
#define SEC_LINK_DUPLICATES_DISCARD 0x0
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if there are any duplicate sections, although
+ it should still only link one copy. */
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if any duplicate sections are a different size. */
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
+ /* This value for SEC_LINK_DUPLICATES means that the linker
+ should warn if any duplicate sections contain different
+ contents. */
#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
+ /* This section was created by the linker as part of dynamic
+ relocation or other arcane processing. It is skipped when
+ going through the first-pass output, trusting that someone
+ else up the line will take care of it later. */
#define SEC_LINKER_CREATED 0x800000
- /* This section should not be subject to garbage collection. */
+ /* This section should not be subject to garbage collection. */
#define SEC_KEEP 0x1000000
- /* This section contains "short" data, and should be placed
- "near" the GP. */
+ /* This section contains "short" data, and should be placed
+ "near" the GP. */
#define SEC_SMALL_DATA 0x2000000
- /* This section contains data which may be shared with other
- executables or shared objects. */
+ /* This section contains data which may be shared with other
+ executables or shared objects. */
#define SEC_SHARED 0x4000000
- /* End of section flags. */
+ /* When a section with this flag is being linked, then if the size of
+ the input section is less than a page, it should not cross a page
+ boundary. If the size of the input section is one page or more, it
+ should be aligned on a page boundary. */
+#define SEC_BLOCK 0x8000000
+
+ /* Conditionally link this section; do not link if there are no
+ references found to any symbol in the section. */
+#define SEC_CLINK 0x10000000
+
+ /* End of section flags. */
- /* Some internal packed boolean fields. */
+ /* Some internal packed boolean fields. */
- /* See the vma field. */
- unsigned int user_set_vma : 1;
+ /* See the vma field. */
+ unsigned int user_set_vma : 1;
- /* Whether relocations have been processed. */
- unsigned int reloc_done : 1;
+ /* Whether relocations have been processed. */
+ unsigned int reloc_done : 1;
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
+ /* A mark flag used by some of the linker backends. */
+ unsigned int linker_mark : 1;
- /* A mark flag used by some linker backends for garbage collection. */
- unsigned int gc_mark : 1;
+ /* Another mark flag used by some of the linker backends. Set for
+ output sections that have a input section. */
+ unsigned int linker_has_input : 1;
- /* End of internal packed boolean fields. */
+ /* A mark flag used by some linker backends for garbage collection. */
+ unsigned int gc_mark : 1;
- /* The virtual memory address of the section - where it will be
- at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in <<a.out>>, where
- the default address for <<.data>> is dependent on the specific
- target and various flags). */
+ /* Used by the ELF code to mark sections which have been allocated to segments. */
+ unsigned int segment_mark : 1;
- bfd_vma vma;
+ /* End of internal packed boolean fields. */
- /* The load address of the section - where it would be in a
- rom image; really only used for writing section header
- information. */
+ /* The virtual memory address of the section - where it will be
+ at run time. The symbols are relocated against this. The
+ user_set_vma flag is maintained by bfd; if it's not set, the
+ backend can assign addresses (for example, in <<a.out>>, where
+ the default address for <<.data>> is dependent on the specific
+ target and various flags). */
- bfd_vma lma;
+ bfd_vma vma;
- /* The size of the section in octets, as it will be output.
- Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). This will be filled in after relocation. */
+ /* The load address of the section - where it would be in a
+ rom image; really only used for writing section header
+ information. */
- bfd_size_type _cooked_size;
+ bfd_vma lma;
- /* The original size on disk of the section, in octets. Normally this
- value is the same as the size, but if some relaxing has
- been done, then this value will be bigger. */
+ /* The size of the section in octets, as it will be output.
+ Contains a value even if the section has no contents (e.g., the
+ size of <<.bss>>). This will be filled in after relocation. */
- bfd_size_type _raw_size;
+ bfd_size_type _cooked_size;
- /* If this section is going to be output, then this value is the
- offset in *bytes* into the output section of the first byte in the
- input section (byte ==> smallest addressable unit on the
- target). In most cases, if this was going to start at the
- 100th octet (8-bit quantity) in the output section, this value
- would be 100. However, if the target byte size is 16 bits
- (bfd_octets_per_byte is "2"), this value would be 50. */
+ /* The original size on disk of the section, in octets. Normally this
+ value is the same as the size, but if some relaxing has
+ been done, then this value will be bigger. */
- bfd_vma output_offset;
+ bfd_size_type _raw_size;
- /* The output section through which to map on output. */
+ /* If this section is going to be output, then this value is the
+ offset in *bytes* into the output section of the first byte in the
+ input section (byte ==> smallest addressable unit on the
+ target). In most cases, if this was going to start at the
+ 100th octet (8-bit quantity) in the output section, this value
+ would be 100. However, if the target byte size is 16 bits
+ (bfd_octets_per_byte is "2"), this value would be 50. */
- struct sec *output_section;
+ bfd_vma output_offset;
- /* The alignment requirement of the section, as an exponent of 2 -
- e.g., 3 aligns to 2^3 (or 8). */
+ /* The output section through which to map on output. */
- unsigned int alignment_power;
+ struct sec *output_section;
- /* If an input section, a pointer to a vector of relocation
- records for the data in this section. */
+ /* The alignment requirement of the section, as an exponent of 2 -
+ e.g., 3 aligns to 2^3 (or 8). */
- struct reloc_cache_entry *relocation;
+ unsigned int alignment_power;
- /* If an output section, a pointer to a vector of pointers to
- relocation records for the data in this section. */
+ /* If an input section, a pointer to a vector of relocation
+ records for the data in this section. */
- struct reloc_cache_entry **orelocation;
+ struct reloc_cache_entry *relocation;
- /* The number of relocation records in one of the above */
+ /* If an output section, a pointer to a vector of pointers to
+ relocation records for the data in this section. */
- unsigned reloc_count;
+ struct reloc_cache_entry **orelocation;
- /* Information below is back end specific - and not always used
- or updated. */
+ /* The number of relocation records in one of the above */
- /* File position of section data */
+ unsigned reloc_count;
- file_ptr filepos;
+ /* Information below is back end specific - and not always used
+ or updated. */
- /* File position of relocation info */
+ /* File position of section data. */
- file_ptr rel_filepos;
+ file_ptr filepos;
- /* File position of line data */
+ /* File position of relocation info. */
- file_ptr line_filepos;
+ file_ptr rel_filepos;
- /* Pointer to data for applications */
+ /* File position of line data. */
- PTR userdata;
+ file_ptr line_filepos;
- /* If the SEC_IN_MEMORY flag is set, this points to the actual
- contents. */
- unsigned char *contents;
+ /* Pointer to data for applications. */
- /* Attached line number information */
+ PTR userdata;
- alent *lineno;
+ /* If the SEC_IN_MEMORY flag is set, this points to the actual
+ contents. */
+ unsigned char *contents;
- /* Number of line number records */
+ /* Attached line number information. */
- unsigned int lineno_count;
+ alent *lineno;
- /* Optional information about a COMDAT entry; NULL if not COMDAT */
+ /* Number of line number records. */
- struct bfd_comdat_info *comdat;
+ unsigned int lineno_count;
- /* When a section is being output, this value changes as more
- linenumbers are written out */
+ /* Optional information about a COMDAT entry; NULL if not COMDAT. */
- file_ptr moving_line_filepos;
+ struct bfd_comdat_info *comdat;
- /* What the section number is in the target world */
+ /* Points to the kept section if this section is a link-once section,
+ and is discarded. */
+ struct sec *kept_section;
- int target_index;
+ /* When a section is being output, this value changes as more
+ linenumbers are written out. */
- PTR used_by_bfd;
+ file_ptr moving_line_filepos;
- /* If this is a constructor section then here is a list of the
- relocations created to relocate items within it. */
+ /* What the section number is in the target world. */
- struct relent_chain *constructor_chain;
+ int target_index;
- /* The BFD which owns the section. */
+ PTR used_by_bfd;
- bfd *owner;
+ /* If this is a constructor section then here is a list of the
+ relocations created to relocate items within it. */
- /* A symbol which points at this section only */
- struct symbol_cache_entry *symbol;
- struct symbol_cache_entry **symbol_ptr_ptr;
+ struct relent_chain *constructor_chain;
- struct bfd_link_order *link_order_head;
- struct bfd_link_order *link_order_tail;
+ /* The BFD which owns the section. */
+
+ bfd *owner;
+
+ /* A symbol which points at this section only */
+ struct symbol_cache_entry *symbol;
+ struct symbol_cache_entry **symbol_ptr_ptr;
+
+ struct bfd_link_order *link_order_head;
+ struct bfd_link_order *link_order_tail;
} asection ;
- /* These sections are global, and are managed by BFD. The application
- and target back end are not permitted to change the values in
- these sections. New code should use the section_ptr macros rather
- than referring directly to the const sections. The const sections
- may eventually vanish. */
+/* These sections are global, and are managed by BFD. The application
+ and target back end are not permitted to change the values in
+ these sections. New code should use the section_ptr macros rather
+ than referring directly to the const sections. The const sections
+ may eventually vanish. */
#define BFD_ABS_SECTION_NAME "*ABS*"
#define BFD_UND_SECTION_NAME "*UND*"
#define BFD_COM_SECTION_NAME "*COM*"
#define BFD_IND_SECTION_NAME "*IND*"
- /* the absolute section */
+/* the absolute section */
extern const asection bfd_abs_section;
#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
- /* Pointer to the undefined section */
+/* Pointer to the undefined section */
extern const asection bfd_und_section;
#define bfd_und_section_ptr ((asection *) &bfd_und_section)
#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
- /* Pointer to the common section */
+/* Pointer to the common section */
extern const asection bfd_com_section;
#define bfd_com_section_ptr ((asection *) &bfd_com_section)
- /* Pointer to the indirect section */
+/* Pointer to the indirect section */
extern const asection bfd_ind_section;
#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
@@ -1235,58 +1291,60 @@ extern const struct symbol_cache_entry * const bfd_ind_symbol;
((section)->reloc_done ? (section)->_cooked_size \
: (abort (), (bfd_size_type) 1))
asection *
-bfd_get_section_by_name PARAMS ((bfd *abfd, CONST char *name));
+bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name));
+
+char *
+bfd_get_unique_section_name PARAMS ((bfd *abfd,
+ const char *templat,
+ int *count));
asection *
-bfd_make_section_old_way PARAMS ((bfd *abfd, CONST char *name));
+bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name));
asection *
-bfd_make_section_anyway PARAMS ((bfd *abfd, CONST char *name));
+bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name));
asection *
-bfd_make_section PARAMS ((bfd *, CONST char *name));
+bfd_make_section PARAMS ((bfd *, const char *name));
-boolean
+boolean
bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags));
-void
+void
bfd_map_over_sections PARAMS ((bfd *abfd,
- void (*func)(bfd *abfd,
+ void (*func) (bfd *abfd,
asection *sect,
PTR obj),
PTR obj));
-boolean
+boolean
bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val));
-boolean
-bfd_set_section_contents
- PARAMS ((bfd *abfd,
+boolean
+bfd_set_section_contents PARAMS ((bfd *abfd,
asection *section,
PTR data,
file_ptr offset,
bfd_size_type count));
-boolean
-bfd_get_section_contents
- PARAMS ((bfd *abfd, asection *section, PTR location,
+boolean
+bfd_get_section_contents PARAMS ((bfd *abfd, asection *section, PTR location,
file_ptr offset, bfd_size_type count));
-boolean
+boolean
bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, asection *osec));
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \
(ibfd, isection, obfd, osection))
-void
-_bfd_strip_section_from_output
- PARAMS ((struct bfd_link_info *info, asection *section));
+void
+_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
-enum bfd_architecture
+enum bfd_architecture
{
- bfd_arch_unknown, /* File arch not known */
- bfd_arch_obscure, /* Arch known, not one of these */
- bfd_arch_m68k, /* Motorola 68xxx */
+ bfd_arch_unknown, /* File arch not known */
+ bfd_arch_obscure, /* Arch known, not one of these */
+ bfd_arch_m68k, /* Motorola 68xxx */
#define bfd_mach_m68000 1
#define bfd_mach_m68008 2
#define bfd_mach_m68010 3
@@ -1295,14 +1353,18 @@ enum bfd_architecture
#define bfd_mach_m68040 6
#define bfd_mach_m68060 7
#define bfd_mach_cpu32 8
- bfd_arch_vax, /* DEC Vax */
- bfd_arch_i960, /* Intel 960 */
- /* The order of the following is important.
- lower number indicates a machine type that
+#define bfd_mach_mcf5200 9
+#define bfd_mach_mcf5206e 10
+#define bfd_mach_mcf5307 11
+#define bfd_mach_mcf5407 12
+ bfd_arch_vax, /* DEC Vax */
+ bfd_arch_i960, /* Intel 960 */
+ /* The order of the following is important.
+ lower number indicates a machine type that
only accepts a subset of the instructions
available to machines with higher numbers.
The exception is the "ca", which is
- incompatible with all other machines except
+ incompatible with all other machines except
"core". */
#define bfd_mach_i960_core 1
@@ -1314,21 +1376,24 @@ enum bfd_architecture
#define bfd_mach_i960_jx 7
#define bfd_mach_i960_hx 8
- bfd_arch_a29k, /* AMD 29000 */
- bfd_arch_sparc, /* SPARC */
+ bfd_arch_a29k, /* AMD 29000 */
+ bfd_arch_sparc, /* SPARC */
#define bfd_mach_sparc 1
- /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
+/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
#define bfd_mach_sparc_sparclet 2
#define bfd_mach_sparc_sparclite 3
#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
#define bfd_mach_sparc_sparclite_le 6
#define bfd_mach_sparc_v9 7
-#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */
- /* Nonzero if MACH has the v9 instruction set. */
+#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns */
+#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns */
+/* Nonzero if MACH has the v9 instruction set. */
#define bfd_mach_sparc_v9_p(mach) \
- ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
- bfd_arch_mips, /* MIPS Rxxxx */
+ ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
+ && (mach) != bfd_mach_sparc_sparclite_le)
+ bfd_arch_mips, /* MIPS Rxxxx */
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
#define bfd_mach_mips4000 4000
@@ -1343,37 +1408,68 @@ enum bfd_architecture
#define bfd_mach_mips6000 6000
#define bfd_mach_mips8000 8000
#define bfd_mach_mips10000 10000
+#define bfd_mach_mips12000 12000
#define bfd_mach_mips16 16
- bfd_arch_i386, /* Intel 386 */
+#define bfd_mach_mips32 32
+#define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */
+#define bfd_mach_mips5 5
+#define bfd_mach_mips64 64
+#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
+ bfd_arch_i386, /* Intel 386 */
#define bfd_mach_i386_i386 0
#define bfd_mach_i386_i8086 1
#define bfd_mach_i386_i386_intel_syntax 2
- bfd_arch_we32k, /* AT&T WE32xxx */
- bfd_arch_tahoe, /* CCI/Harris Tahoe */
- bfd_arch_i860, /* Intel 860 */
- bfd_arch_i370, /* IBM 360/370 Mainframes */
- bfd_arch_romp, /* IBM ROMP PC/RT */
- bfd_arch_alliant, /* Alliant */
- bfd_arch_convex, /* Convex */
- bfd_arch_m88k, /* Motorola 88xxx */
- bfd_arch_pyramid, /* Pyramid Technology */
- bfd_arch_h8300, /* Hitachi H8/300 */
+#define bfd_mach_x86_64 3
+#define bfd_mach_x86_64_intel_syntax 4
+ bfd_arch_we32k, /* AT&T WE32xxx */
+ bfd_arch_tahoe, /* CCI/Harris Tahoe */
+ bfd_arch_i860, /* Intel 860 */
+ bfd_arch_i370, /* IBM 360/370 Mainframes */
+ bfd_arch_romp, /* IBM ROMP PC/RT */
+ bfd_arch_alliant, /* Alliant */
+ bfd_arch_convex, /* Convex */
+ bfd_arch_m88k, /* Motorola 88xxx */
+ bfd_arch_pyramid, /* Pyramid Technology */
+ bfd_arch_h8300, /* Hitachi H8/300 */
#define bfd_mach_h8300 1
#define bfd_mach_h8300h 2
#define bfd_mach_h8300s 3
- bfd_arch_powerpc, /* PowerPC */
- bfd_arch_rs6000, /* IBM RS/6000 */
- bfd_arch_hppa, /* HP PA RISC */
- bfd_arch_d10v, /* Mitsubishi D10V */
+ bfd_arch_powerpc, /* PowerPC */
+#define bfd_mach_ppc 0
+#define bfd_mach_ppc_403 403
+#define bfd_mach_ppc_403gc 4030
+#define bfd_mach_ppc_505 505
+#define bfd_mach_ppc_601 601
+#define bfd_mach_ppc_602 602
+#define bfd_mach_ppc_603 603
+#define bfd_mach_ppc_ec603e 6031
+#define bfd_mach_ppc_604 604
+#define bfd_mach_ppc_620 620
+#define bfd_mach_ppc_630 630
+#define bfd_mach_ppc_750 750
+#define bfd_mach_ppc_860 860
+#define bfd_mach_ppc_a35 35
+#define bfd_mach_ppc_rs64ii 642
+#define bfd_mach_ppc_rs64iii 643
+#define bfd_mach_ppc_7400 7400
+ bfd_arch_rs6000, /* IBM RS/6000 */
+#define bfd_mach_rs6k 0
+#define bfd_mach_rs6k_rs1 6001
+#define bfd_mach_rs6k_rsc 6003
+#define bfd_mach_rs6k_rs2 6002
+ bfd_arch_hppa, /* HP PA RISC */
+ bfd_arch_d10v, /* Mitsubishi D10V */
#define bfd_mach_d10v 0
#define bfd_mach_d10v_ts2 2
#define bfd_mach_d10v_ts3 3
- bfd_arch_d30v, /* Mitsubishi D30V */
- bfd_arch_z8k, /* Zilog Z8000 */
+ bfd_arch_d30v, /* Mitsubishi D30V */
+ bfd_arch_m68hc11, /* Motorola 68HC11 */
+ bfd_arch_m68hc12, /* Motorola 68HC12 */
+ bfd_arch_z8k, /* Zilog Z8000 */
#define bfd_mach_z8001 1
#define bfd_mach_z8002 2
- bfd_arch_h8500, /* Hitachi H8/500 */
- bfd_arch_sh, /* Hitachi SH */
+ bfd_arch_h8500, /* Hitachi H8/500 */
+ bfd_arch_sh, /* Hitachi SH */
#define bfd_mach_sh 0
#define bfd_mach_sh2 0x20
#define bfd_mach_sh_dsp 0x2d
@@ -1381,11 +1477,11 @@ enum bfd_architecture
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
- bfd_arch_alpha, /* Dec Alpha */
+ bfd_arch_alpha, /* Dec Alpha */
#define bfd_mach_alpha_ev4 0x10
#define bfd_mach_alpha_ev5 0x20
#define bfd_mach_alpha_ev6 0x30
- bfd_arch_arm, /* Advanced Risc Machines ARM */
+ bfd_arch_arm, /* Advanced Risc Machines ARM */
#define bfd_mach_arm_2 1
#define bfd_mach_arm_2a 2
#define bfd_mach_arm_3 3
@@ -1394,36 +1490,47 @@ enum bfd_architecture
#define bfd_mach_arm_4T 6
#define bfd_mach_arm_5 7
#define bfd_mach_arm_5T 8
- bfd_arch_ns32k, /* National Semiconductors ns32000 */
- bfd_arch_w65, /* WDC 65816 */
- bfd_arch_tic30, /* Texas Instruments TMS320C30 */
- bfd_arch_tic80, /* TI TMS320c80 (MVP) */
- bfd_arch_v850, /* NEC V850 */
+#define bfd_mach_arm_5TE 9
+#define bfd_mach_arm_XScale 10
+ bfd_arch_ns32k, /* National Semiconductors ns32000 */
+ bfd_arch_w65, /* WDC 65816 */
+ bfd_arch_tic30, /* Texas Instruments TMS320C30 */
+ bfd_arch_tic54x, /* Texas Instruments TMS320C54X */
+ bfd_arch_tic80, /* TI TMS320c80 (MVP) */
+ bfd_arch_v850, /* NEC V850 */
#define bfd_mach_v850 0
#define bfd_mach_v850e 'E'
#define bfd_mach_v850ea 'A'
- bfd_arch_arc, /* Argonaut RISC Core */
-#define bfd_mach_arc_base 0
- bfd_arch_m32r, /* Mitsubishi M32R/D */
-#define bfd_mach_m32r 0 /* backwards compatibility */
+ bfd_arch_arc, /* ARC Cores */
+#define bfd_mach_arc_5 0
+#define bfd_mach_arc_6 1
+#define bfd_mach_arc_7 2
+#define bfd_mach_arc_8 3
+ bfd_arch_m32r, /* Mitsubishi M32R/D */
+#define bfd_mach_m32r 0 /* backwards compatibility */
#define bfd_mach_m32rx 'x'
- bfd_arch_mn10200, /* Matsushita MN10200 */
- bfd_arch_mn10300, /* Matsushita MN10300 */
+ bfd_arch_mn10200, /* Matsushita MN10200 */
+ bfd_arch_mn10300, /* Matsushita MN10300 */
#define bfd_mach_mn10300 300
#define bfd_mach_am33 330
bfd_arch_fr30,
#define bfd_mach_fr30 0x46523330
bfd_arch_mcore,
+ bfd_arch_ia64, /* HP/Intel ia64 */
+#define bfd_mach_ia64_elf64 0
+#define bfd_mach_ia64_elf32 1
bfd_arch_pj,
- bfd_arch_avr, /* Atmel AVR microcontrollers */
+ bfd_arch_avr, /* Atmel AVR microcontrollers */
#define bfd_mach_avr1 1
#define bfd_mach_avr2 2
#define bfd_mach_avr3 3
#define bfd_mach_avr4 4
+#define bfd_mach_avr5 5
+ bfd_arch_cris, /* Axis CRIS */
bfd_arch_last
};
-typedef struct bfd_arch_info
+typedef struct bfd_arch_info
{
int bits_per_word;
int bits_per_address;
@@ -1433,8 +1540,8 @@ typedef struct bfd_arch_info
const char *arch_name;
const char *printable_name;
unsigned int section_align_power;
- /* true if this is the default machine for the architecture */
- boolean the_default;
+ /* True if this is the default machine for the architecture. */
+ boolean the_default;
const struct bfd_arch_info * (*compatible)
PARAMS ((const struct bfd_arch_info *a,
const struct bfd_arch_info *b));
@@ -1457,65 +1564,63 @@ bfd_arch_get_compatible PARAMS ((
const bfd *abfd,
const bfd *bbfd));
-void
+void
bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg));
-enum bfd_architecture
+enum bfd_architecture
bfd_get_arch PARAMS ((bfd *abfd));
-unsigned long
+unsigned long
bfd_get_mach PARAMS ((bfd *abfd));
-unsigned int
+unsigned int
bfd_arch_bits_per_byte PARAMS ((bfd *abfd));
-unsigned int
+unsigned int
bfd_arch_bits_per_address PARAMS ((bfd *abfd));
-const bfd_arch_info_type *
+const bfd_arch_info_type *
bfd_get_arch_info PARAMS ((bfd *abfd));
const bfd_arch_info_type *
-bfd_lookup_arch
- PARAMS ((enum bfd_architecture
+bfd_lookup_arch PARAMS ((enum bfd_architecture
arch,
unsigned long machine));
const char *
-bfd_printable_arch_mach
- PARAMS ((enum bfd_architecture arch, unsigned long machine));
+bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine));
-unsigned int
+unsigned int
bfd_octets_per_byte PARAMS ((bfd *abfd));
-unsigned int
+unsigned int
bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
unsigned long machine));
typedef enum bfd_reloc_status
{
- /* No errors detected */
+ /* No errors detected */
bfd_reloc_ok,
- /* The relocation was performed, but there was an overflow. */
+ /* The relocation was performed, but there was an overflow. */
bfd_reloc_overflow,
- /* The address to relocate was not within the section supplied. */
+ /* The address to relocate was not within the section supplied. */
bfd_reloc_outofrange,
- /* Used by special functions */
+ /* Used by special functions */
bfd_reloc_continue,
- /* Unsupported relocation size requested. */
+ /* Unsupported relocation size requested. */
bfd_reloc_notsupported,
- /* Unused */
+ /* Unused */
bfd_reloc_other,
- /* The symbol to relocate against was undefined. */
+ /* The symbol to relocate against was undefined. */
bfd_reloc_undefined,
- /* The relocation was performed, but may not be ok - presently
+ /* The relocation was performed, but may not be ok - presently
generated only when linking i960 coff files with i960 b.out
symbols. If this type is returned, the error_message argument
to bfd_perform_relocation will be set. */
@@ -1526,40 +1631,40 @@ typedef enum bfd_reloc_status
typedef struct reloc_cache_entry
{
- /* A pointer into the canonical table of pointers */
+ /* A pointer into the canonical table of pointers */
struct symbol_cache_entry **sym_ptr_ptr;
- /* offset in section */
+ /* offset in section */
bfd_size_type address;
- /* addend for relocation value */
+ /* addend for relocation value */
bfd_vma addend;
- /* Pointer to how to perform the required relocation */
+ /* Pointer to how to perform the required relocation */
reloc_howto_type *howto;
} arelent;
enum complain_overflow
{
- /* Do not complain on overflow. */
+ /* Do not complain on overflow. */
complain_overflow_dont,
- /* Complain if the bitfield overflows, whether it is considered
+ /* Complain if the bitfield overflows, whether it is considered
as signed or unsigned. */
complain_overflow_bitfield,
- /* Complain if the value overflows when considered as signed
+ /* Complain if the value overflows when considered as signed
number. */
complain_overflow_signed,
- /* Complain if the value overflows when considered as an
+ /* Complain if the value overflows when considered as an
unsigned number. */
complain_overflow_unsigned
};
struct reloc_howto_struct
{
- /* The type field has mainly a documentary use - the back end can
+ /* The type field has mainly a documentary use - the back end can
do what it wants with it, though normally the back end's
external idea of what a reloc number is stored
in this field. For example, a PC relative word relocation
@@ -1567,34 +1672,34 @@ struct reloc_howto_struct
what the outside world calls a R_PCRWORD reloc. */
unsigned int type;
- /* The value the final relocation is shifted right by. This drops
+ /* The value the final relocation is shifted right by. This drops
unwanted data from the relocation. */
unsigned int rightshift;
- /* The size of the item to be relocated. This is *not* a
+ /* The size of the item to be relocated. This is *not* a
power-of-two measure. To get the number of bytes operated
on by a type of relocation, use bfd_get_reloc_size. */
int size;
- /* The number of bits in the item to be relocated. This is used
+ /* The number of bits in the item to be relocated. This is used
when doing overflow checking. */
unsigned int bitsize;
- /* Notes that the relocation is relative to the location in the
+ /* Notes that the relocation is relative to the location in the
data section of the addend. The relocation function will
subtract from the relocation value the address of the location
being relocated. */
boolean pc_relative;
- /* The bit position of the reloc value in the destination.
+ /* The bit position of the reloc value in the destination.
The relocated value is left shifted by this amount. */
unsigned int bitpos;
- /* What type of overflow error should be checked for when
+ /* What type of overflow error should be checked for when
relocating. */
enum complain_overflow complain_on_overflow;
- /* If this field is non null, then the supplied function is
+ /* If this field is non null, then the supplied function is
called rather than the normal function. This allows really
strange relocation methods to be accomodated (e.g., i960 callj
instructions). */
@@ -1607,10 +1712,10 @@ struct reloc_howto_struct
bfd *output_bfd,
char **error_message));
- /* The textual name of the relocation type. */
+ /* The textual name of the relocation type. */
char *name;
- /* Some formats record a relocation addend in the section contents
+ /* Some formats record a relocation addend in the section contents
rather than with the relocation. For ELF formats this is the
distinction between USE_REL and USE_RELA (though the code checks
for USE_REL == 1/0). The value of this field is TRUE if the
@@ -1627,7 +1732,7 @@ struct reloc_howto_struct
links (e.g. GOT stuff) it doesn't matter what this is set to. */
boolean partial_inplace;
- /* The src_mask selects which parts of the read in data
+ /* The src_mask selects which parts of the read in data
are to be used in the relocation sum. E.g., if this was an 8 bit
byte of data which we read and relocated, this would be
0x000000ff. When we have relocs which have an addend, such as
@@ -1636,13 +1741,13 @@ struct reloc_howto_struct
the mask would be 0x00000000. */
bfd_vma src_mask;
- /* The dst_mask selects which parts of the instruction are replaced
+ /* The dst_mask selects which parts of the instruction are replaced
into the instruction. In most cases src_mask == dst_mask,
except in the above special case, where dst_mask would be
0x000000ff, and src_mask would be 0x00000000. */
bfd_vma dst_mask;
- /* When some formats create PC relative instructions, they leave
+ /* When some formats create PC relative instructions, they leave
the value of the pc of the place being relocated in the offset
slot of the instruction, so that a PC relative relocation can
be made just by adding in an ordinary offset (e.g., sun3 a.out).
@@ -1669,26 +1774,22 @@ struct reloc_howto_struct
} \
} \
}
-unsigned int
-bfd_get_reloc_size PARAMS ((reloc_howto_type *));
+unsigned int
+bfd_get_reloc_size PARAMS ((reloc_howto_type *));
typedef struct relent_chain {
arelent relent;
struct relent_chain *next;
} arelent_chain;
bfd_reloc_status_type
-
-bfd_check_overflow
- PARAMS ((enum complain_overflow how,
+bfd_check_overflow PARAMS ((enum complain_overflow how,
unsigned int bitsize,
unsigned int rightshift,
unsigned int addrsize,
bfd_vma relocation));
bfd_reloc_status_type
-
-bfd_perform_relocation
- PARAMS ((bfd *abfd,
+bfd_perform_relocation PARAMS ((bfd *abfd,
arelent *reloc_entry,
PTR data,
asection *input_section,
@@ -1696,9 +1797,7 @@ bfd_perform_relocation
char **error_message));
bfd_reloc_status_type
-
-bfd_install_relocation
- PARAMS ((bfd *abfd,
+bfd_install_relocation PARAMS ((bfd *abfd,
arelent *reloc_entry,
PTR data, bfd_vma data_start,
asection *input_section,
@@ -1808,7 +1907,9 @@ relocation types already defined. */
BFD_RELOC_SPARC_GLOB_DAT,
BFD_RELOC_SPARC_JMP_SLOT,
BFD_RELOC_SPARC_RELATIVE,
+ BFD_RELOC_SPARC_UA16,
BFD_RELOC_SPARC_UA32,
+ BFD_RELOC_SPARC_UA64,
/* I think these are specific to SPARC a.out (e.g., Sun 4). */
BFD_RELOC_SPARC_BASE13,
@@ -1960,6 +2061,17 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_GOT_PAGE,
BFD_RELOC_MIPS_GOT_OFST,
BFD_RELOC_MIPS_GOT_DISP,
+ BFD_RELOC_MIPS_SHIFT5,
+ BFD_RELOC_MIPS_SHIFT6,
+ BFD_RELOC_MIPS_INSERT_A,
+ BFD_RELOC_MIPS_INSERT_B,
+ BFD_RELOC_MIPS_DELETE,
+ BFD_RELOC_MIPS_HIGHEST,
+ BFD_RELOC_MIPS_HIGHER,
+ BFD_RELOC_MIPS_SCN_DISP,
+ BFD_RELOC_MIPS_REL16,
+ BFD_RELOC_MIPS_RELGOT,
+ BFD_RELOC_MIPS_JALR,
/* i386/elf relocations */
@@ -1972,6 +2084,16 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_386_GOTOFF,
BFD_RELOC_386_GOTPC,
+/* x86-64/elf relocations */
+ BFD_RELOC_X86_64_GOT32,
+ BFD_RELOC_X86_64_PLT32,
+ BFD_RELOC_X86_64_COPY,
+ BFD_RELOC_X86_64_GLOB_DAT,
+ BFD_RELOC_X86_64_JUMP_SLOT,
+ BFD_RELOC_X86_64_RELATIVE,
+ BFD_RELOC_X86_64_GOTPCREL,
+ BFD_RELOC_X86_64_32S,
+
/* ns32k relocations */
BFD_RELOC_NS32K_IMM_8,
BFD_RELOC_NS32K_IMM_16,
@@ -2038,6 +2160,16 @@ It generally does map to one of the other relocation types. */
not stored in the instruction. */
BFD_RELOC_ARM_PCREL_BRANCH,
+/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is
+not stored in the instruction. The 2nd lowest bit comes from a 1 bit
+field in the instruction. */
+ BFD_RELOC_ARM_PCREL_BLX,
+
+/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
+not stored in the instruction. The 2nd lowest bit comes from a 1 bit
+field in the instruction. */
+ BFD_RELOC_THUMB_PCREL_BLX,
+
/* These relocs are only used within the ARM assembler. They are not
(at present) written to any object files. */
BFD_RELOC_ARM_IMMEDIATE,
@@ -2086,6 +2218,13 @@ not stored in the instruction. */
BFD_RELOC_SH_CODE,
BFD_RELOC_SH_DATA,
BFD_RELOC_SH_LABEL,
+ BFD_RELOC_SH_LOOP_START,
+ BFD_RELOC_SH_LOOP_END,
+ BFD_RELOC_SH_COPY,
+ BFD_RELOC_SH_GLOB_DAT,
+ BFD_RELOC_SH_JMP_SLOT,
+ BFD_RELOC_SH_RELATIVE,
+ BFD_RELOC_SH_GOTPC,
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
be zero and is not stored in the instruction. */
@@ -2093,7 +2232,7 @@ be zero and is not stored in the instruction. */
BFD_RELOC_THUMB_PCREL_BRANCH12,
BFD_RELOC_THUMB_PCREL_BRANCH23,
-/* Argonaut RISC Core (ARC) relocs.
+/* ARC Cores relocs.
ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
not stored in the instruction. The high 20 bits are installed in bits 26
through 7 of the instruction. */
@@ -2269,6 +2408,29 @@ significant 8 bits of a 24 bit word are placed into the least
significant 8 bits of the opcode. */
BFD_RELOC_TIC30_LDP,
+/* This is a 7bit reloc for the tms320c54x, where the least
+significant 7 bits of a 16 bit word are placed into the least
+significant 7 bits of the opcode. */
+ BFD_RELOC_TIC54X_PARTLS7,
+
+/* This is a 9bit DP reloc for the tms320c54x, where the most
+significant 9 bits of a 16 bit word are placed into the least
+significant 9 bits of the opcode. */
+ BFD_RELOC_TIC54X_PARTMS9,
+
+/* This is an extended address 23-bit reloc for the tms320c54x. */
+ BFD_RELOC_TIC54X_23,
+
+/* This is a 16-bit reloc for the tms320c54x, where the least
+significant 16 bits of a 23-bit extended address are placed into
+the opcode. */
+ BFD_RELOC_TIC54X_16_OF_23,
+
+/* This is a reloc for the tms320c54x, where the most
+significant 7 bits of a 23-bit extended address are placed into
+the opcode. */
+ BFD_RELOC_TIC54X_MS7_OF_23,
+
/* This is a 48 bit reloc for the FR30 that stores 32 bits. */
BFD_RELOC_FR30_48,
@@ -2395,19 +2557,138 @@ is stored in the reloc's addend. For Rel hosts, we are forced to put
this offset in the reloc's section offset. */
BFD_RELOC_VTABLE_INHERIT,
BFD_RELOC_VTABLE_ENTRY,
+
+/* Intel IA64 Relocations. */
+ BFD_RELOC_IA64_IMM14,
+ BFD_RELOC_IA64_IMM22,
+ BFD_RELOC_IA64_IMM64,
+ BFD_RELOC_IA64_DIR32MSB,
+ BFD_RELOC_IA64_DIR32LSB,
+ BFD_RELOC_IA64_DIR64MSB,
+ BFD_RELOC_IA64_DIR64LSB,
+ BFD_RELOC_IA64_GPREL22,
+ BFD_RELOC_IA64_GPREL64I,
+ BFD_RELOC_IA64_GPREL32MSB,
+ BFD_RELOC_IA64_GPREL32LSB,
+ BFD_RELOC_IA64_GPREL64MSB,
+ BFD_RELOC_IA64_GPREL64LSB,
+ BFD_RELOC_IA64_LTOFF22,
+ BFD_RELOC_IA64_LTOFF64I,
+ BFD_RELOC_IA64_PLTOFF22,
+ BFD_RELOC_IA64_PLTOFF64I,
+ BFD_RELOC_IA64_PLTOFF64MSB,
+ BFD_RELOC_IA64_PLTOFF64LSB,
+ BFD_RELOC_IA64_FPTR64I,
+ BFD_RELOC_IA64_FPTR32MSB,
+ BFD_RELOC_IA64_FPTR32LSB,
+ BFD_RELOC_IA64_FPTR64MSB,
+ BFD_RELOC_IA64_FPTR64LSB,
+ BFD_RELOC_IA64_PCREL21B,
+ BFD_RELOC_IA64_PCREL21BI,
+ BFD_RELOC_IA64_PCREL21M,
+ BFD_RELOC_IA64_PCREL21F,
+ BFD_RELOC_IA64_PCREL22,
+ BFD_RELOC_IA64_PCREL60B,
+ BFD_RELOC_IA64_PCREL64I,
+ BFD_RELOC_IA64_PCREL32MSB,
+ BFD_RELOC_IA64_PCREL32LSB,
+ BFD_RELOC_IA64_PCREL64MSB,
+ BFD_RELOC_IA64_PCREL64LSB,
+ BFD_RELOC_IA64_LTOFF_FPTR22,
+ BFD_RELOC_IA64_LTOFF_FPTR64I,
+ BFD_RELOC_IA64_LTOFF_FPTR64MSB,
+ BFD_RELOC_IA64_LTOFF_FPTR64LSB,
+ BFD_RELOC_IA64_SEGREL32MSB,
+ BFD_RELOC_IA64_SEGREL32LSB,
+ BFD_RELOC_IA64_SEGREL64MSB,
+ BFD_RELOC_IA64_SEGREL64LSB,
+ BFD_RELOC_IA64_SECREL32MSB,
+ BFD_RELOC_IA64_SECREL32LSB,
+ BFD_RELOC_IA64_SECREL64MSB,
+ BFD_RELOC_IA64_SECREL64LSB,
+ BFD_RELOC_IA64_REL32MSB,
+ BFD_RELOC_IA64_REL32LSB,
+ BFD_RELOC_IA64_REL64MSB,
+ BFD_RELOC_IA64_REL64LSB,
+ BFD_RELOC_IA64_LTV32MSB,
+ BFD_RELOC_IA64_LTV32LSB,
+ BFD_RELOC_IA64_LTV64MSB,
+ BFD_RELOC_IA64_LTV64LSB,
+ BFD_RELOC_IA64_IPLTMSB,
+ BFD_RELOC_IA64_IPLTLSB,
+ BFD_RELOC_IA64_COPY,
+ BFD_RELOC_IA64_TPREL22,
+ BFD_RELOC_IA64_TPREL64MSB,
+ BFD_RELOC_IA64_TPREL64LSB,
+ BFD_RELOC_IA64_LTOFF_TP22,
+ BFD_RELOC_IA64_LTOFF22X,
+ BFD_RELOC_IA64_LDXMOV,
+
+/* Motorola 68HC11 reloc.
+This is the 8 bits high part of an absolute address. */
+ BFD_RELOC_M68HC11_HI8,
+
+/* Motorola 68HC11 reloc.
+This is the 8 bits low part of an absolute address. */
+ BFD_RELOC_M68HC11_LO8,
+
+/* Motorola 68HC11 reloc.
+This is the 3 bits of a value. */
+ BFD_RELOC_M68HC11_3B,
+
+/* These relocs are only used within the CRIS assembler. They are not
+(at present) written to any object files. */
+ BFD_RELOC_CRIS_BDISP8,
+ BFD_RELOC_CRIS_UNSIGNED_5,
+ BFD_RELOC_CRIS_SIGNED_6,
+ BFD_RELOC_CRIS_UNSIGNED_6,
+ BFD_RELOC_CRIS_UNSIGNED_4,
+
+/* Intel i860 Relocations. */
+ BFD_RELOC_860_COPY,
+ BFD_RELOC_860_GLOB_DAT,
+ BFD_RELOC_860_JUMP_SLOT,
+ BFD_RELOC_860_RELATIVE,
+ BFD_RELOC_860_PC26,
+ BFD_RELOC_860_PLT26,
+ BFD_RELOC_860_PC16,
+ BFD_RELOC_860_LOW0,
+ BFD_RELOC_860_SPLIT0,
+ BFD_RELOC_860_LOW1,
+ BFD_RELOC_860_SPLIT1,
+ BFD_RELOC_860_LOW2,
+ BFD_RELOC_860_SPLIT2,
+ BFD_RELOC_860_LOW3,
+ BFD_RELOC_860_LOGOT0,
+ BFD_RELOC_860_SPGOT0,
+ BFD_RELOC_860_LOGOT1,
+ BFD_RELOC_860_SPGOT1,
+ BFD_RELOC_860_LOGOTOFF0,
+ BFD_RELOC_860_SPGOTOFF0,
+ BFD_RELOC_860_LOGOTOFF1,
+ BFD_RELOC_860_SPGOTOFF1,
+ BFD_RELOC_860_LOGOTOFF2,
+ BFD_RELOC_860_LOGOTOFF3,
+ BFD_RELOC_860_LOPC,
+ BFD_RELOC_860_HIGHADJ,
+ BFD_RELOC_860_HAGOT,
+ BFD_RELOC_860_HAGOTOFF,
+ BFD_RELOC_860_HAPC,
+ BFD_RELOC_860_HIGH,
+ BFD_RELOC_860_HIGOT,
+ BFD_RELOC_860_HIGOTOFF,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
-
-bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
const char *
-bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
+bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
typedef struct symbol_cache_entry
{
- /* A pointer to the BFD which owns the symbol. This information
+ /* A pointer to the BFD which owns the symbol. This information
is necessary so that a back end can work out what additional
information (invisible to the application writer) is carried
with the symbol.
@@ -2417,65 +2698,65 @@ typedef struct symbol_cache_entry
bfd_{abs,com,und}_section. This could be fixed by making
these globals be per-bfd (or per-target-flavor). FIXME. */
- struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
+ struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
- /* The text of the symbol. The name is left alone, and not copied; the
+ /* The text of the symbol. The name is left alone, and not copied; the
application may not alter it. */
CONST char *name;
- /* The value of the symbol. This really should be a union of a
+ /* The value of the symbol. This really should be a union of a
numeric value with a pointer, since some flags indicate that
a pointer to another symbol is stored here. */
symvalue value;
- /* Attributes of a symbol: */
+ /* Attributes of a symbol: */
#define BSF_NO_FLAGS 0x00
- /* The symbol has local scope; <<static>> in <<C>>. The value
+ /* The symbol has local scope; <<static>> in <<C>>. The value
is the offset into the section of the data. */
#define BSF_LOCAL 0x01
- /* The symbol has global scope; initialized data in <<C>>. The
+ /* The symbol has global scope; initialized data in <<C>>. The
value is the offset into the section of the data. */
#define BSF_GLOBAL 0x02
- /* The symbol has global scope and is exported. The value is
+ /* The symbol has global scope and is exported. The value is
the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* no real difference */
+#define BSF_EXPORT BSF_GLOBAL /* no real difference */
- /* A normal C symbol would be one of:
+ /* A normal C symbol would be one of:
<<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
<<BSF_GLOBAL>> */
- /* The symbol is a debugging record. The value has an arbitary
+ /* The symbol is a debugging record. The value has an arbitary
meaning, unless BSF_DEBUGGING_RELOC is also set. */
#define BSF_DEBUGGING 0x08
- /* The symbol denotes a function entry point. Used in ELF,
+ /* The symbol denotes a function entry point. Used in ELF,
perhaps others someday. */
#define BSF_FUNCTION 0x10
- /* Used by the linker. */
+ /* Used by the linker. */
#define BSF_KEEP 0x20
#define BSF_KEEP_G 0x40
- /* A weak global symbol, overridable without warnings by
+ /* A weak global symbol, overridable without warnings by
a regular global symbol of the same name. */
#define BSF_WEAK 0x80
- /* This symbol was created to point to a section, e.g. ELF's
+ /* This symbol was created to point to a section, e.g. ELF's
STT_SECTION symbols. */
#define BSF_SECTION_SYM 0x100
- /* The symbol used to be a common symbol, but now it is
+ /* The symbol used to be a common symbol, but now it is
allocated. */
#define BSF_OLD_COMMON 0x200
- /* The default value for common data. */
+ /* The default value for common data. */
#define BFD_FORT_COMM_DEFAULT_VALUE 0
- /* In some files the type of a symbol sometimes alters its
+ /* In some files the type of a symbol sometimes alters its
location in an output file - ie in coff a <<ISFCN>> symbol
which is also <<C_EXT>> symbol appears where it was
declared and not at the end of a section. This bit is set
@@ -2483,43 +2764,43 @@ typedef struct symbol_cache_entry
#define BSF_NOT_AT_END 0x400
- /* Signal that the symbol is the label of constructor section. */
+ /* Signal that the symbol is the label of constructor section. */
#define BSF_CONSTRUCTOR 0x800
- /* Signal that the symbol is a warning symbol. The name is a
+ /* Signal that the symbol is a warning symbol. The name is a
warning. The name of the next symbol is the one to warn about;
if a reference is made to a symbol with the same name as the next
symbol, a warning is issued by the linker. */
#define BSF_WARNING 0x1000
- /* Signal that the symbol is indirect. This symbol is an indirect
+ /* Signal that the symbol is indirect. This symbol is an indirect
pointer to the symbol with the same name as the next symbol. */
#define BSF_INDIRECT 0x2000
- /* BSF_FILE marks symbols that contain a file name. This is used
+ /* BSF_FILE marks symbols that contain a file name. This is used
for ELF STT_FILE symbols. */
#define BSF_FILE 0x4000
- /* Symbol is from dynamic linking information. */
+ /* Symbol is from dynamic linking information. */
#define BSF_DYNAMIC 0x8000
- /* The symbol denotes a data object. Used in ELF, and perhaps
+ /* The symbol denotes a data object. Used in ELF, and perhaps
others someday. */
#define BSF_OBJECT 0x10000
- /* This symbol is a debugging symbol. The value is the offset
+ /* This symbol is a debugging symbol. The value is the offset
into the section of the data. BSF_DEBUGGING should be set
as well. */
#define BSF_DEBUGGING_RELOC 0x20000
flagword flags;
- /* A pointer to the section to which this symbol is
+ /* A pointer to the section to which this symbol is
relative. This will always be non NULL, there are special
sections for undefined and absolute symbols. */
struct sec *section;
- /* Back end special data. */
+ /* Back end special data. */
union
{
PTR p;
@@ -2529,10 +2810,10 @@ typedef struct symbol_cache_entry
} asymbol;
#define bfd_get_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-boolean
+boolean
bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
-boolean
+boolean
bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
#define bfd_is_local_label_name(abfd, name) \
@@ -2540,40 +2821,40 @@ bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
#define bfd_canonicalize_symtab(abfd, location) \
BFD_SEND (abfd, _bfd_canonicalize_symtab,\
(abfd, location))
-boolean
-bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
+boolean
+bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
-void
+void
bfd_print_symbol_vandf PARAMS ((PTR file, asymbol *symbol));
#define bfd_make_empty_symbol(abfd) \
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
#define bfd_make_debug_symbol(abfd,ptr,size) \
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-int
+int
bfd_decode_symclass PARAMS ((asymbol *symbol));
-boolean
-bfd_is_undefined_symclass PARAMS ((int symclass));
+boolean
+bfd_is_undefined_symclass PARAMS ((int symclass));
-void
+void
bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret));
-boolean
+boolean
bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym));
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
(ibfd, isymbol, obfd, osymbol))
-struct _bfd
+struct _bfd
{
- /* The filename the application opened the BFD with. */
- CONST char *filename;
+ /* The filename the application opened the BFD with. */
+ CONST char *filename;
- /* A pointer to the target jump table. */
+ /* A pointer to the target jump table. */
const struct bfd_target *xvec;
- /* To avoid dragging too many header files into every file that
+ /* To avoid dragging too many header files into every file that
includes `<<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
@@ -2582,105 +2863,105 @@ struct _bfd
to a bfd_in_memory struct. */
PTR iostream;
- /* Is the file descriptor being cached? That is, can it be closed as
+ /* Is the file descriptor being cached? That is, can it be closed as
needed, and re-opened when accessed later? */
boolean cacheable;
- /* Marks whether there was a default target specified when the
+ /* Marks whether there was a default target specified when the
BFD was opened. This is used to select which matching algorithm
to use to choose the back end. */
boolean target_defaulted;
- /* The caching routines use these to maintain a
+ /* The caching routines use these to maintain a
least-recently-used list of BFDs */
struct _bfd *lru_prev, *lru_next;
- /* When a file is closed by the caching routines, BFD retains
+ /* When a file is closed by the caching routines, BFD retains
state information on the file here: */
- file_ptr where;
+ file_ptr where;
- /* and here: (``once'' means at least once) */
+ /* and here: (``once'' means at least once) */
boolean opened_once;
- /* Set if we have a locally maintained mtime value, rather than
+ /* Set if we have a locally maintained mtime value, rather than
getting it from the file each time: */
boolean mtime_set;
- /* File modified time, if mtime_set is true: */
+ /* File modified time, if mtime_set is true: */
- long mtime;
+ long mtime;
- /* Reserved for an unimplemented file locking extension.*/
+ /* Reserved for an unimplemented file locking extension.*/
int ifd;
- /* The format which belongs to the BFD. (object, core, etc.) */
+ /* The format which belongs to the BFD. (object, core, etc.) */
bfd_format format;
- /* The direction the BFD was opened with*/
+ /* The direction the BFD was opened with*/
enum bfd_direction {no_direction = 0,
read_direction = 1,
write_direction = 2,
both_direction = 3} direction;
- /* Format_specific flags*/
+ /* Format_specific flags*/
- flagword flags;
+ flagword flags;
- /* Currently my_archive is tested before adding origin to
+ /* Currently my_archive is tested before adding origin to
anything. I believe that this can become always an add of
origin, with origin set to 0 for non archive files. */
- file_ptr origin;
+ file_ptr origin;
- /* Remember when output has begun, to stop strange things
+ /* Remember when output has begun, to stop strange things
from happening. */
boolean output_has_begun;
- /* Pointer to linked list of sections*/
+ /* Pointer to linked list of sections*/
struct sec *sections;
- /* The number of sections */
+ /* The number of sections */
unsigned int section_count;
- /* Stuff only useful for object files:
+ /* Stuff only useful for object files:
The start address. */
bfd_vma start_address;
- /* Used for input and output*/
+ /* Used for input and output*/
unsigned int symcount;
- /* Symbol table for output BFD (with symcount entries) */
- struct symbol_cache_entry **outsymbols;
+ /* Symbol table for output BFD (with symcount entries) */
+ struct symbol_cache_entry **outsymbols;
- /* Pointer to structure which contains architecture information*/
+ /* Pointer to structure which contains architecture information*/
const struct bfd_arch_info *arch_info;
- /* Stuff only useful for archives:*/
- PTR arelt_data;
- struct _bfd *my_archive; /* The containing archive BFD. */
- struct _bfd *next; /* The next BFD in the archive. */
- struct _bfd *archive_head; /* The first BFD in the archive. */
- boolean has_armap;
+ /* Stuff only useful for archives:*/
+ PTR arelt_data;
+ struct _bfd *my_archive; /* The containing archive BFD. */
+ struct _bfd *next; /* The next BFD in the archive. */
+ struct _bfd *archive_head; /* The first BFD in the archive. */
+ boolean has_armap;
- /* A chain of BFD structures involved in a link. */
+ /* A chain of BFD structures involved in a link. */
struct _bfd *link_next;
- /* A field used by _bfd_generic_link_add_archive_symbols. This will
+ /* A field used by _bfd_generic_link_add_archive_symbols. This will
be used only for archive elements. */
int archive_pass;
- /* Used by the back end to hold private data. */
+ /* Used by the back end to hold private data. */
- union
+ union
{
struct aout_data_struct *aout_data;
struct artdata *aout_ar_data;
@@ -2712,11 +2993,11 @@ struct _bfd
struct netbsd_core_struct *netbsd_core_data;
PTR any;
} tdata;
-
- /* Used by the application to hold private data*/
+
+ /* Used by the application to hold private data*/
PTR usrdata;
- /* Where all the allocated stuff under this BFD goes. This is a
+ /* Where all the allocated stuff under this BFD goes. This is a
struct objalloc *, but we use PTR to avoid requiring the inclusion of
objalloc.h. */
PTR memory;
@@ -2745,79 +3026,83 @@ typedef enum bfd_error
bfd_error_invalid_error_code
} bfd_error_type;
-bfd_error_type
-bfd_get_error PARAMS ((void));
+bfd_error_type
+bfd_get_error PARAMS ((void));
-void
-bfd_set_error PARAMS ((bfd_error_type error_tag));
+void
+bfd_set_error PARAMS ((bfd_error_type error_tag));
CONST char *
-bfd_errmsg PARAMS ((bfd_error_type error_tag));
+bfd_errmsg PARAMS ((bfd_error_type error_tag));
-void
-bfd_perror PARAMS ((CONST char *message));
+void
+bfd_perror PARAMS ((CONST char *message));
typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
-bfd_error_handler_type
-bfd_set_error_handler PARAMS ((bfd_error_handler_type));
+bfd_error_handler_type
+bfd_set_error_handler PARAMS ((bfd_error_handler_type));
-void
-bfd_set_error_program_name PARAMS ((const char *));
+void
+bfd_set_error_program_name PARAMS ((const char *));
-bfd_error_handler_type
-bfd_get_error_handler PARAMS ((void));
+bfd_error_handler_type
+bfd_get_error_handler PARAMS ((void));
-long
+long
bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
-long
-bfd_canonicalize_reloc
- PARAMS ((bfd *abfd,
+long
+bfd_canonicalize_reloc PARAMS ((bfd *abfd,
asection *sec,
arelent **loc,
asymbol **syms));
-void
-bfd_set_reloc
- PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count)
+void
+bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count)
);
-boolean
+boolean
bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
-boolean
+int
+bfd_get_arch_size PARAMS ((bfd *abfd));
+
+int
+bfd_get_sign_extend_vma PARAMS ((bfd *abfd));
+
+boolean
bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma));
-long
+long
bfd_get_mtime PARAMS ((bfd *abfd));
-long
+long
bfd_get_size PARAMS ((bfd *abfd));
-int
+int
bfd_get_gp_size PARAMS ((bfd *abfd));
-void
+void
bfd_set_gp_size PARAMS ((bfd *abfd, int i));
-bfd_vma
+bfd_vma
bfd_scan_vma PARAMS ((CONST char *string, CONST char **end, int base));
-boolean
+boolean
bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
#define bfd_copy_private_bfd_data(ibfd, obfd) \
BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
(ibfd, obfd))
-boolean
+boolean
bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
#define bfd_merge_private_bfd_data(ibfd, obfd) \
BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
(ibfd, obfd))
-boolean
+boolean
bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define bfd_set_private_flags(abfd, flags) \
@@ -2829,7 +3114,7 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line))
- /* Do these three do anything useful at all, for any back end? */
+ /* Do these three do anything useful at all, for any back end? */
#define bfd_debug_info_start(abfd) \
BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
@@ -2887,10 +3172,10 @@ extern bfd_byte *bfd_get_relocated_section_contents
struct bfd_link_order *, bfd_byte *,
boolean, asymbol **));
-symindex
+symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
-boolean
+boolean
bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
bfd *
@@ -2899,12 +3184,11 @@ bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
CONST char *
bfd_core_file_failing_command PARAMS ((bfd *abfd));
-int
+int
bfd_core_file_failing_signal PARAMS ((bfd *abfd));
-boolean
-core_file_matches_executable_p
- PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+boolean
+core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
@@ -2917,13 +3201,13 @@ core_file_matches_executable_p
(bfd_assert (__FILE__,__LINE__), NULL))
#endif
#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd)->xvec->message[(int)((bfd)->format)]) arglist)
+ (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
#ifdef DEBUG_BFD_SEND
#undef BFD_SEND_FMT
#define BFD_SEND_FMT(bfd, message, arglist) \
(((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \
+ (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
(bfd_assert (__FILE__,__LINE__), NULL))
#endif
enum bfd_flavour {
@@ -2931,6 +3215,7 @@ enum bfd_flavour {
bfd_target_aout_flavour,
bfd_target_coff_flavour,
bfd_target_ecoff_flavour,
+ bfd_target_xcoff_flavour,
bfd_target_elf_flavour,
bfd_target_ieee_flavour,
bfd_target_nlm_flavour,
@@ -2948,7 +3233,7 @@ enum bfd_flavour {
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
- /* Forward declaration. */
+/* Forward declaration. */
typedef struct bfd_link_info _bfd_link_info;
typedef struct bfd_target
@@ -2957,10 +3242,10 @@ typedef struct bfd_target
enum bfd_flavour flavour;
enum bfd_endian byteorder;
enum bfd_endian header_byteorder;
- flagword object_flags;
+ flagword object_flags;
flagword section_flags;
char symbol_leading_char;
- char ar_pad_char;
+ char ar_pad_char;
unsigned short ar_max_namelen;
bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
@@ -2984,7 +3269,7 @@ typedef struct bfd_target
boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
- /* Generic entry points. */
+ /* Generic entry points. */
#define BFD_JUMP_TABLE_GENERIC(NAME)\
CAT(NAME,_close_and_cleanup),\
CAT(NAME,_bfd_free_cached_info),\
@@ -2992,20 +3277,20 @@ CAT(NAME,_new_section_hook),\
CAT(NAME,_get_section_contents),\
CAT(NAME,_get_section_contents_in_window)
- /* Called when the BFD is being closed to do any necessary cleanup. */
+ /* Called when the BFD is being closed to do any necessary cleanup. */
boolean (*_close_and_cleanup) PARAMS ((bfd *));
- /* Ask the BFD to free all cached information. */
+ /* Ask the BFD to free all cached information. */
boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
- /* Called when a new section is created. */
+ /* Called when a new section is created. */
boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
- /* Read the contents of a section. */
- boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+ /* Read the contents of a section. */
+ boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
file_ptr, bfd_size_type));
boolean (*_bfd_get_section_contents_in_window)
PARAMS ((bfd *, sec_ptr, bfd_window *,
file_ptr, bfd_size_type));
- /* Entry points to copy private data. */
+ /* Entry points to copy private data. */
#define BFD_JUMP_TABLE_COPY(NAME)\
CAT(NAME,_bfd_copy_private_bfd_data),\
CAT(NAME,_bfd_merge_private_bfd_data),\
@@ -3013,27 +3298,27 @@ CAT(NAME,_bfd_copy_private_section_data),\
CAT(NAME,_bfd_copy_private_symbol_data),\
CAT(NAME,_bfd_set_private_flags),\
CAT(NAME,_bfd_print_private_bfd_data)\
- /* Called to copy BFD general private data from one object file
+ /* Called to copy BFD general private data from one object file
to another. */
boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
- /* Called to merge BFD general private data from one object file
+ /* Called to merge BFD general private data from one object file
to a common output file when linking. */
boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
- /* Called to copy BFD private section data from one object file
+ /* Called to copy BFD private section data from one object file
to another. */
boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
bfd *, sec_ptr));
- /* Called to copy BFD private symbol data from one symbol
+ /* Called to copy BFD private symbol data from one symbol
to another. */
boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
bfd *, asymbol *));
- /* Called to set private backend flags */
+ /* Called to set private backend flags */
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
- /* Called to print private BFD data */
+ /* Called to print private BFD data */
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
- /* Core file entry points. */
+ /* Core file entry points. */
#define BFD_JUMP_TABLE_CORE(NAME)\
CAT(NAME,_core_file_failing_command),\
CAT(NAME,_core_file_failing_signal),\
@@ -3042,7 +3327,7 @@ CAT(NAME,_core_file_matches_executable_p)
int (*_core_file_failing_signal) PARAMS ((bfd *));
boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
- /* Archive entry points. */
+ /* Archive entry points. */
#define BFD_JUMP_TABLE_ARCHIVE(NAME)\
CAT(NAME,_slurp_armap),\
CAT(NAME,_slurp_extended_name_table),\
@@ -3059,10 +3344,10 @@ CAT(NAME,_update_armap_timestamp)
boolean (*_bfd_construct_extended_name_table)
PARAMS ((bfd *, char **, bfd_size_type *, const char **));
void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
- boolean (*write_armap) PARAMS ((bfd *arch,
+ boolean (*write_armap) PARAMS ((bfd *arch,
unsigned int elength,
struct orl *map,
- unsigned int orl_count,
+ unsigned int orl_count,
int stridx));
PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
@@ -3071,7 +3356,7 @@ CAT(NAME,_update_armap_timestamp)
int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
- /* Entry points used for symbols. */
+ /* Entry points used for symbols. */
#define BFD_JUMP_TABLE_SYMBOLS(NAME)\
CAT(NAME,_get_symtab_upper_bound),\
CAT(NAME,_get_symtab),\
@@ -3104,7 +3389,7 @@ CAT(NAME,_minisymbol_to_symbol)
struct sec *section, struct symbol_cache_entry **symbols,
bfd_vma offset, CONST char **file, CONST char **func,
unsigned int *line));
- /* Back-door to allow format-aware applications to create debug symbols
+ /* Back-door to allow format-aware applications to create debug symbols
while using BFD for everything else. Currently used by the assembler
when creating COFF files. */
asymbol * (*_bfd_make_debug_symbol) PARAMS ((
@@ -3120,7 +3405,7 @@ CAT(NAME,_minisymbol_to_symbol)
asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
asymbol *));
- /* Routines for relocs. */
+ /* Routines for relocs. */
#define BFD_JUMP_TABLE_RELOCS(NAME)\
CAT(NAME,_get_reloc_upper_bound),\
CAT(NAME,_canonicalize_reloc),\
@@ -3128,12 +3413,12 @@ CAT(NAME,_bfd_reloc_type_lookup)
long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
struct symbol_cache_entry **));
- /* See documentation on reloc types. */
+ /* See documentation on reloc types. */
reloc_howto_type *
(*reloc_type_lookup) PARAMS ((bfd *abfd,
bfd_reloc_code_real_type code));
- /* Routines used when writing an object file. */
+ /* Routines used when writing an object file. */
#define BFD_JUMP_TABLE_WRITE(NAME)\
CAT(NAME,_set_arch_mach),\
CAT(NAME,_set_section_contents)
@@ -3142,7 +3427,7 @@ CAT(NAME,_set_section_contents)
boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
file_ptr, bfd_size_type));
- /* Routines used by the linker. */
+ /* Routines used by the linker. */
#define BFD_JUMP_TABLE_LINK(NAME)\
CAT(NAME,_sizeof_headers),\
CAT(NAME,_bfd_get_relocated_section_contents),\
@@ -3161,48 +3446,48 @@ CAT(NAME,_bfd_gc_sections)
boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
struct bfd_link_info *, boolean *again));
- /* Create a hash table for the linker. Different backends store
+ /* Create a hash table for the linker. Different backends store
different information in this table. */
struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
- /* Add symbols from this object file into the hash table. */
+ /* Add symbols from this object file into the hash table. */
boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
- /* Do a link based on the link_order structures attached to each
+ /* Do a link based on the link_order structures attached to each
section of the BFD. */
boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
- /* Should this section be split up into smaller pieces during linking. */
+ /* Should this section be split up into smaller pieces during linking. */
boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
- /* Remove sections that are not referenced from the output. */
+ /* Remove sections that are not referenced from the output. */
boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
- /* Routines to handle dynamic symbols and relocs. */
+ /* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME)\
CAT(NAME,_get_dynamic_symtab_upper_bound),\
CAT(NAME,_canonicalize_dynamic_symtab),\
CAT(NAME,_get_dynamic_reloc_upper_bound),\
CAT(NAME,_canonicalize_dynamic_reloc)
- /* Get the amount of memory required to hold the dynamic symbols. */
+ /* Get the amount of memory required to hold the dynamic symbols. */
long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
- /* Read in the dynamic symbols. */
+ /* Read in the dynamic symbols. */
long (*_bfd_canonicalize_dynamic_symtab)
PARAMS ((bfd *, struct symbol_cache_entry **));
- /* Get the amount of memory required to hold the dynamic relocs. */
+ /* Get the amount of memory required to hold the dynamic relocs. */
long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
- /* Read in the dynamic relocs. */
+ /* Read in the dynamic relocs. */
long (*_bfd_canonicalize_dynamic_reloc)
PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
- /* Opposite endian version of this target. */
+ /* Opposite endian version of this target. */
const struct bfd_target * alternative_target;
-
+
PTR backend_data;
-
+
} bfd_target;
-boolean
-bfd_set_default_target PARAMS ((const char *name));
+boolean
+bfd_set_default_target PARAMS ((const char *name));
const bfd_target *
bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd));
@@ -3210,16 +3495,16 @@ bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd));
const char **
bfd_target_list PARAMS ((void));
-const bfd_target *
-bfd_search_for_target PARAMS ((int (* search_func)(const bfd_target *, void *), void *));
+const bfd_target *
+bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
-boolean
+boolean
bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
-boolean
+boolean
bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching));
-boolean
+boolean
bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
CONST char *
diff --git a/gnu/usr.bin/binutils/bfd/bfd.c b/gnu/usr.bin/binutils/bfd/bfd.c
index e04172fb016..3afcd3df8b5 100644
--- a/gnu/usr.bin/binutils/bfd/bfd.c
+++ b/gnu/usr.bin/binutils/bfd/bfd.c
@@ -1,5 +1,6 @@
/* Generic BFD library interface and support routines.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -33,10 +34,10 @@ SECTION
CODE_FRAGMENT
.
-.struct _bfd
+.struct _bfd
.{
. {* The filename the application opened the BFD with. *}
-. CONST char *filename;
+. CONST char *filename;
.
. {* A pointer to the target jump table. *}
. const struct bfd_target *xvec;
@@ -69,7 +70,7 @@ CODE_FRAGMENT
. {* When a file is closed by the caching routines, BFD retains
. state information on the file here: *}
.
-. file_ptr where;
+. file_ptr where;
.
. {* and here: (``once'' means at least once) *}
.
@@ -82,7 +83,7 @@ CODE_FRAGMENT
.
. {* File modified time, if mtime_set is true: *}
.
-. long mtime;
+. long mtime;
.
. {* Reserved for an unimplemented file locking extension.*}
.
@@ -101,13 +102,13 @@ CODE_FRAGMENT
.
. {* Format_specific flags*}
.
-. flagword flags;
+. flagword flags;
.
. {* Currently my_archive is tested before adding origin to
. anything. I believe that this can become always an add of
. origin, with origin set to 0 for non archive files. *}
.
-. file_ptr origin;
+. file_ptr origin;
.
. {* Remember when output has begun, to stop strange things
. from happening. *}
@@ -119,7 +120,7 @@ CODE_FRAGMENT
. {* The number of sections *}
. unsigned int section_count;
.
-. {* Stuff only useful for object files:
+. {* Stuff only useful for object files:
. The start address. *}
. bfd_vma start_address;
.
@@ -127,17 +128,17 @@ CODE_FRAGMENT
. unsigned int symcount;
.
. {* Symbol table for output BFD (with symcount entries) *}
-. struct symbol_cache_entry **outsymbols;
+. struct symbol_cache_entry **outsymbols;
.
. {* Pointer to structure which contains architecture information*}
. const struct bfd_arch_info *arch_info;
.
. {* Stuff only useful for archives:*}
-. PTR arelt_data;
+. PTR arelt_data;
. struct _bfd *my_archive; {* The containing archive BFD. *}
. struct _bfd *next; {* The next BFD in the archive. *}
. struct _bfd *archive_head; {* The first BFD in the archive. *}
-. boolean has_armap;
+. boolean has_armap;
.
. {* A chain of BFD structures involved in a link. *}
. struct _bfd *link_next;
@@ -148,7 +149,7 @@ CODE_FRAGMENT
.
. {* Used by the back end to hold private data. *}
.
-. union
+. union
. {
. struct aout_data_struct *aout_data;
. struct artdata *aout_ar_data;
@@ -180,7 +181,7 @@ CODE_FRAGMENT
. struct netbsd_core_struct *netbsd_core_data;
. PTR any;
. } tdata;
-.
+.
. {* Used by the application to hold private data*}
. PTR usrdata;
.
@@ -218,8 +219,6 @@ CODE_FRAGMENT
struct which ultimately gets passed in to the bfd. When it arrives, copy
it to the following struct so that the data will be available in coffcode.h
where it is needed. The typedef's used are defined in bfd.h */
-
-
/*
SECTION
@@ -376,7 +375,7 @@ bfd_perror (message)
CONST char *message;
{
if (bfd_get_error () == bfd_error_system_call)
- perror((char *)message); /* must be system error then... */
+ perror((char *)message); /* must be system error then... */
else {
if (message == NULL || *message == '\0')
fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
@@ -510,7 +509,6 @@ bfd_set_error_program_name (name)
_bfd_error_program_name = name;
}
-
/*
FUNCTION
bfd_get_error_handler
@@ -547,7 +545,6 @@ DESCRIPTION
*/
-
long
bfd_get_reloc_upper_bound (abfd, asect)
bfd *abfd;
@@ -584,7 +581,6 @@ DESCRIPTION
The @var{syms} table is also needed for horrible internal magic
reasons.
-
*/
long
bfd_canonicalize_reloc (abfd, asect, location, symbols)
@@ -615,7 +611,7 @@ DESCRIPTION
The argument @var{abfd} is ignored.
*/
-/*ARGSUSED*/
+
void
bfd_set_reloc (ignore_abfd, asect, location, count)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -706,6 +702,65 @@ _bfd_abort (file, line, fn)
/*
FUNCTION
+ bfd_get_arch_size
+
+SYNOPSIS
+ int bfd_get_arch_size (bfd *abfd);
+
+DESCRIPTION
+ Returns the architecture address size, in bits, as determined
+ by the object file's format. For ELF, this information is
+ included in the header.
+
+RETURNS
+ Returns the arch size in bits if known, <<-1>> otherwise.
+*/
+
+int
+bfd_get_arch_size (abfd)
+ bfd *abfd;
+{
+ if (abfd->xvec->flavour == bfd_target_elf_flavour)
+ return (get_elf_backend_data (abfd))->s->arch_size;
+
+ bfd_set_error (bfd_error_wrong_format);
+ return -1;
+}
+
+/*
+FUNCTION
+ bfd_get_sign_extend_vma
+
+SYNOPSIS
+ int bfd_get_sign_extend_vma (bfd *abfd);
+
+DESCRIPTION
+ Indicates if the target architecture "naturally" sign extends
+ an address. Some architectures implicitly sign extend address
+ values when they are converted to types larger than the size
+ of an address. For instance, bfd_get_start_address() will
+ return an address sign extended to fill a bfd_vma when this is
+ the case.
+
+RETURNS
+ Returns <<1>> if the target architecture is known to sign
+ extend addresses, <<0>> if the target architecture is known to
+ not sign extend addresses, and <<-1>> otherwise.
+*/
+
+int
+bfd_get_sign_extend_vma (abfd)
+ bfd *abfd;
+{
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ return (get_elf_backend_data (abfd)->sign_extend_vma);
+
+ bfd_set_error (bfd_error_wrong_format);
+ return -1;
+}
+
+/*
+FUNCTION
bfd_set_start_address
SYNOPSIS
@@ -727,7 +782,6 @@ bfd_vma vma;
return true;
}
-
/*
FUNCTION
bfd_get_mtime
@@ -779,7 +833,7 @@ DESCRIPTION
Instead, we want to ask questions like "is this NNN byte sized
object I'm about to try read from file offset YYY reasonable?"
As as example of where we might do this, some object formats
- use string tables for which the first <<sizeof(long)>> bytes of the
+ use string tables for which the first <<sizeof (long)>> bytes of the
table contain the size of the table itself, including the size bytes.
If an application tries to read what it thinks is one of these
string tables, without some way to validate the size, and for
@@ -926,7 +980,7 @@ bfd_scan_vma (string, end, base)
int digit;
/* Let the host do it if possible. */
- if (sizeof(bfd_vma) <= sizeof(unsigned long))
+ if (sizeof (bfd_vma) <= sizeof (unsigned long))
return (bfd_vma) strtoul (string, (char **) end, base);
/* A negative base makes no sense, and we only need to go as high as hex. */
@@ -950,7 +1004,7 @@ bfd_scan_vma (string, end, base)
(string[0] == '0') && ((string[1] == 'x') || (string[1] == 'X')))
string += 2;
/* XXX should we also skip over "0b" or "0B" if base is 2? */
-
+
/* Speed could be improved with a table like hex_value[] in gas. */
#define HEX_VALUE(c) \
(isxdigit ((unsigned char) c) \
@@ -978,7 +1032,7 @@ SYNOPSIS
boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
DESCRIPTION
- Copy private BFD information from the BFD @var{ibfd} to the
+ Copy private BFD information from the BFD @var{ibfd} to the
the BFD @var{obfd}. Return <<true>> on success, <<false>> on error.
Possible error returns are:
@@ -999,7 +1053,7 @@ SYNOPSIS
boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
DESCRIPTION
- Merge private BFD information from the BFD @var{ibfd} to the
+ Merge private BFD information from the BFD @var{ibfd} to the
the output file BFD @var{obfd} when linking. Return <<true>>
on success, <<false>> on error. Possible error returns are:
diff --git a/gnu/usr.bin/binutils/bfd/binary.c b/gnu/usr.bin/binutils/bfd/binary.c
index c2980b02621..b80343bed7c 100644
--- a/gnu/usr.bin/binutils/bfd/binary.c
+++ b/gnu/usr.bin/binutils/bfd/binary.c
@@ -1,5 +1,6 @@
/* BFD back-end for binary objects.
- Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ 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.
@@ -255,6 +256,9 @@ binary_set_section_contents (abfd, sec, data, offset, size)
file_ptr offset;
bfd_size_type size;
{
+ if (size == 0)
+ return true;
+
if (! abfd->output_has_begun)
{
boolean found_low;
@@ -270,6 +274,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
if (((s->flags
& (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC | SEC_NEVER_LOAD))
== (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC))
+ && (s->_raw_size > 0)
&& (! found_low || s->lma < low))
{
low = s->lma;
@@ -281,17 +286,18 @@ binary_set_section_contents (abfd, sec, data, offset, size)
s->filepos = s->lma - low;
/* Skip following warning check for sections that will not
- occupy file space. */
+ occupy file space. */
if ((s->flags
& (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_NEVER_LOAD))
- != (SEC_HAS_CONTENTS | SEC_ALLOC))
+ != (SEC_HAS_CONTENTS | SEC_ALLOC)
+ || (s->_raw_size == 0))
continue;
/* If attempting to generate a binary file from a bfd with
LMA's all over the place, huge (sparse?) binary files may
result. This condition attempts to detect this situation
and print a warning. Better heuristics would be nice to
- have. */
+ have. */
if (s->filepos < 0)
(*_bfd_error_handler)
@@ -383,6 +389,6 @@ const bfd_target binary_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
NULL
};
diff --git a/gnu/usr.bin/binutils/bfd/bout.c b/gnu/usr.bin/binutils/bfd/bout.c
index c230e18c0ea..1b663d130cb 100644
--- a/gnu/usr.bin/binutils/bfd/bout.c
+++ b/gnu/usr.bin/binutils/bfd/bout.c
@@ -1,5 +1,6 @@
/* BFD back-end for Intel 960 b.out binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -19,7 +20,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
@@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#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,
@@ -97,7 +96,7 @@ bout_swap_exec_header_out (abfd, execp, raw_bytes)
{
struct external_exec *bytes = (struct external_exec *)raw_bytes;
- /* Now fill in fields in the raw data, from the fields in the exec struct. */
+ /* Now fill in fields in the raw data, from the fields in the exec struct. */
bfd_h_put_32 (abfd, execp->a_info , bytes->e_info);
PUT_WORD (abfd, execp->a_text , bytes->e_text);
PUT_WORD (abfd, execp->a_data , bytes->e_data);
@@ -114,7 +113,6 @@ bout_swap_exec_header_out (abfd, execp, raw_bytes)
bytes->e_relaxable[0] = execp->a_relaxable;
}
-
static const bfd_target *
b_out_object_p (abfd)
bfd *abfd;
@@ -140,7 +138,6 @@ b_out_object_p (abfd)
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. */
@@ -189,8 +186,8 @@ b_out_callback (abfd)
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).page_size = 1; /* Not applicable. */
+ adata(abfd).segment_size = 1; /* Not applicable. */
adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
if (execp->a_relaxable)
@@ -310,22 +307,22 @@ b_out_write_object_contents (abfd)
}
if (q > outsyms)
- qsort (outsyms, q - outsyms, sizeof(asymbol*), b_out_symbol_cmp);
+ qsort (outsyms, q - outsyms, sizeof (asymbol*), 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) != 0)
+ 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;
@@ -344,7 +341,6 @@ b_out_write_object_contents (abfd)
#define CALL 0x09000000
#define PCREL13_MASK 0x1fff
-
#define output_addr(sec) ((sec)->output_offset+(sec)->output_section->vma)
/* Magic to turn callx into calljx */
@@ -380,11 +376,10 @@ calljx_callback (abfd, link_info, reloc_entry, src, dst, input_section)
word += value + reloc_entry->addend;
- bfd_put_32(abfd, word, dst);
+ bfd_put_32 (abfd, word, dst);
return bfd_reloc_ok;
}
-
/* Magic to turn call into callj */
static bfd_reloc_status_type
callj_callback (abfd, link_info, reloc_entry, data, srcidx, dstidx,
@@ -417,7 +412,7 @@ callj_callback (abfd, link_info, reloc_entry, data, srcidx, dstidx,
/* The next symbol should be an N_BALNAME. */
BFD_ASSERT(IS_BALNAME(balsym->other));
-
+
/* We are calling a leaf, so replace the call instruction with a
bal. */
word = BAL | ((word
@@ -445,7 +440,7 @@ callj_callback (abfd, link_info, reloc_entry, data, srcidx, dstidx,
- output_addr (input_section))
& BAL_MASK);
}
- bfd_put_32(abfd, word, (bfd_byte *) data + dstidx);
+ bfd_put_32 (abfd, word, (bfd_byte *) data + dstidx);
return bfd_reloc_ok;
}
@@ -472,7 +467,6 @@ HOWTO(PCREL24, 0, 2, 24, true, 0, complain_overflow_signed,0,"pcrel24", true, 0x
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);
@@ -556,7 +550,7 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
return false;
doit:
- if (bfd_seek (abfd, (file_ptr)(asect->rel_filepos), SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) (asect->rel_filepos), SEEK_SET) != 0)
return false;
count = reloc_size / sizeof (struct relocation_info);
@@ -577,8 +571,6 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
return false;
}
-
-
if (bfd_header_big_endian (abfd)) {
/* big-endian bit field allocation order */
pcrel_mask = 0x80;
@@ -728,17 +720,14 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
}
}
-
if (relocs != NULL)
free (relocs);
asect->relocation = reloc_cache;
asect->reloc_count = count;
-
return true;
}
-
static boolean
b_out_squirt_out_relocs (abfd, section)
bfd *abfd;
@@ -956,7 +945,7 @@ 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_textsec (abfd)->filepos = sizeof (struct internal_exec);
obj_datasec(abfd)->filepos = obj_textsec(abfd)->filepos
+ obj_textsec (abfd)->_raw_size;
@@ -1005,11 +994,9 @@ b_out_sizeof_headers (ignore_abfd, ignore)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
boolean ignore ATTRIBUTE_UNUSED;
{
- return sizeof(struct internal_exec);
+ return sizeof (struct internal_exec);
}
-
-
/************************************************************************/
static bfd_vma
get_value (reloc, link_info, input_section)
@@ -1125,7 +1112,6 @@ abs32code (abfd, input_section, r, shrink, link_info)
gap = value - (dot - shrink);
-
if (-1<<23 < (long)gap && (long)gap < 1<<23 )
{
/* Change the reloc type from 32bitcode possible 24, to 24bit
@@ -1425,7 +1411,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
break;
default:
- abort();
+ abort ();
}
}
}
@@ -1494,11 +1480,10 @@ const bfd_target b_out_vec_big_host =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& b_out_vec_little_host,
-
+
(PTR) 0,
};
-
const bfd_target b_out_vec_little_host =
{
"b.out.little", /* name */
@@ -1537,6 +1522,6 @@ const bfd_target b_out_vec_little_host =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& b_out_vec_big_host,
-
+
(PTR) 0
};
diff --git a/gnu/usr.bin/binutils/bfd/cache.c b/gnu/usr.bin/binutils/bfd/cache.c
index 91b6c610854..da16409d857 100644
--- a/gnu/usr.bin/binutils/bfd/cache.c
+++ b/gnu/usr.bin/binutils/bfd/cache.c
@@ -1,5 +1,5 @@
/* BFD library -- caching of file descriptors.
- Copyright 1990, 91, 92, 93, 94, 95, 1996, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
@@ -32,7 +32,7 @@ SECTION
<<bfd_cache_lookup>>, which runs around and makes sure that
the required BFD is open. If not, then it chooses a file to
close, closes it and opens the one wanted, returning its file
- handle.
+ handle.
*/
@@ -79,19 +79,18 @@ bfd *bfd_last_cache;
/*
INTERNAL_FUNCTION
bfd_cache_lookup
-
+
DESCRIPTION
Check to see if the required BFD is the same as the last one
looked up. If so, then it can use the stream in the BFD with
impunity, since it can't have changed since the last lookup;
otherwise, it has to perform the complicated lookup function.
-
+
.#define bfd_cache_lookup(x) \
. ((x)==bfd_last_cache? \
- . (FILE*)(bfd_last_cache->iostream): \
+ . (FILE*) (bfd_last_cache->iostream): \
. bfd_cache_lookup_worker(x))
-
-
+
*/
/* Insert a BFD into the cache. */
@@ -262,7 +261,7 @@ FILE *
bfd_open_file (abfd)
bfd *abfd;
{
- abfd->cacheable = true; /* Allow it to be closed later. */
+ abfd->cacheable = true; /* Allow it to be closed later. */
if (open_files >= BFD_CACHE_MAX_OPEN)
{
@@ -312,7 +311,7 @@ bfd_open_file (abfd)
if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
unlink (abfd->filename);
#endif
- abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WB);
+ abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB);
abfd->opened_once = true;
}
break;
@@ -339,7 +338,7 @@ DESCRIPTION
quick answer. Find a file descriptor for @var{abfd}. If
necessary, it open it. If there are already more than
<<BFD_CACHE_MAX_OPEN>> files open, it tries to close one first, to
- avoid running out of file descriptors.
+ avoid running out of file descriptors.
*/
FILE *
@@ -349,7 +348,7 @@ bfd_cache_lookup_worker (abfd)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
abort ();
- if (abfd->my_archive)
+ if (abfd->my_archive)
abfd = abfd->my_archive;
if (abfd->iostream != NULL)
diff --git a/gnu/usr.bin/binutils/bfd/cisco-core.c b/gnu/usr.bin/binutils/bfd/cisco-core.c
index 3492e75369c..97aad520073 100644
--- a/gnu/usr.bin/binutils/bfd/cisco-core.c
+++ b/gnu/usr.bin/binutils/bfd/cisco-core.c
@@ -1,6 +1,6 @@
/* BFD back-end for CISCO crash dumps.
-Copyright 1994 Free Software Foundation, Inc.
+Copyright 1994, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -72,7 +72,7 @@ struct cisco_core_struct
};
/* Examine the file for a crash info struct at the offset given by
- CRASH_INFO_LOC. */
+ CRASH_INFO_LOC. */
static const bfd_target *
cisco_core_file_validate (abfd, crash_info_loc)
@@ -236,7 +236,7 @@ cisco_core_file_validate (abfd, crash_info_loc)
abfd->section_count = 0;
/* Create a ".reg" section to allow access to the saved
- registers. */
+ registers. */
asect = (asection *) bfd_zmalloc (sizeof (asection));
if (asect == NULL)
@@ -247,7 +247,7 @@ cisco_core_file_validate (abfd, crash_info_loc)
asect->filepos = bfd_get_32 (abfd, crashinfo.registers) - rambase;
/* Since we don't know the exact size of the saved register info,
choose a register section size that is either the remaining part
- of the file, or 1024, whichever is smaller. */
+ of the file, or 1024, whichever is smaller. */
nread = statbuf.st_size - asect->filepos;
asect->_raw_size = (nread < 1024) ? nread : 1024;
asect->next = abfd->sections;
@@ -255,7 +255,7 @@ cisco_core_file_validate (abfd, crash_info_loc)
++abfd->section_count;
/* Create a ".crash" section to allow access to the saved
- crash information. */
+ crash information. */
asect = (asection *) bfd_zmalloc (sizeof (asection));
if (asect == NULL)
@@ -270,7 +270,7 @@ cisco_core_file_validate (abfd, crash_info_loc)
++abfd->section_count;
/* Create a ".data" section that maps the entire file, which is
- essentially a dump of the target system's RAM. */
+ essentially a dump of the target system's RAM. */
asect = (asection *) bfd_zmalloc (sizeof (asection));
if (asect == NULL)
@@ -288,7 +288,7 @@ cisco_core_file_validate (abfd, crash_info_loc)
return abfd->xvec;
/* Get here if we have already started filling out the BFD
- and there is an error of some kind. */
+ and there is an error of some kind. */
error_return:
{
@@ -378,7 +378,7 @@ const bfd_target cisco_core_big_vec =
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (cisco),
@@ -390,7 +390,7 @@ const bfd_target cisco_core_big_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& cisco_core_little_vec,
-
+
(PTR) 0 /* backend_data */
};
@@ -428,7 +428,7 @@ const bfd_target cisco_core_little_vec =
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (cisco),
@@ -440,6 +440,6 @@ const bfd_target cisco_core_little_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
&cisco_core_big_vec,
-
+
(PTR) 0 /* backend_data */
};
diff --git a/gnu/usr.bin/binutils/bfd/coff-a29k.c b/gnu/usr.bin/binutils/bfd/coff-a29k.c
index 0374b20b473..b7b018cad28 100644
--- a/gnu/usr.bin/binutils/bfd/coff-a29k.c
+++ b/gnu/usr.bin/binutils/bfd/coff-a29k.c
@@ -1,5 +1,5 @@
/* BFD back-end for AMD 29000 COFF binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by David Wood at New York University 7/8/91.
@@ -43,27 +43,27 @@ static boolean coff_a29k_adjust_symndx
#define INSERT_HWORD(WORD,HWORD) \
(((WORD) & 0xff00ff00) | (((HWORD) & 0xff00) << 8) | ((HWORD)& 0xff))
#define EXTRACT_HWORD(WORD) \
- ((((WORD) & 0x00ff0000) >> 8) | ((WORD)& 0xff))
+ ((((WORD) & 0x00ff0000) >> 8) | ((WORD) & 0xff))
#define SIGN_EXTEND_HWORD(HWORD) \
- ((HWORD) & 0x8000 ? (HWORD)|(~0xffffL) : (HWORD))
+ (((HWORD) ^ 0x8000) - 0x8000)
/* Provided the symbol, returns the value reffed */
static long
-get_symbol_value (symbol)
+get_symbol_value (symbol)
asymbol *symbol;
-{
+{
long relocation = 0;
if (bfd_is_com_section (symbol->section))
- {
- relocation = 0;
- }
- else
- {
- relocation = symbol->value +
- symbol->section->output_section->vma +
- symbol->section->output_offset;
- }
+ {
+ relocation = 0;
+ }
+ else
+ {
+ relocation = symbol->value +
+ symbol->section->output_section->vma +
+ symbol->section->output_offset;
+ }
return(relocation);
}
@@ -93,130 +93,130 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
long signed_value;
unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/
- bfd_byte *hit_data =addr + (bfd_byte *)(data);
-
+ bfd_byte *hit_data =addr + (bfd_byte *) (data);
+
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 (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 == R_IHIHALF)
{
- part1_consth_active = true;
- part1_consth_value = 0;
+ /* Keep the state machine happy in case we're called again */
+ if (r_type == R_IHIHALF)
+ {
+ part1_consth_active = true;
+ part1_consth_value = 0;
+ }
+ return(bfd_reloc_undefined);
}
- return(bfd_reloc_undefined);
- }
-
- if ((part1_consth_active) && (r_type != R_IHCONST))
- {
- part1_consth_active = false;
- *error_message = (char *) _("Missing IHCONST");
- return(bfd_reloc_dangerous);
- }
+ if ((part1_consth_active) && (r_type != R_IHCONST))
+ {
+ part1_consth_active = false;
+ *error_message = (char *) _("Missing IHCONST");
+ return(bfd_reloc_dangerous);
+ }
sym_value = get_symbol_value(symbol_in);
- switch (r_type)
- {
- case R_IREL:
- insn = bfd_get_32(abfd, hit_data);
- /* Take the value in the field and sign extend it */
- signed_value = EXTRACT_HWORD(insn);
- signed_value = SIGN_EXTEND_HWORD(signed_value);
- signed_value <<= 2;
-
- /* See the note on the R_IREL reloc in coff_a29k_relocate_section. */
- if (signed_value == - (long) reloc_entry->address)
- signed_value = 0;
-
- signed_value += sym_value + reloc_entry->addend;
- if ((signed_value & ~0x3ffff) == 0)
- { /* Absolute jmp/call */
- insn |= (1<<24); /* Make it absolute */
- /* FIXME: Should we change r_type to R_IABS */
- }
- else
+ switch (r_type)
{
- /* Relative jmp/call, so subtract from the value the
- address of the place we're coming from */
- signed_value -= (reloc_entry->address
- + input_section->output_section->vma
- + input_section->output_offset);
- if (signed_value>0x1ffff || signed_value<-0x20000)
- return(bfd_reloc_overflow);
- }
- signed_value >>= 2;
- insn = INSERT_HWORD(insn, signed_value);
- bfd_put_32(abfd, insn ,hit_data);
- break;
- case R_ILOHALF:
- insn = bfd_get_32(abfd, hit_data);
- unsigned_value = EXTRACT_HWORD(insn);
- unsigned_value += sym_value + reloc_entry->addend;
- insn = INSERT_HWORD(insn, unsigned_value);
- bfd_put_32(abfd, insn, hit_data);
- break;
- case R_IHIHALF:
- insn = bfd_get_32(abfd, hit_data);
- /* consth, part 1
- Just get the symbol value that is referenced */
- part1_consth_active = true;
- part1_consth_value = sym_value + reloc_entry->addend;
- /* Don't modify insn until R_IHCONST */
- break;
- case R_IHCONST:
- insn = bfd_get_32(abfd, hit_data);
- /* consth, part 2
- Now relocate the reference */
- if (part1_consth_active == false) {
- *error_message = (char *) _("Missing IHIHALF");
- return(bfd_reloc_dangerous);
+ case R_IREL:
+ insn = bfd_get_32 (abfd, hit_data);
+ /* Take the value in the field and sign extend it */
+ signed_value = EXTRACT_HWORD(insn);
+ signed_value = SIGN_EXTEND_HWORD(signed_value);
+ signed_value <<= 2;
+
+ /* See the note on the R_IREL reloc in coff_a29k_relocate_section. */
+ if (signed_value == - (long) reloc_entry->address)
+ signed_value = 0;
+
+ signed_value += sym_value + reloc_entry->addend;
+ if ((signed_value & ~0x3ffff) == 0)
+ { /* Absolute jmp/call */
+ insn |= (1<<24); /* Make it absolute */
+ /* FIXME: Should we change r_type to R_IABS */
+ }
+ else
+ {
+ /* Relative jmp/call, so subtract from the value the
+ address of the place we're coming from */
+ signed_value -= (reloc_entry->address
+ + input_section->output_section->vma
+ + input_section->output_offset);
+ if (signed_value>0x1ffff || signed_value<-0x20000)
+ return(bfd_reloc_overflow);
+ }
+ signed_value >>= 2;
+ insn = INSERT_HWORD(insn, signed_value);
+ bfd_put_32 (abfd, insn ,hit_data);
+ break;
+ case R_ILOHALF:
+ insn = bfd_get_32 (abfd, hit_data);
+ unsigned_value = EXTRACT_HWORD(insn);
+ unsigned_value += sym_value + reloc_entry->addend;
+ insn = INSERT_HWORD(insn, unsigned_value);
+ bfd_put_32 (abfd, insn, hit_data);
+ break;
+ case R_IHIHALF:
+ insn = bfd_get_32 (abfd, hit_data);
+ /* consth, part 1
+ Just get the symbol value that is referenced */
+ part1_consth_active = true;
+ part1_consth_value = sym_value + reloc_entry->addend;
+ /* Don't modify insn until R_IHCONST */
+ break;
+ case R_IHCONST:
+ insn = bfd_get_32 (abfd, hit_data);
+ /* consth, part 2
+ Now relocate the reference */
+ if (part1_consth_active == false)
+ {
+ *error_message = (char *) _("Missing IHIHALF");
+ return(bfd_reloc_dangerous);
+ }
+ /* sym_ptr_ptr = r_symndx, in coff_slurp_reloc_table() */
+ unsigned_value = 0; /*EXTRACT_HWORD(insn) << 16;*/
+ unsigned_value += reloc_entry->addend; /* r_symndx */
+ unsigned_value += part1_consth_value;
+ unsigned_value = unsigned_value >> 16;
+ insn = INSERT_HWORD(insn, unsigned_value);
+ part1_consth_active = false;
+ bfd_put_32 (abfd, insn, hit_data);
+ break;
+ case R_BYTE:
+ insn = bfd_get_8 (abfd, hit_data);
+ unsigned_value = insn + sym_value + reloc_entry->addend;
+ if (unsigned_value & 0xffffff00)
+ return(bfd_reloc_overflow);
+ bfd_put_8 (abfd, unsigned_value, hit_data);
+ break;
+ case R_HWORD:
+ insn = bfd_get_16 (abfd, hit_data);
+ unsigned_value = insn + sym_value + reloc_entry->addend;
+ if (unsigned_value & 0xffff0000)
+ return(bfd_reloc_overflow);
+ bfd_put_16 (abfd, insn, hit_data);
+ break;
+ case R_WORD:
+ insn = bfd_get_32 (abfd, hit_data);
+ insn += sym_value + reloc_entry->addend;
+ bfd_put_32 (abfd, insn, hit_data);
+ break;
+ default:
+ *error_message = _("Unrecognized reloc");
+ return (bfd_reloc_dangerous);
}
- /* sym_ptr_ptr = r_symndx, in coff_slurp_reloc_table() */
- unsigned_value = 0; /*EXTRACT_HWORD(insn) << 16;*/
- unsigned_value += reloc_entry->addend; /* r_symndx */
- unsigned_value += part1_consth_value;
- unsigned_value = unsigned_value >> 16;
- insn = INSERT_HWORD(insn, unsigned_value);
- part1_consth_active = false;
- bfd_put_32(abfd, insn, hit_data);
- break;
- case R_BYTE:
- insn = bfd_get_8(abfd, hit_data);
- unsigned_value = insn + sym_value + reloc_entry->addend;
- if (unsigned_value & 0xffffff00)
- return(bfd_reloc_overflow);
- bfd_put_8(abfd, unsigned_value, hit_data);
- break;
- case R_HWORD:
- insn = bfd_get_16(abfd, hit_data);
- unsigned_value = insn + sym_value + reloc_entry->addend;
- if (unsigned_value & 0xffff0000)
- return(bfd_reloc_overflow);
- bfd_put_16(abfd, insn, hit_data);
- break;
- case R_WORD:
- insn = bfd_get_32(abfd, hit_data);
- insn += sym_value + reloc_entry->addend;
- bfd_put_32(abfd, insn, hit_data);
- break;
- default:
- *error_message = _("Unrecognized reloc");
- return (bfd_reloc_dangerous);
- }
-
-
- return(bfd_reloc_ok);
+
+ return(bfd_reloc_ok);
}
/* type rightshift
@@ -228,12 +228,12 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
complain_on_overflow
special_function
relocation name
- partial_inplace
+ partial_inplace
src_mask
*/
/*FIXME: I'm not real sure about this table */
-static reloc_howto_type howto_table[] =
+static reloc_howto_type howto_table[] =
{
{R_ABS, 0, 3, 32, false, 0, complain_overflow_bitfield,a29k_reloc,"ABS", true, 0xffffffff,0xffffffff, false},
EMPTY_HOWTO (1),
@@ -282,49 +282,49 @@ reloc_processing (relent,reloc, symbols, abfd, section)
bfd *abfd;
asection *section;
{
- static bfd_vma ihihalf_vaddr = (bfd_vma) -1;
+ static bfd_vma ihihalf_vaddr = (bfd_vma) -1;
- relent->address = reloc->r_vaddr;
- relent->howto = howto_table + reloc->r_type;
- if (reloc->r_type == R_IHCONST)
- {
+ relent->address = reloc->r_vaddr;
+ relent->howto = howto_table + reloc->r_type;
+ if (reloc->r_type == R_IHCONST)
+ {
/* The address of an R_IHCONST should always be the address of
the immediately preceding R_IHIHALF. relocs generated by gas
are correct, but relocs generated by High C are different (I
can't figure out what the address means for High C). We can
handle both gas and High C by ignoring the address here, and
simply reusing the address saved for R_IHIHALF. */
- if (ihihalf_vaddr == (bfd_vma) -1)
- abort ();
- relent->address = ihihalf_vaddr;
- ihihalf_vaddr = (bfd_vma) -1;
- relent->addend = reloc->r_symndx;
- relent->sym_ptr_ptr= bfd_abs_section_ptr->symbol_ptr_ptr;
+ if (ihihalf_vaddr == (bfd_vma) -1)
+ abort ();
+ relent->address = ihihalf_vaddr;
+ ihihalf_vaddr = (bfd_vma) -1;
+ relent->addend = reloc->r_symndx;
+ relent->sym_ptr_ptr= bfd_abs_section_ptr->symbol_ptr_ptr;
}
- else
+ else
{
asymbol *ptr;
relent->sym_ptr_ptr = symbols + obj_convert(abfd)[reloc->r_symndx];
ptr = *(relent->sym_ptr_ptr);
- if (ptr
- && bfd_asymbol_bfd(ptr) == abfd
+ if (ptr
+ && bfd_asymbol_bfd(ptr) == abfd
- && ((ptr->flags & BSF_OLD_COMMON)== 0))
- {
+ && ((ptr->flags & BSF_OLD_COMMON)== 0))
+ {
relent->addend = 0;
- }
+ }
else
- {
- relent->addend = 0;
- }
+ {
+ relent->addend = 0;
+ }
relent->address-= section->vma;
if (reloc->r_type == R_IHIHALF)
ihihalf_vaddr = relent->address;
else if (ihihalf_vaddr != (bfd_vma) -1)
abort ();
- }
+ }
}
/* The reloc processing routine for the optimized COFF linker. */
@@ -570,7 +570,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
rel->r_vaddr - input_section->vma)))
return false;
}
- }
+ }
return true;
}
@@ -580,7 +580,6 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
/* We don't want to change the symndx of a R_IHCONST reloc, since it
is actually an addend, not a symbol index at all. */
-/*ARGSUSED*/
static boolean
coff_a29k_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
bfd *obfd ATTRIBUTE_UNUSED;
diff --git a/gnu/usr.bin/binutils/bfd/coff-alpha.c b/gnu/usr.bin/binutils/bfd/coff-alpha.c
index 6bbc279aeea..b3cd0c79d46 100644
--- a/gnu/usr.bin/binutils/bfd/coff-alpha.c
+++ b/gnu/usr.bin/binutils/bfd/coff-alpha.c
@@ -1,5 +1,6 @@
/* BFD back-end for ALPHA Extended-Coff files.
- Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
@@ -127,13 +128,13 @@ reloc_nil PARAMS ((bfd *, arelent *, asymbol *, PTR,
static bfd_reloc_status_type
reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc;
- asymbol *sym;
- PTR data;
- asection *sec;
- bfd *output_bfd;
- char **error_message;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc ATTRIBUTE_UNUSED;
+ asymbol *sym ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ char **error_message ATTRIBUTE_UNUSED;
{
return bfd_reloc_ok;
}
@@ -472,7 +473,7 @@ alpha_ecoff_object_p (abfd)
static boolean
alpha_ecoff_bad_format_hook (abfd, filehdr)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
PTR filehdr;
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@@ -707,7 +708,7 @@ alpha_adjust_reloc_in (abfd, intern, rptr)
static void
alpha_adjust_reloc_out (abfd, rel, intern)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const arelent *rel;
struct internal_reloc *intern;
{
@@ -924,7 +925,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
does not cause anything to happen, itself. */
rel->address += input_section->output_offset;
break;
-
+
case ALPHA_R_GPDISP:
/* This marks the ldah of an ldah/lda pair which loads the
gp register with the difference of the gp value and the
@@ -980,7 +981,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
rel->address += input_section->output_offset;
}
break;
-
+
case ALPHA_R_OP_PUSH:
/* Push a value on the reloc evaluation stack. */
{
@@ -1106,7 +1107,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
stack[tos - 1] >>= relocation;
}
break;
-
+
case ALPHA_R_GPVALUE:
/* I really don't know if this does the right thing. */
gp = rel->addend;
@@ -1126,7 +1127,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
os->reloc_count++;
}
- if (r != bfd_reloc_ok)
+ if (r != bfd_reloc_ok)
{
switch (r)
{
@@ -1136,7 +1137,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
input_bfd, input_section, rel->address, true)))
goto error_return;
break;
- case bfd_reloc_dangerous:
+ case bfd_reloc_dangerous:
if (! ((*link_info->callbacks->reloc_dangerous)
(link_info, err, input_bfd, input_section,
rel->address)))
@@ -1175,7 +1176,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
static reloc_howto_type *
alpha_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
int alpha_type;
@@ -1249,7 +1250,7 @@ alpha_bfd_reloc_type_lookup (abfd, code)
static bfd_vma
alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
bfd *input_bfd;
struct external_reloc *ext_rel;
@@ -1332,7 +1333,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
r_symndx = RELOC_SECTION_XDATA;
break;
}
-
+
if (r_symndx == -1)
abort ();
@@ -1437,7 +1438,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
pointer. To support large programs, we need to allow multiple
global pointers. This works as long as each input .lita section
is <64KB big. This implies that when producing relocatable
- output, the .lita section is limited to 64KB. . */
+ output, the .lita section is limited to 64KB. . */
lita_sec = symndx_to_section[RELOC_SECTION_LITA];
gp = _bfd_get_gp_value (output_bfd);
@@ -1619,7 +1620,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
/* See ALPHA_R_LITERAL above for the uses of this reloc. It
does not cause anything to happen, itself. */
break;
-
+
case ALPHA_R_GPDISP:
/* This marks the ldah of an ldah/lda pair which loads the
gp register with the difference of the gp value and the
@@ -1679,7 +1680,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
gp_usedp = true;
}
break;
-
+
case ALPHA_R_OP_PUSH:
case ALPHA_R_OP_PSUB:
case ALPHA_R_OP_PRSHIFT:
@@ -2008,12 +2009,11 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
/* Do final adjustments to the filehdr and the aouthdr. This routine
sets the dynamic bits in the file header. */
-/*ARGSUSED*/
static boolean
alpha_adjust_headers (abfd, fhdr, ahdr)
bfd *abfd;
struct internal_filehdr *fhdr;
- struct internal_aouthdr *ahdr;
+ struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED;
{
if ((abfd->flags & (DYNAMIC | EXEC_P)) == (DYNAMIC | EXEC_P))
fhdr->f_flags |= F_ALPHA_CALL_SHARED;
@@ -2136,7 +2136,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
left = size;
- /* I don't know what the next eight bytes are for. */
+ /* I don't know what the next eight bytes are for. */
if (bfd_read (ab, 1, 8, nbfd) != 8)
goto error_return;
@@ -2201,7 +2201,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
error_return:
if (nbfd != NULL)
bfd_close (nbfd);
- return NULL;
+ return NULL;
}
/* Open the next archived file. */
@@ -2229,7 +2229,7 @@ alpha_ecoff_openr_next_archived_file (archive, last_file)
/* Pad to an even boundary...
Note that last_file->origin can be odd in the case of
- BSD-4.4-style element with a long odd size. */
+ BSD-4.4-style element with a long odd size. */
filestart = last_file->origin + size;
filestart += filestart % 2;
}
@@ -2266,7 +2266,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
(unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out,
alpha_ecoff_swap_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4,
+ FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4, false, 2,
alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in,
alpha_ecoff_swap_scnhdr_in, NULL,
alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
@@ -2400,6 +2400,6 @@ const bfd_target ecoffalpha_little_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) &alpha_ecoff_backend_data
};
diff --git a/gnu/usr.bin/binutils/bfd/coff-apollo.c b/gnu/usr.bin/binutils/bfd/coff-apollo.c
index 6075d52b1e9..0a18dce2e3b 100644
--- a/gnu/usr.bin/binutils/bfd/coff-apollo.c
+++ b/gnu/usr.bin/binutils/bfd/coff-apollo.c
@@ -1,5 +1,6 @@
/* BFD back-end for Apollo 68000 COFF binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000
+ Free Software Foundation, Inc.
By Troy Rollo (troy@cbme.unsw.edu.au)
Based on m68k standard COFF version Written by Cygnus Support.
@@ -31,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef ONLY_DECLARE_RELOCS
extern reloc_howto_type apollocoff_howto_table[];
#else
-reloc_howto_type apollocoff_howto_table[] =
+reloc_howto_type apollocoff_howto_table[] =
{
HOWTO(R_RELBYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "8", true, 0x000000ff,0x000000ff, false),
HOWTO(R_RELWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "16", true, 0x0000ffff,0x0000ffff, false),
@@ -59,7 +60,7 @@ apollo_rtype2howto(internal, relocentry)
arelent *internal;
int relocentry;
{
- switch (relocentry)
+ switch (relocentry)
{
case R_RELBYTE: internal->howto = apollocoff_howto_table + 0; break;
case R_RELWORD: internal->howto = apollocoff_howto_table + 1; break;
@@ -71,13 +72,13 @@ apollo_rtype2howto(internal, relocentry)
}
}
-int
+int
apollo_howto2rtype (internal)
reloc_howto_type *internal;
{
- if (internal->pc_relative)
+ if (internal->pc_relative)
{
- switch (internal->bitsize)
+ switch (internal->bitsize)
{
case 32: return R_PCRLONG;
case 16: return R_PCRWORD;
@@ -93,7 +94,7 @@ apollo_howto2rtype (internal)
case 8: return R_RELBYTE;
}
}
- return R_RELLONG;
+ return R_RELLONG;
}
#endif /* not ONLY_DECLARE_RELOCS */
diff --git a/gnu/usr.bin/binutils/bfd/coff-arm.c b/gnu/usr.bin/binutils/bfd/coff-arm.c
index 2b89b848c8c..8bb4e6c4940 100644
--- a/gnu/usr.bin/binutils/bfd/coff-arm.c
+++ b/gnu/usr.bin/binutils/bfd/coff-arm.c
@@ -1,5 +1,6 @@
/* BFD back-end for ARM COFF files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -51,13 +52,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef NUM_ELEM
#define NUM_ELEM(a) ((sizeof (a)) / sizeof ((a)[0]))
#endif
-
+
typedef enum {bunknown, b9, b12, b23} thumb_pcrel_branchtype;
/* some typedefs for holding instructions */
typedef unsigned long int insn32;
typedef unsigned short int insn16;
-
/* Forward declarations for stupid compilers. */
static boolean coff_arm_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
@@ -77,7 +77,7 @@ static bfd_reloc_status_type coff_arm_reloc
static boolean coff_arm_adjust_symndx
PARAMS ((bfd *, struct bfd_link_info *, bfd *,
asection *, struct internal_reloc *, boolean *));
-static reloc_howto_type * coff_arm_rtype_to_howto
+static reloc_howto_type * coff_arm_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
static bfd_reloc_status_type coff_thumb_pcrel_common
@@ -119,14 +119,14 @@ static boolean coff_arm_final_link_postscript
Given a function name, and its type, the stub can be found. The
name can be changed. The only requirement is the %s be present.
*/
-
+
#define THUMB2ARM_GLUE_SECTION_NAME ".glue_7t"
#define THUMB2ARM_GLUE_ENTRY_NAME "__%s_from_thumb"
#define ARM2THUMB_GLUE_SECTION_NAME ".glue_7"
#define ARM2THUMB_GLUE_ENTRY_NAME "__%s_from_arm"
-/* Used by the assembler. */
+/* Used by the assembler. */
static bfd_reloc_status_type
coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
error_message)
@@ -232,14 +232,14 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
#define ARM_SECREL 15
#endif
-static reloc_howto_type aoutarm_std_reloc_howto[] =
+static reloc_howto_type aoutarm_std_reloc_howto[] =
{
/* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */
#ifdef ARM_WINCE
EMPTY_HOWTO (-1),
- HOWTO (ARM_32,
+ HOWTO (ARM_32,
0,
- 2,
+ 2,
32,
false,
0,
@@ -250,9 +250,9 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0xffffffff,
0xffffffff,
PCRELOFFSET),
- HOWTO (ARM_RVA32,
+ HOWTO (ARM_RVA32,
0,
- 2,
+ 2,
32,
false,
0,
@@ -274,7 +274,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
"ARM_26",
false,
0x00ffffff,
- 0x00ffffff,
+ 0x00ffffff,
PCRELOFFSET),
HOWTO (ARM_THUMB12,
1,
@@ -287,16 +287,16 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
"ARM_THUMB12",
false,
0x000007ff,
- 0x000007ff,
+ 0x000007ff,
PCRELOFFSET),
- HOWTO (ARM_26D,
- 2,
+ HOWTO (ARM_26D,
+ 2,
2,
24,
false,
0,
complain_overflow_dont,
- aoutarm_fix_pcrel_26_done,
+ aoutarm_fix_pcrel_26_done,
"ARM_26D",
true,
0x00ffffff,
@@ -310,22 +310,22 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
- HOWTO (ARM_SECTION,
- 0,
- 1,
- 16,
+ HOWTO (ARM_SECTION,
+ 0,
+ 1,
+ 16,
false,
0,
complain_overflow_bitfield,
coff_arm_reloc,
- "ARM_16",
+ "ARM_16",
true,
0x0000ffff,
- 0x0000ffff,
+ 0x0000ffff,
PCRELOFFSET),
- HOWTO (ARM_SECREL,
+ HOWTO (ARM_SECREL,
0,
- 2,
+ 2,
32,
false,
0,
@@ -350,22 +350,22 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
PCRELOFFSET /* pcrel_offset */),
- HOWTO(ARM_16,
- 0,
- 1,
- 16,
+ HOWTO(ARM_16,
+ 0,
+ 1,
+ 16,
false,
0,
complain_overflow_bitfield,
coff_arm_reloc,
- "ARM_16",
+ "ARM_16",
true,
0x0000ffff,
- 0x0000ffff,
+ 0x0000ffff,
PCRELOFFSET),
- HOWTO(ARM_32,
+ HOWTO(ARM_32,
0,
- 2,
+ 2,
32,
false,
0,
@@ -387,28 +387,28 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
"ARM_26",
false,
0x00ffffff,
- 0x00ffffff,
+ 0x00ffffff,
PCRELOFFSET),
- HOWTO(ARM_DISP8,
+ HOWTO(ARM_DISP8,
0,
0,
- 8,
+ 8,
true,
0,
- complain_overflow_signed,
+ complain_overflow_signed,
coff_arm_reloc,
- "ARM_DISP8",
+ "ARM_DISP8",
true,
0x000000ff,
0x000000ff,
true),
- HOWTO( ARM_DISP16,
+ HOWTO( ARM_DISP16,
0,
1,
16,
true,
0,
- complain_overflow_signed,
+ complain_overflow_signed,
coff_arm_reloc,
"ARM_DISP16",
true,
@@ -421,21 +421,21 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
32,
true,
0,
- complain_overflow_signed,
+ complain_overflow_signed,
coff_arm_reloc,
"ARM_DISP32",
true,
0xffffffff,
0xffffffff,
true),
- HOWTO( ARM_26D,
- 2,
+ HOWTO( ARM_26D,
+ 2,
2,
24,
false,
0,
complain_overflow_dont,
- aoutarm_fix_pcrel_26_done,
+ aoutarm_fix_pcrel_26_done,
"ARM_26D",
true,
0x00ffffff,
@@ -448,16 +448,16 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
-1,
16,
false,
- 0,
+ 0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_NEG16",
- true,
+ true,
+ 0x0000ffff,
0x0000ffff,
- 0x0000ffff,
false),
- HOWTO( ARM_NEG32,
- 0,
+ HOWTO( ARM_NEG32,
+ 0,
-2,
32,
false,
@@ -469,9 +469,9 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0xffffffff,
0xffffffff,
false),
- HOWTO( ARM_RVA32,
+ HOWTO( ARM_RVA32,
0,
- 2,
+ 2,
32,
false,
0,
@@ -493,7 +493,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
"ARM_THUMB9",
false,
0x000000ff,
- 0x000000ff,
+ 0x000000ff,
PCRELOFFSET),
HOWTO( ARM_THUMB12,
1,
@@ -506,7 +506,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
"ARM_THUMB12",
false,
0x000007ff,
- 0x000007ff,
+ 0x000007ff,
PCRELOFFSET),
HOWTO( ARM_THUMB23,
1,
@@ -519,7 +519,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
"ARM_THUMB23",
false,
0x07ff07ff,
- 0x07ff07ff,
+ 0x07ff07ff,
PCRELOFFSET)
#endif /* not ARM_WINCE */
};
@@ -528,7 +528,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
#ifdef COFF_WITH_PE
/* Return true if this relocation should
- appear in the output .reloc section. */
+ appear in the output .reloc section. */
static boolean
in_reloc_p (abfd, howto)
@@ -536,7 +536,7 @@ in_reloc_p (abfd, howto)
reloc_howto_type * howto;
{
return !howto->pc_relative && howto->type != ARM_RVA32;
-}
+}
#endif
#define RTYPE2HOWTO(cache_ptr, dst) \
@@ -560,7 +560,7 @@ coff_arm_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
if (rel->r_type >= NUM_RELOCS)
return NULL;
-
+
howto = aoutarm_std_reloc_howto + rel->r_type;
if (rel->r_type == ARM_RVA32)
@@ -568,7 +568,7 @@ coff_arm_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
return howto;
}
-/* Used by the assembler. */
+/* Used by the assembler. */
static bfd_reloc_status_type
aoutarm_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section,
@@ -585,7 +585,7 @@ aoutarm_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section,
return bfd_reloc_ok;
}
-/* Used by the assembler. */
+/* Used by the assembler. */
static bfd_reloc_status_type
aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
@@ -602,7 +602,7 @@ aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
bfd_size_type addr = reloc_entry->address;
long target = bfd_get_32 (abfd, (bfd_byte *) data + addr);
bfd_reloc_status_type flag = bfd_reloc_ok;
-
+
/* If this is an undefined symbol, return error */
if (symbol->section == &bfd_und_section
&& (symbol->flags & BSF_WEAK) == 0)
@@ -623,7 +623,7 @@ aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
relocation -= input_section->output_section->vma;
relocation -= input_section->output_offset;
relocation -= addr;
-
+
if (relocation & 3)
return bfd_reloc_overflow;
@@ -693,7 +693,7 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
default:
abort ();
}
-
+
/* If this is an undefined symbol, return error */
if (symbol->section == &bfd_und_section
&& (symbol->flags & BSF_WEAK) == 0)
@@ -768,7 +768,7 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
/* Now the ARM magic... Change the reloc type so that it is marked as done.
Strictly this is only necessary if we are doing a partial relocation. */
reloc_entry->howto = & aoutarm_std_reloc_howto [ARM_26D];
-
+
/* TODO: We should possibly have DONE entries for the THUMB PCREL relocations */
return flag;
}
@@ -818,14 +818,13 @@ coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section,
input_section, output_bfd, error_message, b9);
}
-
static CONST struct reloc_howto_struct *
coff_arm_reloc_type_lookup (abfd, code)
bfd * abfd;
bfd_reloc_code_real_type code;
{
#define ASTD(i,j) case i: return aoutarm_std_reloc_howto + j
-
+
if (code == BFD_RELOC_CTOR)
switch (bfd_get_arch_info (abfd)->bits_per_address)
{
@@ -847,6 +846,7 @@ coff_arm_reloc_type_lookup (abfd, code)
ASTD (BFD_RELOC_16, ARM_16);
ASTD (BFD_RELOC_32, ARM_32);
ASTD (BFD_RELOC_ARM_PCREL_BRANCH, ARM_26);
+ ASTD (BFD_RELOC_ARM_PCREL_BLX, ARM_26);
ASTD (BFD_RELOC_8_PCREL, ARM_DISP8);
ASTD (BFD_RELOC_16_PCREL, ARM_DISP16);
ASTD (BFD_RELOC_32_PCREL, ARM_DISP32);
@@ -854,7 +854,8 @@ coff_arm_reloc_type_lookup (abfd, code)
ASTD (BFD_RELOC_THUMB_PCREL_BRANCH9, ARM_THUMB9);
ASTD (BFD_RELOC_THUMB_PCREL_BRANCH12, ARM_THUMB12);
ASTD (BFD_RELOC_THUMB_PCREL_BRANCH23, ARM_THUMB23);
-#endif
+ ASTD (BFD_RELOC_THUMB_PCREL_BLX, ARM_THUMB23);
+#endif
default: return (CONST struct reloc_howto_struct *) 0;
}
}
@@ -874,17 +875,17 @@ struct coff_arm_link_hash_table
{
/* The original coff_link_hash_table structure. MUST be first field. */
struct coff_link_hash_table root;
-
+
/* The size in bytes of the section containg the Thumb-to-ARM glue. */
long int thumb_glue_size;
-
+
/* The size in bytes of the section containg the ARM-to-Thumb glue. */
long int arm_glue_size;
/* An arbitary input BFD chosen to hold the glue sections. */
bfd * bfd_of_glue_owner;
- /* Support interworking with old, non-interworking aware ARM code. */
+ /* Support interworking with old, non-interworking aware ARM code. */
int support_old_code;
};
@@ -939,16 +940,16 @@ arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset)
/* The thumb form of a long branch is a bit finicky, because the offset
encoding is split over two fields, each in it's own instruction. They
- can occur in any order. So given a thumb form of long branch, and an
+ can occur in any order. So given a thumb form of long branch, and an
offset, insert the offset into the thumb branch and return finished
- instruction.
+ instruction.
- It takes two thumb instructions to encode the target address. Each has
+ It takes two thumb instructions to encode the target address. Each has
11 bits to invest. The upper 11 bits are stored in one (identifed by
- H-0.. see below), the lower 11 bits are stored in the other (identified
- by H-1).
+ H-0.. see below), the lower 11 bits are stored in the other (identified
+ by H-1).
- Combine together and shifted left by 1 (it's a half word address) and
+ Combine together and shifted left by 1 (it's a half word address) and
there you have it.
Op: 1111 = F,
@@ -956,7 +957,7 @@ arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset)
Op: 1111 = F,
H-1, lower address-0 = 800
- They can be ordered either way, but the arm tools I've seen always put
+ They can be ordered either way, but the arm tools I've seen always put
the lower one first. It probably doesn't matter. krk@cygnus.com
XXX: Actually the order does matter. The second instruction (H-1)
@@ -976,7 +977,6 @@ insert_thumb_branch (br_insn, rel_off)
unsigned int low_bits;
unsigned int high_bits;
-
BFD_ASSERT((rel_off & 1) != 1);
rel_off >>= 1; /* half word aligned address */
@@ -988,13 +988,12 @@ insert_thumb_branch (br_insn, rel_off)
else if ((br_insn & HI_LOW_ORDER) == HI_LOW_ORDER)
br_insn = HI_LOW_ORDER | (high_bits << 16) | low_bits;
else
- abort(); /* error - not a valid branch instruction form */
+ abort (); /* error - not a valid branch instruction form */
/* FIXME: abort is probably not the right call. krk@cygnus.com */
return br_insn;
}
-
static struct coff_link_hash_entry *
find_thumb_glue (info, name, input_bfd)
@@ -1011,15 +1010,15 @@ find_thumb_glue (info, name, input_bfd)
BFD_ASSERT (tmp_name);
sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
-
+
myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, false, false, true);
-
+
if (myh == NULL)
/* xgettext:c-format */
_bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"),
bfd_get_filename (input_bfd), tmp_name, name);
-
+
free (tmp_name);
return myh;
@@ -1040,7 +1039,7 @@ find_arm_glue (info, name, input_bfd)
BFD_ASSERT (tmp_name);
sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
-
+
myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, false, false, true);
@@ -1048,7 +1047,7 @@ find_arm_glue (info, name, input_bfd)
/* xgettext:c-format */
_bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"),
bfd_get_filename (input_bfd), tmp_name, name);
-
+
free (tmp_name);
return myh;
@@ -1085,7 +1084,7 @@ static const insn32 a2t3_func_addr_insn = 0x00000001;
ldmia r13! {r6, lr}
bx lr
__func_addr:
- .word func
+ .word func
*/
#define THUMB2ARM_GLUE_SIZE (globals->support_old_code ? 20 : 8)
@@ -1128,10 +1127,10 @@ static const insn32 t2a6_bx_insn = 0xe12fff1e;
instruction we should generate a trampoline stub (needed to
address the complete 32bit address space). */
-/* The standard COFF backend linker does not cope with the special
+/* The standard COFF backend linker does not cope with the special
Thumb BRANCH23 relocation. The alternative would be to split the
BRANCH23 into seperate HI23 and LO23 relocations. However, it is a
- bit simpler simply providing our own relocation driver. */
+ bit simpler simply providing our own relocation driver. */
/* The reloc processing routine for the ARM/Thumb COFF linker. NOTE:
This code is a very slightly modified copy of
@@ -1179,7 +1178,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
sym = NULL;
}
else
- {
+ {
h = obj_coff_sym_hashes (input_bfd)[symndx];
sym = syms + symndx;
}
@@ -1194,7 +1193,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
else
addend = 0;
-
howto = coff_rtype_to_howto (input_bfd, input_section, rel, h,
sym, &addend);
if (howto == NULL)
@@ -1212,7 +1210,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|| h->root.type == bfd_link_hash_defweak)
&& h->root.u.def.section->output_section == input_section->output_section)
{
- static reloc_howto_type fake_arm26_reloc =
+ static reloc_howto_type fake_arm26_reloc =
HOWTO (ARM_26,
2,
2,
@@ -1224,7 +1222,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
"ARM_26",
false,
0x00ffffff,
- 0x00ffffff,
+ 0x00ffffff,
false);
addend -= rel->r_vaddr - input_section->vma;
@@ -1233,11 +1231,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
#ifdef ARM_WINCE
/* MS ARM-CE makes the reloc relative to the opcode's pc, not
- the next opcode's pc, so is off by one. */
+ the next opcode's pc, so is off by one. */
if (howto->pc_relative && !info->relocateable)
addend -= 8;
#endif
-
+
/* If we are doing a relocateable link, then we can just ignore
a PC relative reloc that is pcrel_offset. It will already
have the correct value. If this is not a relocateable link,
@@ -1246,8 +1244,21 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (info->relocateable)
continue;
+ /* FIXME - it is not clear which targets need this next test
+ and which do not. It is known that it is needed for the
+ VXworks target (hence the #ifdef), but it is also known
+ that it was supressed for other (arm) targets. This ought
+ to be sorted out one day. */
+#ifdef VXWORKS
+ /* We must not ignore the symbol value. If the symbol is
+ within the same section, the relocation should have already
+ been fixed, but if it is not, we'll be handed a reloc into
+ the beginning of the symbol's section, so we must not cancel
+ out the symbol's value, otherwise we'll be adding it in
+ twice. */
if (sym != NULL && sym->n_scnum != 0)
addend += sym->n_value;
+#endif
}
val = 0;
@@ -1277,14 +1288,14 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
relocatable output file, since we may as well leave the
stub generation to the final linker pass. If we fail to
verify that the name is defined, we'll try to build stubs
- for an undefined name... */
+ for an undefined name... */
if (! info->relocateable
&& ( h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak))
{
asection * h_sec = h->root.u.def.section;
const char * name = h->root.root.string;
-
+
/* h locates the symbol referenced in the reloc. */
h_val = (h->root.u.def.value
+ h_sec->output_section->vma
@@ -1300,9 +1311,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
long int my_offset;
asection * s;
long int ret_offset;
- struct coff_link_hash_entry * myh;
+ struct coff_link_hash_entry * myh;
struct coff_arm_link_hash_table * globals;
-
+
myh = find_arm_glue (info, name, input_bfd);
if (myh == NULL)
return false;
@@ -1311,10 +1322,10 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
+
my_offset = myh->root.u.def.value;
-
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
+
+ s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
ARM2THUMB_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->contents != NULL);
@@ -1341,16 +1352,16 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_put_32 (output_bfd, a2t1_ldr_insn,
s->contents + my_offset);
-
+
bfd_put_32 (output_bfd, a2t2_bx_r12_insn,
s->contents + my_offset + 4);
-
+
/* It's a thumb address. Add the low order bit. */
bfd_put_32 (output_bfd, h_val | a2t3_func_addr_insn,
s->contents + my_offset + 8);
if (info->base_file)
- arm_emit_base_file_entry (info, output_bfd, s,
+ arm_emit_base_file_entry (info, output_bfd, s,
my_offset + 8);
}
@@ -1359,32 +1370,32 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
tmp = bfd_get_32 (input_bfd, contents + rel->r_vaddr
- input_section->vma);
-
+
tmp = tmp & 0xFF000000;
- /* Somehow these are both 4 too far, so subtract 8. */
+ /* Somehow these are both 4 too far, so subtract 8. */
ret_offset =
s->output_offset
- + my_offset
+ + my_offset
+ s->output_section->vma
- (input_section->output_offset
- + input_section->output_section->vma
+ + input_section->output_section->vma
+ rel->r_vaddr)
- 8;
tmp = tmp | ((ret_offset >> 2) & 0x00FFFFFF);
-
+
bfd_put_32 (output_bfd, tmp, contents + rel->r_vaddr
- input_section->vma);
done = 1;
}
}
-
+
#ifndef ARM_WINCE
/* Note: We used to check for ARM_THUMB9 and ARM_THUMB12 */
else if (howto->type == ARM_THUMB23)
{
- if ( h->class == C_EXT
+ if ( h->class == C_EXT
|| h->class == C_STAT
|| h->class == C_LABEL)
{
@@ -1401,19 +1412,19 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
return false;
globals = coff_arm_hash_table (info);
-
+
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
+
my_offset = myh->root.u.def.value;
-
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
+
+ s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
THUMB2ARM_GLUE_SECTION_NAME);
-
+
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->contents != NULL);
BFD_ASSERT (s->output_section != NULL);
-
+
if ((my_offset & 0x01) == 0x01)
{
if (h_sec->owner != NULL
@@ -1432,7 +1443,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_error_handler
(_(" consider relinking with --support-old-code enabled"));
}
-
+
-- my_offset;
myh->root.u.def.value = my_offset;
@@ -1440,7 +1451,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_put_16 (output_bfd, t2a1_push_insn,
s->contents + my_offset);
-
+
bfd_put_16 (output_bfd, t2a2_ldr_insn,
s->contents + my_offset + 2);
@@ -1449,13 +1460,13 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_put_16 (output_bfd, t2a4_bx_insn,
s->contents + my_offset + 6);
-
+
bfd_put_32 (output_bfd, t2a5_pop_insn,
s->contents + my_offset + 8);
-
+
bfd_put_32 (output_bfd, t2a6_bx_insn,
s->contents + my_offset + 12);
-
+
/* Store the address of the function in the last word of the stub. */
bfd_put_32 (output_bfd, h_val,
s->contents + my_offset + 16);
@@ -1467,10 +1478,10 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_put_16 (output_bfd, t2a1_bx_pc_insn,
s->contents + my_offset);
-
+
bfd_put_16 (output_bfd, t2a2_noop_insn,
s->contents + my_offset + 2);
-
+
ret_offset =
((bfd_signed_vma) h_val) /* Address of destination of the stub */
- ((bfd_signed_vma)
@@ -1479,7 +1490,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
+ s->output_section->vma) /* Address of the start of the current section. */
+ 4 /* The branch instruction is 4 bytes into the stub. */
+ 8); /* ARM branches work from the pc of the instruction + 8. */
-
+
bfd_put_32 (output_bfd,
t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
s->contents + my_offset + 4);
@@ -1497,7 +1508,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
- (input_section->output_offset
+ rel->r_vaddr)
-4;
-
+
tmp = bfd_get_32 (input_bfd, contents + rel->r_vaddr
- input_section->vma);
@@ -1505,20 +1516,20 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
insert_thumb_branch (tmp, ret_offset),
contents + rel->r_vaddr
- input_section->vma);
-
+
done = 1;
}
}
#endif
}
-
+
/* If the relocation type and destination symbol does not
fall into one of the above categories, then we can just
- perform a direct link. */
+ perform a direct link. */
if (done)
rstat = bfd_reloc_ok;
- else
+ else
#endif /* THUMBEXTENSION */
if ( h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
@@ -1542,11 +1553,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->base_file)
{
- /* Emit a reloc if the backend thinks it needs it. */
+ /* Emit a reloc if the backend thinks it needs it. */
if (sym && pe_data(output_bfd)->in_reloc_p(output_bfd, howto))
arm_emit_base_file_entry (info, output_bfd, input_section, rel->r_vaddr);
}
-
+
#if 1 /* THUMBEXTENSION */
if (done)
rstat = bfd_reloc_ok;
@@ -1562,9 +1573,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
instruction. Again, it would probably be simpler adding a
ThumbBRANCH23 specific macro expansion into the default
code. */
-
+
bfd_vma address = rel->r_vaddr - input_section->vma;
-
+
if (address > input_section->_raw_size)
rstat = bfd_reloc_outofrange;
else
@@ -1583,21 +1594,21 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_signed_vma signed_add;
BFD_ASSERT (size == 4);
-
- /* howto->pc_relative should be TRUE for type 14 BRANCH23 */
+
+ /* howto->pc_relative should be TRUE for type 14 BRANCH23. */
relocation -= (input_section->output_section->vma
+ input_section->output_offset);
-
- /* howto->pcrel_offset should be TRUE for type 14 BRANCH23 */
+
+ /* howto->pcrel_offset should be TRUE for type 14 BRANCH23. */
relocation -= address;
-
- /* No need to negate the relocation with BRANCH23. */
+
+ /* No need to negate the relocation with BRANCH23. */
/* howto->complain_on_overflow == complain_overflow_signed for BRANCH23. */
/* howto->rightshift == 1 */
+
/* Drop unwanted bits from the value we are relocating to. */
-
check = relocation >> howto->rightshift;
-
+
/* If this is a signed value, the rightshift just dropped
leading 1 bits (assuming twos complement). */
if ((bfd_signed_vma) relocation >= 0)
@@ -1606,16 +1617,12 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
signed_check = (check
| ((bfd_vma) - 1
& ~((bfd_vma) - 1 >> howto->rightshift)));
-
+
/* Get the value from the object file. */
if (bfd_big_endian (input_bfd))
- {
- add = (((x) & 0x07ff0000) >> 4) | (((x) & 0x7ff) << 1);
- }
+ add = (((x) & 0x07ff0000) >> 4) | (((x) & 0x7ff) << 1);
else
- {
- add = ((((x) & 0x7ff) << 12) | (((x) & 0x07ff0000) >> 15));
- }
+ add = ((((x) & 0x7ff) << 12) | (((x) & 0x07ff0000) >> 15));
/* Get the value from the object file with an appropriate sign.
The expression involving howto->src_mask isolates the upper
@@ -1625,18 +1632,16 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
can not get the upper bit, but that does not matter since
signed_add needs no adjustment to become negative in that
case. */
-
signed_add = add;
-
+
if ((add & (((~ src_mask) >> 1) & src_mask)) != 0)
signed_add -= (((~ src_mask) >> 1) & src_mask) << 1;
-
+
+ /* howto->bitpos == 0 */
/* Add the value from the object file, shifted so that it is a
straight number. */
- /* howto->bitpos == 0 */
-
signed_check += signed_add;
- relocation += signed_add;
+ relocation += signed_add;
BFD_ASSERT (howto->complain_on_overflow == complain_overflow_signed);
@@ -1644,22 +1649,27 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if ( signed_check > reloc_signed_max
|| signed_check < reloc_signed_min)
overflow = true;
-
- /* Put RELOCATION into the correct bits: */
-
+
+ /* For the BLX(1) instruction remove bit 0 of the adjusted offset.
+ Bit 0 can only be set if the upper insn is at a half-word boundary,
+ since the destination address, an ARM instruction, must always be
+ on a word boundary. The semantics of the BLX (1) instruction,
+ however, are that bit 0 in the offset must always be 0, and the
+ corresponding bit 1 in the target address will be set from bit
+ 1 of the source address. */
+ if ((x & 0x18000000) == 0x08000000)
+ relocation &= ~0x2;
+
+ /* Put the relocation into the correct bits. */
if (bfd_big_endian (input_bfd))
- {
- relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000));
- }
+ relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000));
else
- {
- relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff));
- }
-
- /* Add RELOCATION to the correct bits of X: */
+ relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff));
+
+ /* Add the relocation to the correct bits of X. */
x = ((x & ~howto->dst_mask) | relocation);
- /* Put the relocated value back in the object file: */
+ /* Put the relocated value back in the object file. */
bfd_put_32 (input_bfd, x, location);
rstat = overflow ? bfd_reloc_overflow : bfd_reloc_ok;
@@ -1673,7 +1683,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
rel->r_vaddr - input_section->vma,
val, addend);
#if 1 /* THUMBEXTENSION */
- /* FIXME:
+ /* FIXME:
Is this the best way to fix up thumb addresses? krk@cygnus.com
Probably not, but it works, and if it works it don't need fixing! nickc@cygnus.com */
/* Only perform this fix during the final link, not a relocatable link. nickc@cygnus.com */
@@ -1682,9 +1692,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
/* Determine if we need to set the bottom bit of a relocated address
because the address is the address of a Thumb code symbol. */
-
+
int patchit = false;
-
+
if (h != NULL
&& ( h->class == C_THUMBSTATFUNC
|| h->class == C_THUMBEXTFUNC))
@@ -1709,8 +1719,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_put_32 (input_bfd, x | 1, location);
}
}
-#endif /* THUMBEXTENSION */
-
+#endif /* THUMBEXTENSION */
+
switch (rstat)
{
default:
@@ -1754,7 +1764,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
#ifndef COFF_IMAGE_WITH_PE
boolean
-bfd_arm_allocate_interworking_sections (info)
+bfd_arm_allocate_interworking_sections (info)
struct bfd_link_info * info;
{
asection * s;
@@ -1765,24 +1775,24 @@ bfd_arm_allocate_interworking_sections (info)
#endif
globals = coff_arm_hash_table (info);
-
+
BFD_ASSERT (globals != NULL);
if (globals->arm_glue_size != 0)
{
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
+
s = bfd_get_section_by_name
(globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
-
+
foo = (bfd_byte *) bfd_alloc
(globals->bfd_of_glue_owner, globals->arm_glue_size);
#if 0
memset (foo, test_char, globals->arm_glue_size);
#endif
-
+
s->_raw_size = s->_cooked_size = globals->arm_glue_size;
s->contents = foo;
}
@@ -1790,18 +1800,18 @@ bfd_arm_allocate_interworking_sections (info)
if (globals->thumb_glue_size != 0)
{
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
+
s = bfd_get_section_by_name
(globals->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME);
BFD_ASSERT (s != NULL);
-
+
foo = (bfd_byte *) bfd_alloc
(globals->bfd_of_glue_owner, globals->thumb_glue_size);
#if 0
memset (foo, test_char, globals->thumb_glue_size);
#endif
-
+
s->_raw_size = s->_cooked_size = globals->thumb_glue_size;
s->contents = foo;
}
@@ -1836,10 +1846,10 @@ record_arm_to_thumb_glue (info, h)
BFD_ASSERT (tmp_name);
sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
-
+
myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, false, false, true);
-
+
if (myh != NULL)
{
free (tmp_name);
@@ -1851,13 +1861,13 @@ record_arm_to_thumb_glue (info, h)
it. */
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
- BSF_GLOBAL,
+ BSF_GLOBAL,
s, globals->arm_glue_size + 1,
- NULL, true, false,
+ NULL, true, false,
(struct bfd_link_hash_entry **) & myh);
-
+
free (tmp_name);
-
+
globals->arm_glue_size += ARM2THUMB_GLUE_SIZE;
return;
@@ -1874,9 +1884,8 @@ record_thumb_to_arm_glue (info, h)
struct coff_link_hash_entry * myh;
struct coff_arm_link_hash_table * globals;
-
globals = coff_arm_hash_table (info);
-
+
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
@@ -1893,7 +1902,7 @@ record_thumb_to_arm_glue (info, h)
myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, false, false, true);
-
+
if (myh != NULL)
{
free (tmp_name);
@@ -1902,35 +1911,35 @@ record_thumb_to_arm_glue (info, h)
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_GLOBAL, s, globals->thumb_glue_size + 1,
- NULL, true, false,
+ NULL, true, false,
(struct bfd_link_hash_entry **) & myh);
-
+
/* If we mark it 'thumb', the disassembler will do a better job. */
myh->class = C_THUMBEXTFUNC;
free (tmp_name);
/* Allocate another symbol to mark where we switch to arm mode. */
-
+
#define CHANGE_TO_ARM "__%s_change_to_arm"
#define BACK_FROM_ARM "__%s_back_from_arm"
-
+
tmp_name = (char *) bfd_malloc (strlen (name) + strlen (CHANGE_TO_ARM) + 1);
-
+
BFD_ASSERT (tmp_name);
-
+
sprintf (tmp_name, globals->support_old_code ? BACK_FROM_ARM : CHANGE_TO_ARM, name);
myh = NULL;
-
+
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_LOCAL, s, globals->thumb_glue_size
+ (globals->support_old_code ? 8 : 4),
- NULL, true, false,
+ NULL, true, false,
(struct bfd_link_hash_entry **) & myh);
- free (tmp_name);
-
+ free (tmp_name);
+
globals->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
return;
@@ -1948,27 +1957,27 @@ bfd_arm_get_bfd_for_interworking (abfd, info)
struct coff_arm_link_hash_table * globals;
flagword flags;
asection * sec;
-
+
/* If we are only performing a partial link do not bother
getting a bfd to hold the glue. */
if (info->relocateable)
return true;
-
+
globals = coff_arm_hash_table (info);
-
+
BFD_ASSERT (globals != NULL);
if (globals->bfd_of_glue_owner != NULL)
return true;
-
+
sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
-
- if (sec == NULL)
+
+ if (sec == NULL)
{
flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
-
+
sec = bfd_make_section (abfd, ARM2THUMB_GLUE_SECTION_NAME);
-
+
if (sec == NULL
|| ! bfd_set_section_flags (abfd, sec, flags)
|| ! bfd_set_section_alignment (abfd, sec, 2))
@@ -1977,21 +1986,21 @@ bfd_arm_get_bfd_for_interworking (abfd, info)
sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME);
- if (sec == NULL)
+ if (sec == NULL)
{
flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
-
+
sec = bfd_make_section (abfd, THUMB2ARM_GLUE_SECTION_NAME);
-
+
if (sec == NULL
|| ! bfd_set_section_flags (abfd, sec, flags)
|| ! bfd_set_section_alignment (abfd, sec, 2))
return false;
}
-
+
/* Save the bfd for later use. */
globals->bfd_of_glue_owner = abfd;
-
+
return true;
}
@@ -2008,19 +2017,19 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
to construct any glue. */
if (info->relocateable)
return true;
-
+
/* Here we have a bfd that is to be included on the link. We have a hook
to do reloc rummaging, before section sizes are nailed down. */
_bfd_coff_get_external_symbols (abfd);
globals = coff_arm_hash_table (info);
-
+
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
globals->support_old_code = support_old_code;
-
+
/* Rummage around all the relocs and map the glue vectors. */
sec = abfd->sections;
@@ -2032,17 +2041,17 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
struct internal_reloc * i;
struct internal_reloc * rel;
- if (sec->reloc_count == 0)
+ if (sec->reloc_count == 0)
continue;
/* Load the relocs. */
- /* FIXME: there may be a storage leak here. */
-
+ /* FIXME: there may be a storage leak here. */
+
i = _bfd_coff_read_internal_relocs (abfd, sec, 1, 0, 0, 0);
-
+
BFD_ASSERT (i != 0);
- for (rel = i; rel < i + sec->reloc_count; ++rel)
+ for (rel = i; rel < i + sec->reloc_count; ++rel)
{
unsigned short r_type = rel->r_type;
long symndx;
@@ -2050,7 +2059,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
symndx = rel->r_symndx;
- /* If the relocation is not against a symbol it cannot concern us. */
+ /* If the relocation is not against a symbol it cannot concern us. */
if (symndx == -1)
continue;
@@ -2061,7 +2070,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
bfd_get_filename (abfd), symndx);
continue;
}
-
+
h = obj_coff_sym_hashes (abfd)[symndx];
/* If the relocation is against a static symbol it must be within
@@ -2075,11 +2084,11 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
/* This one is a call from arm code. We need to look up
the target of the call. If it is a thumb target, we
insert glue. */
-
+
if (h->class == C_THUMBEXTFUNC)
record_arm_to_thumb_glue (info, h);
break;
-
+
#ifndef ARM_WINCE
case ARM_THUMB23:
/* This one is a call from thumb code. We used to look
@@ -2102,7 +2111,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
}
break;
#endif
-
+
default:
break;
}
@@ -2126,7 +2135,6 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
#define coff_bfd_copy_private_bfd_data coff_arm_copy_private_bfd_data
#define coff_bfd_link_hash_table_create coff_arm_link_hash_table_create
-
/* When doing a relocateable link, we want to convert ARM26 relocs
into ARM26D relocs. */
@@ -2194,7 +2202,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
bfd_set_error (bfd_error_wrong_format);
return false;
}
-
+
if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd))
{
const char *msg;
@@ -2205,14 +2213,14 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
else
/* xgettext: c-format */
msg = _("%s: ERROR: passes floats in integer registers whereas target %s uses float registers");
-
+
_bfd_error_handler (msg, bfd_get_filename (ibfd),
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
return false;
}
-
+
if (PIC_FLAG (obfd) != PIC_FLAG (ibfd))
{
const char * msg;
@@ -2233,7 +2241,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
else
{
SET_APCS_FLAGS (obfd, APCS_26_FLAG (ibfd) | APCS_FLOAT_FLAG (ibfd) | PIC_FLAG (ibfd));
-
+
/* Set up the arch and fields as well as these are probably wrong. */
bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd));
}
@@ -2255,7 +2263,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
else
/* xgettext: c-format */
msg = _("Warning: input file %s does not support interworking, whereas %s does.");
-
+
_bfd_error_handler (msg, bfd_get_filename (ibfd),
bfd_get_filename (obfd));
}
@@ -2269,7 +2277,6 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
return true;
}
-
/* Display the flags field. */
static boolean
@@ -2278,12 +2285,12 @@ coff_arm_print_private_bfd_data (abfd, ptr)
PTR ptr;
{
FILE * file = (FILE *) ptr;
-
+
BFD_ASSERT (abfd != NULL && ptr != NULL);
-
+
/* xgettext:c-format */
fprintf (file, _("private flags = %x:"), coff_data (abfd)->flags);
-
+
if (APCS_SET (abfd))
{
/* xgettext: APCS is ARM Prodecure Call Standard, it should not be translated. */
@@ -2299,20 +2306,19 @@ coff_arm_print_private_bfd_data (abfd, ptr)
else
fprintf (file, _(" [absolute position]"));
}
-
+
if (! INTERWORK_SET (abfd))
fprintf (file, _(" [interworking flag not initialised]"));
else if (INTERWORK_FLAG (abfd))
fprintf (file, _(" [interworking supported]"));
else
fprintf (file, _(" [interworking not supported]"));
-
+
fputc ('\n', file);
-
+
return true;
}
-
/* Copies the given flags into the coff_tdata.flags field.
Typically these flags come from the f_flags[] field of
the COFF filehdr structure, which contains important,
@@ -2330,7 +2336,7 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
BFD_ASSERT (abfd != NULL);
flag = (flags & F_APCS26) ? F_APCS_26 : 0;
-
+
/* Make sure that the APCS field has not been initialised to the opposite
value. */
if (APCS_SET (abfd)
@@ -2341,11 +2347,11 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
return false;
flag |= (flags & (F_APCS_FLOAT | F_PIC));
-
+
SET_APCS_FLAGS (abfd, flag);
flag = (flags & F_INTERWORK);
-
+
/* If the BFD has already had its interworking flag set, but it
is different from the value that we have been asked to set,
then assume that that merged code will not support interworking
@@ -2368,7 +2374,6 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
return true;
}
-
/* Copy the important parts of the target specific data
from one instance of a BFD to another. */
@@ -2378,7 +2383,7 @@ coff_arm_copy_private_bfd_data (src, dest)
bfd * dest;
{
BFD_ASSERT (src != NULL && dest != NULL);
-
+
if (src == dest)
return true;
@@ -2395,10 +2400,10 @@ coff_arm_copy_private_bfd_data (src, dest)
/* If the src and dest have different APCS flag bits set, fail. */
if (APCS_26_FLAG (dest) != APCS_26_FLAG (src))
return false;
-
+
if (APCS_FLOAT_FLAG (dest) != APCS_FLOAT_FLAG (src))
return false;
-
+
if (PIC_FLAG (dest) != PIC_FLAG (src))
return false;
}
@@ -2422,7 +2427,7 @@ coff_arm_copy_private_bfd_data (src, dest)
bfd_get_filename (dest),
bfd_get_filename (src));
}
-
+
SET_INTERWORK_FLAG (dest, 0);
}
}
@@ -2436,8 +2441,8 @@ coff_arm_copy_private_bfd_data (src, dest)
}
/* Note: the definitions here of LOCAL_LABEL_PREFIX and USER_LABEL_PREIFX
- *must* match the definitions in gcc/config/arm/coff.h and semi.h */
-#define LOCAL_LABEL_PREFIX "."
+ *must* match the definitions in gcc/config/arm/{coff|semi|aout}.h. */
+#define LOCAL_LABEL_PREFIX ""
#ifndef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX "_"
#endif
@@ -2462,28 +2467,28 @@ coff_arm_is_local_label_name (abfd, name)
#ifdef LOCAL_LABEL_PREFIX
/* If there is a prefix for local labels then look for this.
- If the prefix exists, but it is empty, then ignore the test. */
-
+ If the prefix exists, but it is empty, then ignore the test. */
+
if (LOCAL_LABEL_PREFIX[0] != 0)
{
int len = strlen (LOCAL_LABEL_PREFIX);
-
+
if (strncmp (name, LOCAL_LABEL_PREFIX, len) != 0)
return false;
-
+
/* Perform the checks below for the rest of the name. */
name += len;
}
#endif
-
+
return name[0] == 'L';
}
/* This piece of machinery exists only to guarantee that the bfd that holds
- the glue section is written last.
+ the glue section is written last.
This does depend on bfd_make_section attaching a new section to the
- end of the section list for the bfd.
+ end of the section list for the bfd.
krk@cygnus.com */
@@ -2504,17 +2509,17 @@ coff_arm_final_link_postscript (abfd, pfinfo)
struct coff_arm_link_hash_table * globals;
globals = coff_arm_hash_table (pfinfo->info);
-
+
BFD_ASSERT (globals != NULL);
-
+
if (globals->bfd_of_glue_owner != NULL)
{
if (! _bfd_coff_link_input_bfd (pfinfo, globals->bfd_of_glue_owner))
return false;
-
+
globals->bfd_of_glue_owner->output_has_begun = true;
}
-
+
return true;
}
@@ -2537,11 +2542,13 @@ coff_arm_final_link_postscript (abfd, pfinfo)
#define TARGET_UNDERSCORE 0
#endif
+#ifndef EXTRA_S_FLAGS
#ifdef COFF_WITH_PE
#define EXTRA_S_FLAGS (SEC_LINK_ONCE | SEC_LINK_DUPLICATES)
#else
#define EXTRA_S_FLAGS 0
#endif
+#endif
/* Forward declaration for use initialising alternative_target field. */
extern const bfd_target TARGET_BIG_SYM ;
@@ -2549,4 +2556,3 @@ extern const bfd_target TARGET_BIG_SYM ;
/* Target vectors. */
CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM)
CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM)
-
diff --git a/gnu/usr.bin/binutils/bfd/coff-aux.c b/gnu/usr.bin/binutils/bfd/coff-aux.c
index 6966392a33b..53822f04ed7 100644
--- a/gnu/usr.bin/binutils/bfd/coff-aux.c
+++ b/gnu/usr.bin/binutils/bfd/coff-aux.c
@@ -1,5 +1,5 @@
/* BFD back-end for Apple M68K COFF A/UX 3.x files.
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2000 Free Software Foundation, Inc.
Written by Richard Henderson <rth@tamu.edu>.
This file is part of BFD, the Binary File Descriptor library.
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* 4k pages */
#define COFF_PAGE_SIZE 0x1000
-/* On AUX, a STYP_NOLOAD|STYP_BSS section is part of a shared library. */
+/* On AUX, a STYP_NOLOAD|STYP_BSS section is part of a shared library. */
#define BSS_NOLOAD_IS_SHARED_LIBRARY
#define STATIC_RELOCS
@@ -41,8 +41,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
static boolean coff_m68k_aux_link_add_one_symbol
- PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
- asection *, bfd_vma, const char *, boolean, boolean,
+ PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
+ asection *, bfd_vma, const char *, boolean, boolean,
struct bfd_link_hash_entry **));
#define coff_link_add_one_symbol coff_m68k_aux_link_add_one_symbol
@@ -54,7 +54,7 @@ static boolean coff_m68k_aux_link_add_one_symbol
mirrors Apple's "solution" to let a static library symbol override
a shared library symbol. On the whole not a good thing, given how
shared libraries work here, but can work if you are careful with
- what you include in the shared object. */
+ what you include in the shared object. */
static boolean
coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value,
diff --git a/gnu/usr.bin/binutils/bfd/coff-go32.c b/gnu/usr.bin/binutils/bfd/coff-go32.c
index 720f4be1424..a283e10c7f0 100644
--- a/gnu/usr.bin/binutils/bfd/coff-go32.c
+++ b/gnu/usr.bin/binutils/bfd/coff-go32.c
@@ -1,5 +1,6 @@
/* BFD back-end for Intel 386 COFF files (DJGPP variant).
- Copyright 1990, 91, 92, 93, 94, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by DJ Delorie.
This file is part of BFD, the Binary File Descriptor library.
@@ -23,14 +24,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_UNDERSCORE '_'
#define COFF_LONG_SECTION_NAMES
#define COFF_SUPPORT_GNU_LINKONCE
+#define COFF_LONG_FILENAMES
#define COFF_SECTION_ALIGNMENT_ENTRIES \
{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
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_EXACT_MATCH (".bss"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.d"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.t"), \
diff --git a/gnu/usr.bin/binutils/bfd/coff-h8300.c b/gnu/usr.bin/binutils/bfd/coff-h8300.c
index c86c4b94422..cdbd79c8a46 100644
--- a/gnu/usr.bin/binutils/bfd/coff-h8300.c
+++ b/gnu/usr.bin/binutils/bfd/coff-h8300.c
@@ -1,5 +1,6 @@
/* BFD back-end for Hitachi H8/300 COFF binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
Written by Steve Chamberlain, <sac@cygnus.com>.
@@ -31,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
/* We derive a hash table from the basic BFD hash table to
- hold entries in the function vector. Aside from the
+ hold entries in the function vector. Aside from the
info stored by the basic hash table, we need the offset
of a particular entry within the hash table as well as
the offset where we'll add the next entry. */
@@ -196,7 +197,7 @@ h8300_coff_link_hash_table_create (abfd)
We only come here for pcrel stuff and return normally if not an -r link.
When doing -r, we can't do any arithmetic for the pcrel stuff, because
the code in reloc.c assumes that we can manipulate the targets of
- the pcrel branches. This isn't so, since the H8/300 can do relaxing,
+ the pcrel branches. This isn't so, since the H8/300 can do relaxing,
which means that the gap after the instruction may not be enough to
contain the offset required for the branch, so we have to use only
the addend until the final link. */
@@ -255,8 +256,7 @@ static reloc_howto_type howto_table[] =
HOWTO (R_JMP_DEL, 0, 0, 8, true, 0, complain_overflow_signed, special, "Deleted jump", false, 0x000000ff, 0x000000ff, true),
};
-
-/* Turn a howto into a reloc number */
+/* Turn a howto into a reloc number. */
#define SELECT_RELOC(x,howto) \
{ x.r_type = select_reloc(howto); }
@@ -265,16 +265,13 @@ static reloc_howto_type howto_table[] =
#define H8300 1 /* Customize coffcode.h */
#define __A_MAGIC_SET__
-
-
-/* Code to swap in the reloc */
+/* Code to swap in the reloc. */
#define SWAP_IN_RELOC_OFFSET bfd_h_get_32
#define SWAP_OUT_RELOC_OFFSET bfd_h_put_32
#define SWAP_OUT_RELOC_EXTRA(abfd, src, dst) \
dst->r_stuff[0] = 'S'; \
dst->r_stuff[1] = 'C';
-
static int
select_reloc (howto)
reloc_howto_type *howto;
@@ -282,8 +279,7 @@ select_reloc (howto)
return howto->type;
}
-/* Code to turn a r_type into a howto ptr, uses the above howto table
- */
+/* Code to turn a r_type into a howto ptr, uses the above howto table. */
static void
rtype2howto (internal, dst)
@@ -360,24 +356,21 @@ rtype2howto (internal, dst)
#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
-
-/* Perform any necessary magic to the addend in a reloc entry */
-
+/* Perform any necessary magic to the addend in a reloc entry. */
#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
cache_ptr->addend = ext_reloc.r_offset;
-
#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
reloc_processing(relent, reloc, symbols, abfd, section)
static void
reloc_processing (relent, reloc, symbols, abfd, section)
- arelent * relent;
+ arelent *relent;
struct internal_reloc *reloc;
- asymbol ** symbols;
- bfd * abfd;
- asection * section;
+ asymbol **symbols;
+ bfd *abfd;
+ asection *section;
{
relent->address = reloc->r_vaddr;
rtype2howto (relent, reloc);
@@ -391,12 +384,12 @@ reloc_processing (relent, reloc, symbols, abfd, section)
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
}
-
-
relent->addend = reloc->r_offset;
relent->address -= section->vma;
- /* relent->section = 0;*/
+#if 0
+ relent->section = 0;
+#endif
}
static boolean
@@ -412,7 +405,7 @@ h8300_symbol_address_p (abfd, input_section, address)
/* Search all the symbols for one in INPUT_SECTION with
address ADDRESS. */
- while (*s)
+ while (*s)
{
asymbol *p = *s;
if (p->section == input_section
@@ -421,11 +414,10 @@ h8300_symbol_address_p (abfd, input_section, address)
+ p->value) == address)
return true;
s++;
- }
+ }
return false;
}
-
/* If RELOC represents a relaxable instruction/reloc, change it into
the relaxed reloc, notify the linker that symbol addresses
have changed (bfd_perform_slip) and return how much the current
@@ -435,20 +427,20 @@ h8300_symbol_address_p (abfd, input_section, address)
in the howto table. This needs to be fixed. */
static int
-h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
+h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
bfd *abfd;
asection *input_section;
arelent *reloc;
unsigned int shrink;
struct bfd_link_info *link_info;
{
- bfd_vma value;
+ bfd_vma value;
bfd_vma dot;
bfd_vma gap;
static asection *last_input_section = NULL;
static arelent *last_reloc = NULL;
- /* The address of the thing to be relocated will have moved back by
+ /* The address of the thing to be relocated will have moved back by
the size of the shrink - but we don't change reloc->address here,
since we need it to know where the relocation lives in the source
uncooked section. */
@@ -459,14 +451,13 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
/* Only examine the relocs which might be relaxable. */
switch (reloc->howto->type)
- {
-
+ {
/* This is the 16/24 bit absolute branch which could become an 8 bit
pc-relative branch. */
case R_JMP1:
case R_JMPL1:
/* Get the address of the target of this branch. */
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the next instruction (not the reloc). */
dot = (input_section->output_section->vma
@@ -477,13 +468,12 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
/* Compute the distance from this insn to the branch target. */
gap = value - dot;
-
+
/* If the distance is within -128..+128 inclusive, then we can relax
this jump. +128 is valid since the target will move two bytes
closer if we do relax this branch. */
if ((int)gap >= -128 && (int)gap <= 128 )
- {
-
+ {
/* It's possible we may be able to eliminate this branch entirely;
if the previous instruction is a branch around this instruction,
and there's no label at this instruction, then we can reverse
@@ -493,7 +483,7 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
bCC lab1 bCC' lab2
jmp lab2
lab1: lab1:
-
+
This saves 4 bytes instead of two, and should be relatively
common. */
@@ -507,7 +497,7 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
if (last_value == dot + 2
&& last_reloc->address + 1 == reloc->address
- && ! h8300_symbol_address_p (abfd, input_section, dot - 2))
+ && !h8300_symbol_address_p (abfd, input_section, dot - 2))
{
reloc->howto = howto_table + 19;
last_reloc->howto = howto_table + 18;
@@ -520,11 +510,11 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
}
/* Change the reloc type. */
- reloc->howto = reloc->howto + 1;
+ reloc->howto = reloc->howto + 1;
/* This shrinks this section by two bytes. */
shrink += 2;
- bfd_perform_slip(abfd, 2, input_section, address);
+ bfd_perform_slip (abfd, 2, input_section, address);
}
break;
@@ -533,12 +523,12 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
case R_PCRWORD:
/* Get the address of the target of this branch, add one to the value
because the addend field in PCrel jumps is off by -1. */
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section) + 1;
-
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section) + 1;
+
/* Get the address of the next instruction if we were to relax. */
dot = input_section->output_section->vma +
input_section->output_offset + address;
-
+
/* Compute the distance from this insn to the branch target. */
gap = value - dot;
@@ -546,13 +536,13 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
this jump. +128 is valid since the target will move two bytes
closer if we do relax this branch. */
if ((int)gap >= -128 && (int)gap <= 128 )
- {
+ {
/* Change the reloc type. */
reloc->howto = howto_table + 15;
/* This shrinks this section by two bytes. */
shrink += 2;
- bfd_perform_slip(abfd, 2, input_section, address);
+ bfd_perform_slip (abfd, 2, input_section, address);
}
break;
@@ -560,7 +550,7 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
become an 8 bit absolute address if it's in the right range. */
case R_MOV16B1:
/* Get the address of the data referenced by this mov.b insn. */
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* The address is in 0xff00..0xffff inclusive on the h8300 or
0xffff00..0xffffff inclusive on the h8300h, then we can
@@ -578,7 +568,7 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
/* This shrinks this section by two bytes. */
shrink += 2;
- bfd_perform_slip(abfd, 2, input_section, address);
+ bfd_perform_slip (abfd, 2, input_section, address);
}
break;
@@ -587,7 +577,7 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
and try to relax it into a 16bit absolute. */
case R_MOV24B1:
/* Get the address of the data referenced by this mov.b insn. */
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* The address is in 0xffff00..0xffffff inclusive on the h8300h,
then we can relax this mov.b */
@@ -601,7 +591,7 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
/* This shrinks this section by four bytes. */
shrink += 4;
- bfd_perform_slip(abfd, 4, input_section, address);
+ bfd_perform_slip (abfd, 4, input_section, address);
/* Done with this reloc. */
break;
@@ -614,7 +604,7 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
become an 16 bit absolute address if it's in the right range. */
case R_MOVL1:
/* Get the address of the data referenced by this mov insn. */
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* If this address is in 0x0000..0x7fff inclusive or
0xff8000..0xffffff inclusive, then it can be relaxed. */
@@ -625,13 +615,13 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
/* This shrinks this section by two bytes. */
shrink += 2;
- bfd_perform_slip(abfd, 2, input_section, address);
+ bfd_perform_slip (abfd, 2, input_section, address);
}
break;
/* No other reloc types represent relaxing opportunities. */
- default:
- break;
+ default:
+ break;
}
last_reloc = reloc;
@@ -639,7 +629,6 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
return shrink;
}
-
/* Handle relocations for the H8/300, including relocs for relaxed
instructions.
@@ -661,18 +650,17 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
asection *input_section = link_order->u.indirect.section;
bfd_vma value;
bfd_vma dot;
- int gap,tmp;
+ int gap, tmp;
switch (reloc->howto->type)
{
-
/* Generic 8bit pc-relative relocation. */
case R_PCRBYTE:
/* Get the address of the target of this branch. */
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
- dot = (link_order->offset
- + dst_address
+ dot = (link_order->offset
+ + dst_address
+ link_order->u.indirect.section->output_section->vma);
gap = value - dot;
@@ -700,11 +688,11 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
/* Generic 16bit pc-relative relocation. */
case R_PCRWORD:
/* Get the address of the target of this branch. */
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
- dot = (link_order->offset
- + dst_address
+ dot = (link_order->offset
+ + dst_address
+ link_order->u.indirect.section->output_section->vma + 1);
gap = value - dot;
@@ -763,7 +751,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
case R_MOV16B1:
case R_JMP1:
case R_RELWORD:
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
bfd_put_16 (abfd, value, data + dst_address);
dst_address += 2;
src_address += 2;
@@ -774,7 +762,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
case R_MOVL1:
case R_RELLONG:
/* Get the address of the target of this branch. */
- value = bfd_coff_reloc16_get_value (reloc, link_info, input_section),
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
bfd_put_32 (abfd, value, data + dst_address);
dst_address += 4;
src_address += 4;
@@ -921,7 +909,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
src_address += 2;
break;
-
+
/* Similarly for a 24bit absolute that is now 8 bits. */
case R_JMPL2:
/* Get the address of the target of this branch. */
@@ -964,13 +952,13 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
abort ();
/* Fix up the opcode. */
- switch (data[src_address-1] & 0xf0)
+ switch (data[src_address - 1] & 0xf0)
{
case 0x00:
- data[dst_address - 2] = (data[src_address-1] & 0xf) | 0x20;
+ data[dst_address - 2] = (data[src_address - 1] & 0xf) | 0x20;
break;
case 0x80:
- data[dst_address - 2] = (data[src_address-1] & 0xf) | 0x30;
+ data[dst_address - 2] = (data[src_address - 1] & 0xf) | 0x30;
break;
default:
abort ();
@@ -989,13 +977,13 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
abort ();
/* Fix up the opcode. */
- switch (data[src_address-1] & 0xf0)
+ switch (data[src_address - 1] & 0xf0)
{
case 0x20:
- data[dst_address - 2] = (data[src_address-1] & 0xf) | 0x20;
+ data[dst_address - 2] = (data[src_address - 1] & 0xf) | 0x20;
break;
case 0xa0:
- data[dst_address - 2] = (data[src_address-1] & 0xf) | 0x30;
+ data[dst_address - 2] = (data[src_address - 1] & 0xf) | 0x30;
break;
default:
abort ();
@@ -1007,10 +995,10 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
case R_BCC_INV:
/* Get the address of the target of this branch. */
- value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
+ value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
- dot = (link_order->offset
- + dst_address
+ dot = (link_order->offset
+ + dst_address
+ link_order->u.indirect.section->output_section->vma) + 1;
gap = value - dot;
@@ -1092,7 +1080,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
}
/* This is a jump/call through a function vector, and we're
- expected to create the function vector ourselves.
+ expected to create the function vector ourselves.
First look up this symbol in the linker hash table -- we need
the derived linker symbol which holds this symbol's index
@@ -1106,7 +1094,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
strcpy (new_name, name);
sprintf (new_name + strlen (name), "_%08x",
- (int)symbol->section);
+ (int) symbol->section);
name = new_name;
}
@@ -1165,7 +1153,6 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
*dst_ptr = dst_address;
}
-
/* Routine for the h8300 linker.
This routine is necessary to handle the special R_MEM_INDIRECT
@@ -1178,7 +1165,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
selected static symbols to the bfd linker hash table. */
static boolean
-h8300_bfd_link_add_symbols(abfd, info)
+h8300_bfd_link_add_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
@@ -1242,7 +1229,7 @@ h8300_bfd_link_add_symbols(abfd, info)
if (reloc_size <= 0)
continue;
- relocs = (arelent **)bfd_malloc ((size_t)reloc_size);
+ relocs = (arelent **) bfd_malloc ((size_t) reloc_size);
if (!relocs)
return false;
@@ -1285,7 +1272,7 @@ h8300_bfd_link_add_symbols(abfd, info)
strcpy (new_name, name);
sprintf (new_name + strlen (name), "_%08x",
- (int)symbol->section);
+ (int) symbol->section);
name = new_name;
}
@@ -1293,7 +1280,6 @@ h8300_bfd_link_add_symbols(abfd, info)
h = funcvec_hash_lookup (h8300_coff_hash_table (info)->funcvec_hash_table,
name, false, false);
-
/* If this symbol isn't already in the hash table, add
it and bump up the size of the hash table. */
if (h == NULL)
@@ -1345,12 +1331,10 @@ h8300_bfd_link_add_symbols(abfd, info)
#define COFF_LONG_FILENAMES
#include "coffcode.h"
-
#undef coff_bfd_get_relocated_section_contents
#undef coff_bfd_relax_section
#define coff_bfd_get_relocated_section_contents \
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-
CREATE_BIG_COFF_TARGET_VEC (h8300coff_vec, "coff-h8300", BFD_IS_RELAXABLE, 0, '_', NULL)
diff --git a/gnu/usr.bin/binutils/bfd/coff-h8500.c b/gnu/usr.bin/binutils/bfd/coff-h8500.c
index 22eeaa55954..326965467b7 100644
--- a/gnu/usr.bin/binutils/bfd/coff-h8500.c
+++ b/gnu/usr.bin/binutils/bfd/coff-h8500.c
@@ -1,5 +1,6 @@
/* BFD back-end for Hitachi H8/500 COFF binaries.
- Copyright 1993, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1999, 2000
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
@@ -45,7 +46,6 @@ static reloc_howto_type r_imm32 =
HOWTO (R_H8500_IMM32, 0, 1, 32, false, 0,
complain_overflow_bitfield, 0, "r_imm32", true, 0xffffffff, 0xffffffff, false);
-
static reloc_howto_type r_high8 =
HOWTO (R_H8500_HIGH8, 0, 1, 8, false, 0,
complain_overflow_dont, 0, "r_high8", true, 0x000000ff, 0x000000ff, false);
@@ -57,7 +57,6 @@ HOWTO (R_H8500_LOW16, 0, 1, 16, false, 0,
static reloc_howto_type r_pcrel8 =
HOWTO (R_H8500_PCREL8, 0, 1, 8, true, 0, complain_overflow_signed, 0, "r_pcrel8", true, 0, 0, true);
-
static reloc_howto_type r_pcrel16 =
HOWTO (R_H8500_PCREL16, 0, 1, 16, true, 0, complain_overflow_signed, 0, "r_pcrel16", true, 0, 0, true);
@@ -65,10 +64,9 @@ static reloc_howto_type r_high16 =
HOWTO (R_H8500_HIGH16, 0, 1, 8, false, 0,
complain_overflow_dont, 0, "r_high16", true, 0x000ffff, 0x0000ffff, false);
-
/* Turn a howto into a reloc number */
-static int
+static int
coff_h8500_select_reloc (howto)
reloc_howto_type *howto;
{
@@ -77,7 +75,6 @@ coff_h8500_select_reloc (howto)
#define SELECT_RELOC(x,howto) x.r_type = coff_h8500_select_reloc(howto)
-
#define BADMAG(x) H8500BADMAG(x)
#define H8500 1 /* Customize coffcode.h */
@@ -135,14 +132,11 @@ rtype2howto(internal, dst)
#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
-
/* Perform any necessary magic to the addend in a reloc entry */
-
#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
cache_ptr->addend = ext_reloc.r_offset;
-
#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
reloc_processing(relent, reloc, symbols, abfd, section)
@@ -165,7 +159,6 @@ static void reloc_processing (relent, reloc, symbols, abfd, section)
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
}
-
relent->addend = reloc->r_offset;
relent->address -= section->vma;
}
@@ -217,7 +210,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
(*dst_ptr) += 2;
(*src_ptr) += 2;
break;
-
+
case R_H8500_HIGH16:
bfd_put_16 (in_abfd,
(bfd_coff_reloc16_get_value (reloc, link_info, input_section)
@@ -231,7 +224,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
case R_H8500_IMM24:
{
int v = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
- int o = bfd_get_32(in_abfd, data+ *dst_ptr -1);
+ int o = bfd_get_32 (in_abfd, data+ *dst_ptr -1);
v = (v & 0x00ffffff) | (o & 0xff00000);
bfd_put_32 (in_abfd, v, data + *dst_ptr -1);
(*dst_ptr) +=3;
@@ -247,7 +240,6 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
}
break;
-
case R_H8500_PCREL8:
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
@@ -304,7 +296,6 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
#include "coffcode.h"
-
#undef coff_bfd_get_relocated_section_contents
#undef coff_bfd_relax_section
#define coff_bfd_get_relocated_section_contents \
diff --git a/gnu/usr.bin/binutils/bfd/coff-i386.c b/gnu/usr.bin/binutils/bfd/coff-i386.c
index 84d4d145c7b..7d4ab5ae398 100644
--- a/gnu/usr.bin/binutils/bfd/coff-i386.c
+++ b/gnu/usr.bin/binutils/bfd/coff-i386.c
@@ -1,5 +1,6 @@
/* BFD back-end for Intel 386 COFF files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -73,8 +74,10 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
{
symvalue diff;
+#ifndef COFF_WITH_PE
if (output_bfd == (bfd *) NULL)
return bfd_reloc_continue;
+#endif
if (bfd_is_com_section (symbol->section))
{
@@ -102,12 +105,33 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
ignores the addend for a COFF target when producing
relocateable output. This seems to be always wrong for 386
COFF, so we handle the addend here instead. */
- diff = reloc_entry->addend;
+#ifdef COFF_WITH_PE
+ if (output_bfd == (bfd *) NULL)
+ {
+ reloc_howto_type *howto = reloc_entry->howto;
+
+ /* Although PC relative relocations are very similar between
+ PE and non-PE formats, but they are off by 1 << howto->size
+ bytes. For the external relocation, PE is very different
+ from others. See md_apply_fix3 () in gas/config/tc-i386.c.
+ When we link PE and non-PE object files together to
+ generate a non-PE executable, we have to compensate it
+ here. */
+ if (howto->pc_relative == true && howto->pcrel_offset == true)
+ diff = -(1 << howto->size);
+ else
+ diff = -reloc_entry->addend;
+ }
+ else
+#endif
+ diff = reloc_entry->addend;
}
#ifdef COFF_WITH_PE
/* FIXME: How should this case be handled? */
- if (reloc_entry->howto->type == R_IMAGEBASE)
+ if (reloc_entry->howto->type == R_IMAGEBASE
+ && output_bfd != NULL
+ && bfd_get_flavour(output_bfd) == bfd_target_coff_flavour)
diff -= pe_data (output_bfd)->pe_opthdr.ImageBase;
#endif
@@ -155,19 +179,17 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
}
#ifdef COFF_WITH_PE
-
/* Return true if this relocation should appear in the output .reloc
section. */
static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
static boolean in_reloc_p (abfd, howto)
- bfd *abfd ATTRIBUTE_UNUSED;
+ bfd * abfd ATTRIBUTE_UNUSED;
reloc_howto_type *howto;
{
return ! howto->pc_relative && howto->type != R_IMAGEBASE;
}
-
#endif /* COFF_WITH_PE */
#ifndef PCRELOFFSET
@@ -469,7 +491,9 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
*addendp -= sym->n_value;
}
- if (rel->r_type == R_IMAGEBASE)
+ if (rel->r_type == R_IMAGEBASE
+ && (bfd_get_flavour(sec->output_section->owner)
+ == bfd_target_coff_flavour))
{
*addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
}
@@ -556,7 +580,7 @@ const bfd_target
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
#ifdef COFF_WITH_PE
- | SEC_LINK_ONCE | SEC_LINK_DUPLICATES
+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY
#endif
| SEC_CODE | SEC_DATA),
@@ -575,7 +599,7 @@ const bfd_target
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-/* Note that we allow an object file to be treated as a core file as well. */
+/* Note that we allow an object file to be treated as a core file as well. */
{_bfd_dummy_target, coff_object_p, /* bfd_check_format */
bfd_generic_archive_p, coff_object_p},
{bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
diff --git a/gnu/usr.bin/binutils/bfd/coff-i860.c b/gnu/usr.bin/binutils/bfd/coff-i860.c
index ab3bb5f759f..74c23de1bac 100644
--- a/gnu/usr.bin/binutils/bfd/coff-i860.c
+++ b/gnu/usr.bin/binutils/bfd/coff-i860.c
@@ -1,5 +1,6 @@
/* BFD back-end for Intel 860 COFF files.
- Copyright 1990, 91, 92, 93, 94, 95, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000
+ Free Software Foundation, Inc.
Created mostly by substituting "860" for "386" in coff-i386.c
Harry Dolan <dolan@ssd.intel.com>, October 1995
@@ -29,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libcoff.h"
-static bfd_reloc_status_type coff_i860_reloc
+static bfd_reloc_status_type coff_i860_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static reloc_howto_type *coff_i860_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *,
@@ -66,7 +67,6 @@ coff_i860_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
if (output_bfd == (bfd *) NULL)
return bfd_reloc_continue;
-
if (bfd_is_com_section (symbol->section))
{
/* We are relocating a common symbol. The current value in the
@@ -91,7 +91,6 @@ coff_i860_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
diff = reloc_entry->addend;
}
-
#define DOIT(x) \
x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
@@ -139,7 +138,7 @@ coff_i860_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
#define PCRELOFFSET false
#endif
-static reloc_howto_type howto_table[] =
+static reloc_howto_type howto_table[] =
{
EMPTY_HOWTO (0),
EMPTY_HOWTO (1),
@@ -147,32 +146,32 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (3),
EMPTY_HOWTO (4),
EMPTY_HOWTO (5),
- HOWTO (R_DIR32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_DIR32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i860_reloc, /* special_function */
- "dir32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ coff_i860_reloc, /* special_function */
+ "dir32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
true), /* pcrel_offset */
/* {7}, */
- HOWTO (R_IMAGEBASE, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_IMAGEBASE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i860_reloc, /* special_function */
- "rva32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ coff_i860_reloc, /* special_function */
+ "rva32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
EMPTY_HOWTO (010),
EMPTY_HOWTO (011),
@@ -181,83 +180,83 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (014),
EMPTY_HOWTO (015),
EMPTY_HOWTO (016),
- HOWTO (R_RELBYTE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RELBYTE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i860_reloc, /* special_function */
- "8", /* name */
- true, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
+ coff_i860_reloc, /* special_function */
+ "8", /* name */
+ true, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_RELWORD, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RELWORD, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i860_reloc, /* special_function */
- "16", /* name */
- true, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
+ coff_i860_reloc, /* special_function */
+ "16", /* name */
+ true, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_RELLONG, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RELLONG, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i860_reloc, /* special_function */
- "32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ coff_i860_reloc, /* special_function */
+ "32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_PCRBYTE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_PCRBYTE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- coff_i860_reloc, /* special_function */
- "DISP8", /* name */
- true, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
+ coff_i860_reloc, /* special_function */
+ "DISP8", /* name */
+ true, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_PCRWORD, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_PCRWORD, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- coff_i860_reloc, /* special_function */
- "DISP16", /* name */
- true, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
+ coff_i860_reloc, /* special_function */
+ "DISP16", /* name */
+ true, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_PCRLONG, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_PCRLONG, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- coff_i860_reloc, /* special_function */
- "DISP32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ coff_i860_reloc, /* special_function */
+ "DISP32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
PCRELOFFSET) /* pcrel_offset */
};
@@ -335,14 +334,13 @@ coff_i860_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
function will be adding in the final value of the symbol. We
need to subtract out the current size in order to get the
correct result. */
-
- BFD_ASSERT (h != NULL);
+ BFD_ASSERT (h != NULL);
/* I think we *do* want to bypass this. If we don't, I have seen some data
parameters get the wrong relcation address. If I link two versions
with and without this section bypassed and then do a binary comparison,
- the addresses which are different can be looked up in the map. The
+ the addresses which are different can be looked up in the map. The
case in which this section has been bypassed has addresses which correspond
to values I can find in the map */
*addendp -= sym->n_value;
@@ -351,7 +349,7 @@ coff_i860_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
/* If the output symbol is common (in which case this must be a
relocateable link), we need to add in the final size of the
common symbol. */
- if (h != NULL && h->root.type == bfd_link_hash_common)
+ if (h != NULL && h->root.type == bfd_link_hash_common)
*addendp += h->root.u.c.size;
return howto;
@@ -400,7 +398,7 @@ const bfd_target
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-/* Note that we allow an object file to be treated as a core file as well. */
+/* Note that we allow an object file to be treated as a core file as well. */
{_bfd_dummy_target, i3coff_object_p, /* bfd_check_format */
bfd_generic_archive_p, i3coff_object_p},
{bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
@@ -419,6 +417,6 @@ const bfd_target
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
COFF_SWAP_TABLE
};
diff --git a/gnu/usr.bin/binutils/bfd/coff-i960.c b/gnu/usr.bin/binutils/bfd/coff-i960.c
index 4c37fab6973..53bb03aae2a 100644
--- a/gnu/usr.bin/binutils/bfd/coff-i960.c
+++ b/gnu/usr.bin/binutils/bfd/coff-i960.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 960 COFF files.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -99,7 +99,7 @@ coff_i960_is_local_label_name (abfd, name)
#define BAL 0x0b000000 /* Template for 'bal' instruction */
#define BAL_MASK 0x00ffffff
-static bfd_reloc_status_type
+static bfd_reloc_status_type
optcall_callback (abfd, reloc_entry, symbol_in, data,
input_section, ignore_bfd, error_message)
bfd *abfd;
@@ -117,13 +117,13 @@ optcall_callback (abfd, reloc_entry, symbol_in, data,
coff_symbol_type *cs = coffsymbol(symbol_in);
/* Don't do anything with symbols which aren't tied up yet,
- except move the reloc. */
+ except move the reloc. */
if (bfd_is_und_section (cs->symbol.section)) {
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
-
- /* So the target symbol has to be of coff type, and the symbol
+
+ /* So the target symbol has to be of coff type, and the symbol
has to have the correct native information within it */
if ((bfd_asymbol_flavour(&cs->symbol) != bfd_target_coff_flavour)
|| (cs->native == (combined_entry_type *)NULL))
@@ -138,7 +138,7 @@ optcall_callback (abfd, reloc_entry, symbol_in, data,
}
else
{
- switch (cs->native->u.syment.n_sclass)
+ switch (cs->native->u.syment.n_sclass)
{
case C_LEAFSTAT:
case C_LEAFEXT:
@@ -146,7 +146,7 @@ optcall_callback (abfd, reloc_entry, symbol_in, data,
to the correct location. */
{
union internal_auxent *aux = &((cs->native+2)->u.auxent);
- int word = bfd_get_32(abfd, (bfd_byte *)data + reloc_entry->address);
+ int word = bfd_get_32 (abfd, (bfd_byte *)data + reloc_entry->address);
int olf = (aux->x_bal.x_balntry - cs->native->u.syment.n_value);
BFD_ASSERT(cs->native->u.syment.n_numaux==2);
@@ -156,7 +156,7 @@ optcall_callback (abfd, reloc_entry, symbol_in, data,
sym and auxents untouched, so the delta between the two
is the offset of the bal entry point. */
word = ((word + olf) & BAL_MASK) | BAL;
- bfd_put_32(abfd, word, (bfd_byte *) data + reloc_entry->address);
+ bfd_put_32 (abfd, word, (bfd_byte *) data + reloc_entry->address);
}
result = bfd_reloc_ok;
break;
@@ -188,7 +188,7 @@ optcall_callback (abfd, reloc_entry, symbol_in, data,
useful. It was used before this target was converted to use the
COFF specific backend linker. */
-static bfd_reloc_status_type
+static bfd_reloc_status_type
coff_i960_relocate (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
@@ -402,7 +402,7 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
sym = NULL;
}
else
- {
+ {
h = obj_coff_sym_hashes (input_bfd)[symndx];
sym = syms + symndx;
}
@@ -578,7 +578,6 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
instead be a reloc against the internal symbol we created specially
for the section. */
-/*ARGSUSED*/
static boolean
coff_i960_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
bfd *obfd ATTRIBUTE_UNUSED;
@@ -661,6 +660,6 @@ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& icoff_little_vec,
-
+
COFF_SWAP_TABLE
};
diff --git a/gnu/usr.bin/binutils/bfd/coff-m68k.c b/gnu/usr.bin/binutils/bfd/coff-m68k.c
index d7138c082e0..b7f235c810b 100644
--- a/gnu/usr.bin/binutils/bfd/coff-m68k.c
+++ b/gnu/usr.bin/binutils/bfd/coff-m68k.c
@@ -1,5 +1,5 @@
/* BFD back-end for Motorola 68000 COFF binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -97,7 +97,7 @@ extern reloc_howto_type m68kcoff_howto_table[];
#ifdef STATIC_RELOCS
static
#endif
-reloc_howto_type m68kcoff_howto_table[] =
+reloc_howto_type m68kcoff_howto_table[] =
{
HOWTO(R_RELBYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "8", true, 0x000000ff,0x000000ff, false),
HOWTO(R_RELWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "16", true, 0x0000ffff,0x0000ffff, false),
@@ -130,7 +130,7 @@ m68k_rtype2howto(internal, relocentry)
arelent *internal;
int relocentry;
{
- switch (relocentry)
+ switch (relocentry)
{
case R_RELBYTE: internal->howto = m68kcoff_howto_table + 0; break;
case R_RELWORD: internal->howto = m68kcoff_howto_table + 1; break;
@@ -145,29 +145,29 @@ m68k_rtype2howto(internal, relocentry)
#ifdef STATIC_RELOCS
static
#endif
-int
+int
m68k_howto2rtype (internal)
reloc_howto_type *internal;
{
- if (internal->pc_relative)
+ if (internal->pc_relative)
{
- switch (internal->bitsize)
+ switch (internal->bitsize)
{
case 32: return R_PCRLONG;
case 16: return R_PCRWORD;
case 8: return R_PCRBYTE;
}
}
- else
+ else
{
- switch (internal->bitsize)
+ switch (internal->bitsize)
{
case 32: return R_RELLONG;
case 16: return R_RELWORD;
case 8: return R_RELBYTE;
}
}
- return R_RELLONG;
+ return R_RELLONG;
}
#ifdef STATIC_RELOCS
@@ -213,7 +213,6 @@ static reloc_howto_type *m68kcoff_rtype_to_howto
struct coff_link_hash_entry *, struct internal_syment *,
bfd_vma *));
-/*ARGSUSED*/
static reloc_howto_type *
m68kcoff_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -374,7 +373,6 @@ m68kcoff_common_addend_special_fn (abfd, reloc_entry, symbol, data,
/* coff-m68k.c uses the special COFF backend linker. We need to
adjust common symbols. */
-/*ARGSUSED*/
static reloc_howto_type *
m68kcoff_common_addend_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -419,6 +417,98 @@ m68kcoff_common_addend_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
#endif /* ! defined (coff_rtype_to_howto) */
#endif /* COFF_COMMON_ADDEND */
+
+#if !defined ONLY_DECLARE_RELOCS && ! defined STATIC_RELOCS
+/* Given a .data section and a .emreloc in-memory section, store
+ relocation information into the .emreloc 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. */
+
+boolean
+bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *datasec;
+ asection *relsec;
+ char **errmsg;
+{
+ char *extsyms;
+ bfd_size_type symesz;
+ struct internal_reloc *irel, *irelend;
+ bfd_byte *p;
+
+ BFD_ASSERT (! info->relocateable);
+
+ *errmsg = NULL;
+
+ if (datasec->reloc_count == 0)
+ return true;
+
+ extsyms = obj_coff_external_syms (abfd);
+ symesz = bfd_coff_symesz (abfd);
+
+ irel = _bfd_coff_read_internal_relocs (abfd, datasec, true, NULL, false,
+ NULL);
+ irelend = irel + datasec->reloc_count;
+
+ relsec->contents = (bfd_byte *) bfd_alloc (abfd, datasec->reloc_count * 12);
+ if (relsec->contents == NULL)
+ return false;
+
+ p = relsec->contents;
+
+ for (; 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 (irel->r_type != R_RELLONG)
+ {
+ *errmsg = _("unsupported reloc type");
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ if (irel->r_symndx == -1)
+ targetsec = bfd_abs_section_ptr;
+ else
+ {
+ struct coff_link_hash_entry *h;
+
+ h = obj_coff_sym_hashes (abfd)[irel->r_symndx];
+ if (h == NULL)
+ {
+ struct internal_syment isym;
+
+ bfd_coff_swap_sym_in (abfd, extsyms + symesz * irel->r_symndx,
+ &isym);
+ targetsec = coff_section_from_bfd_index (abfd, isym.n_scnum);
+ }
+ else if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ targetsec = h->root.u.def.section;
+ else
+ targetsec = NULL;
+ }
+
+ bfd_put_32 (abfd,
+ (irel->r_vaddr - datasec->vma + datasec->output_offset), p);
+ memset (p + 4, 0, 8);
+ if (targetsec != NULL)
+ strncpy (p + 4, targetsec->output_section->name, 8);
+ }
+
+ return true;
+}
+#endif /* neither ONLY_DECLARE_RELOCS not STATIC_RELOCS */
#define coff_bfd_is_local_label_name m68k_coff_is_local_label_name
diff --git a/gnu/usr.bin/binutils/bfd/coff-m88k.c b/gnu/usr.bin/binutils/bfd/coff-m88k.c
index f78377a3a42..8f92be203d0 100644
--- a/gnu/usr.bin/binutils/bfd/coff-m88k.c
+++ b/gnu/usr.bin/binutils/bfd/coff-m88k.c
@@ -1,5 +1,5 @@
/* BFD back-end for Motorola 88000 COFF "Binary Compatability Standard" files.
- Copyright 1990, 91, 92, 93, 94, 95, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -51,7 +51,7 @@ m88k_is_local_label_name (abfd, name)
return name[0] == '@';
}
-static bfd_reloc_status_type
+static bfd_reloc_status_type
m88k_special_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message)
bfd *abfd;
@@ -144,7 +144,7 @@ m88k_special_reloc (abfd, reloc_entry, symbol, data,
return bfd_reloc_ok;
}
-static reloc_howto_type howto_table[] =
+static reloc_howto_type howto_table[] =
{
HOWTO (R_PCR16L, /* type */
02, /* rightshift */
@@ -250,12 +250,10 @@ rtype2howto (cache_ptr, dst)
#define RTYPE2HOWTO(cache_ptr, dst) rtype2howto (cache_ptr, dst)
-
/* Code to swap in the reloc offset */
#define SWAP_IN_RELOC_OFFSET bfd_h_get_16
#define SWAP_OUT_RELOC_OFFSET bfd_h_put_16
-
#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
reloc_processing(relent, reloc, symbols, abfd, section)
diff --git a/gnu/usr.bin/binutils/bfd/coff-mips.c b/gnu/usr.bin/binutils/bfd/coff-mips.c
index bb4b15e96c2..ac168022270 100644
--- a/gnu/usr.bin/binutils/bfd/coff-mips.c
+++ b/gnu/usr.bin/binutils/bfd/coff-mips.c
@@ -1,5 +1,6 @@
/* BFD back-end for MIPS Extended-Coff files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -115,7 +116,6 @@ static boolean mips_relax_pcrel16 PARAMS ((struct bfd_link_info *, bfd *,
bfd_byte *, bfd_vma));
static reloc_howto_type *mips_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
-
/* ECOFF has COFF sections, but the debugging information is stored in
a completely different format. ECOFF targets use some of the
@@ -910,7 +910,7 @@ mips_gprel_reloc (abfd,
reloc_entry->address += input_section->output_offset;
/* Make sure it fit in 16 bits. */
- if (val >= 0x8000 && val < 0xffff8000)
+ if ((long) val >= 0x8000 || (long) val < -0x8000)
return bfd_reloc_overflow;
return bfd_reloc_ok;
@@ -1100,7 +1100,6 @@ mips_rello_reloc (abfd,
requires special handling when relaxing. We don't want
bfd_perform_relocation to tamper with it at all. */
-/*ARGSUSED*/
static bfd_reloc_status_type
mips_switch_reloc (abfd,
reloc_entry,
@@ -1195,7 +1194,7 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
if (refhi == NULL)
return;
-
+
insn = bfd_get_32 (input_bfd,
contents + adjust + refhi->r_vaddr - input_section->vma);
if (reflo == NULL)
@@ -1204,7 +1203,7 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
vallo = (bfd_get_32 (input_bfd,
contents + adjust + reflo->r_vaddr - input_section->vma)
& 0xffff);
-
+
val = ((insn & 0xffff) << 16) + vallo;
val += relocation;
@@ -1505,7 +1504,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
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,
@@ -1626,7 +1625,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
int_rel.r_symndx = RELOC_SECTION_TEXT;
break;
}
-
+
if (int_rel.r_symndx == -1)
abort ();
@@ -2104,7 +2103,7 @@ mips_relax_section (abfd, sec, info, again)
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 . */
+ != 0x0411ffff) /* bgezal $0,. == bal . */
continue;
/* Bother. We need to expand this reloc, and we will need to
@@ -2180,7 +2179,7 @@ mips_relax_section (abfd, sec, info, again)
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;
@@ -2505,7 +2504,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
(unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out,
mips_ecoff_swap_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4,
+ FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4, false, 2,
mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in,
mips_ecoff_swap_scnhdr_in, NULL,
mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
@@ -2643,7 +2642,7 @@ const bfd_target ecoff_little_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& ecoff_big_vec,
-
+
(PTR) &mips_ecoff_backend_data
};
@@ -2686,7 +2685,7 @@ const bfd_target ecoff_big_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& ecoff_little_vec,
-
+
(PTR) &mips_ecoff_backend_data
};
@@ -2730,6 +2729,6 @@ const bfd_target ecoff_biglittle_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) &mips_ecoff_backend_data
};
diff --git a/gnu/usr.bin/binutils/bfd/coff-ppc.c b/gnu/usr.bin/binutils/bfd/coff-ppc.c
index c5e695d311a..2bf296ab803 100644
--- a/gnu/usr.bin/binutils/bfd/coff-ppc.c
+++ b/gnu/usr.bin/binutils/bfd/coff-ppc.c
@@ -1,11 +1,12 @@
/* BFD back-end for PowerPC Microsoft Portable Executable files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Original version pieced together by Kim Knuttila (krk@cygnus.com)
There is nothing new under the sun. This file draws a lot on other
- coff files, in particular, those for the rs/6000, alpha, mips, and
+ coff files, in particular, those for the rs/6000, alpha, mips, and
intel backends, and the PE work for the arm.
This file is part of BFD, the Binary File Descriptor library.
@@ -29,11 +30,10 @@ Boston, MA 02111-1307, USA. */
- objdump works
- relocs generated by gas
- ld will link files, but they do not run.
- - dlltool will not produce correct output in some .reloc cases, and will
+ - dlltool will not produce correct output in some .reloc cases, and will
not produce the right glue code for dll function calls.
*/
-
#include "bfd.h"
#include "sysdep.h"
@@ -75,7 +75,6 @@ extern void dump_toc PARAMS ((PTR));
#define MARK_AS_WRITTEN(x) ((x) |= 1)
#define MAKE_ADDR_AGAIN(x) ((x) &= ~1)
-
/* Turn on this check if you suspect something amiss in the hash tables */
#ifdef DEBUG_HASH
@@ -87,13 +86,12 @@ extern void dump_toc PARAMS ((PTR));
#define HASH_CHECK(addr) \
if (strcmp(addr->eye_catcher, EYE) != 0) \
{ \
- fprintf(stderr,\
+ fprintf (stderr,\
_("File %s, line %d, Hash check failure, bad eye %8s\n"), \
__FILE__, __LINE__, addr->eye_catcher); \
- abort(); \
+ abort (); \
}
-
#else
#define HASH_CHECK_DCL
@@ -105,7 +103,7 @@ extern void dump_toc PARAMS ((PTR));
/* In order not to add an int to every hash table item for every coff
linker, we define our own hash table, derived from the coff one */
-/* PE linker hash table entries. */
+/* PE linker hash table entries. */
struct ppc_coff_link_hash_entry
{
@@ -120,7 +118,6 @@ struct ppc_coff_link_hash_entry
HASH_CHECK_DCL
};
-
/* PE linker hash table. */
struct ppc_coff_link_hash_table
@@ -154,14 +151,14 @@ ppc_coff_link_hash_newfunc (entry, table, string)
struct bfd_hash_table *table;
const char *string;
{
- struct ppc_coff_link_hash_entry *ret =
+ struct ppc_coff_link_hash_entry *ret =
(struct ppc_coff_link_hash_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
if (ret == (struct ppc_coff_link_hash_entry *) NULL)
ret = (struct ppc_coff_link_hash_entry *)
- bfd_hash_allocate (table,
+ bfd_hash_allocate (table,
sizeof (struct ppc_coff_link_hash_entry));
if (ret == (struct ppc_coff_link_hash_entry *) NULL)
@@ -169,7 +166,7 @@ ppc_coff_link_hash_newfunc (entry, table, string)
/* Call the allocation method of the superclass. */
ret = ((struct ppc_coff_link_hash_entry *)
- _bfd_coff_link_hash_newfunc ((struct bfd_hash_entry *) ret,
+ _bfd_coff_link_hash_newfunc ((struct bfd_hash_entry *) ret,
table, string));
if (ret)
@@ -222,7 +219,6 @@ ppc_coff_link_hash_table_create (abfd)
/* Now, tailor coffcode.h to use our hash stuff */
#define coff_bfd_link_hash_table_create ppc_coff_link_hash_table_create
-
/* The nt loader points the toc register to &toc + 32768, in order to */
/* use the complete range of a 16-bit displacement. We have to adjust */
@@ -238,7 +234,7 @@ ppc_coff_link_hash_table_create (abfd)
from smaller values. Start with zero, widen, *then* decrement. */
#define MINUS_ONE (((bfd_vma)0) - 1)
-/* these should definitely go in a header file somewhere... */
+/* these should definitely go in a header file somewhere... */
/* NOP */
#define IMAGE_REL_PPC_ABSOLUTE 0x0000
@@ -320,7 +316,6 @@ ppc_coff_link_hash_table_create (abfd)
#define EXTRACT_FLAGS(x) ((x) & IMAGE_REL_PPC_FLAGMASK)
#define EXTRACT_JUNK(x) \
((x) & ~(IMAGE_REL_PPC_TYPEMASK | IMAGE_REL_PPC_FLAGMASK))
-
/* static helper functions to make relocation work */
/* (Work In Progress) */
@@ -348,7 +343,6 @@ static bfd_reloc_status_type ppc_pair_reloc PARAMS ((bfd *abfd,
asection *section,
bfd *output_bfd,
char **error));
-
static bfd_reloc_status_type ppc_toc16_reloc PARAMS ((bfd *abfd,
arelent *reloc,
@@ -391,10 +385,7 @@ static bfd_reloc_status_type ppc_imglue_reloc PARAMS ((bfd *abfd,
bfd *output_bfd,
char **error));
-
-
static boolean in_reloc_p PARAMS((bfd *abfd, reloc_howto_type *howto));
-
/* FIXME: It'll take a while to get through all of these. I only need a few to
get us started, so those I'll make sure work. Those marked FIXME are either
@@ -418,7 +409,7 @@ static boolean in_reloc_p PARAMS((bfd *abfd, reloc_howto_type *howto));
/* the address of the SYM will be inserted at link time. */
/* TOCREL16 : 16 bit displacement field referring to a slot in */
/* toc. */
-/* TOCREL14 : 16 bit displacement field, similar to REL14 or ADDR14. */
+/* TOCREL14 : 16 bit displacement field, similar to REL14 or ADDR14. */
/* ADDR32NB : 32 bit address relative to the virtual origin. */
/* (On the alpha, this is always a linker generated thunk)*/
/* (i.e. 32bit addr relative to the image base) */
@@ -438,32 +429,32 @@ static reloc_howto_type ppc_coff_howto_table[] =
{
/* IMAGE_REL_PPC_ABSOLUTE 0x0000 NOP */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_ABSOLUTE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_ABSOLUTE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_dont, /* dont complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"ABSOLUTE", /* name */
- false, /* partial_inplace */
- 0x00, /* src_mask */
- 0x00, /* dst_mask */
+ false, /* partial_inplace */
+ 0x00, /* src_mask */
+ 0x00, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_ADDR64 0x0001 64-bit address */
/* Unused: */
- HOWTO(IMAGE_REL_PPC_ADDR64, /* type */
- 0, /* rightshift */
- 3, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO(IMAGE_REL_PPC_ADDR64, /* type */
+ 0, /* rightshift */
+ 3, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"ADDR64", /* name */
- true, /* partial_inplace */
+ true, /* partial_inplace */
MINUS_ONE, /* src_mask */
MINUS_ONE, /* dst_mask */
false), /* pcrel_offset */
@@ -471,314 +462,311 @@ static reloc_howto_type ppc_coff_howto_table[] =
/* IMAGE_REL_PPC_ADDR32 0x0002 32-bit address */
/* Used: */
HOWTO (IMAGE_REL_PPC_ADDR32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"ADDR32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_ADDR24 0x0003 26-bit address, shifted left 2 (branch absolute) */
/* the LI field is in bit 6 through bit 29 is 24 bits, + 2 for the shift */
/* Of course, That's the IBM approved bit numbering, which is not what */
- /* anyone else uses.... The li field is in bit 2 thru 25 */
+ /* anyone else uses.... The li field is in bit 2 thru 25 */
/* Used: */
HOWTO (IMAGE_REL_PPC_ADDR24, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"ADDR24", /* name */
- true, /* partial_inplace */
- 0x07fffffc, /* src_mask */
- 0x07fffffc, /* dst_mask */
+ true, /* partial_inplace */
+ 0x07fffffc, /* src_mask */
+ 0x07fffffc, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_ADDR16 0x0004 16-bit address */
/* Used: */
- HOWTO (IMAGE_REL_PPC_ADDR16, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_ADDR16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"ADDR16", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_ADDR14 0x0005 */
/* 16-bit address, shifted left 2 (load doubleword) */
/* FIXME: the mask is likely wrong, and the bit position may be as well */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_ADDR14, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_ADDR14, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"ADDR16", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_REL24 0x0006 */
/* 26-bit PC-relative offset, shifted left 2 (branch relative) */
/* Used: */
HOWTO (IMAGE_REL_PPC_REL24, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"REL24", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ true, /* partial_inplace */
+ 0x3fffffc, /* src_mask */
+ 0x3fffffc, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_REL14 0x0007 */
/* 16-bit PC-relative offset, shifted left 2 (br cond relative) */
/* FIXME: the mask is likely wrong, and the bit position may be as well */
/* FIXME: how does it know how far to shift? */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_ADDR14, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_ADDR14, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"ADDR16", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
true), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_TOCREL16 0x0008 */
/* 16-bit offset from TOC base */
/* Used: */
- HOWTO (IMAGE_REL_PPC_TOCREL16,/* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_TOCREL16,/* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- ppc_toc16_reloc, /* special_function */
+ ppc_toc16_reloc, /* special_function */
"TOCREL16", /* name */
- false, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_TOCREL14 0x0009 */
/* 16-bit offset from TOC base, shifted left 2 (load doubleword) */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_TOCREL14,/* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_TOCREL14,/* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"TOCREL14", /* name */
- false, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_ADDR32NB 0x000A */
/* 32-bit addr w/ image base */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_ADDR32NB,/* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_ADDR32NB,/* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"ADDR32NB", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* IMAGE_REL_PPC_SECREL 0x000B */
/* va of containing section (as in an image sectionhdr) */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_SECREL,/* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_SECREL,/* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- ppc_secrel_reloc, /* special_function */
+ ppc_secrel_reloc, /* special_function */
"SECREL", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
true), /* pcrel_offset */
/* IMAGE_REL_PPC_SECTION 0x000C */
/* sectionheader number */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_SECTION,/* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_SECTION,/* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- ppc_section_reloc, /* special_function */
+ ppc_section_reloc, /* special_function */
"SECTION", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
true), /* pcrel_offset */
/* IMAGE_REL_PPC_IFGLUE 0x000D */
/* substitute TOC restore instruction iff symbol is glue code */
/* Used: */
- HOWTO (IMAGE_REL_PPC_IFGLUE,/* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_IFGLUE,/* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"IFGLUE", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* IMAGE_REL_PPC_IMGLUE 0x000E */
/* symbol is glue code; virtual address is TOC restore instruction */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_IMGLUE,/* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_IMGLUE,/* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- ppc_imglue_reloc, /* special_function */
+ ppc_imglue_reloc, /* special_function */
"IMGLUE", /* name */
- false, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ false, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* IMAGE_REL_PPC_SECREL16 0x000F */
/* va of containing section (limited to 16 bits) */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_SECREL16,/* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_SECREL16,/* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"SECREL16", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
true), /* pcrel_offset */
/* IMAGE_REL_PPC_REFHI 0x0010 */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_REFHI, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_REFHI, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- ppc_refhi_reloc, /* special_function */
+ ppc_refhi_reloc, /* special_function */
"REFHI", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* IMAGE_REL_PPC_REFLO 0x0011 */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_REFLO, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_REFLO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- ppc_refhi_reloc, /* special_function */
+ ppc_refhi_reloc, /* special_function */
"REFLO", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* IMAGE_REL_PPC_PAIR 0x0012 */
/* Unused: */
- HOWTO (IMAGE_REL_PPC_PAIR, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (IMAGE_REL_PPC_PAIR, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- ppc_pair_reloc, /* special_function */
+ ppc_pair_reloc, /* special_function */
"PAIR", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* IMAGE_REL_PPC_TOCREL16_DEFN 0x0013 */
/* 16-bit offset from TOC base, without causing a definition */
/* Used: */
- HOWTO ( (IMAGE_REL_PPC_TOCREL16 | IMAGE_REL_PPC_TOCDEFN), /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO ( (IMAGE_REL_PPC_TOCREL16 | IMAGE_REL_PPC_TOCDEFN), /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- 0, /* special_function */
+ 0, /* special_function */
"TOCREL16, TOCDEFN", /* name */
- false, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
};
-
-
-
/* Some really cheezy macros that can be turned on to test stderr :-) */
#ifdef DEBUG_RELOC
@@ -788,19 +776,19 @@ static reloc_howto_type ppc_coff_howto_table[] =
if (i == 0) \
{ \
i = 1; \
- fprintf(stderr,_("Unimplemented Relocation -- %s\n"),x); \
+ fprintf (stderr,_("Unimplemented Relocation -- %s\n"),x); \
} \
}
#define DUMP_RELOC(n,r) \
{ \
- fprintf(stderr,"%s sym %d, addr %d, addend %d\n", \
+ fprintf (stderr,"%s sym %d, addr %d, addend %d\n", \
n, (*(r->sym_ptr_ptr))->name, \
r->address, r->addend); \
}
-/* Given a reloc name, n, and a pointer to an internal_reloc,
- dump out interesting information on the contents
+/* Given a reloc name, n, and a pointer to an internal_reloc,
+ dump out interesting information on the contents
#define n_name _n._n_name
#define n_zeroes _n._n_n._n_zeroes
@@ -810,7 +798,7 @@ static reloc_howto_type ppc_coff_howto_table[] =
#define DUMP_RELOC2(n,r) \
{ \
- fprintf(stderr,"%s sym %d, r_vaddr %d %s\n", \
+ fprintf (stderr,"%s sym %d, r_vaddr %d %s\n", \
n, r->r_symndx, r->r_vaddr,\
(((r->r_type) & IMAGE_REL_PPC_TOCDEFN) == 0) \
?" ":" TOCDEFN" ); \
@@ -821,8 +809,6 @@ static reloc_howto_type ppc_coff_howto_table[] =
#define DUMP_RELOC(n,r)
#define DUMP_RELOC2(n,r)
#endif
-
-
/* toc construction and management routines */
@@ -924,16 +910,16 @@ ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
HASH_CHECK(h);
}
- if (h == 0)
- {
+ if (h == 0)
+ {
local_syms = obj_coff_local_toc_table(abfd);
if (local_syms == 0)
{
unsigned int i;
/* allocate a table */
- local_syms =
- (int *) bfd_zalloc (abfd,
- obj_raw_syment_count(abfd) * sizeof(int));
+ local_syms =
+ (int *) bfd_zalloc (abfd,
+ obj_raw_syment_count(abfd) * sizeof (int));
if (local_syms == 0)
return false;
obj_coff_local_toc_table(abfd) = local_syms;
@@ -943,7 +929,7 @@ ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
}
}
- if (IS_UNALLOCATED(local_syms[sym]))
+ if (IS_UNALLOCATED(local_syms[sym]))
{
local_syms[sym] = global_toc_size;
global_toc_size += 4;
@@ -1002,20 +988,19 @@ ppc_mark_symbol_as_glue(abfd, sym, rel)
#endif /* COFF_IMAGE_WITH_PE */
-
/* Return true if this relocation should
- appear in the output .reloc section. */
+ appear in the output .reloc section. */
static boolean in_reloc_p(abfd, howto)
bfd * abfd ATTRIBUTE_UNUSED;
reloc_howto_type *howto;
{
- return
- (! howto->pc_relative)
+ return
+ (! howto->pc_relative)
&& (howto->type != IMAGE_REL_PPC_ADDR32NB)
&& (howto->type != IMAGE_REL_PPC_TOCREL16)
&& (howto->type != IMAGE_REL_PPC_IMGLUE)
- && (howto->type != IMAGE_REL_PPC_IFGLUE)
+ && (howto->type != IMAGE_REL_PPC_IFGLUE)
&& (howto->type != IMAGE_REL_PPC_SECREL)
&& (howto->type != IMAGE_REL_PPC_SECTION)
&& (howto->type != IMAGE_REL_PPC_SECREL16)
@@ -1023,7 +1008,7 @@ static boolean in_reloc_p(abfd, howto)
&& (howto->type != IMAGE_REL_PPC_REFLO)
&& (howto->type != IMAGE_REL_PPC_PAIR)
&& (howto->type != IMAGE_REL_PPC_TOCREL16_DEFN) ;
-}
+}
#if 0
@@ -1050,39 +1035,38 @@ pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
unsigned long sym_value;
unsigned short r_type;
unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/
-
+
r_type = reloc_entry->howto->type;
- if (output_bfd)
+ if (output_bfd)
{
/* Partial linking - do nothing */
reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
+ return bfd_reloc_ok;
}
if (symbol_in != NULL
&& bfd_is_und_section (symbol_in->section))
{
/* Keep the state machine happy in case we're called again */
- if (r_type == IMAGE_REL_PPC_REFHI)
+ if (r_type == IMAGE_REL_PPC_REFHI)
{
part1_consth_active = true;
part1_consth_value = 0;
}
return(bfd_reloc_undefined);
}
-
- if ((part1_consth_active) && (r_type != IMAGE_REL_PPC_PAIR))
+
+ if ((part1_consth_active) && (r_type != IMAGE_REL_PPC_PAIR))
{
part1_consth_active = false;
*error_message = (char *) _("Missing PAIR");
return(bfd_reloc_dangerous);
}
-
sym_value = get_symbol_value(symbol_in);
-
- return(bfd_reloc_ok);
+
+ return(bfd_reloc_ok);
}
#endif /* 0 */
@@ -1108,13 +1092,13 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
asection *toc_section = 0;
bfd_vma relocation;
reloc_howto_type *howto = 0;
-
+
/* If we are performing a relocateable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
if (info->relocateable)
return true;
-
+
hihalf = false;
hihalf_val = 0;
@@ -1133,7 +1117,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
unsigned short r_type = EXTRACT_TYPE (rel->r_type);
unsigned short r_flags = EXTRACT_FLAGS(rel->r_type);
-
+
symndx = rel->r_symndx;
loc = contents + rel->r_vaddr - input_section->vma;
@@ -1147,9 +1131,9 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = (struct ppc_coff_link_hash_entry *)
+ h = (struct ppc_coff_link_hash_entry *)
(obj_coff_sym_hashes (input_bfd)[symndx]);
- if (h != 0)
+ if (h != 0)
{
HASH_CHECK(h);
}
@@ -1159,8 +1143,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type == IMAGE_REL_PPC_IMGLUE && h == 0)
{
- /* An IMGLUE reloc must have a name. Something is very wrong. */
- abort();
+ /* An IMGLUE reloc must have a name. Something is very wrong. */
+ abort ();
}
sec = NULL;
@@ -1203,7 +1187,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
rstat = bfd_reloc_ok;
-
+
/* Each case must do its own relocation, setting rstat appropriately */
switch (r_type)
{
@@ -1220,19 +1204,19 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
DUMP_RELOC2(howto->name, rel);
- if (toc_section == 0)
+ if (toc_section == 0)
{
- toc_section = bfd_get_section_by_name (bfd_of_toc_owner,
+ toc_section = bfd_get_section_by_name (bfd_of_toc_owner,
TOC_SECTION_NAME);
- if ( toc_section == NULL )
+ if ( toc_section == NULL )
{
- /* There is no toc section. Something is very wrong. */
- abort();
+ /* There is no toc section. Something is very wrong. */
+ abort ();
}
}
- /*
+ /*
* Amazing bit tricks present. As we may have seen earlier, we
* use the 1 bit to tell us whether or not a toc offset has been
* allocated. Now that they've all been allocated, we will use
@@ -1253,7 +1237,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if (IS_WRITTEN(our_toc_offset))
{
- /* if it has been written out, it is marked with the
+ /* if it has been written out, it is marked with the
1 bit. Fix up our offset, but do not write it out
again.
*/
@@ -1262,12 +1246,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
/* write out the toc entry */
- record_toc(toc_section,
- our_toc_offset,
- priv,
+ record_toc(toc_section,
+ our_toc_offset,
+ priv,
strdup(name));
- bfd_put_32(output_bfd,
+ bfd_put_32 (output_bfd,
val,
toc_section->contents + our_toc_offset);
@@ -1280,33 +1264,33 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name = h->root.root.root.string;
our_toc_offset = h->toc_offset;
- if ((r_flags & IMAGE_REL_PPC_TOCDEFN)
+ if ((r_flags & IMAGE_REL_PPC_TOCDEFN)
== IMAGE_REL_PPC_TOCDEFN )
{
- /* This is unbelievable cheese. Some knowledgable asm
- hacker has decided to use r2 as a base for loading
- a value. He/She does this by setting the tocdefn bit,
- and not supplying a toc definition. The behaviour is
- then to use the difference between the value of the
- symbol and the actual location of the toc as the toc
- index.
+ /* This is unbelievable cheese. Some knowledgable asm
+ hacker has decided to use r2 as a base for loading
+ a value. He/She does this by setting the tocdefn bit,
+ and not supplying a toc definition. The behaviour is
+ then to use the difference between the value of the
+ symbol and the actual location of the toc as the toc
+ index.
In fact, what is usually happening is, because the
Import Address Table is mapped immediately following
the toc, some trippy library code trying for speed on
- dll linkage, takes advantage of that and considers
+ dll linkage, takes advantage of that and considers
the IAT to be part of the toc, thus saving a load.
*/
- our_toc_offset = val -
- (toc_section->output_section->vma +
+ our_toc_offset = val -
+ (toc_section->output_section->vma +
toc_section->output_offset);
/* The size must still fit in a 16bit displacment */
if (our_toc_offset >= 65535)
{
(*_bfd_error_handler)
- (_("%s: Relocation for %s of %x exceeds Toc size limit"),
+ (_("%s: Relocation for %s of %x exceeds Toc size limit"),
bfd_get_filename (input_bfd), name, our_toc_offset);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -1316,7 +1300,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (IS_WRITTEN(our_toc_offset))
{
- /* if it has been written out, it is marked with the
+ /* if it has been written out, it is marked with the
1 bit. Fix up our offset, but do not write it out
again.
*/
@@ -1327,7 +1311,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
record_toc(toc_section, our_toc_offset, pub, strdup(name));
/* write out the toc entry */
- bfd_put_32(output_bfd,
+ bfd_put_32 (output_bfd,
val,
toc_section->contents + our_toc_offset);
@@ -1338,31 +1322,30 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
- if (fixit && info->base_file)
+ if (fixit && info->base_file)
{
/* So if this is non pcrelative, and is referenced
to a section or a common symbol, then it needs a reloc */
/* relocation to a symbol in a section which
- isn't absolute - we output the address here
+ isn't absolute - we output the address here
to a file */
bfd_vma addr = toc_section->output_section->vma
+ toc_section->output_offset + our_toc_offset;
-
+
if (coff_data(output_bfd)->pe)
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
fwrite (&addr, 1,4, (FILE *) info->base_file);
}
-
/* FIXME: this test is conservative */
if ( (r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN &&
our_toc_offset > toc_section->_raw_size)
{
(*_bfd_error_handler)
- (_("%s: Relocation exceeds allocated TOC (%x)"),
+ (_("%s: Relocation exceeds allocated TOC (%x)"),
bfd_get_filename (input_bfd),
toc_section->_raw_size);
bfd_set_error (bfd_error_bad_value);
@@ -1372,18 +1355,18 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
/* Now we know the relocation for this toc reference */
relocation = our_toc_offset + TOC_LOAD_ADJUSTMENT;
rstat = _bfd_relocate_contents (howto,
- input_bfd,
- relocation,
+ input_bfd,
+ relocation,
loc);
}
break;
case IMAGE_REL_PPC_IFGLUE:
{
/* To solve this, we need to know whether or not the symbol */
- /* appearing on the call instruction is a glue function or not. */
+ /* appearing on the call instruction is a glue function or not. */
/* A glue function must announce itself via a IMGLUE reloc, and */
/* the reloc contains the required toc restore instruction */
-
+
bfd_vma x;
const char *my_name;
DUMP_RELOC2(howto->name, rel);
@@ -1391,18 +1374,18 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if (h != 0)
{
my_name = h->root.root.root.string;
- if (h->symbol_is_glue == 1)
+ if (h->symbol_is_glue == 1)
{
- x = bfd_get_32(input_bfd, loc);
- bfd_put_32(input_bfd, h->glue_insn, loc);
+ x = bfd_get_32 (input_bfd, loc);
+ bfd_put_32 (input_bfd, h->glue_insn, loc);
}
}
}
break;
case IMAGE_REL_PPC_SECREL:
/* Unimplemented: codeview debugging information */
- /* For fast access to the header of the section
- containing the item. */
+ /* For fast access to the header of the section
+ containing the item. */
break;
case IMAGE_REL_PPC_SECTION:
/* Unimplemented: codeview debugging information */
@@ -1420,15 +1403,15 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
my_name = h->root.root.root.string;
}
- fprintf(stderr,
- _("Warning: unsupported reloc %s <file %s, section %s>\n"),
+ fprintf (stderr,
+ _("Warning: unsupported reloc %s <file %s, section %s>\n"),
howto->name,
bfd_get_filename(input_bfd),
input_section->name);
- fprintf(stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
+ fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
rel->r_symndx, my_name, (long) rel->r_vaddr,
- (unsigned long) rel->r_vaddr);
+ (unsigned long) rel->r_vaddr);
}
break;
case IMAGE_REL_PPC_IMGLUE:
@@ -1436,12 +1419,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
/* There is nothing to do now. This reloc was noted in the first
pass over the relocs, and the glue instruction extracted */
const char *my_name;
- if (h->symbol_is_glue == 1)
+ if (h->symbol_is_glue == 1)
break;
my_name = h->root.root.root.string;
(*_bfd_error_handler)
- (_("%s: Out of order IMGLUE reloc for %s"),
+ (_("%s: Out of order IMGLUE reloc for %s"),
bfd_get_filename (input_bfd), my_name);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -1461,16 +1444,16 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata5_magic__",
false, false, true);
- first_thunk_address = myh->root.u.def.value +
- sec->output_section->vma +
- sec->output_offset -
+ first_thunk_address = myh->root.u.def.value +
+ sec->output_section->vma +
+ sec->output_offset -
pe_data(output_bfd)->pe_opthdr.ImageBase;
-
+
idata5offset = myh->root.u.def.value;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata6_magic__",
false, false, true);
-
+
thunk_size = myh->root.u.def.value - idata5offset;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata4_magic__",
@@ -1502,13 +1485,13 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
myh = coff_link_hash_lookup (coff_hash_table (info),
target,
false, false, true);
- if (myh == 0)
+ if (myh == 0)
{
- /* Missing magic cookies. Something is very wrong. */
- abort();
+ /* Missing magic cookies. Something is very wrong. */
+ abort ();
}
-
- val = myh->root.u.def.value +
+
+ val = myh->root.u.def.value +
sec->output_section->vma + sec->output_offset;
if (first_thunk_address == 0)
{
@@ -1516,16 +1499,16 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata5_magic__",
false, false, true);
- first_thunk_address = myh->root.u.def.value +
- sec->output_section->vma +
- sec->output_offset -
+ first_thunk_address = myh->root.u.def.value +
+ sec->output_section->vma +
+ sec->output_offset -
pe_data(output_bfd)->pe_opthdr.ImageBase;
-
+
idata5offset = myh->root.u.def.value;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata6_magic__",
false, false, true);
-
+
thunk_size = myh->root.u.def.value - idata5offset;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata4_magic__",
@@ -1536,8 +1519,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
rstat = _bfd_relocate_contents (howto,
- input_bfd,
- val -
+ input_bfd,
+ val -
pe_data(output_bfd)->pe_opthdr.ImageBase,
loc);
}
@@ -1549,8 +1532,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
+ input_section->output_offset);
rstat = _bfd_relocate_contents (howto,
- input_bfd,
- val,
+ input_bfd,
+ val,
loc);
break;
case IMAGE_REL_PPC_ADDR16:
@@ -1558,8 +1541,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
case IMAGE_REL_PPC_ADDR32:
DUMP_RELOC2(howto->name, rel);
rstat = _bfd_relocate_contents (howto,
- input_bfd,
- val,
+ input_bfd,
+ val,
loc);
break;
}
@@ -1571,11 +1554,11 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if (sym && pe_data(output_bfd)->in_reloc_p(output_bfd, howto))
{
/* relocation to a symbol in a section which
- isn't absolute - we output the address here
+ isn't absolute - we output the address here
to a file */
- bfd_vma addr = rel->r_vaddr
- - input_section->vma
- + input_section->output_offset
+ bfd_vma addr = rel->r_vaddr
+ - input_section->vma
+ + input_section->output_offset
+ input_section->output_section->vma;
if (coff_data(output_bfd)->pe)
@@ -1614,7 +1597,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name,
+ (info, name, howto->name,
(bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
{
@@ -1623,7 +1606,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
- }
+ }
return true;
}
@@ -1659,11 +1642,11 @@ dump_toc (vfile)
FILE *file = (FILE *) vfile;
struct list_ele *t;
- fprintf(file, _(h1));
- fprintf(file, _(h2));
- fprintf(file, _(h3));
+ fprintf (file, _(h1));
+ fprintf (file, _(h2));
+ fprintf (file, _(h3));
- for(t = head; t != 0; t=t->next)
+ for (t = head; t != 0; t=t->next)
{
const char *cat = "";
@@ -1680,26 +1663,26 @@ dump_toc (vfile)
cat = _("IAT reference ");
else
{
- fprintf(file,
+ fprintf (file,
_("**** global_toc_size %ld(%lx), thunk_size %ld(%lx)\n"),
global_toc_size, global_toc_size, thunk_size, thunk_size);
cat = _("Out of bounds!");
}
}
- fprintf(file,
+ fprintf (file,
" %04lx (%d)", (unsigned long) t->offset, t->offset - 32768);
- fprintf(file,
+ fprintf (file,
" %s %s\n",
cat, t->name);
}
- fprintf(file, "\n");
+ fprintf (file, "\n");
}
boolean
-ppc_allocate_toc_section (info)
+ppc_allocate_toc_section (info)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
asection *s;
@@ -1711,15 +1694,15 @@ ppc_allocate_toc_section (info)
if (bfd_of_toc_owner == 0)
{
- /* No toc owner? Something is very wrong. */
- abort();
+ /* No toc owner? Something is very wrong. */
+ abort ();
}
s = bfd_get_section_by_name ( bfd_of_toc_owner , TOC_SECTION_NAME);
- if (s == NULL)
+ if (s == NULL)
{
- /* No toc section? Something is very wrong. */
- abort();
+ /* No toc section? Something is very wrong. */
+ abort ();
}
foo = (bfd_byte *) bfd_alloc(bfd_of_toc_owner, global_toc_size);
@@ -1740,7 +1723,7 @@ ppc_process_before_allocation (abfd, info)
struct internal_reloc *i, *rel;
/* here we have a bfd that is to be included on the link. We have a hook
- to do reloc rummaging, before section sizes are nailed down. */
+ to do reloc rummaging, before section sizes are nailed down. */
_bfd_coff_get_external_symbols(abfd);
@@ -1754,17 +1737,17 @@ ppc_process_before_allocation (abfd, info)
for (; sec != 0; sec = sec->next)
{
- if (sec->reloc_count == 0)
+ if (sec->reloc_count == 0)
continue;
/* load the relocs */
/* FIXME: there may be a storage leak here */
i=_bfd_coff_read_internal_relocs(abfd,sec,1,0,0,0);
-
+
if (i == 0)
- abort();
+ abort ();
- for (rel=i;rel<i+sec->reloc_count;++rel)
+ for (rel=i;rel<i+sec->reloc_count;++rel)
{
unsigned short r_type = EXTRACT_TYPE (rel->r_type);
unsigned short r_flags = EXTRACT_FLAGS(rel->r_type);
@@ -1772,13 +1755,13 @@ ppc_process_before_allocation (abfd, info)
DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel);
- switch(r_type)
+ switch(r_type)
{
case IMAGE_REL_PPC_TOCREL16:
/* if TOCDEFN is on, ignore as someone else has allocated the
toc entry */
if ( (r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN )
- ok = ppc_record_toc_entry(abfd, info, sec,
+ ok = ppc_record_toc_entry(abfd, info, sec,
rel->r_symndx, default_toc);
if (!ok)
return false;
@@ -1797,7 +1780,6 @@ ppc_process_before_allocation (abfd, info)
#endif
-
static bfd_reloc_status_type
ppc_refhi_reloc (abfd,
reloc_entry,
@@ -1876,7 +1858,6 @@ ppc_pair_reloc (abfd,
return bfd_reloc_undefined;
}
-
static bfd_reloc_status_type
ppc_toc16_reloc (abfd,
@@ -2011,15 +1992,12 @@ ppc_imglue_reloc (abfd,
return bfd_reloc_ok;
}
-
-
#define MAX_RELOC_INDEX \
- (sizeof(ppc_coff_howto_table) / sizeof(ppc_coff_howto_table[0]) - 1)
-
+ (sizeof (ppc_coff_howto_table) / sizeof (ppc_coff_howto_table[0]) - 1)
/* FIXME: There is a possiblity that when we read in a reloc from a file,
- that there are some bits encoded in the upper portion of the
+ that there are some bits encoded in the upper portion of the
type field. Not yet implemented.
*/
static void ppc_coff_rtype2howto PARAMS ((arelent *relent,
@@ -2029,7 +2007,7 @@ static void
ppc_coff_rtype2howto (relent, internal)
arelent *relent;
struct internal_reloc *internal;
-{
+{
/* We can encode one of three things in the type field, aside from the
type:
@@ -2046,15 +2024,15 @@ ppc_coff_rtype2howto (relent, internal)
unsigned short r_flags = EXTRACT_FLAGS(internal->r_type);
unsigned short junk = EXTRACT_JUNK (internal->r_type);
- /* the masking process only slices off the bottom byte for r_type. */
- if ( r_type > MAX_RELOC_INDEX )
- abort();
+ /* the masking process only slices off the bottom byte for r_type. */
+ if ( r_type > MAX_RELOC_INDEX )
+ abort ();
/* check for absolute crap */
if ( junk != 0 )
- abort();
+ abort ();
- switch(r_type)
+ switch(r_type)
{
case IMAGE_REL_PPC_ADDR16:
case IMAGE_REL_PPC_REL24:
@@ -2079,16 +2057,16 @@ ppc_coff_rtype2howto (relent, internal)
howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16;
break;
default:
- fprintf(stderr,
+ fprintf (stderr,
_("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"),
ppc_coff_howto_table[r_type].name,
r_type);
- howto = ppc_coff_howto_table + r_type;
+ howto = ppc_coff_howto_table + r_type;
break;
}
-
+
relent->howto = howto;
-
+
}
static reloc_howto_type *
@@ -2117,15 +2095,15 @@ coff_ppc_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
unsigned short r_flags = EXTRACT_FLAGS(rel->r_type);
unsigned short junk = EXTRACT_JUNK (rel->r_type);
- /* the masking process only slices off the bottom byte for r_type. */
- if ( r_type > MAX_RELOC_INDEX )
- abort();
-
+ /* the masking process only slices off the bottom byte for r_type. */
+ if ( r_type > MAX_RELOC_INDEX )
+ abort ();
+
/* check for absolute crap */
if ( junk != 0 )
- abort();
-
- switch(r_type)
+ abort ();
+
+ switch(r_type)
{
case IMAGE_REL_PPC_ADDR32NB:
DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel);
@@ -2154,18 +2132,17 @@ coff_ppc_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
howto = ppc_coff_howto_table + r_type;
break;
default:
- fprintf(stderr,
+ fprintf (stderr,
_("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"),
ppc_coff_howto_table[r_type].name,
r_type);
howto = ppc_coff_howto_table + r_type;
break;
}
-
+
return howto;
}
-
/* a cheesy little macro to make the code a little more readable */
#define HOW2MAP(bfd_rtype,ppc_rtype) \
case bfd_rtype: return &ppc_coff_howto_table[ppc_rtype]
@@ -2189,16 +2166,15 @@ ppc_coff_reloc_type_lookup (abfd, code)
HOW2MAP(BFD_RELOC_16_GOTOFF, IMAGE_REL_PPC_TOCREL16_DEFN);
HOW2MAP(BFD_RELOC_32, IMAGE_REL_PPC_ADDR32);
HOW2MAP(BFD_RELOC_RVA, IMAGE_REL_PPC_ADDR32NB);
- default:
+ default:
return NULL;
}
/*NOTREACHED*/
}
#undef HOW2MAP
-
-/* Tailor coffcode.h -- macro heaven. */
+/* Tailor coffcode.h -- macro heaven. */
#define RTYPE2HOWTO(cache_ptr, dst) ppc_coff_rtype2howto (cache_ptr, dst)
@@ -2211,7 +2187,7 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
#define coff_bfd_reloc_type_lookup ppc_coff_reloc_type_lookup
#define coff_rtype_to_howto coff_ppc_rtype_to_howto
#define coff_relocate_section coff_ppc_relocate_section
-#define coff_bfd_final_link ppc_bfd_coff_final_link
+#define coff_bfd_final_link ppc_bfd_coff_final_link
#ifndef COFF_IMAGE_WITH_PE
/* FIXME: This no longer works. */
@@ -2242,12 +2218,10 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 1 }
#include "coffcode.h"
-
-
#ifndef COFF_IMAGE_WITH_PE
/* FIXME:
- What we're trying to do here is allocate a toc section (early), and attach
+ What we're trying to do here is allocate a toc section (early), and attach
it to the last bfd to be processed. This avoids the problem of having a toc
written out before all files have been processed. This code allocates
a toc section for every file, and records the last one seen. There are
@@ -2277,7 +2251,7 @@ ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
register asection *s;
s = bfd_get_section_by_name ( abfd , TOC_SECTION_NAME);
- if (s != NULL)
+ if (s != NULL)
{
return;
}
@@ -2291,7 +2265,7 @@ ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
|| !bfd_set_section_alignment (abfd, s, 2))
{
/* FIXME: set appropriate bfd error */
- abort();
+ abort ();
}
/* save the bfd for later allocation */
@@ -2324,18 +2298,17 @@ ppc_get_last()
}
/* this piece of machinery exists only to guarantee that the bfd that holds
- the toc section is written last.
+ the toc section is written last.
This does depend on bfd_make_section attaching a new section to the
- end of the section list for the bfd.
+ end of the section list for the bfd.
- This is otherwise intended to be functionally the same as
- cofflink.c:_bfd_coff_final_link(). It is specifically different only
- where the POWERPC_LE_PE macro modifies the code. It is left in as a
+ This is otherwise intended to be functionally the same as
+ cofflink.c:_bfd_coff_final_link(). It is specifically different only
+ where the POWERPC_LE_PE macro modifies the code. It is left in as a
precise form of comment. krk@cygnus.com
*/
-
/* Do the final link step. */
boolean
@@ -2840,13 +2813,12 @@ ppc_bfd_coff_final_link (abfd, info)
}
#endif
-
/* Forward declaration for use by alternative_target field. */
#ifdef TARGET_BIG_SYM
extern const bfd_target TARGET_BIG_SYM;
#endif
-/* The transfer vectors that lead the outside world to all of the above. */
+/* The transfer vectors that lead the outside world to all of the above. */
#ifdef TARGET_LITTLE_SYM
const bfd_target TARGET_LITTLE_SYM =
@@ -2859,7 +2831,7 @@ const bfd_target TARGET_LITTLE_SYM =
(HAS_RELOC | EXEC_P | /* FIXME: object flags */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
-
+
#ifndef COFF_WITH_PE
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
#else
@@ -2878,14 +2850,14 @@ const bfd_target TARGET_LITTLE_SYM =
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
+
{_bfd_dummy_target, coff_object_p, /* bfd_check_format */
bfd_generic_archive_p, /* _bfd_dummy_target */ coff_object_p },
{bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
bfd_false},
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
_bfd_write_archive_contents, bfd_false},
-
+
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
BFD_JUMP_TABLE_CORE (_bfd_nocore),
@@ -2902,7 +2874,7 @@ const bfd_target TARGET_LITTLE_SYM =
#else
NULL,
#endif
-
+
COFF_SWAP_TABLE
};
#endif
@@ -2911,7 +2883,7 @@ const bfd_target TARGET_LITTLE_SYM =
const bfd_target TARGET_BIG_SYM =
{
TARGET_BIG_NAME,
- bfd_target_coff_flavour,
+ bfd_target_coff_flavour,
BFD_ENDIAN_BIG, /* data byte order is big */
BFD_ENDIAN_BIG, /* header byte order is big */
@@ -2955,14 +2927,13 @@ const bfd_target TARGET_BIG_SYM =
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
/* Alternative_target. */
#ifdef TARGET_LITTLE_SYM
& TARGET_LITTLE_SYM,
#else
NULL,
#endif
-
+
COFF_SWAP_TABLE
};
diff --git a/gnu/usr.bin/binutils/bfd/coff-rs6000.c b/gnu/usr.bin/binutils/bfd/coff-rs6000.c
index 6f8563f911b..ed47000e184 100644
--- a/gnu/usr.bin/binutils/bfd/coff-rs6000.c
+++ b/gnu/usr.bin/binutils/bfd/coff-rs6000.c
@@ -1,11 +1,12 @@
/* BFD back-end for IBM RS/6000 "XCOFF" files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
them with octal escapes), and isn't useful without an understanding of what
character set it is.
- Written by Metin G. Ozisik, Mimi Ph\373\364ng-Th\345o V\365,
+ Written by Metin G. Ozisik, Mimi Ph\373\364ng-Th\345o V\365,
and John Gilmore.
Archive support from Damon A. Permezel.
Contributed by IBM Corporation and Cygnus Support.
@@ -26,41 +27,25 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* Internalcoff.h and coffcode.h modify themselves based on this flag. */
-#define RS6000COFF_C 1
-
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "coff/internal.h"
#include "coff/rs6000.h"
#include "libcoff.h"
+#define TARGET_NAME "aixcoff-rs6000"
+#define TARGET_SYM rs6000coff_vec
+#include "xcoff-target.h"
/* The main body of code is in coffcode.h. */
-static boolean xcoff_mkobject PARAMS ((bfd *));
-static boolean xcoff_copy_private_bfd_data PARAMS ((bfd *, bfd *));
-static boolean xcoff_is_local_label_name PARAMS ((bfd *, const char *));
-static void xcoff_rtype2howto
- PARAMS ((arelent *, struct internal_reloc *));
-static reloc_howto_type *xcoff_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static boolean xcoff_slurp_armap PARAMS ((bfd *));
-static const bfd_target *xcoff_archive_p PARAMS ((bfd *));
-static PTR xcoff_read_ar_hdr PARAMS ((bfd *));
-static bfd *xcoff_openr_next_archived_file PARAMS ((bfd *, bfd *));
-static int xcoff_generic_stat_arch_elt PARAMS ((bfd *, struct stat *));
static const char *normalize_filename PARAMS ((bfd *));
-static boolean xcoff_write_armap
- PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
-static boolean xcoff_write_archive_contents PARAMS ((bfd *));
-static int _bfd_xcoff_sizeof_headers PARAMS ((bfd *, boolean));
-
+
/* We use our own tdata type. Its first field is the COFF tdata type,
so the COFF routines are compatible. */
-static boolean
-xcoff_mkobject (abfd)
+boolean
+_bfd_xcoff_mkobject (abfd)
bfd *abfd;
{
coff_data_type *coff;
@@ -90,8 +75,8 @@ xcoff_mkobject (abfd)
/* Copy XCOFF data from one BFD to another. */
-static boolean
-xcoff_copy_private_bfd_data (ibfd, obfd)
+boolean
+_bfd_xcoff_copy_private_bfd_data (ibfd, obfd)
bfd *ibfd;
bfd *obfd;
{
@@ -138,430 +123,723 @@ xcoff_copy_private_bfd_data (ibfd, obfd)
The AIX native linker does not have a -X option, and it ignores the
-x option. */
-static boolean
-xcoff_is_local_label_name (abfd, name)
+boolean
+_bfd_xcoff_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
const char *name ATTRIBUTE_UNUSED;
{
return false;
}
+void
+_bfd_xcoff_swap_sym_in (abfd, ext1, in1)
+ bfd *abfd;
+ PTR ext1;
+ PTR in1;
+{
+ SYMENT *ext = (SYMENT *)ext1;
+ struct internal_syment *in = (struct internal_syment *)in1;
+
+ if (ext->e.e_name[0] != 0)
+ {
+ memcpy(in->_n._n_name, ext->e.e_name, SYMNMLEN);
+ }
+ else
+ {
+ in->_n._n_n._n_zeroes = 0;
+ in->_n._n_n._n_offset =
+ bfd_h_get_32(abfd, (bfd_byte *) ext->e.e.e_offset);
+ }
+
+ in->n_value = bfd_h_get_32(abfd, (bfd_byte *) ext->e_value);
+ in->n_scnum = bfd_h_get_16(abfd, (bfd_byte *) ext->e_scnum);
+ in->n_type = bfd_h_get_16(abfd, (bfd_byte *) ext->e_type);
+ in->n_sclass = bfd_h_get_8(abfd, ext->e_sclass);
+ in->n_numaux = bfd_h_get_8(abfd, ext->e_numaux);
+}
+
+unsigned int
+_bfd_xcoff_swap_sym_out (abfd, inp, extp)
+ bfd *abfd;
+ PTR inp;
+ PTR extp;
+{
+ struct internal_syment *in = (struct internal_syment *)inp;
+ SYMENT *ext =(SYMENT *)extp;
+
+ if (in->_n._n_name[0] != 0)
+ {
+ memcpy(ext->e.e_name, in->_n._n_name, SYMNMLEN);
+ }
+ else
+ {
+ bfd_h_put_32(abfd, 0, (bfd_byte *) ext->e.e.e_zeroes);
+ bfd_h_put_32(abfd, in->_n._n_n._n_offset,
+ (bfd_byte *) ext->e.e.e_offset);
+ }
+
+ bfd_h_put_32(abfd, in->n_value , (bfd_byte *) ext->e_value);
+ bfd_h_put_16(abfd, in->n_scnum , (bfd_byte *) ext->e_scnum);
+ bfd_h_put_16(abfd, in->n_type , (bfd_byte *) ext->e_type);
+ bfd_h_put_8(abfd, in->n_sclass , ext->e_sclass);
+ bfd_h_put_8(abfd, in->n_numaux , ext->e_numaux);
+ return bfd_coff_symesz (abfd);
+}
+
+#define PUTWORD bfd_h_put_32
+#define PUTHALF bfd_h_put_16
+#define PUTBYTE bfd_h_put_8
+#define GETWORD bfd_h_get_32
+#define GETHALF bfd_h_get_16
+#define GETBYTE bfd_h_get_8
+
+void
+_bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
+ bfd *abfd;
+ PTR ext1;
+ int type;
+ int class;
+ int indx;
+ int numaux;
+ PTR in1;
+{
+ AUXENT *ext = (AUXENT *)ext1;
+ union internal_auxent *in = (union internal_auxent *)in1;
+
+ switch (class) {
+ case C_FILE:
+ if (ext->x_file.x_fname[0] == 0) {
+ in->x_file.x_n.x_zeroes = 0;
+ in->x_file.x_n.x_offset =
+ bfd_h_get_32(abfd, (bfd_byte *) ext->x_file.x_n.x_offset);
+ } else {
+ if (numaux > 1)
+ {
+ if (indx == 0)
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname,
+ numaux * sizeof (AUXENT));
+ }
+ else
+ {
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+ }
+ }
+ goto end;
+
+ /* RS/6000 "csect" auxents */
+ case C_EXT:
+ case C_HIDEXT:
+ if (indx + 1 == numaux)
+ {
+ in->x_csect.x_scnlen.l =
+ bfd_h_get_32 (abfd, ext->x_csect.x_scnlen);
+ in->x_csect.x_parmhash = bfd_h_get_32 (abfd,
+ ext->x_csect.x_parmhash);
+ in->x_csect.x_snhash = bfd_h_get_16 (abfd, ext->x_csect.x_snhash);
+ /* We don't have to hack bitfields in x_smtyp because it's
+ defined by shifts-and-ands, which are equivalent on all
+ byte orders. */
+ in->x_csect.x_smtyp = bfd_h_get_8 (abfd, ext->x_csect.x_smtyp);
+ in->x_csect.x_smclas = bfd_h_get_8 (abfd, ext->x_csect.x_smclas);
+ in->x_csect.x_stab = bfd_h_get_32 (abfd, ext->x_csect.x_stab);
+ in->x_csect.x_snstab = bfd_h_get_16 (abfd, ext->x_csect.x_snstab);
+ goto end;
+ }
+ break;
+
+ case C_STAT:
+ case C_LEAFSTAT:
+ case C_HIDDEN:
+ if (type == T_NULL) {
+ in->x_scn.x_scnlen = bfd_h_get_32(abfd,
+ (bfd_byte *) ext->x_scn.x_scnlen);
+ in->x_scn.x_nreloc = bfd_h_get_16(abfd,
+ (bfd_byte *) ext->x_scn.x_nreloc);
+ in->x_scn.x_nlinno = bfd_h_get_16(abfd,
+ (bfd_byte *) ext->x_scn.x_nlinno);
+ /* PE defines some extra fields; we zero them out for
+ safety. */
+ in->x_scn.x_checksum = 0;
+ in->x_scn.x_associated = 0;
+ in->x_scn.x_comdat = 0;
+
+ goto end;
+ }
+ break;
+ }
+
+ in->x_sym.x_tagndx.l = bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_tagndx);
+ in->x_sym.x_tvndx = bfd_h_get_16(abfd, (bfd_byte *) ext->x_sym.x_tvndx);
+
+ if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ {
+ in->x_sym.x_fcnary.x_fcn.x_lnnoptr = bfd_h_get_32(abfd, (bfd_byte *)
+ ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
+ in->x_sym.x_fcnary.x_fcn.x_endndx.l = bfd_h_get_32(abfd, (bfd_byte *)
+ ext->x_sym.x_fcnary.x_fcn.x_endndx);
+ }
+ else
+ {
+ in->x_sym.x_fcnary.x_ary.x_dimen[0] =
+ bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
+ in->x_sym.x_fcnary.x_ary.x_dimen[1] =
+ bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
+ in->x_sym.x_fcnary.x_ary.x_dimen[2] =
+ bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
+ in->x_sym.x_fcnary.x_ary.x_dimen[3] =
+ bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
+ }
+ if (ISFCN(type)) {
+ in->x_sym.x_misc.x_fsize = bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_fsize);
+ }
+ else {
+ in->x_sym.x_misc.x_lnsz.x_lnno = bfd_h_get_16(abfd, (bfd_byte *)
+ ext->x_sym.x_misc.x_lnsz.x_lnno);
+ in->x_sym.x_misc.x_lnsz.x_size = bfd_h_get_16(abfd, (bfd_byte *)
+ ext->x_sym.x_misc.x_lnsz.x_size);
+ }
+
+end: ;
+ /* the semicolon is because MSVC doesn't like labels at
+ end of block. */
+
+}
+
+unsigned int
+_bfd_xcoff_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;
+{
+ union internal_auxent *in = (union internal_auxent *)inp;
+ AUXENT *ext = (AUXENT *)extp;
+
+ memset((PTR)ext, 0, bfd_coff_auxesz (abfd));
+ switch (class)
+ {
+ case C_FILE:
+ if (in->x_file.x_fname[0] == 0)
+ {
+ PUTWORD(abfd, 0, (bfd_byte *) ext->x_file.x_n.x_zeroes);
+ PUTWORD(abfd,
+ in->x_file.x_n.x_offset,
+ (bfd_byte *) ext->x_file.x_n.x_offset);
+ }
+ else
+ {
+ memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+ }
+ goto end;
+
+ /* RS/6000 "csect" auxents */
+ case C_EXT:
+ case C_HIDEXT:
+ if (indx + 1 == numaux)
+ {
+ PUTWORD (abfd, in->x_csect.x_scnlen.l,ext->x_csect.x_scnlen);
+ PUTWORD (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash);
+ PUTHALF (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash);
+ /* We don't have to hack bitfields in x_smtyp because it's
+ defined by shifts-and-ands, which are equivalent on all
+ byte orders. */
+ PUTBYTE (abfd, in->x_csect.x_smtyp, ext->x_csect.x_smtyp);
+ PUTBYTE (abfd, in->x_csect.x_smclas, ext->x_csect.x_smclas);
+ PUTWORD (abfd, in->x_csect.x_stab, ext->x_csect.x_stab);
+ PUTHALF (abfd, in->x_csect.x_snstab, ext->x_csect.x_snstab);
+ goto end;
+ }
+ break;
+
+ case C_STAT:
+ case C_LEAFSTAT:
+ case C_HIDDEN:
+ if (type == T_NULL) {
+ bfd_h_put_32(abfd, in->x_scn.x_scnlen, (bfd_byte *) ext->x_scn.x_scnlen);
+ bfd_h_put_16(abfd, in->x_scn.x_nreloc, (bfd_byte *) ext->x_scn.x_nreloc);
+ bfd_h_put_16(abfd, in->x_scn.x_nlinno, (bfd_byte *) ext->x_scn.x_nlinno);
+ goto end;
+ }
+ break;
+ }
+
+ PUTWORD(abfd, in->x_sym.x_tagndx.l, (bfd_byte *) ext->x_sym.x_tagndx);
+ bfd_h_put_16 (abfd, in->x_sym.x_tvndx , (bfd_byte *) ext->x_sym.x_tvndx);
+
+ if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+ {
+ bfd_h_put_32(abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
+ (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
+ PUTWORD(abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l,
+ (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx);
+ }
+ else
+ {
+ bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
+ (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
+ bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
+ (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
+ bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
+ (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
+ bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
+ (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
+ }
+
+ if (ISFCN (type))
+ PUTWORD (abfd, in->x_sym.x_misc.x_fsize,
+ (bfd_byte *) ext->x_sym.x_misc.x_fsize);
+ else
+ {
+ bfd_h_put_16(abfd, in->x_sym.x_misc.x_lnsz.x_lnno,
+ (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_lnno);
+ bfd_h_put_16(abfd, in->x_sym.x_misc.x_lnsz.x_size,
+ (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_size);
+ }
+
+end:
+ return bfd_coff_auxesz (abfd);
+}
+
/* The XCOFF reloc table. Actually, XCOFF relocations specify the
bitsize and whether they are signed or not, along with a
conventional type. This table is for the types, which are used for
different algorithms for putting in the reloc. Many of these
relocs need special_function entries, which I have not written. */
-static reloc_howto_type xcoff_howto_table[] =
+/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
+ from smaller values. Start with zero, widen, *then* decrement. */
+#define MINUS_ONE (((bfd_vma)0) - 1)
+
+reloc_howto_type xcoff_howto_table[] =
{
/* Standard 32 bit relocation. */
- HOWTO (0, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_POS", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_POS", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* 32 bit relocation, but store negative value. */
- HOWTO (1, /* type */
- 0, /* rightshift */
- -2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (1, /* type */
+ 0, /* rightshift */
+ -2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_NEG", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_NEG", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* 32 bit PC relative relocation. */
- HOWTO (2, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* 16 bit TOC relative relocation. */
- HOWTO (3, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (3, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TOC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TOC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* I don't really know what this is. */
- HOWTO (4, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (4, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RTB", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RTB", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* External TOC relative symbol. */
- HOWTO (5, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (5, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_GL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_GL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Local TOC relative symbol. */
- HOWTO (6, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (6, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TCL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TCL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
EMPTY_HOWTO (7),
-
+
/* Non modifiable absolute branch. */
- HOWTO (8, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (8, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_BA", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0, /* special_function */
+ "R_BA", /* name */
+ true, /* partial_inplace */
+ 0x3fffffc, /* src_mask */
+ 0x3fffffc, /* dst_mask */
false), /* pcrel_offset */
-
+
EMPTY_HOWTO (9),
/* Non modifiable relative branch. */
- HOWTO (0xa, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xa, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_BR", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0, /* special_function */
+ "R_BR", /* name */
+ true, /* partial_inplace */
+ 0x3fffffc, /* src_mask */
+ 0x3fffffc, /* dst_mask */
false), /* pcrel_offset */
-
+
EMPTY_HOWTO (0xb),
/* Indirect load. */
- HOWTO (0xc, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xc, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Load address. */
- HOWTO (0xd, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xd, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RLA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RLA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
EMPTY_HOWTO (0xe),
-
+
/* Non-relocating reference. */
- HOWTO (0xf, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xf, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_REF", /* name */
- false, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
+ 0, /* special_function */
+ "R_REF", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
false), /* pcrel_offset */
-
+
EMPTY_HOWTO (0x10),
EMPTY_HOWTO (0x11),
-
+
/* TOC relative indirect load. */
- HOWTO (0x12, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TRL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TRL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* TOC relative load address. */
- HOWTO (0x13, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x13, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TRLA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TRLA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable relative branch. */
- HOWTO (0x14, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x14, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RRTBI", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RRTBI", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable absolute branch. */
- HOWTO (0x15, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x15, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RRTBA", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RRTBA", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable call absolute indirect. */
- HOWTO (0x16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_CAI", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_CAI", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable call relative. */
- HOWTO (0x17, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x17, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_CREL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_CREL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x18, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x18, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RBA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x19, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x19, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBAC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RBAC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch relative. */
- HOWTO (0x1a, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x1a, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBR", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RBR", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x1b, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x1b, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBRC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RBRC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+ HOWTO (0, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ 0, /* special_function */
+ "R_POS", /* name */
+ true, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
false) /* pcrel_offset */
+
};
/* These are the first two like the above but for 16-bit relocs. */
static reloc_howto_type xcoff_howto_table_16[] =
{
/* Standard 16 bit relocation. */
- HOWTO (0, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_POS_16", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_POS_16", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* 16 bit relocation, but store negative value. */
- HOWTO (1, /* type */
- 0, /* rightshift */
- -2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (1, /* type */
+ 0, /* rightshift */
+ -2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_NEG_16", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_NEG_16", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* 16 bit PC relative relocation. */
- HOWTO (2, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL_16", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
-};
-
-static void
-xcoff_rtype2howto (relent, internal)
+ 0, /* special_function */
+ "R_REL_16", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false) /* pcrel_offset */
+ };
+
+void
+_bfd_xcoff_rtype2howto (relent, internal)
arelent *relent;
struct internal_reloc *internal;
{
relent->howto = xcoff_howto_table + internal->r_type;
if (relent->howto->bitsize != ((unsigned int) internal->r_size & 0x1f) + 1
- && (internal->r_type
- < sizeof(xcoff_howto_table_16)/sizeof(xcoff_howto_table_16[0])))
+ && (internal->r_type
+ < sizeof (xcoff_howto_table_16)/sizeof (xcoff_howto_table_16[0])))
relent->howto = xcoff_howto_table_16 + internal->r_type;
/* The r_size field of an XCOFF reloc encodes the bitsize of the
relocation, as well as indicating whether it is signed or not.
Doublecheck that the relocation information gathered from the
- type matches this information. */
- if (relent->howto->bitsize != ((unsigned int) internal->r_size & 0x1f) + 1)
+ type matches this information. The bitsize is not significant
+ for R_REF relocs. */
+ if (relent->howto->dst_mask != 0
+ && (relent->howto->bitsize
+ != ((unsigned int) internal->r_size & 0x3f) + 1))
abort ();
#if 0
if ((internal->r_size & 0x80) != 0
@@ -571,8 +849,8 @@ xcoff_rtype2howto (relent, internal)
#endif
}
-static reloc_howto_type *
-xcoff_reloc_type_lookup (abfd, code)
+reloc_howto_type *
+_bfd_xcoff_reloc_type_lookup (abfd, code)
bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
@@ -587,34 +865,12 @@ xcoff_reloc_type_lookup (abfd, code)
case BFD_RELOC_32:
case BFD_RELOC_CTOR:
return &xcoff_howto_table[0];
+ case BFD_RELOC_64:
+ return &xcoff_howto_table[0x1c];
default:
return NULL;
}
}
-
-#define SELECT_RELOC(internal, howto) \
- { \
- internal.r_type = howto->type; \
- internal.r_size = \
- ((howto->complain_on_overflow == complain_overflow_signed \
- ? 0x80 \
- : 0) \
- | (howto->bitsize - 1)); \
- }
-
-#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
-
-#define COFF_LONG_FILENAMES
-
-#define RTYPE2HOWTO(cache_ptr, dst) xcoff_rtype2howto (cache_ptr, dst)
-
-#define coff_mkobject xcoff_mkobject
-#define coff_bfd_copy_private_bfd_data xcoff_copy_private_bfd_data
-#define coff_bfd_is_local_label_name xcoff_is_local_label_name
-#define coff_bfd_reloc_type_lookup xcoff_reloc_type_lookup
-#define coff_relocate_section _bfd_ppc_xcoff_relocate_section
-
-#include "coffcode.h"
/* XCOFF archive support. The original version of this code was by
Damon A. Permezel. It was enhanced to permit cross support, and
@@ -727,7 +983,6 @@ struct xcoff_ar_file_hdr_big
#define SIZEOF_AR_FILE_HDR_BIG (6 * 20 + SXCOFFARMAG)
-
/* Each XCOFF archive member starts with this (printable) structure. */
struct xcoff_ar_hdr
@@ -804,7 +1059,6 @@ struct xcoff_ar_hdr_big
#define SIZEOF_AR_HDR_BIG (3 * 20 + 4 * 12 + 4)
-
/* We often have to distinguish between the old and big file format.
Make it a bit cleaner. We can use `xcoff_ardata' here because the
`hdr' member has the same size and position in both formats. */
@@ -826,34 +1080,17 @@ struct xcoff_ar_hdr_big
#define arch_xhdr_big(bfd) \
((struct xcoff_ar_hdr_big *) arch_eltdata (bfd)->arch_header)
-/* XCOFF archives do not have anything which corresponds to an
- extended name table. */
-
-#define xcoff_slurp_extended_name_table bfd_false
-#define xcoff_construct_extended_name_table \
- ((boolean (*) PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
- bfd_false)
-#define xcoff_truncate_arname bfd_dont_truncate_arname
-
-/* We can use the standard get_elt_at_index routine. */
-
-#define xcoff_get_elt_at_index _bfd_generic_get_elt_at_index
-
-/* XCOFF archives do not have a timestamp. */
-
-#define xcoff_update_armap_timestamp bfd_true
-
/* Read in the armap of an XCOFF archive. */
-static boolean
-xcoff_slurp_armap (abfd)
+boolean
+_bfd_xcoff_slurp_armap (abfd)
bfd *abfd;
{
file_ptr off;
size_t namlen;
bfd_size_type sz;
bfd_byte *contents, *cend;
- unsigned int c, i;
+ bfd_vma c, i;
carsym *arsym;
bfd_byte *p;
@@ -888,6 +1125,33 @@ xcoff_slurp_armap (abfd)
return false;
sz = strtol (hdr.size, (char **) NULL, 10);
+
+ /* Read in the entire symbol table. */
+ contents = (bfd_byte *) bfd_alloc (abfd, sz);
+ if (contents == NULL)
+ return false;
+ if (bfd_read ((PTR) contents, 1, sz, abfd) != sz)
+ return false;
+
+ /* The symbol table starts with a four byte count. */
+ c = bfd_h_get_32 (abfd, contents);
+
+ if (c * 4 >= sz)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ bfd_ardata (abfd)->symdefs = ((carsym *)
+ bfd_alloc (abfd, c * sizeof (carsym)));
+ if (bfd_ardata (abfd)->symdefs == NULL)
+ return false;
+
+ /* After the count comes a list of four byte file offsets. */
+ for (i = 0, arsym = bfd_ardata (abfd)->symdefs, p = contents + 4;
+ i < c;
+ ++i, ++arsym, p += 4)
+ arsym->file_offset = bfd_h_get_32 (abfd, p);
}
else
{
@@ -918,34 +1182,34 @@ xcoff_slurp_armap (abfd)
machines) since the field width is 20 and there numbers with more
than 32 bits can be represented. */
sz = strtol (hdr.size, (char **) NULL, 10);
- }
- /* Read in the entire symbol table. */
- contents = (bfd_byte *) bfd_alloc (abfd, sz);
- if (contents == NULL)
- return false;
- if (bfd_read ((PTR) contents, 1, sz, abfd) != sz)
- return false;
+ /* Read in the entire symbol table. */
+ contents = (bfd_byte *) bfd_alloc (abfd, sz);
+ if (contents == NULL)
+ return false;
+ if (bfd_read ((PTR) contents, 1, sz, abfd) != sz)
+ return false;
- /* The symbol table starts with a four byte count. */
- c = bfd_h_get_32 (abfd, contents);
+ /* The symbol table starts with an eight byte count. */
+ c = bfd_h_get_64 (abfd, contents);
- if (c * 4 >= sz)
- {
- bfd_set_error (bfd_error_bad_value);
- return false;
- }
+ if (c * 8 >= sz)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
- bfd_ardata (abfd)->symdefs = ((carsym *)
- bfd_alloc (abfd, c * sizeof (carsym)));
- if (bfd_ardata (abfd)->symdefs == NULL)
- return false;
+ bfd_ardata (abfd)->symdefs = ((carsym *)
+ bfd_alloc (abfd, c * sizeof (carsym)));
+ if (bfd_ardata (abfd)->symdefs == NULL)
+ return false;
- /* After the count comes a list of four byte file offsets. */
- for (i = 0, arsym = bfd_ardata (abfd)->symdefs, p = contents + 4;
- i < c;
- ++i, ++arsym, p += 4)
- arsym->file_offset = bfd_h_get_32 (abfd, p);
+ /* After the count comes a list of eight byte file offsets. */
+ for (i = 0, arsym = bfd_ardata (abfd)->symdefs, p = contents + 8;
+ i < c;
+ ++i, ++arsym, p += 8)
+ arsym->file_offset = bfd_h_get_64 (abfd, p);
+ }
/* After the file offsets come null terminated symbol names. */
cend = contents + sz;
@@ -969,8 +1233,8 @@ xcoff_slurp_armap (abfd)
/* See if this is an XCOFF archive. */
-static const bfd_target *
-xcoff_archive_p (abfd)
+const bfd_target *
+_bfd_xcoff_archive_p (abfd)
bfd *abfd;
{
char magic[SXCOFFARMAG];
@@ -1060,7 +1324,7 @@ xcoff_archive_p (abfd)
memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG);
}
- if (! xcoff_slurp_armap (abfd))
+ if (! _bfd_xcoff_slurp_armap (abfd))
{
bfd_release (abfd, bfd_ardata (abfd));
abfd->tdata.aout_ar_data = (struct artdata *) NULL;
@@ -1072,8 +1336,8 @@ xcoff_archive_p (abfd)
/* Read the archive header in an XCOFF archive. */
-static PTR
-xcoff_read_ar_hdr (abfd)
+PTR
+_bfd_xcoff_read_ar_hdr (abfd)
bfd *abfd;
{
size_t namlen;
@@ -1160,8 +1424,8 @@ xcoff_read_ar_hdr (abfd)
/* Open the next element in an XCOFF archive. */
-static bfd *
-xcoff_openr_next_archived_file (archive, last_file)
+bfd *
+_bfd_xcoff_openr_next_archived_file (archive, last_file)
bfd *archive;
bfd *last_file;
{
@@ -1221,8 +1485,8 @@ xcoff_openr_next_archived_file (archive, last_file)
/* Stat an element in an XCOFF archive. */
-static int
-xcoff_generic_stat_arch_elt (abfd, s)
+int
+_bfd_xcoff_generic_stat_arch_elt (abfd, s)
bfd *abfd;
struct stat *s;
{
@@ -1276,7 +1540,6 @@ normalize_filename (abfd)
/* Write out an XCOFF armap. */
-/*ARGSUSED*/
static boolean
xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
bfd *abfd;
@@ -1362,29 +1625,39 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
return true;
}
-/*ARGSUSED*/
+/* Write a single armap in the big format. */
static boolean
-xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
+xcoff_write_one_armap_big (abfd, map, orl_count, orl_ccount, stridx, bits64,
+ prevoff, nextoff)
bfd *abfd;
- unsigned int elength ATTRIBUTE_UNUSED;
struct orl *map;
unsigned int orl_count;
- int stridx;
+ unsigned int orl_ccount;
+ unsigned int stridx;
+ int bits64;
+ const char *prevoff;
+ char *nextoff;
{
struct xcoff_ar_hdr_big hdr;
char *p;
unsigned char buf[4];
+ const bfd_arch_info_type *arch_info = NULL;
bfd *sub;
file_ptr fileoff;
+ bfd *object_bfd;
unsigned int i;
memset (&hdr, 0, sizeof hdr);
/* XXX This call actually should use %lld (at least on 32-bit
machines) since the fields's width is 20 and there numbers with
more than 32 bits can be represented. */
- sprintf (hdr.size, "%ld", (long) (4 + orl_count * 4 + stridx));
- sprintf (hdr.nextoff, "%d", 0);
- memcpy (hdr.prevoff, xcoff_ardata (abfd)->memoff, 12);
+ sprintf (hdr.size, "%ld", (long) (4 + orl_ccount * 4 + stridx));
+ if (bits64)
+ sprintf (hdr.nextoff, "%d", 0);
+ else
+ sprintf (hdr.nextoff, "%ld", (strtol (prevoff, (char **) NULL, 10)
+ + 4 + orl_ccount * 4 + stridx));
+ memcpy (hdr.prevoff, prevoff, sizeof (hdr.prevoff));
sprintf (hdr.date, "%d", 0);
sprintf (hdr.uid, "%d", 0);
sprintf (hdr.gid, "%d", 0);
@@ -1396,11 +1669,13 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
if (*p == '\0')
*p = ' ';
+ memcpy (nextoff, hdr.nextoff, sizeof (hdr.nextoff));
+
if (bfd_write ((PTR) &hdr, SIZEOF_AR_HDR_BIG, 1, abfd) != SIZEOF_AR_HDR_BIG
|| bfd_write (XCOFFARFMAG, 1, SXCOFFARFMAG, abfd) != SXCOFFARFMAG)
return false;
- bfd_h_put_32 (abfd, orl_count, buf);
+ bfd_h_put_32 (abfd, orl_ccount, buf);
if (bfd_write (buf, 1, 4, abfd) != 4)
return false;
@@ -1411,13 +1686,18 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
{
size_t namlen;
- while (((bfd *) (map[i]).pos) == sub)
- {
- bfd_h_put_32 (abfd, fileoff, buf);
- if (bfd_write (buf, 1, 4, abfd) != 4)
- return false;
- ++i;
- }
+ if ((bfd_arch_bits_per_address ((bfd *) map[i].pos) == 64) == bits64)
+ while (((bfd *) (map[i]).pos) == sub)
+ {
+ bfd_h_put_32 (abfd, fileoff, buf);
+ if (bfd_write (buf, 1, 4, abfd) != 4)
+ return false;
+ i++;
+ }
+ else
+ while (((bfd *) (map[i]).pos) == sub)
+ i++;
+
namlen = strlen (normalize_filename (sub));
namlen = (namlen + 1) &~ 1;
fileoff += (SIZEOF_AR_HDR_BIG
@@ -1428,10 +1708,18 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
sub = sub->next;
}
+ object_bfd = NULL;
for (i = 0; i < orl_count; i++)
{
const char *name;
size_t namlen;
+ bfd *ob = (bfd *)map[i].pos;
+
+ if (ob != object_bfd)
+ arch_info = bfd_get_arch_info (ob);
+
+ if (arch_info && (arch_info->bits_per_address == 64) != bits64)
+ continue;
name = *map[i].name;
namlen = strlen (name);
@@ -1451,9 +1739,67 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
return true;
}
-/*ARGSUSED*/
static boolean
-xcoff_write_armap (abfd, elength, map, orl_count, stridx)
+xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
+ bfd *abfd;
+ unsigned int elength ATTRIBUTE_UNUSED;
+ struct orl *map;
+ unsigned int orl_count;
+ int stridx;
+{
+ unsigned int i;
+ unsigned int orl_count_32, orl_count_64;
+ unsigned int stridx_32, stridx_64;
+ const bfd_arch_info_type *arch_info = NULL;
+ bfd *object_bfd;
+
+ /* First, we look through the symbols and work out which are
+ from 32-bit objects and which from 64-bit ones. */
+ orl_count_32 = 0;
+ orl_count_64 = 0;
+ stridx_32 = 0;
+ stridx_64 = 0;
+ object_bfd = NULL;
+ for (i = 0; i < orl_count; i++)
+ {
+ bfd *ob = (bfd *)map[i].pos;
+ unsigned int len;
+ if (ob != object_bfd)
+ arch_info = bfd_get_arch_info (ob);
+ len = strlen (*map[i].name) + 1;
+ if (arch_info && arch_info->bits_per_address == 64)
+ {
+ orl_count_64++;
+ stridx_64 += len;
+ }
+ else
+ {
+ orl_count_32++;
+ stridx_32 += len;
+ }
+ object_bfd = ob;
+ }
+ /* A quick sanity check... */
+ BFD_ASSERT (orl_count_64 + orl_count_32 == orl_count);
+ BFD_ASSERT (stridx_64 + stridx_32 == stridx);
+
+ /* Now write out each map. */
+ if (! xcoff_write_one_armap_big (abfd, map, orl_count, orl_count_32,
+ stridx_32, false,
+ xcoff_ardata_big (abfd)->memoff,
+ xcoff_ardata_big (abfd)->symoff))
+ return false;
+ if (! xcoff_write_one_armap_big (abfd, map, orl_count, orl_count_64,
+ stridx_64, true,
+ xcoff_ardata_big (abfd)->symoff,
+ xcoff_ardata_big (abfd)->symoff64))
+ return false;
+
+ return true;
+}
+
+boolean
+_bfd_xcoff_write_armap (abfd, elength, map, orl_count, stridx)
bfd *abfd;
unsigned int elength ATTRIBUTE_UNUSED;
struct orl *map;
@@ -1962,7 +2308,6 @@ xcoff_write_archive_contents_big (abfd)
/* XXX This call actually should use %lld (at least on 32-bit
machines) since the fields's width is 20 and there numbers with
more than 32 bits can be represented. */
- sprintf (fhdr.symoff, "%ld", (long) nextoff);
bfd_ardata (abfd)->tdata = (PTR) &fhdr;
if (! _bfd_compute_and_write_armap (abfd, 0))
return false;
@@ -1983,8 +2328,8 @@ xcoff_write_archive_contents_big (abfd)
return true;
}
-static boolean
-xcoff_write_archive_contents (abfd)
+boolean
+_bfd_xcoff_write_archive_contents (abfd)
bfd *abfd;
{
if (! xcoff_big_format_p (abfd))
@@ -1996,8 +2341,7 @@ xcoff_write_archive_contents (abfd)
/* We can't use the usual coff_sizeof_headers routine, because AIX
always uses an a.out header. */
-/*ARGSUSED*/
-static int
+int
_bfd_xcoff_sizeof_headers (abfd, reloc)
bfd *abfd;
boolean reloc ATTRIBUTE_UNUSED;
@@ -2012,116 +2356,3 @@ _bfd_xcoff_sizeof_headers (abfd, reloc)
size += abfd->section_count * SCNHSZ;
return size;
}
-
-#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
-#define CORE_FILE_P rs6000coff_core_p
-extern const bfd_target * rs6000coff_core_p ();
-extern boolean rs6000coff_get_section_contents ();
-extern boolean rs6000coff_core_file_matches_executable_p ();
-
-#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
-#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
-#define coff_core_file_failing_signal rs6000coff_core_file_failing_signal
-
-#undef coff_get_section_contents
-#define coff_get_section_contents rs6000coff_get_section_contents
-#endif /* AIX_CORE */
-
-#ifdef LYNX_CORE
-
-#undef CORE_FILE_P
-#define CORE_FILE_P lynx_core_file_p
-extern const bfd_target *lynx_core_file_p PARAMS ((bfd *abfd));
-
-extern boolean lynx_core_file_matches_executable_p PARAMS ((bfd *core_bfd,
- bfd *exec_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
-#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
-#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_link_split_section coff_bfd_link_split_section
-
-/* The transfer vector that leads the outside world to all of the above. */
-
-const bfd_target
-#ifdef TARGET_SYM
- TARGET_SYM =
-#else
- rs6000coff_vec =
-#endif
-{
-#ifdef TARGET_NAME
- TARGET_NAME,
-#else
- "aixcoff-rs6000", /* name */
-#endif
- bfd_target_coff_flavour,
- BFD_ENDIAN_BIG, /* data byte order is big */
- BFD_ENDIAN_BIG, /* header byte order is big */
-
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG | 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 */
-
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- xcoff_archive_p, CORE_FILE_P},
- {bfd_false, coff_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- xcoff_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (coff),
- BFD_JUMP_TABLE_ARCHIVE (xcoff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (_bfd_xcoff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_xcoff),
-
- NULL,
-
- COFF_SWAP_TABLE
-};
diff --git a/gnu/usr.bin/binutils/bfd/coff-sh.c b/gnu/usr.bin/binutils/bfd/coff-sh.c
index 821fecd4db2..c96d05e25c0 100644
--- a/gnu/usr.bin/binutils/bfd/coff-sh.c
+++ b/gnu/usr.bin/binutils/bfd/coff-sh.c
@@ -1,5 +1,6 @@
/* BFD back-end for Hitachi Super-H COFF binaries.
- Copyright 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
Relaxing code written by Ian Lance Taylor, <ian@cygnus.com>.
@@ -31,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/pe.h"
#ifndef COFF_IMAGE_WITH_PE
-static boolean sh_align_load_span
+static boolean sh_align_load_span
PARAMS ((bfd *, asection *, bfd_byte *,
boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *));
@@ -88,7 +89,7 @@ static boolean in_reloc_p (abfd, howto)
reloc_howto_type * howto;
{
return ! howto->pc_relative && howto->type != R_SH_IMAGEBASE;
-}
+}
#endif
/* The supported relocations. There are a lot of relocations defined
@@ -171,18 +172,18 @@ static reloc_howto_type sh_coff_howtos[] =
EMPTY_HOWTO (15),
#ifdef COFF_WITH_PE
- HOWTO (R_SH_IMAGEBASE, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_SH_IMAGEBASE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- sh_reloc, /* special_function */
- "rva32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ sh_reloc, /* special_function */
+ "rva32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
#else
EMPTY_HOWTO (16), /* R_SH_IMM8 */
@@ -391,14 +392,14 @@ static reloc_howto_type sh_coff_howtos[] =
/* Get the value of a symbol, when performing a relocation. */
static long
-get_symbol_value (symbol)
+get_symbol_value (symbol)
asymbol *symbol;
-{
+{
bfd_vma relocation;
if (bfd_is_com_section (symbol->section))
- relocation = 0;
- else
+ relocation = 0;
+ else
relocation = (symbol->value +
symbol->section->output_section->vma +
symbol->section->output_offset);
@@ -676,7 +677,7 @@ sh_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
align load and store instructions on four byte boundaries if we
can, by swapping them with one of the adjacent instructions. */
-static boolean
+static boolean
sh_relax_section (abfd, sec, link_info, again)
bfd *abfd;
asection *sec;
@@ -2144,7 +2145,7 @@ sh_insn_info (insn)
return op;
}
- return NULL;
+ return NULL;
}
/* See whether an instruction uses or sets a general purpose register */
@@ -2251,7 +2252,7 @@ sh_insn_uses_freg (insn, op, freg)
of a double precision value.
So what this all boils down to is that we have to ignore the lowest
bit of the register number. */
-
+
if ((f & USESF1) != 0
&& (USESF1_REG (insn) & 0xe) == (freg & 0xe))
return true;
@@ -2285,7 +2286,7 @@ sh_insn_sets_freg (insn, op, freg)
of a double precision value.
So what this all boils down to is that we have to ignore the lowest
bit of the register number. */
-
+
if ((f & SETSF1) != 0
&& (SETSF1_REG (insn) & 0xe) == (freg & 0xe))
return true;
@@ -2485,7 +2486,7 @@ _bfd_sh_align_load_span (abfd, sec, contents, swap, relocs,
if (dsp && i - 2 > start)
{
unsigned pprev_insn = bfd_get_16 (abfd, contents + i - 4);
-
+
if ((pprev_insn & 0xfc00) == 0xf800)
prev_op = NULL;
else
@@ -2875,7 +2876,7 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
sym = NULL;
}
else
- {
+ {
if (symndx < 0
|| (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
{
@@ -2912,7 +2913,7 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
if (rel->r_type == R_SH_IMAGEBASE)
addend -= pe_data (input_section->output_section->owner)->pe_opthdr.ImageBase;
#endif
-
+
val = 0;
if (h == NULL)
@@ -3118,7 +3119,7 @@ CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NUL
#else
#define TARGET_SYM shlcoff_vec
#endif
-
+
#ifndef TARGET_SHL_NAME
#define TARGET_SHL_NAME "coff-shl"
#endif
@@ -3198,6 +3199,16 @@ static const bfd_coff_backend_data bfd_coff_small_swap_table =
false,
#endif
2,
+#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
+ 4,
+#else
+ 2,
+#endif
coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in,
coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
@@ -3260,7 +3271,7 @@ const bfd_target shcoff_small_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& shlcoff_small_vec,
-
+
(PTR) &bfd_coff_small_swap_table
};
@@ -3287,7 +3298,7 @@ const bfd_target shlcoff_small_vec =
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
{_bfd_dummy_target, coff_small_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
+ bfd_generic_archive_p, _bfd_dummy_target},
{bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
bfd_false},
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
@@ -3304,7 +3315,7 @@ const bfd_target shlcoff_small_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& shcoff_small_vec,
-
+
(PTR) &bfd_coff_small_swap_table
};
#endif
diff --git a/gnu/usr.bin/binutils/bfd/coff-sparc.c b/gnu/usr.bin/binutils/bfd/coff-sparc.c
index 5e919da1f99..0f592def5ad 100644
--- a/gnu/usr.bin/binutils/bfd/coff-sparc.c
+++ b/gnu/usr.bin/binutils/bfd/coff-sparc.c
@@ -1,5 +1,5 @@
/* BFD back-end for Sparc COFF files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -36,8 +36,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
enum reloc_type
{
R_SPARC_NONE = 0,
- R_SPARC_8, R_SPARC_16, R_SPARC_32,
- R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
+ R_SPARC_8, R_SPARC_16, R_SPARC_32,
+ R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
R_SPARC_WDISP30, R_SPARC_WDISP22,
R_SPARC_HI22, R_SPARC_22,
R_SPARC_13, R_SPARC_LO10,
@@ -96,7 +96,7 @@ bfd_coff_generic_reloc (abfd, reloc_entry, symbol, data, input_section,
return bfd_reloc_continue;
}
-static reloc_howto_type coff_sparc_howto_table[] =
+static reloc_howto_type coff_sparc_howto_table[] =
{
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_8", false,0,0x000000ff,true),
@@ -197,7 +197,7 @@ rtype2howto (cache_ptr, dst)
#define __A_MAGIC_SET__
-/* Enable Sparc-specific hacks in coffcode.h. */
+/* Enable Sparc-specific hacks in coffcode.h. */
#define COFF_SPARC
diff --git a/gnu/usr.bin/binutils/bfd/coff-w65.c b/gnu/usr.bin/binutils/bfd/coff-w65.c
index c82d4d7844b..df960ef610b 100644
--- a/gnu/usr.bin/binutils/bfd/coff-w65.c
+++ b/gnu/usr.bin/binutils/bfd/coff-w65.c
@@ -1,5 +1,5 @@
/* BFD back-end for WDC 65816 COFF binaries.
- Copyright 1995, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
Written by Steve Chamberlain, <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -42,7 +42,6 @@ static reloc_howto_type howto_table[] =
};
-
/* Turn a howto into a reloc number */
#define SELECT_RELOC(x,howto) \
@@ -52,7 +51,6 @@ static reloc_howto_type howto_table[] =
#define W65 1 /* Customize coffcode.h */
#define __A_MAGIC_SET__
-
/* Code to swap in the reloc */
#define SWAP_IN_RELOC_OFFSET bfd_h_get_32
#define SWAP_OUT_RELOC_OFFSET bfd_h_put_32
@@ -60,7 +58,6 @@ static reloc_howto_type howto_table[] =
dst->r_stuff[0] = 'S'; \
dst->r_stuff[1] = 'C';
-
static int
select_reloc (howto)
reloc_howto_type *howto;
@@ -81,14 +78,11 @@ rtype2howto (internal, dst)
#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
-
/* Perform any necessary magic to the addend in a reloc entry */
-
#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
cache_ptr->addend = ext_reloc.r_offset;
-
#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
reloc_processing(relent, reloc, symbols, abfd, section)
@@ -112,15 +106,12 @@ reloc_processing (relent, reloc, symbols, abfd, section)
relent->sym_ptr_ptr = (asymbol **)&(bfd_abs_symbol);
}
-
-
relent->addend = reloc->r_offset;
relent->address -= section->vma;
/* relent->section = 0;*/
}
-
static int
h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
bfd *abfd;
@@ -129,11 +120,11 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
unsigned int shrink;
struct bfd_link_info *link_info;
{
- bfd_vma value;
+ bfd_vma value;
bfd_vma dot;
bfd_vma gap;
- /* The address of the thing to be relocated will have moved back by
+ /* The address of the thing to be relocated will have moved back by
the size of the shrink - but we don't change reloc->address here,
since we need it to know where the relocation lives in the source
uncooked section */
@@ -141,10 +132,9 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
/* reloc->address -= shrink; conceptual */
bfd_vma address = reloc->address - shrink;
-
switch (reloc->howto->type)
- {
+ {
case R_MOV16B2:
case R_JMP2:
shrink+=2;
@@ -155,40 +145,40 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
if (value >= 0xff00)
- {
+ {
/* Change the reloc type from 16bit, possible 8 to 8bit
possible 16 */
- reloc->howto = reloc->howto + 1;
+ reloc->howto = reloc->howto + 1;
/* The place to relc moves back by one */
/* This will be two bytes smaller in the long run */
shrink +=2 ;
bfd_perform_slip(abfd, 2, input_section, address);
- }
+ }
break;
- /* This is the 24 bit branch which could become an 8 bitter,
+ /* This is the 24 bit branch which could become an 8 bitter,
the relocation points to the first byte of the insn, not the
actual data */
case R_JMPL1:
value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
-
+
dot = input_section->output_section->vma +
input_section->output_offset + address;
-
+
/* See if the address we're looking at within 127 bytes of where
we are, if so then we can use a small branch rather than the
jump we were going to */
gap = value - dot ;
-
+
if (-120 < (long)gap && (long)gap < 120 )
- {
+ {
/* Change the reloc type from 24bit, possible 8 to 8bit
possible 32 */
- reloc->howto = reloc->howto + 1;
+ reloc->howto = reloc->howto + 1;
/* This will be two bytes smaller in the long run */
shrink +=2 ;
bfd_perform_slip(abfd, 2, input_section, address);
@@ -198,23 +188,22 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
case R_JMP1:
value = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
-
+
dot = input_section->output_section->vma +
input_section->output_offset + address;
-
+
/* See if the address we're looking at within 127 bytes of where
we are, if so then we can use a small branch rather than the
jump we were going to */
gap = value - (dot - shrink);
-
if (-120 < (long)gap && (long)gap < 120 )
- {
+ {
/* Change the reloc type from 16bit, possible 8 to 8bit
possible 16 */
- reloc->howto = reloc->howto + 1;
+ reloc->howto = reloc->howto + 1;
/* The place to relc moves back by one */
/* This will be two bytes smaller in the long run */
@@ -224,11 +213,9 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info)
break;
}
-
return shrink;
}
-
/* First phase of a relaxing link */
/* Reloc types
@@ -336,8 +323,8 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
{
int gap = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = link_order->offset
- + dst_address
+ bfd_vma dot = link_order->offset
+ + dst_address
+ link_order->u.indirect.section->output_section->vma;
gap -= dot + 1;
@@ -346,7 +333,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
(link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
- abort();
+ abort ();
}
bfd_put_8 (abfd, gap, data + dst_address);
dst_address += 1;
@@ -358,11 +345,10 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
{
bfd_vma gap = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = link_order->offset
- + dst_address
+ bfd_vma dot = link_order->offset
+ + dst_address
+ link_order->u.indirect.section->output_section->vma;
-
/* This wraps within the page, so ignore the relativeness, look at the
high part */
if ((gap & 0xf0000) != (dot & 0xf0000)) {
@@ -370,7 +356,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
(link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
- abort();
+ abort ();
}
gap -= dot + 2;
@@ -380,7 +366,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
}
break;
default:
- printf(_("ignoring reloc %s\n"), reloc->howto->name);
+ printf (_("ignoring reloc %s\n"), reloc->howto->name);
break;
}
@@ -394,7 +380,6 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
#include "coffcode.h"
-
#undef coff_bfd_get_relocated_section_contents
#undef coff_bfd_relax_section
#define coff_bfd_get_relocated_section_contents \
diff --git a/gnu/usr.bin/binutils/bfd/coff-we32k.c b/gnu/usr.bin/binutils/bfd/coff-we32k.c
index c559ad7c76f..5f77b5e6a97 100644
--- a/gnu/usr.bin/binutils/bfd/coff-we32k.c
+++ b/gnu/usr.bin/binutils/bfd/coff-we32k.c
@@ -1,5 +1,5 @@
/* BFD back-end for we32k COFF files.
- Copyright (C) 1992, 93, 94, 95, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1999, 2000 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
This file is part of BFD, the Binary File Descriptor library.
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
-static reloc_howto_type howto_table[] =
+static reloc_howto_type howto_table[] =
{
EMPTY_HOWTO (0),
EMPTY_HOWTO (1),
diff --git a/gnu/usr.bin/binutils/bfd/coff-z8k.c b/gnu/usr.bin/binutils/bfd/coff-z8k.c
index 21f29a82969..817b6dcd1e6 100644
--- a/gnu/usr.bin/binutils/bfd/coff-z8k.c
+++ b/gnu/usr.bin/binutils/bfd/coff-z8k.c
@@ -1,5 +1,6 @@
/* BFD back-end for Zilog Z800n COFF binaries.
- Copyright 1992, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
@@ -54,7 +55,7 @@ HOWTO (R_JR, 0, 1, 8, true, 0, complain_overflow_signed, 0,
/* Turn a howto into a reloc number */
-static int
+static int
coff_z8k_select_reloc (howto)
reloc_howto_type *howto;
{
@@ -63,13 +64,10 @@ coff_z8k_select_reloc (howto)
#define SELECT_RELOC(x,howto) x.r_type = coff_z8k_select_reloc(howto)
-
#define BADMAG(x) Z8KBADMAG(x)
#define Z8K 1 /* Customize coffcode.h */
#define __A_MAGIC_SET__
-
-
/* Code to swap in the reloc */
#define SWAP_IN_RELOC_OFFSET bfd_h_get_32
#define SWAP_OUT_RELOC_OFFSET bfd_h_put_32
@@ -110,18 +108,15 @@ rtype2howto (internal, dst)
#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
-
/* Perform any necessary magic to the addend in a reloc entry */
-
#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
cache_ptr->addend = ext_reloc.r_offset;
-
#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
reloc_processing(relent, reloc, symbols, abfd, section)
-static void
+static void
reloc_processing (relent, reloc, symbols, abfd, section)
arelent * relent;
struct internal_reloc *reloc;
@@ -141,7 +136,6 @@ reloc_processing (relent, reloc, symbols, abfd, section)
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
}
-
relent->addend = reloc->r_offset;
relent->address -= section->vma;
}
@@ -178,7 +172,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
case R_IMM4L:
bfd_put_8 (in_abfd,
- ((bfd_get_8 (in_abfd, data + *dst_ptr) & 0xf0)
+ ((bfd_get_8 (in_abfd, data + *dst_ptr) & 0xf0)
| (0x0f
& bfd_coff_reloc16_get_value (reloc, link_info,
input_section))),
@@ -230,7 +224,6 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
#include "coffcode.h"
-
#undef coff_bfd_get_relocated_section_contents
#undef coff_bfd_relax_section
#define coff_bfd_get_relocated_section_contents \
diff --git a/gnu/usr.bin/binutils/bfd/coffcode.h b/gnu/usr.bin/binutils/bfd/coffcode.h
index 73081a76796..2cdc137699e 100644
--- a/gnu/usr.bin/binutils/bfd/coffcode.h
+++ b/gnu/usr.bin/binutils/bfd/coffcode.h
@@ -1,5 +1,6 @@
/* Support for the generic parts of most COFF variants, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -175,7 +176,6 @@ SUBSUBSECTION
the file in the string table. This pass moves all strings
into memory and replaces them with pointers to the strings.
-
The symbol table is massaged once again, this time to create
the canonical table used by the BFD application. Each symbol
is inspected in turn, and a decision made (using the
@@ -301,7 +301,6 @@ CODE_FRAGMENT
.boolean done_lineno;
.} coff_symbol_type;
-
*/
#ifdef COFF_WITH_PE
@@ -341,6 +340,9 @@ static long coff_canonicalize_reloc
#ifndef coff_mkobject_hook
static PTR coff_mkobject_hook PARAMS ((bfd *, PTR, PTR));
#endif
+#ifdef COFF_WITH_PE
+static flagword handle_COMDAT PARAMS ((bfd *, flagword, PTR, const char *, asection *));
+#endif
/* void warning(); */
@@ -351,6 +353,19 @@ static PTR coff_mkobject_hook PARAMS ((bfd *, PTR, PTR));
#ifndef COFF_WITH_PE
+/* Macros for setting debugging flags. */
+#ifdef STYP_DEBUG
+#define STYP_XCOFF_DEBUG STYP_DEBUG
+#else
+#define STYP_XCOFF_DEBUG STYP_INFO
+#endif
+
+#ifdef COFF_ALIGN_IN_S_FLAGS
+#define STYP_DEBUG_INFO STYP_DSECT
+#else
+#define STYP_DEBUG_INFO STYP_INFO
+#endif
+
static long
sec_to_styp_flags (sec_name, sec_flags)
CONST char *sec_name;
@@ -388,18 +403,24 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags = STYP_LIT;
#endif /* _LIT */
}
- else if (!strcmp (sec_name, ".debug"))
+ else if (!strncmp (sec_name, ".debug", 6))
{
-#ifdef STYP_DEBUG
- styp_flags = STYP_DEBUG;
-#else
- styp_flags = STYP_INFO;
-#endif
+ /* Handle the XCOFF debug section and DWARF2 debug sections. */
+ if (!sec_name[6])
+ styp_flags = STYP_XCOFF_DEBUG;
+ else
+ styp_flags = STYP_DEBUG_INFO;
}
else if (!strncmp (sec_name, ".stab", 5))
{
- styp_flags = STYP_INFO;
+ styp_flags = STYP_DEBUG_INFO;
}
+#ifdef COFF_LONG_SECTION_NAMES
+ else if (!strncmp (sec_name, ".gnu.linkonce.wi.", 17))
+ {
+ styp_flags = STYP_DEBUG_INFO;
+ }
+#endif
#ifdef RS6000COFF_C
else if (!strcmp (sec_name, _PAD))
{
@@ -436,6 +457,16 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags = STYP_BSS;
}
+#ifdef STYP_CLINK
+ if (sec_flags & SEC_CLINK)
+ styp_flags |= STYP_CLINK;
+#endif
+
+#ifdef STYP_BLOCK
+ if (sec_flags & SEC_BLOCK)
+ styp_flags |= STYP_BLOCK;
+#endif
+
#ifdef STYP_NOLOAD
if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0)
styp_flags |= STYP_NOLOAD;
@@ -493,8 +524,8 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags |= IMAGE_SCN_LNK_REMOVE;
/* skip IN_MEMORY */
/* skip SORT */
- if (sec_flags & SEC_LINK_ONCE)
- styp_flags |= IMAGE_SCN_LNK_COMDAT;
+ if (sec_flags & SEC_LINK_ONCE)
+ styp_flags |= IMAGE_SCN_LNK_COMDAT;
/* skip LINK_DUPLICATES */
/* skip LINKER_CREATED */
@@ -502,7 +533,7 @@ sec_to_styp_flags (sec_name, sec_flags)
though the semantics don't quite match. The bits from the input
are retained in pei_section_data(abfd, section)->pe_flags */
- styp_flags |= IMAGE_SCN_MEM_READ; /* always readable. */
+ styp_flags |= IMAGE_SCN_MEM_READ; /* always readable. */
if ((sec_flags & SEC_READONLY) == 0)
styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write */
if (sec_flags & SEC_CODE)
@@ -510,7 +541,7 @@ sec_to_styp_flags (sec_name, sec_flags)
if (sec_flags & SEC_SHARED)
styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful */
- return styp_flags;
+ return styp_flags;
}
#endif /* COFF_WITH_PE */
@@ -533,6 +564,16 @@ styp_to_sec_flags (abfd, hdr, name, section)
long styp_flags = internal_s->s_flags;
flagword sec_flags = 0;
+#ifdef STYP_BLOCK
+ if (styp_flags & STYP_BLOCK)
+ sec_flags |= SEC_BLOCK;
+#endif
+
+#ifdef STYP_CLINK
+ if (styp_flags & STYP_CLINK)
+ sec_flags |= SEC_CLINK;
+#endif
+
#ifdef STYP_NOLOAD
if (styp_flags & STYP_NOLOAD)
{
@@ -604,10 +645,13 @@ styp_to_sec_flags (abfd, hdr, name, section)
#endif
sec_flags |= SEC_ALLOC;
}
- else if (strcmp (name, ".debug") == 0
+ else if (strncmp (name, ".debug", 6) == 0
#ifdef _COMMENT
|| strcmp (name, _COMMENT) == 0
#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ || strncmp (name, ".gnu.linkonce.wi.", 17) == 0
+#endif
|| strncmp (name, ".stab", 5) == 0)
{
#ifdef COFF_PAGE_SIZE
@@ -658,327 +702,382 @@ styp_to_sec_flags (abfd, hdr, name, section)
#else /* COFF_WITH_PE */
-/* The PE version; see above for the general comments.
-
- Since to set the SEC_LINK_ONCE and associated flags, we have to
- look at the symbol table anyway, we return the symbol table index
- of the symbol being used as the COMDAT symbol. This is admittedly
- ugly, but there's really nowhere else that we have access to the
- required information. FIXME: Is the COMDAT symbol index used for
- any purpose other than objdump? */
-
static flagword
-styp_to_sec_flags (abfd, hdr, name, section)
- bfd *abfd ATTRIBUTE_UNUSED;
+handle_COMDAT (abfd, sec_flags, hdr, name, section)
+ bfd * abfd;
+ flagword sec_flags;
PTR hdr;
const char *name;
asection *section;
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
- long styp_flags = internal_s->s_flags;
- flagword sec_flags = 0;
+ bfd_byte *esymstart, *esym, *esymend;
+ int seen_state = 0;
+ char *target_name = NULL;
+
+ sec_flags |= SEC_LINK_ONCE;
+
+ /* Unfortunately, the PE format stores essential information in
+ the symbol table, of all places. We need to extract that
+ information now, so that objdump and the linker will know how
+ to handle the section without worrying about the symbols. We
+ can't call slurp_symtab, because the linker doesn't want the
+ swapped symbols. */
+
+ /* COMDAT sections are special. The first symbol is the section
+ symbol, which tells what kind of COMDAT section it is. The
+ second symbol is the "comdat symbol" - the one with the
+ unique name. GNU uses the section symbol for the unique
+ name; MS uses ".text" for every comdat section. Sigh. - DJ */
+
+ /* This is not mirrored in sec_to_styp_flags(), but there
+ doesn't seem to be a need to, either, and it would at best be
+ rather messy. */
+
+ if (! _bfd_coff_get_external_symbols (abfd))
+ return sec_flags;
+
+ esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd);
+ esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd);
- if (styp_flags & STYP_DSECT)
- abort (); /* Don't know what to do */
-#ifdef SEC_NEVER_LOAD
- if (styp_flags & STYP_NOLOAD)
- sec_flags |= SEC_NEVER_LOAD;
-#endif
- if (styp_flags & STYP_GROUP)
- abort (); /* Don't know what to do */
- /* skip IMAGE_SCN_TYPE_NO_PAD */
- if (styp_flags & STYP_COPY)
- abort (); /* Don't know what to do */
- if (styp_flags & IMAGE_SCN_CNT_CODE)
- sec_flags |= SEC_CODE | SEC_ALLOC | SEC_LOAD;
- if (styp_flags & IMAGE_SCN_CNT_INITIALIZED_DATA)
- sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD;
- if (styp_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA)
- sec_flags |= SEC_ALLOC;
- if (styp_flags & IMAGE_SCN_LNK_OTHER)
- abort (); /* Don't know what to do */
- if (styp_flags & IMAGE_SCN_LNK_INFO)
+ while (esym < esymend)
{
- /* We mark these as SEC_DEBUGGING, but only if COFF_PAGE_SIZE is
- defined. coff_compute_section_file_positions uses
- COFF_PAGE_SIZE to ensure that the low order bits of the
- section VMA and the file offset match. If we don't know
- COFF_PAGE_SIZE, we can't ensure the correct correspondence,
- and demand page loading of the file will fail. */
-#ifdef COFF_PAGE_SIZE
- sec_flags |= SEC_DEBUGGING;
-#endif
- }
- if (styp_flags & STYP_OVER)
- abort (); /* Don't know what to do */
- if (styp_flags & IMAGE_SCN_LNK_REMOVE)
- sec_flags |= SEC_EXCLUDE;
-
- if (styp_flags & IMAGE_SCN_MEM_SHARED)
- sec_flags |= SEC_SHARED;
- /* COMDAT: see below */
- if (styp_flags & IMAGE_SCN_MEM_DISCARDABLE)
- sec_flags |= SEC_DEBUGGING;
- if (styp_flags & IMAGE_SCN_MEM_NOT_CACHED)
- abort ();/* Don't know what to do */
- if (styp_flags & IMAGE_SCN_MEM_NOT_PAGED)
- abort (); /* Don't know what to do */
-
- /* We infer from the distinct read/write/execute bits the settings
- of some of the bfd flags; the actual values, should we need them,
- are also in pei_section_data (abfd, section)->pe_flags. */
-
- if (styp_flags & IMAGE_SCN_MEM_EXECUTE)
- sec_flags |= SEC_CODE; /* Probably redundant */
- /* IMAGE_SCN_MEM_READ is simply ignored, assuming it always to be true. */
- if ((styp_flags & IMAGE_SCN_MEM_WRITE) == 0)
- sec_flags |= SEC_READONLY;
-
- /* COMDAT gets very special treatment. */
- if (styp_flags & IMAGE_SCN_LNK_COMDAT)
- {
- sec_flags |= SEC_LINK_ONCE;
-
- /* Unfortunately, the PE format stores essential information in
- the symbol table, of all places. We need to extract that
- information now, so that objdump and the linker will know how
- to handle the section without worrying about the symbols. We
- can't call slurp_symtab, because the linker doesn't want the
- swapped symbols. */
-
- /* COMDAT sections are special. The first symbol is the section
- symbol, which tells what kind of COMDAT section it is. The
- second symbol is the "comdat symbol" - the one with the
- unique name. GNU uses the section symbol for the unique
- name; MS uses ".text" for every comdat section. Sigh. - DJ */
-
- /* This is not mirrored in sec_to_styp_flags(), but there
- doesn't seem to be a need to, either, and it would at best be
- rather messy. */
-
- if (_bfd_coff_get_external_symbols (abfd))
+ struct internal_syment isym;
+ char buf[SYMNMLEN + 1];
+ const char *symname;
+
+ bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym);
+
+ if (sizeof (internal_s->s_name) > SYMNMLEN)
{
- bfd_byte *esymstart, *esym, *esymend;
- int seen_state = 0;
- char *target_name = NULL;
+ /* This case implies that the matching
+ symbol name will be in the string table. */
+ abort ();
+ }
- esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd);
- esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd);
+ if (isym.n_scnum == section->target_index)
+ {
+ /* According to the MSVC documentation, the first
+ TWO entries with the section # are both of
+ interest to us. The first one is the "section
+ symbol" (section name). The second is the comdat
+ symbol name. Here, we've found the first
+ qualifying entry; we distinguish it from the
+ second with a state flag.
+
+ In the case of gas-generated (at least until that
+ is fixed) .o files, it isn't necessarily the
+ second one. It may be some other later symbol.
+
+ Since gas also doesn't follow MS conventions and
+ emits the section similar to .text$<name>, where
+ <something> is the name we're looking for, we
+ distinguish the two as follows:
+
+ If the section name is simply a section name (no
+ $) we presume it's MS-generated, and look at
+ precisely the second symbol for the comdat name.
+ If the section name has a $, we assume it's
+ gas-generated, and look for <something> (whatever
+ follows the $) as the comdat symbol. */
+
+ /* All 3 branches use this */
+ symname = _bfd_coff_internal_syment_name (abfd, &isym, buf);
+
+ if (symname == NULL)
+ abort ();
- while (esym < esymend)
+ switch (seen_state)
{
- struct internal_syment isym;
- char buf[SYMNMLEN + 1];
- const char *symname;
+ case 0:
+ {
+ /* The first time we've seen the symbol. */
+ union internal_auxent aux;
+
+ seen_state = 1;
+
+ /* If it isn't the stuff we're expecting, die;
+ The MS documentation is vague, but it
+ appears that the second entry serves BOTH
+ as the comdat symbol and the defining
+ symbol record (either C_STAT or C_EXT,
+ possibly with an aux entry with debug
+ information if it's a function.) It
+ appears the only way to find the second one
+ is to count. (On Intel, they appear to be
+ adjacent, but on Alpha, they have been
+ found separated.)
+
+ Here, we think we've found the first one,
+ but there's some checking we can do to be
+ sure. */
+
+ if (! (isym.n_sclass == C_STAT
+ && isym.n_type == T_NULL
+ && isym.n_value == 0))
+ abort ();
- bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym);
+ /* FIXME LATER: MSVC generates section names
+ like .text for comdats. Gas generates
+ names like .text$foo__Fv (in the case of a
+ function). See comment above for more. */
- if (sizeof (internal_s->s_name) > SYMNMLEN)
- {
- /* This case implies that the matching symbol name
- will be in the string table. */
+ if (strcmp (name, symname) != 0)
abort ();
- }
- if (isym.n_scnum == section->target_index)
- {
- /* According to the MSVC documentation, the first
- TWO entries with the section # are both of
- interest to us. The first one is the "section
- symbol" (section name). The second is the comdat
- symbol name. Here, we've found the first
- qualifying entry; we distinguish it from the
- second with a state flag.
-
- In the case of gas-generated (at least until that
- is fixed) .o files, it isn't necessarily the
- second one. It may be some other later symbol.
-
- Since gas also doesn't follow MS conventions and
- emits the section similar to .text$<name>, where
- <something> is the name we're looking for, we
- distinguish the two as follows:
-
- If the section name is simply a section name (no
- $) we presume it's MS-generated, and look at
- precisely the second symbol for the comdat name.
- If the section name has a $, we assume it's
- gas-generated, and look for <something> (whatever
- follows the $) as the comdat symbol. */
-
- /* All 3 branches use this */
- symname = _bfd_coff_internal_syment_name (abfd, &isym, buf);
-
- if (symname == NULL)
- abort ();
-
- switch (seen_state)
- {
- case 0:
- {
- /* The first time we've seen the symbol. */
- union internal_auxent aux;
-
- seen_state = 1;
-
- /* If it isn't the stuff we're expecting, die;
- The MS documentation is vague, but it
- appears that the second entry serves BOTH
- as the comdat symbol and the defining
- symbol record (either C_STAT or C_EXT,
- possibly with an aux entry with debug
- information if it's a function.) It
- appears the only way to find the second one
- is to count. (On Intel, they appear to be
- adjacent, but on Alpha, they have been
- found separated.)
-
- Here, we think we've found the first one,
- but there's some checking we can do to be
- sure. */
-
- if (! (isym.n_sclass == C_STAT
- && isym.n_type == T_NULL
- && isym.n_value == 0))
- abort ();
-
- /* FIXME LATER: MSVC generates section names
- like .text for comdats. Gas generates
- names like .text$foo__Fv (in the case of a
- function). See comment above for more. */
-
- if (strcmp (name, symname) != 0)
- abort ();
-
- /* This is the section symbol. */
-
- bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)),
- isym.n_type, isym.n_sclass,
- 0, isym.n_numaux, (PTR) &aux);
-
- target_name = strchr (name, '$');
- if (target_name != NULL)
- {
- /* Gas mode. */
- seen_state = 2;
- /* Skip the `$'. */
- target_name += 1;
- }
-
- /* FIXME: Microsoft uses NODUPLICATES and
- ASSOCIATIVE, but gnu uses ANY and
- SAME_SIZE. Unfortunately, gnu doesn't do
- the comdat symbols right. So, until we can
- fix it to do the right thing, we are
- temporarily disabling comdats for the MS
- types (they're used in DLLs and C++, but we
- don't support *their* C++ libraries anyway
- - DJ. */
-
- /* Cygwin does not follow the MS style, and
- uses ANY and SAME_SIZE where NODUPLICATES
- and ASSOCIATIVE should be used. For
- Interix, we just do the right thing up
- front. */
-
- switch (aux.x_scn.x_comdat)
- {
- case IMAGE_COMDAT_SELECT_NODUPLICATES:
-#ifdef STRICT_PE_FORMAT
- sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY;
+ /* This is the section symbol. */
+ bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)),
+ isym.n_type, isym.n_sclass,
+ 0, isym.n_numaux, (PTR) &aux);
+
+ target_name = strchr (name, '$');
+ if (target_name != NULL)
+ {
+ /* Gas mode. */
+ seen_state = 2;
+ /* Skip the `$'. */
+ target_name += 1;
+ }
+
+ /* FIXME: Microsoft uses NODUPLICATES and
+ ASSOCIATIVE, but gnu uses ANY and
+ SAME_SIZE. Unfortunately, gnu doesn't do
+ the comdat symbols right. So, until we can
+ fix it to do the right thing, we are
+ temporarily disabling comdats for the MS
+ types (they're used in DLLs and C++, but we
+ don't support *their* C++ libraries anyway
+ - DJ. */
+
+ /* Cygwin does not follow the MS style, and
+ uses ANY and SAME_SIZE where NODUPLICATES
+ and ASSOCIATIVE should be used. For
+ Interix, we just do the right thing up
+ front. */
+
+ switch (aux.x_scn.x_comdat)
+ {
+ case IMAGE_COMDAT_SELECT_NODUPLICATES:
+#ifdef STRICT_PE_FORMAT
+ sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY;
#else
- sec_flags &= ~SEC_LINK_ONCE;
+ sec_flags &= ~SEC_LINK_ONCE;
#endif
- break;
+ break;
- case IMAGE_COMDAT_SELECT_ANY:
- sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
- break;
+ case IMAGE_COMDAT_SELECT_ANY:
+ sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
+ break;
- case IMAGE_COMDAT_SELECT_SAME_SIZE:
- sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE;
- break;
+ case IMAGE_COMDAT_SELECT_SAME_SIZE:
+ sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE;
+ break;
- case IMAGE_COMDAT_SELECT_EXACT_MATCH:
- /* Not yet fully implemented ??? */
- sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS;
- break;
+ case IMAGE_COMDAT_SELECT_EXACT_MATCH:
+ /* Not yet fully implemented ??? */
+ sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS;
+ break;
- /* debug$S gets this case; other
- implications ??? */
+ /* debug$S gets this case; other
+ implications ??? */
- /* There may be no symbol... we'll search
- the whole table... Is this the right
- place to play this game? Or should we do
- it when reading it in. */
- case IMAGE_COMDAT_SELECT_ASSOCIATIVE:
+ /* There may be no symbol... we'll search
+ the whole table... Is this the right
+ place to play this game? Or should we do
+ it when reading it in. */
+ case IMAGE_COMDAT_SELECT_ASSOCIATIVE:
#ifdef STRICT_PE_FORMAT
- /* FIXME: This is not currently implemented. */
- sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
+ /* FIXME: This is not currently implemented. */
+ sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
#else
- sec_flags &= ~SEC_LINK_ONCE;
+ sec_flags &= ~SEC_LINK_ONCE;
#endif
- break;
+ break;
- default: /* 0 means "no symbol" */
- /* debug$F gets this case; other
- implications ??? */
- sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
- break;
- }
- }
- break;
+ default: /* 0 means "no symbol" */
+ /* debug$F gets this case; other
+ implications ??? */
+ sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
+ break;
+ }
+ }
+ break;
- case 2:
- /* Gas mode: the first matching on partial name. */
+ case 2:
+ /* Gas mode: the first matching on partial name. */
#ifndef TARGET_UNDERSCORE
#define TARGET_UNDERSCORE 0
#endif
- /* Is this the name we're looking for? */
- if (strcmp (target_name,
- symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0)
- {
- /* Not the name we're looking for */
- esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd);
- continue;
- }
- /* Fall through. */
- case 1:
- /* MSVC mode: the lexically second symbol (or
- drop through from the above). */
- {
- char *newname;
-
- /* This must the the second symbol with the
- section #. It is the actual symbol name.
- Intel puts the two adjacent, but Alpha (at
- least) spreads them out. */
-
- section->comdat =
- bfd_alloc (abfd, sizeof (struct bfd_comdat_info));
- if (section->comdat == NULL)
- abort ();
- section->comdat->symbol =
- (esym - esymstart) / bfd_coff_symesz (abfd);
-
- newname = bfd_alloc (abfd, strlen (symname) + 1);
- if (newname == NULL)
- abort ();
-
- strcpy (newname, symname);
- section->comdat->name = newname;
-
- }
-
- goto breakloop;
- }
+ /* Is this the name we're looking for? */
+ if (strcmp (target_name,
+ symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0)
+ {
+ /* Not the name we're looking for */
+ esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd);
+ continue;
}
+ /* Fall through. */
+ case 1:
+ /* MSVC mode: the lexically second symbol (or
+ drop through from the above). */
+ {
+ char *newname;
- esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd);
+ /* This must the the second symbol with the
+ section #. It is the actual symbol name.
+ Intel puts the two adjacent, but Alpha (at
+ least) spreads them out. */
+
+ section->comdat =
+ bfd_alloc (abfd, sizeof (struct bfd_comdat_info));
+ if (section->comdat == NULL)
+ abort ();
+
+ section->comdat->symbol =
+ (esym - esymstart) / bfd_coff_symesz (abfd);
+
+ newname = bfd_alloc (abfd, strlen (symname) + 1);
+ if (newname == NULL)
+ abort ();
+
+ strcpy (newname, symname);
+ section->comdat->name = newname;
+ }
+
+ goto breakloop;
}
- breakloop:
}
+
+ esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd);
+ }
+
+ breakloop:
+ return sec_flags;
+}
+
+
+/* The PE version; see above for the general comments.
+
+ Since to set the SEC_LINK_ONCE and associated flags, we have to
+ look at the symbol table anyway, we return the symbol table index
+ of the symbol being used as the COMDAT symbol. This is admittedly
+ ugly, but there's really nowhere else that we have access to the
+ required information. FIXME: Is the COMDAT symbol index used for
+ any purpose other than objdump? */
+
+static flagword
+styp_to_sec_flags (abfd, hdr, name, section)
+ bfd *abfd;
+ PTR hdr;
+ const char *name;
+ asection *section;
+{
+ struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
+ long styp_flags = internal_s->s_flags;
+ flagword sec_flags;
+
+ /* Assume read only unless IMAGE_SCN_MEM_WRITE is specified. */
+ sec_flags = SEC_READONLY;
+
+ /* Process each flag bit in styp_flags in turn. */
+ while (styp_flags)
+ {
+ long flag = styp_flags & - styp_flags;
+ char * unhandled = NULL;
+
+ styp_flags &= ~ flag;
+
+ /* We infer from the distinct read/write/execute bits the settings
+ of some of the bfd flags; the actual values, should we need them,
+ are also in pei_section_data (abfd, section)->pe_flags. */
+
+ switch (flag)
+ {
+ case STYP_DSECT:
+ unhandled = "STYP_DSECT";
+ break;
+ case STYP_GROUP:
+ unhandled = "STYP_GROUP";
+ break;
+ case STYP_COPY:
+ unhandled = "STYP_COPY";
+ break;
+ case STYP_OVER:
+ unhandled = "STYP_OVER";
+ break;
+#ifdef SEC_NEVER_LOAD
+ case STYP_NOLOAD:
+ sec_flags |= SEC_NEVER_LOAD;
+ break;
+#endif
+ case IMAGE_SCN_MEM_READ:
+ /* Ignored, assume it always to be true. */
+ break;
+ case IMAGE_SCN_TYPE_NO_PAD:
+ /* Skip. */
+ break;
+ case IMAGE_SCN_LNK_OTHER:
+ unhandled = "IMAGE_SCN_LNK_OTHER";
+ break;
+ case IMAGE_SCN_MEM_NOT_CACHED:
+ unhandled = "IMAGE_SCN_MEM_NOT_CACHED";
+ break;
+ case IMAGE_SCN_MEM_NOT_PAGED:
+ unhandled = "IMAGE_SCN_MEM_NOT_PAGED";
+ break;
+ case IMAGE_SCN_MEM_EXECUTE:
+ sec_flags |= SEC_CODE;
+ break;
+ case IMAGE_SCN_MEM_WRITE:
+ sec_flags &= ~ SEC_READONLY;
+ break;
+ case IMAGE_SCN_MEM_DISCARDABLE:
+ sec_flags |= SEC_DEBUGGING;
+ break;
+ case IMAGE_SCN_MEM_SHARED:
+ sec_flags |= SEC_SHARED;
+ break;
+ case IMAGE_SCN_LNK_REMOVE:
+ sec_flags |= SEC_EXCLUDE;
+ break;
+ case IMAGE_SCN_CNT_CODE:
+ sec_flags |= SEC_CODE | SEC_ALLOC | SEC_LOAD;
+ break;
+ case IMAGE_SCN_CNT_INITIALIZED_DATA:
+ sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD;
+ break;
+ case IMAGE_SCN_CNT_UNINITIALIZED_DATA:
+ sec_flags |= SEC_ALLOC;
+ break;
+ case IMAGE_SCN_LNK_INFO:
+ /* We mark these as SEC_DEBUGGING, but only if COFF_PAGE_SIZE is
+ defined. coff_compute_section_file_positions uses
+ COFF_PAGE_SIZE to ensure that the low order bits of the
+ section VMA and the file offset match. If we don't know
+ COFF_PAGE_SIZE, we can't ensure the correct correspondence,
+ and demand page loading of the file will fail. */
+#ifdef COFF_PAGE_SIZE
+ sec_flags |= SEC_DEBUGGING;
+#endif
+ break;
+ case IMAGE_SCN_LNK_COMDAT:
+ /* COMDAT gets very special treatment. */
+ sec_flags = handle_COMDAT (abfd, sec_flags, hdr, name, section);
+ break;
+ default:
+ /* Silently ignore for now. */
+ break;
+ }
+
+ /* If the section flag was not handled, report it here. This will allow
+ users of the BFD library to report a problem but continue executing.
+ Tools which need to be aware of these problems (such as the linker)
+ can override the default bfd_error_handler to intercept these reports. */
+ if (unhandled != NULL)
+ (*_bfd_error_handler)
+ (_("%s (%s): Section flag %s (0x%x) ignored"),
+ bfd_get_filename (abfd), name, unhandled, flag);
}
#if defined (COFF_LONG_SECTION_NAMES) && defined (COFF_SUPPORT_GNU_LINKONCE)
@@ -1100,6 +1199,8 @@ dependent COFF routines:
. boolean _bfd_coff_long_filenames;
. boolean _bfd_coff_long_section_names;
. unsigned int _bfd_coff_default_section_alignment_power;
+. boolean _bfd_coff_force_symnames_in_strings;
+. unsigned int _bfd_coff_debug_string_prefix_length;
. void (*_bfd_coff_swap_filehdr_in) PARAMS ((
. bfd *abfd,
. PTR ext,
@@ -1202,12 +1303,12 @@ dependent COFF routines:
. struct bfd_link_info *info,
. bfd *abfd,
. const char *name,
-. flagword flags,
+. flagword flags,
. asection *section,
. bfd_vma value,
. const char *string,
. boolean copy,
-. boolean collect,
+. boolean collect,
. struct bfd_link_hash_entry **hashp));
.
. boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
@@ -1297,6 +1398,12 @@ dependent COFF routines:
.#define bfd_coff_symname_in_debug(abfd, sym)\
. ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
.
+.#define bfd_coff_force_symnames_in_strings(abfd)\
+. (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
+.
+.#define bfd_coff_debug_string_prefix_length(abfd)\
+. (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
+.
.#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
. ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
. (abfd, file, base, symbol, aux, indaux))
@@ -1434,8 +1541,8 @@ static const unsigned int coff_section_alignment_table_size =
static boolean
coff_new_section_hook (abfd, section)
- bfd *abfd;
- asection *section;
+ bfd * abfd;
+ asection * section;
{
combined_entry_type *native;
@@ -1500,10 +1607,17 @@ coff_set_alignment_hook (abfd, section, scnhdr)
break;
#endif
#ifdef TIC80COFF
- /* TI tools hijack bits 8-11 for the alignment */
+ /* TI tools puts the alignment power in bits 8-11 */
i = (hdr->s_flags >> 8) & 0xF ;
#endif
+#ifdef COFF_DECODE_ALIGNMENT
+ i = COFF_DECODE_ALIGNMENT(hdr->s_flags);
+#endif
section->alignment_power = i;
+
+#ifdef coff_set_section_load_page
+ coff_set_section_load_page (section, hdr->s_page);
+#endif
}
#else /* ! COFF_ALIGN_IN_SECTION_HEADER */
@@ -1568,6 +1682,23 @@ coff_set_alignment_hook (abfd, section, scnhdr)
pei_section_data (abfd, section)->pe_flags = hdr->s_flags;
section->lma = hdr->s_vaddr;
+
+ /* check for extended relocs */
+ if (hdr->s_flags & IMAGE_SCN_LNK_NRELOC_OVFL)
+ {
+ struct external_reloc dst;
+ struct internal_reloc n;
+ int oldpos = bfd_tell (abfd);
+ bfd_seek (abfd, hdr->s_relptr, 0);
+ if (bfd_read ((PTR) & dst, 1, bfd_coff_relsz (abfd), abfd)
+ != bfd_coff_relsz (abfd))
+ return;
+
+ coff_swap_reloc_in (abfd, &dst, &n);
+ bfd_seek (abfd, oldpos, 0);
+ section->reloc_count =
+ hdr->s_nreloc = n.r_vaddr;
+ }
}
#undef ALIGN_SET
#undef ELIFALIGN_SET
@@ -1692,6 +1823,11 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
struct xcoff_tdata *xcoff;
xcoff = xcoff_data (abfd);
+# ifdef U803XTOCMAGIC
+ xcoff->xcoff64 = internal_f->f_magic == U803XTOCMAGIC;
+# else
+ xcoff->xcoff64 = 0;
+# endif
xcoff->full_aouthdr = true;
xcoff->toc = internal_a->o_toc;
xcoff->sntoc = internal_a->o_sntoc;
@@ -1705,12 +1841,12 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
}
#endif
-#ifdef ARM
+#ifdef ARM
/* Set the flags field from the COFF header read in */
if (! _bfd_coff_arm_set_private_flags (abfd, internal_f->f_flags))
coff->flags = 0;
#endif
-
+
#ifdef COFF_WITH_PE
/* FIXME: I'm not sure this is ever executed, since peicode.h
defines coff_mkobject_hook. */
@@ -1745,7 +1881,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
case PPCMAGIC:
arch = bfd_arch_powerpc;
machine = 0; /* what does this mean? (krk) */
- break;
+ break;
#endif
#ifdef I386MAGIC
case I386MAGIC:
@@ -1756,6 +1892,12 @@ coff_set_arch_mach_hook (abfd, filehdr)
machine = 0;
break;
#endif
+#ifdef IA64MAGIC
+ case IA64MAGIC:
+ arch = bfd_arch_ia64;
+ machine = 0;
+ break;
+#endif
#ifdef A29K_MAGIC_BIG
case A29K_MAGIC_BIG:
case A29K_MAGIC_LITTLE:
@@ -1864,9 +2006,13 @@ coff_set_arch_mach_hook (abfd, filehdr)
#endif
#ifdef RS6000COFF_C
+#ifdef XCOFF64
+ case U803XTOCMAGIC:
+#else
case U802ROMAGIC:
case U802WRMAGIC:
case U802TOCMAGIC:
+#endif
{
int cputype;
@@ -1887,13 +2033,13 @@ coff_set_arch_mach_hook (abfd, filehdr)
buf = (bfd_byte *) bfd_malloc (bfd_coff_symesz (abfd));
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
- || (bfd_read (buf, 1, bfd_coff_symesz (abfd), abfd)
+ || (bfd_read (buf, 1, bfd_coff_symesz (abfd), abfd)
!= bfd_coff_symesz (abfd)))
{
free (buf);
return false;
}
- coff_swap_sym_in (abfd, (PTR) buf, (PTR) &sym);
+ bfd_coff_swap_sym_in (abfd, (PTR) buf, (PTR) &sym);
if (sym.n_sclass == C_FILE)
cputype = sym.n_type & 0xff;
else
@@ -1912,28 +2058,33 @@ coff_set_arch_mach_hook (abfd, filehdr)
(because that's how they were bootstrapped originally),
but they are always PowerPC architecture. */
arch = bfd_arch_powerpc;
- machine = 0;
+ machine = bfd_mach_ppc;
+#else
+#ifdef XCOFF64
+ arch = bfd_arch_powerpc;
+ machine = bfd_mach_ppc_620;
#else
arch = bfd_arch_rs6000;
- machine = 6000;
+ machine = bfd_mach_rs6k;
+#endif
#endif /* POWERMAC */
break;
case 1:
arch = bfd_arch_powerpc;
- machine = 601;
+ machine = bfd_mach_ppc_601;
break;
case 2: /* 64 bit PowerPC */
arch = bfd_arch_powerpc;
- machine = 620;
+ machine = bfd_mach_ppc_620;
break;
case 3:
arch = bfd_arch_powerpc;
- machine = 0;
+ machine = bfd_mach_ppc;
break;
case 4:
arch = bfd_arch_rs6000;
- machine = 6000;
+ machine = bfd_mach_rs6k;
break;
}
}
@@ -2015,6 +2166,37 @@ coff_set_arch_mach_hook (abfd, filehdr)
break;
#endif
+#ifdef TICOFF0MAGIC
+#ifdef TICOFF_TARGET_ARCH
+ /* this TI COFF section should be used by all new TI COFF v0 targets */
+ case TICOFF0MAGIC:
+ arch = TICOFF_TARGET_ARCH;
+ break;
+#endif
+#endif
+
+#ifdef TICOFF1MAGIC
+ /* this TI COFF section should be used by all new TI COFF v1/2 targets */
+ /* TI COFF1 and COFF2 use the target_id field to specify which arch */
+ case TICOFF1MAGIC:
+ case TICOFF2MAGIC:
+ switch (internal_f->f_target_id)
+ {
+#ifdef TI_TARGET_ID
+ case TI_TARGET_ID:
+ arch = TICOFF_TARGET_ARCH;
+ break;
+#endif
+ default:
+ arch = bfd_arch_obscure;
+ (*_bfd_error_handler)
+ (_("Unrecognized TI COFF target id '0x%x'"),
+ internal_f->f_target_id);
+ break;
+ }
+ break;
+#endif
+
#ifdef TIC80_ARCH_MAGIC
case TIC80_ARCH_MAGIC:
arch = bfd_arch_tic80;
@@ -2057,6 +2239,10 @@ symname_in_debug_hook (abfd, sym)
#ifdef RS6000COFF_C
+#ifdef XCOFF64
+#define FORCE_SYMNAMES_IN_STRINGS
+#endif
+
/* Handle the csect auxent of a C_EXT or C_HIDEXT symbol. */
static boolean coff_pointerize_aux_hook
@@ -2242,6 +2428,22 @@ coff_write_relocs (abfd, first_undef)
if (bfd_seek (abfd, s->rel_filepos, SEEK_SET) != 0)
return false;
+
+#ifdef COFF_WITH_PE
+ if (s->reloc_count > 0xffff)
+ {
+ /* encode real count here as first reloc */
+ struct internal_reloc n;
+ memset ((PTR) & n, 0, sizeof (n));
+ /* add one to count *this* reloc (grr) */
+ n.r_vaddr = s->reloc_count + 1;
+ coff_swap_reloc_out (abfd, &n, &dst);
+ if (bfd_write ((PTR) & dst, 1, bfd_coff_relsz (abfd), abfd)
+ != bfd_coff_relsz (abfd))
+ return false;
+ }
+#endif
+
for (i = 0; i < s->reloc_count; i++)
{
struct internal_reloc n;
@@ -2256,7 +2458,7 @@ coff_write_relocs (abfd, first_undef)
place). This is a bad thing,'cause the symbols attached
to the output bfd are indexed, so that the relocation
entries know which symbol index they point to. So we
- have to look up the output symbol here. */
+ have to look up the output symbol here. */
if (q->sym_ptr_ptr[0]->the_bfd != abfd)
{
@@ -2407,6 +2609,33 @@ coff_set_flags (abfd, magicp, flagsp)
*magicp = TIC30MAGIC;
return true;
#endif
+
+#ifdef TICOFF_DEFAULT_MAGIC
+ case TICOFF_TARGET_ARCH:
+ /* if there's no indication of which version we want, use the default */
+ if (!abfd->xvec )
+ *magicp = TICOFF_DEFAULT_MAGIC;
+ else
+ {
+ /* we may want to output in a different COFF version */
+ switch (abfd->xvec->name[4])
+ {
+ case '0':
+ *magicp = TICOFF0MAGIC;
+ break;
+ case '1':
+ *magicp = TICOFF1MAGIC;
+ break;
+ case '2':
+ *magicp = TICOFF2MAGIC;
+ break;
+ default:
+ return false;
+ }
+ }
+ return true;
+#endif
+
#ifdef TIC80_ARCH_MAGIC
case bfd_arch_tic80:
*magicp = TIC80_ARCH_MAGIC;
@@ -2424,10 +2653,10 @@ coff_set_flags (abfd, magicp, flagsp)
{
if (APCS_26_FLAG (abfd))
* flagsp |= F_APCS26;
-
+
if (APCS_FLOAT_FLAG (abfd))
* flagsp |= F_APCS_FLOAT;
-
+
if (PIC_FLAG (abfd))
* flagsp |= F_PIC;
}
@@ -2442,7 +2671,10 @@ coff_set_flags (abfd, magicp, flagsp)
case bfd_mach_arm_4: * flagsp |= F_ARM_4; break;
case bfd_mach_arm_4T: * flagsp |= F_ARM_4T; break;
case bfd_mach_arm_5: * flagsp |= F_ARM_5; break;
- case bfd_mach_arm_5T: * flagsp |= F_ARM_5; break; /* XXX - we do not have an F_ARM_5T */
+ /* FIXME: we do not have F_ARM vaues greater than F_ARM_5. */
+ case bfd_mach_arm_5T: * flagsp |= F_ARM_5; break;
+ case bfd_mach_arm_5TE: * flagsp |= F_ARM_5; break;
+ case bfd_mach_arm_XScale: * flagsp |= F_ARM_5; break;
}
return true;
#endif
@@ -2456,7 +2688,7 @@ coff_set_flags (abfd, magicp, flagsp)
case bfd_arch_i386:
*magicp = I386MAGIC;
#ifdef LYNXOS
- /* Just overwrite the usual value if we're doing Lynx. */
+ /* Just overwrite the usual value if we're doing Lynx. */
*magicp = LYNXCOFFMAGIC;
#endif
return true;
@@ -2468,6 +2700,12 @@ coff_set_flags (abfd, magicp, flagsp)
return true;
break;
#endif
+#ifdef IA64MAGIC
+ case bfd_arch_ia64:
+ *magicp = IA64MAGIC;
+ return true;
+ break;
+#endif
#ifdef MC68MAGIC
case bfd_arch_m68k:
#ifdef APOLLOM68KMAGIC
@@ -2481,7 +2719,7 @@ coff_set_flags (abfd, magicp, flagsp)
#endif
#endif
#ifdef LYNXOS
- /* Just overwrite the usual value if we're doing Lynx. */
+ /* Just overwrite the usual value if we're doing Lynx. */
*magicp = LYNXCOFFMAGIC;
#endif
return true;
@@ -2536,7 +2774,7 @@ coff_set_flags (abfd, magicp, flagsp)
case bfd_arch_sparc:
*magicp = SPARCMAGIC;
#ifdef LYNXOS
- /* Just overwrite the usual value if we're doing Lynx. */
+ /* Just overwrite the usual value if we're doing Lynx. */
*magicp = LYNXCOFFMAGIC;
#endif
return true;
@@ -2566,12 +2804,19 @@ coff_set_flags (abfd, magicp, flagsp)
break;
#endif
-#ifdef U802TOCMAGIC
+#ifdef RS6000COFF_C
case bfd_arch_rs6000:
#ifndef PPCMAGIC
case bfd_arch_powerpc:
#endif
- *magicp = U802TOCMAGIC;
+#ifdef XCOFF64
+ if (bfd_get_mach (abfd) == bfd_mach_ppc_620
+ && !strncmp (abfd->xvec->name,"aix", 3))
+ *magicp = U803XTOCMAGIC;
+ else
+#else
+ *magicp = U802TOCMAGIC;
+#endif
return true;
break;
#endif
@@ -2581,23 +2826,22 @@ coff_set_flags (abfd, magicp, flagsp)
* magicp = MCOREMAGIC;
return true;
#endif
-
+
#ifdef W65MAGIC
case bfd_arch_w65:
*magicp = W65MAGIC;
return true;
#endif
- default: /* Unknown architecture */
- /* return false; -- fall through to "return false" below, to avoid
- "statement never reached" errors on the one below. */
+ default: /* Unknown architecture. */
+ /* Fall through to "return false" below, to avoid
+ "statement never reached" errors on the one below. */
break;
}
return false;
}
-
static boolean
coff_set_arch_mach (abfd, arch, machine)
bfd * abfd;
@@ -2614,7 +2858,7 @@ coff_set_arch_mach (abfd, arch, machine)
coff_set_flags (abfd, &dummy1, &dummy2) != true)
return false; /* We can't represent this type */
- return true; /* We're easy ... */
+ return true; /* We're easy ... */
}
#ifdef COFF_IMAGE_WITH_PE
@@ -2642,12 +2886,12 @@ sort_by_secaddr (arg1, arg2)
#endif /* COFF_IMAGE_WITH_PE */
-/* Calculate the file position for each section. */
+/* Calculate the file position for each section. */
#ifndef I960
#define ALIGN_SECTIONS_IN_FILE
#endif
-#ifdef TIC80COFF
+#if defined(TIC80COFF) || defined(TICOFF)
#undef ALIGN_SECTIONS_IN_FILE
#endif
@@ -2685,8 +2929,8 @@ coff_compute_section_file_positions (abfd)
size_t len;
len = strlen (bfd_asymbol_name (*symp));
- if (len > SYMNMLEN)
- sz += len + 3;
+ if (len > SYMNMLEN || bfd_coff_force_symnames_in_strings (abfd))
+ sz += len + 1 + bfd_coff_debug_string_prefix_length (abfd);
}
}
if (sz > 0)
@@ -2704,7 +2948,7 @@ coff_compute_section_file_positions (abfd)
#ifdef COFF_IMAGE_WITH_PE
int page_size;
- if (coff_data (abfd)->link_info)
+ if (coff_data (abfd)->link_info)
{
page_size = pe_data (abfd)->pe_opthdr.FileAlignment;
}
@@ -2853,7 +3097,7 @@ coff_compute_section_file_positions (abfd)
/* Align the sections in the file to the same boundary on
which they are aligned in virtual memory. I960 doesn't
do this (FIXME) so we can stay in sync with Intel. 960
- doesn't yet page from files... */
+ doesn't yet page from files... */
#ifdef ALIGN_SECTIONS_IN_FILE
if ((abfd->flags & EXEC_P) != 0)
{
@@ -3042,7 +3286,7 @@ coff_write_object_contents (abfd)
file_ptr reloc_base;
file_ptr lineno_base;
file_ptr sym_base;
- unsigned long reloc_size = 0;
+ unsigned long reloc_size = 0, reloc_count = 0;
unsigned long lnno_size = 0;
boolean long_section_names;
asection *text_sec = NULL;
@@ -3073,7 +3317,16 @@ coff_write_object_contents (abfd)
for (current = abfd->sections; current != NULL; current =
current->next)
- reloc_size += current->reloc_count * bfd_coff_relsz (abfd);
+ {
+#ifdef COFF_WITH_PE
+ /* we store the actual reloc count in the first reloc's addr */
+ if (current->reloc_count > 0xffff)
+ reloc_count ++;
+#endif
+ reloc_count += current->reloc_count;
+ }
+
+ reloc_size = reloc_count * bfd_coff_relsz (abfd);
lineno_base = reloc_base + reloc_size;
sym_base = lineno_base + lnno_size;
@@ -3096,6 +3349,11 @@ coff_write_object_contents (abfd)
{
current->rel_filepos = reloc_base;
reloc_base += current->reloc_count * bfd_coff_relsz (abfd);
+#ifdef COFF_WITH_PE
+ /* extra reloc to hold real count */
+ if (current->reloc_count > 0xffff)
+ reloc_base += bfd_coff_relsz (abfd);
+#endif
}
else
{
@@ -3170,6 +3428,9 @@ coff_write_object_contents (abfd)
section.s_vaddr = current->vma;
section.s_paddr = current->lma;
section.s_size = current->_raw_size;
+#ifdef coff_get_section_load_page
+ section.s_page = coff_get_section_load_page (current);
+#endif
#ifdef COFF_WITH_PE
section.s_paddr = 0;
@@ -3212,6 +3473,7 @@ coff_write_object_contents (abfd)
hasdebug = true;
#ifdef RS6000COFF_C
+#ifndef XCOFF64
/* Indicate the use of an XCOFF overflow section header. */
if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff)
{
@@ -3219,6 +3481,7 @@ coff_write_object_contents (abfd)
section.s_nlnno = 0xffff;
}
#endif
+#endif
section.s_flags = sec_to_styp_flags (current->name, current->flags);
@@ -3239,10 +3502,13 @@ coff_write_object_contents (abfd)
section.s_align = (current->alignment_power
? 1 << current->alignment_power
: 0);
-#else
+#endif
#ifdef TIC80COFF
+ /* TI COFF puts the alignment power in bits 8-11 of the flags */
section.s_flags |= (current->alignment_power & 0xF) << 8;
#endif
+#ifdef COFF_ENCODE_ALIGNMENT
+ COFF_ENCODE_ALIGNMENT(section, current->alignment_power);
#endif
#ifdef COFF_IMAGE_WITH_PE
@@ -3259,7 +3525,7 @@ coff_write_object_contents (abfd)
SCNHDR buff;
if (coff_swap_scnhdr_out (abfd, &section, &buff) == 0
|| bfd_write ((PTR) (&buff), 1, bfd_coff_scnhsz (abfd), abfd)
- != bfd_coff_scnhsz (abfd))
+ != bfd_coff_scnhsz (abfd))
return false;
}
@@ -3381,13 +3647,13 @@ coff_write_object_contents (abfd)
scnhdr.s_flags = STYP_OVRFLO;
if (coff_swap_scnhdr_out (abfd, &scnhdr, &buff) == 0
|| bfd_write ((PTR) &buff, 1, bfd_coff_scnhsz (abfd), abfd)
- != bfd_coff_scnhsz (abfd))
+ != bfd_coff_scnhsz (abfd))
return false;
}
}
#endif
- /* OK, now set up the filehdr... */
+ /* OK, now set up the filehdr... */
/* Don't include the internal abs section in the section count */
@@ -3432,6 +3698,11 @@ coff_write_object_contents (abfd)
internal_f.f_flags |= F_AR32W;
#endif
+#ifdef TI_TARGET_ID
+ /* target id is used in TI COFF v1 and later; COFF0 won't use this field,
+ but it doesn't hurt to set it internally */
+ internal_f.f_target_id = TI_TARGET_ID;
+#endif
#ifdef TIC80_TARGET_ID
internal_f.f_target_id = TIC80_TARGET_ID;
#endif
@@ -3458,7 +3729,7 @@ coff_write_object_contents (abfd)
coff_set_flags (abfd, &magic, &flags);
internal_f.f_magic = magic;
internal_f.f_flags |= flags;
- /* ...and the "opt"hdr... */
+ /* ...and the "opt"hdr... */
#ifdef A29K
#ifdef ULTRA3 /* NYU's machine */
@@ -3473,6 +3744,10 @@ coff_write_object_contents (abfd)
internal_a.magic = NMAGIC; /* Assume separate i/d */
#define __A_MAGIC_SET__
#endif /* A29K */
+#ifdef TICOFF_AOUT_MAGIC
+ internal_a.magic = TICOFF_AOUT_MAGIC;
+#define __A_MAGIC_SET__
+#endif
#ifdef TIC80COFF
internal_a.magic = TIC80_ARCH_MAGIC;
#define __A_MAGIC_SET__
@@ -3516,7 +3791,7 @@ coff_write_object_contents (abfd)
#if defined(ARM)
#define __A_MAGIC_SET__
internal_a.magic = ZMAGIC;
-#endif
+#endif
#if defined(PPC_PE)
#define __A_MAGIC_SET__
@@ -3526,7 +3801,7 @@ coff_write_object_contents (abfd)
#if defined MCORE_PE
#define __A_MAGIC_SET__
internal_a.magic = IMAGE_NT_OPTIONAL_HDR_MAGIC;
-#endif
+#endif
#if defined(I386)
#define __A_MAGIC_SET__
@@ -3537,6 +3812,11 @@ coff_write_object_contents (abfd)
#endif /* LYNXOS */
#endif /* I386 */
+#if defined(IA64)
+#define __A_MAGIC_SET__
+ internal_a.magic = ZMAGIC;
+#endif /* IA64 */
+
#if defined(SPARC)
#define __A_MAGIC_SET__
#if defined(LYNXOS)
@@ -3592,7 +3872,7 @@ coff_write_object_contents (abfd)
return false;
}
#ifdef COFF_LONG_SECTION_NAMES
- else if (long_section_names)
+ else if (long_section_names && ! obj_coff_strings_written (abfd))
{
/* If we have long section names we have to write out the string
table even if there are no symbols. */
@@ -3733,40 +4013,40 @@ coff_write_object_contents (abfd)
/* now write them */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return false;
-
+
{
char * buff;
bfd_size_type amount;
-
+
buff = bfd_malloc (bfd_coff_filhsz (abfd));
- if (buff == NULL)
+ if (buff == NULL)
return false;
-
- coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff);
+
+ bfd_coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff);
amount = bfd_write ((PTR) buff, 1, bfd_coff_filhsz (abfd), abfd);
-
+
free (buff);
-
+
if (amount != bfd_coff_filhsz (abfd))
return false;
}
-
+
if (abfd->flags & EXEC_P)
{
- /* Note that peicode.h fills in a PEAOUTHDR, not an AOUTHDR.
- include/coff/pe.h sets AOUTSZ == sizeof(PEAOUTHDR)) */
+ /* Note that peicode.h fills in a PEAOUTHDR, not an AOUTHDR.
+ include/coff/pe.h sets AOUTSZ == sizeof (PEAOUTHDR)) */
char * buff;
bfd_size_type amount;
buff = bfd_malloc (bfd_coff_aoutsz (abfd));
- if (buff == NULL)
+ if (buff == NULL)
return false;
-
+
coff_swap_aouthdr_out (abfd, (PTR) & internal_a, (PTR) buff);
amount = bfd_write ((PTR) buff, 1, bfd_coff_aoutsz (abfd), abfd);
-
+
free (buff);
-
+
if (amount != bfd_coff_aoutsz (abfd))
return false;
}
@@ -3824,7 +4104,7 @@ coff_set_section_contents (abfd, section, location, offset, count)
to write a section which doesn't follow these assumptions. The
code has been tested on ISC 4.1 by me, and on SCO by Robert Lipe
<robertl@arnet.com> (Thanks!).
-
+
Gvran Uddeborg <gvran@uddeborg.pp.se> */
if (strcmp (section->name, _LIB) == 0)
@@ -3845,7 +4125,7 @@ coff_set_section_contents (abfd, section, location, offset, count)
#endif
/* Don't write out bss sections - one way to do this is to
- see if the filepos has not been set. */
+ see if the filepos has not been set. */
if (section->filepos == 0)
return true;
@@ -3953,7 +4233,7 @@ coff_slurp_line_table (abfd, asect)
while (counter < asect->lineno_count)
{
struct internal_lineno dst;
- coff_swap_lineno_in (abfd, src, &dst);
+ bfd_coff_swap_lineno_in (abfd, src, &dst);
cache_ptr->line_number = dst.l_lnno;
if (cache_ptr->line_number == 0)
@@ -4002,7 +4282,7 @@ coff_slurp_line_table (abfd, asect)
}
asect->lineno = lineno_cache;
- /* FIXME, free native_lineno here, or use alloca or something. */
+ /* FIXME, free native_lineno here, or use alloca or something. */
return true;
}
@@ -4122,7 +4402,7 @@ coff_slurp_symbol_table (abfd)
case COFF_SYMBOL_UNDEFINED:
dst->symbol.section = bfd_und_section_ptr;
dst->symbol.value = 0;
- break;
+ break;
case COFF_SYMBOL_PE_SECTION:
dst->symbol.flags |= BSF_EXPORT | BSF_SECTION_SYM;
@@ -4169,7 +4449,7 @@ coff_slurp_symbol_table (abfd)
#ifdef I960
case C_LEAFSTAT: /* static leaf procedure */
#endif
-#if defined ARM
+#if defined ARM
case C_THUMBSTAT: /* Thumb static */
case C_THUMBLABEL: /* Thumb label */
case C_THUMBSTATFUNC:/* Thumb static function */
@@ -4206,7 +4486,8 @@ coff_slurp_symbol_table (abfd)
#endif
case C_REGPARM: /* register parameter */
case C_REG: /* register variable */
-#ifndef TIC80COFF
+ /* C_AUTOARG conflictes with TI COFF C_UEXT */
+#if !defined (TIC80COFF) && !defined (TICOFF)
#ifdef C_AUTOARG
case C_AUTOARG: /* 960-specific storage class */
#endif
@@ -4287,7 +4568,7 @@ coff_slurp_symbol_table (abfd)
#endif
case C_BLOCK: /* ".bb" or ".eb" */
- case C_FCN: /* ".bf" or ".ef" (or PE ".lf") */
+ case C_FCN: /* ".bf" or ".ef" (or PE ".lf") */
case C_EFCN: /* physical end of function */
#if defined COFF_WITH_PE
/* PE sets the symbol to a value relative to the start
@@ -4310,6 +4591,11 @@ coff_slurp_symbol_table (abfd)
#endif
break;
+ case C_STATLAB: /* Static load time label */
+ dst->symbol.value = src->u.syment.n_value;
+ dst->symbol.flags = BSF_GLOBAL;
+ break;
+
case C_NULL:
/* PE DLLs sometimes have zeroed out symbols for some
reason. Just ignore them without a warning. */
@@ -4328,11 +4614,10 @@ coff_slurp_symbol_table (abfd)
/* NT uses 0x67 for a weak symbol, not C_ALIAS. */
case C_ALIAS: /* duplicate tag */
#endif
- /* New storage classes for TIc80 */
-#ifdef TIC80COFF
+ /* New storage classes for TI COFF */
+#if defined(TIC80COFF) || defined(TICOFF)
case C_UEXT: /* Tentative external definition */
#endif
- case C_STATLAB: /* Static load time label */
case C_EXTLAB: /* External load time label */
case C_HIDDEN: /* ext symbol in dmert public lib */
default:
@@ -4502,7 +4787,6 @@ SUBSUBSECTION
into a howto table vector; the 88k subtracts a number from the
@code{r_type} field and creates an addend field.
-
*/
#ifndef CALC_ADDEND
@@ -4557,7 +4841,6 @@ coff_slurp_reloc_table (abfd, asect, symbols)
if (reloc_cache == NULL)
return false;
-
for (idx = 0; idx < asect->reloc_count; idx++)
{
struct internal_reloc dst;
@@ -4678,7 +4961,6 @@ coff_canonicalize_reloc (abfd, section, relptr, symbols)
arelent *tblptr = section->relocation;
unsigned int count = 0;
-
if (section->flags & SEC_CONSTRUCTOR)
{
/* this section has relocs made up by us, they are not in the
@@ -4701,8 +4983,6 @@ coff_canonicalize_reloc (abfd, section, relptr, symbols)
for (; count++ < section->reloc_count;)
*relptr++ = tblptr++;
-
-
}
*relptr = 0;
return section->reloc_count;
@@ -4890,6 +5170,16 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
false,
#endif
COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
+ 4,
+#else
+ 2,
+#endif
coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
coff_SWAP_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
@@ -4921,7 +5211,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
#define coff_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#endif
-#ifndef coff_bfd_copy_private_bfd_data
+#ifndef coff_bfd_copy_private_bfd_data
#define coff_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
#endif
@@ -4933,7 +5223,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
#define coff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#endif
-#ifndef coff_bfd_print_private_bfd_data
+#ifndef coff_bfd_print_private_bfd_data
#define coff_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
#endif
diff --git a/gnu/usr.bin/binutils/bfd/coffgen.c b/gnu/usr.bin/binutils/bfd/coffgen.c
index f2410d919d9..82bfdc82c12 100644
--- a/gnu/usr.bin/binutils/bfd/coffgen.c
+++ b/gnu/usr.bin/binutils/bfd/coffgen.c
@@ -1,5 +1,6 @@
/* Support for the generic parts of COFF, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -60,7 +61,7 @@ static void coff_pointerize_aux
static boolean make_a_section_from_file
PARAMS ((bfd *, struct internal_scnhdr *, unsigned int));
static const bfd_target *coff_real_object_p
- PARAMS ((bfd *, unsigned, struct internal_filehdr *,
+ PARAMS ((bfd *, unsigned, struct internal_filehdr *,
struct internal_aouthdr *));
static void fixup_symbol_value
PARAMS ((bfd *, coff_symbol_type *, struct internal_syment *));
@@ -212,7 +213,7 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a)
goto fail;
/* Set the arch/mach *before* swapping in sections; section header swapping
- may depend on arch/mach info. */
+ may depend on arch/mach info. */
if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false)
goto fail;
@@ -340,7 +341,6 @@ coff_get_symtab_upper_bound (abfd)
return (bfd_get_symcount (abfd) + 1) * (sizeof (coff_symbol_type *));
}
-
/* Canonicalize a COFF symbol table. */
long
@@ -525,7 +525,7 @@ coff_count_linenumbers (abfd)
{
asymbol *q_maybe = *p;
- if (bfd_asymbol_flavour (q_maybe) == bfd_target_coff_flavour)
+ if (bfd_family_coff (bfd_asymbol_bfd (q_maybe)))
{
coff_symbol_type *q = coffsymbol (q_maybe);
@@ -558,13 +558,12 @@ coff_count_linenumbers (abfd)
/* Takes a bfd and a symbol, returns a pointer to the coff specific
area of the symbol if there is one. */
-/*ARGSUSED*/
coff_symbol_type *
coff_symbol_from (ignore_abfd, symbol)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
{
- if (bfd_asymbol_flavour (symbol) != bfd_target_coff_flavour)
+ if (!bfd_family_coff (bfd_asymbol_bfd (symbol)))
return (coff_symbol_type *) NULL;
if (bfd_asymbol_bfd (symbol)->tdata.coff_obj_data == (coff_data_type *) NULL)
@@ -608,8 +607,11 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment)
syment->n_value = (coff_symbol_ptr->symbol.value
+ coff_symbol_ptr->symbol.section->output_offset);
if (! obj_pe (abfd))
- syment->n_value +=
- coff_symbol_ptr->symbol.section->output_section->vma;
+ {
+ syment->n_value += (syment->n_sclass == C_STATLAB)
+ ? coff_symbol_ptr->symbol.section->output_section->lma
+ : coff_symbol_ptr->symbol.section->output_section->vma;
+ }
}
else
{
@@ -689,7 +691,7 @@ coff_renumber_symbols (bfd_ptr, first_undef)
for (symbol_index = 0; symbol_index < symbol_count; symbol_index++)
{
coff_symbol_type *coff_symbol_ptr = coff_symbol_from (bfd_ptr, symbol_ptr_ptr[symbol_index]);
- symbol_ptr_ptr[symbol_index]->udata.i = symbol_index;
+ symbol_ptr_ptr[symbol_index]->udata.i = symbol_index;
if (coff_symbol_ptr && coff_symbol_ptr->native)
{
combined_entry_type *s = coff_symbol_ptr->native;
@@ -816,7 +818,16 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
{
unsigned int filnmlen;
- strncpy (native->u.syment._n._n_name, ".file", SYMNMLEN);
+ if (bfd_coff_force_symnames_in_strings (abfd))
+ {
+ native->u.syment._n._n_n._n_offset =
+ (*string_size_p + STRING_SIZE_SIZE);
+ native->u.syment._n._n_n._n_zeroes = 0;
+ *string_size_p += 6; /* strlen(".file") + 1 */
+ }
+ else
+ strncpy (native->u.syment._n._n_name, ".file", SYMNMLEN);
+
auxent = &(native + 1)->u.auxent;
filnmlen = bfd_coff_filnmlen (abfd);
@@ -843,7 +854,7 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
}
else
{
- if (name_length <= SYMNMLEN)
+ if (name_length <= SYMNMLEN && !bfd_coff_force_symnames_in_strings (abfd))
{
/* This name will fit into the symbol neatly */
strncpy (native->u.syment._n._n_name, symbol->name, SYMNMLEN);
@@ -858,7 +869,8 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
else
{
long filepos;
- bfd_byte buf[2];
+ bfd_byte buf[4];
+ int prefix_len = bfd_coff_debug_string_prefix_length (abfd);
/* This name should be written into the .debug section. For
some reason each name is preceded by a two byte length
@@ -868,24 +880,29 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
if (*debug_string_section_p == (asection *) NULL)
*debug_string_section_p = bfd_get_section_by_name (abfd, ".debug");
filepos = bfd_tell (abfd);
- bfd_put_16 (abfd, name_length + 1, buf);
+ if (prefix_len == 4)
+ bfd_put_32 (abfd, name_length + 1, buf);
+ else
+ bfd_put_16 (abfd, name_length + 1, buf);
+
if (!bfd_set_section_contents (abfd,
*debug_string_section_p,
(PTR) buf,
(file_ptr) *debug_string_size_p,
- (bfd_size_type) 2)
+ (bfd_size_type) prefix_len)
|| !bfd_set_section_contents (abfd,
*debug_string_section_p,
(PTR) symbol->name,
((file_ptr) *debug_string_size_p
- + 2),
+ + prefix_len),
(bfd_size_type) name_length + 1))
abort ();
if (bfd_seek (abfd, filepos, SEEK_SET) != 0)
abort ();
- native->u.syment._n._n_n._n_offset = *debug_string_size_p + 2;
+ native->u.syment._n._n_n._n_offset =
+ *debug_string_size_p + prefix_len;
native->u.syment._n._n_n._n_zeroes = 0;
- *debug_string_size_p += name_length + 3;
+ *debug_string_size_p += name_length + 1 + prefix_len;
}
}
}
@@ -1085,7 +1102,7 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
while (lineno[count].line_number != 0)
{
#if 0
- /* 13 april 92. sac
+ /* 13 april 92. sac
I've been told this, but still need proof:
> The second bug is also in `bfd/coffcode.h'. This bug
> causes the linker to screw up the pc-relocations for
@@ -1241,7 +1258,7 @@ coff_write_symbols (abfd)
{
/* This is not a COFF symbol, so it certainly is not a
file name, nor does it go in the .debug section. */
- maxlen = SYMNMLEN;
+ maxlen = bfd_coff_force_symnames_in_strings (abfd) ? 0 : SYMNMLEN;
}
else if (bfd_coff_symname_in_debug (abfd,
&c_symbol->native->u.syment))
@@ -1252,9 +1269,13 @@ coff_write_symbols (abfd)
}
else if (c_symbol->native->u.syment.n_sclass == C_FILE
&& c_symbol->native->u.syment.n_numaux > 0)
- maxlen = bfd_coff_filnmlen (abfd);
+ {
+ if (bfd_coff_force_symnames_in_strings (abfd))
+ bfd_write (".file", 1, 6, abfd);
+ maxlen = bfd_coff_filnmlen (abfd);
+ }
else
- maxlen = SYMNMLEN;
+ maxlen = bfd_coff_force_symnames_in_strings (abfd) ? 0 : SYMNMLEN;
if (name_length > maxlen)
{
@@ -1354,7 +1375,6 @@ coff_write_linenumbers (abfd)
return true;
}
-/*ARGSUSED */
alent *
coff_get_lineno (ignore_abfd, symbol)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -1465,7 +1485,7 @@ coff_pointerize_aux (abfd, table_base, symbol, indaux, auxent)
/* Allocate space for the ".debug" section, and read it.
We did not read the debug section until now, because
- we didn't want to go to the trouble until someone needed it. */
+ we didn't want to go to the trouble until someone needed it. */
static char *
build_debug_section (abfd)
@@ -1487,7 +1507,7 @@ build_debug_section (abfd)
if (debug_section == NULL)
return NULL;
- /* Seek to the beginning of the `.debug' section and read it.
+ /* Seek to the beginning of the `.debug' section and read it.
Save the current position first; it is needed by our caller.
Then read debug section and reset the file pointer. */
@@ -1501,7 +1521,6 @@ build_debug_section (abfd)
return debug_section;
}
-
/* Return a pointer to a malloc'd copy of 'name'. 'name' may not be
\0-terminated, but will not exceed 'maxlen' characters. The copy *will*
be \0-terminated. */
@@ -1589,7 +1608,7 @@ _bfd_coff_read_string_table (abfd)
+ obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd)),
SEEK_SET) != 0)
return NULL;
-
+
if (bfd_read (extstrsize, sizeof extstrsize, 1, abfd) != sizeof extstrsize)
{
if (bfd_get_error () != bfd_error_file_truncated)
@@ -1790,7 +1809,7 @@ coff_get_normalized_symtab (abfd)
{
break;
} /* if end of string */
- } /* possible lengths of this string. */
+ } /* possible lengths of this string. */
if ((newstring = (PTR) bfd_alloc (abfd, ++i)) == NULL)
return (NULL);
@@ -1888,7 +1907,6 @@ coff_bfd_make_debug_symbol (abfd, ptr, sz)
return &new->symbol;
}
-/*ARGSUSED */
void
coff_get_symbol_info (abfd, symbol, ret)
bfd *abfd;
@@ -2141,7 +2159,7 @@ _bfd_coff_is_local_label_name (abfd, name)
/* Provided a BFD, a section and an offset (in bytes, not octets) into the
section, calculate and return the name of the source file and the line
nearest to the wanted location. */
-/*ARGSUSED*/
+
boolean
coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
functionname_ptr, line_ptr)
@@ -2168,17 +2186,25 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
&found, filename_ptr,
functionname_ptr, line_ptr,
- &coff_data (abfd)->line_info))
+ &coff_data(abfd)->line_info))
return false;
+
if (found)
return true;
+ /* Also try examining DWARF2 debugging information. */
+ if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr, 0,
+ &coff_data(abfd)->dwarf2_find_line_info))
+ return true;
+
*filename_ptr = 0;
*functionname_ptr = 0;
*line_ptr = 0;
/* Don't try and find line numbers in a non coff file */
- if (abfd->xvec->flavour != bfd_target_coff_flavour)
+ if (!bfd_family_coff (abfd))
return false;
if (cof == NULL)
@@ -2385,7 +2411,7 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
We cheat here by creating a fake native entry for it and
then filling in the class. This code is based on that in
coff_write_alien_symbol(). */
-
+
combined_entry_type * native;
native = (combined_entry_type *) bfd_alloc (abfd, sizeof (* native));
@@ -2393,10 +2419,10 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
return false;
memset (native, 0, sizeof (* native));
-
+
native->u.syment.n_type = T_NULL;
native->u.syment.n_sclass = class;
-
+
if (bfd_is_und_section (symbol->section))
{
native->u.syment.n_scnum = N_UNDEF;
@@ -2415,19 +2441,18 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
+ symbol->section->output_offset);
if (! obj_pe (abfd))
native->u.syment.n_value += symbol->section->output_section->vma;
-
+
/* Copy the any flags from the the file header into the symbol.
FIXME: Why? */
native->u.syment.n_flags = bfd_asymbol_bfd (& csym->symbol)->flags;
}
-
+
csym->native = native;
}
else
{
csym->native->u.syment.n_sclass = class;
}
-
+
return true;
}
-
diff --git a/gnu/usr.bin/binutils/bfd/cofflink.c b/gnu/usr.bin/binutils/bfd/cofflink.c
index 609f6653e09..96b005bc89a 100644
--- a/gnu/usr.bin/binutils/bfd/cofflink.c
+++ b/gnu/usr.bin/binutils/bfd/cofflink.c
@@ -1,5 +1,6 @@
/* COFF specific linker code.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -40,6 +41,15 @@ static int process_embedded_commands
PARAMS ((bfd *, struct bfd_link_info *, bfd *));
static void mark_relocs PARAMS ((struct coff_final_link_info *, bfd *));
+/* Return true if SYM is a weak, external symbol. */
+#define IS_WEAK_EXTERNAL(abfd, sym) \
+ ((sym).n_sclass == C_WEAKEXT \
+ || (obj_pe (abfd) && (sym).n_sclass == C_NT_WEAK))
+
+/* Return true if SYM is an external symbol. */
+#define IS_EXTERNAL(abfd, sym) \
+ ((sym).n_sclass == C_EXT || IS_WEAK_EXTERNAL (abfd, sym))
+
/* Define macros so that the ISFCN, et. al., macros work correctly.
These macros are defined in include/coff/internal.h in terms of
N_TMASK, etc. These definitions require a user to define local
@@ -395,8 +405,7 @@ coff_link_add_symbols (abfd, info)
break;
}
- if (sym.n_sclass == C_WEAKEXT
- || (obj_pe (abfd) && sym.n_sclass == C_NT_WEAK))
+ if (IS_WEAK_EXTERNAL (abfd, sym))
flags = BSF_WEAK;
addit = true;
@@ -894,8 +903,7 @@ _bfd_coff_final_link (abfd, info)
for (p = o->link_order_head; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order
- && (bfd_get_flavour (p->u.indirect.section->owner)
- == bfd_target_coff_flavour))
+ && bfd_family_coff (p->u.indirect.section->owner))
{
sub = p->u.indirect.section->owner;
if (! bfd_coff_link_output_has_begun (sub, & finfo))
@@ -921,7 +929,7 @@ _bfd_coff_final_link (abfd, info)
if (! bfd_coff_final_link_postscript (abfd, & finfo))
goto error_return;
-
+
/* Free up the buffers used by _bfd_coff_link_input_bfd. */
coff_debug_merge_hash_table_free (&finfo.debug_merge);
@@ -982,7 +990,7 @@ _bfd_coff_final_link (abfd, info)
/* If doing task linking (ld --task-link) then make a pass through the
global symbols, writing out any that are defined, and making them
- static. */
+ static. */
if (info->task_link)
{
finfo.failed = false;
@@ -1095,6 +1103,8 @@ _bfd_coff_final_link (abfd, info)
if (! _bfd_stringtab_emit (abfd, finfo.strtab))
return false;
+
+ obj_coff_strings_written (abfd) = true;
}
_bfd_stringtab_free (finfo.strtab);
@@ -1152,7 +1162,7 @@ dores_com (ptr, output_bfd, heap)
bfd *output_bfd;
int heap;
{
- if (coff_data(output_bfd)->pe)
+ if (coff_data(output_bfd)->pe)
{
int val = strtoul (ptr, &ptr, 0);
if (heap)
@@ -1160,7 +1170,7 @@ dores_com (ptr, output_bfd, heap)
else
pe_data(output_bfd)->pe_opthdr.SizeOfStackReserve =val;
- if (ptr[0] == ',')
+ if (ptr[0] == ',')
{
int val = strtoul (ptr+1, &ptr, 0);
if (heap)
@@ -1186,7 +1196,7 @@ char **dst;
}
/* Process any magic embedded commands in a section called .drectve */
-
+
static int
process_embedded_commands (output_bfd, info, abfd)
bfd *output_bfd;
@@ -1197,19 +1207,19 @@ process_embedded_commands (output_bfd, info, abfd)
char *s;
char *e;
char *copy;
- if (!sec)
+ if (!sec)
return 1;
-
+
copy = bfd_malloc ((size_t) sec->_raw_size);
- if (!copy)
+ if (!copy)
return 0;
- if (! bfd_get_section_contents(abfd, sec, copy, 0, sec->_raw_size))
+ if (! bfd_get_section_contents(abfd, sec, copy, 0, sec->_raw_size))
{
free (copy);
return 0;
}
e = copy + sec->_raw_size;
- for (s = copy; s < e ; )
+ for (s = copy; s < e ; )
{
if (s[0]!= '-') {
s++;
@@ -1230,7 +1240,7 @@ process_embedded_commands (output_bfd, info, abfd)
s = get_name(s, &name);
s = get_name(s, &attribs);
while (loop) {
- switch (*attribs++)
+ switch (*attribs++)
{
case 'W':
had_write = 1;
@@ -1264,7 +1274,7 @@ process_embedded_commands (output_bfd, info, abfd)
{
s = dores_com (s+6, output_bfd, 0);
}
- else
+ else
s++;
}
free (copy);
@@ -1274,7 +1284,7 @@ process_embedded_commands (output_bfd, info, abfd)
/* Place a marker against all symbols which are used by relocations.
This marker can be picked up by the 'do we skip this symbol ?'
loop in _bfd_coff_link_input_bfd() and used to prevent skipping
- that symbol.
+ that symbol.
*/
static void
@@ -1286,14 +1296,13 @@ mark_relocs (finfo, input_bfd)
if ((bfd_get_file_flags (input_bfd) & HAS_SYMS) == 0)
return;
-
+
for (a = input_bfd->sections; a != (asection *) NULL; a = a->next)
{
struct internal_reloc * internal_relocs;
struct internal_reloc * irel;
struct internal_reloc * irelend;
-
if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1)
continue;
@@ -1306,7 +1315,7 @@ mark_relocs (finfo, input_bfd)
? (finfo->section_info[ a->output_section->target_index ].relocs + a->output_section->reloc_count)
: finfo->internal_relocs)
);
-
+
if (internal_relocs == NULL)
continue;
@@ -1317,7 +1326,7 @@ mark_relocs (finfo, input_bfd)
been initialised to 0) for all of the symbols that are used
in the relocation table. This will then be picked up in the
skip/don't pass */
-
+
for (; irel < irelend; irel++)
{
finfo->sym_indices[ irel->r_symndx ] = -1;
@@ -1400,8 +1409,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
&& finfo->info->relocateable)
{
/* mark the symbol array as 'not-used' */
- memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp);
-
+ memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp);
+
mark_relocs (finfo, input_bfd);
}
@@ -1448,7 +1457,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
dont_skip_symbol = *indexp;
else
dont_skip_symbol = false;
-
+
*indexp = -1;
skip = false;
@@ -1834,12 +1843,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
}
/* If doing task linking, convert normal global function symbols to
- static functions. */
-
- if (finfo->info->task_link
- && (isym.n_sclass == C_EXT
- || isym.n_sclass == C_WEAKEXT
- || (obj_pe (input_bfd) && isym.n_sclass == C_NT_WEAK)))
+ static functions. */
+ if (finfo->info->task_link && IS_EXTERNAL (input_bfd, isym))
isym.n_sclass = C_STAT;
/* Output the symbol. */
@@ -2202,7 +2207,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
is.n_numaux, auxptr);
}
- skipping = false;
+ skipping = false;
}
iline.l_addr.l_symndx = indx;
@@ -2400,8 +2405,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
/* This reloc is against a symbol we are
stripping. This should have been handled
by the 'dont_skip_symbol' code in the while
- loop at the top of this function. */
-
+ loop at the top of this function. */
+
is = finfo->internal_syms + irel->r_symndx;
name = (_bfd_coff_internal_syment_name
@@ -2425,9 +2430,9 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (secdata == NULL || secdata->stab_info == NULL)
{
if (! bfd_set_section_contents (output_bfd, o->output_section,
- contents,
- (file_ptr)
- (o->output_offset *
+ contents,
+ (file_ptr)
+ (o->output_offset *
bfd_octets_per_byte (output_bfd)),
(o->_cooked_size != 0
? o->_cooked_size
@@ -2549,20 +2554,25 @@ _bfd_coff_write_global_sym (h, data)
/* If doing task linking and this is the pass where we convert
defined globals to statics, then do that conversion now. If the
symbol is not being converted, just ignore it and it will be
- output during a later pass. */
+ output during a later pass. */
if (finfo->global_to_static)
{
- if (isym.n_sclass != C_EXT
- && isym.n_sclass != C_WEAKEXT
- && (! obj_pe (output_bfd) || isym.n_sclass != C_NT_WEAK))
- {
- return true;
- }
+ if (! IS_EXTERNAL (output_bfd, isym))
+ return true;
+
isym.n_sclass = C_STAT;
}
+ /* When a weak symbol is not overriden by a strong one,
+ turn it into an external symbol when not building a
+ shared or relocateable object. */
+ if (! finfo->info->shared
+ && ! finfo->info->relocateable
+ && IS_WEAK_EXTERNAL (finfo->output_bfd, isym))
+ isym.n_sclass = C_EXT;
+
isym.n_numaux = h->numaux;
-
+
bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) finfo->outsyms);
symesz = bfd_coff_symesz (output_bfd);
@@ -2654,7 +2664,7 @@ _bfd_coff_write_global_sym (h, data)
/* Write out task global symbols, converting them to statics. Called
via coff_link_hash_traverse. Calls bfd_coff_write_global_sym to do
- the dirty work, if the symbol we are processing needs conversion. */
+ the dirty work, if the symbol we are processing needs conversion. */
boolean
_bfd_coff_write_task_globals (h, data)
@@ -2740,7 +2750,7 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
break;
}
ok = bfd_set_section_contents (output_bfd, output_section, (PTR) buf,
- (file_ptr)
+ (file_ptr)
(link_order->offset *
bfd_octets_per_byte (output_bfd)), size);
free (buf);
@@ -2862,7 +2872,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
return false;
}
else
- {
+ {
h = obj_coff_sym_hashes (input_bfd)[symndx];
sym = syms + symndx;
}
@@ -2877,7 +2887,6 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
else
addend = 0;
-
howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,
sym, &addend);
if (howto == NULL)
@@ -2929,6 +2938,9 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
+ sec->output_offset);
}
+ else if (h->root.type == bfd_link_hash_undefweak)
+ val = 0;
+
else if (! info->relocateable)
{
if (! ((*info->callbacks->undefined_symbol)
@@ -2940,7 +2952,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
if (info->base_file)
{
- /* Emit a reloc if the backend thinks it needs it. */
+ /* Emit a reloc if the backend thinks it needs it. */
if (sym && pe_data (output_bfd)->in_reloc_p (output_bfd, howto))
{
/* Relocation to a symbol in a section which isn't
@@ -2949,9 +2961,9 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
reloc section. Note that the base file is not
portable between systems. We write out a long here,
and dlltool reads in a long. */
- long addr = (rel->r_vaddr
- - input_section->vma
- + input_section->output_offset
+ long addr = (rel->r_vaddr
+ - input_section->vma
+ + input_section->output_offset
+ input_section->output_section->vma);
if (coff_data (output_bfd)->pe)
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
@@ -2963,7 +2975,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
}
}
}
-
+
rstat = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents,
rel->r_vaddr - input_section->vma,
@@ -3007,4 +3019,3 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
}
return true;
}
-
diff --git a/gnu/usr.bin/binutils/bfd/coffswap.h b/gnu/usr.bin/binutils/bfd/coffswap.h
index d7d090fd41e..2ff0a3231e6 100644
--- a/gnu/usr.bin/binutils/bfd/coffswap.h
+++ b/gnu/usr.bin/binutils/bfd/coffswap.h
@@ -1,5 +1,5 @@
/* Generic COFF swapping routines, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -168,12 +168,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef GET_SCNHDR_NRELOC
#define GET_SCNHDR_NRELOC bfd_h_get_16
#endif
+#ifndef MAX_SCNHDR_NRELOC
+#define MAX_SCNHDR_NRELOC 0xffff
+#endif
#ifndef PUT_SCNHDR_NRELOC
#define PUT_SCNHDR_NRELOC bfd_h_put_16
#endif
#ifndef GET_SCNHDR_NLNNO
#define GET_SCNHDR_NLNNO bfd_h_get_16
#endif
+#ifndef MAX_SCNHDR_NLNNO
+#define MAX_SCNHDR_NLNNO 0xffff
+#endif
#ifndef PUT_SCNHDR_NLNNO
#define PUT_SCNHDR_NLNNO bfd_h_put_16
#endif
@@ -184,6 +190,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PUT_SCNHDR_FLAGS bfd_h_put_32
#endif
+#ifndef GET_RELOC_VADDR
+#define GET_RELOC_VADDR bfd_h_get_32
+#endif
+#ifndef PUT_RELOC_VADDR
+#define PUT_RELOC_VADDR bfd_h_put_32
+#endif
static void coff_swap_aouthdr_in PARAMS ((bfd *, PTR, PTR));
static unsigned int coff_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR));
@@ -217,7 +229,7 @@ coff_swap_reloc_in (abfd, src, dst)
RELOC *reloc_src = (RELOC *) src;
struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
- reloc_dst->r_vaddr = bfd_h_get_32(abfd, (bfd_byte *)reloc_src->r_vaddr);
+ reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, (bfd_byte *)reloc_src->r_vaddr);
reloc_dst->r_symndx = bfd_h_get_signed_32(abfd, (bfd_byte *) reloc_src->r_symndx);
#ifdef RS6000COFF_C
@@ -241,7 +253,7 @@ coff_swap_reloc_out (abfd, src, dst)
{
struct internal_reloc *reloc_src = (struct internal_reloc *)src;
struct external_reloc *reloc_dst = (struct external_reloc *)dst;
- bfd_h_put_32(abfd, reloc_src->r_vaddr, (bfd_byte *) reloc_dst->r_vaddr);
+ PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, (bfd_byte *) reloc_dst->r_vaddr);
bfd_h_put_32(abfd, reloc_src->r_symndx, (bfd_byte *) reloc_dst->r_symndx);
#ifdef RS6000COFF_C
@@ -274,6 +286,7 @@ coff_swap_filehdr_in (abfd, src, dst)
{
FILHDR *filehdr_src = (FILHDR *) src;
struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
+
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
#endif
@@ -324,7 +337,6 @@ coff_swap_filehdr_out (abfd, in, out)
return bfd_coff_filhsz (abfd);
}
-
#ifndef NO_COFF_SYMBOLS
static void
@@ -347,9 +359,9 @@ coff_swap_sym_in (abfd, ext1, in1)
memcpy(in->_n._n_name, ext->e.e_name, SYMNMLEN);
#endif
}
- in->n_value = bfd_h_get_32(abfd, (bfd_byte *) ext->e_value);
+ in->n_value = bfd_h_get_32(abfd, (bfd_byte *) ext->e_value);
in->n_scnum = bfd_h_get_16(abfd, (bfd_byte *) ext->e_scnum);
- if (sizeof(ext->e_type) == 2){
+ if (sizeof (ext->e_type) == 2){
in->n_type = bfd_h_get_16(abfd, (bfd_byte *) ext->e_type);
}
else {
@@ -383,7 +395,7 @@ coff_swap_sym_out (abfd, inp, extp)
}
bfd_h_put_32(abfd, in->n_value , (bfd_byte *) ext->e_value);
bfd_h_put_16(abfd, in->n_scnum , (bfd_byte *) ext->e_scnum);
- if (sizeof(ext->e_type) == 2)
+ if (sizeof (ext->e_type) == 2)
{
bfd_h_put_16(abfd, in->n_type , (bfd_byte *) ext->e_type);
}
@@ -419,7 +431,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
case C_FILE:
if (ext->x_file.x_fname[0] == 0) {
in->x_file.x_n.x_zeroes = 0;
- in->x_file.x_n.x_offset =
+ in->x_file.x_n.x_offset =
bfd_h_get_32(abfd, (bfd_byte *) ext->x_file.x_n.x_offset);
} else {
#if FILNMLEN != E_FILNMLEN
@@ -439,28 +451,6 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
}
goto end;
- /* RS/6000 "csect" auxents */
-#ifdef RS6000COFF_C
- case C_EXT:
- case C_HIDEXT:
- if (indx + 1 == numaux)
- {
- in->x_csect.x_scnlen.l = bfd_h_get_32 (abfd, ext->x_csect.x_scnlen);
- in->x_csect.x_parmhash = bfd_h_get_32 (abfd,
- ext->x_csect.x_parmhash);
- in->x_csect.x_snhash = bfd_h_get_16 (abfd, ext->x_csect.x_snhash);
- /* We don't have to hack bitfields in x_smtyp because it's
- defined by shifts-and-ands, which are equivalent on all
- byte orders. */
- in->x_csect.x_smtyp = bfd_h_get_8 (abfd, ext->x_csect.x_smtyp);
- in->x_csect.x_smclas = bfd_h_get_8 (abfd, ext->x_csect.x_smclas);
- in->x_csect.x_stab = bfd_h_get_32 (abfd, ext->x_csect.x_stab);
- in->x_csect.x_snstab = bfd_h_get_16 (abfd, ext->x_csect.x_snstab);
- goto end;
- }
- break;
-#endif
-
case C_STAT:
#ifdef C_LEAFSTAT
case C_LEAFSTAT:
@@ -517,7 +507,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
end: ;
/* the semicolon is because MSVC doesn't like labels at
- end of block. */
+ end of block. */
#ifdef COFF_ADJUST_AUX_IN_POST
COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1);
@@ -558,27 +548,6 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
}
goto end;
-#ifdef RS6000COFF_C
- /* RS/6000 "csect" auxents */
- case C_EXT:
- case C_HIDEXT:
- if (indx + 1 == numaux)
- {
- PUTWORD (abfd, in->x_csect.x_scnlen.l, ext->x_csect.x_scnlen);
- PUTWORD (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash);
- PUTHALF (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash);
- /* We don't have to hack bitfields in x_smtyp because it's
- defined by shifts-and-ands, which are equivalent on all
- byte orders. */
- PUTBYTE (abfd, in->x_csect.x_smtyp, ext->x_csect.x_smtyp);
- PUTBYTE (abfd, in->x_csect.x_smclas, ext->x_csect.x_smclas);
- PUTWORD (abfd, in->x_csect.x_stab, ext->x_csect.x_stab);
- PUTHALF (abfd, in->x_csect.x_snstab, ext->x_csect.x_snstab);
- goto end;
- }
- break;
-#endif
-
case C_STAT:
#ifdef C_LEAFSTAT
case C_LEAFSTAT:
@@ -703,9 +672,12 @@ coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
bfd_h_put_32(abfd, aouthdr_int->vid[1], (bfd_byte *) aouthdr_ext->vid + 4);
#endif
-
#ifdef RS6000COFF_C
+#ifdef XCOFF64
+ aouthdr_int->o_toc = bfd_h_get_64(abfd, aouthdr_ext->o_toc);
+#else
aouthdr_int->o_toc = bfd_h_get_32(abfd, aouthdr_ext->o_toc);
+#endif
aouthdr_int->o_snentry = bfd_h_get_16(abfd, aouthdr_ext->o_snentry);
aouthdr_int->o_sntext = bfd_h_get_16(abfd, aouthdr_ext->o_sntext);
aouthdr_int->o_sndata = bfd_h_get_16(abfd, aouthdr_ext->o_sndata);
@@ -716,9 +688,14 @@ coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
aouthdr_int->o_algndata = bfd_h_get_16(abfd, aouthdr_ext->o_algndata);
aouthdr_int->o_modtype = bfd_h_get_16(abfd, aouthdr_ext->o_modtype);
aouthdr_int->o_cputype = bfd_h_get_16(abfd, aouthdr_ext->o_cputype);
+#ifdef XCOFF64
+ aouthdr_int->o_maxstack = bfd_h_get_64(abfd, aouthdr_ext->o_maxstack);
+ aouthdr_int->o_maxdata = bfd_h_get_64(abfd, aouthdr_ext->o_maxdata);
+#else
aouthdr_int->o_maxstack = bfd_h_get_32(abfd, aouthdr_ext->o_maxstack);
aouthdr_int->o_maxdata = bfd_h_get_32(abfd, aouthdr_ext->o_maxdata);
#endif
+#endif
#ifdef MIPSECOFF
aouthdr_int->bss_start = bfd_h_get_32(abfd, aouthdr_ext->bss_start);
@@ -763,7 +740,11 @@ coff_swap_aouthdr_out (abfd, in, out)
#endif
#ifdef RS6000COFF_C
+#ifdef XCOFF64
+ bfd_h_put_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
+#else
bfd_h_put_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
+#endif
bfd_h_put_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
bfd_h_put_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
bfd_h_put_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
@@ -774,9 +755,18 @@ coff_swap_aouthdr_out (abfd, in, out)
bfd_h_put_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
bfd_h_put_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
bfd_h_put_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
+#ifdef XCOFF64
+ bfd_h_put_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
+ bfd_h_put_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
+#else
bfd_h_put_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
bfd_h_put_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
+#endif
memset (aouthdr_out->o_resv2, 0, sizeof aouthdr_out->o_resv2);
+#ifdef XCOFF64
+ memset (aouthdr_out->o_debugger, 0, sizeof aouthdr_out->o_debugger);
+ memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3);
+#endif
#endif
#ifdef MIPSECOFF
@@ -814,7 +804,7 @@ coff_swap_scnhdr_in (abfd, ext, in)
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
#endif
- memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof(scnhdr_int->s_name));
+ memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
scnhdr_int->s_vaddr =
GET_SCNHDR_VADDR (abfd, (bfd_byte *) scnhdr_ext->s_vaddr);
scnhdr_int->s_paddr =
@@ -856,12 +846,11 @@ coff_swap_scnhdr_out (abfd, in, out)
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
#endif
- memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof(scnhdr_int->s_name));
+ memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr,
(bfd_byte *) scnhdr_ext->s_vaddr);
-
PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr,
(bfd_byte *) scnhdr_ext->s_paddr);
PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size,
@@ -879,8 +868,9 @@ coff_swap_scnhdr_out (abfd, in, out)
PUTWORD(abfd, scnhdr_int->s_nlnno, (bfd_byte *) scnhdr_ext->s_nlnno);
PUTWORD(abfd, scnhdr_int->s_nreloc, (bfd_byte *) scnhdr_ext->s_nreloc);
#else
- if (scnhdr_int->s_nlnno <= 0xffff)
- PUTHALF(abfd, scnhdr_int->s_nlnno, (bfd_byte *) scnhdr_ext->s_nlnno);
+ if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
+ PUT_SCNHDR_NLNNO(abfd, scnhdr_int->s_nlnno,
+ (bfd_byte *) scnhdr_ext->s_nlnno);
else
{
char buf[sizeof (scnhdr_int->s_name) + 1];
@@ -891,10 +881,11 @@ coff_swap_scnhdr_out (abfd, in, out)
(_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd),
buf, scnhdr_int->s_nlnno);
- PUTHALF (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno);
+ PUT_SCNHDR_NLNNO(abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno);
}
- if (scnhdr_int->s_nreloc <= 0xffff)
- PUTHALF(abfd, scnhdr_int->s_nreloc, (bfd_byte *) scnhdr_ext->s_nreloc);
+ if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
+ PUT_SCNHDR_NRELOC(abfd, scnhdr_int->s_nreloc,
+ (bfd_byte *) scnhdr_ext->s_nreloc);
else
{
char buf[sizeof (scnhdr_int->s_name) + 1];
@@ -905,7 +896,7 @@ coff_swap_scnhdr_out (abfd, in, out)
bfd_get_filename (abfd),
buf, scnhdr_int->s_nreloc);
bfd_set_error (bfd_error_file_truncated);
- PUTHALF (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc);
+ PUT_SCNHDR_NRELOC(abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc);
ret = 0;
}
#endif
diff --git a/gnu/usr.bin/binutils/bfd/config.bfd b/gnu/usr.bin/binutils/bfd/config.bfd
index 30a1a40e2ea..9904354601c 100644
--- a/gnu/usr.bin/binutils/bfd/config.bfd
+++ b/gnu/usr.bin/binutils/bfd/config.bfd
@@ -32,10 +32,15 @@ alpha*) targ_archs=bfd_alpha_arch ;;
arm*) targ_archs=bfd_arm_arch ;;
strongarm*) targ_archs=bfd_arm_arch ;;
thumb*) targ_archs=bfd_arm_arch ;;
+xscale*) targ_archs=bfd_arm_arch ;;
c30*) targ_archs=bfd_tic30_arch ;;
+c54x*) targ_archs=bfd_tic54x_arch ;;
hppa*) targ_archs=bfd_hppa_arch ;;
+x86_64) targ_archs=bfd_i386_arch ;;
i[3456]86) targ_archs=bfd_i386_arch ;;
i370) targ_archs=bfd_i370_arch ;;
+m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;;
+m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;;
m68*) targ_archs=bfd_m68k_arch ;;
m88*) targ_archs=bfd_m88k_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
@@ -79,7 +84,15 @@ case "${targ}" in
alpha*-*-*)
targ_defvec=ecoffalpha_little_vec
;;
- sparc64-*-netbsd* | sparc64-*-openbsd*)
+ ia64*-*-freebsd* | ia64*-*-linux-gnu* | ia64*-*-elf*)
+ targ_defvec=bfd_elf64_ia64_little_vec
+ targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
+ ;;
+ ia64*-*-hpux*)
+ targ_defvec=bfd_elf64_ia64_big_vec
+ targ_selvecs="bfd_elf32_ia64_big_vec"
+ ;;
+ sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-openbsd*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
;;
@@ -113,7 +126,7 @@ case "${targ}" in
targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
targ_underscore=yes
;;
- arm-*-aout | armel-*-aout)
+ arm-*-aout | armel-*-aout)
targ_defvec=aout_arm_little_vec
targ_selvecs=aout_arm_big_vec
;;
@@ -126,11 +139,21 @@ case "${targ}" in
targ_selvecs=armcoff_big_vec
targ_underscore=yes
;;
+ arm-*-vxworks*)
+ targ_defvec=armcoff_little_vec
+ targ_selvecs=armcoff_big_vec
+ targ_underscore=yes
+ targ_cflags=-DVXWORKS
+ ;;
+ arm-*-rtems*)
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
+ ;;
armeb-*-elf | arm*b-*-linux-gnu*)
targ_defvec=bfd_elf32_bigarm_vec
targ_selvecs=bfd_elf32_littlearm_vec
;;
- arm-*-elf | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*)
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
@@ -171,9 +194,18 @@ case "${targ}" in
targ_selvecs=armcoff_big_vec
targ_underscore=yes
;;
+ xscale-*-elf)
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
+ ;;
+ xscale-*-coff)
+ targ_defvec=armcoff_little_vec
+ targ_selvecs=armcoff_big_vec
+ targ_underscore=yes
+ ;;
a29k-*-ebmon* | a29k-*-udi* | a29k-*-coff* | a29k-*-sym1* | \
- a29k-*-vxworks* | a29k-*-sysv*)
+ a29k-*-vxworks* | a29k-*-sysv* | a29k-*rtems*)
targ_defvec=a29kcoff_big_vec
targ_selvecs=sunos_big_vec
targ_underscore=yes
@@ -194,6 +226,18 @@ case "${targ}" in
targ_defvec=tic30_coff_vec
;;
+ c54x*-*-*coff* | tic54x-*-*coff*)
+ targ_defvec=tic54x_coff1_vec
+ targ_selvecs="tic54x_coff1_beh_vec tic54x_coff2_vec tic54x_coff2_beh_vec tic54x_coff0_vec tic54x_coff0_beh_vec"
+ targ_underscore=yes
+ ;;
+
+ cris-*-*)
+ targ_defvec=cris_aout_vec
+ targ_selvecs="bfd_elf32_us_cris_vec bfd_elf32_cris_vec ieee_vec"
+ targ_underscore=yes # Note: not true for bfd_elf32_cris_vec.
+ ;;
+
d10v-*-*)
targ_defvec=bfd_elf32_d10v_vec
;;
@@ -217,27 +261,39 @@ case "${targ}" in
targ_underscore=yes
;;
-#if 0 /* HPPA ELF does not work currently. */
- hppa*-*-*elf* | hppa*-*-linux-gnu* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*)
- targ_defvec=bfd_elf32_hppa_vec
+#ifdef BFD64
+ hppa*64*-*-linux-gnu*)
+ targ_defvec=bfd_elf64_hppa_linux_vec
+ targ_selvecs=bfd_elf64_hppa_vec
+ ;;
+ hppa*64*-*-hpux11*)
+ targ_defvec=bfd_elf64_hppa_vec
+ targ_selvecs=bfd_elf64_hppa_linux_vec
+ targ_cflags=-DHPUX_LARGE_AR_IDS
;;
#endif
+
+ hppa*-*-linux-gnu*)
+ targ_defvec=bfd_elf32_hppa_linux_vec
+ targ_selvecs=bfd_elf32_hppa_vec
+ ;;
+ hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*)
+ targ_defvec=bfd_elf32_hppa_vec
+ targ_selvecs=bfd_elf32_hppa_linux_vec
+ ;;
+
#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) || defined (HOST_HPPAMPEIX)
-#if 0 /* HPPA ELF does not work currently. */
hppa*-*-bsd*)
targ_defvec=som_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
-#endif
hppa*-*-hpux* | hppa*-*-hiux* | hppa*-*-mpeix*)
targ_defvec=som_vec
;;
-#if 0 /* HPPA ELF does not work currently. */
hppa*-*-osf*)
targ_defvec=som_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
-#endif
#endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */
i370-*-*)
@@ -254,6 +310,13 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
+ i[3456]86-*-rtemself*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs="i386coff_vec i386aout_vec"
+ ;;
+ i[3456]86-*-chorus*)
+ targ_defvec=bfd_elf32_i386_vec
+ ;;
i[3456]86-*-msdosdjgpp* | i[3456]*-*-go32* | i[3456]86-go32-rtems* )
targ_defvec=go32coff_vec
targ_selvecs="go32stubbedcoff_vec i386aout_vec"
@@ -262,14 +325,10 @@ case "${targ}" in
i[3456]86-*-aix*)
targ_defvec=i386coff_vec
;;
- i[3456]86-*-rtemscoff*)
+ i[3456]86*-*-rtems*)
targ_defvec=i386coff_vec
targ_selvecs="bfd_elf32_i386_vec i386aout_vec"
;;
- i[3456]86-*-rtemself* | i[3456]86*-*-rtems*)
- targ_defvec=bfd_elf32_i386_vec
- targ_selvecs="i386coff_vec i386aout_vec"
- ;;
i[3456]86-sequent-bsd*)
targ_defvec=i386dynix_vec
targ_underscore=yes
@@ -288,9 +347,13 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
- i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
+ i[3456]86-*-netbsdelf*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs=i386netbsd_vec
+ ;;
+ i[3456]86-*-netbsdaout* | i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
targ_defvec=i386netbsd_vec
- targ_selvecs=i386bsd_vec
+ targ_selvecs="bfd_elf32_i386_vec i386bsd_vec"
targ_underscore=yes
;;
i[3456]86-*-netware*)
@@ -304,8 +367,18 @@ case "${targ}" in
;;
i[3456]86-*-linux-gnu*)
targ_defvec=bfd_elf32_i386_vec
- targ_selvecs=i386linux_vec
+ targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
;;
+#ifdef BFD64
+ x86_64-*-freebsd*)
+ targ_defvec=bfd_elf64_x86_64_vec
+ targ_selvecs="bfd_elf32_i386_vec i386coff_vec bfd_efi_app_ia32_vec"
+ ;;
+ x86_64-*-linux-gnu*)
+ targ_defvec=bfd_elf64_x86_64_vec
+ targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
+ ;;
+#endif
i[3456]86-*-lynxos*)
targ_defvec=i386lynx_coff_vec
targ_selvecs=i386lynx_aout_vec
@@ -357,10 +430,18 @@ case "${targ}" in
targ_defvec=i386aout_vec
targ_underscore=yes
;;
+ i[3456]86-*-chaos)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selfvecs=i386chaos_vec
+ ;;
i860-*-mach3* | i860-*-osf1* | i860-*-coff*)
targ_defvec=i860coff_vec
;;
+ i860-stardent-sysv4* | i860-stardent-elf*)
+ targ_defvec=bfd_elf32_i860_little_vec
+ targ_selvecs="bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
+ ;;
i860-*-sysv4* | i860-*-elf*)
targ_defvec=bfd_elf32_i860_vec
;;
@@ -370,12 +451,7 @@ case "${targ}" in
targ_selvecs="b_out_vec_big_host icoff_little_vec icoff_big_vec ieee_vec"
targ_underscore=yes
;;
- i960-*-rtemself*)
- targ_defvec=bfd_elf32_i960_vec
- targ_selvecs="icoff_big_vec b_out_vec_little_host b_out_vec_big_host ieee_vec"
- targ_underscore=yes
- ;;
- i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv* | i960-*-rtemscoff* | i960-*-rtems*)
+ i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv* | i960-*-rtems*)
targ_defvec=icoff_little_vec
targ_selvecs="icoff_big_vec b_out_vec_little_host b_out_vec_big_host ieee_vec"
targ_underscore=yes
@@ -394,6 +470,15 @@ case "${targ}" in
targ_defvec=bfd_elf32_m32r_vec
;;
+ m68hc11-*-* | m6811-*-*)
+ targ_defvec=bfd_elf32_m68hc11_vec
+ targ_selvecs="bfd_elf32_m68hc11_vec bfd_elf32_m68hc12_vec"
+ ;;
+ m68hc12-*-* | m6812-*-*)
+ targ_defvec=bfd_elf32_m68hc12_vec
+ targ_selvecs="bfd_elf32_m68hc11_vec bfd_elf32_m68hc12_vec"
+ ;;
+
m68*-apollo-*)
targ_defvec=apollocoff_vec
;;
@@ -420,16 +505,10 @@ case "${targ}" in
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs="m68kcoff_vec ieee_vec"
;;
- m68*-*-rtemscoff*)
- # same as m68k-coff with some extra targets
+ m68*-*-rtems*)
targ_defvec=m68kcoff_vec
targ_selvecs="m68kcoff_vec versados_vec ieee_vec aout0_big_vec"
;;
- m68*-*-rtems* | m68*-*-rtemself*)
- # same as m68k-elf with some extra targets
- targ_defvec=bfd_elf32_m68k_vec
- targ_selvecs="m68kcoff_vec versados_vec ieee_vec aout0_big_vec"
- ;;
m68*-*-coff* | m68*-*-sysv*)
targ_defvec=m68kcoff_vec
targ_selvecs="m68kcoff_vec versados_vec ieee_vec"
@@ -565,14 +644,14 @@ case "${targ}" in
targ_underscore=yes
;;
mips*-*-sysv4*)
- targ_defvec=bfd_elf32_bigmips_vec
- targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
+ targ_defvec=bfd_elf32_tradbigmips_vec
+ targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
mips*-*-sysv* | mips*-*-riscos*)
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
- mips*el-*-elf* | mips*el-*-rtems* | mips*el-*-vxworks*)
+ mips*el-*-elf* | mips*el-*-rtems* | mips*el-*-vxworks* | mips*-*-chorus*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
@@ -584,14 +663,22 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
- mips*el*-*-linux-gnu* | mips*el*-*-openbsd*)
+ mips*el*-*-openbsd*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
;;
- mips*-*-linux-gnu* | mips*-*-openbsd*)
+ mips*el*-*-linux-gnu*)
+ targ_defvec=bfd_elf32_tradlittlemips_vec
+ targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
+ ;;
+ mips*-*-openbsd*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
+ mips*-*-linux-gnu*)
+ 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"
+ ;;
mn10200-*-*)
targ_defvec=bfd_elf32_mn10200_vec
@@ -622,10 +709,11 @@ case "${targ}" in
powerpc-*-aix* | powerpc-*-beos*)
targ_defvec=rs6000coff_vec
+ targ_selvecs="rs6000coff64_vec"
;;
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
- powerpc-*-vxworks*)
+ powerpc-*-chorus* | powerpc-*-vxworks*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
;;
@@ -652,6 +740,11 @@ case "${targ}" in
targ_defvec=rs6000coff_vec
;;
+ sh-*-linux*)
+ targ_defvec=bfd_elf32_shblin_vec
+ targ_selvecs=bfd_elf32_shlin_vec
+ ;;
+
sh-*-elf* | sh-*-rtemself*)
targ_defvec=bfd_elf32_sh_vec
targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
@@ -662,7 +755,7 @@ case "${targ}" in
targ_selvecs="shlpe_vec shlpei_vec"
targ_underscore=yes
;;
- sh-*-* | sh-*-rtemscoff* | sh-*-rtems*)
+ sh-*-* | sh-*-rtems*)
targ_defvec=shcoff_vec
targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
targ_underscore=yes
@@ -680,6 +773,9 @@ case "${targ}" in
sparclite-*-elf* | sparc86x-*-elf*)
targ_defvec=bfd_elf32_sparc_vec
;;
+ sparc*-*-chorus*)
+ targ_defvec=bfd_elf32_sparc_vec
+ ;;
sparc-*-linux*aout*)
targ_defvec=sparclinux_vec
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
@@ -735,7 +831,7 @@ case "${targ}" in
sparc64-*-elf*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs=bfd_elf32_sparc_vec
- ;;
+ ;;
#endif /* BFD64 */
sparc*-*-coff*)
targ_defvec=sparccoff_vec
@@ -749,7 +845,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="sunos_big_vec sparccoff_vec"
;;
- sparc*-*-*)
+ sparc*-*-* | sparc*-*-rtems*)
targ_defvec=sunos_big_vec
targ_underscore=yes
;;
diff --git a/gnu/usr.bin/binutils/bfd/config.in b/gnu/usr.bin/binutils/bfd/config.in
index 7383656618b..9440d714ebd 100644
--- a/gnu/usr.bin/binutils/bfd/config.in
+++ b/gnu/usr.bin/binutils/bfd/config.in
@@ -211,21 +211,42 @@
/* Define if <sys/procfs.h> has prstatus_t. */
#undef HAVE_PRSTATUS_T
+/* Define if <sys/procfs.h> has prstatus32_t. */
+#undef HAVE_PRSTATUS32_T
+
/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
#undef HAVE_PRSTATUS_T_PR_WHO
+/* Define if <sys/procfs.h> has prstatus32_t.pr_who. */
+#undef HAVE_PRSTATUS32_T_PR_WHO
+
/* Define if <sys/procfs.h> has pstatus_t. */
#undef HAVE_PSTATUS_T
+/* Define if <sys/procfs.h> has pxstatus_t. */
+#undef HAVE_PXSTATUS_T
+
+/* Define if <sys/procfs.h> has pstatus32_t. */
+#undef HAVE_PSTATUS32_T
+
/* Define if <sys/procfs.h> has prpsinfo_t. */
#undef HAVE_PRPSINFO_T
+/* Define if <sys/procfs.h> has prpsinfo32_t. */
+#undef HAVE_PRPSINFO32_T
+
/* Define if <sys/procfs.h> has psinfo_t. */
#undef HAVE_PSINFO_T
+/* Define if <sys/procfs.h> has psinfo32_t. */
+#undef HAVE_PSINFO32_T
+
/* Define if <sys/procfs.h> has lwpstatus_t. */
#undef HAVE_LWPSTATUS_T
+/* Define if <sys/procfs.h> has lwpxstatus_t. */
+#undef HAVE_LWPXSTATUS_T
+
/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
#undef HAVE_LWPSTATUS_T_PR_CONTEXT
diff --git a/gnu/usr.bin/binutils/bfd/configure b/gnu/usr.bin/binutils/bfd/configure
index c8d61b496d6..cf5697efe6d 100644
--- a/gnu/usr.bin/binutils/bfd/configure
+++ b/gnu/usr.bin/binutils/bfd/configure
@@ -22,6 +22,8 @@ ac_help="$ac_help
ac_help="$ac_help
--disable-libtool-lock avoid locking (might break parallel builds)"
ac_help="$ac_help
+ --with-pic try to use only PIC/non-PIC objects [default=use both]"
+ac_help="$ac_help
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
ac_help="$ac_help
--enable-targets alternative target configurations"
@@ -30,6 +32,8 @@ ac_help="$ac_help
ac_help="$ac_help
--with-mmap try using mmap for BFD input files if available"
ac_help="$ac_help
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
ac_help="$ac_help
@@ -53,6 +57,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -167,6 +172,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -337,6 +343,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -502,12 +513,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -545,6 +560,68 @@ else
ac_n= ac_c='\c' ac_t=
fi
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:565: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<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=
@@ -594,7 +671,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:598: checking host system type" >&5
+echo "configure:675: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -615,7 +692,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:619: checking target system type" >&5
+echo "configure:696: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -633,7 +710,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:637: checking build system type" >&5
+echo "configure:714: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -658,7 +735,7 @@ test "$host_alias" != "$target_alias" &&
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:662: checking for $ac_word" >&5
+echo "configure:739: 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
@@ -688,7 +765,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:692: checking for $ac_word" >&5
+echo "configure:769: 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
@@ -739,7 +816,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:743: checking for $ac_word" >&5
+echo "configure:820: 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
@@ -771,7 +848,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:852: 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.
@@ -782,12 +859,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 786 "configure"
+#line 863 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:868: \"$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
@@ -813,12 +890,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:817: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:822: checking whether we are using GNU C" >&5
+echo "configure:899: 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
@@ -827,7 +904,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:908: \"$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
@@ -846,7 +923,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:850: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:927: 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
@@ -878,7 +955,7 @@ else
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:882: checking for POSIXized ISC" >&5
+echo "configure:959: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -911,7 +988,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:915: checking for a BSD compatible install" >&5
+echo "configure:992: 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
@@ -964,7 +1041,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:968: checking whether build environment is sane" >&5
+echo "configure:1045: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1021,7 +1098,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1025: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1102: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1050,7 +1127,7 @@ fi
PACKAGE=bfd
-VERSION=2.10.1
+VERSION=2.11.2
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -1067,7 +1144,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1071: checking for working aclocal" >&5
+echo "configure:1148: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1080,7 +1157,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1084: checking for working autoconf" >&5
+echo "configure:1161: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1093,7 +1170,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1097: checking for working automake" >&5
+echo "configure:1174: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1106,7 +1183,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1110: checking for working autoheader" >&5
+echo "configure:1187: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1119,7 +1196,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1123: checking for working makeinfo" >&5
+echo "configure:1200: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1142,7 +1219,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1146: checking for $ac_word" >&5
+echo "configure:1223: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1174,7 +1251,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1178: checking for $ac_word" >&5
+echo "configure:1255: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1206,7 +1283,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1210: checking for $ac_word" >&5
+echo "configure:1287: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1309,36 +1386,6 @@ else
enable_fast_install=yes
fi
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1316: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1351,8 +1398,14 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1355: checking for ld used by GCC" >&5
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
+echo "configure:1402: checking for ld used by GCC" >&5
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
case "$ac_prog" in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
@@ -1375,10 +1428,10 @@ echo "configure:1355: 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:1379: checking for GNU ld" >&5
+echo "configure:1432: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1382: checking for non-GNU ld" >&5
+echo "configure:1435: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1413,7 +1466,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1417: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1470: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1426,10 +1479,23 @@ fi
fi
echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$ac_cv_prog_gnu_ld
+
+
+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+echo "configure:1487: checking for $LD option to reload object files" >&5
+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1433: checking for BSD-compatible nm" >&5
+echo "configure:1499: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1440,18 +1506,20 @@ else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ tmp_nm=$ac_dir/${ac_tool_prefix}nm
+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
+ # Tru64's nm complains that /dev/null is an invalid object file
+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
@@ -1465,7 +1533,7 @@ NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1469: checking whether ln -s works" >&5
+echo "configure:1537: 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
@@ -1485,12 +1553,478 @@ else
echo "$ac_t""no" 1>&6
fi
+echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
+echo "configure:1558: checking how to recognise dependant libraries" >&5
+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case "$host_os" in
+aix4*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin* | mingw* |pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+freebsd* )
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case "$host_cpu" in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20*)
+ # TODO: Does this work for hpux-11 too?
+ lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+
+irix5* | irix6*)
+ case "$host_os" in
+ irix5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case "$LD" in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ case "$host_cpu" in
+ alpha* | i*86 | powerpc* | sparc* | ia64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ else
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case "$host_vendor" in
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ esac
+ ;;
esac
+fi
+
+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1701: checking for object suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:1707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1727: 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:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# Only perform the check for file, if the check method requires it
+case "$deplibs_check_method" in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+echo "configure:1764: checking for ${ac_tool_prefix}file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo $ac_n "checking for file""... $ac_c" 1>&6
+echo "configure:1826: checking for file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1897: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1929: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ RANLIB=":"
+fi
+fi
+
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1964: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1996: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ STRIP=":"
+fi
+fi
+
+
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
@@ -1509,13 +2043,24 @@ fi
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
+test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$lt_target" in
+case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1518 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2063 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1536,19 +2081,27 @@ case "$lt_target" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1540: checking whether the C compiler needs -belf" >&5
+echo "configure:2085: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1545 "configure"
+
+ 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 2098 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -1558,6 +2111,13 @@ else
lt_cv_cc_needs_belf=no
fi
rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
fi
echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
@@ -1621,12 +2181,14 @@ rm -f confcache
# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
# Reload cache, that may have been modified by ltconfig
@@ -1640,7 +2202,7 @@ fi
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -1650,6 +2212,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
exec 5>>./config.log
+
+
+
+
+
+
# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
if test "${enable_64_bit_bfd+set}" = set; then
enableval="$enable_64_bit_bfd"
@@ -1692,6 +2260,29 @@ else
want_mmap=false
fi
+build_warnings="-W -Wall"
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+
+
@@ -1720,7 +2311,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1724: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2315: 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"
@@ -1742,72 +2333,10 @@ fi
MAINT=$MAINTAINER_MODE_TRUE
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1747: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1752 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1763: \"$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:1780: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1785 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1792: \"$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
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1811: checking for executable suffix" >&5
+echo "configure:2340: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1817,10 +2346,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -1846,7 +2375,7 @@ target64=false
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1850: checking for $ac_word" >&5
+echo "configure:2379: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1876,7 +2405,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1880: checking for $ac_word" >&5
+echo "configure:2409: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1927,7 +2456,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1931: checking for $ac_word" >&5
+echo "configure:2460: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1959,7 +2488,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2492: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1970,12 +2499,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1974 "configure"
+#line 2503 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2001,12 +2530,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2534: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2010: checking whether we are using GNU C" >&5
+echo "configure:2539: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2015,7 +2544,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2034,7 +2563,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2038: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2567: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2068,7 +2597,7 @@ fi
ALL_LINGUAS=
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2072: checking how to run the C preprocessor" >&5
+echo "configure:2601: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2083,13 +2612,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2087 "configure"
+#line 2616 "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:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2100,13 +2629,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2104 "configure"
+#line 2633 "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:2110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2117,13 +2646,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2121 "configure"
+#line 2650 "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:2127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2147,13 +2676,43 @@ else
fi
echo "$ac_t""$CPP" 1>&6
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2683: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2152: checking for ANSI C header files" >&5
+echo "configure:2711: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2157 "configure"
+#line 2716 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2161,7 +2720,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure: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
rm -rf conftest*
@@ -2178,7 +2737,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2182 "configure"
+#line 2741 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2196,7 +2755,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2200 "configure"
+#line 2759 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2217,7 +2776,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2221 "configure"
+#line 2780 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2228,7 +2787,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2252,18 +2811,18 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2256: checking for working const" >&5
+echo "configure:2815: 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 2261 "configure"
+#line 2820 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@@ -2306,7 +2865,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2327,21 +2886,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2331: checking for inline" >&5
+echo "configure:2890: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2338 "configure"
+#line 2897 "configure"
#include "confdefs.h"
int main() {
-} int $ac_kw foo() {
+} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2367,12 +2926,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2371: checking for off_t" >&5
+echo "configure:2930: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2376 "configure"
+#line 2935 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2400,12 +2959,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2404: checking for size_t" >&5
+echo "configure:2963: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2409 "configure"
+#line 2968 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2435,19 +2994,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2439: checking for working alloca.h" >&5
+echo "configure:2998: 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 2444 "configure"
+#line 3003 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
-void *p = alloca(2 * sizeof(int));
+char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2468,12 +3027,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2472: checking for alloca" >&5
+echo "configure:3031: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2477 "configure"
+#line 3036 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2501,7 +3060,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2533,12 +3092,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2537: checking whether alloca needs Cray hooks" >&5
+echo "configure:3096: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2542 "configure"
+#line 3101 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2563,12 +3122,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2567: checking for $ac_func" >&5
+echo "configure:3126: 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 2572 "configure"
+#line 3131 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2591,7 +3150,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2618,7 +3177,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2622: checking stack direction for C alloca" >&5
+echo "configure:3181: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2626,7 +3185,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2630 "configure"
+#line 3189 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2645,7 +3204,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2670,17 +3229,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2674: checking for $ac_hdr" >&5
+echo "configure:3233: 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 2679 "configure"
+#line 3238 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2709,12 +3268,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2713: checking for $ac_func" >&5
+echo "configure:3272: 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 2718 "configure"
+#line 3277 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2737,7 +3296,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2762,7 +3321,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2766: checking for working mmap" >&5
+echo "configure:3325: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2770,7 +3329,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
+#line 3333 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2797,15 +3356,12 @@ else
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -2860,7 +3416,7 @@ main()
/*
* First, make a file with some known garbage in it.
*/
- data = (char*)malloc(pagesize);
+ data = malloc(pagesize);
if (!data)
exit(1);
for (i = 0; i < pagesize; ++i)
@@ -2881,7 +3437,7 @@ main()
fd = open("conftestmmap", O_RDWR);
if (fd < 0)
exit(1);
- data2 = (char*)malloc(2 * pagesize);
+ data2 = malloc(2 * pagesize);
if (!data2)
exit(1);
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -2899,7 +3455,7 @@ main()
*/
for (i = 0; i < pagesize; ++i)
*(data2 + i) = *(data2 + i) + 1;
- data3 = (char*)malloc(pagesize);
+ data3 = malloc(pagesize);
if (!data3)
exit(1);
if (read(fd, data3, pagesize) != pagesize)
@@ -2913,7 +3469,7 @@ main()
}
EOF
-if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2941,17 +3497,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2945: checking for $ac_hdr" >&5
+echo "configure:3501: 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 2950 "configure"
+#line 3506 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2981,12 +3537,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2985: checking for $ac_func" >&5
+echo "configure:3541: 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 2990 "configure"
+#line 3546 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3009,7 +3565,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3038,12 +3594,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3042: checking for $ac_func" >&5
+echo "configure:3598: 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 3047 "configure"
+#line 3603 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3066,7 +3622,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3100,19 +3656,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3104: checking for LC_MESSAGES" >&5
+echo "configure:3660: 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 3109 "configure"
+#line 3665 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3133,7 +3689,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3137: checking whether NLS is requested" >&5
+echo "configure:3693: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3153,7 +3709,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3157: checking whether included gettext is requested" >&5
+echo "configure:3713: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3172,17 +3728,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3176: checking for libintl.h" >&5
+echo "configure:3732: 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 3181 "configure"
+#line 3737 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3199,19 +3755,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3203: checking for gettext in libc" >&5
+echo "configure:3759: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3208 "configure"
+#line 3764 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3227,7 +3783,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3231: checking for bindtextdomain in -lintl" >&5
+echo "configure:3787: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3235,7 +3791,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3239 "configure"
+#line 3795 "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
@@ -3246,7 +3802,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3262,19 +3818,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3266: checking for gettext in libintl" >&5
+echo "configure:3822: 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 3271 "configure"
+#line 3827 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3302,7 +3858,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3306: checking for $ac_word" >&5
+echo "configure:3862: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3336,12 +3892,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3340: checking for $ac_func" >&5
+echo "configure:3896: 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 3345 "configure"
+#line 3901 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3364,7 +3920,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3391,7 +3947,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3395: checking for $ac_word" >&5
+echo "configure:3951: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3427,7 +3983,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3431: checking for $ac_word" >&5
+echo "configure:3987: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3459,7 +4015,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3463 "configure"
+#line 4019 "configure"
#include "confdefs.h"
int main() {
@@ -3467,7 +4023,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3499,7 +4055,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3503: checking for $ac_word" >&5
+echo "configure:4059: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3533,7 +4089,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3537: checking for $ac_word" >&5
+echo "configure:4093: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3569,7 +4125,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3573: checking for $ac_word" >&5
+echo "configure:4129: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3659,7 +4215,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3663: checking for catalogs to be installed" >&5
+echo "configure:4219: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -3687,17 +4243,17 @@ echo "configure:3663: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:3691: checking for linux/version.h" >&5
+echo "configure:4247: 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 3696 "configure"
+#line 4252 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3775,7 +4331,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3779: checking for a BSD compatible install" >&5
+echo "configure:4335: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3858,7 +4414,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:3862: checking for build system executable suffix" >&5
+echo "configure:4418: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3886,17 +4442,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3890: checking for $ac_hdr" >&5
+echo "configure:4446: 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 3895 "configure"
+#line 4451 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3926,17 +4482,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3930: checking for $ac_hdr" >&5
+echo "configure:4486: 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 3935 "configure"
+#line 4491 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3963,12 +4519,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3967: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4523: 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 3972 "configure"
+#line 4528 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -3977,7 +4533,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:3981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -4002,12 +4558,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4006: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4562: 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 4011 "configure"
+#line 4567 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4015,7 +4571,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4040,7 +4596,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4044: checking for opendir in -ldir" >&5
+echo "configure:4600: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4048,7 +4604,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4052 "configure"
+#line 4608 "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
@@ -4059,7 +4615,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4081,7 +4637,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4085: checking for opendir in -lx" >&5
+echo "configure:4641: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4089,7 +4645,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4093 "configure"
+#line 4649 "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
@@ -4100,7 +4656,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4125,12 +4681,12 @@ fi
for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4129: checking for $ac_func" >&5
+echo "configure:4685: 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 4134 "configure"
+#line 4690 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4153,7 +4709,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4188,12 +4744,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4192: checking whether strstr must be declared" >&5
+echo "configure:4748: 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 4197 "configure"
+#line 4753 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4214,7 +4770,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4235,12 +4791,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4239: checking whether malloc must be declared" >&5
+echo "configure:4795: 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 4244 "configure"
+#line 4800 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4261,7 +4817,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -4282,12 +4838,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4286: checking whether realloc must be declared" >&5
+echo "configure:4842: 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 4291 "configure"
+#line 4847 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4308,7 +4864,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:4312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -4329,12 +4885,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4333: checking whether free must be declared" >&5
+echo "configure:4889: 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 4338 "configure"
+#line 4894 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4355,7 +4911,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4376,12 +4932,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4380: checking whether getenv must be declared" >&5
+echo "configure:4936: 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 4385 "configure"
+#line 4941 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4402,7 +4958,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:4406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -4429,14 +4985,17 @@ COREFLAG=
TRAD_HEADER=
if test "${target}" = "${host}"; then
case "${host}" in
+ alpha*-*-freebsd*)
+ COREFILE=''
+ ;;
alpha*-*-linux-gnu*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/alphalinux.h"'
;;
- alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
- alpha*-*-openbsd*) COREFILE=netbsd-core.lo ;;
- alpha*-*-freebsd*) ;;
+ alpha*-*-netbsd* | alpha*-*-openbsd*)
+ COREFILE=netbsd-core.lo ;;
alpha*-*-*) COREFILE=osf-core.lo ;;
+ arm-*-freebsd*) COREFILE='' ;;
arm-*-riscix) COREFILE=trad-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
@@ -4457,10 +5016,14 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/symmetry.h"'
;;
- i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
+ i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
;;
+ i[3456]86-*-freebsd*)
+ COREFILE=''
+ TRAD_HEADER='"hosts/i386bsd.h"'
+ ;;
i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -4562,13 +5125,18 @@ if test "${target}" = "${host}"; then
COREFILE=netbsd-core.lo
;;
rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
+ rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
+ COREFILE=rs6000-core.lo
+ COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
+ ;;
rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
rs6000-*-*) COREFILE=rs6000-core.lo ;;
- powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
powerpc-*-beos*) ;;
+ powerpc-*-freebsd*) COREFILE='' ;;
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
sparc-*-netbsd* | sparc-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -4615,17 +5183,17 @@ if test "${target}" = "${host}"; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4613: checking for $ac_hdr" >&5
+echo "configure:5181: 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 4618 "configure"
+#line 5186 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5191: \"$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*
@@ -4653,19 +5221,21 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4651: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5219: 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 4656 "configure"
+#line 5224 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:4663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
@@ -4686,20 +5256,58 @@ EOF
fi
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
+ echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:5255: checking for prstatus32_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5260 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+prstatus32_t avar
+; return 0; }
+EOF
+if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prstatus32_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prstatus32_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRSTATUS32_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
+
echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4685: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5291: checking for prstatus_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
+#line 5296 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
prstatus_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:4697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
@@ -4720,20 +5328,58 @@ EOF
fi
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
+ echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:5327: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5332 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+prstatus32_t avar; void* aref = (void*) &avar.pr_who
+; return 0; }
+EOF
+if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRSTATUS32_T_PR_WHO 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
+
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4719: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5363: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4724 "configure"
+#line 5368 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:4731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -4754,20 +5400,94 @@ EOF
fi
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
+ echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:5399: checking for pxstatus_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5404 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+pxstatus_t avar
+; return 0; }
+EOF
+if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pxstatus_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pxstatus_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PXSTATUS_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
+
+ echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:5435: checking for pstatus32_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5440 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+pstatus32_t avar
+; return 0; }
+EOF
+if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pstatus32_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pstatus32_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PSTATUS32_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
+
echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4753: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5471: checking for prpsinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4758 "configure"
+#line 5476 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
prpsinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:4765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
@@ -4788,20 +5508,58 @@ EOF
fi
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
+ echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:5507: checking for prpsinfo32_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5512 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+prpsinfo32_t avar
+; return 0; }
+EOF
+if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRPSINFO32_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
+
echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4787: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5543: checking for psinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4792 "configure"
+#line 5548 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
psinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
@@ -4822,20 +5580,58 @@ EOF
fi
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
+ echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:5579: checking for psinfo32_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5584 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+psinfo32_t avar
+; return 0; }
+EOF
+if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_psinfo32_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_psinfo32_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PSINFO32_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
+
echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4821: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5615: checking for lwpstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4826 "configure"
+#line 5620 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
lwpstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:4833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
@@ -4856,20 +5652,58 @@ EOF
fi
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
+ echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:5651: checking for lwpxstatus_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5656 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+lwpxstatus_t avar
+; return 0; }
+EOF
+if { (eval echo configure:5665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LWPXSTATUS_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
+
echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4855: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:5687: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4860 "configure"
+#line 5692 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
; return 0; }
EOF
-if { (eval echo configure:4867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
@@ -4891,19 +5725,21 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4889: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:5723: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4894 "configure"
+#line 5728 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
; return 0; }
EOF
-if { (eval echo configure:4901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
@@ -4925,19 +5761,21 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4923: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:5759: checking for win32_pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4928 "configure"
+#line 5764 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
int main() {
win32_pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:4935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
@@ -4962,10 +5800,12 @@ EOF
fi
-cat >> confdefs.h <<EOF
+if test -n "$TRAD_HEADER"; then
+ cat >> confdefs.h <<EOF
#define TRAD_HEADER $TRAD_HEADER
EOF
+fi
# Horrible hacks to build DLLs on Windows.
WIN32LDFLAGS=
@@ -5049,7 +5889,7 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo"
+elf="elf.lo elflink.lo dwarf1.lo"
for vec in $selvecs
do
@@ -5077,8 +5917,19 @@ do
apollocoff_vec) tb="$tb coff-apollo.lo" ;;
b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
+ bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
+ bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"
+ target64=true ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
target64=true ;;
+ bfd_elf64_hppa_vec | bfd_elf64_hppa_linux_vec)
+ tb="$tb elf64-hppa.lo elf64.lo $elf"
+ target64=true ;;
+ bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
+ target64=true ;;
+ bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
+ target64=true ;;
+ bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
@@ -5090,19 +5941,27 @@ do
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
target64=true ;;
+ bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
+ bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
- bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec)
+ tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"
+ target64=true ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
+ bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
target64=true ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
+ bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
+ bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;;
bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
@@ -5115,7 +5974,11 @@ do
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
+ bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
target64=true ;;
@@ -5123,8 +5986,13 @@ do
target64=true ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
target64=true ;;
+ bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
+ target64=true ;;
+ bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
+ target64=true ;;
cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
+ cris_aout_vec) tb="$tb aout-cris.lo" ;;
demo_64_vec) tb="$tb demo64.lo aout64.lo"
target64=true ;;
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
@@ -5167,14 +6035,16 @@ do
m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
- mipslpe_vec) tb="$tb pe-mips.lo cofflink.lo" ;;
- mipslpei_vec) tb="$tb pei-mips.lo cofflink.lo" ;;
+ mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
+ mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
+ rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"
+ target64=true ;;
nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
target64=true ;;
@@ -5193,8 +6063,8 @@ do
shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
- shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo cofflink.lo" ;;
- shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo cofflink.lo" ;;
+ shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
+ shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
som_vec) tb="$tb som.lo" ;;
sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
@@ -5208,6 +6078,12 @@ do
tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
+ tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
versados_vec) tb="$tb versados.lo" ;;
vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"
@@ -5298,17 +6174,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5295: checking for $ac_hdr" >&5
+echo "configure:6171: 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 5300 "configure"
+#line 6176 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6181: \"$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*
@@ -5337,12 +6213,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5334: checking for $ac_func" >&5
+echo "configure:6210: 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 5339 "configure"
+#line 6215 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5365,7 +6241,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6238: \"$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
@@ -5390,7 +6266,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:5387: checking for working mmap" >&5
+echo "configure:6263: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5398,7 +6274,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 5395 "configure"
+#line 6271 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -5425,15 +6301,12 @@ else
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -5488,7 +6361,7 @@ main()
/*
* First, make a file with some known garbage in it.
*/
- data = (char*)malloc(pagesize);
+ data = malloc(pagesize);
if (!data)
exit(1);
for (i = 0; i < pagesize; ++i)
@@ -5509,7 +6382,7 @@ main()
fd = open("conftestmmap", O_RDWR);
if (fd < 0)
exit(1);
- data2 = (char*)malloc(2 * pagesize);
+ data2 = malloc(2 * pagesize);
if (!data2)
exit(1);
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -5527,7 +6400,7 @@ main()
*/
for (i = 0; i < pagesize; ++i)
*(data2 + i) = *(data2 + i) + 1;
- data3 = (char*)malloc(pagesize);
+ data3 = malloc(pagesize);
if (!data3)
exit(1);
if (read(fd, data3, pagesize) != pagesize)
@@ -5541,7 +6414,7 @@ main()
}
EOF
-if { (eval echo configure:5538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -5566,12 +6439,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5563: checking for $ac_func" >&5
+echo "configure:6436: 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 5568 "configure"
+#line 6441 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5594,7 +6467,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6464: \"$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
@@ -5789,11 +6662,14 @@ s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@LN_S@%$LN_S%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@STRIP@%$STRIP%g
s%@LIBTOOL@%$LIBTOOL%g
+s%@WARN_CFLAGS@%$WARN_CFLAGS%g
s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@USE_NLS@%$USE_NLS%g
@@ -6047,10 +6923,11 @@ cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
+sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gnu/usr.bin/binutils/bfd/configure.host b/gnu/usr.bin/binutils/bfd/configure.host
index e24cd600228..c72a4b30121 100644
--- a/gnu/usr.bin/binutils/bfd/configure.host
+++ b/gnu/usr.bin/binutils/bfd/configure.host
@@ -27,6 +27,8 @@ hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;;
hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;;
hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;;
+ia64-*-linux*) host64=true; HOST_64BIT_TYPE=long ;;
+
i[3456]86-sequent-bsd*) HDEFINES=-Dshared=genshared ;;
i[3456]86-sequent-sysv4*) ;;
i[3456]86-sequent-sysv*) HDEFINES=-Dshared=genshared ;;
@@ -46,6 +48,10 @@ mips*-*-riscos*) HDEFINES="-G 4" ;;
m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
+*-*-aix*) HOST_64BIT_TYPE="long long"
+ HOST_U_64BIT_TYPE="unsigned long long"
+ ;;
+
*-*-solaris*) HOST_64BIT_TYPE="long long"
HOST_U_64BIT_TYPE="unsigned long long"
;;
diff --git a/gnu/usr.bin/binutils/bfd/configure.in b/gnu/usr.bin/binutils/bfd/configure.in
index e49a835f3b7..b30aef79411 100644
--- a/gnu/usr.bin/binutils/bfd/configure.in
+++ b/gnu/usr.bin/binutils/bfd/configure.in
@@ -7,7 +7,7 @@ AC_INIT(libbfd.c)
AC_CANONICAL_SYSTEM
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.10.1)
+AM_INIT_AUTOMAKE(bfd, 2.11.2)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
@@ -50,6 +50,27 @@ AC_ARG_WITH(mmap,
*) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
esac],[want_mmap=false])dnl
+build_warnings="-W -Wall"
+AC_ARG_ENABLE(build-warnings,
+[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi])dnl
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+AC_SUBST(WARN_CFLAGS)
+
AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
@@ -114,14 +135,17 @@ COREFLAG=
TRAD_HEADER=
if test "${target}" = "${host}"; then
case "${host}" in
+ alpha*-*-freebsd*)
+ COREFILE=''
+ ;;
alpha*-*-linux-gnu*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/alphalinux.h"'
;;
alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
alpha*-*-openbsd*) COREFILE=netbsd-core.lo ;;
- alpha*-*-freebsd*) ;;
alpha*-*-*) COREFILE=osf-core.lo ;;
+ arm-*-freebsd*) COREFILE='' ;;
arm-*-riscix) COREFILE=trad-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
@@ -147,12 +171,18 @@ changequote([,])dnl
TRAD_HEADER='"hosts/symmetry.h"'
;;
changequote(,)dnl
- i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
+ i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*)
changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
;;
changequote(,)dnl
+ i[3456]86-*-freebsd*)
+changequote([,])dnl
+ COREFILE=''
+ TRAD_HEADER='"hosts/i386bsd.h"'
+ ;;
+changequote(,)dnl
i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
changequote([,])dnl
COREFILE=netbsd-core.lo
@@ -267,13 +297,20 @@ changequote([,])dnl
COREFILE=netbsd-core.lo
;;
rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
+changequote(,)dnl
+ rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
+changequote([,])dnl
+ COREFILE=rs6000-core.lo
+ COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
+ ;;
rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
rs6000-*-*) COREFILE=rs6000-core.lo ;;
- powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
powerpc-*-beos*) ;;
+ powerpc-*-freebsd*) COREFILE='' ;;
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
sparc-*-netbsd* | sparc-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -314,11 +351,18 @@ changequote([,])dnl
AC_CHECK_HEADERS(sys/procfs.h)
if test "$ac_cv_header_sys_procfs_h" = yes; then
BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
+ BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
@@ -326,8 +370,10 @@ changequote([,])dnl
fi
AC_SUBST(COREFILE)
AC_SUBST(COREFLAG)
-AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
- [Name of host specific header file to include in trad-core.c.])
+if test -n "$TRAD_HEADER"; then
+ AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
+ [Name of host specific header file to include in trad-core.c.])
+fi
# Horrible hacks to build DLLs on Windows.
WIN32LDFLAGS=
@@ -411,7 +457,7 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo"
+elf="elf.lo elflink.lo dwarf1.lo"
for vec in $selvecs
do
@@ -439,8 +485,19 @@ do
apollocoff_vec) tb="$tb coff-apollo.lo" ;;
b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
+ bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
+ bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"
+ target64=true ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
target64=true ;;
+ bfd_elf64_hppa_vec | bfd_elf64_hppa_linux_vec)
+ tb="$tb elf64-hppa.lo elf64.lo $elf"
+ target64=true ;;
+ bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
+ target64=true ;;
+ bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
+ target64=true ;;
+ bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
@@ -452,19 +509,27 @@ do
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
target64=true ;;
+ bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
+ bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
- bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec)
+ tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"
+ target64=true ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
+ bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
target64=true ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
+ bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
+ bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;;
bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
@@ -477,7 +542,11 @@ do
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
+ bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
target64=true ;;
@@ -485,8 +554,13 @@ do
target64=true ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
target64=true ;;
+ bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
+ target64=true ;;
+ bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
+ target64=true ;;
cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
+ cris_aout_vec) tb="$tb aout-cris.lo" ;;
demo_64_vec) tb="$tb demo64.lo aout64.lo"
target64=true ;;
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
@@ -529,14 +603,16 @@ do
m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
- mipslpe_vec) tb="$tb pe-mips.lo cofflink.lo" ;;
- mipslpei_vec) tb="$tb pei-mips.lo cofflink.lo" ;;
+ mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
+ mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
+ rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"
+ target64=true ;;
nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
target64=true ;;
@@ -555,8 +631,8 @@ do
shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
- shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo cofflink.lo" ;;
- shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo cofflink.lo" ;;
+ shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
+ shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
som_vec) tb="$tb som.lo" ;;
sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
@@ -570,6 +646,12 @@ do
tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
+ tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
versados_vec) tb="$tb versados.lo" ;;
vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"
@@ -664,4 +746,5 @@ esac
rm -f doc/config.status
AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
-[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
+[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile])
+
diff --git a/gnu/usr.bin/binutils/bfd/cpu-alpha.c b/gnu/usr.bin/binutils/bfd/cpu-alpha.c
index b89900be3b7..93fc69ce617 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-alpha.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-alpha.c
@@ -1,5 +1,5 @@
/* BFD support for the Alpha architecture.
- Copyright 1992 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1998, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NN(index) (&arch_info_struct[index])
/* These exist only so that we can resonably disassemble PALcode. */
-static const bfd_arch_info_type arch_info_struct[] =
+static const bfd_arch_info_type arch_info_struct[] =
{
N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", false, NN(1)),
N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", false, NN(2)),
diff --git a/gnu/usr.bin/binutils/bfd/cpu-arm.c b/gnu/usr.bin/binutils/bfd/cpu-arm.c
index bda9c4489a6..8cd64e918db 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-arm.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-arm.c
@@ -1,5 +1,5 @@
/* BFD support for the ARM processor
- Copyright 1994, 95, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1997, 1999, 2000 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
This file is part of BFD, the Binary File Descriptor library.
@@ -47,7 +47,7 @@ compatible (a,b)
it can be polymorphed into the other */
if (a->the_default)
return b;
-
+
if (b->the_default)
return a;
@@ -93,9 +93,10 @@ processors[] =
{ bfd_mach_arm_4, "strongarm"},
{ bfd_mach_arm_4, "strongarm110" },
{ bfd_mach_arm_4, "strongarm1100" },
+ { bfd_mach_arm_XScale, "xscale" }
};
-static boolean
+static boolean
scan (info, string)
const struct bfd_arch_info * info;
const char * string;
@@ -119,16 +120,15 @@ scan (info, string)
/* Finally check for the default architecture */
if (strcasecmp (string, "arm") == 0)
return info->the_default;
-
+
return false;
}
-
#define N(number, print, default, next) \
{ 32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, scan, next }
static const bfd_arch_info_type arch_info_struct[] =
-{
+{
N( bfd_mach_arm_2, "armv2", false, & arch_info_struct[1] ),
N( bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2] ),
N( bfd_mach_arm_3, "armv3", false, & arch_info_struct[3] ),
@@ -136,7 +136,9 @@ static const bfd_arch_info_type arch_info_struct[] =
N( bfd_mach_arm_4, "armv4", false, & arch_info_struct[5] ),
N( bfd_mach_arm_4T, "armv4t", false, & arch_info_struct[6] ),
N( bfd_mach_arm_5, "armv5", false, & arch_info_struct[7] ),
- N( bfd_mach_arm_5T, "armv5t", false, NULL )
+ N( bfd_mach_arm_5T, "armv5t", false, & arch_info_struct[8] ),
+ N( bfd_mach_arm_5TE, "armv5te", false, & arch_info_struct[9] ),
+ N( bfd_mach_arm_XScale, "xscale", false, NULL )
};
const bfd_arch_info_type bfd_arm_arch =
diff --git a/gnu/usr.bin/binutils/bfd/cpu-h8300.c b/gnu/usr.bin/binutils/bfd/cpu-h8300.c
index 567b7df9de2..b25842ed33e 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-h8300.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-h8300.c
@@ -1,5 +1,6 @@
/* BFD library support routines for the Hitachi H8/300 architecture.
- Copyright (C) 1990, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000
+ Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -65,15 +66,14 @@ h8300_scan (info, string)
}
}
-
-/* This routine is provided two arch_infos and works out the
- machine which would be compatible with both and returns a pointer
- to its info structure */
+/* This routine is provided two arch_infos and works out the machine
+ which would be compatible with both and returns a pointer to its
+ info structure. */
static const bfd_arch_info_type *
compatible (in, out)
- const bfd_arch_info_type * in;
- const bfd_arch_info_type * out;
+ const bfd_arch_info_type *in;
+ const bfd_arch_info_type *out;
{
/* It's really not a good idea to mix and match modes. */
if (in->mach != out->mach)
@@ -95,7 +95,9 @@ static const bfd_arch_info_type h8300_info_struct =
true, /* the default machine */
compatible,
h8300_scan,
-/* local_bfd_reloc_type_lookup, */
+#if 0
+ local_bfd_reloc_type_lookup,
+#endif
0,
};
@@ -112,7 +114,9 @@ static const bfd_arch_info_type h8300h_info_struct =
false, /* the default machine */
compatible,
h8300_scan,
-/* local_bfd_reloc_type_lookup, */
+#if 0
+ local_bfd_reloc_type_lookup,
+#endif
&h8300_info_struct,
};
@@ -129,6 +133,8 @@ const bfd_arch_info_type bfd_h8300_arch =
false, /* the default machine */
compatible,
h8300_scan,
-/* local_bfd_reloc_type_lookup, */
+#if 0
+ local_bfd_reloc_type_lookup,
+#endif
&h8300h_info_struct,
};
diff --git a/gnu/usr.bin/binutils/bfd/cpu-h8500.c b/gnu/usr.bin/binutils/bfd/cpu-h8500.c
index eae42e3abf2..7b526ef3389 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-h8500.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-h8500.c
@@ -1,5 +1,5 @@
/* BFD library support routines for the H8/500 architecture.
- Copyright (C) 1993, 1994, 1995, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 2000 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,11 +24,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if 0
-/*
+/*
Relocations for the Z8K
*/
-static bfd_reloc_status_type
+static bfd_reloc_status_type
howto16_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
@@ -40,18 +40,17 @@ howto16_callback (abfd, reloc_entry, symbol_in, data,
{
long relocation = 0;
bfd_vma addr = reloc_entry->address;
- long x = bfd_get_16(abfd, (bfd_byte *)data + addr);
+ long x = bfd_get_16 (abfd, (bfd_byte *)data + addr);
HOWTO_PREPARE(relocation, symbol_in);
x = (x + relocation + reloc_entry->addend);
- bfd_put_16(abfd, x, (bfd_byte *)data + addr);
+ bfd_put_16 (abfd, x, (bfd_byte *)data + addr);
return bfd_reloc_ok;
}
-
-static bfd_reloc_status_type
+static bfd_reloc_status_type
howto8_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
@@ -63,18 +62,17 @@ howto8_callback (abfd, reloc_entry, symbol_in, data,
{
long relocation = 0;
bfd_vma addr = reloc_entry->address;
- long x = bfd_get_8(abfd, (bfd_byte *)data + addr);
+ long x = bfd_get_8 (abfd, (bfd_byte *)data + addr);
HOWTO_PREPARE(relocation, symbol_in);
x = (x + relocation + reloc_entry->addend);
- bfd_put_8(abfd, x, (bfd_byte *)data + addr);
+ bfd_put_8 (abfd, x, (bfd_byte *)data + addr);
return bfd_reloc_ok;
}
-
-static bfd_reloc_status_type
+static bfd_reloc_status_type
howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
@@ -87,17 +85,17 @@ howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
long relocation = 0;
bfd_vma addr = reloc_entry->address;
- long x = bfd_get_8(abfd, (bfd_byte *)data + addr);
- abort();
+ long x = bfd_get_8 (abfd, (bfd_byte *)data + addr);
+ abort ();
HOWTO_PREPARE(relocation, symbol_in);
x = (x + relocation + reloc_entry->addend);
- bfd_put_8(abfd, x, (bfd_byte *)data + addr);
+ bfd_put_8 (abfd, x, (bfd_byte *)data + addr);
return bfd_reloc_ok;
}
-static bfd_reloc_status_type
+static bfd_reloc_status_type
howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
@@ -109,18 +107,16 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
{
long relocation = 0;
bfd_vma addr = reloc_entry->address;
- long x = bfd_get_8(abfd, (bfd_byte *)data + addr);
- abort();
+ long x = bfd_get_8 (abfd, (bfd_byte *)data + addr);
+ abort ();
HOWTO_PREPARE(relocation, symbol_in);
x = (x + relocation + reloc_entry->addend);
- bfd_put_8(abfd, x, (bfd_byte *)data + addr);
+ bfd_put_8 (abfd, x, (bfd_byte *)data + addr);
return bfd_reloc_ok;
}
-
-
static reloc_howto_type howto_16
= NEWHOWTO(howto16_callback,"abs16",1,false,false);
static reloc_howto_type howto_8
@@ -132,7 +128,6 @@ static reloc_howto_type howto_8_FFnn
static reloc_howto_type howto_8_pcrel
= NEWHOWTO(howto8_pcrel_callback,"pcrel8",0,false,true);
-
static reloc_howto_type *
local_bfd_reloc_type_lookup (arch, code)
const struct bfd_arch_info *arch;
@@ -154,7 +149,7 @@ local_bfd_reloc_type_lookup (arch, code)
int bfd_default_scan_num_mach();
-static boolean
+static boolean
scan_mach (info, string)
const struct bfd_arch_info *info ATTRIBUTE_UNUSED;
const char *string;
@@ -166,7 +161,6 @@ scan_mach (info, string)
return false;
}
-
#if 0 /* not used currently */
/* This routine is provided two arch_infos and returns whether
they'd be compatible */
diff --git a/gnu/usr.bin/binutils/bfd/cpu-hppa.c b/gnu/usr.bin/binutils/bfd/cpu-hppa.c
index 5c1774367d5..0c22b8c4436 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-hppa.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-hppa.c
@@ -1,5 +1,5 @@
/* BFD support for the HP Precision Architecture architecture.
- Copyright 1992 Free Software Foundation, Inc.
+ Copyright 1992, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -32,7 +32,7 @@ static const bfd_arch_info_type bfd_hppa10_arch =
"hppa1.0",
3,
true, /* Unless we use 1.1 specific features */
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
0,
};
@@ -49,7 +49,7 @@ static const bfd_arch_info_type bfd_hppa20_arch =
"hppa2.0",
3,
false, /* Unless we use 1.1 specific features */
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa10_arch,
};
@@ -66,7 +66,7 @@ static const bfd_arch_info_type bfd_hppa20w_arch =
"hppa2.0w",
3,
false, /* Unless we use 1.1 specific features */
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa20_arch,
};
@@ -82,7 +82,7 @@ const bfd_arch_info_type bfd_hppa_arch =
"hppa1.1",
3,
false, /* 1.1 specific features used */
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa20w_arch,
};
diff --git a/gnu/usr.bin/binutils/bfd/cpu-i386.c b/gnu/usr.bin/binutils/bfd/cpu-i386.c
index f5b9b181d18..860d91a34e7 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-i386.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-i386.c
@@ -1,5 +1,6 @@
/* BFD support for the Intel 386 architecture.
- Copyright 1992, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -32,10 +33,25 @@ const bfd_arch_info_type bfd_i386_arch_intel_syntax =
"i386:intel",
3,
true,
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
0,
};
+const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
+{
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_i386,
+ bfd_mach_x86_64_intel_syntax,
+ "x86_64:intel",
+ "x86_64:intel",
+ 3,
+ true,
+ bfd_default_compatible,
+ bfd_default_scan ,
+ &bfd_i386_arch_intel_syntax,
+};
static const bfd_arch_info_type i8086_arch =
{
32, /* 32 bits in a word */
@@ -47,9 +63,25 @@ static const bfd_arch_info_type i8086_arch =
"i8086",
3,
false,
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
- &bfd_i386_arch_intel_syntax,
+ &bfd_x86_64_arch_intel_syntax,
+};
+
+const bfd_arch_info_type bfd_x86_64_arch =
+{
+ 64, /* 32 bits in a word */
+ 64, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_i386,
+ bfd_mach_x86_64,
+ "x86_64",
+ "x86_64",
+ 3,
+ true,
+ bfd_default_compatible,
+ bfd_default_scan ,
+ &i8086_arch,
};
const bfd_arch_info_type bfd_i386_arch =
@@ -63,8 +95,7 @@ const bfd_arch_info_type bfd_i386_arch =
"i386",
3,
true,
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
- &i8086_arch,
+ &bfd_x86_64_arch
};
-
diff --git a/gnu/usr.bin/binutils/bfd/cpu-i960.c b/gnu/usr.bin/binutils/bfd/cpu-i960.c
index 7fb2c7ebc5c..2c8af297f4c 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-i960.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-i960.c
@@ -1,5 +1,6 @@
/* BFD library support routines for the i960 architecture.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000
+ Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,12 +19,10 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
-
/* This routine is provided a string, and tries to work out if it
could possibly refer to the i960 machine pointed at in the
info_struct pointer */
@@ -34,28 +33,44 @@ scan_960_mach (ap, string)
const char *string;
{
unsigned long machine;
+ int i;
+ int fail_because_not_80960 = false;
- /* Look for the string i960, or somesuch at the front of the string */
+ for (i = 0; i < strlen (string); i ++)
+ string[i] = tolower (string[i]);
- if (strncmp("i960",string,4) == 0) {
- string+=4;
- }
- else {
- /* no match, can be us */
- return false;
- }
- if (string[0] == 0) {
- /* i960 on it's own means core to us*/
- if (ap->mach == bfd_mach_i960_core) return true;
- return false;
- }
+ /* Look for the string i960 at the front of the string. */
+ if (strncmp ("i960", string, 4) == 0)
+ {
+ string += 4;
+
+ /* i960 on it's own means core to us. */
+ if (* string == 0)
+ return ap->mach == bfd_mach_i960_core;
+
+ /* "i960:*" is valid, anything else is not. */
+ if (* string != ':')
+ return false;
- if (string[0] != ':') {
+ string ++;
+ }
+ /* In some bfds the cpu-id is written as "80960KA", "80960KB",
+ "80960CA" or "80960MC". */
+ else if (strncmp ("80960", string, 5) == 0)
+ {
+ string += 5;
+
+ /* Sett his to true here. If a correct matching postfix
+ is detected below it will be reset to false. */
+ fail_because_not_80960 = true;
+ }
+ /* No match, can't be us. */
+ else
return false;
- }
- string++;
- if (string[0] == '\0')
+
+ if (* string == '\0')
return false;
+
if (string[0] == 'c' && string[1] == 'o' && string[2] == 'r' &&
string[3] == 'e' && string[4] == '\0')
machine = bfd_mach_i960_core;
@@ -63,20 +78,20 @@ scan_960_mach (ap, string)
machine = bfd_mach_i960_ka_sa;
else if (strcmp (string, "kb_sb") == 0)
machine = bfd_mach_i960_kb_sb;
- else if (string[1] == '\0' || string[2] != '\0') /* rest are 2-char */
+ else if (string[1] == '\0' || string[2] != '\0') /* rest are 2-char. */
return false;
else if (string[0] == 'k' && string[1] == 'b')
- machine = bfd_mach_i960_kb_sb;
+ { machine = bfd_mach_i960_kb_sb; fail_because_not_80960 = false; }
else if (string[0] == 's' && string[1] == 'b')
machine = bfd_mach_i960_kb_sb;
else if (string[0] == 'm' && string[1] == 'c')
- machine = bfd_mach_i960_mc;
+ { machine = bfd_mach_i960_mc; fail_because_not_80960 = false; }
else if (string[0] == 'x' && string[1] == 'a')
machine = bfd_mach_i960_xa;
else if (string[0] == 'c' && string[1] == 'a')
- machine = bfd_mach_i960_ca;
+ { machine = bfd_mach_i960_ca; fail_because_not_80960 = false; }
else if (string[0] == 'k' && string[1] == 'a')
- machine = bfd_mach_i960_ka_sa;
+ { machine = bfd_mach_i960_ka_sa; fail_because_not_80960 = false; }
else if (string[0] == 's' && string[1] == 'a')
machine = bfd_mach_i960_ka_sa;
else if (string[0] == 'j' && string[1] == 'x')
@@ -85,11 +100,15 @@ scan_960_mach (ap, string)
machine = bfd_mach_i960_hx;
else
return false;
- if (machine == ap->mach) return true;
- return false;
-}
+ if (fail_because_not_80960)
+ return false;
+
+ if (machine == ap->mach)
+ return true;
+ return false;
+}
/* This routine is provided two arch_infos and works out the i960
machine which would be compatible with both and returns a pointer
@@ -102,17 +121,17 @@ compatible (a,b)
{
/* The i960 has distinct subspecies which may not interbreed:
- CORE CA
+ CORE CA
CORE KA KB MC XA
CORE HX JX
Any architecture on the same line is compatible, the one on
- the right is the least restrictive.
-
+ the right is the least restrictive.
+
We represent this information in an array, each machine to a side */
#define ERROR 0
-#define CORE bfd_mach_i960_core /*1*/
-#define KA bfd_mach_i960_ka_sa /*2*/
+#define CORE bfd_mach_i960_core /*1*/
+#define KA bfd_mach_i960_ka_sa /*2*/
#define KB bfd_mach_i960_kb_sb /*3*/
#define MC bfd_mach_i960_mc /*4*/
#define XA bfd_mach_i960_xa /*5*/
@@ -121,7 +140,7 @@ compatible (a,b)
#define HX bfd_mach_i960_hx /*8*/
#define MAX_ARCH ((int)HX)
- static CONST unsigned long matrix[MAX_ARCH+1][MAX_ARCH+1] =
+ static CONST unsigned long matrix[MAX_ARCH+1][MAX_ARCH+1] =
{
{ ERROR, CORE, KA, KB, MC, XA, CA, JX, HX },
{ CORE, CORE, KA, KB, MC, XA, CA, JX, HX },
@@ -134,25 +153,22 @@ compatible (a,b)
{ HX, HX, ERROR, ERROR, ERROR, ERROR, ERROR, HX, HX },
};
-
- if (a->arch != b->arch || matrix[a->mach][b->mach] == ERROR)
+ if (a->arch != b->arch || matrix[a->mach][b->mach] == ERROR)
{
return NULL;
}
- else
+ else
{
return (a->mach == matrix[a->mach][b->mach]) ? a : b;
}
}
-
-
int bfd_default_scan_num_mach();
#define N(a,b,d,n) \
{ 32, 32, 8,bfd_arch_i960,a,"i960",b,3,d,compatible,scan_960_mach,n,}
-static const bfd_arch_info_type arch_info_struct[] =
-{
+static const bfd_arch_info_type arch_info_struct[] =
+{
N(bfd_mach_i960_ka_sa,"i960:ka_sa",false, &arch_info_struct[1]),
N(bfd_mach_i960_kb_sb,"i960:kb_sb",false, &arch_info_struct[2]),
N(bfd_mach_i960_mc, "i960:mc", false, &arch_info_struct[3]),
diff --git a/gnu/usr.bin/binutils/bfd/cpu-m68k.c b/gnu/usr.bin/binutils/bfd/cpu-m68k.c
index 184182d695e..c6820de15e5 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-m68k.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-m68k.c
@@ -1,5 +1,5 @@
/* BFD library support routines for architectures.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 97, 1998
+ Copyright 1990, 1991, 1992, 1993, 1994, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
@@ -27,16 +27,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
{ 32, 32, 8, bfd_arch_m68k, name, "m68k",print,2,d,bfd_default_compatible,bfd_default_scan, next, }
static const bfd_arch_info_type arch_info_struct[] =
-{
- N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]),
- N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]),
- N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]),
- N(bfd_mach_m68020, "m68k:68020", false, &arch_info_struct[4]),
- N(bfd_mach_m68030, "m68k:68030", false, &arch_info_struct[5]),
- N(bfd_mach_m68040, "m68k:68040", false, &arch_info_struct[6]),
- N(bfd_mach_cpu32, "m68k:cpu32", false, &arch_info_struct[7]),
- N(bfd_mach_m68060, "m68k:68060", false, 0),
-};
+ {
+ N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]),
+ N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]),
+ N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]),
+ N(bfd_mach_m68020, "m68k:68020", false, &arch_info_struct[4]),
+ N(bfd_mach_m68030, "m68k:68030", false, &arch_info_struct[5]),
+ N(bfd_mach_m68040, "m68k:68040", false, &arch_info_struct[6]),
+ N(bfd_mach_cpu32, "m68k:cpu32", false, &arch_info_struct[7]),
+ N(bfd_mach_mcf5200,"m68k:5200", false, &arch_info_struct[8]),
+ N(bfd_mach_mcf5206e,"m68k:5206e",false, &arch_info_struct[9]),
+ N(bfd_mach_mcf5307, "m68k:5307", false, &arch_info_struct[10]),
+ N(bfd_mach_mcf5407, "m68k:5407", false, &arch_info_struct[11]),
+ N(bfd_mach_m68060, "m68k:68060", false, 0),
+ };
const bfd_arch_info_type bfd_m68k_arch =
N(0, "m68k", true, &arch_info_struct[0]);
diff --git a/gnu/usr.bin/binutils/bfd/cpu-mips.c b/gnu/usr.bin/binutils/bfd/cpu-mips.c
index a933b8cd10b..ee6574b242d 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-mips.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-mips.c
@@ -1,5 +1,6 @@
/* bfd back-end for mips support
- Copyright (C) 1990, 91-97, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -38,46 +39,56 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
NEXT, \
}
-enum {
-I_mips3000,
-I_mips3900,
-I_mips4000,
-I_mips4010,
-I_mips4100,
-I_mips4111,
-I_mips4300,
-I_mips4400,
-I_mips4600,
-I_mips4650,
-I_mips5000,
-I_mips6000,
-I_mips8000,
-I_mips10000,
-I_mips16
+enum
+{
+ I_mips3000,
+ I_mips3900,
+ I_mips4000,
+ I_mips4010,
+ I_mips4100,
+ I_mips4111,
+ I_mips4300,
+ I_mips4400,
+ I_mips4600,
+ I_mips4650,
+ I_mips5000,
+ I_mips6000,
+ I_mips8000,
+ I_mips10000,
+ I_mips12000,
+ I_mips16,
+ I_mips32,
+ I_mips32_4k,
+ I_mips5,
+ I_mips64,
+ I_sb1,
};
+#define NN(index) (&arch_info_struct[(index) + 1])
-#define NN(index) (&arch_info_struct[(index)+1])
-
-static const bfd_arch_info_type arch_info_struct[] =
+static const bfd_arch_info_type arch_info_struct[] =
{
- N (32, 32, bfd_mach_mips3000, "mips:3000", false, NN(I_mips3000)),
- N (32, 32, bfd_mach_mips3900, "mips:3900", false, NN(I_mips3900)),
- N (64, 64, bfd_mach_mips4000, "mips:4000", false, NN(I_mips4000)),
- N (64, 64, bfd_mach_mips4010, "mips:4010", false, NN(I_mips4010)),
- N (64, 64, bfd_mach_mips4100, "mips:4100", false, NN(I_mips4100)),
- N (64, 64, bfd_mach_mips4111, "mips:4111", false, NN(I_mips4111)),
- N (64, 64, bfd_mach_mips4300, "mips:4300", false, NN(I_mips4300)),
- N (64, 64, bfd_mach_mips4400, "mips:4400", false, NN(I_mips4400)),
- N (64, 64, bfd_mach_mips4600, "mips:4600", false, NN(I_mips4600)),
- N (64, 64, bfd_mach_mips4650, "mips:4650", false, NN(I_mips4650)),
- N (64, 64, bfd_mach_mips5000, "mips:5000", false, NN(I_mips5000)),
- N (32, 32, bfd_mach_mips6000, "mips:6000", false, NN(I_mips6000)),
- N (64, 64, bfd_mach_mips8000, "mips:8000", false, NN(I_mips8000)),
- N (64, 64, bfd_mach_mips10000, "mips:10000", false, NN(I_mips10000)),
-
-
- N (64, 64, bfd_mach_mips16, "mips:16", false, 0),
+ N (32, 32, bfd_mach_mips3000, "mips:3000", false, NN(I_mips3000)),
+ N (32, 32, bfd_mach_mips3900, "mips:3900", false, NN(I_mips3900)),
+ N (64, 64, bfd_mach_mips4000, "mips:4000", false, NN(I_mips4000)),
+ N (64, 64, bfd_mach_mips4010, "mips:4010", false, NN(I_mips4010)),
+ N (64, 64, bfd_mach_mips4100, "mips:4100", false, NN(I_mips4100)),
+ N (64, 64, bfd_mach_mips4111, "mips:4111", false, NN(I_mips4111)),
+ N (64, 64, bfd_mach_mips4300, "mips:4300", false, NN(I_mips4300)),
+ N (64, 64, bfd_mach_mips4400, "mips:4400", false, NN(I_mips4400)),
+ N (64, 64, bfd_mach_mips4600, "mips:4600", false, NN(I_mips4600)),
+ N (64, 64, bfd_mach_mips4650, "mips:4650", false, NN(I_mips4650)),
+ N (64, 64, bfd_mach_mips5000, "mips:5000", false, NN(I_mips5000)),
+ N (32, 32, bfd_mach_mips6000, "mips:6000", false, NN(I_mips6000)),
+ N (64, 64, bfd_mach_mips8000, "mips:8000", false, NN(I_mips8000)),
+ N (64, 64, bfd_mach_mips10000,"mips:10000", false, NN(I_mips10000)),
+ N (64, 64, bfd_mach_mips12000,"mips:12000", false, NN(I_mips12000)),
+ N (64, 64, bfd_mach_mips16, "mips:16", false, NN(I_mips16)),
+ N (32, 32, bfd_mach_mips32, "mips:mips32", false, NN(I_mips32)),
+ N (32, 32, bfd_mach_mips32_4k,"mips:mips32-4k", false, NN(I_mips32_4k)),
+ N (64, 64, bfd_mach_mips5, "mips:mips5", false, NN(I_mips5)),
+ N (64, 64, bfd_mach_mips64, "mips:mips64", false, NN(I_mips64)),
+ N (64, 64, bfd_mach_mips_sb1, "mips:sb1", false, 0),
};
/* The default architecture is mips:3000, but with a machine number of
diff --git a/gnu/usr.bin/binutils/bfd/cpu-ns32k.c b/gnu/usr.bin/binutils/bfd/cpu-ns32k.c
index f74e25bbcb7..c01599e080a 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-ns32k.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-ns32k.c
@@ -1,5 +1,6 @@
/* BFD support for the ns32k architecture.
- Copyright (C) 1990, 91, 94, 95, 96, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1994, 1995, 1998, 2000
+ Free Software Foundation, Inc.
Almost totally rewritten by Ian Dall from initial work
by Andrew Cagney.
@@ -28,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
{ 32, 32, 8, bfd_arch_ns32k, machine, "ns32k",printable,3,d,bfd_default_compatible,bfd_default_scan, next, }
static const bfd_arch_info_type arch_info_struct[] =
-{
+{
N(32532,"ns32k:32532",true, 0), /* the word ns32k will match this too */
};
@@ -174,8 +175,8 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
asection *input_section;
bfd *output_bfd;
char **error_message ATTRIBUTE_UNUSED;
- long (*get_data)();
- int (*put_data)();
+ long (*get_data) ();
+ int (*put_data) ();
{
int overflow = 0;
bfd_vma relocation;
@@ -200,7 +201,6 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
&& output_bfd == (bfd *) NULL)
flag = bfd_reloc_undefined;
-
/* Is the address of the relocation really within the section? */
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
@@ -214,7 +214,6 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
else
relocation = symbol->value;
-
reloc_target_output_section = symbol->section->output_section;
/* Convert input-section-relative symbol value to absolute. */
@@ -290,8 +289,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
reloc_entry->address += input_section->output_offset;
/* WTF?? */
- if (abfd->xvec->flavour == bfd_target_coff_flavour
- && strcmp (abfd->xvec->name, "aixcoff-rs6000") != 0)
+ if (abfd->xvec->flavour == bfd_target_coff_flavour)
{
#if 1
/* For m68k-coff, the addend was being subtracted twice during
@@ -599,8 +597,8 @@ _bfd_do_ns32k_reloc_contents ( howto, input_bfd, relocation, location,
bfd *input_bfd ATTRIBUTE_UNUSED;
bfd_vma relocation;
bfd_byte *location;
- long (*get_data)();
- int (*put_data)();
+ long (*get_data) ();
+ int (*put_data) ();
{
int size;
bfd_vma x;
diff --git a/gnu/usr.bin/binutils/bfd/cpu-powerpc.c b/gnu/usr.bin/binutils/bfd/cpu-powerpc.c
index 11f0f80af5a..235ec296743 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-powerpc.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-powerpc.c
@@ -1,5 +1,5 @@
/* BFD PowerPC CPU definition
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 2000 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -54,12 +54,12 @@ static const bfd_arch_info_type arch_info_struct[] =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_powerpc,
- 603, /* for the mpc603 */
+ bfd_mach_ppc_603,
"powerpc",
"powerpc:603",
3,
false, /* not the default */
- powerpc_compatible,
+ powerpc_compatible,
bfd_default_scan,
&arch_info_struct[1]
},
@@ -68,12 +68,12 @@ static const bfd_arch_info_type arch_info_struct[] =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_powerpc,
- 604, /* for the mpc604 */
+ bfd_mach_ppc_ec603e,
"powerpc",
- "powerpc:604",
+ "powerpc:EC603e",
3,
false, /* not the default */
- powerpc_compatible,
+ powerpc_compatible,
bfd_default_scan,
&arch_info_struct[2]
},
@@ -82,12 +82,12 @@ static const bfd_arch_info_type arch_info_struct[] =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_powerpc,
- 403, /* for the 403 */
+ bfd_mach_ppc_604,
"powerpc",
- "powerpc:403",
+ "powerpc:604",
3,
false, /* not the default */
- powerpc_compatible,
+ powerpc_compatible,
bfd_default_scan,
&arch_info_struct[3]
},
@@ -96,12 +96,124 @@ static const bfd_arch_info_type arch_info_struct[] =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_powerpc,
- 601, /* for the mpc601 */
+ bfd_mach_ppc_403,
+ "powerpc",
+ "powerpc:403",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[4]
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_601,
"powerpc",
"powerpc:601",
3,
false, /* not the default */
- powerpc_compatible,
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[5]
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_620,
+ "powerpc",
+ "powerpc:620",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[6]
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_630,
+ "powerpc",
+ "powerpc:630",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[7]
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_a35,
+ "powerpc",
+ "powerpc:a35",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[8]
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_rs64ii,
+ "powerpc",
+ "powerpc:rs64ii",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[9]
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_rs64iii,
+ "powerpc",
+ "powerpc:rs64iii",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[10]
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_7400,
+ "powerpc",
+ "powerpc:7400",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[11]
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_860,
+ "powerpc",
+ "powerpc:MPC8XX",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
bfd_default_scan,
0
}
@@ -113,12 +225,12 @@ const bfd_arch_info_type bfd_powerpc_arch =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_powerpc,
- 0, /* for the POWER/PowerPC common architecture */
+ bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
"powerpc",
"powerpc:common",
3,
true, /* the default */
- powerpc_compatible,
+ powerpc_compatible,
bfd_default_scan,
&arch_info_struct[0]
};
diff --git a/gnu/usr.bin/binutils/bfd/cpu-sh.c b/gnu/usr.bin/binutils/bfd/cpu-sh.c
index cb54e7d0c44..134b4e43516 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-sh.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-sh.c
@@ -1,5 +1,5 @@
/* BFD library support routines for the Hitachi-SH architecture.
- Copyright (C) 1993, 97, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1997, 1998, 2000 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
-
-static boolean
+static boolean
scan_mach (info, string)
const struct bfd_arch_info *info;
const char *string;
@@ -33,7 +32,6 @@ scan_mach (info, string)
return false;
}
-
#if 0
/* This routine is provided two arch_infos and returns whether
they'd be compatible */
@@ -49,15 +47,15 @@ compatible (a,b)
}
#endif
-#define SH_NEXT &arch_info_struct[0]
-#define SH2_NEXT &arch_info_struct[1]
-#define SH_DSP_NEXT &arch_info_struct[2]
-#define SH3_NEXT &arch_info_struct[3]
+#define SH_NEXT &arch_info_struct[0]
+#define SH2_NEXT &arch_info_struct[1]
+#define SH_DSP_NEXT &arch_info_struct[2]
+#define SH3_NEXT &arch_info_struct[3]
#define SH3_DSP_NEXT &arch_info_struct[4]
-#define SH3E_NEXT &arch_info_struct[5]
-#define SH4_NEXT NULL
+#define SH3E_NEXT &arch_info_struct[5]
+#define SH4_NEXT NULL
-static const bfd_arch_info_type arch_info_struct[] =
+static const bfd_arch_info_type arch_info_struct[] =
{
{
32, /* 32 bits in a word */
diff --git a/gnu/usr.bin/binutils/bfd/cpu-sparc.c b/gnu/usr.bin/binutils/bfd/cpu-sparc.c
index 234bd92bd29..dbc83bad534 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-sparc.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-sparc.c
@@ -1,5 +1,5 @@
/* BFD support for the SPARC architecture.
- Copyright (C) 1992, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1992, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -49,7 +49,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:sparclet",
3,
false,
- sparc_compatible,
+ sparc_compatible,
bfd_default_scan,
&arch_info_struct[1],
},
@@ -63,7 +63,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:sparclite",
3,
false,
- sparc_compatible,
+ sparc_compatible,
bfd_default_scan,
&arch_info_struct[2],
},
@@ -77,7 +77,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v8plus",
3,
false,
- sparc_compatible,
+ sparc_compatible,
bfd_default_scan,
&arch_info_struct[3],
},
@@ -91,7 +91,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v8plusa",
3,
false,
- sparc_compatible,
+ sparc_compatible,
bfd_default_scan,
&arch_info_struct[4],
},
@@ -105,7 +105,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:sparclite_le",
3,
false,
- sparc_compatible,
+ sparc_compatible,
bfd_default_scan,
&arch_info_struct[5],
},
@@ -119,7 +119,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v9",
3,
false,
- sparc_compatible,
+ sparc_compatible,
bfd_default_scan,
&arch_info_struct[6],
},
@@ -133,7 +133,35 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v9a",
3,
false,
- sparc_compatible,
+ sparc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[7],
+ },
+ {
+ 32, /* bits in a word */
+ 32, /* bits in an address */
+ 8, /* bits in a byte */
+ bfd_arch_sparc,
+ bfd_mach_sparc_v8plusb,
+ "sparc",
+ "sparc:v8plusb",
+ 3,
+ false,
+ sparc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[8],
+ },
+ {
+ 64, /* bits in a word */
+ 64, /* bits in an address */
+ 8, /* bits in a byte */
+ bfd_arch_sparc,
+ bfd_mach_sparc_v9b,
+ "sparc",
+ "sparc:v9b",
+ 3,
+ false,
+ sparc_compatible,
bfd_default_scan,
0,
}
@@ -150,7 +178,7 @@ const bfd_arch_info_type bfd_sparc_arch =
"sparc",
3,
true, /* the default */
- sparc_compatible,
+ sparc_compatible,
bfd_default_scan,
&arch_info_struct[0],
};
diff --git a/gnu/usr.bin/binutils/bfd/cpu-w65.c b/gnu/usr.bin/binutils/bfd/cpu-w65.c
index 13f68b3138d..b549563330f 100644
--- a/gnu/usr.bin/binutils/bfd/cpu-w65.c
+++ b/gnu/usr.bin/binutils/bfd/cpu-w65.c
@@ -1,5 +1,5 @@
/* BFD library support routines for the WDC 65816 architecture.
- Copyright (C) 1995, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1999, 2000 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,10 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
-
int bfd_default_scan_num_mach();
-static boolean
+static boolean
scan_mach (info, string)
const struct bfd_arch_info *info ATTRIBUTE_UNUSED;
const char *string;
@@ -35,8 +34,6 @@ scan_mach (info, string)
return false;
}
-
-
const bfd_arch_info_type bfd_w65_arch =
{
16, /* 16 bits in a word */
diff --git a/gnu/usr.bin/binutils/bfd/dep-in.sed b/gnu/usr.bin/binutils/bfd/dep-in.sed
index 9da181ab8fc..c3781f23bcb 100644
--- a/gnu/usr.bin/binutils/bfd/dep-in.sed
+++ b/gnu/usr.bin/binutils/bfd/dep-in.sed
@@ -6,6 +6,7 @@ t loop
s!\.o:!.lo:!
s! @BFD_H@!!g
s!@INCDIR@!$(INCDIR)!g
+s!@SRCDIR@/../opcodes!$(srcdir)/../opcodes!g
s!@SRCDIR@/!!g
s! hosts/[^ ]*\.h! !g
s/ sysdep.h//g
diff --git a/gnu/usr.bin/binutils/bfd/doc/ChangeLog b/gnu/usr.bin/binutils/bfd/doc/ChangeLog
index def932ccb2e..363ea91f1f8 100644
--- a/gnu/usr.bin/binutils/bfd/doc/ChangeLog
+++ b/gnu/usr.bin/binutils/bfd/doc/ChangeLog
@@ -1,3 +1,35 @@
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ * bfdint.texi (BFD target vector miscellaneous): --oformat, not
+ -oformat.
+
+2001-01-25 Kazu Hirata <kazu@hxi.com>
+
+ * chew.c: Do not output trailing whitespaces in type and
+ functionname. Update copyright.
+
+2001-01-24 Kazu Hirata <kazu@hxi.com>
+
+ * chew.c: Do not output a trailing whitespace.
+
+2000-11-06 Nick Clifton <nickc@redhat.com>
+
+ * bfd.texinfo: Add GNU Free Documentation License.
+
+2000-07-09 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.in: Regenerate.
+
+2000-07-08 Alan Modra <alan@linuxcare.com.au>
+
+ * chew.c (outputdots): Don't add a space before `/*'.
+ (courierize): Likewise.
+
+Wed May 24 12:03:25 2000 Hans-Peter Nilsson <hp@axis.com>
+
+ * bfdint.texi (BFD ELF processor required): Add paragraph about
+ target necessities for readelf.
+
2000-04-30 Ben Elliston <bje@redhat.com>
* bfdint.texi (BFD generated files): Fix another typo.
@@ -6,6 +38,10 @@
* bfdint.texi (BFD_JUMP_TABLE macros): Fix typo.
+Fri Apr 7 17:54:38 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in: Rebuild with current autoconf/automake.
+
Thu Feb 4 23:21:36 1999 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in: Rebuild with current autoconf/automake.
diff --git a/gnu/usr.bin/binutils/bfd/doc/Makefile.in b/gnu/usr.bin/binutils/bfd/doc/Makefile.in
index 3a2655fead4..5e97d007646 100644
--- a/gnu/usr.bin/binutils/bfd/doc/Makefile.in
+++ b/gnu/usr.bin/binutils/bfd/doc/Makefile.in
@@ -75,10 +75,14 @@ CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
@@ -96,14 +100,17 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+STRIP = @STRIP@
TDEFINES = @TDEFINES@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
diff --git a/gnu/usr.bin/binutils/bfd/doc/bfd.texinfo b/gnu/usr.bin/binutils/bfd/doc/bfd.texinfo
index 0ca9b05def3..f0a18b7cf99 100644
--- a/gnu/usr.bin/binutils/bfd/doc/bfd.texinfo
+++ b/gnu/usr.bin/binutils/bfd/doc/bfd.texinfo
@@ -1,6 +1,8 @@
\input texinfo.tex
@setfilename bfd.info
-@c $Id: bfd.texinfo,v 1.3 2000/09/12 19:11:26 espie Exp $
+@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000
+@c Free Software Foundation, Inc.
+@c
@tex
% NOTE LOCAL KLUGE TO AVOID TOO MUCH WHITESPACE
\global\long\def\example{%
@@ -28,11 +30,14 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the BFD library.
-Copyright (C) 1991 Free Software Foundation, Inc.
+Copyright (C) 1991, 2000 Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
@ignore
Permission is granted to process this file through Tex and print the
@@ -41,14 +46,6 @@ notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, subject to the terms
-of the GNU General Public License, which includes the provision that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
@end ifinfo
@iftex
@c@finalout
@@ -67,7 +64,7 @@ into another language, under the above conditions for modified versions.
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.3 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.4 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Support\par
\hfill sac\@cygnus.com\par
@@ -80,18 +77,13 @@ into another language, under the above conditions for modified versions.
@vskip 0pt plus 1filll
Copyright @copyright{} 1991 Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, subject to the terms
-of the GNU General Public License, which includes the provision that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
@end titlepage
@end iftex
@@ -104,6 +96,7 @@ This file documents the binary file descriptor library libbfd.
* Overview:: Overview of BFD
* BFD front end:: BFD front end
* BFD back ends:: BFD back ends
+* GNU Free Documentation License:: GNU Free Documentation License
* Index:: Index
@end menu
@@ -298,7 +291,7 @@ structures.
@node Hash Tables, , Linker Functions, BFD front end
@include hash.texi
-@node BFD back ends, Index, BFD front end, Top
+@node BFD back ends, GNU Free Documentation License, BFD front end, Top
@chapter BFD back ends
@menu
* What to Put Where::
@@ -325,7 +318,371 @@ All of BFD lives in one directory.
@c Leave this out until the file has some actual contents...
@c @include elfcode.texi
-@node Index, , BFD back ends , Top
+@node GNU Free Documentation License, Index, BFD back ends, Top
+@chapter GNU Free Documentation License
+@cindex GNU Free Documentation License
+
+ GNU Free Documentation License
+
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+@end smallexample
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@node Index, , GNU Free Documentation License , Top
@unnumbered Index
@printindex cp
diff --git a/gnu/usr.bin/binutils/bfd/doc/chew.c b/gnu/usr.bin/binutils/bfd/doc/chew.c
index eba69c2bb1d..843e4414037 100644
--- a/gnu/usr.bin/binutils/bfd/doc/chew.c
+++ b/gnu/usr.bin/binutils/bfd/doc/chew.c
@@ -1,5 +1,5 @@
/* chew
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
Free Software Foundation, Inc.
Contributed by steve chamberlain @cygnus
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Yet another way of extracting documentation from source.
No, I haven't finished it yet, but I hope you people like it better
than the old way
-
+
sac
Basically, this is a sort of string forth, maybe we should call it
@@ -81,7 +81,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Foo. */
-
#include <ansidecl.h>
#include "sysdep.h"
#include <assert.h>
@@ -96,16 +95,15 @@ int internal_mode;
int warning;
-/* Here is a string type ... */
+/* Here is a string type ... */
-typedef struct buffer
+typedef struct buffer
{
char *ptr;
unsigned long write_idx;
unsigned long size;
} string_type;
-
#ifdef __STDC__
static void init_string_with_size (string_type *, unsigned int);
static void init_string (string_type *);
@@ -121,100 +119,104 @@ static void cattext (string_type *, char *);
static void catstr (string_type *, string_type *);
#endif
-
-static void DEFUN(init_string_with_size,(buffer, size),
- string_type *buffer AND
- unsigned int size )
+static void
+init_string_with_size (buffer, size)
+ string_type *buffer;
+ unsigned int size;
{
- buffer->write_idx = 0;
- buffer->size = size;
- buffer->ptr = malloc(size);
+ buffer->write_idx = 0;
+ buffer->size = size;
+ buffer->ptr = malloc (size);
}
-static void DEFUN(init_string,(buffer),
- string_type *buffer)
+static void
+init_string (buffer)
+ string_type *buffer;
{
- init_string_with_size(buffer, DEF_SIZE);
-
+ init_string_with_size (buffer, DEF_SIZE);
}
-static int DEFUN(find, (str, what),
- string_type *str AND
- char *what)
+static int
+find (str, what)
+ string_type *str;
+ char *what;
{
- unsigned int i;
- char *p;
- p = what;
- for (i = 0; i < str->write_idx && *p; i++)
+ unsigned int i;
+ char *p;
+ p = what;
+ for (i = 0; i < str->write_idx && *p; i++)
{
- if (*p == str->ptr[i])
- p++;
- else
- p = what;
+ if (*p == str->ptr[i])
+ p++;
+ else
+ p = what;
}
- return (*p == 0);
-
+ return (*p == 0);
}
-static void DEFUN(write_buffer,(buffer, f),
- string_type *buffer AND
- FILE *f)
+static void
+write_buffer (buffer, f)
+ string_type *buffer;
+ FILE *f;
{
- fwrite(buffer->ptr, buffer->write_idx, 1, f);
+ fwrite (buffer->ptr, buffer->write_idx, 1, f);
}
-
-static void DEFUN(delete_string,(buffer),
- string_type *buffer)
+static void
+delete_string (buffer)
+ string_type *buffer;
{
- free(buffer->ptr);
+ free (buffer->ptr);
}
-
-static char *DEFUN(addr, (buffer, idx),
- string_type *buffer AND
- unsigned int idx)
+static char *
+addr (buffer, idx)
+ string_type *buffer;
+ unsigned int idx;
{
- return buffer->ptr + idx;
+ return buffer->ptr + idx;
}
-static char DEFUN(at,(buffer, pos),
- string_type *buffer AND
- unsigned int pos)
+static char
+at (buffer, pos)
+ string_type *buffer;
+ unsigned int pos;
{
- if (pos >= buffer->write_idx)
+ if (pos >= buffer->write_idx)
return 0;
return buffer->ptr[pos];
}
-static void DEFUN(catchar,(buffer, ch),
- string_type *buffer AND
- int ch)
+static void
+catchar (buffer, ch)
+ string_type *buffer;
+ int ch;
{
- if (buffer->write_idx == buffer->size)
+ if (buffer->write_idx == buffer->size)
{
- buffer->size *=2;
- buffer->ptr = realloc(buffer->ptr, buffer->size);
+ buffer->size *= 2;
+ buffer->ptr = realloc (buffer->ptr, buffer->size);
}
- buffer->ptr[buffer->write_idx ++ ] = ch;
+ buffer->ptr[buffer->write_idx++] = ch;
}
-
-static void DEFUN(overwrite_string,(dst, src),
- string_type *dst AND
- string_type *src)
-{
- free(dst->ptr);
- dst->size = src->size;
- dst->write_idx = src->write_idx;
- dst->ptr = src->ptr;
+static void
+overwrite_string (dst, src)
+ string_type *dst;
+ string_type *src;
+{
+ free (dst->ptr);
+ dst->size = src->size;
+ dst->write_idx = src->write_idx;
+ dst->ptr = src->ptr;
}
-static void DEFUN(catbuf,(buffer, buf, len),
- string_type *buffer AND
- char *buf AND
- unsigned int len)
+static void
+catbuf (buffer, buf, len)
+ string_type *buffer;
+ char *buf;
+ unsigned int len;
{
if (buffer->write_idx + len >= buffer->size)
{
@@ -226,41 +228,41 @@ static void DEFUN(catbuf,(buffer, buf, len),
buffer->write_idx += len;
}
-static void DEFUN(cattext,(buffer, string),
- string_type *buffer AND
- char *string)
+static void
+cattext (buffer, string)
+ string_type *buffer;
+ char *string;
{
catbuf (buffer, string, (unsigned int) strlen (string));
}
-static void DEFUN(catstr,(dst, src),
- string_type *dst AND
- string_type *src)
+static void
+catstr (dst, src)
+ string_type *dst;
+ string_type *src;
{
catbuf (dst, src->ptr, src->write_idx);
}
-
-static unsigned int
-DEFUN(skip_white_and_stars,(src, idx),
- string_type *src AND
- unsigned int idx)
+static unsigned int
+skip_white_and_stars (src, idx)
+ string_type *src;
+ unsigned int idx;
{
char c;
- while ((c = at(src,idx)),
+ while ((c = at (src, idx)),
isspace ((unsigned char) c)
|| (c == '*'
/* Don't skip past end-of-comment or star as first
character on its line. */
- && at(src,idx +1) != '/'
- && at(src,idx -1) != '\n'))
+ && at (src, idx +1) != '/'
+ && at (src, idx -1) != '\n'))
idx++;
return idx;
}
/***********************************************************************/
-
string_type stack[STACK];
string_type *tos;
@@ -275,19 +277,18 @@ long *isp = &istack[0];
typedef int *word_type;
-
-
struct dict_struct
{
- char *word;
- struct dict_struct *next;
- stinst_type *code;
- int code_length;
- int code_end;
- int var;
-
+ char *word;
+ struct dict_struct *next;
+ stinst_type *code;
+ int code_length;
+ int code_end;
+ int var;
};
+
typedef struct dict_struct dict_type;
+
#define WORD(x) static void x()
static void
@@ -352,27 +353,28 @@ static void usage (void);
static void chew_exit (void);
#endif
-static void DEFUN(exec,(word),
- dict_type *word)
+static void
+exec (word)
+ dict_type *word;
{
pc = word->code;
- while (*pc)
- (*pc)();
+ while (*pc)
+ (*pc) ();
}
-WORD(call)
-{
- stinst_type *oldpc = pc;
- dict_type *e;
- e = (dict_type *)(pc [1]);
- exec(e);
- pc = oldpc + 2;
-
+
+WORD (call)
+{
+ stinst_type *oldpc = pc;
+ dict_type *e;
+ e = (dict_type *) (pc[1]);
+ exec (e);
+ pc = oldpc + 2;
}
-WORD(remchar)
+WORD (remchar)
{
if (tos->write_idx)
- tos->write_idx--;
+ tos->write_idx--;
pc++;
}
@@ -386,81 +388,80 @@ strip_trailing_newlines ()
pc++;
}
-WORD(push_number)
+WORD (push_number)
{
- isp++;
- icheck_range ();
- pc++;
- *isp = (long)(*pc);
- pc++;
+ isp++;
+ icheck_range ();
+ pc++;
+ *isp = (long) (*pc);
+ pc++;
}
-WORD(push_text)
+WORD (push_text)
{
- tos++;
- check_range ();
- init_string(tos);
- pc++;
- cattext(tos,*((char **)pc));
- pc++;
-
+ tos++;
+ check_range ();
+ init_string (tos);
+ pc++;
+ cattext (tos, *((char **) pc));
+ pc++;
}
-
/* This function removes everything not inside comments starting on
the first char of the line from the string, also when copying
comments, removes blank space and leading *'s.
Blank lines are turned into one blank line. */
-static void
-DEFUN(remove_noncomments,(src,dst),
- string_type *src AND
- string_type *dst)
+static void
+remove_noncomments (src, dst)
+ string_type *src;
+ string_type *dst;
{
- unsigned int idx = 0;
-
- while (at(src,idx))
+ unsigned int idx = 0;
+
+ while (at (src, idx))
{
- /* Now see if we have a comment at the start of the line */
- if (at(src,idx) == '\n'
- && at(src,idx+1) == '/'
- && at(src,idx+2) == '*')
+ /* Now see if we have a comment at the start of the line. */
+ if (at (src, idx) == '\n'
+ && at (src, idx + 1) == '/'
+ && at (src, idx + 2) == '*')
{
- idx+=3;
-
- idx = skip_white_and_stars(src,idx);
-
- /* Remove leading dot */
- if (at(src, idx) == '.')
- idx++;
-
- /* Copy to the end of the line, or till the end of the
- comment */
- while (at(src, idx))
+ idx += 3;
+
+ idx = skip_white_and_stars (src, idx);
+
+ /* Remove leading dot */
+ if (at (src, idx) == '.')
+ idx++;
+
+ /* Copy to the end of the line, or till the end of the
+ comment. */
+ while (at (src, idx))
{
- if (at(src, idx) == '\n')
+ if (at (src, idx) == '\n')
{
- /* end of line, echo and scrape of leading blanks */
- if (at(src,idx +1) == '\n')
- catchar(dst,'\n');
- catchar(dst,'\n');
- idx++;
- idx = skip_white_and_stars(src, idx);
+ /* end of line, echo and scrape of leading blanks */
+ if (at (src, idx + 1) == '\n')
+ catchar (dst, '\n');
+ catchar (dst, '\n');
+ idx++;
+ idx = skip_white_and_stars (src, idx);
}
- else if (at(src, idx) == '*' && at(src,idx+1) == '/')
+ else if (at (src, idx) == '*' && at (src, idx + 1) == '/')
{
- idx +=2 ;
- cattext(dst,"\nENDDD\n");
- break;
+ idx += 2;
+ cattext (dst, "\nENDDD\n");
+ break;
}
- else
+ else
{
- catchar(dst, at(src, idx));
- idx++;
+ catchar (dst, at (src, idx));
+ idx++;
}
}
}
- else idx++;
+ else
+ idx++;
}
}
@@ -481,98 +482,103 @@ print_stack_level ()
*/
static void
-DEFUN_VOID(paramstuff)
-{
- unsigned int openp;
- unsigned int fname;
- unsigned int idx;
- string_type out;
- init_string(&out);
-
-
- /* make sure that it's not already param'd or proto'd */
- if(find(tos,"PARAMS") || find(tos,"PROTO") || !find(tos,"(")) {
- catstr(&out,tos);
- }
- else
- {
- /* Find the open paren */
- for (openp = 0; at(tos, openp) != '(' && at(tos,openp); openp++)
- ;
+paramstuff (void)
+{
+ unsigned int openp;
+ unsigned int fname;
+ unsigned int idx;
+ unsigned int len;
+ string_type out;
+ init_string (&out);
- fname = openp;
- /* Step back to the fname */
+ /* Make sure that it's not already param'd or proto'd. */
+ if (find (tos, "PARAMS") || find (tos, "PROTO") || !find (tos, "("))
+ {
+ catstr (&out, tos);
+ }
+ else
+ {
+ /* Find the open paren. */
+ for (openp = 0; at (tos, openp) != '(' && at (tos, openp); openp++)
+ ;
+
+ fname = openp;
+ /* Step back to the fname. */
+ fname--;
+ while (fname && isspace ((unsigned char) at (tos, fname)))
fname--;
- while (fname && isspace((unsigned char) at(tos, fname)))
- fname --;
- while (fname
- && !isspace((unsigned char) at(tos,fname))
- && at(tos,fname) != '*')
- fname--;
-
- fname++;
-
- for (idx = 0; idx < fname; idx++) /* Output type */
- {
- catchar(&out, at(tos,idx));
- }
-
- cattext(&out, "\n"); /* Insert a newline between type and fnname */
+ while (fname
+ && !isspace ((unsigned char) at (tos,fname))
+ && at (tos,fname) != '*')
+ fname--;
+
+ fname++;
- for (idx = fname; idx < openp; idx++) /* Output fnname */
+ /* Output type, omitting trailing whitespace character(s), if
+ any. */
+ for (len = fname; 0 < len; len--)
{
- catchar(&out, at(tos,idx));
+ if (!isspace ((unsigned char) at (tos, len - 1)))
+ break;
}
+ for (idx = 0; idx < len; idx++)
+ catchar (&out, at (tos, idx));
- cattext(&out," PARAMS (");
+ cattext (&out, "\n"); /* Insert a newline between type and fnname */
- while (at(tos,idx) && at(tos,idx) !=';')
+ /* Output function name, omitting trailing whitespace
+ character(s), if any. */
+ for (len = openp; 0 < len; len--)
{
- catchar(&out, at(tos, idx));
- idx++;
+ if (!isspace ((unsigned char) at (tos, len - 1)))
+ break;
}
- cattext(&out,");\n\n");
- }
- overwrite_string(tos, &out);
- pc++;
-
-}
+ for (idx = fname; idx < len; idx++)
+ catchar (&out, at (tos, idx));
+
+ cattext (&out, " PARAMS (");
+ for (idx = openp; at (tos, idx) && at (tos, idx) != ';'; idx++)
+ catchar (&out, at (tos, idx));
+ cattext (&out, ");\n\n");
+ }
+ overwrite_string (tos, &out);
+ pc++;
+
+}
/* turn {*
and *} into comments */
-WORD(translatecomments)
+WORD (translatecomments)
{
- unsigned int idx = 0;
- string_type out;
- init_string(&out);
-
- while (at(tos, idx))
+ unsigned int idx = 0;
+ string_type out;
+ init_string (&out);
+
+ while (at (tos, idx))
{
- if (at(tos,idx) == '{' && at(tos,idx+1) =='*')
+ if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
{
- cattext(&out,"/*");
- idx+=2;
+ cattext (&out, "/*");
+ idx += 2;
}
- else if (at(tos,idx) == '*' && at(tos,idx+1) =='}')
+ else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
{
- cattext(&out,"*/");
- idx+=2;
+ cattext (&out, "*/");
+ idx += 2;
}
- else
+ else
{
- catchar(&out, at(tos, idx));
- idx++;
+ catchar (&out, at (tos, idx));
+ idx++;
}
}
+ overwrite_string (tos, &out);
- overwrite_string(tos, &out);
-
- pc++;
-
+ pc++;
}
#if 0
@@ -581,843 +587,822 @@ WORD(translatecomments)
/* turn everything not starting with a . into a comment */
-WORD(manglecomments)
+WORD (manglecomments)
{
- unsigned int idx = 0;
- string_type out;
- init_string(&out);
-
- while (at(tos, idx))
+ unsigned int idx = 0;
+ string_type out;
+ init_string (&out);
+
+ while (at (tos, idx))
{
- if (at(tos,idx) == '\n' && at(tos,idx+1) =='*')
+ if (at (tos, idx) == '\n' && at (tos, idx + 1) == '*')
{
- cattext(&out," /*");
- idx+=2;
+ cattext (&out, " /*");
+ idx += 2;
}
- else if (at(tos,idx) == '*' && at(tos,idx+1) =='}')
+ else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
{
- cattext(&out,"*/");
- idx+=2;
+ cattext (&out, "*/");
+ idx += 2;
}
- else
+ else
{
- catchar(&out, at(tos, idx));
- idx++;
+ catchar (&out, at (tos, idx));
+ idx++;
}
}
+ overwrite_string (tos, &out);
- overwrite_string(tos, &out);
-
- pc++;
-
+ pc++;
}
#endif
/* Mod tos so that only lines with leading dots remain */
static void
-DEFUN_VOID(outputdots)
+outputdots (void)
{
- unsigned int idx = 0;
- string_type out;
- init_string(&out);
-
- while (at(tos, idx))
+ unsigned int idx = 0;
+ string_type out;
+ init_string (&out);
+
+ while (at (tos, idx))
{
- if (at(tos, idx) == '\n' && at(tos, idx+1) == '.')
+ if (at (tos, idx) == '\n' && at (tos, idx + 1) == '.')
{
char c;
idx += 2;
-
- while ((c = at(tos, idx)) && c != '\n')
+
+ while ((c = at (tos, idx)) && c != '\n')
{
- if (c == '{' && at(tos,idx+1) =='*')
+ if (c == '{' && at (tos, idx + 1) == '*')
{
- cattext(&out," /*");
- idx+=2;
+ cattext (&out, "/*");
+ idx += 2;
}
- else if (c == '*' && at(tos,idx+1) =='}')
+ else if (c == '*' && at (tos, idx + 1) == '}')
{
- cattext(&out,"*/");
- idx+=2;
+ cattext (&out, "*/");
+ idx += 2;
}
else
{
- catchar(&out, c);
- idx++;
+ catchar (&out, c);
+ idx++;
}
}
- catchar(&out,'\n');
+ catchar (&out, '\n');
}
- else
+ else
{
- idx++;
+ idx++;
}
- }
+ }
- overwrite_string(tos, &out);
- pc++;
-
+ overwrite_string (tos, &out);
+ pc++;
}
/* Find lines starting with . and | and put example around them on tos */
-WORD(courierize)
-{
- string_type out;
- unsigned int idx = 0;
- int command = 0;
-
- init_string(&out);
-
- while (at(tos, idx))
+WORD (courierize)
+{
+ string_type out;
+ unsigned int idx = 0;
+ int command = 0;
+
+ init_string (&out);
+
+ while (at (tos, idx))
{
- if (at(tos, idx) == '\n'
- && (at(tos, idx +1 ) == '.'
- || at(tos,idx+1) == '|'))
+ if (at (tos, idx) == '\n'
+ && (at (tos, idx +1 ) == '.'
+ || at (tos, idx + 1) == '|'))
{
- cattext(&out,"\n@example\n");
- do
+ cattext (&out, "\n@example\n");
+ do
{
- idx += 2;
-
- while (at(tos, idx) && at(tos, idx)!='\n')
+ idx += 2;
+
+ while (at (tos, idx) && at (tos, idx) != '\n')
{
- if (at(tos,idx)=='{' && at(tos,idx+1) =='*')
+ if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
{
- cattext(&out," /*");
- idx+=2;
+ cattext (&out, "/*");
+ idx += 2;
}
- else if (at(tos,idx)=='*' && at(tos,idx+1) =='}')
+ else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
{
- cattext(&out,"*/");
- idx+=2;
+ cattext (&out, "*/");
+ idx += 2;
}
- else if (at(tos,idx) == '{' && !command)
+ else if (at (tos, idx) == '{' && !command)
{
- cattext(&out,"@{");
- idx++;
+ cattext (&out, "@{");
+ idx++;
}
- else if (at(tos,idx) == '}' && !command)
+ else if (at (tos, idx) == '}' && !command)
{
- cattext(&out,"@}");
- idx++;
+ cattext (&out, "@}");
+ idx++;
}
- else
+ else
{
- if (at(tos,idx) == '@')
- command = 1;
- else if (isspace((unsigned char) at(tos,idx))
- || at(tos,idx) == '}')
- command = 0;
- catchar(&out, at(tos, idx));
- idx++;
+ if (at (tos, idx) == '@')
+ command = 1;
+ else if (isspace ((unsigned char) at (tos, idx))
+ || at (tos, idx) == '}')
+ command = 0;
+ catchar (&out, at (tos, idx));
+ idx++;
}
-
+
}
- catchar(&out,'\n');
- }
- while (at(tos, idx) == '\n'
- && ((at(tos, idx+1) == '.')
- || (at(tos,idx+1) == '|')))
- ;
- cattext(&out,"@end example");
+ catchar (&out, '\n');
+ }
+ while (at (tos, idx) == '\n'
+ && ((at (tos, idx + 1) == '.')
+ || (at (tos, idx + 1) == '|')))
+ ;
+ cattext (&out, "@end example");
}
- else
- {
- catchar(&out, at(tos, idx));
- idx++;
+ else
+ {
+ catchar (&out, at (tos, idx));
+ idx++;
}
- }
-
- overwrite_string(tos, &out);
- pc++;
+ }
-
+ overwrite_string (tos, &out);
+ pc++;
}
/* Finds any lines starting with "o ", if there are any, then turns
on @itemize @bullet, and @items each of them. Then ends with @end
itemize, inplace at TOS*/
-
-WORD(bulletize)
+WORD (bulletize)
{
- unsigned int idx = 0;
- int on = 0;
- string_type out;
- init_string(&out);
-
- while (at(tos, idx)) {
- if (at(tos, idx) == '@' &&
- at(tos, idx+1) == '*')
+ unsigned int idx = 0;
+ int on = 0;
+ string_type out;
+ init_string (&out);
+
+ while (at (tos, idx))
+ {
+ if (at (tos, idx) == '@'
+ && at (tos, idx + 1) == '*')
{
- cattext(&out,"*");
- idx+=2;
+ cattext (&out, "*");
+ idx += 2;
}
-
- else
- if (at(tos, idx) == '\n' &&
- at(tos, idx+1) == 'o' &&
- isspace((unsigned char) at(tos, idx +2)))
+ else if (at (tos, idx) == '\n'
+ && at (tos, idx + 1) == 'o'
+ && isspace ((unsigned char) at (tos, idx + 2)))
+ {
+ if (!on)
{
- if (!on)
- {
- cattext(&out,"\n@itemize @bullet\n");
- on = 1;
-
- }
- cattext(&out,"\n@item\n");
- idx+=3;
+ cattext (&out, "\n@itemize @bullet\n");
+ on = 1;
+
}
- else
+ cattext (&out, "\n@item\n");
+ idx += 3;
+ }
+ else
+ {
+ catchar (&out, at (tos, idx));
+ if (on && at (tos, idx) == '\n'
+ && at (tos, idx + 1) == '\n'
+ && at (tos, idx + 2) != 'o')
{
- catchar(&out, at(tos, idx));
- if (on && at(tos, idx) == '\n' &&
- at(tos, idx+1) == '\n' &&
- at(tos, idx+2) != 'o')
- {
- cattext(&out, "@end itemize");
- on = 0;
- }
- idx++;
-
+ cattext (&out, "@end itemize");
+ on = 0;
}
+ idx++;
+
}
- if (on)
+ }
+ if (on)
{
- cattext(&out,"@end itemize\n");
- }
+ cattext (&out, "@end itemize\n");
+ }
- delete_string(tos);
- *tos = out;
- pc++;
-
+ delete_string (tos);
+ *tos = out;
+ pc++;
}
/* Turn <<foo>> into @code{foo} in place at TOS*/
-
-WORD(do_fancy_stuff)
+WORD (do_fancy_stuff)
{
- unsigned int idx = 0;
- string_type out;
- init_string(&out);
- while (at(tos, idx))
+ unsigned int idx = 0;
+ string_type out;
+ init_string (&out);
+ while (at (tos, idx))
{
- if (at(tos, idx) == '<'
- && at(tos, idx+1) == '<'
- && !isspace((unsigned char) at(tos,idx + 2)))
+ if (at (tos, idx) == '<'
+ && at (tos, idx + 1) == '<'
+ && !isspace ((unsigned char) at (tos, idx + 2)))
{
- /* This qualifies as a << startup */
- idx +=2;
- cattext(&out,"@code{");
- while(at(tos,idx) &&
- at(tos,idx) != '>' )
+ /* This qualifies as a << startup. */
+ idx += 2;
+ cattext (&out, "@code{");
+ while (at (tos, idx)
+ && at (tos, idx) != '>' )
{
- catchar(&out, at(tos, idx));
- idx++;
-
+ catchar (&out, at (tos, idx));
+ idx++;
+
}
- cattext(&out,"}");
- idx+=2;
+ cattext (&out, "}");
+ idx += 2;
}
- else
+ else
{
- catchar(&out, at(tos, idx));
- idx++;
+ catchar (&out, at (tos, idx));
+ idx++;
}
}
- delete_string(tos);
- *tos = out;
- pc++;
-
-}
-/* A command is all upper case,and alone on a line */
-static int
-DEFUN( iscommand,(ptr, idx),
- string_type *ptr AND
- unsigned int idx)
-{
- unsigned int len = 0;
- while (at(ptr,idx)) {
- if (isupper((unsigned char) at(ptr,idx)) || at(ptr,idx) == ' ' ||
- at(ptr,idx) == '_')
- {
- len++;
- idx++;
- }
- else if(at(ptr,idx) == '\n')
- {
- if (len > 3) return 1;
- return 0;
- }
- else return 0;
- }
- return 0;
+ delete_string (tos);
+ *tos = out;
+ pc++;
}
+/* A command is all upper case,and alone on a line. */
static int
-DEFUN(copy_past_newline,(ptr, idx, dst),
- string_type *ptr AND
- unsigned int idx AND
- string_type *dst)
+iscommand (ptr, idx)
+ string_type *ptr;
+ unsigned int idx;
{
- int column = 0;
+ unsigned int len = 0;
+ while (at (ptr, idx))
+ {
+ if (isupper ((unsigned char) at (ptr, idx))
+ || at (ptr, idx) == ' ' || at (ptr, idx) == '_')
+ {
+ len++;
+ idx++;
+ }
+ else if (at (ptr, idx) == '\n')
+ {
+ if (len > 3)
+ return 1;
+ return 0;
+ }
+ else
+ return 0;
+ }
+ return 0;
+}
- while (at(ptr, idx) && at(ptr, idx) != '\n')
+static int
+copy_past_newline (ptr, idx, dst)
+ string_type *ptr;
+ unsigned int idx;
+ string_type *dst;
+{
+ int column = 0;
+
+ while (at (ptr, idx) && at (ptr, idx) != '\n')
{
- if (at (ptr, idx) == '\t')
- {
- /* Expand tabs. Neither makeinfo nor TeX can cope well with
- them. */
- do
- catchar (dst, ' ');
- while (++column & 7);
- }
- else
- {
- catchar(dst, at(ptr, idx));
- column++;
- }
- idx++;
-
- }
- catchar(dst, at(ptr, idx));
- idx++;
- return idx;
+ if (at (ptr, idx) == '\t')
+ {
+ /* Expand tabs. Neither makeinfo nor TeX can cope well with
+ them. */
+ do
+ catchar (dst, ' ');
+ while (++column & 7);
+ }
+ else
+ {
+ catchar (dst, at (ptr, idx));
+ column++;
+ }
+ idx++;
+
+ }
+ catchar (dst, at (ptr, idx));
+ idx++;
+ return idx;
}
-WORD(icopy_past_newline)
+WORD (icopy_past_newline)
{
- tos++;
- check_range ();
- init_string(tos);
- idx = copy_past_newline(ptr, idx, tos);
- pc++;
+ tos++;
+ check_range ();
+ init_string (tos);
+ idx = copy_past_newline (ptr, idx, tos);
+ pc++;
}
/* indent
- Take the string at the top of the stack, do some prettying */
+ Take the string at the top of the stack, do some prettying. */
-
-WORD(kill_bogus_lines)
+WORD (kill_bogus_lines)
{
- int sl ;
-
- int idx = 0;
- int c;
- int dot = 0 ;
-
- string_type out;
- init_string(&out);
- /* Drop leading nl */
- while (at(tos,idx) == '\n')
+ int sl;
+
+ int idx = 0;
+ int c;
+ int dot = 0;
+
+ string_type out;
+ init_string (&out);
+ /* Drop leading nl. */
+ while (at (tos, idx) == '\n')
{
- idx++;
+ idx++;
}
- c = idx;
-
- /* If the first char is a '.' prepend a newline so that it is
- recognized properly later. */
- if (at (tos, idx) == '.')
- catchar (&out, '\n');
-
- /* Find the last char */
- while (at(tos,idx))
+ c = idx;
+
+ /* If the first char is a '.' prepend a newline so that it is
+ recognized properly later. */
+ if (at (tos, idx) == '.')
+ catchar (&out, '\n');
+
+ /* Find the last char. */
+ while (at (tos, idx))
{
- idx++;
+ idx++;
}
-
- /* find the last non white before the nl */
+
+ /* Find the last non white before the nl. */
+ idx--;
+
+ while (idx && isspace ((unsigned char) at (tos, idx)))
idx--;
-
- while (idx && isspace((unsigned char) at(tos,idx)))
- idx--;
- idx++;
-
- /* Copy buffer upto last char, but blank lines before and after
- dots don't count */
- sl = 1;
+ idx++;
+
+ /* Copy buffer upto last char, but blank lines before and after
+ dots don't count. */
+ sl = 1;
- while (c < idx)
+ while (c < idx)
{
- if (at(tos,c) == '\n'
- && at(tos,c+1) == '\n'
- && at(tos,c+2) == '.')
+ if (at (tos, c) == '\n'
+ && at (tos, c + 1) == '\n'
+ && at (tos, c + 2) == '.')
{
- /* Ignore two newlines before a dot*/
- c++;
+ /* Ignore two newlines before a dot. */
+ c++;
}
- else if (at(tos,c) == '.' && sl)
+ else if (at (tos, c) == '.' && sl)
{
- /* remember that this line started with a dot */
- dot=2;
+ /* remember that this line started with a dot. */
+ dot = 2;
}
- else if (at(tos,c) == '\n'
- && at(tos,c+1) == '\n'
- && dot)
+ else if (at (tos, c) == '\n'
+ && at (tos, c + 1) == '\n'
+ && dot)
{
- c++;
- /* Ignore two newlines when last line was dot */
+ c++;
+ /* Ignore two newlines when last line was dot. */
}
- catchar(&out, at(tos,c));
- if (at(tos,c) == '\n')
+ catchar (&out, at (tos, c));
+ if (at (tos, c) == '\n')
{
- sl = 1;
-
- if (dot == 2)dot=1;else dot = 0;
+ sl = 1;
+
+ if (dot == 2)
+ dot = 1;
+ else
+ dot = 0;
}
- else
- sl = 0;
-
- c++;
+ else
+ sl = 0;
+
+ c++;
}
-
- /* Append nl*/
- catchar(&out, '\n');
- pc++;
- delete_string(tos);
- *tos = out;
-
-
+
+ /* Append nl. */
+ catchar (&out, '\n');
+ pc++;
+ delete_string (tos);
+ *tos = out;
+
}
-WORD(indent)
+WORD (indent)
{
- string_type out;
- int tab = 0;
- int idx = 0;
- int ol =0;
- init_string(&out);
- while (at(tos,idx)) {
- switch (at(tos,idx))
+ string_type out;
+ int tab = 0;
+ int idx = 0;
+ int ol = 0;
+ init_string (&out);
+ while (at (tos, idx))
+ {
+ switch (at (tos, idx))
+ {
+ case '\n':
+ cattext (&out, "\n");
+ idx++;
+ if (tab && at (tos, idx))
{
- case '\n':
- cattext(&out,"\n");
- idx++;
- if (tab && at(tos,idx))
- {
- cattext(&out," ");
- }
- ol = 0;
- break;
- case '(':
- tab++;
- if (ol == 0)
- cattext(&out," ");
- idx++;
- cattext(&out,"(");
- ol = 1;
- break;
- case ')':
- tab--;
- cattext(&out,")");
- idx++;
- ol=1;
-
- break;
- default:
- catchar(&out,at(tos,idx));
- ol=1;
-
- idx++;
- break;
+ cattext (&out, " ");
}
- }
+ ol = 0;
+ break;
+ case '(':
+ tab++;
+ if (ol == 0)
+ cattext (&out, " ");
+ idx++;
+ cattext (&out, "(");
+ ol = 1;
+ break;
+ case ')':
+ tab--;
+ cattext (&out, ")");
+ idx++;
+ ol = 1;
+
+ break;
+ default:
+ catchar (&out, at (tos, idx));
+ ol = 1;
+
+ idx++;
+ break;
+ }
+ }
- pc++;
- delete_string(tos);
- *tos = out;
+ pc++;
+ delete_string (tos);
+ *tos = out;
}
-
-WORD(get_stuff_in_command)
+WORD (get_stuff_in_command)
{
- tos++;
- check_range ();
- init_string(tos);
+ tos++;
+ check_range ();
+ init_string (tos);
- while (at(ptr, idx)) {
- if (iscommand(ptr, idx)) break;
- idx = copy_past_newline(ptr, idx, tos);
- }
- pc++;
+ while (at (ptr, idx))
+ {
+ if (iscommand (ptr, idx))
+ break;
+ idx = copy_past_newline (ptr, idx, tos);
+ }
+ pc++;
}
-WORD(swap)
+WORD (swap)
{
- string_type t;
-
- t = tos[0];
- tos[0] = tos[-1];
- tos[-1] =t;
- pc++;
-
+ string_type t;
+
+ t = tos[0];
+ tos[0] = tos[-1];
+ tos[-1] = t;
+ pc++;
}
-WORD(other_dup)
+WORD (other_dup)
{
- tos++;
- check_range ();
- init_string(tos);
- catstr(tos, tos-1);
- pc++;
+ tos++;
+ check_range ();
+ init_string (tos);
+ catstr (tos, tos - 1);
+ pc++;
}
-WORD(drop)
+WORD (drop)
{
tos--;
check_range ();
pc++;
}
-WORD(idrop)
+WORD (idrop)
{
isp--;
icheck_range ();
pc++;
}
-WORD(icatstr)
+WORD (icatstr)
{
- tos--;
- check_range ();
- catstr(tos, tos+1);
- delete_string(tos+1);
- pc++;
+ tos--;
+ check_range ();
+ catstr (tos, tos + 1);
+ delete_string (tos + 1);
+ pc++;
}
-WORD(skip_past_newline)
+WORD (skip_past_newline)
{
- while (at(ptr,idx)
- && at(ptr,idx) != '\n')
- idx++;
+ while (at (ptr, idx)
+ && at (ptr, idx) != '\n')
idx++;
- pc++;
+ idx++;
+ pc++;
}
-
-WORD(internalmode)
+WORD (internalmode)
{
- internal_mode = *(isp);
- isp--;
- icheck_range ();
- pc++;
+ internal_mode = *(isp);
+ isp--;
+ icheck_range ();
+ pc++;
}
-WORD(maybecatstr)
+WORD (maybecatstr)
{
- if (internal_wanted == internal_mode)
+ if (internal_wanted == internal_mode)
{
- catstr(tos-1, tos);
+ catstr (tos - 1, tos);
}
- delete_string(tos);
- tos--;
- check_range ();
- pc++;
+ delete_string (tos);
+ tos--;
+ check_range ();
+ pc++;
}
char *
-DEFUN(nextword,(string, word),
- char *string AND
- char **word)
-{
- char *word_start;
- int idx;
- char *dst;
- char *src;
-
- int length = 0;
-
- while (isspace((unsigned char) *string) || *string == '-') {
- if (*string == '-')
- {
- while (*string && *string != '\n')
- string++;
-
- }
- else {
- string++;
- }
- }
- if (!*string) return 0;
-
- word_start = string;
- if (*string == '"')
- {
- do
- {
- string++;
- length++;
- if (*string == '\\')
- {
- string += 2;
- length += 2;
- }
- }
- while (*string != '"');
- }
- else
- {
- while (!isspace((unsigned char) *string))
+nextword (string, word)
+ char *string;
+ char **word;
+{
+ char *word_start;
+ int idx;
+ char *dst;
+ char *src;
+
+ int length = 0;
+
+ while (isspace ((unsigned char) *string) || *string == '-')
+ {
+ if (*string == '-')
{
+ while (*string && *string != '\n')
string++;
- length++;
-
+
+ }
+ else
+ {
+ string++;
}
}
-
- *word = malloc(length + 1);
-
- dst = *word;
- src = word_start;
-
+ if (!*string)
+ return 0;
- for (idx= 0; idx < length; idx++)
- {
- if (src[idx] == '\\')
- switch (src[idx+1])
+ word_start = string;
+ if (*string == '"')
+ {
+ do
+ {
+ string++;
+ length++;
+ if (*string == '\\')
{
- case 'n':
- *dst++ = '\n';
- idx++;
- break;
- case '"':
- case '\\':
- *dst++ = src[idx+1];
- idx++;
- break;
- default:
- *dst++ = '\\';
- break;
+ string += 2;
+ length += 2;
}
- else
- *dst++ = src[idx];
+ }
+ while (*string != '"');
}
- *dst++ = 0;
+ else
+ {
+ while (!isspace ((unsigned char) *string))
+ {
+ string++;
+ length++;
+ }
+ }
+ *word = malloc (length + 1);
+ dst = *word;
+ src = word_start;
+ for (idx = 0; idx < length; idx++)
+ {
+ if (src[idx] == '\\')
+ switch (src[idx + 1])
+ {
+ case 'n':
+ *dst++ = '\n';
+ idx++;
+ break;
+ case '"':
+ case '\\':
+ *dst++ = src[idx + 1];
+ idx++;
+ break;
+ default:
+ *dst++ = '\\';
+ break;
+ }
+ else
+ *dst++ = src[idx];
+ }
+ *dst++ = 0;
- if(*string)
- return string + 1;
- else
- return 0;
-
+ if (*string)
+ return string + 1;
+ else
+ return 0;
}
+
dict_type *root;
+
dict_type *
-DEFUN(lookup_word,(word),
- char *word)
+lookup_word (word)
+ char *word;
{
dict_type *ptr = root;
- while (ptr) {
- if (strcmp(ptr->word, word) == 0) return ptr;
+ while (ptr)
+ {
+ if (strcmp (ptr->word, word) == 0)
+ return ptr;
ptr = ptr->next;
-
}
if (warning)
- fprintf(stderr,"Can't find %s\n",word);
+ fprintf (stderr, "Can't find %s\n", word);
return 0;
-
-
}
-static void DEFUN_VOID(perform)
+static void
+perform (void)
{
tos = stack;
-
- while (at(ptr, idx)) {
- /* It's worth looking through the command list */
- if (iscommand(ptr, idx))
- {
- char *next;
- dict_type *word ;
-
- (void) nextword(addr(ptr, idx), &next);
+ while (at (ptr, idx))
+ {
+ /* It's worth looking through the command list. */
+ if (iscommand (ptr, idx))
+ {
+ char *next;
+ dict_type *word;
- word = lookup_word(next);
+ (void) nextword (addr (ptr, idx), &next);
+ word = lookup_word (next);
-
+ if (word)
+ {
+ exec (word);
+ }
+ else
+ {
+ if (warning)
+ fprintf (stderr, "warning, %s is not recognised\n", next);
+ skip_past_newline ();
+ }
- if (word)
- {
- exec(word);
}
- else
- {
- if (warning)
- fprintf(stderr,"warning, %s is not recognised\n", next);
- skip_past_newline();
- }
-
- }
- else skip_past_newline();
-
+ else
+ skip_past_newline ();
}
}
dict_type *
-DEFUN(newentry,(word),
- char *word)
-{
- dict_type *new = (dict_type *)malloc(sizeof(dict_type));
- new->word = word;
- new->next = root;
- root = new;
- new->code = (stinst_type *)malloc(sizeof(stinst_type ));
- new->code_length = 1;
- new->code_end = 0;
- return new;
-
+newentry (word)
+ char *word;
+{
+ dict_type *new = (dict_type *) malloc (sizeof (dict_type));
+ new->word = word;
+ new->next = root;
+ root = new;
+ new->code = (stinst_type *) malloc (sizeof (stinst_type));
+ new->code_length = 1;
+ new->code_end = 0;
+ return new;
}
-
unsigned int
-DEFUN(add_to_definition,(entry, word),
- dict_type *entry AND
- stinst_type word)
+add_to_definition (entry, word)
+ dict_type *entry;
+ stinst_type word;
{
- if (entry->code_end == entry->code_length)
+ if (entry->code_end == entry->code_length)
{
- entry->code_length += 2;
- entry->code =
- (stinst_type *) realloc((char *)(entry->code),
- entry->code_length *sizeof(word_type));
+ entry->code_length += 2;
+ entry->code =
+ (stinst_type *) realloc ((char *) (entry->code),
+ entry->code_length * sizeof (word_type));
}
- entry->code[entry->code_end] = word;
-
-return entry->code_end++;
-}
-
-
-
-
-
+ entry->code[entry->code_end] = word;
+ return entry->code_end++;
+}
void
-DEFUN(add_intrinsic,(name, func),
- char *name AND
- void (*func)())
+add_intrinsic (name, func)
+ char *name;
+ void (*func) ();
{
- dict_type *new = newentry(name);
- add_to_definition(new, func);
- add_to_definition(new, 0);
+ dict_type *new = newentry (name);
+ add_to_definition (new, func);
+ add_to_definition (new, 0);
}
void
-DEFUN(add_var,(name),
- char *name)
+add_var (name)
+ char *name;
{
- dict_type *new = newentry(name);
- add_to_definition(new, push_number);
- add_to_definition(new, (stinst_type)(&(new->var)));
- add_to_definition(new,0);
+ dict_type *new = newentry (name);
+ add_to_definition (new, push_number);
+ add_to_definition (new, (stinst_type) (&(new->var)));
+ add_to_definition (new, 0);
}
-
-void
-DEFUN(compile, (string),
- char *string)
+void
+compile (string)
+ char *string;
{
- /* add words to the dictionary */
- char *word;
- string = nextword(string, &word);
- while (string && *string && word[0])
+ /* Add words to the dictionary. */
+ char *word;
+ string = nextword (string, &word);
+ while (string && *string && word[0])
{
- if (strcmp(word,"var")==0)
+ if (strcmp (word, "var") == 0)
{
- string=nextword(string, &word);
-
- add_var(word);
- string=nextword(string, &word);
+ string = nextword (string, &word);
+
+ add_var (word);
+ string = nextword (string, &word);
}
-else
-
- if (word[0] == ':')
+ else if (word[0] == ':')
{
- dict_type *ptr;
- /* Compile a word and add to dictionary */
- string = nextword(string, &word);
-
- ptr = newentry(word);
- string = nextword(string, &word);
- while (word[0] != ';' )
+ dict_type *ptr;
+ /* Compile a word and add to dictionary. */
+ string = nextword (string, &word);
+
+ ptr = newentry (word);
+ string = nextword (string, &word);
+ while (word[0] != ';')
{
- switch (word[0])
- {
- case '"':
- /* got a string, embed magic push string
- function */
- add_to_definition(ptr, push_text);
- add_to_definition(ptr, (stinst_type)(word+1));
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- /* Got a number, embedd the magic push number
- function */
- add_to_definition(ptr, push_number);
- add_to_definition(ptr, (stinst_type)atol(word));
- break;
- default:
- add_to_definition(ptr, call);
- add_to_definition(ptr, (stinst_type)lookup_word(word));
- }
-
- string = nextword(string, &word);
+ switch (word[0])
+ {
+ case '"':
+ /* got a string, embed magic push string
+ function */
+ add_to_definition (ptr, push_text);
+ add_to_definition (ptr, (stinst_type) (word + 1));
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ /* Got a number, embedd the magic push number
+ function */
+ add_to_definition (ptr, push_number);
+ add_to_definition (ptr, (stinst_type) atol (word));
+ break;
+ default:
+ add_to_definition (ptr, call);
+ add_to_definition (ptr, (stinst_type) lookup_word (word));
+ }
+
+ string = nextword (string, &word);
}
- add_to_definition(ptr,0);
- string = nextword(string, &word);
+ add_to_definition (ptr, 0);
+ string = nextword (string, &word);
}
- else
+ else
{
- fprintf(stderr,"syntax error at %s\n",string-1);
- }
+ fprintf (stderr, "syntax error at %s\n", string - 1);
+ }
}
-
}
-
-static void DEFUN_VOID(bang)
+static void
+bang (void)
{
- *(long *)((isp[0])) = isp[-1];
- isp-=2;
+ *(long *) ((isp[0])) = isp[-1];
+ isp -= 2;
icheck_range ();
pc++;
}
-WORD(atsign)
+WORD (atsign)
{
- isp[0] = *(long *)(isp[0]);
- pc++;
+ isp[0] = *(long *) (isp[0]);
+ pc++;
}
-WORD(hello)
+WORD (hello)
{
- printf("hello\n");
- pc++;
+ printf ("hello\n");
+ pc++;
}
-WORD(stdout_)
+WORD (stdout_)
{
isp++;
icheck_range ();
@@ -1425,7 +1410,7 @@ WORD(stdout_)
pc++;
}
-WORD(stderr_)
+WORD (stderr_)
{
isp++;
icheck_range ();
@@ -1433,7 +1418,7 @@ WORD(stderr_)
pc++;
}
-WORD(print)
+WORD (print)
{
if (*isp == 1)
write_buffer (tos, stdout);
@@ -1448,29 +1433,29 @@ WORD(print)
pc++;
}
-
-static void DEFUN(read_in, (str, file),
- string_type *str AND
- FILE *file)
+static void
+read_in (str, file)
+ string_type *str;
+ FILE *file;
{
- char buff[10000];
- unsigned int r;
- do
+ char buff[10000];
+ unsigned int r;
+ do
{
- r = fread(buff, 1, sizeof(buff), file);
- catbuf(str, buff, r);
+ r = fread (buff, 1, sizeof (buff), file);
+ catbuf (str, buff, r);
}
- while (r);
- buff[0] = 0;
-
- catbuf(str, buff,1);
-}
+ while (r);
+ buff[0] = 0;
+ catbuf (str, buff, 1);
+}
-static void DEFUN_VOID(usage)
+static void
+usage (void)
{
- fprintf(stderr,"usage: -[d|i|g] <file >file\n");
- exit(33);
+ fprintf (stderr, "usage: -[d|i|g] <file >file\n");
+ exit (33);
}
/* There is no reliable way to declare exit. Sometimes it returns
@@ -1484,95 +1469,98 @@ chew_exit ()
exit (0);
}
-int DEFUN(main,(ac,av),
-int ac AND
-char *av[])
+int
+main (ac, av)
+ int ac;
+ char *av[];
{
unsigned int i;
string_type buffer;
string_type pptr;
- init_string(&buffer);
- init_string(&pptr);
- init_string(stack+0);
- tos=stack+1;
+ init_string (&buffer);
+ init_string (&pptr);
+ init_string (stack + 0);
+ tos = stack + 1;
ptr = &pptr;
-
- add_intrinsic("push_text", push_text);
- add_intrinsic("!", bang);
- add_intrinsic("@", atsign);
- add_intrinsic("hello",hello);
- add_intrinsic("stdout",stdout_);
- add_intrinsic("stderr",stderr_);
- add_intrinsic("print",print);
- add_intrinsic("skip_past_newline", skip_past_newline );
- add_intrinsic("catstr", icatstr );
- add_intrinsic("copy_past_newline", icopy_past_newline );
- add_intrinsic("dup", other_dup );
- add_intrinsic("drop", drop);
- add_intrinsic("idrop", idrop);
- add_intrinsic("remchar", remchar );
- add_intrinsic("get_stuff_in_command", get_stuff_in_command );
- add_intrinsic("do_fancy_stuff", do_fancy_stuff );
- add_intrinsic("bulletize", bulletize );
- add_intrinsic("courierize", courierize );
+
+ add_intrinsic ("push_text", push_text);
+ add_intrinsic ("!", bang);
+ add_intrinsic ("@", atsign);
+ add_intrinsic ("hello", hello);
+ add_intrinsic ("stdout", stdout_);
+ add_intrinsic ("stderr", stderr_);
+ add_intrinsic ("print", print);
+ add_intrinsic ("skip_past_newline", skip_past_newline);
+ add_intrinsic ("catstr", icatstr);
+ add_intrinsic ("copy_past_newline", icopy_past_newline);
+ add_intrinsic ("dup", other_dup);
+ add_intrinsic ("drop", drop);
+ add_intrinsic ("idrop", idrop);
+ add_intrinsic ("remchar", remchar);
+ add_intrinsic ("get_stuff_in_command", get_stuff_in_command);
+ add_intrinsic ("do_fancy_stuff", do_fancy_stuff);
+ add_intrinsic ("bulletize", bulletize);
+ add_intrinsic ("courierize", courierize);
/* If the following line gives an error, exit() is not declared in the
../hosts/foo.h file for this host. Fix it there, not here! */
/* No, don't fix it anywhere; see comment on chew_exit--Ian Taylor. */
- add_intrinsic("exit", chew_exit );
- add_intrinsic("swap", swap );
- add_intrinsic("outputdots", outputdots );
- add_intrinsic("paramstuff", paramstuff );
- add_intrinsic("maybecatstr", maybecatstr );
- add_intrinsic("translatecomments", translatecomments );
- add_intrinsic("kill_bogus_lines", kill_bogus_lines);
- add_intrinsic("indent", indent);
- add_intrinsic("internalmode", internalmode);
- add_intrinsic("print_stack_level", print_stack_level);
- add_intrinsic("strip_trailing_newlines", strip_trailing_newlines);
-
- /* Put a nl at the start */
- catchar(&buffer,'\n');
-
- read_in(&buffer, stdin);
- remove_noncomments(&buffer, ptr);
- for (i= 1; i < (unsigned int) ac; i++)
- {
- if (av[i][0] == '-')
+ add_intrinsic ("exit", chew_exit);
+ add_intrinsic ("swap", swap);
+ add_intrinsic ("outputdots", outputdots);
+ add_intrinsic ("paramstuff", paramstuff);
+ add_intrinsic ("maybecatstr", maybecatstr);
+ add_intrinsic ("translatecomments", translatecomments);
+ add_intrinsic ("kill_bogus_lines", kill_bogus_lines);
+ add_intrinsic ("indent", indent);
+ add_intrinsic ("internalmode", internalmode);
+ add_intrinsic ("print_stack_level", print_stack_level);
+ add_intrinsic ("strip_trailing_newlines", strip_trailing_newlines);
+
+ /* Put a nl at the start. */
+ catchar (&buffer, '\n');
+
+ read_in (&buffer, stdin);
+ remove_noncomments (&buffer, ptr);
+ for (i = 1; i < (unsigned int) ac; i++)
{
- if (av[i][1] == 'f')
- {
- string_type b;
- FILE *f;
- init_string(&b);
-
- f = fopen(av[i+1],"r");
- if (!f)
+ if (av[i][0] == '-')
{
- fprintf(stderr,"Can't open the input file %s\n",av[i+1]);
- return 33;
- }
+ if (av[i][1] == 'f')
+ {
+ string_type b;
+ FILE *f;
+ init_string (&b);
- read_in(&b, f);
- compile(b.ptr);
- perform();
- }
- else if (av[i][1] == 'i')
- {
- internal_wanted = 1;
- }
- else if (av[i][1] == 'w')
- {
- warning = 1;
- }
- else
- usage ();
+ f = fopen (av[i + 1], "r");
+ if (!f)
+ {
+ fprintf (stderr, "Can't open the input file %s\n",
+ av[i + 1]);
+ return 33;
+ }
+
+ read_in (&b, f);
+ compile (b.ptr);
+ perform ();
+ }
+ else if (av[i][1] == 'i')
+ {
+ internal_wanted = 1;
+ }
+ else if (av[i][1] == 'w')
+ {
+ warning = 1;
+ }
+ else
+ usage ();
+ }
}
- }
- write_buffer(stack+0, stdout);
+ write_buffer (stack + 0, stdout);
if (tos != stack)
{
- fprintf (stderr, "finishing with current stack level %d\n", tos - stack);
+ fprintf (stderr, "finishing with current stack level %d\n",
+ tos - stack);
return 1;
}
return 0;
diff --git a/gnu/usr.bin/binutils/bfd/ecoff.c b/gnu/usr.bin/binutils/bfd/ecoff.c
index 29e6c63f551..f765a4788b1 100644
--- a/gnu/usr.bin/binutils/bfd/ecoff.c
+++ b/gnu/usr.bin/binutils/bfd/ecoff.c
@@ -1,5 +1,5 @@
/* Generic ECOFF (Extended-COFF) routines.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -74,20 +74,28 @@ static unsigned int ecoff_armap_hash PARAMS ((CONST char *s,
static asection bfd_debug_section =
{
- /* name, index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */
- "*DEBUG*", 0, 0, 0, 0, 0, 0, 0,
- /* vma, lma, _cooked_size, _raw_size, output_offset, output_section, */
- 0, 0, 0, 0, 0, NULL,
- /* alig, reloc..., orel..., reloc_count, filepos, rel_..., line_... */
- 0, 0, 0, 0, 0, 0, 0,
- /* userdata, contents, lineno, lineno_count */
- 0, 0, 0, 0,
- /* comdat_info, moving_line_filepos, target_index, used_by_bfd, */
- NULL, 0, 0, 0,
- /* cons, owner, symbol */
- 0, 0, (struct symbol_cache_entry *) NULL,
- /* symbol_ptr_ptr, link_order_head, ..._tail */
- (struct symbol_cache_entry **) NULL, NULL, NULL
+ /* 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,
+ /* vma, lma, _cooked_size, _raw_size, */
+ 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,
+ /* comdat, kept_section, moving_line_filepos, */
+ NULL, NULL, 0,
+ /* target_index, used_by_bfd, constructor_chain, owner, */
+ 0, NULL, NULL, NULL,
+ /* symbol, */
+ (struct symbol_cache_entry *) NULL,
+ /* symbol_ptr_ptr, */
+ (struct symbol_cache_entry **) NULL,
+ /* link_order_head, link_order_tail */
+ NULL, NULL
};
/* Create an ECOFF object. */
@@ -345,9 +353,9 @@ ecoff_sec_to_styp_flags (name, flags)
}
else if (strcmp (name, _RCONST) == 0)
styp = STYP_RCONST;
- else if (flags & SEC_CODE)
+ else if (flags & SEC_CODE)
styp = STYP_TEXT;
- else if (flags & SEC_DATA)
+ else if (flags & SEC_DATA)
styp = STYP_DATA;
else if (flags & SEC_READONLY)
styp = STYP_RDATA;
@@ -364,7 +372,6 @@ ecoff_sec_to_styp_flags (name, flags)
/* Get the BFD flags to use for a section. */
-/*ARGSUSED*/
flagword
_bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -453,7 +460,7 @@ ecoff_slurp_symbolic_header (abfd)
HDRR *internal_symhdr;
/* See if we've already read it in. */
- if (ecoff_data (abfd)->debug_info.symbolic_header.magic ==
+ if (ecoff_data (abfd)->debug_info.symbolic_header.magic ==
backend->debug_swap.sym_magic)
return true;
@@ -510,7 +517,6 @@ ecoff_slurp_symbolic_header (abfd)
object file. This is called by gdb via the read_debug_info entry
point in the backend structure. */
-/*ARGSUSED*/
boolean
_bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
bfd *abfd;
@@ -1091,7 +1097,7 @@ ecoff_emit_aggregate (abfd, fdr, string, rndx, isym, which)
unsigned int ifd = rndx->rfd;
unsigned int indx = rndx->index;
const char *name;
-
+
if (ifd == 0xfff)
ifd = isym;
@@ -1341,7 +1347,6 @@ ecoff_type_to_string (abfd, fdr, indx)
p1 += strlen (buffer1);
}
-
/*
* Deal with any qualifiers.
*/
@@ -1407,7 +1412,7 @@ ecoff_type_to_string (abfd, fdr, indx)
int j;
/* Print array bounds reversed (ie, in the order the C
- programmer writes them). C is such a fun language.... */
+ programmer writes them). C is such a fun language.... */
while (i < 5 && qualifiers[i+1].type == tqArray)
i++;
@@ -1448,7 +1453,6 @@ ecoff_type_to_string (abfd, fdr, indx)
/* Return information about ECOFF symbol SYMBOL in RET. */
-/*ARGSUSED*/
void
_bfd_ecoff_get_symbol_info (abfd, symbol, ret)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -1460,7 +1464,6 @@ _bfd_ecoff_get_symbol_info (abfd, symbol, ret)
/* Return whether this is a local label. */
-/*ARGSUSED*/
boolean
_bfd_ecoff_bfd_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -1491,7 +1494,7 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how)
if (ecoffsymbol (symbol)->local)
{
SYMR ecoff_sym;
-
+
(*debug_swap->swap_sym_in) (abfd, ecoffsymbol (symbol)->native,
&ecoff_sym);
fprintf (file, "ecoff local ");
@@ -1605,7 +1608,7 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how)
fprintf (file, _("\n First symbol: %ld"),
(long) (indx + sym_base));
else
- fprintf (file, _("\n First symbol: %ld"),
+ fprintf (file, _("\n First symbol: %ld"),
((long)
(AUX_GET_ISYM (bigendian,
&aux_base[ecoff_ext.asym.index])
@@ -1681,7 +1684,7 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
if (_bfd_ecoff_slurp_symbol_table (abfd) == false)
return false;
-
+
internal_relocs = (arelent *) bfd_alloc (abfd,
(sizeof (arelent)
* section->reloc_count));
@@ -1779,7 +1782,7 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols)
{
unsigned int count;
- if (section->flags & SEC_CONSTRUCTOR)
+ if (section->flags & SEC_CONSTRUCTOR)
{
arelent_chain *chain;
@@ -1792,7 +1795,7 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols)
*relptr++ = &chain->relent;
}
else
- {
+ {
arelent *tblptr;
if (ecoff_slurp_reloc_table (abfd, section, symbols) == false)
@@ -1813,7 +1816,6 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols)
and return the name of the source file and the line nearest to the
wanted location. */
-/*ARGSUSED*/
boolean
_bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
filename_ptr, functionname_ptr, retline_ptr)
@@ -1985,7 +1987,6 @@ _bfd_ecoff_set_arch_mach (abfd, arch, machine)
/* Get the size of the section headers. */
-/*ARGSUSED*/
int
_bfd_ecoff_sizeof_headers (abfd, reloc)
bfd *abfd;
@@ -1997,8 +1998,8 @@ _bfd_ecoff_sizeof_headers (abfd, reloc)
c = 0;
for (current = abfd->sections;
- current != (asection *)NULL;
- current = current->next)
+ current != (asection *)NULL;
+ current = current->next)
++c;
ret = (bfd_coff_filhsz (abfd)
@@ -2219,13 +2220,13 @@ ecoff_compute_reloc_file_positions (abfd)
abort ();
abfd->output_has_begun = true;
}
-
+
reloc_base = ecoff_data (abfd)->reloc_filepos;
reloc_size = 0;
for (current = abfd->sections;
- current != (asection *)NULL;
- current = current->next)
+ current != (asection *)NULL;
+ current = current->next)
{
if (current->reloc_count == 0)
current->rel_filepos = 0;
@@ -2313,7 +2314,7 @@ bfd_ecoff_get_gp_value (abfd)
bfd_set_error (bfd_error_invalid_operation);
return 0;
}
-
+
return ecoff_data (abfd)->gp;
}
@@ -2492,8 +2493,8 @@ _bfd_ecoff_write_object_contents (abfd)
count = 1;
for (current = abfd->sections;
- current != (asection *)NULL;
- current = current->next)
+ current != (asection *)NULL;
+ current = current->next)
{
current->target_index = count;
++count;
@@ -2631,7 +2632,7 @@ _bfd_ecoff_write_object_contents (abfd)
/* Do nothing */ ;
else
abort ();
- }
+ }
/* Set up the file header. */
@@ -2783,7 +2784,7 @@ _bfd_ecoff_write_object_contents (abfd)
arelent *reloc;
asymbol *sym;
struct internal_reloc in;
-
+
memset ((PTR) &in, 0, sizeof in);
reloc = *reloc_ptr_ptr;
@@ -2983,7 +2984,7 @@ _bfd_ecoff_slurp_armap (abfd)
char *raw_ptr;
struct symdef *symdef_ptr;
char *stringbase;
-
+
/* Get the name of the first element. */
i = bfd_read ((PTR) nextname, 1, 16, abfd);
if (i == 0)
@@ -3035,11 +3036,11 @@ _bfd_ecoff_slurp_armap (abfd)
return false;
parsed_size = mapdata->parsed_size;
bfd_release (abfd, (PTR) mapdata);
-
+
raw_armap = (char *) bfd_alloc (abfd, parsed_size);
if (raw_armap == (char *) NULL)
return false;
-
+
if (bfd_read ((PTR) raw_armap, 1, parsed_size, abfd) != parsed_size)
{
if (bfd_get_error () != bfd_error_system_call)
@@ -3047,7 +3048,7 @@ _bfd_ecoff_slurp_armap (abfd)
bfd_release (abfd, (PTR) raw_armap);
return false;
}
-
+
ardata->tdata = (PTR) raw_armap;
count = bfd_h_get_32 (abfd, (PTR) raw_armap);
@@ -3076,7 +3077,7 @@ _bfd_ecoff_slurp_armap (abfd)
{
unsigned int name_offset, file_offset;
unsigned int hash, rehash, srch;
-
+
name_offset = bfd_h_get_32 (abfd, (PTR) raw_ptr);
file_offset = bfd_h_get_32 (abfd, (PTR) (raw_ptr + 4));
if (file_offset == 0)
@@ -3168,7 +3169,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
padit = stridx % 2;
stringsize = stridx + padit;
- /* Include 8 bytes to store symdefsize and stringsize in output. */
+ /* Include 8 bytes to store symdefsize and stringsize in output. */
mapsize = symdefsize + stringsize + 8;
firstreal = SARMAG + sizeof (struct ar_hdr) + mapsize + elength;
@@ -3202,7 +3203,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
#if 0
hdr.ar_mode[0] = '0';
#else
- /* Building gcc ends up extracting the armap as a file - twice. */
+ /* Building gcc ends up extracting the armap as a file - twice. */
hdr.ar_mode[0] = '6';
hdr.ar_mode[1] = '4';
hdr.ar_mode[2] = '4';
@@ -3215,8 +3216,8 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
/* Turn all null bytes in the header into spaces. */
for (i = 0; i < sizeof (struct ar_hdr); i++)
- if (((char *)(&hdr))[i] == '\0')
- (((char *)(&hdr))[i]) = ' ';
+ if (((char *) (&hdr))[i] == '\0')
+ (((char *) (&hdr))[i]) = ' ';
if (bfd_write ((PTR) &hdr, 1, sizeof (struct ar_hdr), abfd)
!= sizeof (struct ar_hdr))
@@ -3225,7 +3226,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
bfd_h_put_32 (abfd, (bfd_vma) hashsize, temp);
if (bfd_write ((PTR) temp, 1, 4, abfd) != 4)
return false;
-
+
hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize);
if (!hashtable)
return false;
@@ -3267,7 +3268,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
hash = srch;
}
-
+
bfd_h_put_32 (abfd, (bfd_vma) map[i].namidx,
(PTR) (hashtable + hash * 8));
bfd_h_put_32 (abfd, (bfd_vma) firstreal,
@@ -3346,7 +3347,7 @@ _bfd_ecoff_archive_p (abfd)
bfd_ardata (abfd)->symdefs = NULL;
bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->tdata = NULL;
-
+
if (_bfd_ecoff_slurp_armap (abfd) == false
|| _bfd_ecoff_slurp_extended_name_table (abfd) == false)
{
@@ -3354,7 +3355,7 @@ _bfd_ecoff_archive_p (abfd)
abfd->tdata.aout_ar_data = tdata_hold;
return (const bfd_target *) NULL;
}
-
+
if (bfd_has_map (abfd))
{
bfd *first;
@@ -4392,7 +4393,7 @@ ecoff_link_write_external (h, data)
bfd *output_bfd = einfo->abfd;
boolean strip;
- /* We need to check if this symbol is being stripped. */
+ /* We need to check if this symbol is being stripped. */
if (h->root.type == bfd_link_hash_undefined
|| h->root.type == bfd_link_hash_undefweak)
strip = false;
@@ -4428,7 +4429,7 @@ ecoff_link_write_external (h, data)
output_section = h->root.u.def.section->output_section;
name = bfd_section_name (output_section->owner, output_section);
-
+
if (strcmp (name, _TEXT) == 0)
h->esym.asym.sc = scText;
else if (strcmp (name, _DATA) == 0)
diff --git a/gnu/usr.bin/binutils/bfd/ecofflink.c b/gnu/usr.bin/binutils/bfd/ecofflink.c
index 25fc9664d2c..37b3538482e 100644
--- a/gnu/usr.bin/binutils/bfd/ecofflink.c
+++ b/gnu/usr.bin/binutils/bfd/ecofflink.c
@@ -1,5 +1,6 @@
/* Routines to link ECOFF debugging information.
- Copyright 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000
+ 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.
@@ -69,8 +70,8 @@ _bfd_ecoff_swap_tir_in (bigend, ext_copy, intern)
struct tir_ext ext[1];
*ext = *ext_copy; /* Make it reasonable to do in-place. */
-
- /* now the fun stuff... */
+
+ /* now the fun stuff... */
if (bigend) {
intern->fBitfield = 0 != (ext->t_bits1[0] & TIR_BITS1_FBITFIELD_BIG);
intern->continued = 0 != (ext->t_bits1[0] & TIR_BITS1_CONTINUED_BIG);
@@ -109,7 +110,7 @@ _bfd_ecoff_swap_tir_in (bigend, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -126,8 +127,8 @@ _bfd_ecoff_swap_tir_out (bigend, intern_copy, ext)
TIR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
- /* now the fun stuff... */
+
+ /* now the fun stuff... */
if (bigend) {
ext->t_bits1[0] = ((intern->fBitfield ? TIR_BITS1_FBITFIELD_BIG : 0)
| (intern->continued ? TIR_BITS1_CONTINUED_BIG : 0)
@@ -166,7 +167,7 @@ _bfd_ecoff_swap_tir_out (bigend, intern_copy, ext)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -182,8 +183,8 @@ _bfd_ecoff_swap_rndx_in (bigend, ext_copy, intern)
struct rndx_ext ext[1];
*ext = *ext_copy; /* Make it reasonable to do in-place. */
-
- /* now the fun stuff... */
+
+ /* now the fun stuff... */
if (bigend) {
intern->rfd = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_BIG)
| ((ext->r_bits[1] & RNDX_BITS1_RFD_BIG)
@@ -205,7 +206,7 @@ _bfd_ecoff_swap_rndx_in (bigend, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -221,8 +222,8 @@ _bfd_ecoff_swap_rndx_out (bigend, intern_copy, ext)
RNDXR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
- /* now the fun stuff... */
+
+ /* now the fun stuff... */
if (bigend) {
ext->r_bits[0] = intern->rfd >> RNDX_BITS0_RFD_SH_LEFT_BIG;
ext->r_bits[1] = (((intern->rfd << RNDX_BITS1_RFD_SH_BIG)
@@ -243,7 +244,7 @@ _bfd_ecoff_swap_rndx_out (bigend, intern_copy, ext)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -465,7 +466,7 @@ add_memory_shuffle (ainfo, head, tail, data, size)
unsigned long size;
{
struct shuffle *n;
-
+
n = (struct shuffle *) objalloc_alloc (ainfo->memory,
sizeof (struct shuffle));
if (!n)
@@ -488,7 +489,6 @@ add_memory_shuffle (ainfo, head, tail, data, size)
/* Initialize the FDR hash table. This returns a handle which is then
passed in to bfd_ecoff_debug_accumulate, et. al. */
-/*ARGSUSED*/
PTR
bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
bfd *output_bfd ATTRIBUTE_UNUSED;
@@ -547,7 +547,6 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
/* Free the accumulated debugging information. */
-/*ARGSUSED*/
void
bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info)
PTR handle;
@@ -557,7 +556,7 @@ bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info)
struct bfd_link_info *info;
{
struct accumulate *ainfo = (struct accumulate *) handle;
-
+
bfd_hash_table_free (&ainfo->fdr_hash.table);
if (! info->relocateable)
@@ -576,7 +575,6 @@ bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info)
linker information structure. HANDLE is returned by
bfd_ecoff_debug_init. */
-/*ARGSUSED*/
boolean
bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
input_bfd, input_debug, input_swap,
@@ -1409,7 +1407,6 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym)
/* Align the ECOFF debugging information. */
-/*ARGSUSED*/
static void
ecoff_align_debug (abfd, debug, swap)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -1967,9 +1964,9 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
boolean stabs;
FDR *fdr_ptr;
int i;
-
+
offset = line_info->cache.start;
-
+
/* Build FDR table (sorted by object file's base-address) if we
don't have it already. */
if (line_info->fdrtab == NULL
@@ -1981,7 +1978,7 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
/* find first FDR for address OFFSET */
i = fdrtab_lookup (line_info, offset);
if (i < 0)
- return false; /* no FDR, no fun... */
+ return false; /* no FDR, no fun... */
fdr_ptr = tab[i].fdr;
/* Check whether this file has stabs debugging information. In a
@@ -2046,9 +2043,9 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
malloc.c. I'm not sure why this happens, but it could
be due to optimizations that reorder a function's
position within an object-file.
-
+
Strategy:
-
+
On the first call to this function, we build a table of FDRs
that is sorted by the base-address of the object-file the FDR
is referring to. Notice that each object-file may contain
@@ -2079,9 +2076,9 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
bfd_vma dist, min_dist = 0;
char *pdr_hold;
char *pdr_end;
-
+
fdr_ptr = tab[i].fdr;
-
+
pdr_ptr = ((char *) debug_info->external_pdr
+ fdr_ptr->ipdFirst * external_pdr_size);
pdr_end = pdr_ptr + fdr_ptr->cpd * external_pdr_size;
@@ -2106,7 +2103,7 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
}
}
}
-
+
if (!best_pdr || min_dist < best_dist)
{
best_dist = min_dist;
@@ -2119,7 +2116,7 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
&& tab[i].base_addr == tab[i - 1].base_addr);
if (!best_fdr || !best_pdr)
- return false; /* shouldn't happen... */
+ return false; /* shouldn't happen... */
/* phew, finally we got something that we can hold onto: */
fdr_ptr = best_fdr;
diff --git a/gnu/usr.bin/binutils/bfd/ecoffswap.h b/gnu/usr.bin/binutils/bfd/ecoffswap.h
index 0d28d16883e..dd6fa6f32a0 100644
--- a/gnu/usr.bin/binutils/bfd/ecoffswap.h
+++ b/gnu/usr.bin/binutils/bfd/ecoffswap.h
@@ -1,5 +1,6 @@
/* Generic ECOFF swapping routines, for BFD.
- Copyright 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -27,10 +28,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
on them in gdb by naming the including source file; e.g.,
'coff-mips.c':ecoff_swap_hdr_in.
- Before including this header file, one of ECOFF_32 or ECOFF_64 must
- be defined. These are checked when swapping information that
- depends upon the target size. This code works for 32 bit and 64
- bit ECOFF, but may need to be generalized in the future.
+ Before including this header file, one of ECOFF_32, ECOFF_64,
+ ECOFF_SIGNED_32 or ECOFF_SIGNED_64 must be defined. These are
+ checked when swapping information that depends upon the target
+ size. This code works for 32 bit and 64 bit ECOFF, but may need to
+ be generalized in the future.
Some header file which defines the external forms of these
structures must also be included before including this header file.
@@ -50,6 +52,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ecoff_get_off bfd_h_get_64
#define ecoff_put_off bfd_h_put_64
#endif
+#ifdef ECOFF_SIGNED_32
+#define ecoff_get_off bfd_h_get_signed_32
+#define ecoff_put_off bfd_h_put_signed_32
+#endif
+#ifdef ECOFF_SIGNED_64
+#define ecoff_get_off bfd_h_get_signed_64
+#define ecoff_put_off bfd_h_put_signed_64
+#endif
/* ECOFF auxiliary information swapping routines. These are the same
for all ECOFF targets, so they are defined in ecofflink.c. */
@@ -122,7 +132,7 @@ ecoff_swap_hdr_in (abfd, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -167,7 +177,7 @@ ecoff_swap_hdr_out (abfd, intern_copy, ext_ptr)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -182,11 +192,11 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern)
struct fdr_ext ext[1];
*ext = *(struct fdr_ext *) ext_copy;
-
+
intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->f_adr);
intern->rss = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rss);
-#ifdef ECOFF_64
- if (intern->rss == 0xffffffff)
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
+ if (intern->rss == (signed long) 0xffffffff)
intern->rss = -1;
#endif
intern->issBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_issBase);
@@ -197,11 +207,11 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern)
intern->cline = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_cline);
intern->ioptBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_ioptBase);
intern->copt = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_copt);
-#ifdef ECOFF_32
+#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
intern->ipdFirst = bfd_h_get_16 (abfd, (bfd_byte *)ext->f_ipdFirst);
intern->cpd = bfd_h_get_16 (abfd, (bfd_byte *)ext->f_cpd);
#endif
-#ifdef ECOFF_64
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
intern->ipdFirst = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_ipdFirst);
intern->cpd = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_cpd);
#endif
@@ -210,7 +220,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern)
intern->rfdBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rfdBase);
intern->crfd = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_crfd);
- /* now the fun stuff... */
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
intern->lang = (ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
>> FDR_BITS1_LANG_SH_BIG;
@@ -235,7 +245,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -251,7 +261,7 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr)
FDR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
+
ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->f_adr);
bfd_h_put_32 (abfd, intern->rss, (bfd_byte *)ext->f_rss);
bfd_h_put_32 (abfd, intern->issBase, (bfd_byte *)ext->f_issBase);
@@ -262,11 +272,11 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr)
bfd_h_put_32 (abfd, intern->cline, (bfd_byte *)ext->f_cline);
bfd_h_put_32 (abfd, intern->ioptBase, (bfd_byte *)ext->f_ioptBase);
bfd_h_put_32 (abfd, intern->copt, (bfd_byte *)ext->f_copt);
-#ifdef ECOFF_32
+#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
bfd_h_put_16 (abfd, intern->ipdFirst, (bfd_byte *)ext->f_ipdFirst);
bfd_h_put_16 (abfd, intern->cpd, (bfd_byte *)ext->f_cpd);
#endif
-#ifdef ECOFF_64
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
bfd_h_put_32 (abfd, intern->ipdFirst, (bfd_byte *)ext->f_ipdFirst);
bfd_h_put_32 (abfd, intern->cpd, (bfd_byte *)ext->f_cpd);
#endif
@@ -275,7 +285,7 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr)
bfd_h_put_32 (abfd, intern->rfdBase, (bfd_byte *)ext->f_rfdBase);
bfd_h_put_32 (abfd, intern->crfd, (bfd_byte *)ext->f_crfd);
- /* now the fun stuff... */
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_BIG)
& FDR_BITS1_LANG_BIG)
@@ -303,7 +313,7 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -341,7 +351,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
intern->lnHigh = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_lnHigh);
intern->cbLineOffset = ecoff_get_off (abfd, (bfd_byte *)ext->p_cbLineOffset);
-#ifdef ECOFF_64
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
intern->gp_prologue = bfd_h_get_8 (abfd, (bfd_byte *) ext->p_gp_prologue);
if (bfd_header_big_endian (abfd))
{
@@ -364,11 +374,11 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
<< PDR_BITS2_RESERVED_SH_LEFT_LITTLE));
}
intern->localoff = bfd_h_get_8 (abfd, (bfd_byte *) ext->p_localoff);
-#endif
+#endif
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -384,7 +394,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
PDR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
+
ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->p_adr);
bfd_h_put_32 (abfd, intern->isym, (bfd_byte *)ext->p_isym);
bfd_h_put_32 (abfd, intern->iline, (bfd_byte *)ext->p_iline);
@@ -400,7 +410,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
bfd_h_put_32 (abfd, intern->lnHigh, (bfd_byte *)ext->p_lnHigh);
ecoff_put_off (abfd, intern->cbLineOffset, (bfd_byte *)ext->p_cbLineOffset);
-#ifdef ECOFF_64
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
bfd_h_put_8 (abfd, intern->gp_prologue, (bfd_byte *) ext->p_gp_prologue);
if (bfd_header_big_endian (abfd))
{
@@ -425,17 +435,17 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
& PDR_BITS2_RESERVED_LITTLE);
}
bfd_h_put_8 (abfd, intern->localoff, (bfd_byte *) ext->p_localoff);
-#endif
+#endif
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#else /* MPW_C */
/* Same routines, but with ECOFF_64 code removed, so ^&%$#&! MPW C doesn't
- corrupt itself and then freak out. */
+ corrupt itself and then freak out. */
/* Swap in the procedure descriptor record. */
static void
@@ -447,7 +457,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
struct pdr_ext ext[1];
*ext = *(struct pdr_ext *) ext_copy;
-
+
intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->p_adr);
intern->isym = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_isym);
intern->iline = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_iline);
@@ -468,7 +478,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -484,7 +494,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
PDR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
+
ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->p_adr);
bfd_h_put_32 (abfd, intern->isym, (bfd_byte *)ext->p_isym);
bfd_h_put_32 (abfd, intern->iline, (bfd_byte *)ext->p_iline);
@@ -502,7 +512,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#endif /* MPW_C */
@@ -518,11 +528,11 @@ ecoff_swap_sym_in (abfd, ext_copy, intern)
struct sym_ext ext[1];
*ext = *(struct sym_ext *) ext_copy;
-
+
intern->iss = bfd_h_get_32 (abfd, (bfd_byte *)ext->s_iss);
intern->value = ecoff_get_off (abfd, (bfd_byte *)ext->s_value);
- /* now the fun stuff... */
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
intern->st = (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
>> SYM_BITS1_ST_SH_BIG;
@@ -552,7 +562,7 @@ ecoff_swap_sym_in (abfd, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -568,11 +578,11 @@ ecoff_swap_sym_out (abfd, intern_copy, ext_ptr)
SYMR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
+
bfd_h_put_32 (abfd, intern->iss, (bfd_byte *)ext->s_iss);
ecoff_put_off (abfd, intern->value, (bfd_byte *)ext->s_value);
- /* now the fun stuff... */
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_BIG)
& SYM_BITS1_ST_BIG)
@@ -601,7 +611,7 @@ ecoff_swap_sym_out (abfd, intern_copy, ext_ptr)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -616,8 +626,8 @@ ecoff_swap_ext_in (abfd, ext_copy, intern)
struct ext_ext ext[1];
*ext = *(struct ext_ext *) ext_copy;
-
- /* now the fun stuff... */
+
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
intern->jmptbl = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG);
intern->cobol_main = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG);
@@ -629,10 +639,10 @@ ecoff_swap_ext_in (abfd, ext_copy, intern)
}
intern->reserved = 0;
-#ifdef ECOFF_32
+#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
intern->ifd = bfd_h_get_signed_16 (abfd, (bfd_byte *)ext->es_ifd);
#endif
-#ifdef ECOFF_64
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
intern->ifd = bfd_h_get_signed_32 (abfd, (bfd_byte *)ext->es_ifd);
#endif
@@ -640,7 +650,7 @@ ecoff_swap_ext_in (abfd, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -656,14 +666,14 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr)
EXTR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
- /* now the fun stuff... */
+
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_BIG : 0)
| (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_BIG : 0)
| (intern->weakext ? EXT_BITS1_WEAKEXT_BIG : 0));
ext->es_bits2[0] = 0;
-#ifdef ECOFF_64
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
ext->es_bits2[1] = 0;
ext->es_bits2[2] = 0;
#endif
@@ -672,16 +682,16 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr)
| (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_LITTLE : 0)
| (intern->weakext ? EXT_BITS1_WEAKEXT_LITTLE : 0));
ext->es_bits2[0] = 0;
-#ifdef ECOFF_64
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
ext->es_bits2[1] = 0;
ext->es_bits2[2] = 0;
#endif
}
-#ifdef ECOFF_32
+#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
bfd_h_put_signed_16 (abfd, intern->ifd, (bfd_byte *)ext->es_ifd);
#endif
-#ifdef ECOFF_64
+#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
bfd_h_put_signed_32 (abfd, intern->ifd, (bfd_byte *)ext->es_ifd);
#endif
@@ -689,7 +699,7 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -707,7 +717,7 @@ ecoff_swap_rfd_in (abfd, ext_ptr, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -725,7 +735,7 @@ ecoff_swap_rfd_out (abfd, intern, ext_ptr)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -766,7 +776,7 @@ ecoff_swap_opt_in (abfd, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -805,7 +815,7 @@ ecoff_swap_opt_out (abfd, intern_copy, ext_ptr)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -826,7 +836,7 @@ ecoff_swap_dnr_in (abfd, ext_copy, intern)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
@@ -848,6 +858,6 @@ ecoff_swap_dnr_out (abfd, intern_copy, ext_ptr)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
diff --git a/gnu/usr.bin/binutils/bfd/elf-bfd.h b/gnu/usr.bin/binutils/bfd/elf-bfd.h
index 0dcecdf5884..b1622909a73 100644
--- a/gnu/usr.bin/binutils/bfd/elf-bfd.h
+++ b/gnu/usr.bin/binutils/bfd/elf-bfd.h
@@ -1,6 +1,6 @@
/* BFD back-end data structures for ELF files.
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000 Free Software
- Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -27,6 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf/external.h"
#include "bfdlink.h"
+/* The number of entries in a section is its size divided by the size
+ of a single entry. This is normally only applicaable to reloc and
+ symbol table sections. */
+#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize)
+
/* If size isn't specified as 64 or 32, NAME macro should fail. */
#ifndef NAME
#if ARCH_SIZE==64
@@ -208,7 +213,7 @@ struct elf_link_local_dynamic_entry
/* The index in the outgoing dynamic symbol table. */
long dynindx;
-
+
/* A copy of the input symbol. */
Elf_Internal_Sym isym;
};
@@ -243,6 +248,9 @@ struct elf_link_hash_table
PTR stab_info;
/* A linked list of local symbols to be added to .dynsym. */
struct elf_link_local_dynamic_entry *dynlocal;
+ /* A linked list of DT_RPATH/DT_RUNPATH names found in dynamic
+ objects included in the link. */
+ struct bfd_link_needed_list *runpath;
};
/* Look up an entry in an ELF linker hash table. */
@@ -372,9 +380,9 @@ struct elf_backend_data
unsigned int));
/* A function to set the type of the info field. Processor-specific
- types should be handled here. */
- int (*elf_backend_get_symbol_type) PARAMS (( Elf_Internal_Sym *, int));
-
+ types should be handled here. */
+ int (*elf_backend_get_symbol_type) PARAMS (( Elf_Internal_Sym *, int));
+
/* A function to do additional processing on the ELF section header
just before writing it out. This is used to set the flags and
type fields for some sections, or to actually write out data for
@@ -388,8 +396,13 @@ struct elf_backend_data
Elf32_Internal_Shdr *,
char *));
+ /* A function to convert machine dependent section header flags to
+ BFD internal section header flags. */
+ boolean (*elf_backend_section_flags) PARAMS ((flagword *,
+ Elf32_Internal_Shdr *));
+
/* A function to handle unusual program segment types when creating BFD
- sections from ELF program segments. */
+ sections from ELF program segments. */
boolean (*elf_backend_section_from_phdr) PARAMS ((bfd *,
Elf32_Internal_Phdr *,
int));
@@ -601,7 +614,7 @@ struct elf_backend_data
/* Modify any information related to dynamic linking such that the
symbol is not exported. */
void (*elf_backend_hide_symbol)
- PARAMS ((struct elf_link_hash_entry *));
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
/* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */
@@ -638,7 +651,7 @@ struct elf_backend_data
both REL and RELA relocations, and this flag is set for those
backends.) */
unsigned may_use_rel_p : 1;
-
+
/* Whether the backend may use RELA relocations. (Some backends use
both REL and RELA relocations, and this flag is set for those
backends.) */
@@ -647,8 +660,8 @@ struct elf_backend_data
/* Whether the default relocation type is RELA. If a backend with
this flag set wants REL relocations for a particular section,
it must note that explicitly. Similarly, if this flag is clear,
- and the backend wants RELA relocations for a particular
- section. */
+ and the backend wants RELA relocations for a particular
+ section. */
unsigned default_use_rela_p : 1;
/* True if addresses "naturally" sign extend. This is used when
@@ -788,14 +801,14 @@ struct elf_obj_tdata
file_ptr next_file_pos;
#if 0
/* we don't need these inside bfd anymore, and I think
- these weren't used outside bfd. */
+ these weren't used outside bfd. */
void *prstatus; /* The raw /proc prstatus structure */
void *prpsinfo; /* The raw /proc prpsinfo structure */
#endif
bfd_vma gp; /* The gp value (MIPS only, for now) */
unsigned int gp_size; /* The gp size (MIPS only, for now) */
- /* Information grabbed from an elf core file. */
+ /* Information grabbed from an elf core file. */
int core_signal;
int core_pid;
int core_lwpid;
@@ -817,7 +830,7 @@ struct elf_obj_tdata
document the intent of any particular piece of code. The field
should be used as a count until size_dynamic_sections, at which
point the contents of the .got is fixed. Afterward, if an entry
- is -1, then the symbol does not require a global offset table entry. */
+ is -1, then the symbol does not require a global offset table entry. */
union
{
bfd_signed_vma *refcounts;
@@ -838,6 +851,14 @@ struct elf_obj_tdata
one. */
const char *dt_name;
+ /* When a reference in a regular object is resolved by a shared
+ object is loaded into via the DT_NEEDED entries by the linker
+ ELF emulation code, we need to add the shared object to the
+ DT_NEEDED list of the resulting binary to indicate the dependency
+ as if the -l option is passed to the linker. This field holds the
+ name of the loaded shared object. */
+ const char *dt_soname;
+
/* Irix 5 often screws up the symbol table, sorting local symbols
after global symbols. This flag is set if the symbol table in
this BFD appears to be screwed up. If it is, we ignore the
@@ -857,11 +878,11 @@ struct elf_obj_tdata
find_nearest_line. */
struct mips_elf_find_line *find_line_info;
- /* A place to stash dwarf1 info for this bfd. */
+ /* A place to stash dwarf1 info for this bfd. */
struct dwarf1_debug *dwarf1_find_line_info;
- /* A place to stash dwarf2 info for this bfd. */
- struct dwarf2_debug *dwarf2_find_line_info;
+ /* A place to stash dwarf2 info for this bfd. */
+ PTR dwarf2_find_line_info;
/* An array of stub sections indexed by symbol number, used by the
MIPS ELF linker. FIXME: We should figure out some way to only
@@ -885,6 +906,13 @@ struct elf_obj_tdata
/* Linker sections that we are interested in. */
struct elf_linker_section *linker_section[ (int)LINKER_SECTION_MAX ];
+
+ /* The Irix 5 support uses two virtual sections, which represent
+ text/data symbols defined in dynamic objects. */
+ asymbol *elf_data_symbol;
+ asymbol *elf_text_symbol;
+ asection *elf_data_section;
+ asection *elf_text_section;
};
#define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data)
@@ -908,6 +936,7 @@ struct elf_obj_tdata
#define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets)
#define elf_local_ptr_offsets(bfd) (elf_tdata(bfd) -> linker_section_pointers)
#define elf_dt_name(bfd) (elf_tdata(bfd) -> dt_name)
+#define elf_dt_soname(bfd) (elf_tdata(bfd) -> dt_soname)
#define elf_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab)
#define elf_flags_init(bfd) (elf_tdata(bfd) -> flags_init)
#define elf_linker_section(bfd,n) (elf_tdata(bfd) -> linker_section[(int)n])
@@ -970,7 +999,7 @@ extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create
extern void _bfd_elf_link_hash_copy_indirect
PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
extern void _bfd_elf_link_hash_hide_symbol
- PARAMS ((struct elf_link_hash_entry *));
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
extern boolean _bfd_elf_link_hash_table_init
PARAMS ((struct elf_link_hash_table *, bfd *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
@@ -1006,14 +1035,14 @@ extern boolean _bfd_elf_set_arch_mach PARAMS ((bfd *, enum bfd_architecture,
unsigned long));
extern boolean _bfd_elf_find_nearest_line PARAMS ((bfd *, asection *,
asymbol **,
- bfd_vma, CONST char **,
- CONST char **,
+ bfd_vma, const char **,
+ const char **,
unsigned int *));
#define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
extern int _bfd_elf_sizeof_headers PARAMS ((bfd *, boolean));
extern boolean _bfd_elf_new_section_hook PARAMS ((bfd *, asection *));
-extern boolean _bfd_elf_init_reloc_shdr
+extern boolean _bfd_elf_init_reloc_shdr
PARAMS ((bfd *, Elf_Internal_Shdr *, asection *, boolean));
/* If the target doesn't have reloc handling written yet: */
@@ -1142,6 +1171,10 @@ extern long bfd_elf32_slurp_symbol_table
extern boolean bfd_elf32_write_shdrs_and_ehdr PARAMS ((bfd *));
extern int bfd_elf32_write_out_phdrs
PARAMS ((bfd *, const Elf_Internal_Phdr *, int));
+extern void bfd_elf32_write_relocs
+ PARAMS ((bfd *, asection *, PTR));
+extern boolean bfd_elf32_slurp_reloc_table
+ PARAMS ((bfd *, asection *, asymbol **, boolean));
extern boolean bfd_elf32_add_dynamic_entry
PARAMS ((struct bfd_link_info *, bfd_vma, bfd_vma));
extern boolean bfd_elf32_link_create_dynamic_sections
@@ -1185,6 +1218,10 @@ extern long bfd_elf64_slurp_symbol_table
extern boolean bfd_elf64_write_shdrs_and_ehdr PARAMS ((bfd *));
extern int bfd_elf64_write_out_phdrs
PARAMS ((bfd *, const Elf_Internal_Phdr *, int));
+extern void bfd_elf64_write_relocs
+ PARAMS ((bfd *, asection *, PTR));
+extern boolean bfd_elf64_slurp_reloc_table
+ PARAMS ((bfd *, asection *, asymbol **, boolean));
extern boolean bfd_elf64_add_dynamic_entry
PARAMS ((struct bfd_link_info *, bfd_vma, bfd_vma));
extern boolean bfd_elf64_link_create_dynamic_sections
@@ -1274,11 +1311,11 @@ extern boolean _bfd_mips_elf_finish_dynamic_symbol
Elf_Internal_Sym *));
extern boolean _bfd_mips_elf_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
-extern asection * _bfd_mips_elf_gc_mark_hook
+extern asection * _bfd_mips_elf_gc_mark_hook
PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));
-extern boolean _bfd_mips_elf_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
+extern boolean _bfd_mips_elf_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
extern boolean _bfd_mips_elf_always_size_sections
PARAMS ((bfd *, struct bfd_link_info *));
@@ -1289,7 +1326,7 @@ extern boolean _bfd_mips_elf_check_relocs
const Elf_Internal_Rela *));
extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create
PARAMS ((bfd *));
-extern boolean _bfd_mips_elf_print_private_bfd_data
+extern boolean _bfd_mips_elf_print_private_bfd_data
PARAMS ((bfd *, PTR));
extern boolean _bfd_mips_elf_link_output_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
diff --git a/gnu/usr.bin/binutils/bfd/elf.c b/gnu/usr.bin/binutils/bfd/elf.c
index 70ed24cc94e..0afda164edf 100644
--- a/gnu/usr.bin/binutils/bfd/elf.c
+++ b/gnu/usr.bin/binutils/bfd/elf.c
@@ -1,5 +1,6 @@
/* ELF executable support for BFD.
- Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -31,6 +32,8 @@ SECTION
haven't bothered yet.
*/
+/* For sparc64-cross-sparc32. */
+#define _SYSCALL32
#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
@@ -54,6 +57,10 @@ static INLINE int sym_is_global PARAMS ((bfd *, asymbol *));
static boolean elf_map_symbols PARAMS ((bfd *));
static bfd_size_type get_program_header_size PARAMS ((bfd *));
static boolean elfcore_read_notes PARAMS ((bfd *, bfd_vma, bfd_vma));
+static boolean elf_find_function PARAMS ((bfd *, asection *,
+ asymbol **,
+ bfd_vma, const char **,
+ const char **));
/* Swap version information in and out. The version information is
currently size independent. If that ever changes, this code will
@@ -227,11 +234,11 @@ bfd_elf_hash (namearg)
/* Read a specified number of bytes at a specified offset in an ELF
file, into a newly allocated buffer, and return a pointer to the
- buffer. */
+ buffer. */
static char *
elf_read (abfd, offset, size)
- bfd * abfd;
+ bfd *abfd;
long offset;
unsigned int size;
{
@@ -252,31 +259,31 @@ elf_read (abfd, offset, size)
boolean
bfd_elf_mkobject (abfd)
- bfd * abfd;
+ bfd *abfd;
{
- /* this just does initialization */
- /* coff_mkobject zalloc's space for tdata.coff_obj_data ... */
+ /* This just does initialization. */
+ /* coff_mkobject zalloc's space for tdata.coff_obj_data ... */
elf_tdata (abfd) = (struct elf_obj_tdata *)
bfd_zalloc (abfd, sizeof (struct elf_obj_tdata));
if (elf_tdata (abfd) == 0)
return false;
- /* since everything is done at close time, do we need any
- initialization? */
+ /* Since everything is done at close time, do we need any
+ initialization? */
return true;
}
boolean
bfd_elf_mkcorefile (abfd)
- bfd * abfd;
+ bfd *abfd;
{
- /* I think this can be done just like an object file. */
+ /* I think this can be done just like an object file. */
return bfd_elf_mkobject (abfd);
}
char *
bfd_elf_get_str_section (abfd, shindex)
- bfd * abfd;
+ bfd *abfd;
unsigned int shindex;
{
Elf_Internal_Shdr **i_shdrp;
@@ -291,7 +298,7 @@ bfd_elf_get_str_section (abfd, shindex)
shstrtab = (char *) i_shdrp[shindex]->contents;
if (shstrtab == NULL)
{
- /* No cached one, attempt to read, and cache what we read. */
+ /* No cached one, attempt to read, and cache what we read. */
offset = i_shdrp[shindex]->sh_offset;
shstrtabsize = i_shdrp[shindex]->sh_size;
shstrtab = elf_read (abfd, offset, shstrtabsize);
@@ -302,7 +309,7 @@ bfd_elf_get_str_section (abfd, shindex)
char *
bfd_elf_string_from_elf_section (abfd, shindex, strindex)
- bfd * abfd;
+ bfd *abfd;
unsigned int shindex;
unsigned int strindex;
{
@@ -343,6 +350,7 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
{
asection *newsect;
flagword flags;
+ struct elf_backend_data *bed;
if (hdr->bfd_section != NULL)
{
@@ -381,10 +389,23 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
/* The debugging sections appear to be recognized only by name, not
any sort of flag. */
- if (strncmp (name, ".debug", sizeof ".debug" - 1) == 0
- || strncmp (name, ".line", sizeof ".line" - 1) == 0
- || strncmp (name, ".stab", sizeof ".stab" - 1) == 0)
- flags |= SEC_DEBUGGING;
+ {
+ static const char *debug_sec_names [] =
+ {
+ ".debug",
+ ".gnu.linkonce.wi.",
+ ".line",
+ ".stab"
+ };
+ int i;
+
+ for (i = sizeof (debug_sec_names) / sizeof (debug_sec_names[0]); i--;)
+ if (strncmp (name, debug_sec_names[i], strlen (debug_sec_names[i])) == 0)
+ break;
+
+ if (i >= 0)
+ flags |= SEC_DEBUGGING;
+ }
/* As a GNU extension, if the name begins with .gnu.linkonce, we
only link a single copy of the section. This is used to support
@@ -395,6 +416,11 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+ bed = get_elf_backend_data (abfd);
+ if (bed->elf_backend_section_flags)
+ if (! bed->elf_backend_section_flags (&flags, hdr))
+ return false;
+
if (! bfd_set_section_flags (abfd, newsect, flags))
return false;
@@ -457,7 +483,7 @@ DESCRIPTION
struct elf_internal_shdr *
bfd_elf_find_section (abfd, name)
- bfd * abfd;
+ bfd *abfd;
char *name;
{
Elf_Internal_Shdr **i_shdrp;
@@ -497,7 +523,6 @@ const char *const bfd_elf_section_type_names[] = {
function. It just short circuits the reloc if producing
relocateable output against an external symbol. */
-/*ARGSUSED*/
bfd_reloc_status_type
bfd_elf_generic_reloc (abfd,
reloc_entry,
@@ -653,13 +678,40 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
case DT_DEBUG: name = "DEBUG"; break;
case DT_TEXTREL: name = "TEXTREL"; break;
case DT_JMPREL: name = "JMPREL"; break;
- case DT_AUXILIARY: name = "AUXILIARY"; stringp = true; break;
- case DT_FILTER: name = "FILTER"; stringp = true; break;
+ case DT_BIND_NOW: name = "BIND_NOW"; break;
+ case DT_INIT_ARRAY: name = "INIT_ARRAY"; break;
+ case DT_FINI_ARRAY: name = "FINI_ARRAY"; break;
+ case DT_INIT_ARRAYSZ: name = "INIT_ARRAYSZ"; break;
+ case DT_FINI_ARRAYSZ: name = "FINI_ARRAYSZ"; break;
+ case DT_RUNPATH: name = "RUNPATH"; stringp = true; break;
+ case DT_FLAGS: name = "FLAGS"; break;
+ case DT_PREINIT_ARRAY: name = "PREINIT_ARRAY"; break;
+ case DT_PREINIT_ARRAYSZ: name = "PREINIT_ARRAYSZ"; break;
+ case DT_CHECKSUM: name = "CHECKSUM"; break;
+ case DT_PLTPADSZ: name = "PLTPADSZ"; break;
+ case DT_MOVEENT: name = "MOVEENT"; break;
+ case DT_MOVESZ: name = "MOVESZ"; break;
+ case DT_FEATURE: name = "FEATURE"; break;
+ case DT_POSFLAG_1: name = "POSFLAG_1"; break;
+ case DT_SYMINSZ: name = "SYMINSZ"; break;
+ case DT_SYMINENT: name = "SYMINENT"; break;
+ case DT_CONFIG: name = "CONFIG"; stringp = true; break;
+ case DT_DEPAUDIT: name = "DEPAUDIT"; stringp = true; break;
+ case DT_AUDIT: name = "AUDIT"; stringp = true; break;
+ case DT_PLTPAD: name = "PLTPAD"; break;
+ case DT_MOVETAB: name = "MOVETAB"; break;
+ case DT_SYMINFO: name = "SYMINFO"; break;
+ case DT_RELACOUNT: name = "RELACOUNT"; break;
+ case DT_RELCOUNT: name = "RELCOUNT"; break;
+ case DT_FLAGS_1: name = "FLAGS_1"; break;
case DT_VERSYM: name = "VERSYM"; break;
case DT_VERDEF: name = "VERDEF"; break;
case DT_VERDEFNUM: name = "VERDEFNUM"; break;
case DT_VERNEED: name = "VERNEED"; break;
case DT_VERNEEDNUM: name = "VERNEEDNUM"; break;
+ case DT_AUXILIARY: name = "AUXILIARY"; stringp = true; break;
+ case DT_USED: name = "USED"; break;
+ case DT_FILTER: name = "FILTER"; stringp = true; break;
}
fprintf (f, " %-11s ", name);
@@ -758,20 +810,20 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
break;
case bfd_print_symbol_all:
{
- CONST char *section_name;
- CONST char *name = NULL;
+ const char *section_name;
+ const char *name = NULL;
struct elf_backend_data *bed;
unsigned char st_other;
-
+
section_name = symbol->section ? symbol->section->name : "(*none*)";
bed = get_elf_backend_data (abfd);
if (bed->elf_backend_print_symbol_all)
- name = (*bed->elf_backend_print_symbol_all) (abfd, filep, symbol);
+ name = (*bed->elf_backend_print_symbol_all) (abfd, filep, symbol);
if (name == NULL)
{
- name = symbol->name;
+ name = symbol->name;
bfd_print_symbol_vandf ((PTR) file, symbol);
}
@@ -838,7 +890,7 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
/* If the st_other field is not zero, print it. */
st_other = ((elf_symbol_type *) symbol)->internal_elf_sym.st_other;
-
+
switch (st_other)
{
case 0: break;
@@ -950,12 +1002,14 @@ _bfd_elf_link_hash_copy_indirect (dir, ind)
}
void
-_bfd_elf_link_hash_hide_symbol(h)
+_bfd_elf_link_hash_hide_symbol (info, h)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
struct elf_link_hash_entry *h;
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- h->dynindx = -1;
h->plt.offset = (bfd_vma) -1;
+ if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ h->dynindx = -1;
}
/* Initialize an ELF linker hash table. */
@@ -975,6 +1029,7 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
table->dynstr = NULL;
table->bucketcount = 0;
table->needed = NULL;
+ table->runpath = NULL;
table->hgot = NULL;
table->stab_info = NULL;
table->dynlocal = NULL;
@@ -1018,6 +1073,16 @@ bfd_elf_set_dt_needed_name (abfd, name)
elf_dt_name (abfd) = name;
}
+void
+bfd_elf_set_dt_needed_soname (abfd, name)
+ bfd *abfd;
+ const char *name;
+{
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && bfd_get_format (abfd) == bfd_object)
+ elf_dt_soname (abfd) = name;
+}
+
/* Get the list of DT_NEEDED entries for a link. This is a hook for
the linker ELF emulation code. */
@@ -1031,6 +1096,19 @@ bfd_elf_get_needed_list (abfd, info)
return elf_hash_table (info)->needed;
}
+/* Get the list of DT_RPATH/DT_RUNPATH entries for a link. This is a
+ hook for the linker ELF emulation code. */
+
+struct bfd_link_needed_list *
+bfd_elf_get_runpath_list (abfd, info)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+{
+ if (info->hash->creator->flavour != bfd_target_elf_flavour)
+ return NULL;
+ return elf_hash_table (info)->runpath;
+}
+
/* Get the name actually used for a dynamic object for a link. This
is the SONAME entry if there is one. Otherwise, it is the string
passed to bfd_elf_set_dt_needed_name, or it is the filename. */
@@ -1155,7 +1233,7 @@ _bfd_elf_stringtab_init ()
/* ELF .o/exec file reading */
-/* Create a new bfd section from an ELF section header. */
+/* Create a new bfd section from an ELF section header. */
boolean
bfd_section_from_shdr (abfd, shindex)
@@ -1328,8 +1406,10 @@ bfd_section_from_shdr (abfd, shindex)
/* If this reloc section does not use the main symbol table we
don't treat it as a reloc section. BFD can't adequately
represent such a section, so at least for now, we don't
- try. We just present it as a normal section. */
- if (hdr->sh_link != elf_onesymtab (abfd))
+ try. We just present it as a normal section. We also
+ can't use it as a reloc section if it points to the null
+ section. */
+ if (hdr->sh_link != elf_onesymtab (abfd) || hdr->sh_info == SHN_UNDEF)
return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
if (! bfd_section_from_shdr (abfd, hdr->sh_info))
@@ -1349,7 +1429,7 @@ bfd_section_from_shdr (abfd, shindex)
}
*hdr2 = *hdr;
elf_elfsections (abfd)[shindex] = hdr2;
- target_sect->reloc_count += hdr->sh_size / hdr->sh_entsize;
+ target_sect->reloc_count += NUM_SHDR_ENTRIES (hdr);
target_sect->flags |= SEC_RELOC;
target_sect->relocation = NULL;
target_sect->rel_filepos = hdr->sh_offset;
@@ -1423,7 +1503,7 @@ _bfd_elf_new_section_hook (abfd, sec)
sec->used_by_bfd = (PTR) sdata;
/* Indicate whether or not this section should use RELA relocations. */
- sdata->use_rela_p
+ sdata->use_rela_p
= get_elf_backend_data (abfd)->default_use_rela_p;
return true;
@@ -1486,7 +1566,7 @@ _bfd_elf_make_section_from_phdr (abfd, hdr, index, typename)
if (hdr->p_flags & PF_X)
{
/* FIXME: all we known is that it has execute PERMISSION,
- may be data. */
+ may be data. */
newsect->flags |= SEC_CODE;
}
}
@@ -1558,7 +1638,7 @@ bfd_section_from_phdr (abfd, hdr, index)
default:
/* Check for any processor-specific program segment types.
- If no handler for them, default to making "segment" sections. */
+ If no handler for them, default to making "segment" sections. */
bed = get_elf_backend_data (abfd);
if (bed->elf_backend_section_from_phdr)
return (*bed->elf_backend_section_from_phdr) (abfd, hdr, index);
@@ -1606,7 +1686,6 @@ _bfd_elf_init_reloc_shdr (abfd, rel_hdr, asect, use_rela_p)
/* Set up an ELF internal section header for a section. */
-/*ARGSUSED*/
static void
elf_fake_sections (abfd, asect, failedptrarg)
bfd *abfd;
@@ -1720,16 +1799,10 @@ elf_fake_sections (abfd, asect, failedptrarg)
|| this_hdr->sh_info == elf_tdata (abfd)->cverrefs);
}
else if ((asect->flags & SEC_ALLOC) != 0
- && (asect->flags & SEC_LOAD) != 0)
- this_hdr->sh_type = SHT_PROGBITS;
- else if ((asect->flags & SEC_ALLOC) != 0
- && ((asect->flags & SEC_LOAD) == 0))
+ && ((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0))
this_hdr->sh_type = SHT_NOBITS;
else
- {
- /* Who knows? */
- this_hdr->sh_type = SHT_PROGBITS;
- }
+ this_hdr->sh_type = SHT_PROGBITS;
if ((asect->flags & SEC_ALLOC) != 0)
this_hdr->sh_flags |= SHF_ALLOC;
@@ -1745,11 +1818,11 @@ elf_fake_sections (abfd, asect, failedptrarg)
/* If the section has relocs, set up a section header for the
SHT_REL[A] section. If two relocation sections are required for
this section, it is up to the processor-specific back-end to
- create the other. */
+ create the other. */
if ((asect->flags & SEC_RELOC) != 0
- && !_bfd_elf_init_reloc_shdr (abfd,
+ && !_bfd_elf_init_reloc_shdr (abfd,
&elf_section_data (asect)->rel_hdr,
- asect,
+ asect,
elf_section_data (asect)->use_rela_p))
*failedptr = true;
}
@@ -1766,7 +1839,6 @@ assign_section_numbers (abfd)
asection *sec;
unsigned int section_number;
Elf_Internal_Shdr **i_shdrp;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
section_number = 1;
@@ -1901,7 +1973,7 @@ assign_section_numbers (abfd)
/* This is a .stab section. */
elf_section_data (s)->this_hdr.sh_entsize =
- 4 + 2 * (bed->s->arch_size / 8);
+ 4 + 2 * bfd_get_arch_size (abfd) / 8;
}
}
break;
@@ -1990,7 +2062,7 @@ elf_map_symbols (abfd)
for (idx = 0; idx < symcount; idx++)
{
sym = syms[idx];
-
+
if ((sym->flags & BSF_SECTION_SYM) != 0
&& sym->value == 0)
{
@@ -2004,7 +2076,7 @@ elf_map_symbols (abfd)
{
if (sec->output_offset != 0)
continue;
-
+
sec = sec->output_section;
/* Empty sections in the input files may have had a section
@@ -2903,18 +2975,21 @@ assign_file_positions_for_segments (abfd)
if (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core)
{
- if (i == 0) /* the actual "note" segment */
- { /* this one actually contains everything. */
+ /* The actual "note" segment has i == 0.
+ This is the one that actually contains everything. */
+ if (i == 0)
+ {
sec->filepos = off;
p->p_filesz = sec->_raw_size;
off += sec->_raw_size;
voff = off;
}
- else /* fake sections -- don't need to be written */
+ else
{
+ /* Fake sections -- don't need to be written. */
sec->filepos = 0;
sec->_raw_size = 0;
- flags = sec->flags = 0; /* no contents */
+ flags = sec->flags = 0;
}
p->p_memsz = 0;
p->p_align = 1;
@@ -3228,7 +3303,7 @@ prep_headers (abfd)
i_ehdrp->e_machine = EM_NONE;
break;
case bfd_arch_sparc:
- if (bed->s->arch_size == 64)
+ if (bfd_get_arch_size (abfd) == 64)
i_ehdrp->e_machine = EM_SPARCV9;
else
i_ehdrp->e_machine = EM_SPARC;
@@ -3237,7 +3312,19 @@ prep_headers (abfd)
i_ehdrp->e_machine = EM_S370;
break;
case bfd_arch_i386:
- i_ehdrp->e_machine = EM_386;
+ if (bfd_get_arch_size (abfd) == 64)
+ i_ehdrp->e_machine = EM_X86_64;
+ else
+ i_ehdrp->e_machine = EM_386;
+ break;
+ case bfd_arch_ia64:
+ i_ehdrp->e_machine = EM_IA_64;
+ break;
+ case bfd_arch_m68hc11:
+ i_ehdrp->e_machine = EM_68HC11;
+ break;
+ case bfd_arch_m68hc12:
+ i_ehdrp->e_machine = EM_68HC12;
break;
case bfd_arch_m68k:
i_ehdrp->e_machine = EM_68K;
@@ -3288,10 +3375,10 @@ prep_headers (abfd)
case 0: i_ehdrp->e_machine = EM_CYGNUS_V850; break;
}
break;
- case bfd_arch_arc:
+ case bfd_arch_arc:
i_ehdrp->e_machine = EM_CYGNUS_ARC;
break;
- case bfd_arch_arm:
+ case bfd_arch_arm:
i_ehdrp->e_machine = EM_ARM;
break;
case bfd_arch_m32r:
@@ -3306,31 +3393,34 @@ prep_headers (abfd)
case bfd_arch_pj:
i_ehdrp->e_machine = EM_PJ;
break;
- /* also note that EM_M32, AT&T WE32100 is unknown to bfd */
+ case bfd_arch_cris:
+ i_ehdrp->e_machine = EM_CRIS;
+ break;
+ /* Also note that EM_M32, AT&T WE32100 is unknown to bfd. */
default:
i_ehdrp->e_machine = EM_NONE;
}
i_ehdrp->e_version = bed->s->ev_current;
i_ehdrp->e_ehsize = bed->s->sizeof_ehdr;
- /* no program header, for now. */
+ /* No program header, for now. */
i_ehdrp->e_phoff = 0;
i_ehdrp->e_phentsize = 0;
i_ehdrp->e_phnum = 0;
- /* each bfd section is section header entry */
+ /* Each bfd section is section header entry. */
i_ehdrp->e_entry = bfd_get_start_address (abfd);
i_ehdrp->e_shentsize = bed->s->sizeof_shdr;
- /* if we're building an executable, we'll need a program header table */
+ /* If we're building an executable, we'll need a program header table. */
if (abfd->flags & EXEC_P)
{
- /* it all happens later */
+ /* It all happens later. */
#if 0
i_ehdrp->e_phentsize = sizeof (Elf_External_Phdr);
/* elf_build_phdrs() returns a (NULL-terminated) array of
- Elf_Internal_Phdrs */
+ Elf_Internal_Phdrs. */
i_phdrp = elf_build_phdrs (abfd, i_ehdrp, i_shdrp, &i_ehdrp->e_phnum);
i_ehdrp->e_phoff = outbase;
outbase += i_ehdrp->e_phentsize * i_ehdrp->e_phnum;
@@ -3410,7 +3500,7 @@ _bfd_elf_write_object_contents (abfd)
_bfd_elf_assign_file_positions_for_relocs (abfd);
- /* After writing the headers, we need to write the sections too... */
+ /* After writing the headers, we need to write the sections too... */
for (count = 1; count < i_ehdrp->e_shnum; count++)
{
if (bed->elf_backend_section_processing)
@@ -3441,10 +3531,12 @@ boolean
_bfd_elf_write_corefile_contents (abfd)
bfd *abfd;
{
- /* Hopefully this can be done just like an object file. */
+ /* Hopefully this can be done just like an object file. */
return _bfd_elf_write_object_contents (abfd);
}
-/* given a section, search the header to find them... */
+
+/* Given a section, search the header to find them. */
+
int
_bfd_elf_section_from_bfd_section (abfd, asect)
bfd *abfd;
@@ -3553,14 +3645,18 @@ copy_private_bfd_data (ibfd, obfd)
bfd *ibfd;
bfd *obfd;
{
- Elf_Internal_Ehdr *iehdr;
- struct elf_segment_map *mfirst;
- struct elf_segment_map **pm;
- struct elf_segment_map *m;
- Elf_Internal_Phdr *p;
- unsigned int i;
- unsigned int num_segments;
- boolean phdr_included = false;
+ Elf_Internal_Ehdr * iehdr;
+ struct elf_segment_map * map;
+ struct elf_segment_map * map_first;
+ struct elf_segment_map ** pointer_to_map;
+ Elf_Internal_Phdr * segment;
+ asection * section;
+ unsigned int i;
+ unsigned int num_segments;
+ boolean phdr_included = false;
+ bfd_vma maxpagesize;
+ struct elf_segment_map * phdr_adjust_seg = NULL;
+ unsigned int phdr_adjust_num = 0;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -3571,119 +3667,214 @@ copy_private_bfd_data (ibfd, obfd)
iehdr = elf_elfheader (ibfd);
- mfirst = NULL;
- pm = &mfirst;
+ map_first = NULL;
+ pointer_to_map = &map_first;
num_segments = elf_elfheader (ibfd)->e_phnum;
-
-#define IS_CONTAINED_BY(addr, len, bottom, phdr) \
- ((addr) >= (bottom) \
- && ( ((addr) + (len)) <= ((bottom) + (phdr)->p_memsz) \
- || ((addr) + (len)) <= ((bottom) + (phdr)->p_filesz)))
-
- /* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */
-
-#define IS_COREFILE_NOTE(p, s) \
- (p->p_type == PT_NOTE \
- && bfd_get_format (ibfd) == bfd_core \
- && s->vma == 0 && s->lma == 0 \
- && (bfd_vma) s->filepos >= p->p_offset \
- && (bfd_vma) s->filepos + s->_raw_size \
+ maxpagesize = get_elf_backend_data (obfd)->maxpagesize;
+
+ /* Returns the end address of the segment + 1. */
+#define SEGMENT_END(segment, start) \
+ (start + (segment->p_memsz > segment->p_filesz \
+ ? segment->p_memsz : segment->p_filesz))
+
+ /* Returns true if the given section is contained within
+ the given segment. VMA addresses are compared. */
+#define IS_CONTAINED_BY_VMA(section, segment) \
+ (section->vma >= segment->p_vaddr \
+ && (section->vma + section->_raw_size) \
+ <= (SEGMENT_END (segment, segment->p_vaddr)))
+
+ /* Returns true if the given section is contained within
+ the given segment. LMA addresses are compared. */
+#define IS_CONTAINED_BY_LMA(section, segment, base) \
+ (section->lma >= base \
+ && (section->lma + section->_raw_size) \
+ <= SEGMENT_END (segment, base))
+
+ /* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */
+#define IS_COREFILE_NOTE(p, s) \
+ (p->p_type == PT_NOTE \
+ && bfd_get_format (ibfd) == bfd_core \
+ && s->vma == 0 && s->lma == 0 \
+ && (bfd_vma) s->filepos >= p->p_offset \
+ && (bfd_vma) s->filepos + s->_raw_size \
<= p->p_offset + p->p_filesz)
/* The complicated case when p_vaddr is 0 is to handle the Solaris
linker, which generates a PT_INTERP section with p_vaddr and
p_memsz set to 0. */
-
-#define IS_SOLARIS_PT_INTERP(p, s) \
- (p->p_vaddr == 0 \
- && p->p_filesz > 0 \
- && (s->flags & SEC_HAS_CONTENTS) != 0 \
- && s->_raw_size > 0 \
- && (bfd_vma) s->filepos >= p->p_offset \
- && ((bfd_vma) s->filepos + s->_raw_size \
+#define IS_SOLARIS_PT_INTERP(p, s) \
+ ( p->p_vaddr == 0 \
+ && p->p_filesz > 0 \
+ && (s->flags & SEC_HAS_CONTENTS) != 0 \
+ && s->_raw_size > 0 \
+ && (bfd_vma) s->filepos >= p->p_offset \
+ && ((bfd_vma) s->filepos + s->_raw_size \
<= p->p_offset + p->p_filesz))
+ /* Decide if the given section should be included in the given segment.
+ A section will be included if:
+ 1. It is within the address space of the segment,
+ 2. It is an allocated segment,
+ 3. There is an output section associated with it,
+ 4. The section has not already been allocated to a previous segment. */
+#define INCLUDE_SECTION_IN_SEGMENT(section, segment) \
+ ((((IS_CONTAINED_BY_VMA (section, segment) \
+ || IS_SOLARIS_PT_INTERP (segment, section)) \
+ && (section->flags & SEC_ALLOC) != 0) \
+ || IS_COREFILE_NOTE (segment, section)) \
+ && section->output_section != NULL \
+ && section->segment_mark == false)
+
+ /* Returns true iff seg1 starts after the end of seg2. */
+#define SEGMENT_AFTER_SEGMENT(seg1, seg2) \
+ (seg1->p_vaddr >= SEGMENT_END (seg2, seg2->p_vaddr))
+
+ /* Returns true iff seg1 and seg2 overlap. */
+#define SEGMENT_OVERLAPS(seg1, seg2) \
+ (!(SEGMENT_AFTER_SEGMENT (seg1, seg2) || SEGMENT_AFTER_SEGMENT (seg2, seg1)))
+
+ /* Initialise the segment mark field. */
+ for (section = ibfd->sections; section != NULL; section = section->next)
+ section->segment_mark = false;
+
/* Scan through the segments specified in the program header
- of the input BFD. */
- for (i = 0, p = elf_tdata (ibfd)->phdr; i < num_segments; i++, p++)
+ of the input BFD. For this first scan we look for overlaps
+ in the loadable segments. These can be created by wierd
+ parameters to objcopy. */
+ for (i = 0, segment = elf_tdata (ibfd)->phdr;
+ i < num_segments;
+ i++, segment++)
{
- unsigned int csecs;
- asection *s;
- asection **sections;
- asection *os;
- unsigned int isec;
- bfd_vma matching_lma;
- bfd_vma suggested_lma;
unsigned int j;
+ Elf_Internal_Phdr *segment2;
- /* For each section in the input BFD, decide if it should be
- included in the current segment. A section will be included
- if it is within the address space of the segment, and it is
- an allocated segment, and there is an output section
- associated with it. */
- csecs = 0;
- for (s = ibfd->sections; s != NULL; s = s->next)
- if (s->output_section != NULL)
- {
- if ((IS_CONTAINED_BY (s->vma, s->_raw_size, p->p_vaddr, p)
- || IS_SOLARIS_PT_INTERP (p, s))
- && (s->flags & SEC_ALLOC) != 0)
- ++csecs;
- else if (IS_COREFILE_NOTE (p, s))
- ++csecs;
- }
+ if (segment->p_type != PT_LOAD)
+ continue;
+
+ /* Determine if this segment overlaps any previous segments. */
+ for (j = 0, segment2 = elf_tdata (ibfd)->phdr; j < i; j++, segment2 ++)
+ {
+ bfd_signed_vma extra_length;
+
+ if (segment2->p_type != PT_LOAD
+ || ! SEGMENT_OVERLAPS (segment, segment2))
+ continue;
+
+ /* Merge the two segments together. */
+ if (segment2->p_vaddr < segment->p_vaddr)
+ {
+ /* Extend SEGMENT2 to include SEGMENT and then delete
+ SEGMENT. */
+ extra_length =
+ SEGMENT_END (segment, segment->p_vaddr)
+ - SEGMENT_END (segment2, segment2->p_vaddr);
+
+ if (extra_length > 0)
+ {
+ segment2->p_memsz += extra_length;
+ segment2->p_filesz += extra_length;
+ }
+
+ segment->p_type = PT_NULL;
+
+ /* Since we have deleted P we must restart the outer loop. */
+ i = 0;
+ segment = elf_tdata (ibfd)->phdr;
+ break;
+ }
+ else
+ {
+ /* Extend SEGMENT to include SEGMENT2 and then delete
+ SEGMENT2. */
+ extra_length =
+ SEGMENT_END (segment2, segment2->p_vaddr)
+ - SEGMENT_END (segment, segment->p_vaddr);
+
+ if (extra_length > 0)
+ {
+ segment->p_memsz += extra_length;
+ segment->p_filesz += extra_length;
+ }
+
+ segment2->p_type = PT_NULL;
+ }
+ }
+ }
+
+ /* The second scan attempts to assign sections to segments. */
+ for (i = 0, segment = elf_tdata (ibfd)->phdr;
+ i < num_segments;
+ i ++, segment ++)
+ {
+ unsigned int section_count;
+ asection ** sections;
+ asection * output_section;
+ unsigned int isec;
+ bfd_vma matching_lma;
+ bfd_vma suggested_lma;
+ unsigned int j;
+
+ if (segment->p_type == PT_NULL)
+ continue;
+
+ /* Compute how many sections might be placed into this segment. */
+ section_count = 0;
+ for (section = ibfd->sections; section != NULL; section = section->next)
+ if (INCLUDE_SECTION_IN_SEGMENT (section, segment))
+ ++section_count;
/* Allocate a segment map big enough to contain all of the
sections we have selected. */
- m = ((struct elf_segment_map *)
+ map = ((struct elf_segment_map *)
bfd_alloc (obfd,
(sizeof (struct elf_segment_map)
- + ((size_t) csecs - 1) * sizeof (asection *))));
- if (m == NULL)
+ + ((size_t) section_count - 1) * sizeof (asection *))));
+ if (map == NULL)
return false;
/* Initialise the fields of the segment map. Default to
using the physical address of the segment in the input BFD. */
- m->next = NULL;
- m->p_type = p->p_type;
- m->p_flags = p->p_flags;
- m->p_flags_valid = 1;
- m->p_paddr = p->p_paddr;
- m->p_paddr_valid = 1;
+ map->next = NULL;
+ map->p_type = segment->p_type;
+ map->p_flags = segment->p_flags;
+ map->p_flags_valid = 1;
+ map->p_paddr = segment->p_paddr;
+ map->p_paddr_valid = 1;
/* Determine if this segment contains the ELF file header
and if it contains the program headers themselves. */
- m->includes_filehdr = (p->p_offset == 0
- && p->p_filesz >= iehdr->e_ehsize);
+ map->includes_filehdr = (segment->p_offset == 0
+ && segment->p_filesz >= iehdr->e_ehsize);
- m->includes_phdrs = 0;
+ map->includes_phdrs = 0;
- if (! phdr_included || p->p_type != PT_LOAD)
+ if (! phdr_included || segment->p_type != PT_LOAD)
{
- m->includes_phdrs =
- (p->p_offset <= (bfd_vma) iehdr->e_phoff
- && (p->p_offset + p->p_filesz
+ map->includes_phdrs =
+ (segment->p_offset <= (bfd_vma) iehdr->e_phoff
+ && (segment->p_offset + segment->p_filesz
>= ((bfd_vma) iehdr->e_phoff
+ iehdr->e_phnum * iehdr->e_phentsize)));
- if (p->p_type == PT_LOAD && m->includes_phdrs)
+
+ if (segment->p_type == PT_LOAD && map->includes_phdrs)
phdr_included = true;
}
- if (csecs == 0)
+ if (section_count == 0)
{
/* Special segments, such as the PT_PHDR segment, may contain
no sections, but ordinary, loadable segments should contain
something. */
-
- if (p->p_type == PT_LOAD)
+ if (segment->p_type == PT_LOAD)
_bfd_error_handler
(_("%s: warning: Empty loadable segment detected\n"),
bfd_get_filename (ibfd));
- m->count = 0;
- *pm = m;
- pm = &m->next;
+ map->count = 0;
+ *pointer_to_map = map;
+ pointer_to_map = &map->next;
continue;
}
@@ -3716,7 +3907,8 @@ copy_private_bfd_data (ibfd, obfd)
pointers that we are interested in. As these sections get assigned
to a segment, they are removed from this array. */
- sections = (asection **) bfd_malloc (sizeof (asection *) * csecs);
+ sections = (asection **) bfd_malloc
+ (sizeof (asection *) * section_count);
if (sections == NULL)
return false;
@@ -3726,70 +3918,67 @@ copy_private_bfd_data (ibfd, obfd)
case, where the sections have not been moved, this means that
we have completely filled the segment, and there is nothing
more to do. */
-
isec = 0;
matching_lma = 0;
suggested_lma = 0;
- for (j = 0, s = ibfd->sections; s != NULL; s = s->next)
+ for (j = 0, section = ibfd->sections;
+ section != NULL;
+ section = section->next)
{
- os = s->output_section;
-
- if ((((IS_CONTAINED_BY (s->vma, s->_raw_size, p->p_vaddr, p)
- || IS_SOLARIS_PT_INTERP (p, s))
- && (s->flags & SEC_ALLOC) != 0)
- || IS_COREFILE_NOTE (p, s))
- && os != NULL)
+ if (INCLUDE_SECTION_IN_SEGMENT (section, segment))
{
- sections[j++] = s;
+ output_section = section->output_section;
+
+ sections[j ++] = section;
/* The Solaris native linker always sets p_paddr to 0.
We try to catch that case here, and set it to the
correct value. */
- if (p->p_paddr == 0
- && p->p_vaddr != 0
+ if (segment->p_paddr == 0
+ && segment->p_vaddr != 0
&& isec == 0
- && os->lma != 0
- && (os->vma == (p->p_vaddr
- + (m->includes_filehdr
- ? iehdr->e_ehsize
- : 0)
- + (m->includes_phdrs
- ? iehdr->e_phnum * iehdr->e_phentsize
- : 0))))
- m->p_paddr = p->p_vaddr;
+ && output_section->lma != 0
+ && (output_section->vma == (segment->p_vaddr
+ + (map->includes_filehdr
+ ? iehdr->e_ehsize
+ : 0)
+ + (map->includes_phdrs
+ ? iehdr->e_phnum * iehdr->e_phentsize
+ : 0))))
+ map->p_paddr = segment->p_vaddr;
/* Match up the physical address of the segment with the
LMA address of the output section. */
- if (IS_CONTAINED_BY (os->lma, os->_raw_size, m->p_paddr, p)
- || IS_COREFILE_NOTE (p, s))
+ if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
+ || IS_COREFILE_NOTE (segment, section))
{
if (matching_lma == 0)
- matching_lma = os->lma;
+ matching_lma = output_section->lma;
/* We assume that if the section fits within the segment
- that it does not overlap any other section within that
+ then it does not overlap any other section within that
segment. */
- m->sections[isec++] = os;
+ map->sections[isec ++] = output_section;
}
else if (suggested_lma == 0)
- suggested_lma = os->lma;
+ suggested_lma = output_section->lma;
}
}
- BFD_ASSERT (j == csecs);
+ BFD_ASSERT (j == section_count);
/* Step Two: Adjust the physical address of the current segment,
if necessary. */
- if (isec == csecs)
+ if (isec == section_count)
{
/* All of the sections fitted within the segment as currently
specified. This is the default case. Add the segment to
the list of built segments and carry on to process the next
program header in the input BFD. */
- m->count = csecs;
- *pm = m;
- pm = &m->next;
+ map->count = section_count;
+ *pointer_to_map = map;
+ pointer_to_map = &map->next;
free (sections);
continue;
@@ -3801,25 +3990,33 @@ copy_private_bfd_data (ibfd, obfd)
/* At least one section fits inside the current segment.
Keep it, but modify its physical address to match the
LMA of the first section that fitted. */
-
- m->p_paddr = matching_lma;
+ map->p_paddr = matching_lma;
}
else
{
/* None of the sections fitted inside the current segment.
Change the current segment's physical address to match
the LMA of the first section. */
-
- m->p_paddr = suggested_lma;
+ map->p_paddr = suggested_lma;
}
- /* Offset the segment physical address from the lma to allow
- for space taken up by elf headers. */
- if (m->includes_filehdr)
- m->p_paddr -= iehdr->e_ehsize;
+ /* Offset the segment physical address from the lma
+ to allow for space taken up by elf headers. */
+ if (map->includes_filehdr)
+ map->p_paddr -= iehdr->e_ehsize;
- if (m->includes_phdrs)
- m->p_paddr -= iehdr->e_phnum * iehdr->e_phentsize;
+ if (map->includes_phdrs)
+ {
+ map->p_paddr -= iehdr->e_phnum * iehdr->e_phentsize;
+
+ /* iehdr->e_phnum is just an estimate of the number
+ of program headers that we will need. Make a note
+ here of the number we used and the segment we chose
+ to hold these headers, so that we can adjust the
+ offset when we know the correct value. */
+ phdr_adjust_num = iehdr->e_phnum;
+ phdr_adjust_seg = map;
+ }
}
/* Step Three: Loop over the sections again, this time assigning
@@ -3832,97 +4029,99 @@ copy_private_bfd_data (ibfd, obfd)
isec = 0;
do
{
- m->count = 0;
+ map->count = 0;
suggested_lma = 0;
/* Fill the current segment with sections that fit. */
- for (j = 0; j < csecs; j++)
+ for (j = 0; j < section_count; j++)
{
- s = sections[j];
+ section = sections[j];
- if (s == NULL)
+ if (section == NULL)
continue;
- os = s->output_section;
+ output_section = section->output_section;
- if (IS_CONTAINED_BY (os->lma, os->_raw_size, m->p_paddr, p)
- || IS_COREFILE_NOTE (p, s))
+ BFD_ASSERT (output_section != NULL);
+
+ if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
+ || IS_COREFILE_NOTE (segment, section))
{
- if (m->count == 0)
+ if (map->count == 0)
{
/* If the first section in a segment does not start at
- the beginning of the segment, then something is wrong. */
- if (os->lma != (m->p_paddr
- + (m->includes_filehdr
- ? iehdr->e_ehsize : 0)
- + (m->includes_phdrs
- ? iehdr->e_phnum * iehdr->e_phentsize
- : 0)))
+ the beginning of the segment, then something is
+ wrong. */
+ if (output_section->lma !=
+ (map->p_paddr
+ + (map->includes_filehdr ? iehdr->e_ehsize : 0)
+ + (map->includes_phdrs
+ ? iehdr->e_phnum * iehdr->e_phentsize
+ : 0)))
abort ();
}
else
{
asection * prev_sec;
- bfd_vma maxpagesize;
- prev_sec = m->sections[m->count - 1];
- maxpagesize = get_elf_backend_data (obfd)->maxpagesize;
+ prev_sec = map->sections[map->count - 1];
/* If the gap between the end of the previous section
- and the start of this section is more than maxpagesize
- then we need to start a new segment. */
- if (BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size, maxpagesize)
- < BFD_ALIGN (os->lma, maxpagesize))
+ and the start of this section is more than
+ maxpagesize then we need to start a new segment. */
+ if ((BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size, maxpagesize)
+ < BFD_ALIGN (output_section->lma, maxpagesize))
+ || ((prev_sec->lma + prev_sec->_raw_size) > output_section->lma))
{
if (suggested_lma == 0)
- suggested_lma = os->lma;
+ suggested_lma = output_section->lma;
continue;
}
}
- m->sections[m->count++] = os;
+ map->sections[map->count++] = output_section;
++isec;
sections[j] = NULL;
+ section->segment_mark = true;
}
else if (suggested_lma == 0)
- suggested_lma = os->lma;
+ suggested_lma = output_section->lma;
}
- BFD_ASSERT (m->count > 0);
+ BFD_ASSERT (map->count > 0);
/* Add the current segment to the list of built segments. */
- *pm = m;
- pm = &m->next;
+ *pointer_to_map = map;
+ pointer_to_map = &map->next;
- if (isec < csecs)
+ if (isec < section_count)
{
/* We still have not allocated all of the sections to
segments. Create a new segment here, initialise it
and carry on looping. */
-
- m = ((struct elf_segment_map *)
- bfd_alloc (obfd,
- (sizeof (struct elf_segment_map)
- + ((size_t) csecs - 1) * sizeof (asection *))));
- if (m == NULL)
+ map = ((struct elf_segment_map *)
+ bfd_alloc (obfd,
+ (sizeof (struct elf_segment_map)
+ + ((size_t) section_count - 1)
+ * sizeof (asection *))));
+ if (map == NULL)
return false;
/* Initialise the fields of the segment map. Set the physical
physical address to the LMA of the first section that has
not yet been assigned. */
-
- m->next = NULL;
- m->p_type = p->p_type;
- m->p_flags = p->p_flags;
- m->p_flags_valid = 1;
- m->p_paddr = suggested_lma;
- m->p_paddr_valid = 1;
- m->includes_filehdr = 0;
- m->includes_phdrs = 0;
+ map->next = NULL;
+ map->p_type = segment->p_type;
+ map->p_flags = segment->p_flags;
+ map->p_flags_valid = 1;
+ map->p_paddr = suggested_lma;
+ map->p_paddr_valid = 1;
+ map->includes_filehdr = 0;
+ map->includes_phdrs = 0;
}
}
- while (isec < csecs);
+ while (isec < section_count);
free (sections);
}
@@ -3931,44 +4130,65 @@ copy_private_bfd_data (ibfd, obfd)
p_paddr fields are zero. When we try to objcopy or strip such a
file, we get confused. Check for this case, and if we find it
reset the p_paddr_valid fields. */
- for (m = mfirst; m != NULL; m = m->next)
- if (m->p_paddr != 0)
+ for (map = map_first; map != NULL; map = map->next)
+ if (map->p_paddr != 0)
break;
- if (m == NULL)
+ if (map == NULL)
{
- for (m = mfirst; m != NULL; m = m->next)
- m->p_paddr_valid = 0;
+ for (map = map_first; map != NULL; map = map->next)
+ map->p_paddr_valid = 0;
}
- elf_tdata (obfd)->segment_map = mfirst;
+ elf_tdata (obfd)->segment_map = map_first;
+
+ /* If we had to estimate the number of program headers that were
+ going to be needed, then check our estimate know and adjust
+ the offset if necessary. */
+ if (phdr_adjust_seg != NULL)
+ {
+ unsigned int count;
+
+ for (count = 0, map = map_first; map != NULL; map = map->next)
+ count++;
+
+ if (count > phdr_adjust_num)
+ phdr_adjust_seg->p_paddr
+ -= (count - phdr_adjust_num) * iehdr->e_phentsize;
+ }
#if 0
- /* Final Step: Sort the segments into ascending order of physical address. */
- if (mfirst != NULL)
+ /* Final Step: Sort the segments into ascending order of physical
+ address. */
+ if (map_first != NULL)
{
- struct elf_segment_map* prev;
+ struct elf_segment_map *prev;
- prev = mfirst;
- for (m = mfirst->next; m != NULL; prev = m, m = m->next)
+ prev = map_first;
+ for (map = map_first->next; map != NULL; prev = map, map = map->next)
{
- /* Yes I know - its a bubble sort....*/
- if (m->next != NULL && (m->next->p_paddr < m->p_paddr))
+ /* Yes I know - its a bubble sort.... */
+ if (map->next != NULL && (map->next->p_paddr < map->p_paddr))
{
- /* swap m and m->next */
- prev->next = m->next;
- m->next = m->next->next;
- prev->next->next = m;
+ /* Swap map and map->next. */
+ prev->next = map->next;
+ map->next = map->next->next;
+ prev->next->next = map;
- /* restart loop. */
- m = mfirst;
+ /* Restart loop. */
+ map = map_first;
}
}
}
#endif
-#undef IS_CONTAINED_BY
-#undef IS_SOLARIS_PT_INTERP
+#undef SEGMENT_END
+#undef IS_CONTAINED_BY_VMA
+#undef IS_CONTAINED_BY_LMA
#undef IS_COREFILE_NOTE
+#undef IS_SOLARIS_PT_INTERP
+#undef INCLUDE_SECTION_IN_SEGMENT
+#undef SEGMENT_AFTER_SEGMENT
+#undef SEGMENT_OVERLAPS
return true;
}
@@ -4090,7 +4310,7 @@ swap_out_syms (abfd, sttp, relocatable_p)
if (!elf_map_symbols (abfd))
return false;
- /* Dump out the symtabs. */
+ /* Dump out the symtabs. */
{
int symcount = bfd_get_symcount (abfd);
asymbol **syms = bfd_get_outsymbols (abfd);
@@ -4141,9 +4361,11 @@ swap_out_syms (abfd, sttp, relocatable_p)
flagword flags = syms[idx]->flags;
int type;
- if (flags & BSF_SECTION_SYM)
- /* Section symbols have no names. */
- sym.st_name = 0;
+ if ((flags & BSF_SECTION_SYM) != 0)
+ {
+ /* Section symbols have no name. */
+ sym.st_name = 0;
+ }
else
{
sym.st_name = (unsigned long) _bfd_stringtab_add (stt,
@@ -4515,8 +4737,8 @@ _bfd_elf_slurp_version_tables (abfd)
{
_bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem);
- if ((iverdefmem.vd_ndx & VERSYM_VERSION) > maxidx)
- maxidx = iverdefmem.vd_ndx & VERSYM_VERSION;
+ if ((iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION)) > maxidx)
+ maxidx = iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION);
everdef = ((Elf_External_Verdef *)
((bfd_byte *) everdef + iverdefmem.vd_next));
@@ -4759,52 +4981,24 @@ _bfd_elf_set_arch_mach (abfd, arch, machine)
return bfd_default_set_arch_mach (abfd, arch, machine);
}
-/* Find the nearest line to a particular section and offset, for error
- reporting. */
+/* Find the function to a particular section and offset,
+ for error reporting. */
-boolean
-_bfd_elf_find_nearest_line (abfd,
- section,
- symbols,
- offset,
- filename_ptr,
- functionname_ptr,
- line_ptr)
- bfd *abfd;
+static boolean
+elf_find_function (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr)
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *section;
asymbol **symbols;
bfd_vma offset;
- CONST char **filename_ptr;
- CONST char **functionname_ptr;
- unsigned int *line_ptr;
+ const char **filename_ptr;
+ const char **functionname_ptr;
{
- boolean found;
const char *filename;
asymbol *func;
bfd_vma low_func;
asymbol **p;
- if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
- filename_ptr, functionname_ptr,
- line_ptr))
- return true;
-
- if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
- filename_ptr, functionname_ptr,
- line_ptr, 0))
- return true;
-
- if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
- &found, filename_ptr,
- functionname_ptr, line_ptr,
- &elf_tdata (abfd)->line_info))
- return false;
- if (found)
- return true;
-
- if (symbols == NULL)
- return false;
-
filename = NULL;
func = NULL;
low_func = 0;
@@ -4841,8 +5035,70 @@ _bfd_elf_find_nearest_line (abfd,
if (func == NULL)
return false;
- *filename_ptr = filename;
- *functionname_ptr = bfd_asymbol_name (func);
+ 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. */
+
+boolean
+_bfd_elf_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr, line_ptr)
+ bfd *abfd;
+ asection *section;
+ asymbol **symbols;
+ bfd_vma offset;
+ const char **filename_ptr;
+ const char **functionname_ptr;
+ unsigned int *line_ptr;
+{
+ boolean found;
+
+ if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr))
+ {
+ if (!*functionname_ptr)
+ elf_find_function (abfd, section, symbols, offset,
+ *filename_ptr ? NULL : filename_ptr,
+ functionname_ptr);
+
+ return true;
+ }
+
+ 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)
+ 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)
+ return true;
+
+ if (symbols == NULL)
+ return false;
+
+ if (! elf_find_function (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr))
+ return false;
+
*line_ptr = 0;
return true;
}
@@ -4912,7 +5168,7 @@ _bfd_elf_validate_reloc (abfd, areloc)
bfd *abfd;
arelent *areloc;
{
- /* Check whether we really have an ELF howto. */
+ /* Check whether we really have an ELF howto. */
if ((*areloc->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec)
{
@@ -4920,7 +5176,7 @@ _bfd_elf_validate_reloc (abfd, areloc)
reloc_howto_type *howto;
/* Alien reloc: Try to determine its type to replace it with an
- equivalent ELF reloc. */
+ equivalent ELF reloc. */
if (areloc->howto->pc_relative)
{
@@ -5033,48 +5289,44 @@ _bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg)
{
return bfd_reloc_ok;
}
-
/* Elf core file support. Much of this only works on native
toolchains, since we rely on knowing the
machine-dependent procfs structure in order to pick
- out details about the corefile. */
+ out details about the corefile. */
#ifdef HAVE_SYS_PROCFS_H
# include <sys/procfs.h>
#endif
-
-/* Define offsetof for those systems which lack it. */
+/* Define offsetof for those systems which lack it. */
#ifndef offsetof
# define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
#endif
-
-/* FIXME: this is kinda wrong, but it's what gdb wants. */
+/* FIXME: this is kinda wrong, but it's what gdb wants. */
static int
elfcore_make_pid (abfd)
- bfd* abfd;
+ bfd *abfd;
{
return ((elf_tdata (abfd)->core_lwpid << 16)
+ (elf_tdata (abfd)->core_pid));
}
-
/* If there isn't a section called NAME, make one, using
data from SECT. Note, this function will generate a
reference to NAME, so you shouldn't deallocate or
- overwrite it. */
+ overwrite it. */
static boolean
elfcore_maybe_make_sect (abfd, name, sect)
- bfd* abfd;
- char* name;
- asection* sect;
+ bfd *abfd;
+ char *name;
+ asection *sect;
{
- asection* sect2;
+ asection *sect2;
if (bfd_get_section_by_name (abfd, name) != NULL)
return true;
@@ -5090,9 +5342,8 @@ elfcore_maybe_make_sect (abfd, name, sect)
return true;
}
-
/* prstatus_t exists on:
- solaris 2.[567]
+ solaris 2.5+
linux 2.[01] + glibc
unixware 4.2
*/
@@ -5100,33 +5351,68 @@ elfcore_maybe_make_sect (abfd, name, sect)
#if defined (HAVE_PRSTATUS_T)
static boolean
elfcore_grok_prstatus (abfd, note)
- bfd* abfd;
- Elf_Internal_Note* note;
+ bfd *abfd;
+ Elf_Internal_Note *note;
{
- prstatus_t prstat;
char buf[100];
- char* name;
- asection* sect;
+ char *name;
+ asection *sect;
+ int raw_size;
+ int offset;
- if (note->descsz != sizeof (prstat))
- return true;
+ if (note->descsz == sizeof (prstatus_t))
+ {
+ prstatus_t prstat;
- memcpy (&prstat, note->descdata, sizeof (prstat));
+ raw_size = sizeof (prstat.pr_reg);
+ offset = offsetof (prstatus_t, pr_reg);
+ memcpy (&prstat, note->descdata, sizeof (prstat));
- elf_tdata (abfd)->core_signal = prstat.pr_cursig;
- elf_tdata (abfd)->core_pid = prstat.pr_pid;
+ elf_tdata (abfd)->core_signal = prstat.pr_cursig;
+ elf_tdata (abfd)->core_pid = prstat.pr_pid;
- /* pr_who exists on:
- solaris 2.[567]
- unixware 4.2
- pr_who doesn't exist on:
- linux 2.[01]
- */
+ /* pr_who exists on:
+ solaris 2.5+
+ unixware 4.2
+ pr_who doesn't exist on:
+ linux 2.[01]
+ */
#if defined (HAVE_PRSTATUS_T_PR_WHO)
- elf_tdata (abfd)->core_lwpid = prstat.pr_who;
+ elf_tdata (abfd)->core_lwpid = prstat.pr_who;
#endif
+ }
+#if defined (HAVE_PRSTATUS32_T)
+ else if (note->descsz == sizeof (prstatus32_t))
+ {
+ /* 64-bit host, 32-bit corefile */
+ prstatus32_t prstat;
+
+ raw_size = sizeof (prstat.pr_reg);
+ offset = offsetof (prstatus32_t, pr_reg);
+ memcpy (&prstat, note->descdata, sizeof (prstat));
+
+ elf_tdata (abfd)->core_signal = prstat.pr_cursig;
+ elf_tdata (abfd)->core_pid = prstat.pr_pid;
+
+ /* pr_who exists on:
+ solaris 2.5+
+ unixware 4.2
+ pr_who doesn't exist on:
+ linux 2.[01]
+ */
+#if defined (HAVE_PRSTATUS32_T_PR_WHO)
+ elf_tdata (abfd)->core_lwpid = prstat.pr_who;
+#endif
+ }
+#endif /* HAVE_PRSTATUS32_T */
+ else
+ {
+ /* Fail - we don't know how to handle any other
+ note size (ie. data object type). */
+ return true;
+ }
- /* Make a ".reg/999" section. */
+ /* Make a ".reg/999" section. */
sprintf (buf, ".reg/%d", elfcore_make_pid (abfd));
name = bfd_alloc (abfd, strlen (buf) + 1);
@@ -5137,8 +5423,10 @@ elfcore_grok_prstatus (abfd, note)
sect = bfd_make_section (abfd, name);
if (sect == NULL)
return false;
- sect->_raw_size = sizeof (prstat.pr_reg);
- sect->filepos = note->descpos + offsetof (prstatus_t, pr_reg);
+
+ sect->_raw_size = raw_size;
+ sect->filepos = note->descpos + offset;
+
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
@@ -5149,7 +5437,6 @@ elfcore_grok_prstatus (abfd, note)
}
#endif /* defined (HAVE_PRSTATUS_T) */
-
/* Create a pseudosection containing the exact contents of NOTE. This
actually creates up to two pseudosections:
- For the single-threaded case, a section named NAME, unless
@@ -5160,13 +5447,13 @@ elfcore_grok_prstatus (abfd, note)
static boolean
elfcore_make_note_pseudosection (abfd, name, note)
- bfd* abfd;
+ bfd *abfd;
char *name;
- Elf_Internal_Note* note;
+ Elf_Internal_Note *note;
{
char buf[100];
char *threaded_name;
- asection* sect;
+ asection *sect;
/* Build the section name. */
@@ -5190,54 +5477,58 @@ elfcore_make_note_pseudosection (abfd, name, note)
return true;
}
-
/* There isn't a consistent prfpregset_t across platforms,
but it doesn't matter, because we don't have to pick this
- data structure apart. */
+ data structure apart. */
+
static boolean
elfcore_grok_prfpreg (abfd, note)
- bfd* abfd;
- Elf_Internal_Note* note;
+ bfd *abfd;
+ Elf_Internal_Note *note;
{
return elfcore_make_note_pseudosection (abfd, ".reg2", note);
}
-
/* Linux dumps the Intel SSE regs in a note named "LINUX" with a note
type of 5 (NT_PRXFPREG). Just include the whole note's contents
literally. */
+
static boolean
elfcore_grok_prxfpreg (abfd, note)
- bfd* abfd;
- Elf_Internal_Note* note;
+ bfd *abfd;
+ Elf_Internal_Note *note;
{
return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note);
}
-
#if defined (HAVE_PRPSINFO_T)
-# define elfcore_psinfo_t prpsinfo_t
+typedef prpsinfo_t elfcore_psinfo_t;
+#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
+typedef prpsinfo32_t elfcore_psinfo32_t;
+#endif
#endif
#if defined (HAVE_PSINFO_T)
-# define elfcore_psinfo_t psinfo_t
+typedef psinfo_t elfcore_psinfo_t;
+#if defined (HAVE_PSINFO32_T) /* Sparc64 cross Sparc32 */
+typedef psinfo32_t elfcore_psinfo32_t;
+#endif
#endif
-
#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
/* return a malloc'ed copy of a string at START which is at
most MAX bytes long, possibly without a terminating '\0'.
- the copy will always have a terminating '\0'. */
+ the copy will always have a terminating '\0'. */
static char*
elfcore_strndup (abfd, start, max)
- bfd* abfd;
- char* start;
+ bfd *abfd;
+ char *start;
int max;
{
- char* dup;
- char* end = memchr (start, '\0', max);
+ char *dup;
+ char *end = memchr (start, '\0', max);
int len;
if (end == NULL)
@@ -5257,28 +5548,50 @@ elfcore_strndup (abfd, start, max)
static boolean
elfcore_grok_psinfo (abfd, note)
- bfd* abfd;
- Elf_Internal_Note* note;
+ bfd *abfd;
+ Elf_Internal_Note *note;
{
- elfcore_psinfo_t psinfo;
+ if (note->descsz == sizeof (elfcore_psinfo_t))
+ {
+ elfcore_psinfo_t psinfo;
- if (note->descsz != sizeof (elfcore_psinfo_t))
- return true;
+ memcpy (&psinfo, note->descdata, sizeof (psinfo));
- memcpy (&psinfo, note->descdata, note->descsz);
+ elf_tdata (abfd)->core_program
+ = elfcore_strndup (abfd, psinfo.pr_fname, sizeof (psinfo.pr_fname));
- elf_tdata (abfd)->core_program
- = elfcore_strndup (abfd, psinfo.pr_fname, sizeof (psinfo.pr_fname));
+ elf_tdata (abfd)->core_command
+ = elfcore_strndup (abfd, psinfo.pr_psargs, sizeof (psinfo.pr_psargs));
+ }
+#if defined (HAVE_PRPSINFO32_T) || defined (HAVE_PSINFO32_T)
+ else if (note->descsz == sizeof (elfcore_psinfo32_t))
+ {
+ /* 64-bit host, 32-bit corefile */
+ elfcore_psinfo32_t psinfo;
+
+ memcpy (&psinfo, note->descdata, sizeof (psinfo));
- elf_tdata (abfd)->core_command
- = elfcore_strndup (abfd, psinfo.pr_psargs, sizeof (psinfo.pr_psargs));
+ elf_tdata (abfd)->core_program
+ = elfcore_strndup (abfd, psinfo.pr_fname, sizeof (psinfo.pr_fname));
+
+ elf_tdata (abfd)->core_command
+ = elfcore_strndup (abfd, psinfo.pr_psargs, sizeof (psinfo.pr_psargs));
+ }
+#endif
+
+ else
+ {
+ /* Fail - we don't know how to handle any other
+ note size (ie. data object type). */
+ return true;
+ }
/* Note that for some reason, a spurious space is tacked
onto the end of the args in some (at least one anyway)
- implementations, so strip it off if it exists. */
+ implementations, so strip it off if it exists. */
{
- char* command = elf_tdata (abfd)->core_command;
+ char *command = elf_tdata (abfd)->core_command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')
@@ -5289,43 +5602,59 @@ elfcore_grok_psinfo (abfd, note)
}
#endif /* defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) */
-
#if defined (HAVE_PSTATUS_T)
static boolean
elfcore_grok_pstatus (abfd, note)
- bfd* abfd;
- Elf_Internal_Note* note;
+ bfd *abfd;
+ Elf_Internal_Note *note;
{
- pstatus_t pstat;
+ if (note->descsz == sizeof (pstatus_t)
+#if defined (HAVE_PXSTATUS_T)
+ || note->descsz == sizeof (pxstatus_t)
+#endif
+ )
+ {
+ pstatus_t pstat;
- if (note->descsz != sizeof (pstat))
- return true;
+ memcpy (&pstat, note->descdata, sizeof (pstat));
- memcpy (&pstat, note->descdata, sizeof (pstat));
+ elf_tdata (abfd)->core_pid = pstat.pr_pid;
+ }
+#if defined (HAVE_PSTATUS32_T)
+ else if (note->descsz == sizeof (pstatus32_t))
+ {
+ /* 64-bit host, 32-bit corefile */
+ pstatus32_t pstat;
- elf_tdata (abfd)->core_pid = pstat.pr_pid;
+ memcpy (&pstat, note->descdata, sizeof (pstat));
+ elf_tdata (abfd)->core_pid = pstat.pr_pid;
+ }
+#endif
/* Could grab some more details from the "representative"
lwpstatus_t in pstat.pr_lwp, but we'll catch it all in an
- NT_LWPSTATUS note, presumably. */
+ NT_LWPSTATUS note, presumably. */
return true;
}
#endif /* defined (HAVE_PSTATUS_T) */
-
#if defined (HAVE_LWPSTATUS_T)
static boolean
elfcore_grok_lwpstatus (abfd, note)
- bfd* abfd;
- Elf_Internal_Note* note;
+ bfd *abfd;
+ Elf_Internal_Note *note;
{
lwpstatus_t lwpstat;
char buf[100];
- char* name;
- asection* sect;
+ char *name;
+ asection *sect;
- if (note->descsz != sizeof (lwpstat))
+ if (note->descsz != sizeof (lwpstat)
+#if defined (HAVE_LWPXSTATUS_T)
+ && note->descsz != sizeof (lwpxstatus_t)
+#endif
+ )
return true;
memcpy (&lwpstat, note->descdata, sizeof (lwpstat));
@@ -5333,7 +5662,7 @@ elfcore_grok_lwpstatus (abfd, note)
elf_tdata (abfd)->core_lwpid = lwpstat.pr_lwpid;
elf_tdata (abfd)->core_signal = lwpstat.pr_cursig;
- /* Make a ".reg/999" section. */
+ /* Make a ".reg/999" section. */
sprintf (buf, ".reg/%d", elfcore_make_pid (abfd));
name = bfd_alloc (abfd, strlen (buf) + 1);
@@ -5398,41 +5727,41 @@ elfcore_grok_lwpstatus (abfd, note)
#if defined (HAVE_WIN32_PSTATUS_T)
static boolean
elfcore_grok_win32pstatus (abfd, note)
- bfd * abfd;
- Elf_Internal_Note * note;
+ bfd *abfd;
+ Elf_Internal_Note *note;
{
char buf[30];
- char * name;
- asection * sect;
+ char *name;
+ asection *sect;
win32_pstatus_t pstatus;
if (note->descsz < sizeof (pstatus))
return true;
- memcpy (& pstatus, note->descdata, note->descsz);
-
- switch (pstatus.data_type)
+ memcpy (&pstatus, note->descdata, note->descsz);
+
+ switch (pstatus.data_type)
{
case NOTE_INFO_PROCESS:
/* FIXME: need to add ->core_command. */
elf_tdata (abfd)->core_signal = pstatus.data.process_info.signal;
elf_tdata (abfd)->core_pid = pstatus.data.process_info.pid;
- break ;
+ break;
case NOTE_INFO_THREAD:
/* Make a ".reg/999" section. */
sprintf (buf, ".reg/%d", pstatus.data.thread_info.tid);
-
+
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
- return false;
-
+ return false;
+
strcpy (name, buf);
sect = bfd_make_section (abfd, name);
if (sect == NULL)
- return false;
-
+ return false;
+
sect->_raw_size = sizeof (pstatus.data.thread_info.thread_context);
sect->filepos = note->descpos + offsetof (struct win32_pstatus,
data.thread_info.thread_context);
@@ -5446,19 +5775,19 @@ elfcore_grok_win32pstatus (abfd, note)
case NOTE_INFO_MODULE:
/* Make a ".module/xxxxxxxx" section. */
- sprintf (buf, ".module/%08x" , pstatus.data.module_info.base_address);
-
+ sprintf (buf, ".module/%08x", pstatus.data.module_info.base_address);
+
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
return false;
-
+
strcpy (name, buf);
sect = bfd_make_section (abfd, name);
-
+
if (sect == NULL)
return false;
-
+
sect->_raw_size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
@@ -5475,8 +5804,8 @@ elfcore_grok_win32pstatus (abfd, note)
static boolean
elfcore_grok_note (abfd, note)
- bfd* abfd;
- Elf_Internal_Note* note;
+ bfd *abfd;
+ Elf_Internal_Note *note;
{
switch (note->type)
{
@@ -5502,11 +5831,11 @@ elfcore_grok_note (abfd, note)
return elfcore_grok_prfpreg (abfd, note);
#if defined (HAVE_WIN32_PSTATUS_T)
- case NT_WIN32PSTATUS:
+ case NT_WIN32PSTATUS:
return elfcore_grok_win32pstatus (abfd, note);
#endif
- case NT_PRXFPREG: /* Linux SSE extension */
+ case NT_PRXFPREG: /* Linux SSE extension */
if (note->namesz == 5
&& ! strcmp (note->namedata, "LINUX"))
return elfcore_grok_prxfpreg (abfd, note);
@@ -5521,15 +5850,14 @@ elfcore_grok_note (abfd, note)
}
}
-
static boolean
elfcore_read_notes (abfd, offset, size)
- bfd* abfd;
+ bfd *abfd;
bfd_vma offset;
bfd_vma size;
{
- char* buf;
- char* p;
+ char *buf;
+ char *p;
if (size <= 0)
return true;
@@ -5551,8 +5879,8 @@ elfcore_read_notes (abfd, offset, size)
p = buf;
while (p < buf + size)
{
- /* FIXME: bad alignment assumption. */
- Elf_External_Note* xnp = (Elf_External_Note*) p;
+ /* FIXME: bad alignment assumption. */
+ Elf_External_Note *xnp = (Elf_External_Note *) p;
Elf_Internal_Note in;
in.type = bfd_h_get_32 (abfd, (bfd_byte *) xnp->type);
@@ -5574,13 +5902,12 @@ elfcore_read_notes (abfd, offset, size)
return true;
}
-
/* FIXME: This function is now unnecessary. Callers can just call
bfd_section_from_phdr directly. */
boolean
_bfd_elfcore_section_from_phdr (abfd, phdr, sec_num)
- bfd* abfd;
+ bfd *abfd;
Elf_Internal_Phdr* phdr;
int sec_num;
{
@@ -5589,14 +5916,13 @@ _bfd_elfcore_section_from_phdr (abfd, phdr, sec_num)
return true;
}
-
-
/* Providing external access to the ELF program header table. */
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
occurs; bfd_get_error will return an appropriate code. */
+
long
bfd_get_elf_phdr_upper_bound (abfd)
bfd *abfd;
@@ -5611,7 +5937,6 @@ bfd_get_elf_phdr_upper_bound (abfd)
* sizeof (Elf_Internal_Phdr));
}
-
/* Copy ABFD's program header table entries to *PHDRS. The entries
will be stored as an array of Elf_Internal_Phdr structures, as
defined in include/elf/internal.h. To find out how large the
@@ -5619,6 +5944,7 @@ bfd_get_elf_phdr_upper_bound (abfd)
Return the number of program header table entries read, or -1 if an
error occurs; bfd_get_error will return an appropriate code. */
+
int
bfd_get_elf_phdrs (abfd, phdrs)
bfd *abfd;
@@ -5633,7 +5959,7 @@ bfd_get_elf_phdrs (abfd, phdrs)
}
num_phdrs = elf_elfheader (abfd)->e_phnum;
- memcpy (phdrs, elf_tdata (abfd)->phdr,
+ memcpy (phdrs, elf_tdata (abfd)->phdr,
num_phdrs * sizeof (Elf_Internal_Phdr));
return num_phdrs;
diff --git a/gnu/usr.bin/binutils/bfd/elf32-gen.c b/gnu/usr.bin/binutils/bfd/elf32-gen.c
index 47da53b1bc6..7a39f4778ef 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-gen.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-gen.c
@@ -58,6 +58,37 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
bfd_reloc->howto = &dummy;
}
+static boolean
+elf32_generic_link_add_symbols (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ asection *o;
+
+ /* Check if there are any relocations. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ if ((o->flags & SEC_RELOC) != 0)
+ {
+ Elf_Internal_Ehdr *ehdrp;
+
+ ehdrp = elf_elfheader (abfd);
+ if (abfd->my_archive)
+ (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"),
+ bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd),
+ ehdrp->e_machine);
+ else
+ (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+ bfd_get_filename (abfd),
+ ehdrp->e_machine);
+
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
+
+ return bfd_elf32_bfd_link_add_symbols (abfd, info);
+}
+
#define TARGET_LITTLE_SYM bfd_elf32_little_generic_vec
#define TARGET_LITTLE_NAME "elf32-little"
#define TARGET_BIG_SYM bfd_elf32_big_generic_vec
@@ -66,6 +97,7 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
#define ELF_MACHINE_CODE EM_NONE
#define ELF_MAXPAGESIZE 0x1
#define bfd_elf32_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
+#define bfd_elf32_bfd_link_add_symbols elf32_generic_link_add_symbols
#define elf_info_to_howto elf_generic_info_to_howto
#define elf_info_to_howto_rel elf_generic_info_to_howto_rel
diff --git a/gnu/usr.bin/binutils/bfd/elf32-hppa.c b/gnu/usr.bin/binutils/bfd/elf32-hppa.c
index 683a308515a..caff906f201 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-hppa.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-hppa.c
@@ -1,12 +1,12 @@
/* BFD back-end for HP PA-RISC ELF files.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
- Written by
-
+ Original code by
Center for Software Science
Department of Computer Science
University of Utah
+ Largely rewritten by Alan Modra <alan@linuxcare.com.au>
This file is part of BFD, the Binary File Descriptor library.
@@ -33,10 +33,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf32-hppa.h"
#define ARCH_SIZE 32
#include "elf-hppa.h"
+#include "elf32-hppa.h"
+
+/* In order to gain some understanding of code in this file without
+ knowing all the intricate details of the linker, note the
+ following:
+ Functions named elf32_hppa_* are called by external routines, other
+ functions are only called locally. elf32_hppa_* functions appear
+ in this file more or less in the order in which they are called
+ from external routines. eg. elf32_hppa_check_relocs is called
+ early in the link process, elf32_hppa_finish_dynamic_sections is
+ one of the last functions. */
-/* We use three different hash tables to hold information for
- linking PA ELF objects.
+/* We use two hash tables to hold information for linking PA ELF objects.
The first is the elf32_hppa_link_hash_table which is derived
from the standard ELF linker hash table. We use this as a place to
@@ -44,149 +54,370 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
The second is the stub hash table which is derived from the
base BFD hash table. The stub hash table holds the information
- necessary to build the linker stubs during a link. */
+ necessary to build the linker stubs during a link.
+
+ There are a number of different stubs generated by the linker.
+
+ Long branch stub:
+ : ldil LR'X,%r1
+ : be,n RR'X(%sr4,%r1)
+
+ PIC long branch stub:
+ : b,l .+8,%r1
+ : addil LR'X - ($PIC_pcrel$0 - 4),%r1
+ : be,n RR'X - ($PIC_pcrel$0 - 8)(%sr4,%r1)
+
+ Import stub to call shared library routine from normal object file
+ (single sub-space version)
+ : addil LR'lt_ptr+ltoff,%dp ; get procedure entry point
+ : ldw RR'lt_ptr+ltoff(%r1),%r21
+ : bv %r0(%r21)
+ : ldw RR'lt_ptr+ltoff+4(%r1),%r19 ; get new dlt value.
+
+ Import stub to call shared library routine from shared library
+ (single sub-space version)
+ : addil LR'ltoff,%r19 ; get procedure entry point
+ : ldw RR'ltoff(%r1),%r21
+ : bv %r0(%r21)
+ : ldw RR'ltoff+4(%r1),%r19 ; get new dlt value.
+
+ Import stub to call shared library routine from normal object file
+ (multiple sub-space support)
+ : addil LR'lt_ptr+ltoff,%dp ; get procedure entry point
+ : ldw RR'lt_ptr+ltoff(%r1),%r21
+ : ldw RR'lt_ptr+ltoff+4(%r1),%r19 ; get new dlt value.
+ : ldsid (%r21),%r1
+ : mtsp %r1,%sr0
+ : be 0(%sr0,%r21) ; branch to target
+ : stw %rp,-24(%sp) ; save rp
+
+ Import stub to call shared library routine from shared library
+ (multiple sub-space support)
+ : addil LR'ltoff,%r19 ; get procedure entry point
+ : ldw RR'ltoff(%r1),%r21
+ : ldw RR'ltoff+4(%r1),%r19 ; get new dlt value.
+ : ldsid (%r21),%r1
+ : mtsp %r1,%sr0
+ : be 0(%sr0,%r21) ; branch to target
+ : stw %rp,-24(%sp) ; save rp
+
+ Export stub to return from shared lib routine (multiple sub-space support)
+ One of these is created for each exported procedure in a shared
+ library (and stored in the shared lib). Shared lib routines are
+ called via the first instruction in the export stub so that we can
+ do an inter-space return. Not required for single sub-space.
+ : bl,n X,%rp ; trap the return
+ : nop
+ : ldw -24(%sp),%rp ; restore the original rp
+ : ldsid (%rp),%r1
+ : mtsp %r1,%sr0
+ : be,n 0(%sr0,%rp) ; inter-space return */
+
+#define PLT_ENTRY_SIZE 8
+#define PLABEL_PLT_ENTRY_SIZE PLT_ENTRY_SIZE
+#define GOT_ENTRY_SIZE 4
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+
+static const bfd_byte plt_stub[] =
+{
+ 0x0e, 0x80, 0x10, 0x96, /* 1: ldw 0(%r20),%r22 */
+ 0xea, 0xc0, 0xc0, 0x00, /* bv %r0(%r22) */
+ 0x0e, 0x88, 0x10, 0x95, /* ldw 4(%r20),%r21 */
+#define PLT_STUB_ENTRY (3*4)
+ 0xea, 0x9f, 0x1f, 0xdd, /* b,l 1b,%r20 */
+ 0xd6, 0x80, 0x1c, 0x1e, /* depi 0,31,2,%r20 */
+ 0x00, 0xc0, 0xff, 0xee, /* 9: .word fixup_func */
+ 0xde, 0xad, 0xbe, 0xef /* .word fixup_ltp */
+};
-/* Hash table for linker stubs. */
+/* Section name for stubs is the associated section name plus this
+ string. */
+#define STUB_SUFFIX ".stub"
+
+/* Setting the following non-zero makes all long branch stubs
+ generated during a shared link of the PIC variety. This saves on
+ relocs, but costs one extra instruction per stub. */
+#ifndef LONG_BRANCH_PIC_IN_SHLIB
+#define LONG_BRANCH_PIC_IN_SHLIB 1
+#endif
+
+/* Set this non-zero to use import stubs instead of long branch stubs
+ where a .plt entry exists for the symbol. This is a fairly useless
+ option as import stubs are bigger than PIC long branch stubs. */
+#ifndef LONG_BRANCH_VIA_PLT
+#define LONG_BRANCH_VIA_PLT 0
+#endif
+
+/* We don't need to copy any PC- or GP-relative dynamic relocs into a
+ shared object's dynamic section. */
+#ifndef RELATIVE_DYNAMIC_RELOCS
+#define RELATIVE_DYNAMIC_RELOCS 0
+#endif
+
+enum elf32_hppa_stub_type {
+ hppa_stub_long_branch,
+ hppa_stub_long_branch_shared,
+ hppa_stub_import,
+ hppa_stub_import_shared,
+ hppa_stub_export,
+ hppa_stub_none
+};
-struct elf32_hppa_stub_hash_entry
-{
- /* Base hash table entry structure, we can get the name of the stub
- (and thus know exactly what actions it performs) from the base
- hash table entry. */
+struct elf32_hppa_stub_hash_entry {
+
+ /* Base hash table entry structure. */
struct bfd_hash_entry root;
- /* Offset of the beginning of this stub. */
- bfd_vma offset;
+ /* The stub section. */
+ asection *stub_sec;
+
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ /* It's associated reloc section. */
+ asection *reloc_sec;
+#endif
+
+ /* Offset within stub_sec of the beginning of this stub. */
+ bfd_vma stub_offset;
/* Given the symbol's value and its section we can determine its final
value when building the stubs (so the stub knows where to jump. */
- symvalue target_value;
+ bfd_vma target_value;
asection *target_section;
+
+ enum elf32_hppa_stub_type stub_type;
+
+ /* The symbol table entry, if any, that this was derived from. */
+ struct elf32_hppa_link_hash_entry *h;
+
+ /* Where this stub is being called from, or, in the case of combined
+ stub sections, the first input section in the group. */
+ asection *id_sec;
};
-struct elf32_hppa_stub_hash_table
-{
- /* The hash table itself. */
- struct bfd_hash_table root;
+struct elf32_hppa_link_hash_entry {
- /* The stub BFD. */
- bfd *stub_bfd;
+ struct elf_link_hash_entry elf;
- /* Where to place the next stub. */
- bfd_byte *location;
+ /* A pointer to the most recently used stub hash entry against this
+ symbol. */
+ struct elf32_hppa_stub_hash_entry *stub_cache;
- /* Current offset in the stub section. */
- unsigned int offset;
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ /* Used to track whether we have allocated space for a long branch
+ stub relocation for this symbol in the given section. */
+ asection *stub_reloc_sec;
+#endif
-};
+#if ! LONG_BRANCH_PIC_IN_SHLIB || RELATIVE_DYNAMIC_RELOCS
+ /* Used to count relocations for delayed sizing of relocation
+ sections. */
+ struct elf32_hppa_dyn_reloc_entry {
-struct elf32_hppa_link_hash_entry
-{
- struct elf_link_hash_entry root;
+ /* Next relocation in the chain. */
+ struct elf32_hppa_dyn_reloc_entry *next;
+
+ /* The section in dynobj. */
+ asection *section;
+
+ /* Number of relocs copied in this section. */
+ bfd_size_type count;
+ } *reloc_entries;
+#endif
+
+ /* Set during a static link if we detect a function is PIC. */
+ unsigned int maybe_pic_call:1;
+
+ /* Set if the only reason we need a .plt entry is for a non-PIC to
+ PIC function call. */
+ unsigned int pic_call:1;
+
+ /* Set if this symbol is used by a plabel reloc. */
+ unsigned int plabel:1;
+
+ /* Set if this symbol is an init or fini function and thus should
+ use an absolute reloc. */
+ unsigned int plt_abs:1;
};
-struct elf32_hppa_link_hash_table
-{
+struct elf32_hppa_link_hash_table {
+
/* The main hash table. */
struct elf_link_hash_table root;
/* The stub hash table. */
- struct elf32_hppa_stub_hash_table *stub_hash_table;
+ struct bfd_hash_table stub_hash_table;
- /* A count of the number of output symbols. */
- unsigned int output_symbol_count;
+ /* Linker stub bfd. */
+ bfd *stub_bfd;
- /* Stuff so we can handle DP relative relocations. */
- long global_value;
- int global_sym_defined;
+ /* Linker call-backs. */
+ asection * (*add_stub_section) PARAMS ((const char *, asection *));
+ void (*layout_sections_again) PARAMS ((void));
+
+ /* Array to keep track of which stub sections have been created, and
+ information on stub grouping. */
+ struct map_stub {
+ /* This is the section to which stubs in the group will be
+ attached. */
+ asection *link_sec;
+ /* The stub section. */
+ asection *stub_sec;
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ /* The stub section's reloc section. */
+ asection *reloc_sec;
+#endif
+ } *stub_group;
+
+ /* Short-cuts to get to dynamic linker sections. */
+ asection *sgot;
+ asection *srelgot;
+ asection *splt;
+ asection *srelplt;
+ asection *sdynbss;
+ asection *srelbss;
+
+ /* Used during a final link to store the base of the text and data
+ segments so that we can perform SEGREL relocations. */
+ bfd_vma text_segment_base;
+ bfd_vma data_segment_base;
+
+ /* Whether we support multiple sub-spaces for shared libs. */
+ unsigned int multi_subspace:1;
+
+ /* Flags set when PCREL12F and PCREL17F branches detected. Used to
+ select suitable defaults for the stub group size. */
+ unsigned int has_12bit_branch:1;
+ unsigned int has_17bit_branch:1;
+
+ /* Set if we need a .plt stub to support lazy dynamic linking. */
+ unsigned int need_plt_stub:1;
};
-/* ELF32/HPPA relocation support
+/* Various hash macros and functions. */
+#define hppa_link_hash_table(p) \
+ ((struct elf32_hppa_link_hash_table *) ((p)->hash))
- This file contains ELF32/HPPA relocation support as specified
- in the Stratus FTX/Golf Object File Format (SED-1762) dated
- February 1994. */
+#define hppa_stub_hash_lookup(table, string, create, copy) \
+ ((struct elf32_hppa_stub_hash_entry *) \
+ bfd_hash_lookup ((table), (string), (create), (copy)))
-#include "elf32-hppa.h"
-#include "hppa_stubs.h"
+static struct bfd_hash_entry *stub_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static unsigned long hppa_elf_relocate_insn
- PARAMS ((bfd *, asection *, unsigned long, unsigned long, long,
- long, unsigned long, unsigned long, unsigned long));
+static struct bfd_hash_entry *hppa_link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+
+static struct bfd_link_hash_table *elf32_hppa_link_hash_table_create
+ PARAMS ((bfd *));
+
+/* Stub handling functions. */
+static char *hppa_stub_name
+ PARAMS ((const asection *, const asection *,
+ const struct elf32_hppa_link_hash_entry *,
+ const Elf_Internal_Rela *));
+
+static struct elf32_hppa_stub_hash_entry *hppa_get_stub_entry
+ PARAMS ((const asection *, const asection *,
+ struct elf32_hppa_link_hash_entry *,
+ const Elf_Internal_Rela *,
+ struct elf32_hppa_link_hash_table *));
+
+static struct elf32_hppa_stub_hash_entry *hppa_add_stub
+ PARAMS ((const char *, asection *, struct elf32_hppa_link_hash_table *));
+
+static enum elf32_hppa_stub_type hppa_type_of_stub
+ PARAMS ((asection *, const Elf_Internal_Rela *,
+ struct elf32_hppa_link_hash_entry *, bfd_vma));
+
+static boolean hppa_build_one_stub
+ PARAMS ((struct bfd_hash_entry *, PTR));
+
+static boolean hppa_size_one_stub
+ PARAMS ((struct bfd_hash_entry *, PTR));
+
+/* BFD and elf backend functions. */
+static boolean elf32_hppa_object_p PARAMS ((bfd *));
static boolean elf32_hppa_add_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
const char **, flagword *, asection **, bfd_vma *));
-static bfd_reloc_status_type elf32_hppa_bfd_final_link_relocate
- PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *,
- bfd_byte *, bfd_vma, bfd_vma, bfd_vma, struct bfd_link_info *,
- asection *, const char *, int));
+static boolean elf32_hppa_create_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
-static struct bfd_link_hash_table *elf32_hppa_link_hash_table_create
- PARAMS ((bfd *));
+static boolean elf32_hppa_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *,
+ asection *, const Elf_Internal_Rela *));
-static struct bfd_hash_entry *
-elf32_hppa_stub_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static asection *elf32_hppa_gc_mark_hook
+ PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static boolean
-elf32_hppa_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static boolean elf32_hppa_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *,
+ asection *, const Elf_Internal_Rela *));
-static boolean
-elf32_hppa_stub_hash_table_init
- PARAMS ((struct elf32_hppa_stub_hash_table *, bfd *,
- struct bfd_hash_entry *(*) PARAMS ((struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *))));
+static void elf32_hppa_hide_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static boolean
-elf32_hppa_build_one_stub PARAMS ((struct bfd_hash_entry *, PTR));
+static boolean elf32_hppa_adjust_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static unsigned int elf32_hppa_size_of_stub
- PARAMS ((bfd_vma, bfd_vma, const char *));
+static boolean hppa_handle_PIC_calls
+ PARAMS ((struct elf_link_hash_entry *, PTR));
-static void elf32_hppa_name_of_stub
- PARAMS ((bfd_vma, bfd_vma, char *));
+static boolean allocate_plt_and_got
+ PARAMS ((struct elf_link_hash_entry *, PTR));
-/* For linker stub hash tables. */
-#define elf32_hppa_stub_hash_lookup(table, string, create, copy) \
- ((struct elf32_hppa_stub_hash_entry *) \
- bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
+#if ((! LONG_BRANCH_PIC_IN_SHLIB && LONG_BRANCH_VIA_PLT) \
+ || RELATIVE_DYNAMIC_RELOCS)
+static boolean hppa_discard_copies
+ PARAMS ((struct elf_link_hash_entry *, PTR));
+#endif
-#define elf32_hppa_stub_hash_traverse(table, func, info) \
- (bfd_hash_traverse \
- (&(table)->root, \
- (boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) (func), \
- (info)))
+static boolean clobber_millicode_symbols
+ PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *));
-/* For HPPA linker hash table. */
+static boolean elf32_hppa_size_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
-#define elf32_hppa_link_hash_lookup(table, string, create, copy, follow)\
- ((struct elf32_hppa_link_hash_entry *) \
- elf_link_hash_lookup (&(table)->root, (string), (create), \
- (copy), (follow)))
+static boolean elf32_hppa_final_link
+ PARAMS ((bfd *, struct bfd_link_info *));
-#define elf32_hppa_link_hash_traverse(table, func, info) \
- (elf_link_hash_traverse \
- (&(table)->root, \
- (boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
- (info)))
+static void hppa_record_segment_addr
+ PARAMS ((bfd *, asection *, PTR));
-/* Get the PA ELF linker hash table from a link_info structure. */
+static bfd_reloc_status_type final_link_relocate
+ PARAMS ((asection *, bfd_byte *, const Elf_Internal_Rela *,
+ bfd_vma, struct elf32_hppa_link_hash_table *, asection *,
+ struct elf32_hppa_link_hash_entry *));
-#define elf32_hppa_hash_table(p) \
- ((struct elf32_hppa_link_hash_table *) ((p)->hash))
+static boolean elf32_hppa_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
+ bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+
+static int hppa_unwind_entry_compare
+ PARAMS ((const PTR, const PTR));
+
+static boolean elf32_hppa_finish_dynamic_symbol
+ PARAMS ((bfd *, struct bfd_link_info *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+
+static boolean elf32_hppa_finish_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+static void elf32_hppa_post_process_headers
+ PARAMS ((bfd *, struct bfd_link_info *));
+static int elf32_hppa_elf_get_symbol_type
+ PARAMS ((Elf_Internal_Sym *, int));
/* Assorted hash table functions. */
/* Initialize an entry in the stub hash table. */
static struct bfd_hash_entry *
-elf32_hppa_stub_hash_newfunc (entry, table, string)
+stub_hash_newfunc (entry, table, string)
struct bfd_hash_entry *entry;
struct bfd_hash_table *table;
const char *string;
@@ -198,11 +429,13 @@ elf32_hppa_stub_hash_newfunc (entry, table, string)
/* Allocate the structure if it has not already been allocated by a
subclass. */
if (ret == NULL)
- ret = ((struct elf32_hppa_stub_hash_entry *)
- bfd_hash_allocate (table,
- sizeof (struct elf32_hppa_stub_hash_entry)));
- if (ret == NULL)
- return NULL;
+ {
+ ret = ((struct elf32_hppa_stub_hash_entry *)
+ bfd_hash_allocate (table,
+ sizeof (struct elf32_hppa_stub_hash_entry)));
+ if (ret == NULL)
+ return NULL;
+ }
/* Call the allocation method of the superclass. */
ret = ((struct elf32_hppa_stub_hash_entry *)
@@ -211,28 +444,66 @@ elf32_hppa_stub_hash_newfunc (entry, table, string)
if (ret)
{
/* Initialize the local fields. */
- ret->offset = 0;
+ ret->stub_sec = NULL;
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ ret->reloc_sec = NULL;
+#endif
+ ret->stub_offset = 0;
ret->target_value = 0;
ret->target_section = NULL;
+ ret->stub_type = hppa_stub_long_branch;
+ ret->h = NULL;
+ ret->id_sec = NULL;
}
return (struct bfd_hash_entry *) ret;
}
-/* Initialize a stub hash table. */
+/* Initialize an entry in the link hash table. */
-static boolean
-elf32_hppa_stub_hash_table_init (table, stub_bfd, newfunc)
- struct elf32_hppa_stub_hash_table *table;
- bfd *stub_bfd;
- struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *));
+static struct bfd_hash_entry *
+hppa_link_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
{
- table->offset = 0;
- table->location = 0;
- table->stub_bfd = stub_bfd;
- return (bfd_hash_table_init (&table->root, newfunc));
+ struct elf32_hppa_link_hash_entry *ret;
+
+ ret = (struct elf32_hppa_link_hash_entry *) entry;
+
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (ret == NULL)
+ {
+ ret = ((struct elf32_hppa_link_hash_entry *)
+ bfd_hash_allocate (table,
+ sizeof (struct elf32_hppa_link_hash_entry)));
+ if (ret == NULL)
+ return NULL;
+ }
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct elf32_hppa_link_hash_entry *)
+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
+ table, string));
+
+ if (ret)
+ {
+ /* Initialize the local fields. */
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ ret->stub_reloc_sec = NULL;
+#endif
+ ret->stub_cache = NULL;
+#if ! LONG_BRANCH_PIC_IN_SHLIB || RELATIVE_DYNAMIC_RELOCS
+ ret->reloc_entries = NULL;
+#endif
+ ret->maybe_pic_call = 0;
+ ret->pic_call = 0;
+ ret->plabel = 0;
+ ret->plt_abs = 0;
+ }
+
+ return (struct bfd_hash_entry *) ret;
}
/* Create the derived linker hash table. The PA ELF port uses the derived
@@ -245,276 +516,1204 @@ elf32_hppa_link_hash_table_create (abfd)
{
struct elf32_hppa_link_hash_table *ret;
- ret = ((struct elf32_hppa_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct elf32_hppa_link_hash_table)));
+ ret = ((struct elf32_hppa_link_hash_table *) bfd_alloc (abfd, sizeof (*ret)));
if (ret == NULL)
return NULL;
- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
- _bfd_elf_link_hash_newfunc))
+
+ if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, hppa_link_hash_newfunc))
{
bfd_release (abfd, ret);
return NULL;
}
- ret->stub_hash_table = NULL;
- ret->output_symbol_count = 0;
- ret->global_value = 0;
- ret->global_sym_defined = 0;
+
+ /* Init the stub hash table too. */
+ if (!bfd_hash_table_init (&ret->stub_hash_table, stub_hash_newfunc))
+ return NULL;
+
+ ret->stub_bfd = NULL;
+ ret->add_stub_section = NULL;
+ ret->layout_sections_again = NULL;
+ ret->stub_group = NULL;
+ ret->sgot = NULL;
+ ret->srelgot = NULL;
+ ret->splt = NULL;
+ ret->srelplt = NULL;
+ ret->sdynbss = NULL;
+ ret->srelbss = NULL;
+ ret->text_segment_base = (bfd_vma) -1;
+ ret->data_segment_base = (bfd_vma) -1;
+ ret->multi_subspace = 0;
+ ret->has_12bit_branch = 0;
+ ret->has_17bit_branch = 0;
+ ret->need_plt_stub = 0;
return &ret->root.root;
}
-/* Relocate the given INSN given the various input parameters.
+/* Build a name for an entry in the stub hash table. */
- FIXME: endianness and sizeof (long) issues abound here. */
+static char *
+hppa_stub_name (input_section, sym_sec, hash, rel)
+ const asection *input_section;
+ const asection *sym_sec;
+ const struct elf32_hppa_link_hash_entry *hash;
+ const Elf_Internal_Rela *rel;
+{
+ char *stub_name;
+ size_t len;
-static unsigned long
-hppa_elf_relocate_insn (abfd, input_sect, insn, address, sym_value,
- r_addend, r_format, r_field, pcrel)
- bfd *abfd;
- asection *input_sect;
- unsigned long insn;
- unsigned long address;
- long sym_value;
- long r_addend;
- unsigned long r_format;
- unsigned long r_field;
- unsigned long pcrel;
+ if (hash)
+ {
+ len = 8 + 1 + strlen (hash->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,
+ hash->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) ELF32_R_SYM (rel->r_info) & 0xffffffff,
+ (int) rel->r_addend & 0xffffffff);
+ }
+ }
+ return stub_name;
+}
+
+/* Look up an entry in the stub hash. Stub entries are cached because
+ creating the stub name takes a bit of time. */
+
+static struct elf32_hppa_stub_hash_entry *
+hppa_get_stub_entry (input_section, sym_sec, hash, rel, hplink)
+ const asection *input_section;
+ const asection *sym_sec;
+ struct elf32_hppa_link_hash_entry *hash;
+ const Elf_Internal_Rela *rel;
+ struct elf32_hppa_link_hash_table *hplink;
{
- unsigned char opcode = get_opcode (insn);
- long constant_value;
-
- switch (opcode)
- {
- case LDO:
- case LDB:
- case LDH:
- case LDW:
- case LDWM:
- case STB:
- case STH:
- case STW:
- case STWM:
- case COMICLR:
- case SUBI:
- case ADDIT:
- case ADDI:
- case LDIL:
- case ADDIL:
- constant_value = HPPA_R_CONSTANT (r_addend);
-
- if (pcrel)
- sym_value -= address;
-
- sym_value = hppa_field_adjust (sym_value, constant_value, r_field);
- return hppa_rebuild_insn (abfd, insn, sym_value, r_format);
-
- case BL:
- case BE:
- case BLE:
- /* XXX computing constant_value is not needed??? */
- constant_value = assemble_17 ((insn & 0x001f0000) >> 16,
- (insn & 0x00001ffc) >> 2,
- insn & 1);
-
- constant_value = (constant_value << 15) >> 15;
- if (pcrel)
- {
- sym_value -=
- address + input_sect->output_offset
- + input_sect->output_section->vma;
- sym_value = hppa_field_adjust (sym_value, -8, r_field);
+ struct elf32_hppa_stub_hash_entry *stub_entry;
+ const asection *id_sec;
+
+ /* If this input section is part of a group of sections sharing one
+ stub section, then use the id of the first section in the group.
+ Stub names need to include a section id, as there may well be
+ more than one stub used to reach say, printf, and we need to
+ distinguish between them. */
+ id_sec = hplink->stub_group[input_section->id].link_sec;
+
+ if (hash != NULL && hash->stub_cache != NULL
+ && hash->stub_cache->h == hash
+ && hash->stub_cache->id_sec == id_sec)
+ {
+ stub_entry = hash->stub_cache;
+ }
+ else
+ {
+ char *stub_name;
+
+ stub_name = hppa_stub_name (id_sec, sym_sec, hash, rel);
+ if (stub_name == NULL)
+ return NULL;
+
+ stub_entry = hppa_stub_hash_lookup (&hplink->stub_hash_table,
+ stub_name, false, false);
+ if (stub_entry == NULL)
+ {
+ if (hash == NULL || hash->elf.root.type != bfd_link_hash_undefweak)
+ (*_bfd_error_handler) (_("%s(%s+0x%lx): cannot find stub entry %s"),
+ bfd_get_filename (input_section->owner),
+ input_section->name,
+ (long) rel->r_offset,
+ stub_name);
}
else
- sym_value = hppa_field_adjust (sym_value, constant_value, r_field);
+ {
+ if (hash != NULL)
+ hash->stub_cache = stub_entry;
+ }
- return hppa_rebuild_insn (abfd, insn, sym_value >> 2, r_format);
+ free (stub_name);
+ }
- default:
- if (opcode == 0)
+ return stub_entry;
+}
+
+/* Add a new stub entry to the stub hash. Not all fields of the new
+ stub entry are initialised. */
+
+static struct elf32_hppa_stub_hash_entry *
+hppa_add_stub (stub_name, section, hplink)
+ const char *stub_name;
+ asection *section;
+ struct elf32_hppa_link_hash_table *hplink;
+{
+ asection *link_sec;
+ asection *stub_sec;
+ struct elf32_hppa_stub_hash_entry *stub_entry;
+
+ link_sec = hplink->stub_group[section->id].link_sec;
+ stub_sec = hplink->stub_group[section->id].stub_sec;
+ if (stub_sec == NULL)
+ {
+ stub_sec = hplink->stub_group[link_sec->id].stub_sec;
+ if (stub_sec == NULL)
{
- constant_value = HPPA_R_CONSTANT (r_addend);
+ size_t len;
+ char *s_name;
+
+ len = strlen (link_sec->name) + sizeof (STUB_SUFFIX);
+ s_name = bfd_alloc (hplink->stub_bfd, len);
+ if (s_name == NULL)
+ return NULL;
+
+ strcpy (s_name, link_sec->name);
+ strcpy (s_name + len - sizeof (STUB_SUFFIX), STUB_SUFFIX);
+ stub_sec = (*hplink->add_stub_section) (s_name, link_sec);
+ if (stub_sec == NULL)
+ return NULL;
+ hplink->stub_group[link_sec->id].stub_sec = stub_sec;
+ }
+ hplink->stub_group[section->id].stub_sec = stub_sec;
+ }
- if (pcrel)
- sym_value -= address;
+ /* Enter this entry into the linker stub hash table. */
+ stub_entry = hppa_stub_hash_lookup (&hplink->stub_hash_table, stub_name,
+ true, false);
+ if (stub_entry == NULL)
+ {
+ (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
+ bfd_get_filename (section->owner),
+ stub_name);
+ return NULL;
+ }
- return hppa_field_adjust (sym_value, constant_value, r_field);
+ stub_entry->stub_sec = stub_sec;
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ stub_entry->reloc_sec = hplink->stub_group[section->id].reloc_sec;
+#endif
+ stub_entry->stub_offset = 0;
+ stub_entry->id_sec = link_sec;
+ return stub_entry;
+}
+
+/* Determine the type of stub needed, if any, for a call. */
+
+static enum elf32_hppa_stub_type
+hppa_type_of_stub (input_sec, rel, hash, destination)
+ asection *input_sec;
+ const Elf_Internal_Rela *rel;
+ struct elf32_hppa_link_hash_entry *hash;
+ bfd_vma destination;
+{
+ bfd_vma location;
+ bfd_vma branch_offset;
+ bfd_vma max_branch_offset;
+ unsigned int r_type;
+
+ if (hash != NULL
+ && (((hash->elf.root.type == bfd_link_hash_defined
+ || hash->elf.root.type == bfd_link_hash_defweak)
+ && hash->elf.root.u.def.section->output_section == NULL)
+ || (hash->elf.root.type == bfd_link_hash_defweak
+ && hash->elf.dynindx != -1
+ && hash->elf.plt.offset != (bfd_vma) -1)
+ || hash->elf.root.type == bfd_link_hash_undefweak
+ || hash->elf.root.type == bfd_link_hash_undefined
+ || (hash->maybe_pic_call && !(input_sec->flags & SEC_HAS_GOT_REF))))
+ {
+ /* If output_section is NULL, then it's a symbol defined in a
+ shared library. We will need an import stub. Decide between
+ hppa_stub_import and hppa_stub_import_shared later. For
+ shared links we need stubs for undefined or weak syms too;
+ They will presumably be resolved by the dynamic linker. */
+ return hppa_stub_import;
+ }
+
+ /* Determine where the call point is. */
+ location = (input_sec->output_offset
+ + input_sec->output_section->vma
+ + rel->r_offset);
+
+ branch_offset = destination - location - 8;
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ /* Determine if a long branch stub is needed. parisc branch offsets
+ are relative to the second instruction past the branch, ie. +8
+ bytes on from the branch instruction location. The offset is
+ signed and counts in units of 4 bytes. */
+ if (r_type == (unsigned int) R_PARISC_PCREL17F)
+ {
+ max_branch_offset = (1 << (17-1)) << 2;
+ }
+ else if (r_type == (unsigned int) R_PARISC_PCREL12F)
+ {
+ max_branch_offset = (1 << (12-1)) << 2;
+ }
+ else /* R_PARISC_PCREL22F. */
+ {
+ max_branch_offset = (1 << (22-1)) << 2;
+ }
+
+ if (branch_offset + max_branch_offset >= 2*max_branch_offset)
+ {
+#if LONG_BRANCH_VIA_PLT
+ if (hash != NULL
+ && hash->elf.dynindx != -1
+ && hash->elf.plt.offset != (bfd_vma) -1
+ && hash->elf.type != STT_PARISC_MILLI)
+ {
+ /* If we are doing a shared link and find we need a long
+ branch stub, then go via the .plt if possible. */
+ return hppa_stub_import;
}
else
- abort ();
+#endif
+ return hppa_stub_long_branch;
}
+ return hppa_stub_none;
}
-/* Relocate an HPPA ELF section. */
+/* Build one linker stub as defined by the stub hash table entry GEN_ENTRY.
+ IN_ARG contains the link info pointer. */
+
+#define LDIL_R1 0x20200000 /* ldil LR'XXX,%r1 */
+#define BE_SR4_R1 0xe0202002 /* be,n RR'XXX(%sr4,%r1) */
+
+#define BL_R1 0xe8200000 /* b,l .+8,%r1 */
+#define ADDIL_R1 0x28200000 /* addil LR'XXX,%r1,%r1 */
+#define DEPI_R1 0xd4201c1e /* depi 0,31,2,%r1 */
+
+#define ADDIL_DP 0x2b600000 /* addil LR'XXX,%dp,%r1 */
+#define LDW_R1_R21 0x48350000 /* ldw RR'XXX(%sr0,%r1),%r21 */
+#define BV_R0_R21 0xeaa0c000 /* bv %r0(%r21) */
+#define LDW_R1_R19 0x48330000 /* ldw RR'XXX(%sr0,%r1),%r19 */
+
+#define ADDIL_R19 0x2a600000 /* addil LR'XXX,%r19,%r1 */
+#define LDW_R1_DP 0x483b0000 /* ldw RR'XXX(%sr0,%r1),%dp */
+
+#define LDSID_R21_R1 0x02a010a1 /* ldsid (%sr0,%r21),%r1 */
+#define MTSP_R1 0x00011820 /* mtsp %r1,%sr0 */
+#define BE_SR0_R21 0xe2a00000 /* be 0(%sr0,%r21) */
+#define STW_RP 0x6bc23fd1 /* stw %rp,-24(%sr0,%sp) */
+
+#define BL_RP 0xe8400002 /* b,l,n XXX,%rp */
+#define NOP 0x08000240 /* nop */
+#define LDW_RP 0x4bc23fd1 /* ldw -24(%sr0,%sp),%rp */
+#define LDSID_RP_R1 0x004010a1 /* ldsid (%sr0,%rp),%r1 */
+#define BE_SR0_RP 0xe0400002 /* be,n 0(%sr0,%rp) */
+
+#ifndef R19_STUBS
+#define R19_STUBS 1
+#endif
+
+#if R19_STUBS
+#define LDW_R1_DLT LDW_R1_R19
+#else
+#define LDW_R1_DLT LDW_R1_DP
+#endif
static boolean
-elf32_hppa_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;
+hppa_build_one_stub (gen_entry, in_arg)
+ struct bfd_hash_entry *gen_entry;
+ PTR in_arg;
{
- Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Rela *rel;
- Elf_Internal_Rela *relend;
+ struct elf32_hppa_stub_hash_entry *stub_entry;
+ struct bfd_link_info *info;
+ struct elf32_hppa_link_hash_table *hplink;
+ asection *stub_sec;
+ bfd *stub_bfd;
+ bfd_byte *loc;
+ bfd_vma sym_value;
+ bfd_vma insn;
+ bfd_vma off;
+ int val;
+ int size;
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ /* Massage our args to the form they really have. */
+ stub_entry = (struct elf32_hppa_stub_hash_entry *) gen_entry;
+ info = (struct bfd_link_info *) in_arg;
- rel = relocs;
- relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
+ hplink = hppa_link_hash_table (info);
+ stub_sec = stub_entry->stub_sec;
+
+ /* Make a note of the offset within the stubs for this entry. */
+ stub_entry->stub_offset = stub_sec->_raw_size;
+ loc = stub_sec->contents + stub_entry->stub_offset;
+
+ stub_bfd = stub_sec->owner;
+
+ switch (stub_entry->stub_type)
{
- int r_type;
- reloc_howto_type *howto;
- unsigned long r_symndx;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
- asection *sym_sec;
- bfd_vma relocation;
- bfd_reloc_status_type r;
- const char *sym_name;
+ case hppa_stub_long_branch:
+ /* Create the long branch. A long branch is formed with "ldil"
+ loading the upper bits of the target address into a register,
+ then branching with "be" which adds in the lower bits.
+ The "be" has its delay slot nullified. */
+ sym_value = (stub_entry->target_value
+ + stub_entry->target_section->output_offset
+ + stub_entry->target_section->output_section->vma);
+
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) 0, e_lrsel);
+ insn = hppa_rebuild_insn ((int) LDIL_R1, val, 21);
+ bfd_put_32 (stub_bfd, insn, loc);
+
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) 0, e_rrsel) >> 2;
+ insn = hppa_rebuild_insn ((int) BE_SR4_R1, val, 17);
+ bfd_put_32 (stub_bfd, insn, loc + 4);
- r_type = ELF32_R_TYPE (rel->r_info);
- if (r_type < 0 || r_type >= (int) R_PARISC_UNIMPLEMENTED)
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ if (info->shared)
+ {
+ /* Output a dynamic relocation for this stub. We only
+ output one PCREL21L reloc per stub, trusting that the
+ dynamic linker will also fix the implied PCREL17R for the
+ second instruction. PCREL21L dynamic relocs had better
+ never be emitted for some other purpose... */
+ asection *srel;
+ Elf_Internal_Rela outrel;
+
+ if (stub_entry->h == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"),
+ bfd_get_filename (stub_entry->target_section->owner),
+ stub_sec->name,
+ (long) stub_entry->stub_offset,
+ stub_entry->root.string);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ srel = stub_entry->reloc_sec;
+ if (srel == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("Could not find relocation section for %s"),
+ stub_sec->name);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ outrel.r_offset = (stub_entry->stub_offset
+ + stub_sec->output_offset
+ + stub_sec->output_section->vma);
+ outrel.r_info = ELF32_R_INFO (0, R_PARISC_PCREL21L);
+ outrel.r_addend = sym_value;
+ bfd_elf32_swap_reloca_out (stub_sec->output_section->owner,
+ &outrel,
+ ((Elf32_External_Rela *)
+ srel->contents + srel->reloc_count));
+ ++srel->reloc_count;
+ }
+#endif
+ size = 8;
+ break;
+
+ case hppa_stub_long_branch_shared:
+ /* Branches are relative. This is where we are going to. */
+ sym_value = (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, more or less. */
+ sym_value -= (stub_entry->stub_offset
+ + stub_sec->output_offset
+ + stub_sec->output_section->vma);
+
+ bfd_put_32 (stub_bfd, (bfd_vma) BL_R1, loc);
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) -8, e_lrsel);
+ insn = hppa_rebuild_insn ((int) ADDIL_R1, val, 21);
+ bfd_put_32 (stub_bfd, insn, loc + 4);
+
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) -8, e_rrsel) >> 2;
+ insn = hppa_rebuild_insn ((int) BE_SR4_R1, val, 17);
+ bfd_put_32 (stub_bfd, insn, loc + 8);
+ size = 12;
+ break;
+
+ case hppa_stub_import:
+ case hppa_stub_import_shared:
+ off = stub_entry->h->elf.plt.offset;
+ if (off >= (bfd_vma) -2)
+ abort ();
+
+ off &= ~ (bfd_vma) 1;
+ sym_value = (off
+ + hplink->splt->output_offset
+ + hplink->splt->output_section->vma
+ - elf_gp (hplink->splt->output_section->owner));
+
+ insn = ADDIL_DP;
+#if R19_STUBS
+ if (stub_entry->stub_type == hppa_stub_import_shared)
+ insn = ADDIL_R19;
+#endif
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) 0, e_lrsel),
+ insn = hppa_rebuild_insn ((int) insn, val, 21);
+ bfd_put_32 (stub_bfd, insn, loc);
+
+ /* It is critical to use lrsel/rrsel here because we are using
+ two different offsets (+0 and +4) from sym_value. If we use
+ lsel/rsel then with unfortunate sym_values we will round
+ sym_value+4 up to the next 2k block leading to a mis-match
+ between the lsel and rsel value. */
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) 0, e_rrsel);
+ insn = hppa_rebuild_insn ((int) LDW_R1_R21, val, 14);
+ bfd_put_32 (stub_bfd, insn, loc + 4);
+
+ if (hplink->multi_subspace)
{
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) 4, e_rrsel);
+ insn = hppa_rebuild_insn ((int) LDW_R1_DLT, val, 14);
+ bfd_put_32 (stub_bfd, insn, loc + 8);
+
+ bfd_put_32 (stub_bfd, (bfd_vma) LDSID_R21_R1, loc + 12);
+ bfd_put_32 (stub_bfd, (bfd_vma) MTSP_R1, loc + 16);
+ bfd_put_32 (stub_bfd, (bfd_vma) BE_SR0_R21, loc + 20);
+ bfd_put_32 (stub_bfd, (bfd_vma) STW_RP, loc + 24);
+
+ size = 28;
+ }
+ else
+ {
+ bfd_put_32 (stub_bfd, (bfd_vma) BV_R0_R21, loc + 8);
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) 4, e_rrsel);
+ insn = hppa_rebuild_insn ((int) LDW_R1_DLT, val, 14);
+ bfd_put_32 (stub_bfd, insn, loc + 12);
+
+ size = 16;
+ }
+
+ if (!info->shared
+ && stub_entry->h != NULL
+ && stub_entry->h->pic_call)
+ {
+ /* Build the .plt entry needed to call a PIC function from
+ statically linked code. We don't need any relocs. */
+ bfd *dynobj;
+ struct elf32_hppa_link_hash_entry *eh;
+ bfd_vma value;
+
+ dynobj = hplink->root.dynobj;
+ eh = (struct elf32_hppa_link_hash_entry *) stub_entry->h;
+
+ if (eh->elf.root.type != bfd_link_hash_defined
+ && eh->elf.root.type != bfd_link_hash_defweak)
+ abort ();
+
+ value = (eh->elf.root.u.def.value
+ + eh->elf.root.u.def.section->output_offset
+ + eh->elf.root.u.def.section->output_section->vma);
+
+ /* Fill in the entry in the procedure linkage table.
+
+ The format of a plt entry is
+ <funcaddr>
+ <__gp>. */
+
+ bfd_put_32 (hplink->splt->owner, value,
+ hplink->splt->contents + off);
+ value = elf_gp (hplink->splt->output_section->owner);
+ bfd_put_32 (hplink->splt->owner, value,
+ hplink->splt->contents + off + 4);
+ }
+ break;
+
+ case hppa_stub_export:
+ /* Branches are relative. This is where we are going to. */
+ sym_value = (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. */
+ sym_value -= (stub_entry->stub_offset
+ + stub_sec->output_offset
+ + stub_sec->output_section->vma);
+
+ if (sym_value - 8 + 0x40000 >= 0x80000)
+ {
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
+ bfd_get_filename (stub_entry->target_section->owner),
+ stub_sec->name,
+ (long) stub_entry->stub_offset,
+ stub_entry->root.string);
bfd_set_error (bfd_error_bad_value);
return false;
}
- howto = elf_hppa_howto_table + r_type;
+
+ val = hppa_field_adjust (sym_value, (bfd_signed_vma) -8, e_fsel) >> 2;
+ insn = hppa_rebuild_insn ((int) BL_RP, val, 17);
+ bfd_put_32 (stub_bfd, insn, loc);
+
+ bfd_put_32 (stub_bfd, (bfd_vma) NOP, loc + 4);
+ bfd_put_32 (stub_bfd, (bfd_vma) LDW_RP, loc + 8);
+ bfd_put_32 (stub_bfd, (bfd_vma) LDSID_RP_R1, loc + 12);
+ bfd_put_32 (stub_bfd, (bfd_vma) MTSP_R1, loc + 16);
+ bfd_put_32 (stub_bfd, (bfd_vma) BE_SR0_RP, loc + 20);
+
+ /* Point the function symbol at the stub. */
+ stub_entry->h->elf.root.u.def.section = stub_sec;
+ stub_entry->h->elf.root.u.def.value = stub_sec->_raw_size;
+
+ size = 24;
+ break;
+
+ default:
+ BFD_FAIL ();
+ return false;
+ }
+
+ stub_sec->_raw_size += size;
+ return true;
+}
+
+#undef LDIL_R1
+#undef BE_SR4_R1
+#undef BL_R1
+#undef ADDIL_R1
+#undef DEPI_R1
+#undef ADDIL_DP
+#undef LDW_R1_R21
+#undef LDW_R1_DLT
+#undef LDW_R1_R19
+#undef ADDIL_R19
+#undef LDW_R1_DP
+#undef LDSID_R21_R1
+#undef MTSP_R1
+#undef BE_SR0_R21
+#undef STW_RP
+#undef BV_R0_R21
+#undef BL_RP
+#undef NOP
+#undef LDW_RP
+#undef LDSID_RP_R1
+#undef BE_SR0_RP
+
+/* As above, but don't actually build the stub. Just bump offset so
+ we know stub section sizes. */
+
+static boolean
+hppa_size_one_stub (gen_entry, in_arg)
+ struct bfd_hash_entry *gen_entry;
+ PTR in_arg;
+{
+ struct elf32_hppa_stub_hash_entry *stub_entry;
+ struct elf32_hppa_link_hash_table *hplink;
+ int size;
+
+ /* Massage our args to the form they really have. */
+ stub_entry = (struct elf32_hppa_stub_hash_entry *) gen_entry;
+ hplink = (struct elf32_hppa_link_hash_table *) in_arg;
+
+ if (stub_entry->stub_type == hppa_stub_long_branch)
+ {
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ if (stub_entry->reloc_sec != NULL)
+ stub_entry->reloc_sec->_raw_size += sizeof (Elf32_External_Rela);
+#endif
+ size = 8;
+ }
+ else if (stub_entry->stub_type == hppa_stub_long_branch_shared)
+ size = 12;
+ else if (stub_entry->stub_type == hppa_stub_export)
+ size = 24;
+ else /* hppa_stub_import or hppa_stub_import_shared. */
+ {
+ if (hplink->multi_subspace)
+ size = 28;
+ else
+ size = 16;
+ }
+
+ stub_entry->stub_sec->_raw_size += size;
+ return true;
+}
+
+/* Return nonzero if ABFD represents an HPPA ELF32 file.
+ Additionally we set the default architecture and machine. */
+
+static boolean
+elf32_hppa_object_p (abfd)
+ bfd *abfd;
+{
+ Elf_Internal_Ehdr * i_ehdrp;
+ unsigned int flags;
+
+ i_ehdrp = elf_elfheader (abfd);
+ if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0)
+ {
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX)
+ return false;
+ }
+ else
+ {
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_HPUX)
+ return false;
+ }
+
+ flags = i_ehdrp->e_flags;
+ switch (flags & (EF_PARISC_ARCH | EF_PARISC_WIDE))
+ {
+ case EFA_PARISC_1_0:
+ return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 10);
+ case EFA_PARISC_1_1:
+ return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 11);
+ case EFA_PARISC_2_0:
+ return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 20);
+ case EFA_PARISC_2_0 | EF_PARISC_WIDE:
+ return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 25);
+ }
+ return true;
+}
+
+/* Undo the generic ELF code's subtraction of section->vma from the
+ value of each external symbol. */
+
+static boolean
+elf32_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ const Elf_Internal_Sym *sym ATTRIBUTE_UNUSED;
+ const char **namep ATTRIBUTE_UNUSED;
+ flagword *flagsp ATTRIBUTE_UNUSED;
+ asection **secp;
+ bfd_vma *valp;
+{
+ *valp += (*secp)->vma;
+ return true;
+}
+
+/* Create the .plt and .got sections, and set up our hash table
+ short-cuts to various dynamic sections. */
+
+static boolean
+elf32_hppa_create_dynamic_sections (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ struct elf32_hppa_link_hash_table *hplink;
+
+ /* Don't try to create the .plt and .got twice. */
+ hplink = hppa_link_hash_table (info);
+ if (hplink->splt != NULL)
+ return true;
+
+ /* Call the generic code to do most of the work. */
+ if (! _bfd_elf_create_dynamic_sections (abfd, info))
+ return false;
+
+ hplink->splt = bfd_get_section_by_name (abfd, ".plt");
+ hplink->srelplt = bfd_get_section_by_name (abfd, ".rela.plt");
+
+ hplink->sgot = bfd_get_section_by_name (abfd, ".got");
+ hplink->srelgot = bfd_make_section (abfd, ".rela.got");
+ if (hplink->srelgot == NULL
+ || ! bfd_set_section_flags (abfd, hplink->srelgot,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (abfd, hplink->srelgot, 2))
+ return false;
+
+ hplink->sdynbss = bfd_get_section_by_name (abfd, ".dynbss");
+ hplink->srelbss = bfd_get_section_by_name (abfd, ".rela.bss");
+
+ return true;
+}
+
+/* Look through the relocs for a section during the first phase, and
+ allocate space in the global offset table or procedure linkage
+ table. At this point we haven't necessarily read all the input
+ files. */
+
+static boolean
+elf32_hppa_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_signed_vma *local_got_refcounts;
+ const Elf_Internal_Rela *rel;
+ const Elf_Internal_Rela *rel_end;
+ struct elf32_hppa_link_hash_table *hplink;
+ asection *sreloc;
+ asection *stubreloc;
+
+ if (info->relocateable)
+ return true;
+
+ hplink = hppa_link_hash_table (info);
+ dynobj = hplink->root.dynobj;
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+ sreloc = NULL;
+ stubreloc = NULL;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ enum {
+ NEED_GOT = 1,
+ NEED_PLT = 2,
+ NEED_DYNREL = 4,
+#if LONG_BRANCH_PIC_IN_SHLIB
+ NEED_STUBREL = 0, /* We won't be needing them in this case. */
+#else
+ NEED_STUBREL = 8,
+#endif
+ PLT_PLABEL = 16
+ };
+
+ unsigned int r_symndx, r_type;
+ struct elf32_hppa_link_hash_entry *h;
+ int need_entry;
r_symndx = ELF32_R_SYM (rel->r_info);
- if (info->relocateable)
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = ((struct elf32_hppa_link_hash_entry *)
+ sym_hashes[r_symndx - symtab_hdr->sh_info]);
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ switch (r_type)
{
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
+ case R_PARISC_DLTIND14F:
+ case R_PARISC_DLTIND14R:
+ case R_PARISC_DLTIND21L:
+ /* This symbol requires a global offset table entry. */
+ need_entry = NEED_GOT;
+
+ /* Mark this section as containing PIC code. */
+ sec->flags |= SEC_HAS_GOT_REF;
+ break;
+
+ case R_PARISC_PLABEL14R: /* "Official" procedure labels. */
+ case R_PARISC_PLABEL21L:
+ case R_PARISC_PLABEL32:
+ /* If the addend is non-zero, we break badly. */
+ if (rel->r_addend != 0)
+ abort ();
+
+ /* If we are creating a shared library, then we need to
+ create a PLT entry for all PLABELs, because PLABELs with
+ local symbols may be passed via a pointer to another
+ object. Additionally, output a dynamic relocation
+ pointing to the PLT entry.
+ For executables, the original 32-bit ABI allowed two
+ different styles of PLABELs (function pointers): For
+ global functions, the PLABEL word points into the .plt
+ two bytes past a (function address, gp) pair, and for
+ local functions the PLABEL points directly at the
+ function. The magic +2 for the first type allows us to
+ differentiate between the two. As you can imagine, this
+ is a real pain when it comes to generating code to call
+ functions indirectly or to compare function pointers.
+ We avoid the mess by always pointing a PLABEL into the
+ .plt, even for local functions. */
+ need_entry = PLT_PLABEL | NEED_PLT | NEED_DYNREL;
+ break;
+
+ case R_PARISC_PCREL12F:
+ hplink->has_12bit_branch = 1;
+ /* Fall thru. */
+ case R_PARISC_PCREL17C:
+ case R_PARISC_PCREL17F:
+ hplink->has_17bit_branch = 1;
+ /* Fall thru. */
+ case R_PARISC_PCREL22F:
+ /* Function calls might need to go through the .plt, and
+ might require long branch stubs. */
+ if (h == NULL)
{
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sym_sec = local_sections[r_symndx];
- rel->r_addend += sym_sec->output_offset;
- }
+ /* We know local syms won't need a .plt entry, and if
+ they need a long branch stub we can't guarantee that
+ we can reach the stub. So just flag an error later
+ if we're doing a shared link and find we need a long
+ branch stub. */
+ continue;
+ }
+ else
+ {
+ /* Global symbols will need a .plt entry if they remain
+ global, and in most cases won't need a long branch
+ stub. Unfortunately, we have to cater for the case
+ where a symbol is forced local by versioning, or due
+ to symbolic linking, and we lose the .plt entry. */
+ need_entry = NEED_PLT | NEED_STUBREL;
+ if (h->elf.type == STT_PARISC_MILLI)
+ need_entry = NEED_STUBREL;
+ }
+ break;
+
+ case R_PARISC_SEGBASE: /* Used to set segment base. */
+ case R_PARISC_SEGREL32: /* Relative reloc, used for unwind. */
+ case R_PARISC_PCREL14F: /* PC relative load/store. */
+ case R_PARISC_PCREL14R:
+ case R_PARISC_PCREL17R: /* External branches. */
+ case R_PARISC_PCREL21L: /* As above, and for load/store too. */
+ /* We don't need to propagate the relocation if linking a
+ shared object since these are section relative. */
+ continue;
+
+ case R_PARISC_DPREL14F: /* Used for gp rel data load/store. */
+ case R_PARISC_DPREL14R:
+ case R_PARISC_DPREL21L:
+ if (info->shared)
+ {
+ (*_bfd_error_handler)
+ (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
+ bfd_get_filename (abfd),
+ elf_hppa_howto_table[r_type].name);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
}
+ /* Fall through. */
+
+ case R_PARISC_DIR17F: /* Used for external branches. */
+ case R_PARISC_DIR17R:
+ case R_PARISC_DIR14F: /* Used for load/store from absolute locn. */
+ case R_PARISC_DIR14R:
+ case R_PARISC_DIR21L: /* As above, and for ext branches too. */
+#if 1
+ /* Help debug shared library creation. Any of the above
+ relocs can be used in shared libs, but they may cause
+ pages to become unshared. */
+ if (info->shared)
+ {
+ (*_bfd_error_handler)
+ (_("%s: relocation %s should not be used when making a shared object; recompile with -fPIC"),
+ bfd_get_filename (abfd),
+ elf_hppa_howto_table[r_type].name);
+ }
+ /* Fall through. */
+#endif
+
+ case R_PARISC_DIR32: /* .word relocs. */
+ /* We may want to output a dynamic relocation later. */
+ need_entry = NEED_DYNREL;
+ break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_PARISC_GNU_VTINHERIT:
+ if (!_bfd_elf32_gc_record_vtinherit (abfd, sec,
+ &h->elf, rel->r_offset))
+ return false;
+ continue;
+ /* This relocation describes which C++ vtable entries are actually
+ used. Record for later use during GC. */
+ case R_PARISC_GNU_VTENTRY:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec,
+ &h->elf, rel->r_addend))
+ return false;
continue;
- }
- /* This is a final link. */
- h = NULL;
- sym = NULL;
- sym_sec = NULL;
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- sym_sec = local_sections[r_symndx];
- relocation = ((ELF_ST_TYPE (sym->st_info) == STT_SECTION
- ? 0 : sym->st_value)
- + sym_sec->output_offset
- + sym_sec->output_section->vma);
+ default:
+ continue;
}
- else
+
+ /* Now carry out our orders. */
+ if (need_entry & NEED_GOT)
{
- long indx;
+ /* Allocate space for a GOT entry, as well as a dynamic
+ relocation for this entry. */
+ if (dynobj == NULL)
+ hplink->root.dynobj = dynobj = abfd;
- indx = r_symndx - symtab_hdr->sh_info;
- h = elf_sym_hashes (input_bfd)[indx];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
+ if (hplink->sgot == NULL)
+ {
+ if (! elf32_hppa_create_dynamic_sections (dynobj, info))
+ return false;
+ }
+
+ if (h != NULL)
{
- sym_sec = h->root.u.def.section;
- relocation = (h->root.u.def.value
- + sym_sec->output_offset
- + sym_sec->output_section->vma);
+ if (h->elf.got.refcount == -1)
+ {
+ h->elf.got.refcount = 1;
+
+ /* Make sure this symbol is output as a dynamic symbol. */
+ if (h->elf.dynindx == -1)
+ {
+ if (! bfd_elf32_link_record_dynamic_symbol (info,
+ &h->elf))
+ return false;
+ }
+ }
+ else
+ h->elf.got.refcount += 1;
}
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
else
{
- if (!((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset, true)))
- return false;
- break;
+ /* This is a global offset table entry for a local symbol. */
+ if (local_got_refcounts == NULL)
+ {
+ size_t size;
+
+ /* Allocate space for local got offsets and local
+ plt offsets. Done this way to save polluting
+ elf_obj_tdata with another target specific
+ pointer. */
+ size = symtab_hdr->sh_info * 2 * sizeof (bfd_signed_vma);
+ local_got_refcounts = ((bfd_signed_vma *)
+ bfd_alloc (abfd, size));
+ if (local_got_refcounts == NULL)
+ return false;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ memset (local_got_refcounts, -1, size);
+ }
+ if (local_got_refcounts[r_symndx] == -1)
+ local_got_refcounts[r_symndx] = 1;
+ else
+ local_got_refcounts[r_symndx] += 1;
}
}
- if (h != NULL)
- sym_name = h->root.root.string;
- else
+ if (need_entry & NEED_PLT)
{
- sym_name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
- if (sym_name == NULL)
- return false;
- if (*sym_name == '\0')
- sym_name = bfd_section_name (input_bfd, sym_sec);
- }
+ /* If we are creating a shared library, and this is a reloc
+ against a weak symbol or a global symbol in a dynamic
+ object, then we will be creating an import stub and a
+ .plt entry for the symbol. Similarly, on a normal link
+ to symbols defined in a dynamic object we'll need the
+ import stub and a .plt entry. We don't know yet whether
+ the symbol is defined or not, so make an entry anyway and
+ clean up later in adjust_dynamic_symbol. */
+ if ((sec->flags & SEC_ALLOC) != 0)
+ {
+ if (h != NULL)
+ {
+ if (h->elf.plt.refcount == -1)
+ {
+ h->elf.plt.refcount = 1;
+ h->elf.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ }
+ else
+ h->elf.plt.refcount += 1;
- r = elf32_hppa_bfd_final_link_relocate (howto, input_bfd, output_bfd,
- input_section, contents,
- rel->r_offset, relocation,
- rel->r_addend, info, sym_sec,
- sym_name, h == NULL);
+ /* If this .plt entry is for a plabel, mark it so
+ that adjust_dynamic_symbol will keep the entry
+ even if it appears to be local. */
+ if (need_entry & PLT_PLABEL)
+ h->plabel = 1;
+ }
+ else if (need_entry & PLT_PLABEL)
+ {
+ int indx;
+
+ if (local_got_refcounts == NULL)
+ {
+ size_t size;
+
+ /* Allocate space for local got offsets and local
+ plt offsets. */
+ size = symtab_hdr->sh_info * 2 * sizeof (bfd_signed_vma);
+ local_got_refcounts = ((bfd_signed_vma *)
+ bfd_alloc (abfd, size));
+ if (local_got_refcounts == NULL)
+ return false;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ memset (local_got_refcounts, -1, size);
+ }
+ indx = r_symndx + symtab_hdr->sh_info;
+ if (local_got_refcounts[indx] == -1)
+ local_got_refcounts[indx] = 1;
+ else
+ local_got_refcounts[indx] += 1;
+ }
+ }
+ }
- if (r != bfd_reloc_ok)
+ if (need_entry & (NEED_DYNREL | NEED_STUBREL))
{
- switch (r)
+ /* Flag this symbol as having a non-got, non-plt reference
+ so that we generate copy relocs if it turns out to be
+ dynamic. */
+ if (h != NULL)
+ h->elf.elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+
+ /* If we are creating a shared library then we need to copy
+ the reloc into the shared library. However, if we are
+ linking with -Bsymbolic, we need only copy absolute
+ relocs or relocs against symbols that are not defined in
+ an object we are including in the link. PC- or DP- or
+ DLT-relative relocs against any local sym or global sym
+ with DEF_REGULAR set, can be discarded. 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 reloc_entries field of the
+ hash table entry.
+
+ A similar situation to the -Bsymbolic case occurs when
+ creating shared libraries and symbol visibility changes
+ render the symbol local.
+
+ As it turns out, all the relocs we will be creating here
+ are absolute, so we cannot remove them on -Bsymbolic
+ links or visibility changes anyway. A STUB_REL reloc
+ is absolute too, as in that case it is the reloc in the
+ stub we will be creating, rather than copying the PCREL
+ reloc in the branch. */
+ if ((sec->flags & SEC_ALLOC) != 0
+ && info->shared
+#if RELATIVE_DYNAMIC_RELOCS
+ && (!info->symbolic
+ || is_absolute_reloc (r_type)
+ || (h != NULL
+ && ((h->elf.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+#endif
+ )
{
- /* This can happen for DP relative relocs if $global$ is
- undefined. This is a panic situation so we don't try
- to continue. */
- case bfd_reloc_undefined:
- case bfd_reloc_notsupported:
- if (!((*info->callbacks->undefined_symbol)
- (info, "$global$", input_bfd,
- input_section, rel->r_offset, true)))
- return false;
- return false;
- case bfd_reloc_dangerous:
- {
- /* We use this return value to indicate that we performed
- a "dangerous" relocation. This doesn't mean we did
- the wrong thing, it just means there may be some cleanup
- that needs to be done here.
-
- In particular we had to swap the last call insn and its
- delay slot. If the delay slot insn needed a relocation,
- then we'll need to adjust the next relocation entry's
- offset to account for the fact that the insn moved.
-
- This hair wouldn't be necessary if we inserted stubs
- between procedures and used a "bl" to get to the stub. */
- if (rel != relend)
- {
- Elf_Internal_Rela *next_rel = rel + 1;
-
- if (rel->r_offset + 4 == next_rel->r_offset)
- next_rel->r_offset -= 4;
- }
- break;
- }
- default:
- case bfd_reloc_outofrange:
- case bfd_reloc_overflow:
- {
- if (!((*info->callbacks->reloc_overflow)
- (info, sym_name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
- return false;
- }
- break;
+ boolean doit;
+ asection *srel;
+
+ srel = sreloc;
+ if ((need_entry & NEED_STUBREL))
+ srel = stubreloc;
+
+ /* Create a reloc section in dynobj and make room for
+ this reloc. */
+ if (srel == NULL)
+ {
+ char *name;
+
+ if (dynobj == NULL)
+ hplink->root.dynobj = dynobj = abfd;
+
+ name = bfd_elf_string_from_elf_section
+ (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ elf_section_data (sec)->rel_hdr.sh_name);
+ if (name == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("Could not find relocation section for %s"),
+ sec->name);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ if ((need_entry & NEED_STUBREL))
+ {
+ size_t len = strlen (name) + sizeof (STUB_SUFFIX);
+ char *newname = bfd_malloc (len);
+
+ if (newname == NULL)
+ return false;
+ strcpy (newname, name);
+ strcpy (newname + len - sizeof (STUB_SUFFIX),
+ STUB_SUFFIX);
+ name = newname;
+ }
+
+ srel = bfd_get_section_by_name (dynobj, name);
+ if (srel == NULL)
+ {
+ flagword flags;
+
+ srel = 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 (srel == NULL
+ || !bfd_set_section_flags (dynobj, srel, flags)
+ || !bfd_set_section_alignment (dynobj, srel, 2))
+ return false;
+ }
+ else if ((need_entry & NEED_STUBREL))
+ free (name);
+
+ if ((need_entry & NEED_STUBREL))
+ stubreloc = srel;
+ else
+ sreloc = srel;
+ }
+
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ /* If this is a function call, we only need one dynamic
+ reloc for the stub as all calls to a particular
+ function will go through the same stub. Actually, a
+ long branch stub needs two relocations, but we count
+ on some intelligence on the part of the dynamic
+ linker. */
+ if ((need_entry & NEED_STUBREL))
+ {
+ doit = h->stub_reloc_sec != stubreloc;
+ h->stub_reloc_sec = stubreloc;
+ }
+ else
+#endif
+ doit = 1;
+
+ if (doit)
+ {
+ srel->_raw_size += sizeof (Elf32_External_Rela);
+
+#if ! LONG_BRANCH_PIC_IN_SHLIB || RELATIVE_DYNAMIC_RELOCS
+ /* Keep track of relocations we have entered for
+ this global symbol, so that we can discard them
+ later if necessary. */
+ if (h != NULL
+ && (0
+#if RELATIVE_DYNAMIC_RELOCS
+ || ! is_absolute_reloc (rtype)
+#endif
+ || (need_entry & NEED_STUBREL)))
+ {
+ struct elf32_hppa_dyn_reloc_entry *p;
+
+ for (p = h->reloc_entries; p != NULL; p = p->next)
+ if (p->section == srel)
+ break;
+
+ if (p == NULL)
+ {
+ p = ((struct elf32_hppa_dyn_reloc_entry *)
+ bfd_alloc (dynobj, sizeof *p));
+ if (p == NULL)
+ return false;
+ p->next = h->reloc_entries;
+ h->reloc_entries = p;
+ p->section = srel;
+ p->count = 0;
+ }
+
+ /* NEED_STUBREL and NEED_DYNREL are never both
+ set. Leave the count at zero for the
+ NEED_STUBREL case as we only ever have one
+ stub reloc per section per symbol, and this
+ simplifies code in hppa_discard_copies. */
+ if (! (need_entry & NEED_STUBREL))
+ ++p->count;
+ }
+#endif
+ }
}
}
}
@@ -522,803 +1721,2712 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
return true;
}
-/* Actually perform a relocation as part of a final link. This can get
- rather hairy when linker stubs are needed. */
+/* Return the section that should be marked against garbage collection
+ for a given relocation. */
-static bfd_reloc_status_type
-elf32_hppa_bfd_final_link_relocate (howto, input_bfd, output_bfd,
- input_section, contents, offset, value,
- addend, info, sym_sec, sym_name, is_local)
- reloc_howto_type *howto;
- bfd *input_bfd;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd_byte *contents;
- bfd_vma offset;
- bfd_vma value;
- bfd_vma addend;
- struct bfd_link_info *info;
- asection *sym_sec;
- const char *sym_name;
- int is_local;
+static asection *
+elf32_hppa_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
- unsigned long insn;
- unsigned long r_type = howto->type;
- unsigned long r_format = howto->bitsize;
- unsigned long r_field = e_fsel;
- bfd_byte *hit_data = contents + offset;
- boolean r_pcrel = howto->pc_relative;
+ if (h != NULL)
+ {
+ switch ((unsigned int) ELF32_R_TYPE (rel->r_info))
+ {
+ case R_PARISC_GNU_VTINHERIT:
+ case R_PARISC_GNU_VTENTRY:
+ break;
- insn = bfd_get_32 (input_bfd, hit_data);
+ 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;
- /* Make sure we have a value for $global$. FIXME isn't this effectively
- just like the gp pointer on MIPS? Can we use those routines for this
- purpose? */
- if (!elf32_hppa_hash_table (info)->global_sym_defined)
+ default:
+ break;
+ }
+ }
+ }
+ else
{
- struct elf_link_hash_entry *h;
- asection *sec;
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
- h = elf_link_hash_lookup (elf_hash_table (info), "$global$", false,
- false, false);
+ return NULL;
+}
- /* If there isn't a $global$, then we're in deep trouble. */
- if (h == NULL)
- return bfd_reloc_notsupported;
+/* Update the got and plt entry reference counts for the section being
+ removed. */
- /* If $global$ isn't a defined symbol, then we're still in deep
- trouble. */
- if (h->root.type != bfd_link_hash_defined)
- return bfd_reloc_undefined;
+static boolean
+elf32_hppa_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;
+ bfd_signed_vma *local_plt_refcounts;
+ const Elf_Internal_Rela *rel, *relend;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ struct elf32_hppa_link_hash_table *hplink;
+ bfd *dynobj;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+ local_plt_refcounts = local_got_refcounts;
+ if (local_plt_refcounts != NULL)
+ local_plt_refcounts += symtab_hdr->sh_info;
+ hplink = hppa_link_hash_table (info);
+ dynobj = hplink->root.dynobj;
+ if (dynobj == NULL)
+ return true;
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ switch ((unsigned int) ELF32_R_TYPE (rel->r_info))
+ {
+ case R_PARISC_DLTIND14F:
+ case R_PARISC_DLTIND14R:
+ case R_PARISC_DLTIND21L:
+ 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_PARISC_PCREL12F:
+ case R_PARISC_PCREL17C:
+ case R_PARISC_PCREL17F:
+ case R_PARISC_PCREL22F:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ if (h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+ }
+ break;
- sec = h->root.u.def.section;
- elf32_hppa_hash_table (info)->global_value = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- elf32_hppa_hash_table (info)->global_sym_defined = 1;
- }
+ case R_PARISC_PLABEL14R:
+ case R_PARISC_PLABEL21L:
+ case R_PARISC_PLABEL32:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ if (h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+ }
+ else if (local_plt_refcounts != NULL)
+ {
+ if (local_plt_refcounts[r_symndx] > 0)
+ local_plt_refcounts[r_symndx] -= 1;
+ }
+ break;
- switch (r_type)
+ default:
+ break;
+ }
+
+ return true;
+}
+
+/* Our own version of hide_symbol, so that we can keep plt entries for
+ plabels. */
+
+static void
+elf32_hppa_hide_symbol (info, h)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ struct elf_link_hash_entry *h;
+{
+ if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ h->dynindx = -1;
+ if (! ((struct elf32_hppa_link_hash_entry *) h)->plabel)
{
- case R_PARISC_NONE:
- break;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.offset = (bfd_vma) -1;
+ }
+}
- case R_PARISC_DIR32:
- case R_PARISC_DIR17F:
- case R_PARISC_PCREL17C:
- r_field = e_fsel;
- goto do_basic_type_1;
- case R_PARISC_DIR21L:
- case R_PARISC_PCREL21L:
- r_field = e_lrsel;
- goto do_basic_type_1;
- case R_PARISC_DIR17R:
- case R_PARISC_PCREL17R:
- case R_PARISC_DIR14R:
- case R_PARISC_PCREL14R:
- r_field = e_rrsel;
- goto do_basic_type_1;
+/* This is the condition under which elf32_hppa_finish_dynamic_symbol
+ will be called from elflink.h. If elflink.h doesn't call our
+ finish_dynamic_symbol routine, we'll need to do something about
+ initializing any .plt and .got entries in elf32_hppa_relocate_section. */
+#define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, INFO, H) \
+ ((DYN) \
+ && ((INFO)->shared \
+ || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) \
+ && ((H)->dynindx != -1 \
+ || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0))
+
+/* 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. */
- /* For all the DP relative relocations, we need to examine the symbol's
- section. If it's a code section, then "data pointer relative" makes
- no sense. In that case we don't adjust the "value", and for 21 bit
- addil instructions, we change the source addend register from %dp to
- %r0. */
- case R_PARISC_DPREL21L:
- r_field = e_lrsel;
- if (sym_sec->flags & SEC_CODE)
+static boolean
+elf32_hppa_adjust_dynamic_symbol (info, h)
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+{
+ bfd *dynobj;
+ struct elf32_hppa_link_hash_table *hplink;
+ asection *s;
+
+ hplink = hppa_link_hash_table (info);
+ dynobj = hplink->root.dynobj;
+
+ /* If this is a function, put it in the procedure linkage table. We
+ will fill in the contents of the procedure linkage table later,
+ when we know the address of the .got section. */
+ if (h->type == STT_FUNC
+ || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ {
+ if (!info->shared
+ && h->plt.refcount > 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && (h->root.u.def.section->flags & SEC_HAS_GOT_REF) != 0)
{
- if ((insn & 0xfc000000) >> 26 == 0xa
- && (insn & 0x03e00000) >> 21 == 0x1b)
- insn &= ~0x03e00000;
+ ((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call = 1;
}
- else
- value -= elf32_hppa_hash_table (info)->global_value;
- goto do_basic_type_1;
- case R_PARISC_DPREL14R:
- r_field = e_rrsel;
- if ((sym_sec->flags & SEC_CODE) == 0)
- value -= elf32_hppa_hash_table (info)->global_value;
- goto do_basic_type_1;
- case R_PARISC_DPREL14F:
- r_field = e_fsel;
- if ((sym_sec->flags & SEC_CODE) == 0)
- value -= elf32_hppa_hash_table (info)->global_value;
- goto do_basic_type_1;
- /* These cases are separate as they may involve a lot more work
- to deal with linker stubs. */
- case R_PARISC_PLABEL32:
- case R_PARISC_PLABEL21L:
- case R_PARISC_PLABEL14R:
- case R_PARISC_PCREL17F:
- {
- bfd_vma location;
- unsigned int len;
- char *new_name, *stub_name;
-
- /* Get the field selector right. We'll need it in a minute. */
- if (r_type == R_PARISC_PCREL17F
- || r_type == R_PARISC_PLABEL32)
- r_field = e_fsel;
- else if (r_type == R_PARISC_PLABEL21L)
- r_field = e_lrsel;
- else if (r_type == R_PARISC_PLABEL14R)
- r_field = e_rrsel;
-
- /* Find out where we are and where we're going. */
- location = (offset +
- input_section->output_offset +
- input_section->output_section->vma);
-
- len = strlen (sym_name) + 1;
- if (is_local)
- len += 9;
- new_name = bfd_malloc (len);
- if (!new_name)
- return bfd_reloc_notsupported;
- strcpy (new_name, sym_name);
-
- /* Local symbols have unique IDs. */
- if (is_local)
- sprintf (new_name + len - 10, "_%08x", (int)sym_sec);
-
- /* Any kind of linker stub needed? */
- if (((int)(value - location) > 0x3ffff)
- || ((int)(value - location) < (int)0xfffc0000))
- {
- struct elf32_hppa_stub_hash_table *stub_hash_table;
- struct elf32_hppa_stub_hash_entry *stub_hash;
- asection *stub_section;
+ if (h->plt.refcount <= 0
+ || ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && h->root.type != bfd_link_hash_defweak
+ && ! ((struct elf32_hppa_link_hash_entry *) h)->plabel
+ && (!info->shared || info->symbolic)))
+ {
+ /* The .plt entry is not needed when:
+ a) Garbage collection has removed all references to the
+ symbol, or
+ b) We know for certain the symbol is defined in this
+ object, and it's not a weak definition, nor is the symbol
+ used by a plabel relocation. Either this object is the
+ application or we are doing a shared symbolic link. */
+
+ /* As a special sop to the hppa ABI, we keep a .plt entry
+ for functions in sections containing PIC code. */
+ if (((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call)
+ ((struct elf32_hppa_link_hash_entry *) h)->pic_call = 1;
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ return true;
+ }
+ }
- /* Build a name for the stub. */
+ if (! ((struct elf32_hppa_link_hash_entry *) h)->pic_call)
+ {
+ /* 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_elf32_link_record_dynamic_symbol (info, h))
+ return false;
+ }
+ }
- len = strlen (new_name);
- len += 23;
- stub_name = bfd_malloc (len);
- if (!stub_name)
- return bfd_reloc_notsupported;
- elf32_hppa_name_of_stub (location, value, stub_name);
- strcat (stub_name, new_name);
- free (new_name);
+ return true;
+ }
- stub_hash_table = elf32_hppa_hash_table (info)->stub_hash_table;
+ /* 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->weakdef->root.type != bfd_link_hash_defined
+ && h->weakdef->root.type != bfd_link_hash_defweak)
+ abort ();
+ h->root.u.def.section = h->weakdef->root.u.def.section;
+ h->root.u.def.value = h->weakdef->root.u.def.value;
+ return true;
+ }
- stub_hash
- = elf32_hppa_stub_hash_lookup (stub_hash_table, stub_name,
- false, false);
+ /* 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;
+
+ /* 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 = hplink->sdynbss;
+
+ /* We must generate a 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;
- /* We're done with that name. */
- free (stub_name);
+ srel = hplink->srelbss;
+ srel->_raw_size += sizeof (Elf32_External_Rela);
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ }
- /* The stub BFD only has one section. */
- stub_section = stub_hash_table->stub_bfd->sections;
+ {
+ /* We need to figure out the alignment required for this symbol. I
+ have no idea how other ELF linkers handle this. */
+ unsigned int power_of_two;
- if (stub_hash != NULL)
- {
- if (r_type == R_PARISC_PCREL17F)
- {
- unsigned long delay_insn;
- unsigned int opcode, rtn_reg, ldo_target_reg, ldo_src_reg;
-
- /* We'll need to peek at the next insn. */
- delay_insn = bfd_get_32 (input_bfd, hit_data + 4);
- opcode = get_opcode (delay_insn);
-
- /* We also need to know the return register for this
- call. */
- rtn_reg = (insn & 0x03e00000) >> 21;
-
- ldo_src_reg = (delay_insn & 0x03e00000) >> 21;
- ldo_target_reg = (delay_insn & 0x001f0000) >> 16;
-
- /* Munge up the value and other parameters for
- hppa_elf_relocate_insn. */
-
- value = (stub_hash->offset
- + stub_section->output_offset
- + stub_section->output_section->vma);
-
- r_format = 17;
- r_field = e_fsel;
- r_pcrel = 0;
- addend = 0;
-
- /* We need to peek at the delay insn and determine if
- we'll need to swap the branch and its delay insn. */
- if ((insn & 2)
- || (opcode == LDO
- && ldo_target_reg == rtn_reg)
- || (delay_insn == 0x08000240))
- {
- /* No need to swap the branch and its delay slot, but
- we do need to make sure to jump past the return
- pointer update in the stub. */
- value += 4;
-
- /* If the delay insn does a return pointer adjustment,
- then we have to make sure it stays valid. */
- if (opcode == LDO
- && ldo_target_reg == rtn_reg)
- {
- delay_insn &= 0xfc00ffff;
- delay_insn |= ((31 << 21) | (31 << 16));
- bfd_put_32 (input_bfd, delay_insn, hit_data + 4);
- }
- /* Use a BLE to reach the stub. */
- insn = BLE_SR4_R0;
- }
- else
- {
- /* Wonderful, we have to swap the call insn and its
- delay slot. */
- bfd_put_32 (input_bfd, delay_insn, hit_data);
- /* Use a BLE,n to reach the stub. */
- insn = (BLE_SR4_R0 | 0x2);
- bfd_put_32 (input_bfd, insn, hit_data + 4);
- insn = hppa_elf_relocate_insn (input_bfd,
- input_section,
- insn, offset + 4,
- value, addend,
- r_format, r_field,
- r_pcrel);
- /* Update the instruction word. */
- bfd_put_32 (input_bfd, insn, hit_data + 4);
- return bfd_reloc_dangerous;
- }
- }
- else
- return bfd_reloc_notsupported;
- }
- }
- goto do_basic_type_1;
+ 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;
-do_basic_type_1:
- insn = hppa_elf_relocate_insn (input_bfd, input_section, insn,
- offset, value, addend, r_format,
- r_field, r_pcrel);
- break;
+ /* Increment the section size to make room for the symbol. */
+ s->_raw_size += h->size;
- /* Something we don't know how to handle. */
- default:
- return bfd_reloc_notsupported;
+ return true;
+}
+
+/* Called via elf_link_hash_traverse to create .plt entries for an
+ application that uses statically linked PIC functions. Similar to
+ the first part of elf32_hppa_adjust_dynamic_symbol. */
+
+static boolean
+hppa_handle_PIC_calls (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf ATTRIBUTE_UNUSED;
+{
+ if (! (h->plt.refcount > 0
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && (h->root.u.def.section->flags & SEC_HAS_GOT_REF) != 0))
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ return true;
}
- /* Update the instruction word. */
- bfd_put_32 (input_bfd, insn, hit_data);
- return (bfd_reloc_ok);
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ ((struct elf32_hppa_link_hash_entry *) h)->maybe_pic_call = 1;
+ ((struct elf32_hppa_link_hash_entry *) h)->pic_call = 1;
+
+ return true;
}
-/* Undo the generic ELF code's subtraction of section->vma from the
- value of each external symbol. */
+/* Allocate space in .plt, .got and associated reloc sections for
+ global syms. */
static boolean
-elf32_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- const Elf_Internal_Sym *sym ATTRIBUTE_UNUSED;
- const char **namep ATTRIBUTE_UNUSED;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp;
- bfd_vma *valp;
+allocate_plt_and_got (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
{
- *valp += (*secp)->vma;
+ struct bfd_link_info *info;
+ struct elf32_hppa_link_hash_table *hplink;
+ asection *s;
+
+ if (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ return true;
+
+ info = (struct bfd_link_info *) inf;
+ hplink = hppa_link_hash_table (info);
+ if ((hplink->root.dynamic_sections_created
+ && h->plt.refcount > 0)
+ || ((struct elf32_hppa_link_hash_entry *) h)->pic_call)
+ {
+ /* Make an entry in the .plt section. */
+ s = hplink->splt;
+ h->plt.offset = s->_raw_size;
+ if (PLABEL_PLT_ENTRY_SIZE != PLT_ENTRY_SIZE
+ && ((struct elf32_hppa_link_hash_entry *) h)->plabel
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ {
+ /* Add some extra space for the dynamic linker to use. */
+ s->_raw_size += PLABEL_PLT_ENTRY_SIZE;
+ }
+ else
+ s->_raw_size += PLT_ENTRY_SIZE;
+
+ if (! ((struct elf32_hppa_link_hash_entry *) h)->pic_call
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
+ {
+ /* We also need to make an entry in the .rela.plt section. */
+ hplink->srelplt->_raw_size += sizeof (Elf32_External_Rela);
+ hplink->need_plt_stub = 1;
+ }
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ }
+
+ if (h->got.refcount > 0)
+ {
+ boolean dyn;
+
+ s = hplink->sgot;
+ h->got.offset = s->_raw_size;
+ s->_raw_size += GOT_ENTRY_SIZE;
+ dyn = hplink->root.dynamic_sections_created;
+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+ hplink->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+
return true;
}
-/* Determine the name of the stub needed to perform a call assuming the
- argument relocation bits for caller and callee are in CALLER and CALLEE
- for a call from LOCATION to DESTINATION. Copy the name into STUB_NAME. */
+#if ((! LONG_BRANCH_PIC_IN_SHLIB && LONG_BRANCH_VIA_PLT) \
+ || RELATIVE_DYNAMIC_RELOCS)
+/* This function is called via elf_link_hash_traverse to discard space
+ we allocated for relocs that it turned out we didn't need. */
-static void
-elf32_hppa_name_of_stub (location, destination, stub_name)
- bfd_vma location ATTRIBUTE_UNUSED;
- bfd_vma destination ATTRIBUTE_UNUSED;
- char *stub_name;
+static boolean
+hppa_discard_copies (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
{
- strcpy (stub_name, "_____long_branch_stub_");
+ struct elf32_hppa_dyn_reloc_entry *s;
+ struct elf32_hppa_link_hash_entry *eh;
+ struct bfd_link_info *info;
+
+ eh = (struct elf32_hppa_link_hash_entry *) h;
+ info = (struct bfd_link_info *) inf;
+
+#if ! LONG_BRANCH_PIC_IN_SHLIB && LONG_BRANCH_VIA_PLT
+ /* Handle the stub reloc case. If we have a plt entry for the
+ function, we won't be needing long branch stubs. s->count will
+ only be zero for stub relocs, which provides a handy way of
+ flagging these relocs, and means we need do nothing special for
+ the forced local and symbolic link case. */
+ if (eh->stub_reloc_sec != NULL
+ && eh->elf.plt.offset != (bfd_vma) -1)
+ {
+ for (s = eh->reloc_entries; s != NULL; s = s->next)
+ if (s->count == 0)
+ s->section->_raw_size -= sizeof (Elf32_External_Rela);
+ }
+#endif
+
+#if RELATIVE_DYNAMIC_RELOCS
+ /* If a symbol has been forced local or we have found a regular
+ definition for the symbolic link case, then we won't be needing
+ any relocs. */
+ if (eh->elf.dynindx == -1
+ || ((eh->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && !is_absolute_reloc (r_type)
+ && info->symbolic))
+ {
+ for (s = eh->reloc_entries; s != NULL; s = s->next)
+ s->section->_raw_size -= s->count * sizeof (Elf32_External_Rela);
+ }
+#endif
+
+ return true;
}
+#endif
-/* Compute the size of the stub needed to call from LOCATION to DESTINATION
- (a function named SYM_NAME), with argument relocation bits CALLER and
- CALLEE. Return zero if no stub is needed to perform such a call. */
+/* This function is called via elf_link_hash_traverse to force
+ millicode symbols local so they do not end up as globals in the
+ dynamic symbol table. We ought to be able to do this in
+ adjust_dynamic_symbol, but our adjust_dynamic_symbol is not called
+ for all dynamic symbols. Arguably, this is a bug in
+ elf_adjust_dynamic_symbol. */
-static unsigned int
-elf32_hppa_size_of_stub (location, destination, sym_name)
- bfd_vma location, destination;
- const char *sym_name;
+static boolean
+clobber_millicode_symbols (h, info)
+ struct elf_link_hash_entry *h;
+ struct bfd_link_info *info;
{
- /* Determine if a long branch stub is needed. */
- if (!(((int)(location - destination) > 0x3ffff)
- || ((int)(location - destination) < (int)0xfffc0000)))
- return 0;
-
- if (!strncmp ("$$", sym_name, 2)
- && strcmp ("$$dyncall", sym_name))
- return 12;
- else
- return 16;
+ /* We only want to remove these from the dynamic symbol table.
+ Therefore we do not leave ELF_LINK_FORCED_LOCAL set. */
+ if (h->type == STT_PARISC_MILLI)
+ {
+ unsigned short oldflags = h->elf_link_hash_flags;
+ h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ elf32_hppa_hide_symbol (info, h);
+ h->elf_link_hash_flags &= ~ELF_LINK_FORCED_LOCAL;
+ h->elf_link_hash_flags |= oldflags & ELF_LINK_FORCED_LOCAL;
+ }
+ return true;
}
-/* Build one linker stub as defined by the stub hash table entry GEN_ENTRY.
- IN_ARGS contains the stub BFD and link info pointers. */
+/* Set the sizes of the dynamic sections. */
static boolean
-elf32_hppa_build_one_stub (gen_entry, in_args)
- struct bfd_hash_entry *gen_entry;
- PTR in_args;
+elf32_hppa_size_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
{
- void **args = (void **)in_args;
- bfd *stub_bfd = (bfd *)args[0];
- struct bfd_link_info *info = (struct bfd_link_info *)args[1];
- struct elf32_hppa_stub_hash_entry *entry;
- struct elf32_hppa_stub_hash_table *stub_hash_table;
- bfd_byte *loc;
- symvalue sym_value;
- const char *sym_name;
+ struct elf32_hppa_link_hash_table *hplink;
+ bfd *dynobj;
+ asection *s;
+ boolean relocs;
+ boolean reltext;
+
+ hplink = hppa_link_hash_table (info);
+ dynobj = hplink->root.dynobj;
+ if (dynobj == NULL)
+ abort ();
+
+ if (hplink->root.dynamic_sections_created)
+ {
+ bfd *i;
- /* Initialize pointers to the stub hash table, the particular entry we
- are building a stub for, and where (in memory) we should place the stub
- instructions. */
- entry = (struct elf32_hppa_stub_hash_entry *)gen_entry;
- stub_hash_table = elf32_hppa_hash_table(info)->stub_hash_table;
- loc = stub_hash_table->location;
+ /* Set the contents of the .interp section to the interpreter. */
+ if (! info->shared)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ if (s == NULL)
+ abort ();
+ s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ }
- /* Make a note of the offset within the stubs for this entry. */
- entry->offset = stub_hash_table->offset;
+ /* Force millicode symbols local. */
+ elf_link_hash_traverse (&hplink->root,
+ clobber_millicode_symbols,
+ info);
+
+ /* Set up .got and .plt offsets for local syms. */
+ for (i = info->input_bfds; i; i = i->link_next)
+ {
+ bfd_signed_vma *local_got;
+ bfd_signed_vma *end_local_got;
+ bfd_signed_vma *local_plt;
+ bfd_signed_vma *end_local_plt;
+ bfd_size_type locsymcount;
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *srel;
+
+ if (bfd_get_flavour (i) != bfd_target_elf_flavour)
+ continue;
- /* The symbol's name starts at offset 22. */
- sym_name = entry->root.string + 22;
+ local_got = elf_local_got_refcounts (i);
+ if (!local_got)
+ continue;
- sym_value = (entry->target_value
- + entry->target_section->output_offset
- + entry->target_section->output_section->vma);
+ symtab_hdr = &elf_tdata (i)->symtab_hdr;
+ locsymcount = symtab_hdr->sh_info;
+ end_local_got = local_got + locsymcount;
+ s = hplink->sgot;
+ srel = hplink->srelgot;
+ for (; local_got < end_local_got; ++local_got)
+ {
+ if (*local_got > 0)
+ {
+ *local_got = s->_raw_size;
+ s->_raw_size += GOT_ENTRY_SIZE;
+ if (info->shared)
+ srel->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ *local_got = (bfd_vma) -1;
+ }
- if (1)
+ local_plt = end_local_got;
+ end_local_plt = local_plt + locsymcount;
+ s = hplink->splt;
+ srel = hplink->srelplt;
+ for (; local_plt < end_local_plt; ++local_plt)
+ {
+ if (*local_plt > 0)
+ {
+ *local_plt = s->_raw_size;
+ s->_raw_size += PLT_ENTRY_SIZE;
+ if (info->shared)
+ srel->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ *local_plt = (bfd_vma) -1;
+ }
+ }
+ }
+ else
{
- /* Create one of two variant long branch stubs. One for $$dyncall and
- normal calls, the other for calls to millicode. */
- unsigned long insn;
- int millicode_call = 0;
+ /* Run through the function symbols, looking for any that are
+ PIC, and allocate space for the necessary .plt entries so
+ that %r19 will be set up. */
+ if (! info->shared)
+ elf_link_hash_traverse (&hplink->root,
+ hppa_handle_PIC_calls,
+ info);
+ }
- if (!strncmp ("$$", sym_name, 2) && strcmp ("$$dyncall", sym_name))
- millicode_call = 1;
+ /* Allocate global sym .plt and .got entries. */
+ elf_link_hash_traverse (&hplink->root,
+ allocate_plt_and_got,
+ info);
+
+#if ((! LONG_BRANCH_PIC_IN_SHLIB && LONG_BRANCH_VIA_PLT) \
+ || RELATIVE_DYNAMIC_RELOCS)
+ /* If this is a -Bsymbolic shared link, then we need to discard all
+ relocs against symbols defined in a regular object. We also need
+ to lose relocs we've allocated for long branch stubs if we know
+ we won't be generating a stub. */
+ if (info->shared)
+ elf_link_hash_traverse (&hplink->root,
+ hppa_discard_copies,
+ info);
+#endif
+
+ /* The check_relocs and adjust_dynamic_symbol entry points have
+ determined the sizes of the various dynamic sections. Allocate
+ memory for them. */
+ relocs = false;
+ reltext = false;
+ for (s = dynobj->sections; s != NULL; s = s->next)
+ {
+ const char *name;
- /* First the return pointer adjustment. Depending on exact calling
- sequence this instruction may be skipped. */
- bfd_put_32 (stub_bfd, LDO_M4_R31_R31, loc);
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
- /* The next two instructions are the long branch itself. A long branch
- is formed with "ldil" loading the upper bits of the target address
- into a register, then branching with "be" which adds in the lower bits.
- Long branches to millicode nullify the delay slot of the "be". */
- insn = hppa_rebuild_insn (stub_bfd, LDIL_R1,
- hppa_field_adjust (sym_value, 0, e_lrsel), 21);
- bfd_put_32 (stub_bfd, insn, loc + 4);
- insn = hppa_rebuild_insn (stub_bfd, BE_SR4_R1 | (millicode_call ? 2 : 0),
- hppa_field_adjust (sym_value, 0, e_rrsel) >> 2,
- 17);
- bfd_put_32 (stub_bfd, insn, loc + 8);
+ /* 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 (!millicode_call)
+ if (strncmp (name, ".rela", 5) == 0)
{
- /* The sequence to call this stub places the return pointer into %r31,
- the final target expects the return pointer in %r2, so copy the
- return pointer into the proper register. */
- bfd_put_32 (stub_bfd, COPY_R31_R2, loc + 12);
-
- /* Update the location and offsets. */
- stub_hash_table->location += 16;
- stub_hash_table->offset += 16;
+ if (s->_raw_size != 0)
+ {
+ asection *target;
+ const char *outname;
+
+ /* Remember whether there are any reloc sections other
+ than .rela.plt. */
+ if (strcmp (name+5, ".plt") != 0)
+ relocs = true;
+
+ /* If this relocation section applies to a read only
+ section, then we probably need a DT_TEXTREL entry. */
+ outname = bfd_get_section_name (output_bfd,
+ s->output_section);
+ target = bfd_get_section_by_name (output_bfd, outname + 5);
+ if (target != NULL
+ && (target->flags & SEC_READONLY) != 0
+ && (target->flags & SEC_ALLOC) != 0)
+ reltext = true;
+
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
+ }
}
+ else if (strcmp (name, ".plt") == 0)
+ {
+ if (hplink->need_plt_stub)
+ {
+ /* Make space for the plt stub at the end of the .plt
+ section. We want this stub right at the end, up
+ against the .got section. */
+ int gotalign = bfd_section_alignment (dynobj, hplink->sgot);
+ int pltalign = bfd_section_alignment (dynobj, s);
+ bfd_size_type mask;
+
+ if (gotalign > pltalign)
+ bfd_set_section_alignment (dynobj, s, gotalign);
+ mask = ((bfd_size_type) 1 << gotalign) - 1;
+ s->_raw_size = (s->_raw_size + sizeof (plt_stub) + mask) & ~mask;
+ }
+ }
+ else if (strcmp (name, ".got") == 0)
+ ;
else
{
- /* Update the location and offsets. */
- stub_hash_table->location += 12;
- stub_hash_table->offset += 12;
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
+
+ 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. */
+ _bfd_strip_section_from_output (info, s);
+ continue;
}
+ /* Allocate memory for the section contents. Zero it, because
+ we may not fill in all the reloc sections. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ if (s->contents == NULL && s->_raw_size != 0)
+ return false;
}
- return true;
-}
-/* External entry points for sizing and building linker stubs. */
+ if (hplink->root.dynamic_sections_created)
+ {
+ /* Like IA-64 and HPPA64, always create a DT_PLTGOT. It
+ actually has nothing to do with the PLT, it is how we
+ communicate the LTP value of a load module to the dynamic
+ linker. */
+ if (! bfd_elf32_add_dynamic_entry (info, DT_PLTGOT, 0))
+ return false;
+
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in elf32_hppa_finish_dynamic_sections, but we
+ must add the entries now so that we get the correct size for
+ the .dynamic section. The DT_DEBUG entry is filled in by the
+ dynamic linker and used by the debugger. */
+ if (! info->shared)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+ return false;
+ }
-/* Build all the stubs associated with the current output file. The
- stubs are kept in a hash table attached to the main linker hash
- table. This is called via hppaelf_finish in the linker. */
+ if (hplink->srelplt->_raw_size != 0)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_PLTRELSZ, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_PLTREL, DT_RELA)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_JMPREL, 0))
+ return false;
+ }
-boolean
-elf32_hppa_build_stubs (stub_bfd, info)
- bfd *stub_bfd;
- struct bfd_link_info *info;
-{
- /* The stub BFD only has one section. */
- asection *stub_sec = stub_bfd->sections;
- struct elf32_hppa_stub_hash_table *table;
- unsigned int size;
- void *args[2];
-
- /* So we can pass both the BFD for the stubs and the link info
- structure to the routine which actually builds stubs. */
- args[0] = stub_bfd;
- args[1] = info;
-
- /* Allocate memory to hold the linker stubs. */
- size = bfd_section_size (stub_bfd, stub_sec);
- stub_sec->contents = (unsigned char *) bfd_zalloc (stub_bfd, size);
- if (stub_sec->contents == NULL)
- return false;
- table = elf32_hppa_hash_table(info)->stub_hash_table;
- table->location = stub_sec->contents;
+ if (relocs)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_RELA, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_RELASZ, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_RELAENT,
+ sizeof (Elf32_External_Rela)))
+ return false;
+ }
- /* Build the stubs as directed by the stub hash table. */
- elf32_hppa_stub_hash_traverse (table, elf32_hppa_build_one_stub, args);
+ if (reltext)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+ return false;
+ info->flags |= DF_TEXTREL;
+ }
+ }
return true;
}
+/* External entry points for sizing and building linker stubs. */
+
/* Determine and set the size of the stub section for a final link.
The basic idea here is to examine all the relocations looking for
PC-relative calls to a target that is unreachable with a "bl"
- instruction or calls where the caller and callee disagree on the
- location of their arguments or return value. */
+ instruction. */
boolean
-elf32_hppa_size_stubs (stub_bfd, output_bfd, link_info)
+elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
+ add_stub_section, layout_sections_again)
+ bfd *output_bfd;
bfd *stub_bfd;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *link_info;
+ struct bfd_link_info *info;
+ boolean multi_subspace;
+ bfd_signed_vma group_size;
+ asection * (*add_stub_section) PARAMS ((const char *, asection *));
+ void (*layout_sections_again) PARAMS ((void));
{
bfd *input_bfd;
- asection *section, *stub_sec = 0;
- Elf_Internal_Shdr *symtab_hdr;
+ asection *section;
+ asection **input_list, **list;
Elf_Internal_Sym *local_syms, **all_local_syms;
- unsigned int i, index, bfd_count = 0;
- struct elf32_hppa_stub_hash_table *stub_hash_table = 0;
+ unsigned int bfd_indx, bfd_count;
+ int top_id, top_index;
+ struct elf32_hppa_link_hash_table *hplink;
+ bfd_size_type stub_group_size;
+ boolean stubs_always_before_branch;
+ boolean stub_changed = 0;
+ boolean ret = 0;
+
+ hplink = hppa_link_hash_table (info);
+
+ /* Stash our params away. */
+ hplink->stub_bfd = stub_bfd;
+ hplink->multi_subspace = multi_subspace;
+ hplink->add_stub_section = add_stub_section;
+ hplink->layout_sections_again = layout_sections_again;
+ stubs_always_before_branch = group_size < 0;
+ if (group_size < 0)
+ stub_group_size = -group_size;
+ else
+ stub_group_size = group_size;
+ if (stub_group_size == 1)
+ {
+ /* Default values. */
+ stub_group_size = 8000000;
+ if (hplink->has_17bit_branch || hplink->multi_subspace)
+ stub_group_size = 250000;
+ if (hplink->has_12bit_branch)
+ stub_group_size = 7812;
+ }
+
+ /* Count the number of input BFDs and find the top input section id. */
+ for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
+ input_bfd != NULL;
+ input_bfd = input_bfd->link_next)
+ {
+ bfd_count += 1;
+ for (section = input_bfd->sections;
+ section != NULL;
+ section = section->next)
+ {
+ if (top_id < section->id)
+ top_id = section->id;
+ }
+ }
- /* Create and initialize the stub hash table. */
- stub_hash_table = ((struct elf32_hppa_stub_hash_table *)
- bfd_malloc (sizeof (struct elf32_hppa_stub_hash_table)));
- if (!stub_hash_table)
- goto error_return;
+ hplink->stub_group
+ = (struct map_stub *) bfd_zmalloc (sizeof (struct map_stub) * (top_id + 1));
+ if (hplink->stub_group == NULL)
+ return false;
- if (!elf32_hppa_stub_hash_table_init (stub_hash_table, stub_bfd,
- elf32_hppa_stub_hash_newfunc))
- goto error_return;
+ /* Make a list of input sections for each output section included in
+ the link.
- /* Attach the hash tables to the main hash table. */
- elf32_hppa_hash_table(link_info)->stub_hash_table = stub_hash_table;
+ 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. */
+ for (section = output_bfd->sections, top_index = 0;
+ section != NULL;
+ section = section->next)
+ {
+ if (top_index < section->index)
+ top_index = section->index;
+ }
- /* Count the number of input BFDs. */
- for (input_bfd = link_info->input_bfds;
- input_bfd != NULL;
- input_bfd = input_bfd->link_next)
- bfd_count++;
+ input_list
+ = (asection **) bfd_malloc (sizeof (asection *) * (top_index + 1));
+ if (input_list == NULL)
+ return false;
- /* Magic as we know the stub bfd only has one section. */
- stub_sec = stub_bfd->sections;
+ /* For sections we aren't interested in, mark their entries with a
+ value we can check later. */
+ list = input_list + top_index;
+ do
+ *list = bfd_abs_section_ptr;
+ while (list-- != input_list);
- /* If generating a relocateable output file, then we don't
- have to examine the relocs. */
- if (link_info->relocateable)
+ for (section = output_bfd->sections;
+ section != NULL;
+ section = section->next)
{
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- return true;
+ if ((section->flags & SEC_CODE) != 0)
+ input_list[section->index] = NULL;
}
- /* Now that we have argument location information for all the global
- functions we can start looking for stubs. */
- for (input_bfd = link_info->input_bfds, index = 0;
+ /* Now actually build the lists. */
+ for (input_bfd = info->input_bfds;
input_bfd != NULL;
- input_bfd = input_bfd->link_next, index++)
+ input_bfd = input_bfd->link_next)
{
- /* We'll need the symbol table in a second. */
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- if (symtab_hdr->sh_info == 0)
- continue;
-
- local_syms = all_local_syms[index];
-
- /* Walk over each section attached to the input bfd. */
for (section = input_bfd->sections;
section != NULL;
section = section->next)
{
- Elf_Internal_Shdr *input_rel_hdr;
- Elf32_External_Rela *external_relocs, *erelaend, *erela;
- Elf_Internal_Rela *internal_relocs, *irelaend, *irela;
+ if (section->output_section != NULL
+ && section->output_section->owner == output_bfd
+ && section->output_section->index <= top_index)
+ {
+ list = input_list + section->output_section->index;
+ if (*list != bfd_abs_section_ptr)
+ {
+ /* Steal the link_sec pointer for our list. */
+#define PREV_SEC(sec) (hplink->stub_group[(sec)->id].link_sec)
+ /* This happens to make the list in reverse order,
+ which is what we want. */
+ PREV_SEC (section) = *list;
+ *list = section;
+ }
+ }
+ }
+ }
- /* If there aren't any relocs, then there's nothing to do. */
- if ((section->flags & SEC_RELOC) == 0
- || section->reloc_count == 0)
- continue;
+ /* See whether we can group stub sections together. Grouping stub
+ sections may result in fewer stubs. More importantly, we need to
+ put all .init* and .fini* stubs at the beginning of the .init or
+ .fini output sections respectively, because glibc splits the
+ _init and _fini functions into multiple parts. Putting a stub in
+ the middle of a function is not a good idea. */
+ list = input_list + top_index;
+ do
+ {
+ asection *tail = *list;
+ if (tail == bfd_abs_section_ptr)
+ continue;
+ while (tail != NULL)
+ {
+ asection *curr;
+ asection *prev;
+ bfd_size_type total;
- /* Allocate space for the external relocations. */
- external_relocs
- = ((Elf32_External_Rela *)
- bfd_malloc (section->reloc_count
- * sizeof (Elf32_External_Rela)));
- if (external_relocs == NULL)
+ curr = tail;
+ if (tail->_cooked_size)
+ total = tail->_cooked_size;
+ else
+ total = tail->_raw_size;
+ while ((prev = PREV_SEC (curr)) != NULL
+ && ((total += curr->output_offset - prev->output_offset)
+ < stub_group_size))
+ curr = prev;
+
+ /* OK, the size from the start of CURR to the end is less
+ than 250000 bytes and thus can be handled by one stub
+ section. (or the tail section is itself larger than
+ 250000 bytes, in which case we may be toast.)
+ We should really be keeping track of the total size of
+ stubs added here, as stubs contribute to the final output
+ section size. That's a little tricky, and this way will
+ only break if stubs added total more than 12144 bytes, or
+ 1518 long branch stubs. It seems unlikely for more than
+ 1518 different functions to be called, especially from
+ code only 250000 bytes long. */
+ do
{
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- goto error_return;
+ prev = PREV_SEC (tail);
+ /* Set up this stub group. */
+ hplink->stub_group[tail->id].link_sec = curr;
}
+ while (tail != curr && (tail = prev) != NULL);
- /* Likewise for the internal relocations. */
- internal_relocs
- = ((Elf_Internal_Rela *)
- bfd_malloc (section->reloc_count * sizeof (Elf_Internal_Rela)));
- if (internal_relocs == NULL)
+ /* But wait, there's more! Input sections up to 250000
+ bytes before the stub section can be handled by it too. */
+ if (!stubs_always_before_branch)
{
- free (external_relocs);
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- goto error_return;
+ total = 0;
+ while (prev != NULL
+ && ((total += tail->output_offset - prev->output_offset)
+ < stub_group_size))
+ {
+ tail = prev;
+ prev = PREV_SEC (tail);
+ hplink->stub_group[tail->id].link_sec = curr;
+ }
}
+ tail = prev;
+ }
+ }
+ while (list-- != input_list);
+ free (input_list);
+#undef PREV_SEC
+
+ /* We want to read in symbol extension records only once. To do this
+ we need to read in the local symbols in parallel and save them for
+ later use; so hold pointers to the local symbols in an array. */
+ all_local_syms
+ = (Elf_Internal_Sym **) bfd_zmalloc (sizeof (Elf_Internal_Sym *)
+ * bfd_count);
+ if (all_local_syms == NULL)
+ return false;
+
+ /* Walk over all the input BFDs, swapping in local symbols.
+ If we are creating a shared library, create hash entries for the
+ export stubs. */
+ for (input_bfd = info->input_bfds, bfd_indx = 0;
+ input_bfd != NULL;
+ input_bfd = input_bfd->link_next, bfd_indx++)
+ {
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Sym *isym;
+ Elf32_External_Sym *ext_syms, *esym, *end_sy;
- /* Read in the external relocs. */
- input_rel_hdr = &elf_section_data (section)->rel_hdr;
- if (bfd_seek (input_bfd, input_rel_hdr->sh_offset, SEEK_SET) != 0
- || bfd_read (external_relocs, 1, input_rel_hdr->sh_size,
- input_bfd) != input_rel_hdr->sh_size)
+ /* We'll need the symbol table in a second. */
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ if (symtab_hdr->sh_info == 0)
+ continue;
+
+ /* We need an array of the local symbols attached to the input bfd.
+ Unfortunately, we're going to have to read & swap them in. */
+ local_syms = (Elf_Internal_Sym *)
+ bfd_malloc (symtab_hdr->sh_info * sizeof (Elf_Internal_Sym));
+ if (local_syms == NULL)
+ {
+ goto error_ret_free_local;
+ }
+ all_local_syms[bfd_indx] = local_syms;
+ ext_syms = (Elf32_External_Sym *)
+ bfd_malloc (symtab_hdr->sh_info * sizeof (Elf32_External_Sym));
+ if (ext_syms == NULL)
+ {
+ goto error_ret_free_local;
+ }
+
+ if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
+ || (bfd_read (ext_syms, 1,
+ (symtab_hdr->sh_info * sizeof (Elf32_External_Sym)),
+ input_bfd)
+ != (symtab_hdr->sh_info * sizeof (Elf32_External_Sym))))
+ {
+ free (ext_syms);
+ goto error_ret_free_local;
+ }
+
+ /* Swap the local symbols in. */
+ isym = local_syms;
+ esym = ext_syms;
+ for (end_sy = esym + symtab_hdr->sh_info; esym < end_sy; esym++, isym++)
+ bfd_elf32_swap_symbol_in (input_bfd, esym, isym);
+
+ /* Now we can free the external symbols. */
+ free (ext_syms);
+
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ /* If this is a shared link, find all the stub reloc sections. */
+ if (info->shared)
+ for (section = input_bfd->sections;
+ section != NULL;
+ section = section->next)
+ {
+ char *name;
+ asection *reloc_sec;
+
+ name = bfd_malloc (strlen (section->name)
+ + sizeof STUB_SUFFIX
+ + 5);
+ if (name == NULL)
+ return false;
+ sprintf (name, ".rela%s%s", section->name, STUB_SUFFIX);
+ reloc_sec = bfd_get_section_by_name (hplink->root.dynobj, name);
+ hplink->stub_group[section->id].reloc_sec = reloc_sec;
+ free (name);
+ }
+#endif
+
+ if (info->shared && hplink->multi_subspace)
+ {
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry **end_hashes;
+ unsigned int symcount;
+
+ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+ - symtab_hdr->sh_info);
+ sym_hashes = elf_sym_hashes (input_bfd);
+ end_hashes = sym_hashes + symcount;
+
+ /* Look through the global syms for functions; We need to
+ build export stubs for all globally visible functions. */
+ for (; sym_hashes < end_hashes; sym_hashes++)
{
- free (external_relocs);
- free (internal_relocs);
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- goto error_return;
+ struct elf32_hppa_link_hash_entry *hash;
+
+ hash = (struct elf32_hppa_link_hash_entry *) *sym_hashes;
+
+ while (hash->elf.root.type == bfd_link_hash_indirect
+ || hash->elf.root.type == bfd_link_hash_warning)
+ hash = ((struct elf32_hppa_link_hash_entry *)
+ hash->elf.root.u.i.link);
+
+ /* At this point in the link, undefined syms have been
+ resolved, so we need to check that the symbol was
+ defined in this BFD. */
+ if ((hash->elf.root.type == bfd_link_hash_defined
+ || hash->elf.root.type == bfd_link_hash_defweak)
+ && hash->elf.type == STT_FUNC
+ && hash->elf.root.u.def.section->output_section != NULL
+ && (hash->elf.root.u.def.section->output_section->owner
+ == output_bfd)
+ && hash->elf.root.u.def.section->owner == input_bfd
+ && (hash->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+ && !(hash->elf.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)
+ && ELF_ST_VISIBILITY (hash->elf.other) == STV_DEFAULT)
+ {
+ asection *sec;
+ const char *stub_name;
+ struct elf32_hppa_stub_hash_entry *stub_entry;
+
+ sec = hash->elf.root.u.def.section;
+ stub_name = hash->elf.root.root.string;
+ stub_entry = hppa_stub_hash_lookup (&hplink->stub_hash_table,
+ stub_name,
+ false, false);
+ if (stub_entry == NULL)
+ {
+ stub_entry = hppa_add_stub (stub_name, sec, hplink);
+ if (!stub_entry)
+ goto error_ret_free_local;
+
+ stub_entry->target_value = hash->elf.root.u.def.value;
+ stub_entry->target_section = hash->elf.root.u.def.section;
+ stub_entry->stub_type = hppa_stub_export;
+ stub_entry->h = hash;
+ stub_changed = 1;
+ }
+ else
+ {
+ (*_bfd_error_handler) (_("%s: duplicate export stub %s"),
+ bfd_get_filename (input_bfd),
+ stub_name);
+ }
+ }
}
+ }
+ }
- /* Swap in the relocs. */
- erela = external_relocs;
- erelaend = erela + section->reloc_count;
- irela = internal_relocs;
- for (; erela < erelaend; erela++, irela++)
- bfd_elf32_swap_reloca_in (input_bfd, erela, irela);
+ while (1)
+ {
+ asection *stub_sec;
- /* We're done with the external relocs, free them. */
- free (external_relocs);
+ for (input_bfd = info->input_bfds, bfd_indx = 0;
+ input_bfd != NULL;
+ input_bfd = input_bfd->link_next, bfd_indx++)
+ {
+ Elf_Internal_Shdr *symtab_hdr;
+
+ /* We'll need the symbol table in a second. */
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ if (symtab_hdr->sh_info == 0)
+ continue;
- /* Now examine each relocation. */
- irela = internal_relocs;
- irelaend = irela + section->reloc_count;
- for (; irela < irelaend; irela++)
+ local_syms = all_local_syms[bfd_indx];
+
+ /* Walk over each section attached to the input bfd. */
+ for (section = input_bfd->sections;
+ section != NULL;
+ section = section->next)
{
- long r_type, size_of_stub;
- unsigned long r_index;
- struct elf_link_hash_entry *hash;
- struct elf32_hppa_stub_hash_entry *stub_hash;
- Elf_Internal_Sym *sym;
- asection *sym_sec;
- const char *sym_name;
- symvalue sym_value;
- bfd_vma location, destination;
- char *new_name = NULL;
-
- r_type = ELF32_R_TYPE (irela->r_info);
- r_index = ELF32_R_SYM (irela->r_info);
-
- if (r_type < 0 || r_type >= (int) R_PARISC_UNIMPLEMENTED)
+ Elf_Internal_Shdr *input_rel_hdr;
+ Elf32_External_Rela *external_relocs, *erelaend, *erela;
+ Elf_Internal_Rela *internal_relocs, *irelaend, *irela;
+
+ /* If there aren't any relocs, then there's nothing more
+ to do. */
+ if ((section->flags & SEC_RELOC) == 0
+ || section->reloc_count == 0)
+ continue;
+
+ /* If this section is a link-once section that will be
+ discarded, then don't create any stubs. */
+ if (section->output_section == NULL
+ || section->output_section->owner != output_bfd)
+ continue;
+
+ /* Allocate space for the external relocations. */
+ external_relocs
+ = ((Elf32_External_Rela *)
+ bfd_malloc (section->reloc_count
+ * sizeof (Elf32_External_Rela)));
+ if (external_relocs == NULL)
+ {
+ goto error_ret_free_local;
+ }
+
+ /* Likewise for the internal relocations. */
+ internal_relocs = ((Elf_Internal_Rela *)
+ bfd_malloc (section->reloc_count
+ * sizeof (Elf_Internal_Rela)));
+ if (internal_relocs == NULL)
+ {
+ free (external_relocs);
+ goto error_ret_free_local;
+ }
+
+ /* Read in the external relocs. */
+ input_rel_hdr = &elf_section_data (section)->rel_hdr;
+ if (bfd_seek (input_bfd, input_rel_hdr->sh_offset, SEEK_SET) != 0
+ || bfd_read (external_relocs, 1,
+ input_rel_hdr->sh_size,
+ input_bfd) != input_rel_hdr->sh_size)
{
- bfd_set_error (bfd_error_bad_value);
+ free (external_relocs);
+ error_ret_free_internal:
free (internal_relocs);
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- goto error_return;
+ goto error_ret_free_local;
}
- /* Only look for stubs on call instructions or plabel
- references. */
- if (r_type != R_PARISC_PCREL17F
- && r_type != R_PARISC_PLABEL32
- && r_type != R_PARISC_PLABEL21L
- && r_type != R_PARISC_PLABEL14R)
- continue;
+ /* Swap in the relocs. */
+ erela = external_relocs;
+ erelaend = erela + section->reloc_count;
+ irela = internal_relocs;
+ for (; erela < erelaend; erela++, irela++)
+ bfd_elf32_swap_reloca_in (input_bfd, erela, irela);
- /* Now determine the call target, its name, value, section
- and argument relocation bits. */
- hash = NULL;
- sym = NULL;
- sym_sec = NULL;
- if (r_index < symtab_hdr->sh_info)
+ /* We're done with the external relocs, free them. */
+ free (external_relocs);
+
+ /* Now examine each relocation. */
+ irela = internal_relocs;
+ irelaend = irela + section->reloc_count;
+ for (; irela < irelaend; irela++)
{
- /* It's a local symbol. */
- Elf_Internal_Shdr *hdr;
-
- sym = local_syms + r_index;
- hdr = elf_elfsections (input_bfd)[sym->st_shndx];
- sym_sec = hdr->bfd_section;
- sym_name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
- sym_value = (ELF_ST_TYPE (sym->st_info) == STT_SECTION
- ? 0 : sym->st_value);
- destination = (sym_value
- + sym_sec->output_offset
- + sym_sec->output_section->vma);
-
- /* Tack on an ID so we can uniquely identify this local
- symbol in the stub or arg info hash tables. */
- new_name = bfd_malloc (strlen (sym_name) + 10);
- if (new_name == 0)
+ unsigned int r_type, r_indx;
+ enum elf32_hppa_stub_type stub_type;
+ struct elf32_hppa_stub_hash_entry *stub_entry;
+ asection *sym_sec;
+ bfd_vma sym_value;
+ bfd_vma destination;
+ struct elf32_hppa_link_hash_entry *hash;
+ char *stub_name;
+ const asection *id_sec;
+
+ r_type = ELF32_R_TYPE (irela->r_info);
+ r_indx = ELF32_R_SYM (irela->r_info);
+
+ if (r_type >= (unsigned int) R_PARISC_UNIMPLEMENTED)
{
- free (internal_relocs);
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- goto error_return;
+ bfd_set_error (bfd_error_bad_value);
+ goto error_ret_free_internal;
}
- sprintf (new_name, "%s_%08x", sym_name, (int)sym_sec);
- sym_name = new_name;
- }
- else
- {
- /* It's an external symbol. */
- long index;
- index = r_index - symtab_hdr->sh_info;
- hash = elf_sym_hashes (input_bfd)[index];
- if (hash->root.type == bfd_link_hash_defined
- || hash->root.type == bfd_link_hash_defweak)
+ /* Only look for stubs on call instructions. */
+ if (r_type != (unsigned int) R_PARISC_PCREL12F
+ && r_type != (unsigned int) R_PARISC_PCREL17F
+ && r_type != (unsigned int) R_PARISC_PCREL22F)
+ continue;
+
+ /* Now determine the call target, its name, value,
+ section. */
+ sym_sec = NULL;
+ sym_value = 0;
+ destination = 0;
+ hash = NULL;
+ if (r_indx < symtab_hdr->sh_info)
{
- sym_sec = hash->root.u.def.section;
- sym_name = hash->root.root.string;
- sym_value = hash->root.u.def.value;
- destination = (sym_value
+ /* It's a local symbol. */
+ Elf_Internal_Sym *sym;
+ Elf_Internal_Shdr *hdr;
+
+ sym = local_syms + r_indx;
+ hdr = elf_elfsections (input_bfd)[sym->st_shndx];
+ sym_sec = hdr->bfd_section;
+ if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
+ sym_value = sym->st_value;
+ destination = (sym_value + irela->r_addend
+ sym_sec->output_offset
+ sym_sec->output_section->vma);
}
else
{
- bfd_set_error (bfd_error_bad_value);
- free (internal_relocs);
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- goto error_return;
+ /* It's an external symbol. */
+ int e_indx;
+
+ e_indx = r_indx - symtab_hdr->sh_info;
+ hash = ((struct elf32_hppa_link_hash_entry *)
+ elf_sym_hashes (input_bfd)[e_indx]);
+
+ while (hash->elf.root.type == bfd_link_hash_indirect
+ || hash->elf.root.type == bfd_link_hash_warning)
+ hash = ((struct elf32_hppa_link_hash_entry *)
+ hash->elf.root.u.i.link);
+
+ if (hash->elf.root.type == bfd_link_hash_defined
+ || hash->elf.root.type == bfd_link_hash_defweak)
+ {
+ sym_sec = hash->elf.root.u.def.section;
+ 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);
+ }
+ else if (hash->elf.root.type == bfd_link_hash_undefweak)
+ {
+ if (! info->shared)
+ continue;
+ }
+ else if (hash->elf.root.type == bfd_link_hash_undefined)
+ {
+ if (! (info->shared
+ && !info->no_undefined
+ && (ELF_ST_VISIBILITY (hash->elf.other)
+ == STV_DEFAULT)))
+ continue;
+ }
+ else
+ {
+ bfd_set_error (bfd_error_bad_value);
+ goto error_ret_free_internal;
+ }
+ }
+
+ /* Determine what (if any) linker stub is needed. */
+ stub_type = hppa_type_of_stub (section, irela, hash,
+ destination);
+ if (stub_type == hppa_stub_none)
+ continue;
+
+ /* Support for grouping stub sections. */
+ id_sec = hplink->stub_group[section->id].link_sec;
+
+ /* Get the name of this stub. */
+ stub_name = hppa_stub_name (id_sec, sym_sec, hash, irela);
+ if (!stub_name)
+ goto error_ret_free_internal;
+
+ stub_entry = hppa_stub_hash_lookup (&hplink->stub_hash_table,
+ stub_name,
+ false, false);
+ if (stub_entry != NULL)
+ {
+ /* The proper stub has already been created. */
+ free (stub_name);
+ continue;
+ }
+
+ stub_entry = hppa_add_stub (stub_name, section, hplink);
+ if (stub_entry == NULL)
+ {
+ free (stub_name);
+ goto error_ret_free_local;
+ }
+
+ stub_entry->target_value = sym_value;
+ stub_entry->target_section = sym_sec;
+ stub_entry->stub_type = stub_type;
+ if (info->shared)
+ {
+ if (stub_type == hppa_stub_import)
+ stub_entry->stub_type = hppa_stub_import_shared;
+ else if (stub_type == hppa_stub_long_branch
+ && (LONG_BRANCH_PIC_IN_SHLIB || hash == NULL))
+ stub_entry->stub_type = hppa_stub_long_branch_shared;
}
+ stub_entry->h = hash;
+ stub_changed = 1;
}
- /* Now determine where the call point is. */
- location = (section->output_offset
- + section->output_section->vma
- + irela->r_offset);
-
- /* We only care about the destination for PCREL function
- calls (eg. we don't care for PLABELS). */
- if (r_type != R_PARISC_PCREL17F)
- location = destination;
-
- /* Determine what (if any) linker stub is needed and its
- size (in bytes). */
- size_of_stub = elf32_hppa_size_of_stub (location,
- destination,
- sym_name);
- if (size_of_stub != 0)
+ /* We're done with the internal relocs, free them. */
+ free (internal_relocs);
+ }
+ }
+
+ if (!stub_changed)
+ break;
+
+ /* OK, we've added some stubs. Find out the new size of the
+ stub sections. */
+ for (stub_sec = hplink->stub_bfd->sections;
+ stub_sec != NULL;
+ stub_sec = stub_sec->next)
+ {
+ stub_sec->_raw_size = 0;
+ stub_sec->_cooked_size = 0;
+ }
+#if ! LONG_BRANCH_PIC_IN_SHLIB
+ {
+ int i;
+
+ for (i = top_id; i >= 0; --i)
+ {
+ /* This will probably hit the same section many times.. */
+ stub_sec = hplink->stub_group[i].reloc_sec;
+ if (stub_sec != NULL)
+ {
+ stub_sec->_raw_size = 0;
+ stub_sec->_cooked_size = 0;
+ }
+ }
+ }
+#endif
+
+ bfd_hash_traverse (&hplink->stub_hash_table,
+ hppa_size_one_stub,
+ hplink);
+
+ /* Ask the linker to do its stuff. */
+ (*hplink->layout_sections_again) ();
+ stub_changed = 0;
+ }
+
+ ret = 1;
+
+ error_ret_free_local:
+ while (bfd_count-- > 0)
+ if (all_local_syms[bfd_count])
+ free (all_local_syms[bfd_count]);
+ free (all_local_syms);
+
+ return ret;
+}
+
+/* For a final link, this function is called after we have sized the
+ stubs to provide a value for __gp. */
+
+boolean
+elf32_hppa_set_gp (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ struct elf32_hppa_link_hash_table *hplink;
+ struct elf_link_hash_entry *h;
+ asection *sec;
+ bfd_vma gp_val;
+
+ hplink = hppa_link_hash_table (info);
+ h = elf_link_hash_lookup (&hplink->root, "$global$",
+ false, false, false);
+
+ if (h != NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak))
+ {
+ gp_val = h->root.u.def.value;
+ sec = h->root.u.def.section;
+ }
+ else
+ {
+ /* Choose to point our LTP at, in this order, one of .plt, .got,
+ or .data, if these sections exist. In the case of choosing
+ .plt try to make the LTP ideal for addressing anywhere in the
+ .plt or .got with a 14 bit signed offset. Typically, the end
+ of the .plt is the start of the .got, so choose .plt + 0x2000
+ if either the .plt or .got is larger than 0x2000. If both
+ the .plt and .got are smaller than 0x2000, choose the end of
+ the .plt section. */
+
+ sec = hplink->splt;
+ if (sec != NULL)
+ {
+ gp_val = sec->_raw_size;
+ if (gp_val > 0x2000
+ || (hplink->sgot && hplink->sgot->_raw_size > 0x2000))
+ {
+ gp_val = 0x2000;
+ }
+ }
+ else
+ {
+ gp_val = 0;
+ sec = hplink->sgot;
+ if (sec != NULL)
+ {
+ /* We know we don't have a .plt. If .got is large,
+ offset our LTP. */
+ if (sec->_raw_size > 0x2000)
+ gp_val = 0x2000;
+ }
+ else
+ {
+ /* No .plt or .got. Who cares what the LTP is? */
+ sec = bfd_get_section_by_name (abfd, ".data");
+ }
+ }
+
+ if (h != NULL)
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.value = gp_val;
+ if (sec != NULL)
+ h->root.u.def.section = sec;
+ else
+ h->root.u.def.section = bfd_abs_section_ptr;
+ }
+ }
+
+ if (sec != NULL && sec->output_section != NULL)
+ gp_val += sec->output_section->vma + sec->output_offset;
+
+ elf_gp (abfd) = gp_val;
+ return true;
+}
+
+/* Build all the stubs associated with the current output file. The
+ stubs are kept in a hash table attached to the main linker hash
+ table. We also set up the .plt entries for statically linked PIC
+ functions here. This function is called via hppaelf_finish in the
+ linker. */
+
+boolean
+elf32_hppa_build_stubs (info)
+ struct bfd_link_info *info;
+{
+ asection *stub_sec;
+ struct bfd_hash_table *table;
+ struct elf32_hppa_link_hash_table *hplink;
+
+ hplink = hppa_link_hash_table (info);
+
+ for (stub_sec = hplink->stub_bfd->sections;
+ stub_sec != NULL;
+ stub_sec = stub_sec->next)
+ {
+ size_t size;
+
+ /* Allocate memory to hold the linker stubs. */
+ size = stub_sec->_raw_size;
+ stub_sec->contents = (unsigned char *) bfd_zalloc (hplink->stub_bfd,
+ size);
+ if (stub_sec->contents == NULL && size != 0)
+ return false;
+ stub_sec->_raw_size = 0;
+ }
+
+ /* Build the stubs as directed by the stub hash table. */
+ table = &hplink->stub_hash_table;
+ bfd_hash_traverse (table, hppa_build_one_stub, info);
+
+ return true;
+}
+
+/* Perform a final link. */
+
+static boolean
+elf32_hppa_final_link (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ asection *s;
+
+ /* Invoke the regular ELF linker to do all the work. */
+ if (!bfd_elf32_bfd_final_link (abfd, info))
+ return false;
+
+ /* If we're producing a final executable, sort the contents of the
+ unwind section. Magic section names, but this is much safer than
+ having elf32_hppa_relocate_section remember where SEGREL32 relocs
+ occurred. Consider what happens if someone inept creates a
+ linker script that puts unwind information in .text. */
+ s = bfd_get_section_by_name (abfd, ".PARISC.unwind");
+ if (s != NULL)
+ {
+ bfd_size_type size;
+ char *contents;
+
+ size = s->_raw_size;
+ contents = bfd_malloc (size);
+ if (contents == NULL)
+ return false;
+
+ if (! bfd_get_section_contents (abfd, s, contents, (file_ptr) 0, size))
+ return false;
+
+ qsort (contents, size / 16, 16, hppa_unwind_entry_compare);
+
+ if (! bfd_set_section_contents (abfd, s, contents, (file_ptr) 0, size))
+ return false;
+ }
+ return true;
+}
+
+/* Record the lowest address for the data and text segments. */
+
+static void
+hppa_record_segment_addr (abfd, section, data)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section;
+ PTR data;
+{
+ struct elf32_hppa_link_hash_table *hplink;
+
+ hplink = (struct elf32_hppa_link_hash_table *) data;
+
+ if ((section->flags & (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD))
+ {
+ bfd_vma value = section->vma - section->filepos;
+
+ if ((section->flags & SEC_READONLY) != 0)
+ {
+ if (value < hplink->text_segment_base)
+ hplink->text_segment_base = value;
+ }
+ else
+ {
+ if (value < hplink->data_segment_base)
+ hplink->data_segment_base = value;
+ }
+ }
+}
+
+/* Perform a relocation as part of a final link. */
+
+static bfd_reloc_status_type
+final_link_relocate (input_section, contents, rel, value, hplink, sym_sec, h)
+ asection *input_section;
+ bfd_byte *contents;
+ const Elf_Internal_Rela *rel;
+ bfd_vma value;
+ struct elf32_hppa_link_hash_table *hplink;
+ asection *sym_sec;
+ struct elf32_hppa_link_hash_entry *h;
+{
+ int insn;
+ unsigned int r_type = ELF32_R_TYPE (rel->r_info);
+ reloc_howto_type *howto = elf_hppa_howto_table + r_type;
+ int r_format = howto->bitsize;
+ enum hppa_reloc_field_selector_type_alt r_field;
+ bfd *input_bfd = input_section->owner;
+ bfd_vma offset = rel->r_offset;
+ bfd_vma max_branch_offset = 0;
+ bfd_byte *hit_data = contents + offset;
+ bfd_signed_vma addend = rel->r_addend;
+ bfd_vma location;
+ struct elf32_hppa_stub_hash_entry *stub_entry = NULL;
+ int val;
+
+ if (r_type == R_PARISC_NONE)
+ return bfd_reloc_ok;
+
+ insn = bfd_get_32 (input_bfd, hit_data);
+
+ /* Find out where we are and where we're going. */
+ location = (offset +
+ input_section->output_offset +
+ input_section->output_section->vma);
+
+ switch (r_type)
+ {
+ case R_PARISC_PCREL12F:
+ case R_PARISC_PCREL17F:
+ case R_PARISC_PCREL22F:
+ /* If this is a call to a function defined in another dynamic
+ library, or if it is a call to a PIC function in the same
+ object, or if this is a shared link and it is a call to a
+ weak symbol which may or may not be in the same object, then
+ find the import stub in the stub hash. */
+ if (sym_sec == NULL
+ || sym_sec->output_section == NULL
+ || (h != NULL
+ && ((h->maybe_pic_call
+ && !(input_section->flags & SEC_HAS_GOT_REF))
+ || (h->elf.root.type == bfd_link_hash_defweak
+ && h->elf.dynindx != -1
+ && h->elf.plt.offset != (bfd_vma) -1))))
+ {
+ stub_entry = hppa_get_stub_entry (input_section, sym_sec,
+ h, rel, hplink);
+ if (stub_entry != NULL)
+ {
+ value = (stub_entry->stub_offset
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma);
+ addend = 0;
+ }
+ else if (sym_sec == NULL && h != NULL
+ && h->elf.root.type == bfd_link_hash_undefweak)
+ {
+ /* It's OK if undefined weak. Calls to undefined weak
+ symbols behave as if the "called" function
+ immediately returns. We can thus call to a weak
+ function without first checking whether the function
+ is defined. */
+ value = location;
+ addend = 8;
+ }
+ else
+ return bfd_reloc_notsupported;
+ }
+ /* Fall thru. */
+
+ case R_PARISC_PCREL21L:
+ case R_PARISC_PCREL17C:
+ case R_PARISC_PCREL17R:
+ case R_PARISC_PCREL14R:
+ case R_PARISC_PCREL14F:
+ /* Make it a pc relative offset. */
+ value -= location;
+ addend -= 8;
+ break;
+
+ case R_PARISC_DPREL21L:
+ case R_PARISC_DPREL14R:
+ case R_PARISC_DPREL14F:
+ /* For all the DP relative relocations, we need to examine the symbol's
+ section. If it's a code section, then "data pointer relative" makes
+ no sense. In that case we don't adjust the "value", and for 21 bit
+ addil instructions, we change the source addend register from %dp to
+ %r0. This situation commonly arises when a variable's "constness"
+ is declared differently from the way the variable is defined. For
+ instance: "extern int foo" with foo defined as "const int foo". */
+ if (sym_sec == NULL)
+ break;
+ if ((sym_sec->flags & SEC_CODE) != 0)
+ {
+ if ((insn & ((0x3f << 26) | (0x1f << 21)))
+ == (((int) OP_ADDIL << 26) | (27 << 21)))
+ {
+ insn &= ~ (0x1f << 21);
+#if 1 /* debug them. */
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): fixing %s"),
+ bfd_get_filename (input_bfd),
+ input_section->name,
+ (long) rel->r_offset,
+ howto->name);
+#endif
+ }
+ /* Now try to make things easy for the dynamic linker. */
+
+ break;
+ }
+ /* Fall thru. */
+
+ case R_PARISC_DLTIND21L:
+ case R_PARISC_DLTIND14R:
+ case R_PARISC_DLTIND14F:
+ value -= elf_gp (input_section->output_section->owner);
+ break;
+
+ case R_PARISC_SEGREL32:
+ if ((sym_sec->flags & SEC_CODE) != 0)
+ value -= hplink->text_segment_base;
+ else
+ value -= hplink->data_segment_base;
+ break;
+
+ default:
+ break;
+ }
+
+ switch (r_type)
+ {
+ case R_PARISC_DIR32:
+ case R_PARISC_DIR14F:
+ case R_PARISC_DIR17F:
+ case R_PARISC_PCREL17C:
+ case R_PARISC_PCREL14F:
+ case R_PARISC_DPREL14F:
+ case R_PARISC_PLABEL32:
+ case R_PARISC_DLTIND14F:
+ case R_PARISC_SEGBASE:
+ case R_PARISC_SEGREL32:
+ r_field = e_fsel;
+ break;
+
+ case R_PARISC_DIR21L:
+ case R_PARISC_PCREL21L:
+ case R_PARISC_DPREL21L:
+ case R_PARISC_PLABEL21L:
+ case R_PARISC_DLTIND21L:
+ r_field = e_lrsel;
+ break;
+
+ case R_PARISC_DIR17R:
+ case R_PARISC_PCREL17R:
+ case R_PARISC_DIR14R:
+ case R_PARISC_PCREL14R:
+ case R_PARISC_DPREL14R:
+ case R_PARISC_PLABEL14R:
+ case R_PARISC_DLTIND14R:
+ r_field = e_rrsel;
+ break;
+
+ case R_PARISC_PCREL12F:
+ case R_PARISC_PCREL17F:
+ case R_PARISC_PCREL22F:
+ r_field = e_fsel;
+
+ if (r_type == (unsigned int) R_PARISC_PCREL17F)
+ {
+ max_branch_offset = (1 << (17-1)) << 2;
+ }
+ else if (r_type == (unsigned int) R_PARISC_PCREL12F)
+ {
+ max_branch_offset = (1 << (12-1)) << 2;
+ }
+ else
+ {
+ max_branch_offset = (1 << (22-1)) << 2;
+ }
+
+ /* sym_sec is NULL on undefined weak syms or when shared on
+ undefined syms. We've already checked for a stub for the
+ shared undefined case. */
+ if (sym_sec == NULL)
+ break;
+
+ /* If the branch is out of reach, then redirect the
+ call to the local stub for this function. */
+ if (value + addend + max_branch_offset >= 2*max_branch_offset)
+ {
+ stub_entry = hppa_get_stub_entry (input_section, sym_sec,
+ h, rel, hplink);
+ if (stub_entry == NULL)
+ return bfd_reloc_notsupported;
+
+ /* Munge up the value and addend so that we call the stub
+ rather than the procedure directly. */
+ value = (stub_entry->stub_offset
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma
+ - location);
+ addend = -8;
+ }
+ break;
+
+ /* Something we don't know how to handle. */
+ default:
+ return bfd_reloc_notsupported;
+ }
+
+ /* Make sure we can reach the stub. */
+ if (max_branch_offset != 0
+ && value + addend + max_branch_offset >= 2*max_branch_offset)
+ {
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
+ bfd_get_filename (input_bfd),
+ input_section->name,
+ (long) rel->r_offset,
+ stub_entry->root.string);
+ return bfd_reloc_notsupported;
+ }
+
+ val = hppa_field_adjust (value, addend, r_field);
+
+ switch (r_type)
+ {
+ case R_PARISC_PCREL12F:
+ case R_PARISC_PCREL17C:
+ case R_PARISC_PCREL17F:
+ case R_PARISC_PCREL17R:
+ case R_PARISC_PCREL22F:
+ case R_PARISC_DIR17F:
+ case R_PARISC_DIR17R:
+ /* This is a branch. Divide the offset by four.
+ Note that we need to decide whether it's a branch or
+ otherwise by inspecting the reloc. Inspecting insn won't
+ work as insn might be from a .word directive. */
+ val >>= 2;
+ break;
+
+ default:
+ break;
+ }
+
+ insn = hppa_rebuild_insn (insn, val, r_format);
+
+ /* Update the instruction word. */
+ bfd_put_32 (input_bfd, (bfd_vma) insn, hit_data);
+ return bfd_reloc_ok;
+}
+
+/* Relocate an HPPA ELF section. */
+
+static boolean
+elf32_hppa_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;
+ bfd_vma *local_got_offsets;
+ struct elf32_hppa_link_hash_table *hplink;
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
+ asection *sreloc;
+
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+
+ hplink = hppa_link_hash_table (info);
+ dynobj = hplink->root.dynobj;
+ local_got_offsets = elf_local_got_offsets (input_bfd);
+ sreloc = NULL;
+
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ unsigned int r_type;
+ reloc_howto_type *howto;
+ unsigned int r_symndx;
+ struct elf32_hppa_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ asection *sym_sec;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+ const char *sym_name;
+ boolean plabel;
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+ if (r_type >= (unsigned int) R_PARISC_UNIMPLEMENTED)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ if (r_type == (unsigned int) R_PARISC_GNU_VTENTRY
+ || r_type == (unsigned int) R_PARISC_GNU_VTINHERIT)
+ continue;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+ if (info->relocateable)
+ {
+ /* This is a relocateable link. We don't have to change
+ anything, unless the reloc is against a section symbol,
+ in which case we have to adjust according to where the
+ section symbol winds up in the output section. */
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
{
- char *stub_name;
- unsigned int len;
+ sym_sec = local_sections[r_symndx];
+ rel->r_addend += sym_sec->output_offset;
+ }
+ }
+ continue;
+ }
- /* Get the name of this stub. */
- len = strlen (sym_name);
- len += 23;
+ /* This is a final link. */
+ h = NULL;
+ sym = NULL;
+ sym_sec = NULL;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ /* This is a local symbol, h defaults to NULL. */
+ sym = local_syms + r_symndx;
+ sym_sec = local_sections[r_symndx];
+ relocation = ((ELF_ST_TYPE (sym->st_info) == STT_SECTION
+ ? 0 : sym->st_value)
+ + sym_sec->output_offset
+ + sym_sec->output_section->vma);
+ }
+ else
+ {
+ int indx;
- stub_name = bfd_malloc (len);
- if (!stub_name)
+ /* It's a global; Find its entry in the link hash. */
+ indx = r_symndx - symtab_hdr->sh_info;
+ h = ((struct elf32_hppa_link_hash_entry *)
+ elf_sym_hashes (input_bfd)[indx]);
+ while (h->elf.root.type == bfd_link_hash_indirect
+ || h->elf.root.type == bfd_link_hash_warning)
+ h = (struct elf32_hppa_link_hash_entry *) h->elf.root.u.i.link;
+
+ relocation = 0;
+ if (h->elf.root.type == bfd_link_hash_defined
+ || h->elf.root.type == bfd_link_hash_defweak)
+ {
+ sym_sec = h->elf.root.u.def.section;
+ /* If sym_sec->output_section is NULL, then it's a
+ symbol defined in a shared library. */
+ if (sym_sec->output_section != NULL)
+ relocation = (h->elf.root.u.def.value
+ + sym_sec->output_offset
+ + sym_sec->output_section->vma);
+ }
+ else if (h->elf.root.type == bfd_link_hash_undefweak)
+ ;
+ else if (info->shared && !info->no_undefined
+ && ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
+ && h->elf.type != STT_PARISC_MILLI)
+ {
+ if (info->symbolic)
+ if (!((*info->callbacks->undefined_symbol)
+ (info, h->elf.root.root.string, input_bfd,
+ input_section, rel->r_offset, false)))
+ return false;
+ }
+ else
+ {
+ if (!((*info->callbacks->undefined_symbol)
+ (info, h->elf.root.root.string, input_bfd,
+ input_section, rel->r_offset, true)))
+ return false;
+ }
+ }
+
+ /* Do any required modifications to the relocation value, and
+ determine what types of dynamic info we need to output, if
+ any. */
+ plabel = 0;
+ switch (r_type)
+ {
+ case R_PARISC_DLTIND14F:
+ case R_PARISC_DLTIND14R:
+ case R_PARISC_DLTIND21L:
+ /* Relocation is to the entry for this symbol in the global
+ offset table. */
+ if (h != NULL)
+ {
+ bfd_vma off;
+ boolean dyn;
+
+ off = h->elf.got.offset;
+ if (off == (bfd_vma) -1)
+ abort ();
+
+ dyn = hplink->root.dynamic_sections_created;
+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 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
+ 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
{
- /* Because sym_name was mallocd above for local
- symbols. */
- if (r_index < symtab_hdr->sh_info)
- free (new_name);
-
- free (internal_relocs);
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- goto error_return;
+ bfd_put_32 (output_bfd, relocation,
+ hplink->sgot->contents + off);
+ h->elf.got.offset |= 1;
}
- elf32_hppa_name_of_stub (location, destination, stub_name);
- strcat (stub_name + 22, sym_name);
+ }
- /* Because sym_name was malloced above for local symbols. */
- if (r_index < symtab_hdr->sh_info)
- free (new_name);
+ relocation = off;
+ }
+ else
+ {
+ /* Local symbol case. */
+ bfd_vma off;
+
+ if (local_got_offsets == NULL
+ || (off = local_got_offsets[r_symndx]) == (bfd_vma) -1)
+ abort ();
+
+ /* 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, relocation,
+ hplink->sgot->contents + off);
- stub_hash
- = elf32_hppa_stub_hash_lookup (stub_hash_table, stub_name,
- false, false);
- if (stub_hash != NULL)
+ if (info->shared)
{
- /* The proper stub has already been created, nothing
- else to do. */
- free (stub_name);
+ /* Output a dynamic relocation for this GOT
+ entry. In this case it is relative to the
+ base of the object because the symbol index
+ is zero. */
+ Elf_Internal_Rela outrel;
+ asection *srelgot = hplink->srelgot;
+
+ outrel.r_offset = (off
+ + hplink->sgot->output_offset
+ + hplink->sgot->output_section->vma);
+ outrel.r_info = ELF32_R_INFO (0, R_PARISC_DIR32);
+ outrel.r_addend = relocation;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ ((Elf32_External_Rela *)
+ srelgot->contents
+ + srelgot->reloc_count));
+ ++srelgot->reloc_count;
}
+
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ relocation = off;
+ }
+
+ /* Add the base of the GOT to the relocation value. */
+ relocation += (hplink->sgot->output_offset
+ + hplink->sgot->output_section->vma);
+ break;
+
+ case R_PARISC_SEGREL32:
+ /* If this is the first SEGREL relocation, then initialize
+ the segment base values. */
+ if (hplink->text_segment_base == (bfd_vma) -1)
+ bfd_map_over_sections (output_bfd,
+ hppa_record_segment_addr,
+ hplink);
+ break;
+
+ case R_PARISC_PLABEL14R:
+ case R_PARISC_PLABEL21L:
+ case R_PARISC_PLABEL32:
+ if (hplink->root.dynamic_sections_created)
+ {
+ bfd_vma off;
+
+ /* If we have a global symbol with a PLT slot, then
+ redirect this relocation to it. */
+ if (h != NULL)
+ {
+ off = h->elf.plt.offset;
+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, &h->elf))
+ {
+ /* In a non-shared link, adjust_dynamic_symbols
+ isn't called for symbols forced local. We
+ need to write out the plt entry here. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_32 (output_bfd,
+ relocation,
+ hplink->splt->contents + off);
+ bfd_put_32 (output_bfd,
+ elf_gp (hplink->splt->output_section->owner),
+ hplink->splt->contents + off + 4);
+ h->elf.plt.offset |= 1;
+ }
+ }
+ }
+ else
+ {
+ int indx;
+
+ indx = r_symndx + symtab_hdr->sh_info;
+ off = local_got_offsets[indx];
+
+ /* As for the local .got entry case, we use the last
+ bit to record whether we've already initialised
+ this local .plt entry. */
+ if ((off & 1) != 0)
+ off &= ~1;
else
{
- bfd_set_section_size (stub_bfd, stub_sec,
- (bfd_section_size (stub_bfd,
- stub_sec)
- + size_of_stub));
-
- /* Enter this entry into the linker stub hash table. */
- stub_hash
- = elf32_hppa_stub_hash_lookup (stub_hash_table,
- stub_name, true, true);
- if (stub_hash == NULL)
+ bfd_put_32 (output_bfd,
+ relocation,
+ hplink->splt->contents + off);
+ bfd_put_32 (output_bfd,
+ elf_gp (hplink->splt->output_section->owner),
+ hplink->splt->contents + off + 4);
+
+ if (info->shared)
{
- free (stub_name);
- free (internal_relocs);
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
- goto error_return;
+ /* Output a dynamic IPLT relocation for this
+ PLT entry. */
+ Elf_Internal_Rela outrel;
+ asection *srelplt = hplink->srelplt;
+
+ outrel.r_offset = (off
+ + hplink->splt->output_offset
+ + hplink->splt->output_section->vma);
+ outrel.r_info = ELF32_R_INFO (0, R_PARISC_IPLT);
+ outrel.r_addend = relocation;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ ((Elf32_External_Rela *)
+ srelplt->contents
+ + srelplt->reloc_count));
+ ++srelplt->reloc_count;
}
- /* We'll need these to determine the address that the
- stub will branch to. */
- stub_hash->target_value = sym_value;
- stub_hash->target_section = sym_sec;
+ local_got_offsets[indx] |= 1;
+ }
+ }
+
+ if (off >= (bfd_vma) -2 || (off & 1) != 0)
+ abort ();
+
+ /* PLABELs contain function pointers. Relocation is to
+ the entry for the function in the .plt. The magic +2
+ offset signals to $$dyncall that the function pointer
+ is in the .plt and thus has a gp pointer too.
+ Exception: Undefined PLABELs should have a value of
+ zero. */
+ if (h == NULL
+ || (h->elf.root.type != bfd_link_hash_undefweak
+ && h->elf.root.type != bfd_link_hash_undefined))
+ {
+ relocation = (off
+ + hplink->splt->output_offset
+ + hplink->splt->output_section->vma
+ + 2);
+ }
+ plabel = 1;
+ }
+ /* Fall through and possibly emit a dynamic relocation. */
+
+ case R_PARISC_DIR17F:
+ case R_PARISC_DIR17R:
+ case R_PARISC_DIR14F:
+ case R_PARISC_DIR14R:
+ case R_PARISC_DIR21L:
+ case R_PARISC_DPREL14F:
+ case R_PARISC_DPREL14R:
+ case R_PARISC_DPREL21L:
+ case R_PARISC_DIR32:
+ /* The reloc types handled here and this conditional
+ expression must match the code in check_relocs and
+ hppa_discard_copies. ie. We need exactly the same
+ condition as in check_relocs, with some extra conditions
+ (dynindx test in this case) to cater for relocs removed
+ by hppa_discard_copies. */
+ if ((input_section->flags & SEC_ALLOC) != 0
+ && info->shared
+#if RELATIVE_DYNAMIC_RELOCS
+ && (is_absolute_reloc (r_type)
+ || ((!info->symbolic
+ || (h != NULL
+ && ((h->elf.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0
+ || h->elf.root.type == bfd_link_hash_defweak)))
+ && (h == NULL || h->elf.dynindx != -1)))
+#endif
+ )
+ {
+ Elf_Internal_Rela outrel;
+ boolean skip;
+
+ /* When generating a shared object, these relocations
+ are copied into the output file to be resolved at run
+ time. */
+
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ if (sreloc == NULL)
+ abort ();
+ }
+
+ outrel.r_offset = rel->r_offset;
+ outrel.r_addend = rel->r_addend;
+ skip = false;
+ if (elf_section_data (input_section)->stab_info != NULL)
+ {
+ bfd_vma off;
+
+ off = (_bfd_stab_section_offset
+ (output_bfd, &hplink->root.stab_info,
+ input_section,
+ &elf_section_data (input_section)->stab_info,
+ rel->r_offset));
+ if (off == (bfd_vma) -1)
+ skip = true;
+ outrel.r_offset = off;
+ }
+
+ outrel.r_offset += (input_section->output_offset
+ + input_section->output_section->vma);
+
+ if (skip)
+ {
+ memset (&outrel, 0, sizeof (outrel));
+ }
+ else if (h != NULL
+ && h->elf.dynindx != -1
+ && (plabel
+ || !info->symbolic
+ || (h->elf.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ {
+ outrel.r_info = ELF32_R_INFO (h->elf.dynindx, r_type);
+ }
+ else /* It's a local symbol, or one marked to become local. */
+ {
+ int indx = 0;
+
+ /* Add the absolute offset of the symbol. */
+ outrel.r_addend += relocation;
+
+ /* Global plabels need to be processed by the
+ dynamic linker so that functions have at most one
+ fptr. For this reason, we need to differentiate
+ between global and local plabels, which we do by
+ providing the function symbol for a global plabel
+ reloc, and no symbol for local plabels. */
+ if (! plabel
+ && sym_sec != NULL
+ && sym_sec->output_section != NULL
+ && ! bfd_is_abs_section (sym_sec))
+ {
+ indx = elf_section_data (sym_sec->output_section)->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 -= sym_sec->output_section->vma;
}
- free (stub_name);
+
+ outrel.r_info = ELF32_R_INFO (indx, r_type);
}
+
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ ((Elf32_External_Rela *)
+ sreloc->contents
+ + sreloc->reloc_count));
+ ++sreloc->reloc_count;
}
- /* We're done with the internal relocs, free them. */
- free (internal_relocs);
+ break;
+
+ default:
+ break;
+ }
+
+ r = final_link_relocate (input_section, contents, rel, relocation,
+ hplink, sym_sec, h);
+
+ if (r == bfd_reloc_ok)
+ continue;
+
+ if (h != NULL)
+ sym_name = h->elf.root.root.string;
+ else
+ {
+ sym_name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+ if (sym_name == NULL)
+ return false;
+ if (*sym_name == '\0')
+ sym_name = bfd_section_name (input_bfd, sym_sec);
+ }
+
+ howto = elf_hppa_howto_table + r_type;
+
+ if (r == bfd_reloc_undefined || r == bfd_reloc_notsupported)
+ {
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): cannot handle %s for %s"),
+ bfd_get_filename (input_bfd),
+ input_section->name,
+ (long) rel->r_offset,
+ howto->name,
+ sym_name);
+ }
+ else
+ {
+ if (!((*info->callbacks->reloc_overflow)
+ (info, sym_name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset)))
+ return false;
}
}
- /* We're done with the local symbols, free them. */
- for (i = 0; i < bfd_count; i++)
- if (all_local_syms[i])
- free (all_local_syms[i]);
- free (all_local_syms);
+
return true;
+}
+
+/* Comparison function for qsort to sort unwind section during a
+ final link. */
-error_return:
- /* Return gracefully, avoiding dangling references to the hash tables. */
- if (stub_hash_table)
+static int
+hppa_unwind_entry_compare (a, b)
+ const PTR a;
+ const PTR b;
+{
+ const bfd_byte *ap, *bp;
+ unsigned long av, bv;
+
+ ap = (const bfd_byte *) a;
+ av = (unsigned long) ap[0] << 24;
+ av |= (unsigned long) ap[1] << 16;
+ av |= (unsigned long) ap[2] << 8;
+ av |= (unsigned long) ap[3];
+
+ bp = (const bfd_byte *) b;
+ bv = (unsigned long) bp[0] << 24;
+ bv |= (unsigned long) bp[1] << 16;
+ bv |= (unsigned long) bp[2] << 8;
+ bv |= (unsigned long) bp[3];
+
+ return av < bv ? -1 : av > bv ? 1 : 0;
+}
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+static boolean
+elf32_hppa_finish_dynamic_symbol (output_bfd, info, h, sym)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ struct elf32_hppa_link_hash_table *hplink;
+ bfd *dynobj;
+
+ hplink = hppa_link_hash_table (info);
+ dynobj = hplink->root.dynobj;
+
+ if (h->plt.offset != (bfd_vma) -1)
{
- elf32_hppa_hash_table(link_info)->stub_hash_table = NULL;
- free (stub_hash_table);
+ bfd_vma value;
+
+ if (h->plt.offset & 1)
+ abort ();
+
+ /* This symbol has an entry in the procedure linkage table. Set
+ it up.
+
+ The format of a plt entry is
+ <funcaddr>
+ <__gp>
+ */
+ value = 0;
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ value = h->root.u.def.value;
+ if (h->root.u.def.section->output_section != NULL)
+ value += (h->root.u.def.section->output_offset
+ + h->root.u.def.section->output_section->vma);
+ }
+
+ if (! ((struct elf32_hppa_link_hash_entry *) h)->pic_call)
+ {
+ Elf_Internal_Rela rel;
+
+ /* Create a dynamic IPLT relocation for this entry. */
+ rel.r_offset = (h->plt.offset
+ + hplink->splt->output_offset
+ + hplink->splt->output_section->vma);
+ if (! ((struct elf32_hppa_link_hash_entry *) h)->plt_abs
+ && h->dynindx != -1)
+ {
+ /* To support lazy linking, the function pointer is
+ initialised to point to a special stub stored at the
+ end of the .plt. This is not done for plt entries
+ with a base-relative dynamic relocation. */
+ value = (hplink->splt->output_offset
+ + hplink->splt->output_section->vma
+ + hplink->splt->_raw_size
+ - sizeof (plt_stub)
+ + PLT_STUB_ENTRY);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_PARISC_IPLT);
+ rel.r_addend = 0;
+ }
+ else
+ {
+ /* This symbol has been marked to become local, and is
+ used by a plabel so must be kept in the .plt. */
+ rel.r_info = ELF32_R_INFO (0, R_PARISC_IPLT);
+ rel.r_addend = value;
+ }
+
+ bfd_elf32_swap_reloca_out (hplink->splt->output_section->owner,
+ &rel,
+ ((Elf32_External_Rela *)
+ hplink->srelplt->contents
+ + hplink->srelplt->reloc_count));
+ hplink->srelplt->reloc_count++;
+ }
+
+ bfd_put_32 (hplink->splt->owner,
+ value,
+ hplink->splt->contents + h->plt.offset);
+ bfd_put_32 (hplink->splt->owner,
+ elf_gp (hplink->splt->output_section->owner),
+ hplink->splt->contents + h->plt.offset + 4);
+ if (PLABEL_PLT_ENTRY_SIZE != PLT_ENTRY_SIZE
+ && ((struct elf32_hppa_link_hash_entry *) h)->plabel
+ && h->dynindx != -1)
+ {
+ memset (hplink->splt->contents + h->plt.offset + 8,
+ 0, PLABEL_PLT_ENTRY_SIZE - PLT_ENTRY_SIZE);
+ }
+
+ 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;
+ }
}
- /* Set the size of the stub section to zero since we're never going
- to create them. Avoids losing when we try to get its contents
- too. */
- bfd_set_section_size (stub_bfd, stub_sec, 0);
- return false;
+
+ if (h->got.offset != (bfd_vma) -1)
+ {
+ Elf_Internal_Rela rel;
+
+ /* This symbol has an entry in the global offset table. Set it
+ up. */
+
+ rel.r_offset = ((h->got.offset &~ (bfd_vma) 1)
+ + hplink->sgot->output_offset
+ + hplink->sgot->output_section->vma);
+
+ /* If this is a -Bsymbolic link and the symbol is defined
+ locally or was forced to be local because of a version file,
+ we just want to emit a RELATIVE reloc. The entry in the
+ global offset table will already have been initialized in the
+ relocate_section function. */
+ if (info->shared
+ && (info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ {
+ rel.r_info = ELF32_R_INFO (0, R_PARISC_DIR32);
+ rel.r_addend = (h->root.u.def.value
+ + h->root.u.def.section->output_offset
+ + h->root.u.def.section->output_section->vma);
+ }
+ else
+ {
+ if ((h->got.offset & 1) != 0)
+ abort ();
+ bfd_put_32 (output_bfd, (bfd_vma) 0,
+ hplink->sgot->contents + h->got.offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_PARISC_DIR32);
+ rel.r_addend = 0;
+ }
+
+ bfd_elf32_swap_reloca_out (output_bfd, &rel,
+ ((Elf32_External_Rela *)
+ hplink->srelgot->contents
+ + hplink->srelgot->reloc_count));
+ ++hplink->srelgot->reloc_count;
+ }
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ {
+ asection *s;
+ Elf_Internal_Rela rel;
+
+ /* This symbol needs a copy reloc. Set it up. */
+
+ if (! (h->dynindx != -1
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)))
+ abort ();
+
+ s = hplink->srelbss;
+
+ rel.r_offset = (h->root.u.def.value
+ + h->root.u.def.section->output_offset
+ + h->root.u.def.section->output_section->vma);
+ rel.r_addend = 0;
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_PARISC_COPY);
+ bfd_elf32_swap_reloca_out (output_bfd, &rel,
+ ((Elf32_External_Rela *) s->contents
+ + s->reloc_count));
+ ++s->reloc_count;
+ }
+
+ /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
+ if (h->root.root.string[0] == '_'
+ && (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0))
+ {
+ sym->st_shndx = SHN_ABS;
+ }
+
+ return true;
+}
+
+/* Finish up the dynamic sections. */
+
+static boolean
+elf32_hppa_finish_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ bfd *dynobj;
+ struct elf32_hppa_link_hash_table *hplink;
+ asection *sdyn;
+
+ hplink = hppa_link_hash_table (info);
+ dynobj = hplink->root.dynobj;
+
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ if (hplink->root.dynamic_sections_created)
+ {
+ Elf32_External_Dyn *dyncon, *dynconend;
+
+ if (sdyn == NULL)
+ abort ();
+
+ dyncon = (Elf32_External_Dyn *) sdyn->contents;
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ for (; dyncon < dynconend; dyncon++)
+ {
+ Elf_Internal_Dyn dyn;
+ asection *s;
+
+ bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+ switch (dyn.d_tag)
+ {
+ default:
+ break;
+
+ case DT_PLTGOT:
+ /* Use PLTGOT to set the GOT register. */
+ dyn.d_un.d_ptr = elf_gp (output_bfd);
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ case DT_JMPREL:
+ s = hplink->srelplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ case DT_PLTRELSZ:
+ s = hplink->srelplt;
+ 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;
+ }
+ }
+ }
+
+ if (hplink->sgot->_raw_size != 0)
+ {
+ /* Fill in the first entry in the global offset table.
+ We use it to point to our dynamic section, if we have one. */
+ bfd_put_32 (output_bfd,
+ (sdyn != NULL
+ ? sdyn->output_section->vma + sdyn->output_offset
+ : (bfd_vma) 0),
+ hplink->sgot->contents);
+
+ /* The second entry is reserved for use by the dynamic linker. */
+ memset (hplink->sgot->contents + GOT_ENTRY_SIZE, 0, GOT_ENTRY_SIZE);
+
+ /* Set .got entry size. */
+ elf_section_data (hplink->sgot->output_section)
+ ->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
+ }
+
+ if (hplink->splt->_raw_size != 0)
+ {
+ /* Set plt entry size. */
+ elf_section_data (hplink->splt->output_section)
+ ->this_hdr.sh_entsize = PLT_ENTRY_SIZE;
+
+ if (hplink->need_plt_stub)
+ {
+ /* Set up the .plt stub. */
+ memcpy (hplink->splt->contents
+ + hplink->splt->_raw_size - sizeof (plt_stub),
+ plt_stub, sizeof (plt_stub));
+
+ if ((hplink->splt->output_offset
+ + hplink->splt->output_section->vma
+ + hplink->splt->_raw_size)
+ != (hplink->sgot->output_offset
+ + hplink->sgot->output_section->vma))
+ {
+ (*_bfd_error_handler)
+ (_(".got section not immediately after .plt section"));
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+/* Tweak the OSABI field of the elf header. */
+
+static void
+elf32_hppa_post_process_headers (abfd, link_info)
+ bfd *abfd;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+{
+ Elf_Internal_Ehdr * i_ehdrp;
+
+ i_ehdrp = elf_elfheader (abfd);
+
+ if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0)
+ {
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX;
+ }
+ else
+ {
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX;
+ }
+}
+
+/* Called when writing out an object file to decide the type of a
+ symbol. */
+static int
+elf32_hppa_elf_get_symbol_type (elf_sym, type)
+ Elf_Internal_Sym *elf_sym;
+ int type;
+{
+ if (ELF_ST_TYPE (elf_sym->st_info) == STT_PARISC_MILLI)
+ return STT_PARISC_MILLI;
+ else
+ return type;
}
/* Misc BFD support code. */
-#define bfd_elf32_bfd_reloc_type_lookup elf_hppa_reloc_type_lookup
-#define bfd_elf32_bfd_is_local_label_name elf_hppa_is_local_label_name
-#define elf_info_to_howto elf_hppa_info_to_howto
-#define elf_info_to_howto_rel elf_hppa_info_to_howto_rel
+#define bfd_elf32_bfd_is_local_label_name elf_hppa_is_local_label_name
+#define bfd_elf32_bfd_reloc_type_lookup elf_hppa_reloc_type_lookup
+#define elf_info_to_howto elf_hppa_info_to_howto
+#define elf_info_to_howto_rel elf_hppa_info_to_howto_rel
/* Stuff for the BFD linker. */
-#define elf_backend_relocate_section elf32_hppa_relocate_section
-#define elf_backend_add_symbol_hook elf32_hppa_add_symbol_hook
-#define bfd_elf32_bfd_link_hash_table_create \
- elf32_hppa_link_hash_table_create
-#define elf_backend_fake_sections elf_hppa_fake_sections
-
+#define bfd_elf32_bfd_final_link elf32_hppa_final_link
+#define bfd_elf32_bfd_link_hash_table_create elf32_hppa_link_hash_table_create
+#define elf_backend_add_symbol_hook elf32_hppa_add_symbol_hook
+#define elf_backend_adjust_dynamic_symbol elf32_hppa_adjust_dynamic_symbol
+#define elf_backend_check_relocs elf32_hppa_check_relocs
+#define elf_backend_create_dynamic_sections elf32_hppa_create_dynamic_sections
+#define elf_backend_fake_sections elf_hppa_fake_sections
+#define elf_backend_relocate_section elf32_hppa_relocate_section
+#define elf_backend_hide_symbol elf32_hppa_hide_symbol
+#define elf_backend_finish_dynamic_symbol elf32_hppa_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections elf32_hppa_finish_dynamic_sections
+#define elf_backend_size_dynamic_sections elf32_hppa_size_dynamic_sections
+#define elf_backend_gc_mark_hook elf32_hppa_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_hppa_gc_sweep_hook
+#define elf_backend_object_p elf32_hppa_object_p
+#define elf_backend_final_write_processing elf_hppa_final_write_processing
+#define elf_backend_post_process_headers elf32_hppa_post_process_headers
+#define elf_backend_get_symbol_type elf32_hppa_elf_get_symbol_type
+
+#define elf_backend_can_gc_sections 1
+#define elf_backend_plt_alignment 2
+#define elf_backend_want_got_plt 0
+#define elf_backend_plt_readonly 0
+#define elf_backend_want_plt_sym 0
+#define elf_backend_got_header_size 8
#define TARGET_BIG_SYM bfd_elf32_hppa_vec
#define TARGET_BIG_NAME "elf32-hppa"
@@ -1327,3 +4435,11 @@ error_return:
#define ELF_MAXPAGESIZE 0x1000
#include "elf32-target.h"
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_hppa_linux_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-hppa-linux"
+
+#define INCLUDED_TARGET_FILE 1
+#include "elf32-target.h"
diff --git a/gnu/usr.bin/binutils/bfd/elf32-hppa.h b/gnu/usr.bin/binutils/bfd/elf32-hppa.h
index 915fc13ae59..eda452b4b3f 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-hppa.h
+++ b/gnu/usr.bin/binutils/bfd/elf32-hppa.h
@@ -4,7 +4,8 @@
in the Stratus FTX/Golf Object File Format (SED-1762) dated
February 1994.
- Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by:
@@ -36,13 +37,18 @@
#include "elf/hppa.h"
boolean elf32_hppa_size_stubs
- PARAMS ((bfd *, bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, bfd *, struct bfd_link_info *, boolean, bfd_signed_vma,
+ asection * (*) PARAMS ((const char *, asection *)),
+ void (*) PARAMS ((void))));
-boolean elf32_hppa_build_stubs
+boolean elf32_hppa_set_gp
PARAMS ((bfd *, struct bfd_link_info *));
+boolean elf32_hppa_build_stubs
+ PARAMS ((struct bfd_link_info *));
+
extern elf_hppa_reloc_type ** _bfd_elf32_hppa_gen_reloc_type
- PARAMS ((bfd *, elf_hppa_reloc_type, int, int, int, asymbol *));
+ PARAMS ((bfd *, elf_hppa_reloc_type, int, unsigned int, int, asymbol *));
/* Define groups of basic relocations. FIXME: These should
be the only basic relocations created by GAS. The rest
diff --git a/gnu/usr.bin/binutils/bfd/elf32-i386.c b/gnu/usr.bin/binutils/bfd/elf32-i386.c
index fc1b5a8ccb6..b838d3a7539 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-i386.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-i386.c
@@ -1,5 +1,6 @@
/* Intel 80386/80486-specific support for 32-bit ELF
- Copyright 1993, 94-98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -56,35 +57,66 @@ static boolean elf_i386_finish_dynamic_sections
static reloc_howto_type elf_howto_table[]=
{
- HOWTO(R_386_NONE, 0,0, 0,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_NONE", true,0x00000000,0x00000000,false),
- HOWTO(R_386_32, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_32", true,0xffffffff,0xffffffff,false),
- HOWTO(R_386_PC32, 0,2,32,true, 0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PC32", true,0xffffffff,0xffffffff,true),
- HOWTO(R_386_GOT32, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOT32", true,0xffffffff,0xffffffff,false),
- HOWTO(R_386_PLT32, 0,2,32,true,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PLT32", true,0xffffffff,0xffffffff,true),
- HOWTO(R_386_COPY, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_COPY", true,0xffffffff,0xffffffff,false),
- HOWTO(R_386_GLOB_DAT, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GLOB_DAT", true,0xffffffff,0xffffffff,false),
- HOWTO(R_386_JUMP_SLOT, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_JUMP_SLOT",true,0xffffffff,0xffffffff,false),
- HOWTO(R_386_RELATIVE, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_RELATIVE", true,0xffffffff,0xffffffff,false),
- HOWTO(R_386_GOTOFF, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTOFF", true,0xffffffff,0xffffffff,false),
- HOWTO(R_386_GOTPC, 0,2,32,true,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTPC", true,0xffffffff,0xffffffff,true),
- EMPTY_HOWTO (11),
- EMPTY_HOWTO (12),
- EMPTY_HOWTO (13),
- EMPTY_HOWTO (14),
- EMPTY_HOWTO (15),
- EMPTY_HOWTO (16),
- EMPTY_HOWTO (17),
- EMPTY_HOWTO (18),
- EMPTY_HOWTO (19),
+ HOWTO(R_386_NONE, 0, 0, 0, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_NONE",
+ true, 0x00000000, 0x00000000, false),
+ HOWTO(R_386_32, 0, 2, 32, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_32",
+ true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_386_PC32, 0, 2, 32, true, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_PC32",
+ true, 0xffffffff, 0xffffffff, true),
+ HOWTO(R_386_GOT32, 0, 2, 32, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_GOT32",
+ true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_386_PLT32, 0, 2, 32, true, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_PLT32",
+ true, 0xffffffff, 0xffffffff, true),
+ HOWTO(R_386_COPY, 0, 2, 32, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_COPY",
+ true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_386_GLOB_DAT, 0, 2, 32, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_GLOB_DAT",
+ true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_386_JUMP_SLOT, 0, 2, 32, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_JUMP_SLOT",
+ true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_386_RELATIVE, 0, 2, 32, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_RELATIVE",
+ true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_386_GOTOFF, 0, 2, 32, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_GOTOFF",
+ true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_386_GOTPC, 0, 2, 32, true, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_GOTPC",
+ true, 0xffffffff, 0xffffffff, true),
+
+ /* We have a gap in the reloc numbers here.
+ R_386_standard counts the number up to this point, and
+ R_386_ext_offset is the value to subtract from a reloc type of
+ R_386_16 thru R_386_PC8 to form an index into this table. */
+#define R_386_standard ((unsigned int) R_386_GOTPC + 1)
+#define R_386_ext_offset ((unsigned int) R_386_16 - R_386_standard)
+
/* The remaining relocs are a GNU extension. */
- HOWTO(R_386_16, 0,1,16,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_16", true,0xffff,0xffff,false),
- HOWTO(R_386_PC16, 0,1,16,true, 0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PC16", true,0xffff,0xffff,true),
- HOWTO(R_386_8, 0,0,8,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_8", true,0xff,0xff,false),
- HOWTO(R_386_PC8, 0,0,8,true, 0,complain_overflow_signed, bfd_elf_generic_reloc,"R_386_PC8", true,0xff,0xff,true),
-};
+ HOWTO(R_386_16, 0, 1, 16, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_16",
+ true, 0xffff, 0xffff, false),
+ HOWTO(R_386_PC16, 0, 1, 16, true, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_PC16",
+ true, 0xffff, 0xffff, true),
+ HOWTO(R_386_8, 0, 0, 8, false, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_8",
+ true, 0xff, 0xff, false),
+ HOWTO(R_386_PC8, 0, 0, 8, true, 0, complain_overflow_signed,
+ bfd_elf_generic_reloc, "R_386_PC8",
+ true, 0xff, 0xff, true),
+
+ /* Another gap. */
+#define R_386_ext ((unsigned int) R_386_PC8 + 1 - R_386_ext_offset)
+#define R_386_vt_offset ((unsigned int) R_386_GNU_VTINHERIT - R_386_ext)
/* GNU extension to record C++ vtable hierarchy. */
-static reloc_howto_type elf32_i386_vtinherit_howto =
HOWTO (R_386_GNU_VTINHERIT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -97,10 +129,9 @@ static reloc_howto_type elf32_i386_vtinherit_howto =
false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false);
+ false),
/* GNU extension to record C++ vtable member usage. */
-static reloc_howto_type elf32_i386_vtentry_howto =
HOWTO (R_386_GNU_VTENTRY, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -113,7 +144,11 @@ static reloc_howto_type elf32_i386_vtentry_howto =
false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false);
+ false)
+
+#define R_386_vt ((unsigned int) R_386_GNU_VTENTRY + 1 - R_386_vt_offset)
+
+};
#ifdef DEBUG_GEN_RELOC
#define TRACE(str) fprintf (stderr, "i386 bfd reloc lookup %d (%s)\n", code, str)
@@ -130,76 +165,78 @@ elf_i386_reloc_type_lookup (abfd, code)
{
case BFD_RELOC_NONE:
TRACE ("BFD_RELOC_NONE");
- return &elf_howto_table[ (int)R_386_NONE ];
+ return &elf_howto_table[(unsigned int) R_386_NONE ];
case BFD_RELOC_32:
TRACE ("BFD_RELOC_32");
- return &elf_howto_table[ (int)R_386_32 ];
+ return &elf_howto_table[(unsigned int) R_386_32 ];
case BFD_RELOC_CTOR:
TRACE ("BFD_RELOC_CTOR");
- return &elf_howto_table[ (int)R_386_32 ];
+ return &elf_howto_table[(unsigned int) R_386_32 ];
case BFD_RELOC_32_PCREL:
TRACE ("BFD_RELOC_PC32");
- return &elf_howto_table[ (int)R_386_PC32 ];
+ return &elf_howto_table[(unsigned int) R_386_PC32 ];
case BFD_RELOC_386_GOT32:
TRACE ("BFD_RELOC_386_GOT32");
- return &elf_howto_table[ (int)R_386_GOT32 ];
+ return &elf_howto_table[(unsigned int) R_386_GOT32 ];
case BFD_RELOC_386_PLT32:
TRACE ("BFD_RELOC_386_PLT32");
- return &elf_howto_table[ (int)R_386_PLT32 ];
+ return &elf_howto_table[(unsigned int) R_386_PLT32 ];
case BFD_RELOC_386_COPY:
TRACE ("BFD_RELOC_386_COPY");
- return &elf_howto_table[ (int)R_386_COPY ];
+ return &elf_howto_table[(unsigned int) R_386_COPY ];
case BFD_RELOC_386_GLOB_DAT:
TRACE ("BFD_RELOC_386_GLOB_DAT");
- return &elf_howto_table[ (int)R_386_GLOB_DAT ];
+ return &elf_howto_table[(unsigned int) R_386_GLOB_DAT ];
case BFD_RELOC_386_JUMP_SLOT:
TRACE ("BFD_RELOC_386_JUMP_SLOT");
- return &elf_howto_table[ (int)R_386_JUMP_SLOT ];
+ return &elf_howto_table[(unsigned int) R_386_JUMP_SLOT ];
case BFD_RELOC_386_RELATIVE:
TRACE ("BFD_RELOC_386_RELATIVE");
- return &elf_howto_table[ (int)R_386_RELATIVE ];
+ return &elf_howto_table[(unsigned int) R_386_RELATIVE ];
case BFD_RELOC_386_GOTOFF:
TRACE ("BFD_RELOC_386_GOTOFF");
- return &elf_howto_table[ (int)R_386_GOTOFF ];
+ return &elf_howto_table[(unsigned int) R_386_GOTOFF ];
case BFD_RELOC_386_GOTPC:
TRACE ("BFD_RELOC_386_GOTPC");
- return &elf_howto_table[ (int)R_386_GOTPC ];
+ return &elf_howto_table[(unsigned int) R_386_GOTPC ];
/* The remaining relocs are a GNU extension. */
case BFD_RELOC_16:
TRACE ("BFD_RELOC_16");
- return &elf_howto_table[(int) R_386_16];
+ return &elf_howto_table[(unsigned int) R_386_16 - R_386_ext_offset];
case BFD_RELOC_16_PCREL:
TRACE ("BFD_RELOC_16_PCREL");
- return &elf_howto_table[(int) R_386_PC16];
+ return &elf_howto_table[(unsigned int) R_386_PC16 - R_386_ext_offset];
case BFD_RELOC_8:
TRACE ("BFD_RELOC_8");
- return &elf_howto_table[(int) R_386_8];
+ return &elf_howto_table[(unsigned int) R_386_8 - R_386_ext_offset];
case BFD_RELOC_8_PCREL:
TRACE ("BFD_RELOC_8_PCREL");
- return &elf_howto_table[(int) R_386_PC8];
+ return &elf_howto_table[(unsigned int) R_386_PC8 - R_386_ext_offset];
case BFD_RELOC_VTABLE_INHERIT:
TRACE ("BFD_RELOC_VTABLE_INHERIT");
- return &elf32_i386_vtinherit_howto;
+ return &elf_howto_table[(unsigned int) R_386_GNU_VTINHERIT
+ - R_386_vt_offset];
case BFD_RELOC_VTABLE_ENTRY:
TRACE ("BFD_RELOC_VTABLE_ENTRY");
- return &elf32_i386_vtentry_howto;
+ return &elf_howto_table[(unsigned int) R_386_GNU_VTENTRY
+ - R_386_vt_offset];
default:
break;
@@ -224,22 +261,20 @@ elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
arelent *cache_ptr;
Elf32_Internal_Rel *dst;
{
- enum elf_i386_reloc_type type;
-
- type = (enum elf_i386_reloc_type) ELF32_R_TYPE (dst->r_info);
- if (type == R_386_GNU_VTINHERIT)
- cache_ptr->howto = &elf32_i386_vtinherit_howto;
- else if (type == R_386_GNU_VTENTRY)
- cache_ptr->howto = &elf32_i386_vtentry_howto;
- else if (type < R_386_max
- && (type < FIRST_INVALID_RELOC || type > LAST_INVALID_RELOC))
- cache_ptr->howto = &elf_howto_table[(int) type];
- else
+ unsigned int r_type = ELF32_R_TYPE (dst->r_info);
+ unsigned int indx;
+
+ if ((indx = r_type) >= R_386_standard
+ && ((indx = r_type - R_386_ext_offset) - R_386_standard
+ >= R_386_ext - R_386_standard)
+ && ((indx = r_type - R_386_vt_offset) - R_386_ext
+ >= R_386_vt - R_386_ext))
{
(*_bfd_error_handler) (_("%s: invalid relocation type %d"),
- bfd_get_filename (abfd), (int) type);
- cache_ptr->howto = &elf_howto_table[(int) R_386_NONE];
+ bfd_get_filename (abfd), (int) r_type);
+ indx = (unsigned int) R_386_NONE;
}
+ cache_ptr->howto = &elf_howto_table[indx];
}
/* Return whether a symbol name implies a local label. The UnixWare
@@ -439,7 +474,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
- bfd_vma *local_got_offsets;
+ bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
asection *sgot;
@@ -452,7 +487,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
- local_got_offsets = elf_local_got_offsets (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
sgot = NULL;
srelgot = NULL;
@@ -466,6 +501,20 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
+ {
+ if (abfd->my_archive)
+ (*_bfd_error_handler) (_("%s(%s): bad symbol index: %d"),
+ bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd),
+ r_symndx);
+ else
+ (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
+ bfd_get_filename (abfd),
+ r_symndx);
+ return false;
+ }
+
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
@@ -522,57 +571,54 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
- if (h->got.offset != (bfd_vma) -1)
+ if (h->got.refcount == -1)
{
- /* We have already allocated space in the .got. */
- break;
- }
- h->got.offset = sgot->_raw_size;
+ h->got.refcount = 1;
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf32_link_record_dynamic_symbol (info, h))
- return false;
- }
+ /* Make sure this symbol is output as a dynamic symbol. */
+ if (h->dynindx == -1)
+ {
+ if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+ return false;
+ }
- srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ sgot->_raw_size += 4;
+ srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ }
+ else
+ h->got.refcount += 1;
}
else
{
- /* This is a global offset table entry for a local
- symbol. */
- if (local_got_offsets == NULL)
+ /* This is a global offset table entry for a local symbol. */
+ if (local_got_refcounts == NULL)
{
size_t size;
- register unsigned int i;
- size = symtab_hdr->sh_info * sizeof (bfd_vma);
- local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
- if (local_got_offsets == NULL)
+ size = symtab_hdr->sh_info * sizeof (bfd_signed_vma);
+ local_got_refcounts = ((bfd_signed_vma *)
+ bfd_alloc (abfd, size));
+ if (local_got_refcounts == NULL)
return false;
- elf_local_got_offsets (abfd) = local_got_offsets;
- for (i = 0; i < symtab_hdr->sh_info; i++)
- local_got_offsets[i] = (bfd_vma) -1;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ memset (local_got_refcounts, -1, size);
}
- if (local_got_offsets[r_symndx] != (bfd_vma) -1)
+ if (local_got_refcounts[r_symndx] == -1)
{
- /* We have already allocated space in the .got. */
- break;
- }
- local_got_offsets[r_symndx] = sgot->_raw_size;
+ local_got_refcounts[r_symndx] = 1;
- if (info->shared)
- {
- /* If we are generating a shared object, we need to
- output a R_386_RELATIVE reloc so that the dynamic
- linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ sgot->_raw_size += 4;
+ if (info->shared)
+ {
+ /* If we are generating a shared object, we need to
+ output a R_386_RELATIVE reloc so that the dynamic
+ linker can adjust this GOT entry. */
+ srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ }
}
+ else
+ local_got_refcounts[r_symndx] += 1;
}
-
- sgot->_raw_size += 4;
-
break;
case R_386_PLT32:
@@ -588,8 +634,13 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
if (h == NULL)
continue;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
-
+ if (h->plt.refcount == -1)
+ {
+ h->plt.refcount = 1;
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ }
+ else
+ h->plt.refcount += 1;
break;
case R_386_32:
@@ -598,28 +649,33 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
/* If we are creating a shared library, and this is a reloc
- against a global symbol, or a non PC relative reloc
- against a local symbol, then we need to copy the reloc
- into the shared library. However, if we are linking with
- -Bsymbolic, we do not need to copy a reloc against a
- global symbol which is defined in an object we are
- including in the link (i.e., DEF_REGULAR is set). At
- this point we have not seen all the input files, so it is
- possible that DEF_REGULAR is not set now but will be set
- later (it is never cleared). We account for that
- possibility below by storing information in the
- pcrel_relocs_copied field of the hash table entry. */
+ against a global symbol, or a non PC relative reloc
+ against a local symbol, then we need to copy the reloc
+ into the shared library. However, if we are linking with
+ -Bsymbolic, we do not need to copy a reloc against a
+ global symbol which is defined in an object we are
+ including in the link (i.e., DEF_REGULAR is set). At
+ this point we have not seen all the input files, so it is
+ possible that DEF_REGULAR is not set now but will be set
+ later (it is never cleared). In case of a weak definition,
+ DEF_REGULAR may be cleared later by a strong definition in
+ a shared library. We account for that possibility below by
+ storing information in the relocs_copied field of the hash
+ table entry. A similar situation occurs when creating
+ shared libraries and symbol visibility changes render the
+ symbol local. */
if (info->shared
&& (sec->flags & SEC_ALLOC) != 0
&& (ELF32_R_TYPE (rel->r_info) != R_386_PC32
|| (h != NULL
&& (! info->symbolic
+ || h->root.type == bfd_link_hash_defweak
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))))
{
/* When creating a shared object, we must copy these
- reloc types into the output file. We create a reloc
- section in dynobj and make room for this reloc. */
+ reloc types into the output file. We create a reloc
+ section in dynobj and make room for this reloc. */
if (sreloc == NULL)
{
const char *name;
@@ -631,9 +687,20 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
if (name == NULL)
return false;
- BFD_ASSERT (strncmp (name, ".rel", 4) == 0
- && strcmp (bfd_get_section_name (abfd, sec),
- name + 4) == 0);
+ if (strncmp (name, ".rel", 4) != 0
+ || strcmp (bfd_get_section_name (abfd, sec),
+ name + 4) != 0)
+ {
+ if (abfd->my_archive)
+ (*_bfd_error_handler) (_("%s(%s): bad relocation section name `%s\'"),
+ bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd),
+ name);
+ else
+ (*_bfd_error_handler) (_("%s: bad relocation section name `%s\'"),
+ bfd_get_filename (abfd),
+ name);
+ }
sreloc = bfd_get_section_by_name (dynobj, name);
if (sreloc == NULL)
@@ -654,15 +721,13 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
sreloc->_raw_size += sizeof (Elf32_External_Rel);
- /* If we are linking with -Bsymbolic, and this is a
- global symbol, we count the number of PC relative
- relocations we have entered for this symbol, so that
- we can discard them again if the symbol is later
- defined by a regular object. Note that this function
- is only called if we are using an elf_i386 linker
- hash table, which means that h is really a pointer to
- an elf_i386_link_hash_entry. */
- if (h != NULL && info->symbolic
+ /* If this is a global symbol, we count the number of PC
+ relative relocations we have entered for this symbol,
+ so that we can discard them later as necessary. Note
+ that this function is only called if we are using an
+ elf_i386 linker hash table, which means that h is
+ really a pointer to an elf_i386_link_hash_entry. */
+ if (h != NULL
&& ELF32_R_TYPE (rel->r_info) == R_386_PC32)
{
struct elf_i386_link_hash_entry *eh;
@@ -766,14 +831,81 @@ elf_i386_gc_mark_hook (abfd, info, rel, h, sym)
static boolean
elf_i386_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
{
- /* ??? It would seem that the existing i386 code does no sort
- of reference counting or whatnot on its GOT and PLT entries,
- so it is not possible to garbage collect them at this time. */
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_signed_vma *local_got_refcounts;
+ const Elf_Internal_Rela *rel, *relend;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ bfd *dynobj;
+ asection *sgot;
+ asection *srelgot;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+
+ dynobj = elf_hash_table (info)->dynobj;
+ if (dynobj == NULL)
+ return true;
+
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ srelgot = bfd_get_section_by_name (dynobj, ".rel.got");
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_386_GOT32:
+ case R_386_GOTOFF:
+ case R_386_GOTPC:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ if (h->got.refcount > 0)
+ {
+ h->got.refcount -= 1;
+ if (h->got.refcount == 0)
+ {
+ sgot->_raw_size -= 4;
+ srelgot->_raw_size -= sizeof (Elf32_External_Rel);
+ }
+ }
+ }
+ else if (local_got_refcounts != NULL)
+ {
+ if (local_got_refcounts[r_symndx] > 0)
+ {
+ local_got_refcounts[r_symndx] -= 1;
+ if (local_got_refcounts[r_symndx] == 0)
+ {
+ sgot->_raw_size -= 4;
+ if (info->shared)
+ srelgot->_raw_size -= sizeof (Elf32_External_Rel);
+ }
+ }
+ }
+ break;
+
+ case R_386_PLT32:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ if (h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+ }
+ break;
+
+ default:
+ break;
+ }
return true;
}
@@ -812,16 +944,18 @@ elf_i386_adjust_dynamic_symbol (info, h)
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
- if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)
+ if ((! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)
+ || (info->shared && h->plt.refcount <= 0))
{
/* This case can occur if we saw a PLT32 reloc in an input
- file, but the symbol was never referred to by a dynamic
- object. In such a case, we don't actually need to build
- a procedure linkage table, and we can just do a PC32
- reloc instead. */
- BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
+ file, but the symbol was never referred to by a dynamic
+ object, or if all references were garbage collected. In
+ such a case, we don't actually need to build a procedure
+ linkage table, and we can just do a PC32 reloc instead. */
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
return true;
}
@@ -859,13 +993,11 @@ elf_i386_adjust_dynamic_symbol (info, h)
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
-
s = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (s != NULL);
s->_raw_size += 4;
/* We also need to make an entry in the .rel.plt section. */
-
s = bfd_get_section_by_name (dynobj, ".rel.plt");
BFD_ASSERT (s != NULL);
s->_raw_size += sizeof (Elf32_External_Rel);
@@ -995,10 +1127,10 @@ elf_i386_size_dynamic_sections (output_bfd, info)
PC relative relocs against symbols defined in a regular object.
We allocated space for them in the check_relocs routine, but we
will not fill them in in the relocate_section routine. */
- if (info->shared && info->symbolic)
+ if (info->shared)
elf_i386_link_hash_traverse (elf_i386_hash_table (info),
elf_i386_discard_copies,
- (PTR) NULL);
+ (PTR) info);
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
@@ -1092,8 +1224,12 @@ elf_i386_size_dynamic_sections (output_bfd, info)
continue;
}
- /* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ /* Allocate memory for the section contents. We use bfd_zalloc
+ here in case unused entries are not reclaimed before the
+ section's contents are written out. This should not happen,
+ but this way if it does, we get a R_386_NONE reloc instead
+ of garbage. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
return false;
}
@@ -1133,6 +1269,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
{
if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
@@ -1140,26 +1277,32 @@ elf_i386_size_dynamic_sections (output_bfd, info)
}
/* This function is called via elf_i386_link_hash_traverse if we are
- creating a shared object with -Bsymbolic. It discards the space
- allocated to copy PC relative relocs against symbols which are
- defined in regular objects. We allocated space for them in the
+ creating a shared object. In the -Bsymbolic case, it discards the
+ space allocated to copy PC relative relocs against symbols which
+ are defined in regular objects. For the normal non-symbolic case,
+ we also discard space for relocs that have become local due to
+ symbol visibility changes. We allocated space for them in the
check_relocs routine, but we won't fill them in in the
relocate_section routine. */
-/*ARGSUSED*/
static boolean
-elf_i386_discard_copies (h, ignore)
+elf_i386_discard_copies (h, inf)
struct elf_i386_link_hash_entry *h;
- PTR ignore ATTRIBUTE_UNUSED;
+ PTR inf;
{
struct elf_i386_pcrel_relocs_copied *s;
-
- /* We only discard relocs for symbols defined in a regular object. */
- if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- return true;
-
- for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
- s->section->_raw_size -= s->count * sizeof (Elf32_External_Rel);
+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+ /* If a symbol has been forced local or we have found a regular
+ definition for the symbolic link case, then we won't be needing
+ any relocs. */
+ if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
+ || info->symbolic))
+ {
+ for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
+ s->section->_raw_size -= s->count * sizeof (Elf32_External_Rel);
+ }
return true;
}
@@ -1193,9 +1336,14 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
sym_hashes = elf_sym_hashes (input_bfd);
local_got_offsets = elf_local_got_offsets (input_bfd);
- sgot = NULL;
- splt = NULL;
sreloc = NULL;
+ splt = NULL;
+ sgot = NULL;
+ if (dynobj != NULL)
+ {
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ }
rel = relocs;
relend = relocs + input_section->reloc_count;
@@ -1209,20 +1357,21 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
asection *sec;
bfd_vma relocation;
bfd_reloc_status_type r;
+ unsigned int indx;
r_type = ELF32_R_TYPE (rel->r_info);
- if (r_type == R_386_GNU_VTINHERIT
- || r_type == R_386_GNU_VTENTRY)
+ if (r_type == (int) R_386_GNU_VTINHERIT
+ || r_type == (int) R_386_GNU_VTENTRY)
continue;
- if (r_type < 0
- || r_type >= (int) R_386_max
- || (r_type >= (int) FIRST_INVALID_RELOC
- && r_type <= (int) LAST_INVALID_RELOC))
+
+ if ((indx = (unsigned) r_type) >= R_386_standard
+ && ((indx = (unsigned) r_type - R_386_ext_offset) - R_386_standard
+ >= R_386_ext - R_386_standard))
{
bfd_set_error (bfd_error_bad_value);
return false;
}
- howto = elf_howto_table + r_type;
+ howto = elf_howto_table + indx;
r_symndx = ELF32_R_SYM (rel->r_info);
@@ -1273,6 +1422,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
sec = h->root.u.def.section;
if (r_type == R_386_GOTPC
|| (r_type == R_386_PLT32
+ && splt != NULL
&& h->plt.offset != (bfd_vma) -1)
|| (r_type == R_386_GOT32
&& elf_hash_table (info)->dynamic_sections_created
@@ -1336,11 +1486,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
case R_386_GOT32:
/* Relocation is to the entry for this symbol in the global
offset table. */
- if (sgot == NULL)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- }
+ BFD_ASSERT (sgot != NULL);
if (h != NULL)
{
@@ -1459,12 +1605,13 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
- /* Resolve a PLT32 reloc again a local symbol directly,
+ /* Resolve a PLT32 reloc against a local symbol directly,
without using the procedure linkage table. */
if (h == NULL)
break;
- if (h->plt.offset == (bfd_vma) -1)
+ if (h->plt.offset == (bfd_vma) -1
+ || splt == NULL)
{
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
@@ -1472,12 +1619,6 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
- if (splt == NULL)
- {
- splt = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (splt != NULL);
- }
-
relocation = (splt->output_section->vma
+ splt->output_offset
+ h->plt.offset);
@@ -1513,10 +1654,22 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
if (name == NULL)
return false;
- BFD_ASSERT (strncmp (name, ".rel", 4) == 0
- && strcmp (bfd_get_section_name (input_bfd,
- input_section),
- name + 4) == 0);
+ if (strncmp (name, ".rel", 4) != 0
+ || strcmp (bfd_get_section_name (input_bfd,
+ input_section),
+ name + 4) != 0)
+ {
+ if (input_bfd->my_archive)
+ (*_bfd_error_handler) (_("%s(%s): bad relocation section name `%s\'"),
+ bfd_get_filename (input_bfd->my_archive),
+ bfd_get_filename (input_bfd),
+ name);
+ else
+ (*_bfd_error_handler) (_("%s: bad relocation section name `%s\'"),
+ bfd_get_filename (input_bfd),
+ name);
+ return false;
+ }
sreloc = bfd_get_section_by_name (dynobj, name);
BFD_ASSERT (sreloc != NULL);
@@ -1744,17 +1897,21 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
+ sgot->output_offset
+ (h->got.offset &~ 1));
- /* If this is a -Bsymbolic link, and the symbol is defined
- locally, we just want to emit a RELATIVE reloc. Likewise if
- the symbol was forced to be local because of a version file.
+ /* If this is a static link, or it is a -Bsymbolic link and the
+ symbol is defined locally or was forced to be local because
+ of a version file, we just want to emit a RELATIVE reloc.
The entry in the global offset table will already have been
initialized in the relocate_section function. */
- if (info->shared
- && (info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
- rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
+ if (! elf_hash_table (info)->dynamic_sections_created
+ || (info->shared
+ && (info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ {
+ rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
+ }
else
{
+ BFD_ASSERT((h->got.offset & 1) == 0);
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
rel.r_info = ELF32_R_INFO (h->dynindx, R_386_GLOB_DAT);
}
@@ -1923,32 +2080,49 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
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. */
+
+static boolean
+elf_i386_fake_sections (abfd, hdr, sec)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ Elf32_Internal_Shdr *hdr;
+ asection *sec;
+{
+ register const char *name;
+
+ name = bfd_get_section_name (abfd, sec);
+
+ if (strcmp (name, ".reloc") == 0)
+ /*
+ * This is an ugly, but unfortunately necessary hack that is
+ * needed when producing EFI binaries on x86. It tells
+ * elf.c:elf_fake_sections() not to consider ".reloc" as a section
+ * containing ELF relocation info. We need this hack in order to
+ * be able to generate ELF binaries that can be translated into
+ * EFI applications (which are essentially COFF objects). Those
+ * files contain a COFF ".reloc" section inside an ELFNN object,
+ * which would normally cause BFD to segfault because it would
+ * attempt to interpret this section as containing relocation
+ * entries for section "oc". With this hack enabled, ".reloc"
+ * will be treated as a normal data section, which will avoid the
+ * segfault. However, you won't be able to create an ELFNN binary
+ * with a section named "oc" that needs relocations, but that's
+ * the kind of ugly side-effects you get when detecting section
+ * types based on their names... In practice, this limitation is
+ * unlikely to bite.
+ */
+ hdr->sh_type = SHT_PROGBITS;
+
+ return true;
+}
+
+
#define TARGET_LITTLE_SYM bfd_elf32_i386_vec
#define TARGET_LITTLE_NAME "elf32-i386"
#define ELF_ARCH bfd_arch_i386
#define ELF_MACHINE_CODE EM_386
#define ELF_MAXPAGESIZE 0x1000
-#define elf_info_to_howto elf_i386_info_to_howto
-#define elf_info_to_howto_rel elf_i386_info_to_howto_rel
-#define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup
-#define bfd_elf32_bfd_is_local_label_name \
- elf_i386_is_local_label_name
-#define elf_backend_create_dynamic_sections \
- _bfd_elf_create_dynamic_sections
-#define bfd_elf32_bfd_link_hash_table_create \
- elf_i386_link_hash_table_create
-#define elf_backend_check_relocs elf_i386_check_relocs
-#define elf_backend_adjust_dynamic_symbol \
- elf_i386_adjust_dynamic_symbol
-#define elf_backend_size_dynamic_sections \
- elf_i386_size_dynamic_sections
-#define elf_backend_relocate_section elf_i386_relocate_section
-#define elf_backend_finish_dynamic_symbol \
- elf_i386_finish_dynamic_symbol
-#define elf_backend_finish_dynamic_sections \
- elf_i386_finish_dynamic_sections
-#define elf_backend_gc_mark_hook elf_i386_gc_mark_hook
-#define elf_backend_gc_sweep_hook elf_i386_gc_sweep_hook
#define elf_backend_can_gc_sections 1
#define elf_backend_want_got_plt 1
@@ -1957,4 +2131,23 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
#define elf_backend_got_header_size 12
#define elf_backend_plt_header_size PLT_ENTRY_SIZE
+#define elf_info_to_howto elf_i386_info_to_howto
+#define elf_info_to_howto_rel elf_i386_info_to_howto_rel
+
+#define bfd_elf32_bfd_final_link _bfd_elf32_gc_common_final_link
+#define bfd_elf32_bfd_is_local_label_name elf_i386_is_local_label_name
+#define bfd_elf32_bfd_link_hash_table_create elf_i386_link_hash_table_create
+#define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup
+
+#define elf_backend_adjust_dynamic_symbol elf_i386_adjust_dynamic_symbol
+#define elf_backend_check_relocs elf_i386_check_relocs
+#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections
+#define elf_backend_finish_dynamic_sections elf_i386_finish_dynamic_sections
+#define elf_backend_finish_dynamic_symbol elf_i386_finish_dynamic_symbol
+#define elf_backend_gc_mark_hook elf_i386_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf_i386_gc_sweep_hook
+#define elf_backend_relocate_section elf_i386_relocate_section
+#define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
+#define elf_backend_fake_sections elf_i386_fake_sections
+
#include "elf32-target.h"
diff --git a/gnu/usr.bin/binutils/bfd/elf32-i860.c b/gnu/usr.bin/binutils/bfd/elf32-i860.c
index 6a2d2d97563..e72b90c29ba 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-i860.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-i860.c
@@ -1,5 +1,7 @@
-/* Intel 860 specific support for 32-bit ELF
- Copyright 1993 Free Software Foundation, Inc.
+/* Intel i860 specific support for 32-bit ELF.
+ Copyright 1993, 1995, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Full i860 support contributed by Jason Eckhardt <jle@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -21,14 +23,1085 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
#include "elf-bfd.h"
+#include "elf/i860.h"
+
+/* Prototypes. */
+static reloc_howto_type *lookup_howto
+ PARAMS ((unsigned int));
+
+static reloc_howto_type *elf32_i860_reloc_type_lookup
+ PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+
+static void elf32_i860_info_to_howto_rela
+ PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
+
+static bfd_reloc_status_type elf32_i860_relocate_splitn
+ PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
+
+static bfd_reloc_status_type elf32_i860_relocate_pc16
+ PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
+
+static bfd_reloc_status_type elf32_i860_relocate_pc26
+ PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
+
+static bfd_reloc_status_type elf32_i860_relocate_highadj
+ PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
+
+static boolean elf32_i860_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+
+static bfd_reloc_status_type i860_final_link_relocate
+ PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, bfd_vma));
+
+static boolean elf32_i860_is_local_label_name
+ PARAMS ((bfd *, const char *));
+
+/* This howto table is preliminary. */
+static reloc_howto_type elf32_i860_howto_table [] =
+{
+ /* This relocation does nothing. */
+ HOWTO (R_860_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_860_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 32-bit absolute relocation. */
+ HOWTO (R_860_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_860_32", /* name */
+ false, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_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_860_COPY", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_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_860_GLOB_DAT", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_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_860_JUMP_SLOT", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_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_860_RELATIVE", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 26-bit PC-relative relocation. */
+ HOWTO (R_860_PC26, /* 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_860_PC26", /* name */
+ false, /* partial_inplace */
+ 0x3ffffff, /* src_mask */
+ 0x3ffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_PLT26, /* type */
+ 0, /* 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_860_PLT26", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* A 16-bit PC-relative relocation. */
+ HOWTO (R_860_PC16, /* type */
+ 2, /* 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_860_PC16", /* name */
+ false, /* partial_inplace */
+ 0x1f07ff, /* src_mask */
+ 0x1f07ff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_LOW0, /* 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_860_LOW0", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_SPLIT0, /* 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_860_SPLIT0", /* name */
+ false, /* partial_inplace */
+ 0x1f07ff, /* src_mask */
+ 0x1f07ff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_LOW1, /* 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_860_LOW1", /* name */
+ false, /* partial_inplace */
+ 0xfffe, /* src_mask */
+ 0xfffe, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_SPLIT1, /* 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_860_SPLIT1", /* name */
+ false, /* partial_inplace */
+ 0x1f07fe, /* src_mask */
+ 0x1f07fe, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_LOW2, /* 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_860_LOW2", /* name */
+ false, /* partial_inplace */
+ 0xfffc, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_SPLIT2, /* 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_860_SPLIT2", /* name */
+ false, /* partial_inplace */
+ 0x1f07fc, /* src_mask */
+ 0x1f07fc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_LOW3, /* 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_860_LOW3", /* name */
+ false, /* partial_inplace */
+ 0xfff8, /* src_mask */
+ 0xfff8, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_LOGOT0, /* 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_860_LOGOT0", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_SPGOT0, /* 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_860_SPGOT0", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_LOGOT1, /* 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_860_LOGOT1", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_SPGOT1, /* 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_860_SPGOT1", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_LOGOTOFF0, /* 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_860_LOGOTOFF0", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_SPGOTOFF0, /* 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_860_SPGOTOFF0", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_LOGOTOFF1, /* 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_860_LOGOTOFF1", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_SPGOTOFF1, /* 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_860_SPGOTOFF1", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_LOGOTOFF2, /* 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_860_LOGOTOFF2", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_LOGOTOFF3, /* 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_860_LOGOTOFF3", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_LOPC, /* 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_860_LOPC", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_HIGHADJ, /* 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_860_HIGHADJ", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_HAGOT, /* 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_860_HAGOT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_HAGOTOFF, /* 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_860_HAGOTOFF", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_HAPC, /* 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_860_HAPC", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_HIGH, /* 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_elf_generic_reloc, /* special_function */
+ "R_860_HIGH", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_860_HIGOT, /* 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_860_HIGOT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_860_HIGOTOFF, /* 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_860_HIGOTOFF", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+};
+
+static unsigned char elf_code_to_howto_index[R_860_max + 1];
+
+static reloc_howto_type *
+lookup_howto (rtype)
+ unsigned int rtype;
+{
+ static int initialized = 0;
+ int i;
+ int howto_tbl_size = (int) (sizeof (elf32_i860_howto_table)
+ / sizeof (elf32_i860_howto_table[0]));
+
+ if (! initialized)
+ {
+ initialized = 1;
+ memset (elf_code_to_howto_index, 0xff,
+ sizeof (elf_code_to_howto_index));
+ for (i = 0; i < howto_tbl_size; i++)
+ elf_code_to_howto_index[elf32_i860_howto_table[i].type] = i;
+ }
+
+ BFD_ASSERT (rtype <= R_860_max);
+ i = elf_code_to_howto_index[rtype];
+ if (i >= howto_tbl_size)
+ return 0;
+ return elf32_i860_howto_table + i;
+}
+
+/* Given a BFD reloc, return the matching HOWTO structure. */
+static reloc_howto_type *
+elf32_i860_reloc_type_lookup (abfd, code)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ unsigned int rtype;
+
+ switch (code)
+ {
+ case BFD_RELOC_NONE:
+ rtype = R_860_NONE;
+ break;
+ case BFD_RELOC_32:
+ rtype = R_860_32;
+ break;
+ case BFD_RELOC_860_COPY:
+ rtype = R_860_COPY;
+ break;
+ case BFD_RELOC_860_GLOB_DAT:
+ rtype = R_860_GLOB_DAT;
+ break;
+ case BFD_RELOC_860_JUMP_SLOT:
+ rtype = R_860_JUMP_SLOT;
+ break;
+ case BFD_RELOC_860_RELATIVE:
+ rtype = R_860_RELATIVE;
+ break;
+ case BFD_RELOC_860_PC26:
+ rtype = R_860_PC26;
+ break;
+ case BFD_RELOC_860_PLT26:
+ rtype = R_860_PLT26;
+ break;
+ case BFD_RELOC_860_PC16:
+ rtype = R_860_PC16;
+ break;
+ case BFD_RELOC_860_LOW0:
+ rtype = R_860_LOW0;
+ break;
+ case BFD_RELOC_860_SPLIT0:
+ rtype = R_860_SPLIT0;
+ break;
+ case BFD_RELOC_860_LOW1:
+ rtype = R_860_LOW1;
+ break;
+ case BFD_RELOC_860_SPLIT1:
+ rtype = R_860_SPLIT1;
+ break;
+ case BFD_RELOC_860_LOW2:
+ rtype = R_860_LOW2;
+ break;
+ case BFD_RELOC_860_SPLIT2:
+ rtype = R_860_SPLIT2;
+ break;
+ case BFD_RELOC_860_LOW3:
+ rtype = R_860_LOW3;
+ break;
+ case BFD_RELOC_860_LOGOT0:
+ rtype = R_860_LOGOT0;
+ break;
+ case BFD_RELOC_860_SPGOT0:
+ rtype = R_860_SPGOT0;
+ break;
+ case BFD_RELOC_860_LOGOT1:
+ rtype = R_860_LOGOT1;
+ break;
+ case BFD_RELOC_860_SPGOT1:
+ rtype = R_860_SPGOT1;
+ break;
+ case BFD_RELOC_860_LOGOTOFF0:
+ rtype = R_860_LOGOTOFF0;
+ break;
+ case BFD_RELOC_860_SPGOTOFF0:
+ rtype = R_860_SPGOTOFF0;
+ break;
+ case BFD_RELOC_860_LOGOTOFF1:
+ rtype = R_860_LOGOTOFF1;
+ break;
+ case BFD_RELOC_860_SPGOTOFF1:
+ rtype = R_860_SPGOTOFF1;
+ break;
+ case BFD_RELOC_860_LOGOTOFF2:
+ rtype = R_860_LOGOTOFF2;
+ break;
+ case BFD_RELOC_860_LOGOTOFF3:
+ rtype = R_860_LOGOTOFF3;
+ break;
+ case BFD_RELOC_860_LOPC:
+ rtype = R_860_LOPC;
+ break;
+ case BFD_RELOC_860_HIGHADJ:
+ rtype = R_860_HIGHADJ;
+ break;
+ case BFD_RELOC_860_HAGOT:
+ rtype = R_860_HAGOT;
+ break;
+ case BFD_RELOC_860_HAGOTOFF:
+ rtype = R_860_HAGOTOFF;
+ break;
+ case BFD_RELOC_860_HAPC:
+ rtype = R_860_HAPC;
+ break;
+ case BFD_RELOC_860_HIGH:
+ rtype = R_860_HIGH;
+ break;
+ case BFD_RELOC_860_HIGOT:
+ rtype = R_860_HIGOT;
+ break;
+ case BFD_RELOC_860_HIGOTOFF:
+ rtype = R_860_HIGOTOFF;
+ break;
+ default:
+ rtype = 0;
+ break;
+ }
+ return lookup_howto (rtype);
+}
+
+/* Given a ELF reloc, return the matching HOWTO structure. */
+static void
+elf32_i860_info_to_howto_rela (abfd, bfd_reloc, elf_reloc)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *bfd_reloc;
+ Elf64_Internal_Rela *elf_reloc;
+{
+ bfd_reloc->howto = lookup_howto (ELF32_R_TYPE (elf_reloc->r_info));
+}
+
+/* Specialized relocation handler for R_860_SPLITn. These relocations
+ involves a 16-bit field that is split into two contiguous parts. */
+static bfd_reloc_status_type
+elf32_i860_relocate_splitn (input_bfd, rello, contents, value)
+ bfd *input_bfd;
+ Elf_Internal_Rela *rello;
+ bfd_byte *contents;
+ bfd_vma value;
+{
+ bfd_vma insn;
+ reloc_howto_type *howto;
+ howto = lookup_howto (ELF32_R_TYPE (rello->r_info));
+ insn = bfd_get_32 (input_bfd, contents + rello->r_offset);
+
+ /* Relocate. */
+ value += rello->r_addend;
+
+ /* Separate the fields and insert. */
+ value = (((value & 0xf8) << 5) | (value & 0x7ff)) & howto->dst_mask;
+ insn = (insn & ~howto->dst_mask) | value;
+
+ bfd_put_32 (input_bfd, insn, contents + rello->r_offset);
+ return bfd_reloc_ok;
+}
+
+/* Specialized relocation handler for R_860_PC16. This relocation
+ involves a 16-bit, PC-relative field that is split into two contiguous
+ parts. */
+static bfd_reloc_status_type
+elf32_i860_relocate_pc16 (input_bfd, input_section, rello, contents, value)
+ bfd *input_bfd;
+ asection *input_section;
+ Elf_Internal_Rela *rello;
+ bfd_byte *contents;
+ bfd_vma value;
+{
+ bfd_vma insn;
+ reloc_howto_type *howto;
+ howto = lookup_howto (ELF32_R_TYPE (rello->r_info));
+ insn = bfd_get_32 (input_bfd, contents + rello->r_offset);
+
+ /* Adjust for PC-relative relocation. */
+ value -= (input_section->output_section->vma
+ + input_section->output_offset);
+ value -= rello->r_offset;
+
+ /* Relocate. */
+ value += rello->r_addend;
+
+ /* Separate the fields and insert. */
+ value = (((value & 0xf8) << 5) | (value & 0x7ff)) & howto->dst_mask;
+ insn = (insn & ~howto->dst_mask) | value;
+
+ bfd_put_32 (input_bfd, insn, contents + rello->r_offset);
+ return bfd_reloc_ok;
+
+}
+
+/* Specialized relocation handler for R_860_PC26. This relocation
+ involves a 26-bit, PC-relative field which must be adjusted by 4. */
+static bfd_reloc_status_type
+elf32_i860_relocate_pc26 (input_bfd, input_section, rello, contents, value)
+ bfd *input_bfd;
+ asection *input_section;
+ Elf_Internal_Rela *rello;
+ bfd_byte *contents;
+ bfd_vma value;
+{
+ bfd_vma insn;
+ reloc_howto_type *howto;
+ howto = lookup_howto (ELF32_R_TYPE (rello->r_info));
+ insn = bfd_get_32 (input_bfd, contents + rello->r_offset);
+
+ /* Adjust for PC-relative relocation. */
+ value -= (input_section->output_section->vma
+ + input_section->output_offset);
+ value -= rello->r_offset;
+
+ /* Relocate. */
+ value += rello->r_addend;
+
+ /* Adjust value by 4 and insert the field. */
+ value = ((value - 4) >> howto->rightshift) & howto->dst_mask;
+ insn = (insn & ~howto->dst_mask) | value;
+
+ bfd_put_32 (input_bfd, insn, contents + rello->r_offset);
+ return bfd_reloc_ok;
+
+}
+
+/* Specialized relocation handler for R_860_HIGHADJ. */
+static bfd_reloc_status_type
+elf32_i860_relocate_highadj (input_bfd, rel, contents, value)
+ bfd *input_bfd;
+ Elf_Internal_Rela *rel;
+ bfd_byte *contents;
+ bfd_vma value;
+{
+ bfd_vma insn;
+
+ insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+
+ value += ((rel->r_addend & 0x8000) << 1);
+ value += rel->r_addend;
+ value = ((value >> 16) & 0xffff);
+
+ insn = (insn & 0xffff0000) | value;
+
+ bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
+ return bfd_reloc_ok;
+}
+
+/* Perform a single relocation. By default we use the standard BFD
+ routines. However, we handle some specially. */
+static bfd_reloc_status_type
+i860_final_link_relocate (howto, input_bfd, input_section, contents, rel, relocation)
+ reloc_howto_type * howto;
+ bfd * input_bfd;
+ asection * input_section;
+ bfd_byte * contents;
+ Elf_Internal_Rela * rel;
+ bfd_vma relocation;
+{
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, relocation,
+ rel->r_addend);
+}
+
+/* Relocate an i860 ELF section.
+
+ This is boiler-plate code copied from fr30.
+ There is some attempt to make this function usable for many architectures,
+ both USE_REL and USE_RELA ['twould be nice if such a critter existed],
+ if only to serve as a learning tool.
+
+ The RELOCATE_SECTION function is called by the new ELF backend linker
+ to handle the relocations for a section.
+
+ The relocs are always passed as Rela structures; if the section
+ actually uses Rel structures, the r_addend field will always be
+ zero.
+
+ This function is responsible for adjusting the section contents as
+ necessary, and (if using Rela relocs and generating a relocateable
+ output file) adjusting the reloc addend as necessary.
+
+ This function does not have to worry about setting the reloc
+ address or the reloc symbol index.
+
+ LOCAL_SYMS is a pointer to the swapped in local symbols.
+
+ LOCAL_SECTIONS is an array giving the section in the input file
+ corresponding to the st_shndx field of each local symbol.
+
+ The global hash table entry for the global symbols can be found
+ via elf_sym_hashes (input_bfd).
+
+ When generating relocateable output, this function must handle
+ STB_LOCAL/STT_SECTION symbols specially. The output symbol is
+ going to be the section symbol corresponding to the output
+ section, which means that the addend must be adjusted
+ accordingly. */
+static boolean
+elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd * output_bfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info * info;
+ bfd * input_bfd;
+ asection * input_section;
+ bfd_byte * contents;
+ Elf_Internal_Rela * relocs;
+ Elf_Internal_Sym * local_syms;
+ asection ** local_sections;
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ Elf_Internal_Rela * rel;
+ Elf_Internal_Rela * relend;
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ relend = relocs + input_section->reloc_count;
+
+ for (rel = relocs; rel < relend; rel ++)
+ {
+ reloc_howto_type * howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym * sym;
+ asection * sec;
+ struct elf_link_hash_entry * h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+ const char * name = NULL;
+ int r_type;
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+#if 0
+ if ( r_type == R_860_GNU_VTINHERIT
+ || r_type == R_860_GNU_VTENTRY)
+ continue;
+#endif
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+ if (info->relocateable)
+ {
+ /* This is a relocateable link. We don't have to change
+ anything, unless the reloc is against a section symbol,
+ in which case we have to adjust according to where the
+ section symbol winds up in the output section. */
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ sec = local_sections [r_symndx];
+ rel->r_addend += sec->output_offset + sym->st_value;
+ }
+ }
+
+ continue;
+ }
+
+ /* This is a final link. */
+ howto = lookup_howto (ELF32_R_TYPE (rel->r_info));
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections [r_symndx];
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+
+ name = bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name);
+ name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
+ }
+ 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;
+
+ name = h->root.root.string;
+
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.u.def.section;
+ relocation = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ {
+ relocation = 0;
+ }
+ else
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset, true)))
+ return false;
+ relocation = 0;
+ }
+ }
+
+ switch (r_type)
+ {
+ default:
+ r = i860_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel, relocation);
+ break;
+
+ case R_860_HIGHADJ:
+ r = elf32_i860_relocate_highadj (input_bfd, rel, contents,
+ relocation);
+ break;
+
+ case R_860_PC16:
+ r = elf32_i860_relocate_pc16 (input_bfd, input_section, rel,
+ contents, relocation);
+ break;
+
+ case R_860_PC26:
+ r = elf32_i860_relocate_pc26 (input_bfd, input_section, rel,
+ contents, relocation);
+ break;
+
+ case R_860_SPLIT0:
+ case R_860_SPLIT1:
+ case R_860_SPLIT2:
+ r = elf32_i860_relocate_splitn (input_bfd, rel, contents,
+ relocation);
+ break;
+
+ /* We do not yet handle GOT/PLT/Dynamic relocations. */
+ case R_860_COPY:
+ case R_860_GLOB_DAT:
+ case R_860_JUMP_SLOT:
+ case R_860_RELATIVE:
+ case R_860_PLT26:
+ case R_860_LOGOT0:
+ case R_860_SPGOT0:
+ case R_860_LOGOT1:
+ case R_860_SPGOT1:
+ case R_860_LOGOTOFF0:
+ case R_860_SPGOTOFF0:
+ case R_860_LOGOTOFF1:
+ case R_860_SPGOTOFF1:
+ case R_860_LOGOTOFF2:
+ case R_860_LOGOTOFF3:
+ case R_860_LOPC:
+ case R_860_HAGOT:
+ case R_860_HAGOTOFF:
+ case R_860_HAPC:
+ case R_860_HIGOT:
+ case R_860_HIGOTOFF:
+ r = bfd_reloc_notsupported;
+ break;
+ }
+
+ if (r != bfd_reloc_ok)
+ {
+ const char * msg = (const char *) NULL;
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ r = info->callbacks->reloc_overflow
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset);
+ break;
+
+ case bfd_reloc_undefined:
+ r = info->callbacks->undefined_symbol
+ (info, name, input_bfd, input_section, rel->r_offset, true);
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _("internal error: out of range error");
+ break;
+
+ case bfd_reloc_notsupported:
+ msg = _("internal error: unsupported relocation error");
+ break;
+
+ case bfd_reloc_dangerous:
+ msg = _("internal error: dangerous relocation");
+ break;
+
+ default:
+ msg = _("internal error: unknown error");
+ break;
+ }
+
+ if (msg)
+ r = info->callbacks->warning
+ (info, msg, name, input_bfd, input_section, rel->r_offset);
+
+ if (! r)
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/* Return whether a symbol name implies a local label. SVR4/860 compilers
+ generate labels of the form ".ep.function_name" to denote the end of a
+ function prolog. These should be local.
+ ??? Do any other SVR4 compilers have this convention? If so, this should
+ be added to the generic routine. */
+static boolean
+elf32_i860_is_local_label_name (abfd, name)
+ bfd *abfd;
+ const char *name;
+{
+ if (name[0] == '.' && name[1] == 'e' && name[2] == 'p' && name[3] == '.')
+ return true;
-#define bfd_elf32_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
-#define elf_info_to_howto _bfd_elf_no_info_to_howto
+ return _bfd_elf_is_local_label_name (abfd, name);
+}
+
+#define TARGET_BIG_SYM bfd_elf32_i860_vec
+#define TARGET_BIG_NAME "elf32-i860"
+#define TARGET_LITTLE_SYM bfd_elf32_i860_little_vec
+#define TARGET_LITTLE_NAME "elf32-i860-little"
+#define ELF_ARCH bfd_arch_i860
+#define ELF_MACHINE_CODE EM_860
+#define ELF_MAXPAGESIZE 4096
-#define TARGET_BIG_SYM bfd_elf32_i860_vec
-#define TARGET_BIG_NAME "elf32-i860"
-#define ELF_ARCH bfd_arch_i860
-#define ELF_MACHINE_CODE EM_860
-#define ELF_MAXPAGESIZE 1 /* FIXME: This number is wrong, It should be the page size in bytes. */
+#define elf_info_to_howto_rel NULL
+#define elf_info_to_howto elf32_i860_info_to_howto_rela
+#define elf_backend_relocate_section elf32_i860_relocate_section
+#define bfd_elf32_bfd_reloc_type_lookup elf32_i860_reloc_type_lookup
+#define bfd_elf32_bfd_is_local_label_name elf32_i860_is_local_label_name
#include "elf32-target.h"
diff --git a/gnu/usr.bin/binutils/bfd/elf32-m68k.c b/gnu/usr.bin/binutils/bfd/elf32-m68k.c
index 3df26d2c7f9..a3df85d5b59 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-m68k.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-m68k.c
@@ -1,5 +1,6 @@
/* Motorola 68k series support for 32-bit ELF
- Copyright 1993, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -181,7 +182,6 @@ reloc_type_lookup (abfd, code)
/* end code generated by elf.el */
#define USE_RELA
-
/* Functions for the m68k ELF linker. */
@@ -224,11 +224,11 @@ static const bfd_byte elf_m68k_plt_entry[PLT_ENTRY_SIZE] =
/* Procedure linkage table entries for the cpu32 */
static const bfd_byte elf_cpu32_plt0_entry[PLT_CPU32_ENTRY_SIZE] =
{
- 0x22, 0x7b, 0x01, 0x70, /* moveal %pc@(0xc), %a1 */
+ 0x2f, 0x3b, 0x01, 0x70, /* move.l (%pc,addr),-(%sp) */
0, 0, 0, 0, /* replaced with offset to .got + 4. */
+ 0x22, 0x7b, 0x01, 0x70, /* moveal %pc@(0xc), %a1 */
+ 0, 0, 0, 0, /* replace with offset to .got +8. */
0x4e, 0xd1, /* jmp %a1@ */
- 0, 0, 0, 0, /* replace with offset to .got +8. */
- 0, 0, 0, 0, /* pad out to 24 bytes. */
0, 0, 0, 0, /* pad out to 24 bytes. */
0, 0
};
@@ -376,12 +376,12 @@ elf32_m68k_copy_private_bfd_data (ibfd, obfd)
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;
-
+
elf_elfheader (obfd)->e_flags = in_flags;
elf_flags_init (obfd) = true;
-
+
return true;
}
@@ -847,19 +847,19 @@ elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
unsigned long r_symndx;
struct elf_link_hash_entry *h;
bfd *dynobj;
- asection *sgot = NULL;
- asection *srelgot = NULL;
+ asection *sgot;
+ asection *srelgot;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
local_got_refcounts = elf_local_got_refcounts (abfd);
dynobj = elf_hash_table (info)->dynobj;
- if (dynobj)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- }
+ if (dynobj == NULL)
+ return true;
+
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; rel++)
@@ -887,7 +887,7 @@ elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
}
}
}
- else
+ else if (local_got_refcounts != NULL)
{
if (local_got_refcounts[r_symndx] > 0)
{
@@ -932,7 +932,6 @@ elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
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
@@ -1267,7 +1266,12 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ /* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
+ Unused entries should be reclaimed before the section's contents
+ are written out, but at the moment this does not happen. Thus in
+ order to prevent writing out garbage, we initialise the section's
+ contents to zero. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
return false;
}
@@ -1307,6 +1311,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
{
if (!bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
@@ -1319,7 +1324,6 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
in regular objects. We allocated space for them in the check_relocs
routine, but we won't fill them in in the relocate_section routine. */
-/*ARGSUSED*/
static boolean
elf_m68k_discard_copies (h, ignore)
struct elf_m68k_link_hash_entry *h;
@@ -1459,7 +1463,14 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
&& ((! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
- && (input_section->flags & SEC_ALLOC) != 0
+ && ((input_section->flags & SEC_ALLOC) != 0
+ /* DWARF will emit R_68K_32 relocations in its
+ sections against symbols defined externally
+ in shared libraries. We can't do anything
+ with them here. */
+ || ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
&& (r_type == R_68K_8
|| r_type == R_68K_16
|| r_type == R_68K_32
@@ -2133,7 +2144,7 @@ elf_m68k_finish_dynamic_sections (output_bfd, info)
+ sgot->output_offset + 8
- (splt->output_section->vma + 10)),
splt->contents + 12);
- elf_section_data (splt->output_section)->this_hdr.sh_entsize
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize
= PLT_ENTRY_SIZE;
}
else /* cpu32 */
@@ -2148,8 +2159,8 @@ elf_m68k_finish_dynamic_sections (output_bfd, info)
(sgot->output_section->vma
+ sgot->output_offset + 8
- (splt->output_section->vma + 10)),
- splt->contents + 10);
- elf_section_data (splt->output_section)->this_hdr.sh_entsize
+ splt->contents + 12);
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize
= PLT_CPU32_ENTRY_SIZE;
}
}
@@ -2173,6 +2184,144 @@ elf_m68k_finish_dynamic_sections (output_bfd, info)
return true;
}
+/* Given a .data section and a .emreloc in-memory section, store
+ relocation information into the .emreloc 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. */
+
+boolean
+bfd_m68k_elf32_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *datasec;
+ asection *relsec;
+ char **errmsg;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf32_External_Sym *extsyms;
+ Elf32_External_Sym *free_extsyms = NULL;
+ Elf_Internal_Rela *internal_relocs;
+ Elf_Internal_Rela *free_relocs = NULL;
+ Elf_Internal_Rela *irel, *irelend;
+ bfd_byte *p;
+
+ BFD_ASSERT (! info->relocateable);
+
+ *errmsg = NULL;
+
+ if (datasec->reloc_count == 0)
+ return true;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ /* Read this BFD's symbols if we haven't done so already, or get the cached
+ copy if it exists. */
+ if (symtab_hdr->contents != NULL)
+ extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
+ else
+ {
+ /* Go get them off disk. */
+ if (info->keep_memory)
+ extsyms = ((Elf32_External_Sym *)
+ bfd_alloc (abfd, symtab_hdr->sh_size));
+ else
+ extsyms = ((Elf32_External_Sym *)
+ bfd_malloc (symtab_hdr->sh_size));
+ if (extsyms == NULL)
+ goto error_return;
+ if (! info->keep_memory)
+ free_extsyms = extsyms;
+ if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
+ || (bfd_read (extsyms, 1, symtab_hdr->sh_size, abfd)
+ != symtab_hdr->sh_size))
+ goto error_return;
+ if (info->keep_memory)
+ symtab_hdr->contents = extsyms;
+ }
+
+ /* Get a copy of the native relocations. */
+ internal_relocs = (_bfd_elf32_link_read_relocs
+ (abfd, datasec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ info->keep_memory));
+ if (internal_relocs == NULL)
+ goto error_return;
+ if (! info->keep_memory)
+ free_relocs = internal_relocs;
+
+ relsec->contents = (bfd_byte *) 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_68K_32)
+ {
+ *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. */
+ bfd_elf32_swap_symbol_in (abfd,
+ extsyms + ELF32_R_SYM (irel->r_info),
+ &isym);
+
+ 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) - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ targetsec = h->root.u.def.section;
+ else
+ targetsec = NULL;
+ }
+
+ bfd_put_32 (abfd, irel->r_offset + datasec->output_offset, p);
+ memset (p + 4, 0, 8);
+ if (targetsec != NULL)
+ strncpy (p + 4, targetsec->output_section->name, 8);
+ }
+
+ if (free_extsyms != NULL)
+ free (free_extsyms);
+ if (free_relocs != NULL)
+ free (free_relocs);
+ return true;
+
+error_return:
+ if (free_extsyms != NULL)
+ free (free_extsyms);
+ if (free_relocs != NULL)
+ free (free_relocs);
+ return false;
+}
+
#define TARGET_BIG_SYM bfd_elf32_m68k_vec
#define TARGET_BIG_NAME "elf32-m68k"
#define ELF_MACHINE_CODE EM_68K
diff --git a/gnu/usr.bin/binutils/bfd/elf32-m88k.c b/gnu/usr.bin/binutils/bfd/elf32-m88k.c
index 20de22a6d53..83d7a758e62 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-m88k.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-m88k.c
@@ -1,5 +1,5 @@
/* Motorola 88k-specific support for 32-bit ELF
- Copyright 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/elf32-mips.c b/gnu/usr.bin/binutils/bfd/elf32-mips.c
index e7e1c2a7ab2..bc3a353abda 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-mips.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-mips.c
@@ -1,10 +1,13 @@
/* MIPS-specific support for 32-bit ELF
- Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
N32/64 ABI support added by Mark Mitchell, CodeSourcery, LLC.
<mark@codesourcery.com>
+ Traditional MIPS targets support added by Koundinya.K, Dansk Data
+ Elektronik & Operations Research Group. <kk@ddeorg.soft.net>
This file is part of BFD, the Binary File Descriptor library.
@@ -40,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/internal.h"
#include "coff/ecoff.h"
#include "coff/mips.h"
-#define ECOFF_32
+#define ECOFF_SIGNED_32
#include "ecoffswap.h"
/* This structure is used to hold .got information when linking. It
@@ -70,13 +73,19 @@ struct mips_elf_link_hash_entry
EXTR esym;
/* Number of R_MIPS_32, R_MIPS_REL32, or R_MIPS_64 relocs against
- this symbol. */
+ this symbol. */
unsigned int possibly_dynamic_relocs;
/* The index of the first dynamic relocation (in the .rel.dyn
section) against this symbol. */
unsigned int min_dyn_reloc_index;
+ /* We must not create a stub for a symbol that has relocations
+ related to taking the function's address, i.e. any but
+ R_MIPS_CALL*16 ones -- see "MIPS ABI Supplement, 3rd Edition",
+ p. 4-20. */
+ boolean no_fn_stub;
+
/* If there is a stub that 32 bit functions should use to call this
16 bit function, this points to the section containing the stub. */
asection *fn_stub;
@@ -109,7 +118,7 @@ static void bfd_mips_elf32_swap_gptab_in
static void bfd_mips_elf32_swap_gptab_out
PARAMS ((bfd *, const Elf32_gptab *, Elf32_External_gptab *));
#if 0
-static void bfd_mips_elf_swap_msym_in
+static void bfd_mips_elf_swap_msym_in
PARAMS ((bfd *, const Elf32_External_Msym *, Elf32_Internal_Msym *));
#endif
static void bfd_mips_elf_swap_msym_out
@@ -139,9 +148,9 @@ static bfd_reloc_status_type mips_elf_final_gp
static bfd_byte *elf32_mips_get_relocated_section_contents
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, boolean, asymbol **));
-static asection *mips_elf_create_msym_section
+static asection *mips_elf_create_msym_section
PARAMS ((bfd *));
-static void mips_elf_irix6_finish_dynamic_symbol
+static void mips_elf_irix6_finish_dynamic_symbol
PARAMS ((bfd *, const char *, Elf_Internal_Sym *));
static bfd_vma mips_elf_sign_extend PARAMS ((bfd_vma, int));
static boolean mips_elf_overflow_p PARAMS ((bfd_vma, int));
@@ -154,13 +163,13 @@ static bfd_vma mips_elf_local_got_index
PARAMS ((bfd *, struct bfd_link_info *, bfd_vma));
static bfd_vma mips_elf_got_offset_from_index
PARAMS ((bfd *, bfd *, bfd_vma));
-static boolean mips_elf_record_global_got_symbol
+static boolean mips_elf_record_global_got_symbol
PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *,
struct mips_got_info *));
static bfd_vma mips_elf_got_page
PARAMS ((bfd *, struct bfd_link_info *, bfd_vma, bfd_vma *));
static const Elf_Internal_Rela *mips_elf_next_relocation
- PARAMS ((unsigned int, const Elf_Internal_Rela *,
+ PARAMS ((unsigned int, const Elf_Internal_Rela *,
const Elf_Internal_Rela *));
static bfd_reloc_status_type mips_elf_calculate_relocation
PARAMS ((bfd *, bfd *, asection *, struct bfd_link_info *,
@@ -170,31 +179,40 @@ static bfd_reloc_status_type mips_elf_calculate_relocation
static bfd_vma mips_elf_obtain_contents
PARAMS ((reloc_howto_type *, const Elf_Internal_Rela *, bfd *, bfd_byte *));
static boolean mips_elf_perform_relocation
- PARAMS ((struct bfd_link_info *, reloc_howto_type *,
+ PARAMS ((struct bfd_link_info *, reloc_howto_type *,
const Elf_Internal_Rela *, bfd_vma,
bfd *, asection *, bfd_byte *, boolean));
static boolean mips_elf_assign_gp PARAMS ((bfd *, bfd_vma *));
-static boolean mips_elf_sort_hash_table_f
+static boolean mips_elf_sort_hash_table_f
PARAMS ((struct mips_elf_link_hash_entry *, PTR));
-static boolean mips_elf_sort_hash_table
+static boolean mips_elf_sort_hash_table
PARAMS ((struct bfd_link_info *, unsigned long));
static asection * mips_elf_got_section PARAMS ((bfd *));
-static struct mips_got_info *mips_elf_got_info
+static struct mips_got_info *mips_elf_got_info
PARAMS ((bfd *, asection **));
static boolean mips_elf_local_relocation_p
- PARAMS ((bfd *, const Elf_Internal_Rela *, asection **));
-static bfd_vma mips_elf_create_local_got_entry
+ PARAMS ((bfd *, const Elf_Internal_Rela *, asection **, boolean));
+static bfd_vma mips_elf_create_local_got_entry
PARAMS ((bfd *, struct mips_got_info *, asection *, bfd_vma));
-static bfd_vma mips_elf_got16_entry
- PARAMS ((bfd *, struct bfd_link_info *, bfd_vma));
-static boolean mips_elf_create_dynamic_relocation
+static bfd_vma mips_elf_got16_entry
+ PARAMS ((bfd *, struct bfd_link_info *, bfd_vma, boolean));
+static boolean mips_elf_create_dynamic_relocation
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Rela *,
struct mips_elf_link_hash_entry *, asection *,
bfd_vma, bfd_vma *, asection *));
-static void mips_elf_allocate_dynamic_relocations
+static void mips_elf_allocate_dynamic_relocations
PARAMS ((bfd *, unsigned int));
-static boolean mips_elf_stub_section_p
+static boolean mips_elf_stub_section_p
PARAMS ((bfd *, asection *));
+static int sort_dynamic_relocs
+ PARAMS ((const void *, const void *));
+
+extern const bfd_target bfd_elf32_tradbigmips_vec;
+extern const bfd_target bfd_elf32_tradlittlemips_vec;
+#ifdef BFD64
+extern const bfd_target bfd_elf64_tradbigmips_vec;
+extern const bfd_target bfd_elf64_tradlittlemips_vec;
+#endif
/* The level of IRIX compatibility we're striving for. */
@@ -204,25 +222,35 @@ typedef enum {
ict_irix6
} irix_compat_t;
+/* This will be used when we sort the dynamic relocation records. */
+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)
-/* Nonzero if ABFD is using the 64-bit ABI. FIXME: This is never
- true, yet. */
+/* Nonzero if ABFD is using the 64-bit ABI. */
#define ABI_64_P(abfd) \
((elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64) != 0)
-/* What version of Irix we are trying to be compatible with. FIXME:
- At the moment, we never generate "normal" MIPS ELF ABI executables;
- we always use some version of Irix. */
-
+/* Depending on the target vector we generate some version of Irix
+ executables or "normal" MIPS ELF ABI executables. */
+#ifdef BFD64
#define IRIX_COMPAT(abfd) \
- ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5)
+ (((abfd->xvec == &bfd_elf64_tradbigmips_vec) || \
+ (abfd->xvec == &bfd_elf64_tradlittlemips_vec) || \
+ (abfd->xvec == &bfd_elf32_tradbigmips_vec) || \
+ (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \
+ ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5))
+#else
+#define IRIX_COMPAT(abfd) \
+ (((abfd->xvec == &bfd_elf32_tradbigmips_vec) || \
+ (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \
+ ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5))
+#endif
/* Whether we are trying to be compatible with IRIX at all. */
-
#define SGI_COMPAT(abfd) \
(IRIX_COMPAT (abfd) != ict_none)
@@ -297,10 +325,12 @@ typedef enum {
? (ABI_64_P (abfd) \
? 0xdf998010 /* ld t9,0x8010(gp) */ \
: 0x8f998010) /* lw t9,0x8010(gp) */ \
- : 0x8f998000) /* lw t9,0x8000(gp) */
-#define STUB_MOVE 0x03e07825 /* move t7,ra */
-#define STUB_JALR 0x0320f809 /* jal t9 */
-#define STUB_LI16 0x34180000 /* ori t8,zero,0 */
+ : 0x8f998010) /* lw t9,0x8000(gp) */
+#define STUB_MOVE(abfd) \
+ (SGI_COMPAT (abfd) ? 0x03e07825 : 0x03e07821) /* move t7,ra */
+#define STUB_JALR 0x0320f809 /* jal t9 */
+#define STUB_LI16(abfd) \
+ (SGI_COMPAT (abfd) ? 0x34180000 : 0x24180000) /* ori t8,zero,0 */
#define MIPS_FUNCTION_STUB_SIZE (16)
#if 0
@@ -370,7 +400,7 @@ typedef struct
typedef struct
{
unsigned int ctype : 1; /* 1: long 0: short format. See below. */
- unsigned int rtype : 4; /* Relocation types. See below. */
+ unsigned int rtype : 4; /* Relocation types. See below. */
unsigned int dist2to : 8;
unsigned int relvaddr : 19; /* (VADDR - vaddr of the previous entry)/ 4 */
unsigned long konst; /* KONST field. See below. */
@@ -380,7 +410,7 @@ typedef struct
typedef struct
{
unsigned int ctype : 1; /* 1: long 0: short format. See below. */
- unsigned int rtype : 4; /* Relocation types. See below. */
+ unsigned int rtype : 4; /* Relocation types. See below. */
unsigned int dist2to : 8;
unsigned int relvaddr : 19; /* (VADDR - vaddr of the previous entry)/ 4 */
unsigned long konst; /* KONST field. See below. */
@@ -509,7 +539,7 @@ static reloc_howto_type elf_mips_howto_table[] =
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
- /* 26 bit branch address. */
+ /* 26 bit jump address. */
HOWTO (R_MIPS_26, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -519,7 +549,7 @@ static reloc_howto_type elf_mips_howto_table[] =
complain_overflow_dont, /* complain_on_overflow */
/* This needs complex overflow
detection, because the upper four
- bits must match the PC. */
+ bits must match the PC + 4. */
bfd_elf_generic_reloc, /* special_function */
"R_MIPS_26", /* name */
true, /* partial_inplace */
@@ -875,7 +905,7 @@ static reloc_howto_type elf_mips_howto_table[] =
EMPTY_HOWTO (R_MIPS_PJUMP),
EMPTY_HOWTO (R_MIPS_RELGOT),
- /* Protected jump conversion. This is an optimization hint. No
+ /* Protected jump conversion. This is an optimization hint. No
relocation is required for correctness. */
HOWTO (R_MIPS_JALR, /* type */
0, /* rightshift */
@@ -944,7 +974,6 @@ static reloc_howto_type elf_mips16_gprel_howto =
0x07ff001f, /* dst_mask */
false); /* pcrel_offset */
-
/* GNU extensions for embedded-pic. */
/* High 16 bits of symbol value, pc-relative. */
static reloc_howto_type elf_mips_gnu_rel_hi16 =
@@ -1221,7 +1250,7 @@ _bfd_mips_elf_lo16_reloc (abfd,
if ((val & 0x8000) != 0)
val += 0x10000;
- insn = (insn &~ 0xffff) | ((val >> 16) & 0xffff);
+ insn = (insn & ~0xffff) | ((val >> 16) & 0xffff);
bfd_put_32 (abfd, insn, l->addr);
if (strcmp (bfd_asymbol_name (symbol), "_gp_disp") == 0)
@@ -1513,14 +1542,14 @@ gprel16_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
- insn = (insn &~ 0xffff) | (val & 0xffff);
+ insn = (insn & ~0xffff) | (val & 0xffff);
bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
if (relocateable)
reloc_entry->address += input_section->output_offset;
/* Make sure it fit in 16 bits. */
- if (val >= 0x8000 && val < 0xffff8000)
+ if ((long) val >= 0x8000 || (long) val < -0x8000)
return bfd_reloc_overflow;
return bfd_reloc_ok;
@@ -1638,7 +1667,7 @@ gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
}
/* Handle a 64 bit reloc in a 32 bit MIPS ELF file. These are
- generated when addreses are 64 bits. The upper 32 bits are a simle
+ generated when addresses are 64 bits. The upper 32 bits are a simple
sign extension. */
static bfd_reloc_status_type
@@ -1811,6 +1840,12 @@ elf_mips_isa (flags)
return 3;
case E_MIPS_ARCH_4:
return 4;
+ case E_MIPS_ARCH_5:
+ return 5;
+ case E_MIPS_ARCH_32:
+ return 32;
+ case E_MIPS_ARCH_64:
+ return 64;
}
return 4;
}
@@ -1838,6 +1873,12 @@ elf_mips_mach (flags)
case E_MIPS_MACH_4650:
return bfd_mach_mips4650;
+ case E_MIPS_MACH_MIPS32_4K:
+ return bfd_mach_mips32_4k;
+
+ case E_MIPS_MACH_SB1:
+ return bfd_mach_mips_sb1;
+
default:
switch (flags & EF_MIPS_ARCH)
{
@@ -1857,15 +1898,27 @@ elf_mips_mach (flags)
case E_MIPS_ARCH_4:
return bfd_mach_mips8000;
break;
+
+ case E_MIPS_ARCH_5:
+ return bfd_mach_mips5;
+ break;
+
+ case E_MIPS_ARCH_32:
+ return bfd_mach_mips32;
+ break;
+
+ case E_MIPS_ARCH_64:
+ return bfd_mach_mips64;
+ break;
}
}
return 0;
}
-/* Return printable name for ABI. */
+/* Return printable name for ABI. */
-static INLINE char*
+static INLINE char *
elf_mips_abi_name (abfd)
bfd *abfd;
{
@@ -1875,7 +1928,7 @@ elf_mips_abi_name (abfd)
return "N32";
else if (ABI_64_P (abfd))
return "64";
-
+
flags = elf_elfheader (abfd)->e_flags;
switch (flags & EF_MIPS_ABI)
{
@@ -2248,7 +2301,6 @@ bfd_mips_elf_swap_msym_out (abfd, in, ex)
bfd_h_put_32 (abfd, in->ms_hash_value, ex->ms_hash_value);
bfd_h_put_32 (abfd, in->ms_info, ex->ms_info);
}
-
/* Determine whether a symbol is global for the purposes of splitting
the symbol table into global symbols and local symbols. At least
@@ -2256,13 +2308,17 @@ bfd_mips_elf_swap_msym_out (abfd, in, ex)
symbols. On most ELF targets the split is between static symbols
and externally visible symbols. */
-/*ARGSUSED*/
static boolean
mips_elf_sym_is_global (abfd, sym)
bfd *abfd ATTRIBUTE_UNUSED;
asymbol *sym;
{
- return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false;
+ if (SGI_COMPAT(abfd))
+ return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false;
+ else
+ return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
+ || bfd_is_und_section (bfd_get_section (sym))
+ || bfd_is_com_section (bfd_get_section (sym)));
}
/* Set the right machine number for a MIPS ELF file. This is used for
@@ -2286,7 +2342,6 @@ _bfd_mips_elf_object_p (abfd)
file. This gets the MIPS architecture right based on the machine
number. This is used by both the 32-bit and the 64-bit ABI. */
-/*ARGSUSED*/
void
_bfd_mips_elf_final_write_processing (abfd, linker)
bfd *abfd;
@@ -2335,11 +2390,33 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
break;
case bfd_mach_mips8000:
+ case bfd_mach_mips10000:
+ case bfd_mach_mips12000:
val = E_MIPS_ARCH_4;
break;
+
+ case bfd_mach_mips32:
+ val = E_MIPS_ARCH_32;
+ break;
+
+ case bfd_mach_mips32_4k:
+ val = E_MIPS_ARCH_32 | E_MIPS_MACH_MIPS32_4K;
+ break;
+
+ case bfd_mach_mips5:
+ val = E_MIPS_ARCH_5;
+ break;
+
+ case bfd_mach_mips64:
+ val = E_MIPS_ARCH_64;
+ break;
+
+ case bfd_mach_mips_sb1:
+ val = E_MIPS_ARCH_64 | E_MIPS_MACH_SB1;
+ break;
}
- elf_elfheader (abfd)->e_flags &= ~ (EF_MIPS_ARCH | EF_MIPS_MACH);
+ elf_elfheader (abfd)->e_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
elf_elfheader (abfd)->e_flags |= val;
/* Set the sh_info field for .gptab sections and other appropriate
@@ -2411,7 +2488,7 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
}
}
-/* Function to keep MIPS specific file flags like as EF_MIPS_PIC. */
+/* Function to keep MIPS specific file flags like as EF_MIPS_PIC. */
boolean
_bfd_mips_elf_set_private_flags (abfd, flags)
@@ -2458,23 +2535,12 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
flagword old_flags;
flagword new_flags;
boolean ok;
+ boolean null_input_bfd = true;
+ asection *sec;
/* Check if we have the same endianess */
- if (ibfd->xvec->byteorder != obfd->xvec->byteorder
- && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
- {
- const char *msg;
-
- if (bfd_big_endian (ibfd))
- msg = _("%s: compiled for a big endian system and target is little endian");
- else
- msg = _("%s: compiled for a little endian system and target is big endian");
-
- (*_bfd_error_handler) (msg, bfd_get_filename (ibfd));
-
- bfd_set_error (bfd_error_wrong_format);
- return false;
- }
+ if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+ return false;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -2488,7 +2554,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
{
elf_flags_init (obfd) = true;
elf_elfheader (obfd)->e_flags = new_flags;
- elf_elfheader (obfd)->e_ident[EI_CLASS]
+ elf_elfheader (obfd)->e_ident[EI_CLASS]
= elf_elfheader (ibfd)->e_ident[EI_CLASS];
if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
@@ -2510,6 +2576,27 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
if (new_flags == old_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. */
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ /* Ignore synthetic sections and empty .text, .data and .bss sections
+ which are automatically generated by gas. */
+ if (strcmp (sec->name, ".reginfo")
+ && strcmp (sec->name, ".mdebug")
+ && ((!strcmp (sec->name, ".text")
+ || !strcmp (sec->name, ".data")
+ || !strcmp (sec->name, ".bss"))
+ && sec->_raw_size != 0))
+ {
+ null_input_bfd = false;
+ break;
+ }
+ }
+ if (null_input_bfd)
+ return true;
+
ok = true;
if ((new_flags & EF_MIPS_PIC) != (old_flags & EF_MIPS_PIC))
@@ -2532,7 +2619,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
ok = false;
}
- /* Compare the ISA's. */
+ /* Compare the ISA's. */
if ((new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH))
!= (old_flags & (EF_MIPS_ARCH | EF_MIPS_MACH)))
{
@@ -2542,19 +2629,18 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
int old_isa = elf_mips_isa (old_flags);
/* If either has no machine specified, just compare the general isa's.
- Some combinations of machines are ok, if the isa's match. */
- if (! new_mach
+ Some combinations of machines are ok, if the isa's match. */
+ if (! new_mach
|| ! old_mach
|| new_mach == old_mach
)
{
- /* Don't warn about mixing -mips1 and -mips2 code, or mixing -mips3
- and -mips4 code. They will normally use the same data sizes and
- calling conventions. */
+ /* Don't warn about mixing code using 32-bit ISAs, or mixing code
+ using 64-bit ISAs. They will normally use the same data sizes
+ and calling conventions. */
- if ((new_isa == 1 || new_isa == 2)
- ? (old_isa != 1 && old_isa != 2)
- : (old_isa == 1 || old_isa == 2))
+ if (( (new_isa == 1 || new_isa == 2 || new_isa == 32)
+ ^ (old_isa == 1 || old_isa == 2 || old_isa == 32)) != 0)
{
(*_bfd_error_handler)
(_("%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"),
@@ -2573,19 +2659,19 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
ok = false;
}
- new_flags &= ~ (EF_MIPS_ARCH | EF_MIPS_MACH);
- old_flags &= ~ (EF_MIPS_ARCH | EF_MIPS_MACH);
+ new_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
+ old_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
}
/* Compare ABI's. The 64-bit ABI does not use EF_MIPS_ABI. But, it
does set EI_CLASS differently from any 32-bit ABI. */
if ((new_flags & EF_MIPS_ABI) != (old_flags & EF_MIPS_ABI)
- || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
+ || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
!= elf_elfheader (obfd)->e_ident[EI_CLASS]))
{
- /* Only error if both are set (to different values). */
+ /* Only error if both are set (to different values). */
if (((new_flags & EF_MIPS_ABI) && (old_flags & EF_MIPS_ABI))
- || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
+ || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
!= elf_elfheader (obfd)->e_ident[EI_CLASS]))
{
(*_bfd_error_handler)
@@ -2631,40 +2717,46 @@ _bfd_mips_elf_print_private_bfd_data (abfd, ptr)
_bfd_elf_print_private_bfd_data (abfd, ptr);
/* xgettext:c-format */
- fprintf (file, _ ("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
+ fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_O32)
- fprintf (file, _ (" [abi=O32]"));
+ fprintf (file, _(" [abi=O32]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_O64)
- fprintf (file, _ (" [abi=O64]"));
+ fprintf (file, _(" [abi=O64]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI32)
- fprintf (file, _ (" [abi=EABI32]"));
+ fprintf (file, _(" [abi=EABI32]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI64)
- fprintf (file, _ (" [abi=EABI64]"));
+ fprintf (file, _(" [abi=EABI64]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI))
- fprintf (file, _ (" [abi unknown]"));
+ fprintf (file, _(" [abi unknown]"));
else if (ABI_N32_P (abfd))
- fprintf (file, _ (" [abi=N32]"));
+ fprintf (file, _(" [abi=N32]"));
else if (ABI_64_P (abfd))
- fprintf (file, _ (" [abi=64]"));
+ fprintf (file, _(" [abi=64]"));
else
- fprintf (file, _ (" [no abi set]"));
+ fprintf (file, _(" [no abi set]"));
if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_1)
- fprintf (file, _ (" [mips1]"));
+ fprintf (file, _(" [mips1]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_2)
- fprintf (file, _ (" [mips2]"));
+ fprintf (file, _(" [mips2]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_3)
- fprintf (file, _ (" [mips3]"));
+ fprintf (file, _(" [mips3]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4)
- fprintf (file, _ (" [mips4]"));
+ fprintf (file, _(" [mips4]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_5)
+ fprintf (file, _ (" [mips5]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32)
+ fprintf (file, _ (" [mips32]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64)
+ fprintf (file, _ (" [mips64]"));
else
- fprintf (file, _ (" [unknown ISA]"));
+ fprintf (file, _(" [unknown ISA]"));
if (elf_elfheader (abfd)->e_flags & EF_MIPS_32BITMODE)
- fprintf (file, _ (" [32bitmode]"));
+ fprintf (file, _(" [32bitmode]"));
else
- fprintf (file, _ (" [not 32bitmode]"));
+ fprintf (file, _(" [not 32bitmode]"));
fputc ('\n', file);
@@ -2884,17 +2976,23 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
hdr->sh_type = SHT_MIPS_REGINFO;
/* In a shared object on Irix 5.3, the .reginfo section has an
entsize of 0x18. FIXME: Does this matter? */
- if (SGI_COMPAT (abfd) && (abfd->flags & DYNAMIC) != 0)
- hdr->sh_entsize = sizeof (Elf32_External_RegInfo);
+ if (SGI_COMPAT (abfd))
+ {
+ if ((abfd->flags & DYNAMIC) != 0)
+ hdr->sh_entsize = sizeof (Elf32_External_RegInfo);
+ else
+ hdr->sh_entsize = 1;
+ }
else
- hdr->sh_entsize = 1;
+ hdr->sh_entsize = sizeof (Elf32_External_RegInfo);
}
else if (SGI_COMPAT (abfd)
&& (strcmp (name, ".hash") == 0
|| strcmp (name, ".dynamic") == 0
|| strcmp (name, ".dynstr") == 0))
{
- hdr->sh_entsize = 0;
+ if (SGI_COMPAT (abfd))
+ hdr->sh_entsize = 0;
#if 0
/* This isn't how the Irix 6 linker behaves. */
hdr->sh_info = SIZEOF_MIPS_DYNSYM_SECNAMES;
@@ -2956,7 +3054,7 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
esd = elf_section_data (sec);
BFD_ASSERT (esd->rel_hdr2 == NULL);
- esd->rel_hdr2
+ esd->rel_hdr2
= (Elf_Internal_Shdr *) bfd_zalloc (abfd, sizeof (Elf_Internal_Shdr));
if (!esd->rel_hdr2)
return false;
@@ -2976,7 +3074,7 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
boolean
_bfd_mips_elf_section_from_bfd_section (abfd, hdr, sec, retval)
bfd *abfd ATTRIBUTE_UNUSED;
- Elf32_Internal_Shdr *hdr ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED;
asection *sec;
int *retval;
{
@@ -3112,7 +3210,7 @@ _bfd_mips_elf_section_processing (abfd, hdr)
+ (l - contents)
+ sizeof (Elf_External_Options)
+ (sizeof (Elf32_External_RegInfo) - 4)),
- SEEK_SET) == -1)
+ SEEK_SET) == -1)
return false;
bfd_h_put_32 (abfd, elf_gp (abfd), buf);
if (bfd_write (buf, 1, 4, abfd) != 4)
@@ -3163,7 +3261,6 @@ _bfd_mips_elf_section_processing (abfd, hdr)
return true;
}
-
/* MIPS ELF uses two common sections. One is the usual one, and the
other is for small objects. All the small objects are kept
@@ -3181,18 +3278,6 @@ static asection mips_elf_acom_section;
static asymbol mips_elf_acom_symbol;
static asymbol *mips_elf_acom_symbol_ptr;
-/* The Irix 5 support uses two virtual sections, which represent
- text/data symbols defined in dynamic objects. */
-static asection mips_elf_text_section;
-static asection *mips_elf_text_section_ptr;
-static asymbol mips_elf_text_symbol;
-static asymbol *mips_elf_text_symbol_ptr;
-
-static asection mips_elf_data_section;
-static asection *mips_elf_data_section_ptr;
-static asymbol mips_elf_data_symbol;
-static asymbol *mips_elf_data_symbol_ptr;
-
/* Handle the special MIPS section numbers that a symbol may use.
This is used for both the 32-bit and the 64-bit ABI. */
@@ -3279,9 +3364,6 @@ _bfd_mips_elf_additional_program_headers (abfd)
asection *s;
int ret = 0;
- if (!SGI_COMPAT (abfd))
- return 0;
-
/* See if we need a PT_MIPS_REGINFO segment. */
s = bfd_get_section_by_name (abfd, ".reginfo");
if (s && (s->flags & SEC_LOAD))
@@ -3289,7 +3371,7 @@ _bfd_mips_elf_additional_program_headers (abfd)
/* See if we need a PT_MIPS_OPTIONS segment. */
if (IRIX_COMPAT (abfd) == ict_irix6
- && bfd_get_section_by_name (abfd,
+ && bfd_get_section_by_name (abfd,
MIPS_ELF_OPTIONS_SECTION_NAME (abfd)))
++ret;
@@ -3311,9 +3393,6 @@ _bfd_mips_elf_modify_segment_map (abfd)
asection *s;
struct elf_segment_map *m, **pm;
- if (! SGI_COMPAT (abfd))
- return true;
-
/* If there is a .reginfo section, we need a PT_MIPS_REGINFO
segment. */
s = bfd_get_section_by_name (abfd, ".reginfo");
@@ -3364,13 +3443,13 @@ _bfd_mips_elf_modify_segment_map (abfd)
there's not (like when running the `ld' testsuite). So,
if there's no program header table, we just put the
options segement at the end. */
- for (pm = &elf_tdata (abfd)->segment_map;
+ for (pm = &elf_tdata (abfd)->segment_map;
*pm != NULL;
pm = &(*pm)->next)
if ((*pm)->p_type == PT_PHDR)
break;
- options_segment = bfd_zalloc (abfd,
+ options_segment = bfd_zalloc (abfd,
sizeof (struct elf_segment_map));
options_segment->next = *pm;
options_segment->p_type = PT_MIPS_OPTIONS;
@@ -3383,61 +3462,77 @@ _bfd_mips_elf_modify_segment_map (abfd)
}
else
{
- /* If there are .dynamic and .mdebug sections, we make a room
- for the RTPROC header. FIXME: Rewrite without section names. */
- if (bfd_get_section_by_name (abfd, ".interp") == NULL
- && bfd_get_section_by_name (abfd, ".dynamic") != NULL
- && bfd_get_section_by_name (abfd, ".mdebug") != NULL)
+ if (IRIX_COMPAT (abfd) == ict_irix5)
{
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
- if (m->p_type == PT_MIPS_RTPROC)
- break;
- if (m == NULL)
+ /* If there are .dynamic and .mdebug sections, we make a room
+ for the RTPROC header. FIXME: Rewrite without section names. */
+ if (bfd_get_section_by_name (abfd, ".interp") == NULL
+ && bfd_get_section_by_name (abfd, ".dynamic") != NULL
+ && bfd_get_section_by_name (abfd, ".mdebug") != NULL)
{
- m = (struct elf_segment_map *) bfd_zalloc (abfd, sizeof *m);
+ for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ if (m->p_type == PT_MIPS_RTPROC)
+ break;
if (m == NULL)
- return false;
+ {
+ m = (struct elf_segment_map *) bfd_zalloc (abfd, sizeof *m);
+ if (m == NULL)
+ return false;
- m->p_type = PT_MIPS_RTPROC;
+ m->p_type = PT_MIPS_RTPROC;
- s = bfd_get_section_by_name (abfd, ".rtproc");
- if (s == NULL)
- {
- m->count = 0;
- m->p_flags = 0;
- m->p_flags_valid = 1;
- }
- else
- {
- m->count = 1;
- m->sections[0] = s;
- }
+ s = bfd_get_section_by_name (abfd, ".rtproc");
+ if (s == NULL)
+ {
+ m->count = 0;
+ m->p_flags = 0;
+ m->p_flags_valid = 1;
+ }
+ else
+ {
+ m->count = 1;
+ m->sections[0] = s;
+ }
- /* We want to put it after the DYNAMIC segment. */
- pm = &elf_tdata (abfd)->segment_map;
- while (*pm != NULL && (*pm)->p_type != PT_DYNAMIC)
- pm = &(*pm)->next;
- if (*pm != NULL)
- pm = &(*pm)->next;
+ /* We want to put it after the DYNAMIC segment. */
+ pm = &elf_tdata (abfd)->segment_map;
+ while (*pm != NULL && (*pm)->p_type != PT_DYNAMIC)
+ pm = &(*pm)->next;
+ if (*pm != NULL)
+ pm = &(*pm)->next;
- m->next = *pm;
- *pm = m;
+ m->next = *pm;
+ *pm = m;
+ }
}
}
-
/* On Irix 5, the PT_DYNAMIC segment includes the .dynamic,
.dynstr, .dynsym, and .hash sections, and everything in
between. */
- for (pm = &elf_tdata (abfd)->segment_map; *pm != NULL; pm = &(*pm)->next)
+ for (pm = &elf_tdata (abfd)->segment_map; *pm != NULL;
+ pm = &(*pm)->next)
if ((*pm)->p_type == PT_DYNAMIC)
break;
m = *pm;
+ if (IRIX_COMPAT (abfd) == ict_none)
+ {
+ /* For a normal mips executable the permissions for the PT_DYNAMIC
+ segment are read, write and execute. We do that here since
+ the code in elf.c sets only the read permission. This matters
+ sometimes for the dynamic linker. */
+ if (bfd_get_section_by_name (abfd, ".dynamic") != NULL)
+ {
+ m->p_flags = PF_R | PF_W | PF_X;
+ m->p_flags_valid = 1;
+ }
+ }
if (m != NULL
- && m->count == 1
- && strcmp (m->sections[0]->name, ".dynamic") == 0)
+ && m->count == 1 && strcmp (m->sections[0]->name, ".dynamic") == 0)
{
static const char *sec_names[] =
- { ".dynamic", ".dynstr", ".dynsym", ".hash" };
+ {
+ ".dynamic", ".dynstr", ".dynsym", ".hash"
+ };
bfd_vma low, high;
unsigned int i, c;
struct elf_segment_map *n;
@@ -3466,8 +3561,8 @@ _bfd_mips_elf_modify_segment_map (abfd)
if ((s->flags & SEC_LOAD) != 0
&& s->vma >= low
&& ((s->vma
- + (s->_cooked_size != 0 ? s->_cooked_size : s->_raw_size))
- <= high))
+ + (s->_cooked_size !=
+ 0 ? s->_cooked_size : s->_raw_size)) <= high))
++c;
n = ((struct elf_segment_map *)
@@ -3484,8 +3579,7 @@ _bfd_mips_elf_modify_segment_map (abfd)
&& s->vma >= low
&& ((s->vma
+ (s->_cooked_size != 0 ?
- s->_cooked_size : s->_raw_size))
- <= high))
+ s->_cooked_size : s->_raw_size)) <= high))
{
n->sections[i] = s;
++i;
@@ -3515,7 +3609,7 @@ typedef struct runtime_pdr {
long reserved;
struct exception_info *exception_info;/* pointer to exception array */
} RPDR, *pRPDR;
-#define cbRPDR sizeof(RPDR)
+#define cbRPDR sizeof (RPDR)
#define rpdNil ((pRPDR) 0)
/* Swap RPDR (runtime procedure table entry) for output. */
@@ -3560,7 +3654,7 @@ _bfd_mips_elf_read_ecoff_info (abfd, section, debug)
char *ext_hdr = NULL;
swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap;
- memset (debug, 0, sizeof(*debug));
+ memset (debug, 0, sizeof (*debug));
ext_hdr = (char *) bfd_malloc ((size_t) swap->external_hdr_size);
if (ext_hdr == NULL && swap->external_hdr_size != 0)
@@ -3639,7 +3733,6 @@ _bfd_mips_elf_read_ecoff_info (abfd, section, debug)
/* MIPS ELF local labels start with '$', not 'L'. */
-/*ARGSUSED*/
static boolean
mips_elf_is_local_label_name (abfd, name)
bfd *abfd;
@@ -3682,8 +3775,9 @@ _bfd_mips_elf_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
filename_ptr, functionname_ptr,
- line_ptr,
- ABI_64_P (abfd) ? 8 : 0))
+ line_ptr,
+ ABI_64_P (abfd) ? 8 : 0,
+ &elf_tdata (abfd)->dwarf2_find_line_info))
return true;
msec = bfd_get_section_by_name (abfd, ".mdebug");
@@ -3822,11 +3916,11 @@ struct mips_elf_link_hash_table
/* The size of the .compact_rel section (if SGI_COMPAT). */
bfd_size_type compact_rel_size;
/* This flag indicates that the value of DT_MIPS_RLD_MAP dynamic
- entry is set to the address of __rld_obj_head as in Irix 5. */
+ entry is set to the address of __rld_obj_head as in Irix 5. */
boolean use_rld_obj_head;
/* This is the value of the __rld_map or __rld_obj_head symbol. */
bfd_vma rld_value;
- /* This is set if we see any mips16 stub sections. */
+ /* This is set if we see any mips16 stub sections. */
boolean mips16_stubs_seen;
};
@@ -3886,6 +3980,7 @@ mips_elf_link_hash_newfunc (entry, table, string)
ret->esym.ifd = -2;
ret->possibly_dynamic_relocs = 0;
ret->min_dyn_reloc_index = 0;
+ ret->no_fn_stub = false;
ret->fn_stub = NULL;
ret->need_fn_stub = false;
ret->call_stub = NULL;
@@ -3895,6 +3990,28 @@ mips_elf_link_hash_newfunc (entry, table, string)
return (struct bfd_hash_entry *) ret;
}
+void
+_bfd_mips_elf_hide_symbol (info, h)
+ struct bfd_link_info *info;
+ struct mips_elf_link_hash_entry *h;
+{
+ bfd *dynobj;
+ asection *got;
+ struct mips_got_info *g;
+ dynobj = elf_hash_table (info)->dynobj;
+ got = bfd_get_section_by_name (dynobj, ".got");
+ g = (struct mips_got_info *) elf_section_data (got)->tdata;
+
+ h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->root.plt.offset = (bfd_vma) -1;
+ if ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ h->root.dynindx = -1;
+
+ /* FIXME: Do we allocate too much GOT space here? */
+ g->local_gotno++;
+ got->_raw_size += MIPS_ELF_GOT_SIZE (dynobj);
+}
+
/* Create a MIPS ELF linker hash table. */
struct bfd_link_hash_table *
@@ -3932,7 +4049,6 @@ _bfd_mips_elf_link_hash_table_create (abfd)
/* Hook called by the linker routine which adds symbols from an object
file. We must handle the special MIPS section numbers here. */
-/*ARGSUSED*/
boolean
_bfd_mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd *abfd;
@@ -3969,48 +4085,78 @@ _bfd_mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
case SHN_MIPS_TEXT:
/* This section is used in a shared object. */
- if (mips_elf_text_section_ptr == NULL)
+ if (elf_tdata (abfd)->elf_text_section == NULL)
{
+ asymbol *elf_text_symbol;
+ asection *elf_text_section;
+
+ elf_text_section = bfd_zalloc (abfd, sizeof (asection));
+ if (elf_text_section == NULL)
+ return false;
+
+ elf_text_symbol = bfd_zalloc (abfd, sizeof (asymbol));
+ if (elf_text_symbol == NULL)
+ return false;
+
/* Initialize the section. */
- mips_elf_text_section.name = ".text";
- mips_elf_text_section.flags = SEC_NO_FLAGS;
- mips_elf_text_section.output_section = NULL;
- mips_elf_text_section.symbol = &mips_elf_text_symbol;
- mips_elf_text_section.symbol_ptr_ptr = &mips_elf_text_symbol_ptr;
- mips_elf_text_symbol.name = ".text";
- mips_elf_text_symbol.flags = BSF_SECTION_SYM | BSF_DYNAMIC;
- mips_elf_text_symbol.section = &mips_elf_text_section;
- mips_elf_text_symbol_ptr = &mips_elf_text_symbol;
- mips_elf_text_section_ptr = &mips_elf_text_section;
+
+ elf_tdata (abfd)->elf_text_section = elf_text_section;
+ elf_tdata (abfd)->elf_text_symbol = elf_text_symbol;
+
+ elf_text_section->symbol = elf_text_symbol;
+ elf_text_section->symbol_ptr_ptr = &elf_tdata (abfd)->elf_text_symbol;
+
+ elf_text_section->name = ".text";
+ elf_text_section->flags = SEC_NO_FLAGS;
+ elf_text_section->output_section = NULL;
+ elf_text_section->owner = abfd;
+ elf_text_symbol->name = ".text";
+ elf_text_symbol->flags = BSF_SECTION_SYM | BSF_DYNAMIC;
+ elf_text_symbol->section = elf_text_section;
}
/* This code used to do *secp = bfd_und_section_ptr if
info->shared. I don't know why, and that doesn't make sense,
so I took it out. */
- *secp = mips_elf_text_section_ptr;
+ *secp = elf_tdata (abfd)->elf_text_section;
break;
case SHN_MIPS_ACOMMON:
/* Fall through. XXX Can we treat this as allocated data? */
case SHN_MIPS_DATA:
/* This section is used in a shared object. */
- if (mips_elf_data_section_ptr == NULL)
+ if (elf_tdata (abfd)->elf_data_section == NULL)
{
+ asymbol *elf_data_symbol;
+ asection *elf_data_section;
+
+ elf_data_section = bfd_zalloc (abfd, sizeof (asection));
+ if (elf_data_section == NULL)
+ return false;
+
+ elf_data_symbol = bfd_zalloc (abfd, sizeof (asymbol));
+ if (elf_data_symbol == NULL)
+ return false;
+
/* Initialize the section. */
- mips_elf_data_section.name = ".data";
- mips_elf_data_section.flags = SEC_NO_FLAGS;
- mips_elf_data_section.output_section = NULL;
- mips_elf_data_section.symbol = &mips_elf_data_symbol;
- mips_elf_data_section.symbol_ptr_ptr = &mips_elf_data_symbol_ptr;
- mips_elf_data_symbol.name = ".data";
- mips_elf_data_symbol.flags = BSF_SECTION_SYM | BSF_DYNAMIC;
- mips_elf_data_symbol.section = &mips_elf_data_section;
- mips_elf_data_symbol_ptr = &mips_elf_data_symbol;
- mips_elf_data_section_ptr = &mips_elf_data_section;
+
+ elf_tdata (abfd)->elf_data_section = elf_data_section;
+ elf_tdata (abfd)->elf_data_symbol = elf_data_symbol;
+
+ elf_data_section->symbol = elf_data_symbol;
+ elf_data_section->symbol_ptr_ptr = &elf_tdata (abfd)->elf_data_symbol;
+
+ elf_data_section->name = ".data";
+ elf_data_section->flags = SEC_NO_FLAGS;
+ elf_data_section->output_section = NULL;
+ elf_data_section->owner = abfd;
+ elf_data_symbol->name = ".data";
+ elf_data_symbol->flags = BSF_SECTION_SYM | BSF_DYNAMIC;
+ elf_data_symbol->section = elf_data_section;
}
/* This code used to do *secp = bfd_und_section_ptr if
info->shared. I don't know why, and that doesn't make sense,
so I took it out. */
- *secp = mips_elf_data_section_ptr;
+ *secp = elf_tdata (abfd)->elf_data_section;
break;
case SHN_MIPS_SUNDEFINED:
@@ -4033,7 +4179,7 @@ _bfd_mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
get_elf_backend_data (abfd)->collect,
(struct bfd_link_hash_entry **) &h)))
return false;
- h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
+ h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -4115,9 +4261,8 @@ mips_elf_output_extsym (h, data)
h->esym.asym.value = 0;
h->esym.asym.st = stGlobal;
- if (SGI_COMPAT (einfo->abfd)
- && (h->root.root.type == bfd_link_hash_undefined
- || h->root.root.type == bfd_link_hash_undefweak))
+ if (h->root.root.type == bfd_link_hash_undefined
+ || h->root.root.type == bfd_link_hash_undefweak)
{
const char *name;
@@ -4212,24 +4357,36 @@ mips_elf_output_extsym (h, data)
}
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 = h->root.root.u.def.section;
- if (sec == NULL)
- h->esym.asym.value = 0;
- else
+ struct mips_elf_link_hash_entry *hd = h;
+ boolean no_fn_stub = h->no_fn_stub;
+
+ while (hd->root.root.type == bfd_link_hash_indirect)
{
- 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;
+ hd = (struct mips_elf_link_hash_entry *)h->root.root.u.i.link;
+ no_fn_stub = no_fn_stub || hd->no_fn_stub;
}
+
+ if (!no_fn_stub)
+ {
+ /* Set type and value for a symbol with a function stub. */
+ h->esym.asym.st = stProc;
+ sec = hd->root.root.u.def.section;
+ if (sec == NULL)
+ h->esym.asym.value = 0;
+ else
+ {
+ output_section = sec->output_section;
+ if (output_section != NULL)
+ h->esym.asym.value = (hd->root.plt.offset
+ + sec->output_offset
+ + output_section->vma);
+ else
+ h->esym.asym.value = 0;
+ }
#if 0 /* FIXME? */
- h->esym.ifd = 0;
+ h->esym.ifd = 0;
#endif
+ }
}
if (! bfd_ecoff_debug_one_external (einfo->abfd, einfo->debug, einfo->swap,
@@ -4427,6 +4584,20 @@ _bfd_mips_elf_final_link (abfd, info)
= get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap;
HDRR *symhdr = &debug.symbolic_header;
PTR mdebug_handle = NULL;
+ asection *s;
+ EXTR esym;
+ bfd_vma last;
+ unsigned int i;
+ static const char * const name[] =
+ {
+ ".text", ".init", ".fini", ".data",
+ ".rodata", ".sdata", ".sbss", ".bss"
+ };
+ static const int sc[] =
+ {
+ scText, scInit, scFini, scData,
+ scRData, scSData, scSBss, scBss
+ };
/* If all the things we linked together were PIC, but we're
producing an executable (rather than a shared object), then the
@@ -4455,10 +4626,10 @@ _bfd_mips_elf_final_link (abfd, 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
+ if (!mips_elf_sort_hash_table (info, (info->shared
? bfd_count_sections (abfd) + 1
: 1)))
- return false;
+ return false;
/* Make sure we didn't grow the global .got region. */
dynobj = elf_hash_table (info)->dynobj;
@@ -4475,18 +4646,18 @@ _bfd_mips_elf_final_link (abfd, info)
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)
+ 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;
+ p->u.indirect.section->flags &= ~SEC_HAS_CONTENTS;
(*secpp)->link_order_head = NULL;
*secpp = (*secpp)->next;
--abfd->section_count;
-
+
break;
}
}
@@ -4509,7 +4680,7 @@ _bfd_mips_elf_final_link (abfd, info)
/* Find the GP-relative section with the lowest offset. */
lo = (bfd_vma) -1;
for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- if (o->vma < lo
+ if (o->vma < lo
&& (elf_section_data (o)->this_hdr.sh_flags & SHF_MIPS_GPREL))
lo = o->vma;
@@ -4583,7 +4754,7 @@ _bfd_mips_elf_final_link (abfd, info)
/* Hack: reset the SEC_HAS_CONTENTS flag so that
elf_link_input_bfd ignores this section. */
- input_section->flags &=~ SEC_HAS_CONTENTS;
+ input_section->flags &= ~SEC_HAS_CONTENTS;
}
/* Size has been set in mips_elf_always_size_sections */
@@ -4637,44 +4808,30 @@ _bfd_mips_elf_final_link (abfd, info)
if (mdebug_handle == (PTR) NULL)
return false;
- if (SGI_COMPAT (abfd))
+ esym.jmptbl = 0;
+ esym.cobol_main = 0;
+ esym.weakext = 0;
+ esym.reserved = 0;
+ esym.ifd = ifdNil;
+ esym.asym.iss = issNil;
+ esym.asym.st = stLocal;
+ esym.asym.reserved = 0;
+ esym.asym.index = indexNil;
+ last = 0;
+ for (i = 0; i < 8; i++)
{
- asection *s;
- EXTR esym;
- bfd_vma last;
- unsigned int i;
- static const char * const name[] =
- { ".text", ".init", ".fini", ".data",
- ".rodata", ".sdata", ".sbss", ".bss" };
- static const int sc[] = { scText, scInit, scFini, scData,
- scRData, scSData, scSBss, scBss };
-
- esym.jmptbl = 0;
- esym.cobol_main = 0;
- esym.weakext = 0;
- esym.reserved = 0;
- esym.ifd = ifdNil;
- esym.asym.iss = issNil;
- esym.asym.st = stLocal;
- esym.asym.reserved = 0;
- esym.asym.index = indexNil;
- last = 0;
- for (i = 0; i < 8; i++)
+ esym.asym.sc = sc[i];
+ s = bfd_get_section_by_name (abfd, name[i]);
+ if (s != NULL)
{
- esym.asym.sc = sc[i];
- s = bfd_get_section_by_name (abfd, name[i]);
- if (s != NULL)
- {
- esym.asym.value = s->vma;
- last = s->vma + s->_raw_size;
- }
- else
- esym.asym.value = last;
-
- if (! bfd_ecoff_debug_one_external (abfd, &debug, swap,
- name[i], &esym))
- return false;
+ esym.asym.value = s->vma;
+ last = s->vma + s->_raw_size;
}
+ else
+ esym.asym.value = last;
+ if (!bfd_ecoff_debug_one_external (abfd, &debug, swap,
+ name[i], &esym))
+ return false;
}
for (p = o->link_order_head;
@@ -4778,7 +4935,7 @@ _bfd_mips_elf_final_link (abfd, info)
/* Hack: reset the SEC_HAS_CONTENTS flag so that
elf_link_input_bfd ignores this section. */
- input_section->flags &=~ SEC_HAS_CONTENTS;
+ input_section->flags &= ~SEC_HAS_CONTENTS;
}
if (SGI_COMPAT (abfd) && info->shared)
@@ -4857,7 +5014,7 @@ _bfd_mips_elf_final_link (abfd, info)
/* Hack: reset the SEC_HAS_CONTENTS flag so that
elf_link_input_bfd ignores this section. */
- input_section->flags &=~ SEC_HAS_CONTENTS;
+ input_section->flags &= ~SEC_HAS_CONTENTS;
}
/* Skip this section later on (I don't think this
@@ -5016,7 +5173,7 @@ _bfd_mips_elf_final_link (abfd, info)
/* Hack: reset the SEC_HAS_CONTENTS flag so that
elf_link_input_bfd ignores this section. */
- input_section->flags &=~ SEC_HAS_CONTENTS;
+ input_section->flags &= ~SEC_HAS_CONTENTS;
}
/* The table must be sorted by -G value. */
@@ -5116,6 +5273,26 @@ _bfd_mips_elf_final_link (abfd, info)
return true;
}
+/* This function is called via qsort() to sort the dynamic relocation
+ entries by increasing r_symndx value. */
+
+static int
+sort_dynamic_relocs (arg1, arg2)
+ const PTR arg1;
+ const PTR arg2;
+{
+ const Elf32_External_Rel *ext_reloc1 = (const Elf32_External_Rel *) arg1;
+ const Elf32_External_Rel *ext_reloc2 = (const Elf32_External_Rel *) arg2;
+
+ Elf_Internal_Rel int_reloc1;
+ Elf_Internal_Rel int_reloc2;
+
+ bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, ext_reloc1, &int_reloc1);
+ bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, ext_reloc2, &int_reloc2);
+
+ return (ELF32_R_SYM (int_reloc1.r_info) - ELF32_R_SYM (int_reloc2.r_info));
+}
+
/* Returns the GOT section for ABFD. */
static asection *
@@ -5126,7 +5303,7 @@ mips_elf_got_section (abfd)
}
/* Returns the GOT information associated with the link indicated by
- INFO. If SGOTP is non-NULL, it is filled in with the GOT
+ INFO. If SGOTP is non-NULL, it is filled in with the GOT
section. */
static struct mips_got_info *
@@ -5151,24 +5328,42 @@ mips_elf_got_info (abfd, sgotp)
/* Return whether a relocation is against a local symbol. */
static boolean
-mips_elf_local_relocation_p (input_bfd, relocation, local_sections)
+mips_elf_local_relocation_p (input_bfd, relocation, local_sections,
+ check_forced)
bfd *input_bfd;
const Elf_Internal_Rela *relocation;
asection **local_sections;
+ boolean check_forced;
{
unsigned long r_symndx;
Elf_Internal_Shdr *symtab_hdr;
+ struct mips_elf_link_hash_entry *h;
+ size_t extsymoff;
r_symndx = ELF32_R_SYM (relocation->r_info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- if (! elf_bad_symtab (input_bfd))
- return r_symndx < symtab_hdr->sh_info;
- else
+ extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
+
+ if (r_symndx < extsymoff)
+ return true;
+ if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL)
+ return true;
+
+ if (check_forced)
{
- /* The symbol table does not follow the rule that local symbols
- must come before globals. */
- return local_sections[r_symndx] != NULL;
+ /* Look up the hash table to check whether the symbol
+ was forced local. */
+ h = (struct mips_elf_link_hash_entry *)
+ elf_sym_hashes (input_bfd) [r_symndx - extsymoff];
+ /* Find the real hash-table entry for this symbol. */
+ while (h->root.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)
+ return true;
}
+
+ return false;
}
/* Sign-extend VALUE, which has the indicated number of BITS. */
@@ -5178,10 +5373,10 @@ mips_elf_sign_extend (value, bits)
bfd_vma value;
int bits;
{
- if (value & ((bfd_vma)1 << (bits - 1)))
+ if (value & ((bfd_vma) 1 << (bits - 1)))
/* VALUE is negative. */
- value |= ((bfd_vma) - 1) << bits;
-
+ value |= ((bfd_vma) - 1) << bits;
+
return value;
}
@@ -5202,7 +5397,7 @@ mips_elf_overflow_p (value, bits)
else if (svalue < -(1 << (bits - 1)))
/* The value is too small. */
return true;
-
+
/* All is well. */
return false;
}
@@ -5232,7 +5427,7 @@ mips_elf_higher (value)
/* Calculate the %highest function. */
-static bfd_vma
+static bfd_vma
mips_elf_highest (value)
bfd_vma value ATTRIBUTE_UNUSED;
{
@@ -5246,7 +5441,7 @@ mips_elf_highest (value)
/* Returns the GOT index for the global symbol indicated by H. */
-static bfd_vma
+static bfd_vma
mips_elf_global_got_index (abfd, h)
bfd *abfd;
struct elf_link_hash_entry *h;
@@ -5262,7 +5457,7 @@ mips_elf_global_got_index (abfd, h)
indices into the GOT. That makes it easy to calculate the GOT
offset. */
BFD_ASSERT (h->dynindx >= g->global_gotsym->dynindx);
- index = ((h->dynindx - g->global_gotsym->dynindx + g->local_gotno)
+ index = ((h->dynindx - g->global_gotsym->dynindx + g->local_gotno)
* MIPS_ELF_GOT_SIZE (abfd));
BFD_ASSERT (index < sgot->_raw_size);
@@ -5283,7 +5478,7 @@ mips_elf_got_offset_from_index (dynobj, output_bfd, index)
sgot = mips_elf_got_section (dynobj);
gp = _bfd_get_gp_value (output_bfd);
- return (sgot->output_section->vma + sgot->output_offset + index -
+ return (sgot->output_section->vma + sgot->output_offset + index -
gp);
}
@@ -5302,7 +5497,7 @@ mips_elf_record_global_got_symbol (h, info, g)
if (h->dynindx == -1
&& !bfd_elf32_link_record_dynamic_symbol (info, h))
return false;
-
+
/* If we've already marked this entry as need GOT space, we don't
need to do it again. */
if (h->got.offset != (bfd_vma) - 1)
@@ -5317,7 +5512,7 @@ mips_elf_record_global_got_symbol (h, info, g)
/* This structure is passed to mips_elf_sort_hash_table_f when sorting
the dynamic symbols. */
-
+
struct mips_elf_hash_sort_data
{
/* The symbol in the global GOT with the lowest dynamic symbol table
@@ -5332,7 +5527,7 @@ struct mips_elf_hash_sort_data
};
/* If H needs a GOT entry, assign it the highest available dynamic
- index. Otherwise, assign it the lowest available dynamic
+ index. Otherwise, assign it the lowest available dynamic
index. */
static boolean
@@ -5340,7 +5535,7 @@ mips_elf_sort_hash_table_f (h, data)
struct mips_elf_link_hash_entry *h;
PTR data;
{
- struct mips_elf_hash_sort_data *hsd
+ struct mips_elf_hash_sort_data *hsd
= (struct mips_elf_hash_sort_data *) data;
/* Symbols without dynamic symbol table entries aren't interesting
@@ -5380,14 +5575,14 @@ mips_elf_sort_hash_table (info, max_local)
hsd.low = NULL;
hsd.min_got_dynindx = elf_hash_table (info)->dynsymcount;
hsd.max_non_got_dynindx = max_local;
- mips_elf_link_hash_traverse (((struct mips_elf_link_hash_table *)
- elf_hash_table (info)),
- mips_elf_sort_hash_table_f,
+ mips_elf_link_hash_traverse (((struct mips_elf_link_hash_table *)
+ elf_hash_table (info)),
+ mips_elf_sort_hash_table_f,
&hsd);
/* There shoud have been enough room in the symbol table to
accomodate both the GOT and non-GOT symbols. */
- BFD_ASSERT (hsd.min_got_dynindx == hsd.max_non_got_dynindx);
+ BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx);
/* Now we know which dynamic symbol has the lowest dynamic symbol
table index in the GOT. */
@@ -5417,7 +5612,7 @@ mips_elf_create_local_got_entry (abfd, g, sgot, value)
}
MIPS_ELF_PUT_WORD (abfd, value,
- (sgot->contents
+ (sgot->contents
+ MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno));
return MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno++;
}
@@ -5439,8 +5634,8 @@ mips_elf_local_got_index (abfd, info, value)
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
/* Look to see if we already have an appropriate entry. */
- for (entry = (sgot->contents
- + MIPS_ELF_GOT_SIZE (abfd) * MIPS_RESERVED_GOTNO);
+ for (entry = (sgot->contents
+ + MIPS_ELF_GOT_SIZE (abfd) * MIPS_RESERVED_GOTNO);
entry != sgot->contents + MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno;
entry += MIPS_ELF_GOT_SIZE (abfd))
{
@@ -5476,7 +5671,7 @@ mips_elf_got_page (abfd, info, value, offsetp)
/* Look to see if we aleady have an appropriate entry. */
last_entry = sgot->contents + MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno;
- for (entry = (sgot->contents
+ for (entry = (sgot->contents
+ MIPS_ELF_GOT_SIZE (abfd) * MIPS_RESERVED_GOTNO);
entry != last_entry;
entry += MIPS_ELF_GOT_SIZE (abfd))
@@ -5509,10 +5704,11 @@ mips_elf_got_page (abfd, info, value, offsetp)
for value. Return the index into the GOT for this entry. */
static bfd_vma
-mips_elf_got16_entry (abfd, info, value)
+mips_elf_got16_entry (abfd, info, value, external)
bfd *abfd;
struct bfd_link_info *info;
bfd_vma value;
+ boolean external;
{
asection *sgot;
struct mips_got_info *g;
@@ -5521,24 +5717,29 @@ mips_elf_got16_entry (abfd, info, value)
bfd_vma index = 0;
bfd_vma address;
- /* Although the ABI says that it is "the high-order 16 bits" that we
- want, it is really the %high value. The complete value is
- calculated with a `addiu' of a LO16 relocation, just as with a
- HI16/LO16 pair. */
- value = mips_elf_high (value) << 16;
+ 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;
+ }
+
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
/* Look to see if we already have an appropriate entry. */
last_entry = sgot->contents + MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno;
- for (entry = (sgot->contents
+ for (entry = (sgot->contents
+ MIPS_ELF_GOT_SIZE (abfd) * MIPS_RESERVED_GOTNO);
entry != last_entry;
entry += MIPS_ELF_GOT_SIZE (abfd))
{
address = MIPS_ELF_GET_WORD (abfd, entry);
- if ((address & 0xffff0000) == value)
+ if (address == value)
{
- /* This entry has the right high-order 16 bits. */
+ /* This entry has the right high-order 16 bits, and the low-order
+ 16 bits are set to zero. */
index = entry - sgot->contents;
break;
}
@@ -5581,7 +5782,7 @@ mips_elf_next_relocation (r_type, relocation, relend)
/* Create a rel.dyn relocation for the dynamic linker to resolve. REL
is the original relocation, which is now being transformed into a
- dyanmic relocation. The ADDENDP is adjusted if necessary; the
+ dynamic relocation. The ADDENDP is adjusted if necessary; the
caller should store the result in place of the original addend. */
static boolean
@@ -5604,10 +5805,11 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
r_type = ELF32_R_TYPE (rel->r_info);
dynobj = elf_hash_table (info)->dynobj;
- sreloc
+ sreloc
= bfd_get_section_by_name (dynobj,
MIPS_ELF_REL_DYN_SECTION_NAME (output_bfd));
BFD_ASSERT (sreloc != NULL);
+ BFD_ASSERT (sreloc->contents != NULL);
skip = false;
@@ -5622,7 +5824,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
Because we compress stab information, the offset given in the
relocation may not be the one we want; we must let the stabs
machinery tell us the offset. */
- outrel.r_offset
+ outrel.r_offset
= (_bfd_stab_section_offset
(output_bfd, &elf_hash_table (info)->stab_info,
input_section,
@@ -5634,7 +5836,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
skip = true;
}
- /* If we've decided to skip this relocation, just output an emtpy
+ /* 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)
@@ -5651,7 +5853,10 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
& ELF_LINK_HASH_DEF_REGULAR) == 0))
{
indx = h->root.dynindx;
- BFD_ASSERT (indx != -1);
+ /* h->root.dynindx may be -1 if this symbol was marked to
+ become local. */
+ if (indx == -1)
+ indx = 0;
}
else
{
@@ -5675,15 +5880,16 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
/* The relocation we're building is section-relative.
Therefore, the original addend must be adjusted by the
section offset. */
- *addendp += symbol - sec->output_section->vma;
+ *addendp += section_offset;
/* Now, the relocation is just against the section. */
symbol = sec->output_section->vma;
}
-
- /* If the relocation was previously an absolute relocation, we
- must adjust it by the value we give it in the dynamic symbol
- table. */
- if (r_type != R_MIPS_REL32)
+
+ /* 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 (!indx && r_type != R_MIPS_REL32)
*addendp += symbol;
/* The relocation is always an REL32 relocation because we don't
@@ -5703,7 +5909,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
{
(*get_elf_backend_data (output_bfd)->s->swap_reloc_out)
(output_bfd, &outrel,
- (sreloc->contents
+ (sreloc->contents
+ sreloc->reloc_count * sizeof (Elf64_Mips_External_Rel)));
}
else
@@ -5715,7 +5921,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
/* Record the index of the first relocation referencing H. This
information is later emitted in the .msym section. */
if (h != NULL
- && (h->min_dyn_reloc_index == 0
+ && (h->min_dyn_reloc_index == 0
|| sreloc->reloc_count < h->min_dyn_reloc_index))
h->min_dyn_reloc_index = sreloc->reloc_count;
@@ -5730,7 +5936,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
/* On IRIX5, make an entry of compact relocation info. */
if (! skip && IRIX_COMPAT (output_bfd) == ict_irix5)
{
- asection* scpt = bfd_get_section_by_name (dynobj, ".compact_rel");
+ asection *scpt = bfd_get_section_by_name (dynobj, ".compact_rel");
bfd_byte *cr;
if (scpt)
@@ -5774,7 +5980,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
overflow occurs, and bfd_reloc_ok to indicate success. */
static bfd_reloc_status_type
-mips_elf_calculate_relocation (abfd,
+mips_elf_calculate_relocation (abfd,
input_bfd,
input_section,
info,
@@ -5785,7 +5991,7 @@ mips_elf_calculate_relocation (abfd,
local_sections,
valuep,
namep,
- require_jalxp)
+ require_jalxp)
bfd *abfd;
bfd *input_bfd;
asection *input_section;
@@ -5819,7 +6025,7 @@ mips_elf_calculate_relocation (abfd,
/* The section in which the symbol referenced by the relocation is
located. */
asection *sec = NULL;
- struct mips_elf_link_hash_entry* h = NULL;
+ struct mips_elf_link_hash_entry *h = NULL;
/* True if the symbol referred to by this relocation is a local
symbol. */
boolean local_p;
@@ -5838,7 +6044,7 @@ mips_elf_calculate_relocation (abfd,
/* Parse the relocation. */
r_symndx = ELF32_R_SYM (relocation->r_info);
r_type = ELF32_R_TYPE (relocation->r_info);
- p = (input_section->output_section->vma
+ p = (input_section->output_section->vma
+ input_section->output_offset
+ relocation->r_offset);
@@ -5849,7 +6055,7 @@ mips_elf_calculate_relocation (abfd,
used in the array of hash table entries. */
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
local_p = mips_elf_local_relocation_p (input_bfd, relocation,
- local_sections);
+ local_sections, false);
if (! elf_bad_symtab (input_bfd))
extsymoff = symtab_hdr->sh_info;
else
@@ -5858,7 +6064,7 @@ mips_elf_calculate_relocation (abfd,
must come before globals. */
extsymoff = 0;
}
-
+
/* Figure out the value of the symbol. */
if (local_p)
{
@@ -5887,13 +6093,13 @@ mips_elf_calculate_relocation (abfd,
else
{
/* For global symbols we look up the symbol in the hash-table. */
- h = ((struct mips_elf_link_hash_entry *)
+ h = ((struct mips_elf_link_hash_entry *)
elf_sym_hashes (input_bfd) [r_symndx - extsymoff]);
/* Find the real hash-table entry for this symbol. */
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
+ 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;
-
+
/* Record the name of this symbol, for our caller. */
*namep = h->root.root.root.string;
@@ -5918,7 +6124,7 @@ mips_elf_calculate_relocation (abfd,
{
sec = h->root.root.u.def.section;
if (sec->output_section)
- symbol = (h->root.root.u.def.value
+ symbol = (h->root.root.u.def.value
+ sec->output_section->vma
+ sec->output_offset);
else
@@ -5933,10 +6139,12 @@ mips_elf_calculate_relocation (abfd,
else if (info->shared && !info->symbolic && !info->no_undefined
&& ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
symbol = 0;
- else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0)
+ else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0 ||
+ strcmp (h->root.root.root.string, "_DYNAMIC_LINKING") == 0)
{
/* If this is a dynamic link, we should have created a
- _DYNAMIC_LINK symbol in mips_elf_create_dynamic_sections.
+ _DYNAMIC_LINK symbol or _DYNAMIC_LINKING(for normal mips) symbol
+ in in mips_elf_create_dynamic_sections.
Otherwise, we should define the symbol with a value of 0.
FIXME: It should probably get into the symbol table
somehow as well. */
@@ -5957,7 +6165,7 @@ mips_elf_calculate_relocation (abfd,
target_is_16_bit_code_p = (h->root.other == STO_MIPS16);
}
-
+
/* If this is a 32-bit call to a 16-bit function with a stub, we
need to redirect the call to the stub, unless we're already *in*
a stub. */
@@ -5983,7 +6191,7 @@ mips_elf_calculate_relocation (abfd,
/* If this is a 16-bit call to a 32-bit function with a stub, we
need to redirect the call to the stub. */
else if (r_type == R_MIPS16_26 && !info->relocateable
- && h != NULL
+ && h != NULL
&& (h->call_stub != NULL || h->call_fp_stub != NULL)
&& !target_is_16_bit_code_p)
{
@@ -6021,6 +6229,9 @@ mips_elf_calculate_relocation (abfd,
*require_jalxp = (!info->relocateable
&& ((r_type == R_MIPS16_26) != target_is_16_bit_code_p));
+ local_p = mips_elf_local_relocation_p (input_bfd, relocation,
+ local_sections, true);
+
/* If we haven't already determined the GOT offset, or the GP value,
and we're going to need it, get it now. */
switch (r_type)
@@ -6036,11 +6247,24 @@ mips_elf_calculate_relocation (abfd,
if (!local_p)
{
BFD_ASSERT (addend == 0);
- g = mips_elf_global_got_index
+ g = mips_elf_global_got_index
(elf_hash_table (info)->dynobj,
- (struct elf_link_hash_entry*) h);
+ (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)))
+ {
+ /* 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(elf_hash_table
+ (info)->dynobj);
+ MIPS_ELF_PUT_WORD (elf_hash_table (info)->dynobj,
+ symbol + addend, sgot->contents + g);
+ }
}
- else if (r_type == R_MIPS_GOT16)
+ 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. */
break;
@@ -6055,7 +6279,7 @@ mips_elf_calculate_relocation (abfd,
g = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
abfd, g);
break;
-
+
case R_MIPS_HI16:
case R_MIPS_LO16:
case R_MIPS_GPREL16:
@@ -6086,8 +6310,8 @@ mips_elf_calculate_relocation (abfd,
if ((info->shared
|| (elf_hash_table (info)->dynamic_sections_created
&& h != NULL
- && ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
- == 0)))
+ && ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
+ != 0)))
&& (input_section->flags & SEC_ALLOC) != 0)
{
/* If we're creating a shared library, or this relocation is
@@ -6096,8 +6320,8 @@ mips_elf_calculate_relocation (abfd,
record in the output, and leave the job up to the dynamic
linker. */
value = addend;
- if (!mips_elf_create_dynamic_relocation (abfd,
- info,
+ if (!mips_elf_create_dynamic_relocation (abfd,
+ info,
relocation,
h,
sec,
@@ -6135,14 +6359,14 @@ mips_elf_calculate_relocation (abfd,
break;
case R_MIPS16_26:
- /* The calculation for R_MIPS_26 is just the same as for an
+ /* 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
the output file that's different. That's handled in
mips_elf_perform_relocation. So, we just fall through to the
R_MIPS_26 case here. */
case R_MIPS_26:
if (local_p)
- value = (((addend << 2) | (p & 0xf0000000)) + symbol) >> 2;
+ value = (((addend << 2) | ((p + 4) & 0xf0000000)) + symbol) >> 2;
else
value = (mips_elf_sign_extend (addend << 2, 28) + symbol) >> 2;
value &= howto->dst_mask;
@@ -6206,14 +6430,22 @@ mips_elf_calculate_relocation (abfd,
value = mips_elf_sign_extend (addend, 16) + symbol - gp;
overflowed_p = mips_elf_overflow_p (value, 16);
break;
-
+
case R_MIPS_GOT16:
+ case R_MIPS_CALL16:
if (local_p)
{
- value = mips_elf_got16_entry (abfd, info, symbol + addend);
+ 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, info, symbol + addend, forced);
if (value == (bfd_vma) -1)
return false;
- value
+ value
= mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
abfd,
value);
@@ -6223,7 +6455,6 @@ mips_elf_calculate_relocation (abfd,
/* Fall through. */
- case R_MIPS_CALL16:
case R_MIPS_GOT_DISP:
value = g;
overflowed_p = mips_elf_overflow_p (value, 16);
@@ -6263,7 +6494,7 @@ mips_elf_calculate_relocation (abfd,
value);
overflowed_p = mips_elf_overflow_p (value, 16);
break;
-
+
case R_MIPS_GOT_OFST:
mips_elf_got_page (abfd, info, symbol + addend, &value);
overflowed_p = mips_elf_overflow_p (value, 16);
@@ -6283,7 +6514,7 @@ mips_elf_calculate_relocation (abfd,
value = mips_elf_highest (addend + symbol);
value &= howto->dst_mask;
break;
-
+
case R_MIPS_SCN_DISP:
value = symbol + addend - sec->output_offset;
value &= howto->dst_mask;
@@ -6346,7 +6577,7 @@ mips_elf_obtain_contents (howto, relocation, input_bfd, contents)
static boolean
mips_elf_perform_relocation (info, howto, relocation, value,
- input_bfd, input_section,
+ input_bfd, input_section,
contents, require_jalx)
struct bfd_link_info *info;
reloc_howto_type *howto;
@@ -6385,7 +6616,7 @@ mips_elf_perform_relocation (info, howto, relocation, value,
+--------------+--------------------------------+
! 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.
@@ -6410,14 +6641,14 @@ mips_elf_perform_relocation (info, howto, relocation, value,
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:
+----------+------+-------------+
| | | |
@@ -6426,19 +6657,18 @@ mips_elf_perform_relocation (info, howto, relocation, value,
+----------+--------------------+
where targ26-16 is sub1 followed by sub2 (i.e., the addend field A is
((sub1 << 16) | sub2)).
-
+
When producing a relocateable object file, the calculation is
- (((A < 2) | (P & 0xf0000000) + S) >> 2)
+ (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2)
When producing a fully linked file, the calculation is
- let R = (((A < 2) | (P & 0xf0000000) + S) >> 2)
+ let R = (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2)
((R & 0x1f0000) << 5) | ((R & 0x3e00000) >> 5) | (R & 0xffff) */
if (!info->relocateable)
/* Shuffle the bits according to the formula above. */
- value = (((value & 0x1f0000) << 5)
- | ((value & 0x3e00000) >> 5)
+ value = (((value & 0x1f0000) << 5)
+ | ((value & 0x3e00000) >> 5)
| (value & 0xffff));
-
}
else if (r_type == R_MIPS16_GPREL)
{
@@ -6450,13 +6680,13 @@ mips_elf_perform_relocation (info, howto, relocation, value,
+--------------+--------------------------------+
! 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.
+ 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
@@ -6509,7 +6739,7 @@ mips_elf_perform_relocation (info, howto, relocation, value,
if ((r_type == R_MIPS16_GPREL || r_type == R_MIPS16_26)
&& bfd_little_endian (input_bfd))
x = (((x & 0xffff) << 16) | ((x & 0xffff0000) >> 16));
-
+
/* Put the value into the output. */
bfd_put (8 * bfd_get_reloc_size (howto), input_bfd, x, location);
return true;
@@ -6561,12 +6791,13 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
REL relocation. */
boolean rela_relocation_p = true;
int r_type = ELF32_R_TYPE (rel->r_info);
+ const char * msg = (const char *) NULL;
/* Find the relocation howto for this relocation. */
if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd))
{
/* Some 32-bit code uses R_MIPS_64. In particular, people use
- 64-bit code, but make sure all their addresses are in the
+ 64-bit code, but make sure all their addresses are in the
lowermost or uppermost 32-bit section of the 64-bit address
space. Thus, when they use an R_MIPS_64 they mean what is
usually meant by R_MIPS_32, with the exception that the
@@ -6576,7 +6807,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* On big-endian systems, we need to lie about the position
of the reloc. */
if (bfd_big_endian (input_bfd))
- rel->r_offset += 4;
+ rel->r_offset += 4;
}
else
howto = mips_rtype_to_howto (r_type);
@@ -6593,8 +6824,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
REL_HDR is read before its REL_HDR2. */
rel_hdr = &elf_section_data (input_section)->rel_hdr;
if ((size_t) (rel - relocs)
- >= (rel_hdr->sh_size / rel_hdr->sh_entsize
- * bed->s->int_rels_per_ext_rel))
+ >= (NUM_SHDR_ENTRIES (rel_hdr) * bed->s->int_rels_per_ext_rel))
rel_hdr = elf_section_data (input_section)->rel_hdr2;
if (rel_hdr->sh_entsize == MIPS_ELF_REL_SIZE (input_bfd))
{
@@ -6602,7 +6832,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
rela_relocation_p = false;
/* Get the addend, which is stored in the input file. */
- addend = mips_elf_obtain_contents (howto,
+ addend = mips_elf_obtain_contents (howto,
rel,
input_bfd,
contents);
@@ -6615,7 +6845,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_MIPS_GNU_REL_HI16
|| (r_type == R_MIPS_GOT16
&& mips_elf_local_relocation_p (input_bfd, rel,
- local_sections)))
+ local_sections, false)))
{
bfd_vma l;
const Elf_Internal_Rela *lo16_relocation;
@@ -6626,15 +6856,15 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
left-shifted by sixteen bits, and the LO16
addend, sign extended. (Usually, the code does
a `lui' of the HI16 value, and then an `addiu' of
- the LO16 value.)
+ the LO16 value.)
Scan ahead to find a matching LO16 relocation. */
if (r_type == R_MIPS_GNU_REL_HI16)
lo = R_MIPS_GNU_REL_LO16;
else
lo = R_MIPS_LO16;
- lo16_relocation
- = mips_elf_next_relocation (lo, rel, relend);
+ lo16_relocation
+ = mips_elf_next_relocation (lo, rel, relend);
if (lo16_relocation == NULL)
return false;
@@ -6681,11 +6911,12 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relative in which case we need to adjust by the amount
that we're adjusting GP in this relocateable object. */
- if (!mips_elf_local_relocation_p (input_bfd, rel, local_sections))
+ 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
+ if (r_type == R_MIPS16_GPREL
|| r_type == R_MIPS_GPREL16
|| r_type == R_MIPS_GPREL32
|| r_type == R_MIPS_LITERAL)
@@ -6704,7 +6935,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
/* Adjust the addend appropriately. */
addend += local_sections[r_symndx]->output_offset;
-
+
/* If the relocation is for a R_MIPS_HI16 or R_MIPS_GOT16,
then we only want to write out the high-order 16 bits.
The subsequent R_MIPS_LO16 will handle the low-order bits. */
@@ -6740,12 +6971,12 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma sign_bits;
bfd_vma low_bits;
bfd_vma high_bits;
-
- if (addend & 0x80000000u)
- sign_bits = 0xffffffffu;
+
+ if (addend & ((bfd_vma) 1 << 31))
+ sign_bits = ((bfd_vma) 1 << 32) - 1;
else
sign_bits = 0;
-
+
/* If we don't know that we have a 64-bit type,
do two separate stores. */
if (bfd_big_endian (input_bfd))
@@ -6760,15 +6991,15 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
low_bits = addend;
high_bits = sign_bits;
}
- bfd_put_32 (input_bfd, low_bits,
+ bfd_put_32 (input_bfd, low_bits,
contents + rel->r_offset);
- bfd_put_32 (input_bfd, high_bits,
+ bfd_put_32 (input_bfd, high_bits,
contents + rel->r_offset + 4);
continue;
}
if (!mips_elf_perform_relocation (info, howto, rel, addend,
- input_bfd, input_section,
+ input_bfd, input_section,
contents, false))
return false;
}
@@ -6781,7 +7012,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocations for the same offset. In that case we are
supposed to treat the output of each relocation as the addend
for the next. */
- if (rel + 1 < relend
+ if (rel + 1 < relend
&& rel->r_offset == rel[1].r_offset
&& ELF32_R_TYPE (rel[1].r_info) != R_MIPS_NONE)
use_saved_addend_p = true;
@@ -6789,7 +7020,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
use_saved_addend_p = false;
/* Figure out what value we are supposed to relocate. */
- switch (mips_elf_calculate_relocation (output_bfd,
+ switch (mips_elf_calculate_relocation (output_bfd,
input_bfd,
input_section,
info,
@@ -6814,8 +7045,10 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
case bfd_reloc_notsupported:
- abort ();
- break;
+ msg = _("internal error: unsupported relocation error");
+ info->callbacks->warning
+ (info, msg, name, input_bfd, input_section, rel->r_offset);
+ return false;
case bfd_reloc_overflow:
if (use_saved_addend_p)
@@ -6861,8 +7094,8 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma low_bits;
bfd_vma high_bits;
- if (value & 0x80000000u)
- sign_bits = 0xffffffffu;
+ if (value & ((bfd_vma) 1 << 31))
+ sign_bits = ((bfd_vma) 1 << 32) - 1;
else
sign_bits = 0;
@@ -6882,15 +7115,15 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
low_bits = value;
high_bits = sign_bits;
}
- bfd_put_32 (input_bfd, low_bits,
+ bfd_put_32 (input_bfd, low_bits,
contents + rel->r_offset);
- bfd_put_32 (input_bfd, high_bits,
+ bfd_put_32 (input_bfd, high_bits,
contents + rel->r_offset + 4);
continue;
}
/* Actually perform the relocation. */
- if (!mips_elf_perform_relocation (info, howto, rel, value, input_bfd,
+ if (!mips_elf_perform_relocation (info, howto, rel, value, input_bfd,
input_section, contents,
require_jalx))
return false;
@@ -6903,7 +7136,6 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
symbol. We mark symbols as small common if appropriate. This is
also where we undo the increment of the value for a mips16 symbol. */
-/*ARGSIGNORED*/
boolean
_bfd_mips_elf_link_output_symbol_hook (abfd, info, name, sym, input_sec)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -6969,9 +7201,9 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
if (IRIX_COMPAT (abfd) == ict_irix6
&& !mips_elf_create_msym_section (abfd))
return false;
-
+
/* Create .stub section. */
- if (bfd_get_section_by_name (abfd,
+ 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));
@@ -6982,7 +7214,7 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
return false;
}
- if (IRIX_COMPAT (abfd) == ict_irix5
+ if ((IRIX_COMPAT (abfd) == ict_irix5 || IRIX_COMPAT (abfd) == ict_none)
&& !info->shared
&& bfd_get_section_by_name (abfd, ".rld_map") == NULL)
{
@@ -7009,7 +7241,7 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
get_elf_backend_data (abfd)->collect,
(struct bfd_link_hash_entry **) &h)))
return false;
- h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
+ h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_SECTION;
@@ -7018,8 +7250,11 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
}
/* We need to create a .compact_rel section. */
- if (! mips_elf_create_compact_rel_section (abfd, info))
- return false;
+ if (SGI_COMPAT (abfd))
+ {
+ if (!mips_elf_create_compact_rel_section (abfd, info))
+ return false;
+ }
/* Change aligments of some sections. */
s = bfd_get_section_by_name (abfd, ".hash");
@@ -7042,13 +7277,26 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
if (!info->shared)
{
h = NULL;
- if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, "_DYNAMIC_LINK", BSF_GLOBAL, bfd_abs_section_ptr,
- (bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
- return false;
- h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
+ if (SGI_COMPAT (abfd))
+ {
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, "_DYNAMIC_LINK", BSF_GLOBAL, bfd_abs_section_ptr,
+ (bfd_vma) 0, (const char *) NULL, false,
+ get_elf_backend_data (abfd)->collect,
+ (struct bfd_link_hash_entry **) &h)))
+ return false;
+ }
+ else
+ {
+ /* For normal mips it is _DYNAMIC_LINKING. */
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, "_DYNAMIC_LINKING", BSF_GLOBAL,
+ bfd_abs_section_ptr, (bfd_vma) 0, (const char *) NULL, false,
+ get_elf_backend_data (abfd)->collect,
+ (struct bfd_link_hash_entry **) &h)))
+ return false;
+ }
+ h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_SECTION;
@@ -7065,13 +7313,26 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
BFD_ASSERT (s != NULL);
h = NULL;
- if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, "__rld_map", BSF_GLOBAL, s,
- (bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
- return false;
- h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
+ if (SGI_COMPAT (abfd))
+ {
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, "__rld_map", BSF_GLOBAL, s,
+ (bfd_vma) 0, (const char *) NULL, false,
+ get_elf_backend_data (abfd)->collect,
+ (struct bfd_link_hash_entry **) &h)))
+ return false;
+ }
+ else
+ {
+ /* For normal mips the symbol is __RLD_MAP. */
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, "__RLD_MAP", BSF_GLOBAL, s,
+ (bfd_vma) 0, (const char *) NULL, false,
+ get_elf_backend_data (abfd)->collect,
+ (struct bfd_link_hash_entry **) &h)))
+ return false;
+ }
+ h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -7111,7 +7372,7 @@ mips_elf_create_compact_rel_section (abfd, info)
return true;
}
-/* Create the .got section to hold the global offset table. */
+/* Create the .got section to hold the global offset table. */
static boolean
mips_elf_create_got_section (abfd, info)
@@ -7146,7 +7407,7 @@ mips_elf_create_got_section (abfd, info)
get_elf_backend_data (abfd)->collect,
(struct bfd_link_hash_entry **) &h)))
return false;
- h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
+ h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -7172,7 +7433,7 @@ mips_elf_create_got_section (abfd, info)
return false;
}
elf_section_data (s)->tdata = (PTR) g;
- elf_section_data (s)->this_hdr.sh_flags
+ elf_section_data (s)->this_hdr.sh_flags
|= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
return true;
@@ -7188,15 +7449,15 @@ mips_elf_create_msym_section (abfd)
asection *s;
s = bfd_get_section_by_name (abfd, MIPS_ELF_MSYM_SECTION_NAME (abfd));
- if (!s)
+ if (!s)
{
s = bfd_make_section (abfd, MIPS_ELF_MSYM_SECTION_NAME (abfd));
if (!s
- || !bfd_set_section_flags (abfd, s,
+ || !bfd_set_section_flags (abfd, s,
SEC_ALLOC
| SEC_LOAD
| SEC_HAS_CONTENTS
- | SEC_LINKER_CREATED
+ | SEC_LINKER_CREATED
| SEC_READONLY)
|| !bfd_set_section_alignment (abfd, s,
MIPS_ELF_LOG_FILE_ALIGN (abfd)))
@@ -7217,10 +7478,10 @@ mips_elf_allocate_dynamic_relocations (abfd, n)
s = bfd_get_section_by_name (abfd, MIPS_ELF_REL_DYN_SECTION_NAME (abfd));
BFD_ASSERT (s != NULL);
-
+
if (s->_raw_size == 0)
{
- /* Make room for a null element. */
+ /* Make room for a null element. */
s->_raw_size += MIPS_ELF_REL_SIZE (abfd);
++s->reloc_count;
}
@@ -7325,14 +7586,14 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
}
/* Record this stub in an array of local symbol stubs for
- this BFD. */
+ this BFD. */
if (elf_tdata (abfd)->local_stubs == NULL)
{
unsigned long symcount;
asection **n;
if (elf_bad_symtab (abfd))
- symcount = symtab_hdr->sh_size / symtab_hdr->sh_entsize;
+ symcount = NUM_SHDR_ENTRIES (symtab_hdr);
else
symcount = symtab_hdr->sh_info;
n = (asection **) bfd_zalloc (abfd,
@@ -7447,6 +7708,13 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
if (r_symndx < extsymoff)
h = NULL;
+ else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
+ {
+ (*_bfd_error_handler)
+ (_("Malformed reloc detected for section %s"), name);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
else
{
h = sym_hashes[r_symndx - extsymoff];
@@ -7501,10 +7769,10 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
/* We may need a local GOT entry for this relocation. We
don't count R_MIPS_GOT_PAGE because we can estimate the
maximum number of pages needed by looking at the size of
- the segment. Similar comments apply to R_MIPS_GOT16. We
- don't count R_MIPS_GOT_HI16, or R_MIPS_CALL_HI16 because
- these are always followed by an R_MIPS_GOT_LO16 or
- R_MIPS_CALL_LO16.
+ the segment. Similar comments apply to R_MIPS_GOT16 and
+ R_MIPS_CALL16. We don't count R_MIPS_GOT_HI16, or
+ R_MIPS_CALL_HI16 because these are always followed by an
+ R_MIPS_GOT_LO16 or R_MIPS_CALL_LO16.
This estimation is very conservative since we can merge
duplicate entries in the GOT. In order to be less
@@ -7594,7 +7862,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
hmips = (struct mips_elf_link_hash_entry *) h;
++hmips->possibly_dynamic_relocs;
}
-
+
/* Even though we don't directly need a GOT entry for
this symbol, a symbol must have a dynamic symbol
table index greater that DT_MIPS_GOTSYM if there are
@@ -7604,7 +7872,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
return false;
}
- if (SGI_COMPAT (dynobj))
+ if (SGI_COMPAT (abfd))
mips_elf_hash_table (info)->compact_rel_size +=
sizeof (Elf32_External_crinfo);
break;
@@ -7613,7 +7881,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
case R_MIPS_GPREL16:
case R_MIPS_LITERAL:
case R_MIPS_GPREL32:
- if (SGI_COMPAT (dynobj))
+ if (SGI_COMPAT (abfd))
mips_elf_hash_table (info)->compact_rel_size +=
sizeof (Elf32_External_crinfo);
break;
@@ -7636,9 +7904,28 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
break;
}
+ /* We must not create a stub for a symbol that has relocations
+ related to taking the function's address. */
+ switch (r_type)
+ {
+ default:
+ if (h != NULL)
+ {
+ struct 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:
+ 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.
- References from a stub section do not count. */
+ References from a stub section do not count. */
if (h != NULL
&& r_type != R_MIPS16_26
&& strncmp (bfd_get_section_name (abfd, sec), FN_STUB,
@@ -7742,7 +8029,7 @@ _bfd_mips_elf_gc_sweep_hook (abfd, info, sec, relocs)
/* ??? It would seem that the existing MIPS code does no sort
of reference counting or whatnot on its GOT and PLT entries,
so it is not possible to garbage collect them at this time. */
- break;
+ break;
default:
break;
@@ -7752,6 +8039,28 @@ _bfd_mips_elf_gc_sweep_hook (abfd, info, sec, relocs)
return true;
}
+/* Copy data from a MIPS ELF indirect symbol to its direct symbol,
+ hiding the old indirect symbol. Process additional relocation
+ information. */
+
+void
+_bfd_mips_elf_copy_indirect_symbol (dir, ind)
+ struct elf_link_hash_entry *dir, *ind;
+{
+ struct mips_elf_link_hash_entry *dirmips, *indmips;
+
+ _bfd_elf_link_hash_copy_indirect (dir, ind);
+
+ dirmips = (struct mips_elf_link_hash_entry *) dir;
+ indmips = (struct mips_elf_link_hash_entry *) ind;
+ dirmips->possibly_dynamic_relocs += indmips->possibly_dynamic_relocs;
+ if (dirmips->min_dyn_reloc_index == 0
+ || (indmips->min_dyn_reloc_index != 0
+ && indmips->min_dyn_reloc_index < dirmips->min_dyn_reloc_index))
+ dirmips->min_dyn_reloc_index = indmips->min_dyn_reloc_index;
+ if (indmips->no_fn_stub)
+ dirmips->no_fn_stub = true;
+}
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
@@ -7788,12 +8097,12 @@ _bfd_mips_elf_adjust_dynamic_symbol (info, h)
if (! info->relocateable
&& hmips->possibly_dynamic_relocs != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- mips_elf_allocate_dynamic_relocations (dynobj,
+ mips_elf_allocate_dynamic_relocations (dynobj,
hmips->possibly_dynamic_relocs);
- /* For a function, create a stub, if needed. */
- if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ /* For a function, create a stub, if allowed. */
+ if (! hmips->no_fn_stub
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
if (! elf_hash_table (info)->dynamic_sections_created)
return true;
@@ -7805,7 +8114,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (info, h)
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
/* We need .stub section. */
- s = bfd_get_section_by_name (dynobj,
+ s = bfd_get_section_by_name (dynobj,
MIPS_ELF_STUB_SECTION_NAME (dynobj));
BFD_ASSERT (s != NULL);
@@ -7823,6 +8132,14 @@ _bfd_mips_elf_adjust_dynamic_symbol (info, h)
return true;
}
}
+ else if ((h->type == STT_FUNC)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0)
+ {
+ /* This will set the entry for this symbol in the GOT to 0, and
+ the dynamic linker will take care of this. */
+ h->root.u.def.value = 0;
+ return true;
+ }
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
@@ -7875,7 +8192,6 @@ _bfd_mips_elf_always_size_sections (output_bfd, info)
/* Check the mips16 stubs for a particular symbol, and see if we can
discard them. */
-/*ARGSUSED*/
static boolean
mips_elf_check_mips16_stubs (h, data)
struct mips_elf_link_hash_entry *h;
@@ -7889,7 +8205,7 @@ mips_elf_check_mips16_stubs (h, data)
being included in the link. */
h->fn_stub->_raw_size = 0;
h->fn_stub->_cooked_size = 0;
- h->fn_stub->flags &= ~ SEC_RELOC;
+ h->fn_stub->flags &= ~SEC_RELOC;
h->fn_stub->reloc_count = 0;
h->fn_stub->flags |= SEC_EXCLUDE;
}
@@ -7902,7 +8218,7 @@ mips_elf_check_mips16_stubs (h, data)
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->flags &= ~ SEC_RELOC;
+ h->call_stub->flags &= ~SEC_RELOC;
h->call_stub->reloc_count = 0;
h->call_stub->flags |= SEC_EXCLUDE;
}
@@ -7915,7 +8231,7 @@ mips_elf_check_mips16_stubs (h, data)
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->flags &= ~ SEC_RELOC;
+ h->call_fp_stub->flags &= ~SEC_RELOC;
h->call_fp_stub->reloc_count = 0;
h->call_fp_stub->flags |= SEC_EXCLUDE;
}
@@ -7945,9 +8261,9 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size
+ s->_raw_size
= strlen (ELF_DYNAMIC_INTERPRETER (output_bfd)) + 1;
- s->contents
+ s->contents
= (bfd_byte *) ELF_DYNAMIC_INTERPRETER (output_bfd);
}
}
@@ -8002,13 +8318,13 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
if ((target != NULL
&& (target->flags & SEC_READONLY) != 0
&& (target->flags & SEC_ALLOC) != 0)
- || strcmp (outname,
+ || strcmp (outname,
MIPS_ELF_REL_DYN_SECTION_NAME (output_bfd)) == 0)
reltext = true;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
- if (strcmp (name,
+ if (strcmp (name,
MIPS_ELF_REL_DYN_SECTION_NAME (output_bfd)) != 0)
s->reloc_count = 0;
}
@@ -8016,49 +8332,49 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
else if (strncmp (name, ".got", 4) == 0)
{
int i;
- bfd_size_type loadable_size = 0;
- bfd_size_type local_gotno;
- struct _bfd *sub;
+ bfd_size_type loadable_size = 0;
+ bfd_size_type local_gotno;
+ bfd *sub;
- BFD_ASSERT (elf_section_data (s) != NULL);
+ BFD_ASSERT (elf_section_data (s) != NULL);
g = (struct mips_got_info *) elf_section_data (s)->tdata;
- BFD_ASSERT (g != NULL);
-
- /* Calculate the total loadable size of the output. That
- will give us the maximum number of GOT_PAGE entries
- required. */
- for (sub = info->input_bfds; sub; sub = sub->link_next)
- {
- asection *subsection;
-
- for (subsection = sub->sections;
- subsection;
- subsection = subsection->next)
- {
- if ((subsection->flags & SEC_ALLOC) == 0)
- continue;
- loadable_size += (subsection->_raw_size + 0xf) & ~0xf;
- }
- }
- loadable_size += MIPS_FUNCTION_STUB_SIZE;
-
- /* Assume there are two loadable segments consisting of
- contiguous sections. Is 5 enough? */
- local_gotno = (loadable_size >> 16) + 5;
+ BFD_ASSERT (g != NULL);
+
+ /* Calculate the total loadable size of the output. That
+ will give us the maximum number of GOT_PAGE entries
+ required. */
+ for (sub = info->input_bfds; sub; sub = sub->link_next)
+ {
+ asection *subsection;
+
+ for (subsection = sub->sections;
+ subsection;
+ subsection = subsection->next)
+ {
+ if ((subsection->flags & SEC_ALLOC) == 0)
+ continue;
+ loadable_size += (subsection->_raw_size + 0xf) & ~0xf;
+ }
+ }
+ loadable_size += MIPS_FUNCTION_STUB_SIZE;
+
+ /* Assume there are two loadable segments consisting of
+ contiguous sections. Is 5 enough? */
+ local_gotno = (loadable_size >> 16) + 5;
if (IRIX_COMPAT (output_bfd) == ict_irix6)
/* It's possible we will need GOT_PAGE entries as well as
GOT16 entries. Often, these will be able to share GOT
entries, but not always. */
local_gotno *= 2;
- g->local_gotno += local_gotno;
- s->_raw_size += local_gotno * MIPS_ELF_GOT_SIZE (dynobj);
+ g->local_gotno += local_gotno;
+ s->_raw_size += local_gotno * MIPS_ELF_GOT_SIZE (dynobj);
- /* There has to be a global GOT entry for every symbol with
- a dynamic symbol table index of DT_MIPS_GOTSYM or
- higher. Therefore, it make sense to put those symbols
- that need GOT entries at the end of the symbol table. We
- do that here. */
+ /* There has to be a global GOT entry for every symbol with
+ a dynamic symbol table index of DT_MIPS_GOTSYM or
+ higher. Therefore, it make sense to put those symbols
+ that need GOT entries at the end of the symbol table. We
+ do that here. */
if (!mips_elf_sort_hash_table (info, 1))
return false;
@@ -8090,7 +8406,7 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
s->_raw_size += mips_elf_hash_table (info)->compact_rel_size;
else if (strcmp (name, MIPS_ELF_MSYM_SECTION_NAME (output_bfd))
== 0)
- s->_raw_size = (sizeof (Elf32_External_Msym)
+ s->_raw_size = (sizeof (Elf32_External_Msym)
* (elf_hash_table (info)->dynsymcount
+ bfd_count_sections (output_bfd)));
else if (strncmp (name, ".init", 5) != 0)
@@ -8123,22 +8439,30 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
dynamic linker and used by the debugger. */
if (! info->shared)
{
- if (SGI_COMPAT (output_bfd))
+ /* SGI object has the equivalence of DT_DEBUG in the
+ DT_MIPS_RLD_MAP entry. */
+ if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0))
+ return false;
+ if (!SGI_COMPAT (output_bfd))
{
- /* SGI object has the equivalence of DT_DEBUG in the
- DT_MIPS_RLD_MAP entry. */
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0))
+ if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
return false;
}
- else
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
- return false;
}
-
- if (reltext)
+ else
+ {
+ /* Shared libraries on traditional mips have DT_DEBUG. */
+ if (!SGI_COMPAT (output_bfd))
+ {
+ if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
+ return false;
+ }
+ }
+ if (reltext && SGI_COMPAT (output_bfd))
{
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0))
@@ -8157,11 +8481,17 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
return false;
}
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_CONFLICTNO, 0))
- return false;
+ if (SGI_COMPAT (output_bfd))
+ {
+ if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_CONFLICTNO, 0))
+ return false;
+ }
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LIBLISTNO, 0))
- return false;
+ if (SGI_COMPAT (output_bfd))
+ {
+ if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LIBLISTNO, 0))
+ return false;
+ }
if (bfd_get_section_by_name (dynobj, ".conflict") != NULL)
{
@@ -8217,12 +8547,12 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
return false;
if (IRIX_COMPAT (dynobj) == ict_irix6
- && (bfd_get_section_by_name
+ && (bfd_get_section_by_name
(dynobj, MIPS_ELF_OPTIONS_SECTION_NAME (dynobj)))
&& !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0))
return false;
- if (bfd_get_section_by_name (dynobj,
+ if (bfd_get_section_by_name (dynobj,
MIPS_ELF_MSYM_SECTION_NAME (dynobj))
&& !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_MSYM, 0))
return false;
@@ -8263,7 +8593,7 @@ mips_elf_irix6_finish_dynamic_symbol (abfd, name, sym)
int i;
for (i = 0; i < 2; ++i)
- for (p = (i == 0) ? text_section_symbols : data_section_symbols;
+ for (p = (i == 0) ? text_section_symbols : data_section_symbols;
*p;
++p)
if (strcmp (*p, name) == 0)
@@ -8271,13 +8601,13 @@ mips_elf_irix6_finish_dynamic_symbol (abfd, name, sym)
/* All of these symbols are given type STT_SECTION by the
IRIX6 linker. */
sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
-
+
/* The IRIX linker puts these symbols in special sections. */
if (i == 0)
sym->st_shndx = SHN_MIPS_TEXT;
else
sym->st_shndx = SHN_MIPS_DATA;
-
+
break;
}
}
@@ -8314,15 +8644,15 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
BFD_ASSERT (h->dynindx != -1);
- s = bfd_get_section_by_name (dynobj,
+ s = bfd_get_section_by_name (dynobj,
MIPS_ELF_STUB_SECTION_NAME (dynobj));
BFD_ASSERT (s != NULL);
/* Fill the stub. */
p = stub;
- bfd_put_32 (output_bfd, STUB_LW(output_bfd), p);
+ bfd_put_32 (output_bfd, STUB_LW (output_bfd), p);
p += 4;
- bfd_put_32 (output_bfd, STUB_MOVE, p);
+ bfd_put_32 (output_bfd, STUB_MOVE (output_bfd), p);
p += 4;
/* FIXME: Can h->dynindex be more than 64K? */
@@ -8331,7 +8661,7 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_put_32 (output_bfd, STUB_JALR, p);
p += 4;
- bfd_put_32 (output_bfd, STUB_LI16 + h->dynindx, p);
+ bfd_put_32 (output_bfd, STUB_LI16 (output_bfd) + h->dynindx, p);
BFD_ASSERT (h->plt.offset <= s->_raw_size);
memcpy (s->contents + h->plt.offset, stub, MIPS_FUNCTION_STUB_SIZE);
@@ -8347,7 +8677,8 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
sym->st_value = gval;
}
- BFD_ASSERT (h->dynindx != -1);
+ BFD_ASSERT (h->dynindx != -1
+ || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0);
sgot = mips_elf_got_section (dynobj);
BFD_ASSERT (sgot != NULL);
@@ -8366,19 +8697,24 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
if (sym->st_value)
value = sym->st_value;
else
- /* For an entity defined in a shared object, this will be
- NULL. (For functions in shared objects for
- which we have created stubs, ST_VALUE will be non-NULL.
- That's because such the functions are now no longer defined
- in a shared object.) */
- value = h->root.u.def.value;
-
+ {
+ /* For an entity defined in a shared object, this will be
+ NULL. (For functions in shared objects for
+ which we have created stubs, ST_VALUE will be non-NULL.
+ That's because such the functions are now no longer defined
+ in a shared object.) */
+
+ if (info->shared && h->root.type == bfd_link_hash_undefined)
+ value = 0;
+ else
+ value = h->root.u.def.value;
+ }
offset = mips_elf_global_got_index (dynobj, h);
MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
}
/* Create a .msym entry, if appropriate. */
- smsym = bfd_get_section_by_name (dynobj,
+ smsym = bfd_get_section_by_name (dynobj,
MIPS_ELF_MSYM_SECTION_NAME (dynobj));
if (smsym)
{
@@ -8388,7 +8724,7 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
/* It is undocumented what the `1' indicates, but IRIX6 uses
this value. */
msym.ms_info = ELF32_MS_INFO (mh->min_dyn_reloc_index, 1);
- bfd_mips_elf_swap_msym_out
+ bfd_mips_elf_swap_msym_out
(dynobj, &msym,
((Elf32_External_Msym *) smsym->contents) + h->dynindx);
}
@@ -8398,22 +8734,23 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
if (strcmp (name, "_DYNAMIC") == 0
|| strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
sym->st_shndx = SHN_ABS;
- else if (strcmp (name, "_DYNAMIC_LINK") == 0)
+ else if (strcmp (name, "_DYNAMIC_LINK") == 0
+ || strcmp (name, "_DYNAMIC_LINKING") == 0)
{
sym->st_shndx = SHN_ABS;
sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
sym->st_value = 1;
}
+ else if (strcmp (name, "_gp_disp") == 0)
+ {
+ sym->st_shndx = SHN_ABS;
+ sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
+ sym->st_value = elf_gp (output_bfd);
+ }
else if (SGI_COMPAT (output_bfd))
{
- if (strcmp (name, "_gp_disp") == 0)
- {
- sym->st_shndx = SHN_ABS;
- sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
- sym->st_value = elf_gp (output_bfd);
- }
- else if (strcmp (name, mips_elf_dynsym_rtproc_names[0]) == 0
- || strcmp (name, mips_elf_dynsym_rtproc_names[1]) == 0)
+ if (strcmp (name, mips_elf_dynsym_rtproc_names[0]) == 0
+ || strcmp (name, mips_elf_dynsym_rtproc_names[1]) == 0)
{
sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
sym->st_other = STO_PROTECTED;
@@ -8440,11 +8777,11 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
if (IRIX_COMPAT (output_bfd) == ict_irix6)
mips_elf_irix6_finish_dynamic_symbol (output_bfd, name, sym);
- if (SGI_COMPAT (output_bfd)
- && ! info->shared)
+ if (! info->shared)
{
if (! mips_elf_hash_table (info)->use_rld_obj_head
- && strcmp (name, "__rld_map") == 0)
+ && (strcmp (name, "__rld_map") == 0
+ || strcmp (name, "__RLD_MAP") == 0))
{
asection *s = bfd_get_section_by_name (dynobj, ".rld_map");
BFD_ASSERT (s != NULL);
@@ -8457,8 +8794,9 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
&& strcmp (name, "__rld_obj_head") == 0)
{
/* IRIX6 does not use a .rld_map section. */
- if (IRIX_COMPAT (output_bfd) == ict_irix5)
- BFD_ASSERT (bfd_get_section_by_name (dynobj, ".rld_map")
+ if (IRIX_COMPAT (output_bfd) == ict_irix5
+ || IRIX_COMPAT (output_bfd) == ict_none)
+ BFD_ASSERT (bfd_get_section_by_name (dynobj, ".rld_map")
!= NULL);
mips_elf_hash_table (info)->rld_value = sym->st_value;
}
@@ -8517,14 +8855,14 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
/* Read in the current dynamic entry. */
(*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn);
-
+
/* Assume that we're going to modify it and write it out. */
swap_out_p = true;
switch (dyn.d_tag)
{
case DT_RELENT:
- s = (bfd_get_section_by_name
+ s = (bfd_get_section_by_name
(dynobj,
MIPS_ELF_REL_DYN_SECTION_NAME (dynobj)));
BFD_ASSERT (s != NULL);
@@ -8577,7 +8915,7 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
dyn.d_un.d_val = s->_raw_size / elemsize;
}
else
- dyn.d_un.d_val = 0;
+ dyn.d_un.d_val = 0;
break;
case DT_MIPS_TIME_STAMP:
@@ -8642,13 +8980,13 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
break;
case DT_MIPS_OPTIONS:
- s = (bfd_get_section_by_name
+ s = (bfd_get_section_by_name
(output_bfd, MIPS_ELF_OPTIONS_SECTION_NAME (output_bfd)));
dyn.d_un.d_ptr = s->vma;
break;
case DT_MIPS_MSYM:
- s = (bfd_get_section_by_name
+ s = (bfd_get_section_by_name
(output_bfd, MIPS_ELF_MSYM_SECTION_NAME (output_bfd)));
dyn.d_un.d_ptr = s->vma;
break;
@@ -8659,18 +8997,18 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
}
if (swap_out_p)
- (*get_elf_backend_data (dynobj)->s->swap_dyn_out)
+ (*get_elf_backend_data (dynobj)->s->swap_dyn_out)
(dynobj, &dyn, b);
}
}
/* The first entry of the global offset table will be filled at
runtime. The second entry will be used by some runtime loaders.
- This isn't the case of Irix rld. */
+ This isn't the case of Irix rld. */
if (sgot != NULL && sgot->_raw_size > 0)
{
MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0, sgot->contents);
- MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0x80000000,
+ MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0x80000000,
sgot->contents + MIPS_ELF_GOT_SIZE (output_bfd));
}
@@ -8687,7 +9025,7 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
_bfd_elf_final_link. SGI sets the STT_NOTYPE attribute for these
symbols. Should we do so? */
- smsym = bfd_get_section_by_name (dynobj,
+ smsym = bfd_get_section_by_name (dynobj,
MIPS_ELF_MSYM_SECTION_NAME (dynobj));
if (smsym != NULL)
{
@@ -8700,7 +9038,7 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
{
long dynindx = elf_section_data (s)->dynindx;
- bfd_mips_elf_swap_msym_out
+ bfd_mips_elf_swap_msym_out
(output_bfd, &msym,
(((Elf32_External_Msym *) smsym->contents)
+ dynindx));
@@ -8725,7 +9063,7 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
s->contents));
/* Clean up a dummy stub function entry in .text. */
- s = bfd_get_section_by_name (dynobj,
+ s = bfd_get_section_by_name (dynobj,
MIPS_ELF_STUB_SECTION_NAME (dynobj));
if (s != NULL)
{
@@ -8739,8 +9077,25 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
}
}
+ /* We need to sort the entries of the dynamic relocation section. */
+
+ if (!ABI_64_P (output_bfd))
+ {
+ asection *reldyn;
+
+ reldyn = bfd_get_section_by_name (dynobj,
+ MIPS_ELF_REL_DYN_SECTION_NAME (dynobj));
+ if (reldyn != NULL && reldyn->reloc_count > 2)
+ {
+ reldyn_sorting_bfd = output_bfd;
+ qsort ((Elf32_External_Rel *) reldyn->contents + 1,
+ (size_t) reldyn->reloc_count - 1,
+ sizeof (Elf32_External_Rel), sort_dynamic_relocs);
+ }
+ }
+
/* Clean up a first relocation in .rel.dyn. */
- s = bfd_get_section_by_name (dynobj,
+ s = bfd_get_section_by_name (dynobj,
MIPS_ELF_REL_DYN_SECTION_NAME (dynobj));
if (s != NULL && s->_raw_size > 0)
memset (s->contents, 0, MIPS_ELF_REL_SIZE (dynobj));
@@ -8932,13 +9287,13 @@ error_return:
free (reloc_vector);
return NULL;
}
+
#define bfd_elf32_bfd_get_relocated_section_contents \
elf32_mips_get_relocated_section_contents
/* 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 =
-{
+static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
/* Symbol table magic number. */
magicSym,
/* Alignment of debugging information. E.g., 4. */
@@ -9032,6 +9387,11 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap =
#define elf_backend_got_header_size (4*MIPS_RESERVED_GOTNO)
#define elf_backend_plt_header_size 0
+#define elf_backend_copy_indirect_symbol \
+ _bfd_mips_elf_copy_indirect_symbol
+
+#define elf_backend_hide_symbol _bfd_mips_elf_hide_symbol
+
#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
@@ -9047,3 +9407,20 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap =
#define bfd_elf32_bfd_print_private_bfd_data \
_bfd_mips_elf_print_private_bfd_data
#include "elf32-target.h"
+
+/* Support for traditional mips targets */
+
+#define INCLUDED_TARGET_FILE /* More a type of flag */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define TARGET_LITTLE_SYM bfd_elf32_tradlittlemips_vec
+#define TARGET_LITTLE_NAME "elf32-tradlittlemips"
+#define TARGET_BIG_SYM bfd_elf32_tradbigmips_vec
+#define TARGET_BIG_NAME "elf32-tradbigmips"
+
+/* Include the target file again for this target */
+#include "elf32-target.h"
diff --git a/gnu/usr.bin/binutils/bfd/elf32-ppc.c b/gnu/usr.bin/binutils/bfd/elf32-ppc.c
index b405feaa1f5..ab803f44f44 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-ppc.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-ppc.c
@@ -1,5 +1,6 @@
/* PowerPC-specific support for 32-bit ELF
- Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -32,7 +33,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define USE_RELA /* we want RELA relocations, not REL */
-
static reloc_howto_type *ppc_elf_reloc_type_lookup
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
static void ppc_elf_info_to_howto
@@ -124,11 +124,27 @@ static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_i
/* The number of single-slot PLT entries (the rest use two slots). */
#define PLT_NUM_SINGLE_ENTRIES 8192
+/* Will references to this symbol always reference the symbol
+ in this object? */
+#define SYMBOL_REFERENCES_LOCAL(INFO, H) \
+ ((! INFO->shared \
+ || INFO->symbolic \
+ || H->dynindx == -1 \
+ || ELF_ST_VISIBILITY (H->other) == STV_INTERNAL \
+ || ELF_ST_VISIBILITY (H->other) == STV_HIDDEN) \
+ && (H->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
+
+/* Will _calls_ to this symbol always call the version in this object? */
+#define SYMBOL_CALLS_LOCAL(INFO, H) \
+ ((! INFO->shared \
+ || INFO->symbolic \
+ || H->dynindx == -1 \
+ || ELF_ST_VISIBILITY (H->other) != STV_DEFAULT) \
+ && (H->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
-static reloc_howto_type *ppc_elf_howto_table[ (int)R_PPC_max ];
+static reloc_howto_type *ppc_elf_howto_table[(int) R_PPC_max];
-static reloc_howto_type ppc_elf_howto_raw[] =
-{
+static reloc_howto_type ppc_elf_howto_raw[] = {
/* This reloc does nothing. */
HOWTO (R_PPC_NONE, /* type */
0, /* rightshift */
@@ -221,7 +237,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
false), /* pcrel_offset */
/* The high order 16 bits of an address, plus 1 if the contents of
- the low 16 bits, treated as a signed number, is negative. */
+ the low 16 bits, treated as a signed number, is negative. */
HOWTO (R_PPC_ADDR16_HA, /* type */
16, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -254,7 +270,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
/* An absolute 16 bit branch, for which bit 10 should be set to
indicate that the branch is expected to be taken. The lower two
- bits must be zero. */
+ bits must be zero. */
HOWTO (R_PPC_ADDR14_BRTAKEN, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -286,7 +302,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0xfffc, /* dst_mask */
false), /* pcrel_offset */
- /* A relative 26 bit branch; the lower two bits must be zero. */
+ /* A relative 26 bit branch; the lower two bits must be zero. */
HOWTO (R_PPC_REL24, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -301,7 +317,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0x3fffffc, /* dst_mask */
true), /* pcrel_offset */
- /* A relative 16 bit branch; the lower two bits must be zero. */
+ /* A relative 16 bit branch; the lower two bits must be zero. */
HOWTO (R_PPC_REL14, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -316,7 +332,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0xfffc, /* dst_mask */
true), /* pcrel_offset */
- /* A relative 16 bit branch. Bit 10 should be set to indicate that
+ /* A relative 16 bit branch. Bit 10 should be set to indicate that
the branch is expected to be taken. The lower two bits must be
zero. */
HOWTO (R_PPC_REL14_BRTAKEN, /* type */
@@ -333,7 +349,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0xfffc, /* dst_mask */
true), /* pcrel_offset */
- /* A relative 16 bit branch. Bit 10 should be set to indicate that
+ /* A relative 16 bit branch. Bit 10 should be set to indicate that
the branch is not expected to be taken. The lower two bits must
be zero. */
HOWTO (R_PPC_REL14_BRNTAKEN, /* type */
@@ -560,7 +576,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
true), /* pcrel_offset */
/* 32-bit relocation to the symbol's procedure linkage table.
- FIXME: not supported. */
+ FIXME: not supported. */
HOWTO (R_PPC_PLT32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -576,7 +592,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
false), /* pcrel_offset */
/* 32-bit PC relative relocation to the symbol's procedure linkage table.
- FIXME: not supported. */
+ FIXME: not supported. */
HOWTO (R_PPC_PLTREL32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -655,7 +671,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0xffff, /* dst_mask */
false), /* pcrel_offset */
- /* 32-bit section relative relocation. */
+ /* 32-bit section relative relocation. */
HOWTO (R_PPC_SECTOFF, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -670,7 +686,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0, /* dst_mask */
true), /* pcrel_offset */
- /* 16-bit lower half section relative relocation. */
+ /* 16-bit lower half section relative relocation. */
HOWTO (R_PPC_SECTOFF_LO, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -685,7 +701,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0xffff, /* dst_mask */
false), /* pcrel_offset */
- /* 16-bit upper half section relative relocation. */
+ /* 16-bit upper half section relative relocation. */
HOWTO (R_PPC_SECTOFF_HI, /* type */
16, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -700,7 +716,7 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0xffff, /* dst_mask */
false), /* pcrel_offset */
- /* 16-bit upper half adjusted section relative relocation. */
+ /* 16-bit upper half adjusted section relative relocation. */
HOWTO (R_PPC_SECTOFF_HA, /* type */
16, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
@@ -931,7 +947,6 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0xffff, /* dst_mask */
false), /* pcrel_offset */
};
-
/* Initialize the ppc_elf_howto_table, so that linear accesses can be done. */
@@ -943,11 +958,10 @@ ppc_elf_howto_init ()
for (i = 0; i < sizeof (ppc_elf_howto_raw) / sizeof (ppc_elf_howto_raw[0]); i++)
{
type = ppc_elf_howto_raw[i].type;
- BFD_ASSERT (type < sizeof(ppc_elf_howto_table) / sizeof(ppc_elf_howto_table[0]));
+ BFD_ASSERT (type < sizeof (ppc_elf_howto_table) / sizeof (ppc_elf_howto_table[0]));
ppc_elf_howto_table[type] = &ppc_elf_howto_raw[i];
}
}
-
/* This function handles relaxing for the PPC with option --mpc860c0[=<n>].
@@ -959,7 +973,7 @@ ppc_elf_howto_init ()
3/ The branch is taken.
4/ The branch is located in the last 5 words of a page.
(The EOP limit is 5 by default but may be specified as any value from 1-10.)
-
+
Our software solution is to detect these problematic branches in a
linker pass and modify them as follows:
1/ Unconditional branches - Since these are always predicted taken,
@@ -975,22 +989,22 @@ ppc_elf_howto_init ()
static int
ppc_elf_sort_rela (arg1, arg2)
- const void *arg1;
- const void *arg2;
+ const void *arg1;
+ const void *arg2;
{
const Elf_Internal_Rela **rela1 = (const Elf_Internal_Rela**) arg1;
const Elf_Internal_Rela **rela2 = (const Elf_Internal_Rela**) arg2;
- /* Sort by offset. */
+ /* Sort by offset. */
return ((*rela1)->r_offset - (*rela2)->r_offset);
}
static boolean
ppc_elf_relax_section (abfd, isec, link_info, again)
- bfd *abfd;
- asection *isec;
- struct bfd_link_info *link_info;
- boolean *again;
+ bfd *abfd;
+ asection *isec;
+ struct bfd_link_info *link_info;
+ boolean *again;
{
#define PAGESIZE 0x1000
@@ -1001,7 +1015,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
Elf_Internal_Rela **rela_comb = NULL;
int comb_curr, comb_count;
- /* We never have to do this more than once per input section. */
+ /* We never have to do this more than once per input section. */
*again = false;
/* If needed, initialize this section's cooked size. */
@@ -1009,13 +1023,13 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
isec->_cooked_size = isec->_raw_size;
/* We're only interested in text sections which overlap the
- troublesome area at the end of a page. */
+ troublesome area at the end of a page. */
if (link_info->mpc860c0 && (isec->flags & SEC_CODE) && isec->_cooked_size)
{
bfd_vma dot, end_page, end_section;
boolean section_modified;
- /* Get the section contents. */
+ /* Get the section contents. */
/* Get cached copy if it exists. */
if (elf_section_data (isec)->this_hdr.contents != NULL)
contents = elf_section_data (isec)->this_hdr.contents;
@@ -1024,42 +1038,42 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
/* Go get them off disk. */
contents = (bfd_byte *) bfd_malloc (isec->_raw_size);
if (contents == NULL)
- goto error_return;
+ goto error_return;
free_contents = contents;
if (! bfd_get_section_contents (abfd, isec, contents,
(file_ptr) 0, isec->_raw_size))
- goto error_return;
+ goto error_return;
}
comb_curr = 0;
comb_count = 0;
if (isec->reloc_count)
- {
+ {
unsigned n;
/* Get a copy of the native relocations. */
internal_relocs = _bfd_elf32_link_read_relocs (
- abfd, isec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ abfd, isec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
link_info->keep_memory);
if (internal_relocs == NULL)
goto error_return;
if (! link_info->keep_memory)
free_relocs = internal_relocs;
-
- /* Setup a faster access method for the reloc info we need. */
+
+ /* Setup a faster access method for the reloc info we need. */
rela_comb = (Elf_Internal_Rela**)
- bfd_malloc (isec->reloc_count*sizeof(Elf_Internal_Rela*));
+ bfd_malloc (isec->reloc_count*sizeof (Elf_Internal_Rela*));
if (rela_comb == NULL)
goto error_return;
- for (n=0; n<isec->reloc_count; ++n)
+ for (n = 0; n < isec->reloc_count; ++n)
{
long r_type;
-
+
r_type = ELF32_R_TYPE (internal_relocs[n].r_info);
- if (r_type < 0 || r_type >= (int)R_PPC_max)
+ if (r_type < 0 || r_type >= (int) R_PPC_max)
goto error_return;
-
+
/* Prologue constants are sometimes present in the ".text"
sections and they can be identified by their associated relocation.
We don't want to process those words and some others which
@@ -1067,37 +1081,37 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
conditional branches will have a relocation so we will
only ignore words that 1) have a reloc, and 2) the reloc
is not applicable to a conditional branch.
- The array rela_comb is built here for use in the EOP scan loop. */
+ The array rela_comb is built here for use in the EOP scan loop. */
switch (r_type)
{
case R_PPC_ADDR14_BRNTAKEN: /* absolute, predicted not taken */
- case R_PPC_REL14: /* relative cond. br. */
+ case R_PPC_REL14: /* relative cond. br. */
case R_PPC_REL14_BRNTAKEN: /* rel. cond. br., predicted not taken */
- /* We should check the instruction. */
+ /* We should check the instruction. */
break;
default:
- /* The word is not a conditional branch - ignore it. */
+ /* The word is not a conditional branch - ignore it. */
rela_comb[comb_count++] = &internal_relocs[n];
break;
}
}
if (comb_count > 1)
- qsort (rela_comb, (size_t) comb_count, sizeof (int), ppc_elf_sort_rela);
- }
+ qsort (rela_comb, (size_t) comb_count, sizeof (int), ppc_elf_sort_rela);
+ }
- /* Enumerate each EOP region that overlaps this section. */
+ /* Enumerate each EOP region that overlaps this section. */
end_section = isec->vma + isec->_cooked_size;
dot = end_page = (isec->vma | (PAGESIZE - 1)) + 1;
dot -= link_info->mpc860c0;
section_modified = false;
if (dot < isec->vma) /* Increment the start position if this section */
- dot = isec->vma; /* begins in the middle of its first EOP region. */
+ dot = isec->vma; /* begins in the middle of its first EOP region. */
for (;
dot < end_section;
dot += PAGESIZE, end_page += PAGESIZE)
{
- /* Check each word in this EOP region. */
+ /* Check each word in this EOP region. */
for (; dot < end_page; dot += 4)
{
bfd_vma isec_offset;
@@ -1105,7 +1119,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
boolean skip, modified;
/* Don't process this word if there is a relocation for it and
- the relocation indicates the word is not a conditional branch. */
+ the relocation indicates the word is not a conditional branch. */
skip = false;
isec_offset = dot - isec->vma;
for (; comb_curr<comb_count; ++comb_curr)
@@ -1121,7 +1135,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
}
if (skip) continue;
- /* Check the current word for a problematic conditional branch. */
+ /* Check the current word for a problematic conditional branch. */
#define BO0(insn) ((insn) & 0x02000000)
#define BO2(insn) ((insn) & 0x00800000)
#define BO4(insn) ((insn) & 0x00200000)
@@ -1134,7 +1148,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
{
bfd_vma target;
/* This branch is predicted as "normal".
- If this is a forward branch, it is problematic. */
+ If this is a forward branch, it is problematic. */
target = insn & 0x0000Fffc; /*extract*/
target = (target ^ 0x8000) - 0x8000; /*sign extend*/
@@ -1155,7 +1169,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
/* This branch is predicted as not-taken.
If this is a forward branch, it is problematic.
Since we can't tell statically if it will branch forward,
- always set the prediction bit. */
+ always set the prediction bit. */
insn |= 0x00200000; /* set the prediction bit */
modified = true;
}
@@ -1168,7 +1182,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
/* This branch is predicted as not-taken.
If this is a forward branch, it is problematic.
Since we can't tell statically if it will branch forward,
- always set the prediction bit. */
+ always set the prediction bit. */
insn |= 0x00200000; /* set the prediction bit */
modified = true;
}
@@ -1225,7 +1239,6 @@ error_return:
free (free_contents);
return false;
}
-
static reloc_howto_type *
ppc_elf_reloc_type_lookup (abfd, code)
@@ -1235,13 +1248,13 @@ ppc_elf_reloc_type_lookup (abfd, code)
enum elf_ppc_reloc_type ppc_reloc = R_PPC_NONE;
if (!ppc_elf_howto_table[R_PPC_ADDR32])
- /* Initialize howto table if needed */
+ /* Initialize howto table if needed. */
ppc_elf_howto_init ();
- switch ((int)code)
+ switch ((int) code)
{
default:
- return (reloc_howto_type *)NULL;
+ return (reloc_howto_type *) NULL;
case BFD_RELOC_NONE: ppc_reloc = R_PPC_NONE; break;
case BFD_RELOC_32: ppc_reloc = R_PPC_ADDR32; break;
@@ -1298,7 +1311,7 @@ ppc_elf_reloc_type_lookup (abfd, code)
case BFD_RELOC_VTABLE_ENTRY: ppc_reloc = R_PPC_GNU_VTENTRY; break;
}
- return ppc_elf_howto_table[ (int)ppc_reloc ];
+ return ppc_elf_howto_table[(int) ppc_reloc];
};
/* Set the howto pointer for a PowerPC ELF reloc. */
@@ -1309,7 +1322,8 @@ ppc_elf_info_to_howto (abfd, cache_ptr, dst)
arelent *cache_ptr;
Elf32_Internal_Rela *dst;
{
- if (!ppc_elf_howto_table[ R_PPC_ADDR32 ]) /* Initialize howto table if needed */
+ if (!ppc_elf_howto_table[R_PPC_ADDR32])
+ /* Initialize howto table if needed. */
ppc_elf_howto_init ();
BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_PPC_max);
@@ -1354,7 +1368,7 @@ ppc_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section,
return bfd_reloc_continue;
}
-/* Function to set whether a module needs the -mrelocatable bit set. */
+/* Function to set whether a module needs the -mrelocatable bit set. */
static boolean
ppc_elf_set_private_flags (abfd, flags)
@@ -1399,21 +1413,8 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
boolean error;
/* Check if we have the same endianess */
- if (ibfd->xvec->byteorder != obfd->xvec->byteorder
- && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
- {
- const char *msg;
-
- if (bfd_big_endian (ibfd))
- msg = _("%s: compiled for a big endian system and target is little endian");
- else
- msg = _("%s: compiled for a little endian system and target is big endian");
-
- (*_bfd_error_handler) (msg, bfd_get_filename (ibfd));
-
- bfd_set_error (bfd_error_wrong_format);
- return false;
- }
+ if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+ return false;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -1475,7 +1476,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+ bfd_get_filename (ibfd), (long) new_flags, (long) old_flags);
}
if (error)
@@ -1487,7 +1488,6 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
return true;
}
-
/* Handle a PowerPC specific section when reading an object file. This
is called when elfcode.h finds a section with an unknown type. */
@@ -1515,7 +1515,6 @@ ppc_elf_section_from_shdr (abfd, hdr, name)
bfd_set_section_flags (abfd, newsect, flags);
return true;
}
-
/* Set up any other section flags and such that may be necessary. */
@@ -1533,7 +1532,6 @@ ppc_elf_fake_sections (abfd, shdr, asect)
return true;
}
-
/* Create a special linker section */
static elf_linker_section_t *
@@ -1577,10 +1575,10 @@ ppc_elf_create_linker_section (abfd, info, which)
default:
(*_bfd_error_handler) (_("%s: Unknown special linker type %d"),
bfd_get_filename (abfd),
- (int)which);
+ (int) which);
bfd_set_error (bfd_error_bad_value);
- return (elf_linker_section_t *)0;
+ return (elf_linker_section_t *) 0;
case LINKER_SECTION_SDATA: /* .sdata/.sbss section */
defaults.name = ".sdata";
@@ -1605,10 +1603,9 @@ ppc_elf_create_linker_section (abfd, info, which)
return lsect;
}
-
-/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we need to bump up
- the number of section headers. */
+/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we
+ need to bump up the number of section headers. */
static int
ppc_elf_additional_program_headers (abfd)
@@ -1634,7 +1631,7 @@ ppc_elf_additional_program_headers (abfd)
return ret;
}
-/* Modify the segment map if needed */
+/* Modify the segment map if needed. */
static boolean
ppc_elf_modify_segment_map (abfd)
@@ -1655,7 +1652,7 @@ ppc_elf_create_dynamic_sections (abfd, info)
register asection *s;
flagword flags;
- if (!_bfd_elf_create_dynamic_sections(abfd, info))
+ if (!_bfd_elf_create_dynamic_sections (abfd, info))
return false;
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
@@ -1708,7 +1705,6 @@ ppc_elf_adjust_dynamic_symbol (info, h)
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)));
-
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later,
when we know the address of the .got section. */
@@ -1716,9 +1712,7 @@ ppc_elf_adjust_dynamic_symbol (info, h)
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
if (! elf_hash_table (info)->dynamic_sections_created
- || ((!info->shared || info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) != 0)
+ || SYMBOL_CALLS_LOCAL (info, h)
|| (info->shared && h->plt.refcount <= 0))
{
/* A PLT entry is not required/allowed when:
@@ -1726,9 +1720,8 @@ ppc_elf_adjust_dynamic_symbol (info, h)
1. We are not using ld.so; because then the PLT entry
can't be set up, so we can't use one.
- 2. We know for certain that a symbol is defined in
- this object, because this object is the application,
- is linked with -Bsymbolic, or because the symbol is local.
+ 2. We know for certain that a call to this symbol
+ will go to this object.
3. GC has rendered the entry unused.
Note, however, that in an executable all references to the
@@ -1877,7 +1870,6 @@ ppc_elf_adjust_dynamic_symbol (info, h)
return true;
}
-
/* Set the sizes of the dynamic sections. */
@@ -1919,10 +1911,10 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
stripped from the output file below. */
static char *rela_sections[] = { ".rela.got", ".rela.sdata",
".rela.sdata2", ".rela.sbss",
- (char *)0 };
+ (char *) 0 };
char **p;
- for (p = rela_sections; *p != (char *)0; p++)
+ for (p = rela_sections; *p != (char *) 0; p++)
{
s = bfd_get_section_by_name (dynobj, *p);
if (s != NULL)
@@ -1984,7 +1976,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
asection *target;
const char *outname;
- /* Remember whether there are any relocation sections. */
+ /* Remember whether there are any relocation sections. */
relocs = true;
/* If this relocation section applies to a read only
@@ -2057,12 +2049,12 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
{
if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
return true;
}
-
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
@@ -2106,7 +2098,6 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
return false;
}
-
if ((sdata2 = elf_linker_section (abfd, LINKER_SECTION_SDATA2)) == NULL)
{
sdata2 = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA2);
@@ -2119,7 +2110,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
local_got_refcounts = elf_local_got_refcounts (abfd);
sym_hashes = elf_sym_hashes (abfd);
- sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym);
+ sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
if (!elf_bad_symtab (abfd))
sym_hashes_end -= symtab_hdr->sh_info;
@@ -2250,7 +2241,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
((*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
bfd_get_filename (abfd), "R_PPC_EMB_SDAI16"));
- return false;
+ return false;
}
if (srelgot == NULL && (h != NULL || info->shared))
@@ -2319,7 +2310,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
((*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
bfd_get_filename (abfd),
- ppc_elf_howto_table[(int)ELF32_R_TYPE (rel->r_info)]->name));
+ ppc_elf_howto_table[(int) ELF32_R_TYPE (rel->r_info)]->name));
return false;
}
break;
@@ -2397,7 +2388,8 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC_REL14_BRNTAKEN:
case R_PPC_REL32:
if (h == NULL
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
+ || SYMBOL_REFERENCES_LOCAL (info, h))
break;
/* fall through */
@@ -2540,7 +2532,7 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
if (h->got.refcount > 0)
h->got.refcount--;
}
- else
+ else if (local_got_refcounts != NULL)
{
if (local_got_refcounts[r_symndx] > 0)
local_got_refcounts[r_symndx]--;
@@ -2571,7 +2563,6 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
/* Hook called by the linker routine which adds symbols from an object
file. We use it to put .comm items in .sbss, and not .bss. */
-/*ARGSUSED*/
static boolean
ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd *abfd;
@@ -2623,7 +2614,6 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
return true;
}
-
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
@@ -2691,7 +2681,7 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
Otherwise, the PLT entry would provide a definition for
the symbol even if the symbol wasn't defined anywhere,
and so the symbol would never be NULL. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
== 0)
sym->st_value = 0;
}
@@ -2719,8 +2709,7 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
the global offset table will already have been initialized in
the relocate_section function. */
if (info->shared
- && (info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ && SYMBOL_REFERENCES_LOCAL (info, h))
{
rela.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
rela.r_addend = (h->root.u.def.value
@@ -2729,7 +2718,7 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
else
{
- BFD_ASSERT((h->got.offset & 1) == 0);
+ BFD_ASSERT ((h->got.offset & 1) == 0);
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_GLOB_DAT);
rela.r_addend = 0;
@@ -2785,7 +2774,6 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
return true;
}
-
/* Finish up the dynamic sections. */
@@ -2873,7 +2861,6 @@ ppc_elf_finish_dynamic_sections (output_bfd, info)
return true;
}
-
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
@@ -2934,11 +2921,12 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, %ld relocations%s\n",
bfd_get_filename (input_bfd),
bfd_section_name(input_bfd, input_section),
- (long)input_section->reloc_count,
+ (long) input_section->reloc_count,
(info->relocateable) ? " (relocatable)" : "");
#endif
- if (!ppc_elf_howto_table[ R_PPC_ADDR32 ]) /* Initialize howto table if needed */
+ if (!ppc_elf_howto_table[R_PPC_ADDR32])
+ /* Initialize howto table if needed. */
ppc_elf_howto_init ();
local_got_offsets = elf_local_got_offsets (input_bfd);
@@ -2956,27 +2944,29 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma offset = rel->r_offset;
bfd_vma addend = rel->r_addend;
bfd_reloc_status_type r = bfd_reloc_other;
- Elf_Internal_Sym *sym = (Elf_Internal_Sym *)0;
- asection *sec = (asection *)0;
- struct elf_link_hash_entry *h = (struct elf_link_hash_entry *)0;
- const char *sym_name = (const char *)0;
+ Elf_Internal_Sym *sym = (Elf_Internal_Sym *) 0;
+ asection *sec = (asection *) 0;
+ struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) 0;
+ const char *sym_name = (const char *) 0;
reloc_howto_type *howto;
unsigned long r_symndx;
bfd_vma relocation;
+ int will_become_local;
/* Unknown relocation handling */
- if ((unsigned)r_type >= (unsigned)R_PPC_max || !ppc_elf_howto_table[(int)r_type])
+ if ((unsigned) r_type >= (unsigned) R_PPC_max
+ || !ppc_elf_howto_table[(int) r_type])
{
(*_bfd_error_handler) (_("%s: unknown relocation type %d"),
bfd_get_filename (input_bfd),
- (int)r_type);
+ (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = false;
continue;
}
- howto = ppc_elf_howto_table[(int)r_type];
+ howto = ppc_elf_howto_table[(int) r_type];
r_symndx = ELF32_R_SYM (rel->r_info);
if (info->relocateable)
@@ -2988,7 +2978,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
- if ((unsigned)ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ if ((unsigned) ELF_ST_TYPE (sym->st_info) == STT_SECTION)
{
sec = local_sections[r_symndx];
addend = rel->r_addend += sec->output_offset + sym->st_value;
@@ -2998,10 +2988,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
#ifdef DEBUG
fprintf (stderr, "\ttype = %s (%d), symbol index = %ld, offset = %ld, addend = %ld\n",
howto->name,
- (int)r_type,
+ (int) r_type,
r_symndx,
- (long)offset,
- (long)addend);
+ (long) offset,
+ (long) addend);
#endif
continue;
}
@@ -3016,6 +3006,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
+ /* Relocs to local symbols are always resolved. */
+ will_become_local = 1;
}
else
{
@@ -3024,11 +3016,17 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
sym_name = h->root.root.string;
+
+ /* Can this relocation be resolved immediately? */
+ will_become_local = SYMBOL_REFERENCES_LOCAL (info, h);
+
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
sec = h->root.u.def.section;
- if ((r_type == R_PPC_PLT32
+ if (((r_type == R_PPC_PLT32
+ || r_type == R_PPC_PLTREL24)
+ && splt != NULL
&& h->plt.offset != (bfd_vma) -1)
|| (r_type == R_PPC_LOCAL24PC
&& sec->output_section == NULL)
@@ -3037,20 +3035,17 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_PPC_GOT16_HI
|| r_type == R_PPC_GOT16_HA)
&& elf_hash_table (info)->dynamic_sections_created
- && (! info->shared
- || (! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ && (! info->shared || ! will_become_local))
|| (info->shared
- && ((! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && ! will_become_local
&& ((input_section->flags & SEC_ALLOC) != 0
/* Testing SEC_DEBUGGING here may be wrong.
It's here to avoid a crash when
generating a shared library with DWARF
debugging information. */
- || (input_section->flags & SEC_DEBUGGING) != 0)
+ || ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
&& (r_type == R_PPC_ADDR32
|| r_type == R_PPC_ADDR24
|| r_type == R_PPC_ADDR16
@@ -3060,7 +3055,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_PPC_ADDR14
|| r_type == R_PPC_ADDR14_BRTAKEN
|| r_type == R_PPC_ADDR14_BRNTAKEN
- || r_type == R_PPC_PLTREL24
|| r_type == R_PPC_COPY
|| r_type == R_PPC_GLOB_DAT
|| r_type == R_PPC_JMP_SLOT
@@ -3094,13 +3088,13 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = 0;
}
else if (sec->output_section == NULL)
- {
+ {
(*_bfd_error_handler)
(_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
bfd_get_filename (input_bfd), h->root.root.string,
bfd_get_section_name (input_bfd, input_section));
relocation = 0;
- }
+ }
else
relocation = (h->root.u.def.value
+ sec->output_section->vma
@@ -3108,13 +3102,12 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic
- && !info->no_undefined
+ else if (info->shared && !info->symbolic && !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
else
{
- if (! (*info->callbacks->undefined_symbol)(info,
+ if (! (*info->callbacks->undefined_symbol) (info,
h->root.root.string,
input_bfd,
input_section,
@@ -3127,19 +3120,19 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
- switch ((int)r_type)
+ switch ((int) r_type)
{
default:
(*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"),
bfd_get_filename (input_bfd),
- (int)r_type, sym_name);
+ (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = false;
continue;
/* Relocations that need no special processing. */
- case (int)R_PPC_LOCAL24PC:
+ case (int) R_PPC_LOCAL24PC:
/* It makes no sense to point a local relocation
at a symbol not in this object. */
if (h != NULL
@@ -3160,28 +3153,29 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* Relocations that may need to be propagated if this is a shared
object. */
- case (int)R_PPC_REL24:
- case (int)R_PPC_REL32:
- case (int)R_PPC_REL14:
+ case (int) R_PPC_REL24:
+ case (int) R_PPC_REL32:
+ case (int) R_PPC_REL14:
/* If these relocations are not to a named symbol, they can be
handled right here, no need to bother the dynamic linker. */
if (h == NULL
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
+ || SYMBOL_REFERENCES_LOCAL (info, h))
break;
/* fall through */
/* Relocations that always need to be propagated if this is a shared
object. */
- case (int)R_PPC_NONE:
- case (int)R_PPC_ADDR32:
- case (int)R_PPC_ADDR24:
- case (int)R_PPC_ADDR16:
- case (int)R_PPC_ADDR16_LO:
- case (int)R_PPC_ADDR16_HI:
- case (int)R_PPC_ADDR16_HA:
- case (int)R_PPC_ADDR14:
- case (int)R_PPC_UADDR32:
- case (int)R_PPC_UADDR16:
+ case (int) R_PPC_NONE:
+ case (int) R_PPC_ADDR32:
+ case (int) R_PPC_ADDR24:
+ case (int) R_PPC_ADDR16:
+ case (int) R_PPC_ADDR16_LO:
+ case (int) R_PPC_ADDR16_HI:
+ case (int) R_PPC_ADDR16_HA:
+ case (int) R_PPC_ADDR14:
+ case (int) R_PPC_UADDR32:
+ case (int) R_PPC_UADDR16:
if (info->shared)
{
Elf_Internal_Rela outrel;
@@ -3241,12 +3235,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
memset (&outrel, 0, sizeof outrel);
/* h->dynindx may be -1 if this symbol was marked to
become local. */
- else if (h != NULL
- && ((! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ else if (! will_become_local)
{
- BFD_ASSERT (h->dynindx != -1);
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
outrel.r_addend = rel->r_addend;
}
@@ -3283,11 +3273,11 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- BFD_ASSERT(indx > 0);
+ BFD_ASSERT (indx > 0);
#ifdef DEBUG
if (indx <= 0)
{
- printf("indx=%d section=%s flags=%08x name=%s\n",
+ printf ("indx=%d section=%s flags=%08x name=%s\n",
indx, osec->name, osec->flags,
h->root.root.string);
}
@@ -3328,8 +3318,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
/* branch taken prediction relocations */
- case (int)R_PPC_ADDR14_BRTAKEN:
- case (int)R_PPC_REL14_BRTAKEN:
+ case (int) R_PPC_ADDR14_BRTAKEN:
+ case (int) R_PPC_REL14_BRTAKEN:
insn = bfd_get_32 (output_bfd, contents + offset);
if ((relocation - offset) & 0x8000)
insn &= ~BRANCH_PREDICT_BIT;
@@ -3339,8 +3329,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
/* branch not taken predicition relocations */
- case (int)R_PPC_ADDR14_BRNTAKEN:
- case (int)R_PPC_REL14_BRNTAKEN:
+ case (int) R_PPC_ADDR14_BRNTAKEN:
+ case (int) R_PPC_REL14_BRNTAKEN:
insn = bfd_get_32 (output_bfd, contents + offset);
if ((relocation - offset) & 0x8000)
insn |= BRANCH_PREDICT_BIT;
@@ -3350,10 +3340,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
/* GOT16 relocations */
- case (int)R_PPC_GOT16:
- case (int)R_PPC_GOT16_LO:
- case (int)R_PPC_GOT16_HI:
- case (int)R_PPC_GOT16_HA:
+ case (int) R_PPC_GOT16:
+ case (int) R_PPC_GOT16_LO:
+ case (int) R_PPC_GOT16_HI:
+ case (int) R_PPC_GOT16_HA:
/* Relocation is to the entry for this symbol in the global
offset table. */
BFD_ASSERT (sgot != NULL);
@@ -3367,8 +3357,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (! elf_hash_table (info)->dynamic_sections_created
|| (info->shared
- && (info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ && SYMBOL_REFERENCES_LOCAL (info, h)))
{
/* This is actually a static link, or it is a
-Bsymbolic link and the symbol is defined
@@ -3441,7 +3430,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
/* Indirect .sdata relocation */
- case (int)R_PPC_EMB_SDAI16:
+ case (int) R_PPC_EMB_SDAI16:
BFD_ASSERT (sdata != NULL);
relocation = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd, info,
sdata, h, relocation, rel,
@@ -3449,7 +3438,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
/* Indirect .sdata2 relocation */
- case (int)R_PPC_EMB_SDA2I16:
+ case (int) R_PPC_EMB_SDA2I16:
BFD_ASSERT (sdata2 != NULL);
relocation = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd, info,
sdata2, h, relocation, rel,
@@ -3460,8 +3449,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
section, not the actual VMA. This is appropriate when generating
an embedded ELF object, for which the .got section acts like the
AIX .toc section. */
- case (int)R_PPC_TOC16: /* phony GOT16 relocations */
- BFD_ASSERT (sec != (asection *)0);
+ case (int) R_PPC_TOC16: /* phony GOT16 relocations */
+ BFD_ASSERT (sec != (asection *) 0);
BFD_ASSERT (bfd_is_und_section (sec)
|| strcmp (bfd_get_section_name (abfd, sec), ".got") == 0
|| strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0)
@@ -3469,7 +3458,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
addend -= sec->output_section->vma + sec->output_offset + 0x8000;
break;
- case (int)R_PPC_PLTREL24:
+ case (int) R_PPC_PLTREL24:
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
BFD_ASSERT (h != NULL);
@@ -3486,14 +3475,14 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (splt->output_section->vma
+ splt->output_offset
+ h->plt.offset);
- break;
+ break;
/* relocate against _SDA_BASE_ */
- case (int)R_PPC_SDAREL16:
+ case (int) R_PPC_SDAREL16:
{
const char *name;
- BFD_ASSERT (sec != (asection *)0);
+ BFD_ASSERT (sec != (asection *) 0);
name = bfd_get_section_name (abfd, sec->output_section);
if (strcmp (name, ".sdata") != 0
&& strcmp (name, ".sbss") != 0)
@@ -3501,7 +3490,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
bfd_get_filename (input_bfd),
sym_name,
- ppc_elf_howto_table[ (int)r_type ]->name,
+ ppc_elf_howto_table[(int) r_type]->name,
name);
}
addend -= (sdata->sym_hash->root.u.def.value
@@ -3510,22 +3499,21 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
break;
-
/* relocate against _SDA2_BASE_ */
- case (int)R_PPC_EMB_SDA2REL:
+ case (int) R_PPC_EMB_SDA2REL:
{
const char *name;
- BFD_ASSERT (sec != (asection *)0);
+ BFD_ASSERT (sec != (asection *) 0);
name = bfd_get_section_name (abfd, sec->output_section);
if (strcmp (name, ".sdata2") != 0 && strcmp (name, ".sbss2") != 0)
{
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
bfd_get_filename (input_bfd),
sym_name,
- ppc_elf_howto_table[ (int)r_type ]->name,
+ ppc_elf_howto_table[(int) r_type]->name,
name);
-
+
bfd_set_error (bfd_error_bad_value);
ret = false;
continue;
@@ -3536,15 +3524,14 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
break;
-
/* relocate against either _SDA_BASE_, _SDA2_BASE_, or 0 */
- case (int)R_PPC_EMB_SDA21:
- case (int)R_PPC_EMB_RELSDA:
+ case (int) R_PPC_EMB_SDA21:
+ case (int) R_PPC_EMB_RELSDA:
{
const char *name;
int reg;
- BFD_ASSERT (sec != (asection *)0);
+ BFD_ASSERT (sec != (asection *) 0);
name = bfd_get_section_name (abfd, sec->output_section);
if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0)
{
@@ -3554,7 +3541,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ sdata->sym_hash->root.u.def.section->output_offset);
}
- else if (strcmp (name, ".sdata2") == 0 || strcmp (name, ".sbss2") == 0)
+ else if (strcmp (name, ".sdata2") == 0
+ || strcmp (name, ".sbss2") == 0)
{
reg = 2;
addend -= (sdata2->sym_hash->root.u.def.value
@@ -3562,7 +3550,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ sdata2->sym_hash->root.u.def.section->output_offset);
}
- else if (strcmp (name, ".PPC.EMB.sdata0") == 0 || strcmp (name, ".PPC.EMB.sbss0") == 0)
+ else if (strcmp (name, ".PPC.EMB.sdata0") == 0
+ || strcmp (name, ".PPC.EMB.sbss0") == 0)
{
reg = 0;
}
@@ -3572,7 +3561,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
bfd_get_filename (input_bfd),
sym_name,
- ppc_elf_howto_table[ (int)r_type ]->name,
+ ppc_elf_howto_table[(int) r_type]->name,
name);
bfd_set_error (bfd_error_bad_value);
@@ -3590,75 +3579,74 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
/* Relocate against the beginning of the section */
- case (int)R_PPC_SECTOFF:
- case (int)R_PPC_SECTOFF_LO:
- case (int)R_PPC_SECTOFF_HI:
- BFD_ASSERT (sec != (asection *)0);
+ case (int) R_PPC_SECTOFF:
+ case (int) R_PPC_SECTOFF_LO:
+ case (int) R_PPC_SECTOFF_HI:
+ BFD_ASSERT (sec != (asection *) 0);
addend -= sec->output_section->vma;
break;
- case (int)R_PPC_SECTOFF_HA:
- BFD_ASSERT (sec != (asection *)0);
+ case (int) R_PPC_SECTOFF_HA:
+ BFD_ASSERT (sec != (asection *) 0);
addend -= sec->output_section->vma;
addend += ((relocation + addend) & 0x8000) << 1;
break;
/* Negative relocations */
- case (int)R_PPC_EMB_NADDR32:
- case (int)R_PPC_EMB_NADDR16:
- case (int)R_PPC_EMB_NADDR16_LO:
- case (int)R_PPC_EMB_NADDR16_HI:
- addend -= 2*relocation;
+ case (int) R_PPC_EMB_NADDR32:
+ case (int) R_PPC_EMB_NADDR16:
+ case (int) R_PPC_EMB_NADDR16_LO:
+ case (int) R_PPC_EMB_NADDR16_HI:
+ addend -= 2 * relocation;
break;
- case (int)R_PPC_EMB_NADDR16_HA:
- addend -= 2*relocation;
+ case (int) R_PPC_EMB_NADDR16_HA:
+ addend -= 2 * relocation;
addend += ((relocation + addend) & 0x8000) << 1;
break;
/* NOP relocation that prevents garbage collecting linkers from omitting a
reference. */
- case (int)R_PPC_EMB_MRKREF:
+ case (int) R_PPC_EMB_MRKREF:
continue;
- case (int)R_PPC_COPY:
- case (int)R_PPC_GLOB_DAT:
- case (int)R_PPC_JMP_SLOT:
- case (int)R_PPC_RELATIVE:
- case (int)R_PPC_PLT32:
- case (int)R_PPC_PLTREL32:
- case (int)R_PPC_PLT16_LO:
- case (int)R_PPC_PLT16_HI:
- case (int)R_PPC_PLT16_HA:
- case (int)R_PPC_EMB_RELSEC16:
- case (int)R_PPC_EMB_RELST_LO:
- case (int)R_PPC_EMB_RELST_HI:
- case (int)R_PPC_EMB_RELST_HA:
- case (int)R_PPC_EMB_BIT_FLD:
+ case (int) R_PPC_COPY:
+ case (int) R_PPC_GLOB_DAT:
+ case (int) R_PPC_JMP_SLOT:
+ case (int) R_PPC_RELATIVE:
+ case (int) R_PPC_PLT32:
+ case (int) R_PPC_PLTREL32:
+ case (int) R_PPC_PLT16_LO:
+ case (int) R_PPC_PLT16_HI:
+ case (int) R_PPC_PLT16_HA:
+ case (int) R_PPC_EMB_RELSEC16:
+ case (int) R_PPC_EMB_RELST_LO:
+ case (int) R_PPC_EMB_RELST_HI:
+ case (int) R_PPC_EMB_RELST_HA:
+ case (int) R_PPC_EMB_BIT_FLD:
(*_bfd_error_handler) (_("%s: Relocation %s is not yet supported for symbol %s."),
bfd_get_filename (input_bfd),
- ppc_elf_howto_table[ (int)r_type ]->name,
+ ppc_elf_howto_table[(int) r_type]->name,
sym_name);
bfd_set_error (bfd_error_invalid_operation);
ret = false;
continue;
- case (int)R_PPC_GNU_VTINHERIT:
- case (int)R_PPC_GNU_VTENTRY:
+ case (int) R_PPC_GNU_VTINHERIT:
+ case (int) R_PPC_GNU_VTENTRY:
/* These are no-ops in the end. */
continue;
}
-
#ifdef DEBUG
fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n",
howto->name,
- (int)r_type,
+ (int) r_type,
sym_name,
r_symndx,
- (long)offset,
- (long)addend);
+ (long) offset,
+ (long) addend);
#endif
r = _bfd_final_link_relocate (howto,
@@ -3702,7 +3690,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
- if (! (*info->callbacks->reloc_overflow)(info,
+ if (! (*info->callbacks->reloc_overflow) (info,
name,
howto->name,
(bfd_vma) 0,
@@ -3721,7 +3709,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
return ret;
}
-
#define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec
#define TARGET_LITTLE_NAME "elf32-powerpcle"
diff --git a/gnu/usr.bin/binutils/bfd/elf32-sparc.c b/gnu/usr.bin/binutils/bfd/elf32-sparc.c
index 1c8d0ba275a..091cd3917f7 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-sparc.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-sparc.c
@@ -1,5 +1,5 @@
/* SPARC-specific support for 32-bit ELF
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/sparc.h"
+#include "opcode/sparc.h"
static reloc_howto_type *elf32_sparc_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
@@ -36,6 +37,8 @@ static boolean elf32_sparc_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static boolean elf32_sparc_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
+static boolean elf32_sparc_relax_section
+ PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
static boolean elf32_sparc_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -82,7 +85,7 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] =
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,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0x00000000,true),
+ HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true),
HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PLT32", false,0,0x00000000,true),
HOWTO(R_SPARC_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),
@@ -117,16 +120,15 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] =
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
- HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
- HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
- HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true),
+ HOWTO(R_SPARC_UA64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", false,0,(~ (bfd_vma)0), true),
+ HOWTO(R_SPARC_UA16, 0,1,16,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", false,0,0x0000ffff,true),
+ HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true),
};
static reloc_howto_type elf32_sparc_vtinherit_howto =
HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,false,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", false,0, 0, false);
static reloc_howto_type elf32_sparc_vtentry_howto =
HOWTO (R_SPARC_GNU_VTENTRY, 0,2,0,false,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_SPARC_GNU_VTENTRY", false,0,0, false);
-
struct elf_reloc_map {
bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
@@ -157,26 +159,27 @@ static CONST struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
{ BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
{ BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
- /* ??? Doesn't dwarf use this? */
-/*{ BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */
- {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_REV32, R_SPARC_REV32 },
- {BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT},
- {BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY},
+ { 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_REV32, R_SPARC_REV32 },
+ { BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT },
+ { BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY },
};
static reloc_howto_type *
@@ -185,7 +188,7 @@ elf32_sparc_reloc_type_lookup (abfd, code)
bfd_reloc_code_real_type code;
{
unsigned int i;
-
+
switch (code)
{
case BFD_RELOC_VTABLE_INHERIT:
@@ -549,7 +552,9 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
case R_SPARC_22:
case R_SPARC_13:
case R_SPARC_LO10:
+ case R_SPARC_UA16:
case R_SPARC_UA32:
+ case R_SPARC_UA64:
if (h != NULL)
h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
@@ -1016,7 +1021,12 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ /* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
+ Unused entries should be reclaimed before the section's contents
+ are written out, but at the moment this does not happen. Thus in
+ order to prevent writing out garbage, we initialise the section's
+ contents to zero. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
return false;
}
@@ -1053,12 +1063,28 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
{
if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
return true;
}
+#define SET_SEC_DO_RELAX(section) do { elf_section_data(section)->tdata = (void *)1; } while (0)
+#define SEC_DO_RELAX(section) (elf_section_data(section)->tdata == (void *)1)
+
+static boolean
+elf32_sparc_relax_section (abfd, section, link_info, again)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ boolean *again;
+{
+ *again = false;
+ SET_SEC_DO_RELAX (section);
+ return true;
+}
+
/* Relocate a SPARC ELF section. */
static boolean
@@ -1113,7 +1139,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
r_type = ELF32_R_TYPE (rel->r_info);
- if (r_type == R_SPARC_GNU_VTINHERIT
+ if (r_type == R_SPARC_GNU_VTINHERIT
|| r_type == R_SPARC_GNU_VTENTRY)
continue;
@@ -1195,7 +1221,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_SPARC_22
|| r_type == R_SPARC_13
|| r_type == R_SPARC_LO10
+ || r_type == R_SPARC_UA16
|| r_type == R_SPARC_UA32
+ || r_type == R_SPARC_UA64
|| ((r_type == R_SPARC_PC10
|| r_type == R_SPARC_PC22)
&& strcmp (h->root.root.string,
@@ -1382,7 +1410,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_22:
case R_SPARC_13:
case R_SPARC_LO10:
+ case R_SPARC_UA16:
case R_SPARC_UA32:
+ case R_SPARC_UA64:
if (info->shared)
{
Elf_Internal_Rela outrel;
@@ -1518,6 +1548,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
+ r = bfd_reloc_continue;
if (r_type == R_SPARC_WDISP16)
{
bfd_vma x;
@@ -1549,12 +1580,101 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_putl32 (/*input_bfd,*/ x, contents + rel->r_offset);
r = bfd_reloc_ok;
}
- else
+ else if ((r_type == R_SPARC_WDISP30 || r_type == R_SPARC_WPLT30)
+ && SEC_DO_RELAX (input_section)
+ && rel->r_offset + 4 < input_section->_raw_size)
+ {
+#define G0 0
+#define O7 15
+#define XCC (2 << 20)
+#define COND(x) (((x)&0xf)<<25)
+#define CONDA COND(0x8)
+#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC)
+#define INSN_BA (F2(0,2) | CONDA)
+#define INSN_OR F3(2, 0x2, 0)
+#define INSN_NOP F2(0,4)
+
+ bfd_vma x, y;
+
+ /* If the instruction is a call with either:
+ restore
+ arithmetic instruction with rd == %o7
+ where rs1 != %o7 and rs2 if it is register != %o7
+ then we can optimize if the call destination is near
+ by changing the call into a branch always. */
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ y = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
+ if ((x & OP(~0)) == OP(1) && (y & OP(~0)) == OP(2))
+ {
+ if (((y & OP3(~0)) == OP3(0x3d) /* restore */
+ || ((y & OP3(0x28)) == 0 /* arithmetic */
+ && (y & RD(~0)) == RD(O7)))
+ && (y & RS1(~0)) != RS1(O7)
+ && ((y & F3I(~0))
+ || (y & RS2(~0)) != RS2(O7)))
+ {
+ bfd_vma reloc;
+
+ reloc = relocation + rel->r_addend - rel->r_offset;
+ reloc -= (input_section->output_section->vma
+ + input_section->output_offset);
+
+ /* Ensure the reloc fits into simm22. */
+ if ((reloc & 3) == 0
+ && ((reloc & ~(bfd_vma)0x7fffff) == 0
+ || ((reloc | 0x7fffff) == ~(bfd_vma)0)))
+ {
+ reloc >>= 2;
+
+ /* Check whether it fits into simm19 on v9. */
+ if (((reloc & 0x3c0000) == 0
+ || (reloc & 0x3c0000) == 0x3c0000)
+ && (elf_elfheader (output_bfd)->e_flags & EF_SPARC_32PLUS))
+ x = INSN_BPA | (reloc & 0x7ffff); /* ba,pt %xcc */
+ else
+ x = INSN_BA | (reloc & 0x3fffff); /* ba */
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+ r = bfd_reloc_ok;
+ if (rel->r_offset >= 4
+ && (y & (0xffffffff ^ RS1(~0)))
+ == (INSN_OR | RD(O7) | RS2(G0)))
+ {
+ bfd_vma z;
+ unsigned int reg;
+
+ z = bfd_get_32 (input_bfd,
+ contents + rel->r_offset - 4);
+ if ((z & (0xffffffff ^ RD(~0)))
+ != (INSN_OR | RS1(O7) | RS2(G0)))
+ break;
+
+ /* The sequence was
+ or %o7, %g0, %rN
+ call foo
+ or %rN, %g0, %o7
+
+ If call foo was replaced with ba, replace
+ or %rN, %g0, %o7 with nop. */
+
+ reg = (y & RS1(~0)) >> 14;
+ if (reg != ((z & RD(~0)) >> 25)
+ || reg == G0 || reg == O7)
+ break;
+
+ bfd_put_32 (input_bfd, INSN_NOP,
+ contents + rel->r_offset + 4);
+ }
+
+ }
+ }
+ }
+ }
+
+ if (r == bfd_reloc_continue)
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
relocation, rel->r_addend);
-
if (r != bfd_reloc_ok)
{
switch (r)
@@ -1646,6 +1766,13 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. */
sym->st_shndx = SHN_UNDEF;
+ /* If the symbol is weak, we do need to clear the value.
+ Otherwise, the PLT entry would provide a definition for
+ the symbol even if the symbol wasn't defined anywhere,
+ and so the symbol would never be NULL. */
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
+ == 0)
+ sym->st_value = 0;
}
}
@@ -1842,33 +1969,6 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
error = false;
-#if 0
- /* ??? The native linker doesn't do this so we can't (otherwise gcc would
- have to know which linker is being used). Instead, the native linker
- bumps up the architecture level when it has to. However, I still think
- warnings like these are good, so it would be nice to have them turned on
- by some option. */
-
- /* If the output machine is normal sparc, we can't allow v9 input files. */
- if (bfd_get_mach (obfd) == bfd_mach_sparc
- && (bfd_get_mach (ibfd) == bfd_mach_sparc_v8plus
- || bfd_get_mach (ibfd) == bfd_mach_sparc_v8plusa))
- {
- error = true;
- (*_bfd_error_handler)
- (_("%s: compiled for a v8plus system and target is v8"),
- bfd_get_filename (ibfd));
- }
- /* If the output machine is v9, we can't allow v9+vis input files. */
- if (bfd_get_mach (obfd) == bfd_mach_sparc_v8plus
- && bfd_get_mach (ibfd) == bfd_mach_sparc_v8plusa)
- {
- error = true;
- (*_bfd_error_handler)
- (_("%s: compiled for a v8plusa system and target is v8plus"),
- bfd_get_filename (ibfd));
- }
-#else
if (bfd_get_mach (ibfd) >= bfd_mach_sparc_v9)
{
error = true;
@@ -1881,7 +1981,6 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
if (bfd_get_mach (obfd) < bfd_get_mach (ibfd))
bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd));
}
-#endif
if (((elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA)
!= previous_ibfd_e_flags)
@@ -1911,7 +2010,10 @@ elf32_sparc_object_p (abfd)
{
if (elf_elfheader (abfd)->e_machine == EM_SPARC32PLUS)
{
- if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
+ if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
+ return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+ bfd_mach_sparc_v8plusb);
+ else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
bfd_mach_sparc_v8plusa);
else if (elf_elfheader (abfd)->e_flags & EF_SPARC_32PLUS)
@@ -1949,6 +2051,12 @@ elf32_sparc_final_write_processing (abfd, linker)
elf_elfheader (abfd)->e_flags &=~ EF_SPARC_32PLUS_MASK;
elf_elfheader (abfd)->e_flags |= EF_SPARC_32PLUS | EF_SPARC_SUN_US1;
break;
+ case bfd_mach_sparc_v8plusb :
+ elf_elfheader (abfd)->e_machine = EM_SPARC32PLUS;
+ elf_elfheader (abfd)->e_flags &=~ EF_SPARC_32PLUS_MASK;
+ elf_elfheader (abfd)->e_flags |= EF_SPARC_32PLUS | EF_SPARC_SUN_US1
+ | EF_SPARC_SUN_US3;
+ break;
case bfd_mach_sparc_sparclite_le :
elf_elfheader (abfd)->e_machine = EM_SPARC;
elf_elfheader (abfd)->e_flags |= EF_SPARC_LEDATA;
@@ -1967,6 +2075,7 @@ elf32_sparc_final_write_processing (abfd, linker)
#define ELF_MAXPAGESIZE 0x10000
#define bfd_elf32_bfd_reloc_type_lookup elf32_sparc_reloc_type_lookup
+#define bfd_elf32_bfd_relax_section elf32_sparc_relax_section
#define elf_info_to_howto elf32_sparc_info_to_howto
#define elf_backend_create_dynamic_sections \
_bfd_elf_create_dynamic_sections
diff --git a/gnu/usr.bin/binutils/bfd/elf64-alpha.c b/gnu/usr.bin/binutils/bfd/elf64-alpha.c
index 4c083fa4944..bd89a7b8053 100644
--- a/gnu/usr.bin/binutils/bfd/elf64-alpha.c
+++ b/gnu/usr.bin/binutils/bfd/elf64-alpha.c
@@ -1,5 +1,6 @@
/* Alpha specific support for 64-bit ELF
- Copyright 1996, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>.
This file is part of BFD, the Binary File Descriptor library.
@@ -34,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NO_COFF_SYMBOLS
#define NO_COFF_LINENOS
-/* Get the ECOFF swapping routines. Needed for the debug information. */
+/* Get the ECOFF swapping routines. Needed for the debug information. */
#include "coff/internal.h"
#include "coff/sym.h"
#include "coff/symconst.h"
@@ -46,7 +47,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ECOFF_64
#include "ecoffswap.h"
-static boolean elf64_alpha_mkobject PARAMS ((bfd *));
+static int alpha_elf_dynamic_symbol_p
+ PARAMS((struct elf_link_hash_entry *, struct bfd_link_info *));
static struct bfd_hash_entry * elf64_alpha_link_hash_newfunc
PARAMS((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
static struct bfd_link_hash_table * elf64_alpha_bfd_link_hash_table_create
@@ -66,6 +68,8 @@ static reloc_howto_type * elf64_alpha_bfd_reloc_type_lookup
static void elf64_alpha_info_to_howto
PARAMS((bfd *, arelent *, Elf64_Internal_Rela *));
+static boolean elf64_alpha_mkobject
+ PARAMS((bfd *));
static boolean elf64_alpha_object_p
PARAMS((bfd *));
static boolean elf64_alpha_section_from_shdr
@@ -129,7 +133,6 @@ static boolean elf64_alpha_merge_ind_symbols
PARAMS((struct alpha_elf_link_hash_entry *, PTR));
static Elf_Internal_Rela * elf64_alpha_find_reloc_at_ofs
PARAMS ((Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_vma, int));
-
struct alpha_elf_link_hash_entry
{
@@ -224,14 +227,46 @@ struct alpha_elf_link_hash_table
/* Should we do dynamic things to this symbol? */
-#define alpha_elf_dynamic_symbol_p(h, info) \
- ((((info)->shared && !(info)->symbolic) \
- || (((h)->elf_link_hash_flags \
- & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)) \
- == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)) \
- || (h)->root.type == bfd_link_hash_undefweak \
- || (h)->root.type == bfd_link_hash_defweak) \
- && (h)->dynindx != -1)
+static int
+alpha_elf_dynamic_symbol_p (h, info)
+ struct elf_link_hash_entry *h;
+ struct bfd_link_info *info;
+{
+ if (h == NULL)
+ return false;
+
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (h->dynindx == -1)
+ return false;
+
+ if (h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_defweak)
+ return true;
+
+ switch (ELF_ST_VISIBILITY (h->other))
+ {
+ case STV_DEFAULT:
+ break;
+ case STV_HIDDEN:
+ case STV_INTERNAL:
+ return false;
+ case STV_PROTECTED:
+ if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+ return false;
+ break;
+ }
+
+ if ((info->shared && !info->symbolic)
+ || ((h->elf_link_hash_flags
+ & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))
+ == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
+ return true;
+
+ return false;
+}
/* Create an entry in a Alpha ELF linker hash table. */
@@ -531,7 +566,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ true), /* pcrel_offset */
/* 32 bit PC relative offset. */
HOWTO (R_ALPHA_SREL32, /* type */
@@ -546,7 +581,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ true), /* pcrel_offset */
/* A 64 bit PC relative offset. */
HOWTO (R_ALPHA_SREL64, /* type */
@@ -561,7 +596,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
false, /* partial_inplace */
MINUS_ONE, /* src_mask */
MINUS_ONE, /* dst_mask */
- false), /* pcrel_offset */
+ true), /* pcrel_offset */
/* Push a value on the reloc evaluation stack. */
/* Not implemented -- it's dumb. */
@@ -711,7 +746,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
false), /* pcrel_offset */
/* The high bits of a 32-bit displacement to the starting address of the
- current section (the relocation target is ignored); the low bits are
+ current section (the relocation target is ignored); the low bits are
supplied in the subsequent R_ALPHA_IMMED_LO32 relocs. */
/* XXX: Not implemented. */
HOWTO (R_ALPHA_IMMED_SCN_HI32,
@@ -762,7 +797,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
0, /* dst_mask */
false), /* pcrel_offset */
- /* Misc ELF relocations. */
+ /* Misc ELF relocations. */
/* A dynamic relocation to copy the target into our .dynbss section. */
/* Not generated, as all Alpha objects use PIC, so it is not needed. It
@@ -832,13 +867,13 @@ static reloc_howto_type elf64_alpha_howto_table[] =
static bfd_reloc_status_type
elf64_alpha_reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc;
- asymbol *sym;
- PTR data;
+ asymbol *sym ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
asection *sec;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
if (output_bfd)
reloc->address += sec->output_offset;
@@ -849,13 +884,13 @@ elf64_alpha_reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message)
static bfd_reloc_status_type
elf64_alpha_reloc_bad (abfd, reloc, sym, data, sec, output_bfd, error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc;
- asymbol *sym;
- PTR data;
+ asymbol *sym ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
asection *sec;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
if (output_bfd)
reloc->address += sec->output_offset;
@@ -912,7 +947,7 @@ elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section,
output_bfd, err_msg)
bfd *abfd;
arelent *reloc_entry;
- asymbol *sym;
+ asymbol *sym ATTRIBUTE_UNUSED;
PTR data;
asection *input_section;
bfd *output_bfd;
@@ -979,7 +1014,7 @@ static const struct elf_reloc_map elf64_alpha_reloc_map[] =
/* The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to process
the explicit !<reloc>!sequence relocations, and are mapped into the normal
- relocations at the end of processing. */
+ relocations at the end of processing. */
{BFD_RELOC_ALPHA_USER_LITERAL, R_ALPHA_LITERAL},
{BFD_RELOC_ALPHA_USER_LITUSE_BASE, R_ALPHA_LITUSE},
{BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF, R_ALPHA_LITUSE},
@@ -993,7 +1028,7 @@ static const struct elf_reloc_map elf64_alpha_reloc_map[] =
static reloc_howto_type *
elf64_alpha_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
const struct elf_reloc_map *i, *e;
@@ -1011,7 +1046,7 @@ elf64_alpha_bfd_reloc_type_lookup (abfd, code)
static void
elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr;
Elf64_Internal_Rela *dst;
{
@@ -1022,7 +1057,7 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
cache_ptr->howto = &elf64_alpha_howto_table[r_type];
}
-/* These functions do relaxation for Alpha ELF.
+/* These functions do relaxation for Alpha ELF.
Currently I'm only handling what I can do with existing compiler
and assembler support, which means no instructions are removed,
@@ -1062,11 +1097,11 @@ struct alpha_relax_info
};
static Elf_Internal_Rela * elf64_alpha_relax_with_lituse
- PARAMS((struct alpha_relax_info *info, bfd_vma symval,
+ PARAMS((struct alpha_relax_info *info, bfd_vma symval,
Elf_Internal_Rela *irel, Elf_Internal_Rela *irelend));
static boolean elf64_alpha_relax_without_lituse
- PARAMS((struct alpha_relax_info *info, bfd_vma symval,
+ PARAMS((struct alpha_relax_info *info, bfd_vma symval,
Elf_Internal_Rela *irel));
static bfd_vma elf64_alpha_relax_opt_call
@@ -1125,14 +1160,15 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
flags |= 1 << urel->r_addend;
}
- /* A little preparation for the loop... */
+ /* A little preparation for the loop... */
disp = symval - info->gp;
- fits16 = (disp >= -(bfd_signed_vma)0x8000 && disp < 0x8000);
- fits32 = (disp >= -(bfd_signed_vma)0x80000000 && disp < 0x7fff8000);
for (urel = irel+1, i = 0; i < count; ++i, ++urel)
{
unsigned int insn;
+ int insn_disp;
+ bfd_signed_vma xdisp;
+
insn = bfd_get_32 (info->abfd, info->contents + urel->r_offset);
switch (urel->r_addend)
@@ -1145,14 +1181,23 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
case 1: /* MEM FORMAT */
/* We can always optimize 16-bit displacements. */
+
+ /* Extract the displacement from the instruction, sign-extending
+ it if necessary, then test whether it is within 16 or 32 bits
+ displacement from GP. */
+ insn_disp = insn & 0x0000ffff;
+ if (insn_disp & 0x00008000)
+ insn_disp |= 0xffff0000; /* Negative: sign-extend. */
+
+ xdisp = disp + insn_disp;
+ fits16 = (xdisp >= - (bfd_signed_vma) 0x00008000 && xdisp < 0x00008000);
+ fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000 && xdisp < 0x7fff8000);
+
if (fits16)
{
- /* FIXME: sanity check the insn for mem format with
- zero addend. */
-
- /* Take the op code and dest from this insn, take the base
+ /* Take the op code and dest from this insn, take the base
register from the literal insn. Leave the offset alone. */
- insn = (insn & 0xffe00000) | (lit_insn & 0x001f0000);
+ insn = (insn & 0xffe0ffff) | (lit_insn & 0x001f0000);
urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
R_ALPHA_GPRELLOW);
urel->r_addend = irel->r_addend;
@@ -1165,8 +1210,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
/* If all mem+byte, we can optimize 32-bit mem displacements. */
else if (fits32 && !(flags & ~6))
{
- /* FIXME: sanity check that lit insn Ra is mem insn Rb, and
- that mem_insn disp is zero. */
+ /* FIXME: sanity check that lit insn Ra is mem insn Rb. */
irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
R_ALPHA_GPRELHIGH);
@@ -1215,12 +1259,12 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
{
Elf_Internal_Rela *xrel;
- /* Preserve branch prediction call stack when possible. */
+ /* Preserve branch prediction call stack when possible. */
if ((insn & INSN_JSR_MASK) == INSN_JSR)
insn = (OP_BSR << 26) | (insn & 0x03e00000);
else
insn = (OP_BR << 26) | (insn & 0x03e00000);
-
+
urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
R_ALPHA_BRADDR);
urel->r_addend = irel->r_addend;
@@ -1234,7 +1278,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
/* Kill any HINT reloc that might exist for this insn. */
xrel = (elf64_alpha_find_reloc_at_ofs
- (info->relocs, info->relend, urel->r_offset,
+ (info->relocs, info->relend, urel->r_offset,
R_ALPHA_HINT));
if (xrel)
xrel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
@@ -1249,7 +1293,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
This does depend on every place a gp could be reloaded will
be, which currently happens for all code produced by gcc, but
not necessarily by hand-coded assembly, or if sibling calls
- are enabled in gcc.
+ are enabled in gcc.
Perhaps conditionalize this on a flag being set in the target
object file's header, and have gcc set it? */
@@ -1295,22 +1339,22 @@ elf64_alpha_relax_opt_call (info, symval)
/* If the symbol is marked NOPV, we are being told the function never
needs its procedure value. */
- if (info->other == STO_ALPHA_NOPV)
+ if ((info->other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_NOPV)
return symval;
/* If the symbol is marked STD_GP, we are being told the function does
- a normal ldgp in the first two words. */
- else if (info->other == STO_ALPHA_STD_GPLOAD)
+ a normal ldgp in the first two words. */
+ else if ((info->other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_STD_GPLOAD)
;
/* Otherwise, we may be able to identify a GP load in the first two
words, which we can then skip. */
- else
+ else
{
Elf_Internal_Rela *tsec_relocs, *tsec_relend, *tsec_free, *gpdisp;
bfd_vma ofs;
- /* Load the relocations from the section that the target symbol is in. */
+ /* Load the relocations from the section that the target symbol is in. */
if (info->sec == info->tsec)
{
tsec_relocs = info->relocs;
@@ -1332,7 +1376,7 @@ elf64_alpha_relax_opt_call (info, symval)
/* Recover the symbol's offset within the section. */
ofs = (symval - info->tsec->output_section->vma
- info->tsec->output_offset);
-
+
/* Look for a GPDISP reloc. */
gpdisp = (elf64_alpha_find_reloc_at_ofs
(tsec_relocs, tsec_relend, ofs, R_ALPHA_GPDISP));
@@ -1347,7 +1391,7 @@ elf64_alpha_relax_opt_call (info, symval)
free (tsec_free);
}
- /* We've now determined that we can skip an initial gp load. Verify
+ /* We've now determined that we can skip an initial gp load. Verify
that the call and the target use the same gp. */
if (info->link_info->hash->creator != info->tsec->owner->xvec
|| info->gotobj != alpha_elf_tdata (info->tsec->owner)->gotobj)
@@ -1408,7 +1452,7 @@ elf64_alpha_relax_without_lituse (info, symval, irel)
Any such memory load insn may be substituted by a load directly
off the GP. This allows the memory load insn to be issued before
- the calculated GP register would otherwise be ready.
+ the calculated GP register would otherwise be ready.
Any such jsr insn can be replaced by a bsr if it is in range.
@@ -1460,7 +1504,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
if (! link_info->keep_memory)
free_relocs = internal_relocs;
- memset(&info, 0, sizeof(info));
+ memset(&info, 0, sizeof (info));
info.abfd = abfd;
info.sec = sec;
info.link_info = link_info;
@@ -1543,8 +1587,8 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
info.tsec = bfd_abs_section_ptr;
else if (isym.st_shndx == SHN_COMMON)
info.tsec = bfd_com_section_ptr;
- else
- continue; /* who knows. */
+ else
+ continue; /* who knows. */
info.h = NULL;
info.other = isym.st_other;
@@ -1804,8 +1848,8 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd *abfd;
struct bfd_link_info *info;
const Elf_Internal_Sym *sym;
- const char **namep;
- flagword *flagsp;
+ const char **namep ATTRIBUTE_UNUSED;
+ flagword *flagsp ATTRIBUTE_UNUSED;
asection **secp;
bfd_vma *valp;
{
@@ -1840,7 +1884,7 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
static boolean
elf64_alpha_create_got_section(abfd, info)
bfd *abfd;
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
asection *s;
@@ -1962,7 +2006,7 @@ elf64_alpha_read_ecoff_info (abfd, section, debug)
char *ext_hdr = NULL;
swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap;
- memset (debug, 0, sizeof(*debug));
+ memset (debug, 0, sizeof (*debug));
ext_hdr = (char *) bfd_malloc ((size_t) swap->external_hdr_size);
if (ext_hdr == NULL && swap->external_hdr_size != 0)
@@ -2043,7 +2087,7 @@ elf64_alpha_read_ecoff_info (abfd, section, debug)
static boolean
elf64_alpha_is_local_label_name (abfd, name)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
return name[0] == '$';
@@ -2073,6 +2117,12 @@ elf64_alpha_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
{
asection *msec;
+ if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr, 0,
+ &elf_tdata (abfd)->dwarf2_find_line_info))
+ return true;
+
msec = bfd_get_section_by_name (abfd, ".mdebug");
if (msec != NULL)
{
@@ -2539,7 +2589,8 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
sreloc = bfd_make_section (dynobj, rel_sec_name);
if (sreloc == NULL
|| !bfd_set_section_flags (dynobj, sreloc,
- (SEC_ALLOC|SEC_LOAD
+ ((sec->flags & (SEC_ALLOC
+ | SEC_LOAD))
| SEC_HAS_CONTENTS
| SEC_IN_MEMORY
| SEC_LINKER_CREATED
@@ -2555,7 +2606,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
don't know whether we'll actually need a dynamic relocation
entry for this reloc. So make a record of it. Once we
find out if this thing needs dynamic relocation we'll
- expand the relocation sections by the appropriate amount. */
+ expand the relocation sections by the appropriate amount. */
struct alpha_elf_reloc_entry *rent;
@@ -2688,7 +2739,7 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
static boolean
elf64_alpha_merge_ind_symbols (hi, dummy)
struct alpha_elf_link_hash_entry *hi;
- PTR dummy;
+ PTR dummy ATTRIBUTE_UNUSED;
{
struct alpha_elf_link_hash_entry *hs;
@@ -2780,7 +2831,7 @@ elf64_alpha_can_merge_gots (a, b)
Elf_Internal_Shdr *symtab_hdr = &elf_tdata (bsub)->symtab_hdr;
int i, n;
- n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info;
+ n = NUM_SHDR_ENTRIES (symtab_hdr) - symtab_hdr->sh_info;
for (i = 0; i < n; ++i)
{
struct alpha_elf_got_entry *ae, *be;
@@ -2852,7 +2903,7 @@ elf64_alpha_merge_gots (a, b)
hashes = alpha_elf_sym_hashes (bsub);
symtab_hdr = &elf_tdata (bsub)->symtab_hdr;
- n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info;
+ n = NUM_SHDR_ENTRIES (symtab_hdr) - symtab_hdr->sh_info;
for (i = 0; i < n; ++i)
{
struct alpha_elf_got_entry *ae, *be, **pbe, **start;
@@ -3127,7 +3178,7 @@ elf64_alpha_calc_dynrel_sizes (h, info)
|| relent->rtype == R_ALPHA_REFQUAD)
{
relent->srel->_raw_size +=
- sizeof(Elf64_External_Rela) * relent->count;
+ sizeof (Elf64_External_Rela) * relent->count;
}
dynobj = elf_hash_table(info)->dynobj;
@@ -3202,7 +3253,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
i = alpha_elf_tdata(i)->got_link_next)
count += alpha_elf_tdata(i)->n_local_got_entries;
- srel->_raw_size += count * sizeof(Elf64_External_Rela);
+ srel->_raw_size += count * sizeof (Elf64_External_Rela);
}
}
/* else we're not dynamic and by definition we don't need such things. */
@@ -3305,13 +3356,14 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
if (! bfd_elf64_add_dynamic_entry (info, DT_RELA, 0)
|| ! bfd_elf64_add_dynamic_entry (info, DT_RELASZ, 0)
|| ! bfd_elf64_add_dynamic_entry (info, DT_RELAENT,
- sizeof(Elf64_External_Rela)))
+ sizeof (Elf64_External_Rela)))
return false;
if (reltext)
{
if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
@@ -3394,7 +3446,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
- /* The symbol associated with GPDISP and LITUSE is
+ /* The symbol associated with GPDISP and LITUSE is
immaterial. Only the addend is significant. */
if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE)
continue;
@@ -3517,7 +3569,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case R_ALPHA_OP_PSUB:
case R_ALPHA_OP_PRSHIFT:
/* We hate these silly beasts. */
- abort();
+ abort ();
case R_ALPHA_LITERAL:
{
@@ -3571,7 +3623,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
((Elf64_External_Rela *)
srelgot->contents)
+ srelgot->reloc_count++);
- BFD_ASSERT (sizeof(Elf64_External_Rela)
+ BFD_ASSERT (sizeof (Elf64_External_Rela)
* srelgot->reloc_count
<= srelgot->_cooked_size);
}
@@ -3676,7 +3728,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
((Elf64_External_Rela *)
srel->contents)
+ srel->reloc_count++);
- BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count
+ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
<= srel->_cooked_size);
}
goto default_reloc;
@@ -3829,7 +3881,7 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
((Elf64_External_Rela *)
srel->contents)
+ srel->reloc_count++);
- BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count
+ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
<= srel->_cooked_size);
}
@@ -3862,7 +3914,7 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_elf64_swap_reloca_out (output_bfd, &outrel,
((Elf64_External_Rela *)srel->contents
+ srel->reloc_count++));
- BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count
+ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
<= srel->_cooked_size);
}
}
@@ -4280,7 +4332,6 @@ elf64_alpha_final_link (abfd, info)
}
#endif
-
/* Build the external symbol information. */
einfo.abfd = abfd;
einfo.info = info;
@@ -4600,7 +4651,7 @@ elf64_alpha_final_link (abfd, info)
/* ECOFF swapping routines. These are used when dealing with the
.mdebug section, which is in the ECOFF debugging format. Copied
- from elf32-mips.c. */
+ from elf32-mips.c. */
static const struct ecoff_debug_swap
elf64_alpha_ecoff_debug_swap =
{
@@ -4643,11 +4694,41 @@ elf64_alpha_ecoff_debug_swap =
elf64_alpha_read_ecoff_info
};
+/* Use a non-standard hash bucket size of 8. */
+
+const struct elf_size_info alpha_elf_size_info =
+{
+ sizeof (Elf64_External_Ehdr),
+ sizeof (Elf64_External_Phdr),
+ sizeof (Elf64_External_Shdr),
+ sizeof (Elf64_External_Rel),
+ sizeof (Elf64_External_Rela),
+ sizeof (Elf64_External_Sym),
+ sizeof (Elf64_External_Dyn),
+ sizeof (Elf_External_Note),
+ 8,
+ 1,
+ 64, 8,
+ ELFCLASS64, EV_CURRENT,
+ bfd_elf64_write_out_phdrs,
+ bfd_elf64_write_shdrs_and_ehdr,
+ bfd_elf64_write_relocs,
+ bfd_elf64_swap_symbol_out,
+ bfd_elf64_slurp_reloc_table,
+ bfd_elf64_slurp_symbol_table,
+ bfd_elf64_swap_dyn_in,
+ bfd_elf64_swap_dyn_out,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
#define TARGET_LITTLE_SYM bfd_elf64_alpha_vec
#define TARGET_LITTLE_NAME "elf64-alpha"
#define ELF_ARCH bfd_arch_alpha
-#define ELF_MACHINE_CODE EM_ALPHA
-#define ELF_MAXPAGESIZE 0x10000
+#define ELF_MACHINE_CODE EM_ALPHA
+#define ELF_MAXPAGESIZE 0x10000
#define bfd_elf64_bfd_link_hash_table_create \
elf64_alpha_bfd_link_hash_table_create
@@ -4698,9 +4779,10 @@ elf64_alpha_ecoff_debug_swap =
#define elf_backend_ecoff_debug_swap \
&elf64_alpha_ecoff_debug_swap
-/*
- * A few constants that determine how the .plt section is set up.
- */
+#define elf_backend_size_info \
+ alpha_elf_size_info
+
+/* A few constants that determine how the .plt section is set up. */
#define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1
diff --git a/gnu/usr.bin/binutils/bfd/elf64-gen.c b/gnu/usr.bin/binutils/bfd/elf64-gen.c
index 78dc09d3978..db68a074d09 100644
--- a/gnu/usr.bin/binutils/bfd/elf64-gen.c
+++ b/gnu/usr.bin/binutils/bfd/elf64-gen.c
@@ -1,5 +1,5 @@
/* Generic support for 64-bit ELF
- Copyright 1993, 1995, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -42,22 +42,53 @@ static reloc_howto_type dummy =
static void
elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *bfd_reloc;
- Elf64_Internal_Rela *elf_reloc;
+ Elf64_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;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *bfd_reloc;
- Elf64_Internal_Rel *elf_reloc;
+ Elf64_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED;
{
bfd_reloc->howto = &dummy;
}
+static boolean
+elf64_generic_link_add_symbols (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ asection *o;
+
+ /* Check if there are any relocations. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ if ((o->flags & SEC_RELOC) != 0)
+ {
+ Elf_Internal_Ehdr *ehdrp;
+
+ ehdrp = elf_elfheader (abfd);
+ if (abfd->my_archive)
+ (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"),
+ bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd),
+ ehdrp->e_machine);
+ else
+ (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+ bfd_get_filename (abfd),
+ ehdrp->e_machine);
+
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
+
+ return bfd_elf64_bfd_link_add_symbols (abfd, info);
+}
+
#define TARGET_LITTLE_SYM bfd_elf64_little_generic_vec
#define TARGET_LITTLE_NAME "elf64-little"
#define TARGET_BIG_SYM bfd_elf64_big_generic_vec
@@ -66,6 +97,7 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
#define ELF_MACHINE_CODE EM_NONE
#define ELF_MAXPAGESIZE 0x1
#define bfd_elf64_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
+#define bfd_elf64_bfd_link_add_symbols elf64_generic_link_add_symbols
#define elf_info_to_howto elf_generic_info_to_howto
#define elf_info_to_howto_rel elf_generic_info_to_howto_rel
diff --git a/gnu/usr.bin/binutils/bfd/elf64-mips.c b/gnu/usr.bin/binutils/bfd/elf64-mips.c
index 6fc0dcdf0e4..f1ab7b11bd4 100644
--- a/gnu/usr.bin/binutils/bfd/elf64-mips.c
+++ b/gnu/usr.bin/binutils/bfd/elf64-mips.c
@@ -1,5 +1,6 @@
/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
<mark@codesourcery.com>
@@ -45,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/ecoff.h"
/* The 64 bit versions of the mdebug data structures are in alpha.h. */
#include "coff/alpha.h"
-#define ECOFF_64
+#define ECOFF_SIGNED_64
#include "ecoffswap.h"
static void mips_elf64_swap_reloc_in
@@ -159,9 +160,9 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- /* This needs complex overflow
+ /* This needs complex overflow
detection, because the upper four
- bits must match the PC. */
+ bits must match the PC + 4. */
bfd_elf_generic_reloc, /* special_function */
"R_MIPS_26", /* name */
true, /* partial_inplace */
@@ -623,7 +624,7 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
0, /* dst_mask */
false), /* pcrel_offset */
- /* Protected jump conversion. This is an optimization hint. No
+ /* Protected jump conversion. This is an optimization hint. No
relocation is required for correctness. */
HOWTO (R_MIPS_JALR, /* type */
0, /* rightshift */
@@ -712,9 +713,9 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- /* This needs complex overflow
+ /* This needs complex overflow
detection, because the upper four
- bits must match the PC. */
+ bits must match the PC + 4. */
bfd_elf_generic_reloc, /* special_function */
"R_MIPS_26", /* name */
true, /* partial_inplace */
@@ -1177,7 +1178,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
0, /* dst_mask */
false), /* pcrel_offset */
- /* Protected jump conversion. This is an optimization hint. No
+ /* Protected jump conversion. This is an optimization hint. No
relocation is required for correctness. */
HOWTO (R_MIPS_JALR, /* type */
0, /* rightshift */
@@ -1270,7 +1271,7 @@ mips_elf64_be_swap_reloc_in (abfd, src, dst)
{
Elf64_Mips_Internal_Rel mirel;
- mips_elf64_swap_reloc_in (abfd,
+ mips_elf64_swap_reloc_in (abfd,
(const Elf64_Mips_External_Rel *) src,
&mirel);
@@ -1292,7 +1293,7 @@ mips_elf64_be_swap_reloca_in (abfd, src, dst)
{
Elf64_Mips_Internal_Rela mirela;
- mips_elf64_swap_reloca_in (abfd,
+ mips_elf64_swap_reloca_in (abfd,
(const Elf64_Mips_External_Rela *) src,
&mirela);
@@ -1324,7 +1325,7 @@ mips_elf64_be_swap_reloc_out (abfd, src, dst)
mirel.r_ssym = STN_UNDEF;
mirel.r_type3 = R_MIPS_NONE;
- mips_elf64_swap_reloc_out (abfd, &mirel,
+ mips_elf64_swap_reloc_out (abfd, &mirel,
(Elf64_Mips_External_Rel *) dst);
}
@@ -1346,7 +1347,7 @@ mips_elf64_be_swap_reloca_out (abfd, src, dst)
mirela.r_ssym = STN_UNDEF;
mirela.r_type3 = R_MIPS_NONE;
- mips_elf64_swap_reloca_out (abfd, &mirela,
+ mips_elf64_swap_reloca_out (abfd, &mirela,
(Elf64_Mips_External_Rela *) dst);
}
@@ -1389,7 +1390,7 @@ static CONST struct elf_reloc_map mips_reloc_map[] =
static reloc_howto_type *
mips_elf64_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
@@ -1413,7 +1414,7 @@ mips_elf64_reloc_type_lookup (abfd, code)
static long
mips_elf64_get_reloc_upper_bound (abfd, sec)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
return (sec->reloc_count * 3 + 1) * sizeof (arelent *);
@@ -2150,7 +2151,7 @@ const struct elf_size_info mips_elf64_size_info =
#define elf_backend_plt_header_size 0
#define elf_backend_may_use_rel_p 1
-/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
+/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
MIPS-specific function only applies to IRIX5, which had no 64-bit
ABI. */
#define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
@@ -2188,3 +2189,20 @@ const struct elf_size_info mips_elf64_size_info =
_bfd_archive_coff_update_armap_timestamp
#include "elf64-target.h"
+
+/* Support for traditional mips targets */
+
+#define INCLUDED_TARGET_FILE /* More a type of flag */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#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"
+
+/* Include the target file again for this target */
+#include "elf64-target.h"
diff --git a/gnu/usr.bin/binutils/bfd/elf64-sparc.c b/gnu/usr.bin/binutils/bfd/elf64-sparc.c
index c9e862677ac..bd32b6eb4fc 100644
--- a/gnu/usr.bin/binutils/bfd/elf64-sparc.c
+++ b/gnu/usr.bin/binutils/bfd/elf64-sparc.c
@@ -1,5 +1,5 @@
/* SPARC-specific support for 64-bit ELF
- Copyright (C) 1993, 95, 96, 97, 98, 99, 2000
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
#include "elf-bfd.h"
+#include "opcode/sparc.h"
/* This is defined if one wants to build upward compatible binaries
with the original sparc64-elf toolchain. The support is kept in for
@@ -62,9 +63,13 @@ static boolean sparc64_elf_add_symbol_hook
static void sparc64_elf_symbol_processing
PARAMS ((bfd *, asymbol *));
+static boolean sparc64_elf_copy_private_bfd_data
+ PARAMS ((bfd *, bfd *));
static boolean sparc64_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
+static boolean sparc64_elf_relax_section
+ PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
static boolean sparc64_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -115,7 +120,7 @@ static reloc_howto_type sparc64_elf_howto_table[] =
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,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UA32", 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
/* These aren't implemented yet. */
HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PLT32", false,0,0x00000000,true),
@@ -183,36 +188,37 @@ static CONST struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
{ BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
{ BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
- /* ??? Doesn't dwarf use this? */
-/*{ BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */
- {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_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_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_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;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
@@ -226,7 +232,7 @@ sparc64_elf_reloc_type_lookup (abfd, code)
static void
sparc64_elf_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr;
Elf64_Internal_Rela *dst;
{
@@ -237,10 +243,10 @@ sparc64_elf_info_to_howto (abfd, cache_ptr, dst)
/* Due to the way how we handle R_SPARC_OLO10, each entry in a SHT_RELA
section can represent up to two relocs, we must tell the user to allocate
more space. */
-
+
static long
sparc64_elf_get_reloc_upper_bound (abfd, sec)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
return (sec->reloc_count * 2 + 1) * sizeof (arelent *);
@@ -253,7 +259,7 @@ sparc64_elf_get_dynamic_reloc_upper_bound (abfd)
return _bfd_elf_get_dynamic_reloc_upper_bound (abfd) * 2;
}
-/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of
+/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of
them. We cannot use generic elf routines for this, because R_SPARC_OLO10
has secondary addend in ELF64_R_TYPE_DATA. We handle it as two relocations
for the same location, R_SPARC_LO10 and R_SPARC_13. */
@@ -266,7 +272,6 @@ sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)
asymbol **symbols;
boolean dynamic;
{
- struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
PTR allocated = NULL;
bfd_byte *native_relocs;
arelent *relent;
@@ -290,7 +295,7 @@ sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)
entsize = rel_hdr->sh_entsize;
BFD_ASSERT (entsize == sizeof (Elf64_External_Rela));
-
+
count = rel_hdr->sh_size / entsize;
for (i = 0, relent = relents; i < count;
@@ -392,24 +397,24 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
return true;
rel_hdr = &d->this_hdr;
- asect->reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ asect->reloc_count = NUM_SHDR_ENTRIES (rel_hdr);
rel_hdr2 = NULL;
}
- asect->relocation = ((arelent *)
- bfd_alloc (abfd,
+ asect->relocation = ((arelent *)
+ bfd_alloc (abfd,
asect->reloc_count * 2 * sizeof (arelent)));
if (asect->relocation == NULL)
return false;
/* The sparc64_elf_slurp_one_reloc_table routine increments reloc_count. */
asect->reloc_count = 0;
-
+
if (!sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols,
dynamic))
return false;
-
- if (rel_hdr2
+
+ if (rel_hdr2
&& !sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr2, symbols,
dynamic))
return false;
@@ -501,7 +506,6 @@ sparc64_elf_write_relocs (abfd, sec, data)
for (idx = 0; idx < sec->reloc_count; idx++)
{
bfd_vma addr;
- unsigned int i;
++count;
@@ -533,7 +537,7 @@ sparc64_elf_write_relocs (abfd, sec, data)
if (rela_hdr->sh_type != SHT_RELA)
abort ();
- /* orelocation has the data, reloc_count has the count... */
+ /* orelocation has the data, reloc_count has the count... */
outbound_relocas = (Elf64_External_Rela *) rela_hdr->contents;
src_rela = outbound_relocas;
@@ -627,7 +631,7 @@ struct sparc64_elf_link_hash_table
#define sparc64_elf_hash_table(p) \
((struct sparc64_elf_link_hash_table *) ((p)->hash))
-
+
/* Create a Sparc64 ELF linker hash table. */
static struct bfd_link_hash_table *
@@ -650,7 +654,6 @@ sparc64_elf_bfd_link_hash_table_create (abfd)
return &ret->root.root;
}
-
/* Utility for performing the standard initial work of an instruction
relocation.
@@ -723,13 +726,13 @@ sparc_elf_notsup_reloc (abfd,
input_section,
output_bfd,
error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc_entry ATTRIBUTE_UNUSED;
+ asymbol *symbol ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *input_section ATTRIBUTE_UNUSED;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ char **error_message ATTRIBUTE_UNUSED;
{
return bfd_reloc_notsupported;
}
@@ -745,7 +748,7 @@ sparc_elf_wdisp16_reloc (abfd, reloc_entry, symbol, data, input_section,
PTR data;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
bfd_vma insn;
@@ -783,7 +786,7 @@ sparc_elf_hix22_reloc (abfd,
PTR data;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
bfd_vma insn;
@@ -820,7 +823,7 @@ sparc_elf_lox10_reloc (abfd,
PTR data;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
bfd_vma insn;
@@ -847,7 +850,6 @@ sparc_elf_lox10_reloc (abfd,
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1"
-
/* Fill in the .plt section. */
static void
@@ -858,7 +860,7 @@ sparc64_elf_build_plt (output_bfd, contents, nentries)
{
const unsigned int nop = 0x01000000;
int i, j;
-
+
/* The first four entries are reserved, and are initially undefined.
We fill them with `illtrap 0' to force ld.so to do something. */
@@ -892,7 +894,7 @@ sparc64_elf_build_plt (output_bfd, contents, nentries)
/* Now the tricky bit. Entries 32768 and higher are grouped in blocks of
160: 160 entries and 160 pointers. This is to separate code from data,
which is much friendlier on the cache. */
-
+
for (; i < nentries; i += 160)
{
int block = (i + 160 <= nentries ? 160 : nentries - i);
@@ -935,7 +937,7 @@ sparc64_elf_plt_entry_offset (index)
block = (index - LARGE_PLT_THRESHOLD) / 160;
ofs = (index - LARGE_PLT_THRESHOLD) % 160;
- return ((bfd_vma)(LARGE_PLT_THRESHOLD + block*160) * PLT_ENTRY_SIZE
+ return ((bfd_vma) (LARGE_PLT_THRESHOLD + block*160) * PLT_ENTRY_SIZE
+ ofs * 6*4);
}
@@ -961,8 +963,6 @@ sparc64_elf_plt_ptr_offset (index, max)
+ last * 6*4
+ ofs * 8);
}
-
-
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
@@ -997,7 +997,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
srelgot = NULL;
sreloc = NULL;
- rel_end = relocs + sec->reloc_count;
+ rel_end = relocs + NUM_SHDR_ENTRIES (& elf_section_data (sec)->rel_hdr);
for (rel = relocs; rel < rel_end; rel++)
{
unsigned long r_symndx;
@@ -1197,7 +1197,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
case R_SPARC_UA16:
/* When creating a shared object, we must copy these relocs
into the output file. We create a reloc section in
- dynobj and make room for the reloc.
+ dynobj and make room for the reloc.
But don't do this for debugging sections -- this shows up
with DWARF2 -- first because they are not loaded, and
@@ -1246,7 +1246,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
break;
default:
- (*_bfd_error_handler)(_("%s: check_relocs: unhandled reloc type %d"),
+ (*_bfd_error_handler) (_("%s: check_relocs: unhandled reloc type %d"),
bfd_get_filename(abfd),
ELF64_R_TYPE_ID (rel->r_info));
return false;
@@ -1265,9 +1265,9 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
struct bfd_link_info *info;
const Elf_Internal_Sym *sym;
const char **namep;
- flagword *flagsp;
- asection **secp;
- bfd_vma *valp;
+ flagword *flagsp ATTRIBUTE_UNUSED;
+ asection **secp ATTRIBUTE_UNUSED;
+ bfd_vma *valp ATTRIBUTE_UNUSED;
{
static char *stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" };
@@ -1275,7 +1275,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
int reg;
struct sparc64_elf_app_reg *p;
-
+
reg = (int)sym->st_value;
switch (reg & ~1)
{
@@ -1316,7 +1316,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (**namep)
{
struct elf_link_hash_entry *h;
-
+
h = (struct elf_link_hash_entry *)
bfd_link_hash_lookup (info->hash, *namep, false, false, false);
@@ -1387,7 +1387,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
static boolean
sparc64_elf_output_arch_syms (output_bfd, info, finfo, func)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
PTR finfo;
boolean (*func) PARAMS ((PTR, const char *,
@@ -1460,7 +1460,7 @@ sparc64_elf_get_symbol_type (elf_sym, type)
static void
sparc64_elf_symbol_processing (abfd, asym)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asymbol *asym;
{
elf_symbol_type *elfsym;
@@ -1556,12 +1556,6 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
- /* The first plt entries are reserved, and the relocations must
- pair up exactly. */
- if (s->_raw_size == 0)
- s->_raw_size += (PLT_HEADER_SIZE/PLT_ENTRY_SIZE
- * sizeof (Elf64_External_Rela));
-
s->_raw_size += sizeof (Elf64_External_Rela);
/* The procedure linkage table size is bounded by the magnitude
@@ -1802,6 +1796,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
{
if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
/* Add dynamic STT_REGISTER symbols and corresponding DT_SPARC_REGISTER
@@ -1813,7 +1808,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
if (app_regs [reg].name != NULL)
{
struct elf_link_local_dynamic_entry *entry, *e;
-
+
if (! bfd_elf64_add_dynamic_entry (info, DT_SPARC_REGISTER, 0))
return false;
@@ -1855,6 +1850,21 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
return true;
}
+#define SET_SEC_DO_RELAX(section) do { elf_section_data(section)->tdata = (void *)1; } while (0)
+#define SEC_DO_RELAX(section) (elf_section_data(section)->tdata == (void *)1)
+
+static boolean
+sparc64_elf_relax_section (abfd, section, link_info, again)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ boolean *again;
+{
+ *again = false;
+ SET_SEC_DO_RELAX (section);
+ return true;
+}
+
/* Relocate a SPARC64 ELF section. */
static boolean
@@ -1893,12 +1903,12 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sgot = splt = sreloc = NULL;
rel = relocs;
- relend = relocs + input_section->reloc_count;
+ relend = relocs + NUM_SHDR_ENTRIES (& elf_section_data (input_section)->rel_hdr);
for (; rel < relend; rel++)
{
int r_type;
reloc_howto_type *howto;
- long r_symndx;
+ unsigned long r_symndx;
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
asection *sec;
@@ -2061,7 +2071,15 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(!info->shared || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return false;
- relocation = 0;
+
+ /* To avoid generating warning messages about truncated
+ relocations, set the relocation's address to be the same as
+ the start of this section. */
+
+ if (input_section->output_section != NULL)
+ relocation = input_section->output_section->vma;
+ else
+ relocation = 0;
}
}
@@ -2338,7 +2356,6 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
off &= ~1;
else
{
- bfd_put_64 (output_bfd, relocation, sgot->contents + off);
local_got_offsets[r_symndx] |= 1;
if (info->shared)
@@ -2346,6 +2363,13 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
asection *srelgot;
Elf_Internal_Rela outrel;
+ /* The Solaris 2.7 64-bit linker adds the contents
+ of the location to the value of the reloc.
+ Note this is different behaviour to the
+ 32-bit linker, which both adds the contents
+ and ignores the addend. So clear the location. */
+ bfd_put_64 (output_bfd, 0, sgot->contents + off);
+
/* We need to generate a R_SPARC_RELATIVE reloc
for the dynamic linker. */
srelgot = bfd_get_section_by_name(dynobj, ".rela.got");
@@ -2362,6 +2386,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ srelgot->reloc_count));
++srelgot->reloc_count;
}
+ else
+ bfd_put_64 (output_bfd, relocation, sgot->contents + off);
}
relocation = sgot->output_offset + off - got_base;
}
@@ -2396,6 +2422,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (splt->output_section->vma
+ splt->output_offset
+ sparc64_elf_plt_entry_offset (h->plt.offset));
+ if (r_type == R_SPARC_WPLT30)
+ goto do_wplt30;
goto do_default;
case R_SPARC_OLO10:
@@ -2471,6 +2499,97 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
break;
+ case R_SPARC_WDISP30:
+ do_wplt30:
+ if (SEC_DO_RELAX (input_section)
+ && rel->r_offset + 4 < input_section->_raw_size)
+ {
+#define G0 0
+#define O7 15
+#define XCC (2 << 20)
+#define COND(x) (((x)&0xf)<<25)
+#define CONDA COND(0x8)
+#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC)
+#define INSN_BA (F2(0,2) | CONDA)
+#define INSN_OR F3(2, 0x2, 0)
+#define INSN_NOP F2(0,4)
+
+ bfd_vma x, y;
+
+ /* If the instruction is a call with either:
+ restore
+ arithmetic instruction with rd == %o7
+ where rs1 != %o7 and rs2 if it is register != %o7
+ then we can optimize if the call destination is near
+ by changing the call into a branch always. */
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ y = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
+ if ((x & OP(~0)) == OP(1) && (y & OP(~0)) == OP(2))
+ {
+ if (((y & OP3(~0)) == OP3(0x3d) /* restore */
+ || ((y & OP3(0x28)) == 0 /* arithmetic */
+ && (y & RD(~0)) == RD(O7)))
+ && (y & RS1(~0)) != RS1(O7)
+ && ((y & F3I(~0))
+ || (y & RS2(~0)) != RS2(O7)))
+ {
+ bfd_vma reloc;
+
+ reloc = relocation + rel->r_addend - rel->r_offset;
+ reloc -= (input_section->output_section->vma
+ + input_section->output_offset);
+ if (reloc & 3)
+ goto do_default;
+
+ /* Ensure the branch fits into simm22. */
+ if ((reloc & ~(bfd_vma)0x7fffff)
+ && ((reloc | 0x7fffff) != MINUS_ONE))
+ goto do_default;
+ reloc >>= 2;
+
+ /* Check whether it fits into simm19. */
+ if ((reloc & 0x3c0000) == 0
+ || (reloc & 0x3c0000) == 0x3c0000)
+ x = INSN_BPA | (reloc & 0x7ffff); /* ba,pt %xcc */
+ else
+ x = INSN_BA | (reloc & 0x3fffff); /* ba */
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+ r = bfd_reloc_ok;
+ if (rel->r_offset >= 4
+ && (y & (0xffffffff ^ RS1(~0)))
+ == (INSN_OR | RD(O7) | RS2(G0)))
+ {
+ bfd_vma z;
+ unsigned int reg;
+
+ z = bfd_get_32 (input_bfd,
+ contents + rel->r_offset - 4);
+ if ((z & (0xffffffff ^ RD(~0)))
+ != (INSN_OR | RS1(O7) | RS2(G0)))
+ break;
+
+ /* The sequence was
+ or %o7, %g0, %rN
+ call foo
+ or %rN, %g0, %o7
+
+ If call foo was replaced with ba, replace
+ or %rN, %g0, %o7 with nop. */
+
+ reg = (y & RS1(~0)) >> 14;
+ if (reg != ((z & RD(~0)) >> 25)
+ || reg == G0 || reg == O7)
+ break;
+
+ bfd_put_32 (input_bfd, INSN_NOP,
+ contents + rel->r_offset + 4);
+ }
+ break;
+ }
+ }
+ }
+ /* FALLTHROUGH */
+
default:
do_default:
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
@@ -2499,12 +2618,12 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
/* Assume this is a call protected by other code that
detect the symbol is undefined. If this is the case,
- we can safely ignore the overflow. If not, the
+ we can safely ignore the overflow. If not, the
program is hosed anyway, and a little warning isn't
going to help. */
break;
}
-
+
name = h->root.root.string;
}
else
@@ -2550,7 +2669,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
asection *srela;
Elf_Internal_Rela rela;
- /* This symbol has an entry in the PLT. Set it up. */
+ /* This symbol has an entry in the PLT. Set it up. */
BFD_ASSERT (h->dynindx != -1);
@@ -2575,15 +2694,27 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
rela.r_offset += (splt->output_section->vma + splt->output_offset);
rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_JMP_SLOT);
+ /* Adjust for the first 4 reserved elements in the .plt section
+ when setting the offset in the .rela.plt section.
+ Sun forgot to read their own ABI and copied elf32-sparc behaviour,
+ thus .plt[4] has corresponding .rela.plt[0] and so on. */
+
bfd_elf64_swap_reloca_out (output_bfd, &rela,
((Elf64_External_Rela *) srela->contents
- + h->plt.offset));
+ + (h->plt.offset - 4)));
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
/* 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;
}
}
@@ -2770,7 +2901,25 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
return true;
}
-/* Functions for dealing with the e_flags field. */
+/* Functions for dealing with the e_flags field. */
+
+/* Copy backend specific data from one object module to another */
+static boolean
+sparc64_elf_copy_private_bfd_data (ibfd, obfd)
+ bfd *ibfd, *obfd;
+{
+ if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return true;
+
+ BFD_ASSERT (!elf_flags_init (obfd)
+ || (elf_elfheader (obfd)->e_flags
+ == elf_elfheader (ibfd)->e_flags));
+
+ elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
+ elf_flags_init (obfd) = true;
+ return true;
+}
/* Merge backend specific data from an object file to the output
object file when linking. */
@@ -2796,32 +2945,33 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
elf_flags_init (obfd) = true;
elf_elfheader (obfd)->e_flags = new_flags;
}
-
+
else if (new_flags == old_flags) /* Compatible flags are ok */
;
-
+
else /* Incompatible flags */
{
error = false;
-
+
+#define EF_SPARC_ISA_EXTENSIONS \
+ (EF_SPARC_SUN_US1 | EF_SPARC_SUN_US3 | EF_SPARC_HAL_R1)
+
if ((ibfd->flags & DYNAMIC) != 0)
{
/* We don't want dynamic objects memory ordering and
architecture to have any role. That's what dynamic linker
should do. */
- old_flags &= ~(EF_SPARCV9_MM | EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1);
- old_flags |= (new_flags
- & (EF_SPARCV9_MM
- | EF_SPARC_SUN_US1
- | EF_SPARC_HAL_R1));
+ new_flags &= ~(EF_SPARCV9_MM | EF_SPARC_ISA_EXTENSIONS);
+ new_flags |= (old_flags
+ & (EF_SPARCV9_MM | EF_SPARC_ISA_EXTENSIONS));
}
else
{
/* Choose the highest architecture requirements. */
- old_flags |= (new_flags & (EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1));
- new_flags |= (old_flags & (EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1));
- if ((old_flags & (EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1))
- == (EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1))
+ old_flags |= (new_flags & EF_SPARC_ISA_EXTENSIONS);
+ new_flags |= (old_flags & EF_SPARC_ISA_EXTENSIONS);
+ if ((old_flags & (EF_SPARC_SUN_US1 | EF_SPARC_SUN_US3))
+ && (old_flags & EF_SPARC_HAL_R1))
{
error = true;
(*_bfd_error_handler)
@@ -2863,13 +3013,13 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
static const char *
sparc64_elf_print_symbol_all (abfd, filep, symbol)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
PTR filep;
asymbol *symbol;
{
FILE *file = (FILE *) filep;
int reg, type;
-
+
if (ELF_ST_TYPE (((elf_symbol_type *) symbol)->internal_elf_sym.st_info)
!= STT_REGISTER)
return NULL;
@@ -2894,8 +3044,10 @@ sparc64_elf_object_p (abfd)
bfd *abfd;
{
unsigned long mach = bfd_mach_sparc_v9;
-
- if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
+
+ if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
+ mach = bfd_mach_sparc_v9b;
+ else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
mach = bfd_mach_sparc_v9a;
return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, mach);
}
@@ -2919,7 +3071,7 @@ const struct elf_size_info sparc64_elf_size_info =
/* internal relocations per external relocations.
For link purposes we use just 1 internal per
1 external, for assembly and slurp symbol table
- we use 2. */
+ we use 2. */
1,
64, /* arch_size */
8, /* file_align */
@@ -2952,7 +3104,7 @@ const struct elf_size_info sparc64_elf_size_info =
#define bfd_elf64_bfd_link_hash_table_create \
sparc64_elf_bfd_link_hash_table_create
-
+
#define elf_info_to_howto \
sparc64_elf_info_to_howto
#define bfd_elf64_get_reloc_upper_bound \
@@ -2963,6 +3115,8 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_canonicalize_dynamic_reloc
#define bfd_elf64_bfd_reloc_type_lookup \
sparc64_elf_reloc_type_lookup
+#define bfd_elf64_bfd_relax_section \
+ sparc64_elf_relax_section
#define elf_backend_create_dynamic_sections \
_bfd_elf_create_dynamic_sections
@@ -2988,7 +3142,8 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_print_symbol_all
#define elf_backend_output_arch_syms \
sparc64_elf_output_arch_syms
-
+#define bfd_elf64_bfd_copy_private_bfd_data \
+ sparc64_elf_copy_private_bfd_data
#define bfd_elf64_bfd_merge_private_bfd_data \
sparc64_elf_merge_private_bfd_data
diff --git a/gnu/usr.bin/binutils/bfd/elfcode.h b/gnu/usr.bin/binutils/bfd/elfcode.h
index c5edf9b8250..b02a399be8c 100644
--- a/gnu/usr.bin/binutils/bfd/elfcode.h
+++ b/gnu/usr.bin/binutils/bfd/elfcode.h
@@ -1,6 +1,6 @@
/* ELF executable support for BFD.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software
- Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -118,6 +118,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_add_dynamic_entry NAME(bfd_elf,add_dynamic_entry)
#define elf_write_shdrs_and_ehdr NAME(bfd_elf,write_shdrs_and_ehdr)
#define elf_write_out_phdrs NAME(bfd_elf,write_out_phdrs)
+#define elf_write_relocs NAME(bfd_elf,write_relocs)
+#define elf_slurp_reloc_table NAME(bfd_elf,slurp_reloc_table)
#define elf_link_create_dynamic_sections \
NAME(bfd_elf,link_create_dynamic_sections)
#define elf_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
@@ -165,13 +167,9 @@ static void elf_swap_shdr_out
#define section_from_elf_index bfd_section_from_elf_index
-static boolean elf_slurp_reloc_table_from_section
+static boolean elf_slurp_reloc_table_from_section
PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, bfd_size_type,
arelent *, asymbol **, boolean));
-static boolean elf_slurp_reloc_table
- PARAMS ((bfd *, asection *, asymbol **, boolean));
-
-static void write_relocs PARAMS ((bfd *, asection *, PTR));
static boolean elf_file_p PARAMS ((Elf_External_Ehdr *));
@@ -199,7 +197,7 @@ static char *elf_symbol_flags PARAMS ((flagword));
#endif
/* Translate an ELF symbol in external format into an ELF symbol in internal
- format. */
+ format. */
void
elf_swap_symbol_in (abfd, src, dst)
@@ -221,7 +219,7 @@ elf_swap_symbol_in (abfd, src, dst)
}
/* Translate an ELF symbol in internal format into an ELF symbol in external
- format. */
+ format. */
void
elf_swap_symbol_out (abfd, src, cdst)
@@ -238,9 +236,8 @@ elf_swap_symbol_out (abfd, src, cdst)
bfd_h_put_16 (abfd, src->st_shndx, dst->st_shndx);
}
-
/* Translate an ELF file header in external format into an ELF file header in
- internal format. */
+ internal format. */
static void
elf_swap_ehdr_in (abfd, src, dst)
@@ -248,11 +245,15 @@ elf_swap_ehdr_in (abfd, src, dst)
const Elf_External_Ehdr *src;
Elf_Internal_Ehdr *dst;
{
+ int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
memcpy (dst->e_ident, src->e_ident, EI_NIDENT);
dst->e_type = bfd_h_get_16 (abfd, (bfd_byte *) src->e_type);
dst->e_machine = bfd_h_get_16 (abfd, (bfd_byte *) src->e_machine);
dst->e_version = bfd_h_get_32 (abfd, (bfd_byte *) src->e_version);
- dst->e_entry = get_word (abfd, (bfd_byte *) src->e_entry);
+ if (signed_vma)
+ dst->e_entry = get_signed_word (abfd, (bfd_byte *) src->e_entry);
+ else
+ dst->e_entry = get_word (abfd, (bfd_byte *) src->e_entry);
dst->e_phoff = get_word (abfd, (bfd_byte *) src->e_phoff);
dst->e_shoff = get_word (abfd, (bfd_byte *) src->e_shoff);
dst->e_flags = bfd_h_get_32 (abfd, (bfd_byte *) src->e_flags);
@@ -265,7 +266,7 @@ elf_swap_ehdr_in (abfd, src, dst)
}
/* Translate an ELF file header in internal format into an ELF file header in
- external format. */
+ external format. */
static void
elf_swap_ehdr_out (abfd, src, dst)
@@ -273,12 +274,16 @@ elf_swap_ehdr_out (abfd, src, dst)
const Elf_Internal_Ehdr *src;
Elf_External_Ehdr *dst;
{
+ int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
memcpy (dst->e_ident, src->e_ident, EI_NIDENT);
- /* note that all elements of dst are *arrays of unsigned char* already... */
+ /* note that all elements of dst are *arrays of unsigned char* already... */
bfd_h_put_16 (abfd, src->e_type, dst->e_type);
bfd_h_put_16 (abfd, src->e_machine, dst->e_machine);
bfd_h_put_32 (abfd, src->e_version, dst->e_version);
- put_word (abfd, src->e_entry, dst->e_entry);
+ if (signed_vma)
+ put_signed_word (abfd, src->e_entry, dst->e_entry);
+ else
+ put_word (abfd, src->e_entry, dst->e_entry);
put_word (abfd, src->e_phoff, dst->e_phoff);
put_word (abfd, src->e_shoff, dst->e_shoff);
bfd_h_put_32 (abfd, src->e_flags, dst->e_flags);
@@ -290,9 +295,8 @@ elf_swap_ehdr_out (abfd, src, dst)
bfd_h_put_16 (abfd, src->e_shstrndx, dst->e_shstrndx);
}
-
/* Translate an ELF section header table entry in external format into an
- ELF section header table entry in internal format. */
+ ELF section header table entry in internal format. */
static void
elf_swap_shdr_in (abfd, src, dst)
@@ -320,7 +324,7 @@ elf_swap_shdr_in (abfd, src, dst)
}
/* Translate an ELF section header table entry in internal format into an
- ELF section header table entry in external format. */
+ ELF section header table entry in external format. */
static void
elf_swap_shdr_out (abfd, src, dst)
@@ -328,7 +332,7 @@ elf_swap_shdr_out (abfd, src, dst)
const Elf_Internal_Shdr *src;
Elf_External_Shdr *dst;
{
- /* note that all elements of dst are *arrays of unsigned char* already... */
+ /* note that all elements of dst are *arrays of unsigned char* already... */
bfd_h_put_32 (abfd, src->sh_name, dst->sh_name);
bfd_h_put_32 (abfd, src->sh_type, dst->sh_type);
put_word (abfd, src->sh_flags, dst->sh_flags);
@@ -341,9 +345,8 @@ elf_swap_shdr_out (abfd, src, dst)
put_word (abfd, src->sh_entsize, dst->sh_entsize);
}
-
/* Translate an ELF program header table entry in external format into an
- ELF program header table entry in internal format. */
+ ELF program header table entry in internal format. */
void
elf_swap_phdr_in (abfd, src, dst)
@@ -377,7 +380,7 @@ elf_swap_phdr_out (abfd, src, dst)
const Elf_Internal_Phdr *src;
Elf_External_Phdr *dst;
{
- /* note that all elements of dst are *arrays of unsigned char* already... */
+ /* note that all elements of dst are *arrays of unsigned char* already... */
bfd_h_put_32 (abfd, src->p_type, dst->p_type);
put_word (abfd, src->p_offset, dst->p_offset);
put_word (abfd, src->p_vaddr, dst->p_vaddr);
@@ -388,7 +391,7 @@ elf_swap_phdr_out (abfd, src, dst)
put_word (abfd, src->p_align, dst->p_align);
}
-/* Translate an ELF reloc from external format to internal format. */
+/* Translate an ELF reloc from external format to internal format. */
INLINE void
elf_swap_reloc_in (abfd, src, dst)
bfd *abfd;
@@ -410,7 +413,7 @@ elf_swap_reloca_in (abfd, src, dst)
dst->r_addend = get_signed_word (abfd, (bfd_byte *) src->r_addend);
}
-/* Translate an ELF reloc from internal format to external format. */
+/* Translate an ELF reloc from internal format to external format. */
INLINE void
elf_swap_reloc_out (abfd, src, dst)
bfd *abfd;
@@ -458,7 +461,6 @@ elf_swap_dyn_out (abfd, src, p)
/* ELF .o/exec file reading */
-
/* Begin processing a given object.
First we validate the file by reading in the ELF header and checking
@@ -494,9 +496,18 @@ elf_object_p (abfd)
char *shstrtab; /* Internal copy of section header stringtab */
struct elf_backend_data *ebd;
struct elf_obj_tdata *preserved_tdata = elf_tdata (abfd);
+ struct sec *preserved_sections = abfd->sections;
+ unsigned int preserved_section_count = abfd->section_count;
+ enum bfd_architecture previous_arch = bfd_get_arch (abfd);
+ unsigned long previous_mach = bfd_get_mach (abfd);
struct elf_obj_tdata *new_tdata = NULL;
asection *s;
+ /* Clear section information, since there might be a recognized bfd that
+ we now check if we can replace, and we don't want to append to it. */
+ abfd->sections = NULL;
+ abfd->section_count = 0;
+
/* Read in the ELF header in external format. */
if (bfd_read ((PTR) & x_ehdr, sizeof (x_ehdr), 1, abfd) != sizeof (x_ehdr))
@@ -511,7 +522,7 @@ elf_object_p (abfd)
make use of. The magic number must match, the address size ('class')
and byte-swapping must match our XVEC entry, and it must have a
section header table (FIXME: See comments re sections at top of this
- file). */
+ file). */
if ((elf_file_p (&x_ehdr) == false) ||
(x_ehdr.e_ident[EI_VERSION] != EV_CURRENT) ||
@@ -554,13 +565,13 @@ elf_object_p (abfd)
if (i_ehdrp->e_type == ET_CORE)
goto got_wrong_format_error;
- /* If there is no section header table, we're hosed. */
+ /* If there is no section header table, we're hosed. */
if (i_ehdrp->e_shoff == 0)
goto got_wrong_format_error;
/* As a simple sanity check, verify that the what BFD thinks is the
size of each section header table entry actually matches the size
- recorded in the file. */
+ recorded in the file. */
if (i_ehdrp->e_shentsize != sizeof (x_shdr))
goto got_wrong_format_error;
@@ -614,8 +625,8 @@ elf_object_p (abfd)
goto got_no_match;
}
- /* Remember the entry point specified in the ELF file header. */
- bfd_get_start_address (abfd) = i_ehdrp->e_entry;
+ /* Remember the entry point specified in the ELF file header. */
+ bfd_set_start_address (abfd, i_ehdrp->e_entry);
/* Allocate space for a copy of the section header table in
internal form, seek to the section header table in the file,
@@ -680,7 +691,7 @@ elf_object_p (abfd)
}
/* Read in the string table containing the names of the sections. We
- will need the base pointer to this table later. */
+ will need the base pointer to this table later. */
/* We read this inline now, so that we don't have to go through
bfd_section_from_shdr with it (since this particular strtab is
used to find all of the ELF section names.) */
@@ -729,6 +740,16 @@ elf_object_p (abfd)
return (abfd->xvec);
got_wrong_format_error:
+ /* There is way too much undoing of half-known state here. The caller,
+ bfd_check_format_matches, really shouldn't iterate on live bfd's to
+ check match/no-match like it does. We have to rely on that a call to
+ bfd_default_set_arch_mach with the previously known mach, undoes what
+ was done by the first bfd_default_set_arch_mach (with mach 0) here.
+ For this to work, only elf-data and the mach may be changed by the
+ target-specific elf_backend_object_p function. Note that saving the
+ whole bfd here and restoring it would be even worse; the first thing
+ you notice is that the cached bfd file position gets out of sync. */
+ bfd_default_set_arch_mach (abfd, previous_arch, previous_mach);
bfd_set_error (bfd_error_wrong_format);
got_no_match:
if (new_tdata != NULL
@@ -739,6 +760,8 @@ elf_object_p (abfd)
if (new_tdata != NULL)
bfd_release (abfd, new_tdata);
elf_tdata (abfd) = preserved_tdata;
+ abfd->sections = preserved_sections;
+ abfd->section_count = preserved_section_count;
return (NULL);
}
@@ -746,8 +769,8 @@ elf_object_p (abfd)
/* Write out the relocs. */
-static void
-write_relocs (abfd, sec, data)
+void
+elf_write_relocs (abfd, sec, data)
bfd *abfd;
asection *sec;
PTR data;
@@ -795,7 +818,7 @@ write_relocs (abfd, sec, data)
SHT_REL section. */
abort ();
- /* orelocation has the data, reloc_count has the count... */
+ /* orelocation has the data, reloc_count has the count... */
if (use_rela_p)
{
outbound_relocas = (Elf_External_Rela *) rela_hdr->contents;
@@ -941,7 +964,7 @@ elf_write_shdrs_and_ehdr (abfd)
i_ehdrp = elf_elfheader (abfd);
i_shdrp = elf_elfsections (abfd);
- /* swap the header before spitting it out... */
+ /* swap the header before spitting it out... */
#if DEBUG & 1
elf_debug_file (i_ehdrp);
@@ -952,7 +975,7 @@ elf_write_shdrs_and_ehdr (abfd)
!= sizeof (x_ehdr)))
return false;
- /* at this point we've concocted all the ELF sections... */
+ /* at this point we've concocted all the ELF sections... */
x_shdrp = (Elf_External_Shdr *)
bfd_alloc (abfd, sizeof (*x_shdrp) * (i_ehdrp->e_shnum));
if (!x_shdrp)
@@ -970,7 +993,7 @@ elf_write_shdrs_and_ehdr (abfd)
!= sizeof (*x_shdrp) * i_ehdrp->e_shnum))
return false;
- /* need to dump the string table too... */
+ /* need to dump the string table too... */
return true;
}
@@ -998,7 +1021,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
based on a one-to-one mapping of the ELF symbols to canonical
symbols. We actually use all the ELF symbols, so there will be no
space left over at the end. When we have all the symbols, we
- build the caller's pointer vector. */
+ build the caller's pointer vector. */
if (! dynamic)
{
@@ -1226,7 +1249,7 @@ error_return:
return -1;
}
-/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of
+/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of
them. */
static boolean
@@ -1325,7 +1348,7 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
/* Read in and swap the external relocs. */
-static boolean
+boolean
elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
bfd *abfd;
asection *asect;
@@ -1349,11 +1372,9 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
return true;
rel_hdr = &d->rel_hdr;
- reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ reloc_count = NUM_SHDR_ENTRIES (rel_hdr);
rel_hdr2 = d->rel_hdr2;
- reloc_count2 = (rel_hdr2
- ? (rel_hdr2->sh_size / rel_hdr2->sh_entsize)
- : 0);
+ reloc_count2 = (rel_hdr2 ? NUM_SHDR_ENTRIES (rel_hdr2) : 0);
BFD_ASSERT (asect->reloc_count == reloc_count + reloc_count2);
BFD_ASSERT (asect->rel_filepos == rel_hdr->sh_offset
@@ -1370,13 +1391,13 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
return true;
rel_hdr = &d->this_hdr;
- reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ reloc_count = NUM_SHDR_ENTRIES (rel_hdr);
rel_hdr2 = NULL;
reloc_count2 = 0;
}
- relents = ((arelent *)
- bfd_alloc (abfd,
+ relents = ((arelent *)
+ bfd_alloc (abfd,
(reloc_count + reloc_count2) * sizeof (arelent)));
if (relents == NULL)
return false;
@@ -1386,15 +1407,14 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
relents,
symbols, dynamic))
return false;
-
- if (rel_hdr2
+
+ if (rel_hdr2
&& !elf_slurp_reloc_table_from_section (abfd, asect,
rel_hdr2, reloc_count2,
relents + reloc_count,
symbols, dynamic))
return false;
-
asect->relocation = relents;
return true;
}
@@ -1527,13 +1547,13 @@ const struct elf_size_info NAME(_bfd_elf,size_info) = {
sizeof (Elf_External_Sym),
sizeof (Elf_External_Dyn),
sizeof (Elf_External_Note),
- ARCH_SIZE / 8,
+ 4,
1,
ARCH_SIZE, FILE_ALIGN,
ELFCLASS, EV_CURRENT,
elf_write_out_phdrs,
elf_write_shdrs_and_ehdr,
- write_relocs,
+ elf_write_relocs,
elf_swap_symbol_out,
elf_slurp_reloc_table,
elf_slurp_symbol_table,
diff --git a/gnu/usr.bin/binutils/bfd/elfcore.h b/gnu/usr.bin/binutils/bfd/elfcore.h
index e4454aac9d0..ef71762e113 100644
--- a/gnu/usr.bin/binutils/bfd/elfcore.h
+++ b/gnu/usr.bin/binutils/bfd/elfcore.h
@@ -1,5 +1,6 @@
/* ELF core file support for BFD.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +18,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
char*
elf_core_file_failing_command (abfd)
bfd *abfd;
@@ -32,7 +32,6 @@ elf_core_file_failing_signal (abfd)
return elf_tdata (abfd)->core_signal;
}
-
boolean
elf_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd;
@@ -40,7 +39,7 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd)
{
char* corename;
- /* xvecs must match if both are ELF files for the same target. */
+ /* xvecs must match if both are ELF files for the same target. */
if (core_bfd->xvec != exec_bfd->xvec)
{
@@ -48,7 +47,7 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd)
return false;
}
- /* See if the name in the corefile matches the executable name. */
+ /* See if the name in the corefile matches the executable name. */
corename = elf_tdata (core_bfd)->core_program;
if (corename != NULL)
@@ -63,7 +62,6 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd)
return true;
}
-
/* Core files are simply standard ELF formatted files that partition
the file using the execution view of the file (program header table)
rather than the linking view. In fact, there is no section header
@@ -83,9 +81,11 @@ elf_core_file_p (abfd)
{
Elf_External_Ehdr x_ehdr; /* Elf file header, external form */
Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
- Elf_Internal_Phdr *i_phdrp; /* Elf program header, internal form */
+ Elf_Internal_Phdr *i_phdrp = NULL; /* Elf program header, internal form */
unsigned int phindex;
struct elf_backend_data *ebd;
+ struct elf_obj_tdata *preserved_tdata = elf_tdata (abfd);
+ struct elf_obj_tdata *new_tdata = NULL;
/* Read in the ELF header in external format. */
if (bfd_read ((PTR) & x_ehdr, sizeof (x_ehdr), 1, abfd) != sizeof (x_ehdr))
@@ -95,21 +95,17 @@ elf_core_file_p (abfd)
return NULL;
}
- /* Check the magic number. */
+ /* Check the magic number. */
if (elf_file_p (&x_ehdr) == false)
- {
- wrong:
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
+ goto wrong;
/* FIXME: Check EI_VERSION here ! */
- /* Check the address size ("class"). */
+ /* Check the address size ("class"). */
if (x_ehdr.e_ident[EI_CLASS] != ELFCLASS)
goto wrong;
- /* Check the byteorder. */
+ /* Check the byteorder. */
switch (x_ehdr.e_ident[EI_DATA])
{
case ELFDATA2MSB: /* Big-endian */
@@ -124,15 +120,14 @@ elf_core_file_p (abfd)
goto wrong;
}
- /* Give abfd an elf_obj_tdata. */
- elf_tdata (abfd) =
+ /* Give abfd an elf_obj_tdata. */
+ new_tdata =
(struct elf_obj_tdata *) bfd_zalloc (abfd, sizeof (struct elf_obj_tdata));
- if (elf_tdata (abfd) == NULL)
+ if (new_tdata == NULL)
return NULL;
+ elf_tdata (abfd) = new_tdata;
- /* FIXME: from here on down, "goto wrong" will leak memory. */
-
- /* Swap in the rest of the header, now that we have the byte order. */
+ /* Swap in the rest of the header, now that we have the byte order. */
i_ehdrp = elf_elfheader (abfd);
elf_swap_ehdr_in (abfd, &x_ehdr, i_ehdrp);
@@ -176,7 +171,7 @@ elf_core_file_p (abfd)
}
/* If there is no program header, or the type is not a core file, then
- we are hosed. */
+ we are hosed. */
if (i_ehdrp->e_phoff == 0 || i_ehdrp->e_type != ET_CORE)
goto wrong;
@@ -185,42 +180,64 @@ elf_core_file_p (abfd)
if (i_ehdrp->e_phentsize != sizeof (Elf_External_Phdr))
goto wrong;
- /* Allocate space for the program headers. */
+ /* Move to the start of the program headers. */
+ if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) != 0)
+ goto wrong;
+
+ /* Allocate space for the program headers. */
i_phdrp = (Elf_Internal_Phdr *)
bfd_alloc (abfd, sizeof (*i_phdrp) * i_ehdrp->e_phnum);
if (!i_phdrp)
- return NULL;
+ goto fail;
elf_tdata (abfd)->phdr = i_phdrp;
- /* Read and convert to internal form. */
+ /* Read and convert to internal form. */
for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
{
Elf_External_Phdr x_phdr;
if (bfd_read ((PTR) &x_phdr, sizeof (x_phdr), 1, abfd)
!= sizeof (x_phdr))
- return NULL;
+ goto fail;
elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex);
}
- /* Process each program header. */
+ /* Process each program header. */
for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
{
if (!_bfd_elfcore_section_from_phdr (abfd, i_phdrp + phindex, phindex))
- return NULL;
+ goto fail;
}
- /* Set the machine architecture. */
+ /* Set the machine architecture. */
if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0))
{
/* It's OK if this fails for the generic target. */
if (ebd->elf_machine_code != EM_NONE)
- return NULL;
+ goto fail;
}
- /* Save the entry point from the ELF header. */
+ /* Save the entry point from the ELF header. */
bfd_get_start_address (abfd) = i_ehdrp->e_entry;
+ /* Let the backend double check the format and override global
+ information. */
+ if (ebd->elf_backend_object_p)
+ {
+ if ((*ebd->elf_backend_object_p) (abfd) == false)
+ goto wrong;
+ }
+
return abfd->xvec;
+
+wrong:
+ bfd_set_error (bfd_error_wrong_format);
+fail:
+ if (i_phdrp != NULL)
+ bfd_release (abfd, i_phdrp);
+ if (new_tdata != NULL)
+ bfd_release (abfd, new_tdata);
+ elf_tdata (abfd) = preserved_tdata;
+ return NULL;
}
diff --git a/gnu/usr.bin/binutils/bfd/elflink.c b/gnu/usr.bin/binutils/bfd/elflink.c
index 8039b4fe35b..b971311d155 100644
--- a/gnu/usr.bin/binutils/bfd/elflink.c
+++ b/gnu/usr.bin/binutils/bfd/elflink.c
@@ -1,5 +1,6 @@
/* ELF linking support for BFD.
- Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -41,9 +42,17 @@ _bfd_elf_create_got_section (abfd, info)
switch (bed->s->arch_size)
{
- case 32: ptralign = 2; break;
- case 64: ptralign = 3; break;
- default: abort();
+ case 32:
+ ptralign = 2;
+ break;
+
+ case 64:
+ ptralign = 3;
+ break;
+
+ default:
+ bfd_set_error (bfd_error_bad_value);
+ return false;
}
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
@@ -89,7 +98,6 @@ _bfd_elf_create_got_section (abfd, info)
return true;
}
-
/* Create dynamic sections when linking against a dynamic object. */
boolean
@@ -100,13 +108,21 @@ _bfd_elf_create_dynamic_sections (abfd, info)
flagword flags, pltflags;
register asection *s;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
- int ptralign = 0;
+ int ptralign;
switch (bed->s->arch_size)
{
- case 32: ptralign = 2; break;
- case 64: ptralign = 3; break;
- default: abort();
+ case 32:
+ ptralign = 2;
+ break;
+
+ case 64:
+ ptralign = 3;
+ break;
+
+ default:
+ bfd_set_error (bfd_error_bad_value);
+ return false;
}
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
@@ -147,7 +163,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
return false;
}
- s = bfd_make_section (abfd,
+ s = bfd_make_section (abfd,
bed->default_use_rela_p ? ".rela.plt" : ".rel.plt");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
@@ -183,9 +199,9 @@ _bfd_elf_create_dynamic_sections (abfd, info)
copy relocs. */
if (! info->shared)
{
- s = bfd_make_section (abfd,
- (bed->default_use_rela_p
- ? ".rela.bss" : ".rel.bss"));
+ s = bfd_make_section (abfd,
+ (bed->default_use_rela_p
+ ? ".rela.bss" : ".rel.bss"));
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, ptralign))
@@ -196,7 +212,6 @@ _bfd_elf_create_dynamic_sections (abfd, info)
return true;
}
-
/* Record a new dynamic symbol. We record the dynamic symbols as we
read the input files, since we need to have a list of all of them
before we can determine the final sizes of the output sections.
@@ -318,7 +333,7 @@ elf_link_renumber_hash_table_dynsyms (h, data)
return true;
}
-/* Assign dynsym indicies. In a shared library we generate a section
+/* 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. */
@@ -482,7 +497,6 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
return lsect;
}
-
/* Find a linker generated pointer with a given addend and type. */
@@ -500,7 +514,6 @@ _bfd_elf_find_pointer_linker_section (linker_pointers, addend, which)
return (elf_linker_section_pointers_t *)0;
}
-
/* Make the .rela section corresponding to the generated linker section. */
diff --git a/gnu/usr.bin/binutils/bfd/elflink.h b/gnu/usr.bin/binutils/bfd/elflink.h
index 0230892553c..26808abf614 100644
--- a/gnu/usr.bin/binutils/bfd/elflink.h
+++ b/gnu/usr.bin/binutils/bfd/elflink.h
@@ -1,5 +1,6 @@
/* ELF linker support.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -35,7 +36,7 @@ static boolean elf_link_add_archive_symbols
static boolean elf_merge_symbol
PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
asection **, bfd_vma *, struct elf_link_hash_entry **,
- boolean *, boolean *, boolean *));
+ boolean *, boolean *, boolean *, boolean));
static boolean elf_export_symbol
PARAMS ((struct elf_link_hash_entry *, PTR));
static boolean elf_fix_symbol_flags
@@ -50,14 +51,14 @@ static boolean elf_link_assign_sym_version
PARAMS ((struct elf_link_hash_entry *, PTR));
static boolean elf_collect_hash_codes
PARAMS ((struct elf_link_hash_entry *, PTR));
-static boolean elf_link_read_relocs_from_section
+static boolean elf_link_read_relocs_from_section
PARAMS ((bfd *, Elf_Internal_Shdr *, PTR, Elf_Internal_Rela *));
static void elf_link_output_relocs
PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *));
static boolean elf_link_size_reloc_section
PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
-static void elf_link_adjust_relocs
- PARAMS ((bfd *, Elf_Internal_Shdr *, unsigned int,
+static void elf_link_adjust_relocs
+ PARAMS ((bfd *, Elf_Internal_Shdr *, unsigned int,
struct elf_link_hash_entry **));
/* Given an ELF BFD, add symbols to the global hash table as
@@ -80,9 +81,9 @@ elf_bfd_link_add_symbols (abfd, info)
}
}
-/* Return true iff this is a non-common definition of a symbol. */
+/* Return true iff this is a non-common, definition of a non-function symbol. */
static boolean
-is_global_symbol_definition (abfd, sym)
+is_global_data_symbol_definition (abfd, sym)
bfd * abfd ATTRIBUTE_UNUSED;
Elf_Internal_Sym * sym;
{
@@ -91,10 +92,14 @@ is_global_symbol_definition (abfd, sym)
&& ELF_ST_BIND (sym->st_info) < STB_LOOS)
return false;
+ /* Function symbols do not count. */
+ if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
+ return false;
+
/* If the section is undefined, then so is the symbol. */
if (sym->st_shndx == SHN_UNDEF)
return false;
-
+
/* If the symbol is defined in the common section, then
it is a common definition and so does not count. */
if (sym->st_shndx == SHN_COMMON)
@@ -104,20 +109,19 @@ is_global_symbol_definition (abfd, sym)
must rely upon the backend to tell us what it is. */
if (sym->st_shndx >= SHN_LORESERVE && sym->st_shndx < SHN_ABS)
/* FIXME - this function is not coded yet:
-
+
return _bfd_is_global_symbol_definition (abfd, sym);
-
+
Instead for now assume that the definition is not global,
Even if this is wrong, at least the linker will behave
in the same way that it used to do. */
return false;
-
+
return true;
}
-
/* Search the symbol table of the archive element of the archive ABFD
- whoes archove map contains a mention of SYMDEF, and determine if
+ whose archive map contains a mention of SYMDEF, and determine if
the symbol is defined in this element. */
static boolean
elf_link_is_defined_archive_symbol (abfd, symdef)
@@ -132,7 +136,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef)
size_t extsymcount;
size_t extsymoff;
boolean result = false;
-
+
abfd = _bfd_get_elt_at_filepos (abfd, symdef->file_offset);
if (abfd == (bfd *) NULL)
return false;
@@ -146,7 +150,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef)
(re)include this element. */
if (abfd->archive_pass)
return false;
-
+
/* Select the appropriate symbol table. */
if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0)
hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -202,17 +206,16 @@ elf_link_is_defined_archive_symbol (abfd, symdef)
if (strcmp (name, symdef->name) == 0)
{
- result = is_global_symbol_definition (abfd, & sym);
+ result = is_global_data_symbol_definition (abfd, & sym);
break;
}
}
free (buf);
-
+
return result;
}
-
/* Add symbols from an ELF archive file to the linker hash table. We
don't use _bfd_generic_link_add_archive_symbols because of a
problem which arises on UnixWare. The UnixWare libc.so is an
@@ -357,7 +360,6 @@ elf_link_add_archive_symbols (abfd, info)
}
/* We need to include this archive member. */
-
element = _bfd_get_elt_at_filepos (abfd, symdef->file_offset);
if (element == (bfd *) NULL)
goto error_return;
@@ -434,11 +436,12 @@ elf_link_add_archive_symbols (abfd, info)
TYPE_CHANGE_OK if it is OK for the type to change. We set
SIZE_CHANGE_OK if it is OK for the size to change. By OK to
change, we mean that we shouldn't warn if the type or size does
- change. */
+ change. DT_NEEDED indicates if it comes from a DT_NEEDED entry of
+ a shared object. */
static boolean
elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
- override, type_change_ok, size_change_ok)
+ override, type_change_ok, size_change_ok, dt_needed)
bfd *abfd;
struct bfd_link_info *info;
const char *name;
@@ -449,6 +452,7 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
boolean *override;
boolean *type_change_ok;
boolean *size_change_ok;
+ boolean dt_needed;
{
asection *sec;
struct elf_link_hash_entry *h;
@@ -625,9 +629,11 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
olddyncommon = false;
/* It's OK to change the type if either the existing symbol or the
- new symbol is weak. */
+ new symbol is weak unless it comes from a DT_NEEDED entry of
+ a shared object, in which case, the DT_NEEDED entry may not be
+ required at the run time. */
- if (h->root.type == bfd_link_hash_defweak
+ if ((! dt_needed && h->root.type == bfd_link_hash_defweak)
|| h->root.type == bfd_link_hash_undefweak
|| bind == STB_WEAK)
*type_change_ok = true;
@@ -679,7 +685,9 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
object to override a weak symbol in a shared object.
We prefer a non-weak definition in a shared library to a weak
- definition in the executable. */
+ definition in the executable unless it comes from a DT_NEEDED
+ entry of a shared object, in which case, the DT_NEEDED entry
+ may not be required at the run time. */
if (newdyn
&& newdef
@@ -688,6 +696,7 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
&& (bind == STB_WEAK
|| ELF_ST_TYPE (sym->st_info) == STT_FUNC)))
&& (h->root.type != bfd_link_hash_defweak
+ || dt_needed
|| bind == STB_WEAK))
{
*override = true;
@@ -822,8 +831,11 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
/* Handle the special case of a weak definition in a regular object
followed by a non-weak definition in a shared object. In this
- case, we prefer the definition in the shared object. */
+ case, we prefer the definition in the shared object unless it
+ comes from a DT_NEEDED entry of a shared object, in which case,
+ the DT_NEEDED entry may not be required at the run time. */
if (olddef
+ && ! dt_needed
&& h->root.type == bfd_link_hash_defweak
&& newdef
&& newdyn
@@ -883,7 +895,6 @@ elf_link_add_object_symbols (abfd, info)
Elf_External_Sym *buf = NULL;
struct elf_link_hash_entry **sym_hash;
boolean dynamic;
- bfd_byte *dynver = NULL;
Elf_External_Versym *extversym = NULL;
Elf_External_Versym *ever;
Elf_External_Dyn *dynbuf = NULL;
@@ -891,6 +902,7 @@ elf_link_add_object_symbols (abfd, info)
Elf_External_Sym *esym;
Elf_External_Sym *esymend;
struct elf_backend_data *bed;
+ boolean dt_needed;
bed = get_elf_backend_data (abfd);
add_symbol_hook = bed->elf_add_symbol_hook;
@@ -1010,7 +1022,7 @@ elf_link_add_object_symbols (abfd, info)
Elf_Internal_Shdr *versymhdr;
versymhdr = &elf_tdata (abfd)->dynversym_hdr;
- extversym = (Elf_External_Versym *) bfd_malloc (hdr->sh_size);
+ extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size);
if (extversym == NULL)
goto error_return;
if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0
@@ -1050,6 +1062,8 @@ elf_link_add_object_symbols (abfd, info)
goto error_return;
elf_sym_hashes (abfd) = sym_hash;
+ dt_needed = false;
+
if (! dynamic)
{
/* If we are creating a shared library, create all the dynamic
@@ -1086,7 +1100,12 @@ elf_link_add_object_symbols (abfd, info)
{
name = elf_dt_name (abfd);
if (*name == '\0')
- add_needed = false;
+ {
+ if (elf_dt_soname (abfd) != NULL)
+ dt_needed = true;
+
+ add_needed = false;
+ }
}
s = bfd_get_section_by_name (abfd, ".dynamic");
if (s != NULL)
@@ -1095,6 +1114,8 @@ elf_link_add_object_symbols (abfd, info)
Elf_External_Dyn *extdynend;
int elfsec;
unsigned long link;
+ int rpath;
+ int runpath;
dynbuf = (Elf_External_Dyn *) bfd_malloc ((size_t) s->_raw_size);
if (dynbuf == NULL)
@@ -1128,6 +1149,8 @@ elf_link_add_object_symbols (abfd, info)
extdyn = dynbuf;
extdynend = extdyn + s->_raw_size / sizeof (Elf_External_Dyn);
+ rpath = 0;
+ runpath = 0;
for (; extdyn < extdynend; extdyn++)
{
Elf_Internal_Dyn dyn;
@@ -1164,6 +1187,65 @@ elf_link_add_object_symbols (abfd, info)
;
*pn = n;
}
+ if (dyn.d_tag == DT_RUNPATH)
+ {
+ struct bfd_link_needed_list *n, **pn;
+ char *fnm, *anm;
+
+ /* When we see DT_RPATH before DT_RUNPATH, we have
+ to clear runpath. Do _NOT_ bfd_release, as that
+ frees all more recently bfd_alloc'd blocks as
+ well. */
+ if (rpath && elf_hash_table (info)->runpath)
+ elf_hash_table (info)->runpath = NULL;
+
+ n = ((struct bfd_link_needed_list *)
+ bfd_alloc (abfd, sizeof (struct bfd_link_needed_list)));
+ fnm = bfd_elf_string_from_elf_section (abfd, link,
+ dyn.d_un.d_val);
+ if (n == NULL || fnm == NULL)
+ goto error_return;
+ anm = bfd_alloc (abfd, strlen (fnm) + 1);
+ if (anm == NULL)
+ goto error_return;
+ strcpy (anm, fnm);
+ n->name = anm;
+ n->by = abfd;
+ n->next = NULL;
+ for (pn = &elf_hash_table (info)->runpath;
+ *pn != NULL;
+ pn = &(*pn)->next)
+ ;
+ *pn = n;
+ runpath = 1;
+ rpath = 0;
+ }
+ /* Ignore DT_RPATH if we have seen DT_RUNPATH. */
+ if (!runpath && dyn.d_tag == DT_RPATH)
+ {
+ struct bfd_link_needed_list *n, **pn;
+ char *fnm, *anm;
+
+ n = ((struct bfd_link_needed_list *)
+ bfd_alloc (abfd, sizeof (struct bfd_link_needed_list)));
+ fnm = bfd_elf_string_from_elf_section (abfd, link,
+ dyn.d_un.d_val);
+ if (n == NULL || fnm == NULL)
+ goto error_return;
+ anm = bfd_alloc (abfd, strlen (fnm) + 1);
+ if (anm == NULL)
+ goto error_return;
+ strcpy (anm, fnm);
+ n->name = anm;
+ n->by = abfd;
+ n->next = NULL;
+ for (pn = &elf_hash_table (info)->runpath;
+ *pn != NULL;
+ pn = &(*pn)->next)
+ ;
+ *pn = n;
+ rpath = 1;
+ }
}
free (dynbuf);
@@ -1291,8 +1373,6 @@ elf_link_add_object_symbols (abfd, info)
if (sym.st_shndx != SHN_UNDEF
&& sym.st_shndx != SHN_COMMON)
flags = BSF_GLOBAL;
- else
- flags = 0;
}
else if (bind == STB_WEAK)
flags = BSF_WEAK;
@@ -1458,7 +1538,7 @@ elf_link_add_object_symbols (abfd, info)
if (! elf_merge_symbol (abfd, info, name, &sym, &sec, &value,
sym_hash, &override, &type_change_ok,
- &size_change_ok))
+ &size_change_ok, dt_needed))
goto error_return;
if (override)
@@ -1527,7 +1607,10 @@ elf_link_add_object_symbols (abfd, info)
unsigned int align;
align = bfd_log2 (sym.st_value);
- if (align > old_alignment)
+ if (align > old_alignment
+ /* Permit an alignment power of zero if an alignment of one
+ is specified and no other alignments have been specified. */
+ || (sym.st_value == 1 && old_alignment == 0))
h->root.u.c.p->alignment_power = align;
}
@@ -1579,10 +1662,10 @@ elf_link_add_object_symbols (abfd, info)
/* Combine visibilities, using the most constraining one. */
unsigned char hvis = ELF_ST_VISIBILITY (h->other);
unsigned char symvis = ELF_ST_VISIBILITY (sym.st_other);
-
+
if (symvis && (hvis > symvis || hvis == 0))
h->other = sym.st_other;
-
+
/* If neither has visibility, use the st_other of the
definition. This is an arbitrary choice, since the
other bits have no general meaning. */
@@ -1634,7 +1717,7 @@ elf_link_add_object_symbols (abfd, info)
name to the fully decorated name. This will cause
external references which do not specify a version to be
bound to this version of the symbol. */
- if (definition)
+ if (definition || h->root.type == bfd_link_hash_common)
{
char *p;
@@ -1661,7 +1744,8 @@ elf_link_add_object_symbols (abfd, info)
size_change_ok = false;
if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec,
&value, &hi, &override,
- &type_change_ok, &size_change_ok))
+ &type_change_ok,
+ &size_change_ok, dt_needed))
goto error_return;
if (! override)
@@ -1778,7 +1862,8 @@ elf_link_add_object_symbols (abfd, info)
size_change_ok = false;
if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec,
&value, &hi, &override,
- &type_change_ok, &size_change_ok))
+ &type_change_ok,
+ &size_change_ok, dt_needed))
goto error_return;
if (override)
@@ -1859,11 +1944,58 @@ elf_link_add_object_symbols (abfd, info)
switch (ELF_ST_VISIBILITY (h->other))
{
case STV_INTERNAL:
- case STV_HIDDEN:
+ case STV_HIDDEN:
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- (*bed->elf_backend_hide_symbol) (h);
+ (*bed->elf_backend_hide_symbol) (info, h);
break;
}
+
+ if (dt_needed && definition
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_REF_REGULAR) != 0)
+ {
+ bfd_size_type oldsize;
+ bfd_size_type strindex;
+
+ /* The symbol from a DT_NEEDED object is referenced from
+ the regular object to create a dynamic executable. We
+ have to make sure there is a DT_NEEDED entry for it. */
+
+ dt_needed = false;
+ oldsize = _bfd_stringtab_size (elf_hash_table (info)->dynstr);
+ strindex = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
+ elf_dt_soname (abfd),
+ true, false);
+ if (strindex == (bfd_size_type) -1)
+ goto error_return;
+
+ if (oldsize
+ == _bfd_stringtab_size (elf_hash_table (info)->dynstr))
+ {
+ asection *sdyn;
+ Elf_External_Dyn *dyncon, *dynconend;
+
+ sdyn = bfd_get_section_by_name (elf_hash_table (info)->dynobj,
+ ".dynamic");
+ BFD_ASSERT (sdyn != NULL);
+
+ dyncon = (Elf_External_Dyn *) sdyn->contents;
+ dynconend = (Elf_External_Dyn *) (sdyn->contents +
+ sdyn->_raw_size);
+ for (; dyncon < dynconend; dyncon++)
+ {
+ Elf_Internal_Dyn dyn;
+
+ elf_swap_dyn_in (elf_hash_table (info)->dynobj,
+ dyncon, &dyn);
+ BFD_ASSERT (dyn.d_tag != DT_NEEDED ||
+ dyn.d_un.d_val != strindex);
+ }
+ }
+
+ if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex))
+ goto error_return;
+ }
}
}
@@ -2041,8 +2173,6 @@ elf_link_add_object_symbols (abfd, info)
free (buf);
if (dynbuf != NULL)
free (dynbuf);
- if (dynver != NULL)
- free (dynver);
if (extversym != NULL)
free (extversym);
return false;
@@ -2280,7 +2410,6 @@ elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
return true;
}
-
/* Read and swap the relocs from the section indicated by SHDR. This
may be either a REL or a RELA section. The relocations are
translated into RELA relocations and stored in INTERNAL_RELOCS,
@@ -2324,13 +2453,13 @@ elf_link_read_relocs_from_section (abfd, shdr, external_relocs,
Elf_Internal_Rel *irel;
erel = (Elf_External_Rel *) external_relocs;
- erelend = erel + shdr->sh_size / shdr->sh_entsize;
+ erelend = erel + NUM_SHDR_ENTRIES (shdr);
irela = internal_relocs;
irel = bfd_alloc (abfd, (bed->s->int_rels_per_ext_rel
* sizeof (Elf_Internal_Rel)));
for (; erel < erelend; erel++, irela += bed->s->int_rels_per_ext_rel)
{
- unsigned char i;
+ unsigned int i;
if (bed->s->swap_reloc_in)
(*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, irel);
@@ -2354,7 +2483,7 @@ elf_link_read_relocs_from_section (abfd, shdr, external_relocs,
BFD_ASSERT (shdr->sh_entsize == sizeof (Elf_External_Rela));
erela = (Elf_External_Rela *) external_relocs;
- erelaend = erela + shdr->sh_size / shdr->sh_entsize;
+ erelaend = erela + NUM_SHDR_ENTRIES (shdr);
irela = internal_relocs;
for (; erela < erelaend; erela++, irela += bed->s->int_rels_per_ext_rel)
{
@@ -2404,7 +2533,7 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
{
size_t size;
- size = (o->reloc_count * bed->s->int_rels_per_ext_rel
+ size = (o->reloc_count * bed->s->int_rels_per_ext_rel
* sizeof (Elf_Internal_Rela));
if (keep_memory)
internal_relocs = (Elf_Internal_Rela *) bfd_alloc (abfd, size);
@@ -2430,11 +2559,11 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
external_relocs,
internal_relocs))
goto error_return;
- if (!elf_link_read_relocs_from_section
- (abfd,
+ if (!elf_link_read_relocs_from_section
+ (abfd,
elf_section_data (o)->rel_hdr2,
((bfd_byte *) external_relocs) + rel_hdr->sh_size,
- internal_relocs + (rel_hdr->sh_size / rel_hdr->sh_entsize
+ internal_relocs + (NUM_SHDR_ENTRIES (rel_hdr)
* bed->s->int_rels_per_ext_rel)))
goto error_return;
@@ -2458,7 +2587,6 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
return NULL;
}
-
/* Record an assignment to a symbol made by a linker script. We need
this in case some dynamic object refers to this symbol. */
@@ -2765,7 +2893,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
{
struct elf_info_failed eif;
struct elf_link_hash_entry *h;
- bfd_size_type strsize;
+ asection *dynstr;
*sinterpptr = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (*sinterpptr != NULL || info->shared);
@@ -2783,6 +2911,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
{
if (! elf_add_dynamic_entry (info, DT_SYMBOLIC, 0))
return false;
+ info->flags |= DF_SYMBOLIC;
}
if (rpath != NULL)
@@ -2792,7 +2921,9 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, rpath,
true, true);
if (indx == (bfd_size_type) -1
- || ! elf_add_dynamic_entry (info, DT_RPATH, indx))
+ || ! elf_add_dynamic_entry (info, DT_RPATH, indx)
+ || (info->new_dtags
+ && ! elf_add_dynamic_entry (info, DT_RUNPATH, indx)))
return false;
}
@@ -2823,14 +2954,13 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
}
}
+ eif.info = info;
+ eif.failed = false;
+
/* If we are supposed to export all symbols into the dynamic symbol
table (this is not the normal case), then do so. */
if (export_dynamic)
{
- struct elf_info_failed eif;
-
- eif.failed = false;
- eif.info = info;
elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol,
(PTR) &eif);
if (eif.failed)
@@ -2852,8 +2982,6 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
/* Find all symbols which were defined in a dynamic object and make
the backend pick a reasonable value for them. */
- eif.failed = false;
- eif.info = info;
elf_link_hash_traverse (elf_hash_table (info),
elf_adjust_dynamic_symbol,
(PTR) &eif);
@@ -2867,7 +2995,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
/* If there are initialization and/or finalization functions to
call then add the corresponding DT_INIT/DT_FINI entries. */
h = (info->init_function
- ? elf_link_hash_lookup (elf_hash_table (info),
+ ? elf_link_hash_lookup (elf_hash_table (info),
info->init_function, false,
false, false)
: NULL);
@@ -2879,7 +3007,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
return false;
}
h = (info->fini_function
- ? elf_link_hash_lookup (elf_hash_table (info),
+ ? elf_link_hash_lookup (elf_hash_table (info),
info->fini_function, false,
false, false)
: NULL);
@@ -2891,14 +3019,24 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
return false;
}
- strsize = _bfd_stringtab_size (elf_hash_table (info)->dynstr);
- if (! elf_add_dynamic_entry (info, DT_HASH, 0)
- || ! elf_add_dynamic_entry (info, DT_STRTAB, 0)
- || ! elf_add_dynamic_entry (info, DT_SYMTAB, 0)
- || ! elf_add_dynamic_entry (info, DT_STRSZ, strsize)
- || ! elf_add_dynamic_entry (info, DT_SYMENT,
- sizeof (Elf_External_Sym)))
- return false;
+ dynstr = bfd_get_section_by_name (dynobj, ".dynstr");
+ /* If .dynstr is excluded from the link, we don't want any of
+ these tags. Strictly, we should be checking each section
+ individually; This quick check covers for the case where
+ someone does a /DISCARD/ : { *(*) }. */
+ if (dynstr != NULL && dynstr->output_section != bfd_abs_section_ptr)
+ {
+ bfd_size_type strsize;
+
+ strsize = _bfd_stringtab_size (elf_hash_table (info)->dynstr);
+ if (! elf_add_dynamic_entry (info, DT_HASH, 0)
+ || ! elf_add_dynamic_entry (info, DT_STRTAB, 0)
+ || ! elf_add_dynamic_entry (info, DT_SYMTAB, 0)
+ || ! elf_add_dynamic_entry (info, DT_STRSZ, strsize)
+ || ! elf_add_dynamic_entry (info, DT_SYMENT,
+ sizeof (Elf_External_Sym)))
+ return false;
+ }
}
/* The backend must work out the sizes of all the other dynamic
@@ -2912,7 +3050,6 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
size_t dynsymcount;
asection *s;
size_t bucketcount = 0;
- Elf_Internal_Sym isym;
size_t hash_entry_size;
/* Set up the version definition section. */
@@ -3081,6 +3218,22 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
elf_tdata (output_bfd)->cverdefs = cdefs;
}
+ if (info->new_dtags && info->flags)
+ {
+ if (! elf_add_dynamic_entry (info, DT_FLAGS, info->flags))
+ return false;
+ }
+
+ if (info->flags_1)
+ {
+ if (! info->shared)
+ info->flags_1 &= ~ (DF_1_INITFIRST
+ | DF_1_NODELETE
+ | DF_1_NOOPEN);
+ if (! elf_add_dynamic_entry (info, DT_FLAGS_1, info->flags_1))
+ return false;
+ }
+
/* Work out the size of the version reference section. */
s = bfd_get_section_by_name (dynobj, ".gnu.version_r");
@@ -3191,7 +3344,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
}
}
- /* Assign dynsym indicies. In a shared library we generate a
+ /* Assign dynsym indicies. In a shared library we generate a
section symbol for each output section, which come first.
Next come all of the back-end allocated local dynamic syms,
followed by the rest of the global symbols. */
@@ -3233,15 +3386,20 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (s->contents == NULL && s->_raw_size != 0)
return false;
- /* The first entry in .dynsym is a dummy symbol. */
- isym.st_value = 0;
- isym.st_size = 0;
- isym.st_name = 0;
- isym.st_info = 0;
- isym.st_other = 0;
- isym.st_shndx = 0;
- elf_swap_symbol_out (output_bfd, &isym,
- (PTR) (Elf_External_Sym *) s->contents);
+ if (dynsymcount != 0)
+ {
+ Elf_Internal_Sym isym;
+
+ /* The first entry in .dynsym is a dummy symbol. */
+ isym.st_value = 0;
+ isym.st_size = 0;
+ isym.st_name = 0;
+ isym.st_info = 0;
+ isym.st_other = 0;
+ isym.st_shndx = 0;
+ elf_swap_symbol_out (output_bfd, &isym,
+ (PTR) (Elf_External_Sym *) s->contents);
+ }
/* Compute the size of the hashing table. As a side effect this
computes the hash values for all the names we export. */
@@ -3257,7 +3415,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
memset (s->contents, 0, (size_t) s->_raw_size);
bfd_put (8 * hash_entry_size, output_bfd, bucketcount, s->contents);
- bfd_put (8 * hash_entry_size, output_bfd, dynsymcount,
+ bfd_put (8 * hash_entry_size, output_bfd, dynsymcount,
s->contents + hash_entry_size);
elf_hash_table (info)->bucketcount = bucketcount;
@@ -3290,6 +3448,9 @@ elf_fix_symbol_flags (h, eif)
an ELF dynamic object. */
if ((h->elf_link_hash_flags & ELF_LINK_NON_ELF) != 0)
{
+ while (h->root.type == bfd_link_hash_indirect)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
if (h->root.type != bfd_link_hash_defined
&& h->root.type != bfd_link_hash_defweak)
h->elf_link_hash_flags |= (ELF_LINK_HASH_REF_REGULAR
@@ -3351,16 +3512,24 @@ elf_fix_symbol_flags (h, eif)
/* If -Bsymbolic was used (which means to bind references to global
symbols to the definition within the shared object), and this
symbol was defined in a regular object, then it actually doesn't
- need a PLT entry. Likewise, if the symbol has any kind of
- visibility (internal, hidden, or protected), it doesn't need a
- PLT. */
+ need a PLT entry, and we can accomplish that by forcing it local.
+ Likewise, if the symbol has hidden or internal visibility.
+ FIXME: It might be that we also do not need a PLT for other
+ non-hidden visibilities, but we would have to tell that to the
+ backend specifically; we can't just clear PLT-related data here. */
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
&& eif->info->shared
- && (eif->info->symbolic || ELF_ST_VISIBILITY (h->other))
+ && (eif->info->symbolic
+ || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
+ || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
{
- h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
- h->plt.offset = (bfd_vma) -1;
+ struct elf_backend_data *bed;
+ bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
+ if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
+ || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
+ h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ (*bed->elf_backend_hide_symbol) (eif->info, h);
}
/* If this is a weak defined symbol in a dynamic object, and we know
@@ -3705,7 +3874,7 @@ elf_link_assign_sym_version (h, data)
&& ! sinfo->export_dynamic)
{
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- (*bed->elf_backend_hide_symbol) (h);
+ (*bed->elf_backend_hide_symbol) (info, h);
/* FIXME: The name of the symbol has
already been recorded in the dynamic
string table section. */
@@ -3729,7 +3898,7 @@ elf_link_assign_sym_version (h, data)
int version_index;
/* If we aren't going to export this symbol, we don't need
- to worry about it. */
+ to worry about it. */
if (h->dynindx == -1)
return true;
@@ -3817,7 +3986,7 @@ elf_link_assign_sym_version (h, data)
&& ! sinfo->export_dynamic)
{
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- (*bed->elf_backend_hide_symbol) (h);
+ (*bed->elf_backend_hide_symbol) (info, h);
/* FIXME: The name of the symbol has already
been recorded in the dynamic string table
section. */
@@ -3839,7 +4008,7 @@ elf_link_assign_sym_version (h, data)
&& ! sinfo->export_dynamic)
{
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- (*bed->elf_backend_hide_symbol) (h);
+ (*bed->elf_backend_hide_symbol) (info, h);
/* FIXME: The name of the symbol has already been
recorded in the dynamic string table section. */
}
@@ -3924,7 +4093,6 @@ elf_link_size_reloc_section (abfd, rel_hdr, o)
Elf_Internal_Shdr *rel_hdr;
asection *o;
{
- register struct elf_link_hash_entry **p, **pend;
unsigned reloc_count;
/* Figure out how many relocations there will be. */
@@ -3937,25 +4105,26 @@ elf_link_size_reloc_section (abfd, rel_hdr, o)
rel_hdr->sh_size = rel_hdr->sh_entsize * reloc_count;
/* The contents field must last into write_object_contents, so we
- allocate it with bfd_alloc rather than malloc. */
- rel_hdr->contents = (PTR) bfd_alloc (abfd, rel_hdr->sh_size);
+ allocate it with bfd_alloc rather than malloc. Also since we
+ cannot be sure that the contents will actually be filled in,
+ we zero the allocated space. */
+ rel_hdr->contents = (PTR) bfd_zalloc (abfd, rel_hdr->sh_size);
if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0)
return false;
-
+
/* We only allocate one set of hash entries, so we only do it the
first time we are called. */
if (elf_section_data (o)->rel_hashes == NULL)
{
+ struct elf_link_hash_entry **p;
+
p = ((struct elf_link_hash_entry **)
- bfd_malloc (o->reloc_count
- * sizeof (struct elf_link_hash_entry *)));
+ bfd_zmalloc (o->reloc_count
+ * sizeof (struct elf_link_hash_entry *)));
if (p == NULL && o->reloc_count != 0)
return false;
elf_section_data (o)->rel_hashes = p;
- pend = p + o->reloc_count;
- for (; p < pend; p++)
- *p = NULL;
}
return true;
@@ -3974,6 +4143,25 @@ elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash)
struct elf_link_hash_entry **rel_hash;
{
unsigned int i;
+ struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ Elf_Internal_Rel *irel;
+ Elf_Internal_Rela *irela;
+
+ irel = (Elf_Internal_Rel *) bfd_zmalloc (sizeof (Elf_Internal_Rel)
+ * bed->s->int_rels_per_ext_rel);
+ if (irel == NULL)
+ {
+ (*_bfd_error_handler) (_("Error: out of memory"));
+ abort ();
+ }
+
+ irela = (Elf_Internal_Rela *) bfd_zmalloc (sizeof (Elf_Internal_Rela)
+ * bed->s->int_rels_per_ext_rel);
+ if (irela == NULL)
+ {
+ (*_bfd_error_handler) (_("Error: out of memory"));
+ abort ();
+ }
for (i = 0; i < count; i++, rel_hash++)
{
@@ -3985,29 +4173,50 @@ elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash)
if (rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
{
Elf_External_Rel *erel;
- Elf_Internal_Rel irel;
-
+ unsigned int j;
+
erel = (Elf_External_Rel *) rel_hdr->contents + i;
- elf_swap_reloc_in (abfd, erel, &irel);
- irel.r_info = ELF_R_INFO ((*rel_hash)->indx,
- ELF_R_TYPE (irel.r_info));
- elf_swap_reloc_out (abfd, &irel, erel);
+ if (bed->s->swap_reloc_in)
+ (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, irel);
+ else
+ elf_swap_reloc_in (abfd, erel, irel);
+
+ for (j = 0; j < bed->s->int_rels_per_ext_rel; j++)
+ irel[j].r_info = ELF_R_INFO ((*rel_hash)->indx,
+ ELF_R_TYPE (irel[j].r_info));
+
+ if (bed->s->swap_reloc_out)
+ (*bed->s->swap_reloc_out) (abfd, irel, (bfd_byte *) erel);
+ else
+ elf_swap_reloc_out (abfd, irel, erel);
}
else
{
Elf_External_Rela *erela;
- Elf_Internal_Rela irela;
-
+ unsigned int j;
+
BFD_ASSERT (rel_hdr->sh_entsize
== sizeof (Elf_External_Rela));
-
+
erela = (Elf_External_Rela *) rel_hdr->contents + i;
- elf_swap_reloca_in (abfd, erela, &irela);
- irela.r_info = ELF_R_INFO ((*rel_hash)->indx,
- ELF_R_TYPE (irela.r_info));
- elf_swap_reloca_out (abfd, &irela, erela);
+ if (bed->s->swap_reloca_in)
+ (*bed->s->swap_reloca_in) (abfd, (bfd_byte *) erela, irela);
+ else
+ elf_swap_reloca_in (abfd, erela, irela);
+
+ for (j = 0; j < bed->s->int_rels_per_ext_rel; j++)
+ irela[j].r_info = ELF_R_INFO ((*rel_hash)->indx,
+ ELF_R_TYPE (irela[j].r_info));
+
+ if (bed->s->swap_reloca_out)
+ (*bed->s->swap_reloca_out) (abfd, irela, (bfd_byte *) erela);
+ else
+ elf_swap_reloca_out (abfd, irela, erela);
}
}
+
+ free (irel);
+ free (irela);
}
/* Do the final step of an ELF link. */
@@ -4100,7 +4309,7 @@ elf_bfd_final_link (abfd, info)
the linker has decided to not include. */
sec->linker_mark = true;
- if (info->relocateable)
+ if (info->relocateable || info->emitrelocations)
o->reloc_count += sec->reloc_count;
if (sec->_raw_size > max_contents_size)
@@ -4168,7 +4377,7 @@ elf_bfd_final_link (abfd, info)
/* Figure out how many relocations we will have in each section.
Just using RELOC_COUNT isn't good enough since that doesn't
maintain a separate value for REL vs. RELA relocations. */
- if (info->relocateable)
+ if (info->relocateable || info->emitrelocations)
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
for (o = sub->sections; o != NULL; o = o->next)
{
@@ -4185,9 +4394,9 @@ elf_bfd_final_link (abfd, info)
if (output_section != NULL
&& (o->flags & SEC_RELOC) != 0)
{
- struct bfd_elf_section_data *esdi
+ struct bfd_elf_section_data *esdi
= elf_section_data (o);
- struct bfd_elf_section_data *esdo
+ struct bfd_elf_section_data *esdo
= elf_section_data (output_section);
unsigned int *rel_count;
unsigned int *rel_count2;
@@ -4204,12 +4413,10 @@ elf_bfd_final_link (abfd, info)
rel_count = &esdo->rel_count2;
rel_count2 = &esdo->rel_count;
}
-
- *rel_count += (esdi->rel_hdr.sh_size
- / esdi->rel_hdr.sh_entsize);
+
+ *rel_count += NUM_SHDR_ENTRIES (& esdi->rel_hdr);
if (esdi->rel_hdr2)
- *rel_count2 += (esdi->rel_hdr2->sh_size
- / esdi->rel_hdr2->sh_entsize);
+ *rel_count2 += NUM_SHDR_ENTRIES (esdi->rel_hdr2);
}
}
@@ -4232,7 +4439,7 @@ elf_bfd_final_link (abfd, info)
}
/* Now, reset REL_COUNT and REL_COUNT2 so that we can use them
- to count upwards while actually outputting the relocations. */
+ to count upwards while actually outputting the relocations. */
elf_section_data (o)->rel_count = 0;
elf_section_data (o)->rel_count2 = 0;
}
@@ -4254,7 +4461,7 @@ elf_bfd_final_link (abfd, info)
/* sh_link is set in assign_section_numbers. */
/* sh_info is set below. */
/* sh_offset is set just below. */
- symtab_hdr->sh_addralign = 4; /* FIXME: system dependent? */
+ symtab_hdr->sh_addralign = bed->s->file_align;
off = elf_tdata (abfd)->next_file_pos;
off = _bfd_elf_assign_file_position_for_section (symtab_hdr, off, true);
@@ -4276,7 +4483,7 @@ elf_bfd_final_link (abfd, info)
/* Start writing out the symbol table. The first symbol is always a
dummy symbol. */
- if (info->strip != strip_all || info->relocateable)
+ if (info->strip != strip_all || info->relocateable || info->emitrelocations)
{
elfsym.st_value = 0;
elfsym.st_size = 0;
@@ -4309,7 +4516,7 @@ elf_bfd_final_link (abfd, info)
symbols have no names. We store the index of each one in the
index field of the section, so that we can find it again when
outputting relocs. */
- if (info->strip != strip_all || info->relocateable)
+ if (info->strip != strip_all || info->relocateable || info->emitrelocations)
{
elfsym.st_size = 0;
elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
@@ -4411,7 +4618,7 @@ elf_bfd_final_link (abfd, info)
/* That wrote out all the local symbols. Finish up the symbol table
with the global symbols. Even if we want to strip everything we
can, we still need to deal with those global symbols that got
- converted to local in a version script. */
+ converted to local in a version script. */
if (info->shared)
{
@@ -4433,7 +4640,8 @@ elf_bfd_final_link (abfd, info)
/* The sh_info field records the index of the first non local symbol. */
symtab_hdr->sh_info = bfd_get_symcount (abfd);
- if (dynamic)
+ if (dynamic
+ && finfo.dynsym_sec->output_section != bfd_abs_section_ptr)
{
Elf_Internal_Sym sym;
Elf_External_Sym *dynsym =
@@ -4523,7 +4731,7 @@ elf_bfd_final_link (abfd, info)
Elf_Internal_Sym *, asection *)))
elf_link_output_sym))
return false;
- }
+ }
/* Flush all symbols to the file. */
if (! elf_link_flush_output_syms (&finfo))
@@ -4562,13 +4770,13 @@ elf_bfd_final_link (abfd, info)
if ((o->flags & SEC_RELOC) == 0)
continue;
- elf_link_adjust_relocs (abfd, &elf_section_data (o)->rel_hdr,
+ elf_link_adjust_relocs (abfd, &elf_section_data (o)->rel_hdr,
elf_section_data (o)->rel_count,
elf_section_data (o)->rel_hashes);
if (elf_section_data (o)->rel_hdr2 != NULL)
elf_link_adjust_relocs (abfd, elf_section_data (o)->rel_hdr2,
elf_section_data (o)->rel_count2,
- (elf_section_data (o)->rel_hashes
+ (elf_section_data (o)->rel_hashes
+ elf_section_data (o)->rel_count));
/* Set the reloc_count field to 0 to prevent write_relocs from
@@ -4698,7 +4906,8 @@ elf_bfd_final_link (abfd, info)
for (o = dynobj->sections; o != NULL; o = o->next)
{
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || o->_raw_size == 0)
+ || o->_raw_size == 0
+ || o->output_section == bfd_abs_section_ptr)
continue;
if ((o->flags & SEC_LINKER_CREATED) == 0)
{
@@ -4912,6 +5121,7 @@ elf_link_output_extsym (h, data)
referenced by regular files, because we will already have issued
warnings for them. */
if (! finfo->info->relocateable
+ && ! finfo->info->allow_shlib_undefined
&& ! (finfo->info->shared
&& !finfo->info->no_undefined)
&& h->root.type == bfd_link_hash_undefined
@@ -5031,12 +5241,9 @@ elf_link_output_extsym (h, data)
symbol foo@@GNU_1.2 is the default, which should be used when
foo is used with no version, then we add an indirect symbol
foo which points to foo@@GNU_1.2. We ignore these symbols,
- since the indirected symbol is already in the hash table. If
- the indirect symbol is non-ELF, fall through and output it. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_ELF) == 0)
- return true;
+ since the indirected symbol is already in the hash table. */
+ return true;
- /* Fall through. */
case bfd_link_hash_warning:
/* We can't represent these symbols in ELF, although a warning
symbol may have come from a .gnu.warning.SYMBOL section. We
@@ -5087,7 +5294,7 @@ elf_link_output_extsym (h, data)
}
/* If a symbol is not defined locally, we clear the visibility
- field. */
+ field. */
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
sym.st_other ^= ELF_ST_VISIBILITY(sym.st_other);
@@ -5112,7 +5319,7 @@ elf_link_output_extsym (h, data)
bucketcount = elf_hash_table (finfo->info)->bucketcount;
bucket = h->elf_hash_value % bucketcount;
- hash_entry_size
+ hash_entry_size
= elf_section_data (finfo->hash_sec)->this_hdr.sh_entsize;
bucketpos = ((bfd_byte *) finfo->hash_sec->contents
+ (bucket + 2) * hash_entry_size);
@@ -5172,7 +5379,7 @@ elf_link_output_extsym (h, data)
OUTPUT_BFD. */
static void
-elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
+elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
internal_relocs)
bfd *output_bfd;
asection *input_section;
@@ -5184,11 +5391,12 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
Elf_Internal_Shdr *output_rel_hdr;
asection *output_section;
unsigned int *rel_countp = NULL;
+ struct elf_backend_data *bed;
output_section = input_section->output_section;
output_rel_hdr = NULL;
- if (elf_section_data (output_section)->rel_hdr.sh_entsize
+ if (elf_section_data (output_section)->rel_hdr.sh_entsize
== input_rel_hdr->sh_entsize)
{
output_rel_hdr = &elf_section_data (output_section)->rel_hdr;
@@ -5203,38 +5411,62 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
}
BFD_ASSERT (output_rel_hdr != NULL);
-
+
+ bed = get_elf_backend_data (output_bfd);
irela = internal_relocs;
- irelaend = irela + input_rel_hdr->sh_size / input_rel_hdr->sh_entsize;
+ irelaend = irela + NUM_SHDR_ENTRIES (input_rel_hdr)
+ * bed->s->int_rels_per_ext_rel;
+
if (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
{
Elf_External_Rel *erel;
+ Elf_Internal_Rel *irel;
+
+ irel = (Elf_Internal_Rel *) bfd_zmalloc (bed->s->int_rels_per_ext_rel
+ * sizeof (Elf_Internal_Rel));
+ if (irel == NULL)
+ {
+ (*_bfd_error_handler) (_("Error: out of memory"));
+ abort ();
+ }
erel = ((Elf_External_Rel *) output_rel_hdr->contents + *rel_countp);
- for (; irela < irelaend; irela++, erel++)
+ for (; irela < irelaend; irela += bed->s->int_rels_per_ext_rel, erel++)
{
- Elf_Internal_Rel irel;
+ unsigned int i;
+
+ for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
+ {
+ irel[i].r_offset = irela[i].r_offset;
+ irel[i].r_info = irela[i].r_info;
+ BFD_ASSERT (irela[i].r_addend == 0);
+ }
- irel.r_offset = irela->r_offset;
- irel.r_info = irela->r_info;
- BFD_ASSERT (irela->r_addend == 0);
- elf_swap_reloc_out (output_bfd, &irel, erel);
+ if (bed->s->swap_reloc_out)
+ (*bed->s->swap_reloc_out) (output_bfd, irel, (PTR) erel);
+ else
+ elf_swap_reloc_out (output_bfd, irel, erel);
}
+
+ free (irel);
}
else
{
Elf_External_Rela *erela;
- BFD_ASSERT (input_rel_hdr->sh_entsize
- == sizeof (Elf_External_Rela));
+ BFD_ASSERT (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rela));
+
erela = ((Elf_External_Rela *) output_rel_hdr->contents + *rel_countp);
- for (; irela < irelaend; irela++, erela++)
- elf_swap_reloca_out (output_bfd, irela, erela);
+ for (; irela < irelaend; irela += bed->s->int_rels_per_ext_rel, erela++)
+ if (bed->s->swap_reloca_out)
+ (*bed->s->swap_reloca_out) (output_bfd, irela, (PTR) erela);
+ else
+ elf_swap_reloca_out (output_bfd, irela, erela);
}
/* Bump the counter, so that we know where to add the next set of
relocations. */
- *rel_countp += input_rel_hdr->sh_size / input_rel_hdr->sh_entsize;
+ *rel_countp += NUM_SHDR_ENTRIES (input_rel_hdr);
}
/* Link an input file into the linker output file. This function
@@ -5326,14 +5558,24 @@ elf_link_input_bfd (finfo, input_bfd)
}
}
+ name = NULL;
if (isym->st_shndx == SHN_UNDEF)
- isec = bfd_und_section_ptr;
+ {
+ isec = bfd_und_section_ptr;
+ name = isec->name;
+ }
else if (isym->st_shndx > 0 && isym->st_shndx < SHN_LORESERVE)
isec = section_from_elf_index (input_bfd, isym->st_shndx);
else if (isym->st_shndx == SHN_ABS)
- isec = bfd_abs_section_ptr;
+ {
+ isec = bfd_abs_section_ptr;
+ name = isec->name;
+ }
else if (isym->st_shndx == SHN_COMMON)
- isec = bfd_com_section_ptr;
+ {
+ isec = bfd_com_section_ptr;
+ name = isec->name;
+ }
else
{
/* Who knows? */
@@ -5346,16 +5588,54 @@ elf_link_input_bfd (finfo, input_bfd)
if (esym == external_syms)
continue;
+ if (ELF_ST_TYPE (isym->st_info) == STT_SECTION)
+ {
+ asection *ksec;
+
+ /* Save away all section symbol values. */
+ if (isec != NULL)
+ {
+ if (name)
+ {
+ if (isec->symbol->value != isym->st_value)
+ (*_bfd_error_handler)
+ (_("%s: invalid section symbol index 0x%x (%s) ingored"),
+ bfd_get_filename (input_bfd), isym->st_shndx,
+ name);
+ continue;
+ }
+ isec->symbol->value = isym->st_value;
+ }
+
+ /* If this is a discarded link-once section symbol, update
+ it's value to that of the kept section symbol. The
+ linker will keep the first of any matching link-once
+ sections, so we should have already seen it's section
+ symbol. I trust no-one will have the bright idea of
+ re-ordering the bfd list... */
+ if (isec != NULL
+ && (bfd_get_section_flags (input_bfd, isec) & SEC_LINK_ONCE) != 0
+ && (ksec = isec->kept_section) != NULL)
+ {
+ isym->st_value = ksec->symbol->value;
+
+ /* That put the value right, but the section info is all
+ wrong. I hope this works. */
+ isec->output_offset = ksec->output_offset;
+ isec->output_section = ksec->output_section;
+ }
+
+ /* We never output section symbols. Instead, we use the
+ section symbol of the corresponding section in the output
+ file. */
+ continue;
+ }
+
/* If we are stripping all symbols, we don't want to output this
one. */
if (finfo->info->strip == strip_all)
continue;
- /* We never output section symbols. Instead, we use the section
- symbol of the corresponding section in the output file. */
- if (ELF_ST_TYPE (isym->st_info) == STT_SECTION)
- continue;
-
/* If we are discarding all local symbols, we don't want to
output this one. If we are generating a relocateable output
file, then some of the local symbols may be required by
@@ -5493,29 +5773,40 @@ elf_link_input_bfd (finfo, input_bfd)
finfo->sections))
return false;
- if (finfo->info->relocateable)
+ if (finfo->info->relocateable || finfo->info->emitrelocations)
{
Elf_Internal_Rela *irela;
Elf_Internal_Rela *irelaend;
struct elf_link_hash_entry **rel_hash;
Elf_Internal_Shdr *input_rel_hdr;
+ unsigned int next_erel;
/* Adjust the reloc addresses and symbol indices. */
irela = internal_relocs;
- irelaend =
- irela + o->reloc_count * bed->s->int_rels_per_ext_rel;
+ irelaend = irela
+ + o->reloc_count * bed->s->int_rels_per_ext_rel;
rel_hash = (elf_section_data (o->output_section)->rel_hashes
+ elf_section_data (o->output_section)->rel_count
+ elf_section_data (o->output_section)->rel_count2);
- for (; irela < irelaend; irela++, rel_hash++)
+ for (next_erel = 0; irela < irelaend; irela++, next_erel++)
{
unsigned long r_symndx;
Elf_Internal_Sym *isym;
asection *sec;
+ if (next_erel == bed->s->int_rels_per_ext_rel)
+ {
+ rel_hash++;
+ next_erel = 0;
+ }
+
irela->r_offset += o->output_offset;
+ /* Relocs in an executable have to be virtual addresses. */
+ if (finfo->info->emitrelocations)
+ irela->r_offset += o->output_section->vma;
+
r_symndx = ELF_R_SYM (irela->r_info);
if (r_symndx == 0)
@@ -5526,7 +5817,7 @@ elf_link_input_bfd (finfo, input_bfd)
&& finfo->sections[r_symndx] == NULL))
{
struct elf_link_hash_entry *rh;
- long indx;
+ unsigned long indx;
/* This is a reloc against a global symbol. We
have not yet output all the local symbols, so
@@ -5552,7 +5843,7 @@ elf_link_input_bfd (finfo, input_bfd)
continue;
}
- /* This is a reloc against a local symbol. */
+ /* This is a reloc against a local symbol. */
*rel_hash = NULL;
isym = finfo->internal_syms + r_symndx;
@@ -5631,14 +5922,14 @@ elf_link_input_bfd (finfo, input_bfd)
/* Swap out the relocs. */
input_rel_hdr = &elf_section_data (o)->rel_hdr;
- elf_link_output_relocs (output_bfd, o,
+ elf_link_output_relocs (output_bfd, o,
input_rel_hdr,
internal_relocs);
- internal_relocs
- += input_rel_hdr->sh_size / input_rel_hdr->sh_entsize;
+ internal_relocs += NUM_SHDR_ENTRIES (input_rel_hdr)
+ * bed->s->int_rels_per_ext_rel;
input_rel_hdr = elf_section_data (o)->rel_hdr2;
if (input_rel_hdr)
- elf_link_output_relocs (output_bfd, o,
+ elf_link_output_relocs (output_bfd, o,
input_rel_hdr,
internal_relocs);
}
@@ -5685,6 +5976,7 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
bfd_vma addend;
struct elf_link_hash_entry **rel_hash_ptr;
Elf_Internal_Shdr *rel_hdr;
+ struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
howto = bfd_reloc_type_lookup (output_bfd, link_order->u.reloc.p->reloc);
if (howto == NULL)
@@ -5801,33 +6093,58 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
if (rel_hdr->sh_type == SHT_REL)
{
- Elf_Internal_Rel irel;
+ Elf_Internal_Rel *irel;
Elf_External_Rel *erel;
+ unsigned int i;
+
+ irel = (Elf_Internal_Rel *) bfd_zmalloc (bed->s->int_rels_per_ext_rel
+ * sizeof (Elf_Internal_Rel));
+ if (irel == NULL)
+ return false;
+
+ for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
+ irel[i].r_offset = offset;
+ irel[0].r_info = ELF_R_INFO (indx, howto->type);
- irel.r_offset = offset;
- irel.r_info = ELF_R_INFO (indx, howto->type);
erel = ((Elf_External_Rel *) rel_hdr->contents
+ elf_section_data (output_section)->rel_count);
- elf_swap_reloc_out (output_bfd, &irel, erel);
+
+ if (bed->s->swap_reloc_out)
+ (*bed->s->swap_reloc_out) (output_bfd, irel, (bfd_byte *) erel);
+ else
+ elf_swap_reloc_out (output_bfd, irel, erel);
+
+ free (irel);
}
else
{
- Elf_Internal_Rela irela;
+ Elf_Internal_Rela *irela;
Elf_External_Rela *erela;
+ unsigned int i;
+
+ irela = (Elf_Internal_Rela *) bfd_zmalloc (bed->s->int_rels_per_ext_rel
+ * sizeof (Elf_Internal_Rela));
+ if (irela == NULL)
+ return false;
+
+ for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
+ irela[i].r_offset = offset;
+ irela[0].r_info = ELF_R_INFO (indx, howto->type);
+ irela[0].r_addend = addend;
- irela.r_offset = offset;
- irela.r_info = ELF_R_INFO (indx, howto->type);
- irela.r_addend = addend;
erela = ((Elf_External_Rela *) rel_hdr->contents
+ elf_section_data (output_section)->rel_count);
- elf_swap_reloca_out (output_bfd, &irela, erela);
+
+ if (bed->s->swap_reloca_out)
+ (*bed->s->swap_reloca_out) (output_bfd, irela, (bfd_byte *) erela);
+ else
+ elf_swap_reloca_out (output_bfd, irela, erela);
}
++elf_section_data (output_section)->rel_count;
return true;
}
-
/* Allocate a pointer to live in a linker created section. */
@@ -5950,7 +6267,6 @@ elf_create_pointer_linker_section (abfd, info, lsect, h, rel)
return true;
}
-
#if ARCH_SIZE==64
#define bfd_put_ptr(BFD,VAL,ADDR) bfd_put_64 (BFD, VAL, ADDR)
@@ -5959,7 +6275,7 @@ elf_create_pointer_linker_section (abfd, info, lsect, h, rel)
#define bfd_put_ptr(BFD,VAL,ADDR) bfd_put_32 (BFD, VAL, ADDR)
#endif
-/* Fill in the address for a pointer generated in alinker section. */
+/* Fill in the address for a pointer generated in a linker section. */
bfd_vma
elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, relocation, rel, relative_reloc)
@@ -6026,7 +6342,17 @@ elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, reloca
if (info->shared)
{
asection *srel = lsect->rel_section;
- Elf_Internal_Rela outrel;
+ Elf_Internal_Rela *outrel;
+ struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+ unsigned int i;
+
+ outrel = (Elf_Internal_Rela *) bfd_zmalloc (sizeof (Elf_Internal_Rela)
+ * bed->s->int_rels_per_ext_rel);
+ if (outrel == NULL)
+ {
+ (*_bfd_error_handler) (_("Error: out of memory"));
+ return 0;
+ }
/* We need to generate a relative reloc for the dynamic linker. */
if (!srel)
@@ -6035,16 +6361,19 @@ elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, reloca
BFD_ASSERT (srel != NULL);
- outrel.r_offset = (lsect->section->output_section->vma
- + lsect->section->output_offset
- + linker_section_ptr->offset);
- outrel.r_info = ELF_R_INFO (0, relative_reloc);
- outrel.r_addend = 0;
- elf_swap_reloca_out (output_bfd, &outrel,
+ 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[0].r_info = ELF_R_INFO (0, relative_reloc);
+ outrel[0].r_addend = 0;
+ elf_swap_reloca_out (output_bfd, outrel,
(((Elf_External_Rela *)
lsect->section->contents)
+ elf_section_data (lsect->section)->rel_count));
++elf_section_data (lsect->section)->rel_count;
+
+ free (outrel);
}
}
}
@@ -6177,22 +6506,22 @@ elf_gc_mark (info, sec, gc_mark_hook)
{
elf_swap_symbol_in (input_bfd, &locsyms[r_symndx], &s);
if (ELF_ST_BIND (s.st_info) == STB_LOCAL)
- rsec = (*gc_mark_hook)(sec->owner, info, rel, NULL, &s);
+ rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
else
{
h = sym_hashes[r_symndx - extsymoff];
- rsec = (*gc_mark_hook)(sec->owner, info, rel, h, NULL);
+ rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL);
}
}
else if (r_symndx >= nlocsyms)
{
h = sym_hashes[r_symndx - extsymoff];
- rsec = (*gc_mark_hook)(sec->owner, info, rel, h, NULL);
+ rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL);
}
else
{
elf_swap_symbol_in (input_bfd, &locsyms[r_symndx], &s);
- rsec = (*gc_mark_hook)(sec->owner, info, rel, NULL, &s);
+ rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
}
if (rsec && !rsec->gc_mark)
@@ -6263,7 +6592,7 @@ elf_gc_sweep (info, gc_sweep_hook)
if (internal_relocs == NULL)
return false;
- r = (*gc_sweep_hook)(o->owner, info, o, internal_relocs);
+ r = (*gc_sweep_hook) (o->owner, info, o, internal_relocs);
if (!info->keep_memory)
free (internal_relocs);
@@ -6316,7 +6645,7 @@ elf_gc_propagate_vtable_entries_used (h, okp)
struct elf_link_hash_entry *h;
PTR okp;
{
- /* Those that are not vtables. */
+ /* Those that are not vtables. */
if (h->vtable_parent == NULL)
return true;
@@ -6422,7 +6751,7 @@ elf_gc_sections (abfd, info)
struct elf_link_hash_entry *h, Elf_Internal_Sym *));
if (!get_elf_backend_data (abfd)->can_gc_sections
- || info->relocateable
+ || info->relocateable || info->emitrelocations
|| elf_hash_table (info)->dynamic_sections_created)
return true;
@@ -6558,7 +6887,7 @@ elf_gc_record_vtentry (abfd, sec, h, addend)
if (ptr)
{
ptr = bfd_realloc (ptr - 1, bytes);
-
+
if (ptr != NULL)
{
size_t oldbytes;
@@ -6572,12 +6901,12 @@ elf_gc_record_vtentry (abfd, sec, h, addend)
if (ptr == NULL)
return false;
-
+
/* And arrange for that done flag to be at index -1. */
h->vtable_entries_used = ptr + 1;
h->vtable_entries_size = size;
}
-
+
h->vtable_entries_used[addend / FILE_ALIGN] = true;
return true;
@@ -6634,7 +6963,8 @@ elf_gc_common_finalize_got_offsets (abfd, info)
}
}
- /* Then the global .got and .plt entries. */
+ /* Then the global .got entries. .plt refcounts are handled by
+ adjust_dynamic_symbol */
elf_link_hash_traverse (elf_hash_table (info),
elf_gc_allocate_got_offsets,
(PTR) &gotoff);
diff --git a/gnu/usr.bin/binutils/bfd/elfxx-target.h b/gnu/usr.bin/binutils/bfd/elfxx-target.h
index b1f4867e569..3ec9820ae2f 100644
--- a/gnu/usr.bin/binutils/bfd/elfxx-target.h
+++ b/gnu/usr.bin/binutils/bfd/elfxx-target.h
@@ -1,5 +1,6 @@
/* Target definitions for NN-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -110,8 +111,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections
#endif
+#ifndef bfd_elfNN_bfd_make_debug_symbol
#define bfd_elfNN_bfd_make_debug_symbol \
((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
+#endif
#ifndef bfd_elfNN_bfd_copy_private_symbol_data
#define bfd_elfNN_bfd_copy_private_symbol_data \
@@ -237,6 +240,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_section_from_shdr
#define elf_backend_section_from_shdr 0
#endif
+#ifndef elf_backend_section_flags
+#define elf_backend_section_flags 0
+#endif
#ifndef elf_backend_section_from_phdr
#define elf_backend_section_from_phdr 0
#endif
@@ -313,7 +319,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol
#endif
-
/* Previously, backends could only use SHT_REL or SHT_RELA relocation
sections, but not both. They defined USE_REL to indicate SHT_REL
sections, and left it undefined to indicated SHT_RELA sections.
@@ -323,16 +328,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#else
#undef USE_REL
#define USE_REL 1
-#endif
+#endif
/* Use these in new code. */
-#ifndef elf_backend_may_use_rel_p
+#ifndef elf_backend_may_use_rel_p
#define elf_backend_may_use_rel_p USE_REL
-#endif
+#endif
#ifndef elf_backend_may_use_rela_p
#define elf_backend_may_use_rela_p !USE_REL
#endif
-#ifndef elf_backend_default_use_rela_p
+#ifndef elf_backend_default_use_rela_p
#define elf_backend_default_use_rela_p !USE_REL
#endif
@@ -354,6 +359,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern const struct elf_size_info _bfd_elfNN_size_info;
+#ifndef INCLUDED_TARGET_FILE
static CONST struct elf_backend_data elfNN_bed =
{
ELF_ARCH, /* arch */
@@ -368,6 +374,7 @@ static CONST struct elf_backend_data elfNN_bed =
elf_backend_get_symbol_type,
elf_backend_section_processing,
elf_backend_section_from_shdr,
+ elf_backend_section_flags,
elf_backend_section_from_phdr,
elf_backend_fake_sections,
elf_backend_section_from_bfd_section,
@@ -413,6 +420,7 @@ static CONST struct elf_backend_data elfNN_bed =
elf_backend_can_gc_sections,
elf_backend_want_dynbss
};
+#endif
/* Forward declaration for use when initialising alternative_target field. */
#ifdef TARGET_LITTLE_SYM
@@ -603,7 +611,7 @@ const bfd_target TARGET_LITTLE_SYM =
#else
NULL,
#endif
-
+
/* backend_data: */
(PTR) &elfNN_bed
};
diff --git a/gnu/usr.bin/binutils/bfd/format.c b/gnu/usr.bin/binutils/bfd/format.c
index c9f1f9cd4be..6afcb60d6ed 100644
--- a/gnu/usr.bin/binutils/bfd/format.c
+++ b/gnu/usr.bin/binutils/bfd/format.c
@@ -1,5 +1,6 @@
/* Generic BFD support for file formats.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 1999 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -23,7 +24,7 @@ SECTION
File formats
A format is a BFD concept of high level file contents type. The
- formats supported by BFD are:
+ formats supported by BFD are:
o <<bfd_object>>
@@ -37,7 +38,6 @@ SECTION
The BFD contains the result of an executable core dump.
-
*/
#include "bfd.h"
@@ -68,7 +68,7 @@ DESCRIPTION
the file, or an error results.
The function returns <<true>> on success, otherwise <<false>>
- with one of the following error codes:
+ with one of the following error codes:
o <<bfd_error_invalid_operation>> -
if <<format>> is not one of <<bfd_object>>, <<bfd_archive>> or
@@ -109,7 +109,7 @@ DESCRIPTION
Then the user may choose a format and try again.
When done with the list that @var{matching} points to, the caller
- should free it.
+ should free it.
*/
boolean
@@ -125,20 +125,20 @@ bfd_check_format_matches (abfd, format, matching)
if (!bfd_read_p (abfd) ||
((int)(abfd->format) < (int)bfd_unknown) ||
- ((int)(abfd->format) >= (int)bfd_type_end)) {
- bfd_set_error (bfd_error_invalid_operation);
- return false;
- }
+ ((int)(abfd->format) >= (int)bfd_type_end))
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
if (abfd->format != bfd_unknown)
return (abfd->format == format)? true: false;
-
- /* Since the target type was defaulted, check them
+ /* Since the target type was defaulted, check them
all in the hope that one will be uniquely recognized. */
-
save_targ = abfd->xvec;
match_count = 0;
+
if (matching)
{
matching_vector =
@@ -149,119 +149,147 @@ bfd_check_format_matches (abfd, format, matching)
matching_vector[0] = NULL;
*matching = matching_vector;
}
- right_targ = 0;
+ right_targ = 0;
- /* presume the answer is yes */
+ /* Presume the answer is yes. */
abfd->format = format;
/* If the target type was explicitly specified, just check that target. */
+ if (!abfd->target_defaulted)
+ {
+ if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0) /* rewind! */
+ return false;
- if (!abfd->target_defaulted) {
- if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0) /* rewind! */
- return false;
- right_targ = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
- if (right_targ) {
- abfd->xvec = right_targ; /* Set the target as returned */
- if (matching)
- free (matching_vector);
- return true; /* File position has moved, BTW */
- }
+ right_targ = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
- /* For a long time the code has dropped through to check all
- targets if the specified target was wrong. I don't know why,
- and I'm reluctant to change it. However, in the case of an
- archive, it can cause problems. If the specified target does
- not permit archives (e.g., the binary target), then we should
- not allow some other target to recognize it as an archive, but
- should instead allow the specified target to recognize it as an
- object. When I first made this change, it broke the PE target,
- because the specified pei-i386 target did not recognize the
- actual pe-i386 archive. Since there may be other problems of
- this sort, I changed this test to check only for the binary
- target. */
-
- if (format == bfd_archive && save_targ == &binary_vec)
- {
- abfd->xvec = save_targ;
- abfd->format = bfd_unknown;
- if (matching)
- free (matching_vector);
- bfd_set_error (bfd_error_file_not_recognized);
- return false;
- }
- }
+ if (right_targ)
+ {
+ abfd->xvec = right_targ; /* Set the target as returned. */
- for (target = bfd_target_vector; *target != NULL; target++) {
- const bfd_target *temp;
+ if (matching)
+ free (matching_vector);
- if (*target == &binary_vec)
- continue;
+ return true; /* File position has moved, BTW. */
+ }
- abfd->xvec = *target; /* Change BFD's target temporarily */
- if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0)
- return false;
- /* If _bfd_check_format neglects to set bfd_error, assume bfd_error_wrong_format.
- We didn't used to even pay any attention to bfd_error, so I suspect
- that some _bfd_check_format might have this problem. */
- bfd_set_error (bfd_error_wrong_format);
- temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
- if (temp) { /* This format checks out as ok! */
- right_targ = temp;
- if (matching)
+ /* For a long time the code has dropped through to check all
+ targets if the specified target was wrong. I don't know why,
+ and I'm reluctant to change it. However, in the case of an
+ archive, it can cause problems. If the specified target does
+ not permit archives (e.g., the binary target), then we should
+ not allow some other target to recognize it as an archive, but
+ should instead allow the specified target to recognize it as an
+ object. When I first made this change, it broke the PE target,
+ because the specified pei-i386 target did not recognize the
+ actual pe-i386 archive. Since there may be other problems of
+ this sort, I changed this test to check only for the binary
+ target. */
+ if (format == bfd_archive && save_targ == &binary_vec)
{
- matching_vector[match_count] = temp->name;
- matching_vector[match_count + 1] = NULL;
+ abfd->xvec = save_targ;
+ abfd->format = bfd_unknown;
+
+ if (matching)
+ free (matching_vector);
+
+ bfd_set_error (bfd_error_file_not_recognized);
+
+ return false;
}
- match_count++;
- /* If this is the default target, accept it, even if other targets
- might match. People who want those other targets have to set
- the GNUTARGET variable. */
- if (temp == bfd_default_vector[0])
- {
+ }
+
+ for (target = bfd_target_vector; *target != NULL; target++)
+ {
+ const bfd_target *temp;
+
+ if (*target == &binary_vec)
+ continue;
+
+ abfd->xvec = *target; /* Change BFD's target temporarily */
+
+ if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0)
+ return false;
+
+ /* If _bfd_check_format neglects to set bfd_error, assume
+ bfd_error_wrong_format. We didn't used to even pay any
+ attention to bfd_error, so I suspect that some
+ _bfd_check_format might have this problem. */
+ bfd_set_error (bfd_error_wrong_format);
+
+ temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
+
+ if (temp)
+ { /* This format checks out as ok! */
+ right_targ = temp;
+
if (matching)
{
- matching_vector[0] = temp->name;
- matching_vector[1] = NULL;
+ matching_vector[match_count] = temp->name;
+ matching_vector[match_count + 1] = NULL;
+ }
+
+ match_count++;
+
+ /* If this is the default target, accept it, even if other
+ targets might match. People who want those other targets
+ have to set the GNUTARGET variable. */
+ if (temp == bfd_default_vector[0])
+ {
+ if (matching)
+ {
+ matching_vector[0] = temp->name;
+ matching_vector[1] = NULL;
+ }
+ match_count = 1;
+ break;
}
- match_count = 1;
- break;
- }
#ifdef GNU960
- /* Big- and little-endian b.out archives look the same, but it doesn't
- * matter: there is no difference in their headers, and member file byte
- * orders will (I hope) be handled appropriately by bfd. Ditto for big
- * and little coff archives. And the 4 coff/b.out object formats are
- * unambiguous. So accept the first match we find.
- */
- break;
+ /* Big- and little-endian b.out archives look the same, but it
+ doesn't matter: there is no difference in their headers, and
+ member file byte orders will (I hope) be handled appropriately
+ by bfd. Ditto for big and little coff archives. And the 4
+ coff/b.out object formats are unambiguous. So accept the
+ first match we find. */
+ break;
#endif
- } else if (bfd_get_error () != bfd_error_wrong_format) {
- abfd->xvec = save_targ;
- abfd->format = bfd_unknown;
- if (matching && bfd_get_error () != bfd_error_file_ambiguously_recognized)
+ }
+ else if (bfd_get_error () != bfd_error_wrong_format)
+ {
+ abfd->xvec = save_targ;
+ abfd->format = bfd_unknown;
+
+ if (matching && bfd_get_error ()
+ != bfd_error_file_ambiguously_recognized)
+ free (matching_vector);
+
+ return false;
+ }
+ }
+
+ if (match_count == 1)
+ {
+ abfd->xvec = right_targ; /* Change BFD's target permanently. */
+
+ if (matching)
free (matching_vector);
- return false;
+
+ return true; /* File position has moved, BTW. */
}
- }
- if (match_count == 1) {
- abfd->xvec = right_targ; /* Change BFD's target permanently */
- if (matching)
- free (matching_vector);
- return true; /* File position has moved, BTW */
- }
+ abfd->xvec = save_targ; /* Restore original target type. */
+ abfd->format = bfd_unknown; /* Restore original format. */
- abfd->xvec = save_targ; /* Restore original target type */
- abfd->format = bfd_unknown; /* Restore original format */
if (match_count == 0)
{
bfd_set_error (bfd_error_file_not_recognized);
+
if (matching)
free (matching_vector);
}
else
bfd_set_error (bfd_error_file_ambiguously_recognized);
+
return false;
}
@@ -277,7 +305,6 @@ DESCRIPTION
format @var{format}. If the target set in the BFD does not
support the format requested, the format is invalid, or the BFD
is not open for writing, then an error occurs.
-
*/
boolean
@@ -285,29 +312,29 @@ bfd_set_format (abfd, format)
bfd *abfd;
bfd_format format;
{
-
if (bfd_read_p (abfd) ||
((int)abfd->format < (int)bfd_unknown) ||
- ((int)abfd->format >= (int)bfd_type_end)) {
- bfd_set_error (bfd_error_invalid_operation);
- return false;
- }
+ ((int)abfd->format >= (int)bfd_type_end))
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
if (abfd->format != bfd_unknown)
- return (abfd->format == format) ? true:false;
+ return (abfd->format == format) ? true : false;
- /* presume the answer is yes */
+ /* Presume the answer is yes. */
abfd->format = format;
- if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd))) {
- abfd->format = bfd_unknown;
- return false;
- }
+ if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd)))
+ {
+ abfd->format = bfd_unknown;
+ return false;
+ }
return true;
}
-
/*
FUNCTION
bfd_format_string
@@ -325,18 +352,19 @@ CONST char *
bfd_format_string (format)
bfd_format format;
{
- if (((int)format <(int) bfd_unknown)
- || ((int)format >=(int) bfd_type_end))
+ if (((int)format <(int) bfd_unknown)
+ || ((int)format >=(int) bfd_type_end))
return "invalid";
-
- switch (format) {
- case bfd_object:
- return "object"; /* linker/assember/compiler output */
- case bfd_archive:
- return "archive"; /* object archive file */
- case bfd_core:
- return "core"; /* core dump */
- default:
- return "unknown";
- }
+
+ switch (format)
+ {
+ case bfd_object:
+ return "object"; /* Linker/assember/compiler output. */
+ case bfd_archive:
+ return "archive"; /* Object archive file. */
+ case bfd_core:
+ return "core"; /* Core dump. */
+ default:
+ return "unknown";
+ }
}
diff --git a/gnu/usr.bin/binutils/bfd/freebsd.h b/gnu/usr.bin/binutils/bfd/freebsd.h
index e80c213b28a..c2e3af02cf4 100644
--- a/gnu/usr.bin/binutils/bfd/freebsd.h
+++ b/gnu/usr.bin/binutils/bfd/freebsd.h
@@ -1,5 +1,6 @@
/* BFD back-end definitions used by all FreeBSD targets.
- Copyright (C) 1990, 1991, 1992, 1996, 2000 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1996, 1997, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -59,7 +60,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
format. I think. */
#define SWAP_MAGIC(ext) bfd_getl32 (ext)
-
#define MY_write_object_contents MY(write_object_contents)
static boolean MY(write_object_contents) PARAMS ((bfd *abfd));
diff --git a/gnu/usr.bin/binutils/bfd/gen-aout.c b/gnu/usr.bin/binutils/bfd/gen-aout.c
index 824d1b0f868..8de5650e599 100644
--- a/gnu/usr.bin/binutils/bfd/gen-aout.c
+++ b/gnu/usr.bin/binutils/bfd/gen-aout.c
@@ -1,5 +1,6 @@
/* Generate parameters for an a.out system.
- Copyright (C) 1990, 91, 92, 93, 94, 98 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/genlink.h b/gnu/usr.bin/binutils/bfd/genlink.h
index 0e0a8de300e..215666a336c 100644
--- a/gnu/usr.bin/binutils/bfd/genlink.h
+++ b/gnu/usr.bin/binutils/bfd/genlink.h
@@ -1,5 +1,5 @@
/* genlink.h -- interface to the BFD generic linker
- Copyright 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/hash.c b/gnu/usr.bin/binutils/bfd/hash.c
index 173eaf76eef..11d54fdd049 100644
--- a/gnu/usr.bin/binutils/bfd/hash.c
+++ b/gnu/usr.bin/binutils/bfd/hash.c
@@ -1,5 +1,6 @@
/* hash.c -- hash table routines for BFD
- Copyright (C) 1993, 94, 95, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1999, 2001
+ Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -268,7 +269,7 @@ SUBSUBSECTION
Write other derived routines
You will want to write other routines for your new hash table,
- as well.
+ as well.
You will want an initialization routine which calls the
initialization routine of the hash table you are deriving from
@@ -366,7 +367,7 @@ bfd_hash_lookup (table, string, create, copy)
struct bfd_hash_entry *hashp;
unsigned int len;
unsigned int index;
-
+
hash = 0;
len = 0;
s = (const unsigned char *) string;
diff --git a/gnu/usr.bin/binutils/bfd/host-aout.c b/gnu/usr.bin/binutils/bfd/host-aout.c
index 99643dcc24e..a53cf09ad16 100644
--- a/gnu/usr.bin/binutils/bfd/host-aout.c
+++ b/gnu/usr.bin/binutils/bfd/host-aout.c
@@ -1,5 +1,5 @@
/* BFD backend for local host's a.out binaries
- Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
Written by Cygnus Support. Probably John Gilmore's fault.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/hp300hpux.c b/gnu/usr.bin/binutils/bfd/hp300hpux.c
index 46bfea054cf..f09da5e7f00 100644
--- a/gnu/usr.bin/binutils/bfd/hp300hpux.c
+++ b/gnu/usr.bin/binutils/bfd/hp300hpux.c
@@ -1,5 +1,6 @@
/* BFD backend for hp-ux 9000/300
- Copyright (C) 1990, 91, 94, 95, 97, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2000, 2001
+ Free Software Foundation, Inc.
Written by Glenn Engel.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
| hp300hpux bfd | ----------> hpux w/gnu ext
hpux w/gnu extension ----> | |
-
Support for the 9000/[34]00 has several limitations.
1. Shared libraries are not supported.
2. The output format from this bfd is not usable by native tools.
@@ -238,7 +238,6 @@ MY (callback) (abfd)
bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
#endif
-
if (obj_aout_subformat (abfd) == gnu_encap_format)
{
/* The file offsets of the relocation info */
@@ -419,7 +418,6 @@ convert_sym_type (sym_pointer, cache_ptr, abfd)
}
-
/*
DESCRIPTION
Swaps the information in an executable header taken from a raw
@@ -485,7 +483,6 @@ NAME (aout,swap_exec_header_in) (abfd, raw_bytes, execp)
while (0);
}
-
/* The hp symbol table is a bit different than other a.out targets. Instead
of having an array of nlist items and an array of strings, hp's format
has them mixed together in one structure. In addition, the strings are
@@ -538,7 +535,6 @@ MY (slurp_symbol_table) (abfd)
return false;
}
-
sym_end = (struct external_nlist *) (((char *) syms) + symbol_bytes);
/* first, march thru the table and figure out how many symbols there are */
@@ -615,8 +611,6 @@ MY (slurp_symbol_table) (abfd)
return true;
}
-
-
void
MY (swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
bfd *abfd;
@@ -739,7 +733,6 @@ doit:
count = reloc_size / each_size;
-
reloc_cache = (arelent *) bfd_zalloc (abfd, (size_t) (count * sizeof
(arelent)));
if (!reloc_cache && count != 0)
@@ -769,14 +762,12 @@ doit:
bfd_get_symcount (abfd));
}
-
bfd_release (abfd, relocs);
asect->relocation = reloc_cache;
asect->reloc_count = count;
return true;
}
-
/************************************************************************/
/* The following functions are identical to functions in aoutx.h except */
/* they refer to MY(func) rather than NAME(aout,func) and they also */
@@ -822,9 +813,6 @@ MY (get_symtab_upper_bound) (abfd)
return (bfd_get_symcount (abfd) + 1) * (sizeof (aout_symbol_type *));
}
-
-
-
long
MY (canonicalize_reloc) (abfd, section, relptr, symbols)
bfd *abfd;
@@ -863,5 +851,4 @@ MY (canonicalize_reloc) (abfd, section, relptr, symbols)
return section->reloc_count;
}
-
#include "aout-target.h"
diff --git a/gnu/usr.bin/binutils/bfd/hppabsd-core.c b/gnu/usr.bin/binutils/bfd/hppabsd-core.c
index 0a3e6b224d2..ff738a3a124 100644
--- a/gnu/usr.bin/binutils/bfd/hppabsd-core.c
+++ b/gnu/usr.bin/binutils/bfd/hppabsd-core.c
@@ -1,5 +1,6 @@
/* BFD back-end for HPPA BSD core files.
- Copyright 1993, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1998, 1999, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,14 +19,13 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by the Center for Software Science at the University of Utah
- and by Cygnus Support.
+ and by Cygnus Support.
The core file structure for the Utah 4.3BSD and OSF1 ports on the
PA is a mix between traditional cores and hpux cores -- just
different enough that supporting this format would tend to add
gross hacks to trad-core.c or hpux-core.c. So instead we keep any
gross hacks isolated to this file. */
-
/* This file can only be compiled on systems which use HPPA-BSD style
core files.
@@ -141,7 +141,6 @@ hppabsd_core_core_file_p (abfd)
return NULL;
}
-
/* Sanity checks. Make sure the size of the core file matches the
the size computed from information within the core itself. */
{
@@ -180,9 +179,9 @@ hppabsd_core_core_file_p (abfd)
core_stacksec (abfd) = make_bfd_asection (abfd, ".stack",
SEC_ALLOC + SEC_HAS_CONTENTS,
clicksz * u.u_ssize,
- NBPG * (USIZE + KSTAKSIZE)
+ NBPG * (USIZE + KSTAKSIZE)
+ clicksz * u.u_dsize, 2);
- core_stacksec (abfd)->vma = USRSTACK;
+ core_stacksec (abfd)->vma = USRSTACK;
core_datasec (abfd) = make_bfd_asection (abfd, ".data",
SEC_ALLOC + SEC_LOAD
@@ -225,7 +224,6 @@ hppabsd_core_core_file_matches_executable_p (core_bfd, exec_bfd)
/* There's no way to know this... */
return true;
}
-
#define hppabsd_core_get_symtab_upper_bound \
_bfd_nosymbols_get_symtab_upper_bound
@@ -245,7 +243,7 @@ static void
swap_abort ()
{
/* This way doesn't require any declaration for ANSI to fuck up. */
- abort ();
+ abort ();
}
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
@@ -287,7 +285,7 @@ const bfd_target hppabsd_core_vec =
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (hppabsd_core),
@@ -299,7 +297,7 @@ const bfd_target hppabsd_core_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0 /* backend_data */
};
#endif
diff --git a/gnu/usr.bin/binutils/bfd/hpux-core.c b/gnu/usr.bin/binutils/bfd/hpux-core.c
index bfaa2c21b25..199a6a1b0f8 100644
--- a/gnu/usr.bin/binutils/bfd/hpux-core.c
+++ b/gnu/usr.bin/binutils/bfd/hpux-core.c
@@ -1,5 +1,6 @@
/* BFD back-end for HP/UX core files.
- Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 1998, 1999, 2001
+ Free Software Foundation, Inc.
Written by Stu Grossman, Cygnus Support.
Converted to back-end form by Ian Lance Taylor, Cygnus SUpport
@@ -85,7 +86,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* .lwpid and .user_tid are only valid if PROC_INFO_HAS_THREAD_ID, else they
are set to 0. Also, until HP-UX implements MxN threads, .user_tid and
.lwpid are synonymous. */
-struct hpux_core_struct
+struct hpux_core_struct
{
int sig;
int lwpid; /* Kernel thread ID. */
@@ -142,7 +143,6 @@ hpux_core_make_empty_symbol (abfd)
return new;
}
-
/* this function builds a bfd target if the file is a corefile.
It returns null or 0 if it finds out thaat it is not a core file.
The way it checks this is by looking for allowed 'type' field values.
@@ -288,7 +288,7 @@ hpux_core_core_file_p (abfd)
*/
unknown_sections++;
break;
-
+
default: return 0; /*unrecognized core file type */
}
}
@@ -389,7 +389,7 @@ const bfd_target hpux_core_vec =
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (hpux_core),
@@ -401,6 +401,6 @@ const bfd_target hpux_core_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0 /* backend_data */
};
diff --git a/gnu/usr.bin/binutils/bfd/i386aout.c b/gnu/usr.bin/binutils/bfd/i386aout.c
index d0b2cffef23..1192dd469a7 100644
--- a/gnu/usr.bin/binutils/bfd/i386aout.c
+++ b/gnu/usr.bin/binutils/bfd/i386aout.c
@@ -1,5 +1,6 @@
/* BFD back-end for i386 a.out binaries.
- Copyright 1990, 91, 92, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1996, 1997
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/i386linux.c b/gnu/usr.bin/binutils/bfd/i386linux.c
index 5df2a11c50f..5fee098f5a2 100644
--- a/gnu/usr.bin/binutils/bfd/i386linux.c
+++ b/gnu/usr.bin/binutils/bfd/i386linux.c
@@ -1,5 +1,5 @@
/* BFD back-end for linux flavored i386 a.out binaries.
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/i386lynx.c b/gnu/usr.bin/binutils/bfd/i386lynx.c
index a999dd0f6ae..c35d24af423 100644
--- a/gnu/usr.bin/binutils/bfd/i386lynx.c
+++ b/gnu/usr.bin/binutils/bfd/i386lynx.c
@@ -1,5 +1,5 @@
/* BFD back-end for i386 a.out binaries under LynxOS.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/i386mach3.c b/gnu/usr.bin/binutils/bfd/i386mach3.c
index eff75824658..844372a1206 100644
--- a/gnu/usr.bin/binutils/bfd/i386mach3.c
+++ b/gnu/usr.bin/binutils/bfd/i386mach3.c
@@ -1,5 +1,6 @@
/* BFD back-end for i386 a.out binaries.
- Copyright (C) 1990, 91, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1995, 1997
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/i386msdos.c b/gnu/usr.bin/binutils/bfd/i386msdos.c
index c9ec86482c5..c42f3654e5a 100644
--- a/gnu/usr.bin/binutils/bfd/i386msdos.c
+++ b/gnu/usr.bin/binutils/bfd/i386msdos.c
@@ -1,5 +1,5 @@
/* BFD back-end for MS-DOS executables.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999
Free Software Foundation, Inc.
Written by Bryan Ford of the University of Utah.
diff --git a/gnu/usr.bin/binutils/bfd/i386netbsd.c b/gnu/usr.bin/binutils/bfd/i386netbsd.c
index 327b6f94bbf..0e017631581 100644
--- a/gnu/usr.bin/binutils/bfd/i386netbsd.c
+++ b/gnu/usr.bin/binutils/bfd/i386netbsd.c
@@ -1,5 +1,6 @@
/* BFD back-end for NetBSD/386 a.out-ish binaries.
- Copyright (C) 1990, 91, 92, 94, 95, 96, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/i386os9k.c b/gnu/usr.bin/binutils/bfd/i386os9k.c
index 0aadee52d73..71224798fca 100644
--- a/gnu/usr.bin/binutils/bfd/i386os9k.c
+++ b/gnu/usr.bin/binutils/bfd/i386os9k.c
@@ -1,5 +1,6 @@
/* BFD back-end for os9000 i386 binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/ieee.c b/gnu/usr.bin/binutils/bfd/ieee.c
index 71b967ac418..841442475fc 100644
--- a/gnu/usr.bin/binutils/bfd/ieee.c
+++ b/gnu/usr.bin/binutils/bfd/ieee.c
@@ -1,5 +1,6 @@
/* BFD back-end for ieee-695 objects.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -1343,27 +1344,21 @@ ieee_archive_p (abfd)
ieee->h.abfd = abfd;
if (this_byte (&(ieee->h)) != Module_Beginning)
- {
- abfd->tdata.ieee_ar_data = save;
- goto got_wrong_format_error;
- }
+ goto got_wrong_format_error;
next_byte (&(ieee->h));
library = read_id (&(ieee->h));
if (strcmp (library, "LIBRARY") != 0)
- {
- bfd_release (abfd, ieee);
- abfd->tdata.ieee_ar_data = save;
- goto got_wrong_format_error;
- }
- /* Throw away the filename */
+ goto got_wrong_format_error;
+
+ /* Throw away the filename. */
read_id (&(ieee->h));
ieee->element_count = 0;
ieee->element_index = 0;
- next_byte (&(ieee->h)); /* Drop the ad part */
- must_parse_int (&(ieee->h)); /* And the two dummy numbers */
+ next_byte (&(ieee->h)); /* Drop the ad part. */
+ must_parse_int (&(ieee->h)); /* And the two dummy numbers. */
must_parse_int (&(ieee->h));
alc_elts = 10;
@@ -1371,7 +1366,7 @@ ieee_archive_p (abfd)
if (elts == NULL)
goto error_return;
- /* Read the index of the BB table */
+ /* Read the index of the BB table. */
while (1)
{
int rec;
@@ -1400,14 +1395,14 @@ ieee_archive_p (abfd)
t->file_offset = must_parse_int (&(ieee->h));
t->abfd = (bfd *) NULL;
- /* Make sure that we don't go over the end of the buffer */
-
+ /* Make sure that we don't go over the end of the buffer. */
if ((size_t) ieee_pos (abfd) > sizeof (buffer) / 2)
{
- /* Past half way, reseek and reprime */
+ /* Past half way, reseek and reprime. */
buffer_offset += ieee_pos (abfd);
if (bfd_seek (abfd, buffer_offset, SEEK_SET) != 0)
goto error_return;
+
/* FIXME: Check return value. I'm not sure whether it needs
to read the entire buffer or not. */
bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
@@ -1421,36 +1416,33 @@ ieee_archive_p (abfd)
ieee->element_count * sizeof *ieee->elements));
if (ieee->elements == NULL)
goto error_return;
+
memcpy (ieee->elements, elts,
ieee->element_count * sizeof *ieee->elements);
free (elts);
elts = NULL;
- /* Now scan the area again, and replace BB offsets with file */
- /* offsets */
-
+ /* Now scan the area again, and replace BB offsets with file offsets. */
for (i = 2; i < ieee->element_count; i++)
{
if (bfd_seek (abfd, ieee->elements[i].file_offset, SEEK_SET) != 0)
goto error_return;
+
/* FIXME: Check return value. I'm not sure whether it needs to
read the entire buffer or not. */
bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
ieee->h.first_byte = buffer;
ieee->h.input_p = buffer;
- next_byte (&(ieee->h)); /* Drop F8 */
- next_byte (&(ieee->h)); /* Drop 14 */
- must_parse_int (&(ieee->h)); /* Drop size of block */
+ next_byte (&(ieee->h)); /* Drop F8. */
+ next_byte (&(ieee->h)); /* Drop 14. */
+ must_parse_int (&(ieee->h)); /* Drop size of block. */
+
if (must_parse_int (&(ieee->h)) != 0)
- {
- /* This object has been deleted */
- ieee->elements[i].file_offset = 0;
- }
+ /* This object has been deleted. */
+ ieee->elements[i].file_offset = 0;
else
- {
- ieee->elements[i].file_offset = must_parse_int (&(ieee->h));
- }
+ ieee->elements[i].file_offset = must_parse_int (&(ieee->h));
}
/* abfd->has_armap = ;*/
@@ -1458,10 +1450,14 @@ ieee_archive_p (abfd)
return abfd->xvec;
got_wrong_format_error:
+ bfd_release (abfd, ieee);
+ abfd->tdata.ieee_ar_data = save;
bfd_set_error (bfd_error_wrong_format);
+
error_return:
if (elts != NULL)
free (elts);
+
return NULL;
}
@@ -3197,11 +3193,8 @@ relocate_debug (output, input)
block ();
}
-/*
- During linking, we we told about the bfds which made up our
- contents, we have a list of them. They will still be open, so go to
- the debug info in each, and copy it out, relocating it as we go.
-*/
+/* Gather together all the debug information from each input BFD into
+ one place, relocating it and emitting it as we go. */
static boolean
ieee_write_debug_part (abfd)
@@ -3589,6 +3582,10 @@ 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;
}
if (! ieee_write_id (abfd, id))
@@ -3728,7 +3725,7 @@ ieee_make_empty_symbol (abfd)
bfd *abfd;
{
ieee_symbol_type *new =
- (ieee_symbol_type *) bfd_zmalloc (sizeof (ieee_symbol_type));
+ (ieee_symbol_type *) bfd_zalloc (abfd, sizeof (ieee_symbol_type));
if (!new)
return NULL;
new->symbol.the_bfd = abfd;
diff --git a/gnu/usr.bin/binutils/bfd/ihex.c b/gnu/usr.bin/binutils/bfd/ihex.c
index d00c59b5e1a..738da81c453 100644
--- a/gnu/usr.bin/binutils/bfd/ihex.c
+++ b/gnu/usr.bin/binutils/bfd/ihex.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel Hex objects.
- Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/irix-core.c b/gnu/usr.bin/binutils/bfd/irix-core.c
index 006e6a751b1..2de76f12e12 100644
--- a/gnu/usr.bin/binutils/bfd/irix-core.c
+++ b/gnu/usr.bin/binutils/bfd/irix-core.c
@@ -1,5 +1,5 @@
/* BFD back-end for Irix core files.
- Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 1999, 2001 Free Software Foundation, Inc.
Written by Stu Grossman, Cygnus Support.
Converted to back-end form by Ian Lance Taylor, Cygnus Support
@@ -165,8 +165,9 @@ irix_core_core_file_p (abfd)
idg->i_len + idf->i_len + ids->i_len,
0,
idg->i_offset);
-
+
/* OK, we believe you. You're a core file (sure, sure). */
+ bfd_default_set_arch_mach (abfd, bfd_arch_mips, 0);
return abfd->xvec;
}
diff --git a/gnu/usr.bin/binutils/bfd/libaout.h b/gnu/usr.bin/binutils/bfd/libaout.h
index 7c011d47176..cfd64096655 100644
--- a/gnu/usr.bin/binutils/bfd/libaout.h
+++ b/gnu/usr.bin/binutils/bfd/libaout.h
@@ -1,5 +1,6 @@
/* BFD back-end data structures for a.out (and similar) files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -246,7 +247,8 @@ enum machine_type {
M_SPARCLET_5 = 211, /* 0xd3, reserved */
M_SPARCLET_6 = 227, /* 0xe3, reserved */
/* M_SPARCLET_7 = 243 / * 0xf3, reserved */
- M_SPARCLITE_LE = 243
+ M_SPARCLITE_LE = 243,
+ M_CRIS = 255 /* Axis CRIS binary. */
};
#define N_DYNAMIC(exec) ((exec).a_info & 0x80000000)
diff --git a/gnu/usr.bin/binutils/bfd/libbfd-in.h b/gnu/usr.bin/binutils/bfd/libbfd-in.h
index aece1e15a51..dc2cd1128a0 100644
--- a/gnu/usr.bin/binutils/bfd/libbfd-in.h
+++ b/gnu/usr.bin/binutils/bfd/libbfd-in.h
@@ -1,6 +1,7 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -59,9 +60,9 @@ struct artdata {
file_ptr first_file_filepos;
/* Speed up searching the armap */
struct ar_cache *cache;
- bfd *archive_head; /* Only interesting in output routines */
+ bfd *archive_head; /* Only interesting in output routines */
carsym *symdefs; /* the symdef entries */
- symindex symdef_count; /* how many there are */
+ symindex symdef_count; /* how many there are */
char *extended_names; /* clever intel extension */
/* when more compilers are standard C, this can be a time_t */
long armap_timestamp; /* Timestamp value written into armap.
@@ -79,9 +80,9 @@ struct artdata {
/* Goes in bfd's arelt_data slot */
struct areltdata {
- char * arch_header; /* it's actually a string */
- unsigned int parsed_size; /* octets of filesize not including ar_hdr */
- char *filename; /* null-terminated */
+ char * arch_header; /* it's actually a string */
+ unsigned int parsed_size; /* octets of filesize not including ar_hdr */
+ char *filename; /* null-terminated */
};
#define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size)
@@ -128,11 +129,11 @@ void bfd_void PARAMS ((bfd *ignore));
bfd *_bfd_new_bfd_contained_in PARAMS ((bfd *));
const bfd_target *_bfd_dummy_target PARAMS ((bfd *abfd));
-void bfd_dont_truncate_arname PARAMS ((bfd *abfd, CONST char *filename,
+void bfd_dont_truncate_arname PARAMS ((bfd *abfd, const char *filename,
char *hdr));
-void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, CONST char *filename,
+void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, const char *filename,
char *hdr));
-void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, CONST char *filename,
+void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, const char *filename,
char *hdr));
boolean bsd_write_armap PARAMS ((bfd *arch, unsigned int elength,
@@ -365,7 +366,8 @@ extern boolean _bfd_dwarf1_find_nearest_line
/* Find the nearest line using DWARF 2 debugging information. */
extern boolean _bfd_dwarf2_find_nearest_line
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *, unsigned int));
+ const char **, unsigned int *, unsigned int,
+ PTR *));
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
@@ -520,7 +522,7 @@ extern bfd *bfd_last_cache;
/* List of supported target vectors, and the default vector (if
bfd_default_vector[0] is NULL, there is no default). */
-extern const bfd_target * const bfd_target_vector[];
+extern const bfd_target * const *bfd_target_vector;
extern const bfd_target *bfd_default_vector[];
/* Functions shared by the ECOFF and MIPS ELF backends, which have no
diff --git a/gnu/usr.bin/binutils/bfd/libbfd.c b/gnu/usr.bin/binutils/bfd/libbfd.c
index 881af73239f..695df8d51ab 100644
--- a/gnu/usr.bin/binutils/bfd/libbfd.c
+++ b/gnu/usr.bin/binutils/bfd/libbfd.c
@@ -1,5 +1,6 @@
/* Assorted BFD support routines, only used internally.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -42,7 +43,6 @@ DESCRIPTION
/* A routine which is used in target vectors for unsupported
operations. */
-/*ARGSUSED*/
boolean
bfd_false (ignore)
bfd *ignore ATTRIBUTE_UNUSED;
@@ -54,7 +54,6 @@ bfd_false (ignore)
/* A routine which is used in target vectors for supported operations
which do not actually do anything. */
-/*ARGSUSED*/
boolean
bfd_true (ignore)
bfd *ignore ATTRIBUTE_UNUSED;
@@ -65,7 +64,6 @@ bfd_true (ignore)
/* A routine which is used in target vectors for unsupported
operations which return a pointer value. */
-/*ARGSUSED*/
PTR
bfd_nullvoidptr (ignore)
bfd *ignore ATTRIBUTE_UNUSED;
@@ -74,23 +72,20 @@ bfd_nullvoidptr (ignore)
return NULL;
}
-/*ARGSUSED*/
-int
+int
bfd_0 (ignore)
bfd *ignore ATTRIBUTE_UNUSED;
{
return 0;
}
-/*ARGSUSED*/
-unsigned int
+unsigned int
bfd_0u (ignore)
bfd *ignore ATTRIBUTE_UNUSED;
{
return 0;
}
-/*ARGUSED*/
long
bfd_0l (ignore)
bfd *ignore ATTRIBUTE_UNUSED;
@@ -101,7 +96,6 @@ bfd_0l (ignore)
/* A routine which is used in target vectors for unsupported
operations which return -1 on error. */
-/*ARGSUSED*/
long
_bfd_n1 (ignore_abfd)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -110,14 +104,12 @@ _bfd_n1 (ignore_abfd)
return -1;
}
-/*ARGSUSED*/
-void
+void
bfd_void (ignore)
bfd *ignore ATTRIBUTE_UNUSED;
{
}
-/*ARGSUSED*/
boolean
_bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
bfd *ignore_core_bfd ATTRIBUTE_UNUSED;
@@ -130,7 +122,6 @@ _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
/* Routine to handle core_file_failing_command entry point for targets
without core file support. */
-/*ARGSUSED*/
char *
_bfd_nocore_core_file_failing_command (ignore_abfd)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -142,7 +133,6 @@ _bfd_nocore_core_file_failing_command (ignore_abfd)
/* Routine to handle core_file_failing_signal entry point for targets
without core file support. */
-/*ARGSUSED*/
int
_bfd_nocore_core_file_failing_signal (ignore_abfd)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -151,7 +141,6 @@ _bfd_nocore_core_file_failing_signal (ignore_abfd)
return 0;
}
-/*ARGSUSED*/
const bfd_target *
_bfd_dummy_target (ignore_abfd)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -217,13 +206,12 @@ bfd_zmalloc (size)
/* Some IO code */
-
/* Note that archive entries don't have streams; they share their parent's.
This allows someone to play with the iostream behind BFD's back.
Also, note that the origin pointer points to the beginning of a file's
contents (0 for non-archive elements). For archive entries this is the
- first octet in the file, NOT the beginning of the archive header. */
+ first octet in the file, NOT the beginning of the archive header. */
static int
real_read (where, a,b, file)
@@ -244,6 +232,7 @@ real_read (where, a,b, file)
if (a == 0 || b == 0)
return 0;
+
#if defined (__VAX) && defined (VMS)
/* Apparently fread on Vax VMS does not keep the record length
information. */
@@ -285,7 +274,7 @@ bfd_read (ptr, size, nitems, abfd)
return get;
}
- nread = real_read (ptr, 1, (size_t)(size*nitems), bfd_cache_lookup(abfd));
+ nread = real_read (ptr, 1, (size_t) (size*nitems), bfd_cache_lookup(abfd));
if (nread > 0)
abfd->where += nread;
@@ -317,7 +306,7 @@ struct _bfd_window_internal {
struct _bfd_window_internal *next;
PTR data;
bfd_size_type size;
- int refcount : 31; /* should be enough... */
+ int refcount : 31; /* should be enough... */
unsigned mapped : 1; /* 1 = mmap, 0 = malloc */
};
@@ -671,7 +660,7 @@ bfd_seek (abfd, position, direction)
file_ptr file_position;
/* For the time being, a BFD may not seek to it's end. The problem
is that we don't easily have a way to recognize the end of an
- element in an archive. */
+ element in an archive. */
BFD_ASSERT (direction == SEEK_SET || direction == SEEK_CUR);
@@ -683,19 +672,39 @@ bfd_seek (abfd, position, direction)
struct bfd_in_memory *bim;
bim = (struct bfd_in_memory *) abfd->iostream;
-
+
if (direction == SEEK_SET)
abfd->where = position;
else
abfd->where += position;
-
+
if ((bfd_size_type) abfd->where > bim->size)
{
- abfd->where = bim->size;
- bfd_set_error (bfd_error_file_truncated);
- return -1;
+ if ((abfd->direction == write_direction) ||
+ (abfd->direction == both_direction))
+ {
+ long newsize, oldsize = (bim->size + 127) & ~127;
+ bim->size = abfd->where;
+ /* Round up to cut down on memory fragmentation */
+ newsize = (bim->size + 127) & ~127;
+ if (newsize > oldsize)
+ {
+ bim->buffer = bfd_realloc (bim->buffer, newsize);
+ if (bim->buffer == 0)
+ {
+ bim->size = 0;
+ bfd_set_error (bfd_error_no_memory);
+ return -1;
+ }
+ }
+ }
+ else
+ {
+ abfd->where = bim->size;
+ bfd_set_error (bfd_error_file_truncated);
+ return -1;
+ }
}
-
return 0;
}
@@ -739,7 +748,6 @@ bfd_seek (abfd, position, direction)
file_position += abfd->origin;
result = fseek (f, file_position, direction);
-
if (result != 0)
{
int hold_errno = errno;
@@ -776,7 +784,7 @@ bfd_seek (abfd, position, direction)
/* FIXME: Should these take a count argument?
Answer (gnu@cygnus.com): No, but perhaps they should be inline
- functions in swap.h #ifdef __GNUC__.
+ functions in swap.h #ifdef __GNUC__.
Gprof them later and find out. */
/*
@@ -807,13 +815,13 @@ DESCRIPTION
.{* Byte swapping macros for user section data. *}
.
.#define bfd_put_8(abfd, val, ptr) \
-. ((void) (*((unsigned char *)(ptr)) = (unsigned char)(val)))
+. ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
.#define bfd_put_signed_8 \
. bfd_put_8
.#define bfd_get_8(abfd, ptr) \
-. (*(unsigned char *)(ptr))
+. (*(unsigned char *) (ptr))
.#define bfd_get_signed_8(abfd, ptr) \
-. ((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
+. ((*(unsigned char *) (ptr) ^ 0x80) - 0x80)
.
.#define bfd_put_16(abfd, val, ptr) \
. BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
@@ -856,7 +864,7 @@ DESCRIPTION
. : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
. : (abort (), (void) 0))
.
-*/
+*/
/*
FUNCTION
@@ -908,7 +916,7 @@ DESCRIPTION
.#define bfd_h_get_signed_64(abfd, ptr) \
. BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
.
-*/
+*/
/* Sign extension to bfd_signed_vma. */
#define COERCE16(x) (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000)
@@ -951,17 +959,17 @@ bfd_putb16 (data, addr)
bfd_vma data;
register bfd_byte *addr;
{
- addr[0] = (bfd_byte)(data >> 8);
- addr[1] = (bfd_byte )data;
+ addr[0] = (bfd_byte) (data >> 8);
+ addr[1] = (bfd_byte) data;
}
void
bfd_putl16 (data, addr)
- bfd_vma data;
+ bfd_vma data;
register bfd_byte *addr;
{
- addr[0] = (bfd_byte )data;
- addr[1] = (bfd_byte)(data >> 8);
+ addr[0] = (bfd_byte) data;
+ addr[1] = (bfd_byte) (data >> 8);
}
bfd_vma
@@ -1116,10 +1124,10 @@ bfd_putb32 (data, addr)
bfd_vma data;
register bfd_byte *addr;
{
- addr[0] = (bfd_byte)(data >> 24);
- addr[1] = (bfd_byte)(data >> 16);
- addr[2] = (bfd_byte)(data >> 8);
- addr[3] = (bfd_byte)data;
+ addr[0] = (bfd_byte) (data >> 24);
+ addr[1] = (bfd_byte) (data >> 16);
+ addr[2] = (bfd_byte) (data >> 8);
+ addr[3] = (bfd_byte) data;
}
void
@@ -1127,10 +1135,10 @@ bfd_putl32 (data, addr)
bfd_vma data;
register bfd_byte *addr;
{
- addr[0] = (bfd_byte)data;
- addr[1] = (bfd_byte)(data >> 8);
- addr[2] = (bfd_byte)(data >> 16);
- addr[3] = (bfd_byte)(data >> 24);
+ addr[0] = (bfd_byte) data;
+ addr[1] = (bfd_byte) (data >> 8);
+ addr[2] = (bfd_byte) (data >> 16);
+ addr[3] = (bfd_byte) (data >> 24);
}
void
@@ -1139,14 +1147,14 @@ bfd_putb64 (data, addr)
register bfd_byte *addr ATTRIBUTE_UNUSED;
{
#ifdef BFD64
- addr[0] = (bfd_byte)(data >> (7*8));
- addr[1] = (bfd_byte)(data >> (6*8));
- addr[2] = (bfd_byte)(data >> (5*8));
- addr[3] = (bfd_byte)(data >> (4*8));
- addr[4] = (bfd_byte)(data >> (3*8));
- addr[5] = (bfd_byte)(data >> (2*8));
- addr[6] = (bfd_byte)(data >> (1*8));
- addr[7] = (bfd_byte)(data >> (0*8));
+ addr[0] = (bfd_byte) (data >> (7*8));
+ addr[1] = (bfd_byte) (data >> (6*8));
+ addr[2] = (bfd_byte) (data >> (5*8));
+ addr[3] = (bfd_byte) (data >> (4*8));
+ addr[4] = (bfd_byte) (data >> (3*8));
+ addr[5] = (bfd_byte) (data >> (2*8));
+ addr[6] = (bfd_byte) (data >> (1*8));
+ addr[7] = (bfd_byte) (data >> (0*8));
#else
BFD_FAIL();
#endif
@@ -1158,18 +1166,66 @@ bfd_putl64 (data, addr)
register bfd_byte *addr ATTRIBUTE_UNUSED;
{
#ifdef BFD64
- addr[7] = (bfd_byte)(data >> (7*8));
- addr[6] = (bfd_byte)(data >> (6*8));
- addr[5] = (bfd_byte)(data >> (5*8));
- addr[4] = (bfd_byte)(data >> (4*8));
- addr[3] = (bfd_byte)(data >> (3*8));
- addr[2] = (bfd_byte)(data >> (2*8));
- addr[1] = (bfd_byte)(data >> (1*8));
- addr[0] = (bfd_byte)(data >> (0*8));
+ addr[7] = (bfd_byte) (data >> (7*8));
+ addr[6] = (bfd_byte) (data >> (6*8));
+ addr[5] = (bfd_byte) (data >> (5*8));
+ addr[4] = (bfd_byte) (data >> (4*8));
+ addr[3] = (bfd_byte) (data >> (3*8));
+ addr[2] = (bfd_byte) (data >> (2*8));
+ addr[1] = (bfd_byte) (data >> (1*8));
+ addr[0] = (bfd_byte) (data >> (0*8));
#else
BFD_FAIL();
#endif
}
+
+void
+bfd_put_bits (data, addr, bits, big_p)
+ bfd_vma data;
+ bfd_byte *addr;
+ int bits;
+ boolean big_p;
+{
+ int i;
+ int bytes;
+
+ if (bits % 8 != 0)
+ abort ();
+
+ bytes = bits / 8;
+ for (i = 0; i < bytes; i++)
+ {
+ int index = big_p ? bytes - i - 1 : i;
+
+ addr[index] = (bfd_byte) data;
+ data >>= 8;
+ }
+}
+
+bfd_vma
+bfd_get_bits (addr, bits, big_p)
+ bfd_byte *addr;
+ int bits;
+ boolean big_p;
+{
+ bfd_vma data;
+ int i;
+ int bytes;
+
+ if (bits % 8 != 0)
+ abort ();
+
+ data = 0;
+ bytes = bits / 8;
+ for (i = 0; i < bytes; i++)
+ {
+ int index = big_p ? i : bytes - i - 1;
+
+ data = (data << 8) | addr[index];
+ }
+
+ return data;
+}
/* Default implementation */
@@ -1306,13 +1362,17 @@ _bfd_generic_verify_endian_match (ibfd, obfd)
bfd *obfd;
{
if (ibfd->xvec->byteorder != obfd->xvec->byteorder
+ && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
&& obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
- (*_bfd_error_handler)
- ("%s: compiled for a %s endian system and target is %s endian",
- bfd_get_filename (ibfd),
- bfd_big_endian (ibfd) ? "big" : "little",
- bfd_big_endian (obfd) ? "big" : "little");
+ const char *msg;
+
+ if (bfd_big_endian (ibfd))
+ msg = _("%s: compiled for a big endian system and target is little endian");
+ else
+ msg = _("%s: compiled for a little endian system and target is big endian");
+
+ (*_bfd_error_handler) (msg, bfd_get_filename (ibfd));
bfd_set_error (bfd_error_wrong_format);
return false;
diff --git a/gnu/usr.bin/binutils/bfd/libbfd.h b/gnu/usr.bin/binutils/bfd/libbfd.h
index d8b5c248bf9..997856a4109 100644
--- a/gnu/usr.bin/binutils/bfd/libbfd.h
+++ b/gnu/usr.bin/binutils/bfd/libbfd.h
@@ -1,6 +1,7 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -59,9 +60,9 @@ struct artdata {
file_ptr first_file_filepos;
/* Speed up searching the armap */
struct ar_cache *cache;
- bfd *archive_head; /* Only interesting in output routines */
+ bfd *archive_head; /* Only interesting in output routines */
carsym *symdefs; /* the symdef entries */
- symindex symdef_count; /* how many there are */
+ symindex symdef_count; /* how many there are */
char *extended_names; /* clever intel extension */
/* when more compilers are standard C, this can be a time_t */
long armap_timestamp; /* Timestamp value written into armap.
@@ -79,9 +80,9 @@ struct artdata {
/* Goes in bfd's arelt_data slot */
struct areltdata {
- char * arch_header; /* it's actually a string */
- unsigned int parsed_size; /* octets of filesize not including ar_hdr */
- char *filename; /* null-terminated */
+ char * arch_header; /* it's actually a string */
+ unsigned int parsed_size; /* octets of filesize not including ar_hdr */
+ char *filename; /* null-terminated */
};
#define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size)
@@ -128,11 +129,11 @@ void bfd_void PARAMS ((bfd *ignore));
bfd *_bfd_new_bfd_contained_in PARAMS ((bfd *));
const bfd_target *_bfd_dummy_target PARAMS ((bfd *abfd));
-void bfd_dont_truncate_arname PARAMS ((bfd *abfd, CONST char *filename,
+void bfd_dont_truncate_arname PARAMS ((bfd *abfd, const char *filename,
char *hdr));
-void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, CONST char *filename,
+void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, const char *filename,
char *hdr));
-void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, CONST char *filename,
+void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, const char *filename,
char *hdr));
boolean bsd_write_armap PARAMS ((bfd *arch, unsigned int elength,
@@ -365,7 +366,8 @@ extern boolean _bfd_dwarf1_find_nearest_line
/* Find the nearest line using DWARF 2 debugging information. */
extern boolean _bfd_dwarf2_find_nearest_line
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *, unsigned int));
+ const char **, unsigned int *, unsigned int,
+ PTR *));
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
@@ -520,7 +522,7 @@ extern bfd *bfd_last_cache;
/* List of supported target vectors, and the default vector (if
bfd_default_vector[0] is NULL, there is no default). */
-extern const bfd_target * const bfd_target_vector[];
+extern const bfd_target * const *bfd_target_vector;
extern const bfd_target *bfd_default_vector[];
/* Functions shared by the ECOFF and MIPS ELF backends, which have no
@@ -551,10 +553,10 @@ extern boolean _bfd_sh_align_load_span
/* And more follows */
-void
+void
bfd_write_bigendian_4byte_int PARAMS ((bfd *abfd, int i));
-unsigned int
+unsigned int
bfd_log2 PARAMS ((bfd_vma x));
#define BFD_CACHE_MAX_OPEN 10
@@ -562,15 +564,15 @@ extern bfd *bfd_last_cache;
#define bfd_cache_lookup(x) \
((x)==bfd_last_cache? \
- (FILE*)(bfd_last_cache->iostream): \
+ (FILE*) (bfd_last_cache->iostream): \
bfd_cache_lookup_worker(x))
-boolean
-bfd_cache_init PARAMS ((bfd *abfd));
+boolean
+bfd_cache_init PARAMS ((bfd *abfd));
-boolean
-bfd_cache_close PARAMS ((bfd *abfd));
+boolean
+bfd_cache_close PARAMS ((bfd *abfd));
-FILE*
+FILE*
bfd_open_file PARAMS ((bfd *abfd));
FILE *
@@ -645,7 +647,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SPARC_GLOB_DAT",
"BFD_RELOC_SPARC_JMP_SLOT",
"BFD_RELOC_SPARC_RELATIVE",
+ "BFD_RELOC_SPARC_UA16",
"BFD_RELOC_SPARC_UA32",
+ "BFD_RELOC_SPARC_UA64",
"BFD_RELOC_SPARC_BASE13",
"BFD_RELOC_SPARC_BASE22",
"BFD_RELOC_SPARC_10",
@@ -705,6 +709,17 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_GOT_PAGE",
"BFD_RELOC_MIPS_GOT_OFST",
"BFD_RELOC_MIPS_GOT_DISP",
+ "BFD_RELOC_MIPS_SHIFT5",
+ "BFD_RELOC_MIPS_SHIFT6",
+ "BFD_RELOC_MIPS_INSERT_A",
+ "BFD_RELOC_MIPS_INSERT_B",
+ "BFD_RELOC_MIPS_DELETE",
+ "BFD_RELOC_MIPS_HIGHEST",
+ "BFD_RELOC_MIPS_HIGHER",
+ "BFD_RELOC_MIPS_SCN_DISP",
+ "BFD_RELOC_MIPS_REL16",
+ "BFD_RELOC_MIPS_RELGOT",
+ "BFD_RELOC_MIPS_JALR",
"BFD_RELOC_386_GOT32",
"BFD_RELOC_386_PLT32",
@@ -714,6 +729,14 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_386_RELATIVE",
"BFD_RELOC_386_GOTOFF",
"BFD_RELOC_386_GOTPC",
+ "BFD_RELOC_X86_64_GOT32",
+ "BFD_RELOC_X86_64_PLT32",
+ "BFD_RELOC_X86_64_COPY",
+ "BFD_RELOC_X86_64_GLOB_DAT",
+ "BFD_RELOC_X86_64_JUMP_SLOT",
+ "BFD_RELOC_X86_64_RELATIVE",
+ "BFD_RELOC_X86_64_GOTPCREL",
+ "BFD_RELOC_X86_64_32S",
"BFD_RELOC_NS32K_IMM_8",
"BFD_RELOC_NS32K_IMM_16",
"BFD_RELOC_NS32K_IMM_32",
@@ -765,6 +788,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_I370_D12",
"BFD_RELOC_CTOR",
"BFD_RELOC_ARM_PCREL_BRANCH",
+ "BFD_RELOC_ARM_PCREL_BLX",
+ "BFD_RELOC_THUMB_PCREL_BLX",
"BFD_RELOC_ARM_IMMEDIATE",
"BFD_RELOC_ARM_ADRL_IMMEDIATE",
"BFD_RELOC_ARM_OFFSET_IMM",
@@ -809,6 +834,13 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SH_CODE",
"BFD_RELOC_SH_DATA",
"BFD_RELOC_SH_LABEL",
+ "BFD_RELOC_SH_LOOP_START",
+ "BFD_RELOC_SH_LOOP_END",
+ "BFD_RELOC_SH_COPY",
+ "BFD_RELOC_SH_GLOB_DAT",
+ "BFD_RELOC_SH_JMP_SLOT",
+ "BFD_RELOC_SH_RELATIVE",
+ "BFD_RELOC_SH_GOTPC",
"BFD_RELOC_THUMB_PCREL_BRANCH9",
"BFD_RELOC_THUMB_PCREL_BRANCH12",
"BFD_RELOC_THUMB_PCREL_BRANCH23",
@@ -857,6 +889,11 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MN10300_32_PCREL",
"BFD_RELOC_MN10300_16_PCREL",
"BFD_RELOC_TIC30_LDP",
+ "BFD_RELOC_TIC54X_PARTLS7",
+ "BFD_RELOC_TIC54X_PARTMS9",
+ "BFD_RELOC_TIC54X_23",
+ "BFD_RELOC_TIC54X_16_OF_23",
+ "BFD_RELOC_TIC54X_MS7_OF_23",
"BFD_RELOC_FR30_48",
"BFD_RELOC_FR30_20",
"BFD_RELOC_FR30_6_IN_4",
@@ -889,28 +926,128 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_AVR_CALL",
"BFD_RELOC_VTABLE_INHERIT",
"BFD_RELOC_VTABLE_ENTRY",
+ "BFD_RELOC_IA64_IMM14",
+ "BFD_RELOC_IA64_IMM22",
+ "BFD_RELOC_IA64_IMM64",
+ "BFD_RELOC_IA64_DIR32MSB",
+ "BFD_RELOC_IA64_DIR32LSB",
+ "BFD_RELOC_IA64_DIR64MSB",
+ "BFD_RELOC_IA64_DIR64LSB",
+ "BFD_RELOC_IA64_GPREL22",
+ "BFD_RELOC_IA64_GPREL64I",
+ "BFD_RELOC_IA64_GPREL32MSB",
+ "BFD_RELOC_IA64_GPREL32LSB",
+ "BFD_RELOC_IA64_GPREL64MSB",
+ "BFD_RELOC_IA64_GPREL64LSB",
+ "BFD_RELOC_IA64_LTOFF22",
+ "BFD_RELOC_IA64_LTOFF64I",
+ "BFD_RELOC_IA64_PLTOFF22",
+ "BFD_RELOC_IA64_PLTOFF64I",
+ "BFD_RELOC_IA64_PLTOFF64MSB",
+ "BFD_RELOC_IA64_PLTOFF64LSB",
+ "BFD_RELOC_IA64_FPTR64I",
+ "BFD_RELOC_IA64_FPTR32MSB",
+ "BFD_RELOC_IA64_FPTR32LSB",
+ "BFD_RELOC_IA64_FPTR64MSB",
+ "BFD_RELOC_IA64_FPTR64LSB",
+ "BFD_RELOC_IA64_PCREL21B",
+ "BFD_RELOC_IA64_PCREL21BI",
+ "BFD_RELOC_IA64_PCREL21M",
+ "BFD_RELOC_IA64_PCREL21F",
+ "BFD_RELOC_IA64_PCREL22",
+ "BFD_RELOC_IA64_PCREL60B",
+ "BFD_RELOC_IA64_PCREL64I",
+ "BFD_RELOC_IA64_PCREL32MSB",
+ "BFD_RELOC_IA64_PCREL32LSB",
+ "BFD_RELOC_IA64_PCREL64MSB",
+ "BFD_RELOC_IA64_PCREL64LSB",
+ "BFD_RELOC_IA64_LTOFF_FPTR22",
+ "BFD_RELOC_IA64_LTOFF_FPTR64I",
+ "BFD_RELOC_IA64_LTOFF_FPTR64MSB",
+ "BFD_RELOC_IA64_LTOFF_FPTR64LSB",
+ "BFD_RELOC_IA64_SEGREL32MSB",
+ "BFD_RELOC_IA64_SEGREL32LSB",
+ "BFD_RELOC_IA64_SEGREL64MSB",
+ "BFD_RELOC_IA64_SEGREL64LSB",
+ "BFD_RELOC_IA64_SECREL32MSB",
+ "BFD_RELOC_IA64_SECREL32LSB",
+ "BFD_RELOC_IA64_SECREL64MSB",
+ "BFD_RELOC_IA64_SECREL64LSB",
+ "BFD_RELOC_IA64_REL32MSB",
+ "BFD_RELOC_IA64_REL32LSB",
+ "BFD_RELOC_IA64_REL64MSB",
+ "BFD_RELOC_IA64_REL64LSB",
+ "BFD_RELOC_IA64_LTV32MSB",
+ "BFD_RELOC_IA64_LTV32LSB",
+ "BFD_RELOC_IA64_LTV64MSB",
+ "BFD_RELOC_IA64_LTV64LSB",
+ "BFD_RELOC_IA64_IPLTMSB",
+ "BFD_RELOC_IA64_IPLTLSB",
+ "BFD_RELOC_IA64_COPY",
+ "BFD_RELOC_IA64_TPREL22",
+ "BFD_RELOC_IA64_TPREL64MSB",
+ "BFD_RELOC_IA64_TPREL64LSB",
+ "BFD_RELOC_IA64_LTOFF_TP22",
+ "BFD_RELOC_IA64_LTOFF22X",
+ "BFD_RELOC_IA64_LDXMOV",
+ "BFD_RELOC_M68HC11_HI8",
+ "BFD_RELOC_M68HC11_LO8",
+ "BFD_RELOC_M68HC11_3B",
+ "BFD_RELOC_CRIS_BDISP8",
+ "BFD_RELOC_CRIS_UNSIGNED_5",
+ "BFD_RELOC_CRIS_SIGNED_6",
+ "BFD_RELOC_CRIS_UNSIGNED_6",
+ "BFD_RELOC_CRIS_UNSIGNED_4",
+ "BFD_RELOC_860_COPY",
+ "BFD_RELOC_860_GLOB_DAT",
+ "BFD_RELOC_860_JUMP_SLOT",
+ "BFD_RELOC_860_RELATIVE",
+ "BFD_RELOC_860_PC26",
+ "BFD_RELOC_860_PLT26",
+ "BFD_RELOC_860_PC16",
+ "BFD_RELOC_860_LOW0",
+ "BFD_RELOC_860_SPLIT0",
+ "BFD_RELOC_860_LOW1",
+ "BFD_RELOC_860_SPLIT1",
+ "BFD_RELOC_860_LOW2",
+ "BFD_RELOC_860_SPLIT2",
+ "BFD_RELOC_860_LOW3",
+ "BFD_RELOC_860_LOGOT0",
+ "BFD_RELOC_860_SPGOT0",
+ "BFD_RELOC_860_LOGOT1",
+ "BFD_RELOC_860_SPGOT1",
+ "BFD_RELOC_860_LOGOTOFF0",
+ "BFD_RELOC_860_SPGOTOFF0",
+ "BFD_RELOC_860_LOGOTOFF1",
+ "BFD_RELOC_860_SPGOTOFF1",
+ "BFD_RELOC_860_LOGOTOFF2",
+ "BFD_RELOC_860_LOGOTOFF3",
+ "BFD_RELOC_860_LOPC",
+ "BFD_RELOC_860_HIGHADJ",
+ "BFD_RELOC_860_HAGOT",
+ "BFD_RELOC_860_HAGOTOFF",
+ "BFD_RELOC_860_HAPC",
+ "BFD_RELOC_860_HIGH",
+ "BFD_RELOC_860_HIGOT",
+ "BFD_RELOC_860_HIGOTOFF",
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif
reloc_howto_type *
-bfd_default_reloc_type_lookup
- PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+bfd_default_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-boolean
-bfd_generic_relax_section
- PARAMS ((bfd *abfd,
+boolean
+bfd_generic_relax_section PARAMS ((bfd *abfd,
asection *section,
struct bfd_link_info *,
boolean *));
-boolean
-bfd_generic_gc_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+boolean
+bfd_generic_gc_sections PARAMS ((bfd *, struct bfd_link_info *));
bfd_byte *
-
-bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
+bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
struct bfd_link_info *link_info,
struct bfd_link_order *link_order,
bfd_byte *data,
@@ -918,19 +1055,18 @@ bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
asymbol **symbols));
extern const bfd_arch_info_type bfd_default_arch_struct;
-boolean
+boolean
bfd_default_set_arch_mach PARAMS ((bfd *abfd,
enum bfd_architecture arch,
unsigned long mach));
const bfd_arch_info_type *
-bfd_default_compatible
- PARAMS ((const bfd_arch_info_type *a,
+bfd_default_compatible PARAMS ((const bfd_arch_info_type *a,
const bfd_arch_info_type *b));
-boolean
+boolean
bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string));
struct elf_internal_shdr *
-bfd_elf_find_section PARAMS ((bfd *abfd, char *name));
+bfd_elf_find_section PARAMS ((bfd *abfd, char *name));
diff --git a/gnu/usr.bin/binutils/bfd/libcoff-in.h b/gnu/usr.bin/binutils/bfd/libcoff-in.h
index 9b1a0268487..8368cc85527 100644
--- a/gnu/usr.bin/binutils/bfd/libcoff-in.h
+++ b/gnu/usr.bin/binutils/bfd/libcoff-in.h
@@ -1,5 +1,6 @@
/* BFD COFF object file private structure.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -43,6 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define obj_coff_strings(bfd) (coff_data (bfd)->strings)
#define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings)
#define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes)
+#define obj_coff_strings_written(bfd) (coff_data (bfd)->strings_written)
#define obj_coff_local_toc_table(bfd) (coff_data(bfd)->local_toc_sym_map)
@@ -83,6 +85,8 @@ typedef struct coff_tdata
char *strings;
/* If this is true, the strings may not be freed. */
boolean keep_strings;
+ /* If this is true, the strings have been written out already. */
+ boolean strings_written;
/* is this a PE format coff file */
int pe;
@@ -97,6 +101,9 @@ typedef struct coff_tdata
/* Used by coff_find_nearest_line. */
PTR line_info;
+ /* A place to stash dwarf2 info for this bfd. */
+ PTR dwarf2_find_line_info;
+
/* The timestamp from the COFF file header. */
long timestamp;
@@ -115,6 +122,8 @@ typedef struct pe_tdata
int has_reloc_section;
boolean (*in_reloc_p) PARAMS((bfd *, reloc_howto_type *));
flagword real_flags;
+ int target_subsystem;
+ boolean force_minimum_alignment;
} pe_data_type;
#define pe_data(bfd) ((bfd)->tdata.pe_obj_data)
@@ -126,6 +135,9 @@ struct xcoff_tdata
/* Basic COFF information. */
coff_data_type coff;
+ /* True if this is an XCOFF64 file. */
+ boolean xcoff64;
+
/* True if a large a.out header should be generated. */
boolean full_aouthdr;
@@ -151,10 +163,10 @@ struct xcoff_tdata
short cputype;
/* maxdata from optional header. */
- bfd_size_type maxdata;
+ bfd_vma maxdata;
/* maxstack from optional header. */
- bfd_size_type maxstack;
+ bfd_vma maxstack;
/* Used by the XCOFF backend linker. */
asection **csects;
diff --git a/gnu/usr.bin/binutils/bfd/libcoff.h b/gnu/usr.bin/binutils/bfd/libcoff.h
index bee4ce9e858..34fed2d0f36 100644
--- a/gnu/usr.bin/binutils/bfd/libcoff.h
+++ b/gnu/usr.bin/binutils/bfd/libcoff.h
@@ -1,5 +1,6 @@
/* BFD COFF object file private structure.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -43,6 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define obj_coff_strings(bfd) (coff_data (bfd)->strings)
#define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings)
#define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes)
+#define obj_coff_strings_written(bfd) (coff_data (bfd)->strings_written)
#define obj_coff_local_toc_table(bfd) (coff_data(bfd)->local_toc_sym_map)
@@ -83,6 +85,8 @@ typedef struct coff_tdata
char *strings;
/* If this is true, the strings may not be freed. */
boolean keep_strings;
+ /* If this is true, the strings have been written out already. */
+ boolean strings_written;
/* is this a PE format coff file */
int pe;
@@ -97,6 +101,9 @@ typedef struct coff_tdata
/* Used by coff_find_nearest_line. */
PTR line_info;
+ /* A place to stash dwarf2 info for this bfd. */
+ PTR dwarf2_find_line_info;
+
/* The timestamp from the COFF file header. */
long timestamp;
@@ -115,6 +122,8 @@ typedef struct pe_tdata
int has_reloc_section;
boolean (*in_reloc_p) PARAMS((bfd *, reloc_howto_type *));
flagword real_flags;
+ int target_subsystem;
+ boolean force_minimum_alignment;
} pe_data_type;
#define pe_data(bfd) ((bfd)->tdata.pe_obj_data)
@@ -126,6 +135,9 @@ struct xcoff_tdata
/* Basic COFF information. */
coff_data_type coff;
+ /* True if this is an XCOFF64 file. */
+ boolean xcoff64;
+
/* True if a large a.out header should be generated. */
boolean full_aouthdr;
@@ -151,10 +163,10 @@ struct xcoff_tdata
short cputype;
/* maxdata from optional header. */
- bfd_size_type maxdata;
+ bfd_vma maxdata;
/* maxstack from optional header. */
- bfd_size_type maxstack;
+ bfd_vma maxstack;
/* Used by the XCOFF backend linker. */
asection **csects;
@@ -575,32 +587,32 @@ extern boolean ppc_process_before_allocation
typedef struct coff_ptr_struct
{
- /* Remembers the offset from the first symbol in the file for
+ /* Remembers the offset from the first symbol in the file for
this symbol. Generated by coff_renumber_symbols. */
unsigned int offset;
- /* Should the value of this symbol be renumbered. Used for
+ /* Should the value of this symbol be renumbered. Used for
XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
unsigned int fix_value : 1;
- /* Should the tag field of this symbol be renumbered.
+ /* Should the tag field of this symbol be renumbered.
Created by coff_pointerize_aux. */
unsigned int fix_tag : 1;
- /* Should the endidx field of this symbol be renumbered.
+ /* Should the endidx field of this symbol be renumbered.
Created by coff_pointerize_aux. */
unsigned int fix_end : 1;
- /* Should the x_csect.x_scnlen field be renumbered.
+ /* Should the x_csect.x_scnlen field be renumbered.
Created by coff_pointerize_aux. */
unsigned int fix_scnlen : 1;
- /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
+ /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
index into the line number entries. Set by
coff_slurp_symbol_table. */
unsigned int fix_line : 1;
- /* The container for the symbol structure as read and translated
+ /* The container for the symbol structure as read and translated
from the file. */
union {
@@ -610,35 +622,35 @@ union {
} combined_entry_type;
- /* Each canonical asymbol really looks like this: */
+/* Each canonical asymbol really looks like this: */
typedef struct coff_symbol_struct
{
- /* The actual symbol which the rest of BFD works with */
+ /* The actual symbol which the rest of BFD works with */
asymbol symbol;
- /* A pointer to the hidden information for this symbol */
+ /* A pointer to the hidden information for this symbol */
combined_entry_type *native;
- /* A pointer to the linenumber information for this symbol */
+ /* A pointer to the linenumber information for this symbol */
struct lineno_cache_entry *lineno;
- /* Have the line numbers been relocated yet ? */
+ /* Have the line numbers been relocated yet ? */
boolean done_lineno;
} coff_symbol_type;
- /* COFF symbol classifications. */
+/* COFF symbol classifications. */
enum coff_symbol_classification
{
- /* Global symbol. */
+ /* Global symbol. */
COFF_SYMBOL_GLOBAL,
- /* Common symbol. */
+ /* Common symbol. */
COFF_SYMBOL_COMMON,
- /* Undefined symbol. */
+ /* Undefined symbol. */
COFF_SYMBOL_UNDEFINED,
- /* Local symbol. */
+ /* Local symbol. */
COFF_SYMBOL_LOCAL,
- /* PE section symbol. */
+ /* PE section symbol. */
COFF_SYMBOL_PE_SECTION
};
@@ -713,6 +725,8 @@ typedef struct
boolean _bfd_coff_long_filenames;
boolean _bfd_coff_long_section_names;
unsigned int _bfd_coff_default_section_alignment_power;
+ boolean _bfd_coff_force_symnames_in_strings;
+ unsigned int _bfd_coff_debug_string_prefix_length;
void (*_bfd_coff_swap_filehdr_in) PARAMS ((
bfd *abfd,
PTR ext,
@@ -815,12 +829,12 @@ typedef struct
struct bfd_link_info *info,
bfd *abfd,
const char *name,
- flagword flags,
+ flagword flags,
asection *section,
bfd_vma value,
const char *string,
boolean copy,
- boolean collect,
+ boolean collect,
struct bfd_link_hash_entry **hashp));
boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
@@ -910,6 +924,12 @@ typedef struct
#define bfd_coff_symname_in_debug(abfd, sym)\
((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
+#define bfd_coff_force_symnames_in_strings(abfd)\
+ (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
+
+#define bfd_coff_debug_string_prefix_length(abfd)\
+ (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
+
#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
((coff_backend_info (abfd)->_bfd_coff_print_aux)\
(abfd, file, base, symbol, aux, indaux))
diff --git a/gnu/usr.bin/binutils/bfd/libecoff.h b/gnu/usr.bin/binutils/bfd/libecoff.h
index 456180544cb..934ada112cc 100644
--- a/gnu/usr.bin/binutils/bfd/libecoff.h
+++ b/gnu/usr.bin/binutils/bfd/libecoff.h
@@ -1,5 +1,5 @@
/* BFD ECOFF object file private structure.
- Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/libhppa.h b/gnu/usr.bin/binutils/bfd/libhppa.h
index 1392742876f..52ebf51f61a 100644
--- a/gnu/usr.bin/binutils/bfd/libhppa.h
+++ b/gnu/usr.bin/binutils/bfd/libhppa.h
@@ -1,5 +1,5 @@
/* HP PA-RISC SOM object file format: definitions internal to BFD.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
@@ -21,8 +21,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifndef _HPPA_H
-#define _HPPA_H
+#ifndef _LIBHPPA_H
+#define _LIBHPPA_H
#define BYTES_IN_WORD 4
#define PA_PAGESIZE 0x1000
@@ -35,53 +35,8 @@
#endif /* GNU C? */
#endif /* INLINE */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-/* Declare the functions with the unused attribute to avoid warnings. */
-static INLINE unsigned int assemble_3 (unsigned int)
- __attribute__ ((__unused__));
-static INLINE void dis_assemble_3 (unsigned int, unsigned int *)
- __attribute__ ((__unused__));
-static INLINE unsigned int assemble_12 (unsigned int, unsigned int)
- __attribute__ ((__unused__));
-static INLINE void dis_assemble_12 (unsigned int, unsigned int *,
- unsigned int *)
- __attribute__ ((__unused__));
-static INLINE unsigned long assemble_17 (unsigned int, unsigned int,
- unsigned int)
- __attribute__ ((__unused__));
-static INLINE void dis_assemble_17 (unsigned int, unsigned int *,
- unsigned int *, unsigned int *)
- __attribute__ ((__unused__));
-static INLINE void dis_assemble_22 (unsigned int, unsigned int *,
- unsigned int *, unsigned int *,
- unsigned int *)
- __attribute__ ((__unused__));
-static INLINE unsigned long assemble_21 (unsigned int)
- __attribute ((__unused__));
-static INLINE void dis_assemble_21 (unsigned int, unsigned int *)
- __attribute__ ((__unused__));
-static INLINE unsigned long sign_extend (unsigned int, unsigned int)
- __attribute__ ((__unused__));
-static INLINE unsigned int ones (int) __attribute ((__unused__));
-static INLINE void sign_unext (unsigned int, unsigned int, unsigned int *)
- __attribute__ ((__unused__));
-static INLINE unsigned long low_sign_extend (unsigned int, unsigned int)
- __attribute__ ((__unused__));
-static INLINE void low_sign_unext (unsigned int, unsigned int, unsigned int *)
- __attribute__ ((__unused__));
-static INLINE unsigned long hppa_field_adjust (unsigned long, unsigned long,
- unsigned short)
- __attribute__ ((__unused__));
-static INLINE int bfd_hppa_insn2fmt (unsigned long)
- __attribute__ ((__unused__));
-static INLINE unsigned long hppa_rebuild_insn (bfd *, unsigned long,
- unsigned long, unsigned long)
- __attribute__ ((__unused__));
-#endif /* gcc 2.7 or higher */
-
-
/* The PA instruction set variants. */
-enum pa_arch {pa10 = 10, pa11 = 11, pa20 = 20};
+enum pa_arch {pa10 = 10, pa11 = 11, pa20 = 20, pa20w = 25};
/* HP PA-RISC relocation types */
@@ -197,527 +152,462 @@ enum hppa_reloc_expr_type_alt
The high order 10 bits contain parameter relocation information,
the low order 22 bits contain the constant offset. */
-
-#define HPPA_R_ARG_RELOC(a) (((a) >> 22) & 0x3FF)
-#define HPPA_R_CONSTANT(a) ((((int)(a)) << 10) >> 10)
-#define HPPA_R_ADDEND(r,c) (((r) << 22) + ((c) & 0x3FFFFF))
-#define HPPA_WIDE (0) /* PSW W-bit, need to check! FIXME */
-
-/* These macros get bit fields using HP's numbering (MSB = 0),
- * but note that "MASK" assumes that the LSB bits are what's
- * wanted.
- */
-#ifndef GET_FIELD
-#define GET_FIELD(X, FROM, TO) \
- ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
-#endif
-#define GET_BIT(X, WHICH) \
- GET_FIELD (X, WHICH, WHICH)
-
-#define MASK(SIZE) \
- (~((-1) << SIZE))
-
-#define CATENATE(X, XSIZE, Y, YSIZE) \
- (((X & MASK (XSIZE)) << YSIZE) | (Y & MASK (YSIZE)))
-
-#define ELEVEN(X) \
- CATENATE (GET_BIT (X, 10), 1, GET_FIELD (X, 0, 9), 10)
-
-/* Some functions to manipulate PA instructions. */
-/* NOTE: these use the HP convention that f{1} is the _left_ most
- * bit (MSB) of f; they sometimes have to impose an assumption
- * about the size of a field; and as far as I can tell, most
- * aren't used.
- */
+#define HPPA_R_ARG_RELOC(a) \
+ (((a) >> 22) & 0x3ff)
+#define HPPA_R_CONSTANT(a) \
+ ((((bfd_signed_vma)(a)) << (BFD_ARCH_SIZE-22)) >> (BFD_ARCH_SIZE-22))
+#define HPPA_R_ADDEND(r, c) \
+ (((r) << 22) + ((c) & 0x3fffff))
-static INLINE unsigned long
-sign_extend (x, len)
- unsigned int x, len;
-{
- return (int)(x >> (len - 1) ? (-1 << len) | x : x);
-}
-static INLINE unsigned int
-assemble_3 (x)
- unsigned int x;
-{
- return CATENATE (GET_BIT (x, 2), 1, GET_FIELD (x, 0, 1), 2);
-}
+/* Some functions to manipulate PA instructions. */
-static INLINE void
-dis_assemble_3 (x, r)
- unsigned int x;
- unsigned int *r;
-{
- *r = (((x & 4) >> 2) | ((x & 3) << 1)) & 7;
-}
+/* Declare the functions with the unused attribute to avoid warnings. */
+static INLINE int sign_extend PARAMS ((int, int)) ATTRIBUTE_UNUSED;
+static INLINE int low_sign_extend PARAMS ((int, int)) ATTRIBUTE_UNUSED;
+static INLINE int sign_unext PARAMS ((int, int)) ATTRIBUTE_UNUSED;
+static INLINE int low_sign_unext PARAMS ((int, int)) ATTRIBUTE_UNUSED;
+static INLINE int re_assemble_3 PARAMS ((int)) ATTRIBUTE_UNUSED;
+static INLINE int re_assemble_12 PARAMS ((int)) ATTRIBUTE_UNUSED;
+static INLINE int re_assemble_14 PARAMS ((int)) ATTRIBUTE_UNUSED;
+static INLINE int re_assemble_16 PARAMS ((int)) ATTRIBUTE_UNUSED;
+static INLINE int re_assemble_17 PARAMS ((int)) ATTRIBUTE_UNUSED;
+static INLINE int re_assemble_21 PARAMS ((int)) ATTRIBUTE_UNUSED;
+static INLINE int re_assemble_22 PARAMS ((int)) ATTRIBUTE_UNUSED;
+static INLINE bfd_signed_vma hppa_field_adjust
+ PARAMS ((bfd_vma, bfd_signed_vma,
+ enum hppa_reloc_field_selector_type_alt)) ATTRIBUTE_UNUSED;
+static INLINE int bfd_hppa_insn2fmt PARAMS ((bfd *, int)) ATTRIBUTE_UNUSED;
+static INLINE int hppa_rebuild_insn PARAMS ((int, int, int)) ATTRIBUTE_UNUSED;
+
+
+/* The *sign_extend functions are used to assemble various bitfields
+ taken from an instruction and return the resulting immediate
+ value. */
-static INLINE unsigned int
-assemble_6 (x, y)
- unsigned int x, y;
+static INLINE int
+sign_extend (x, len)
+ int x, len;
{
- return (((x & 0x1) << 5) + (32 - (y & 0x1f)));
+ int signbit = (1 << (len - 1));
+ int mask = (signbit << 1) - 1;
+ return ((x & mask) ^ signbit) - signbit;
}
-static INLINE unsigned int
-assemble_12 (x, y)
- unsigned int x, y;
+static INLINE int
+low_sign_extend (x, len)
+ int x, len;
{
- return CATENATE (CATENATE (y, 1, GET_BIT (x, 10), 1), 2,
- GET_FIELD (x, 0, 9), 9);
+ return (x >> 1) - ((x & 1) << (len - 1));
}
-static INLINE void
-dis_assemble_12 (as12, x, y)
- unsigned int as12;
- unsigned int *x, *y;
-{
- *y = (as12 & 0x800) >> 11;
- *x = ((as12 & 0x3ff) << 1) | ((as12 & 0x400) >> 10);
-}
-
-static INLINE unsigned long
-assemble_16 (x, y)
- unsigned int x, y;
-{
- /* Depends on PSW W-bit !*/
- unsigned int temp;
-
- if (HPPA_WIDE)
- temp = CATENATE (CATENATE (GET_BIT (y, 13), 1,
- (GET_BIT (y, 13) ^ GET_BIT (x, 0)), 1), 2,
- CATENATE ((GET_BIT (y, 13) ^ GET_BIT (x, 1)), 1,
- GET_FIELD (y, 0, 12), 13), 14);
- else
- temp = CATENATE (CATENATE (GET_BIT (y, 13), 1, GET_BIT (y, 13), 1), 2,
- CATENATE (GET_BIT (y, 13), 1, GET_FIELD (y, 0, 12), 13), 14);
-
- return sign_extend (temp, 16);
-}
+/* The re_assemble_* functions prepare an immediate value for
+ insertion into an opcode. pa-risc uses all sorts of weird bitfields
+ in the instruction to hold the value. */
-static INLINE unsigned long
-assemble_16a (x, y, z)
- unsigned int x, y, z;
+static INLINE int
+sign_unext (x, len)
+ int x, len;
{
- /* Depends on PSW W-bit !*/
- unsigned int temp;
+ int len_ones;
- if (HPPA_WIDE)
- temp = CATENATE (CATENATE (z, 1, (z ^ GET_BIT (x, 0)), 1), 2,
- CATENATE ((z ^ GET_BIT (x, 1)), 1, y, 11), 12);
- else
- temp = CATENATE (CATENATE (z, 1, z, 1), 2, CATENATE (z, 1, y, 11), 12);
+ len_ones = (1 << len) - 1;
- return sign_extend ((temp << 2), 16);
+ return x & len_ones;
}
-static INLINE unsigned long
-assemble_17 (x, y, z)
- unsigned int x, y, z;
+static INLINE int
+low_sign_unext (x, len)
+ int x, len;
{
- unsigned long temp;
+ int temp;
+ int sign;
- temp = CATENATE (CATENATE (z, 1, x, 5), 6,
- CATENATE (GET_BIT (y, 10), 1, GET_FIELD (y, 0, 9), 10), 11);
-
- return temp;
-}
+ sign = (x >> (len-1)) & 1;
-static INLINE void
-dis_assemble_17 (as17, x, y, z)
- unsigned int as17;
- unsigned int *x, *y, *z;
-{
+ temp = sign_unext (x, len-1);
- *z = (as17 & 0x10000) >> 16;
- *x = (as17 & 0x0f800) >> 11;
- *y = (((as17 & 0x00400) >> 10) | ((as17 & 0x3ff) << 1)) & 0x7ff;
+ return (temp << 1) | sign;
}
-static INLINE void
-dis_assemble_22 (as22, a, b, c, d)
- unsigned int as22;
- unsigned int *a, *b, *c, *d;
+static INLINE int
+re_assemble_3 (as3)
+ int as3;
{
-
- *d = (as22 & 0x200000) >> 21;
- *a = (as22 & 0x1f0000) >> 16;
- *b = (as22 & 0x0f800) >> 11;
- *c = (((as22 & 0x00400) >> 10) | ((as22 & 0x3ff) << 1)) & 0x7ff;
+ return (( (as3 & 4) << (13-2))
+ | ((as3 & 3) << (13+1)));
}
-static INLINE unsigned long
-assemble_21 (x)
- unsigned int x;
+static INLINE int
+re_assemble_12 (as12)
+ int as12;
{
- unsigned long temp;
-
- temp = ((x & 1) << 20) |
- ((x & 0xffe) << 8) |
- ((x & 0xc000) >> 7) |
- ((x & 0x1f0000) >> 14) |
- ((x & 0x003000) >> 12);
- return temp & 0x1fffff;
+ return (( (as12 & 0x800) >> 11)
+ | ((as12 & 0x400) >> (10 - 2))
+ | ((as12 & 0x3ff) << (1 + 2)));
}
-static INLINE unsigned long
-assemble_22 (a,b,c,d)
- unsigned int a,b,c,d;
+static INLINE int
+re_assemble_14 (as14)
+ int as14;
{
- unsigned long temp;
-
- temp = CATENATE (CATENATE (d, 1, a, 5), 6,
- CATENATE (b, 5, ELEVEN (c), 11), 16);
-
- return sign_extend (temp, 22);
+ return (( (as14 & 0x1fff) << 1)
+ | ((as14 & 0x2000) >> 13));
}
-static INLINE void
-dis_assemble_21 (as21, x)
- unsigned int as21, *x;
+static INLINE int
+re_assemble_16 (as16)
+ int as16;
{
- unsigned long temp;
-
+ int s, t;
- temp = (as21 & 0x100000) >> 20;
- temp |= (as21 & 0x0ffe00) >> 8;
- temp |= (as21 & 0x000180) << 7;
- temp |= (as21 & 0x00007c) << 14;
- temp |= (as21 & 0x000003) << 12;
- *x = temp;
+ /* Unusual 16-bit encoding, for wide mode only. */
+ t = (as16 << 1) & 0xffff;
+ s = (as16 & 0x8000);
+ return (t ^ s ^ (s >> 1)) | (s >> 15);
}
-static INLINE unsigned int
-ones (n)
- int n;
+static INLINE int
+re_assemble_17 (as17)
+ int as17;
{
- unsigned int len_ones;
- int i;
-
- i = 0;
- len_ones = 0;
- while (i < n)
- {
- len_ones = (len_ones << 1) | 1;
- i++;
- }
-
- return len_ones;
+ return (( (as17 & 0x10000) >> 16)
+ | ((as17 & 0x0f800) << (16 - 11))
+ | ((as17 & 0x00400) >> (10 - 2))
+ | ((as17 & 0x003ff) << (1 + 2)));
}
-static INLINE void
-sign_unext (x, len, result)
- unsigned int x, len;
- unsigned int *result;
+static INLINE int
+re_assemble_21 (as21)
+ int as21;
{
- unsigned int len_ones;
-
- len_ones = ones (len);
-
- *result = x & len_ones;
+ return (( (as21 & 0x100000) >> 20)
+ | ((as21 & 0x0ffe00) >> 8)
+ | ((as21 & 0x000180) << 7)
+ | ((as21 & 0x00007c) << 14)
+ | ((as21 & 0x000003) << 12));
}
-static INLINE unsigned long
-low_sign_extend (x, len)
- unsigned int x, len;
+static INLINE int
+re_assemble_22 (as22)
+ int as22;
{
- return (int)((x & 0x1 ? (-1 << (len - 1)) : 0) | x >> 1);
+ return (( (as22 & 0x200000) >> 21)
+ | ((as22 & 0x1f0000) << (21 - 16))
+ | ((as22 & 0x00f800) << (16 - 11))
+ | ((as22 & 0x000400) >> (10 - 2))
+ | ((as22 & 0x0003ff) << (1 + 2)));
}
-static INLINE void
-low_sign_unext (x, len, result)
- unsigned int x, len;
- unsigned int *result;
-{
- unsigned int temp;
- unsigned int sign;
- unsigned int rest;
- unsigned int one_bit_at_len;
- unsigned int len_ones;
-
- len_ones = ones (len);
- one_bit_at_len = 1 << (len - 1);
-
- sign_unext (x, len, &temp);
- sign = temp & one_bit_at_len;
- sign >>= (len - 1);
- rest = temp & (len_ones ^ one_bit_at_len);
- rest <<= 1;
+/* Handle field selectors for PA instructions.
+ The L and R (and LS, RS etc.) selectors are used in pairs to form a
+ full 32 bit address. eg.
- *result = rest | sign;
-}
+ LDIL L'start,%r1 ; put left part into r1
+ LDW R'start(%r1),%r2 ; add r1 and right part to form address
-/* Handle field selectors for PA instructions. */
+ This function returns sign extended values in all cases.
+*/
-static INLINE unsigned long
-hppa_field_adjust (value, constant_value, r_field)
- unsigned long value;
- unsigned long constant_value;
- unsigned short r_field;
+static INLINE bfd_signed_vma
+hppa_field_adjust (sym_val, addend, r_field)
+ bfd_vma sym_val;
+ bfd_signed_vma addend;
+ enum hppa_reloc_field_selector_type_alt r_field;
{
+ bfd_signed_vma value;
+
+ value = sym_val + addend;
switch (r_field)
{
- case e_fsel: /* F : no change */
- case e_nsel: /* N : no change */
- value += constant_value;
+ case e_fsel:
+ /* F: No change. */
break;
- case e_lssel: /* LS : if (bit 21) then add 0x800
- arithmetic shift right 11 bits */
- value += constant_value;
- if (value & 0x00000400)
- value += 0x800;
- value = (value & 0xfffff800) >> 11;
+ case e_nsel:
+ /* N: null selector. I don't really understand what this is all
+ about, but HP's documentation says "this indicates that zero
+ bits are to be used for the displacement on the instruction.
+ This fixup is used to identify three-instruction sequences to
+ access data (for importing shared library data)." */
+ value = 0;
break;
- case e_rssel: /* RS : Sign extend from bit 21 */
- value += constant_value;
- if (value & 0x00000400)
- value |= 0xfffff800;
- else
- value &= 0x7ff;
+ case e_lsel:
+ case e_nlsel:
+ /* L: Select top 21 bits. */
+ value = value >> 11;
break;
- case e_lsel: /* L : Arithmetic shift right 11 bits */
- case e_nlsel: /* NL : Arithmetic shift right 11 bits */
- value += constant_value;
- value = (value & 0xfffff800) >> 11;
+ case e_rsel:
+ /* R: Select bottom 11 bits. */
+ value = value & 0x7ff;
break;
- case e_rsel: /* R : Set bits 0-20 to zero */
- value += constant_value;
- value = value & 0x7ff;
+ case e_lssel:
+ /* LS: Round to nearest multiple of 2048 then select top 21 bits. */
+ value = value + 0x400;
+ value = value >> 11;
+ break;
+
+ case e_rssel:
+ /* RS: Select bottom 11 bits for LS.
+ We need to return a value such that 2048 * LS'x + RS'x == x.
+ ie. RS'x = x - ((x + 0x400) & -0x800)
+ this is just a sign extension from bit 21. */
+ value = ((value & 0x7ff) ^ 0x400) - 0x400;
break;
- case e_ldsel: /* LD : Add 0x800, arithmetic shift
- right 11 bits */
- value += constant_value;
- value += 0x800;
- value = (value & 0xfffff800) >> 11;
+ case e_ldsel:
+ /* LD: Round to next multiple of 2048 then select top 21 bits.
+ Yes, if we are already on a multiple of 2048, we go up to the
+ next one. RD in this case will be -2048. */
+ value = value + 0x800;
+ value = value >> 11;
break;
- case e_rdsel: /* RD : Set bits 0-20 to one */
- value += constant_value;
- value |= 0xfffff800;
+ case e_rdsel:
+ /* RD: Set bits 0-20 to one. */
+ value = value | -0x800;
break;
- case e_lrsel: /* LR : L with "rounded" constant */
- case e_nlrsel: /* NLR : NL with "rounded" constant */
- value = value + ((constant_value + 0x1000) & 0xffffe000);
- value = (value & 0xfffff800) >> 11;
+ case e_lrsel:
+ case e_nlrsel:
+ /* LR: L with rounding of the addend to nearest 8k. */
+ value = sym_val + ((addend + 0x1000) & -0x2000);
+ value = value >> 11;
break;
- case e_rrsel: /* RR : R with "rounded" constant */
- value = value + ((constant_value + 0x1000) & 0xffffe000);
- value = (value & 0x7ff) + constant_value - ((constant_value + 0x1000) & 0xffffe000);
+ case e_rrsel:
+ /* RR: R with rounding of the addend to nearest 8k.
+ We need to return a value such that 2048 * LR'x + RR'x == x
+ ie. RR'x = s+a - (s + (((a + 0x1000) & -0x2000) & -0x800))
+ . = s+a - ((s & -0x800) + ((a + 0x1000) & -0x2000))
+ . = (s & 0x7ff) + a - ((a + 0x1000) & -0x2000) */
+ value = (sym_val & 0x7ff) + (((addend & 0x1fff) ^ 0x1000) - 0x1000);
break;
default:
abort ();
}
return value;
-
}
/* PA-RISC OPCODES */
-#define get_opcode(insn) ((insn) & 0xfc000000) >> 26
-
-/* FIXME: this list is incomplete. It should also be an enumerated
- type rather than #defines. */
-
-#define LDO 0x0d
-#define LDB 0x10
-#define LDH 0x11
-#define LDW 0x12
-#define LDWM 0x13
-#define STB 0x18
-#define STH 0x19
-#define STW 0x1a
-#define STWM 0x1b
-#define COMICLR 0x24
-#define SUBI 0x25
-#define SUBIO 0x25
-#define ADDIT 0x2c
-#define ADDITO 0x2c
-#define ADDI 0x2d
-#define ADDIO 0x2d
-#define LDIL 0x08
-#define ADDIL 0x0a
-
-#define MOVB 0x32
-#define MOVIB 0x33
-#define COMBT 0x20
-#define COMBF 0x22
-#define COMIBT 0x21
-#define COMIBF 0x23
-#define ADDBT 0x28
-#define ADDBF 0x2a
-#define ADDIBT 0x29
-#define ADDIBF 0x2b
-#define BVB 0x30
-#define BB 0x31
-
-#define BL 0x3a
-#define BLE 0x39
-#define BE 0x38
-
-#define CMPBDT 0x27
-#define CMPBDF 0x2f
-#define CMPIBD 0x3b
-#define LDD 0x14
-#define STD 0x1c
-#define LDWL 0x17
-#define STWL 0x1f
-#define FDLW 0x16
-#define FSTW 0x1e
-
-/* Given a machine instruction, return its format.
-
- FIXME: opcodes which do not map to a known format
- should return an error of some sort. */
+#define get_opcode(insn) (((insn) >> 26) & 0x3f)
+
+enum hppa_opcode_type
+{
+ /* None of the opcodes in the first group generate relocs, so we
+ aren't too concerned about them. */
+ OP_SYSOP = 0x00,
+ OP_MEMMNG = 0x01,
+ OP_ALU = 0x02,
+ OP_NDXMEM = 0x03,
+ OP_SPOP = 0x04,
+ OP_DIAG = 0x05,
+ OP_FMPYADD = 0x06,
+ OP_UNDEF07 = 0x07,
+ OP_COPRW = 0x09,
+ OP_COPRDW = 0x0b,
+ OP_COPR = 0x0c,
+ OP_FLOAT = 0x0e,
+ OP_PRDSPEC = 0x0f,
+ OP_UNDEF15 = 0x15,
+ OP_UNDEF1d = 0x1d,
+ OP_FMPYSUB = 0x26,
+ OP_FPFUSED = 0x2e,
+ OP_SHEXDP0 = 0x34,
+ OP_SHEXDP1 = 0x35,
+ OP_SHEXDP2 = 0x36,
+ OP_UNDEF37 = 0x37,
+ OP_SHEXDP3 = 0x3c,
+ OP_SHEXDP4 = 0x3d,
+ OP_MULTMED = 0x3e,
+ OP_UNDEF3f = 0x3f,
+
+ OP_LDIL = 0x08,
+ OP_ADDIL = 0x0a,
+
+ OP_LDO = 0x0d,
+ OP_LDB = 0x10,
+ OP_LDH = 0x11,
+ OP_LDW = 0x12,
+ OP_LDWM = 0x13,
+ OP_STB = 0x18,
+ OP_STH = 0x19,
+ OP_STW = 0x1a,
+ OP_STWM = 0x1b,
+
+ OP_LDD = 0x14,
+ OP_STD = 0x1c,
+
+ OP_FLDW = 0x16,
+ OP_LDWL = 0x17,
+ OP_FSTW = 0x1e,
+ OP_STWL = 0x1f,
+
+ OP_COMBT = 0x20,
+ OP_COMIBT = 0x21,
+ OP_COMBF = 0x22,
+ OP_COMIBF = 0x23,
+ OP_CMPBDT = 0x27,
+ OP_ADDBT = 0x28,
+ OP_ADDIBT = 0x29,
+ OP_ADDBF = 0x2a,
+ OP_ADDIBF = 0x2b,
+ OP_CMPBDF = 0x2f,
+ OP_BVB = 0x30,
+ OP_BB = 0x31,
+ OP_MOVB = 0x32,
+ OP_MOVIB = 0x33,
+ OP_CMPIBD = 0x3b,
+
+ OP_COMICLR = 0x24,
+ OP_SUBI = 0x25,
+ OP_ADDIT = 0x2c,
+ OP_ADDI = 0x2d,
+
+ OP_BE = 0x38,
+ OP_BLE = 0x39,
+ OP_BL = 0x3a
+};
+
+
+/* Given a machine instruction, return its format. */
static INLINE int
-bfd_hppa_insn2fmt (insn)
- unsigned long insn;
+bfd_hppa_insn2fmt (abfd, insn)
+ bfd *abfd;
+ int insn;
{
- int fmt = -1;
- unsigned char op = get_opcode (insn);
-
+ enum hppa_opcode_type op = get_opcode (insn);
+
switch (op)
{
- case ADDI:
- case ADDIT:
- case SUBI:
- fmt = 11;
- break;
- case MOVB:
- case MOVIB:
- case COMBT:
- case COMBF:
- case COMIBT:
- case COMIBF:
- case ADDBT:
- case ADDBF:
- case ADDIBT:
- case ADDIBF:
- case BVB:
- case BB:
- case CMPBDT:
- case CMPBDF:
- case CMPIBD:
- fmt = 12;
- break;
- case LDO:
- case LDB:
- case LDH:
- case LDW:
- case LDWM:
- case STB:
- case STH:
- case STW:
- case STWM:
- fmt = 14;
- break;
- case LDWL:
- case STWL:
- case FDLW:
- case FSTW:
+ case OP_COMICLR:
+ case OP_SUBI:
+ case OP_ADDIT:
+ case OP_ADDI:
+ return 11;
+
+ case OP_COMBT:
+ case OP_COMIBT:
+ case OP_COMBF:
+ case OP_COMIBF:
+ case OP_CMPBDT:
+ case OP_ADDBT:
+ case OP_ADDIBT:
+ case OP_ADDBF:
+ case OP_ADDIBF:
+ case OP_CMPBDF:
+ case OP_BVB:
+ case OP_BB:
+ case OP_MOVB:
+ case OP_MOVIB:
+ case OP_CMPIBD:
+ return 12;
+
+ case OP_LDO:
+ case OP_LDB:
+ case OP_LDH:
+ case OP_LDW:
+ case OP_LDWM:
+ case OP_STB:
+ case OP_STH:
+ case OP_STW:
+ case OP_STWM:
+ if (abfd->arch_info->mach >= 25)
+ return 16; /* Wide mode, format 16. */
+ return 14;
+
+ case OP_FLDW:
+ case OP_LDWL:
+ case OP_FSTW:
+ case OP_STWL:
/* This is a hack. Unfortunately, format 11 is already taken
and we're using integers rather than an enum, so it's hard
- to describe the 10a format. */
- fmt = -11;
- break;
- case LDD:
- case STD:
- fmt = 10;
- break;
- case BL:
- case BE:
- case BLE:
- if ((insn & 0x00008000) == 0x00008000)
+ to describe the 11a format. */
+ if (abfd->arch_info->mach >= 25)
+ return -16; /* Wide mode, format 16a. */
+ return -11;
+
+ case OP_LDD:
+ case OP_STD:
+ if (abfd->arch_info->mach >= 25)
+ return -10; /* Wide mode, format 10a. */
+ return 10;
+
+ case OP_BL:
+ if ((insn & 0x8000) != 0)
return 22;
- fmt = 17;
- break;
- case LDIL:
- case ADDIL:
- fmt = 21;
- break;
+ /* fall thru */
+ case OP_BE:
+ case OP_BLE:
+ return 17;
+
+ case OP_LDIL:
+ case OP_ADDIL:
+ return 21;
+
default:
- fmt = 32;
break;
}
- return fmt;
+ return 32;
}
/* Insert VALUE into INSN using R_FORMAT to determine exactly what
bits to change. */
-
-static INLINE unsigned long
-hppa_rebuild_insn (abfd, insn, value, r_format)
- bfd *abfd ATTRIBUTE_UNUSED;
- unsigned long insn;
- unsigned long value;
- unsigned long r_format;
-{
- unsigned long const_part;
- unsigned long rebuilt_part;
+static INLINE int
+hppa_rebuild_insn (insn, value, r_format)
+ int insn;
+ int value;
+ int r_format;
+{
switch (r_format)
{
case 11:
- {
- unsigned w1, w;
-
- const_part = insn & 0xffffe002;
- dis_assemble_12 (value, &w1, &w);
- rebuilt_part = (w1 << 2) | w;
- return const_part | rebuilt_part;
- }
+ return (insn & ~ 0x7ff) | low_sign_unext (value, 11);
case 12:
- {
- unsigned w1, w;
+ return (insn & ~ 0x1ffd) | re_assemble_12 (value);
+
+
+ case 10:
+ return (insn & ~ 0x3ff1) | re_assemble_14 (value & -8);
- const_part = insn & 0xffffe002;
- dis_assemble_12 (value, &w1, &w);
- rebuilt_part = (w1 << 2) | w;
- return const_part | rebuilt_part;
- }
+ case -11:
+ return (insn & ~ 0x3ff9) | re_assemble_14 (value & -4);
case 14:
- {
- unsigned int ext;
-
- const_part = insn & 0xffffc000;
- low_sign_unext (value, 14, &ext);
- return const_part | ext;
- }
+ return (insn & ~ 0x3fff) | re_assemble_14 (value);
- case 17:
- {
- unsigned w1, w2, w;
- const_part = insn & 0xffe0e002;
- dis_assemble_17 (value, &w1, &w2, &w);
- rebuilt_part = (w2 << 2) | (w1 << 16) | w;
- return const_part | rebuilt_part;
- }
+ case -10:
+ return (insn & ~ 0xfff1) | re_assemble_16 (value & -8);
+
+ case -16:
+ return (insn & ~ 0xfff9) | re_assemble_16 (value & -4);
+
+ case 16:
+ return (insn & ~ 0xffff) | re_assemble_16 (value);
+
+
+ case 17:
+ return (insn & ~ 0x1f1ffd) | re_assemble_17 (value);
case 21:
- {
- unsigned int w;
+ return (insn & ~ 0x1fffff) | re_assemble_21 (value);
- const_part = insn & 0xffe00000;
- dis_assemble_21 (value, &w);
- return const_part | w;
- }
+ case 22:
+ return (insn & ~ 0x3ff1ffd) | re_assemble_22 (value);
case 32:
- const_part = 0;
return value;
default:
@@ -726,4 +616,4 @@ hppa_rebuild_insn (abfd, insn, value, r_format)
return insn;
}
-#endif /* _HPPA_H */
+#endif /* _LIBHPPA_H */
diff --git a/gnu/usr.bin/binutils/bfd/libieee.h b/gnu/usr.bin/binutils/bfd/libieee.h
index 30e806eaa70..aba9cb9bb2a 100644
--- a/gnu/usr.bin/binutils/bfd/libieee.h
+++ b/gnu/usr.bin/binutils/bfd/libieee.h
@@ -1,5 +1,5 @@
/* IEEE-695 object file formats: definitions internal to BFD.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Steve Chamberlain's fault.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/liboasys.h b/gnu/usr.bin/binutils/bfd/liboasys.h
index 7f7ea59b5a7..37c94c9d0d2 100644
--- a/gnu/usr.bin/binutils/bfd/liboasys.h
+++ b/gnu/usr.bin/binutils/bfd/liboasys.h
@@ -1,5 +1,6 @@
/* BFD internal declarations for Oasys file format handling.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1997
+ Free Software Foundation, Inc.
Scrawled by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/linker.c b/gnu/usr.bin/binutils/bfd/linker.c
index 6e9ee65581b..82805f9c463 100644
--- a/gnu/usr.bin/binutils/bfd/linker.c
+++ b/gnu/usr.bin/binutils/bfd/linker.c
@@ -1,5 +1,5 @@
/* linker.c -- BFD linker routines
- Copyright (C) 1993, 94, 95, 96, 97, 98, 1999
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
@@ -60,7 +60,7 @@ SECTION
a.out (in <<aoutx.h>>) and ECOFF (in <<ecoff.c>>). The a.out
routines are used as examples throughout this section.
-@menu
+@menu
@* Creating a Linker Hash Table::
@* Adding Symbols to the Hash Table::
@* Performing the Final Link::
@@ -601,7 +601,7 @@ bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow)
struct bfd_link_hash_entry * with no explicit cast required on the
call. */
-void
+void
bfd_link_hash_traverse (table, func, info)
struct bfd_link_hash_table *table;
boolean (*func) PARAMS ((struct bfd_link_hash_entry *, PTR));
@@ -1361,7 +1361,7 @@ enum link_row
enum link_action
{
- FAIL, /* Abort. */
+ FAIL, /* Abort. */
UND, /* Mark symbol undefined. */
WEAK, /* Mark symbol weak undefined. */
DEF, /* Mark symbol defined. */
@@ -1464,7 +1464,7 @@ hash_entry_bfd (h)
or destructor names as collect2 does.
HASHP, if not NULL, is a place to store the created hash table
entry; if *HASHP is not NULL, the caller has already looked up
- the hash table entry, and stored it in *HASHP. */
+ the hash table entry, and stored it in *HASHP. */
boolean
_bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
@@ -1801,6 +1801,15 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
copy, false);
if (inh == (struct bfd_link_hash_entry *) NULL)
return false;
+ if (inh->type == bfd_link_hash_indirect
+ && inh->u.i.link == h)
+ {
+ (*_bfd_error_handler)
+ (_("%s: indirect symbol `%s' to `%s' is a loop"),
+ bfd_get_filename (abfd), name, string);
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
if (inh->type == bfd_link_hash_new)
{
inh->type = bfd_link_hash_undefined;
@@ -2054,7 +2063,7 @@ _bfd_generic_final_link (abfd, info)
}
}
}
-
+
return true;
}
@@ -2452,7 +2461,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
r = (arelent *) bfd_alloc (abfd, sizeof (arelent));
if (r == (arelent *) NULL)
return false;
-
+
r->address = link_order->offset;
r->howto = bfd_reloc_type_lookup (abfd, link_order->u.reloc.p->reloc);
if (r->howto == 0)
@@ -2524,7 +2533,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
break;
}
ok = bfd_set_section_contents (abfd, sec, (PTR) buf,
- (file_ptr)
+ (file_ptr)
(link_order->offset *
bfd_octets_per_byte (abfd)), size);
free (buf);
@@ -2594,7 +2603,7 @@ _bfd_default_link_order (abfd, info, sec, link_order)
case bfd_data_link_order:
return bfd_set_section_contents (abfd, sec,
(PTR) link_order->u.data.contents,
- (file_ptr)
+ (file_ptr)
(link_order->offset *
bfd_octets_per_byte (abfd)),
link_order->size);
@@ -2603,7 +2612,6 @@ _bfd_default_link_order (abfd, info, sec, link_order)
/* Default routine to handle a bfd_fill_link_order. */
-/*ARGSUSED*/
static boolean
default_fill_link_order (abfd, info, sec, link_order)
bfd *abfd;
@@ -2630,8 +2638,8 @@ default_fill_link_order (abfd, info, sec, link_order)
for (i = 1; i < size; i += 2)
space[i] = fill;
result = bfd_set_section_contents (abfd, sec, space,
- (file_ptr)
- (link_order->offset *
+ (file_ptr)
+ (link_order->offset *
bfd_octets_per_byte (abfd)),
link_order->size);
free (space);
@@ -2732,7 +2740,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
if (h != NULL)
set_symbol_from_hash (sym, h);
}
- }
+ }
}
/* Get and relocate the section contents. */
@@ -2750,8 +2758,8 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
if (! bfd_set_section_contents (output_bfd, output_section,
(PTR) new_contents,
(file_ptr)
- (link_order->offset *
- bfd_octets_per_byte (output_bfd)),
+ (link_order->offset *
+ bfd_octets_per_byte (output_bfd)),
link_order->size))
goto error_return;
@@ -2803,8 +2811,6 @@ DESCRIPTION
*/
-
-
boolean
_bfd_generic_link_split_section (abfd, sec)
bfd *abfd ATTRIBUTE_UNUSED;
diff --git a/gnu/usr.bin/binutils/bfd/lynx-core.c b/gnu/usr.bin/binutils/bfd/lynx-core.c
index 2358177dbc6..ee070cbc2ee 100644
--- a/gnu/usr.bin/binutils/bfd/lynx-core.c
+++ b/gnu/usr.bin/binutils/bfd/lynx-core.c
@@ -1,5 +1,5 @@
/* BFD back end for Lynx core files
- Copyright 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 2001 Free Software Foundation, Inc.
Written by Stu Grossman of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/conf.h>
#include <sys/kernel.h>
-/* sys/kernel.h should define this, but doesn't always, sigh. */
+/* sys/kernel.h should define this, but doesn't always, sigh. */
#ifndef __LYNXOS
#define __LYNXOS
#endif
@@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* These are stored in the bfd's tdata */
-struct lynx_core_struct
+struct lynx_core_struct
{
int sig;
char cmd[PNMLEN + 1];
@@ -83,7 +83,6 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
return asect;
}
-/* ARGSUSED */
const bfd_target *
lynx_core_file_p (abfd)
bfd *abfd;
@@ -146,7 +145,7 @@ lynx_core_file_p (abfd)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
-
+
core_signal (abfd) = threadp->currsig;
newsect = make_bfd_asection (abfd, ".stack",
@@ -214,7 +213,6 @@ lynx_core_file_failing_command (abfd)
return core_command (abfd);
}
-/* ARGSUSED */
int
lynx_core_file_failing_signal (abfd)
bfd *abfd;
@@ -222,7 +220,6 @@ lynx_core_file_failing_signal (abfd)
return core_signal (abfd);
}
-/* ARGSUSED */
boolean
lynx_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd, *exec_bfd;
diff --git a/gnu/usr.bin/binutils/bfd/m68k4knetbsd.c b/gnu/usr.bin/binutils/bfd/m68k4knetbsd.c
index 943438d2dda..106a1434fc2 100644
--- a/gnu/usr.bin/binutils/bfd/m68k4knetbsd.c
+++ b/gnu/usr.bin/binutils/bfd/m68k4knetbsd.c
@@ -1,5 +1,5 @@
/* BFD back-end for NetBSD/m68k a.out-ish binaries.
- Copyright (C) 1990, 91, 92, 95, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1995, 1998 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/m68klinux.c b/gnu/usr.bin/binutils/bfd/m68klinux.c
index 22517575bf7..86c5aaf3e9d 100644
--- a/gnu/usr.bin/binutils/bfd/m68klinux.c
+++ b/gnu/usr.bin/binutils/bfd/m68klinux.c
@@ -1,5 +1,5 @@
/* BFD back-end for linux flavored m68k a.out binaries.
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -479,8 +479,8 @@ linux_tally_symbols (h, data)
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
false, false, true);
- /* h2 does not follow indirect symbols. */
- h2 = linux_link_hash_lookup (linux_hash_table (info),
+ /* h2 does not follow indirect symbols. */
+ h2 = linux_link_hash_lookup (linux_hash_table (info),
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
false, false, false);
@@ -536,7 +536,7 @@ linux_tally_symbols (h, data)
}
/* Quick and dirty way of stripping these symbols from the
- symtab. */
+ symtab. */
if (bfd_is_abs_section (h->root.root.u.def.section))
h->root.written = true;
}
@@ -561,7 +561,7 @@ bfd_m68klinux_size_dynamic_sections (output_bfd, info)
if (output_bfd->xvec != &MY(vec))
return true;
- /* First find the fixups... */
+ /* First find the fixups... */
linux_link_hash_traverse (linux_hash_table (info),
linux_tally_symbols,
(PTR) info);
@@ -631,7 +631,7 @@ linux_finish_dynamic_link (output_bfd, info)
fixups_written = 0;
#ifdef LINUX_LINK_DEBUG
- printf ("Fixup table file offset: %x VMA: %x\n",
+ printf ("Fixup table file offset: %x VMA: %x\n",
os->filepos + s->output_offset,
os->vma + s->output_offset);
#endif
@@ -733,7 +733,7 @@ linux_finish_dynamic_link (output_bfd, info)
}
}
- h = linux_link_hash_lookup (linux_hash_table (info),
+ h = linux_link_hash_lookup (linux_hash_table (info),
"__BUILTIN_FIXUPS__",
false, false, false);
diff --git a/gnu/usr.bin/binutils/bfd/m68knetbsd.c b/gnu/usr.bin/binutils/bfd/m68knetbsd.c
index 24d16656539..8740c93ec97 100644
--- a/gnu/usr.bin/binutils/bfd/m68knetbsd.c
+++ b/gnu/usr.bin/binutils/bfd/m68knetbsd.c
@@ -1,5 +1,6 @@
/* BFD back-end for NetBSD/m68k a.out-ish binaries.
- Copyright (C) 1990, 91, 92, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -21,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_IS_BIG_ENDIAN_P
/* Our m68k ports use either 4K or 8K pages, but object files always
- assume 8K page alignment so they will work on all m68k machines. */
+ assume 8K page alignment so they will work on all m68k machines. */
#define TARGET_PAGE_SIZE 0x2000
#define DEFAULT_ARCH bfd_arch_m68k
diff --git a/gnu/usr.bin/binutils/bfd/mipsbsd.c b/gnu/usr.bin/binutils/bfd/mipsbsd.c
index 7a680fb3894..d98e3a83a57 100644
--- a/gnu/usr.bin/binutils/bfd/mipsbsd.c
+++ b/gnu/usr.bin/binutils/bfd/mipsbsd.c
@@ -1,5 +1,6 @@
/* BFD backend for MIPS BSD (a.out) binaries.
- Copyright (C) 1993, 94, 95, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by Ralph Campbell.
This file is part of BFD, the Binary File Descriptor library.
@@ -43,8 +44,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libaout.h"
#define SET_ARCH_MACH(ABFD, EXEC) \
- MY(set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
- MY(choose_reloc_size)(ABFD);
+ MY(set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
+ MY(choose_reloc_size) (ABFD);
static void MY(set_arch_mach) PARAMS ((bfd *abfd, int machtype));
static void MY(choose_reloc_size) PARAMS ((bfd *abfd));
@@ -74,7 +75,7 @@ MY(set_arch_mach) (abfd, machtype)
enum bfd_architecture arch;
long machine;
- /* Determine the architecture and machine type of the object file. */
+ /* Determine the architecture and machine type of the object file. */
switch (machtype) {
case M_MIPS1:
@@ -92,7 +93,7 @@ MY(set_arch_mach) (abfd, machtype)
machine = 0;
break;
}
- bfd_set_arch_mach(abfd, arch, machine);
+ bfd_set_arch_mach(abfd, arch, machine);
}
/* Determine the size of a relocation entry, based on the architecture */
@@ -160,7 +161,7 @@ MY(write_object_contents) (abfd)
N_SET_MACHTYPE(*execp, M_UNKNOWN);
}
- MY(choose_reloc_size)(abfd);
+ MY(choose_reloc_size) (abfd);
WRITE_HEADERS(abfd, execp);
@@ -195,8 +196,8 @@ mips_fix_jmp_addr (abfd,reloc_entry,symbol,data,input_section,output_bfd)
bfd *output_bfd;
{
bfd_vma relocation, pc;
-
- /* If this is a partial relocation, just continue. */
+
+ /* If this is a partial relocation, just continue. */
if (output_bfd != (bfd *)NULL)
return bfd_reloc_continue;
@@ -205,7 +206,7 @@ mips_fix_jmp_addr (abfd,reloc_entry,symbol,data,input_section,output_bfd)
&& (symbol->flags & BSF_WEAK) == 0)
return bfd_reloc_undefined;
- /*
+ /*
* Work out which section the relocation is targetted at and the
* initial relocation command value.
*/
@@ -249,8 +250,8 @@ mips_fix_hi16_s (abfd, reloc_entry, symbol, data, input_section,
char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
-
- /* If this is a partial relocation, just continue. */
+
+ /* If this is a partial relocation, just continue. */
if (output_bfd != (bfd *)NULL)
return bfd_reloc_continue;
@@ -259,7 +260,7 @@ mips_fix_hi16_s (abfd, reloc_entry, symbol, data, input_section,
&& (symbol->flags & BSF_WEAK) == 0)
return bfd_reloc_undefined;
- /*
+ /*
* Work out which section the relocation is targetted at and the
* initial relocation command value.
*/
@@ -329,7 +330,7 @@ MY(reloc_howto_type_lookup) (abfd, code)
* own mapping of external reloc type values to howto entries.
*/
long
-MY(canonicalize_reloc)(abfd, section, relptr, symbols)
+MY(canonicalize_reloc) (abfd, section, relptr, symbols)
bfd *abfd;
sec_ptr section;
arelent **relptr;
@@ -339,7 +340,7 @@ MY(canonicalize_reloc)(abfd, section, relptr, symbols)
unsigned int count, c;
extern reloc_howto_type NAME(aout,ext_howto_table)[];
- /* If we have already read in the relocation table, return the values. */
+ /* If we have already read in the relocation table, return the values. */
if (section->flags & SEC_CONSTRUCTOR) {
arelent_chain *chain = section->constructor_chain;
@@ -351,18 +352,18 @@ MY(canonicalize_reloc)(abfd, section, relptr, symbols)
return section->reloc_count;
}
if (tblptr && section->reloc_count) {
- for (count = 0; count++ < section->reloc_count;)
+ for (count = 0; count++ < section->reloc_count;)
*relptr++ = tblptr++;
*relptr = 0;
return section->reloc_count;
}
- if (!NAME(aout,slurp_reloc_table)(abfd, section, symbols))
+ if (!NAME(aout,slurp_reloc_table) (abfd, section, symbols))
return -1;
tblptr = section->relocation;
/* fix up howto entries */
- for (count = 0; count++ < section->reloc_count;)
+ for (count = 0; count++ < section->reloc_count;)
{
c = tblptr->howto - NAME(aout,ext_howto_table);
tblptr->howto = &mips_howto_table_ext[c];
@@ -428,7 +429,7 @@ const bfd_target aout_mips_little_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& aout_mips_big_vec,
-
+
(PTR) MY_backend_data
};
@@ -469,6 +470,6 @@ const bfd_target aout_mips_big_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& aout_mips_little_vec,
-
+
(PTR) MY_backend_data
};
diff --git a/gnu/usr.bin/binutils/bfd/netbsd-core.c b/gnu/usr.bin/binutils/bfd/netbsd-core.c
index 828c2a1ceb1..c93d6a4dc22 100644
--- a/gnu/usr.bin/binutils/bfd/netbsd-core.c
+++ b/gnu/usr.bin/binutils/bfd/netbsd-core.c
@@ -1,5 +1,6 @@
/* BFD back end for NetBSD style core files
- Copyright 1988, 89, 91, 92, 93, 96, 1998 Free Software Foundation, Inc.
+ Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by Paul Kranenburg, EUR
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -29,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/core.h>
/*
- * FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof(struct trapframe))
+ * FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof (struct trapframe))
*/
struct netbsd_core_struct {
@@ -98,7 +99,7 @@ netbsd_core_file_p (abfd)
offset += core.c_seghdrsize;
- asect = (asection *) bfd_zalloc (abfd, sizeof(asection));
+ asect = (asection *) bfd_zalloc (abfd, sizeof (asection));
if (asect == NULL) {
bfd_set_error(bfd_error_no_memory);
goto punt;
@@ -118,7 +119,7 @@ netbsd_core_file_p (abfd)
asect->name = ".reg";
asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
#ifdef CORE_FPU_OFFSET
- /* Hackish... */
+ /* Hackish... */
asect->_raw_size = CORE_FPU_OFFSET;
asect2 = (asection *)bfd_zalloc (abfd,
sizeof (asection));
@@ -193,9 +194,9 @@ netbsd_core_file_matches_executable_p (core_bfd, exec_bfd)
/* If somebody calls any byte-swapping routines, shoot them. */
static void
-swap_abort()
+swap_abort ()
{
- abort(); /* This way doesn't require any declaration for ANSI to fuck up */
+ abort (); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
@@ -236,7 +237,7 @@ const bfd_target netbsd_core_vec =
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (netbsd),
@@ -248,6 +249,6 @@ const bfd_target netbsd_core_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0 /* backend_data */
};
diff --git a/gnu/usr.bin/binutils/bfd/netbsd.h b/gnu/usr.bin/binutils/bfd/netbsd.h
index 760ed9508e8..05580328b05 100644
--- a/gnu/usr.bin/binutils/bfd/netbsd.h
+++ b/gnu/usr.bin/binutils/bfd/netbsd.h
@@ -1,5 +1,5 @@
/* BFD back-end definitions used by all NetBSD targets.
- Copyright (C) 1990, 91, 92, 94, 95, 96, 97, 98, 2000
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,33 +19,33 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
-/* Check for our machine type (part of magic number). */
+/* Check for our machine type (part of magic number). */
#ifndef MACHTYPE_OK
#define MACHTYPE_OK(m) ((m) == DEFAULT_MID || (m) == M_UNKNOWN)
#endif
-/* This is the normal load address for executables. */
+/* This is the normal load address for executables. */
#define TEXT_START_ADDR TARGET_PAGE_SIZE
/* NetBSD ZMAGIC has its header in the text segment. */
#define N_HEADER_IN_TEXT(x) 1
-/* Determine if this is a shared library using the flags. */
+/* Determine if this is a shared library using the flags. */
#define N_SHARED_LIB(x) (N_DYNAMIC(x))
/* We have 6 bits of flags and 10 bits of machine ID. */
#define N_MACHTYPE(exec) \
- ((enum machine_type)(((exec).a_info >> 16) & 0x03ff))
+ ((enum machine_type) (((exec).a_info >> 16) & 0x03ff))
#define N_FLAGS(exec) \
(((exec).a_info >> 26) & 0x3f)
#define N_SET_INFO(exec, magic, type, flags) \
((exec).a_info = ((magic) & 0xffff) \
- | (((int)(type) & 0x3ff) << 16) \
+ | (((int) (type) & 0x3ff) << 16) \
| (((flags) & 0x3f) << 24))
#define N_SET_MACHTYPE(exec, machtype) \
((exec).a_info = \
- ((exec).a_info & 0xfb00ffff) | ((((int)(machtype))&0x3ff) << 16))
+ ((exec).a_info & 0xfb00ffff) | ((((int) (machtype))&0x3ff) << 16))
#define N_SET_FLAGS(exec, flags) \
((exec).a_info = \
((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
diff --git a/gnu/usr.bin/binutils/bfd/nlm-target.h b/gnu/usr.bin/binutils/bfd/nlm-target.h
index 5c1e255b4c8..f9c890d10c1 100644
--- a/gnu/usr.bin/binutils/bfd/nlm-target.h
+++ b/gnu/usr.bin/binutils/bfd/nlm-target.h
@@ -1,5 +1,5 @@
/* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
- Copyright (C) 1993, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -78,10 +78,10 @@ const bfd_target TARGET_BIG_SYM =
/* object_flags: mask of all file flags */
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
| WP_TEXT),
-
+
/* section_flags: mask of all section flags */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
- SEC_CODE | SEC_DATA),
+ SEC_CODE | SEC_DATA),
/* leading_symbol_char: is the first char of a user symbol
predictable, and if so what is it */
@@ -147,7 +147,7 @@ const bfd_target TARGET_BIG_SYM =
#else
NULL,
#endif
-
+
/* backend_data: */
(PTR) TARGET_BACKEND_DATA
};
@@ -171,10 +171,10 @@ const bfd_target TARGET_LITTLE_SYM =
/* object_flags: mask of all file flags */
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
| WP_TEXT),
-
+
/* section_flags: mask of all section flags */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
- SEC_DATA),
+ SEC_DATA),
/* leading_symbol_char: is the first char of a user symbol
predictable, and if so what is it */
@@ -240,7 +240,7 @@ const bfd_target TARGET_LITTLE_SYM =
#else
NULL,
#endif
-
+
/* backend_data: */
(PTR) TARGET_BACKEND_DATA
};
diff --git a/gnu/usr.bin/binutils/bfd/nlm.c b/gnu/usr.bin/binutils/bfd/nlm.c
index 89c6baa64ef..965ca26b60b 100644
--- a/gnu/usr.bin/binutils/bfd/nlm.c
+++ b/gnu/usr.bin/binutils/bfd/nlm.c
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) executable support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1994 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/nlm32-alpha.c b/gnu/usr.bin/binutils/bfd/nlm32-alpha.c
index 24c8e516762..8bd872d4ed4 100644
--- a/gnu/usr.bin/binutils/bfd/nlm32-alpha.c
+++ b/gnu/usr.bin/binutils/bfd/nlm32-alpha.c
@@ -1,5 +1,5 @@
/* Support for 32-bit Alpha NLM (NetWare Loadable Module)
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -603,11 +603,11 @@ nlm_alpha_read_reloc (abfd, sym, secp, rel)
static boolean
nlm_alpha_mangle_relocs (abfd, sec, data, offset, count)
- bfd *abfd;
- asection *sec;
- PTR data;
- bfd_vma offset;
- bfd_size_type count;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
+ bfd_vma offset ATTRIBUTE_UNUSED;
+ bfd_size_type count ATTRIBUTE_UNUSED;
{
return true;
}
@@ -651,7 +651,7 @@ nlm_alpha_read_import (abfd, sym)
while (sym -> rcnt < rcount)
{
asection *section;
-
+
if (nlm_alpha_read_reloc (abfd, sym, &section,
&nlm_relocs -> reloc)
== false)
@@ -807,7 +807,7 @@ nlm_alpha_set_public_section (abfd, sym)
static bfd_vma
nlm_alpha_get_public_offset (abfd, sym)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asymbol *sym;
{
return bfd_asymbol_value (sym);
@@ -828,7 +828,7 @@ nlm_alpha_write_external (abfd, count, sym, relocs)
arelent r;
len = strlen (sym->name);
- if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof(bfd_byte))
+ if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
|| bfd_write (sym->name, len, 1, abfd) != len)
return false;
diff --git a/gnu/usr.bin/binutils/bfd/nlm32-i386.c b/gnu/usr.bin/binutils/bfd/nlm32-i386.c
index f16c74d985e..9318304728d 100644
--- a/gnu/usr.bin/binutils/bfd/nlm32-i386.c
+++ b/gnu/usr.bin/binutils/bfd/nlm32-i386.c
@@ -1,5 +1,5 @@
/* Support for 32-bit i386 NLM (NetWare Loadable Module)
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -226,7 +226,7 @@ nlm_i386_write_import (abfd, sec, rel)
}
}
}
-
+
bfd_put_32 (abfd, val, temp);
if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
return false;
@@ -376,7 +376,7 @@ nlm_i386_read_import (abfd, sym)
while (sym -> rcnt < rcount)
{
asection *section;
-
+
if (nlm_i386_read_reloc (abfd, sym, &section,
&nlm_relocs -> reloc)
== false)
@@ -402,12 +402,12 @@ nlm_i386_write_external (abfd, count, sym, relocs)
unsigned char temp[NLM_TARGET_LONG_SIZE];
len = strlen (sym->name);
- if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof(bfd_byte))
+ if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
|| bfd_write (sym->name, len, 1, abfd) != len)
return false;
bfd_put_32 (abfd, count, temp);
- if (bfd_write (temp, sizeof(temp), 1, abfd) != sizeof (temp))
+ if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
return false;
for (i = 0; i < count; i++)
diff --git a/gnu/usr.bin/binutils/bfd/nlm32-ppc.c b/gnu/usr.bin/binutils/bfd/nlm32-ppc.c
index 5af48345cc7..0401d1efc71 100644
--- a/gnu/usr.bin/binutils/bfd/nlm32-ppc.c
+++ b/gnu/usr.bin/binutils/bfd/nlm32-ppc.c
@@ -1,5 +1,5 @@
/* Support for 32-bit PowerPC NLM (NetWare Loadable Module)
- Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -200,344 +200,344 @@ nlm_powerpc_read_reloc (abfd, sym, secp, rel)
static reloc_howto_type nlm_powerpc_howto_table[] =
{
/* Standard 32 bit relocation. */
- HOWTO (0, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_POS", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_POS", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* 32 bit relocation, but store negative value. */
- HOWTO (1, /* type */
- 0, /* rightshift */
- -2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (1, /* type */
+ 0, /* rightshift */
+ -2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_NEG", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_NEG", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* 32 bit PC relative relocation. */
- HOWTO (2, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* 16 bit TOC relative relocation. */
- HOWTO (3, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (3, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_TOC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TOC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* I don't really know what this is. */
- HOWTO (4, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (4, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RTB", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RTB", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* External TOC relative symbol. */
- HOWTO (5, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (5, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_GL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_GL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Local TOC relative symbol. */
- HOWTO (6, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (6, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TCL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TCL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 7 },
-
+
/* Non modifiable absolute branch. */
- HOWTO (8, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (8, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_BA", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0, /* special_function */
+ "R_BA", /* name */
+ true, /* partial_inplace */
+ 0x3fffffc, /* src_mask */
+ 0x3fffffc, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 9 },
/* Non modifiable relative branch. */
- HOWTO (0xa, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xa, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_BR", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0, /* special_function */
+ "R_BR", /* name */
+ true, /* partial_inplace */
+ 0x3fffffc, /* src_mask */
+ 0x3fffffc, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 0xb },
/* Indirect load. */
- HOWTO (0xc, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xc, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Load address. */
- HOWTO (0xd, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xd, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RLA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RLA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 0xe },
-
+
/* Non-relocating reference. */
- HOWTO (0xf, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xf, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_REF", /* name */
- false, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
+ 0, /* special_function */
+ "R_REF", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 0x10 },
{ 0x11 },
-
+
/* TOC relative indirect load. */
- HOWTO (0x12, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TRL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TRL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* TOC relative load address. */
- HOWTO (0x13, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x13, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TRLA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TRLA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable relative branch. */
- HOWTO (0x14, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x14, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RRTBI", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RRTBI", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable absolute branch. */
- HOWTO (0x15, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x15, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RRTBA", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RRTBA", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable call absolute indirect. */
- HOWTO (0x16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_CAI", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_CAI", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable call relative. */
- HOWTO (0x17, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x17, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x18, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x18, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RBA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x19, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x19, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBAC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RBAC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch relative. */
- HOWTO (0x1a, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x1a, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x1b, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x1b, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false) /* pcrel_offset */
};
@@ -687,7 +687,7 @@ nlm_powerpc_read_import (abfd, sym)
while (sym -> rcnt < rcount)
{
asection *section;
-
+
if (nlm_powerpc_read_reloc (abfd, sym, &section,
&nlm_relocs -> reloc)
== false)
@@ -751,7 +751,7 @@ nlm_powerpc_write_import (abfd, sec, rel)
val -= nlm_get_text_low (abfd);
val |= NLM_HIBIT;
}
-
+
if (! bfd_is_und_section (bfd_get_section (sym)))
{
/* This is an internal relocation fixup. The second most
@@ -907,12 +907,12 @@ nlm_powerpc_write_external (abfd, count, sym, relocs)
#endif
len = strlen (sym->name);
- if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof(bfd_byte))
+ if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
|| bfd_write (sym->name, len, 1, abfd) != len)
return false;
bfd_put_32 (abfd, count, temp);
- if (bfd_write (temp, sizeof(temp), 1, abfd) != sizeof (temp))
+ if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
return false;
for (i = 0; i < count; i++)
diff --git a/gnu/usr.bin/binutils/bfd/nlm32-sparc.c b/gnu/usr.bin/binutils/bfd/nlm32-sparc.c
index ab4d80aa878..154a96282da 100644
--- a/gnu/usr.bin/binutils/bfd/nlm32-sparc.c
+++ b/gnu/usr.bin/binutils/bfd/nlm32-sparc.c
@@ -1,5 +1,5 @@
/* Support for 32-bit SPARC NLM (NetWare Loadable Module)
- Copyright (C) 1993, 1994, 1995, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -44,8 +44,8 @@ static boolean nlm_sparc_write_external
enum reloc_type
{
R_SPARC_NONE = 0,
- R_SPARC_8, R_SPARC_16, R_SPARC_32,
- R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
+ R_SPARC_8, R_SPARC_16, R_SPARC_32,
+ R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
R_SPARC_WDISP30, R_SPARC_WDISP22,
R_SPARC_HI22, R_SPARC_22,
R_SPARC_13, R_SPARC_LO10,
@@ -78,7 +78,7 @@ static CONST char *CONST reloc_type_names[] =
};
#endif
-static reloc_howto_type nlm32_sparc_howto_table[] =
+static reloc_howto_type nlm32_sparc_howto_table[] =
{
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, 0,"R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,0,"R_SPARC_8", false,0,0x000000ff,true),
@@ -145,7 +145,7 @@ nlm_sparc_read_reloc (abfd, sym, secp, rel)
rel->howto = NULL;
for (index = 0;
- index < sizeof(nlm32_sparc_howto_table) / sizeof(reloc_howto_type);
+ index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type);
index++)
if (nlm32_sparc_howto_table[index].type == type) {
rel->howto = &nlm32_sparc_howto_table[index];
@@ -174,9 +174,8 @@ nlm_sparc_write_reloc (abfd, sec, rel)
int type = -1;
reloc_howto_type *tmp;
-
for (index = 0;
- index < sizeof (nlm32_sparc_howto_table) / sizeof(reloc_howto_type);
+ index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type);
index++) {
tmp = &nlm32_sparc_howto_table[index];
@@ -192,7 +191,7 @@ nlm_sparc_write_reloc (abfd, sec, rel)
}
}
if (type == -1)
- abort();
+ abort ();
/*
* Netware wants a list of relocs for each address.
@@ -219,7 +218,7 @@ nlm_sparc_write_reloc (abfd, sec, rel)
#endif
bfd_put_32 (abfd, val, tmp_reloc.offset);
bfd_put_32 (abfd, rel->addend, tmp_reloc.addend);
- bfd_put_8 (abfd, (short)(rel->howto->type), tmp_reloc.type);
+ bfd_put_8 (abfd, (short) (rel->howto->type), tmp_reloc.type);
if (bfd_write (&tmp_reloc, 12, 1, abfd) != 12)
return false;
@@ -252,20 +251,20 @@ nlm_sparc_read_import (abfd, sym)
bfd_byte temp[NLM_TARGET_LONG_SIZE]; /* temporary 32-bit value */
unsigned char symlength; /* length of symbol name */
char *name;
-
+
/*
* First, read in the number of relocation
* entries for this symbol
*/
if (bfd_read ((PTR) temp, 4, 1, abfd) != 4)
return false;
-
+
rcount = bfd_get_32 (abfd, temp);
-
+
/*
* Next, read in the length of the symbol
*/
-
+
if (bfd_read ((PTR) &symlength, sizeof (symlength), 1, abfd)
!= sizeof (symlength))
return false;
@@ -273,11 +272,11 @@ nlm_sparc_read_import (abfd, sym)
name = bfd_alloc (abfd, symlength + 1);
if (name == NULL)
return false;
-
+
/*
* Then read in the symbol
*/
-
+
if (bfd_read (name, symlength, 1, abfd) != symlength)
return false;
name[symlength] = '\0';
@@ -285,11 +284,11 @@ nlm_sparc_read_import (abfd, sym)
sym -> symbol.flags = 0;
sym -> symbol.value = 0;
sym -> symbol.section = bfd_und_section_ptr;
-
+
/*
* Next, start reading in the relocs.
*/
-
+
nlm_relocs = ((struct nlm_relent *)
bfd_alloc (abfd, rcount * sizeof (struct nlm_relent)));
if (!nlm_relocs)
@@ -299,7 +298,7 @@ nlm_sparc_read_import (abfd, sym)
while (sym -> rcnt < rcount)
{
asection *section;
-
+
if (nlm_sparc_read_reloc (abfd, sym, &section,
&nlm_relocs -> reloc)
== false)
@@ -364,11 +363,11 @@ nlm_sparc_write_external (abfd, count, sym, relocs)
unsigned char temp[NLM_TARGET_LONG_SIZE];
bfd_put_32 (abfd, count, temp);
- if (bfd_write (temp, sizeof(temp), 1, abfd) != sizeof (temp))
+ if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
return false;
len = strlen (sym->name);
- if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof(bfd_byte))
+ if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
|| bfd_write (sym->name, len, 1, abfd) != len)
return false;
diff --git a/gnu/usr.bin/binutils/bfd/nlmcode.h b/gnu/usr.bin/binutils/bfd/nlmcode.h
index ad1a2f8355b..04ba2a02817 100644
--- a/gnu/usr.bin/binutils/bfd/nlmcode.h
+++ b/gnu/usr.bin/binutils/bfd/nlmcode.h
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) executable support for BFD.
- Copyright (C) 1993, 94, 95, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1998, 2000 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, using ELF support as the
template.
@@ -52,9 +52,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define nlm_write_object_contents nlmNAME(write_object_contents)
#define nlm_swap_fixed_header_in(abfd,src,dst) \
- (nlm_swap_fixed_header_in_func(abfd))(abfd,src,dst)
+ (nlm_swap_fixed_header_in_func(abfd)) (abfd,src,dst)
#define nlm_swap_fixed_header_out(abfd,src,dst) \
- (nlm_swap_fixed_header_out_func(abfd))(abfd,src,dst)
+ (nlm_swap_fixed_header_out_func(abfd)) (abfd,src,dst)
/* Forward declarations of static functions */
@@ -142,7 +142,7 @@ nlm_object_p (abfd)
x_fxdhdr = NULL;
/* Check to see if we have an NLM file for this backend by matching
- the NLM signature. */
+ the NLM signature. */
signature = nlm_signature (abfd);
if (signature != NULL
@@ -223,7 +223,7 @@ got_no_match:
return (NULL);
}
-/* Add a section to the bfd. */
+/* Add a section to the bfd. */
static boolean
add_bfd_section (abfd, name, offset, size, flags)
@@ -240,7 +240,7 @@ add_bfd_section (abfd, name, offset, size, flags)
{
return (false);
}
- newsect->vma = 0; /* NLM's are relocatable. */
+ newsect->vma = 0; /* NLM's are relocatable. */
newsect->_raw_size = size;
newsect->filepos = offset;
newsect->flags = flags;
@@ -249,7 +249,7 @@ add_bfd_section (abfd, name, offset, size, flags)
}
/* Read and swap in the variable length header. All the fields must
- exist in the NLM, and must exist in the order they are read here. */
+ exist in the NLM, and must exist in the order they are read here. */
static boolean
nlm_swap_variable_header_in (abfd)
@@ -257,7 +257,7 @@ nlm_swap_variable_header_in (abfd)
{
unsigned char temp[NLM_TARGET_LONG_SIZE];
- /* Read the description length and text members. */
+ /* Read the description length and text members. */
if (bfd_read ((PTR) & nlm_variable_header (abfd)->descriptionLength,
sizeof (nlm_variable_header (abfd)->descriptionLength),
@@ -270,19 +270,19 @@ nlm_swap_variable_header_in (abfd)
(bfd_size_type) nlm_variable_header (abfd)->descriptionLength + 1)
return (false);
- /* Read and convert the stackSize field. */
+ /* Read and convert the stackSize field. */
if (bfd_read ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
return (false);
nlm_variable_header (abfd)->stackSize = get_word (abfd, (bfd_byte *) temp);
- /* Read and convert the reserved field. */
+ /* Read and convert the reserved field. */
if (bfd_read ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
return (false);
nlm_variable_header (abfd)->reserved = get_word (abfd, (bfd_byte *) temp);
- /* Read the oldThreadName field. This field is a fixed length string. */
+ /* Read the oldThreadName field. This field is a fixed length string. */
if (bfd_read ((PTR) nlm_variable_header (abfd)->oldThreadName,
sizeof (nlm_variable_header (abfd)->oldThreadName),
@@ -290,7 +290,7 @@ nlm_swap_variable_header_in (abfd)
sizeof (nlm_variable_header (abfd)->oldThreadName))
return (false);
- /* Read the screen name length and text members. */
+ /* Read the screen name length and text members. */
if (bfd_read ((PTR) & nlm_variable_header (abfd)->screenNameLength,
sizeof (nlm_variable_header (abfd)->screenNameLength),
@@ -303,7 +303,7 @@ nlm_swap_variable_header_in (abfd)
(bfd_size_type) nlm_variable_header (abfd)->screenNameLength + 1)
return (false);
- /* Read the thread name length and text members. */
+ /* Read the thread name length and text members. */
if (bfd_read ((PTR) & nlm_variable_header (abfd)->threadNameLength,
sizeof (nlm_variable_header (abfd)->threadNameLength),
@@ -327,7 +327,7 @@ nlm_swap_variable_header_out (abfd)
{
unsigned char temp[NLM_TARGET_LONG_SIZE];
- /* Write the description length and text members. */
+ /* Write the description length and text members. */
if (bfd_write ((PTR) & nlm_variable_header (abfd)->descriptionLength,
sizeof (nlm_variable_header (abfd)->descriptionLength),
@@ -340,21 +340,21 @@ nlm_swap_variable_header_out (abfd)
(bfd_size_type) nlm_variable_header (abfd)->descriptionLength + 1)
return (false);
- /* Convert and write the stackSize field. */
+ /* Convert and write the stackSize field. */
put_word (abfd, (bfd_vma) nlm_variable_header (abfd)->stackSize,
(bfd_byte *) temp);
if (bfd_write ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
return (false);
- /* Convert and write the reserved field. */
+ /* Convert and write the reserved field. */
put_word (abfd, (bfd_vma) nlm_variable_header (abfd)->reserved,
(bfd_byte *) temp);
if (bfd_write ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
return (false);
- /* Write the oldThreadName field. This field is a fixed length string. */
+ /* Write the oldThreadName field. This field is a fixed length string. */
if (bfd_write ((PTR) nlm_variable_header (abfd)->oldThreadName,
sizeof (nlm_variable_header (abfd)->oldThreadName),
@@ -362,7 +362,7 @@ nlm_swap_variable_header_out (abfd)
sizeof (nlm_variable_header (abfd)->oldThreadName))
return (false);
- /* Write the screen name length and text members. */
+ /* Write the screen name length and text members. */
if (bfd_write ((PTR) & nlm_variable_header (abfd)->screenNameLength,
sizeof (nlm_variable_header (abfd)->screenNameLength),
@@ -375,7 +375,7 @@ nlm_swap_variable_header_out (abfd)
(bfd_size_type) nlm_variable_header (abfd)->screenNameLength + 1)
return (false);
- /* Write the thread name length and text members. */
+ /* Write the thread name length and text members. */
if (bfd_write ((PTR) & nlm_variable_header (abfd)->threadNameLength,
sizeof (nlm_variable_header (abfd)->threadNameLength),
@@ -397,7 +397,7 @@ nlm_swap_variable_header_out (abfd)
of the auxiliary headers are, except by finding something that doesn't
look like a known auxiliary header. This means that the first new type
of auxiliary header added will break all existing tools that don't
- recognize it. */
+ recognize it. */
static boolean
nlm_swap_auxiliary_headers_in (abfd)
@@ -511,7 +511,7 @@ nlm_swap_auxiliary_headers_in (abfd)
->copyrightMessageLength),
1, 1, abfd) != 1)
return (false);
- /* The copyright message is a variable length string. */
+ /* The copyright message is a variable length string. */
if (bfd_read ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
nlm_copyright_header (abfd)->copyrightMessageLength + 1,
1, abfd) !=
@@ -820,7 +820,6 @@ nlm_swap_auxiliary_headers_out (abfd)
return false;
}
-
/* Write out the copyright header if there is one. */
if (find_nonzero ((PTR) nlm_copyright_header (abfd),
sizeof (Nlm_Internal_Copyright_Header)))
@@ -835,7 +834,7 @@ nlm_swap_auxiliary_headers_out (abfd)
nlm_copyright_header (abfd)->copyrightMessageLength;
if (bfd_write ((PTR) thdr.copyrightMessageLength, 1, 1, abfd) != 1)
return false;
- /* The copyright message is a variable length string. */
+ /* The copyright message is a variable length string. */
if (bfd_write ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
nlm_copyright_header (abfd)->copyrightMessageLength + 1,
1, abfd) !=
@@ -911,7 +910,7 @@ nlm_swap_auxiliary_headers_out (abfd)
Return the number of bytes required to hold the symtab vector, based on
the count plus 1, since we will NULL terminate the vector allocated based
- on this size. */
+ on this size. */
long
nlm_get_symtab_upper_bound (abfd)
@@ -930,7 +929,7 @@ nlm_get_symtab_upper_bound (abfd)
}
/* Note that bfd_get_symcount is guaranteed to be zero if slurping the
- symbol table fails. */
+ symbol table fails. */
long
nlm_get_symtab (abfd, alocation)
@@ -1048,7 +1047,7 @@ nlm_slurp_symbol_table (abfd)
Note that we allocate the initial bfd canonical symbol buffer based on a
one-to-one mapping of the NLM symbols to canonical symbols. We actually
use all the NLM symbols, so there will be no space left over at the end.
- When we have all the symbols, we build the caller's pointer vector. */
+ When we have all the symbols, we build the caller's pointer vector. */
abfd->symcount = 0;
i_fxdhdrp = nlm_fixed_header (abfd);
@@ -1071,7 +1070,7 @@ nlm_slurp_symbol_table (abfd)
/* We use the bfd's symcount directly as the control count, so that early
termination of the loop leaves the symcount correct for the symbols that
- were read. */
+ were read. */
set_public_section_func = nlm_set_public_section_func (abfd);
symcount = i_fxdhdrp->numberOfPublics;
diff --git a/gnu/usr.bin/binutils/bfd/ns32knetbsd.c b/gnu/usr.bin/binutils/bfd/ns32knetbsd.c
index a22356df6e1..fa4754d1ff7 100644
--- a/gnu/usr.bin/binutils/bfd/ns32knetbsd.c
+++ b/gnu/usr.bin/binutils/bfd/ns32knetbsd.c
@@ -1,5 +1,6 @@
/* BFD back-end for NetBSD/ns32k a.out-ish binaries.
- Copyright (C) 1990, 91, 92, 94, 95, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 1998, 2000
+ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define BYTES_IN_WORD 4
#undef TARGET_IS_BIG_ENDIAN_P
@@ -49,5 +50,4 @@ MY_bfd_reloc_type_lookup
PARAMS((bfd *abfd AND
bfd_reloc_code_real_type code));
-
#include "netbsd.h"
diff --git a/gnu/usr.bin/binutils/bfd/oasys.c b/gnu/usr.bin/binutils/bfd/oasys.c
index e69053b8282..6552a1dbfea 100644
--- a/gnu/usr.bin/binutils/bfd/oasys.c
+++ b/gnu/usr.bin/binutils/bfd/oasys.c
@@ -1,5 +1,5 @@
/* BFD back-end for oasys objects.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>.
diff --git a/gnu/usr.bin/binutils/bfd/opncls.c b/gnu/usr.bin/binutils/bfd/opncls.c
index 57ca0d0a259..0c3d2c9a8a1 100644
--- a/gnu/usr.bin/binutils/bfd/opncls.c
+++ b/gnu/usr.bin/binutils/bfd/opncls.c
@@ -1,5 +1,6 @@
/* opncls.c -- open and close a BFD.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
+ 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -248,7 +249,7 @@ bfd_fdopenr (filename, target, fd)
be written through, although doing so requires that we end
the previous clause with a preposition. */
/* (O_ACCMODE) parens are to avoid Ultrix header file bug */
- switch (fdflags & O_ACCMODE)
+ switch (fdflags & (O_ACCMODE))
{
case O_RDONLY: nbfd->direction = read_direction; break;
case O_WRONLY: nbfd->direction = write_direction; break;
diff --git a/gnu/usr.bin/binutils/bfd/osf-core.c b/gnu/usr.bin/binutils/bfd/osf-core.c
index 4f4fc12dc72..c458ecf7008 100644
--- a/gnu/usr.bin/binutils/bfd/osf-core.c
+++ b/gnu/usr.bin/binutils/bfd/osf-core.c
@@ -1,5 +1,5 @@
/* BFD back-end for OSF/1 core files.
- Copyright 1993, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1998, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/pc532-mach.c b/gnu/usr.bin/binutils/bfd/pc532-mach.c
index 3b77d5dab14..9b7fc6f8850 100644
--- a/gnu/usr.bin/binutils/bfd/pc532-mach.c
+++ b/gnu/usr.bin/binutils/bfd/pc532-mach.c
@@ -1,5 +1,6 @@
/* BFD back-end for Mach3/532 a.out-ish binaries.
- Copyright (C) 1990, 1991, 1992, 1994, 2000 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,7 +34,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define N_HEADER_IN_TEXT(x) 1
#define N_TXTSIZE(x) ((x).a_text)
-
#define TEXT_START_ADDR 0x10000 /* from old ld */
#define TARGET_PAGE_SIZE 0x1000 /* from old ld, 032 & 532 are really 512/4k */
@@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define N_SHARED_LIB(x) 0
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#define DEFAULT_ARCH bfd_arch_ns32k
-
+
#define MY(OP) CAT(pc532machaout_,OP)
/* Must be the same as aout-ns32k.c */
@@ -67,14 +67,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define MY_bfd_reloc_type_lookup ns32kaout_bfd_reloc_type_lookup
-/* libaout doesn't use NAME for these ... */
+/* libaout doesn't use NAME for these ... */
#define MY_get_section_contents aout_32_get_section_contents
#define MY_text_includes_header 1
#define MY_exec_header_not_counted 1
-
+
#define MYNSX(OP) CAT(ns32kaout_,OP)
reloc_howto_type *
MYNSX(bfd_reloc_type_lookup)
@@ -91,9 +91,9 @@ bfd *abfd;
{
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
-
+
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
-
+
BFD_ASSERT (bfd_get_arch (abfd) == bfd_arch_ns32k);
switch (bfd_get_mach (abfd))
{
@@ -106,9 +106,9 @@ bfd *abfd;
break;
}
N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
-
+
WRITE_HEADERS(abfd, execp);
-
+
return true;
}
diff --git a/gnu/usr.bin/binutils/bfd/pe-arm.c b/gnu/usr.bin/binutils/bfd/pe-arm.c
index 6c6b6598007..dbb478940b5 100644
--- a/gnu/usr.bin/binutils/bfd/pe-arm.c
+++ b/gnu/usr.bin/binutils/bfd/pe-arm.c
@@ -1,5 +1,5 @@
/* BFD back-end for ARM PECOFF files.
- Copyright 1995, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PCRELOFFSET true
#define COFF_LONG_SECTION_NAMES
-#ifndef bfd_arm_allocate_interworking_sections
+#ifndef bfd_arm_allocate_interworking_sections
#define bfd_arm_allocate_interworking_sections \
bfd_arm_pe_allocate_interworking_sections
#define bfd_arm_get_bfd_for_interworking \
@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define bfd_arm_process_before_allocation \
bfd_arm_pe_process_before_allocation
#endif
-
+
#ifdef ARM_WINCE
#define TARGET_UNDERSCORE 0
#endif
diff --git a/gnu/usr.bin/binutils/bfd/pe-i386.c b/gnu/usr.bin/binutils/bfd/pe-i386.c
index a2eb78477c2..7ced1471156 100644
--- a/gnu/usr.bin/binutils/bfd/pe-i386.c
+++ b/gnu/usr.bin/binutils/bfd/pe-i386.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 386 PECOFF files.
- Copyright 1995, 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
-
#define TARGET_SYM i386pe_vec
#define TARGET_NAME "pe-i386"
#define COFF_WITH_PE
diff --git a/gnu/usr.bin/binutils/bfd/pe-ppc.c b/gnu/usr.bin/binutils/bfd/pe-ppc.c
index 7d4a5471623..adbf3176e69 100644
--- a/gnu/usr.bin/binutils/bfd/pe-ppc.c
+++ b/gnu/usr.bin/binutils/bfd/pe-ppc.c
@@ -1,5 +1,5 @@
/* BFD back-end for PowerPC PECOFF files.
- Copyright 1995 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -21,7 +21,6 @@ Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
-
#define E_FILENMLEN 18
#define PPC_PE
diff --git a/gnu/usr.bin/binutils/bfd/pei-arm.c b/gnu/usr.bin/binutils/bfd/pei-arm.c
index b7ae01e16bf..c202072d5b1 100644
--- a/gnu/usr.bin/binutils/bfd/pei-arm.c
+++ b/gnu/usr.bin/binutils/bfd/pei-arm.c
@@ -1,5 +1,5 @@
/* BFD back-end for arm PE IMAGE COFF files.
- Copyright 1995, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/pei-ppc.c b/gnu/usr.bin/binutils/bfd/pei-ppc.c
index 86e1a5dc358..66216a86589 100644
--- a/gnu/usr.bin/binutils/bfd/pei-ppc.c
+++ b/gnu/usr.bin/binutils/bfd/pei-ppc.c
@@ -1,5 +1,5 @@
/* BFD back-end for PowerPC PE IMAGE COFF files.
- Copyright 1995 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/bfd/peicode.h b/gnu/usr.bin/binutils/bfd/peicode.h
index 7238c7802e8..a0f74497df2 100644
--- a/gnu/usr.bin/binutils/bfd/peicode.h
+++ b/gnu/usr.bin/binutils/bfd/peicode.h
@@ -1,5 +1,6 @@
/* Support for the generic parts of PE/PEI, for BFD.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -69,7 +70,6 @@ static boolean (*pe_saved_coff_bfd_print_private_bfd_data)
static boolean pe_print_private_bfd_data PARAMS ((bfd *, PTR));
#define coff_bfd_print_private_bfd_data pe_print_private_bfd_data
-
static boolean (*pe_saved_coff_bfd_copy_private_bfd_data)
PARAMS ((bfd *, bfd *)) =
#ifndef coff_bfd_copy_private_bfd_data
@@ -104,29 +104,29 @@ typedef struct
bfd_byte * data;
struct bfd_in_memory * bim;
unsigned short magic;
-
+
arelent * reltab;
unsigned int relcount;
coff_symbol_type * sym_cache;
coff_symbol_type * sym_ptr;
unsigned int sym_index;
-
+
unsigned int * sym_table;
unsigned int * table_ptr;
-
+
combined_entry_type * native_syms;
combined_entry_type * native_ptr;
coff_symbol_type ** sym_ptr_table;
coff_symbol_type ** sym_ptr_ptr;
-
+
unsigned int sec_index;
char * string_table;
char * string_ptr;
char * end_string_ptr;
-
+
SYMENT * esym_table;
SYMENT * esym_ptr;
@@ -138,7 +138,7 @@ static asection_ptr pe_ILF_make_a_section PARAMS ((pe_ILF_vars *, const
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 symbol_cache_entry **, unsigned int));
+static void pe_ILF_make_a_symbol_reloc PARAMS ((pe_ILF_vars *, bfd_vma, bfd_reloc_code_real_type, struct symbol_cache_entry **, unsigned int));
static boolean pe_ILF_build_a_bfd PARAMS ((bfd *, unsigned short, 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 *));
@@ -167,7 +167,6 @@ coff_swap_reloc_in (abfd, src, dst)
#endif
}
-
static unsigned int
coff_swap_reloc_out (abfd, src, dst)
bfd *abfd;
@@ -210,21 +209,6 @@ coff_swap_filehdr_in (abfd, src, dst)
filehdr_dst->f_flags = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_flags);
filehdr_dst->f_symptr = bfd_h_get_32 (abfd, (bfd_byte *) filehdr_src->f_symptr);
-#ifdef COFF_IMAGE_WITH_PE
- /* There are really two magic numbers involved; the magic number
- that says this is a NT executable (PEI) and the magic number that
- determines the architecture. The former is DOSMAGIC, stored in
- the e_magic field. The latter is stored in the f_magic field.
- If the NT magic number isn't valid, the architecture magic number
- could be mimicked by some other field (specifically, the number
- of relocs in section 3). Since this routine can only be called
- correctly for a PEI file, check the e_magic number here, and, if
- it doesn't match, clobber the f_magic number so that we don't get
- a false match. */
- if (bfd_h_get_16 (abfd, (bfd_byte *) filehdr_src->e_magic) != DOSMAGIC)
- filehdr_dst->f_magic = -1;
-#endif
-
/* Other people's tools sometimes generate headers with an nsyms but
a zero symptr. */
if (filehdr_dst->f_nsyms != 0 && filehdr_dst->f_symptr == 0)
@@ -233,17 +217,16 @@ coff_swap_filehdr_in (abfd, src, dst)
filehdr_dst->f_flags |= F_LSYMS;
}
- filehdr_dst->f_opthdr = bfd_h_get_16(abfd,
+ filehdr_dst->f_opthdr = bfd_h_get_16(abfd,
(bfd_byte *)filehdr_src-> f_opthdr);
}
#ifdef COFF_IMAGE_WITH_PE
-#define coff_swap_filehdr_out _bfd_pei_only_swap_filehdr_out
+# define coff_swap_filehdr_out _bfd_XXi_only_swap_filehdr_out
#else
-#define coff_swap_filehdr_out _bfd_pe_only_swap_filehdr_out
+# define coff_swap_filehdr_out _bfd_pe_only_swap_filehdr_out
#endif
-
static void
coff_swap_scnhdr_in (abfd, ext, in)
bfd *abfd;
@@ -253,7 +236,7 @@ coff_swap_scnhdr_in (abfd, ext, 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));
+ memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
scnhdr_int->s_vaddr =
GET_SCNHDR_VADDR (abfd, (bfd_byte *) scnhdr_ext->s_vaddr);
scnhdr_int->s_paddr =
@@ -283,7 +266,7 @@ coff_swap_scnhdr_in (abfd, ext, in)
(bfd_byte *) scnhdr_ext->s_nlnno);
#endif
- if (scnhdr_int->s_vaddr != 0)
+ if (scnhdr_int->s_vaddr != 0)
{
scnhdr_int->s_vaddr += pe_data (abfd)->pe_opthdr.ImageBase;
scnhdr_int->s_vaddr &= 0xffffffff;
@@ -308,7 +291,7 @@ pe_mkobject (abfd)
bfd * abfd;
{
pe_data_type *pe;
- abfd->tdata.pe_obj_data =
+ abfd->tdata.pe_obj_data =
(struct pe_tdata *) bfd_zalloc (abfd, sizeof (pe_data_type));
if (abfd->tdata.pe_obj_data == 0)
@@ -320,6 +303,14 @@ pe_mkobject (abfd)
/* in_reloc_p is architecture dependent. */
pe->in_reloc_p = in_reloc_p;
+
+#ifdef PEI_FORCE_MINIMUM_ALIGNMENT
+ pe->force_minimum_alignment = 1;
+#endif
+#ifdef PEI_TARGET_SUBSYSTEM
+ pe->target_subsystem = PEI_TARGET_SUBSYSTEM;
+#endif
+
return true;
}
@@ -364,15 +355,15 @@ pe_mkobject_hook (abfd, filehdr, aouthdr)
abfd->flags |= HAS_DEBUG;
#ifdef COFF_IMAGE_WITH_PE
- if (aouthdr)
+ if (aouthdr)
pe->pe_opthdr = ((struct internal_aouthdr *)aouthdr)->pe;
#endif
-#ifdef ARM
+#ifdef ARM
if (! _bfd_coff_arm_set_private_flags (abfd, internal_f->f_flags))
coff_data (abfd) ->flags = 0;
#endif
-
+
return (PTR) pe;
}
@@ -383,7 +374,7 @@ pe_print_private_bfd_data (abfd, vfile)
{
FILE *file = (FILE *) vfile;
- if (!_bfd_pe_print_private_bfd_data_common (abfd, vfile))
+ if (!_bfd_XX_print_private_bfd_data_common (abfd, vfile))
return false;
if (pe_saved_coff_bfd_print_private_bfd_data != NULL)
@@ -403,7 +394,7 @@ static boolean
pe_bfd_copy_private_bfd_data (ibfd, obfd)
bfd *ibfd, *obfd;
{
- if (!_bfd_pe_bfd_copy_private_bfd_data_common (ibfd, obfd))
+ if (!_bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd))
return false;
if (pe_saved_coff_bfd_copy_private_bfd_data)
@@ -413,15 +404,15 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd)
}
#define coff_bfd_copy_private_section_data \
- _bfd_pe_bfd_copy_private_section_data
+ _bfd_XX_bfd_copy_private_section_data
-#define coff_get_symbol_info _bfd_pe_get_symbol_info
+#define coff_get_symbol_info _bfd_XX_get_symbol_info
#ifdef COFF_IMAGE_WITH_PE
/* Code to handle Microsoft's Image Library Format.
Also known as LINK6 format.
- Documentation about this format can be found at:
+ Documentation about this format can be found at:
http://msdn.microsoft.com/library/specs/pecoff_section8.htm */
@@ -447,7 +438,7 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd)
#define NUM_ILF_RELOCS 8
#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))
@@ -465,7 +456,7 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd)
#define SIZEOF_IDATA6 (2 + strlen (symbol_name) + 1 + 1)
#define SIZEOF_IDATA7 (strlen (source_dll) + 1 + 1)
#define SIZEOF_ILF_SECTIONS (NUM_ILF_SECTIONS * sizeof (struct coff_section_tdata))
-
+
#define ILF_DATA_SIZE \
sizeof (* vars.bim) \
+ SIZEOF_ILF_SYMS \
@@ -484,7 +475,6 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd)
+ SIZEOF_ILF_SECTIONS \
+ MAX_TEXT_SECTION_SIZE
-
/* Create an empty relocation against the given symbol. */
static void
pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
@@ -498,7 +488,7 @@ pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
entry = vars->reltab + vars->relcount;
internal = vars->int_reltab + vars->relcount;
-
+
entry->address = address;
entry->addend = 0;
entry->howto = bfd_reloc_type_lookup (vars->abfd, reloc);
@@ -512,9 +502,9 @@ pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
internal->r_extern = 0;
internal->r_offset = 0;
#endif
-
+
vars->relcount ++;
-
+
BFD_ASSERT (vars->relcount <= NUM_ILF_RELOCS);
}
@@ -570,8 +560,8 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
sclass = C_STAT;
else
sclass = C_EXT;
-
-#ifdef THUMBPEMAGIC
+
+#ifdef THUMBPEMAGIC
if (vars->magic == THUMBPEMAGIC)
{
if (extra_flags & BSF_FUNCTION)
@@ -584,7 +574,7 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
#endif
BFD_ASSERT (vars->sym_index < NUM_ILF_SYMS);
-
+
sym = vars->sym_ptr;
ent = vars->native_ptr;
esym = vars->esym_ptr;
@@ -594,7 +584,7 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
if (section == NULL)
section = (asection_ptr) & bfd_und_section;
-
+
/* Initialise the external symbol. */
bfd_h_put_32 (vars->abfd, vars->string_ptr - vars->string_table, (bfd_byte *) esym->e.e.e_offset);
bfd_h_put_16 (vars->abfd, section->target_index, (bfd_byte *) esym->e_scnum);
@@ -608,12 +598,12 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
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;
@@ -621,23 +611,23 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
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;
-
+
/* Adjust pointers for the next symbol. */
vars->sym_index ++;
vars->sym_ptr ++;
@@ -659,20 +649,20 @@ pe_ILF_make_a_section (pe_ILF_vars * vars,
{
asection_ptr sec;
flagword flags;
-
+
sec = bfd_make_section_old_way (vars->abfd, name);
if (sec == NULL)
return NULL;
-
+
flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_KEEP | SEC_IN_MEMORY;
-
+
bfd_set_section_flags (vars->abfd, sec, flags | extra_flags);
-
+
bfd_set_section_alignment (vars->abfd, sec, 2);
-
+
/* Check that we will not run out of space. */
BFD_ASSERT (vars->data + size < vars->bim->buffer + vars->bim->size);
-
+
/* Set the section size and contents. The actual
contents are filled in by our parent. */
bfd_set_section_size (vars->abfd, sec, size);
@@ -681,26 +671,26 @@ pe_ILF_make_a_section (pe_ILF_vars * vars,
/* Advance data pointer in the vars structure. */
vars->data += size;
-
+
/* Skip the padding byte if it was not needed.
The logic here is that if the string length is odd,
then the entire string length, including the null byte,
is even and so the extra, padding byte, is not needed. */
if (size & 1)
vars->data --;
-
+
/* Create a coff_section_tdata structure for our use. */
sec->used_by_bfd = (struct coff_section_tdata *) vars->data;
vars->data += sizeof (struct coff_section_tdata);
BFD_ASSERT (vars->data <= vars->bim->buffer + vars->bim->size);
-
+
/* Create a symbol to refer to this section. */
pe_ILF_make_a_symbol (vars, "", name, sec, BSF_LOCAL);
/* Cache the index to the symbol in the coff_section_data structure. */
coff_section_data (vars->abfd, sec)->i = vars->sym_index - 1;
-
+
return sec;
}
@@ -731,7 +721,7 @@ static jump_table jtab[] =
8, 2
},
#endif
-
+
#ifdef MC68MAGIC
{ MC68MAGIC, { /* XXX fill me in */ }, 0, 0 },
#endif
@@ -742,7 +732,7 @@ static jump_table jtab[] =
16, 0
},
#endif
-
+
#ifdef SH_ARCH_MAGIC_WINCE
{ SH_ARCH_MAGIC_WINCE,
{ 0x01, 0xd0, 0x02, 0x60, 0x2b, 0x40,
@@ -750,7 +740,7 @@ static jump_table jtab[] =
12, 8
},
#endif
-
+
#ifdef ARMPEMAGIC
{ ARMPEMAGIC,
{ 0x00, 0xc0, 0x9f, 0xe5, 0x00, 0xf0,
@@ -758,7 +748,7 @@ static jump_table jtab[] =
12, 8
},
#endif
-
+
#ifdef THUMBPEMAGIC
{ THUMBPEMAGIC,
{ 0x40, 0xb4, 0x02, 0x4e, 0x36, 0x68, 0xb4, 0x46,
@@ -781,7 +771,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
bfd_byte * source_dll,
unsigned int ordinal,
unsigned int types)
-{
+{
bfd_byte * ptr;
pe_ILF_vars vars;
struct internal_filehdr internal_f;
@@ -800,13 +790,13 @@ pe_ILF_build_a_bfd (bfd * abfd,
case IMPORT_CODE:
case IMPORT_DATA:
break;
-
+
case IMPORT_CONST:
/* XXX code yet to be written. */
_bfd_error_handler (_("%s: Unhandled import type; %x"),
bfd_get_filename (abfd), import_type);
return false;
-
+
default:
_bfd_error_handler (_("%s: Unrecognised import type; %x"),
bfd_get_filename (abfd), import_type);
@@ -820,7 +810,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
case IMPORT_NAME_NOPREFIX:
case IMPORT_NAME_UNDECORATE:
break;
-
+
default:
_bfd_error_handler (_("%s: Unrecognised import name type; %x"),
bfd_get_filename (abfd), import_name_type);
@@ -828,10 +818,10 @@ pe_ILF_build_a_bfd (bfd * abfd,
}
/* Initialise local variables.
-
+
Note these are kept in a structure rather than being
declared as statics since bfd frowns on global variables.
-
+
We are going to construct the contents of the BFD in memory,
so allocate all the space that we will need right now. */
ptr = bfd_zalloc (abfd, ILF_DATA_SIZE);
@@ -843,14 +833,14 @@ pe_ILF_build_a_bfd (bfd * abfd,
vars.bim->buffer = ptr;
vars.bim->size = ILF_DATA_SIZE;
ptr += sizeof (* vars.bim);
-
+
/* Initialise the pointers to regions of the memory and the
other contents of the pe_ILF_vars structure as well. */
vars.sym_cache = (coff_symbol_type *) ptr;
vars.sym_ptr = (coff_symbol_type *) ptr;
vars.sym_index = 0;
ptr += SIZEOF_ILF_SYMS;
-
+
vars.sym_table = (unsigned int *) ptr;
vars.table_ptr = (unsigned int *) ptr;
ptr += SIZEOF_ILF_SYM_TABLE;
@@ -862,11 +852,11 @@ pe_ILF_build_a_bfd (bfd * abfd,
vars.sym_ptr_table = (coff_symbol_type **) ptr;
vars.sym_ptr_ptr = (coff_symbol_type **) ptr;
ptr += SIZEOF_ILF_SYM_PTR_TABLE;
-
+
vars.esym_table = (SYMENT *) ptr;
vars.esym_ptr = (SYMENT *) ptr;
ptr += SIZEOF_ILF_EXT_SYMS;
-
+
vars.reltab = (arelent *) ptr;
vars.relcount = 0;
ptr += SIZEOF_ILF_RELOCS;
@@ -878,14 +868,14 @@ pe_ILF_build_a_bfd (bfd * abfd,
vars.string_ptr = ptr + STRING_SIZE_SIZE;
ptr += SIZEOF_ILF_STRINGS;
vars.end_string_ptr = ptr;
-
+
/* The remaining space in bim->buffer is used
by the pe_ILF_make_a_section() function. */
vars.data = ptr;
vars.abfd = abfd;
vars.sec_index = 0;
vars.magic = magic;
-
+
/* Create the initial .idata$<n> sections:
[.idata$2: Import Directory Table -- not needed]
.idata$4: Import Lookup Table
@@ -897,21 +887,21 @@ pe_ILF_build_a_bfd (bfd * abfd,
id5 = pe_ILF_make_a_section (& vars, ".idata$5", SIZEOF_IDATA5, 0);
if (id4 == NULL || id5 == NULL)
return false;
-
+
/* Fill in the contents of these sections. */
if (import_name_type == IMPORT_ORDINAL)
{
if (ordinal == 0)
/* XXX - treat as IMPORT_NAME ??? */
abort ();
-
- * (unsigned int *) id4->contents = ordinal | 0x80000000UL;
- * (unsigned int *) id5->contents = ordinal | 0x80000000UL;
+
+ * (unsigned int *) id4->contents = ordinal | 0x80000000;
+ * (unsigned int *) id5->contents = ordinal | 0x80000000;
}
else
{
char * symbol;
-
+
/* Create .idata$6 - the Hint Name Table. */
id6 = pe_ILF_make_a_section (& vars, ".idata$6", SIZEOF_IDATA6, 0);
if (id6 == NULL)
@@ -933,10 +923,10 @@ pe_ILF_build_a_bfd (bfd * abfd,
* symbol = 0;
}
-
+
id6->contents[0] = ordinal & 0xff;
id6->contents[1] = ordinal >> 8;
-
+
strcpy (id6->contents + 2, symbol);
}
@@ -944,7 +934,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
{
pe_ILF_make_a_reloc (& vars, 0, BFD_RELOC_RVA, id6);
pe_ILF_save_relocs (& vars, id4);
-
+
pe_ILF_make_a_reloc (& vars, 0, BFD_RELOC_RVA, id6);
pe_ILF_save_relocs (& vars, id5);
}
@@ -953,7 +943,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
switch (import_type)
{
int i;
-
+
case IMPORT_CODE:
/* Create a .text section.
First we need to look up its contents in the jump table. */
@@ -980,22 +970,22 @@ pe_ILF_build_a_bfd (bfd * abfd,
pe_ILF_make_a_symbol (& vars, "__imp_", symbol_name, id5, 0);
imp_sym = vars.sym_ptr_ptr - 1;
imp_index = vars.sym_index - 1;
-
+
/* Create a reloc for the data in the text section. */
-#ifdef MIPS_ARCH_MAGIC_WINCE
+#ifdef MIPS_ARCH_MAGIC_WINCE
if (magic == MIPS_ARCH_MAGIC_WINCE)
{
pe_ILF_make_a_symbol_reloc (& vars, 0, BFD_RELOC_HI16_S,
- (asection **) imp_sym, imp_index);
+ (struct symbol_cache_entry **) imp_sym, imp_index);
pe_ILF_make_a_reloc (& vars, 0, BFD_RELOC_LO16, text);
pe_ILF_make_a_symbol_reloc (& vars, 4, BFD_RELOC_LO16,
- (asection **) imp_sym, imp_index);
+ (struct symbol_cache_entry **) imp_sym, imp_index);
}
else
#endif
pe_ILF_make_a_symbol_reloc (& vars, jtab[i].offset, BFD_RELOC_32,
(asymbol **) imp_sym, imp_index);
-
+
pe_ILF_save_relocs (& vars, text);
break;
@@ -1006,15 +996,15 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* XXX code not yet written. */
abort ();
}
-
+
/* Initialise the bfd. */
memset (& internal_f, 0, sizeof (internal_f));
-
+
internal_f.f_magic = magic;
internal_f.f_symptr = 0;
internal_f.f_nsyms = 0;
internal_f.f_flags = F_AR32WR | F_LNNO; /* XXX is this correct ? */
-
+
if ( ! bfd_set_start_address (abfd, 0)
|| ! bfd_coff_set_arch_mach_hook (abfd, & internal_f))
return false;
@@ -1023,12 +1013,12 @@ pe_ILF_build_a_bfd (bfd * abfd,
return false;
coff_data (abfd)->pe = 1;
-#ifdef THUMBPEMAGIC
+#ifdef THUMBPEMAGIC
if (vars.magic == THUMBPEMAGIC)
/* Stop some linker warnings about thumb code not supporting interworking. */
coff_data (abfd)->flags |= F_INTERWORK | F_INTERWORK_SET;
#endif
-
+
/* Switch from file contents to memory contents. */
bfd_cache_close (abfd);
@@ -1041,11 +1031,11 @@ pe_ILF_build_a_bfd (bfd * abfd,
switch (import_type)
{
bfd_byte * ptr;
-
+
case IMPORT_CODE:
pe_ILF_make_a_symbol (& vars, "", symbol_name, text,
BSF_NOT_AT_END | BSF_FUNCTION);
-
+
/* Create an import symbol for the DLL, without the
.dll suffix. */
ptr = strrchr (source_dll, '.');
@@ -1059,7 +1049,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
case IMPORT_DATA:
/* Nothing to do here. */
break;
-
+
default:
/* XXX code not yet written. */
abort ();
@@ -1068,16 +1058,16 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* Point the bfd at the symbol table. */
obj_symbols (abfd) = vars.sym_cache;
bfd_get_symcount (abfd) = vars.sym_index;
-
+
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_keep_syms (abfd) = true;
-
+
obj_convert (abfd) = vars.sym_table;
obj_conv_table_size (abfd) = vars.sym_index;
-
+
obj_coff_strings (abfd) = vars.string_table;
obj_coff_keep_strings (abfd) = true;
@@ -1100,14 +1090,14 @@ pe_ILF_object_p (bfd * abfd)
unsigned int ordinal;
unsigned int types;
unsigned short magic;
-
+
/* Upon entry the first four buyes of the ILF header have
already been read. Now read the rest of the header. */
if (bfd_read (buffer, 1, 16, abfd) != 16)
return NULL;
ptr = buffer;
-
+
/* We do not bother to check the version number.
version = bfd_h_get_16 (abfd, ptr); */
ptr += 2;
@@ -1117,7 +1107,7 @@ pe_ILF_object_p (bfd * abfd)
/* Check that the machine type is recognised. */
magic = 0;
-
+
switch (machine)
{
case IMAGE_FILE_MACHINE_UNKNOWN:
@@ -1125,23 +1115,23 @@ pe_ILF_object_p (bfd * abfd)
case IMAGE_FILE_MACHINE_ALPHA64:
case IMAGE_FILE_MACHINE_IA64:
break;
-
+
case IMAGE_FILE_MACHINE_I386:
#ifdef I386MAGIC
magic = I386MAGIC;
#endif
break;
-
+
case IMAGE_FILE_MACHINE_M68K:
#ifdef MC68AGIC
magic = MC68MAGIC;
#endif
break;
-
+
case IMAGE_FILE_MACHINE_R3000:
case IMAGE_FILE_MACHINE_R4000:
case IMAGE_FILE_MACHINE_R10000:
-
+
case IMAGE_FILE_MACHINE_MIPS16:
case IMAGE_FILE_MACHINE_MIPSFPU:
case IMAGE_FILE_MACHINE_MIPSFPU16:
@@ -1149,31 +1139,31 @@ pe_ILF_object_p (bfd * abfd)
magic = MIPS_ARCH_MAGIC_WINCE;
#endif
break;
-
+
case IMAGE_FILE_MACHINE_SH3:
case IMAGE_FILE_MACHINE_SH4:
#ifdef SH_ARCH_MAGIC_WINCE
magic = SH_ARCH_MAGIC_WINCE;
#endif
break;
-
+
case IMAGE_FILE_MACHINE_ARM:
#ifdef ARMPEMAGIC
magic = ARMPEMAGIC;
-#endif
+#endif
break;
-
+
case IMAGE_FILE_MACHINE_THUMB:
#ifdef THUMBPEMAGIC
{
- extern bfd_target armpei_little_vec;
-
- if (abfd->xvec == & armpei_little_vec)
+ extern const bfd_target TARGET_LITTLE_SYM;
+
+ if (abfd->xvec == & TARGET_LITTLE_SYM)
magic = THUMBPEMAGIC;
}
-#endif
+#endif
break;
-
+
case IMAGE_FILE_MACHINE_POWERPC:
/* We no longer support PowerPC. */
default:
@@ -1182,7 +1172,7 @@ pe_ILF_object_p (bfd * abfd)
_("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
bfd_get_filename (abfd), machine);
bfd_set_error (bfd_error_malformed_archive);
-
+
return NULL;
break;
}
@@ -1194,14 +1184,14 @@ _("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
_("%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"),
bfd_get_filename (abfd), machine);
bfd_set_error (bfd_error_wrong_format);
-
+
return NULL;
- }
+ }
/* We do not bother to check the date.
date = bfd_h_get_32 (abfd, ptr); */
ptr += 4;
-
+
size = bfd_h_get_32 (abfd, ptr);
ptr += 4;
@@ -1211,7 +1201,7 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
(_("%s: size field is zero in Import Library Format header"),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_malformed_archive);
-
+
return NULL;
}
@@ -1225,13 +1215,13 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
ptr = bfd_alloc (abfd, size);
if (ptr == NULL)
return NULL;
-
+
if (bfd_read (ptr, 1, size, abfd) != size)
return NULL;
symbol_name = ptr;
source_dll = ptr + strlen (ptr) + 1;
-
+
/* Verify that the strings are null terminated. */
if (ptr[size - 1] != 0 || ((unsigned long) (source_dll - ptr) >= size))
{
@@ -1239,31 +1229,25 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
(_("%s: string not null terminated in ILF object file."),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_malformed_archive);
-
+
return NULL;
}
-
+
/* Now construct the bfd. */
if (! pe_ILF_build_a_bfd (abfd, magic, symbol_name,
source_dll, ordinal, types))
return NULL;
-
+
return abfd->xvec;
}
static const bfd_target *
pe_bfd_object_p (bfd * abfd)
{
- /* We need to handle a PE image correctly. In PE images created by
- the GNU linker, the offset to the COFF header is always the size.
- However, this is not the case in images generated by other PE
- linkers. The PE format stores a four byte offset to the PE
- signature just before the COFF header at location 0x3c of the file.
- We pick up that offset, verify that the PE signature is there, and
- then set ourselves up to read in the COFF header. */
bfd_byte buffer[4];
+ struct external_PEI_DOS_hdr dos_hdr;
+ struct external_PEI_IMAGE_hdr image_hdr;
file_ptr offset;
- unsigned long signature;
/* Detect if this a Microsoft Import Library Format element. */
if (bfd_seek (abfd, 0x00, SEEK_SET) != 0
@@ -1273,45 +1257,57 @@ pe_bfd_object_p (bfd * abfd)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
-
- signature = bfd_h_get_32 (abfd, buffer);
-
- if (signature == 0xffff0000)
+
+ if (bfd_h_get_32 (abfd, buffer) == 0xffff0000)
return pe_ILF_object_p (abfd);
-
- if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0
- || bfd_read (buffer, 1, 4, abfd) != 4)
+
+ if (bfd_seek (abfd, 0x00, SEEK_SET) != 0
+ || bfd_read (&dos_hdr, 1, sizeof (dos_hdr), abfd)
+ != sizeof (dos_hdr))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
- offset = bfd_h_get_32 (abfd, buffer);
+ /* There are really two magic numbers involved; the magic number
+ that says this is a NT executable (PEI) and the magic number that
+ determines the architecture. The former is DOSMAGIC, stored in
+ the e_magic field. The latter is stored in the f_magic field.
+ If the NT magic number isn't valid, the architecture magic number
+ could be mimicked by some other field (specifically, the number
+ of relocs in section 3). Since this routine can only be called
+ correctly for a PEI file, check the e_magic number here, and, if
+ it doesn't match, clobber the f_magic number so that we don't get
+ a false match. */
+ if (bfd_h_get_16 (abfd, (bfd_byte *) dos_hdr.e_magic) != DOSMAGIC)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
- if (bfd_seek (abfd, offset, SEEK_SET) != 0
- || bfd_read (buffer, 1, 4, abfd) != 4)
+ offset = bfd_h_get_32 (abfd, (bfd_byte *) dos_hdr.e_lfanew);
+ if (bfd_seek (abfd, (file_ptr) offset, SEEK_SET) != 0
+ || bfd_read (&image_hdr, 1, sizeof (image_hdr), abfd)
+ != sizeof (image_hdr))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
- signature = bfd_h_get_32 (abfd, buffer);
-
- if (signature != 0x4550)
+ if (bfd_h_get_32 (abfd, (bfd_byte *) image_hdr.nt_signature)
+ != 0x4550)
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
-
+
/* Here is the hack. coff_object_p wants to read filhsz bytes to
- pick up the COFF header. We adjust so that that will work. 20
- is the size of the i386 COFF filehdr. */
+ pick up the COFF header for PE, see "struct external_PEI_filehdr"
+ in include/coff/pe.h. We adjust so that that will work. */
if (bfd_seek (abfd,
- (bfd_tell (abfd)
- - bfd_coff_filhsz (abfd)
- + 20),
+ (file_ptr) (offset - sizeof (dos_hdr)),
SEEK_SET)
!= 0)
{
diff --git a/gnu/usr.bin/binutils/bfd/ppcboot.c b/gnu/usr.bin/binutils/bfd/ppcboot.c
index 9441848b3d3..b2250a00c1d 100644
--- a/gnu/usr.bin/binutils/bfd/ppcboot.c
+++ b/gnu/usr.bin/binutils/bfd/ppcboot.c
@@ -1,5 +1,6 @@
/* BFD back-end for PPCbug boot records.
- Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -234,7 +235,7 @@ ppcboot_get_section_contents (abfd, section, location, offset, count)
file_ptr offset;
bfd_size_type count;
{
- if (bfd_seek (abfd, offset + sizeof(ppcboot_hdr_t), SEEK_SET) != 0
+ if (bfd_seek (abfd, offset + sizeof (ppcboot_hdr_t), SEEK_SET) != 0
|| bfd_read (location, 1, count, abfd) != count)
return false;
return true;
@@ -536,6 +537,6 @@ const bfd_target ppcboot_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
NULL
};
diff --git a/gnu/usr.bin/binutils/bfd/ptrace-core.c b/gnu/usr.bin/binutils/bfd/ptrace-core.c
index 0969dce4c05..704391af9a3 100644
--- a/gnu/usr.bin/binutils/bfd/ptrace-core.c
+++ b/gnu/usr.bin/binutils/bfd/ptrace-core.c
@@ -1,5 +1,6 @@
/* BFD backend for core files which use the ptrace_user structure
- Copyright 1993, 94, 95, 96, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001
+ Free Software Foundation, Inc.
The structure of this file is based on trad-core.c written by John Gilmore
of Cygnus Support.
Modified to work with the ptrace_user structure by Kevin A. Buettner.
@@ -32,7 +33,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <signal.h>
#include <sys/ptrace.h>
-
struct trad_core_struct
{
asection *data_section;
@@ -66,7 +66,7 @@ ptrace_unix_core_file_p (abfd)
struct trad_core_struct *rawptr;
val = bfd_read ((void *)&u, 1, sizeof u, abfd);
- if (val != sizeof u || u.pt_magic != _BCS_PTRACE_MAGIC
+ if (val != sizeof u || u.pt_magic != _BCS_PTRACE_MAGIC
|| u.pt_rev != _BCS_PTRACE_REV)
{
/* Too small to be a core file */
@@ -83,7 +83,7 @@ ptrace_unix_core_file_p (abfd)
if (rawptr == NULL)
return 0;
-
+
abfd->tdata.trad_core_data = rawptr;
rawptr->u = u; /*Copy the uarea into the tdata part of the bfd */
@@ -107,8 +107,7 @@ ptrace_unix_core_file_p (abfd)
/* FIXME: Need to worry about shared memory, library data, and library
text. I don't think that any of these things are supported on the
- system on which I am developing this for though. */
-
+ system on which I am developing this for though. */
core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
@@ -116,11 +115,11 @@ ptrace_unix_core_file_p (abfd)
core_datasec (abfd)->_raw_size = u.pt_dsize;
core_stacksec (abfd)->_raw_size = u.pt_ssize;
- core_regsec (abfd)->_raw_size = sizeof(u);
+ core_regsec (abfd)->_raw_size = sizeof (u);
core_datasec (abfd)->vma = u.pt_o_data_start;
core_stacksec (abfd)->vma = USRSTACK - u.pt_ssize;
- core_regsec (abfd)->vma = 0 - sizeof(u); /* see trad-core.c */
+ core_regsec (abfd)->vma = 0 - sizeof (u); /* see trad-core.c */
core_datasec (abfd)->filepos = (int) u.pt_dataptr;
core_stacksec (abfd)->filepos = (int) (u.pt_dataptr + u.pt_dsize);
@@ -163,16 +162,16 @@ boolean
ptrace_unix_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd, *exec_bfd;
{
- /* FIXME: Use pt_timdat field of the ptrace_user structure to match
+ /* FIXME: Use pt_timdat field of the ptrace_user structure to match
the date of the executable */
return true;
}
/* If somebody calls any byte-swapping routines, shoot them. */
static void
-swap_abort()
+swap_abort ()
{
- abort(); /* This way doesn't require any declaration for ANSI to fuck up */
+ abort (); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
@@ -213,7 +212,7 @@ const bfd_target ptrace_core_vec =
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (ptrace_unix),
@@ -225,7 +224,7 @@ const bfd_target ptrace_core_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0 /* backend_data */
};
diff --git a/gnu/usr.bin/binutils/bfd/reloc.c b/gnu/usr.bin/binutils/bfd/reloc.c
index ef2375a0d79..1c45f6fe03f 100644
--- a/gnu/usr.bin/binutils/bfd/reloc.c
+++ b/gnu/usr.bin/binutils/bfd/reloc.c
@@ -1,5 +1,6 @@
/* BFD support for handling relocation entries.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -146,7 +147,6 @@ DESCRIPTION
to the relocation offset. Its interpretation is dependent upon
the howto. For example, on the 68k the code:
-
| char foo[];
| main()
| {
@@ -161,11 +161,9 @@ DESCRIPTION
| unlk fp
| rts
-
This could create a reloc pointing to <<foo>>, but leave the
offset in the data, something like:
-
|RELOCATION RECORDS FOR [.text]:
|offset type value
|00000006 32 _foo
@@ -176,21 +174,17 @@ DESCRIPTION
|0000000c 4e5e ; unlk fp
|0000000e 4e75 ; rts
-
Using coff and an 88k, some instructions don't have enough
space in them to represent the full address range, and
pointers have to be loaded in two parts. So you'd get something like:
-
| or.u r13,r0,hi16(_foo+0x12345678)
| ld.b r2,r13,lo16(_foo+0x12345678)
| jmp r1
-
This should create two relocs, both pointing to <<_foo>>, and with
0x12340000 in their addend field. The data would consist of:
-
|RELOCATION RECORDS FOR [.text]:
|offset type value
|00000002 HVRT16 _foo+0x12340000
@@ -200,7 +194,6 @@ DESCRIPTION
|00000004 1c4d5678 ; ld.b r2,r13,0x5678
|00000008 f400c001 ; jmp r1
-
The relocation routine digs out the value from the data, adds
it to the addend to get the original offset, and then adds the
value of <<_foo>>. Note that all 32 bits have to be kept around
@@ -223,7 +216,6 @@ DESCRIPTION
Both relocs contain a pointer to <<foo>>, and the offsets
contain junk.
-
|RELOCATION RECORDS FOR [.text]:
|offset type value
|00000004 HI22 _foo+0x12345678
@@ -235,7 +227,6 @@ DESCRIPTION
|0000000c 81c7e008 ; ret
|00000010 81e80000 ; restore
-
o <<howto>>
The <<howto>> field can be imagined as a
@@ -391,7 +382,6 @@ FUNCTION
DESCRIPTION
The HOWTO define is horrible and will go away.
-
.#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
. {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
@@ -399,7 +389,6 @@ DESCRIPTION
And will be replaced with the totally magic way. But for the
moment, we are compatible, so do it this way.
-
.#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
.
@@ -589,7 +578,6 @@ DESCRIPTION
*/
-
bfd_reloc_status_type
bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
error_message)
@@ -651,7 +639,6 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
else
relocation = symbol->value;
-
reloc_target_output_section = symbol->section->output_section;
/* Convert input-section-relative symbol value to absolute. */
@@ -728,8 +715,6 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
/* WTF?? */
if (abfd->xvec->flavour == bfd_target_coff_flavour
- && strcmp (abfd->xvec->name, "aixcoff-rs6000") != 0
- && strcmp (abfd->xvec->name, "xcoff-powermac") != 0
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
{
@@ -992,7 +977,6 @@ DESCRIPTION
*/
-
bfd_reloc_status_type
bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
input_section, error_message)
@@ -1124,8 +1108,6 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
/* WTF?? */
if (abfd->xvec->flavour == bfd_target_coff_flavour
- && strcmp (abfd->xvec->name, "aixcoff-rs6000") != 0
- && strcmp (abfd->xvec->name, "xcoff-powermac") != 0
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
{
@@ -1784,7 +1766,6 @@ displacements off that register. These relocation types are
handled specially, because the value the register will have is
decided relatively late.
-
ENUM
BFD_RELOC_I960_CALLJ
ENUMDOC
@@ -1819,7 +1800,11 @@ ENUMX
ENUMX
BFD_RELOC_SPARC_RELATIVE
ENUMX
+ BFD_RELOC_SPARC_UA16
+ENUMX
BFD_RELOC_SPARC_UA32
+ENUMX
+ BFD_RELOC_SPARC_UA64
ENUMDOC
SPARC ELF relocations. There is probably some overlap with other
relocation types already defined.
@@ -2056,6 +2041,28 @@ ENUMX
BFD_RELOC_MIPS_GOT_OFST
ENUMX
BFD_RELOC_MIPS_GOT_DISP
+ENUMX
+ BFD_RELOC_MIPS_SHIFT5
+ENUMX
+ BFD_RELOC_MIPS_SHIFT6
+ENUMX
+ BFD_RELOC_MIPS_INSERT_A
+ENUMX
+ BFD_RELOC_MIPS_INSERT_B
+ENUMX
+ BFD_RELOC_MIPS_DELETE
+ENUMX
+ BFD_RELOC_MIPS_HIGHEST
+ENUMX
+ BFD_RELOC_MIPS_HIGHER
+ENUMX
+ BFD_RELOC_MIPS_SCN_DISP
+ENUMX
+ BFD_RELOC_MIPS_REL16
+ENUMX
+ BFD_RELOC_MIPS_RELGOT
+ENUMX
+ BFD_RELOC_MIPS_JALR
COMMENT
ENUMDOC
MIPS ELF relocations.
@@ -2082,6 +2089,25 @@ ENUMDOC
i386/elf relocations
ENUM
+ BFD_RELOC_X86_64_GOT32
+ENUMX
+ BFD_RELOC_X86_64_PLT32
+ENUMX
+ BFD_RELOC_X86_64_COPY
+ENUMX
+ BFD_RELOC_X86_64_GLOB_DAT
+ENUMX
+ BFD_RELOC_X86_64_JUMP_SLOT
+ENUMX
+ BFD_RELOC_X86_64_RELATIVE
+ENUMX
+ BFD_RELOC_X86_64_GOTPCREL
+ENUMX
+ BFD_RELOC_X86_64_32S
+ENUMDOC
+ x86-64/elf relocations
+
+ENUM
BFD_RELOC_NS32K_IMM_8
ENUMX
BFD_RELOC_NS32K_IMM_16
@@ -2204,6 +2230,18 @@ ENUMDOC
ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
not stored in the instruction.
ENUM
+ BFD_RELOC_ARM_PCREL_BLX
+ENUMDOC
+ ARM 26 bit pc-relative branch. The lowest bit must be zero and is
+ not stored in the instruction. The 2nd lowest bit comes from a 1 bit
+ field in the instruction.
+ENUM
+ BFD_RELOC_THUMB_PCREL_BLX
+ENUMDOC
+ Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
+ not stored in the instruction. The 2nd lowest bit comes from a 1 bit
+ field in the instruction.
+ENUM
BFD_RELOC_ARM_IMMEDIATE
ENUMX
BFD_RELOC_ARM_ADRL_IMMEDIATE
@@ -2295,6 +2333,20 @@ ENUMX
BFD_RELOC_SH_DATA
ENUMX
BFD_RELOC_SH_LABEL
+ENUMX
+ BFD_RELOC_SH_LOOP_START
+ENUMX
+ BFD_RELOC_SH_LOOP_END
+ENUMX
+ BFD_RELOC_SH_COPY
+ENUMX
+ BFD_RELOC_SH_GLOB_DAT
+ENUMX
+ BFD_RELOC_SH_JMP_SLOT
+ENUMX
+ BFD_RELOC_SH_RELATIVE
+ENUMX
+ BFD_RELOC_SH_GOTPC
ENUMDOC
Hitachi SH relocs. Not all of these appear in object files.
@@ -2311,7 +2363,7 @@ ENUMDOC
ENUM
BFD_RELOC_ARC_B22_PCREL
ENUMDOC
- Argonaut RISC Core (ARC) relocs.
+ ARC Cores relocs.
ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
not stored in the instruction. The high 20 bits are installed in bits 26
through 7 of the instruction.
@@ -2538,6 +2590,39 @@ ENUMDOC
significant 8 bits of the opcode.
ENUM
+ BFD_RELOC_TIC54X_PARTLS7
+ENUMDOC
+ This is a 7bit reloc for the tms320c54x, where the least
+ significant 7 bits of a 16 bit word are placed into the least
+ significant 7 bits of the opcode.
+
+ENUM
+ BFD_RELOC_TIC54X_PARTMS9
+ENUMDOC
+ This is a 9bit DP reloc for the tms320c54x, where the most
+ significant 9 bits of a 16 bit word are placed into the least
+ significant 9 bits of the opcode.
+
+ENUM
+ BFD_RELOC_TIC54X_23
+ENUMDOC
+ This is an extended address 23-bit reloc for the tms320c54x.
+
+ENUM
+ BFD_RELOC_TIC54X_16_OF_23
+ENUMDOC
+ This is a 16-bit reloc for the tms320c54x, where the least
+ significant 16 bits of a 23-bit extended address are placed into
+ the opcode.
+
+ENUM
+ BFD_RELOC_TIC54X_MS7_OF_23
+ENUMDOC
+ This is a reloc for the tms320c54x, where the most
+ significant 7 bits of a 23-bit extended address are placed into
+ the opcode.
+
+ENUM
BFD_RELOC_FR30_48
ENUMDOC
This is a 48 bit reloc for the FR30 that stores 32 bits.
@@ -2606,7 +2691,7 @@ ENUM
BFD_RELOC_AVR_16_PM
ENUMDOC
This is a 16 bit reloc for the AVR that stores 17 bit value (usually
- program memory address) into 16 bits.
+ program memory address) into 16 bits.
ENUM
BFD_RELOC_AVR_LO8_LDI
ENUMDOC
@@ -2700,6 +2785,234 @@ ENUMDOC
is stored in the reloc's addend. For Rel hosts, we are forced to put
this offset in the reloc's section offset.
+ENUM
+ BFD_RELOC_IA64_IMM14
+ENUMX
+ BFD_RELOC_IA64_IMM22
+ENUMX
+ BFD_RELOC_IA64_IMM64
+ENUMX
+ BFD_RELOC_IA64_DIR32MSB
+ENUMX
+ BFD_RELOC_IA64_DIR32LSB
+ENUMX
+ BFD_RELOC_IA64_DIR64MSB
+ENUMX
+ BFD_RELOC_IA64_DIR64LSB
+ENUMX
+ BFD_RELOC_IA64_GPREL22
+ENUMX
+ BFD_RELOC_IA64_GPREL64I
+ENUMX
+ BFD_RELOC_IA64_GPREL32MSB
+ENUMX
+ BFD_RELOC_IA64_GPREL32LSB
+ENUMX
+ BFD_RELOC_IA64_GPREL64MSB
+ENUMX
+ BFD_RELOC_IA64_GPREL64LSB
+ENUMX
+ BFD_RELOC_IA64_LTOFF22
+ENUMX
+ BFD_RELOC_IA64_LTOFF64I
+ENUMX
+ BFD_RELOC_IA64_PLTOFF22
+ENUMX
+ BFD_RELOC_IA64_PLTOFF64I
+ENUMX
+ BFD_RELOC_IA64_PLTOFF64MSB
+ENUMX
+ BFD_RELOC_IA64_PLTOFF64LSB
+ENUMX
+ BFD_RELOC_IA64_FPTR64I
+ENUMX
+ BFD_RELOC_IA64_FPTR32MSB
+ENUMX
+ BFD_RELOC_IA64_FPTR32LSB
+ENUMX
+ BFD_RELOC_IA64_FPTR64MSB
+ENUMX
+ BFD_RELOC_IA64_FPTR64LSB
+ENUMX
+ BFD_RELOC_IA64_PCREL21B
+ENUMX
+ BFD_RELOC_IA64_PCREL21BI
+ENUMX
+ BFD_RELOC_IA64_PCREL21M
+ENUMX
+ BFD_RELOC_IA64_PCREL21F
+ENUMX
+ BFD_RELOC_IA64_PCREL22
+ENUMX
+ BFD_RELOC_IA64_PCREL60B
+ENUMX
+ BFD_RELOC_IA64_PCREL64I
+ENUMX
+ BFD_RELOC_IA64_PCREL32MSB
+ENUMX
+ BFD_RELOC_IA64_PCREL32LSB
+ENUMX
+ BFD_RELOC_IA64_PCREL64MSB
+ENUMX
+ BFD_RELOC_IA64_PCREL64LSB
+ENUMX
+ BFD_RELOC_IA64_LTOFF_FPTR22
+ENUMX
+ BFD_RELOC_IA64_LTOFF_FPTR64I
+ENUMX
+ BFD_RELOC_IA64_LTOFF_FPTR64MSB
+ENUMX
+ BFD_RELOC_IA64_LTOFF_FPTR64LSB
+ENUMX
+ BFD_RELOC_IA64_SEGREL32MSB
+ENUMX
+ BFD_RELOC_IA64_SEGREL32LSB
+ENUMX
+ BFD_RELOC_IA64_SEGREL64MSB
+ENUMX
+ BFD_RELOC_IA64_SEGREL64LSB
+ENUMX
+ BFD_RELOC_IA64_SECREL32MSB
+ENUMX
+ BFD_RELOC_IA64_SECREL32LSB
+ENUMX
+ BFD_RELOC_IA64_SECREL64MSB
+ENUMX
+ BFD_RELOC_IA64_SECREL64LSB
+ENUMX
+ BFD_RELOC_IA64_REL32MSB
+ENUMX
+ BFD_RELOC_IA64_REL32LSB
+ENUMX
+ BFD_RELOC_IA64_REL64MSB
+ENUMX
+ BFD_RELOC_IA64_REL64LSB
+ENUMX
+ BFD_RELOC_IA64_LTV32MSB
+ENUMX
+ BFD_RELOC_IA64_LTV32LSB
+ENUMX
+ BFD_RELOC_IA64_LTV64MSB
+ENUMX
+ BFD_RELOC_IA64_LTV64LSB
+ENUMX
+ BFD_RELOC_IA64_IPLTMSB
+ENUMX
+ BFD_RELOC_IA64_IPLTLSB
+ENUMX
+ BFD_RELOC_IA64_COPY
+ENUMX
+ BFD_RELOC_IA64_TPREL22
+ENUMX
+ BFD_RELOC_IA64_TPREL64MSB
+ENUMX
+ BFD_RELOC_IA64_TPREL64LSB
+ENUMX
+ BFD_RELOC_IA64_LTOFF_TP22
+ENUMX
+ BFD_RELOC_IA64_LTOFF22X
+ENUMX
+ BFD_RELOC_IA64_LDXMOV
+ENUMDOC
+ Intel IA64 Relocations.
+
+ENUM
+ BFD_RELOC_M68HC11_HI8
+ENUMDOC
+ Motorola 68HC11 reloc.
+ This is the 8 bits high part of an absolute address.
+ENUM
+ BFD_RELOC_M68HC11_LO8
+ENUMDOC
+ Motorola 68HC11 reloc.
+ This is the 8 bits low part of an absolute address.
+ENUM
+ BFD_RELOC_M68HC11_3B
+ENUMDOC
+ Motorola 68HC11 reloc.
+ This is the 3 bits of a value.
+
+ENUM
+ BFD_RELOC_CRIS_BDISP8
+ENUMX
+ BFD_RELOC_CRIS_UNSIGNED_5
+ENUMX
+ BFD_RELOC_CRIS_SIGNED_6
+ENUMX
+ BFD_RELOC_CRIS_UNSIGNED_6
+ENUMX
+ BFD_RELOC_CRIS_UNSIGNED_4
+ENUMDOC
+ These relocs are only used within the CRIS assembler. They are not
+ (at present) written to any object files.
+
+ENUM
+ BFD_RELOC_860_COPY
+ENUMX
+ BFD_RELOC_860_GLOB_DAT
+ENUMX
+ BFD_RELOC_860_JUMP_SLOT
+ENUMX
+ BFD_RELOC_860_RELATIVE
+ENUMX
+ BFD_RELOC_860_PC26
+ENUMX
+ BFD_RELOC_860_PLT26
+ENUMX
+ BFD_RELOC_860_PC16
+ENUMX
+ BFD_RELOC_860_LOW0
+ENUMX
+ BFD_RELOC_860_SPLIT0
+ENUMX
+ BFD_RELOC_860_LOW1
+ENUMX
+ BFD_RELOC_860_SPLIT1
+ENUMX
+ BFD_RELOC_860_LOW2
+ENUMX
+ BFD_RELOC_860_SPLIT2
+ENUMX
+ BFD_RELOC_860_LOW3
+ENUMX
+ BFD_RELOC_860_LOGOT0
+ENUMX
+ BFD_RELOC_860_SPGOT0
+ENUMX
+ BFD_RELOC_860_LOGOT1
+ENUMX
+ BFD_RELOC_860_SPGOT1
+ENUMX
+ BFD_RELOC_860_LOGOTOFF0
+ENUMX
+ BFD_RELOC_860_SPGOTOFF0
+ENUMX
+ BFD_RELOC_860_LOGOTOFF1
+ENUMX
+ BFD_RELOC_860_SPGOTOFF1
+ENUMX
+ BFD_RELOC_860_LOGOTOFF2
+ENUMX
+ BFD_RELOC_860_LOGOTOFF3
+ENUMX
+ BFD_RELOC_860_LOPC
+ENUMX
+ BFD_RELOC_860_HIGHADJ
+ENUMX
+ BFD_RELOC_860_HAGOT
+ENUMX
+ BFD_RELOC_860_HAGOTOFF
+ENUMX
+ BFD_RELOC_860_HAPC
+ENUMX
+ BFD_RELOC_860_HIGH
+ENUMX
+ BFD_RELOC_860_HIGOT
+ENUMX
+ BFD_RELOC_860_HIGOTOFF
+ENUMDOC
+ Intel i860 Relocations.
+
ENDSENUM
BFD_RELOC_UNUSED
CODE_FRAGMENT
@@ -2707,7 +3020,6 @@ CODE_FRAGMENT
.typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
*/
-
/*
FUNCTION
bfd_reloc_type_lookup
@@ -2723,7 +3035,6 @@ DESCRIPTION
*/
-
reloc_howto_type *
bfd_reloc_type_lookup (abfd, code)
bfd *abfd;
@@ -2735,7 +3046,6 @@ bfd_reloc_type_lookup (abfd, code)
static reloc_howto_type bfd_howto_32 =
HOWTO (0, 00, 2, 32, false, 0, complain_overflow_bitfield, 0, "VRT32", false, 0xffffffff, 0xffffffff, true);
-
/*
INTERNAL_FUNCTION
bfd_default_reloc_type_lookup
@@ -2747,7 +3057,6 @@ SYNOPSIS
DESCRIPTION
Provides a default relocation lookup routine for any architecture.
-
*/
reloc_howto_type *
diff --git a/gnu/usr.bin/binutils/bfd/reloc16.c b/gnu/usr.bin/binutils/bfd/reloc16.c
index 0e7c18abfd9..7de8d95b8ed 100644
--- a/gnu/usr.bin/binutils/bfd/reloc16.c
+++ b/gnu/usr.bin/binutils/bfd/reloc16.c
@@ -1,5 +1,5 @@
/* 8 and 16 bit COFF relocation functions, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -19,10 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/*
-Most of this hacked by Steve Chamberlain,
- sac@cygnus.com
-*/
+/* Most of this hacked by Steve Chamberlain <sac@cygnus.com>. */
/* These routines are used by coff-h8300 and coff-z8k to do
relocation.
@@ -53,7 +50,7 @@ bfd_coff_reloc16_get_value (reloc, link_info, input_section)
asymbol *symbol = *(reloc->sym_ptr_ptr);
/* A symbol holds a pointer to a section, and an offset from the
base of the section. To relocate, we find where the section will
- live in the output and add that in */
+ live in the output and add that in. */
if (bfd_is_und_section (symbol->section)
|| bfd_is_com_section (symbol->section))
@@ -79,29 +76,29 @@ bfd_coff_reloc16_get_value (reloc, link_info, input_section)
value = h->u.c.size;
else
{
- if (! ((*link_info->callbacks->undefined_symbol)
- (link_info, bfd_asymbol_name (symbol),
- input_section->owner, input_section, reloc->address,
- true)))
+ if (!((*link_info->callbacks->undefined_symbol)
+ (link_info, bfd_asymbol_name (symbol),
+ input_section->owner, input_section, reloc->address,
+ true)))
abort ();
value = 0;
}
}
- else
+ else
{
- value = symbol->value +
- symbol->section->output_offset +
- symbol->section->output_section->vma;
+ value = symbol->value
+ + symbol->section->output_offset
+ + symbol->section->output_section->vma;
}
-
- /* Add the value contained in the relocation */
+
+ /* Add the value contained in the relocation. */
value += reloc->addend;
-
+
return value;
}
void
-bfd_perform_slip(abfd, slip, input_section, value)
+bfd_perform_slip (abfd, slip, input_section, value)
bfd *abfd;
unsigned int slip;
asection *input_section;
@@ -113,13 +110,13 @@ bfd_perform_slip(abfd, slip, input_section, value)
BFD_ASSERT (s != (asymbol **) NULL);
/* Find all symbols past this point, and make them know
- what's happened */
- while (*s)
+ what's happened. */
+ while (*s)
{
asymbol *p = *s;
- if (p->section == input_section)
+ if (p->section == input_section)
{
- /* This was pointing into this section, so mangle it */
+ /* This was pointing into this section, so mangle it. */
if (p->value > value)
{
p->value -= slip;
@@ -136,17 +133,17 @@ bfd_perform_slip(abfd, slip, input_section, value)
}
}
s++;
- }
+ }
}
-boolean
+boolean
bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
bfd *abfd;
asection *i;
struct bfd_link_info *link_info;
boolean *again;
{
- /* Get enough memory to hold the stuff */
+ /* Get enough memory to hold the stuff. */
bfd *input_bfd = i->owner;
asection *input_section = i;
int *shrinks;
@@ -166,7 +163,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
if (!reloc_vector && reloc_size > 0)
return false;
- /* Get the relocs and think about them */
+ /* Get the relocs and think about them. */
reloc_count =
bfd_canonicalize_reloc (input_bfd, input_section, reloc_vector,
_bfd_generic_link_get_symbols (input_bfd));
@@ -190,7 +187,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
entire link, we could use the generic relaxing code in the linker
and get better results, particularly for jsr->bsr and 24->16 bit
memory reference relaxations. */
-
+
if (reloc_count > 0)
{
int another_pass = 0;
@@ -208,7 +205,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
another_pass = 0;
- for (i = 0, parent = reloc_vector; *parent; parent++, i++)
+ for (i = 0, parent = reloc_vector; *parent; parent++, i++)
{
/* Let the target/machine dependent code examine each reloc
in this section and attempt to shrink it. */
@@ -224,15 +221,15 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
shrinks[j] += shrink - shrinks[i];
}
}
-
- } while (another_pass);
+ }
+ while (another_pass);
shrink = shrinks[reloc_count];
- free((char *)shrinks);
+ free ((char *) shrinks);
}
- input_section->_cooked_size -= shrink;
- free((char *)reloc_vector);
+ input_section->_cooked_size -= shrink;
+ free ((char *) reloc_vector);
return true;
}
@@ -250,7 +247,7 @@ bfd_coff_reloc16_get_relocated_section_contents(in_abfd,
boolean relocateable;
asymbol **symbols;
{
- /* Get enough memory to hold the stuff */
+ /* Get enough memory to hold the stuff. */
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
@@ -267,20 +264,19 @@ bfd_coff_reloc16_get_relocated_section_contents(in_abfd,
data, relocateable,
symbols);
- /* read in the section */
- if (! bfd_get_section_contents(input_bfd,
- input_section,
- data,
- 0,
- input_section->_raw_size))
+ /* Read in the section. */
+ if (!bfd_get_section_contents(input_bfd,
+ input_section,
+ data,
+ 0,
+ input_section->_raw_size))
return NULL;
-
-
- reloc_vector = (arelent **) bfd_malloc((size_t) reloc_size);
+
+ reloc_vector = (arelent **) bfd_malloc ((size_t) reloc_size);
if (!reloc_vector && reloc_size != 0)
return NULL;
-
- reloc_count = bfd_canonicalize_reloc (input_bfd,
+
+ reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
reloc_vector,
symbols);
@@ -289,49 +285,46 @@ bfd_coff_reloc16_get_relocated_section_contents(in_abfd,
free (reloc_vector);
return NULL;
}
-
+
if (reloc_count > 0)
{
arelent **parent = reloc_vector;
- arelent *reloc ;
+ arelent *reloc;
unsigned int dst_address = 0;
unsigned int src_address = 0;
unsigned int run;
unsigned int idx;
-
- /* Find how long a run we can do */
- while (dst_address < link_order->size)
+
+ /* Find how long a run we can do. */
+ while (dst_address < link_order->size)
{
reloc = *parent;
- if (reloc)
+ if (reloc)
{
/* Note that the relaxing didn't tie up the addresses in the
relocation, so we use the original address to work out the
- run of non-relocated data */
+ run of non-relocated data. */
run = reloc->address - src_address;
parent++;
}
- else
+ else
{
run = link_order->size - dst_address;
}
- /* Copy the bytes */
+
+ /* Copy the bytes. */
for (idx = 0; idx < run; idx++)
- {
- data[dst_address++] = data[src_address++];
- }
-
- /* Now do the relocation */
-
- if (reloc)
+ data[dst_address++] = data[src_address++];
+
+ /* Now do the relocation. */
+ if (reloc)
{
bfd_coff_reloc16_extra_cases (input_bfd, link_info, link_order,
reloc, data, &src_address,
&dst_address);
- }
+ }
}
}
- free((char *)reloc_vector);
+ free ((char *) reloc_vector);
return data;
}
-
diff --git a/gnu/usr.bin/binutils/bfd/riscix.c b/gnu/usr.bin/binutils/bfd/riscix.c
index b3eb18cc534..f5a9ec9bdcb 100644
--- a/gnu/usr.bin/binutils/bfd/riscix.c
+++ b/gnu/usr.bin/binutils/bfd/riscix.c
@@ -1,7 +1,8 @@
/* BFD back-end for RISC iX (Acorn, arm) binaries.
- Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
+
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -18,7 +19,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
/* RISC iX overloads the MAGIC field to indicate more than just the usual
[ZNO]MAGIC values. Also included are squeezing information and
shared library usage. */
@@ -36,17 +36,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SPOMAGIC (MF_USES_SL|OMAGIC) /* OMAGIC with large header */
/* -- may contain a ref to a */
/* shared lib required by the */
- /* object. */
+ /* object. */
#define SLOMAGIC (MF_IS_SL|OMAGIC) /* A reference to a shared library */
/* The text portion of the object */
/* contains "overflow text" from */
/* the shared library to be linked */
/* in with an object */
-#define QMAGIC (MF_SQUEEZED|ZMAGIC) /* Sqeezed demand paged. */
+#define QMAGIC (MF_SQUEEZED|ZMAGIC) /* Sqeezed demand paged. */
/* NOTE: This interpretation of */
/* QMAGIC seems to be at variance */
/* With that used on other */
- /* architectures. */
+ /* architectures. */
#define SPZMAGIC (MF_USES_SL|ZMAGIC) /* program which uses sl */
#define SPQMAGIC (MF_USES_SL|QMAGIC) /* sqeezed ditto */
#define SLZMAGIC (MF_IS_SL|ZMAGIC) /* shared lib part of prog */
@@ -115,20 +115,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
if (bfd_get_outsymbols (abfd) != (asymbol **) NULL \
&& bfd_get_symcount (abfd) != 0) \
{ \
- if (bfd_seek (abfd, (file_ptr)(N_SYMOFF(*execp)), SEEK_SET) != 0) \
+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0) \
return false; \
\
- if (! NAME(aout,write_syms)(abfd)) return false; \
+ if (! NAME(aout,write_syms) (abfd)) return false; \
\
- if (bfd_seek (abfd, (file_ptr)(N_TRELOFF(*execp)), SEEK_SET) != 0) \
+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*execp)), SEEK_SET) != 0) \
return false; \
\
if (! riscix_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; \
} \
}
@@ -162,7 +162,6 @@ static reloc_howto_type riscix_std_reloc_howto[] = {
#define RISCIX_TABLE_SIZE \
(sizeof (riscix_std_reloc_howto) / sizeof (reloc_howto_type))
-
static bfd_reloc_status_type
riscix_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
@@ -193,7 +192,7 @@ riscix_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
bfd_size_type addr = reloc_entry->address;
long target = bfd_get_32 (abfd, (bfd_byte *) data + addr);
bfd_reloc_status_type flag = bfd_reloc_ok;
-
+
/* If this is an undefined symbol, return error */
if (symbol->section == &bfd_und_section
&& (symbol->flags & BSF_WEAK) == 0)
@@ -233,14 +232,14 @@ riscix_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 = &riscix_std_reloc_howto[7];
-
+
return flag;
}
reloc_howto_type *
-DEFUN(riscix_reloc_type_lookup,(abfd,code),
- bfd *abfd AND
- bfd_reloc_code_real_type code)
+riscix_reloc_type_lookup (abfd, code)
+ bfd *abfd;
+ bfd_reloc_code_real_type code;
{
#define ASTD(i,j) case i: return &riscix_std_reloc_howto[j]
if (code == BFD_RELOC_CTOR)
@@ -303,10 +302,9 @@ riscix_swap_std_reloc_out (abfd, g, natptr)
/* For RISC iX, in pc-relative relocs the r_pcrel bit means that the
relocation has been done already (Only for the 26-bit one I think)???!!!
*/
-
+
if (r_length == 3)
r_pcrel = r_pcrel ? 0 : 1;
-
#if 0
/* For a standard reloc, the addend is in the object file. */
@@ -381,7 +379,7 @@ riscix_squirt_out_relocs (abfd, section)
arelent **generic;
unsigned char *native, *natptr;
size_t each_size;
-
+
unsigned int count = section->reloc_count;
size_t natsize;
@@ -411,13 +409,12 @@ riscix_squirt_out_relocs (abfd, section)
return true;
}
-
/*
* This is just like the standard aoutx.h version but we need to do our
* own mapping of external reloc type values to howto entries.
*/
long
-MY(canonicalize_reloc)(abfd, section, relptr, symbols)
+MY(canonicalize_reloc) (abfd, section, relptr, symbols)
bfd *abfd;
sec_ptr section;
arelent **relptr;
@@ -427,7 +424,7 @@ MY(canonicalize_reloc)(abfd, section, relptr, symbols)
unsigned int count, c;
extern reloc_howto_type NAME(aout,std_howto_table)[];
- /* If we have already read in the relocation table, return the values. */
+ /* If we have already read in the relocation table, return the values. */
if (section->flags & SEC_CONSTRUCTOR) {
arelent_chain *chain = section->constructor_chain;
@@ -445,7 +442,7 @@ MY(canonicalize_reloc)(abfd, section, relptr, symbols)
return section->reloc_count;
}
- if (!NAME(aout,slurp_reloc_table)(abfd, section, symbols))
+ if (!NAME(aout,slurp_reloc_table) (abfd, section, symbols))
return -1;
tblptr = section->relocation;
@@ -462,7 +459,7 @@ MY(canonicalize_reloc)(abfd, section, relptr, symbols)
return section->reloc_count;
}
-/* This is the same as NAME(aout,some_aout_object_p), but has different
+/* This is the same as NAME(aout,some_aout_object_p), but has different
expansions of the macro definitions. */
const bfd_target *
@@ -474,7 +471,7 @@ riscix_some_aout_object_p (abfd, execp, callback_to_real_object_p)
struct aout_data_struct *rawptr, *oldrawptr;
const bfd_target *result;
- rawptr = ((struct aout_data_struct *)
+ rawptr = ((struct aout_data_struct *)
bfd_zalloc (abfd, sizeof (struct aout_data_struct )));
if (rawptr == NULL)
@@ -505,8 +502,7 @@ riscix_some_aout_object_p (abfd, execp, callback_to_real_object_p)
if (N_DYNAMIC(*execp))
abfd->flags |= DYNAMIC;
-
- if ((execp->a_info & MF_SQUEEZED) != 0) /* Squeezed files aren't supported
+ if ((execp->a_info & MF_SQUEEZED) != 0) /* Squeezed files aren't supported
(yet)! */
{
bfd_set_error (bfd_error_wrong_format);
@@ -544,7 +540,7 @@ riscix_some_aout_object_p (abfd, execp, callback_to_real_object_p)
/* The default relocation entry size is that of traditional V7 Unix. */
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
- /* The default symbol entry size is that of traditional Unix. */
+ /* The default symbol entry size is that of traditional Unix. */
obj_symbol_entry_size (abfd) = EXTERNAL_NLIST_SIZE;
obj_aout_external_syms (abfd) = NULL;
@@ -567,7 +563,7 @@ riscix_some_aout_object_p (abfd, execp, callback_to_real_object_p)
: (SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS));
obj_bsssec (abfd)->flags = SEC_ALLOC;
- result = (*callback_to_real_object_p)(abfd);
+ result = (*callback_to_real_object_p) (abfd);
#if defined(MACH) || defined(STAT_FOR_EXEC)
/* The original heuristic doesn't work in some important cases. The
@@ -610,7 +606,6 @@ riscix_some_aout_object_p (abfd, execp, callback_to_real_object_p)
return result;
}
-
static const bfd_target *
MY(object_p) (abfd)
bfd *abfd;
@@ -633,12 +628,11 @@ MY(object_p) (abfd)
if (!(MACHTYPE_OK (N_MACHTYPE (exec)))) return 0;
#endif
- NAME(aout,swap_exec_header_in)(abfd, &exec_bytes, &exec);
+ NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
target = riscix_some_aout_object_p (abfd, &exec, MY(callback));
return target;
}
-
#include "aout-target.h"
diff --git a/gnu/usr.bin/binutils/bfd/rs6000-core.c b/gnu/usr.bin/binutils/bfd/rs6000-core.c
index 6de7441b3eb..08b17ee947b 100644
--- a/gnu/usr.bin/binutils/bfd/rs6000-core.c
+++ b/gnu/usr.bin/binutils/bfd/rs6000-core.c
@@ -1,11 +1,12 @@
/* IBM RS/6000 "XCOFF" back-end for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
+ 2001
Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
them with octal escapes), and isn't useful without an understanding of what
character set it is.
- Written by Metin G. Ozisik, Mimi Ph\373\364ng-Th\345o V\365,
+ Written by Metin G. Ozisik, Mimi Ph\373\364ng-Th\345o V\365,
and John Gilmore.
Archive support from Damon A. Permezel.
Contributed by IBM Corporation and Cygnus Support.
@@ -30,11 +31,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
compiled on an RS/6000 host. -- no archive support, no core files.
In all cases, it does not support writing.
- FIXMEmgo comments are left from Metin Ozisik's original port.
-
This is in a separate file from coff-rs6000.c, because it includes
- system include files that conflict with coff/rs6000.h.
- */
+ system include files that conflict with coff/rs6000.h. */
/* Internalcoff.h and coffcode.h modify themselves based on this flag. */
#define RS6000COFF_C 1
@@ -62,70 +60,217 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef SCNHDR
-
/* ------------------------------------------------------------------------ */
-/* Support for core file stuff.. */
+/* Support for core file stuff.. */
/* ------------------------------------------------------------------------ */
#include <sys/user.h>
+#define __LDINFO_PTRACE32__ /* for __ld_info32 */
+#define __LDINFO_PTRACE64__ /* for __ld_info64 */
#include <sys/ldr.h>
#include <sys/core.h>
+#include <sys/systemcfg.h>
+
+#define core_hdr(bfd) ((CoreHdr *) bfd->tdata.any)
+/* AIX 4.1 changed the names and locations of a few items in the core file.
+ AIX 4.3 defined an entirely new structure, core_dumpx, but kept support for
+ the previous 4.1 structure, core_dump.
-/* Number of special purpose registers supported by gdb. This value
- should match `tm.h' in gdb directory. Clean this mess up and use
- the macros in sys/reg.h. FIXMEmgo. */
+ AIX_CORE_DUMPX_CORE is defined (by configure) on AIX 4.3+, and
+ CORE_VERSION_1 is defined (by AIX core.h) as 2 on AIX 4.3+ and as 1 on AIX
+ 4.1 and 4.2. AIX pre-4.1 (aka 3.x) either doesn't define CORE_VERSION_1
+ or else defines it as 0. */
-#define NUM_OF_SPEC_REGS 7
+#if defined(CORE_VERSION_1) && !CORE_VERSION_1
+# undef CORE_VERSION_1
+#endif
-#define core_hdr(bfd) (((Rs6kCorData*)(bfd->tdata.any))->hdr)
+/* The following union and macros allow this module to compile on all AIX
+ versions and to handle both core_dumpx and core_dump on 4.3+. CNEW_*()
+ and COLD_*() macros respectively retrieve core_dumpx and core_dump
+ values. */
-/* AIX 4.1 Changed the names and locations of a few items in the core file,
- this seems to be the quickest/easiest way to deal with it.
+/* Union of 32-bit and 64-bit versions of ld_info. */
- Note however that encoding magic addresses (STACK_END_ADDR) is going
- to be _very_ fragile. But I don't see any easy way to get that info
- right now.
-
- AIX 4.3 defines an entirely new structure (core_dumpx). Yet the
- basic logic stays the same and we can still use our macro
- redefinition mechanism to effect the necessary changes. */
+typedef union {
+#ifdef __ld_info32
+ struct __ld_info32 l32;
+ struct __ld_info64 l64;
+#else
+ struct ld_info l32;
+ struct ld_info l64;
+#endif
+} LdInfo;
+/* Union of old and new core dump structures. */
+
+typedef union {
#ifdef AIX_CORE_DUMPX_CORE
-#define CORE_DATA_SIZE_FIELD c_dataorg
-#define CORE_COMM_FIELD c_u.U_proc.pi_comm
-#define SAVE_FIELD c_flt.hctx.r32
-#define STACK_END_ADDR coredata.c_stackorg + coredata.c_size
-#define LOADER_OFFSET_FIELD c_loader
-#define LOADER_REGION_SIZE coredata.c_lsize
-#define CORE_DUMP core_dumpx
+ struct core_dumpx new; /* new AIX 4.3+ core dump */
#else
+ struct core_dump new; /* for simpler coding */
+#endif
+ struct core_dump old; /* old AIX 4.2- core dump, still used on
+ 4.3+ with appropriate SMIT config */
+} CoreHdr;
+
+/* Union of old and new vm_info structures. */
+
#ifdef CORE_VERSION_1
-#define CORE_DATA_SIZE_FIELD c_u.U_dsize
-#define CORE_COMM_FIELD c_u.U_comm
-#define SAVE_FIELD c_mst
-#define STACK_END_ADDR 0x2ff23000
-#define LOADER_OFFSET_FIELD c_tab
-#define LOADER_REGION_SIZE 0x7ffffff
-#define CORE_DUMP core_dump
+typedef union {
+#ifdef AIX_CORE_DUMPX_CORE
+ struct vm_infox new;
+#else
+ struct vm_info new;
+#endif
+ struct vm_info old;
+} VmInfo;
+#endif
+
+/* Return whether CoreHdr C is in new or old format. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CORE_NEW(c) (!(c).old.c_entries)
+#else
+# define CORE_NEW(c) 0
+#endif
+
+/* Return the c_stackorg field from struct core_dumpx C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_STACKORG(c) (c).c_stackorg
#else
-#define CORE_DATA_SIZE_FIELD c_u.u_dsize
-#define CORE_COMM_FIELD c_u.u_comm
-#define SAVE_FIELD c_u.u_save
-#define STACK_END_ADDR 0x2ff80000
-#define LOADER_OFFSET_FIELD c_tab
-#define LOADER_REGION_SIZE 0x7ffffff
-#define CORE_DUMP core_dump
+# define CNEW_STACKORG(c) 0
#endif
+
+/* Return the offset to the loader region from struct core_dump C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_LOADER(c) (c).c_loader
+#else
+# define CNEW_LOADER(c) 0
+#endif
+
+/* Return the offset to the loader region from struct core_dump C. */
+
+#define COLD_LOADER(c) (c).c_tab
+
+/* Return the c_lsize field from struct core_dumpx C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_LSIZE(c) (c).c_lsize
+#else
+# define CNEW_LSIZE(c) 0
+#endif
+
+/* Return the c_dataorg field from struct core_dumpx C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_DATAORG(c) (c).c_dataorg
+#else
+# define CNEW_DATAORG(c) 0
+#endif
+
+/* Return the c_datasize field from struct core_dumpx C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_DATASIZE(c) (c).c_datasize
+#else
+# define CNEW_DATASIZE(c) 0
#endif
-/* These are stored in the bfd's tdata */
-typedef struct {
- struct CORE_DUMP hdr; /* core file header */
-} Rs6kCorData;
+/* Return the c_impl field from struct core_dumpx C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_IMPL(c) (c).c_impl
+#else
+# define CNEW_IMPL(c) 0
+#endif
+
+/* Return the command string from struct core_dumpx C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_COMM(c) (c).c_u.U_proc.pi_comm
+#else
+# define CNEW_COMM(c) 0
+#endif
+
+/* Return the command string from struct core_dump C. */
+
+#ifdef CORE_VERSION_1
+# define COLD_COMM(c) (c).c_u.U_comm
+#else
+# define COLD_COMM(c) (c).c_u.u_comm
+#endif
+
+/* Return the struct __context64 pointer from struct core_dumpx C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_CONTEXT64(c) (c).c_flt.hctx.r64
+#else
+# define CNEW_CONTEXT64(c) c
+#endif
+
+/* Return the struct mstsave pointer from struct core_dumpx C. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_MSTSAVE(c) (c).c_flt.hctx.r32
+#else
+# define CNEW_MSTSAVE(c) c
+#endif
+
+/* Return the struct mstsave pointer from struct core_dump C. */
+
+#ifdef CORE_VERSION_1
+# define COLD_MSTSAVE(c) (c).c_mst
+#else
+# define COLD_MSTSAVE(c) (c).c_u.u_save
+#endif
+
+/* Return whether struct core_dumpx is from a 64-bit process. */
+
+#ifdef AIX_CORE_DUMPX_CORE
+# define CNEW_PROC64(c) IS_PROC64(&(c).c_u.U_proc)
+#else
+# define CNEW_PROC64(c) 0
+#endif
+
+/* Magic end-of-stack addresses for old core dumps. This is _very_ fragile,
+ but I don't see any easy way to get that info right now. */
+
+#ifdef CORE_VERSION_1
+# define COLD_STACKEND 0x2ff23000
+#else
+# define COLD_STACKEND 0x2ff80000
+#endif
+
+/* Size of the leading portion that old and new core dump structures have in
+ common. */
+#define CORE_COMMONSZ ((int) &((struct core_dump *) 0)->c_entries \
+ + sizeof (((struct core_dump *) 0)->c_entries))
+
+/* Try to read into CORE the header from the core file associated with ABFD.
+ Return success. */
+
+static boolean
+read_hdr (bfd *abfd, CoreHdr *core)
+{
+ bfd_size_type size;
+
+ if (bfd_seek (abfd, 0, SEEK_SET) != 0)
+ return false;
-static asection *make_bfd_asection PARAMS ((bfd *, CONST char *, flagword,
- bfd_size_type, bfd_vma, file_ptr));
+ /* Read the leading portion that old and new core dump structures have in
+ common. */
+ if (bfd_read (core, CORE_COMMONSZ, 1, abfd) != CORE_COMMONSZ)
+ return false;
+
+ /* Read the trailing portion of the structure. */
+ size = CORE_NEW (*core) ? sizeof (core->new) : sizeof (core->old)
+ - CORE_COMMONSZ;
+ return bfd_read ((char *) core + CORE_COMMONSZ, size, 1, abfd) == size;
+}
static asection *
make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
@@ -152,28 +297,71 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
}
/* Decide if a given bfd represents a `core' file or not. There really is no
- magic number or anything like, in rs6000coff. */
+ magic number or anything like, in rs6000coff. */
const bfd_target *
rs6000coff_core_p (abfd)
bfd *abfd;
{
- struct CORE_DUMP coredata;
+ CoreHdr core;
struct stat statbuf;
- bfd_size_type nread;
+ bfd_size_type size;
char *tmpptr;
- if (bfd_seek (abfd, 0, SEEK_SET) != 0)
- return NULL;
+ /* Values from new and old core structures. */
+ int c_flag;
+ file_ptr c_stack, c_regoff, c_loader;
+ bfd_size_type c_size, c_regsize, c_lsize;
+ bfd_vma c_stackend;
+ void *c_regptr;
+ int proc64;
- nread = bfd_read (&coredata, 1, sizeof (struct CORE_DUMP), abfd);
- if (nread != sizeof (struct CORE_DUMP))
+ if (!read_hdr (abfd, &core))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
+ /* Copy fields from new or old core structure. */
+ if (CORE_NEW (core))
+ {
+ c_flag = core.new.c_flag;
+ c_stack = (file_ptr) core.new.c_stack;
+ c_size = core.new.c_size;
+ c_stackend = CNEW_STACKORG (core.new) + c_size;
+ c_lsize = CNEW_LSIZE (core.new);
+ c_loader = CNEW_LOADER (core.new);
+ proc64 = CNEW_PROC64 (core.new);
+ }
+ else
+ {
+ c_flag = core.old.c_flag;
+ c_stack = (file_ptr) 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);
+ proc64 = 0;
+ }
+
+ if (proc64)
+ {
+ c_regsize = sizeof (CNEW_CONTEXT64 (core.new));
+ c_regptr = &CNEW_CONTEXT64 (core.new);
+ }
+ else if (CORE_NEW (core))
+ {
+ c_regsize = sizeof (CNEW_MSTSAVE (core.new));
+ c_regptr = &CNEW_MSTSAVE (core.new);
+ }
+ else
+ {
+ c_regsize = sizeof (COLD_MSTSAVE (core.old));
+ c_regptr = &COLD_MSTSAVE (core.old);
+ }
+ c_regoff = (char *) c_regptr - (char *) &core;
+
if (bfd_stat (abfd, &statbuf) < 0)
{
bfd_set_error (bfd_error_system_call);
@@ -194,15 +382,15 @@ rs6000coff_core_p (abfd)
if it's not there, we refuse to have anything to do with this core
file. The usefulness of a core dump without a stack segment is pretty
limited anyway. */
-
- if (!(coredata.c_flag & UBLOCK_VALID)
- || !(coredata.c_flag & LE_VALID))
+
+ if (!(c_flag & UBLOCK_VALID)
+ || !(c_flag & LE_VALID))
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
- if (!(coredata.c_flag & USTACK_VALID))
+ if (!(c_flag & USTACK_VALID))
{
bfd_set_error (bfd_error_file_truncated);
return NULL;
@@ -210,72 +398,72 @@ rs6000coff_core_p (abfd)
/* Don't check the core file size for a full core, AIX 4.1 includes
additional shared library sections in a full core. */
- if (!(coredata.c_flag & (FULL_CORE | CORE_TRUNC))
- && ((bfd_vma)coredata.c_stack + coredata.c_size) != statbuf.st_size)
+ if (!(c_flag & (FULL_CORE | CORE_TRUNC)))
{
/* If the size is wrong, it means we're misinterpreting something. */
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
+ if (c_stack + (file_ptr) c_size != statbuf.st_size)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
}
-#ifdef AIX_CORE_DUMPX_CORE
- /* For the core_dumpx format, make sure c_entries == 0 If it does
- not, the core file uses the old format */
- if (coredata.c_entries != 0)
- {
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
-#else
/* Sanity check on the c_tab field. */
- if ((u_long) coredata.c_tab < sizeof coredata ||
- (u_long) coredata.c_tab >= statbuf.st_size ||
- (long) coredata.c_tab >= (long)coredata.c_stack)
+ if (!CORE_NEW (core) && (c_loader < (file_ptr) sizeof core.old ||
+ c_loader >= statbuf.st_size ||
+ c_loader >= c_stack))
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
-#endif
/* Issue warning if the core file was truncated during writing. */
- if (coredata.c_flag & CORE_TRUNC)
+ if (c_flag & CORE_TRUNC)
(*_bfd_error_handler) (_("%s: warning core file truncated"),
bfd_get_filename (abfd));
/* Allocate core file header. */
- tmpptr = (char*) bfd_zalloc (abfd, sizeof (Rs6kCorData));
+ size = CORE_NEW (core) ? sizeof (core.new) : sizeof (core.old);
+ tmpptr = (char *) bfd_zalloc (abfd, size);
if (!tmpptr)
return NULL;
-
- set_tdata (abfd, tmpptr);
/* Copy core file header. */
- core_hdr (abfd) = coredata;
+ memcpy (tmpptr, &core, size);
+ set_tdata (abfd, tmpptr);
- /* .stack section. */
+ /* Set architecture. */
+ if (CORE_NEW (core))
+ {
+ enum bfd_architecture arch;
+ unsigned long mach;
+
+ switch (CNEW_IMPL (core.new))
+ {
+ case POWER_RS1:
+ case POWER_RSC:
+ case POWER_RS2:
+ arch = bfd_arch_rs6000;
+ mach = bfd_mach_rs6k;
+ break;
+ default:
+ arch = bfd_arch_powerpc;
+ mach = bfd_mach_ppc;
+ break;
+ }
+ bfd_default_set_arch_mach (abfd, arch, mach);
+ }
+
+ /* .stack section. */
if (!make_bfd_asection (abfd, ".stack",
- SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
- (bfd_size_type) coredata.c_size,
- (bfd_vma) (STACK_END_ADDR - coredata.c_size),
- (file_ptr) coredata.c_stack))
+ SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
+ c_size, c_stackend - c_size, c_stack))
return NULL;
- /* .reg section for GPRs and special registers. */
+ /* .reg section for all registers. */
if (!make_bfd_asection (abfd, ".reg",
- SEC_HAS_CONTENTS,
- (bfd_size_type) ((32 + NUM_OF_SPEC_REGS) * 4),
- (bfd_vma) 0,
- (file_ptr) ((char *) &coredata.SAVE_FIELD
- - (char *) &coredata)))
- return NULL;
-
- /* .reg2 section for FPRs (floating point registers). */
- if (!make_bfd_asection (abfd, ".reg2",
- SEC_HAS_CONTENTS,
- (bfd_size_type) 8 * 32, /* 32 FPRs. */
- (bfd_vma) 0,
- (file_ptr) ((char *) &coredata.SAVE_FIELD.fpr[0]
- - (char *) &coredata)))
+ SEC_HAS_CONTENTS,
+ c_regsize, (bfd_vma) 0, c_regoff))
return NULL;
/* .ldinfo section.
@@ -283,10 +471,8 @@ rs6000coff_core_p (abfd)
core dump would require going down the whole list of struct ld_info's.
See if we can just fake it. */
if (!make_bfd_asection (abfd, ".ldinfo",
- SEC_HAS_CONTENTS,
- (bfd_size_type) LOADER_REGION_SIZE,
- (bfd_vma) 0,
- (file_ptr) coredata.LOADER_OFFSET_FIELD))
+ SEC_HAS_CONTENTS,
+ c_lsize, (bfd_vma) 0, c_loader))
return NULL;
#ifndef CORE_VERSION_1
@@ -294,16 +480,16 @@ rs6000coff_core_p (abfd)
AIX 3 dumps the complete data section and sets FULL_CORE if the
ulimit is large enough, otherwise the data section is omitted.
AIX 4 sets FULL_CORE even if the core file is truncated, we have
- to examine coredata.c_datasize below to find out the actual size of
+ to examine core.c_datasize below to find out the actual size of
the .data section. */
- if (coredata.c_flag & FULL_CORE)
+ if (c_flag & FULL_CORE)
{
if (!make_bfd_asection (abfd, ".data",
SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
- (bfd_size_type) coredata.CORE_DATA_SIZE_FIELD,
+ (bfd_size_type) core.old.c_u.u_dsize,
(bfd_vma)
- CDATA_ADDR (coredata.CORE_DATA_SIZE_FIELD),
- (file_ptr) coredata.c_stack + coredata.c_size))
+ CDATA_ADDR (core.old.c_u.u_dsize),
+ c_stack + c_size))
return NULL;
}
#endif
@@ -313,101 +499,156 @@ rs6000coff_core_p (abfd)
which can be found by examining ldinfo, and anonymously mmapped
regions. */
{
- struct ld_info ldinfo;
- bfd_size_type ldinfo_size;
- file_ptr ldinfo_offset = (file_ptr) coredata.LOADER_OFFSET_FIELD;
+ LdInfo ldinfo;
+ bfd_size_type ldi_datasize;
+ file_ptr ldi_core;
+ uint ldi_next;
+ bfd_vma ldi_dataorg;
+
+ /* Fields from new and old core structures. */
+ bfd_size_type c_datasize, c_vmregions;
+ file_ptr c_data, c_vmm;
+
+ if (CORE_NEW (core))
+ {
+ c_datasize = CNEW_DATASIZE (core.new);
+ c_data = (file_ptr) core.new.c_data;
+ c_vmregions = core.new.c_vmregions;
+ c_vmm = (file_ptr) core.new.c_vmm;
+ }
+ else
+ {
+ c_datasize = core.old.c_datasize;
+ c_data = (file_ptr) core.old.c_data;
+ c_vmregions = core.old.c_vmregions;
+ c_vmm = (file_ptr) core.old.c_vmm;
+ }
/* .data section from executable. */
- if (coredata.c_datasize)
+ if (c_datasize)
{
if (!make_bfd_asection (abfd, ".data",
SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
- (bfd_size_type) coredata.c_datasize,
- (bfd_vma)
- CDATA_ADDR (coredata.CORE_DATA_SIZE_FIELD),
- (file_ptr) coredata.c_data))
+ c_datasize,
+ (bfd_vma) CDATA_ADDR (c_datasize),
+ c_data))
return NULL;
}
/* .data sections from loaded objects. */
- ldinfo_size = (char *) &ldinfo.ldinfo_filename[0]
- - (char *) &ldinfo.ldinfo_next;
+ if (proc64)
+ size = (int) ((LdInfo *) 0)->l64.ldinfo_filename;
+ else
+ size = (int) ((LdInfo *) 0)->l32.ldinfo_filename;
+
while (1)
{
- if (bfd_seek (abfd, ldinfo_offset, SEEK_SET) != 0)
+ if (bfd_seek (abfd, c_loader, SEEK_SET) != 0)
return NULL;
- if (bfd_read (&ldinfo, ldinfo_size, 1, abfd) != ldinfo_size)
+ if (bfd_read (&ldinfo, size, 1, abfd) != size)
return NULL;
- if (ldinfo.ldinfo_core)
+
+ if (proc64)
{
- if (!make_bfd_asection (abfd, ".data",
- SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
- (bfd_size_type) ldinfo.ldinfo_datasize,
- (bfd_vma) ldinfo.ldinfo_dataorg,
- (file_ptr) ldinfo.ldinfo_core))
- return NULL;
+ ldi_core = ldinfo.l64.ldinfo_core;
+ ldi_datasize = ldinfo.l64.ldinfo_datasize;
+ ldi_dataorg = (bfd_vma) ldinfo.l64.ldinfo_dataorg;
+ ldi_next = ldinfo.l64.ldinfo_next;
}
- if (ldinfo.ldinfo_next == 0)
+ else
+ {
+ ldi_core = ldinfo.l32.ldinfo_core;
+ ldi_datasize = ldinfo.l32.ldinfo_datasize;
+ ldi_dataorg = (bfd_vma) (long) ldinfo.l32.ldinfo_dataorg;
+ ldi_next = ldinfo.l32.ldinfo_next;
+ }
+
+ if (ldi_core)
+ if (!make_bfd_asection (abfd, ".data",
+ SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
+ ldi_datasize, ldi_dataorg, ldi_core))
+ return NULL;
+
+ if (ldi_next == 0)
break;
- ldinfo_offset += ldinfo.ldinfo_next;
+ c_loader += ldi_next;
}
/* .vmdata sections from anonymously mmapped regions. */
- if (coredata.c_vmregions)
+ if (c_vmregions)
{
- int i;
+ bfd_size_type i;
- if (bfd_seek (abfd, (file_ptr) coredata.c_vmm, SEEK_SET) != 0)
+ if (bfd_seek (abfd, c_vmm, SEEK_SET) != 0)
return NULL;
- for (i = 0; i < coredata.c_vmregions; i++)
+ for (i = 0; i < c_vmregions; i++)
{
- struct vm_info vminfo;
+ VmInfo vminfo;
+ bfd_size_type vminfo_size;
+ file_ptr vminfo_offset;
+ bfd_vma vminfo_addr;
- if (bfd_read (&vminfo, sizeof (vminfo), 1, abfd) != sizeof (vminfo))
+ size = CORE_NEW (core) ? sizeof (vminfo.new) : sizeof (vminfo.old);
+ if (bfd_read (&vminfo, size, 1, abfd) != size)
return NULL;
- if (vminfo.vminfo_offset)
+
+ if (CORE_NEW (core))
+ {
+ vminfo_addr = (bfd_vma) vminfo.new.vminfo_addr;
+ vminfo_size = vminfo.new.vminfo_size;
+ vminfo_offset = vminfo.new.vminfo_offset;
+ }
+ else
{
- if (!make_bfd_asection (abfd, ".vmdata",
- SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
- (bfd_size_type) vminfo.vminfo_size,
- (bfd_vma) vminfo.vminfo_addr,
- (file_ptr) vminfo.vminfo_offset))
- return NULL;
+ vminfo_addr = (bfd_vma) (long) vminfo.old.vminfo_addr;
+ vminfo_size = vminfo.old.vminfo_size;
+ vminfo_offset = vminfo.old.vminfo_offset;
}
+
+ if (vminfo_offset)
+ if (!make_bfd_asection (abfd, ".vmdata",
+ SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
+ vminfo_size, vminfo_addr,
+ vminfo_offset))
+ return NULL;
}
}
}
#endif
- return abfd->xvec; /* this is garbage for now. */
+ return abfd->xvec; /* This is garbage for now. */
}
+/* Return `true' if given core is from the given executable. */
-
-/* return `true' if given core is from the given executable.. */
boolean
rs6000coff_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd;
bfd *exec_bfd;
{
- struct CORE_DUMP coredata;
- struct ld_info ldinfo;
+ CoreHdr core;
bfd_size_type size;
char *path, *s;
size_t alloc;
const char *str1, *str2;
boolean ret;
+ file_ptr c_loader;
- if (bfd_seek (core_bfd, 0, SEEK_SET) != 0
- || bfd_read (&coredata, sizeof coredata, 1, core_bfd) != sizeof coredata)
+ if (!read_hdr (core_bfd, &core))
return false;
- if (bfd_seek (core_bfd, (long) coredata.LOADER_OFFSET_FIELD, SEEK_SET) != 0)
- return false;
+ if (CORE_NEW (core))
+ c_loader = CNEW_LOADER (core.new);
+ else
+ c_loader = (file_ptr) COLD_LOADER (core.old);
- size = (char *) &ldinfo.ldinfo_filename[0] - (char *) &ldinfo.ldinfo_next;
- if (bfd_read (&ldinfo, size, 1, core_bfd) != size)
+ if (CORE_NEW (core) && CNEW_PROC64 (core.new))
+ size = (int) ((LdInfo *) 0)->l64.ldinfo_filename;
+ else
+ size = (int) ((LdInfo *) 0)->l32.ldinfo_filename;
+
+ if (bfd_seek (core_bfd, c_loader + size, SEEK_SET) != 0)
return false;
alloc = 100;
@@ -441,7 +682,7 @@ rs6000coff_core_file_matches_executable_p (core_bfd, exec_bfd)
path = n;
}
}
-
+
str1 = strrchr (path, '/');
str2 = strrchr (exec_bfd->filename, '/');
@@ -463,7 +704,10 @@ char *
rs6000coff_core_file_failing_command (abfd)
bfd *abfd;
{
- char *com = core_hdr (abfd).CORE_COMM_FIELD;
+ CoreHdr *core = core_hdr (abfd);
+ char *com = CORE_NEW (*core) ?
+ CNEW_COMM (core->new) : COLD_COMM (core->old);
+
if (*com)
return com;
else
@@ -474,65 +718,8 @@ int
rs6000coff_core_file_failing_signal (abfd)
bfd *abfd;
{
- return core_hdr (abfd).c_signo;
-}
-
-
-boolean
-rs6000coff_get_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- sec_ptr section;
- PTR location;
- file_ptr offset;
- bfd_size_type count;
-{
- if (count == 0)
- return true;
-
- /* Reading a core file's sections will be slightly different. For the
- rest of them we can use bfd_generic_get_section_contents () I suppose. */
- /* Make sure this routine works for any bfd and any section. FIXMEmgo. */
-
- if (abfd->format == bfd_core && strcmp (section->name, ".reg") == 0) {
-
- struct mstsave mstatus;
- int regoffset = (char*)&mstatus.gpr[0] - (char*)&mstatus;
-
- /* Assert that the only way this code will be executed is reading the
- whole section. */
- if (offset || count != (sizeof(mstatus.gpr) + (4 * NUM_OF_SPEC_REGS)))
- (*_bfd_error_handler)
- (_("ERROR! in rs6000coff_get_section_contents()\n"));
-
- /* for `.reg' section, `filepos' is a pointer to the `mstsave' structure
- in the core file. */
-
- /* read GPR's into the location. */
- if ( bfd_seek(abfd, section->filepos + regoffset, SEEK_SET) == -1
- || bfd_read(location, sizeof (mstatus.gpr), 1, abfd) != sizeof (mstatus.gpr))
- return (false); /* on error */
-
- /* increment location to the beginning of special registers in the section,
- reset register offset value to the beginning of first special register
- in mstsave structure, and read special registers. */
-
- location = (PTR) ((char*)location + sizeof (mstatus.gpr));
- regoffset = (char*)&mstatus.iar - (char*)&mstatus;
-
- if ( bfd_seek(abfd, section->filepos + regoffset, SEEK_SET) == -1
- || bfd_read(location, 4 * NUM_OF_SPEC_REGS, 1, abfd) !=
- 4 * NUM_OF_SPEC_REGS)
- return (false); /* on error */
-
- /* increment location address, and read the special registers.. */
- /* FIXMEmgo */
- return (true);
- }
-
- /* else, use default bfd section content transfer. */
- else
- return _bfd_generic_get_section_contents
- (abfd, section, location, offset, count);
+ CoreHdr *core = core_hdr (abfd);
+ return CORE_NEW (*core) ? core->new.c_signo : core->old.c_signo;
}
#endif /* AIX_CORE */
diff --git a/gnu/usr.bin/binutils/bfd/section.c b/gnu/usr.bin/binutils/bfd/section.c
index b3b760802d3..fc03ce91dc2 100644
--- a/gnu/usr.bin/binutils/bfd/section.c
+++ b/gnu/usr.bin/binutils/bfd/section.c
@@ -1,5 +1,6 @@
/* Object file "section" support for the BFD library.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -111,7 +112,6 @@ SUBSECTION
| size 0x103 |
| output_section --------|
-
SUBSECTION
Link orders
@@ -133,7 +133,6 @@ SUBSECTION
*/
-
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
@@ -150,10 +149,10 @@ SUBSECTION
CODE_FRAGMENT
.
-. {* This structure is used for a comdat section, as in PE. A comdat
-. section is associated with a particular symbol. When the linker
-. sees a comdat section, it keeps only one of the sections with a
-. given name and associated with a given symbol. *}
+.{* This structure is used for a comdat section, as in PE. A comdat
+. section is associated with a particular symbol. When the linker
+. sees a comdat section, it keeps only one of the sections with a
+. given name and associated with a given symbol. *}
.
.struct bfd_comdat_info
.{
@@ -165,340 +164,366 @@ CODE_FRAGMENT
. specific code; it is not an index into the list returned by
. bfd_canonicalize_symtab. *}
. long symbol;
-.
-. {* If this section is being discarded, the linker uses this field
-. to point to the input section which is being kept. *}
-. struct sec *sec;
.};
.
.typedef struct sec
.{
-. {* The name of the section; the name isn't a copy, the pointer is
-. the same as that passed to bfd_make_section. *}
+. {* The name of the section; the name isn't a copy, the pointer is
+. the same as that passed to bfd_make_section. *}
+.
+. const char *name;
+.
+. {* A unique sequence number. *}
.
-. CONST char *name;
+. int id;
.
-. {* Which section is it; 0..nth. *}
+. {* Which section is it; 0..nth. *}
.
-. int index;
+. int index;
.
-. {* The next section in the list belonging to the BFD, or NULL. *}
+. {* The next section in the list belonging to the BFD, or NULL. *}
.
-. struct sec *next;
+. struct sec *next;
.
-. {* The field flags contains attributes of the section. Some
-. flags are read in from the object file, and some are
-. synthesized from other information. *}
+. {* The field flags contains attributes of the section. Some
+. flags are read in from the object file, and some are
+. synthesized from other information. *}
.
-. flagword flags;
+. flagword flags;
.
.#define SEC_NO_FLAGS 0x000
.
-. {* Tells the OS to allocate space for this section when loading.
-. This is clear for a section containing debug information
-. only. *}
+. {* Tells the OS to allocate space for this section when loading.
+. This is clear for a section containing debug information only. *}
.#define SEC_ALLOC 0x001
.
-. {* Tells the OS to load the section from the file when loading.
-. This is clear for a .bss section. *}
+. {* Tells the OS to load the section from the file when loading.
+. This is clear for a .bss section. *}
.#define SEC_LOAD 0x002
.
-. {* The section contains data still to be relocated, so there is
-. some relocation information too. *}
+. {* The section contains data still to be relocated, so there is
+. some relocation information too. *}
.#define SEC_RELOC 0x004
.
.#if 0 {* Obsolete ? *}
.#define SEC_BALIGN 0x008
.#endif
.
-. {* A signal to the OS that the section contains read only
-. data. *}
+. {* A signal to the OS that the section contains read only data. *}
.#define SEC_READONLY 0x010
.
-. {* The section contains code only. *}
+. {* The section contains code only. *}
.#define SEC_CODE 0x020
.
-. {* The section contains data only. *}
+. {* The section contains data only. *}
.#define SEC_DATA 0x040
.
-. {* The section will reside in ROM. *}
+. {* The section will reside in ROM. *}
.#define SEC_ROM 0x080
.
-. {* The section contains constructor information. This section
-. type is used by the linker to create lists of constructors and
-. destructors used by <<g++>>. When a back end sees a symbol
-. which should be used in a constructor list, it creates a new
-. section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
-. the symbol to it, and builds a relocation. To build the lists
-. of constructors, all the linker has to do is catenate all the
-. sections called <<__CTOR_LIST__>> and relocate the data
-. contained within - exactly the operations it would peform on
-. standard data. *}
+. {* The section contains constructor information. This section
+. type is used by the linker to create lists of constructors and
+. destructors used by <<g++>>. When a back end sees a symbol
+. which should be used in a constructor list, it creates a new
+. section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
+. the symbol to it, and builds a relocation. To build the lists
+. of constructors, all the linker has to do is catenate all the
+. sections called <<__CTOR_LIST__>> and relocate the data
+. contained within - exactly the operations it would peform on
+. standard data. *}
.#define SEC_CONSTRUCTOR 0x100
.
-. {* The section is a constructor, and should be placed at the
-. end of the text, data, or bss section(?). *}
+. {* The section is a constructor, and should be placed at the
+. end of the text, data, or bss section(?). *}
.#define SEC_CONSTRUCTOR_TEXT 0x1100
.#define SEC_CONSTRUCTOR_DATA 0x2100
.#define SEC_CONSTRUCTOR_BSS 0x3100
.
-. {* The section has contents - a data section could be
-. <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
-. <<SEC_HAS_CONTENTS>> *}
+. {* 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
.
-. {* An instruction to the linker to not output the section
-. even if it has information which would normally be written. *}
+. {* An instruction to the linker to not output the section
+. even if it has information which would normally be written. *}
.#define SEC_NEVER_LOAD 0x400
.
-. {* The section is a COFF shared library section. This flag is
-. only for the linker. If this type of section appears in
-. the input file, the linker must copy it to the output file
-. without changing the vma or size. FIXME: Although this
-. was originally intended to be general, it really is COFF
-. specific (and the flag was renamed to indicate this). It
-. might be cleaner to have some more general mechanism to
-. allow the back end to control what the linker does with
-. sections. *}
+. {* The section is a COFF shared library section. This flag is
+. only for the linker. If this type of section appears in
+. the input file, the linker must copy it to the output file
+. without changing the vma or size. FIXME: Although this
+. was originally intended to be general, it really is COFF
+. specific (and the flag was renamed to indicate this). It
+. might be cleaner to have some more general mechanism to
+. allow the back end to control what the linker does with
+. sections. *}
.#define SEC_COFF_SHARED_LIBRARY 0x800
.
-. {* The section contains common symbols (symbols may be defined
-. multiple times, the value of a symbol is the amount of
-. space it requires, and the largest symbol value is the one
-. used). Most targets have exactly one of these (which we
-. translate to bfd_com_section_ptr), but ECOFF has two. *}
+. {* The section has GOT references. This flag is only for the
+. linker, and is currently only used by the elf32-hppa back end.
+. It will be set if global offset table references were detected
+. in this section, which indicate to the linker that the section
+. contains PIC code, and must be handled specially when doing a
+. static link. *}
+.#define SEC_HAS_GOT_REF 0x4000
+.
+. {* The section contains common symbols (symbols may be defined
+. multiple times, the value of a symbol is the amount of
+. space it requires, and the largest symbol value is the one
+. used). Most targets have exactly one of these (which we
+. translate to bfd_com_section_ptr), but ECOFF has two. *}
.#define SEC_IS_COMMON 0x8000
.
-. {* The section contains only debugging information. For
-. example, this is set for ELF .debug and .stab sections.
-. strip tests this flag to see if a section can be
-. discarded. *}
+. {* The section contains only debugging information. For
+. example, this is set for ELF .debug and .stab sections.
+. strip tests this flag to see if a section can be
+. discarded. *}
.#define SEC_DEBUGGING 0x10000
.
-. {* The contents of this section are held in memory pointed to
-. by the contents field. This is checked by
-. bfd_get_section_contents, and the data is retrieved from
-. memory if appropriate. *}
+. {* The contents of this section are held in memory pointed to
+. by the contents field. This is checked by bfd_get_section_contents,
+. and the data is retrieved from memory if appropriate. *}
.#define SEC_IN_MEMORY 0x20000
.
-. {* The contents of this section are to be excluded by the
-. linker for executable and shared objects unless those
-. objects are to be further relocated. *}
+. {* The contents of this section are to be excluded by the
+. linker for executable and shared objects unless those
+. objects are to be further relocated. *}
.#define SEC_EXCLUDE 0x40000
.
-. {* The contents of this section are to be sorted by the
-. based on the address specified in the associated symbol
-. table. *}
+. {* The contents of this section are to be sorted by the
+. based on the address specified in the associated symbol
+. table. *}
.#define SEC_SORT_ENTRIES 0x80000
.
-. {* When linking, duplicate sections of the same name should be
-. discarded, rather than being combined into a single section as
-. is usually done. This is similar to how common symbols are
-. handled. See SEC_LINK_DUPLICATES below. *}
+. {* When linking, duplicate sections of the same name should be
+. discarded, rather than being combined into a single section as
+. is usually done. This is similar to how common symbols are
+. handled. See SEC_LINK_DUPLICATES below. *}
.#define SEC_LINK_ONCE 0x100000
.
-. {* If SEC_LINK_ONCE is set, this bitfield describes how the linker
-. should handle duplicate sections. *}
+. {* If SEC_LINK_ONCE is set, this bitfield describes how the linker
+. should handle duplicate sections. *}
.#define SEC_LINK_DUPLICATES 0x600000
.
-. {* This value for SEC_LINK_DUPLICATES means that duplicate
-. sections with the same name should simply be discarded. *}
+. {* This value for SEC_LINK_DUPLICATES means that duplicate
+. sections with the same name should simply be discarded. *}
.#define SEC_LINK_DUPLICATES_DISCARD 0x0
.
-. {* This value for SEC_LINK_DUPLICATES means that the linker
-. should warn if there are any duplicate sections, although
-. it should still only link one copy. *}
+. {* This value for SEC_LINK_DUPLICATES means that the linker
+. should warn if there are any duplicate sections, although
+. it should still only link one copy. *}
.#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
.
-. {* This value for SEC_LINK_DUPLICATES means that the linker
-. should warn if any duplicate sections are a different size. *}
+. {* This value for SEC_LINK_DUPLICATES means that the linker
+. should warn if any duplicate sections are a different size. *}
.#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
.
-. {* This value for SEC_LINK_DUPLICATES means that the linker
-. should warn if any duplicate sections contain different
-. contents. *}
+. {* This value for SEC_LINK_DUPLICATES means that the linker
+. should warn if any duplicate sections contain different
+. contents. *}
.#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
.
-. {* This section was created by the linker as part of dynamic
-. relocation or other arcane processing. It is skipped when
-. going through the first-pass output, trusting that someone
-. else up the line will take care of it later. *}
+. {* This section was created by the linker as part of dynamic
+. relocation or other arcane processing. It is skipped when
+. going through the first-pass output, trusting that someone
+. else up the line will take care of it later. *}
.#define SEC_LINKER_CREATED 0x800000
.
-. {* This section should not be subject to garbage collection. *}
+. {* This section should not be subject to garbage collection. *}
.#define SEC_KEEP 0x1000000
.
-. {* This section contains "short" data, and should be placed
-. "near" the GP. *}
+. {* This section contains "short" data, and should be placed
+. "near" the GP. *}
.#define SEC_SMALL_DATA 0x2000000
.
-. {* This section contains data which may be shared with other
-. executables or shared objects. *}
+. {* This section contains data which may be shared with other
+. executables or shared objects. *}
.#define SEC_SHARED 0x4000000
.
-. {* End of section flags. *}
+. {* When a section with this flag is being linked, then if the size of
+. the input section is less than a page, it should not cross a page
+. boundary. If the size of the input section is one page or more, it
+. should be aligned on a page boundary. *}
+.#define SEC_BLOCK 0x8000000
.
-. {* Some internal packed boolean fields. *}
+. {* Conditionally link this section; do not link if there are no
+. references found to any symbol in the section. *}
+.#define SEC_CLINK 0x10000000
.
-. {* See the vma field. *}
-. unsigned int user_set_vma : 1;
+. {* End of section flags. *}
.
-. {* Whether relocations have been processed. *}
-. unsigned int reloc_done : 1;
+. {* Some internal packed boolean fields. *}
.
-. {* A mark flag used by some of the linker backends. *}
-. unsigned int linker_mark : 1;
+. {* See the vma field. *}
+. unsigned int user_set_vma : 1;
.
-. {* A mark flag used by some linker backends for garbage collection. *}
-. unsigned int gc_mark : 1;
+. {* Whether relocations have been processed. *}
+. unsigned int reloc_done : 1;
.
-. {* End of internal packed boolean fields. *}
+. {* A mark flag used by some of the linker backends. *}
+. unsigned int linker_mark : 1;
.
-. {* The virtual memory address of the section - where it will be
-. at run time. The symbols are relocated against this. The
-. user_set_vma flag is maintained by bfd; if it's not set, the
-. backend can assign addresses (for example, in <<a.out>>, where
-. the default address for <<.data>> is dependent on the specific
-. target and various flags). *}
+. {* Another mark flag used by some of the linker backends. Set for
+. output sections that have a input section. *}
+. unsigned int linker_has_input : 1;
.
-. bfd_vma vma;
+. {* A mark flag used by some linker backends for garbage collection. *}
+. unsigned int gc_mark : 1;
.
-. {* The load address of the section - where it would be in a
-. rom image; really only used for writing section header
-. information. *}
+. {* Used by the ELF code to mark sections which have been allocated to segments. *}
+. unsigned int segment_mark : 1;
.
-. bfd_vma lma;
+. {* End of internal packed boolean fields. *}
.
-. {* The size of the section in octets, as it will be output.
-. Contains a value even if the section has no contents (e.g., the
-. size of <<.bss>>). This will be filled in after relocation. *}
+. {* The virtual memory address of the section - where it will be
+. at run time. The symbols are relocated against this. The
+. user_set_vma flag is maintained by bfd; if it's not set, the
+. backend can assign addresses (for example, in <<a.out>>, where
+. the default address for <<.data>> is dependent on the specific
+. target and various flags). *}
.
-. bfd_size_type _cooked_size;
+. bfd_vma vma;
.
-. {* The original size on disk of the section, in octets. Normally this
-. value is the same as the size, but if some relaxing has
-. been done, then this value will be bigger. *}
+. {* The load address of the section - where it would be in a
+. rom image; really only used for writing section header
+. information. *}
.
-. bfd_size_type _raw_size;
+. bfd_vma lma;
.
-. {* If this section is going to be output, then this value is the
-. offset in *bytes* into the output section of the first byte in the
-. input section (byte ==> smallest addressable unit on the
-. target). In most cases, if this was going to start at the
-. 100th octet (8-bit quantity) in the output section, this value
-. would be 100. However, if the target byte size is 16 bits
-. (bfd_octets_per_byte is "2"), this value would be 50. *}
+. {* The size of the section in octets, as it will be output.
+. Contains a value even if the section has no contents (e.g., the
+. size of <<.bss>>). This will be filled in after relocation. *}
.
-. bfd_vma output_offset;
+. bfd_size_type _cooked_size;
.
-. {* The output section through which to map on output. *}
+. {* 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. *}
.
-. struct sec *output_section;
+. bfd_size_type _raw_size;
.
-. {* The alignment requirement of the section, as an exponent of 2 -
-. e.g., 3 aligns to 2^3 (or 8). *}
+. {* If this section is going to be output, then this value is the
+. offset in *bytes* into the output section of the first byte in the
+. input section (byte ==> smallest addressable unit on the
+. target). In most cases, if this was going to start at the
+. 100th octet (8-bit quantity) in the output section, this value
+. would be 100. However, if the target byte size is 16 bits
+. (bfd_octets_per_byte is "2"), this value would be 50. *}
.
-. unsigned int alignment_power;
+. bfd_vma output_offset;
.
-. {* If an input section, a pointer to a vector of relocation
-. records for the data in this section. *}
+. {* The output section through which to map on output. *}
.
-. struct reloc_cache_entry *relocation;
+. struct sec *output_section;
.
-. {* If an output section, a pointer to a vector of pointers to
-. relocation records for the data in this section. *}
+. {* The alignment requirement of the section, as an exponent of 2 -
+. e.g., 3 aligns to 2^3 (or 8). *}
.
-. struct reloc_cache_entry **orelocation;
+. unsigned int alignment_power;
.
-. {* The number of relocation records in one of the above *}
+. {* If an input section, a pointer to a vector of relocation
+. records for the data in this section. *}
.
-. unsigned reloc_count;
+. struct reloc_cache_entry *relocation;
.
-. {* Information below is back end specific - and not always used
-. or updated. *}
+. {* If an output section, a pointer to a vector of pointers to
+. relocation records for the data in this section. *}
.
-. {* File position of section data *}
+. struct reloc_cache_entry **orelocation;
.
-. file_ptr filepos;
+. {* The number of relocation records in one of the above *}
.
-. {* File position of relocation info *}
+. unsigned reloc_count;
.
-. file_ptr rel_filepos;
+. {* Information below is back end specific - and not always used
+. or updated. *}
.
-. {* File position of line data *}
+. {* File position of section data. *}
.
-. file_ptr line_filepos;
+. file_ptr filepos;
.
-. {* Pointer to data for applications *}
+. {* File position of relocation info. *}
.
-. PTR userdata;
+. file_ptr rel_filepos;
.
-. {* If the SEC_IN_MEMORY flag is set, this points to the actual
-. contents. *}
-. unsigned char *contents;
+. {* File position of line data. *}
.
-. {* Attached line number information *}
+. file_ptr line_filepos;
.
-. alent *lineno;
+. {* Pointer to data for applications. *}
.
-. {* Number of line number records *}
+. PTR userdata;
.
-. unsigned int lineno_count;
+. {* If the SEC_IN_MEMORY flag is set, this points to the actual
+. contents. *}
+. unsigned char *contents;
.
-. {* Optional information about a COMDAT entry; NULL if not COMDAT *}
+. {* Attached line number information. *}
.
-. struct bfd_comdat_info *comdat;
+. alent *lineno;
.
-. {* When a section is being output, this value changes as more
-. linenumbers are written out *}
+. {* Number of line number records. *}
.
-. file_ptr moving_line_filepos;
+. unsigned int lineno_count;
.
-. {* What the section number is in the target world *}
+. {* Optional information about a COMDAT entry; NULL if not COMDAT. *}
.
-. int target_index;
+. struct bfd_comdat_info *comdat;
.
-. PTR used_by_bfd;
+. {* Points to the kept section if this section is a link-once section,
+. and is discarded. *}
+. struct sec *kept_section;
.
-. {* If this is a constructor section then here is a list of the
-. relocations created to relocate items within it. *}
+. {* When a section is being output, this value changes as more
+. linenumbers are written out. *}
.
-. struct relent_chain *constructor_chain;
+. file_ptr moving_line_filepos;
.
-. {* The BFD which owns the section. *}
+. {* What the section number is in the target world. *}
.
-. bfd *owner;
+. int target_index;
.
-. {* A symbol which points at this section only *}
-. struct symbol_cache_entry *symbol;
-. struct symbol_cache_entry **symbol_ptr_ptr;
+. PTR used_by_bfd;
.
-. struct bfd_link_order *link_order_head;
-. struct bfd_link_order *link_order_tail;
+. {* If this is a constructor section then here is a list of the
+. relocations created to relocate items within it. *}
+.
+. struct relent_chain *constructor_chain;
+.
+. {* The BFD which owns the section. *}
+.
+. bfd *owner;
+.
+. {* A symbol which points at this section only *}
+. struct symbol_cache_entry *symbol;
+. struct symbol_cache_entry **symbol_ptr_ptr;
+.
+. struct bfd_link_order *link_order_head;
+. struct bfd_link_order *link_order_tail;
.} asection ;
.
-. {* These sections are global, and are managed by BFD. The application
-. and target back end are not permitted to change the values in
-. these sections. New code should use the section_ptr macros rather
-. than referring directly to the const sections. The const sections
-. may eventually vanish. *}
+.{* These sections are global, and are managed by BFD. The application
+. and target back end are not permitted to change the values in
+. these sections. New code should use the section_ptr macros rather
+. than referring directly to the const sections. The const sections
+. may eventually vanish. *}
.#define BFD_ABS_SECTION_NAME "*ABS*"
.#define BFD_UND_SECTION_NAME "*UND*"
.#define BFD_COM_SECTION_NAME "*COM*"
.#define BFD_IND_SECTION_NAME "*IND*"
.
-. {* the absolute section *}
+.{* the absolute section *}
.extern const asection bfd_abs_section;
.#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
.#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-. {* Pointer to the undefined section *}
+.{* Pointer to the undefined section *}
.extern const asection bfd_und_section;
.#define bfd_und_section_ptr ((asection *) &bfd_und_section)
.#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-. {* Pointer to the common section *}
+.{* Pointer to the common section *}
.extern const asection bfd_com_section;
.#define bfd_com_section_ptr ((asection *) &bfd_com_section)
-. {* Pointer to the indirect section *}
+.{* Pointer to the indirect section *}
.extern const asection bfd_ind_section;
.#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
.#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
@@ -538,29 +563,41 @@ static const asymbol global_syms[] =
GLOBAL_SYM_INIT (BFD_IND_SECTION_NAME, &bfd_ind_section)
};
-#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
- const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
- const asection SEC = \
- /* name, index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */ \
- { NAME, 0, 0, FLAGS, 0, 0, 0, 0, \
- \
- /* vma, lma, _cooked_size, _raw_size, output_offset, output_section, */ \
- 0, 0, 0, 0, 0, (struct sec *) &SEC, \
- \
- /* alig..., reloc..., orel..., reloc_count, filepos, rel_..., line_... */ \
- 0, 0, 0, 0, 0, 0, 0, \
- \
- /* userdata, contents, lineno, lineno_count */ \
- 0, 0, 0, 0, \
- \
- /* comdat_info, moving_line_filepos, target_index, used_by_bfd, */ \
- NULL, 0, 0, 0, \
- \
- /* cons..., owner, symbol */ \
- 0, 0, (struct symbol_cache_entry *) &global_syms[IDX], \
- \
- /* symbol_ptr_ptr, link_order_head, ..._tail */ \
- (struct symbol_cache_entry **) &SYM, 0, 0 \
+#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
+ const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
+ const asection SEC = \
+ /* name, id, index, next, flags, user_set_vma, reloc_done, */ \
+ { NAME, IDX, 0, NULL, FLAGS, 0, 0, \
+ \
+ /* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
+ 0, 0, 1, 0, \
+ \
+ /* vma, lma, _cooked_size, _raw_size, */ \
+ 0, 0, 0, 0, \
+ \
+ /* output_offset, output_section, alignment_power, */ \
+ 0, (struct sec *) &SEC, 0, \
+ \
+ /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
+ NULL, NULL, 0, 0, 0, \
+ \
+ /* line_filepos, userdata, contents, lineno, lineno_count, */ \
+ 0, NULL, NULL, NULL, 0, \
+ \
+ /* comdat, kept_section, moving_line_filepos, target_index, */ \
+ NULL, NULL, 0, 0, \
+ \
+ /* used_by_bfd, constructor_chain, owner, */ \
+ NULL, NULL, NULL, \
+ \
+ /* symbol, */ \
+ (struct symbol_cache_entry *) &global_syms[IDX], \
+ \
+ /* symbol_ptr_ptr, */ \
+ (struct symbol_cache_entry **) &SYM, \
+ \
+ /* link_order_head, link_order_tail */ \
+ NULL, NULL \
}
STD_SECTION (bfd_com_section, SEC_IS_COMMON, bfd_com_symbol,
@@ -585,7 +622,7 @@ FUNCTION
bfd_get_section_by_name
SYNOPSIS
- asection *bfd_get_section_by_name(bfd *abfd, CONST char *name);
+ asection *bfd_get_section_by_name(bfd *abfd, const char *name);
DESCRIPTION
Run through @var{abfd} and return the one of the
@@ -601,7 +638,7 @@ DESCRIPTION
asection *
bfd_get_section_by_name (abfd, name)
bfd *abfd;
- CONST char *name;
+ const char *name;
{
asection *sect;
@@ -611,13 +648,62 @@ bfd_get_section_by_name (abfd, name)
return NULL;
}
+/*
+FUNCTION
+ bfd_get_unique_section_name
+
+SYNOPSIS
+ char *bfd_get_unique_section_name(bfd *abfd,
+ const char *templat,
+ int *count);
+
+DESCRIPTION
+ Invent a section name that is unique in @var{abfd} by tacking
+ a dot and a digit suffix onto the original @var{templat}. If
+ @var{count} is non-NULL, then it specifies the first number
+ tried as a suffix to generate a unique name. The value
+ pointed to by @var{count} will be incremented in this case.
+*/
+
+char *
+bfd_get_unique_section_name (abfd, templat, count)
+ bfd *abfd;
+ const char *templat;
+ int *count;
+{
+ int num;
+ unsigned int len;
+ char *sname;
+
+ len = strlen (templat);
+ sname = bfd_malloc (len + 8);
+ if (sname == NULL)
+ return NULL;
+ strcpy (sname, templat);
+ num = 1;
+ if (count != NULL)
+ num = *count;
+
+ do
+ {
+ /* If we have a million sections, something is badly wrong. */
+ if (num > 999999)
+ abort ();
+ sprintf (sname + len, ".%d", num++);
+ }
+ while (bfd_get_section_by_name (abfd, sname) != NULL);
+
+ if (count != NULL)
+ *count = num;
+ return sname;
+}
/*
FUNCTION
bfd_make_section_old_way
SYNOPSIS
- asection *bfd_make_section_old_way(bfd *abfd, CONST char *name);
+ asection *bfd_make_section_old_way(bfd *abfd, const char *name);
DESCRIPTION
Create a new empty section called @var{name}
@@ -637,11 +723,10 @@ DESCRIPTION
*/
-
asection *
bfd_make_section_old_way (abfd, name)
bfd *abfd;
- CONST char *name;
+ const char *name;
{
asection *sec = bfd_get_section_by_name (abfd, name);
if (sec == (asection *) NULL)
@@ -656,7 +741,7 @@ FUNCTION
bfd_make_section_anyway
SYNOPSIS
- asection *bfd_make_section_anyway(bfd *abfd, CONST char *name);
+ asection *bfd_make_section_anyway(bfd *abfd, const char *name);
DESCRIPTION
Create a new empty section called @var{name} and attach it to the end of
@@ -671,8 +756,9 @@ DESCRIPTION
sec_ptr
bfd_make_section_anyway (abfd, name)
bfd *abfd;
- CONST char *name;
+ const char *name;
{
+ static int section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */
asection *newsect;
asection **prev = &abfd->sections;
asection *sect = abfd->sections;
@@ -694,6 +780,7 @@ bfd_make_section_anyway (abfd, name)
return NULL;
newsect->name = name;
+ newsect->id = section_id++;
newsect->index = abfd->section_count++;
newsect->flags = SEC_NO_FLAGS;
@@ -705,13 +792,17 @@ bfd_make_section_anyway (abfd, name)
newsect->line_filepos = 0;
newsect->owner = abfd;
newsect->comdat = NULL;
+ newsect->kept_section = NULL;
/* Create a symbol whos only job is to point to this section. This is
useful for things like relocs which are relative to the base of a
section. */
newsect->symbol = bfd_make_empty_symbol (abfd);
if (newsect->symbol == NULL)
- return NULL;
+ {
+ bfd_release (abfd, newsect);
+ return NULL;
+ }
newsect->symbol->name = name;
newsect->symbol->value = 0;
newsect->symbol->section = newsect;
@@ -721,7 +812,7 @@ bfd_make_section_anyway (abfd, name)
if (BFD_SEND (abfd, _new_section_hook, (abfd, newsect)) != true)
{
- free (newsect);
+ bfd_release (abfd, newsect);
return NULL;
}
@@ -734,7 +825,7 @@ FUNCTION
bfd_make_section
SYNOPSIS
- asection *bfd_make_section(bfd *, CONST char *name);
+ asection *bfd_make_section(bfd *, const char *name);
DESCRIPTION
Like <<bfd_make_section_anyway>>, but return <<NULL>> (without calling
@@ -746,7 +837,7 @@ DESCRIPTION
asection *
bfd_make_section (abfd, name)
bfd *abfd;
- CONST char *name;
+ const char *name;
{
asection *sect = abfd->sections;
@@ -779,7 +870,6 @@ bfd_make_section (abfd, name)
return bfd_make_section_anyway (abfd, name);
}
-
/*
FUNCTION
bfd_set_section_flags
@@ -823,14 +913,13 @@ bfd_set_section_flags (abfd, section, flags)
return true;
}
-
/*
FUNCTION
bfd_map_over_sections
SYNOPSIS
void bfd_map_over_sections(bfd *abfd,
- void (*func)(bfd *abfd,
+ void (*func) (bfd *abfd,
asection *sect,
PTR obj),
PTR obj);
@@ -849,7 +938,6 @@ DESCRIPTION
| for (p = abfd->sections; p != NULL; p = p->next)
| func(abfd, p, ...)
-
*/
/*VARARGS2*/
@@ -869,7 +957,6 @@ bfd_map_over_sections (abfd, operation, user_storage)
abort ();
}
-
/*
FUNCTION
bfd_set_section_size
@@ -894,7 +981,7 @@ bfd_set_section_size (abfd, ptr, val)
bfd_size_type val;
{
/* Once you've started writing to any section you cannot create or change
- the size of any others. */
+ the size of any others. */
if (abfd->output_has_begun)
{
@@ -920,15 +1007,12 @@ SYNOPSIS
file_ptr offset,
bfd_size_type count);
-
DESCRIPTION
Sets the contents of the section @var{section} in BFD
@var{abfd} to the data starting in memory at @var{data}. The
data is written to the output section starting at offset
@var{offset} for @var{count} octets.
-
-
Normally <<true>> is returned, else <<false>>. Possible error
returns are:
o <<bfd_error_no_contents>> -
@@ -939,7 +1023,6 @@ DESCRIPTION
This routine is front end to the back end function
<<_bfd_set_section_contents>>.
-
*/
#define bfd_get_section_size_now(abfd,sec) \
@@ -993,6 +1076,11 @@ bfd_set_section_contents (abfd, section, location, offset, count)
break;
}
+ /* Record a copy of the data in memory if desired. */
+ if (section->contents
+ && location != section->contents + offset)
+ memcpy (section->contents + offset, location, count);
+
if (BFD_SEND (abfd, _bfd_set_section_contents,
(abfd, section, location, offset, count)))
{
@@ -1024,8 +1112,6 @@ DESCRIPTION
with zeroes. If no errors occur, <<true>> is returned, else
<<false>>.
-
-
*/
boolean
bfd_get_section_contents (abfd, section, location, offset, count)
@@ -1125,6 +1211,11 @@ _bfd_strip_section_from_output (info, s)
orders have not yet been set up. So why are we checking them? --
Ian */
os = s->output_section;
+
+ /* Handle a section that wasn't output. */
+ if (os == NULL)
+ return;
+
for (p = os->link_order_head, pp = NULL; p != NULL; pp = p, p = p->next)
if (p->type == bfd_indirect_link_order
&& p->u.indirect.section == s)
@@ -1159,7 +1250,7 @@ _bfd_strip_section_from_output (info, s)
}
/* If the output section is empty, remove it too. Careful about sections
- that have been discarded in the link script -- they are mapped to
+ that have been discarded in the link script -- they are mapped to
bfd_abs_section, which has no owner. */
if (!keep_os && os->owner != NULL)
{
diff --git a/gnu/usr.bin/binutils/bfd/som.c b/gnu/usr.bin/binutils/bfd/som.c
index cd61cc6c4bb..50cdbf936c0 100644
--- a/gnu/usr.bin/binutils/bfd/som.c
+++ b/gnu/usr.bin/binutils/bfd/som.c
@@ -1,9 +1,10 @@
/* bfd back-end for HP PA-RISC SOM objects.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
- University of Utah (pa-gdb-bugs@cs.utah.edu).
+ University of Utah.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,6 +23,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#include "alloca-conf.h"
#include "bfd.h"
#include "sysdep.h"
@@ -72,7 +74,6 @@
((__m_num) >= _PA_RISC1_1_ID && (__m_num) <= _PA_RISC_MAXID))
#endif /* _PA_RISC_ID */
-
/* HIUX in it's infinite stupidity changed the names for several "well
known" constants. Work around such braindamage. Try the HPUX version
first, then the HIUX version, and finally provide a default. */
@@ -90,7 +91,7 @@
/* Size (in chars) of the temporary buffers used during fixup and string
table writes. */
-
+
#define SOM_TMP_BUFSIZE 8192
/* Size of the hash table in archives. */
@@ -106,21 +107,19 @@
/* SOM allows any one of the four previous relocations to be reused
with a "R_PREV_FIXUP" relocation entry. Since R_PREV_FIXUP
relocations are always a single byte, using a R_PREV_FIXUP instead
- of some multi-byte relocation makes object files smaller.
+ of some multi-byte relocation makes object files smaller.
Note one side effect of using a R_PREV_FIXUP is the relocation that
is being repeated moves to the front of the queue. */
-struct reloc_queue
- {
- unsigned char *reloc;
- unsigned int size;
- } reloc_queue[4];
+struct reloc_queue {
+ unsigned char *reloc;
+ unsigned int size;
+} reloc_queue[4];
/* This fully describes the symbol types which may be attached to
an EXPORT or IMPORT directive. Only SOM uses this formation
(ELF has no need for it). */
-typedef enum
-{
+typedef enum {
SYMBOL_TYPE_UNKNOWN,
SYMBOL_TYPE_ABSOLUTE,
SYMBOL_TYPE_CODE,
@@ -132,16 +131,14 @@ typedef enum
SYMBOL_TYPE_SEC_PROG,
} pa_symbol_type;
-struct section_to_type
-{
+struct section_to_type {
char *section;
char type;
};
/* Assorted symbol information that needs to be derived from the BFD symbol
and/or the BFD backend private symbol data. */
-struct som_misc_symbol_info
-{
+struct som_misc_symbol_info {
unsigned int symbol_type;
unsigned int symbol_scope;
unsigned int arg_reloc;
@@ -197,7 +194,7 @@ static boolean som_find_nearest_line PARAMS ((bfd *, asection *,
CONST char **,
unsigned int *));
static void som_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-static asection * bfd_section_from_som_symbol PARAMS ((bfd *,
+static asection * bfd_section_from_som_symbol PARAMS ((bfd *,
struct symbol_dictionary_record *));
static int log2 PARAMS ((unsigned int));
static bfd_reloc_status_type hppa_som_reloc PARAMS ((bfd *, arelent *,
@@ -268,11 +265,11 @@ static boolean som_is_subspace PARAMS ((asection *));
static boolean som_is_container PARAMS ((asection *, asection *));
static boolean som_bfd_free_cached_info PARAMS ((bfd *));
static boolean som_bfd_link_split_section PARAMS ((bfd *, asection *));
-
+
/* Map SOM section names to POSIX/BSD single-character symbol types.
- This table includes all the standard subspaces as defined in the
- current "PRO ABI for PA-RISC Systems", $UNWIND$ which for
+ This table includes all the standard subspaces as defined in the
+ current "PRO ABI for PA-RISC Systems", $UNWIND$ which for
some reason was left out, and sections specific to embedded stabs. */
static const struct section_to_type stt[] = {
@@ -306,7 +303,7 @@ static const struct section_to_type stt[] = {
Right now this table is only used to count and perform minimal
processing on relocation streams so that they can be internalized
- into BFD and symbolically printed by utilities. To make actual use
+ into BFD and symbolically printed by utilities. To make actual use
of them would be much more difficult, BFD's concept of relocations
is far too simple to handle SOM relocations. The basic assumption
that a relocation can be completely processed independent of other
@@ -314,7 +311,7 @@ static const struct section_to_type stt[] = {
The SOM relocations are meant to be processed as a stream, they
specify copying of data from the input section to the output section
- while possibly modifying the data in some manner. They also can
+ while possibly modifying the data in some manner. They also can
specify that a variable number of zeros or uninitialized data be
inserted on in the output segment at the current offset. Some
relocations specify that some previous relocation be re-applied at
@@ -324,7 +321,7 @@ static const struct section_to_type stt[] = {
in the BFD relocation data structure to store enough information to
perform all the relocations.
- Each entry in the table has three fields.
+ Each entry in the table has three fields.
The first entry is an index into this "class" of relocations. This
index can then be used as a variable within the relocation itself.
@@ -332,14 +329,14 @@ static const struct section_to_type stt[] = {
The second field is a format string which actually controls processing
of the relocation. It uses a simple postfix machine to do calculations
based on variables/constants found in the string and the relocation
- stream.
+ stream.
- The third field specifys whether or not this relocation may use
+ The third field specifys whether or not this relocation may use
a constant (V) from the previous R_DATA_OVERRIDE rather than a constant
stored in the instruction.
- Variables:
-
+ Variables:
+
L = input space byte count
D = index into class of relocations
M = output space byte count
@@ -351,25 +348,25 @@ static const struct section_to_type stt[] = {
U = second 32 bits of stack unwind information
V = a literal constant (usually used in the next relocation)
P = a previous relocation
-
- Lower case letters (starting with 'b') refer to following
+
+ Lower case letters (starting with 'b') refer to following
bytes in the relocation stream. 'b' is the next 1 byte,
- c is the next 2 bytes, d is the next 3 bytes, etc...
+ c is the next 2 bytes, d is the next 3 bytes, etc...
This is the variable part of the relocation entries that
makes our life a living hell.
numerical constants are also used in the format string. Note
- the constants are represented in decimal.
+ the constants are represented in decimal.
'+', "*" and "=" represents the obvious postfix operators.
- '<' represents a left shift.
+ '<' represents a left shift.
Stack Operations:
Parameter Relocation Bits:
- Unwind Entries:
-
+ Unwind Entries:
+
Previous Relocations: The index field represents which in the queue
of 4 previous fixups should be re-applied.
@@ -379,14 +376,12 @@ static const struct section_to_type stt[] = {
addil foo-$global$-0x1234 would use an override for "0x1234" rather
than storing it into the addil itself. */
-struct fixup_format
-{
+struct fixup_format {
int D;
- char *format;
+ const char *format;
};
-static const struct fixup_format som_fixup_formats[256] =
-{
+static const struct fixup_format som_fixup_formats[256] = {
/* R_NO_RELOCATION */
0, "LD1+4*=", /* 0x00 */
1, "LD1+4*=", /* 0x01 */
@@ -699,8 +694,7 @@ static const struct fixup_format som_fixup_formats[256] =
0, "", /* 0xff */
};
-static const int comp1_opcodes[] =
-{
+static const int comp1_opcodes[] = {
0x00,
0x40,
0x41,
@@ -721,8 +715,7 @@ static const int comp1_opcodes[] =
-1
};
-static const int comp2_opcodes[] =
-{
+static const int comp2_opcodes[] = {
0x00,
0x80,
0x82,
@@ -730,8 +723,7 @@ static const int comp2_opcodes[] =
-1
};
-static const int comp3_opcodes[] =
-{
+static const int comp3_opcodes[] = {
0x00,
0x02,
-1
@@ -787,268 +779,268 @@ static const int comp3_opcodes[] =
#define SOM_HOWTO(TYPE, NAME) \
HOWTO(TYPE, 0, 0, 32, false, 0, 0, hppa_som_reloc, NAME, false, 0, 0, false)
-static reloc_howto_type som_hppa_howto_table[] =
-{
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
- {R_ZEROES, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ZEROES"},
- {R_ZEROES, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ZEROES"},
- {R_UNINIT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_UNINIT"},
- {R_UNINIT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_UNINIT"},
- {R_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RELOCATION"},
- {R_DATA_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_ONE_SYMBOL"},
- {R_DATA_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_ONE_SYMBOL"},
- {R_DATA_PLABEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_PLABEL"},
- {R_DATA_PLABEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_PLABEL"},
- {R_SPACE_REF, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_SPACE_REF"},
- {R_REPEATED_INIT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "REPEATED_INIT"},
- {R_REPEATED_INIT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "REPEATED_INIT"},
- {R_REPEATED_INIT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "REPEATED_INIT"},
- {R_REPEATED_INIT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "REPEATED_INIT"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_PCREL_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PCREL_CALL"},
- {R_SHORT_PCREL_MODE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_SHORT_PCREL_MODE"},
- {R_LONG_PCREL_MODE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_LONG_PCREL_MODE"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_ABS_CALL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ABS_CALL"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_DP_RELATIVE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DP_RELATIVE"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_DLT_REL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DLT_REL"},
- {R_DLT_REL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DLT_REL"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_CODE_ONE_SYMBOL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_ONE_SYMBOL"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_MILLI_REL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_MILLI_REL"},
- {R_MILLI_REL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_MILLI_REL"},
- {R_CODE_PLABEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_PLABEL"},
- {R_CODE_PLABEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_PLABEL"},
- {R_BREAKPOINT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_BREAKPOINT"},
- {R_ENTRY, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ENTRY"},
- {R_ENTRY, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ENTRY"},
- {R_ALT_ENTRY, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_ALT_ENTRY"},
- {R_EXIT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_EXIT"},
- {R_BEGIN_TRY, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_BEGIN_TRY"},
- {R_END_TRY, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_END_TRY"},
- {R_END_TRY, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_END_TRY"},
- {R_END_TRY, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_END_TRY"},
- {R_BEGIN_BRTAB, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_BEGIN_BRTAB"},
- {R_END_BRTAB, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_END_BRTAB"},
- {R_STATEMENT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_STATEMENT"},
- {R_STATEMENT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_STATEMENT"},
- {R_STATEMENT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_STATEMENT"},
- {R_DATA_EXPR, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_EXPR"},
- {R_CODE_EXPR, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_CODE_EXPR"},
- {R_FSEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_FSEL"},
- {R_LSEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_LSEL"},
- {R_RSEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RSEL"},
- {R_N_MODE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_N_MODE"},
- {R_S_MODE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_S_MODE"},
- {R_D_MODE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_D_MODE"},
- {R_R_MODE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_R_MODE"},
- {R_DATA_OVERRIDE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_OVERRIDE"},
- {R_DATA_OVERRIDE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_OVERRIDE"},
- {R_DATA_OVERRIDE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_OVERRIDE"},
- {R_DATA_OVERRIDE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_OVERRIDE"},
- {R_DATA_OVERRIDE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_DATA_OVERRIDE"},
- {R_TRANSLATED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_TRANSLATED"},
- {R_AUX_UNWIND, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_AUX_UNWIND"},
- {R_COMP1, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_COMP1"},
- {R_COMP2, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_COMP2"},
- {R_COMP3, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_COMP3"},
- {R_PREV_FIXUP, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PREV_FIXUP"},
- {R_PREV_FIXUP, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PREV_FIXUP"},
- {R_PREV_FIXUP, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PREV_FIXUP"},
- {R_PREV_FIXUP, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_PREV_FIXUP"},
- {R_SEC_STMT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_SEC_STMT"},
- {R_N0SEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_N0SEL"},
- {R_N1SEL, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_N1SEL"},
- {R_LINETAB, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_LINETAB"},
- {R_LINETAB_ESC, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_LINETAB_ESC"},
- {R_LTP_OVERRIDE, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_LTP_OVERRIDE"},
- {R_COMMENT, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_COMMENT"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"},
- {R_RESERVED, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_RESERVED"}};
-
+static reloc_howto_type som_hppa_howto_table[] = {
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_NO_RELOCATION, "R_NO_RELOCATION"),
+ SOM_HOWTO (R_ZEROES, "R_ZEROES"),
+ SOM_HOWTO (R_ZEROES, "R_ZEROES"),
+ SOM_HOWTO (R_UNINIT, "R_UNINIT"),
+ SOM_HOWTO (R_UNINIT, "R_UNINIT"),
+ SOM_HOWTO (R_RELOCATION, "R_RELOCATION"),
+ SOM_HOWTO (R_DATA_ONE_SYMBOL, "R_DATA_ONE_SYMBOL"),
+ SOM_HOWTO (R_DATA_ONE_SYMBOL, "R_DATA_ONE_SYMBOL"),
+ SOM_HOWTO (R_DATA_PLABEL, "R_DATA_PLABEL"),
+ SOM_HOWTO (R_DATA_PLABEL, "R_DATA_PLABEL"),
+ SOM_HOWTO (R_SPACE_REF, "R_SPACE_REF"),
+ SOM_HOWTO (R_REPEATED_INIT, "REPEATED_INIT"),
+ SOM_HOWTO (R_REPEATED_INIT, "REPEATED_INIT"),
+ SOM_HOWTO (R_REPEATED_INIT, "REPEATED_INIT"),
+ SOM_HOWTO (R_REPEATED_INIT, "REPEATED_INIT"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_PCREL_CALL, "R_PCREL_CALL"),
+ SOM_HOWTO (R_SHORT_PCREL_MODE, "R_SHORT_PCREL_MODE"),
+ SOM_HOWTO (R_LONG_PCREL_MODE, "R_LONG_PCREL_MODE"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_ABS_CALL, "R_ABS_CALL"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_DP_RELATIVE, "R_DP_RELATIVE"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_DLT_REL, "R_DLT_REL"),
+ SOM_HOWTO (R_DLT_REL, "R_DLT_REL"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_CODE_ONE_SYMBOL, "R_CODE_ONE_SYMBOL"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_MILLI_REL, "R_MILLI_REL"),
+ SOM_HOWTO (R_MILLI_REL, "R_MILLI_REL"),
+ SOM_HOWTO (R_CODE_PLABEL, "R_CODE_PLABEL"),
+ SOM_HOWTO (R_CODE_PLABEL, "R_CODE_PLABEL"),
+ SOM_HOWTO (R_BREAKPOINT, "R_BREAKPOINT"),
+ SOM_HOWTO (R_ENTRY, "R_ENTRY"),
+ SOM_HOWTO (R_ENTRY, "R_ENTRY"),
+ SOM_HOWTO (R_ALT_ENTRY, "R_ALT_ENTRY"),
+ SOM_HOWTO (R_EXIT, "R_EXIT"),
+ SOM_HOWTO (R_BEGIN_TRY, "R_BEGIN_TRY"),
+ SOM_HOWTO (R_END_TRY, "R_END_TRY"),
+ SOM_HOWTO (R_END_TRY, "R_END_TRY"),
+ SOM_HOWTO (R_END_TRY, "R_END_TRY"),
+ SOM_HOWTO (R_BEGIN_BRTAB, "R_BEGIN_BRTAB"),
+ SOM_HOWTO (R_END_BRTAB, "R_END_BRTAB"),
+ SOM_HOWTO (R_STATEMENT, "R_STATEMENT"),
+ SOM_HOWTO (R_STATEMENT, "R_STATEMENT"),
+ SOM_HOWTO (R_STATEMENT, "R_STATEMENT"),
+ SOM_HOWTO (R_DATA_EXPR, "R_DATA_EXPR"),
+ SOM_HOWTO (R_CODE_EXPR, "R_CODE_EXPR"),
+ SOM_HOWTO (R_FSEL, "R_FSEL"),
+ SOM_HOWTO (R_LSEL, "R_LSEL"),
+ SOM_HOWTO (R_RSEL, "R_RSEL"),
+ SOM_HOWTO (R_N_MODE, "R_N_MODE"),
+ SOM_HOWTO (R_S_MODE, "R_S_MODE"),
+ SOM_HOWTO (R_D_MODE, "R_D_MODE"),
+ SOM_HOWTO (R_R_MODE, "R_R_MODE"),
+ SOM_HOWTO (R_DATA_OVERRIDE, "R_DATA_OVERRIDE"),
+ SOM_HOWTO (R_DATA_OVERRIDE, "R_DATA_OVERRIDE"),
+ SOM_HOWTO (R_DATA_OVERRIDE, "R_DATA_OVERRIDE"),
+ SOM_HOWTO (R_DATA_OVERRIDE, "R_DATA_OVERRIDE"),
+ SOM_HOWTO (R_DATA_OVERRIDE, "R_DATA_OVERRIDE"),
+ SOM_HOWTO (R_TRANSLATED, "R_TRANSLATED"),
+ SOM_HOWTO (R_AUX_UNWIND, "R_AUX_UNWIND"),
+ SOM_HOWTO (R_COMP1, "R_COMP1"),
+ SOM_HOWTO (R_COMP2, "R_COMP2"),
+ SOM_HOWTO (R_COMP3, "R_COMP3"),
+ SOM_HOWTO (R_PREV_FIXUP, "R_PREV_FIXUP"),
+ SOM_HOWTO (R_PREV_FIXUP, "R_PREV_FIXUP"),
+ SOM_HOWTO (R_PREV_FIXUP, "R_PREV_FIXUP"),
+ SOM_HOWTO (R_PREV_FIXUP, "R_PREV_FIXUP"),
+ SOM_HOWTO (R_SEC_STMT, "R_SEC_STMT"),
+ SOM_HOWTO (R_N0SEL, "R_N0SEL"),
+ SOM_HOWTO (R_N1SEL, "R_N1SEL"),
+ SOM_HOWTO (R_LINETAB, "R_LINETAB"),
+ SOM_HOWTO (R_LINETAB_ESC, "R_LINETAB_ESC"),
+ SOM_HOWTO (R_LTP_OVERRIDE, "R_LTP_OVERRIDE"),
+ SOM_HOWTO (R_COMMENT, "R_COMMENT"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED"),
+ SOM_HOWTO (R_RESERVED, "R_RESERVED")
+};
+
/* Initialize the SOM relocation queue. By definition the queue holds
the last four multibyte fixups. */
-
+
static void
som_initialize_reloc_queue (queue)
struct reloc_queue *queue;
@@ -1130,7 +1122,7 @@ som_reloc_queue_fix (queue, index)
queue[1].size = tmp2;
return;
}
- abort();
+ abort ();
}
/* Search for a particular relocation in the relocation queue. */
@@ -1158,7 +1150,7 @@ som_reloc_queue_find (p, size, queue)
static unsigned char *
try_prev_fixup (abfd, subspace_reloc_sizep, p, size, queue)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
int *subspace_reloc_sizep;
unsigned char *p;
unsigned int size;
@@ -1169,7 +1161,7 @@ try_prev_fixup (abfd, subspace_reloc_sizep, p, size, queue)
if (queue_index != -1)
{
/* Found this in a previous fixup. Undo the fixup we
- just built and use R_PREV_FIXUP instead. We saved
+ just built and use R_PREV_FIXUP instead. We saved
a total of size - 1 bytes in the fixup stream. */
bfd_put_8 (abfd, R_PREV_FIXUP + queue_index, p);
p += 1;
@@ -1187,7 +1179,7 @@ try_prev_fixup (abfd, subspace_reloc_sizep, p, size, queue)
/* Emit the proper R_NO_RELOCATION fixups to map the next SKIP
bytes without any relocation. Update the size of the subspace
- relocation stream via SUBSPACE_RELOC_SIZE_P; also return the
+ relocation stream via SUBSPACE_RELOC_SIZE_P; also return the
current pointer into the relocation stream. */
static unsigned char *
@@ -1218,8 +1210,8 @@ som_reloc_skip (abfd, skip, p, subspace_reloc_sizep, queue)
most recent fixup. */
}
}
-
- /* The difference must be less than 0x1000000. Use one
+
+ /* The difference must be less than 0x1000000. Use one
more R_NO_RELOCATION entry to get to the right difference. */
if ((skip & 3) == 0 && skip <= 0xc0000 && skip > 0)
{
@@ -1270,11 +1262,11 @@ som_reloc_addend (abfd, addend, p, subspace_reloc_sizep, queue)
unsigned int *subspace_reloc_sizep;
struct reloc_queue *queue;
{
- if ((unsigned)(addend) + 0x80 < 0x100)
+ if ((unsigned) (addend) + 0x80 < 0x100)
{
bfd_put_8 (abfd, R_DATA_OVERRIDE + 1, p);
bfd_put_8 (abfd, addend, p + 1);
- p = try_prev_fixup (abfd, subspace_reloc_sizep, p, 2, queue);
+ p = try_prev_fixup (abfd, subspace_reloc_sizep, p, 2, queue);
}
else if ((unsigned) (addend) + 0x8000 < 0x10000)
{
@@ -1312,11 +1304,11 @@ som_reloc_call (abfd, p, subspace_reloc_sizep, bfd_reloc, sym_num, queue)
int arg_bits = HPPA_R_ARG_RELOC (bfd_reloc->addend);
int rtn_bits = arg_bits & 0x3;
int type, done = 0;
-
+
/* You'll never believe all this is necessary to handle relocations
for function calls. Having to compute and pack the argument
relocation bits is the real nightmare.
-
+
If you're interested in how this works, just forget it. You really
do not want to know about this braindamage. */
@@ -1368,7 +1360,7 @@ som_reloc_call (abfd, p, subspace_reloc_sizep, bfd_reloc, sym_num, queue)
done = 1;
}
}
-
+
/* If this could not be handled with a simple relocation, then do a hard
one. Hard relocations occur if the symbol number was too high or if
the encoding of argument relocation bits is too complex. */
@@ -1385,14 +1377,14 @@ som_reloc_call (abfd, p, subspace_reloc_sizep, bfd_reloc, sym_num, queue)
type += 9 * 4;
else
type += (3 * (arg_bits >> 4 & 3) + (arg_bits >> 2 & 3)) * 4;
-
+
/* Output the first two bytes of the relocation. These describe
the length of the relocation and encoding style. */
bfd_put_8 (abfd, bfd_reloc->howto->type + 10
+ 2 * (sym_num >= 0x100) + (type >= 0x100),
p);
bfd_put_8 (abfd, type, p + 1);
-
+
/* Now output the symbol index and see if this bizarre relocation
just happened to be in the relocation queue. */
if (sym_num < 0x100)
@@ -1410,8 +1402,7 @@ som_reloc_call (abfd, p, subspace_reloc_sizep, bfd_reloc, sym_num, queue)
return p;
}
-
-/* Return the logarithm of X, base 2, considering X unsigned.
+/* Return the logarithm of X, base 2, considering X unsigned.
Abort -1 if X is not a power or two or is zero. */
static int
@@ -1432,13 +1423,13 @@ log2 (x)
static bfd_reloc_status_type
hppa_som_reloc (abfd, reloc_entry, symbol_in, data,
input_section, output_bfd, error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
+ asymbol *symbol_in ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
if (output_bfd)
{
@@ -1467,125 +1458,125 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff, sym)
if (!final_types || !final_type)
return NULL;
- /* The field selector may require additional relocations to be
+ /* The field selector may require additional relocations to be
generated. It's impossible to know at this moment if additional
relocations will be needed, so we make them. The code to actually
write the relocation/fixup stream is responsible for removing
any redundant relocations. */
switch (field)
{
- case e_fsel:
- case e_psel:
- case e_lpsel:
- case e_rpsel:
- final_types[0] = final_type;
- final_types[1] = NULL;
- final_types[2] = NULL;
- *final_type = base_type;
- break;
+ case e_fsel:
+ case e_psel:
+ case e_lpsel:
+ case e_rpsel:
+ final_types[0] = final_type;
+ final_types[1] = NULL;
+ final_types[2] = NULL;
+ *final_type = base_type;
+ break;
- case e_tsel:
- case e_ltsel:
- case e_rtsel:
- final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
- if (!final_types[0])
- return NULL;
- if (field == e_tsel)
- *final_types[0] = R_FSEL;
- else if (field == e_ltsel)
- *final_types[0] = R_LSEL;
- else
- *final_types[0] = R_RSEL;
- final_types[1] = final_type;
- final_types[2] = NULL;
- *final_type = base_type;
- break;
+ case e_tsel:
+ case e_ltsel:
+ case e_rtsel:
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ if (!final_types[0])
+ return NULL;
+ if (field == e_tsel)
+ *final_types[0] = R_FSEL;
+ else if (field == e_ltsel)
+ *final_types[0] = R_LSEL;
+ else
+ *final_types[0] = R_RSEL;
+ final_types[1] = final_type;
+ final_types[2] = NULL;
+ *final_type = base_type;
+ break;
- case e_lssel:
- case e_rssel:
- final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
- if (!final_types[0])
- return NULL;
- *final_types[0] = R_S_MODE;
- final_types[1] = final_type;
- final_types[2] = NULL;
- *final_type = base_type;
- break;
+ case e_lssel:
+ case e_rssel:
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ if (!final_types[0])
+ return NULL;
+ *final_types[0] = R_S_MODE;
+ final_types[1] = final_type;
+ final_types[2] = NULL;
+ *final_type = base_type;
+ break;
- case e_lsel:
- case e_rsel:
- final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
- if (!final_types[0])
- return NULL;
- *final_types[0] = R_N_MODE;
- final_types[1] = final_type;
- final_types[2] = NULL;
- *final_type = base_type;
- break;
+ case e_lsel:
+ case e_rsel:
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ if (!final_types[0])
+ return NULL;
+ *final_types[0] = R_N_MODE;
+ final_types[1] = final_type;
+ final_types[2] = NULL;
+ *final_type = base_type;
+ break;
- case e_ldsel:
- case e_rdsel:
- final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
- if (!final_types[0])
- return NULL;
- *final_types[0] = R_D_MODE;
- final_types[1] = final_type;
- final_types[2] = NULL;
- *final_type = base_type;
- break;
+ case e_ldsel:
+ case e_rdsel:
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ if (!final_types[0])
+ return NULL;
+ *final_types[0] = R_D_MODE;
+ final_types[1] = final_type;
+ final_types[2] = NULL;
+ *final_type = base_type;
+ break;
- case e_lrsel:
- case e_rrsel:
- final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
- if (!final_types[0])
- return NULL;
- *final_types[0] = R_R_MODE;
- final_types[1] = final_type;
- final_types[2] = NULL;
- *final_type = base_type;
- break;
+ case e_lrsel:
+ case e_rrsel:
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ if (!final_types[0])
+ return NULL;
+ *final_types[0] = R_R_MODE;
+ final_types[1] = final_type;
+ final_types[2] = NULL;
+ *final_type = base_type;
+ break;
- case e_nsel:
- final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
- if (!final_types[0])
- return NULL;
- *final_types[0] = R_N1SEL;
- final_types[1] = final_type;
- final_types[2] = NULL;
- *final_type = base_type;
- break;
+ case e_nsel:
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ if (!final_types[0])
+ return NULL;
+ *final_types[0] = R_N1SEL;
+ final_types[1] = final_type;
+ final_types[2] = NULL;
+ *final_type = base_type;
+ break;
- case e_nlsel:
- case e_nlrsel:
- final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
- if (!final_types[0])
- return NULL;
- *final_types[0] = R_N0SEL;
- final_types[1] = (int *) bfd_alloc (abfd, sizeof (int));
- if (!final_types[1])
- return NULL;
- if (field == e_nlsel)
- *final_types[1] = R_N_MODE;
- else
- *final_types[1] = R_R_MODE;
- final_types[2] = final_type;
- final_types[3] = NULL;
- *final_type = base_type;
- break;
+ case e_nlsel:
+ case e_nlrsel:
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ if (!final_types[0])
+ return NULL;
+ *final_types[0] = R_N0SEL;
+ final_types[1] = (int *) bfd_alloc (abfd, sizeof (int));
+ if (!final_types[1])
+ return NULL;
+ if (field == e_nlsel)
+ *final_types[1] = R_N_MODE;
+ else
+ *final_types[1] = R_R_MODE;
+ final_types[2] = final_type;
+ final_types[3] = NULL;
+ *final_type = base_type;
+ break;
}
-
+
switch (base_type)
{
case R_HPPA:
/* The difference of two symbols needs *very* special handling. */
if (sym_diff)
{
- final_types[0] = (int *)bfd_alloc (abfd, sizeof (int));
- final_types[1] = (int *)bfd_alloc (abfd, sizeof (int));
- final_types[2] = (int *)bfd_alloc (abfd, sizeof (int));
- final_types[3] = (int *)bfd_alloc (abfd, sizeof (int));
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ final_types[1] = (int *) bfd_alloc (abfd, sizeof (int));
+ final_types[2] = (int *) bfd_alloc (abfd, sizeof (int));
+ final_types[3] = (int *) bfd_alloc (abfd, sizeof (int));
if (!final_types[0] || !final_types[1] || !final_types[2])
- return NULL;
+ return NULL;
if (field == e_fsel)
*final_types[0] = R_FSEL;
else if (field == e_rsel)
@@ -1605,8 +1596,8 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff, sym)
}
/* PLABELs get their own relocation type. */
else if (field == e_psel
- || field == e_lpsel
- || field == e_rpsel)
+ || field == e_lpsel
+ || field == e_rpsel)
{
/* A PLABEL relocation that has a size of 32 bits must
be a R_DATA_PLABEL. All others are R_CODE_PLABELs. */
@@ -1617,8 +1608,8 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff, sym)
}
/* PIC stuff. */
else if (field == e_tsel
- || field == e_ltsel
- || field == e_rtsel)
+ || field == e_ltsel
+ || field == e_rtsel)
*final_type = R_DLT_REL;
/* A relocation in the data space is always a full 32bits. */
else if (format == 32)
@@ -1648,7 +1639,6 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff, sym)
}
break;
-
case R_HPPA_GOTOFF:
/* More PLABEL special cases. */
if (field == e_psel
@@ -1661,12 +1651,12 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff, sym)
/* The difference of two symbols needs *very* special handling. */
if (sym_diff)
{
- final_types[0] = (int *)bfd_alloc (abfd, sizeof (int));
- final_types[1] = (int *)bfd_alloc (abfd, sizeof (int));
- final_types[2] = (int *)bfd_alloc (abfd, sizeof (int));
- final_types[3] = (int *)bfd_alloc (abfd, sizeof (int));
+ final_types[0] = (int *) bfd_alloc (abfd, sizeof (int));
+ final_types[1] = (int *) bfd_alloc (abfd, sizeof (int));
+ final_types[2] = (int *) bfd_alloc (abfd, sizeof (int));
+ final_types[3] = (int *) bfd_alloc (abfd, sizeof (int));
if (!final_types[0] || !final_types[1] || !final_types[2])
- return NULL;
+ return NULL;
if (field == e_fsel)
*final_types[0] = R_FSEL;
else if (field == e_rsel)
@@ -1718,10 +1708,9 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff, sym)
/* Return the address of the correct entry in the PA SOM relocation
howto table. */
-/*ARGSUSED*/
static reloc_howto_type *
som_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
if ((int) code < (int) R_NO_RELOCATION + 255)
@@ -1784,7 +1773,7 @@ som_object_setup (abfd, file_hdrp, aux_hdrp, current_offset)
/* Allocate space to hold the saved exec header information. */
obj_som_exec_data (abfd) = (struct som_exec_data *)
- bfd_zalloc (abfd, sizeof (struct som_exec_data ));
+ bfd_zalloc (abfd, sizeof (struct som_exec_data));
if (obj_som_exec_data (abfd) == NULL)
return NULL;
@@ -1795,7 +1784,7 @@ som_object_setup (abfd, file_hdrp, aux_hdrp, current_offset)
It's about time, OSF has used the new id since at least 1992;
HPUX didn't start till nearly 1995!.
-
+
The new approach examines the entry field. If it's zero or not 4
byte aligned then it's not a proper code address and we guess it's
really the executable flags. */
@@ -1824,10 +1813,10 @@ som_object_setup (abfd, file_hdrp, aux_hdrp, current_offset)
bfd_default_set_arch_mach (abfd, bfd_arch_hppa, pa10);
bfd_get_symcount (abfd) = file_hdrp->symbol_total;
- /* Initialize the saved symbol table and string table to NULL.
+ /* Initialize the saved symbol table and string table to NULL.
Save important offsets and sizes from the SOM header into
the BFD. */
- obj_som_stringtab (abfd) = (char *) NULL;
+ obj_som_stringtab (abfd) = (char *) NULL;
obj_som_symtab (abfd) = (som_symbol_type *) NULL;
obj_som_sorted_syms (abfd) = NULL;
obj_som_stringtab_size (abfd) = file_hdrp->symbol_strings_size;
@@ -1858,20 +1847,20 @@ setup_sections (abfd, file_hdr, current_offset)
unsigned int total_subspaces = 0;
asection **subspace_sections, *section;
- /* First, read in space names */
+ /* First, read in space names. */
space_strings = bfd_malloc (file_hdr->space_strings_size);
if (!space_strings && file_hdr->space_strings_size != 0)
goto error_return;
- if (bfd_seek (abfd, current_offset + file_hdr->space_strings_location,
- SEEK_SET) < 0)
+ if (bfd_seek (abfd, current_offset + file_hdr->space_strings_location,
+ SEEK_SET) < 0)
goto error_return;
if (bfd_read (space_strings, 1, file_hdr->space_strings_size, abfd)
!= file_hdr->space_strings_size)
goto error_return;
- /* Loop over all of the space dictionaries, building up sections */
+ /* Loop over all of the space dictionaries, building up sections. */
for (space_index = 0; space_index < file_hdr->space_total; space_index++)
{
struct space_dictionary_record space;
@@ -1880,7 +1869,7 @@ setup_sections (abfd, file_hdr, current_offset)
asection *space_asect;
char *newname;
- /* Read the space dictionary element */
+ /* Read the space dictionary element. */
if (bfd_seek (abfd,
(current_offset + file_hdr->space_location
+ space_index * sizeof space),
@@ -1889,20 +1878,20 @@ setup_sections (abfd, file_hdr, current_offset)
if (bfd_read (&space, 1, sizeof space, abfd) != sizeof space)
goto error_return;
- /* Setup the space name string */
+ /* Setup the space name string. */
space.name.n_name = space.name.n_strx + space_strings;
- /* Make a section out of it */
+ /* Make a section out of it. */
newname = bfd_alloc (abfd, strlen (space.name.n_name) + 1);
if (!newname)
goto error_return;
strcpy (newname, space.name.n_name);
-
+
space_asect = bfd_make_section_anyway (abfd, newname);
if (!space_asect)
goto error_return;
- if (space.is_loadable == 0)
+ if (space.is_loadable == 0)
space_asect->flags |= SEC_DEBUGGING;
/* Set up all the attributes for the space. */
@@ -1915,7 +1904,7 @@ setup_sections (abfd, file_hdr, current_offset)
if (space.subspace_quantity == 0)
continue;
- /* Now, read in the first subspace for this space */
+ /* Now, read in the first subspace for this space. */
if (bfd_seek (abfd,
(current_offset + file_hdr->subspace_location
+ space.subspace_index * sizeof subspace),
@@ -1923,14 +1912,15 @@ setup_sections (abfd, file_hdr, current_offset)
goto error_return;
if (bfd_read (&subspace, 1, sizeof subspace, abfd) != sizeof subspace)
goto error_return;
- /* Seek back to the start of the subspaces for loop below */
+ /* Seek back to the start of the subspaces for loop below. */
if (bfd_seek (abfd,
(current_offset + file_hdr->subspace_location
+ space.subspace_index * sizeof subspace),
SEEK_SET) < 0)
goto error_return;
- /* Setup the start address and file loc from the first subspace record */
+ /* Setup the start address and file loc from the first subspace
+ record. */
space_asect->vma = subspace.subspace_start;
space_asect->filepos = subspace.file_loc_init_value + current_offset;
space_asect->alignment_power = log2 (subspace.alignment);
@@ -1941,18 +1931,18 @@ setup_sections (abfd, file_hdr, current_offset)
loop placed any useful values into it. */
memset (&save_subspace, 0, sizeof (struct subspace_dictionary_record));
- /* Loop over the rest of the subspaces, building up more sections */
+ /* Loop over the rest of the subspaces, building up more sections. */
for (subspace_index = 0; subspace_index < space.subspace_quantity;
subspace_index++)
{
asection *subspace_asect;
- /* Read in the next subspace */
+ /* Read in the next subspace. */
if (bfd_read (&subspace, 1, sizeof subspace, abfd)
!= sizeof subspace)
goto error_return;
- /* Setup the subspace name string */
+ /* Setup the subspace name string. */
subspace.name.n_name = subspace.name.n_strx + space_strings;
newname = bfd_alloc (abfd, strlen (subspace.name.n_name) + 1);
@@ -1960,7 +1950,7 @@ setup_sections (abfd, file_hdr, current_offset)
goto error_return;
strcpy (newname, subspace.name.n_name);
- /* Make a section out of this subspace */
+ /* Make a section out of this subspace. */
subspace_asect = bfd_make_section_anyway (abfd, newname);
if (!subspace_asect)
goto error_return;
@@ -1972,7 +1962,7 @@ setup_sections (abfd, file_hdr, current_offset)
subspace.quadrant) == false)
goto error_return;
- /* Keep an easy mapping between subspaces and sections.
+ /* Keep an easy mapping between subspaces and sections.
Note we do not necessarily read the subspaces in the
same order in which they appear in the object file.
@@ -1988,12 +1978,12 @@ setup_sections (abfd, file_hdr, current_offset)
by the access_control_bits in the subspace header. */
switch (subspace.access_control_bits >> 4)
{
- /* Readonly data. */
+ /* Readonly data. */
case 0x0:
subspace_asect->flags |= SEC_DATA | SEC_READONLY;
break;
- /* Normal data. */
+ /* Normal data. */
case 0x1:
subspace_asect->flags |= SEC_DATA;
break;
@@ -2014,8 +2004,8 @@ setup_sections (abfd, file_hdr, current_offset)
subspace_asect->flags |= SEC_CODE;
break;
}
-
- if (subspace.dup_common || subspace.is_common)
+
+ if (subspace.dup_common || subspace.is_common)
subspace_asect->flags |= SEC_IS_COMMON;
else if (subspace.subspace_length > 0)
subspace_asect->flags |= SEC_HAS_CONTENTS;
@@ -2044,7 +2034,7 @@ setup_sections (abfd, file_hdr, current_offset)
subspace_asect->rel_filepos = subspace.fixup_request_index;
som_section_data (subspace_asect)->reloc_size
= subspace.fixup_request_quantity;
- /* We can not determine this yet. When we read in the
+ /* We can not determine this yet. When we read in the
relocation table the correct value will be filled in. */
subspace_asect->reloc_count = -1;
}
@@ -2099,7 +2089,7 @@ setup_sections (abfd, file_hdr, current_offset)
}
qsort (subspace_sections, total_subspaces,
sizeof (asection *), compare_subspaces);
-
+
/* subspace_sections is now sorted in the order in which the subspaces
appear in the object file. Assign an index to each one now. */
for (i = 0; i < total_subspaces; i++)
@@ -2133,7 +2123,7 @@ som_object_p (abfd)
unsigned long current_offset = 0;
struct lst_header lst_header;
struct som_entry som_entry;
-#define ENTRY_SIZE sizeof(struct som_entry)
+#define ENTRY_SIZE sizeof (struct som_entry)
if (bfd_read ((PTR) & file_hdr, 1, FILE_HDR_SIZE, abfd) != FILE_HDR_SIZE)
{
@@ -2167,57 +2157,57 @@ som_object_p (abfd)
#ifdef EXECLIBMAGIC
case EXECLIBMAGIC:
- /* Read the lst header and determine where the SOM directory begins */
+ /* Read the lst header and determine where the SOM directory begins. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) < 0)
- {
- if (bfd_get_error () != bfd_error_system_call)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
+ return 0;
+ }
if (bfd_read ((PTR) & lst_header, 1, SLSTHDR, abfd) != SLSTHDR)
- {
- if (bfd_get_error () != bfd_error_system_call)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
+ return 0;
+ }
- /* Position to and read the first directory entry */
+ /* Position to and read the first directory entry. */
if (bfd_seek (abfd, lst_header.dir_loc, SEEK_SET) < 0)
- {
- if (bfd_get_error () != bfd_error_system_call)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
+ return 0;
+ }
if (bfd_read ((PTR) & som_entry, 1, ENTRY_SIZE, abfd) != ENTRY_SIZE)
- {
- if (bfd_get_error () != bfd_error_system_call)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
+ return 0;
+ }
- /* Now position to the first SOM */
+ /* Now position to the first SOM. */
if (bfd_seek (abfd, som_entry.location, SEEK_SET) < 0)
- {
- if (bfd_get_error () != bfd_error_system_call)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
+ return 0;
+ }
current_offset = som_entry.location;
- /* And finally, re-read the som header */
+ /* And finally, re-read the som header. */
if (bfd_read ((PTR) & file_hdr, 1, FILE_HDR_SIZE, abfd) != FILE_HDR_SIZE)
- {
- if (bfd_get_error () != bfd_error_system_call)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
+ return 0;
+ }
break;
#endif
@@ -2320,7 +2310,7 @@ som_prep_headers (abfd)
a wise thing to do, it makes comparing objects during a multi-stage
bootstrap difficult. */
file_hdr->file_time.secs = 0;
- file_hdr->file_time.nanosecs = 0;
+ file_hdr->file_time.nanosecs = 0;
file_hdr->entry_space = 0;
file_hdr->entry_subspace = 0;
@@ -2336,13 +2326,13 @@ som_prep_headers (abfd)
subspace. */
if (!som_is_space (section) && !som_is_subspace (section))
continue;
-
+
if (som_is_space (section))
{
/* Allocate space for the space dictionary. */
- som_section_data (section)->space_dict
- = (struct space_dictionary_record *)
- bfd_zalloc (abfd, sizeof (struct space_dictionary_record));
+ som_section_data (section)->space_dict =
+ (struct space_dictionary_record *)
+ bfd_zalloc (abfd, sizeof (struct space_dictionary_record));
if (som_section_data (section)->space_dict == NULL)
return false;
/* Set space attributes. Note most attributes of SOM spaces
@@ -2351,11 +2341,11 @@ som_prep_headers (abfd)
som_section_data (section)->space_dict->init_pointer_index = -1;
/* Set more attributes that were stuffed away in private data. */
- som_section_data (section)->space_dict->sort_key =
+ som_section_data (section)->space_dict->sort_key =
som_section_data (section)->copy_data->sort_key;
- som_section_data (section)->space_dict->is_defined =
+ som_section_data (section)->space_dict->is_defined =
som_section_data (section)->copy_data->is_defined;
- som_section_data (section)->space_dict->is_private =
+ som_section_data (section)->space_dict->is_private =
som_section_data (section)->copy_data->is_private;
som_section_data (section)->space_dict->space_number =
som_section_data (section)->copy_data->space_number;
@@ -2384,13 +2374,13 @@ som_prep_headers (abfd)
if (section->flags & SEC_CODE)
som_section_data (section)->subspace_dict->code_only = 1;
- som_section_data (section)->subspace_dict->subspace_start =
+ som_section_data (section)->subspace_dict->subspace_start =
section->vma;
som_section_data (section)->subspace_dict->subspace_length =
bfd_section_size (abfd, section);
som_section_data (section)->subspace_dict->initialization_length =
bfd_section_size (abfd, section);
- som_section_data (section)->subspace_dict->alignment =
+ som_section_data (section)->subspace_dict->alignment =
1 << section->alignment_power;
/* Set more attributes that were stuffed away in private data. */
@@ -2472,7 +2462,7 @@ som_count_spaces (abfd)
asection *section;
for (section = abfd->sections; section != NULL; section = section->next)
- count += som_is_space (section);
+ count += som_is_space (section);
return count;
}
@@ -2507,7 +2497,7 @@ compare_syms (arg1, arg2)
asymbol **sym1 = (asymbol **) arg1;
asymbol **sym2 = (asymbol **) arg2;
unsigned int count1, count2;
-
+
/* Get relocation count for each symbol. Note that the count
is stored in the udata pointer for section symbols! */
if ((*sym1)->flags & BSF_SECTION_SYM)
@@ -2539,8 +2529,7 @@ compare_subspaces (arg1, arg2)
{
asection **subspace1 = (asection **) arg1;
asection **subspace2 = (asection **) arg2;
- unsigned int count1, count2;
-
+
if ((*subspace1)->target_index < (*subspace2)->target_index)
return -1;
else if ((*subspace2)->target_index < (*subspace1)->target_index)
@@ -2604,7 +2593,7 @@ som_prep_for_fixups (abfd, syms, num_syms)
|| bfd_is_abs_section ((*reloc->sym_ptr_ptr)->section))
continue;
- /* Scaling to encourage symbols involved in R_DP_RELATIVE
+ /* Scaling to encourage symbols involved in R_DP_RELATIVE
and R_CODE_ONE_SYMBOL relocations to come first. These
two relocations have single byte versions if the symbol
index is very small. */
@@ -2645,7 +2634,7 @@ som_prep_for_fixups (abfd, syms, num_syms)
if (sorted_syms[i]->flags & BSF_SECTION_SYM)
sorted_syms[i]->udata.i = i;
else
- som_symbol_data (sorted_syms[i])->index = i;
+ som_symbol_data (sorted_syms[i])->index = i;
}
}
@@ -2690,7 +2679,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
{
int reloc_offset, current_rounding_mode;
#ifndef NO_PCREL_MODES
- int current_call_mode;
+ int current_call_mode;
#endif
/* Find a subspace of this space. */
@@ -2712,7 +2701,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
som_section_data (subsection)->subspace_dict->fixup_request_index
= total_reloc_size;
- /* To make life easier start over with a clean slate for
+ /* To make life easier start over with a clean slate for
each subspace. Seek to the start of the relocation stream
for this subspace in preparation for writing out its fixup
stream. */
@@ -2730,7 +2719,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
current_call_mode = R_SHORT_PCREL_MODE;
#endif
- /* Translate each BFD relocation into one or more SOM
+ /* Translate each BFD relocation into one or more SOM
relocations. */
for (j = 0; j < subsection->reloc_count; j++)
{
@@ -2738,16 +2727,16 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
unsigned int skip;
int sym_num;
- /* Get the symbol number. Remember it's stored in a
+ /* Get the symbol number. Remember it's stored in a
special place for section symbols. */
if ((*bfd_reloc->sym_ptr_ptr)->flags & BSF_SECTION_SYM)
sym_num = (*bfd_reloc->sym_ptr_ptr)->udata.i;
else
sym_num = som_symbol_data (*bfd_reloc->sym_ptr_ptr)->index;
-
+
/* If there is not enough room for the next couple relocations,
then dump the current buffer contents now. Also reinitialize
- the relocation queue.
+ the relocation queue.
No single BFD relocation could ever translate into more
than 100 bytes of SOM relocations (20bytes is probably the
@@ -2818,7 +2807,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
case R_DP_RELATIVE:
/* Account for any addend. */
if (bfd_reloc->addend)
- p = som_reloc_addend (abfd, bfd_reloc->addend, p,
+ p = som_reloc_addend (abfd, bfd_reloc->addend, p,
&subspace_reloc_size, reloc_queue);
if (sym_num < 0x20)
@@ -2838,7 +2827,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
{
bfd_put_8 (abfd, bfd_reloc->howto->type + 33, p);
bfd_put_8 (abfd, sym_num >> 16, p + 1);
- bfd_put_16 (abfd, sym_num, p + 2);
+ bfd_put_16 (abfd, sym_num, p + 2);
p = try_prev_fixup (abfd, &subspace_reloc_size,
p, 4, reloc_queue);
}
@@ -2853,7 +2842,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
/* Account for any addend using R_DATA_OVERRIDE. */
if (bfd_reloc->howto->type != R_DATA_ONE_SYMBOL
&& bfd_reloc->addend)
- p = som_reloc_addend (abfd, bfd_reloc->addend, p,
+ p = som_reloc_addend (abfd, bfd_reloc->addend, p,
&subspace_reloc_size, reloc_queue);
if (sym_num < 0x100)
@@ -2867,7 +2856,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
{
bfd_put_8 (abfd, bfd_reloc->howto->type + 1, p);
bfd_put_8 (abfd, sym_num >> 16, p + 1);
- bfd_put_16 (abfd, sym_num, p + 2);
+ bfd_put_16 (abfd, sym_num, p + 2);
p = try_prev_fixup (abfd, &subspace_reloc_size,
p, 4, reloc_queue);
}
@@ -2888,11 +2877,11 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
the R_ENTRY relocation, and the rest in the R_EXIT
relocation. */
bfd_put_32 (abfd, bfd_reloc->addend, p + 1);
-
+
/* Find the next R_EXIT relocation. */
for (tmp = j; tmp < subsection->reloc_count; tmp++)
{
- tmp_reloc = subsection->orelocation[tmp];
+ tmp_reloc = subsection->orelocation[tmp];
if (tmp_reloc->howto->type == R_EXIT)
break;
}
@@ -2905,7 +2894,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
p, 9, reloc_queue);
break;
}
-
+
case R_N_MODE:
case R_S_MODE:
case R_D_MODE:
@@ -2971,9 +2960,9 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
p, 4, reloc_queue);
}
break;
-
+
case R_COMP1:
- /* The only time we generate R_COMP1, R_COMP2 and
+ /* The only time we generate R_COMP1, R_COMP2 and
R_CODE_EXPR relocs is for the difference of two
symbols. Hence we can cheat here. */
bfd_put_8 (abfd, bfd_reloc->howto->type, p);
@@ -2983,7 +2972,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
break;
case R_COMP2:
- /* The only time we generate R_COMP1, R_COMP2 and
+ /* The only time we generate R_COMP1, R_COMP2 and
R_CODE_EXPR relocs is for the difference of two
symbols. Hence we can cheat here. */
bfd_put_8 (abfd, bfd_reloc->howto->type, p);
@@ -2996,7 +2985,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
case R_CODE_EXPR:
case R_DATA_EXPR:
- /* The only time we generate R_COMP1, R_COMP2 and
+ /* The only time we generate R_COMP1, R_COMP2 and
R_CODE_EXPR relocs is for the difference of two
symbols. Hence we can cheat here. */
bfd_put_8 (abfd, bfd_reloc->howto->type, p);
@@ -3017,7 +3006,7 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
/* Last BFD relocation for a subspace has been processed.
Map the rest of the subspace with R_NO_RELOCATION fixups. */
- p = som_reloc_skip (abfd, bfd_section_size (abfd, subsection)
+ p = som_reloc_skip (abfd, bfd_section_size (abfd, subsection)
- reloc_offset,
p, &subspace_reloc_size, reloc_queue);
@@ -3047,14 +3036,12 @@ som_write_space_strings (abfd, current_offset, string_sizep)
{
/* Chunk of memory that we can use as buffer space, then throw
away. */
- unsigned char tmp_space[SOM_TMP_BUFSIZE];
- unsigned char *p;
+ size_t tmp_space_size = SOM_TMP_BUFSIZE;
+ unsigned char *tmp_space = alloca (tmp_space_size);
+ unsigned char *p = tmp_space;
unsigned int strings_size = 0;
asection *section;
- memset (tmp_space, 0, SOM_TMP_BUFSIZE);
- p = tmp_space;
-
/* Seek to the start of the space strings in preparation for writing
them out. */
if (bfd_seek (abfd, current_offset, SEEK_SET) < 0)
@@ -3064,7 +3051,7 @@ som_write_space_strings (abfd, current_offset, string_sizep)
building up and writing string table entries for their names. */
for (section = abfd->sections; section != NULL; section = section->next)
{
- int length;
+ size_t length;
/* Only work with space/subspaces; avoid any other sections
which might have been made (.text for example). */
@@ -3075,14 +3062,32 @@ som_write_space_strings (abfd, current_offset, string_sizep)
length = strlen (section->name);
/* If there is not enough room for the next entry, then dump the
- current buffer contents now. Each entry will take 4 bytes to
- hold the string length + the string itself + null terminator. */
- if (p - tmp_space + 5 + length > SOM_TMP_BUFSIZE)
+ current buffer contents now and maybe allocate a larger
+ buffer. Each entry will take 4 bytes to hold the string
+ length + the string itself + null terminator. */
+ if (p - tmp_space + 5 + length > tmp_space_size)
{
+ /* Flush buffer before refilling or reallocating. */
if (bfd_write ((PTR) &tmp_space[0], p - tmp_space, 1, abfd)
- != p - tmp_space)
+ != p - tmp_space)
return false;
- /* Reset to beginning of the buffer space. */
+
+ /* Reallocate if now empty buffer still too small. */
+ if (5 + length > tmp_space_size)
+ {
+ /* Ensure a minimum growth factor to avoid O(n**2) space
+ consumption for n strings. The optimal minimum
+ factor seems to be 2, as no other value can guarantee
+ wasting less then 50% space. (Note that we cannot
+ deallocate space allocated by `alloca' without
+ returning from this function.) The same technique is
+ used a few more times below when a buffer is
+ reallocated. */
+ tmp_space_size = MAX (2 * tmp_space_size, 5 + length);
+ tmp_space = alloca (tmp_space_size);
+ }
+
+ /* Reset to beginning of the (possibly new) buffer space. */
p = tmp_space;
}
@@ -3133,11 +3138,13 @@ som_write_symbol_strings (abfd, current_offset, syms, num_syms, string_sizep,
COMPUNIT *compilation_unit;
{
unsigned int i;
-
+
/* Chunk of memory that we can use as buffer space, then throw
away. */
- unsigned char tmp_space[SOM_TMP_BUFSIZE];
- unsigned char *p;
+ size_t tmp_space_size = SOM_TMP_BUFSIZE;
+ unsigned char *tmp_space = alloca (tmp_space_size);
+ unsigned char *p = tmp_space;
+
unsigned int strings_size = 0;
unsigned char *comp[4];
@@ -3155,9 +3162,6 @@ som_write_symbol_strings (abfd, current_offset, syms, num_syms, string_sizep,
comp[3] = compilation_unit->version_id.n_name;
}
- memset (tmp_space, 0, SOM_TMP_BUFSIZE);
- p = tmp_space;
-
/* Seek to the start of the space strings in preparation for writing
them out. */
if (bfd_seek (abfd, current_offset, SEEK_SET) < 0)
@@ -3167,16 +3171,28 @@ som_write_symbol_strings (abfd, current_offset, syms, num_syms, string_sizep,
{
for (i = 0; i < 4; i++)
{
- int length = strlen (comp[i]);
+ size_t length = strlen (comp[i]);
/* If there is not enough room for the next entry, then dump
- the current buffer contents now. */
- if (p - tmp_space + 5 + length > SOM_TMP_BUFSIZE)
+ the current buffer contents now and maybe allocate a
+ larger buffer. */
+ if (p - tmp_space + 5 + length > tmp_space_size)
{
+ /* Flush buffer before refilling or reallocating. */
if (bfd_write ((PTR) &tmp_space[0], p - tmp_space, 1, abfd)
!= p - tmp_space)
return false;
- /* Reset to beginning of the buffer space. */
+
+ /* Reallocate if now empty buffer still too small. */
+ if (5 + length > tmp_space_size)
+ {
+ /* See alloca above for discussion of new size. */
+ tmp_space_size = MAX (2 * tmp_space_size, 5 + length);
+ tmp_space = alloca (tmp_space_size);
+ }
+
+ /* Reset to beginning of the (possibly new) buffer
+ space. */
p = tmp_space;
}
@@ -3193,19 +3209,19 @@ som_write_symbol_strings (abfd, current_offset, syms, num_syms, string_sizep,
switch (i)
{
- case 0:
+ case 0:
obj_som_compilation_unit (abfd)->name.n_strx = strings_size;
break;
case 1:
- obj_som_compilation_unit (abfd)->language_name.n_strx =
+ obj_som_compilation_unit (abfd)->language_name.n_strx =
strings_size;
break;
case 2:
- obj_som_compilation_unit (abfd)->product_id.n_strx =
+ obj_som_compilation_unit (abfd)->product_id.n_strx =
strings_size;
break;
case 3:
- obj_som_compilation_unit (abfd)->version_id.n_strx =
+ obj_som_compilation_unit (abfd)->version_id.n_strx =
strings_size;
break;
}
@@ -3225,16 +3241,26 @@ som_write_symbol_strings (abfd, current_offset, syms, num_syms, string_sizep,
for (i = 0; i < num_syms; i++)
{
- int length = strlen (syms[i]->name);
+ size_t length = strlen (syms[i]->name);
/* If there is not enough room for the next entry, then dump the
- current buffer contents now. */
- if (p - tmp_space + 5 + length > SOM_TMP_BUFSIZE)
+ current buffer contents now and maybe allocate a larger buffer. */
+ if (p - tmp_space + 5 + length > tmp_space_size)
{
+ /* Flush buffer before refilling or reallocating. */
if (bfd_write ((PTR) &tmp_space[0], p - tmp_space, 1, abfd)
!= p - tmp_space)
return false;
- /* Reset to beginning of the buffer space. */
+
+ /* Reallocate if now empty buffer still too small. */
+ if (5 + length > tmp_space_size)
+ {
+ /* See alloca above for discussion of new size. */
+ tmp_space_size = MAX (2 * tmp_space_size, 5 + length);
+ tmp_space = alloca (tmp_space_size);
+ }
+
+ /* Reset to beginning of the (possibly new) buffer space. */
p = tmp_space;
}
@@ -3249,17 +3275,17 @@ som_write_symbol_strings (abfd, current_offset, syms, num_syms, string_sizep,
/* Next comes the string itself + a null terminator. */
strcpy (p, syms[i]->name);
- som_symbol_data(syms[i])->stringtab_offset = strings_size;
+ som_symbol_data (syms[i])->stringtab_offset = strings_size;
p += length + 1;
strings_size += length + 1;
/* Always align up to the next word boundary. */
while (strings_size % 4)
- {
+ {
bfd_put_8 (abfd, 0, p);
strings_size++;
p++;
- }
+ }
}
/* Scribble out any partial block. */
@@ -3270,23 +3296,22 @@ som_write_symbol_strings (abfd, current_offset, syms, num_syms, string_sizep,
return true;
}
-/* Compute variable information to be placed in the SOM headers,
+/* Compute variable information to be placed in the SOM headers,
space/subspace dictionaries, relocation streams, etc. Begin
writing parts of the object file. */
-static boolean
+static boolean
som_begin_writing (abfd)
bfd *abfd;
{
unsigned long current_offset = 0;
int strings_size = 0;
- unsigned int total_reloc_size = 0;
unsigned long num_spaces, num_subspaces, i;
asection *section;
unsigned int total_subspaces = 0;
struct som_exec_auxhdr *exec_header = NULL;
- /* The file header will always be first in an object file,
+ /* The file header will always be first in an object file,
everything else can be in random locations. To keep things
"simple" BFD will lay out the object file in the manner suggested
by the PRO ABI for PA-RISC Systems. */
@@ -3298,7 +3323,7 @@ som_begin_writing (abfd)
/* Make room for the file header, it's contents are not complete
yet, so it can not be written at this time. */
- current_offset += sizeof (struct header);
+ current_offset += sizeof (struct header);
/* Any auxiliary headers will follow the file header. Right now
we support only the copyright and version headers. */
@@ -3401,7 +3426,7 @@ som_begin_writing (abfd)
if (current_offset % 4)
current_offset += (4 - (current_offset % 4));
- /* Mark the offset of the space/subspace string table in the
+ /* Mark the offset of the space/subspace string table in the
file header. */
obj_som_file_hdr (abfd)->space_strings_location = current_offset;
@@ -3414,13 +3439,13 @@ som_begin_writing (abfd)
obj_som_file_hdr (abfd)->space_strings_size = strings_size;
current_offset += strings_size;
- /* Next is the compilation unit. */
+ /* Next is the compilation unit. */
obj_som_file_hdr (abfd)->compiler_location = current_offset;
obj_som_file_hdr (abfd)->compiler_total = 0;
- if (obj_som_compilation_unit (abfd))
+ if (obj_som_compilation_unit (abfd))
{
obj_som_file_hdr (abfd)->compiler_total = 1;
- current_offset += COMPUNITSZ;
+ current_offset += COMPUNITSZ;
}
/* Now compute the file positions for the loadable subspaces, taking
@@ -3482,7 +3507,7 @@ som_begin_writing (abfd)
/* Keep track of exactly where we are within a particular
space. This is necessary as the braindamaged HPUX
- loader will create holes between subspaces *and*
+ loader will create holes between subspaces *and*
subspace alignments are *NOT* preserved. What a crock. */
subspace_offset = subsection->vma;
@@ -3511,7 +3536,6 @@ som_begin_writing (abfd)
subspace_offset += subsection->vma - subspace_offset;
}
-
subsection->target_index = total_subspaces++;
/* This is real data to be loaded from the file. */
if (subsection->flags & SEC_LOAD)
@@ -3526,7 +3550,7 @@ som_begin_writing (abfd)
som_section_data (subsection)->subspace_dict->file_loc_init_value
= current_offset;
subsection->filepos = current_offset;
- current_offset += bfd_section_size (abfd, subsection);
+ current_offset += bfd_section_size (abfd, subsection);
subspace_offset += bfd_section_size (abfd, subsection);
}
/* Looks like uninitialized data. */
@@ -3543,7 +3567,7 @@ som_begin_writing (abfd)
}
}
/* Goto the next section. */
- section = section->next;
+ section = section->next;
}
/* Finally compute the file positions for unloadable subspaces.
@@ -3571,7 +3595,7 @@ som_begin_writing (abfd)
subsection != NULL;
subsection = subsection->next)
{
-
+
if (!som_is_subspace (subsection)
|| !som_is_container (section, subsection)
|| (subsection->flags & SEC_ALLOC) != 0)
@@ -3584,7 +3608,7 @@ som_begin_writing (abfd)
som_section_data (subsection)->subspace_dict->file_loc_init_value
= current_offset;
subsection->filepos = current_offset;
- current_offset += bfd_section_size (abfd, subsection);
+ current_offset += bfd_section_size (abfd, subsection);
}
/* Looks like uninitialized data. */
else
@@ -3596,7 +3620,7 @@ som_begin_writing (abfd)
}
}
/* Goto the next section. */
- section = section->next;
+ section = section->next;
}
/* If building an executable, then make sure to seek to and write
@@ -3645,7 +3669,7 @@ som_finish_writing (abfd)
The names of the symbols are stored in a separate string table,
and the index for each symbol name into the string table is computed
below. Therefore, it is not possible to write the symbol table
- at this time.
+ at this time.
These used to be output before the subspace contents, but they
were moved here to work around a stupid bug in the hpux linker
@@ -3654,7 +3678,7 @@ som_finish_writing (abfd)
/* Make sure we're on a word boundary. */
if (current_offset % 4)
- current_offset += (4 - (current_offset % 4));
+ current_offset += (4 - (current_offset % 4));
num_syms = bfd_get_symcount (abfd);
obj_som_file_hdr (abfd)->symbol_location = current_offset;
@@ -3687,7 +3711,7 @@ som_finish_writing (abfd)
/* At the end of the file is the fixup stream which starts on a
word boundary. */
if (current_offset % 4)
- current_offset += (4 - (current_offset % 4));
+ current_offset += (4 - (current_offset % 4));
obj_som_file_hdr (abfd)->fixup_request_location = current_offset;
/* Write the fixups and update fields in subspace headers which
@@ -3700,7 +3724,7 @@ som_finish_writing (abfd)
/* Done. Store the total size of the SOM. */
obj_som_file_hdr (abfd)->som_length = current_offset + total_reloc_size;
-
+
/* Now that the symbol table information is complete, build and
write the symbol table. */
if (som_build_and_write_symbol_table (abfd) == false)
@@ -3729,7 +3753,7 @@ som_finish_writing (abfd)
subsection != NULL;
subsection = subsection->next)
{
-
+
/* Skip any section which does not correspond to a space
or subspace. Or does not have SEC_ALLOC set (and therefore
has no real bits on the disk). */
@@ -3757,7 +3781,7 @@ som_finish_writing (abfd)
/* Mark the index of the current space within the subspace's
dictionary record. */
som_section_data (subsection)->subspace_dict->space_index = i;
-
+
/* Dump the current subspace header. */
if (bfd_write ((PTR) som_section_data (subsection)->subspace_dict,
sizeof (struct subspace_dictionary_record), 1, abfd)
@@ -3765,7 +3789,7 @@ som_finish_writing (abfd)
return false;
}
/* Goto the next section. */
- section = section->next;
+ section = section->next;
}
/* Now repeat the process for unloadable subspaces. */
@@ -3784,7 +3808,7 @@ som_finish_writing (abfd)
subsection != NULL;
subsection = subsection->next)
{
-
+
/* Skip any section which does not correspond to a space or
subspace, or which SEC_ALLOC set (and therefore handled
in the loadable spaces/subspaces code above). */
@@ -3808,12 +3832,12 @@ som_finish_writing (abfd)
/* Increment the number of subspaces seen and the number of
subspaces contained within the current space. */
som_section_data (section)->space_dict->subspace_quantity++;
- subspace_index++;
+ subspace_index++;
/* Mark the index of the current space within the subspace's
dictionary record. */
som_section_data (subsection)->subspace_dict->space_index = i;
-
+
/* Dump this subspace header. */
if (bfd_write ((PTR) som_section_data (subsection)->subspace_dict,
sizeof (struct subspace_dictionary_record), 1, abfd)
@@ -3821,7 +3845,7 @@ som_finish_writing (abfd)
return false;
}
/* Goto the next section. */
- section = section->next;
+ section = section->next;
}
/* All the subspace dictiondary records are written, and all the
@@ -3836,12 +3860,11 @@ som_finish_writing (abfd)
section = abfd->sections;
for (i = 0; i < num_spaces; i++)
{
-
/* Find a space. */
while (!som_is_space (section))
section = section->next;
- /* Dump its header */
+ /* Dump its header. */
if (bfd_write ((PTR) som_section_data (section)->space_dict,
sizeof (struct space_dictionary_record), 1, abfd)
!= sizeof (struct space_dictionary_record))
@@ -3856,23 +3879,23 @@ som_finish_writing (abfd)
{
location = obj_som_file_hdr (abfd)->compiler_location;
if (bfd_seek (abfd, location, SEEK_SET) < 0)
- return false;
+ return false;
if (bfd_write ((PTR) obj_som_compilation_unit (abfd),
COMPUNITSZ, 1, abfd) != COMPUNITSZ)
- return false;
+ return false;
}
/* Setting of the system_id has to happen very late now that copying of
BFD private data happens *after* section contents are set. */
if (abfd->flags & (EXEC_P | DYNAMIC))
- obj_som_file_hdr(abfd)->system_id = obj_som_exec_data (abfd)->system_id;
+ obj_som_file_hdr (abfd)->system_id = obj_som_exec_data (abfd)->system_id;
else if (bfd_get_mach (abfd) == pa20)
- obj_som_file_hdr(abfd)->system_id = CPU_PA_RISC2_0;
+ obj_som_file_hdr (abfd)->system_id = CPU_PA_RISC2_0;
else if (bfd_get_mach (abfd) == pa11)
- obj_som_file_hdr(abfd)->system_id = CPU_PA_RISC1_1;
+ obj_som_file_hdr (abfd)->system_id = CPU_PA_RISC1_1;
else
- obj_som_file_hdr(abfd)->system_id = CPU_PA_RISC1_0;
+ obj_som_file_hdr (abfd)->system_id = CPU_PA_RISC1_0;
/* Compute the checksum for the file header just before writing
the header to disk. */
@@ -3947,7 +3970,7 @@ som_compute_checksum (abfd)
static void
som_bfd_derive_misc_symbol_info (abfd, sym, info)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asymbol *sym;
struct som_misc_symbol_info *info;
{
@@ -3958,7 +3981,7 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
all symbols (including undefined symbols!). Unfortunately,
the type specified in an import/export statement does not
always match what the linker wants. Severe braindamage. */
-
+
/* Section symbols will not have a SOM symbol type assigned to
them yet. Assign all section symbols type ST_DATA. */
if (sym->flags & BSF_SECTION_SYM)
@@ -4008,7 +4031,7 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
else
info->symbol_type = ST_DATA;
}
-
+
else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_UNKNOWN)
info->symbol_type = ST_DATA;
@@ -4028,13 +4051,14 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_SEC_PROG)
info->symbol_type = ST_SEC_PROG;
}
-
+
/* Now handle the symbol's scope. Exported data which is not
in the common section has scope SS_UNIVERSAL. Note scope
of common symbols was handled earlier! */
if (bfd_is_und_section (sym->section))
info->symbol_scope = SS_UNSAT;
- else if (sym->flags & BSF_EXPORT && ! bfd_is_com_section (sym->section))
+ else if (sym->flags & (BSF_EXPORT | BSF_WEAK)
+ && ! bfd_is_com_section (sym->section))
info->symbol_scope = SS_UNIVERSAL;
/* Anything else which is not in the common section has scope
SS_LOCAL. */
@@ -4049,7 +4073,7 @@ som_bfd_derive_misc_symbol_info (abfd, sym, info)
|| bfd_is_und_section (sym->section)
|| bfd_is_abs_section (sym->section))
info->symbol_info = 0;
- /* For all other symbols, the symbol_info field contains the
+ /* For all other symbols, the symbol_info field contains the
subspace index of the space this symbol is contained in. */
else
info->symbol_info = sym->section->target_index;
@@ -4091,8 +4115,8 @@ som_build_and_write_symbol_table (abfd)
{
struct som_misc_symbol_info info;
- /* This is really an index into the symbol strings table.
- By the time we get here, the index has already been
+ /* This is really an index into the symbol strings table.
+ By the time we get here, the index has already been
computed and stored into the name field in the BFD symbol. */
som_symtab[i].name.n_strx = som_symbol_data(bfd_syms[i])->stringtab_offset;
@@ -4126,7 +4150,7 @@ som_build_and_write_symbol_table (abfd)
return false;
}
-/* Write an object in SOM format. */
+/* Write an object in SOM format. */
static boolean
som_write_object_contents (abfd)
@@ -4145,7 +4169,6 @@ som_write_object_contents (abfd)
return (som_finish_writing (abfd));
}
-
/* Read and save the string table associated with the given BFD. */
@@ -4176,12 +4199,12 @@ som_slurp_string_table (abfd)
if (bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET) < 0)
return false;
-
+
if (bfd_read (stringtab, obj_som_stringtab_size (abfd), 1, abfd)
!= obj_som_stringtab_size (abfd))
return false;
- /* Save our results and return success. */
+ /* Save our results and return success. */
obj_som_stringtab (abfd) = stringtab;
return true;
}
@@ -4285,7 +4308,7 @@ som_slurp_symbol_table (abfd)
goto error_return;
if (bfd_seek (abfd, obj_som_sym_filepos (abfd), SEEK_SET) < 0)
goto error_return;
- if (bfd_read (buf, symbol_count * symsize, 1, abfd)
+ if (bfd_read (buf, symbol_count * symsize, 1, abfd)
!= symbol_count * symsize)
goto error_return;
@@ -4350,7 +4373,6 @@ som_slurp_symbol_table (abfd)
undefined function symbols. */
if (bufp->symbol_scope == SS_UNSAT)
sym->symbol.flags |= BSF_FUNCTION;
-
default:
break;
@@ -4396,7 +4418,7 @@ som_slurp_symbol_table (abfd)
/* Check for a weak symbol. */
if (bufp->secondary_def)
- sym->symbol.flags |= BSF_WEAK;
+ sym->symbol.flags |= BSF_WEAK;
/* Mark section symbols and symbols used by the debugger.
Note $START$ is a magic code symbol, NOT a section symbol. */
@@ -4466,7 +4488,7 @@ som_make_empty_symbol (abfd)
bfd *abfd;
{
som_symbol_type *new =
- (som_symbol_type *) bfd_zalloc (abfd, sizeof (som_symbol_type));
+ (som_symbol_type *) bfd_zalloc (abfd, sizeof (som_symbol_type));
if (new == NULL)
return 0;
new->symbol.the_bfd = abfd;
@@ -4478,7 +4500,7 @@ som_make_empty_symbol (abfd)
static void
som_print_symbol (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
@@ -4507,7 +4529,7 @@ som_print_symbol (ignore_abfd, afile, symbol, how)
static boolean
som_bfd_is_local_label_name (abfd, name)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
return (name[0] == 'L' && name[1] == '$');
@@ -4522,7 +4544,7 @@ som_bfd_is_local_label_name (abfd, name)
variables rptr, section, and symbols have no meaning.
Return the number of relocations requested by the fixup stream. When
- not just counting
+ not just counting
This needs at least two or three more passes to get it cleaned up. */
@@ -4538,11 +4560,11 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
unsigned int op, varname, deallocate_contents = 0;
unsigned char *end_fixups = &fixup[end];
const struct fixup_format *fp;
- char *cp;
+ const char *cp;
unsigned char *save_fixup;
int variables[26], stack[20], c, v, count, prev_fixup, *sp, saved_unwind_bits;
const int *subop;
- arelent *rptr= internal_relocs;
+ arelent *rptr = internal_relocs;
unsigned int offset = 0;
#define var(c) variables[(c) - 'A']
@@ -4605,7 +4627,7 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
cp = fp->format;
/* Process the format string. Parsing happens in two phases,
- parse RHS, then assign to LHS. Repeat until no more
+ parse RHS, then assign to LHS. Repeat until no more
characters in the format string. */
while (*cp)
{
@@ -4643,7 +4665,6 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
push (v);
}
else
-
/* An operator. Pop two two values from the stack and
use them as operands to the given operation. Push
the result of the operation back on the stack. */
@@ -4799,7 +4820,7 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
else if (fixup > save_fixup + 1)
som_reloc_queue_insert (save_fixup, fixup - save_fixup, reloc_queue);
- /* We do not pass R_DATA_OVERRIDE or R_NO_RELOCATION
+ /* We do not pass R_DATA_OVERRIDE or R_NO_RELOCATION
fixups to BFD. */
if (som_hppa_howto_table[op].type != R_DATA_OVERRIDE
&& som_hppa_howto_table[op].type != R_NO_RELOCATION)
@@ -4816,8 +4837,6 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
;
else if (som_hppa_howto_table[op].type == R_DATA_ONE_SYMBOL)
{
- unsigned addend = var ('V');
-
/* Try what was specified in R_DATA_OVERRIDE first
(if anything). Then the hard way using the
section contents. */
@@ -4843,7 +4862,7 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
rptr->addend = bfd_get_32 (section->owner,
(section->contents
+ offset - var ('L')));
-
+
}
else
rptr->addend = var ('V');
@@ -4867,9 +4886,9 @@ som_set_reloc_info (fixup, end, internal_relocs, section, symbols, just_count)
#undef emptystack
}
-/* Read in the relocs (aka fixups in SOM terms) for a section.
+/* Read in the relocs (aka fixups in SOM terms) for a section.
- som_get_reloc_upper_bound calls this routine with JUST_COUNT
+ som_get_reloc_upper_bound calls this routine with JUST_COUNT
set to true to indicate it only needs a count of the number
of actual relocations. */
@@ -4890,14 +4909,14 @@ som_slurp_reloc_table (abfd, section, symbols, just_count)
if (section->reloc_count == 0)
return true;
- /* If reloc_count is -1, then the relocation stream has not been
+ /* If reloc_count is -1, then the relocation stream has not been
parsed. We must do so now to know how many relocations exist. */
if (section->reloc_count == -1)
{
external_relocs = (char *) bfd_malloc (fixup_stream_size);
if (external_relocs == (char *) NULL)
return false;
- /* Read in the external forms. */
+ /* Read in the external forms. */
if (bfd_seek (abfd,
obj_som_reloc_filepos (abfd) + section->rel_filepos,
SEEK_SET)
@@ -4927,7 +4946,7 @@ som_slurp_reloc_table (abfd, section, symbols, just_count)
if (section->relocation != (arelent *) NULL)
return true;
- internal_relocs = (arelent *)
+ internal_relocs = (arelent *)
bfd_zalloc (abfd, (num_relocs * sizeof (arelent)));
if (internal_relocs == (arelent *) NULL)
return false;
@@ -4946,7 +4965,7 @@ som_slurp_reloc_table (abfd, section, symbols, just_count)
}
/* Return the number of bytes required to store the relocation
- information associated with the given section. */
+ information associated with the given section. */
static long
som_get_reloc_upper_bound (abfd, asect)
@@ -5006,7 +5025,7 @@ som_new_section_hook (abfd, newsect)
return false;
newsect->alignment_power = 3;
- /* We allow more than three sections internally */
+ /* We allow more than three sections internally. */
return true;
}
@@ -5038,6 +5057,7 @@ som_bfd_copy_private_symbol_data (ibfd, isymbol, obfd, osymbol)
/* Copy any private info we understand from the input section
to the output section. */
+
static boolean
som_bfd_copy_private_section_data (ibfd, isection, obfd, osection)
bfd *ibfd;
@@ -5051,9 +5071,9 @@ som_bfd_copy_private_section_data (ibfd, isection, obfd, osection)
|| (!som_is_space (isection) && !som_is_subspace (isection)))
return true;
- som_section_data (osection)->copy_data
- = (struct som_copyable_section_data_struct *)
- bfd_zalloc (obfd, sizeof (struct som_copyable_section_data_struct));
+ som_section_data (osection)->copy_data =
+ (struct som_copyable_section_data_struct *)
+ bfd_zalloc (obfd, sizeof (struct som_copyable_section_data_struct));
if (som_section_data (osection)->copy_data == NULL)
return false;
@@ -5108,10 +5128,10 @@ bfd_som_set_section_attributes (section, defined, private, sort_key, spnum)
/* Allocate memory to hold the magic information. */
if (som_section_data (section)->copy_data == NULL)
{
- som_section_data (section)->copy_data
- = (struct som_copyable_section_data_struct *)
- bfd_zalloc (section->owner,
- sizeof (struct som_copyable_section_data_struct));
+ som_section_data (section)->copy_data =
+ (struct som_copyable_section_data_struct *)
+ bfd_zalloc (section->owner,
+ sizeof (struct som_copyable_section_data_struct));
if (som_section_data (section)->copy_data == NULL)
return false;
}
@@ -5123,7 +5143,7 @@ bfd_som_set_section_attributes (section, defined, private, sort_key, spnum)
return true;
}
-/* Set backend info for subsections which can not be described
+/* Set backend info for subsections which can not be described
in the BFD data structures. */
boolean
@@ -5138,10 +5158,10 @@ bfd_som_set_subsection_attributes (section, container, access,
/* Allocate memory to hold the magic information. */
if (som_section_data (section)->copy_data == NULL)
{
- som_section_data (section)->copy_data
- = (struct som_copyable_section_data_struct *)
- bfd_zalloc (section->owner,
- sizeof (struct som_copyable_section_data_struct));
+ som_section_data (section)->copy_data =
+ (struct som_copyable_section_data_struct *)
+ bfd_zalloc (section->owner,
+ sizeof (struct som_copyable_section_data_struct));
if (som_section_data (section)->copy_data == NULL)
return false;
}
@@ -5168,6 +5188,7 @@ bfd_som_set_symbol_type (symbol, type)
/* Attach an auxiliary header to the BFD backend so that it may be
written into the object file. */
+
boolean
bfd_som_attach_aux_hdr (abfd, type, string)
bfd *abfd;
@@ -5218,7 +5239,7 @@ bfd_som_attach_aux_hdr (abfd, type, string)
boolean
bfd_som_attach_compilation_unit (abfd, name, language_name, product_id,
- version_id)
+ version_id)
bfd *abfd;
const char *name;
const char *language_name;
@@ -5260,9 +5281,9 @@ som_get_section_contents (abfd, section, location, offset, count)
{
if (count == 0 || ((section->flags & SEC_HAS_CONTENTS) == 0))
return true;
- if ((bfd_size_type)(offset+count) > section->_raw_size
- || bfd_seek (abfd, (file_ptr)(section->filepos + offset), SEEK_SET) == -1
- || bfd_read (location, (bfd_size_type)1, count, abfd) != count)
+ if ((bfd_size_type) (offset+count) > section->_raw_size
+ || bfd_seek (abfd, (file_ptr) (section->filepos + offset), SEEK_SET) == -1
+ || bfd_read (location, (bfd_size_type) 1, count, abfd) != count)
return (false); /* on error */
return (true);
}
@@ -5294,7 +5315,7 @@ som_set_section_contents (abfd, section, location, offset, count)
/* Seek to the proper offset within the object file and write the
data. */
- offset += som_section_data (section)->subspace_dict->file_loc_init_value;
+ offset += som_section_data (section)->subspace_dict->file_loc_init_value;
if (bfd_seek (abfd, offset, SEEK_SET) == -1)
return false;
@@ -5309,28 +5330,28 @@ som_set_arch_mach (abfd, arch, machine)
enum bfd_architecture arch;
unsigned long machine;
{
- /* Allow any architecture to be supported by the SOM backend */
+ /* Allow any architecture to be supported by the SOM backend. */
return bfd_default_set_arch_mach (abfd, arch, machine);
}
static boolean
som_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;
+ 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;
{
return (false);
}
static int
som_sizeof_headers (abfd, reloc)
- bfd *abfd;
- boolean reloc;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean reloc ATTRIBUTE_UNUSED;
{
(*_bfd_error_handler) (_("som_sizeof_headers unimplemented"));
fflush (stderr);
@@ -5365,7 +5386,9 @@ som_decode_symclass (symbol)
return 'U';
if (bfd_is_ind_section (symbol->section))
return 'I';
- if (!(symbol->flags & (BSF_GLOBAL|BSF_LOCAL)))
+ if (symbol->flags & BSF_WEAK)
+ return 'W';
+ if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL)))
return '?';
if (bfd_is_abs_section (symbol->section)
@@ -5385,13 +5408,13 @@ som_decode_symclass (symbol)
static void
som_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
ret->type = som_decode_symclass (symbol);
if (ret->type != 'U')
- ret->value = symbol->value+symbol->section->vma;
+ ret->value = symbol->value + symbol->section->vma;
else
ret->value = 0;
ret->name = symbol->name;
@@ -5410,7 +5433,7 @@ som_bfd_count_ar_symbols (abfd, lst_header, count)
unsigned int *hash_table = NULL;
file_ptr lst_filepos = bfd_tell (abfd) - sizeof (struct lst_header);
- hash_table =
+ hash_table =
(unsigned int *) bfd_malloc (lst_header->hash_size
* sizeof (unsigned int));
if (hash_table == NULL && lst_header->hash_size != 0)
@@ -5488,7 +5511,7 @@ som_bfd_fill_in_ar_symbols (abfd, lst_header, syms)
struct som_entry *som_dict = NULL;
file_ptr lst_filepos = bfd_tell (abfd) - sizeof (struct lst_header);
- hash_table =
+ hash_table =
(unsigned int *) bfd_malloc (lst_header->hash_size
* sizeof (unsigned int));
if (hash_table == NULL && lst_header->hash_size != 0)
@@ -5511,7 +5534,7 @@ som_bfd_fill_in_ar_symbols (abfd, lst_header, syms)
if (bfd_seek (abfd, lst_filepos + lst_header->dir_loc, SEEK_SET) < 0)
goto error_return;
- if (bfd_read ((PTR) som_dict, lst_header->module_count,
+ if (bfd_read ((PTR) som_dict, lst_header->module_count,
sizeof (struct som_entry), abfd)
!= lst_header->module_count * sizeof (struct som_entry))
goto error_return;
@@ -5576,7 +5599,7 @@ som_bfd_fill_in_ar_symbols (abfd, lst_header, syms)
goto error_return;
/* Seek to the name length & string and read them in. */
- if (bfd_seek (abfd, lst_filepos + lst_header->string_loc
+ if (bfd_seek (abfd, lst_filepos + lst_header->string_loc
+ lst_symbol.name.n_strx - 4, SEEK_SET) < 0)
goto error_return;
@@ -5601,7 +5624,7 @@ som_bfd_fill_in_ar_symbols (abfd, lst_header, syms)
set++;
}
}
- /* If we haven't died by now, then we successfully read the entire
+ /* If we haven't died by now, then we successfully read the entire
archive symbol table. */
if (hash_table != NULL)
free (hash_table);
@@ -5618,6 +5641,7 @@ som_bfd_fill_in_ar_symbols (abfd, lst_header, syms)
}
/* Read in the LST from the archive. */
+
static boolean
som_slurp_armap (abfd)
bfd *abfd;
@@ -5687,7 +5711,7 @@ som_slurp_armap (abfd)
return false;
/* Get back to the start of the library symbol table. */
- if (bfd_seek (abfd, ardata->first_file_filepos - parsed_size
+ if (bfd_seek (abfd, ardata->first_file_filepos - parsed_size
+ sizeof (struct lst_header), SEEK_SET) < 0)
return false;
@@ -5792,6 +5816,7 @@ som_bfd_prep_for_ar_write (abfd, num_syms, stringsize)
/* Hash a symbol name based on the hashing algorithm presented in the
SOM ABI. */
+
static unsigned int
som_bfd_ar_symbol_hash (symbol)
asymbol *symbol;
@@ -5803,12 +5828,12 @@ som_bfd_ar_symbol_hash (symbol)
return 0x1000100 | (symbol->name[0] << 16) | symbol->name[0];
return ((len & 0x7f) << 24) | (symbol->name[1] << 16)
- | (symbol->name[len-2] << 8) | symbol->name[len-1];
+ | (symbol->name[len - 2] << 8) | symbol->name[len - 1];
}
/* Do the bulk of the work required to write the SOM library
symbol table. */
-
+
static boolean
som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
bfd *abfd;
@@ -5848,7 +5873,7 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
/* Some initialization. */
memset (hash_table, 0, 4 * lst.hash_size);
memset (som_dict, 0, lst.module_count * sizeof (struct som_entry));
- memset (last_hash_entry, 0,
+ memset (last_hash_entry, 0,
lst.hash_size * sizeof (struct lst_symbol_record *));
/* Symbols have som_index fields, so we have to keep track of the
@@ -5874,7 +5899,7 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
/* Make sure we're properly aligned. */
curr_som_offset = (curr_som_offset + 0x1) & ~0x1;
- /* FIXME should be done with buffers just like everything else... */
+ /* FIXME should be done with buffers just like everything else... */
lst_syms = bfd_malloc (nsyms * sizeof (struct lst_symbol_record));
if (lst_syms == NULL && nsyms != 0)
goto error_return;
@@ -5971,7 +5996,7 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
tmp = last_hash_entry[curr_lst_sym->symbol_key % lst.hash_size];
tmp->next_entry
= (curr_lst_sym - lst_syms) * sizeof (struct lst_symbol_record)
- + lst.hash_size * 4
+ + lst.hash_size * 4
+ lst.module_count * sizeof (struct som_entry)
+ sizeof (struct lst_header);
}
@@ -5980,7 +6005,7 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
/* First entry in this hash chain. */
hash_table[curr_lst_sym->symbol_key % lst.hash_size]
= (curr_lst_sym - lst_syms) * sizeof (struct lst_symbol_record)
- + lst.hash_size * 4
+ + lst.hash_size * 4
+ lst.module_count * sizeof (struct som_entry)
+ sizeof (struct lst_header);
}
@@ -5990,13 +6015,12 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
last_hash_entry[curr_lst_sym->symbol_key % lst.hash_size]
= curr_lst_sym;
-
/* Update the string table. */
bfd_put_32 (abfd, strlen (sym->symbol.name), p);
p += 4;
strcpy (p, sym->symbol.name);
p += strlen (sym->symbol.name) + 1;
- while ((int)p % 4)
+ while ((int) p % 4)
{
bfd_put_8 (abfd, 0, p);
p++;
@@ -6009,7 +6033,7 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
/* Keep track of where each SOM will finally reside; then look
at the next BFD. */
curr_som_offset += arelt_size (curr_bfd) + sizeof (struct ar_hdr);
-
+
/* A particular object in the archive may have an odd length; the
linker requires objects begin on an even boundary. So round
up the current offset as necessary. */
@@ -6069,14 +6093,13 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst, elength)
You'll never believe this is really how armaps are handled in SOM... */
-/*ARGSUSED*/
static boolean
som_write_armap (abfd, elength, map, orl_count, stridx)
bfd *abfd;
unsigned int elength;
- struct orl *map;
- unsigned int orl_count;
- int stridx;
+ struct orl *map ATTRIBUTE_UNUSED;
+ unsigned int orl_count ATTRIBUTE_UNUSED;
+ int stridx ATTRIBUTE_UNUSED;
{
bfd *curr_bfd;
struct stat statbuf;
@@ -6084,7 +6107,7 @@ som_write_armap (abfd, elength, map, orl_count, stridx)
struct ar_hdr hdr;
struct lst_header lst;
int *p;
-
+
/* We'll use this for the archive's date and mode later. */
if (stat (abfd->filename, &statbuf) != 0)
{
@@ -6156,9 +6179,9 @@ som_write_armap (abfd, elength, map, orl_count, stridx)
/* Compute the checksum. Must happen after the entire lst header
has filled in. */
- p = (int *)&lst;
+ p = (int *) &lst;
lst.checksum = 0;
- for (i = 0; i < sizeof (struct lst_header)/sizeof (int) - 1; i++)
+ for (i = 0; i < sizeof (struct lst_header) / sizeof (int) - 1; i++)
lst.checksum ^= *p++;
sprintf (hdr.ar_name, "/ ");
@@ -6189,7 +6212,7 @@ som_write_armap (abfd, elength, map, orl_count, stridx)
if (som_bfd_ar_write_symbol_stuff (abfd, nsyms, stringsize, lst, elength)
== false)
return false;
-
+
/* Done. */
return true;
}
@@ -6223,12 +6246,13 @@ som_bfd_free_cached_info (abfd)
return true;
}
-/* End of miscellaneous support functions. */
+/* End of miscellaneous support functions. */
/* Linker support functions. */
+
static boolean
som_bfd_link_split_section (abfd, sec)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
return (som_is_subspace (sec) && sec->_raw_size > 240000);
@@ -6263,9 +6287,7 @@ som_bfd_link_split_section (abfd, sec)
#define som_bfd_gc_sections bfd_generic_gc_sections
-
-const bfd_target som_vec =
-{
+const bfd_target som_vec = {
"som", /* name */
bfd_target_som_flavour,
BFD_ENDIAN_BIG, /* target byte order */
@@ -6317,7 +6339,7 @@ const bfd_target som_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0
};
diff --git a/gnu/usr.bin/binutils/bfd/som.h b/gnu/usr.bin/binutils/bfd/som.h
index af378042189..5f0d1839dea 100644
--- a/gnu/usr.bin/binutils/bfd/som.h
+++ b/gnu/usr.bin/binutils/bfd/som.h
@@ -1,5 +1,5 @@
/* HP PA-RISC SOM object file format: definitions internal to BFD.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000
Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
@@ -46,8 +46,8 @@
#define _PA_RISC_ID(__m_num) 1
#endif /* HOST_HPPABSD */
-#define FILE_HDR_SIZE sizeof(struct header)
-#define AUX_HDR_SIZE sizeof(struct som_exec_auxhdr)
+#define FILE_HDR_SIZE sizeof (struct header)
+#define AUX_HDR_SIZE sizeof (struct som_exec_auxhdr)
typedef struct som_symbol
{
@@ -77,7 +77,7 @@ typedef struct som_symbol
int reloc_count;
/* During object file writing, the offset of the name of this symbol
- in the SOM string table. */
+ in the SOM string table. */
int stringtab_offset;
}
som_symbol_type;
@@ -159,7 +159,7 @@ struct som_copyable_section_data_struct
int space_number;
/* Add more stuff here as needed. Good examples of information
- we might want to pass would be initialization pointers,
+ we might want to pass would be initialization pointers,
and the many subspace flags we do not represent yet. */
};
@@ -167,7 +167,7 @@ struct som_copyable_section_data_struct
reloc_size holds the size of the relocation stream, note this
is very different from the number of relocations as SOM relocations
- are variable length.
+ are variable length.
reloc_stream is the actual stream of relocation entries. */
@@ -198,14 +198,13 @@ struct som_section_data_struct
((struct som_section_data_struct *)sec->used_by_bfd)
#define som_symbol_data(symbol) ((som_symbol_type *) symbol)
-
/* Defines groups of basic relocations. FIXME: These should
be the only basic relocations created by GAS. The rest
should be internal to the BFD backend.
The idea is both SOM and ELF define these basic relocation
types so they map into a SOM or ELF specific reloation as
- appropriate. This allows GAS to share much more code
+ appropriate. This allows GAS to share much more code
between the two object formats. */
#define R_HPPA_NONE R_NO_RELOCATION
diff --git a/gnu/usr.bin/binutils/bfd/sparclynx.c b/gnu/usr.bin/binutils/bfd/sparclynx.c
index dbfcae55cbe..08f7a2fa9d2 100644
--- a/gnu/usr.bin/binutils/bfd/sparclynx.c
+++ b/gnu/usr.bin/binutils/bfd/sparclynx.c
@@ -1,5 +1,5 @@
/* BFD support for Sparc binaries under LynxOS.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 97, 1998
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This is needed to reject a NewsOS file, e.g. in
gdb/testsuite/gdb.t10/crossload.exp. <kingdon@cygnus.com>
I needed to add M_UNKNOWN to recognize a 68000 object, so this will
- probably no longer reject a NewsOS object. <ian@cygnus.com>. */
+ probably no longer reject a NewsOS object. <ian@cygnus.com>. */
#define MACHTYPE_OK(mtype) ((mtype) == M_UNKNOWN \
|| (mtype) == M_68010 \
|| (mtype) == M_68020 \
@@ -90,7 +90,7 @@ NAME(lynx,set_arch_mach) (abfd, machtype)
case M_UNKNOWN:
/* Some Sun3s make magic numbers without cpu types in them, so
- we'll default to the 68000. */
+ we'll default to the 68000. */
arch = bfd_arch_m68k;
machine = bfd_mach_m68000;
break;
@@ -137,7 +137,7 @@ NAME(lynx,set_arch_mach) (abfd, machtype)
}
#define SET_ARCH_MACH(ABFD, EXEC) \
- NAME(lynx,set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
+ NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
choose_reloc_size(ABFD);
/* Determine the size of a relocation entry, based on the architecture */
diff --git a/gnu/usr.bin/binutils/bfd/sparcnetbsd.c b/gnu/usr.bin/binutils/bfd/sparcnetbsd.c
index 4277bb8914d..9cb9637bff9 100644
--- a/gnu/usr.bin/binutils/bfd/sparcnetbsd.c
+++ b/gnu/usr.bin/binutils/bfd/sparcnetbsd.c
@@ -1,5 +1,6 @@
/* BFD back-end for NetBSD/sparc a.out-ish binaries.
- Copyright (C) 1990, 91, 92, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -21,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_IS_BIG_ENDIAN_P
/* SPARC chips use either 4K or 8K pages, but object files always
- assume 8K page alignment so they will work on either one. */
+ assume 8K page alignment so they will work on either one. */
#define TARGET_PAGE_SIZE 0x2000
#define DEFAULT_ARCH bfd_arch_sparc
diff --git a/gnu/usr.bin/binutils/bfd/srec.c b/gnu/usr.bin/binutils/bfd/srec.c
index 31f69b04cf0..33dfaa7509d 100644
--- a/gnu/usr.bin/binutils/bfd/srec.c
+++ b/gnu/usr.bin/binutils/bfd/srec.c
@@ -1,5 +1,6 @@
/* BFD back-end for s-record objects.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -24,7 +25,7 @@ SUBSECTION
S-Record handling
DESCRIPTION
-
+
Ordinary S-Records cannot hold anything but addresses and
data, so that's all that we implement.
@@ -42,10 +43,10 @@ DESCRIPTION
up and output them when it's time to close the bfd.
An s record looks like:
-
+
EXAMPLE
S<type><length><address><data><checksum>
-
+
DESCRIPTION
Where
o length
@@ -61,7 +62,7 @@ DESCRIPTION
7) four byte address termination record
8) three byte address termination record
9) two byte address termination record
-
+
o address
is the start address of the data following, or in the case of
a termination record, the start address of the image
@@ -71,7 +72,6 @@ DESCRIPTION
is the sum of all the raw byte data in the record, from the length
upwards, modulo 256 and subtracted from 255.
-
SUBSECTION
Symbol S-Record handling
@@ -101,7 +101,7 @@ EXAMPLE
DESCRIPTION
We allow symbols to be anywhere in the data stream - the module names
are always ignored.
-
+
*/
#include "bfd.h"
@@ -142,7 +142,7 @@ static asymbol *srec_make_empty_symbol PARAMS ((bfd *));
static long srec_get_symtab_upper_bound PARAMS ((bfd *));
static long srec_get_symtab PARAMS ((bfd *, asymbol **));
-/* Macros for converting between hex and binary. */
+/* Macros for converting between hex and binary. */
static CONST char digs[] = "0123456789ABCDEF";
@@ -154,7 +154,7 @@ static CONST char digs[] = "0123456789ABCDEF";
ch += ((x) & 0xff);
#define ISHEX(x) hex_p(x)
-/* Initialize by filling in the hex conversion array. */
+/* Initialize by filling in the hex conversion array. */
static void
srec_init ()
@@ -168,10 +168,21 @@ srec_init ()
}
}
-/* The maximum number of bytes on a line is FF */
+/* The maximum number of bytes on a line is FF. */
#define MAXCHUNK 0xff
-/* The number of bytes we fit onto a line on output */
-#define CHUNK 16
+
+/* Default size for a CHUNK. */
+#define DEFAULT_CHUNK 16
+
+/* The number of bytes we actually fit onto a line on output.
+ This variable can be modified by objcopy's --srec-len parameter.
+ For a 0x75 byte record you should set --srec-len=0x70. */
+unsigned int Chunk = DEFAULT_CHUNK;
+
+/* The type of srec output (free or forced to S3).
+ This variable can be modified by objcopy's --srec-forceS3
+ parameter. */
+boolean S3Forced = 0;
/* When writing an S-record file, the S-records can not be output as
they are seen. This structure is used to hold them in memory. */
@@ -467,7 +478,8 @@ srec_scan (abfd)
if (! srec_new_symbol (abfd, symname, symval))
goto error_return;
}
- while (c == ' ' || c == '\t');
+ while (c == ' ' || c == '\t')
+ ;
if (c == '\n')
++lineno;
@@ -478,7 +490,7 @@ srec_scan (abfd)
}
break;
-
+
case 'S':
{
file_ptr pos;
@@ -839,7 +851,7 @@ srec_set_arch_mach (abfd, arch, mach)
return bfd_default_set_arch_mach (abfd, arch, mach);
}
-/* we have to save up all the Srecords for a splurge before output */
+/* We have to save up all the Srecords for a splurge before output. */
static boolean
srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
@@ -866,19 +878,17 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
return false;
memcpy ((PTR) data, location, (size_t) bytes_to_do);
- if ((section->lma + offset + bytes_to_do - 1) <= 0xffff)
- {
-
- }
+ /* Ff S3Forced is true then always select S3 records,
+ regardless of the siez of the addresses. */
+ if (S3Forced)
+ tdata->type = 3;
+ else if ((section->lma + offset + bytes_to_do - 1) <= 0xffff)
+ ; /* The default, S1, is OK. */
else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff
&& tdata->type <= 2)
- {
- tdata->type = 2;
- }
+ tdata->type = 2;
else
- {
- tdata->type = 3;
- }
+ tdata->type = 3;
entry->data = data;
entry->where = section->lma + offset;
@@ -912,8 +922,8 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
/* Write a record of type, of the supplied number of bytes. The
supplied bytes and length don't have a checksum. That's worked out
- here
-*/
+ here. */
+
static boolean
srec_write_record (abfd, type, address, data, end)
bfd *abfd;
@@ -933,7 +943,7 @@ srec_write_record (abfd, type, address, data, end)
*dst++ = '0' + type;
length = dst;
- dst += 2; /* leave room for dst*/
+ dst += 2; /* Leave room for dst. */
switch (type)
{
@@ -961,7 +971,7 @@ srec_write_record (abfd, type, address, data, end)
dst += 2;
}
- /* Fill in the length */
+ /* Fill in the length. */
TOHEX (length, (dst - length) / 2, check_sum);
check_sum &= 0xff;
check_sum = 255 - check_sum;
@@ -976,8 +986,6 @@ srec_write_record (abfd, type, address, data, end)
return true;
}
-
-
static boolean
srec_write_header (abfd)
bfd *abfd;
@@ -986,11 +994,10 @@ srec_write_header (abfd)
bfd_byte *dst = buffer;
unsigned int i;
- /* I'll put an arbitary 40 char limit on header size */
+ /* I'll put an arbitary 40 char limit on header size. */
for (i = 0; i < 40 && abfd->filename[i]; i++)
- {
- *dst++ = abfd->filename[i];
- }
+ *dst++ = abfd->filename[i];
+
return srec_write_record (abfd, 0, 0, buffer, dst);
}
@@ -1008,8 +1015,8 @@ srec_write_section (abfd, tdata, list)
bfd_vma address;
unsigned int octets_this_chunk = list->size - octets_written;
- if (octets_this_chunk > CHUNK)
- octets_this_chunk = CHUNK;
+ if (octets_this_chunk > Chunk)
+ octets_this_chunk = Chunk;
address = list->where + octets_written / bfd_octets_per_byte (abfd);
@@ -1038,14 +1045,12 @@ srec_write_terminator (abfd, tdata)
abfd->start_address, buffer, buffer);
}
-
-
static boolean
srec_write_symbols (abfd)
bfd *abfd;
{
char buffer[MAXCHUNK];
- /* Dump out the symbols of a bfd */
+ /* Dump out the symbols of a bfd. */
int i;
int count = bfd_get_symcount (abfd);
@@ -1065,7 +1070,7 @@ srec_write_symbols (abfd)
if (! bfd_is_local_label (abfd, s)
&& (s->flags & BSF_DEBUGGING) == 0)
{
- /* Just dump out non debug symbols */
+ /* Just dump out non debug symbols. */
bfd_size_type l;
char buf2[40], *p;
@@ -1107,7 +1112,7 @@ internal_srec_write_object_contents (abfd, symbols)
if (! srec_write_header (abfd))
return false;
- /* Now wander though all the sections provided and output them */
+ /* Now wander though all the sections provided and output them. */
list = tdata->head;
while (list != (srec_data_list_type *) NULL)
@@ -1133,7 +1138,6 @@ symbolsrec_write_object_contents (abfd)
return internal_srec_write_object_contents (abfd, 1);
}
-/*ARGSUSED*/
static int
srec_sizeof_headers (abfd, exec)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -1195,7 +1199,7 @@ srec_get_symtab (abfd, alocation)
c->udata.p = NULL;
}
}
-
+
for (i = 0; i < symcount; i++)
*alocation++ = csymbols++;
*alocation = NULL;
@@ -1203,7 +1207,6 @@ srec_get_symtab (abfd, alocation)
return symcount;
}
-/*ARGSUSED*/
static void
srec_get_symbol_info (ignore_abfd, symbol, ret)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -1213,7 +1216,6 @@ srec_get_symbol_info (ignore_abfd, symbol, ret)
bfd_symbol_info (symbol, ret);
}
-/*ARGSUSED*/
static void
srec_print_symbol (ignore_abfd, afile, symbol, how)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -1316,12 +1318,10 @@ const bfd_target srec_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0
};
-
-
const bfd_target symbolsrec_vec =
{
"symbolsrec", /* name */
@@ -1373,6 +1373,6 @@ const bfd_target symbolsrec_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0
};
diff --git a/gnu/usr.bin/binutils/bfd/stab-syms.c b/gnu/usr.bin/binutils/bfd/stab-syms.c
index f4fe6c8ba3c..a685e31eb81 100644
--- a/gnu/usr.bin/binutils/bfd/stab-syms.c
+++ b/gnu/usr.bin/binutils/bfd/stab-syms.c
@@ -1,5 +1,6 @@
/* Table of stab names for the BFD library.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 2000
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -20,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
-#define ARCH_SIZE 32 /* Value doesn't matter. */
+#define ARCH_SIZE 32 /* Value doesn't matter. */
#include "libaout.h"
#include "aout/aout64.h"
@@ -32,13 +33,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* These are not really stab symbols, but it is
convenient to have them here for the sake of nm.
For completeness, we could also add N_TEXT etc, but those
- are never needed, since nm treats those specially. */
+ are never needed, since nm treats those specially. */
#define EXTRA_SYMBOLS \
__define_name (N_SETA, "SETA")/* Absolute set element symbol */ \
__define_name (N_SETT, "SETT")/* Text set element symbol */ \
__define_name (N_SETD, "SETD")/* Data set element symbol */ \
__define_name (N_SETB, "SETB")/* Bss set element symbol */ \
- __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \
+ __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \
__define_name (N_INDR, "INDR") \
__define_name (N_WARNING, "WARNING")
diff --git a/gnu/usr.bin/binutils/bfd/stabs.c b/gnu/usr.bin/binutils/bfd/stabs.c
index e9ac167628d..15b1af510e0 100644
--- a/gnu/usr.bin/binutils/bfd/stabs.c
+++ b/gnu/usr.bin/binutils/bfd/stabs.c
@@ -1,5 +1,5 @@
/* Stabs in sections linking support.
- Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -108,7 +108,7 @@ struct stab_section_info
as the input offsets, because no stabs have been deleted from
this section. Otherwise the i'th entry is the number of
bytes of stabs that have been deleted prior to the i'th
- stab. */
+ stab. */
bfd_size_type *cumulative_skips;
/* This is an array of string indices. For each stab symbol, we
@@ -464,7 +464,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
sinfo->stabstr->_cooked_size = _bfd_stringtab_size (sinfo->strings);
/* Calculate the `cumulative_skips' array now that stabs have been
- deleted for this section. */
+ deleted for this section. */
if (skip != 0)
{
diff --git a/gnu/usr.bin/binutils/bfd/sunos.c b/gnu/usr.bin/binutils/bfd/sunos.c
index ada68572386..f4ada70a47d 100644
--- a/gnu/usr.bin/binutils/bfd/sunos.c
+++ b/gnu/usr.bin/binutils/bfd/sunos.c
@@ -1,5 +1,5 @@
/* BFD backend for SunOS binaries.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -508,7 +508,7 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
* sizeof (arelent))));
if (info->canonical_dynrel == NULL && info->dynrel_count != 0)
return -1;
-
+
to = info->canonical_dynrel;
if (obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE)
@@ -1421,7 +1421,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
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
@@ -2274,16 +2274,16 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
PUT_WORD (output_bfd, r_address, srel->r_address);
if (bfd_header_big_endian (output_bfd))
{
- srel->r_index[0] = (bfd_byte)(h->dynindx >> 16);
- srel->r_index[1] = (bfd_byte)(h->dynindx >> 8);
- srel->r_index[2] = (bfd_byte)(h->dynindx);
+ srel->r_index[0] = (bfd_byte) (h->dynindx >> 16);
+ srel->r_index[1] = (bfd_byte) (h->dynindx >> 8);
+ srel->r_index[2] = (bfd_byte) (h->dynindx);
srel->r_type[0] = (RELOC_STD_BITS_EXTERN_BIG
| RELOC_STD_BITS_JMPTABLE_BIG);
}
else
{
- srel->r_index[2] = (bfd_byte)(h->dynindx >> 16);
- srel->r_index[1] = (bfd_byte)(h->dynindx >> 8);
+ srel->r_index[2] = (bfd_byte) (h->dynindx >> 16);
+ srel->r_index[1] = (bfd_byte) (h->dynindx >> 8);
srel->r_index[0] = (bfd_byte)h->dynindx;
srel->r_type[0] = (RELOC_STD_BITS_EXTERN_LITTLE
| RELOC_STD_BITS_JMPTABLE_LITTLE);
@@ -2297,8 +2297,8 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
PUT_WORD (output_bfd, r_address, erel->r_address);
if (bfd_header_big_endian (output_bfd))
{
- erel->r_index[0] = (bfd_byte)(h->dynindx >> 16);
- erel->r_index[1] = (bfd_byte)(h->dynindx >> 8);
+ erel->r_index[0] = (bfd_byte) (h->dynindx >> 16);
+ erel->r_index[1] = (bfd_byte) (h->dynindx >> 8);
erel->r_index[2] = (bfd_byte)h->dynindx;
erel->r_type[0] =
(RELOC_EXT_BITS_EXTERN_BIG
@@ -2306,8 +2306,8 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
}
else
{
- erel->r_index[2] = (bfd_byte)(h->dynindx >> 16);
- erel->r_index[1] = (bfd_byte)(h->dynindx >> 8);
+ erel->r_index[2] = (bfd_byte) (h->dynindx >> 16);
+ erel->r_index[1] = (bfd_byte) (h->dynindx >> 8);
erel->r_index[0] = (bfd_byte)h->dynindx;
erel->r_type[0] =
(RELOC_EXT_BITS_EXTERN_LITTLE
@@ -2594,8 +2594,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
srel->r_address);
if (bfd_header_big_endian (dynobj))
{
- srel->r_index[0] = (bfd_byte)(indx >> 16);
- srel->r_index[1] = (bfd_byte)(indx >> 8);
+ srel->r_index[0] = (bfd_byte) (indx >> 16);
+ srel->r_index[1] = (bfd_byte) (indx >> 8);
srel->r_index[2] = (bfd_byte)indx;
if (h == NULL)
srel->r_type[0] = 2 << RELOC_STD_BITS_LENGTH_SH_BIG;
@@ -2608,8 +2608,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
}
else
{
- srel->r_index[2] = (bfd_byte)(indx >> 16);
- srel->r_index[1] = (bfd_byte)(indx >> 8);
+ srel->r_index[2] = (bfd_byte) (indx >> 16);
+ srel->r_index[1] = (bfd_byte) (indx >> 8);
srel->r_index[0] = (bfd_byte)indx;
if (h == NULL)
srel->r_type[0] = 2 << RELOC_STD_BITS_LENGTH_SH_LITTLE;
@@ -2633,8 +2633,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
erel->r_address);
if (bfd_header_big_endian (dynobj))
{
- erel->r_index[0] = (bfd_byte)(indx >> 16);
- erel->r_index[1] = (bfd_byte)(indx >> 8);
+ erel->r_index[0] = (bfd_byte) (indx >> 16);
+ erel->r_index[1] = (bfd_byte) (indx >> 8);
erel->r_index[2] = (bfd_byte)indx;
if (h == NULL)
erel->r_type[0] =
@@ -2646,8 +2646,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
}
else
{
- erel->r_index[2] = (bfd_byte)(indx >> 16);
- erel->r_index[1] = (bfd_byte)(indx >> 8);
+ erel->r_index[2] = (bfd_byte) (indx >> 16);
+ erel->r_index[1] = (bfd_byte) (indx >> 8);
erel->r_index[0] = (bfd_byte)indx;
if (h == NULL)
erel->r_type[0] =
@@ -2726,14 +2726,14 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
srel->r_address);
if (bfd_header_big_endian (dynobj))
{
- srel->r_index[0] = (bfd_byte)(indx >> 16);
- srel->r_index[1] = (bfd_byte)(indx >> 8);
+ srel->r_index[0] = (bfd_byte) (indx >> 16);
+ srel->r_index[1] = (bfd_byte) (indx >> 8);
srel->r_index[2] = (bfd_byte)indx;
}
else
{
- srel->r_index[2] = (bfd_byte)(indx >> 16);
- srel->r_index[1] = (bfd_byte)(indx >> 8);
+ srel->r_index[2] = (bfd_byte) (indx >> 16);
+ srel->r_index[1] = (bfd_byte) (indx >> 8);
srel->r_index[0] = (bfd_byte)indx;
}
/* FIXME: We may have to change the addend for a PC relative
@@ -2751,14 +2751,14 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
erel->r_address);
if (bfd_header_big_endian (dynobj))
{
- erel->r_index[0] = (bfd_byte)(indx >> 16);
- erel->r_index[1] = (bfd_byte)(indx >> 8);
+ erel->r_index[0] = (bfd_byte) (indx >> 16);
+ erel->r_index[1] = (bfd_byte) (indx >> 8);
erel->r_index[2] = (bfd_byte)indx;
}
else
{
- erel->r_index[2] = (bfd_byte)(indx >> 16);
- erel->r_index[1] = (bfd_byte)(indx >> 8);
+ erel->r_index[2] = (bfd_byte) (indx >> 16);
+ erel->r_index[1] = (bfd_byte) (indx >> 8);
erel->r_index[0] = (bfd_byte)indx;
}
if (pcrel && h != NULL)
@@ -2933,7 +2933,7 @@ sunos_finish_dynamic_link (abfd, info)
PUT_WORD (dynobj,
BFD_ALIGN (obj_textsec (abfd)->_raw_size, 0x2000),
esdl.ld_text);
-
+
if (! bfd_set_section_contents (abfd, sdyn->output_section, &esdl,
(sdyn->output_offset
+ sizeof esd
diff --git a/gnu/usr.bin/binutils/bfd/syms.c b/gnu/usr.bin/binutils/bfd/syms.c
index 6546f585054..311806e1f6b 100644
--- a/gnu/usr.bin/binutils/bfd/syms.c
+++ b/gnu/usr.bin/binutils/bfd/syms.c
@@ -1,5 +1,6 @@
/* Generic symbol-table support for the BFD library.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -91,7 +92,6 @@ SUBSECTION
All storage for the symbols themselves is in an objalloc
connected to the BFD; it is freed when the BFD is closed.
-
INODE
Writing Symbols, Mini Symbols, Reading Symbols, Symbols
SUBSECTION
@@ -163,8 +163,6 @@ SUBSECTION
*/
-
-
/*
DOCDD
INODE
@@ -390,14 +388,12 @@ DESCRIPTION
Return the actual number of symbol pointers, not
including the NULL.
-
.#define bfd_canonicalize_symtab(abfd, location) \
. BFD_SEND (abfd, _bfd_canonicalize_symtab,\
. (abfd, location))
*/
-
/*
FUNCTION
bfd_set_symtab
@@ -474,7 +470,6 @@ bfd_print_symbol_vandf (arg, symbol)
: ((type & BSF_OBJECT) ? 'O' : ' '))));
}
-
/*
FUNCTION
bfd_make_empty_symbol
@@ -537,7 +532,7 @@ static CONST struct section_to_type stt[] =
};
/* Return the single-character symbol type corresponding to
- section S, or '?' for an unknown COFF section.
+ section S, or '?' for an unknown COFF section.
Check for any leading string which matches, so .text5 returns
't' as well as .text */
@@ -548,7 +543,7 @@ coff_section_type (s)
{
CONST struct section_to_type *t;
- for (t = &stt[0]; t->section; t++)
+ for (t = &stt[0]; t->section; t++)
if (!strncmp (s, t->section, strlen (t->section)))
return t->type;
@@ -631,7 +626,7 @@ bfd_decode_symclass (symbol)
/*
FUNCTION
- bfd_is_undefined_symclass
+ bfd_is_undefined_symclass
DESCRIPTION
Returns non-zero if the class symbol returned by
@@ -668,12 +663,12 @@ bfd_symbol_info (symbol, ret)
symbol_info *ret;
{
ret->type = bfd_decode_symclass (symbol);
-
+
if (bfd_is_undefined_symclass (ret->type))
ret->value = 0;
else
ret->value = symbol->value + symbol->section->vma;
-
+
ret->name = symbol->name;
}
@@ -788,8 +783,8 @@ struct indexentry
static int
cmpindexentry (a, b)
- const PTR *a;
- const PTR *b;
+ const PTR a;
+ const PTR b;
{
const struct indexentry *contestantA = (const struct indexentry *) a;
const struct indexentry *contestantB = (const struct indexentry *) b;
@@ -1005,7 +1000,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
if (bfd_get_32 (abfd, stab + STRDXOFF) == 0)
continue;
- /* if we did not see a function def, leave space for one. */
+ /* if we did not see a function def, leave space for one. */
if (saw_fun == 0)
++info->indextablesize;
@@ -1027,7 +1022,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
if (saw_fun == 0)
++info->indextablesize;
-
+
if (info->indextablesize == 0)
return true;
++info->indextablesize;
@@ -1063,8 +1058,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
/* The following code creates a new indextable entry with
a NULL function name if there were no N_FUNs in a file.
Note that a N_SO without a file name is an EOF and
- there could be 2 N_SO following it with the new filename
- and directory. */
+ there could be 2 N_SO following it with the new filename
+ and directory. */
if (saw_fun == 0)
{
info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF);
@@ -1076,7 +1071,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
++i;
}
saw_fun = 0;
-
+
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
if (*file_name == '\0')
{
@@ -1262,7 +1257,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
*pfound = true;
- if (file_name[0] == '/' || directory_name == NULL)
+ if (IS_ABSOLUTE_PATH(file_name) || directory_name == NULL)
*pfilename = file_name;
else
{
diff --git a/gnu/usr.bin/binutils/bfd/sysdep.h b/gnu/usr.bin/binutils/bfd/sysdep.h
index 77b5e50a9c3..bab1c51a272 100644
--- a/gnu/usr.bin/binutils/bfd/sysdep.h
+++ b/gnu/usr.bin/binutils/bfd/sysdep.h
@@ -1,5 +1,6 @@
/* sysdep.h -- handle host dependencies for the BFD library
- Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -126,6 +127,18 @@ extern char *getenv ();
#ifdef ENABLE_NLS
#include <libintl.h>
+/* Note the use of dgetext() and PACKAGE here, rather than gettext().
+
+ This is because the code in this directory is used to build a library which
+ will be linked with code in other directories to form programs. We want to
+ maintain a seperate translation file for this directory however, rather
+ than being forced to merge it with that of any program linked to libbfd.
+ This is a library, so it cannot depend on the catalog currently loaded.
+
+ In order to do this, we have to make sure that when we extract messages we
+ use the OPCODES domain rather than the domain of the program that included
+ the bfd library, (eg OBJDUMP). Hence we use dgettext (PACKAGE, String)
+ and define PACKAGE to be 'bfd'. (See the code in configure). */
#define _(String) dgettext (PACKAGE, String)
#ifdef gettext_noop
#define N_(String) gettext_noop (String)
diff --git a/gnu/usr.bin/binutils/bfd/targets.c b/gnu/usr.bin/binutils/bfd/targets.c
index 1f2217b9fda..cfbe6adafbb 100644
--- a/gnu/usr.bin/binutils/bfd/targets.c
+++ b/gnu/usr.bin/binutils/bfd/targets.c
@@ -1,5 +1,6 @@
/* Generic target-file-type support for the BFD library.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -25,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "fnmatch.h"
/*
-SECTION
+SECTION
Targets
DESCRIPTION
@@ -34,7 +35,7 @@ DESCRIPTION
part of BFD is a structure containing pointers to functions
which perform certain low level operations on files. BFD
translates the applications's requests through a pointer into
- calls to the back end routines.
+ calls to the back end routines.
When a file is opened with <<bfd_openr>>, its format and
target are unknown. BFD uses various mechanisms to determine
@@ -42,11 +43,11 @@ DESCRIPTION
o Create a BFD by calling the internal routine
<<_bfd_new_bfd>>, then call <<bfd_find_target>> with the
- target string supplied to <<bfd_openr>> and the new BFD pointer.
+ target string supplied to <<bfd_openr>> and the new BFD pointer.
o If a null target string was provided to <<bfd_find_target>>,
look up the environment variable <<GNUTARGET>> and use
- that as the target string.
+ that as the target string.
o If the target string is still <<NULL>>, or the target string is
<<default>>, then use the first item in the target vector
@@ -56,7 +57,7 @@ DESCRIPTION
o Otherwise, inspect the elements in the target vector
one by one, until a match on target name is found. When found,
- use it.
+ use it.
o Otherwise return the error <<bfd_error_invalid_target>> to
<<bfd_openr>>.
@@ -66,7 +67,7 @@ DESCRIPTION
Once the BFD has been opened and the target selected, the file
format may be determined. This is done by calling
- <<bfd_check_format>> on the BFD with a suggested format.
+ <<bfd_check_format>> on the BFD with a suggested format.
If <<target_defaulted>> has been set, each possible target
type is tried to see if it recognizes the specified format.
<<bfd_check_format>> returns <<true>> when the caller guesses right.
@@ -75,7 +76,6 @@ DESCRIPTION
@end menu
*/
-
/*
INODE
@@ -87,17 +87,17 @@ SUBSECTION
DESCRIPTION
This structure contains everything that BFD knows about a
target. It includes things like its byte order, name, and which
- routines to call to do various operations.
+ routines to call to do various operations.
Every BFD points to a target structure with its <<xvec>>
- member.
+ member.
The macros below are used to dispatch to functions through the
<<bfd_target>> vector. They are used in a number of macros further
down in @file{bfd.h}, and are also used when calling various
routines by hand inside the BFD implementation. The @var{arglist}
argument must be parenthesized; it contains all the arguments
- to the called function.
+ to the called function.
They make the documentation (more) unpleasant to read, so if
someone wants to fix this and not break the above, please do.
@@ -116,13 +116,13 @@ DESCRIPTION
For operations which index on the BFD format:
.#define BFD_SEND_FMT(bfd, message, arglist) \
-. (((bfd)->xvec->message[(int)((bfd)->format)]) arglist)
+. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
.
.#ifdef DEBUG_BFD_SEND
.#undef BFD_SEND_FMT
.#define BFD_SEND_FMT(bfd, message, arglist) \
. (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
-. (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \
+. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
. (bfd_assert (__FILE__,__LINE__), NULL))
.#endif
@@ -131,16 +131,16 @@ DESCRIPTION
module that implements access to a different target under BFD,
defines one of these.
-
FIXME, these names should be rationalised with the names of
the entry points which call them. Too bad we can't have one
- macro to define them both!
+ macro to define them both!
.enum bfd_flavour {
. bfd_target_unknown_flavour,
. bfd_target_aout_flavour,
. bfd_target_coff_flavour,
. bfd_target_ecoff_flavour,
+. bfd_target_xcoff_flavour,
. bfd_target_elf_flavour,
. bfd_target_ieee_flavour,
. bfd_target_nlm_flavour,
@@ -184,21 +184,21 @@ The order of bytes within the header parts of a file.
A mask of all the flags which an executable may have set -
from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>.
-. flagword object_flags;
+. flagword object_flags;
A mask of all the flags which a section may have set - from
the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>.
. flagword section_flags;
-The character normally found at the front of a symbol
+The character normally found at the front of a symbol
(if any), perhaps `_'.
. char symbol_leading_char;
The pad character for file names within an archive header.
-. char ar_pad_char;
+. char ar_pad_char;
The maximum number of characters in an archive header.
@@ -233,15 +233,15 @@ Byte swapping for the headers
Format dependent routines: these are vectors of entry points
within the target vector structure, one for each format to check.
-Check the format of a file being read. Return a <<bfd_target *>> or zero.
+Check the format of a file being read. Return a <<bfd_target *>> or zero.
. const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
-Set the format of a file being written.
+Set the format of a file being written.
. boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
-Write cached information into a file being written, at <<bfd_close>>.
+Write cached information into a file being written, at <<bfd_close>>.
. boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
@@ -264,7 +264,7 @@ BFD_JUMP_TABLE macros.
. {* Called when a new section is created. *}
. boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
. {* Read the contents of a section. *}
-. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
. file_ptr, bfd_size_type));
. boolean (*_bfd_get_section_contents_in_window)
. PARAMS ((bfd *, sec_ptr, bfd_window *,
@@ -288,7 +288,7 @@ BFD_JUMP_TABLE macros.
. to another. *}
. boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
. bfd *, sec_ptr));
-. {* Called to copy BFD private symbol data from one symbol
+. {* Called to copy BFD private symbol data from one symbol
. to another. *}
. boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
. bfd *, asymbol *));
@@ -324,10 +324,10 @@ BFD_JUMP_TABLE macros.
. boolean (*_bfd_construct_extended_name_table)
. PARAMS ((bfd *, char **, bfd_size_type *, const char **));
. void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
-. boolean (*write_armap) PARAMS ((bfd *arch,
+. boolean (*write_armap) PARAMS ((bfd *arch,
. unsigned int elength,
. struct orl *map,
-. unsigned int orl_count,
+. unsigned int orl_count,
. int stridx));
. PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
. bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
@@ -467,15 +467,15 @@ and little endian code, and target chosen by the linker has the wrong
endianness. The function open_output() in ld/ldlang.c uses this field
to find an alternative output format that is suitable.
-. {* Opposite endian version of this target. *}
+. {* Opposite endian version of this target. *}
. const struct bfd_target * alternative_target;
-.
+.
Data for use by back-end routines, which isn't generic enough to belong
in this structure.
. PTR backend_data;
-.
+.
.} bfd_target;
*/
@@ -486,49 +486,57 @@ in this structure.
we can't intermix extern's and initializers. */
extern const bfd_target a29kcoff_big_vec;
extern const bfd_target a_out_adobe_vec;
+extern const bfd_target aout0_big_vec;
extern const bfd_target aout_arm_big_vec;
extern const bfd_target aout_arm_little_vec;
extern const bfd_target aout_mips_big_vec;
extern const bfd_target aout_mips_little_vec;
-extern const bfd_target aout0_big_vec;
extern const bfd_target apollocoff_vec;
-extern const bfd_target armcoff_little_vec;
+extern const bfd_target arm_epoc_pe_big_vec;
+extern const bfd_target arm_epoc_pe_little_vec;
+extern const bfd_target arm_epoc_pei_big_vec;
+extern const bfd_target arm_epoc_pei_little_vec;
extern const bfd_target armcoff_big_vec;
+extern const bfd_target armcoff_little_vec;
extern const bfd_target armnetbsd_vec;
-extern const bfd_target armpe_little_vec;
extern const bfd_target armpe_big_vec;
-extern const bfd_target armpei_little_vec;
+extern const bfd_target armpe_little_vec;
extern const bfd_target armpei_big_vec;
-extern const bfd_target arm_epoc_pe_little_vec;
-extern const bfd_target arm_epoc_pe_big_vec;
-extern const bfd_target arm_epoc_pei_little_vec;
-extern const bfd_target arm_epoc_pei_big_vec;
+extern const bfd_target armpei_little_vec;
extern const bfd_target b_out_vec_big_host;
extern const bfd_target b_out_vec_little_host;
-extern const bfd_target bfd_elf64_alpha_vec;
+extern const bfd_target bfd_efi_app_ia32_vec;
+extern const bfd_target bfd_efi_app_ia64_vec;
extern const bfd_target bfd_elf32_avr_vec;
+extern const bfd_target bfd_elf32_big_generic_vec;
extern const bfd_target bfd_elf32_bigarc_vec;
-extern const bfd_target bfd_elf32_bigarm_vec;
extern const bfd_target bfd_elf32_bigarm_oabi_vec;
-extern const bfd_target bfd_elf32_littlearc_vec;
-extern const bfd_target bfd_elf32_littlearm_vec;
-extern const bfd_target bfd_elf32_littlearm_oabi_vec;
-extern const bfd_target bfd_elf32_big_generic_vec;
+extern const bfd_target bfd_elf32_bigarm_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
-extern const bfd_target bfd_elf64_bigmips_vec;
+extern const bfd_target bfd_elf32_cris_vec;
extern const bfd_target bfd_elf32_d10v_vec;
extern const bfd_target bfd_elf32_d30v_vec;
+extern const bfd_target bfd_elf32_fr30_vec;
+extern const bfd_target bfd_elf32_hppa_linux_vec;
extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
extern const bfd_target bfd_elf32_i386_vec;
+extern const bfd_target bfd_elf32_i860_little_vec;
extern const bfd_target bfd_elf32_i860_vec;
extern const bfd_target bfd_elf32_i960_vec;
+extern const bfd_target bfd_elf32_ia64_big_vec;
extern const bfd_target bfd_elf32_little_generic_vec;
+extern const bfd_target bfd_elf32_littlearc_vec;
+extern const bfd_target bfd_elf32_littlearm_oabi_vec;
+extern const bfd_target bfd_elf32_littlearm_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
-extern const bfd_target bfd_elf64_littlemips_vec;
extern const bfd_target bfd_elf32_m32r_vec;
+extern const bfd_target bfd_elf32_m68hc11_vec;
+extern const bfd_target bfd_elf32_m68hc12_vec;
extern const bfd_target bfd_elf32_m68k_vec;
extern const bfd_target bfd_elf32_m88k_vec;
+extern const bfd_target bfd_elf32_mcore_big_vec;
+extern const bfd_target bfd_elf32_mcore_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
extern const bfd_target bfd_elf32_pj_vec;
@@ -536,50 +544,63 @@ extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
extern const bfd_target bfd_elf32_sh_vec;
+extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
+extern const bfd_target bfd_elf32_shlin_vec;
extern const bfd_target bfd_elf32_sparc_vec;
+extern const bfd_target bfd_elf32_tradbigmips_vec;
+extern const bfd_target bfd_elf32_tradlittlemips_vec;
+extern const bfd_target bfd_elf32_us_cris_vec;
extern const bfd_target bfd_elf32_v850_vec;
-extern const bfd_target bfd_elf32_fr30_vec;
-extern const bfd_target bfd_elf32_mcore_big_vec;
-extern const bfd_target bfd_elf32_mcore_little_vec;
+extern const bfd_target bfd_elf64_alpha_vec;
extern const bfd_target bfd_elf64_big_generic_vec;
+extern const bfd_target bfd_elf64_bigmips_vec;
+extern const bfd_target bfd_elf64_hppa_linux_vec;
+extern const bfd_target bfd_elf64_hppa_vec;
+extern const bfd_target bfd_elf64_ia64_big_vec;
+extern const bfd_target bfd_elf64_ia64_little_vec;
extern const bfd_target bfd_elf64_little_generic_vec;
+extern const bfd_target bfd_elf64_littlemips_vec;
+extern const bfd_target bfd_elf64_tradbigmips_vec;
+extern const bfd_target bfd_elf64_tradlittlemips_vec;
extern const bfd_target bfd_elf64_sparc_vec;
+extern const bfd_target bfd_elf64_x86_64_vec;
+extern const bfd_target bfd_powerpc_pe_vec;
+extern const bfd_target bfd_powerpc_pei_vec;
+extern const bfd_target bfd_powerpcle_pe_vec;
+extern const bfd_target bfd_powerpcle_pei_vec;
+extern const bfd_target cris_aout_vec;
extern const bfd_target demo_64_vec;
extern const bfd_target ecoff_big_vec;
-extern const bfd_target ecoff_little_vec;
extern const bfd_target ecoff_biglittle_vec;
+extern const bfd_target ecoff_little_vec;
extern const bfd_target ecoffalpha_little_vec;
+extern const bfd_target go32coff_vec;
+extern const bfd_target go32stubbedcoff_vec;
extern const bfd_target h8300coff_vec;
extern const bfd_target h8500coff_vec;
extern const bfd_target host_aout_vec;
extern const bfd_target hp300bsd_vec;
extern const bfd_target hp300hpux_vec;
-extern const bfd_target som_vec;
extern const bfd_target i386aout_vec;
extern const bfd_target i386bsd_vec;
+extern const bfd_target i386coff_vec;
extern const bfd_target i386dynix_vec;
extern const bfd_target i386freebsd_vec;
-extern const bfd_target i386os9k_vec;
-extern const bfd_target i386coff_vec;
-extern const bfd_target bfd_powerpc_pe_vec;
-extern const bfd_target bfd_powerpcle_pe_vec;
-extern const bfd_target bfd_powerpc_pei_vec;
-extern const bfd_target bfd_powerpcle_pei_vec;
-extern const bfd_target i386pe_vec;
-extern const bfd_target i386pei_vec;
-extern const bfd_target go32coff_vec;
-extern const bfd_target go32stubbedcoff_vec;
extern const bfd_target i386linux_vec;
extern const bfd_target i386lynx_aout_vec;
extern const bfd_target i386lynx_coff_vec;
extern const bfd_target i386mach3_vec;
extern const bfd_target i386msdos_vec;
extern const bfd_target i386netbsd_vec;
+extern const bfd_target i386os9k_vec;
+extern const bfd_target i386pe_vec;
+extern const bfd_target i386pei_vec;
extern const bfd_target i860coff_vec;
extern const bfd_target icoff_big_vec;
extern const bfd_target icoff_little_vec;
extern const bfd_target ieee_vec;
+extern const bfd_target m68k4knetbsd_vec;
extern const bfd_target m68kaux_coff_vec;
extern const bfd_target m68kcoff_vec;
extern const bfd_target m68kcoffun_vec;
@@ -588,50 +609,57 @@ extern const bfd_target m68klynx_aout_vec;
extern const bfd_target m68klynx_coff_vec;
extern const bfd_target m68knetbsd_vec;
extern const bfd_target m68ksysvcoff_vec;
-extern const bfd_target m68k4knetbsd_vec;
extern const bfd_target m88kbcs_vec;
extern const bfd_target m88kmach3_vec;
-extern const bfd_target mipslpe_vec;
-extern const bfd_target mipslpei_vec;
extern const bfd_target mcore_pe_big_vec;
extern const bfd_target mcore_pe_little_vec;
extern const bfd_target mcore_pei_big_vec;
extern const bfd_target mcore_pei_little_vec;
+extern const bfd_target mipslpe_vec;
+extern const bfd_target mipslpei_vec;
extern const bfd_target newsos3_vec;
-extern const bfd_target nlm32_i386_vec;
-extern const bfd_target nlm32_sparc_vec;
extern const bfd_target nlm32_alpha_vec;
+extern const bfd_target nlm32_i386_vec;
extern const bfd_target nlm32_powerpc_vec;
-extern const bfd_target pc532netbsd_vec;
+extern const bfd_target nlm32_sparc_vec;
extern const bfd_target oasys_vec;
extern const bfd_target pc532machaout_vec;
+extern const bfd_target pc532netbsd_vec;
+extern const bfd_target pmac_xcoff_vec;
extern const bfd_target ppcboot_vec;
extern const bfd_target riscix_vec;
-extern const bfd_target pmac_xcoff_vec;
+extern const bfd_target rs6000coff64_vec;
extern const bfd_target rs6000coff_vec;
-extern const bfd_target shcoff_vec;
-extern const bfd_target shlcoff_vec;
extern const bfd_target shcoff_small_vec;
+extern const bfd_target shcoff_vec;
extern const bfd_target shlcoff_small_vec;
+extern const bfd_target shlcoff_vec;
extern const bfd_target shlpe_vec;
extern const bfd_target shlpei_vec;
+extern const bfd_target som_vec;
+extern const bfd_target sparccoff_vec;
extern const bfd_target sparcle_aout_vec;
extern const bfd_target sparclinux_vec;
extern const bfd_target sparclynx_aout_vec;
extern const bfd_target sparclynx_coff_vec;
extern const bfd_target sparcnetbsd_vec;
-extern const bfd_target sparccoff_vec;
extern const bfd_target sunos_big_vec;
extern const bfd_target tekhex_vec;
extern const bfd_target tic30_aout_vec;
extern const bfd_target tic30_coff_vec;
+extern const bfd_target tic54x_coff0_beh_vec;
+extern const bfd_target tic54x_coff0_vec;
+extern const bfd_target tic54x_coff1_beh_vec;
+extern const bfd_target tic54x_coff1_vec;
+extern const bfd_target tic54x_coff2_beh_vec;
+extern const bfd_target tic54x_coff2_vec;
extern const bfd_target tic80coff_vec;
extern const bfd_target vaxnetbsd_vec;
extern const bfd_target versados_vec;
extern const bfd_target vms_alpha_vec;
extern const bfd_target vms_vax_vec;
-extern const bfd_target we32kcoff_vec;
extern const bfd_target w65_vec;
+extern const bfd_target we32kcoff_vec;
extern const bfd_target z8kcoff_vec;
/* srec is always included. */
@@ -657,7 +685,7 @@ extern const bfd_target sco5_core_vec;
extern const bfd_target trad_core_vec;
extern const bfd_target ptrace_core_vec;
-const bfd_target * const bfd_target_vector[] = {
+static const bfd_target * const _bfd_target_vector[] = {
#ifdef SELECT_VECS
@@ -683,6 +711,11 @@ const bfd_target * const bfd_target_vector[] = {
&b_out_vec_big_host,
&b_out_vec_little_host,
+ &bfd_efi_app_ia32_vec,
+#ifdef BFD64
+ &bfd_efi_app_ia64_vec,
+#endif
+
/* This, and other vectors, may not be used in any *.mt configuration.
But that does not mean they are unnecessary. If configured with
--enable-targets=all, objdump or gdb should be able to examine
@@ -690,6 +723,10 @@ const bfd_target * const bfd_target_vector[] = {
&bfd_elf32_big_generic_vec,
#ifdef BFD64
&bfd_elf64_alpha_vec,
+ &bfd_elf64_hppa_vec,
+ &bfd_elf64_hppa_linux_vec,
+ &bfd_elf64_ia64_little_vec,
+ &bfd_elf64_ia64_big_vec,
#endif
&bfd_elf32_avr_vec,
&bfd_elf32_bigarc_vec,
@@ -699,14 +736,19 @@ const bfd_target * const bfd_target_vector[] = {
#ifdef BFD64
&bfd_elf64_bigmips_vec,
#endif
+ &bfd_elf32_cris_vec,
+ &bfd_elf32_us_cris_vec,
&bfd_elf32_d10v_vec,
&bfd_elf32_d30v_vec,
-#if 0
&bfd_elf32_hppa_vec,
-#endif
+ &bfd_elf32_hppa_linux_vec,
&bfd_elf32_i370_vec,
&bfd_elf32_i386_vec,
+#ifdef BFD64
+ &bfd_elf64_x86_64_vec,
+#endif
&bfd_elf32_i860_vec,
+ &bfd_elf32_i860_little_vec,
&bfd_elf32_i960_vec,
&bfd_elf32_little_generic_vec,
&bfd_elf32_littlearc_vec,
@@ -719,18 +761,25 @@ const bfd_target * const bfd_target_vector[] = {
&bfd_elf32_m32r_vec,
&bfd_elf32_mn10200_vec,
&bfd_elf32_mn10300_vec,
+ &bfd_elf32_m68hc11_vec,
+ &bfd_elf32_m68hc12_vec,
&bfd_elf32_m68k_vec,
&bfd_elf32_m88k_vec,
- &bfd_elf32_sparc_vec,
&bfd_elf32_pj_vec,
&bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
&bfd_elf32_powerpcle_vec,
+ &bfd_elf32_sparc_vec,
&bfd_elf32_v850_vec,
&bfd_elf32_fr30_vec,
&bfd_elf32_mcore_big_vec,
&bfd_elf32_mcore_little_vec,
-#ifdef BFD64 /* No one seems to use this. */
+ &bfd_elf32_tradbigmips_vec,
+ &bfd_elf32_tradlittlemips_vec,
+#ifdef BFD64
+ &bfd_elf64_tradbigmips_vec,
+ &bfd_elf64_tradlittlemips_vec,
+ /* No one seems to use this. */
&bfd_elf64_big_generic_vec,
&bfd_elf64_little_generic_vec,
#endif
@@ -740,6 +789,8 @@ const bfd_target * const bfd_target_vector[] = {
/* We don't include cisco_core_*_vec. Although it has a magic number,
the magic number isn't at the beginning of the file, and thus
might spuriously match other kinds of files. */
+
+ &cris_aout_vec,
#ifdef BFD64
&demo_64_vec, /* Only compiled if host has long-long support */
#endif
@@ -844,10 +895,13 @@ const bfd_target * const bfd_target_vector[] = {
&riscix_vec,
#endif
#if 0
- /* This has the same magic number as RS/6000. */
+ /* This has the same magic number as RS/6000. */
&pmac_xcoff_vec,
#endif
&rs6000coff_vec,
+#ifdef BFD64
+ &rs6000coff64_vec,
+#endif
&ppcboot_vec,
&shcoff_vec,
&shlcoff_vec,
@@ -862,6 +916,12 @@ const bfd_target * const bfd_target_vector[] = {
&aout0_big_vec,
&tic30_aout_vec,
&tic30_coff_vec,
+ &tic54x_coff0_vec,
+ &tic54x_coff0_beh_vec,
+ &tic54x_coff1_vec,
+ &tic54x_coff1_beh_vec,
+ &tic54x_coff2_vec,
+ &tic54x_coff2_beh_vec,
&tic80coff_vec,
&vaxnetbsd_vec,
&versados_vec,
@@ -917,6 +977,7 @@ const bfd_target * const bfd_target_vector[] = {
NULL /* end of list marker */
};
+const bfd_target * const *bfd_target_vector = _bfd_target_vector;
/* bfd_default_vector[0] contains either the address of the default vector,
if there is one, or zero if there isn't. */
@@ -931,7 +992,7 @@ const bfd_target *bfd_default_vector[] = {
/* When there is an ambiguous match, bfd_check_format_matches puts the
names of the matching targets in an array. This variable is the maximum
number of entries that the array could possibly need. */
-const size_t _bfd_target_vector_entries = sizeof(bfd_target_vector)/sizeof(*bfd_target_vector);
+const size_t _bfd_target_vector_entries = sizeof (_bfd_target_vector)/sizeof (*_bfd_target_vector);
/* This array maps configuration triplets onto BFD vectors. */
@@ -1031,7 +1092,7 @@ DESCRIPTION
variable to "default" will cause the first entry in the target
list to be returned, and "target_defaulted" will be set in the
BFD. This causes <<bfd_check_format>> to loop over all the
- targets to find the one that matches the file being read.
+ targets to find the one that matches the file being read.
*/
const bfd_target *
@@ -1114,7 +1175,7 @@ FUNCTION
bfd_seach_for_target
SYNOPSIS
- const bfd_target * bfd_search_for_target (int (* search_func)(const bfd_target *, void *), void *);
+ const bfd_target * bfd_search_for_target (int (* search_func) (const bfd_target *, void *), void *);
DESCRIPTION
Return a pointer to the first transfer vector in the list of
diff --git a/gnu/usr.bin/binutils/bfd/tekhex.c b/gnu/usr.bin/binutils/bfd/tekhex.c
index b1ffe75e073..ccfe7d88208 100644
--- a/gnu/usr.bin/binutils/bfd/tekhex.c
+++ b/gnu/usr.bin/binutils/bfd/tekhex.c
@@ -1,5 +1,5 @@
/* BFD backend for Extended Tektronix Hex Format objects.
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -24,11 +24,11 @@ SUBSECTION
Tektronix Hex Format handling
DESCRIPTION
-
+
Tek Hex records can hold symbols and data, but not
relocations. Their main application is communication with
devices like PROM programmers and ICE equipment.
-
+
It seems that the sections are descibed as being really big,
the example I have says that the text section is 0..ffffffff.
BFD would barf with this, many apps would try to alloc 4GB to
@@ -49,11 +49,10 @@ DESCRIPTION
Any number of sections may be created for output, we save them
up and output them when it's time to close the bfd.
-
A TekHex record looks like:
EXAMPLE
%<block length><type><checksum><stuff><cr>
-
+
DESCRIPTION
Where
o length
@@ -63,7 +62,6 @@ DESCRIPTION
3) symbol record
6) data record
8) termination record
-
The data can come out of order, and may be discontigous. This is a
serial protocol, so big files are unlikely, so we keep a list of 8k chunks
@@ -123,7 +121,7 @@ static const bfd_target *tekhex_object_p PARAMS ((bfd *));
static boolean tekhex_mkobject PARAMS ((bfd *));
static long tekhex_get_symtab_upper_bound PARAMS ((bfd *));
static long tekhex_get_symtab PARAMS ((bfd *, asymbol **));
-static void pass_over PARAMS ((bfd *, void (*)(bfd*, int, char *)));
+static void pass_over PARAMS ((bfd *, void (*) (bfd*, int, char *)));
static void first_phase PARAMS ((bfd *, int, char *));
static void insert_byte PARAMS ((bfd *, int, bfd_vma));
static struct data_struct *find_chunk PARAMS ((bfd *, bfd_vma));
@@ -216,7 +214,6 @@ fcffffff g T_SEGMENT i$1
00000000 g T_SEGMENT $
00000010 g T_SEGMENT $
-
RELOCATION RECORDS FOR [D00000000]: (none)
RELOCATION RECORDS FOR [D00008000]: (none)
@@ -425,7 +422,7 @@ first_phase (abfd, type, src)
char *n = bfd_alloc (abfd, len + 1);
if (!n)
- abort(); /* FIXME */
+ abort (); /* FIXME */
memcpy (n, sym, len + 1);
section = bfd_make_section (abfd, n);
}
@@ -454,7 +451,7 @@ first_phase (abfd, type, src)
char type = (*src);
if (!new)
- abort(); /* FIXME */
+ abort (); /* FIXME */
new->symbol.the_bfd = abfd;
src++;
abfd->symcount++;
@@ -464,7 +461,7 @@ first_phase (abfd, type, src)
len = getsym (sym, &src);
new->symbol.name = bfd_alloc (abfd, len + 1);
if (!new->symbol.name)
- abort(); /* FIXME */
+ abort (); /* FIXME */
memcpy ((char *) (new->symbol.name), sym, len + 1);
new->symbol.section = section;
if (type <= '4')
@@ -1063,6 +1060,6 @@ const bfd_target tekhex_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0
};
diff --git a/gnu/usr.bin/binutils/bfd/trad-core.c b/gnu/usr.bin/binutils/bfd/trad-core.c
index aea6366795b..872ad54ab85 100644
--- a/gnu/usr.bin/binutils/bfd/trad-core.c
+++ b/gnu/usr.bin/binutils/bfd/trad-core.c
@@ -1,5 +1,6 @@
/* BFD back end for traditional Unix core files (U-area and raw sections)
- Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 99, 2000
+ Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
Written by John Gilmore of Cygnus Support.
@@ -25,7 +26,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libaout.h" /* BFD a.out internal data structures */
#include <sys/param.h>
-#include <sys/dir.h>
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
+#else
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
#include <signal.h>
#include <sys/user.h> /* After a.out.h */
@@ -34,7 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include TRAD_HEADER
#endif
- struct trad_core_struct
+ struct trad_core_struct
{
asection *data_section;
asection *stack_section;
@@ -73,7 +86,7 @@ trad_unix_core_file_p (abfd)
if (bfd_seek (abfd, TRAD_CORE_USER_OFFSET, SEEK_SET) != 0)
return 0;
#endif
-
+
val = bfd_read ((void *)&u, 1, sizeof u, abfd);
if (val != sizeof u)
{
@@ -83,7 +96,7 @@ trad_unix_core_file_p (abfd)
}
/* Sanity check perhaps??? */
- if (u.u_dsize > 0x1000000) /* Remember, it's in pages... */
+ if (u.u_dsize > 0x1000000) /* Remember, it's in pages... */
{
bfd_set_error (bfd_error_wrong_format);
return 0;
@@ -140,7 +153,7 @@ trad_unix_core_file_p (abfd)
bfd_zmalloc (sizeof (struct trad_core_struct));
if (rawptr == NULL)
return 0;
-
+
abfd->tdata.trad_core_data = rawptr;
rawptr->u = u; /*Copy the uarea into the tdata part of the bfd */
@@ -195,13 +208,13 @@ trad_unix_core_file_p (abfd)
from *u_ar0. The other is that u_ar0 is sometimes an absolute address
in kernel memory, and on other systems it is an offset from the beginning
of the `struct user'.
-
+
As a practical matter, we don't know where the registers actually are,
so we have to pass the whole area to GDB. We encode the value of u_ar0
by setting the .regs section up so that its virtual memory address
0 is at the place pointed to by u_ar0 (by setting the vma of the start
of the section to -u_ar0). GDB uses this info to locate the regs,
- using minor trickery to get around the offset-or-absolute-addr problem. */
+ using minor trickery to get around the offset-or-absolute-addr problem. */
core_regsec (abfd)->vma = - (bfd_vma) u.u_ar0;
core_datasec (abfd)->filepos = NBPG * UPAGES;
@@ -261,9 +274,9 @@ trad_unix_core_file_matches_executable_p (core_bfd, exec_bfd)
/* If somebody calls any byte-swapping routines, shoot them. */
static void
-swap_abort()
+swap_abort ()
{
- abort(); /* This way doesn't require any declaration for ANSI to fuck up */
+ abort (); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
@@ -304,7 +317,7 @@ const bfd_target trad_core_vec =
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (trad_unix),
@@ -316,6 +329,6 @@ const bfd_target trad_core_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0 /* backend_data */
};
diff --git a/gnu/usr.bin/binutils/bfd/vaxnetbsd.c b/gnu/usr.bin/binutils/bfd/vaxnetbsd.c
index 612e3fc2970..6d82edc66a1 100644
--- a/gnu/usr.bin/binutils/bfd/vaxnetbsd.c
+++ b/gnu/usr.bin/binutils/bfd/vaxnetbsd.c
@@ -1,5 +1,5 @@
/* BFD back-end for NetBSD/VAX a.out-ish binaries.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright 1998, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define BYTES_IN_WORD 4
#undef TARGET_IS_BIG_ENDIAN_P
diff --git a/gnu/usr.bin/binutils/bfd/versados.c b/gnu/usr.bin/binutils/bfd/versados.c
index d3ebda4c595..04df49aa1e2 100644
--- a/gnu/usr.bin/binutils/bfd/versados.c
+++ b/gnu/usr.bin/binutils/bfd/versados.c
@@ -1,5 +1,5 @@
/* BFD back-end for VERSAdos-E objects.
- Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
Versados is a Motorola trademark.
@@ -36,7 +36,6 @@
o Object Text Recrod
o End Record
-
*/
#include "bfd.h"
@@ -44,18 +43,15 @@
#include "libbfd.h"
#include "libiberty.h"
-
static boolean versados_mkobject PARAMS ((bfd *));
static boolean versados_scan PARAMS ((bfd *));
static const bfd_target *versados_object_p PARAMS ((bfd *));
-
#define VHEADER '1'
#define VESTDEF '2'
#define VOTR '3'
#define VEND '4'
-
#define ES_BASE 17 /* first symbol has esdid 17 */
/* Per file target dependent information */
@@ -145,11 +141,7 @@ union ext_any
struct ext_otr otr;
};
-/* Initialize by filling in the hex conversion array. */
-
-
-
-
+/* Initialize by filling in the hex conversion array. */
/* Set up the tdata information. */
@@ -171,13 +163,10 @@ versados_mkobject (abfd)
return true;
}
-
/* Report a problem in an S record file. FIXME: This probably should
not call fprintf, but we really do need some mechanism for printing
error messages. */
-
-
static asymbol *
versados_new_symbol (abfd, snum, name, val, sec)
bfd *abfd;
@@ -195,7 +184,6 @@ versados_new_symbol (abfd, snum, name, val, sec)
return n;
}
-
static int
get_record (abfd, ptr)
bfd *abfd;
@@ -244,7 +232,6 @@ new_symbol_string (abfd, name)
return n;
}
-
static void
process_esd (abfd, esd, pass)
bfd *abfd;
@@ -296,7 +283,6 @@ process_esd (abfd, esd, pass)
}
break;
-
case ESD_ABS:
size = get_4 (&ptr);
start = get_4 (&ptr);
@@ -356,7 +342,6 @@ reloc_howto_type versados_howto_table[] =
"-v32", true, 0xffffffff, 0xffffffff, false),
};
-
static int
get_offset (len, ptr)
int len;
@@ -405,7 +390,6 @@ process_otr (abfd, otr, pass)
int offsetlen = flag & 0x7;
int j;
-
if (esdids == 0)
{
/* A zero esdid means the new pc is the offset given */
@@ -433,7 +417,7 @@ process_otr (abfd, otr, pass)
int rn = EDATA (abfd, otr->esdid - 1).relocs++;
if (pass == 1)
{
- /* this is the first pass over the data,
+ /* this is the first pass over the data,
just remember that we need a reloc */
}
else
@@ -471,7 +455,6 @@ process_otr (abfd, otr, pass)
if (!contents && need_contents)
esdid->contents = (unsigned char *) bfd_alloc (abfd, esdid->section->_raw_size);
-
}
static boolean
@@ -586,8 +569,6 @@ versados_scan (abfd)
return 1;
}
-
-
/* Check whether an existing file is a versados file. */
static const bfd_target *
@@ -633,7 +614,6 @@ versados_object_p (abfd)
return abfd->xvec;
}
-
static boolean
versados_pass_2 (abfd)
bfd *abfd;
@@ -648,7 +628,6 @@ versados_pass_2 (abfd)
VDATA (abfd)->es_done = ES_BASE;
-
/* read records till we get to where we want to be */
while (1)
@@ -701,8 +680,6 @@ versados_set_section_contents (abfd, section, location, offset, bytes_to_do)
return false;
}
-
-/*ARGSUSED */
static int
versados_sizeof_headers (abfd, exec)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -755,7 +732,6 @@ versados_get_symtab (abfd, alocation)
return symcount;
}
-/*ARGSUSED */
void
versados_get_symbol_info (ignore_abfd, symbol, ret)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -765,7 +741,6 @@ versados_get_symbol_info (ignore_abfd, symbol, ret)
bfd_symbol_info (symbol, ret);
}
-/*ARGSUSED */
void
versados_print_symbol (ignore_abfd, afile, symbol, how)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
@@ -796,7 +771,6 @@ versados_get_reloc_upper_bound (abfd, asect)
return (asect->reloc_count + 1) * sizeof (arelent *);
}
-
long
versados_canonicalize_reloc (abfd, section, relptr, symbols)
bfd *abfd;
@@ -922,6 +896,6 @@ const bfd_target versados_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0
};
diff --git a/gnu/usr.bin/binutils/bfd/xcofflink.c b/gnu/usr.bin/binutils/bfd/xcofflink.c
index 3f488d7f382..5580e9b3543 100644
--- a/gnu/usr.bin/binutils/bfd/xcofflink.c
+++ b/gnu/usr.bin/binutils/bfd/xcofflink.c
@@ -1,5 +1,6 @@
/* POWER/PowerPC XCOFF linker support.
- Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000
+ 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.
@@ -29,14 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STRING_SIZE_SIZE (4)
-/* In order to support linking different object file formats into an
- XCOFF format, we need to be able to determine whether a particular
- bfd_target is an XCOFF vector. FIXME: We need to rethink this
- whole approach. */
-#define XCOFF_XVECP(xv) \
- (strcmp ((xv)->name, "aixcoff-rs6000") == 0 \
- || strcmp ((xv)->name, "xcoff-powermac") == 0)
-
/* 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))
@@ -75,8 +68,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* The remaining words of global linkage code. */
-static unsigned long xcoff_glink_code[] =
-{
+static unsigned long xcoff_glink_code[] = {
0x90410014, /* stw r2,20(r1) */
0x800c0000, /* lwz r0,0(r12) */
0x804c0004, /* lwz r2,4(r12) */
@@ -98,8 +90,7 @@ static unsigned long xcoff_glink_code[] =
/* The ldhdr structure. This appears at the start of the .loader
section. */
-struct internal_ldhdr
-{
+struct internal_ldhdr {
/* The version number: currently always 1. */
unsigned long l_version;
/* The number of symbol table entries. */
@@ -120,8 +111,7 @@ struct internal_ldhdr
bfd_size_type l_stoff;
};
-struct external_ldhdr
-{
+struct external_ldhdr {
bfd_byte l_version[4];
bfd_byte l_nsyms[4];
bfd_byte l_nreloc[4];
@@ -137,21 +127,18 @@ struct external_ldhdr
/* The ldsym structure. This is used to represent a symbol in the
.loader section. */
-struct internal_ldsym
-{
- union
- {
- /* The symbol name if <= SYMNMLEN characters. */
- char _l_name[SYMNMLEN];
- struct
- {
- /* Zero if the symbol name is more than SYMNMLEN characters. */
- long _l_zeroes;
- /* The offset in the string table if the symbol name is more
- than SYMNMLEN characters. */
- long _l_offset;
- } _l_l;
- } _l;
+struct internal_ldsym {
+ union {
+ /* The symbol name if <= SYMNMLEN characters. */
+ char _l_name[SYMNMLEN];
+ struct {
+ /* Zero if the symbol name is more than SYMNMLEN characters. */
+ long _l_zeroes;
+ /* The offset in the string table if the symbol name is more
+ than SYMNMLEN characters. */
+ long _l_offset;
+ } _l_l;
+ } _l;
/* The symbol value. */
bfd_vma l_value;
/* The symbol section number. */
@@ -166,17 +153,14 @@ struct internal_ldsym
bfd_size_type l_parm;
};
-struct external_ldsym
-{
- union
- {
- bfd_byte _l_name[SYMNMLEN];
- struct
- {
- bfd_byte _l_zeroes[4];
- bfd_byte _l_offset[4];
- } _l_l;
- } _l;
+struct external_ldsym {
+ union {
+ bfd_byte _l_name[SYMNMLEN];
+ struct {
+ bfd_byte _l_zeroes[4];
+ bfd_byte _l_offset[4];
+ } _l_l;
+ } _l;
bfd_byte l_value[4];
bfd_byte l_scnum[2];
bfd_byte l_smtype[1];
@@ -200,8 +184,7 @@ struct external_ldsym
/* The ldrel structure. This is used to represent a reloc in the
.loader section. */
-struct internal_ldrel
-{
+struct internal_ldrel {
/* The reloc address. */
bfd_vma l_vaddr;
/* The symbol table index in the .loader section symbol table. */
@@ -212,8 +195,7 @@ struct internal_ldrel
short l_rsecnm;
};
-struct external_ldrel
-{
+struct external_ldrel {
bfd_byte l_vaddr[4];
bfd_byte l_symndx[4];
bfd_byte l_rtype[2];
@@ -224,8 +206,7 @@ struct external_ldrel
/* The list of import files. */
-struct xcoff_import_file
-{
+struct xcoff_import_file {
/* The next entry in the list. */
struct xcoff_import_file *next;
/* The path. */
@@ -238,8 +219,7 @@ struct xcoff_import_file
/* An entry in the XCOFF linker hash table. */
-struct xcoff_link_hash_entry
-{
+struct xcoff_link_hash_entry {
struct bfd_link_hash_entry root;
/* Symbol index in output file. Set to -1 initially. Set to -2 if
@@ -250,15 +230,14 @@ struct xcoff_link_hash_entry
section which holds it. */
asection *toc_section;
- union
- {
- /* If we have created a TOC entry (the XCOFF_SET_TOC flag is
- set), this is the offset in toc_section. */
- bfd_vma toc_offset;
- /* If the TOC entry comes from an input file, this is set to the
- symbol index of the C_HIDEXT XMC_TC or XMC_TD symbol. */
- long toc_indx;
- } u;
+ union {
+ /* If we have created a TOC entry (the XCOFF_SET_TOC flag is set),
+ this is the offset in toc_section. */
+ bfd_vma toc_offset;
+ /* If the TOC entry comes from an input file, this is set to the
+ symbol index of the C_HIDEXT XMC_TC or XMC_TD symbol. */
+ long toc_indx;
+ } u;
/* If this symbol is a function entry point which is called, this
field holds a pointer to the function descriptor. If this symbol
@@ -311,8 +290,7 @@ struct xcoff_link_hash_entry
/* The XCOFF linker hash table. */
-struct xcoff_link_hash_table
-{
+struct xcoff_link_hash_table {
struct bfd_link_hash_table root;
/* The .debug string hash table. We need to compute this while
@@ -357,12 +335,11 @@ struct xcoff_link_hash_table
boolean gc;
/* A linked list of symbols for which we have size information. */
- struct xcoff_link_size_list
- {
- struct xcoff_link_size_list *next;
- struct xcoff_link_hash_entry *h;
- bfd_size_type size;
- } *size_list;
+ struct xcoff_link_size_list {
+ struct xcoff_link_size_list *next;
+ struct xcoff_link_hash_entry *h;
+ bfd_size_type size;
+ } *size_list;
/* Magic sections: _text, _etext, _data, _edata, _end, end. */
asection *special_sections[6];
@@ -371,8 +348,7 @@ struct xcoff_link_hash_table
/* Information we keep for each section in the output file during the
final link phase. */
-struct xcoff_link_section_info
-{
+struct xcoff_link_section_info {
/* The relocs to be output. */
struct internal_reloc *relocs;
/* For each reloc against a global symbol whose index was not known
@@ -382,18 +358,16 @@ 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 *next;
- struct xcoff_link_hash_entry *h;
- struct internal_reloc *rel;
- } *toc_rel_hashes;
+ struct xcoff_toc_rel_hash {
+ struct xcoff_toc_rel_hash *next;
+ struct xcoff_link_hash_entry *h;
+ struct internal_reloc *rel;
+ } *toc_rel_hashes;
};
/* Information that we pass around while doing the final link step. */
-struct xcoff_final_link_info
-{
+struct xcoff_final_link_info {
/* General link information. */
struct bfd_link_info *info;
/* Output BFD. */
@@ -792,18 +766,18 @@ _bfd_xcoff_get_dynamic_reloc_upper_bound (abfd)
/* The typical dynamic reloc. */
static reloc_howto_type xcoff_dynamic_reloc =
- HOWTO (0, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_POS", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_POS", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false); /* pcrel_offset */
/* Get the dynamic relocs. */
@@ -1894,12 +1868,11 @@ xcoff_link_add_symbols (abfd, info)
the csect storage mapping class, so that the linker can
accumulate similar csects together. */
{
- static const char *csect_name_by_class[] =
- {
- ".pr", ".ro", ".db", ".tc", ".ua", ".rw", ".gl", ".xo",
- ".sv", ".bs", ".ds", ".uc", ".ti", ".tb", NULL, ".tc0",
- ".td"
- };
+ static const char *csect_name_by_class[] = {
+ ".pr", ".ro", ".db", ".tc", ".ua", ".rw", ".gl", ".xo",
+ ".sv", ".bs", ".ds", ".uc", ".ti", ".tb", NULL, ".tc0",
+ ".td"
+ };
const char *csect_name;
asection *enclosing;
@@ -2289,7 +2262,7 @@ xcoff_link_add_symbols (abfd, info)
else
{
(*sym_hash)->root.u.c.p->alignment_power
- = csect->alignment_power;
+ = csect->alignment_power;
}
}
@@ -2404,7 +2377,7 @@ xcoff_link_add_symbols (abfd, info)
/* Reset SEC_RELOC and the reloc_count, since the reloc
information is now attached to the csects. */
- o->flags &=~ SEC_RELOC;
+ o->flags &= ~SEC_RELOC;
o->reloc_count = 0;
/* If we are not keeping memory, free the reloc information. */
@@ -2915,7 +2888,7 @@ bfd_xcoff_link_record_set (output_bfd, info, harg, size)
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
struct xcoff_link_size_list *n;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
/* This will hardly ever be called. I don't want to burn four bytes
@@ -2951,7 +2924,7 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
{
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
/* A symbol name which starts with a period is the code for a
@@ -3065,7 +3038,7 @@ bfd_xcoff_export_symbol (output_bfd, info, harg, syscall)
{
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
h->flags |= XCOFF_EXPORT;
@@ -3130,7 +3103,7 @@ bfd_xcoff_link_count_reloc (output_bfd, info, name)
{
struct xcoff_link_hash_entry *h;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
h = ((struct xcoff_link_hash_entry *)
@@ -3145,7 +3118,7 @@ bfd_xcoff_link_count_reloc (output_bfd, info, name)
h->flags |= XCOFF_REF_REGULAR | XCOFF_LDREL;
++xcoff_hash_table (info)->ldrel_count;
-
+
/* Mark the symbol to avoid garbage collection. */
if (! xcoff_mark_symbol (info, h))
return false;
@@ -3164,7 +3137,7 @@ bfd_xcoff_record_link_assignment (output_bfd, info, name)
{
struct xcoff_link_hash_entry *h;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, true, true,
@@ -3180,8 +3153,7 @@ bfd_xcoff_record_link_assignment (output_bfd, info, name)
/* This structure is used to pass information through
xcoff_link_hash_traverse. */
-struct xcoff_loader_info
-{
+struct xcoff_loader_info {
/* Set if a problem occurred. */
boolean failed;
/* Output BFD. */
@@ -3249,7 +3221,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
struct bfd_strtab_hash *debug_strtab;
bfd_byte *debug_contents = NULL;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
{
for (i = 0; i < 6; i++)
special_sections[i] = NULL;
@@ -4101,7 +4073,7 @@ _bfd_xcoff_bfd_final_link (abfd, info)
finfo.section_info[o->target_index].rel_hashes =
((struct xcoff_link_hash_entry **)
bfd_malloc (o->reloc_count
- * sizeof (struct xcoff_link_hash_entry *)));
+ * sizeof (struct xcoff_link_hash_entry *)));
if (finfo.section_info[o->target_index].relocs == NULL
|| finfo.section_info[o->target_index].rel_hashes == NULL)
goto error_return;
@@ -4687,21 +4659,39 @@ xcoff_link_input_bfd (finfo, input_bfd)
else
{
bfd_vma tocval, tocend;
+ bfd *inp;
tocval = ((*csectpp)->output_section->vma
+ (*csectpp)->output_offset
+ isym.n_value
- (*csectpp)->vma);
+
/* We want to find out if tocval is a good value to use
as the TOC anchor--that is, whether we can access all
of the TOC using a 16 bit offset from tocval. This
test assumes that the TOC comes at the end of the
output section, as it does in the default linker
- script. FIXME: This doesn't handle .tocbss sections
- created from XMC_TD common symbols correctly. */
-
+ script. */
tocend = ((*csectpp)->output_section->vma
+ (*csectpp)->output_section->_raw_size);
+ for (inp = finfo->info->input_bfds;
+ inp != NULL;
+ inp = inp->link_next)
+ {
+ asection *o;
+
+ for (o = inp->sections; o != NULL; o = o->next)
+ if (strcmp (o->name, ".tocbss") == 0)
+ {
+ bfd_vma new_toc_end;
+ new_toc_end = (o->output_section->vma
+ + o->output_offset
+ + o->_cooked_size);
+ if (new_toc_end > tocend)
+ tocend = new_toc_end;
+ }
+
+ }
if (tocval + 0x10000 < tocend)
{
@@ -6334,7 +6324,7 @@ _bfd_ppc_xcoff_relocate_section (output_bfd, info, input_bfd,
addend = 0;
}
else
- {
+ {
h = obj_xcoff_sym_hashes (input_bfd)[symndx];
sym = syms + symndx;
addend = - sym->n_value;
@@ -6585,13 +6575,14 @@ _bfd_ppc_xcoff_relocate_section (output_bfd, info, input_bfd,
|| strcmp (h->root.root.string, "._ptrgl") == 0)
{
if (next == 0x4def7b82 /* cror 15,15,15 */
- || next == 0x4ffffb82) /* cror 31,31,31 */
+ || next == 0x4ffffb82 /* cror 31,31,31 */
+ || next == 0x60000000) /* ori r0,r0,0 */
bfd_put_32 (input_bfd, 0x80410014, pnext); /* lwz r1,20(r1) */
}
else
{
if (next == 0x80410014) /* lwz r1,20(r1) */
- bfd_put_32 (input_bfd, 0x4ffffb82, pnext); /* cror 31,31,31 */
+ bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */
}
}
diff --git a/gnu/usr.bin/binutils/binutils/ChangeLog b/gnu/usr.bin/binutils/binutils/ChangeLog
index 77775a81c3e..aefa36e6251 100644
--- a/gnu/usr.bin/binutils/binutils/ChangeLog
+++ b/gnu/usr.bin/binutils/binutils/ChangeLog
@@ -1,50 +1,517 @@
-2000-11-01 Philip Blundell <philb@gnu.org>
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
- From 2000-06-15 H.J. Lu <hjl@gnu.org>
- * dyn-string.c: Removed. Not needed with dyn-string.c in
- libiberty.
- * dyn-string.h: Likewise.
- * Makefile.am: Remove references to dyn-string.c and
- dyn-string.h. Rebuild dependency.
- * Makefile.in: Rebuild.
+ Merge from mainline.
+ 2001-02-27 Alan Modra <alan@linuxcare.com.au>
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
+ * configure: Regenerate.
+
+ 2001-04-27 Michal Svec <rebel@atrey.karlin.mff.cuni.cz>
+ * strings.c (isgraphic): Do not use isascii() unless it is needed
+ for isprint() to work.
+ (main): Set the locale domain to LC_ALL not just LC_MESSAGES.
+
+ 2001-04-10 Alan Modra <amodra@one.net.au>
+ * nm.c (print_symbol_info_bsd): Use a simple printf string.
+
+ 2001-02-07 Todd Vierling <tv@wasabisystems.com>
+ * bucomm.c (bfd_target_vector): Change extern array to pointer.
+ * objdump.c (bfd_target_vector): Likewise.
+
+2001-06-10 Philip Blundell <philb@gnu.org>
+
+ * configure.in: Set version to 2.11.1.
+ * configure: Regenerate.
+
+2001-06-09 Alan Modra <amodra@bigpond.net.au>
+
+ * NEWS: Mention hppa64-elf. Add binutils-2.11 marker.
+
+ * MAINTAINERS: Replace with mainline version.
+
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Most files: Update copyright notices.
+
+2001-05-30 Honda Hiroki <hhonda@kobe-catv.ne.jp>
+
+ * objcopy.c: Add new switches: --keep-global-symbol,
+ --keep-symbols, --localize-symbols, --keep-global-symbols and
+ --weaken-symbols.
+ * binutils.texi: Document new switches.
+ * objcopy.1: Regenerate.
+ * NEWS: Announce new feature.
+
+2001-05-28 Philip Blundell <philb@gnu.org>
+
+ From 2001-05-28 Andreas Jaeger <aj@suse.de>
+ * readelf.c (display_debug_frames): Fix warnings: Remove unused
+ variables, fix format strings.
+
+ From 2001-05-16 Richard Henderson <rth@redhat.com>
+ * readelf.c (do_debug_frames_interp): New.
+ (byte_get_little_endian): If BFD64, always read entire 8-byte fields.
+ (byte_get_big_endian): Likewise.
+ (parse_args) ['F']: Set do_debug_frames_interp.
+ (Frame_Chunk): Make data_factor signed, add fde_encoding.
+ (frame_display_row): Don't trunc pc_begin to int.
+ (size_of_encoded_value): New.
+ (display_debug_frames): Handle 64-bit targets. Print raw data
+ unless do_debug_frames_interp.
+ (debug_displays): Remove duplicate .debug_frame.
+
+ From 2001-05-15 Ralf Baechle <ralf@gnu.org>
+ * readelf.c: Replace uses of EM_MIPS_RS4_BE with EM_MIPS_RS3_LE.
+ The former constant was never in active use and is used otherwise
+ by the ABI.
+
+ From 2001-05-11 Jakub Jelinek <jakub@redhat.com>
+ * readelf.c (process_unwind): Print all unwind sections, not just
+ one.
+
+ From 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * readelf.c (process_unwind): Remove const specifier.
+
+ From 2001-03-30 H.J. Lu <hjl@gnu.org>
+ * readelf.c (process_unwind): Just return if do_unwind is 0.
+
+ From 2001-03-29 H.J. Lu <hjl@gnu.org>
+ * readelf.c (process_unwind): Only do unwind sections for
+ IA64.
+
+ From 2001-02-28 Nick Clifton <nickc@redhat.com>
+ * readelf.c: (struct unw_aux_info): Remove const modifier for
+ 'strtab' field.
+ (process_unwind): Remove non-K&R compliant LHS type cast in call
+ to GET_DATA_ALLOC macro.
+
+ From 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+ * readelf.c (struct unw_aux_info): Remove const from the info member.
+ (process_unwind): Don't type-cast the third argument to the
+ GET_DATA_ALLOC macro.
+
+ From 2001-02-11 Nick Clifton <nickc@redhat.com>
+ * readelf.c (dump_relocations): Free corrected allocated
+ array.
+ (process_unwind): Fix compile time warning.
+
+ From 2001-02-07 David Mosberger <davidm@hpl.hp.com>
+ * readelf.c (process_unwind): New function.
+ (slurp_ia64_unwind_table): Ditto.
+ (dump_ia64_unwind): Ditto.
+ (find_symbol_for_address): Ditto.
+ (slurp_rela_relocs): New function (split off from dump_relocations()).
+ (slurp_rel_relocs): Ditto.
+ (parse_args): Handle '-u' option.
+ * unwind-ia64.c: New file.
+ * unwind-ia64.h: New file.
+ * Makefile.am: Include unwind-ia64.c in readelf build.
+ * Makefile.in: Regenerate.
+ * po/binutils.pot: Regenerate.
+
+2001-04-06 Hans-Peter Nilsson <hp@axis.com>
-2000-10-16 Philip Blundell <pb@futuretv.com>
+ * readelf.c (display_debug_lines): Fix typo for "Prologue".
+
+2001-03-16 Philip Blundell <philb@gnu.org>
- * configure.in: Set version number to 2.10.1.
* configure: Regenerate.
-2000-10-14 Philip Blundell <philb@gnu.org>
+2001-03-11 Philip Blundell <philb@gnu.org>
+
+ * configure.in: Set version to 2.11.
+
+2001-02-13 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * acinclude.m4 (AM_PROG_LEX): Override installed definition.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+2001-02-10 Alan Modra <alan@linuxcare.com.au>
+
+ * nm.c (print_symbol_info_bsd): Don't #ifdef inside printf in case
+ printf is a macro.
+
+2001-02-04 Philip Blundell <philb@gnu.org>
+
+ * configure.in (OBJDUMP_DEFS): Match `arm*-*', not just `arm-*'.
+ * configure: Regenerate.
+
+2001-01-31 Steve deRosier <sderosier@vari-lite.com>
+
+ * ieee.c (ieee_add_bb11): Don't check for backslashes
+ unless HAVE_DOS_BASED_FILE_SYSTEM is defined.
+
+2001-01-24 Mark Elbrecht <snowball3@bigfoot.com>
- * config.sub, config.guess: Update from mainline sources.
+ * ieee.c: Update copyright.
+ (ieee_start_compilation_unit): Don't check for backslashes
+ unless HAVE_DOS_BASED_FILE_SYSTEM is defined.
- From 2000-09-07 H.J. Lu <hjl@gnu.org>
+ * stabs.c: Update copyright. Include "filenames.h".
+ (parse_stab): Use IS_ABSOLUTE_PATH. Ignore N_WARNING stabs.
+
+2001-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (process_version_sections): Check if VERDEF or VERNEED
+ sections are present before using them. Remove code duplication.
+ (process_symbol_table): Check if VERDEF or VERNEED sections are
+ present before using them.
+
+2001-01-17 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (copy_object): Fail if attempting to convert the
+ endianness of the input object file.
+
+ * binutils.texi: Explain that objcopy cannot convert endianness.
+
+2001-01-16 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (string_table_length): New variable.
+ (SECTION_NAME): Catch out of range indices and missing section
+ pointers.
+ (process_section_headers): Delete useless local variable
+ string_table_offset. Set the value of string_table_length
+ after loading the string table.
+ (process_mips_specific): Use SECTION_NAME macro.
+ (process_file): Set string_table_length to 0 when it is freed.
+
+2001-01-12 Nick Clifton <nickc@redhat.com>
+
+ * version.c (print_version): Update copyright date.
+
+2001-01-11 Peter Targett <peter.targett@arccores.com>
+
+ * readelf.c (dump_relocations): Include selection with EM_ARC.
+ (get_machine_name) Update name to "ARC".
+
+2001-01-09 Nick Clifton <nickc@redhat.com>
+
+ * Makefile.am: Add rule to build objdump.o from objdump.c and
+ using OBJDUMP_DEFS.
+ * Makefile.in: Regenerate.
+
+ * configure.in: Define OBJDUMP_DEFS. Default to empty.
+ (arm, xscale, d10v): For these targets define OBJDUMP_DEFS to
+ -DDISASSEMBLER_NEEDS_RELOCS.
+ * configure: Regenerate.
+
+ * objdump.c (disassemble_bytes): If DISASSEMBLER_NEEDS_RELOCS
+ is defined read in the relocs even if dump_reloc_info is
+ false.
+
+2001-01-07 Philip Blundell <philb@gnu.org>
+
+ * binutils.texi (Bug Reporting): Replace `bug-gnu-utils' with
+ `bug-binutils'.
+ * README: Likewise.
+
+2000-12-19 Nick Clifton <nickc@redhat.com>
+
+ * dlltool.c: Add missing support for arm-epoc-pe.
+ * configure.in: Add missing support for arm-epoc-pe.
+ * configure: Regenerate.
+
+2000-12-15 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Diego Novillo as a maintainer for the Intel
+ Mode parts of the x86 port.
+
+2000-12-04 Andreas Jaeger <aj@suse.de>
+
+ * readelf.c (guess_is_rela): Add EM_X86_64.
+ (dump_relocations): Add EM_X86_64.
+ (get_machine_name): Add EM_X86_64.
+ Include "elf/x86-64.h".
+
+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c: Fix formatting.
+
+Mon Dec 11 14:30:21 MET 2000 Jan Hubicka <jh@suse.cz>
+
+ * MAINTAINERS: Add myself and Andreas Jaeger as x86_64 maintainer.
+
+2000-12-07 Andrew Haley <aph@redhat.com>
+
+ * readelf.c (display_debug_frames): Only display columns that are
+ referenced by the frame debug info.
+
+2000-12-05 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Jason Merrill as DWARF2 maintainer.
+
+2000-12-04 Jason Merrill <jason@redhat.com>
+
+ * readelf.c (process_section_headers): Handle linkonce.wi sections.
+ (display_debug_section): Likewise.
+ (display_debug_info): Display CU header before bailing.
+
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ * readelf.c (get_machine_flags): Recognize MIPS32 ISA in
+ EF_MIPS_ARCH. Replace use of E_MIPS_MACH_MIPS32 with
+ E_MIPS_MACH_MIPS32_4K and adjust printed CPU name similarly.
+
+ * readelf.c (get_machine_flags): Add cases for E_MIPS_ARCH_5,
+ and E_MIPS_ARCH_64.
+
+ * readelf.c (get_machine_flags): Add case for
+ E_MIPS_MACH_SB1.
+
+2000-11-30 Richard Earnshaw <rearnsha@arm.com>
+
+ * readelf.c (frame_display_row): Output 's' for DW_CFA_same_value.
+
+2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * MAINTAINERS: Add Jörn Rennecke and self as SH maintainers.
+ Change sourceware.cygnus.com to sources.redhat.com.
+ Fix typo for "amongst".
+
+2000-11-28 Nick Clifton <nickc@redhat.com>
+
+ * strip.1 (COPYING): Mention that the GNU Free Documentation
+ License is present in the sources, but not the output, and
+ also available from the GNU website.
+ (GNU Free Documentation License): Comment out this section.
+ * strings.1: Ditto.
+ * size.1: Ditto.
+ * ranlib.1: Ditto.
+ * objdump.1: Ditto.
+ * objcopy.1: Ditto.
+ * nm.1: Ditto.
+ * nlmconv.1: Ditto.
+ * ar.1: Ditto.
+ * addr2line.1: Ditto.
+
+2000-11-27 DJ Delorie <dj@redhat.com>
+
+ * readelf.c (usage): Add -wf (--debug-dump=frames) option.
+ (parse_args): Support -wf option.
+ (process_section_headers): Ditto.
+ (debug_displays): Ditto.
+ (display_debug_frames): New, dump *_frame sections.
+ (frame_need_space): Support for above.
+ (frame_display_row): Ditto.
+ * binutils.texi: Document it.
+
+2000-11-24 Nick Clifton <nickc@redhat.com>
+
+ * NEWS: Announce support for v5t, v5te and XScale.
+
+2000-11-22 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_machine_name): Add EM_JAVELIN, EM_FIREPATH,
+ EM_ZSP, EM_MMIX, EM_HUANY, EM_PRISM.
+ (get_section_type_name): Add SHT_GROUP and SHT_SYMTAB_SHNDX.
+ (get_elf_section_flags: Add SHF_GROUP.
+ (process_section_headers): Adjust output for 32-bit binaries
+ to look nice on an 80 column terminal.
+
+2000-11-20 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_osabi_name): Change ELFOSABI_MONTEREY to
+ ELFOSABI_AIX.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * readelf.c (display_debug_lines): Adjust last change to
+ use sizeof (external->li_length).
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * readelf.c (display_debug_lines): Fix section length check
+ and end_of_sequence computation.
+
+2000-11-06 Nick Clifton <nickc@redhat.com>
+
+ * binutils.texi: Add GNU Free Documentation License.
+ * objcopy.1: Add GNU Free Documentation License.
+ * objdump.1: Add GNU Free Documentation License.
+ * addr2line.1: Add GNU Free Documentation License.
+ * ar.1: Add GNU Free Documentation License.
+ * nlmconv.1: Add GNU Free Documentation License.
+ * nm.1: Add GNU Free Documentation License.
+ * ranlib.1: Add GNU Free Documentation License.
+ * size.1: Add GNU Free Documentation License.
+ * strings.1: Add GNU Free Documentation License.
+ * strip.1: Add GNU Free Documentation License.
+
+2000-10-06 Luciano Gemme <ishitawa@yahoo.com>
+
+ * objcopy.c (--srec-len=nn): New parameter to set the
+ maximum length of generated Srecords.
+ (--srec-forceS3): New parameter that restricts the generation of
+ Srecords to type S3 only.
+ * binutils.texi: Document new command line switches.
+ * objcopy.1: Docuemnt the new command line switches.
+ * NEWS: Announce the existence of the new command line switches.
+
+2000-10-31 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Jim Wilson as the maintainer for the IA64
+ code. Add Eric Chrisopher as maintainer of MN10300 port.
+
+2000-10-12 Roger Sayle <roger@metaphorics.com>
+
+ * Make comma after string after icon/control optional.
+
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
+
+ * readelf.c (get_machine_flags): Also print EF_MIPS_MACH field.
+
+ * NEWS: Mention support for MIPS32.
+
+2000-09-08 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Stephane Carrez as maintainer for 68HC[11|12].
+
+2000-09-07 H.J. Lu <hjl@gnu.org>
* configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
* configure: Rebuild.
- From 2000-08-17 Nick Clifton <nickc@redhat.com>
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt with new libtool.m4.
+
+2000-09-05 Nick Clifton <nickc@redhat.com>
+
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+2000-09-04 Todd Vierling <tv@wasabisystems.com>
+
+ * strip.1: Fix stray '\' in -o formatting.
+
+2000-09-02 Nick Clifton <nickc@redhat.com>
+
+ * configure.in: Increase version number to 2.10.91.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/binutils.pot: Regenerate.
+
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
+
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
+
+2000-08-30 Jamie Guinan <guinan@bluebutton.com>
+
+ * resrc.c (close_input_stream): Delete extraneous logic
+
+2000-08-24 Hans-Peter Nilsson <hp@axis.com>
+
+ * NEWS: Mention support for CRIS.
+
+2000-08-21 Nick Clifton <nickc@redhat.com>
+
+ * addr2line.c: Changed email address for Ulrich Lauther.
+
+2000-08-17 Christopher C. Chimelis <chris@debian.org>
+
+ * objdump.c (LONGEST_ARCH): Set to sizeof("powerpc:common").
+
+2000-08-17 Nick Clifton <nickc@redhat.com>
* readelf.c (display_debug_pubnames): Only issue warning
message once. Terminate message with a new line.
(display_debug_aranges): Only display version 2 debug info.
-
- From 2000-07-19 H.J. Lu <hjl@gnu.org>
+
+2000-08-14 Todd Vierling <tv@wasabisystems.com>
+
+ * objcopy.c (strip_main): Silently accept -d as an alias for -g
+ for compatability with old BSD systems.
+
+2000-08-14 Jason Eckhardt <jle@cygnus.com>
+
+ * NEWS: Mention i860 support.
+
+2000-08-11 Carlo Wood <carlo@alinoe.com>
+
+ * addr2line.c (main): Add const to char *.
+
+2000-08-11 Geoff Keating <geoffk@cygnus.com>
+
+ * ar.c (main): Don't crash if called with no arguments
+ or only '-X32_64' as an argument.
+
+2000-08-08 DJ Delorie <dj@redhat.com>
+
+ * resrc.c: use "gcc -xc" instead of -xc-header
+
+2000-08-05 Jason Eckhardt <jle@cygnus.com>
+
+ * readelf.c (elf/i860.h): Include.
+ (dump_relocations): Add recognition of i860 architecture.
+ (guess_is_rela): Add recognition of i860 architecture.
+
+2000-08-03 Nick Clifton <nickc@cygnus.com>
+
+ * MAINTAINERS: Add information about CGEN maintainers.
+
+2000-07-26 Geoff Keating <geoffk@cygnus.com>
+
+ * nm.c (main): Ignore '-X32_64' as an option.
+ * ar.c (main): Likewise.
+ * binutils.texi (nm): Document new option.
+ (ar): Likewise.
+
+2000-07-23 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * rdcoff.c (external_coff_symbol_p): K&R-ise.
+
+2000-07-20 H.J. Lu <hjl@gnu.org>
+
+ * binutils.texi: Put back "@end table" deleted by
+ accident.
+
+2000-07-05 Kenneth Block <krblock@computer.org>
+
+ * nm.c: Add optional style to demangle switch.
+ * objdump.c: Add optional style to demangle switch.
+ * addr2line.c: Add optional style to demangle switch.
+ * binutils.texi: Document optional style to demangle
+ switch.
+
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
+
+ * MAINTAINERS: Add self as CRIS port maintainer.
+ * readelf.c: Include elf/cris.h.
+ (guess_is_rela): Handle EM_CRIS.
+ (dump_relocations): Ditto.
+ (get_machine_name): Ditto.
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Regenerate.
+ * po/binutils.pot: Regenerate.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
* readelf.c (get_dynamic_type): Change "AUXILARY" to
"AUXILIARY".
(process_dynamic_segment): Print out strings for DT_CONFIG,
DT_DEPAUDIT, DT_AUDIT and DT_RUNPATH.
- From 2000-07-19 H.J. Lu <hjl@gnu.org>
+2000-07-19 Mark Kettenis <kettenis@gnu.org>
+
+ * nm.c (usage): Change output of `nm --help' to include a
+ description of the purpose of the program and a detailed
+ description of the accepted options.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
* readelf.c (process_dynamic_segment): Change DF_1_NODEPLIB
to DF_1_NODEFLIB.
- From 2000-07-19 H.J. Lu <hjl@gnu.org>
+2000-07-19 H.J. Lu <hjl@gnu.org>
* readelf.c (get_dynamic_type): Fix DT_CHECKSUM.
- From 2000-07-19 H.J. Lu <hjl@gnu.org>
+2000-07-19 H.J. Lu <hjl@gnu.org>
* readelf.c (get_dynamic_type): Change DT_FEATURE_1 to
DT_FEATURE.
@@ -55,50 +522,154 @@
(process_dynamic_segment): Handle DTF_1_CONFEXP, DF_1_NODEPLIB,
DF_1_NODUMP and DF_1_CONLFAT.
- From 2000-07-01 Alexander Aganichev <AAganichev@hypercom.com>
-
- * stabs.c (parse_stab_type): Divide size in bits by 8 as binutils
- struct debug_type stores size in bytes.
-
- From 2000-08-17 Christopher C. Chimelis <chris@debian.org>
+2000-07-18 Nick Clifton <nickc@cygnus.com>
- * objdump.c (LONGEST_ARCH): Set to sizeof("powerpc:common").
+ * binutils.texi (readelf): Fix spelling typo.
- From 2000-07-11 Mark Kettenis <kettenis@gnu.org>
+2000-07-11 Mark Kettenis <kettenis@gnu.org>
* objdump.c (usage): Make output of `objdump --help' more
consistent with the rest of the GNU world. Add a line describing
the purpose of the program.
-
- From 2000-06-24 Nick Clifton <nickc@cygnus.com>
+
+2000-07-10 David Huggins-Daines <dhd@linuxcare.com>
+
+ * stabs.c (parse_stab_range_type): Cast to proper type to fix
+ warning.
+
+2000-07-10 Ryan Bradetich <rbradetich@uswest.net>
+
+ * readelf.c (get_dynamic_data): Add casts and use unsigned chars
+ to fix warnings.
+ (process_symbol_table): Ditto.
+ (procesS_extended_line_op): Ditto.
+ (display_debug_lines): Ditto.
+ (display_debug_pubnames): Ditto.
+ (read_and_display_attr): Ditto.
+
+2000-07-09 Nick Clifton <nickc@cygnus.com>
+
+ * MAINTAINERS: Add several more port specific maintainers.
+
+2000-07-05 Nick Clifton <nickc@cygnus.com>
+
+ * MAINTAINERS: Add blanket write privs for Michael Meissner.
+
+2000-06-05 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS: New.
+
+2000-07-01 Eric Fifer <EFifer@sanwaint.com>
+
+ * dllwrap.c: Changed mistaken dyn_string_append() calls
+ to dyn_string_append_cstr().
+
+2000-07-01 Alexander Aganichev <AAganichev@hypercom.com>
+
+ * stabs.c (parse_stab_type): Divide size in bits by 8 as binutils
+ struct debug_type stores size in bytes.
+
+2000-07-01 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
+ (CLEANFILES): Add DEPA.
+ * Makefile.in: Regenerate.
+
+2000-06-27 Alan Modra <alan@linuxcare.com.au>
+
+ * ar.c: Revert incorrect 2000-06-25 patch.
+ * bucomm.c: Likewise.
+
+2000-06-25 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * rdcoff (parse_coff_symbol): Treat GNU weak symbols as external.
+ (external_coff_symbol_p): New function.
+ (parse_coff): Use it.
+
+2000-06-25 Alexander Aganichev <AAganichev@hypercom.com>
+
+ * ar.c (normalize): Advance past both characters in a DOS based
+ <letter>: filepath prefix.
+ (main): Likewise.
+ * bucomm.c (make_tempname): Likewise.
+
+2000-06-24 Nick Clifton <nickc@cygnus.com>
* objdump.c (usage): Fix description of --stabs switch.
- From 2000-07-18 Nick Clifton <nickc@cygnus.com>
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
- * binutils.texi (readelf): Fix spelling typo.
+ * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
+ find one.
+ * Makefile.in: Regenerate.
- From 2000-07-19 Mark Kettenis <kettenis@gnu.org>
+2000-06-20 Alexander Aganichev <AAganichev@hypercom.com>
- * nm.c (usage): Change output of `nm --help' to include a
- description of the purpose of the program and a detailed
- description of the accepted options.
+ * ar.c (normalize): Correct pointer comparison when checking for
+ backslashes.
+ (main): Likewise.
+ * bucomm.c (make_tempname): Likewise.
-2000-09-05 Todd Vierling <tv@wasabisystems.com>
+ * ieee.c (ieee_start_compilation_unit): Correct pointer comparison
+ and search for backslashes in the original pathname.
+ (ieee_add_bb11): Likewise.
- From 2000-08-14 Todd Vierling <tv@wasabisystems.com>
- * objcopy.c (strip_main): Silently accept -d as an alias for -g
- for compatability with old BSD systems.
+2000-06-18 Nick Clifton <nickc@redhat.com>
-2000-09-04 Todd Vierling <tv@wasabisystems.com>
+ * ar.c (print_contents): Improve verbose message.
- * strip.1: Fix stray '\' in -o formatting.
+2000-06-15 H.J. Lu <hjl@gnu.org>
+
+ * dyn-string.c: Removed. Not needed with dyn-string.c in
+ libiberty.
+ * dyn-string.h: Likewise.
+
+ * Makefile.am: Remove references to dyn-string.c and
+ dyn-string.h. Rebuild dependency.
+ * Makefile.in: Rebuild.
+
+2000-06-15 H.J. Lu <hjl@gnu.org>
+
+ * binutils.texi: Put a warning on copying relocatable object
+ files between two different formats.
+
+2000-06-13 DJ Delorie <dj@cygnus.com>
+
+ * rcparse.y (control): ICON controls take an id as the first
+ parameter, not an optional string. Also, call new convenience
+ function that takes res_id's.
+ * resrc.c (define_control): missing text means zero-length string,
+ not zero ID.
+ (define_icon_control): New.
+ * windres.h: declare define_icon_control.
+
+2000-06-13 H.J. Lu <hjl@gnu.org>
+
+ * configure: Regenerate.
+
+2000-06-08 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in (VERSION): Update to show this is the CVS mainline.
+
+2000-06-02 David O'Brien <obrien@FreeBSD.org>
+
+ * strings.c (isgraphic): Interpret <TAB> as a printable character,
+ analogous to <SPACE>.
2000-05-30 Alan Modra <alan@linuxcare.com.au>
* objdump.c (display_target_list): Use bfd_close_all_done, not
bfd_close to fix crash caused by 2000-05-24 change.
+2000-05-25 DJ Delorie <dj@cygnus.com>
+
+ * resrc.c (close_input_stream): zero out cpp_pipe after closing it.
+
+2000-05-26 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am: Update dependencies with "make dep-am"
+ * Makefile.in: Regenerate.
+
2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
* ar.c: Include filenames.h.
@@ -143,10 +714,38 @@
* objdump.c (display_target_list): Close the bfd.
(display_info_table): Likewise.
-2000-05-23 Philip Blundell <pb@futuretv.com>
+2000-05-14 H.J. Lu (hjl@gnu.org)
- * configure.in: Set version to 2.10.
- * configure: Regenerate.
+ * objcopy.c (filter_symbols): Don't strip global symbols in
+ relocatable object files.
+
+2000-05-14 Alan Modra <alan@linuxcare.com.au>
+
+ * size.c (usage): Associate short options with corresponding long
+ option to give a clue as to their function.
+
+2000-05-14 Philippe De Muyter <phdm@macqel.be>
+
+ * size.c (main): Accept and ignore `-f' option.
+
+2000-05-13 Alan Modra <alan@linuxcare.com.au>
+
+ * bucomm.h (gettext, dgettext, dcgettext, textdomain,
+ bindtextdomain): Replace defines with those from intl/libgettext.h
+ to quieten gcc warnings.
+
+2000-05-12 H.J. Lu <hjl@gnu.org>
+
+ * nlmconv.c (temp_filename): Removed.
+
+ * nlmconv.c (link_inputs): Use make_temp_file () instead of
+ choose_temp_base ().
+ * objdump.c (display_target_list): Likewise.
+ (display_info_table): Likewise.
+
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
+
+ * objcopy.c (setup_section): Add const and gettext calls for err.
2000-05-02 H.J. Lu <hjl@gnu.org>
@@ -156,19 +755,50 @@
ELFOSABI_FREEBSD, ELFOSABI_TRU64, ELFOSABI_MODESTO
and ELFOSABI_OPENBSD.
+2000-05-02 Kazu Hirata <kazu@hxi.com>
+
+ * coffgrok.c: Add ATTRIBUTE_UNUSED as appropriate.
+ * srconv.c: Likewise.
+ * sysdump.c: Likewise.
+
+Sun Apr 23 14:23:26 2000 Denis Chertykov <denisc@overta.ru>
+
+ * readelf.c (guess_is_rela): AVR uses RELA relocations.
+ (get_machine_name): machine name for EM_AVR added.
+
+Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+
+ * Makefile.am (readelf.o): Add elf/ia64.h.
+ * Makefile.in: Rebuild.
+ * readelf.c: Include elf/ia64.h.
+ (guess_is_rela, dump_relocations): Handle EM_IA_64.
+
+2000-04-17 Timothy Wall <twall@cygnus.com>
+
+ * objdump.c (disassemble_data): Set octets per byte *after*
+ resolving arch/mach for binary files.
+
2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
* arlex.l: Add directives to increase lex buffer size.
* objdump.c, readelf.c: Don't include strarg.h or varargs.h. They are
- already included by bucomm.h.
+ already included by bucomm.h.
2000-04-10 Philippe De Muyter <phdm@macqel.be>
- * readelf (dynamic_segment_mips_val): Call `sprintf', not
+ * readelf.c (dynamic_segment_mips_val): Call `sprintf', not
`strftime' since strftime is not available on all systems.
(process_mips_specific): Ditto.
+Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure: Re-generate.
+
2000-04-06 Alan Modra <alan@linuxcare.com.au>
* addr2line.c: Update copyright.
@@ -265,6 +895,27 @@
(integer_arg): And here.
* sysdump.c (main): And here.
+2000-04-06 Timothy Wall <twall@cygnus.com>
+
+ * objdump.c (dump_section_header): Print CLINK and BLOCK flags.
+
+2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
+
+ * readelf.c (decode_location_expression): Loop through multiple
+ operations.
+ (read_and_display_attr): Pass in length.
+
+ * readelf.c (read_and_display_attr): Add CU offset to references.
+ (display_debug_info): Pass it in.
+
+2000-04-06 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (decode_ARM_machine_flags): New function.
+ (get_machine_flags): Call decode_ARM_machine_flags for ARM
+ targets.
+
+ (get_machine_name): Catch EM_AVR
+
2000-04-05 Alan Modra <alan@linuxcare.com.au>
* binutils.texi: Remove optional `=' from long options that have
@@ -390,7 +1041,7 @@
* configure.in: Add arm-wince, mips-pe and sh-pe targets.
* configure: Regenerate.
- * dlltoolc.: Add support for sh-pe and mips-pe targets.
+ * dlltool.c: Add support for sh-pe and mips-pe targets.
* rescoff.c: Add support for sh-pe and mips-pe targets.
2000-02-23 H.J. Lu <hjl@gnu.org>
@@ -435,18 +1086,18 @@
2000-02-03 Timothy Wall <twall@redhat.com>
- * binutils/objdump.c (dump_section_header, find_symbol_for_address,
+ * objdump.c (dump_section_header, find_symbol_for_address,
show_line, disassemble_bytes, disassemble_data, dump_data):
distinguish between octets and bytes.
-
+
2000-01-27 Thomas de Lellis <tdel@windriver.com>
- * nm.c (print_symbol_info_bsd): Use bfd_is_undefined_symclass to
+ * nm.c (print_symbol_info_bsd): Use bfd_is_undefined_symclass to
check to unresolved symbols.
- (print_symbol_info_sysv): Ditto.
- (print_symbol_info_posix): Ditto.
+ (print_symbol_info_sysv): Ditto.
+ (print_symbol_info_posix): Ditto.
- * binutils.texi: Document new 'V' symclass flag for nm.
+ * binutils.texi: Document new 'V' symclass flag for nm.
2000-01-27 Nick Clifton <nickc@redhat.com>
@@ -492,28 +1143,28 @@
2000-01-07 Mumit Khan <khan@xraylith.wisc.edu>
- * windres.c (long_options): Add --use-temp-file and
+ * windres.c (long_options): Add --use-temp-file and
--no-use-temp-file options.
(usage): Document.
(main): Handle.
-
+
* windres.h: Update read_rc_file prototype.
-
+
* resrc.c (cpp_temp_file): New static variable.
(istream_type): New static variable.
(close_pipe): Delete function.
(run_cmd): New static function.
(open_input_stream): New static function.
(close_input_stream): New static function.
- (look_for_default): Handle DOS directory separator. Use
+ (look_for_default): Handle DOS directory separator. Use
open_input_stream instead of popen.
(read_rc_file): Likewise.
-
+
* binutils.texi: Document --use-temp-file, --no-use-temp-file
- options.
+ options.
2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
-
+
* dlltool.c (create_compat_implib): New variable.
(gen_exp_file): Use.
(make_one_lib_file): Use.
@@ -527,7119 +1178,9 @@
2000-01-03 Nick Clifton <nickc@cygnus.com>
* binutils.texi: Document new, ARM specific disassembler
- command line switch "-M force-thumb".
-
-1999-12-28 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Update with new constants added by Oct 4, 1999
- ELF ABI draft.
- (guess_is_rela): Add new machine codes, but leave
- rel type undetermined.
- (get_machine_name): Add new machine codes.
- (get_section_type_name): Add new section types.
- (get_elf_section_flags): New funciton: Decode section flags.
- (process_section_headers): Call get_elf_section_flags() in
- order to decode flags in section header.
- (get_dynamic_flags): New function: Decode dynamic section
- flags.
- (process_dynamic_section): Display flags (if present).
- (get_symbol_type): Add STT_COMMON.
- (get_symbol_visibility): New function: Decode a symbol's
- visibility.
- (process_symbol_table): Call get_symbol_visibility().
- (get_note_type): Add NT_PRXFPREGS.
-
-1999-12-26 Ian Lance Taylor <ian@zembu.com>
-
- * strings.c (main): Correct handling of numeric argument.
-
-1999-12-23 Andrew Haley <aph@cygnus.com>
-
- * dlltool.c (mtable): mcore how_jtab_roff is 4 bytes into the
- jtab; was 8.
-
-1999-12-17 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (mtable): Stop compile time warnings about missing
- initialisers.
- (yyerror): Stop compile time warnings about unused paramater.
- (INIT_SEC_DATA): New macro: initialise an entry in the secdata
- array.
- (secdata): Stop ccompile time warnings about uninitialised
- fields.
- (dtab): Stop compile time warnings about unused parameter.
- (long_options): Stop compile time warning about missing
- initialiser.
-
-1999-12-10 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (print_vma): Support native 64bit ELF systems.
-
-1999-12-09 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (mtable): Add epoc-arm specific entry.
- Make default arm entry pass -mpacs-26 to assembler.
- (flush_page): Do not mangle null entries.
-
-1999-12-07 H . J . Lu hjl@valinux.com
-
- * readelf.c: Fix compile time warnings. Support more than 999
- symbols.
-
-1999-12-03 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (enum print_mode): New type.
- (print_vma): New function.
- (dump_relocations): Use print_vma to display bfd_vma values.
- (process_file_header): Use print_vma to display bfd_vma values.
- (process_program_headers): Use print_vma to display bfd_vma values.
- (process_section_headers): Use print_vma to display bfd_vma values.
- (dynamic_segment_parisc_val): Use print_vma to display bfd_vma values.
- (process_dynamic_segment): Use print_vma to display bfd_vma values.
- (process_symbol_table): Use print_vma to display bfd_vma values.
- (process_mips_specific): Use print_vma to display bfd_vma values.
-
-1999-11-25 Fred Fish <fnf@cygnus.com>
-
- * readelf.c (process_note): Change arg from Elf_External_Note
- to Elf32_Internal_Note, which also turns the function body
- into little more than a call to printf.
- (process_corefile_note_segment): Substantially rewritten
- to properly handle case where target and host are different
- endianness, handle note sections with padding, and add some
- cruft to handle notes with unterminated name data.
-
-1999-11-22 Nick Clifton <nickc@cygnus.com>
-
- * objcopy.c (copy_usage): Reformat.
- (strip_usage): Reformat.
-
-1999-11-21 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (usage): Overhaul output: One line per switch.
- Textual description of each switch. Distinguish between
- optional switches and required switches.
- (long_options): Add 'g', 'G' and 'z' short options.
- (main): Distinguish between optional switches and required
- switches.
-
- * binutils.texi: Add -g -G and -z short options for
- --debugging, --stabs and --disassemble-zeroes.
-
-1999-11-03 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (flush_page): Clip short values to prevent warnings
- from the assembler.
- Change default mcore machine name to 'mcore-le' and rename
- big-endian version to 'mcore-be'.
-
-1999-10-27 Fred Fish <fnf@cygnus.com>
-
- * objdump.c (display_bfd): Break into two functions. The
- actual dumping code moves to dump_bfd. If bfd is not
- unambiguously recognized as a bfd_object, attempt to dump
- it as a bfd_core.
- (dump_bfd): New function.
-
-1999-10-26 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (assemble_file): Remove spurious test of exp_name.
-
-1999-10-22 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (struct mac): Add new field 'how_default_as_switches'.
- (mtable): Initialise new field. Some machines have a non empty
- string for this field.
- (HOW_BFD_TARGET): Undefine and replace with...
- (HOW_BFD_READ_TARGET): New macro: bfd target to use when opening a
- file for reading. This is set to 0 so that any recognisable bfd
- format can be read.
- (HOW_BFD_WRITE_TARGET): New macro: bfd target to use when opening
- a file for writing. This is set to the target machine type.
- (ASM_SWITCHES): New macro: default switches to use when assembling
- a file.
- (assemble_file): New function: Assemble a source file into a
- destination object file.
- (gen_exp_file): Use assemble_file to create the exp file.
- (make_one_lib_file): Use assemble_file to create the lib file.
- Open output file use HOW_BFD_WRITE_TARGET and input files using
- HOW_BFD_READ_TARGET.
- (make_head): Use assemble_file to create the head file.
- (make_tail): Use assemble_file to create the tail file.
- (gen_lib_file): Open output file use HOW_BFD_WRITE_TARGET.
-
-1999-10-15 Ian Lance Taylor <ian@zembu.com>
-
- * ar.c (normalize): Fix full_pathname code.
-
-1999-10-08 Ben Elliston <bje@cygnus.com>
-
- * binutils.texi: Some rewording and clarifications.
-
-1999-09-15 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (dynamic_segment_parisc_val): Print 0 for DLD_FLAGS if
- the value is zero.
- (process_symbol_table): Don't print histogram if hash table is empty.
-
-1999-09-15 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (get_parisc_dynamic_type): Handle DT_HP_GST_* values.
-
-1999-09-02 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (get_symbol_type): Add support for HPUX and PARISC
- specific symbol types.
-
- * readelf.c: Add HPUX and PARISC extensions to dynamic and program
- header table printing.
-
- * readelf.c (get_machine_flags): Add handling of PARISC.
-
-1999-09-29 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dlltool.c (scan_drectve_symbols): Handle type tags in exported
- symbols.
- (scan_filtered_symbols): Likewise.
-
-1999-09-19 Ian Lance Taylor <ian@zembu.com>
-
- * resrc.c (write_rc_rcdata): Fix local variable shadowing
- problem. If RCDATA_BUFFER data can be read as strings, modify
- code to print the strings as comments.
- * resres.c: Add casts to avoid warnings.
- (write_res_data, read_res_data): Don't put the program name in the
- error message; fatal already puts it there.
-
-1999-09-14 Michael Meissner <meissner@cygnus.com>
-
- * configure.in (Canonicalization of target names): Remove adding
- ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
- generates $ac_config_sub with a ${CONFIG_SHELL} already.
- * configure: Regenerate.
-
-1999-09-12 Ian Lance Taylor <ian@zembu.com>
-
- * ar.c (main): Clear output_file if we don't change the archive.
- (delete_members, replace_members): Likewise.
-
-1999-09-12 Donn Terry <donn@interix.com>
-
- * objdump.c (dump_headers): If wide_output, print Flags header.
-
- * objdump.c (dump_section_header): Print any comdat information.
-
- * objcopy.c (parse_flags): Handle "noload", "debug", and "share".
- * binutils.texi, objcopy.1: Document new flags.
-
- * ar.c (counted_name_mode): New static variable.
- (counted_name_counter): New static variable.
- (map_over_members): Handle counted mode.
- (usage): Mention N modifier.
- (main): Handle N modifier.
- (delete_members): Handle counted mode.
- * binutils.texi, ar.1: Document N modifier.
-
- * ar.c (print_contents): Change printing of member name for
- POSIX.2 conformance.
-
- * ar.c (output_filename): Make const.
- (open_inarch): If creating a new empty archive, set
- output_filename.
-
-1999-09-12 Ian Lance Taylor <ian@zembu.com>
-
- * ar.c (full_pathname): New static variable.
- (map_over_members): Call normalize on command line parameter.
- (usage): Mention P modifier.
- (normalize): If full_pathname is true, don't do anything.
- (main): Accept P modifier.
- (delete_members): Call normalize on command line parameter.
- * binutils.texi, ar.1: Document P modifier.
-
-1999-09-09 Andreas Schwab <schwab@suse.de>
-
- * binutils.texi: Add info dir entries for all programs described
- here. Fix arguments of @var to not contain punctuation.
-
-1999-09-06 Donn Terry <donn@interix.com>
-
- * nm.c (print_symbol_info_bsd): Check for 'w' as well as 'U'.
- (print_symbol_info_sysv): Likewise.
- (print_symbol_info_posix): Likewise.
-
-1999-09-04 Steve Chamberlain <sac@pobox.com>
-
- * readelf.c: Include "elf/pj.h".
- (dump_relocations): Handle EM_PJ.
- (get_machine_name): Likewise.
- (get_machine_flags): Likewise.
-
-1999-08-31 Scott Bambrough <scottb@netwinder.org>
-
- * readelf.c (get_note_type): New function: Decode the e_type
- value of a note.
- (process_note): New function: Display the contents of a core note.
- (process_corefile_note_segment): New function.
- (process_corefile_note_segments): New function.
- (process_corefile_contents): New function.
- (process_file): Add call to process_corefile_contents.
- (parse_args): Add parsing of -n/--notes command line switch.
- (usage): Document new command line switch.
-
- * binutils.texi: Documemnt new command line switch to readelf.
-
-1999-08-31 Ian Lance Taylor <ian@zembu.com>
-
- * binutils.texi (Bug Reporting): Clarify that large files should
- not be sent to bug-gnu-utils.
-
-1999-08-28 Stephane Carrez <stcarrez@worldnet.fr>
-
- * readelf.c (process_extended_line_op): New parameter pointer_size,
- read the address according to pointer_size.
- (debug_line_pointer_size): New global to indicate the
- size of address in .debug_line section.
- (debug_displays, prescan_debug_info): Prescan the .debug_info section
- to record the size of address in `debug_line_pointer_size'.
- (process_section_contents): Before dumping any section, execute
- the pre-scan operation defined for some debug sections.
-
-1999-08-27 Jim Wilson <wilson@cygnus.com>
-
- * readelf.c (display_debug_lines): Use i-1 not i in standard_opcodes
- access.
- (display_debug_aranges): New local excess. Use for calculating padding
- and add that into ranges. Break from loop only if length is also 0.
-
-1999-08-27 Jim Wilson <wilson@cygnus.com>
-
- * readelf.c (display_debug_lines, case DW_LNS_const_add_pc): Multiply
- adv by info.li_min_insn_length.
-
-1999-08-26 Jakub Jelinek <jj@ultra.linux.cz>
-
- * readelf.c (get_sparc64_dynamic_type): New function.
- (get_dynamic_type): Use it.
-
-1999-08-26 Jim Wilson <wilson@cygnus.com>
-
- * readelf.c (display_debug_lines, case default): Change second line
- setting adv to use = not +=.
-
-1999-08-19 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c: Added more examples to the comment at the start.
-
-1999-08-18 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (make_head): Only emit interworking directive if
- necessary.
-
-Thu Jul 15 22:44:21 1999 Hans-Peter Nilsson <hp@bitrange.com>
-
- * readelf.c (process_abbrev_section): Handle standard-conforming
- single zero at the end of the section.
-
-1999-08-09 Ian Lance Taylor <ian@zembu.com>
-
- * objdump.c (exit_status): New static variable.
- (nonfatal): New static function.
- (disassemble_data): Set exit_status on error.
- (read_section_stabs): Likewise.
- (display_bfd): Likewise. Call nonfatal rather than bfd_nonfatal.
- (display_file): Call nonfatal rather than bfd_nonfatal.
- (display_target_list, display_info_table): Likewise.
- (main): Return exit_status rather than 0.
-
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
-
- * objdump.c (dump_section_header): Update for renaming of
- SEC_SHORT to SEC_SMALL_DATA. Print SEC_SHARED flag.
-
- From Eli Zaretskii <eliz@gnu.org>:
- * binutils.texi: Document cxxfilt as MS-DOS name for c++filt.
-
- * configure.in: Define and substitute DEMANGLER_NAME.
- * Makefile.am (DEMANGLER_PROG): Set to cxxfilt.
- (man_MANS): Use DEMANGLER_NAME rather than DEMANGLER_PROG.
- (bin_PROGRAMS): Remove $(DEMANGLER_PROG).
- (noinst_PROGRAMS): Add $(DEMANGLER_PROG).
- (cxxfilt_SOURCES): Rename from c__filt_SOURCES.
- (cxxfilt_LDADD): Rename from c__filt_LDADD.
- ($(DEMANGLER_NAME).1): Rename from $(DEMANGLER_PROG).1. Use
- DEMANGLER_NAME rather than DEMANGLER_PROG in substitution.
- (MOSTLYCLEANFILES): Use DEMANGLER_NAME rather than
- DEMANGLER_PROG.
- (install-exec-local): When installing noinst_PROGRAMS, change
- cxxfilt to $(DEMANGLER_NAME).
- * configure, Makefile.in: Rebuild.
-
- * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
- MKDEP.
- * Makefile.in: Rebuild.
-
-1999-08-05 Donn Terry <donn@interix.com>
-
- * Makefile.am (YACC): If bison is not in the source tree, use
- @YACC@ rather than bison -y.
- (LEX): If flex is not in the source tree, use @LEX@ rather than
- flex.
- * configure.in: Build dlltool for i[3-6]86-*-interix.
- * Makefile.in, configure: Rebuild.
-
-1999-07-21 Ian Lance Taylor <ian@zembu.com>
-
- From Mark Elbrecht:
- * configure.bat: Remove; obsolete.
-
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
-
- * readelf.c (get_machine_flags): Print EF_SPARC_SUN_US3.
-
-1999-07-15 Ian Lance Taylor <ian@zembu.com>
-
- * configure.in: Bump version number to 2.9.5.
- * configure: Rebuild.
-
-1999-07-14 Richard Henderson <rth@cygnus.com>
-
- * objdump.c (dump_section_header): Print SEC_SHORT.
-
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
-
- * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
- as appropriate. Add variable initializations. Add casts.
- * objdump.c (disassemble_bytes): Change j to bfd_vma.
- * readelf.c (process_syminfo): Change i to unsigned int.
- (display_debug_info): Change abbrev_number to unsigned long.
- (process_mips_specific): Change fcnt to size_t.
-
-1999-07-09 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Only support decoding 64bit ELF files if the compiler
- supports a 64 bit data type.
- Add -I equivalent for --histogram.
- Add -A command-line option to display architecture specific information.
-
-1999-07-08 Jakub Jelinek <jj@ultra.linux.cz>
-
- * readelf.c (guess_is_rela): Sparcv9 and v8plus use rela.
- (dump_relocations): Use ELF64_R_TYPE_ID for Sparc, for R_SPARC_OLO10
- print the secondary addend.
- (get_machine_flags): Print Sparc machine flags.
- (get_symbol_type): Print STT_REGISTER.
-
-1999-07-08 Ian Lance Taylor <ian@zembu.com>
-
- * stabs.c (parse_stab_type): Fix handling of template names with
- template parameters containing `::'.
- (stab_demangle_type): Handle a qualified name in a pointer to
- member.
-
-1999-06-23 Ian Lance Taylor <ian@zembu.com>
-
- * Makefile.am (dlltool_SOURCES): Add dyn-string.c.
- * Makefile.in: Rebuild.
-
-1999-06-23 Mumit Khan <khan@xraylith.wisc.edu>
-
- * configure.in (HAVE_EXECUTABLE_SUFFIX): Define.
- * dlltool.c (look_for_prog): Use HAVE_EXECUTABLE_SUFFIX.
- * dllwrap.c (look_for_prog): Likewise.
- * resrc.c (look_for_default): Likewise.
- * configure, config.in: Rebuild.
-
-1999-06-22 Ian Lance Taylor <ian@zembu.com>
-
- Based on patches from Mumit Khan <khan@xraylith.wisc.EDU>:
- * configure.in: Define EXECUTABLE_SUFFIX.
- * dlltool.c: Include "dyn-string.h". Include <stdarg.h> based on
- ANSI_PROTOTYPES, not __STDC__.
- (outfile): Remove.
- (gen_exp_file): Change uses of outfile to use alloca.
- (make_one_lib_file, make_head, make_tail): Likewise.
- (gen_lib_file): Likewise.
- (look_for_prog): New static function.
- (deduce_name): Rewrite to use look_for_prog.
- (mcore_elf_gen_out_file): Use dyn_string_t rather than outfile.
- * dllwrap.c: Don't include <stdio.h>, <errno.h>, <string.h>,
- <stdlib.h>, or <unistd.h>. Include <sys/stat.h> and either
- <stdarg.h> or <varargs.h>.
- (driver_name): Initialize to NULL, not "gcc".
- (dlltool_name): Initialize to NULL, not "dlltool".
- (display, inform, look_for_prog, deduce_name): New static
- functions.
- (usage): Mention -mno-cygwin.
- (OPTION_MNO_CYGWIN): Define.
- (main): Handle -mno-cygwin. Deduce driver_name and dlltool_name.
- * resrc.c (look_for_default): Make static. Remove unused local
- path. Check using EXECUTABLE_SUFFIX.
- (read_rc_file): Allocate enough space to hold EXECUTABLE_SUFFIX.
- * Makefile.am: Rebuild dependencies.
- (dllwrap_LDADD): Add $(INTLLIBS).
- * configure, Makefile.in, config.in: Rebuild.
-
-Mon Jun 21 16:49:11 1999 Jeffrey A Law (law@cygnus.com)
-
- * readelf.c (dump_relocations): Use elf_hppa_reloc_type instead of
- elf32_hppa_reloc_type.
-
-1999-06-17 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (mcore_elf_gen_out_file): Link object files with the
- .exp file, not the .lib file.
-
-Fri Jun 18 20:17:51 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * deflex.l: Accept single-character symbol names.
-
-1999-06-16 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (get_symbol_type): Detect ARM symbols typed as Thumb
- functions.
-
-1999-06-14 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (disassembler_options): New variable.
- (usage): Document new -M/--disassembler-options option.
- (long_options): Add --disassembler-options.
- (disassemble_data): Initialise disassembler_options field of
- disassembler_info structure.
- (main): Add parsing of -M option.
-
- * binutils.texi: Document new command line switch to objdump.
-
- * NEWS: Describe new command line switch to objdump.
-
-
-Mon Jun 14 10:27:54 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * binutils.texi: Fix typos.
-
-1999-06-13 Ian Lance Taylor <ian@zembu.com>
-
- * objdump.c (disassemble_bytes): If the disassembler returns an
- error, print out anything it may have printed to the buffer. From
- H.J. Lu <hjl@gnu.org>.
-
- * defparse.y (explist): Remove separate expline to eliminate
- shift/reduce conflict.
-
- From Kai-Uwe Rommel <rommel@ars.de>:
- * defparse.y: Add tokens NONSHARED, SINGLE, MULTIPLE,
- INITINSTANCE, INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
- (command): Add option_list after LIBRARY.
- (attr): Accept and ignore NONSHARED, SINGLE, and MULTIPLE.
- (option_list, option): New nonterminals.
- * deflex.l: Recognize NONSHARED, SINGLE, MULTIPLE, INITINSTANCE,
- INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
-
-1999-06-12 Ian Lance Taylor <ian@zembu.com>
-
- * ar.c (O_BINARY): Define as 0 if not defined.
- (ranlib_touch): Open file with O_BINARY.
-
- * rename.c (O_BINARY): Define as 0 if not defined.
- (simple_copy): Open files with O_BINARY.
-
- Based on patch from H. Peter Anvin <hpa@transmeta.com>:
- * objcopy.c (struct section_list): Add copy field.
- (sections_copied): New static variable.
- (copy_options): Add "only-section".
- (copy_usage): Mention -j and --only-section.
- (find_section_list): Initialize copy field.
- (is_strip_section): Check for copying sections.
- (copy_object): Check sections_copied when calling filter_symbols.
- (setup_section): Check for copying sections.
- (copy_section): Likewise.
- (copy_main): Handle -j/--only-section.
- * binutils.texi, objcopy.1: Document -j/--only-section.
-
- * configure.in: If frexp is not available, check in -lm.
- * configure: Rebuild.
-
- * readelf.c (get_elf_class): Use correct printf format for type.
- (get_data_encoding): Likewise.
- (get_osabi_name): Likewise.
- (process_file_header): Don't pass an extra argument to printf.
- (process_dynamic_segment): Cast dynamic_size to long before
- printing.
- (decode_location_expression): Cast byte_get to long before
- printing.
-
-Wed Jun 9 11:40:16 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * readelf.c (dump_section): Cast values from byte_get to
- [unsigned] long for printing, in case it is wider than long.
- (display_block): Likewise.
- (read_and_display_attr): Likewise.
- (decode_location_expression): Likewise. Don't depend on
- evaluation order.
-
-Mon Jun 7 12:14:57 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * windres.c (usage): Fix typo.
-
-1999-06-04 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Use 64bit wide fields in internal strcutures even if
- targetting a 32bit architecture.
- (dump_relocations): Take a new parameter - the number of symbols
- in the symbol table.
-
-1999-06-04 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Add support for 64bit ELF files.
-
-1999-06-03 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (mcore_elf_gen_out_file): Use constants for temporary
- file names.
-
-Wed Jun 2 12:34:36 1999 Richard Henderson <rth@cygnus.com>
-
- * dlltool.c (gen_exp_file): Revert 19990411 change.
-
-Mon May 31 09:56:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * readelf.c (process_relocs): Determine type of reloc from
- DT_PLTREL and from section type.
-
-1999-05-29 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (get_elf_class): Display unknown class number.
- (get_data_encoding): Display unknown encoding number.
- (get_osabi_name): Display unknown ABI number.
- (process_file_header): Display unknown version number.
-
-1999-05-29 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (dump_relocations): Fix typo.
-
-1999-05-28 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (dump_relocations): Add extra parameter: is_rela to
- specify the kind of relocations to be dumped. Call guess_is_rela
- if this parameter has a value of UNKNOWN.
- (guess_is_rela): New function: Guess the kind of reloc being used
- baced on the machine number.
- (process_relocs): Determine type of reloc before calling
- dump_relocations.
-
-1999-05-28 Ian Lance Taylor <ian@zembu.com>
-
- * readelf.c: Include "elf/i960.h".
- (dump_relocations): Handle EM_960.
-
-Thu May 27 11:58:33 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * objcopy.c (copy_archive): Preserve dates of archive members if
- requested.
-
- * readelf.c (dump_relocations): Always print the addend on RELA
- systems even if there is no symbol.
- (process_program_headers): Reset dynamic_size before looping
- through the program headers.
- (process_version_sections): Cast sh_offset to unsigned long for
- printing in case bfd_vma is wider.
- (process_symbol_table): Use get_symbol_index_type when printing
- st_shndx.
-
-1999-05-17 DJ Delorie <dj@cygnus.com>
-
- * windres.c: add verbose option
- (main): process verbose option
- * resrc.c (look_for_default): new. Look for the default
- preprocessor in a given location.
- (read_rc_file): for foo/bar-windres, look for foo/bar-gcc,
- foo/gcc (in case of foo/windres), and then gcc (the old default).
-
-1999-05-16 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c (deduce_name): New function: Deduce name of program to
- run.
- (mcore_elf_out_file): New variable: Name of mcore-elf output file.
- (mcore_elf_linker): New variable: Name of linker to use.
- (mcore_elf_linker_flags): New variable: Linker flags to pass.
- (scan_obj_file): Cache filenames if necessary.
- (usage): Document new command line options.
- (main): Support new command line options: -M (generate an
- mcore-elf output file) -L (name of linker to use) -F (flags to
- pass to linker).
- (mcore_elf_cache_filename): Store a filename in a cache.
- (mcore_elf_gen_out_file): New function: Generate an output file
- per the mcore-elf spec.
-
-1999-05-15 Nick Clifton <nickc@cygnus.com>
-
- * configure.in (BUILD_MISC): Build dlltool for mcore
- * configure: Regenerate.
- * dlltool.c: Update example in comment.
- (DLLTOOL_MCORE): Define.
- (DLLTOOL_MCORE_ELF): Define.
- (DRECTVE_SECTION_NAME): Define.
- (mcore_be_jtab, mcore_le_jtab): Binary for performing an mcore
- jump to address.
- (mtable): Add entries for mcore variants.
- (rvaafter, rvabefore, asm_prefix): Add mcore suppport.
- (scan_drectve_symbols): Use DRECTVE_SECTION_NAME.
- (make_head, make_tail): Cope if file cannot be created.
- (usage): Improve layout.
-
-1999-05-13 DJ Delorie <dj@cygnus.com>
-
- * rclex.l: add code to suppress certain output from cpp, replace
- all returns with MAYBE_RETURN
- (MAYBE_RETURN): new, implement the suppression by returning
- IGNORED_TOKEN as needed.
- (cpp_line): remember which file we're in, mark data from included
- *.h files for suppression.
- * rcparse.y (input): allow IGNORED_TOKEN outside of known constructs
-
-1999-05-10 DJ Delorie <dj@cygnus.com>
-
- * windres.c (quot): Quote shell metacharacters in a string
- (main): quote parameters to cpp that might have metacharacters in
- them. Allow -D as an alias for --define to allow for sharing make
- macros with gcc.
-
- * objdump.c (dump_reloc_set): don't core if howto->name is NULL
-
- * Makefile.am: Give rescoff.c a cpu-specific -D so it can set
- the correct BFD.
- * Makefile.in: ditto
- * rescoff.c (write_coff_file): Set the correct BFD
-
-1999-05-06 Ian Lance Taylor <ian@zembu.com>
-
- * rename.c (smart_rename): Fix test of whether file exists.
-
-1999-05-06 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (disassemble_data): Set display_endian based on target
- endianism.
-
-1999-05-05 Catherine Moore <clm@cygnus.com>
-
- * dlltool.c (interwork): Remove.
- (arm_interwork_jtab): Use bx insn.
- (thumb_jtab): Likewise.
- (MARM_INTERWORK): New machine type.
- (rvaafter): Handle it.
- (rvabefore) Likewise.
- (asm_prefix): Likewise.
- (gen_exp_type): Check machine type instead of
- interwork flag.
- (make_one_lib_file): Likewise.
- (make_head): Likewise.
- (make_tail): Likewise.
- (usage): Update machine types.
- (main): Remove -interwork support.
-
-1999-05-05 Catherine Moore <clm@cygnus.com>
-
- * readelf.c (get_machine_flags): Check for EF_CPU32.
- (get_data_encoding): Fix typo.
-
-1999-04-26 Tom Tromey <tromey@cygnus.com>
-
- * aclocal.m4, configure: Updated for new version of libtool.
-
-1999-04-18 Ian Lance Taylor <ian@zembu.com>
-
- * stabs.c (parse_stab_range_type): Correct parenthesization in
- BFD64 case.
-
- * readelf.c (get_section_type_name): Use correct types in printf
- formats.
- (process_relocs): Likewise.
- (process_dynamic_segment): Likewise.
- (process_symbol_table): Likewise.
- (process_mips_specific): Likewise.
-
-Tue Apr 13 21:22:00 1999 Catherine Moore <clm@cygnus.com>
-
- * dlltool.c (make_one_lib_file): Mark thumb functions as
- C_THUMBEXTFUNC.
-
-1999-04-11 Richard Henderson <rth@cygnus.com>
-
- * bucomm.h (environ): Declare it, if needed.
- (alloca) [C_ALLOCA]: Don't use gcc's builtin or <alloca.h>.
- * configure.in (environ): Detect declaration.
- * nm.c (main): Don't declare environ.
- * configure, config.in: Rebuild.
-
- * dlltool.c (gen_exp_file): Pad out the .reloc section to a
- 32-byte boundary with dummy relocations, to make the BeOS loader
- happy. Patch from Bob Manson <manson@charmed.cygnus.com>.
-
-1999-04-08 Tom Tromey <tromey@cygnus.com>
-
- * binutils.texi (c++filt): Updated for -j/--java, and hp/edg
- formats.
-
-1999-04-08 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Add ability to decode new constants found in April 25
- 1998 Draft of System V ABI spec.
-
-1999-04-06 Ian Lance Taylor <ian@zembu.com>
-
- * bucomm.h (LC_MESSAGES): Never define.
- * addr2line.c (main): Don't pass LC_MESSAGES to setlocale if the
- system does not define it.
- * ar.c (main): Likewise.
- * coffdump.c (main): Likewise.
- * dlltool.c (main): Likewise.
- * nlmconv.c (main): Likewise.
- * nm.c (main): Likewise.
- * objcopy.c (main): Likewise.
- * objdump.c (main): Likewise.
- * size.c (main): Likewise.
- * srconv.c (main): Likewise.
- * strings.c (main): Likewise.
- * sysdump.c (main): Likewise.
- * windres.c (main): Likewise.
- * readelf.c (main): Call locale setting functions.
-
-1999-04-05 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (decode_location_expression): Fix DW_OP_const8{s|u}
- decodes.
-
-1999-04-04 Ian Lance Taylor <ian@zembu.com>
-
- * rename.c: New file, copied out of objcopy.c with a few changes.
- * bucomm.h (set_times, smart_rename): Declare.
- * ar.c: Don't include <utime.h>.
- (extract_file): Call set_times rather than utime.
- (write_archive): Call smart_rename rather than unlink and rename.
- * objcopy.c: Don't include <utime.h>.
- (simple_copy, smart_rename, set_times): Move to rename.c.
- (strip_main): Update smart_rename call for new parameter.
- (copy_main): Likewise.
- * Makefile.am: Rebuild dependencies.
- (CFILES): Add rename.c.
- (objcopy_SOURCES, strip_new_SOURCES): Add rename.c.
- (ar_SOURCES, ranlib_SOURCES): Add rename.c.
- * Makefile.in: Rebuild.
-
- * Makefile.am: Rebuild dependencies.
- (EXTRA_PROGRAMS): Remove backslash which troubles current version
- of automake.
- * Makefile.in: Rebuild.
-
- * dllwrap.c (main): Expect correct type in format string.
- * resres.c: Include "bfd.h", "bucomm.h", "libiberty.h", and
- <time.h>. Don't include <stdio.h> and <errno.h>.
- (write_res_file): Remove unused locals e and i.
- (read_resource_entry): Remove unused locals rtype and n.
- (read_unistring): Remove unused local n.
-
-1999-04-03 Ian Lance Taylor <ian@zembu.com>
-
- * arparse.y: Declare yylex.
- * objdump.c (disassemble_bytes): Initialize bytes. Add comment
- for incorrect use of bytes.
- * readelf.c: Change many formats to avoid warnings.
-
-1999-04-01 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (reset_state_machine): New function. Resets the
- registers of the source line number state machine.
- (process_extended_line_op): Use state machine.
- (display_debug_lines): Use state machine. Handle multiple line
- number blocks within the same section.
-
-1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
-
- * readelf.c (process_extended_line_op): end_sequence also resets
- the line number.
- (display_debug_lines): advance_line takes a signed operand.
- (read_and_display_attr): Print refs as <%x>, addresses as %#x,
- others as %d. Handle other location expression attributes.
- (display_debug_info): Handle nesting. Always print the offset.
-
-1999-03-23 Ian Lance Taylor <ian@zembu.com>
-
- * objcopy.c (filter_symbols): When checking whether to keep a
- symbol, check the BFD section symbol for a symbol with
- BSF_SECTION_SYM set.
-
-1999-03-10 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (process_dynamic_segment): Print new Solaris dynamic
- section entries. Correct printing of DT_POSFLAG_1 and DT_FLAGS_1.
-
-1999-03-10 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (request_dump): New function.
- Removed arbitary limit on the number of sections that can be
- dumped.
-
-Wed Mar 10 15:10:14 1999 Stan Cox <scox@cygnus.com>
-
- * dlltool.c (make_one_lib_file): Use %05d to output the stub name so
- order in the import library is preserved.
-
-1999-02-19 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Fix compile time warings.
-
-1999-02-17 DJ Delorie <dj@cygnus.com>
-
- * resbin.c (res_to_bin_versioninfo): Instead of entering a value
- length of zero in a version info string, enter the appropriate
- length.
-
-Tue Feb 16 16:00:33 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Require autoconf 2.13. Change AM_PROG_INSTALL to
- AC_PROG_INSTALL. Add comments for AC_DEFINE calls.
- * acconfig.h: Remove.
- * aclocal.m4: Rebuild.
- * configure: Rebuild.
- * Makefile.in: Rebuild.
- * config.in: Rebuild.
-
-1999-02-02 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (read_and_display_attr): Add display of basic type
- encodings.
- (display_debug_aranges): New function: Display the contents of a
- .debug_aranges section.
- (display_debug_info): Dump tags found after compunit entry.
-
- * binutils.texi: Fixed bug in readelf documentation.
-
-Mon Feb 1 12:38:01 1999 Catherine Moore <clm@cygnus.com>
-
- * readelf.c (dump_relocations): Handle EM_ARM as REL.
-
-1999-01-29 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (process_symbol_table): Do not produce a histogram of
- bucket chains if none were found.
-
-1999-01-27 Nick Clifton <nickc@cygnus.com>
-
- * version.c: Add 1999 copyright.
-
- * binutils.texi (readelf): Document new command line options
- --debug-dump and --histogram.
-
- * readelf.c: Add ability to display contents of some or all of the
- Dwarf2 debug sections. {Work only partially completed}.
- (display_debug_section): New function.
- (display_debug_info): New function.
- (display_debug_not_supported): New function.
- (display_debug_line): New function.
- (display_debug_abbrev): New function.
- (process_abbrev_section): New function.
- (read_leb128): New function.
- (process_extended_line_op): New function.
- (get_TAG_name): New function.
- (get_AT_name): New function.
- (get_FORM_name): New function.
- (free_abbrevs): New function.
- (add_abbrev): New function.
- (add_abbrev_attr): New function.
- (read_and_display_attr): New function.
- (display_block): New function.
-
-Thu Jan 14 23:36:11 1999 Jeffrey A Law (law@cygnus.com)
-
- * coffdump.c (xcalloc): Remove, in libiberty now.
- * srconv.c (xcalloc): Likewise.
- * sysdump.c (xcalloc): Likewise.
-
-1999-01-14 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (process_section_headers): Omit trailing space at end
- of section header contents line.
-
-Wed Dec 16 17:20:05 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * aclocal.m4: Regenerate.
-
-Mon Dec 14 12:55:36 1998 Jim Wilson <wilson@cygnus.com>
-
- * dllwrap.c: Include bfd.h and bucomm.h. Move getopt.h include
- after libiberty.h include.
-
-Tue Dec 8 16:29:43 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.1: Fix typo (-d to -D). From Nokubi Hirotaka
- <hnokubi@yyy.or.jp>.
-
-Sun Dec 6 13:28:09 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (SFILE): Add size field.
- (objdump_sprintf): Merge both versions into one. Increase buffer
- size as needed to avoid overflow.
- (disassemble_bytes): Change buf from 1000 bytes to 50. Change
- initialization and use of sfile to match changes to
- objdump_sprintf.
-
- * strip.1: Fix typo (-V to -v). From Issei Hirayama
- <iss@mail.wbs.or.jp>.
-
-1998-12-03 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (process_dynamic_segment): Improve output format for
- various DT_* values.
-
-1998-12-02 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (process_mips_specific): Print .conflict section
- content.
-
- * readelf.c (process_mips_specific): Print l_flags in liblist in
- textual form.
-
-1998-11-30 Nick Clifton <nickc@cygnus.com>
-
- * ar.c (extract_file): Add some paranoia checks for negatively
- sized files.
-
-Tue Nov 24 09:39:24 1998 Nick Clifton <nickc@cygnus.com>
-
- * stabs.c (DIR_SEPARATOR): Define as '\\' if WIN32 is defined.
-
-Tue Nov 17 10:25:26 1998 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.in: Regenerate.
-
-Mon Nov 16 19:17:23 1998 Dave Brolley <brolley@cygnus.com>
-
- * po/binutils.pot: Regenerate.
-
-Mon Nov 16 10:18:53 1998 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Regernated dependencies.
- * aclocal.m4: Regenerated.
- * configure: Regenerated.
-
-Sat Nov 14 14:50:56 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * debug.c (debug_name_type): Correct return type from false to
- DEBUG_TYPE_NULL.
-
-Sat Nov 14 14:48:21 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * objdump.c (disassemble_data): Skip over relocs below start
- address.
-
-Tue Nov 10 15:31:52 1998 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Add dependency of readelf.c on elf/fr30.h
- * Makefile.in: Regenerate.
-
-Wed Nov 4 16:25:55 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Add support for the FR30.
-
-Mon Nov 2 14:59:33 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: detect cygwin* instead of cygwin32*
- * configure: regenerate
-
-Fri Oct 30 15:14:49 1998 Geoffrey Noer <noer@cygnus.com>
-
- * dllwrap.c: change all references to cygwin32_ to cygwin_,
- change Cygwin target def to CYGWIN.
-
-Wed Oct 28 10:31:19 1998 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (disassemble_data): Replace 'unsigned long' with
- 'bfd_vma'.
-
-Tue Oct 27 14:39:00 1998 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (disassemble_bytes): Applied this patch from Philip
- Blundell <pb@nexus.co.uk>: Make address variables unsigned to
- avoid problems when disassembling code at high-bit-set addresses.
-
-Mon Oct 26 14:07:59 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dllwrap.c (strhash): New function.
- (main): Use it to supply image base if not supplied by user.
- (program_version): Up to 0.2.4.
-
-Mon Oct 26 14:07:59 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dlltool.c (add_stdcall_alias): New global.
- (long_options): Add --add-stdcall-alias option.
- (main): Handle it.
- (scan_drectve_symbols): Add alias if --add-stdcall-alias is
- specified.
- (scan_filtered_symbols): Likewise.
- (gen_def_file): Output alias for stdcall syms if appropriate.
-
- * binutils.texi (dlltool): Document --add-stdcall-alias option.
-
- * dllwrap.c (long_options): Add --add-stdcall-alias option.
- (main): Handle it.
-
- * defparse.y (opt_name): Allow "." in name.
- * dlltool.c (def_name): Set dll_name from NAME entry in def file.
- (def_library): Set dll_name from LIBRARY entry in def file.
-
-Mon Oct 26 14:07:59 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dllwrap.c (long_options): --implib synonym for --output-lib.
- (main): Pass --export-all to dlltool only if specified.
- (program_version): Up to 0.2.3.
-
-Mon Oct 26 14:07:59 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dllwrap.c (mybasename): New function.
- (main): Run dlltool to create export definition file and import
- library file if necessary.
- Change exp_file_name so that it's based on the dll name.
-
-Sun Oct 25 10:37:45 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dlltool.c (scan_all_symbols): Fix patch error.
-
-Fri Oct 16 22:56:20 1998 Felix Lee <flee@cygnus.com>
-
- * nm.c (display_rel_file): fix "no symbols" messages.
- * objdump.c (slurp_symtab): ditto.
- * po/POTFILES.in, po/binutils.pot: rebuilt
-
-Mon Oct 12 14:28:03 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (dump_relocations): Rename field from Value to Info to
- match name of field in ELF structures.
-
-Thu Oct 8 15:33:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: call AC_EXEEXT instead of AM_EXEEXT and
- AM_CYGWIN32.
- * aclocal.m4: remove local AM_EXEEXT/AM_CYGWIN32 macros.
- * configure: regenerate
-
-Thu Oct 8 15:33:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- From Mumit Khan <khan@xraylith.wisc.edu>:
- * dlltool.c (scan_all_symbols): Don't re-export symbols exported
- by other DLLs.
-
-Thu Oct 8 15:33:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.am (BUILD_DLLWRAP): Add.
- (BUILD_DLLWRAP, DLLWRAP_PROG): Add.
- (bin_PROGRAMS): Add dllwrap.
- * Makefile.in: regenerate with automake
-
- From Mumit Khan <khan@xraylith.wisc.edu>:
- * dllwrap.c: New file from dllhelpers v0.2.1.
- (print_version): New function.
- (long_options): Add --version.
- (main): Handle.
- * dyn-string.h, dyn-string.c: New files from egcs-1.1/gcc.
- * configure.in (BUILD_DLLWRAP): Add.
- * configure: Regenerate.
-
-Tue Oct 6 18:20:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.am (windres_SOURCES): Add resres.c.
- (windres_OBJECTS): Add resres.o.
- * Makefile.in: regenerate with automake
-
- From Anders Norlander <anorland@hem2.passagen.se>.
- * resres.c: New file. Implementation of read_res_file and
- write_res_file functions for windres.
- * rcparse.y: Handle CONTROL's with named classes.
- * resbin.c: Bug in res_to_bin_dialog and bin_to_res_dialog
- when dialog is extended: The version and signature fields should
- be reversed (despite what the docs say). Id is 32 bits long in
- extended dialogs.
- * resrc.c (write_rc_dialog): properly print controls with named
- classes.
- * windres.c (read_res_file, write_res_file): Remove stubs.
- * resres.c (write_res): Rename RT_ACCELERATORS to RT_ACCELERATOR.
-
-Sun Oct 4 20:34:42 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From Nokubi Hirotaka <hnokubi@yyy.or.jp>:
- * objcopy.1: Fix typo in --remove-leading-char docs.
- * objdump.1: Fix formatting in --stabs docs.
-
-Sat Sep 19 23:33:56 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * rcparse.y (memflags_move): Correct recursion.
-
-1998-09-10 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (process_symbol_table): Print in histogram how many
- symbols are covered by the current chain length.
-
-Sun Sep 6 16:15:47 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (process_section_contents): Do not try to dump empty
- sections.
-
-Sat Sep 5 19:17:10 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dlltool.c (scan_all_symbols): Don't re-export symbols exported
- by other DLLs.
-
-1998-09-02 14:50 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (process_dynamic_segment): Print DT_* value only if
- do_dynamic.
- (do_histogram): New variable.
- (options): New long option histogram. Set do_histogram if this
- option is used.
- (usage): Document --histogram.
- (parse_args): Handle 0 return value from getopt_long. Enable
- do_histogram for -a.
- (process_symbol_table): Read hash table also if only do_histogram.
- Add code to print hash table histogram.
-
-1998-08-25 16:45 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (process_dynamic_segment): Read syminfo section if
- available.
- (process_syminfo): New function. Print syminfo information.
- (process_file): Call process_syminfo and free syminfo data at the end.
-
-Wed Aug 19 16:19:51 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.c (usage): Add file parameter. Change all callers.
- (main): Don't treat '?' as a special case in getopt return.
-
- * binutils.texi (dlltool): Document new options. Add some uses of
- @var.
-
-Wed Aug 19 16:19:07 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dlltool.c (gen_def_file): Plug memory leak. Don't print
- demangled name if it is NULL.
-
- Support for exporting all symbols to an output export def file:
- * dlltool.c ({export_all_symbols, no_default_excludes,
- no_default_excludes, excludes}): New file static variables.
- (struct string_list): Type to hold list of symbols to exclude.
- (scan_drectve_symbols): Renamed from scan_open_obj_file.
- (scan_filtered_symbols): New static function.
- (add_excludes): New static function.
- (match_exclude): New static function.
- (set_default_excludes): New static function.
- (filter_symbols): New static function.
- (scan_all_symbols): New static function.
- (scan_open_obj_file): New static function.
- (usage): Document new options.
- (long_options): Add new options.
- (main): Handle new options.
-
-1998-07-31 21:24 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (process_program_headers): Print p_offset value with
- six hex digits.
- (dynamic_segment_mips_val): Add support for DT_MIPS_FLAGS,
- DT_MIPS_IVERSION, and DT_MIPS_TIME_STAMP.
- (process_mips_specific): Also print seconds of time stamp.
-
-Fri Jul 31 10:04:23 1998 Catherine Moore <clm@cygnus.com>
-
- * readelf.c (dump_relocations): EM_ARM uses rela relocs.
-
-1998-07-30 16:25 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (get_dynamic_type): Don't used gettext on the names.
- Add new DT_* values from Solaris. Don't print nuemric value in
- case of an unknown entry.
- (process_dynamic_segment): Handle new DT_* entries. Print numeric
- values in decimal, not hex.
-
-Fri Jul 24 16:28:57 1998 Jeff Holcomb <jeffh@cygnus.com>
-
- * readelf.c (get_dynamic_type): Remove empty default from switch
- statement.
-
-Fri Jul 24 16:28:12 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (install-exec-local): Don't remove the file before
- checking whether $(bindir) == $(tooldir)/bin. From Maciej
- W. Rozycki <macro@ds2.pg.gda.pl>.
- * Makefile.in: Rebuild.
-
-Fri Jul 24 09:38:59 1998 Nick Clifton <nickc@cygnus.com>
-
- * objcopy.c: Removed spurious inclusion of elf/internal.h and
- elf-bfd.h.
-
-1998-07-22 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c: Consistantly use elf_ prefix for *_reloc_type
- functions.
-
-Wed Jul 22 16:29:12 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (dump_relocations): Add dumps of HPPA and ARC
- relocations.
-
- (process_relocs): Do not abort if no string table can be found.
-
-1998-07-22 14:58 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c: Remove definition of functions to return relocation
- symbol strings. They now get implicitly defined when include the
- system specific ELF header.
-
-1998-07-22 13:51 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c: Before include system specific ELF header define
- START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS. For now
- used for ppc, mips, and mn10300.
-
-Wed Jul 22 10:26:32 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (dump_relocations): Display number of unrecognised
- relocations.
-
-1998-07-21 13:13 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c: Use symbolic names of relocation entries for the various
- architectures. Correct more layout details.
- Print names of MIPS specific section types. Print Alpha, ARM, and
- MIPS relocation type names.
-
-1998-07-20 Vladimir N. Makarov <vmakarov@cygnus.com>
-
- * objcopy.c (filter_symbols): Add code for strip all symbols case.
- (copy_objects): Strip all case is now processed also through
- filter_symbols. No marking symbols used in relocations when strip
- all symbols case.
- (copy_section): When strip all symbols case, remove relocations
- which are not in keep strip specific list.
- (strip_main): Remove guard `strip_specific_list == NULL' for
- setting up strip all symbols by default.
-
-Mon Jul 20 12:51:16 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * addr2line.c (find_address_in_section): Only consider a section
- if the pc value is completely contained within it.
- (translate_addresses): Don't crash if functionname or filename are
- null.
-
-1998-07-20 07:45 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c (process_symbol_table): Fix little alignment problem
- in printed table header.
-
-1998-07-20 07:14 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c: Correct reading of .dynamic section.
- (dynamic_section): Now a global variable.
- (process_mips_fpe_exception, process_mips_specific,
- process_arch_specific): New functions.
- (get_file_header): Call process_arch_specific.
-
-1998-07-19 15:15 Ulrich Drepper <drepper@cygnus.com>
-
- * readelf.c: Fix several versioning related bugs. Produce nicer
- output.
- Add support for processor specific information on MIPS.
-
-Fri Jul 10 15:57:58 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Switch prototypes from unsigned short to unsigned
- int.
-
-Fri Jul 10 16:17:50 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From Christian Holland <CHolland@de.lucent.com>:
- * ieee.c (parse_ieee): Initialize info.global_vars and
- info.global_types.
- (parse_ieee_atn): Ignore register lifetime information reportedly
- emitted by MRI compiler.
-
-Thu Jul 9 13:08:01 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (MAINTAINERCLEANFILES): Define.
- * Makefile.in: Rebuild.
-
-Tue Jul 7 21:48:54 1998 Jeffrey A Law (law@cygnus.com)
-
- * readelf.c (byte_get): Use PARAMS in prototype.
- (error): Make it work with non-ANSI compilers.
- (warn): Likewise.
- (get_ver_flags): Don't use an ANSI prototype in the definition.
-
-Tue Jul 7 13:26:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (filter_bytes): Set size correctly if the size of the
- section is not an even multiple of the interleave. Based on patch
- from Brion Stone <Brion.Stone@attws.com>.
-
-Thu Jul 2 14:01:34 1998 Klaus Kaempf <kkaempf@rmi.de>
-
- * configure.com: Add vax/vms support.
- * makefile.vms-in: Renamed from makefile.vms. Add substitutions
- now done by configure.com.
-
-Wed Jul 1 20:43:52 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (parse_stab_range_type): Handle 4 and 8 byte signed
- integers with real upper bounds. Handle a lower bound one larger
- than the upper bound as a signed integer. Handle 8 byte signed
- integers.
- (stab_demangle_template): Optionally return the demangled name of
- the template.
- (stab_demangle_qualified): Treat a template name as a tagged
- type.
- (stab_demangle_fund_type): Likewise.
-
-Wed Jul 1 16:29:50 1998 Nick Clifton <nickc@cygnus.com>
-
- * objcopy.c: Minor formatting improvements.
- * readelf.c: Minor output formatting improvement.
-
-Wed Jul 1 14:23:48 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * rclex.l: Add casts and change types to avoid warnings.
- * rcparse.y: Likewise.
- * resbin.c: Likewise.
- * rescoff.c: Likewise.
- * resrc.c: Likewise.
-
- * Makefile.am: Rebuild dependencies.
- (HFILES): Remove readelf.h.
- * Makefile.in: Rebuild.
-
- Based on patches from Andrew Kozin
- <Andrew.Kozin@p14.f960.n5020.z2.fidonet.org>:
- * winduni.h: New file, from windres.h.
- * winduni.c: New file, from windres.c.
- * windres.c: Move Unicode functions into winduni.c.
- * windres.h: Move Unicode declarations into winduni.h. Include
- winduni.h.
- (RT_ACCELERATOR): Rename from RT_ACCELERATORS to match Windows
- macro. Change all uses.
- (RT_PLUGPLAY, RT_VXD): Correct values.
- * Makefile.am (HFILES): Add windres.h.
- (CFILES): Add winduni.c.
- (windres_SOURCES): Add winduni.c.
-
-Mon Jun 29 17:01:21 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Use BFD Internal and External Elf structures.
- * readelf.h: Removed - no longer needed.
- * Makefile.in: Remove readelf.c's dependency upon readelf.h.
-
-1998-06-26 Vladimir N. Makarov <vmakarov@cygnus.com>
-
- * objcopy.c (strip_main): keep_specific_list == NULL as additional
- condition to set up strip all symbols by default.
- (copy_archive): don't change archive when error in object files of
- the archive.
-
-Wed Jun 24 17:53:47 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (parse_number): Sign extend negative values correctly if
- bfd_vma is larger than unsigned long.
-
-Tue Jun 23 14:55:05 1998 Mike Stump <mrs@wrs.com>
-
- * Makefile.am (install-exec-local): Don't let EXEEXT interfere
- with the program transform name.
- * Makefile.in: Rebuild.
-
-Tue Jun 23 11:08:53 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Rewrite to use fopen/fread ratehr than mmap.
-
- Add --section-headers command line switch, which is an alias for
- --sections.
-
- Incorporate improvemnts made by Andreas Schwab
- <schwab@issan.informatik.uni-dortmund.de> including output
- formatting and version info display.
-
- * binutils.texi: Document --section-headers switch to readelf.
-
-Mon Jun 22 18:28:19 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * readelf.c: Include bfd.h and bucomm.h before system header
- files.
- (parse_args): Change type of c from char to int.
-
-Sun Jun 14 14:26:28 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c (usage): Write to stdout, not stderr.
-
-Fri Jun 12 13:33:51 1998 Tom Tromey <tromey@cygnus.com>
-
- * po/Make-in (all-yes): Depend on .pot file if maintainer mode
- enabled.
- ($(PACKAGE).pot): Unconditionally depend on POTFILES.
-
-Fri Jun 12 16:06:15 1998 Michael Meissner <meissner@cygnus.com>
-
- * readelf.c (get_ppc_rel_type): New PowerPC support.
- (dump_relocations): PowerPC uses RELA relocations.
- (get_machine_name): Spell PowerPC correctly.
- (get_file_type): Change unsigned short parameter to unsigned.
- (get_machine_name): Ditto.
- (get_machine_data): Return whether big endian or little endian.
- (get_machine_flags): Interpret PowerPC, M32R, and MIPS flags.
- (process_elf_header): Print endian-ess. Convert all numeric
- formats to long or unsigned long. Print out machine specific flag
- bits.
- (process_section_headers): Increase name by 3 columns and decrease
- type by the same so that .gcc_except_table fits in the space.
-
- * readelf.h: Include elf/ppc.h, elf/mips.h, and elf/m32r.h to get
- machine specific flag bits.
-
-Thu Jun 11 17:54:26 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: Remove extraneous #includes. Fix warnings produced
- by -Wall when compiling under Linux.
-
- * Makefile.am (readelf_LDADD): Add $(LIBIBERTY).
-
-Thu Jun 11 18:30:20 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (struct stab_handle): Add self_crossref field.
- (parse_stab_string): If a tag is a cross reference to itself,
- don't define it in the tags list.
- (parse_stab_type): Set info->self_crossref.
-
- * debug.c (struct debug_type_real_list): Define.
- (debug_get_real_type): Add list parameter. Change all callers.
- Check for circularity to avoid crashing when it occurs.
-
-Thu Jun 11 14:48:32 1998 Nick Clifton <nickc@cygnus.com>
-
- * readelf.c: New file: Display contents of ELF format file.
- * readelf.h: New file: Header file for readelf.c
- * Makefile.am: Add rules to build readelf.
- * Makefile.in: Rebuilt.
- * binutils.texi: Document readelf.
- * NEWS: Mention inclusion of readelf into binutils.
- * po/POTFILES.in; Rebuilt.
-
-Fri Jun 5 18:43:40 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (setup_section): Adjust the section size if copy_byte
- is >= 0.
- (copy_section): Do not call bfd_set_section_size.
-
-Thu Jun 4 09:12:27 1998 Nick Clifton <nickc@cygnus.com>
-
- * objcopy.c (copy_usage): Add missing \n\ from help description.
-
-Wed Jun 3 19:31:33 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (YACC): Correct bison -L option.
- * Makefile.in: Rebuild.
-
- * binutils.texi, objdump.1: Document -p/--private-headers.
-
-Wed Jun 3 12:09:40 1998 Nick Clifton <nickc@cygnus.com>
-
- * objcopy.c: Add new command line options: --change-section-lma
- and --change-section-vma. Rename old command line option
- --adjust-section-vma to --change-section-address. Rename
- --adjust-vma to --change-addresses and --adjust-start to
- --change-start. Provide aliases to support the old versions of
- these command line options.
-
- Change the names of macros and enum elements to upper case to
- match the GNU coding standard.
-
- Replace calls to fprintf (stderr,...) with calls to fatal () or
- non_fatal () as appropriate.
-
- * objcopy.1: Document command line option changes.
- * binutils.texi: Document command line option changes.
-
- * bucomm.h: New exported funtion from bucomm.c: non_fatal().
- * bucomm.c (non_fatal): New exported function. Just like fatal()
- except that it returns rather than calling xexit().
-
- (bfd_check_format_matches): Call fatal() rather than bfd_fatal().
-
- (check_matching_formats): Fix C formating.
-
- (parse_vma): Call fatal().
-
-Mon Jun 1 18:26:40 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From Yuli Barcohen <yuli.barcohen@telrad.co.il>:
- * debug.c (debug_type_samep): Avoid endless loops comparing
- function and method parameter types.
-
-Fri May 22 14:02:42 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.c (dump_iat): Comment out; not used.
- (display): Rename from tell. Change all callers.
-
-Thu May 14 14:00:56 1998 Nick Clifton <nickc@cygnus.com>
-
- * dlltool.c: Add support for Thumb DLLs. Add support for
- interworking between ARM and Thumb programs and DLLs. Tidy the
- code.
-
- * binutils.texi: Document dlltool.
-
- * configure: Build dlltool for thumb-pe targets.
-
- * version.c (print_version): Include 1998 in copyright strings.
-
- * stabs.c (parse_stab): Support Win32 style directory separators.
-
-Sun May 10 22:34:44 1998 Jeffrey A Law (law@cygnus.com)
-
- * po/Make-in (install-info): New target.
-
-Fri May 8 10:33:13 1998 Nick Clifton <nickc@cygnus.com>
-
- * ar.c (usage): Extend information provided about command line
- options.
-
-Wed May 6 15:28:51 1998 Klaus Kaempf <kkaempf@progis.de>
-
- * makefile.vms: Run dec c with /nodebug. Pass CC value when
- calling make.
-
-Tue May 5 15:19:00 1998 Nick Clifton <nickc@cygnus.com>
-
- * configure: Build dlltool for thumb-pe target.
- * configure.in: Build dlltool for thumb-pe target.
-
-Sun May 3 22:04:49 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (EXTRA_PROGRAMS): Change $(SRCONV_PROG) to sysconf
- sysdump coffdump to avoid extra $(EXEEXT).
- * Makefile.in: Rebuild.
-
-Wed Apr 29 22:22:55 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: Stop appending EXEEXT to the end of
- SRCONV_PROG (wrong because that variable may contain multiple
- programs)
- * Makefile.am: instead, add EXEEXTs to each SRCONV_PROG
- program
- * Makefile.in: regenerate
- * configure: regenerate
-
-Tue Apr 28 19:14:34 1998 Tom Tromey <tromey@cygnus.com>
-
- * addr2line.c (main): Conditionally call setlocale.
- * windres.c (main): Likewise.
- * sysdump.c (main): Likewise.
- * strings.c (main): Likewise.
- * srconv.c (main): Likewise.
- * size.c (main): Likewise.
- * objdump.c (main): Likewise.
- * objcopy.c (main): Likewise.
- * nm.c (main): Likewise.
- * nlmconv.c (main): Likewise.
- * dlltool.c (main): Likewise.
- * coffdump.c (main): Likewise.
- * ar.c (main): Likewise.
- * bucomm.h: Include <locale.h> if HAVE_LOCALE_H.
- (LC_MESSAGES): Now can be defined even when ENABLE_NLS.
-
-Tue Apr 28 10:33:07 1998 Bill Moyer <ttk@cygnus.com>
-
- Add support for IMPORTS:
- * defparse.y (impline): Add IMPORTS syntaxes.
- * dlltool.c (ifunctype, iheadtype): New typedefs.
- (import_list): New static variable.
- (append_import): New static function.
- (def_import): Add an entry to import_list.
- (generate_idata_ofile): New static function.
- (gen_exp_file): Call generate_idata_ofile.
- * dlltool.h (def_import): Update declaration.
-
-Mon Apr 27 16:39:22 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Change version number to 2.9.4
- * configure: Rebuild.
-
-Wed Apr 22 16:00:35 1998 Tom Tromey <tromey@cygnus.com>
-
- * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
-
-Wed Apr 22 00:33:56 1998 Tom Tromey <tromey@scribbles.cygnus.com>
-
- * Makefile.am (INCLUDES): Search intl dirs for headers; define
- LOCALEDIR.
- * addr2line.c (main): Call setlocale, bindtextdomain, textdomain.
- * ar.c (main): Likewise.
- * coffdump.c (main): Likewise.
- * dlltool.c (main): Likewise.
- * nlmconv.c (main): Likewise.
- * nm.c (main): Likewise.
- * objcopy.c (main): Likewise.
- * objdump.c (main): Likewise.
- * size.c (main): Likewise.
- * srconv.c (main): Likewise.
- * strings.c (main): Likewise.
- * sysdump.c (main): Likewise.
- * windres.c (main): Likewise.
-
-Tue Apr 21 22:13:08 1998 Tom Tromey <tromey@scribbles.cygnus.com>
-
- * Many files: Added gettext invocations around user-visible
- strings.
- * bucomm.h: Added gettext-related includes and defines.
- * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
- HAVE_LC_MESSAGES): Define.
- * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
- po/Makefile. Use AM_PROG_LEX.
- * Makefile.am (SUBDIRS): New macro.
- (POTFILES): Likewise.
- (po/POTFILES.in): New target.
- (LDADD): Added INTLLIBS.
- (objdump_LDADD): Likewise.
- (c__filt_LDADD): Likewise.
- (ar_LDADD): Likewise.
- (ranlib_LDADD): Likewise.
- (dlltool_LDADD): Likewise.
- (windres_LDADD): Likewise.
- * po/Make-in, po/POTFILES.in, po/binutils.pot: New files.
-
-Tue Apr 21 16:07:18 1998 Stanislav Brabec <utx@k332.feld.cvut.cz>
-
- * objcopy.c (preserve_dates): New file static variable.
- (smart_rename): If preserve_dates, call set_times when copying.
- (strip_main): Remove preserve_dates local variable.
- (copy_main): Likewise.
-
-Tue Apr 7 15:41:15 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (DISTSTUFF): Add defparse.h, defparse.c, rclex.c,
- rcparse.h, and rcparse.c
- * Makefile.in: Rebuild.
-
-Mon Apr 6 16:24:35 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (PROGS): Move $(ADDR2LINE_PROG) to end, so that
- Makefile.in doesn't have an empty continuation line.
- (bin_PROGRAMS): Likewise.
- * Makefile.in: Rebuild.
-
-Fri Apr 3 14:48:42 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (DISTCLEANFILES): Add site.exp and site.bak.
- (MOSTLYCLEANFILES): Add binutils.log, binutils.sum, and abcdefgh*.
- (mostlyclean-local): New target.
- * Makefile.in: Rebuild.
-
-Wed Apr 1 15:54:16 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From Zack Weinberg <zack@rabi.phys.columbia.edu> and H.J. Lu
- <hjl@gnu.org>:
- * ar.c (usage): Mention S modifier.
- (main): Add S modifier.
- * ar.1, binutils.texi: Document S modifier.
-
-Wed Apr 1 13:11:23 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * binutils.texi: Use @itemx for a secondary item in a table.
-
-Tue Mar 31 18:44:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * dep-in.sed: Add rule to remove @OBJDIR@.
- * Makefile.am (dep.sed): Substitute for @OBJDIR@.
- * Makefile.in: Rebuild.
-
-Mon Mar 30 12:47:18 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Set version to 2.9.1.
- * configure: Rebuild.
-
- * Branched binutils 2.9.
-
- * Makefile.am (DISTCLEANFILES): Remove defparse.h, arparse.h,
- rcparse.h, and nlmheader.h.
- * Makefile.in: Rebuild.
-
-Sat Mar 28 17:39:27 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (MOSTLYCLEANFILES): Define.
- * Makefile.in: Rebuild.
-
- Fix some gcc -Wall warnings:
- * nlmconv.c (main): Add casts to avoid warnings.
- (alpha_mangle_relocs): Likewise.
- * objdump.c (dump_section_stabs): Likewise.
- * size.c (print_sysv_format): Likewise.
- * srcconv.c (wr_ob): Likewise.
- * wrstabs.c (stab_modify_type): Likewise.
- (stab_variable): Likewise.
- * nlmconv.c (main): Initialize variables to avoid warnings.
- * nm.c (sort_symbols_by_size): Likewise.
- * objdump.c (disassemble_bytes): Likewise.
- * wrstabs.c (stab_end_class_type): Likewise.
- * coffgrok.c (do_sections_p2): Change j to unsigned int.
- (do_lines): Change l to unsigned int.
- * nlmheader.y (yylex): Change i to unsigned int.
- * nm.c (print_symbol): Change j to long.
- * size.c (lprint_number): Comment out.
- * srconv.c (wr_ob): Change i to bfd_size_type.
- * sysdump.c (unit_info_list): Comment out.
- (object_body_list, program_structure, debug_list): Likewise.
- * sysinfo.y (yyerror): Return value.
-
-Thu Mar 26 17:06:51 1998 Richard Henderson <rth@cygnus.com>
-
- * defparse.y (explist): Allow epsilon.
- Suggestion from Jonathan-Harris@psion.com.
-
-Thu Mar 26 16:59:09 1998 Richard Henderson <rth@cygnus.com>
-
- * coffgrok.c (do_sections_p1): Use the section's lma instead of vma
- for the benefit of prom loaders.
-
-Wed Mar 25 13:05:39 1998 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * Makefile.am (DISTSTUFF): New variable.
- (diststuff): New target.
- (DISTCLEANFILES): New variable.
- * Makefile.in: Rebuild.
-
-Tue Mar 24 19:33:08 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * rclex.l: Accept { and } as synonyms for BEGIN and END.
-
-Fri Mar 20 19:18:08 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4, configure: Rebuild with libtool 1.2.
-
-Tue Feb 24 13:07:50 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * objdump.c (disassemble_data): Delete "++place" after call to
- find_symbol_for_address. Set disasm_info.symbols to array of
- symbols at the current address.
-
-Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com>
-
- * Makefile.am (install-exec-local): Install properly when ln
- fails or tooldir == prefix.
-
-Tue Feb 17 18:40:55 1998 Richard Henderson <rth@cygnus.com>
-
- * objcopy.c (compare_section_lma): Rename from _vma.
- (copy_object): Gap fill based on LMA not VMA.
- * binutils.texi: Update and clarify.
- * objcopy.1: Likewise.
-
-Tue Feb 17 20:34:11 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.c (gen_exp_file): Generate _imp__%s as well as __imp_%s,
- for Microsoft compatibility.
- (make_one_lib_file): Likewise.
-
- * dlltool.c (make_one_lib_file): Don't add 1 to hint.
-
-Fri Feb 13 16:37:44 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (AUTOMAKE_OPTIONS): Define.
- * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
-
-Thu Feb 12 14:13:46 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * deflex.l: Accept '?' in symbol names, for VC++ mangled names.
- From Mikey <jeffdb@netzone.com>.
-
- * addr2line.c (usage): Update bug-gnu-utils address.
- * ar.c (usage): Likewise.
- * nlmconv.c (show_usage): Likewise.
- * nm.c (usage): Likewise.
- * objcopy.c (copy_usage): Likewise.
- (strip_usage): Likewise.
- * objdump.c (usage): Likewise.
- * size.c (usage): Likewise.
- * strings.c (usage): Likewise.
- * windres.c (usage): Likewise.
- * binutils.texi (Bug Reporting): Likewise.
-
-Sat Feb 7 15:36:24 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure, aclocal.m4: Rebuild with new libtool.
-
-Thu Feb 5 12:21:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
-
-Fri Jan 30 19:16:28 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * Makefile.am (CC_FOR_TARGET,nlmcomv.o): Change program_transform_name
- to transform.
- * Makefile.in: Regenerate.
-
-Thu Jan 29 16:24:04 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dlltool.c: Define exit status macros for _WIN32 but not
- __CYGWIN32__.
- (gen_lib_file): Check for exit status of unlink.
- * resrc.c: Define popen and pclose if _WIN32 but not
- __CYGWIN32__.
-
-Wed Jan 28 17:45:46 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Remove vfork check.
- * nlmconv.c: Never include vfork.h.
- * aclocal.m4, configure, Makefile.in, config.in: Rebuild.
-
-Wed Jan 28 17:43:02 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
-
- * objcopy.c (copy_archive): Only pass one argument to mkdir if
- _WIN32 but not __CYGWIN32__.
- (smart_rename): Add code for _WIN32 (not __CYGWIN32__), to cope
- with different rename behaviour and lack of chown.
-
- * configure.in: Check for mingw32 when deciding whether to build
- dlltool.
- * dlltool.c: Never include vfork.h.
- (run): Use pexecute rather than vfork.
- (gen_lib_file): Check for errors from bfd_set_archive_head and
- bfd_close. Close all the BFDs in the archive before deleting the
- temporary files.
-
-Thu Jan 22 16:22:55 1998 Fred Fish <fnf@cygnus.com>
-
- * objdump.c (disassemble_bytes): Add flag INSN_HAS_RELOC to tell
- disassembly function there is a reloc on this line.
-
-Wed Jan 14 15:29:43 1998 Richard Henderson <rth@cygnus.com>
-
- * srconv.c (sh, h8300): Delete variables.
- (addrsize, toolname, rnames): New variables.
- (writeINT): Use addrsize.
- (wr_un): Use toolname.
- (wr_hd): Set up addrsize et al properly for h8300[hs].
- (walk_tree_symbol): Zero dsy. Use rnames.
- (wr_un, wr_hd, wr_ob, wr_du): Use proper bfd access macros.
- * sysdump.c (sh, h8300): Delete variables.
- (addrsize): New variable.
- (getINT): Use it.
- (getone): Initialize it.
- (getBITS): Range check on MAX.
-
-Mon Dec 29 16:58:05 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Matthew Bellantoni <matthew@chrysalis.com>:
- * ar.c (get_pos_bfd): Add default_posname parameter. Change all
- callers.
- (replace_members): Default to replacing in the same position.
-
-Mon Dec 22 11:27:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * rclex.l: Don't permit a comma in a STRING.
- * rcparse.y (acc_entry): Warn if an inappropriate modifier is used
- with a non VIRTKEY.
- (acc_event): For a control character, set VIRTKEY, and force the
- character to uppercase.
- (acc_options): Don't require a comma separator.
-
-Tue Dec 9 13:25:42 1997 Michael Meissner <meissner@cygnus.com>
-
- * size.c (size_number): New function to provide size of field.
- ({l,r}print_number): For octal and hex fields, print field using
- '0' and '0x' suffixes. Do not include following tab.
- (sysv_internal_sizer): Size section name, section size, and vma
- address fields.
- (sysv_internal_printer): Use calculated sizes for the columns.
- (print_sysv_format): Size columns before printing.
- (print_berkeley_format): Print tabs between numbers now that
- {l,r}print_number doesn't. Print fields right justified.
-
-Mon Dec 8 11:22:04 1997 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (objdump_print_addr_with_sym): Remove call to
- disasm_symaddr() as this function no longer exists.
-
-Tue Dec 2 10:23:50 1997 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (objdump_print_addr_with_sym): Call disasm_symaddr()
- to allow backend to know which symbol has just been displayed.
-
-Tue Dec 2 13:06:46 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * windres.h (ESCAPE_*): Define standard escape sequences.
- * rclex.l (handle_quotes): Handle standard escape sequences. Warn
- about an unrecognized escape character.
- * windres.c (unicode_print): Print standard escape sequences.
- * rcparse.y (acc_event): Initialize $$.next.
- * resbin.c (bin_to_res_menuitems): Don't set MENUITEM_POPUP or
- MENUITEM_ENDMENU in the menu item flags.
- (bin_to_res_accelerators): Allocate a structure (the old code
- never worked).
- (res_to_bin_accelerator): Correct the test for setting ACC_LAST.
- (res_to_bin_dialog): Save the extended style rather than saving
- the style twice. Remove useless shadowing length variable. Set
- the length of control data correctly.
- * resrc.c (write_rc_dialog): Don't print the class or menu if the
- string length is zero.
-
-Mon Nov 24 18:52:43 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * stabs.c (parse_stab_argtypes): Don't try to parse the name of a
- destructor as mangled argument types.
-
-Mon Nov 10 17:51:41 1997 Gavin Koch <gavin@cygnus.com>
-
- * addr2line.c (translate_addresses): Use bfd_scan_vma rather
- than strtol to scan addresses.
-
-Sun Nov 9 11:01:31 1997 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.am (bin_PROGRAMS): Don't use line continuations here.
-
-Tue Nov 4 11:56:14 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (copy_section): Don't crash if there is no particular
- information for a section.
-
-Mon Nov 3 12:36:19 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (parse_flags): Make flag check case insensitive.
- Check for `contents' flag. Give an error for unrecognized flags.
- (copy_section): If the contents flag was set for a section that
- had no contents, zero out the new contents.
- * binutils.texi (objcopy): Document contents section flag.
-
-Sun Nov 2 14:49:56 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c: Move new struct and variable definitions to top of
- file. Remove obsolete add_strip_symbol and is_strip_symbol
- declarations. Add prototype declarations for add_specific_symbol
- and is_specified_symbol.
-
-Mon Oct 20 15:31:43 1997 Klaus K"ampf <kkaempf@progis.de>
-
- * configure.com (HAVE_SBRK): Undefine.
-
-Tue Oct 14 16:14:35 1997 Nick Clifton <nickc@cygnus.com>
-
- * objdump.c (objdump_symbol_at_address): New function. Returns
- true if a symbol can be found at the address passed in.
- (disassemble_data): Set the symbol_at_address_func field to point
- to objdump_symbol_at_address.
-
-Fri Oct 10 14:13:09 1997 Richard Henderson <rth@cygnus.com>
-
- * objcopy.c, objcopy.1, binutils.texi: "localize" is a better name
- than "privatize". Update all references.
-
-Thu Oct 9 15:57:29 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * binutils.texi (strip): Remove duplicate --target. From Marty
- Leisner <leisner@sdsp.mc.xerox.com>.
-
- * nm.c (lineno_cache_bfd): New file static variable.
- (lineno_cache_rel_bfd): New file static variable.
- (display_archive): Clear lineno_cache_bfd and lineno_cache_rel_bfd
- when closing a BFD.
- (display_file): Likewise.
- (print_symbol): Use lineno_cache_bfd and lineno_cache_rel_bfd
- instead of cache_bfd and cache_rel_bfd. Make seccount static, and
- only set it when setting relocs.
-
-Wed Oct 8 21:19:11 1997 Richard Henderson <rth@cygnus.com>
-
- * objcopy.c (keep_specific_list, privatize_specific_list,
- weaken_specific_list): New variables.
- (keep_symbols): Removed.
- (add_specific_symbol): New function from the carcas of
- add_strip_symbol. Takes a list as an argument.
- (is_specified_symbol): Likewise from is_strip_symbol.
- (filter_symbols): Honor the new privatize and weaken lists.
- Optimize bfd_asymbol_name handling.
- (copy_object, copy_options, copy_usage): Add privatize-symbol &
- weaken-symbol options.
-
- * objcopy.1, binutils.texi: Update docs.
-
-Sun Oct 5 09:05:44 1997 Frank Ch. Eigler <fche@cygnus.com>
-
- * objdump.c (disassemble_data): Make "--prefix-addresses"
- disassembly adjust to mixed-length instructions.
- (objdump_print_addr_with_sym): Add "0x" prefix for hexadecimal
- symbol-offsets in disassembly.
-
-Fri Oct 3 12:04:25 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (set_times): New static function, replacing
- make_same_dates.
- (strip_main): If preserve_dates, stat the input file before
- copying it, and call set_times afterward.
- (copy_main): Likewise.
-
- * wrstabs.c (write_stabs_in_sections_debugging_info): Cast p to
- char * when calling strcpy and strlen.
-
-Wed Sep 24 11:34:05 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * binutils.texi (ar cmdline): Document that q now works like r.
- From Marty Leisner <leisner@sdsp.mc.xerox.com>.
-
- * binutils.texi (size): The object file argument is optional.
- From Marty Leisner <leisner@sdsp.mc.xerox.com>.
-
- * aclocal.m4: Rebuild with new libtool.
- * configure: Rebuild.
-
-Tue Aug 26 17:48:34 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (EXEEXT_FOR_BUILD): New variable. Use it in all
- references to the sysinfo program.
- * configure.in: Rebuild with new bfd/acinclude.m4.
- * Makefile.in: Rebuild.
-
-Fri Aug 8 15:32:49 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * windres.c: Include <time.h>.
- (define_resource): Set a timestamp for the resource.
-
-Wed Aug 6 13:37:58 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Define TARGET in header file.
- * acconfig.h (TARGET): Add #undef.
- * Makefile.am (version.o, bucomm.o): Remove special targets.
- * bucomm.c (target): Remove.
- * nm.c (program_name): Don't declare.
- (target): Make static.
- * size.c (target): Make static.
- * configure, config.in, Makefile.in: Rebuild.
-
-Tue Aug 5 00:01:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (check-DEJAGNU): Export r.
- (.dep1): Use $(INCLUDES) rather than $(ALL_CFLAGS).
- * Makefile.in: Rebuild.
-
- * nlmheader.y: Use VERSIONK rather than VERSION.
-
- * Makefile.am (STRIP_PROG): Change from strip.new to strip-new.
- (NM_PROG): Change from nm.new to nm-new.
- (TOOL_PROGS, install-exec-local): Adjust accordingly.
- * Makefile.in: Rebuild.
-
-Mon Aug 4 11:47:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Remove AC_ARG_PROGRAM; it's invoked by
- AM_INIT_AUTOMAKE.
- * configure: Rebuild.
-
- * Makefile.am (install-exec-local): Create $(tooldir)/bin before
- trying to install anything into it.
- * Makefile.in: Rebuild.
-
- * Makefile.am (TOOL_PROGS): Use an explicit $(EXEEXT).
- (install-exec-local): When handling $(noinst_PROGRAMS), only use
- $(EXEEXT) on the installed file. When handling $(TOOL_PROGS),
- handle $(EXEEXT) correctly.
- * configure.in: Add an explicit $(EXEEXT) when substituting for
- the name of a program to build.
- * Makefile.in, configure: Rebuild.
-
- * aclocal.m4, configure, Makefile.in: Rebuild with new automake
- patches.
-
- * deflex.l, defparse.y: Use VERSIONK rather than VERSION.
- * rclex.l, rcparse.y: Likewise.
- * Makefile.am (windres_SOURCES): Add $(BULIBS).
- * Makefile.in: Rebuild.
-
-Fri Aug 1 13:08:39 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * acinclude.m4: Include bfd/acinclude.m4, not bfd/acmacros.m4.
- * aclocal.m4, configure: Rebuild with new libtool.
-
-Thu Jul 31 11:51:35 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am: New file, based on old Makefile.in.
- * acinclude.m4: New file, from old aclocal.m4.
- * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
- shared library handling; now handled by libtool. Replace
- AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
- AC_PROG_LEX, AC_DECL_YYTEST, AM_MAINTAINER_MODE, AM_CYGWIN32, and
- AM_EXEEXT. Replace AC_PROG_INSTALL with AM_PROG_INSTALL. Remove
- stamp-h handling in AC_OUTPUT.
- * acconfig.h: Mention PACKAGE and VERSION.
- * stamp-h.in: New file.
- * Makefile.in: Now built with automake.
- * aclocal.m4: Now built with aclocal.
- * config.in, configure: Rebuild.
-
- From Ton van Overbeek <tvoverbe@wk.estec.esa.nl>:
- * rcparse.y (dialog): Default menu and class to be named.
- (styles): If FONT is seen, set DS_SETFONT in dialog style.
- * resbin.c (res_to_bin_dialog): Correct computation of font
- information length.
-
-Wed Jul 30 11:21:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Ton van Overbeek <tvoverbe@wk.estec.esa.nl>:
- * resbin.c (res_to_bin_menu): Correct computation of menu
- vs. menuex length.
- * resrc.c (define_stringtable): Add 1 to resource ID.
-
-Tue Jul 29 11:06:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * resbin.c (bin_to_res_string): Correct adjustment of data and
- length. From Ton van Overbeek <tvoverbe@wk.estec.esa.nl>.
-
-Tue Jul 22 18:01:23 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * nlmconv.c (link_inputs): Call libiberty pexecute function.
- (pexecute) [multiple versions]: Remove.
-
-Tue Jul 22 16:19:34 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
-
- * bucomm.c (make_tempname): If we might be using a DOS filesystem,
- check for a backslash as well as a slash.
-
-Thu Jun 26 13:53:17 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * windres.c (main): Quit if we didn't get any resources.
- (usage): Fix --yydebug usage message.
- * rescoff.c (write_coff_file): Don't free the relocation array
- until after we've closed the BFD.
- (read_coff_rsrc): Quit rather than try to read standard input.
- (write_coff_file): Quit rather than try to write to standard
- output.
- * rcparse.y: Add a couple of missing semicolons (accepted by bison
- but not byacc).
- * binutils.texi: Document windres.
-
-Wed Jun 25 20:57:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * resbin.c: New file.
- * rclex.l, rcparse.y, rescoff.c, resrc.c, windres.c, windres.h:
- Numerous fixes and improvements.
- * Makefile.in: Rebuild dependencies.
- (CFILES): Add resbin.c.
- (WINDRES_OBJS): Add resbin.o.
-
-Sun Jun 22 17:29:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- First stab at Windows resource compiler:
- * windres.h: New file.
- * windres.c: New file.
- * resrc.c: New file.
- * rcparse.y: New file.
- * rclex.l: New file.
- * rescoff.c: New file.
- * configure.in: Define and substitute BUILD_WINDRES.
- * configure: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (WINDRES_PROG): New variable.
- (PROGS): Add @BUILD_WINDRES@.
- (HFILES): Add dlltool.h and windres.h.
- (CFILES): Add windres.c and resrc.c.
- (GENERATED_CFILES): Add rcparse.c and rclex.c.
- (WINDRES_OBJS): New variable.
- $(WINDRES_PROG): New target.
- (rcparse.c, rcparse.h, rclex.c): New targets.
-
-Thu Jun 12 12:27:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.c (export_type): Add data field.
- (def_exports): Add data parameter. Change all callers.
- (dump_def_info): Print data field.
- (gen_def_file): Likewise.
- (make_one_lib_file): Handle data field by not emitting simple
- label and not emitting anything in SEC_TEXT.
- (dtab): Print data field.
- (process_duplicates): Merge data field.
- * dlltool.h (def_exports): Update declaration.
- * defparse.y (expline): Accept opt_DATA. Pass it to def_exports.
- (opt_DATA): New non-terminal.
-
-Wed Jun 11 17:15:47 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.h: New file.
- * deflex.l: Include dlltool.h and libiberty.h. Don't declare
- strdup. Use xstrdup rather than strdup.
- * defparse.y: Include bfd.h, bucomm.h, and dlltool.h.
- * dlltool.c: Include dlltool.h and time.h. Make a lot of
- variables and functions static. Make a lot of char * variables
- and parameters const. Add declarations for static functions. Do
- some reindenting. Hide more PowerPC stuff inside DLLTOOL_PPC.
-
-Wed Jun 11 12:05:52 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * ar.c (bfd_special_undocumented_glue): Add const.
-
-Mon May 12 22:09:35 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * Makefile.in (check): Pass CC_FOR_TARGET and CFLAGS_FOR_TARGET
- to runtest.
-
-Mon May 12 13:14:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Don't clear OPCODES when --enable-commonbfdlib is
- used on HP/UX.
- * configure: Rebuild.
-
-Fri Apr 25 14:22:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * Makefile.in (maintainer-clean realclean): Change *.info*
- to binutils.info* to save sysroff.info.
-
-Tue Apr 15 13:42:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (INSTALL): Set to @INSTALL@.
- (INSTALL_XFORM, INSTALL_XFORM1): Remove.
- (install): Depend upon installdirs. Use $(program_transform_name)
- directly, rather than using $(INSTALL_XFORM) and
- $(INSTALL_XFORM1).
- (installdirs): New target.
- (install-info): Run mkinstalldirs.
-
-Mon Apr 14 11:52:39 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (INSTALL): Change install.sh to install-sh.
-
- From Thomas Graichen <graichen@rzpd.de>:
- * Makefile.in: Always use $(SHELL) when running move-if-change.
- * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
- * configure: Rebuild.
-
-Fri Apr 4 13:28:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add AC_FUNC_ALLOCA.
- * configure, config.in: Rebuild.
- * bucomm.h: Add alloca handling, copied from gas/as.h.
- * dlltool.c: Add #pragma alloca for AIX to start of file.
- * nlmconv.c: Likewise.
-
- * Makefile.in (distclean): Remove site.exp and site.bak. Remove
- everything that clean removes.
-
-Thu Apr 3 13:18:39 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (VERSION): Set to 2.8.1.
-
- * Branched binutils 2.8.
-
-Tue Apr 1 16:21:44 1997 Klaus Kaempf <kkaempf@progis.de>
-
- * configure.com: New file.
- * config.h-vms: Remove file.
- * makefile.vms: Update for new configure scheme.
-
-Mon Mar 31 15:30:43 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * objcopy.c (make_same_dates): Use statbuf, not buf, if not
- HAVE_GOOD_UTIME_H.
-
-Fri Mar 28 17:57:53 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * Makefile.in ($(OBJDUMP_PROG)): Don't link against BFDLIB twice.
- * configure.in: Add AC_ARG_ENABLE for commonbfdlib. If it is set,
- set OPCODES to empty.
- * configure: Rebuild.
-
-Thu Mar 27 16:03:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patch from Marty Leisner <leisner@sdsp.mc.xerox.com>:
- * objcopy.c: Include <utime.h> or <sys/time.h>.
- (strip_options): Add "preserve-dates".
- (copy_options): Likewise.
- (copy_usage): Mention -p and --preserve-dates.
- (strip_usage): Likewise.
- (make_same_dates): New static function.
- (strip_main): Handle -p.
- (copy_main): Likewise.
- * binutils.texi, strip.1, objcopy.1: Document new option.
-
- addr2line.c contributed by Ulrich Lauther
- <Ulrich.Lauther@zfe.siemens.de>:
- * addr2line.c: New file.
- * Makefile.in: Rebuild dependencies.
- (ADDR2LINE_PROG): New variable.
- (MANPAGES): Add addr2line.
- (PROGS): Add $(ADDR2LINE_PROG).
- (CFILES): Add addr2line.c.
- ($(ADDR2LINE_PROG)): New target.
- * binutils.texi: Document addr2line.
- * addr2line.1: New file.
-
- * version.c (print_version): Update copyright date.
-
-Mon Mar 24 10:52:45 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * objdump.c (disassemble_data): Don't exit if a file cannot be
- disassembled, instead just return.
-
-Thu Mar 20 21:16:51 1997 Jeffrey A Law (law@cygnus.com)
-
- * size.c (usage): Make definition match its prototype.
- (display_bfd, lprint_number, rprint_number): Likewise.
- (print_berkeley_format, sysv_internal_printer): Likewise.
- (print_sysv_format): Likewise.
- * nm.c (set_print_radix, set_output_format): Likewise.
- * objcopy.c (filter_bytes): Likewise.
-
-Tue Mar 18 16:39:55 1997 H.J. Lu <hjl@lucon.org>
-
- * Many files: Add function prototypes.
- * ar.c (mri_emul, get_pos_bfd): Make static.
- * arlex.l: Include "libiberty.h". Don't declare strdup. Use
- xstrdup rather than strdup.
- * arparse.y (yyerror): Make argument const. Correct typo.
- * arsup.c (strdup): Don't declare.
- (ar_save): Use xstrdup rather than strdup.
- * filemode.c: Include "bucomm.h".
- * nm.c (usage): Make static.
- (print_symname): Make format and name const.
- * objcopy.c (cat): Remove.
- (copy_archive): Make output_target const. Use concat, not cat.
- (copy_file, simple_copy, smart_rename): Make arguments const.
- * objdump.c (read_section_stabs): Likewise.
- (print_section_stabs): Likewise.
- (display_target_tables): Don't declare getenv.
- * strings.c (strings_object_file): Change file to const.
- (print_strings): Change filename to const.
- * Makefile.in: Rebuild dependencies.
-
-Tue Mar 18 11:37:24 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add BFD_NEED_DECLARATION(getenv).
- * acconfig.h: Add NEED_DECLARATION_GETENV.
- * bucomm.h (getenv): Declare if NEED_DECLARATION_GETENV.
- * configure, config.in: Rebuild.
- * nlmconv.c (getenv): Don't declare.
-
- * Makefile.in: Rebuild dependencies.
-
-Sat Mar 15 15:35:56 1997 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patches from Jamie Lokier <jamie@rebellion.co.uk>:
- * objdump.c: Include "demangle.h".
- (do_demangle): New static variable.
- (usage): Mention -C/--demangle.
- (long_options): Add "demangle".
- (objdump_print_symname): New static function.
- (objdump_print_addr_with_sym): Use objdump_print_symname.
- (disassemble_bytes): Likewise.
- (dump_reloc_set): Likewise.
- (dump_symbols): Demangle symbol name.
- (main): Handle -C.
- * binutils.texi, objdump.1: Document -C/--demangle.
-
- * objdump.c (usage): Mention --no-show-raw-insn.
- (long_options): Add "no-show-raw-insn".
- (disassemble_bytes): Handle --no-show-raw-insn.
- * binutils.texi, objdump.1: Document --no-show-raw-insn.
-
-Wed Mar 12 11:42:00 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * rddbg.c (free_saved_stabs): Set the strings to NULL after being
- freed.
-
-Fri Feb 28 17:18:45 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * bucomm.c (set_default_bfd_target): New function.
- * bucomm.h (set_default_bfd_target): Declare.
- * ar.c (main): Call set_default_bfd_target.
- * nlmconv.c (main): Likewise.
- * nm.c (main): Likewise.
- * objcopy.c (main): Likewise.
- * objdump.c (main): Likewise.
- * size.c (main): Likewise.
- * strings.c (main): Likewise.
- * Makefile.in (bucomm.o): New target, to define TARGET.
-
-Tue Feb 25 21:28:38 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (adjust_section_vma): New static variable.
- (usage): Mention --adjust-section-vma.
- (OPTION_ADJUST_VMA): Define.
- (long_options): Add "addjust-vma".
- (display_bfd): If adjust_section_vma is not 0, add it to all the
- section addresses.
- (main): Handle OPTION_ADJUST_VMA.
- * binutils.texi, objdump.1: Document --adjust-vma.
-
-Fri Feb 14 18:46:47 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * nm.c (print_symbol): Cache the BFD as well as the symbols and
- relocs, and don't try to use the symbols or relocs with a
- different BFD.
-
-Thu Feb 13 21:34:43 1997 Klaus Kaempf (kkaempf@progis.de)
-
- * config.h-vms: sbrk() is provided on openVMS/Alpha.
- * makefile.vms: allow compiling with current gcc snapshot.
-
-Thu Feb 13 20:14:40 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * arsup.c, coffgrok.c, dlltool.c, nlmconv.c: Use xmalloc rather
- than malloc.
-
-Wed Feb 12 16:12:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (disassemble_data): Correct VMA argument to
- find_symbol_for_address. Improve handling of code with no symbol
- followed by code with a symbol.
-
-Wed Feb 12 12:16:47 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * objdump.c (disassemble_bytes): Make output of raw instructions
- work better for non-standard values of bytes_per_chunk and
- bytes_per_line.
-
-Thu Feb 6 14:14:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * objdump.c (disassemble_bytes): Added code to allow some control
- over the way raw instructions are displayed.
-
-Thu Feb 6 12:36:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (struct bincl_file): Add next_stack field.
- (push_bincl): Put the new file on both bincl_list and
- bincl_stack. Clear the file_types field.
- (pop_bincl): Use the next_stack field when popping the stack.
- Don't put the file on bincl_list.
- (find_excl): Include the file name when warning about an unfound
- N_EXCL.
-
- * debug.c (debug_type_samep): Don't crash if we are passed NULL.
-
-Thu Feb 6 11:54:24 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * objcopy.1: Add missing space after .B.
-
-Fri Jan 31 10:33:07 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * objdump.c (disassemble_data): Initialize `aux.require_sec'.
-
-Wed Jan 29 13:21:21 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (objdump_print_value): Add skip_zeroes parameter.
- Change all callers.
- (objdump_print_addr_with_sym): Likewise. Call objdump_print_value
- to print address.
- (objdump_print_addr): New static function.
- (objdump_print_address): Just call objdump_print_addr.
- (disassemble_bytes): Print real address, not function offset.
- Skip a certain number of leading zeroes.
-
- * objdump.c (disassemble_zeroes): New static variable.
- (usage): Mention --disassemble-zeroes.
- (long_options): Add "disassemble-zeroes".
- (disassemble_bytes): Check disassemble_zeroes.
-
-Tue Jan 28 16:47:26 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (disassemble_bytes): Don't skip zeroes if the
- disassembler has told us that we are in a branch delay slot.
-
-Mon Jan 20 14:24:04 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * size.c (berkeley_sum): Rewrite. Skip sections which are not
- SEC_ALLOC. Count SEC_READONLY sections as text.
-
-Tue Jan 14 15:14:14 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (maintainer-clean realclean): Remove *.info*, not
- just *.info. From H.J. Lu <hjl@lucon.org>.
-
-Tue Dec 31 15:42:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
-
-Fri Dec 27 11:19:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Work around bug in AC_FUNC_VFORK in autoconf 2.12.
- * configure: Rebuild.
-
-Thu Dec 19 13:11:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patch from Andrew J Klossner <andrew@pogo.wv.tek.com>:
- * objcopy.c (OPTION_WEAKEN): Define.
- (copy_options): Add "weaken".
- (copy_usage): Mention --weaken.
- (weaken): New static variable.
- (filter_symbols): Handle weaken.
- (copy_object): Call filter_symbols if weaken.
- (copy_main): Handle OPTION_WEAKEN.
- * binutils.texi, objcopy.1: Document --weaken.
-
-Wed Dec 18 22:49:13 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Use NewFolderRecursive for installation.
-
-Sat Dec 7 10:17:25 1996 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.in (install): Add "else true" clause to cater to
- broken "make" on some systems.
-
-Fri Dec 6 17:21:41 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (parse_ieee_bb): Always initialize namcopy to avoid gcc
- warning about uninitialized variable.
- (ieee_read_cxx_class): Likewise, for pf.
- (ieee_enum_type): Likewise, for i.
-
-Tue Nov 26 17:01:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * wrstabs.c (stab_array_type): Add casts when printing
- bfd_signed_vma values.
-
- * configure: Rebuild with autoconf 2.12.
-
-Mon Nov 25 16:53:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (disassemble_data): Don't crash if there is no
- symbol.
-
-Fri Nov 22 17:29:14 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * ar.c (open_inarch): Don't call bfd_openr with a null name.
-
-Fri Nov 1 12:08:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * binutils.texi: Add section on reporting bugs.
-
-Thu Oct 31 18:20:53 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (struct stab_handle): Add bincl_list field.
- (parse_stab): Pass value to push_bincl. Call find_excl for
- N_EXCL.
- (struct bincl_file): Add hash, file and file_types fields.
- (push_bincl): Add hash parameter. Save it in the new hash field.
- Save the file number in the new file field.
- (pop_bincl): Put the bincl_file on bincl_list, rather than freeing
- it. Save the file types in the new file_types field.
- (find_excl): New static function.
-
- * ieee.c (ieee_lineno): Don't compare line number addresses to
- info->highaddr (undo part of October 28 patch).
-
-Tue Oct 29 16:40:22 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (objdump_print_value): Don't print the empty string
- for zero.
-
-Mon Oct 28 16:58:14 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (struct stab_handle): Add function_end field.
- (start_stab): Initialize function_end.
- (finish_stab): Pass info->function_end to debug_end_function.
- (parse_stab): If info->function_end is set, use it as the address
- which ends a function.
-
- * ieee.c (ieee_array_type): Remember the correct size.
-
- * ieee.c (ieee_finish_compilation_unit): Permit coalescing ranges
- that are up to 0x1000 bytes apart, not just 64.
- (ieee_add_bb11_blocks): Don't bother to emit a BB11 that is less
- than 0x100 bytes.
- (ieee_lineno): Only emit line numbers that are less than
- info->highaddr.
-
-Fri Oct 25 12:12:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (struct ieee_defined_enum): Add defined field.
- (ieee_enum_type): If the enum tag has been seen before but not
- defined, reuse the same type index, and define it.
- (ieee_tag_type): If this enum has not been defined, add an
- undefined entry to the list of enums.
-
- * objdump.c (disassemble_bytes): Let the disassembler override the
- number of bytes printed on a line.
-
-Thu Oct 24 16:42:10 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (prefix_addresses): New static variable.
- (long_options): Add "prefix-addresses".
- (compare_symbols): Sort BSF_FUNCTION symbols before other
- symbols.
- (find_symbol_for_address): New static function, broken out of
- objdump_print_address.
- (objdump_print_addr_with_sym): New static function, broken out of
- objdump_print_address.
- (objdump_print_address): Call new functions.
- (disassemble_bytes): New static function, broken out of
- disassemble_data. Change disassembly format, unless
- prefix_addresses is set.
- (disassemble_data): Call disassemble_bytes. Unless
- prefix_addresses is set, disassemble in chunks headed by a
- symbol.
- * binutils.texi, objdump.1: Document --prefix-addresses.
-
- * rddbg.c (read_section_stabs_debugging_info): Preserve the
- backslash when concatenating multiple stabs strings.
-
-Thu Oct 10 11:36:31 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * dlltool.c (scan_open_obj_file): Fix loop exit test.
- Add missing parameter to def_exports.
-
-Tue Oct 8 12:06:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (LEX_OPTIONS): Set to empty string. -I -Cem is the
- default for flex, and is not recognized by lex.
-
-Thu Oct 3 17:41:23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * binutils.texi (Target Selection): Document that you can now
- specify targets using configuration triplets.
-
- * ar.c (usage): Declare. Make sure all callers pass an argument.
-
-Thu Oct 3 15:39:42 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (clean): Remove config.log.
-
-Wed Oct 2 15:49:16 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * makefile.vms: Bump version date.
-
-Tue Oct 1 15:00:59 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * version.c (print_version): New function.
- * bucomm.h (print_version): Declare.
- * ar.c (program_version): Don't declare.
- (do_show_version): Remove.
- (usage): Add help parameter. Print bug report address.
- (main): Set is_ranlib at start. Check for --help and --version.
- Call print_version, not do_show_version.
- * nlmconv.c (program_version): Don't declare.
- (main): Call print_version.
- (show_usage): Print bug report address.
- * nm.c (program_version, print_version): Don't declare.
- (usage): Print bug report address.
- (main): Call print_version.
- * objcopy.c (program_version): Don't declare.
- (copy_usage): Print bug report address.
- (strip_usage): Likewise.
- (strip_main): Call print_version.
- (copy_main): Likewise.
- * objdump.c (program_version): Don't declare.
- (usage): Print bug report address.
- (main): Call print_version.
- * size.c (program_version): Don't declare.
- (usage): Print bug report address.
- (main): Call print_version.
- * strings.c (program_version): Don't declare.
- (main): Call print_version.
- (usage): Print bug report address.
- * Makefile.in: Update dependencies.
-
-Thu Sep 19 14:53:15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c: Revert Monday's reflocalp patch, and apply this patch
- instead:
- (write_ieee_debugging_info): Write a dummy type at the end of the
- global type block.
-
-Mon Sep 16 15:30:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (struct ieee_write_type): Add reflocalp field.
- (ieee_pointer_type): Set reflocalp after pushing type.
- (ieee_function_type): If reflocalp is set, make this type local.
- (ieee_range_type, ieee_array_type, ieee_set_type): Likewise.
- (ieee_const_type, ieee_volatile_type): Likewise.
- (ieee_struct_field, ieee_class_baseclass): Likewise.
-
- * ieee.c (struct ieee_info): Add global_types field.
- (parse_ieee_bb): When starting a BB1, initialize the types field
- to the global_types field.
- (parse_ieee_be): When ending a BB2, copy the types field to the
- global_types field.
-
-Fri Sep 13 17:32:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (change_leading_char): New static variable.
- (OPTION_CHANGE_LEADING_CHAR): Define.
- (copy_options): Add "change-leading-char".
- (copy_usage): Mention --change-leading-char.
- (filter_symbols): Add obfd parameter. Change all callers.
- Implement change_leading_char.
- (copy_object): Call filter_symbols if change_leading_char.
- (copy_main): Handle OPTION_CHANGE_LEADING_CHAR.
- * binutils.texi, objcopy.1: Document --change-leading-char.
-
-Tue Sep 3 14:05:29 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (ieee_enum_type): Don't check index into a NULL names
- array.
- * nm.c (sort_symbols_by_size): Always initialize next.
- * rdcoff.c (parse_coff_type): Warn about an incomprehensible
- type rather than crashing.
- * rddbg.c (read_symbol_stabs_debugging_info): Initialize f.
- * stabs.c (parse_stab_members): Set context in all cases.
-
-Thu Aug 29 16:56:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
- * configure: Regenerate.
-
-Thu Aug 29 11:29:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (L_tmpnam): Never define.
- (display_target_list): Use choose_temp_base instead of tmpnam.
- (display_info_table): Likewise.
-
-Tue Aug 27 18:15:01 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (parse_stab): An N_FUN symbol with an empty string
- indicates the end of a function.
-
-Thu Aug 22 17:08:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * wrstabs.c (struct string_hash_entry): Add next field.
- (struct stab_write_handle): Change strings to a pointer to
- string_hash_entry. Add last_strings field. Remove strings_alloc
- field.
- (string_hash_newfunc): Initialize next field.
- (stab_write_symbol): Copy string into hash table rather than into
- buffer. Keep a list of hash table entries.
- (write_stabs_in_sections_debugging_info): Initialize last_string.
- Copy strings from list of hash table entries in memory.
- (stab_modify_type): If the entry on the stack is a definition,
- make a new definition rather than failing an assert.
- (stab_array_type): The size is only zero if high is strictly less
- than low.
-
- * ieee.c (struct ieee_info): Add saw_filename field.
- (parse_ieee): Initialize saw_filename.
- (parse_ieee_bb): Set saw_filename for a BB1 or BB2. In a BB1,
- discard the current variables and types. In a BB10, if no
- filename has been seen, call debug_set_filename.
- (parse_ieee_ty): In case 'g', the type is optional.
-
- * prdbg.c (pr_fix_visibility): Don't abort on
- DEBUG_VISIBILITY_IGNORE.
-
- * debug.c (debug_name_type): Correct error message.
-
- * configure.in: Substitute HLDENV.
- * configure: Rebuild.
- * Makefile.in (HLDENV): New variable. Use it whenever linking a
- program.
-
-Thu Aug 15 19:30:41 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Add symbolic doublequotes around the version
- number.
-
-Thu Aug 8 12:27:52 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * makefile.vms: Add better support for DEC C compilation.
- Add new macros as in Makefile.in.
-
-Wed Aug 7 14:27:33 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * configure.in: Call BFD_NEED_DECLARATION on strstr and sbrk.
- * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
- (NEED_DECLARATION_SBRK): New macro.
- * configure, config.in: Rebuild.
- * bucomm.h (strstr): Declare if NEED_DECLARATION_STRSTR.
- (sbrk): Declare if HAVE_SBRK and NEED_DECLARATION_SBRK.
-
- * prdbg.c (pr_end_struct_type): Avoid using a string constant in
- assert, for the benefit of broken assert macros.
-
-Fri Jul 26 14:06:50 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (disassemble_data): Set disasm_info.flavour from
- abfd.
-
-Tue Jul 23 13:59:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.c (secdata): In non DLLTOOL_PPC case, change alignment
- of .text section to 2.
-
-Mon Jul 22 08:46:15 1996 Stu Grossman (grossman@lisa.cygnus.com)
-
- * objdump.c (dump_section_stabs): Fix test for stabs sections
- ending with numbers. This fixes a problem with .stab being
- confused with .stab.index.
-
-Wed Jul 10 13:32:28 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (stab_demangle_fund_type): Return a void * for a
- template, rather than simply aborting.
-
-Mon Jul 8 15:28:05 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ar.c (open_inarch): Add file parameter. Change all callers. If
- this is a newly created archive, set the target based on the
- file.
- * arsup.h (open_inarch): Update declaration.
-
-Thu Jul 4 12:00:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (VERSION): Set to cygnus-2.7.1.
-
- * Released binutils 2.7.
-
- * rdcoff.c (parse_coff): Get address to pass to debug_end_function
- from function size, not value of .ef symbol. From Ning
- Mosberger-Tang <ning@AZStarNet.com>.
-
-Sat Jun 29 21:18:09 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (strip_main): Add -o option, and handle it.
- (strip_usage): Mention -o.
- * binutils.texi, strip.1: Mention -o.
-
-Mon Jun 24 17:19:02 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
- INSTALL_PROGRAM, INSTALL_DATA): Use autoconf set values.
- (docdir): Removed.
- * configure.in (AC_PREREQ): Autoconf 2.5 or higher.
-
-Mon Jun 24 11:59:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (endian): New static variable.
- (usage): Mention -EB/-EL/--endian.
- (long_options): Add "endian".
- (disassemble_data): If endianness was specified, replace
- abfd->xvec with a copy of itself with the given endianness.
- (main): Handle -EB/-EL/--endian.
- * binutils.texi, objdump.1: Mention -EB/-EL/--endian.
-
- * objdump.c: Make most variables and functions static.
-
- * configure.in: On alpha*-*-osf*, link against libbfd.a if not
- using shared libraries.
- * configure: Rebuild with autoconf 2.10.
-
-Sun Jun 23 14:47:36 1996 Kim Knuttila <krk@cygnus.com>
-
- * dlltool.c (secdata): Changed .rdata to .reldata so .reloc will work.
- (make_one_lib_file): Removed cruft. (#if 1)
-
-Wed Jun 19 14:46:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (stabs): Change from struct internal_nlist * to
- bfd_byte *.
- (print_section_stabs): Fetch stabs information directly, rather
- than assuming that struct internal_nlist is the right size.
-
- * binutils.texi: Document change to binary format: file position
- based on load address, not section VMA.
-
- * bucomm.h: Define SEEK_SET, SEEK_CUR, and SEEK_END if they are
- not already defined.
-
-Tue Jun 18 18:25:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (DISTSTUFF): Add deflex.c.
-
-Tue Jun 18 15:03:44 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * config.h-vms, makefile.vms: New files.
-
-Mon Jun 17 09:47:31 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.c (make_one_lib_file): Use BFD_RELOC_RVA rather than
- BFD_RELOC_32 in IDATA7.
-
-Wed Jun 12 11:52:06 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * nm.c (struct get_relocs_info): Define.
- (line_numbers): New static variable.
- (long_options): Add "line-numbers".
- (usage): Mention -l and --line-numbers.
- (main): Handle -l.
- (print_symbol): Print line numbers if requested.
- (get_relocs): New static function.
- * binutils.texi, nm.1: Document -l/--line-numbers.
-
-Tue Jun 11 20:12:15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (dump_reloc_set): Add sec parameter. Change all
- callers. If with_line_numbers is set, display line numbers of
- relocation entries.
- * binutils.texi, objdump.1: Document -l with -r.
-
-Mon Jun 10 23:42:59 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ar.c (open_inarch): Report BFD error message if an archive can
- not be recognized. List matching formats if the file is
- ambiguously recognized.
- (ranlib_touch): Likewise.
-
-Thu Jun 6 13:56:14 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * README: Add notes on how to build if you don't have ar.
-
- * Makefile.in: Remove old incorrect setting of CC.
-
-Tue Jun 4 10:52:49 1996 Tom Tromey <tromey@csk3.cygnus.com>
-
- * Makefile.in (install): Don't check to see if tooldir exists.
- Make $(tooldir) and $(tooldir)/bin.
-
-Mon Jun 3 17:40:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * strings.c (main): Make main an int function, not void.
-
-Fri May 31 13:59:24 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * nm.c (filter_symbols): Check for BSF_WEAK as well as
- BSF_GLOBAL.
- * objcopy.c (filter_symbols): Likewise.
-
-Wed May 8 16:57:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (copy_object): Make clear that it is only a warning
- when the output file can not represent the architecture.
-
-Fri May 3 11:30:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (disassemble_data): Don't refer to bytes past the end
- of data.
-
-Wed Apr 24 14:10:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * rddbg.c (read_symbol_stabs_debugging_info): Move call to
- free_saved_stabs outside the loop over the symbols.
-
-Tue Apr 23 12:56:11 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (compare_symbols): Sort symbols whose names start with
- `.' after other symbols. If no other decision can be made, sort
- symbols by name.
-
-Thu Apr 18 16:02:11 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * dep-in.sed: Substitute $(BFDDIR) for @BFDDIR@.
- * Makefile.in: Rebuild dependencies.
- (dep.sed): Substitute $(BFDDIR) for @BFDDIR@.
-
-Tue Apr 16 13:50:22 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * rdcoff.c: New file.
- * rddbg.c (read_debugging_info): Read COFF symbols if COFF flavour
- and no stabs were found.
- * budbg.h (parse_coff): Declare.
- * Makefile.in: Rebuild dependencies.
- (CFILES): Add rdcoff.c.
- (DEBUG_OBJS): Add rdcoff.o.
-
-Mon Apr 15 15:55:01 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * nlmconv.c (choose_temp_base{,_try}): Delete, in libiberty now.
- (link_inputs): Update call to choose_temp_base.
-
-Mon Apr 8 14:40:05 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Permit --enable-shared to specify a list of
- directories.
- * configure: Rebuild.
-
-Fri Mar 29 16:11:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (dump_section_header): Print the SEC_LINK_ONCE flag
- and the SEC_LINK_DUPLICATES field.
-
-Fri Mar 29 11:35:55 1996 J.T. Conklin (jtc@lisa.cygnus.com)
-
- * nlmconv.1: Changed to be recognized by catman -w on Solaris.
-
-Thu Mar 28 14:17:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * wrstabs.c (stab_enum_type): Set buf before using it.
-
-Fri Mar 22 15:49:08 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (struct stab_handle): Add field abfd.
- (start_stab): Add abfd parameter.
- (parse_stab_string): Skip the symbol leading char when searching
- for the value of a global symbol.
- * budbg.h (start_stab): Update declaration.
- * rddbg.c (read_section_stabs_debugging_info): Pass abfd to
- start_stab.
- (read_symbol_stabs_debugging_info): Likewise.
-
-Thu Mar 21 12:40:48 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * wrstabs.c (stab_function_type): Output an empty typedef for an
- unused argument, rather than making up a meaningless name.
- (stab_variable): Use N_RSYM for a DEBUG_REGISTER variable.
-
- * ieee.c (struct ieee_info): Add global_vars field.
- (parse_ieee_be): When ending the global typedef block, copy the
- variables into info->global_vars.
- (parse_ieee_atn): Don't require an NN record for a pmisc ATN.
- (ieee_read_reference): Search the global variables after the local
- variables.
-
-Wed Mar 20 18:08:19 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * objdump.c (disassemble_data): Make sure sym_name is always set.
- (dump_section_header): Always put a space after the section name.
- (dump_bfd_header): Terminate output with newline.
-
-Wed Mar 20 16:35:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * wrstabs.c: New file.
- * budbg.h (write_stabs_in_sections_debugging_info): Declare.
- * objcopy.c (write_debugging_info): For COFF or ELF, output stabs
- in sections.
- * Makefile.in: Rebuild dependencies.
- (CFILES): Add wrstabs.c.
- (WRITE_DEBUG_OBJS): New variable.
- ($(OBJCOPY_PROG)): Use $(WRITE_DEBUG_OBJS), not $(DEBUG_OBJS).
- ($(STRIP_PROG)): Likewise.
-
- * stabs.c (parse_stab_members): Make type stub detection more like
- gdb.
-
- * ieee.c (struct ieee_handle): Add fields complex_float_index and
- complex_double_index.
- (ieee_complex_type): Cache type index in complex_float_index and
- complex_double_index, depending upon size. Set size on type stack
- to size * 2.
-
- * ieee.c (ieee_empty_type): Use builtin_unknown, not 0.
- (ieee_void_type): Use builtin_void, not 1.
-
- * ieee.c (parse_ieee_ty): Handle 'V' type code.
- (parse_ieee_atn): Don't require two numbers for type 10.
-
- * ieee.c (parse_ieee_be): Add one to offset at end of function or
- block.
-
- * ieee.c (struct ieee_block): Add field skip.
- (parse_ieee_bb): Don't call debug_record_function for __XRYCPP
- function, and set skip field.
- (parse_ieee_be): Don't call debug_end_function if skip is set.
-
- * debug.c (struct debug_handle): Add fields current_write_lineno
- and current_write_lineno_index.
- (debug_write): Initialize current_write_lineno and
- current_write_lineno_index for each unit. Call
- debug_write_linenos rather than writing out the line numbers
- directly.
- (debug_write_function): Call debug_write_linenos.
- (debug_write_block): Likewise.
- (debug_write_linenos): New static function.
-
- * debug.c (debug_write_type): For DEBUG_KIND_FUNCTION, push return
- type before arguments.
-
-Mon Mar 18 18:05:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add AC_FUNC_VFORK.
- * configure, config.in: Rebuild.
- * dlltool.c, nlmconv.c: Include <vfork.h> if HAVE_VFORK_H is
- defined.
-
- * stabs.c (parse_stab_range_type): A complex type is defined as a
- subrange of itself with the high bound zero.
- * ieee.c (ieee_complex_type): Don't crash on sizes of 12 or 16.
-
-Tue Mar 12 12:09:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (ieee_write_undefined_tag): Switch to global_types even
- if it is not empty.
- (ieee_tag_type): For an enum, look through info->enums.
-
- * configure: Rebuild with autoconf 2.8.
-
- * debug.c (debug_type_samep): Don't loop endlessly in
- DEBUG_KIND_ENUM case. From Eric Baur <ecb@nexen.com>.
-
-Mon Mar 11 12:35:03 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * rddbg.c (read_section_stabs_debugging_info): Call save_stab for
- each stab entry, call stab_context on an error, and call
- free_saved_stabs before rturning.
- (read_symbol_stabs_debugging_info): Likewise.
- (SAVE_STABS_COUNT): Define.
- (struct saved_stab): Define.
- (saved_stabs, saved_stabs_index): New static variables.
- (save_stab, stab_context, free_saved_stabs): New static functios.
-
- * objdump.c (stab_name): Remove.
- (struct stab_print): Remove.
- (stab_print): Remove.
- (dump_stabs): Don't initialize stab_name.
- (print_section_stabs): Call bfd_get_stab_name rather than using
- the stab_name array.
-
-Tue Feb 27 19:52:01 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * prdbg.c (pr_int_constant): Initialize info correctly.
- (pr_float_constant): Likewise.
-
-Mon Feb 26 18:11:37 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Update to handle shared library support.
-
-Sat Feb 24 11:21:49 1996 Alan Modra <alan@spri.levels.unisa.edu.au>:
-
- * Makefile.in ($(OBJDUMP_PROG)): Search $(BFDLIB) before
- $(OPCODES).
-
-Thu Feb 15 12:44:45 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Don't tamper with LDFLAGS. Call AC_PROG_CC before
- configure.host.
- * configure: Rebuild.
-
- * configure.in: Substitute RPATH_ENVVAR.
- * configure: Rebuild.
- * Makefile.in (RPATH_ENVVAR): New variable.
- (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
-
- * objcopy.c (smart_rename): Rather than doing chmod then chown, do
- chmod without setuid, then chown, then chmod with setuid.
-
-Wed Feb 14 16:46:42 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
-
- * arsup.c (map_over_list): Reindent. Don't assume that the
- function does not delete the BFD.
- (ar_addlib_doer): Don't set prev->next if prev is NULL.
-
-Wed Feb 14 15:12:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (ieee_regno_to_genreg): Convert register numbers for m68k
- and i960.
- (ieee_genreg_to_regno): Likewise.
-
-Mon Feb 12 14:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c: Extensive changes to write code to put types in the
- global type block when possible, to output ranges for all memory
- occupied by the module, and to improve efficiency.
-
- * debug.c (struct debug_handle): Remove class_mark field. Add
- id_list and compare_list fields.
- (struct debug_class_id): Define.
- (struct debug_type_compare_list): Define.
- (debug_write): Initialize info->id_list
- (debug_write_name): Remove reference to info->class_mark.
- (debug_write_type): Get id for all structs and classes. Simplify
- test for whether struct has already been written.
- (debug_write_class_type): Get id for all classes. Simplify test
- for whether class has already been written.
- (debug_write_block): Don't write out blocks other than the top
- level block if they have no local variables.
- (debug_set_class_id): New static function.
- (debug_type_samep): New static function.
- (debug_class_type_samep): New static function.
- * prdbg.c (pr_start_struct_type): Always print id.
- (pr_start_class_type): Likewise.
- (pr_tag_type): Likewise.
-
- * stabs.c (struct stab_handle): Add syms and symcount fields.
- (start_stab): Add syms and symcount parameters. Change all
- callers.
- (parse_stab_string): Look up global variables in the symbol table
- to get the right value.
- * budbg.h (start_stab): Update declaration.
- * rddbg.c (read_section_stabs_debugging_info): Add syms and
- symcount parameters. Change all callers.
-
- * stabs.c (parse_stab_array_type): If the index type is 0, use
- int.
-
-Wed Feb 7 14:17:45 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (ieee_start_compilation_unit): Clear modified and
- modified_alloc fields of info.
-
- * configure.in: Check for --enable-shared. Substitute new
- variables BFDLIB and OPCODES.
- * configure: Rebuild.
- * Makefile.in (BFDLIB): Set to @BFDLIB@.
- (OPCODES): Set to @OPCODES@.
-
-Mon Feb 5 16:18:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Support for building bfd and opcodes as shared libraries, based on
- patches from Alan Modra <alan@spri.levels.unisa.edu.au>:
- * configure.in (HLDFLAGS): New substitution.
- * configure: Rebuild.
- * Makefile.in (HLDFLAGS): New variable. Make all links use
- $(HLDFLAGS) before $(CFLAGS) and $(LDFLAGS).
- (BFDLIB_DEP): New variable. Replace all occurrences of $(BFD) as
- a dependency with $(BFDLIB_DEP). Remove $(BFD) as a dependency if
- there is also a dependency on $(ADDL_DEPS).
- (BFDLIB): Rename from BFD; change all uses; set to -L../bfd -lbfd.
- (OPCODES_DEP): New variable. Replace all occurrends of $(OPCODES)
- as a dependency with $(OPCODES_DEP).
- (OPCODES): Set to -L../opcodes -lopcodes.
- (ADDL_DEPS): New variable. Replace all occurrences of
- $(ADDL_LIBS) as a dependency with $(ADDL_DEPS).
- (check): Set LD_LIBRARY_PATH in the environment.
- (config.status): Depend upon BFD configure.host and config.bfd.
-
-Fri Feb 2 17:02:59 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * objdump.c: #include stdarg.h or varargs.h.
- (objdump_print_value): Change FILE* arg to struct disassemble_info*.
- All callers updated. Use fprintf_func.
- (objdump_print_address): Consistently use fprintf_func.
- (objdump_sprintf): New function.
- (disassemble_data): Print insn into a buffer, print raw insn ourselves,
- then print insn mnemonic.
-
-Fri Feb 2 16:48:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Regenerate.
-
-Thu Feb 1 09:38:18 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in (i[3-6]86-*-win32): Becomes i[3-6]86-*-cygwin32.
- (powerpc*-*-cygwin32): New.
- * configure: Regenerated.
-
-Wed Jan 31 13:22:03 1996 Richard Henderson <rth@tamu.edu>
-
- * Makefile.in (distclean): Remove $(DEMANGLER_PROG).1.
-
-Mon Jan 29 17:36:29 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patches from H J Lu <hjl@zoom.com>:
- * objcopy.c (remove_leading_char): New static variable.
- (OPTION_REMOVE_LEADING_CHAR): Define.
- (copy_usage): Mention --remove-leading-char.
- (filter_symbols): If remove_leading_char, and the first character
- of a global symbol matches the symbol leading char of the BFD,
- remove the first character.
- (copy_object): Filter the symbols if remove_leading_char is set.
- (copy_main): Handle --remove-leading-char.
- * binutils.texi, objcopy.1: Document --remove-leading-char.
-
-Sat Jan 27 15:40:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * objdump.c (fprintf): Add prototype to avoid compiler warning on
- SunOS.
-
-Fri Jan 26 11:53:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * binutils.texi (nm): Improve documentation on symbol types.
- (objdump): Reference the stabs manual from the discussion of the
- --stabs option.
-
-Thu Jan 25 11:21:46 1996 Raymond Jou <rjou@mexican.cygnus.com>
-
- * mpw-make.sed: Add a "stamps" target.
-
-Thu Jan 25 13:51:44 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (dump_headers, dump_section_header): Change objdump -h
- output to be simpler and to include section file offsets.
-
-Wed Jan 24 12:06:05 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (parse_stab_members): Don't adjust voffset.
-
- * ieee.c (ieee_read_cxx_class): Don't multiply voffset by 4.
- (struct ieee_write_type): Add name field.
- (struct ieee_type_class): Remove name field. Change all uses to
- use new name field in type instead.
- (struct ieee_name_type): Likewise.
- (ieee_start_struct_type): Initialize name field of type.
- (ieee_start_class_type): Don't initialize classdef entry of tag.
- (ieee_class_method_var): Don't adjust voffset.
- (ieee_end_class_type): Likewise.
- (ieee_tag_type): Initialize new name field of type.
- (ieee_typdef): Set name after copying in type information.
-
- * debug.c (VOFFSET_STATIC_METHOD): Define as -1, not 1.
-
- * ieee.c (struct ieee_modified_type): Define.
- (struct ieee_handle): Add modified and modified_alloc fields.
- (ieee_get_modified_info): New static function.
- (ieee_pointer_type): Cache type index.
- (ieee_const_type): Likewise.
- (ieee_volatile_type): Likewise.
-
- * ieee.c (ieee_define_named_type): When creating a tag for an
- anonymous struct, copy the name into memory.
- (ieee_tag_type): Likewise.
- * debug.c (debug_write_type): Only check and set id field for an
- unnamed object.
- (debug_write_class_type): Likewise.
-
- * ieee.c: Various changes to write out types for functions and
- references, and to not write out unnecessary function types.
-
- * ieee.c (struct ieee_var): Remove variable field. Add kind
- field, and define some enum constants for it.
- (parse_ieee_ty): Set kind field of variable for 'x' and 'X' types.
- (parse_ieee_atn): Make an indirect slot for an external variable,
- although we otherwise don't record it. Set kind field rather than
- variable field of pvar.
- (ieee_read_cxx_class): Try to get the type of a static member.
- (ieee_read_reference): Check kind field rather than variable
- field.
-
-Tue Jan 23 15:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c: Various changes to handle reading C++ reference type
- information.
-
- * debug.h (enum debug_var_kind): Add DEBUG_VAR_ILLEGAL.
- (enum debug_parm_kind): Add DEBUG_PARM_ILLEGAL.
- * debug.c (debug_get_parameter_types): Handle DEBUG_KIND_FUNCTION.
-
- * ieee.c: Various changes to write out definitions of C++ classes.
-
- * debug.c (debug_append_filename): Remove.
- * debug.h (debug_append_filename): Don't declare.
-
- * stabs.c (struct stab_handle): Remove last_type field. Add
- so_string and so_value fields.
- (finish_stab): Call stab_emit_pending_vars before calling
- debug_end_function. Don't warn about pending variables.
- (parse_stab): Accumulate N_SO strings until a non N_SO symbol is
- seen, rather than calling debug_append_filename. Call
- stab_emit_pending_vars before calling debug_end_function. Don't
- set info->last_type.
-
-Tue Jan 23 09:53:54 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * objdump.c (disassemble_data): Handle unknown endianness.
- Pass fprintf to INIT_DISASSEMBLE_INFO.
-
-Mon Jan 22 16:46:43 1996 Doug Evans <dje@charmed.cygnus.com>
-
- Add new option --show-raw-insn.
- * objdump.c (show_raw_insn): New global.
- (usage): Update.
- (long_options): Update.
- (disassemble_data): Set disasm_info.flags if --show-raw-insn.
-
- * objdump.c (disassemble_data): Set new arch,mach,endian fields in
- disasm_info.
-
-Mon Jan 22 19:29:36 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c: Extensive changes to pass a single info argument around
- in the reading routines, rather than several arguments. Add code
- to read C++ debugging records.
-
- * debug.h (debug_get_type_size): Declare.
- (debug_get_field_name): Declare.
- (debug_get_field_bitpos): Declare.
- (debug_get_field_bitsize): Declare.
- (debug_get_field_visibility): Declare.
- (debug_get_field_physname): Declare.
- * debug.c (debug_get_real_type): Handle DEBUG_KIND_TAGGED.
- (debug_get_type_size): New function.
- (debug_get_field_name): New function.
- (debug_get_field_bitpos): New function.
- (debug_get_field_bitsize): New function.
- (debug_get_field_visibility): New function.
- (debug_get_field_physname): New function.
- (debug_write_type): Make sure we pass the real kind, not INDIRECT,
- to tag_type. Pass the name recursively for INDIRECT.
-
-Fri Jan 19 12:31:57 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * debug.h (struct debug_write_fns): Remove ellipsis_type. Add int
- and boolean parameters to function_type. Add boolean parameter to
- method_type.
- (debug_make_ellipsis_type): Don't declare.
- (debug_make_function_type): Add debug_type * and boolean
- parameters. Change all callers.
- (debug_make_method_type): Add boolean parameter. Change all
- callers.
- (debug_get_parameter_types): Add boolean * parameter. Change all
- callers.
- (debug_get_target_type): Declare.
- * debug.c (struct debug_function_type): Add fields arg_types and
- varargs.
- (struct debug_method_type): Add field varargs.
- (debug_ellipsis_type, ELLIPSIS_P): Remove.
- (debug_make_ellipsis_type): Remove.
- (debug_make_function_type): Add arg_types and varargs parameters.
- (debug_make_method_type): Add varargs parameter.
- (debug_get_parameter_types): Add pvarargs parameter.
- (debug_get_target_type): New function.
- (debug_write_type): In case DEBUG_KIND_FUNCTION, push argument
- types and pass count to function_type. In DEBUG_KIND_METHOD, use
- a signed int for the count, don't call ellipsis_type, and pass
- varargs to method_type.
- * stabs.c (struct stab_demangle_info): Add varargs field.
- (stab_demangle_argtypes): Add pvarargs parameter. Change all
- callers.
- (stab_demangle_args): Likewise.
- (stab_demangle_type): In case 'F', pick up argument types.
- * prdbg.c (pr_ellipsis_type): Remove.
- (pr_function_type): Add argcount and varargs parameters.
- (pr_method_type): Add varargs parameter.
- * ieee.c (ieee_ellipsis_type): Remove.
- (ieee_function_type): Add argcount and varargs parameters.
- (ieee_method_type): Add varargs parameter. Remove most of
- function body, and just call ieee_function_type.
-
- * stabs.c: Include "demangle.h". Added several new static
- functions not listed below to demangle argument types; they are
- all called via stab_demangle_argtypes.
- (finish_stab): If the kind of an undefined tag is
- DEBUG_KIND_ILLEGAL, use DEBUG_KIND_STRUCT instead. Warn if there
- are any pending variable.
- (parse_stab): Don't close the function when the block depth goes
- to zero. Pass value to debug_end_function.
- (parse_stab_string): In case 'T', pass the name to
- parse_stab_type.
- (parse_stab_type): In case 'x', use stab_find_tagged_type. In
- case '#', handle functions with variable numbers of arguments.
- (parse_stab_struct_type): Add tagname parameter. Change all
- callers.
- (parse_stab_members): Add tagname and typenums parameters. Change
- all callers. If the type of a method is a stub, call
- parse_stab_argtypes to demangle the argument types and get the
- physical name of the function.
- (parse_stab_argtypes): New static function.
- (stab_record_variable): For a DEBUG_GLOBAL or DEBUG_STATIC
- variable, call debug_record_variable immediately.
- (stab_find_tagged_type): New static function.
-
- * debug.h (enum debug_type_kind): Add DEBUG_KIND_ILLEGAL.
- (struct debug_write_fns): Add field ellipsis_type. Add id
- parameter to start_struct_type, start_class_type, and tag_type.
- (debug_make_ellipsis_type): Declare.
- (debug_find_named_type): Declare.
- (debug_get_type_kind): Declare.
- (debug_get_return_type): Declare.
- (debug_get_parameter_types): Declare.
- (debug_get_fields): Declare.
- (debug_get_field_type): Declare.
- * debug.c (struct debug_handle): Add fields class_id and base_id.
- (struct debug_class_type): Add field id.
- (struct debug_method_variant): Rename argtypes to physname.
- Change all uses.
- (debug_ellipsis_type): New static variable.
- (ELLIPSIS_P): New macro.
- (debug_make_ellipsis_type): New function.
- (debug_make_method_variant): Rename argtypes to physname.
- (debug_make_static_method_variant): Likewise.
- (debug_name_type): Always put types in the global namespace.
- (debug_find_named_type): New function.
- (debug_find_tagged_type): Treat DEBUG_KIND_ILLEGAL specially,
- rather than DEBUG_KIND_VOID.
- (debug_get_real_type): New static function.
- (debug_get_type_kind): New function.
- (debug_get_return_type): New function.
- (debug_get_parameter_types): New function.
- (debug_get_fields): New function.
- (debug_get_field_type): New function.
- (debug_write): Initialize base_id.
- (debug_write_type): Pass new id argument to tag_type. Handle
- DEBUG_KIND_ILLEGAL. Use id for DEBUG_KIND_STRUCT and
- DEBUG_KIND_UNION. Handle ellipsis for method arguments.
- (debug_write_class_type): Don't dereference kclass if it is NULL.
- Use id.
- * prdbg.c (pr_fns): Add pr_ellipsis_type.
- (pr_ellipsis_type): New static function.
- (pr_pointer_type): If this is a pointer to an array, parenthesize
- it correctly.
- (pr_start_struct_type): Add id parameter.
- (pr_start_class_type): Likewise.
- (pr_tag_type): Likewise.
- (pr_fix_visibility): Add the visibility to the top of the stack,
- not the second element on the stack.
- (pr_struct_field): Pop the stack before calling pr_fix_visibility.
- (pr_class_static_member): Likewise.
- (pr_class_start_method): Don't push a type, just set the method
- name in the type on the top of the stack.
- (pr_class_end_method): Don't pop the stack.
- (pr_class_method_variant): Rename argtypes parameter to physname.
- Append const and volatile rather than prepending them. Add a
- space after the physname.
- (pr_class_static_method_variant): Likewise.
- * ieee.c (ieee_fns): Add ieee_ellipsis_type.
- (ieee_define_named_type): Use DEBUG_KIND_ILLEGAL rather than
- DEBUG_KIND_VOID.
- (write_ieee_debugging_info): Likewise.
- (ieee_typdef): Likewise.
- (ieee_ellipsis_type): New static function.
- (ieee_start_struct_type): Add id parameter.
- (ieee_start_class_type): Likewise.
- (ieee_tag_type): Likewise.
- (ieee_class_method_variant): Rename name to physname.
- (ieee_class_static_method_variant): Likewise.
-
- * Makefile.in (DEBUG_OBJS): Remove prdbg.o.
- ($(OBJDUMP_PROG)): Depend upon, and link against, prdbg.o.
-
-Thu Jan 18 17:35:06 1996 Kim Knuttila <krk@cygnus.com>
-
- * dlltool.c (make_tail): Changed the order of the sections to avoid
- an alignment problem.
-
-Wed Jan 17 14:23:00 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * srconv.c (wr_du): Set du.stackfrmt to 0.
- (wr_un, wr_sc): Emit all sections, even those with 0 size.
-
-Tue Jan 16 16:15:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * srconv.c (wr_hd): Space size within segment was being
- stored in segment identifier field.
-
-Tue Jan 16 12:07:25 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in (BUILD_NLMCONV, BUILD_SRCONV, SYSINFO_PROG,
- BUILD_DLLTOOL): Put definitions for these into makefile when
- configuring, instead of always clearing in mpw-make.sed.
- * mpw-make.sed: Edit out any host_alias or target_alias settings,
- fix pathname to BFD internal include files, remove dependency
- calculation rules.
-
-Thu Jan 11 17:31:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * objdump.c (dump_section_header): Add new section flags
- SEC_{EXCLUDE,SORT_ENTRIES}.
-
-Thu Jan 11 11:45:34 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (filter_symbols): NULL terminate the output symbols.
- (copy_object): Allocate space for a possible extra NULL pointer.
-
- * debug.c (debug_make_undefined_tagged_type): Make sure we are
- given a kind of type we can handle.
- (debug_write_type): Handle undefined enums and structs.
- (debug_write_class_type): Handle undefined classes.
- * prdbg.c (pr_enum_type): Handle an undefined enum.
- * ieee.c (ieee_enum_type): Likewise.
-
-Wed Jan 10 15:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in: Updated dependencies.
- (ALLOCA, MALLOC): Remove variables.
- (ADDL_LIBS): Remove $(MALLOC) from definition.
- * alloca.c, gmalloc.c: Remove.
-
-Mon Jan 8 18:02:29 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c: Add global function write_ieee_debugging_info and a
- bunch of static functions and structs used to write out IEEE
- debugging information.
- * budbg.h (write_ieee_debugging_info): Declare.
-
- * ieee.c (struct ieee_type): Add pslot field.
- (enum builtin_types): Define.
- (ieee_builtin_type): For a pointer, return a pointer to the named
- type. Use enum values rather than numbers.
- (ieee_alloc_type): New static function.
- (ieee_read_type_index): Use ieee_alloc_type.
- (parse_ieee_bb): Likewise.
- (parse_ieee_ty): Likewise. Use ieee_builtin_type for array range,
- rather than making a new integer type. Store the new type in the
- slot, if there is one.
- (parse_ieee_atn): Treat ATN10 as defining a register variable.
- (ieee_regno_to_genreg): Rename from ieee_regno_to_gen. Change all
- callers.
- (ieee_genreg_to_regno): New static function.
-
- * stabs.c (parse_stab_type): Add new typename parameter. Change
- all callers.
- (parse_stab_range_type): Add new typename parameter. Change all
- callers.
-
- * debug.h (struct debug_write_fns): Add tag parameter to
- enum_type, start_struct_type, and start_class_type.
- * debug.c (debug_write_type): Pass any tag name to
- start_struct_type, debug_write_class_type, and enum_type. If
- DEBUG_KIND_TAGGED, pass the name in the recursive call.
- (debug_write_class_type): Accept a new tag parameter, and pass it
- to start_class_type.
- * prdbg.c (pop_type): Don't remove '+' character.
- (pr_enum_type): Accept and use tag parameter.
- (pr_start_struct_type): Likewise.
- (pr_start_class_type): Likewise.
- (pr_class_baseclass): Adjust algorithm used to find where to put
- the baseclass name.
- (pr_tag): Don't bother to insert the tag name.
-
- * objcopy.c: Include budbg.h.
- (convert_debugging): New static variable.
- (OPTION_DEBUGGING): Define.
- (copy_options): Add "debugging".
- (copy_usage): Mention --debugging.
- (is_strip_section): Skip debugging sections if convert_debugging.
- (setup_section, copy_section): Likewise.
- (filter_symbols): Skip debugging symbols if convert_debugging.
- (copy_object): If convert_debugging, read and write debugging
- information.
- (write_debugging_info): New static function.
- (copy_main): Handle --debugging.
- * Makefile.in (DEBUG_OBJS): New variable.
- ($(OBJCOPY_PROG)): Depend upon and link against $(DEBUG_OBJS).
- ($(STRIP_PROG)): Likewise.
- (OBJDUMP_OBJS): Remove variable.
- ($(OBJDUMP_PROG)): Use objdump.o $(DEBUG_OBJS) rather than
- $(OBJDUMP_OBJS).
- * binutils.texi, objcopy.1: Document --debugging.
-
-Thu Jan 4 16:31:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c: New file with code to read IEEE debugging information.
- * budbg.h (parse_ieee): Declare.
- * rddbg.c (read_debugging_info): Handle IEEE flavour files.
- (read_ieee_debugging_info): New static function.
- * Makefile.in: Rebuild dependencies.
- (CFILES): Add ieee.c.
- (OBJDUMP_OBJS): Add ieee.o.
-
- * bucomm.h (xrealloc): Change type of first parameter from char *
- to PTR.
-
-Tue Jan 2 17:44:07 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in: Add targets to automatically rebuild dependencies.
- Remove targets which just listed dependencies of .o files.
- (DEP): New variable.
- (HFILES, GENERATED_HFILES): New variables.
- (CFILES, GENERATED_CFILES): New variables.
- (underscore.c): Don't do anything, just depend upon stamp-under.
- (stamp-under): New target; do what underscore.c used to do.
- (nlmconv.o): Depend upon sym.h and ecoff.h.
- (.dep, .dep1, dep.sed, dep, dep-in): New targets.
- (stage1, stage2, stage3, against, comparison): Remove.
- (de-stage1, de-stage2, de-stage3): Remove.
- (clean, distclean): Remove stamp-under and dep.sed.
- * dep-in.sed: New file.
-
- Implement generic debugging support. Implement a stabs reader and
- a generic printer.
- * budbg.h, debug.c, debug.h, prdbg.c, rddbg.c, stabs.c: New files.
- * objdump.c: Include "debug.h" and "budbg.h".
- (dump_debugging): New global variable.
- (usage): Mention --debugging.
- (long_options): Add "debugging".
- (display_bfd): Handle --debugging.
- * Makefile.in (OBJDUMP_OBJS): New variable.
- ($(OBJDUMP_PROG)): Use $(OBJDUMP_OBJS).
- * binutils.texi, objdump.1: Document --debugging.
-
-Sat Dec 30 09:59:51 1995 Jeffrey A Law (law@cygnus.com)
-
- * nm.c ( long_options): Add "--defined-only" option.
- (usage): Update for new "--defined-only" option.
- (filter_symbols): Handle "--defined-only".
-
-Fri Dec 29 16:04:56 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * arparse.y: Include "bucomm.h", not <sysdep.h>.
- * nlmheader.y: Don't include "sysdep.h".
-
-Tue Dec 26 18:23:18 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * nm.c (print_symdef_entry): Check return value of
- bfd_get_elt_at_index.
-
-Sat Dec 23 11:03:16 1995 Michael Meissner <meissner@tiktok.cgynsu.com>
-
- * configure.in (DLLTOOL_DEFS): Build dlltool for PowerPC if target
- is powerpc*-*-win* in addition to powerpc*-*-*pe*.
-
-Fri Dec 15 16:30:57 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (endian_string): New static function.
- (display_target_list): Use it.
- * nlmconv.c (main): Use new bfd_big_endian macro.
-
-Fri Dec 15 07:51:34 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (fill_ordinals): Start from 1 if no other instructions
- given.
-
-Tue Dec 12 12:05:21 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (clean): Remove $(DEMANGLER_PROG).1. From Ronald
- F. Guilmette <rfg@monkeys.com>.
-
-Mon Dec 11 14:33:05 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mac-binutils.r: Fix copyright and version strings.
-
- * Makefile.in (version): Remove, no longer used.
-
-Fri Dec 1 14:41:56 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed (install, install-only): Edit in Mac-specific
- install procedure.
-
-Thu Nov 30 20:26:02 1995 Kim Knuttila <krk@cygnus.com>
-
- * dlltool.c (ppc_jtab): The binary glue for PowerPC dll linkage,
- including the return instruction.
- sinfo: added a preferred alignment field.
- (secdata): section data for the PowerPC version.
- (make_one_lib_file): More symbols, More sections (pdata, rdata)
- (make_tail): Use idata$6 instead of idata$7 for ppc. Also added a
- NULL idata$3 descriptor (temporary).
-
-Tue Nov 28 17:23:44 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * dlltool.c (fill_ordinals): Don't reference d_export_vec if
- there are no exported functions.
-
-Mon Nov 27 13:05:59 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Regenerate with autoconf 2.7.
-
-Wed Nov 22 13:17:15 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.c (fill_ordinals): Start assigning ordinals at 1.
-
- * Makefile.in (EXPECT): Use $$r, not $${rootme}.
- (check): Set r, not rootme.
-
-Tue Nov 21 18:04:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Use BFD_NEED_DECLARATION.
- * acconfig.h: Put NEED_DECLARATION_FPRINTF in @TOP@ section.
- * configure, config.in: Rebuild with autoconf 2.6.
-
-Fri Nov 17 10:34:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not
- $(host_canonical) and $(target_canonical).
-
-Thu Nov 16 03:39:20 1995 Ken Raeburn <raeburn@cygnus.com>
-
- Version 2.6 released.
- * Makefile.in (VERSION): Update to 2.6.
-
-Wed Nov 15 12:14:17 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET): Define.
- (check): Pass CC and CFLAGS to runtest.
-
- * nm.c (display_rel_file): Don't require a DYNAMIC object when
- dumping the dynamic symbol table.
-
- * objdump.c (compare_symbols): Sort global symbols before local
- symbols before debugging symbols.
- (objdump_print_address): Don't futz around looking for a global
- symbol with the same value.
-
-Tue Nov 14 17:19:11 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * dlltool.c: Use FOPEN_* macros rather than "r" or "w".
-
- * dlltool.c (fill_ordinals): Correct memset call.
-
-Sun Nov 12 12:56:05 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed (DEMANGLER_PROG): Edit out attempts to do anything
- with the man page.
-
-Fri Nov 10 11:41:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (setup_section): Copy the section lma independently of
- the vma.
-
-Wed Nov 8 11:33:00 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * arsup.c (ar_open): Cast malloc return value.
-
-Tue Nov 7 09:01:26 1995 Kim Knuttila <krk@cygnus.com>
-
- * configure.in, configure (DLLTOOL_DEFS): Added ppc target.
- * dlltool.c (MPPC): Added basic PPC definitions.
-
-Tue Nov 7 14:02:57 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Don't treat rs6000-*-lynx* specially.
- * configure: Rebuild.
- * config/rslynx: Remove.
- * Makefile.in: Remove @target_makefile_fragment@.
-
-Mon Nov 6 15:00:50 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bucomm.h: Include <sys/types.h>.
- * ar.c: Don't include <sys/types.h> or <stdio.h>.
- * bucomm.c, dlltool.c, nlmconv.c, objcopy.c, objdump.c: Likewise.
-
-Fri Nov 3 12:38:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c: Include <sys/types.h>.
-
- Permit user to override DEMANGLER_PROG from command line. From
- Manfred Hollstein <manfred@lts.sel.alcatel.de>.
- * Makefile.in ($(DEMANGLER_PROG)): Depend upon
- $(DEMANGLER_PROG).1.
- (install): Don't depend upon $(DEMANGLER_PROG).1. Only install
- $(DEMANGLER_PROG).1 if $(DEMANGLER_PROG) is not empty.
-
-Wed Nov 1 15:04:57 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * Makefile.in (syslex.o): add -I$(srcdir) if compiling in a
- separate directory.
-
-Mon Oct 30 14:24:18 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (objdump_print_value): New static function.
- (objdump_print_address): Use it. If we need the right section for
- the symbol, and we can't find it, print an offset from the section
- rather than using a symbol from some other section.
-
-Thu Oct 26 10:23:14 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (no_idata4, no_idata5): New.
- (arm_jtab): Use correct encoding of jump instruction.
- (usage, main, make_head, make_tail): Act on no_idata4, no_idata5.
-
-Wed Oct 25 12:10:07 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Edit paths to generated y.tab.[ch] files.
-
-Fri Oct 20 18:40:34 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * binutils.texi: Change --with-targets to --enable-targets.
-
-Thu Oct 19 17:47:41 1995 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in: Remove extraneous tab on otherwise empty line,
- which confuses many non-GNU versions of "make".
-
-Wed Oct 18 16:31:58 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (i386_jtab, arm_jtab): New
- (gen_lib_file): Rewritten to use bfd.
-
-Fri Oct 13 16:10:07 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * Makefile.in (install): Don't give error message if dlltool
- wasn't built.
-
-Fri Oct 13 11:04:37 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * deflex.l: Allow quoting of IDs.
- * defparse.y (%union): string deleted.
- (command): DESCRIPTION takes ID.
- * dlltool.c (gen_def_file): Quote outgoing name if
- necessary. Preserve NONAME.
- (gen_lib_file): Run ranlib.
- (workout_prefix): Deleted.
- (main, usage, long_options): Add --as, --ranlib, --ar options.
-
-Wed Oct 11 13:36:13 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (mtable): HOW_ALIGN_LONG, new.
- (d_ord): Deleted.
- (d_low_ord, d_high_ord, d_named_funcs): New.
- (gen_exp_file): Create noname entries correctly.
- (gen_lib_file): Dump exports alphabetically.
- (process_duplicates): Count nonamed functions.
- (fill_ordinals): Keep track of highest ord too.
- (mangle_defs): Create alphabetically ordered list of names.
-
-Tue Oct 10 09:39:09 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * Makefile.in (TOOL_PROGS): Include DLLTOOL_PROG.
-
-Mon Oct 9 13:06:31 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (add_underscore): New.
- (xlate): Use new name.
- (main, usage): Update.
-
-Fri Oct 6 14:08:51 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * sysinfo.y: Eliminate unused terminals "[" and "]" and unused
- nonterminal "name". One s/r conflict remains.
-
- Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * nm.c (print_symname): Don't try to demangle an empty
- name.
- * objdump.c (slurp_symtab): Reset symcount if there are
- no symbols.
- (slurp_dynamic_symtab): Likewise, for dynsymcount.
- (disassemble_data): Fix memory leak: free sorted_syms when done.
- (display_bfd): Likewise, for syms and dynsyms.
- (dump_relocs): Don't print header before possibly generating an
- error message.
- (dump_dynamic_relocs): Likewise.
-
- * ar.1, nm.1, objdump.1, size.1, strings.1, strip.1: Fix typos and
- formatting bugs.
-
-Fri Oct 6 12:00:25 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ar.c (do_quick_append): Comment out.
- (replace_members): Add quick argument.
- (main): Don't call do_quick_append.
- (open_inarch): Don't call quick_append to create an empty archive.
- Instead call bfd_openw/bfd_set_format/bfd_close.
-
-Thu Oct 5 20:53:08 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * bucomm.c: Always include time.h.
-
-Thu Oct 5 17:25:21 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (compare_symbols): Sort gnu_compiled and gcc2_compiled
- symbols after other symbols with the same value. Likewise for
- symbols which look like file names.
- (objdump_print_address): Always chose the first reasonable symbol
- with a given value.
-
-Tue Oct 3 22:38:55 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * arsup.c (ar_save): Use rename, not unlink/link/unlink.
-
-Mon Oct 2 12:10:25 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * strings.c (main): Exit with zero status if no files are given
- and standard input is read.
-
-Thu Sep 28 20:03:07 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in: Calculate underscore and put into makefile
- fragment, generate config.h.
- * mpw-make.sed: New file, sed commands to edit Unix makefile
- into MPW syntax.
- * mpw-make.in: Remove.
- * mac-binutils.r: New file, Mac resources.
-
-Thu Sep 28 15:49:00 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c: (gen_exp_file): Always emit a .reloc section if
- relocatable.
- (imp_name_lab): New.
- (gen_def_file): New.
- (gen_lib_file): Use imp_name_lab.
- (main): Initialize imp_name_lab.
-
-Mon Sep 25 12:05:34 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Call AC_HEADER_SYS_WAIT.
- * configure: Rebuild.
- * config.in: Rebuild.
- * dlltool.c: Include "libiberty.h" and "bucomm.h". Don't include
- <stdio.h>, <stdlib.h>, or <string.h>. Don't include <wait.h>.
- Include <sys/types.h>. Use HAVE_SYS_WAIT_H to control whether to
- include <sys/wait.h> or define the wait macros by hand. Don't
- declare xmalloc.
- (gen_lib_file): Don't assume that sprintf returns the number of
- characters; use strlen instead.
-
-Fri Sep 22 17:16:41 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (disassemble_data): Don't use the old BFD based
- disassembler interface. Make info a const pointer.
-
-Wed Sep 13 18:33:44 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (start_address): New variable.
- (stop_address): New variable.
- (usage): Mention --start-address and --stop-address.
- (OPTION_START_ADDRESS, OPTION_STOP_ADDRESS): Define.
- (long_options): Add "start-address" and "stop-address".
- (disassemble_data): Handle start_address and stop_address.
- (dump_data, dump_reloc_set): Likewise.
- (main): Don't set seenflag for -l. Handle OPTION_START_ADDRESS
- and OPTION_STOP_ADDRESS.
- * objcopy.c (parse_vma): Move to bucomm.c.
- * bucomm.c (parse_vma): New function, moved in from objcopy.c.
- * bucomm.h (parse_vma): Declare.
- * binutils.texi, objdump.1: Document new objdump options.
-
-Tue Sep 12 12:37:39 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (maintainer-clean): New target.
-
- * ar.c (replace_members): Don't call write_archive if nothing
- changed.
-
- * objdump.c (disassemble_data): Add casts to avoid gcc warnings.
-
-Thu Sep 7 12:12:17 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * config.in: Rename from config.h.in.
- * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
- Check for config.h:config.in when creating stamp-h.
- * configure: Rebuild.
- * Makefile.in (stamp-h): Depend upon config.in rather than
- config.h.in. Set CONFIG_HEADERS to config.h:config.in when
- calling config.status.
-
- * Makefile.in (distclean): Remove config.h, stamp-h, and
- config.log.
-
- * nm.c (value_format): Initialize based on BFD64 and
- BFD_HOST_64BIT_LONG.
- (print_radix): New static variable.
- (set_print_radix): Set print_radix. Adjust changes to
- value_format.
- (print_value): New static function, to print 64 bit octal and
- decimal values correctly.
- (print_symbol_info_bsd): Check BFD64, not BFD_HOST_64_BIT. Use
- print_value.
- (print_symbol_info_sysv): Use print_value.
- (print_symbol_info_posix): Likewise.
-
-Wed Sep 6 15:02:55 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (*.o): Remove incorrect dependencies on
- $(BFDDIR)/hosts/std-host.h.
-
- * Makefile.in (INSTALL_DATA): Add -m 644.
- (INSTALL_XFORM1): Likewise.
- (CC_FOR_BUILD): Set to @CC_FOR_BUILD@ rather than $(CC).
- (mostlyclean): Remove config.log.
- (distclean): Remove config.cache.
-
- * configure.in: Call BFD_CC_FOR_BUILD and BFD_BINARY_FOPEN.
- * configure: Rebuild.
-
-Tue Sep 5 20:22:42 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Rewrite to use autoconf.
- * aclocal.m4: New file.
- * configure: New file, built by autoconf.
- * acconfig.h: New file.
- * config.h.in: New file, built by autoheader.
- * Makefile.in: Various changes for new configure script. Also:
- (PROGS): Remove $(SYSINFO_PROG).
- (ALL_CFLAGS): Remove $(TDEFINES).
- (version.o): Use $(ALL_CFLAGS).
- (cplus-dem.o, dlltool.o, nlmconv.o): Likewise.
- (sysdump.o): Depend upon bucomm.h and config.h.
- (srconv.o, arsup.o, strings.o): Depend upon config.h.
- (filemode.o): Don't depend upon ../bfd/sysdep.h.
- (bucomm.o): Depend upon config.h, not ../bfd/sysdep.h.
- (size.o, objdump.o, nm.o, ar.o, objcopy.o): Likewise.
- (nlmheader.o, nlmconv.o): Likewise.
- (distclean): Don't remove sysdep.h.
- * bucomm.h: Include "ansidecl.h", <stdio.h>, and "config.h".
- Include "fopen-same.h" or "fopen-bin.h", based on
- USE_BINARY_FOPEN. Include <errno.h>, and declare errno if it is
- not a macro. Include <unistd.h>, <string.h>, <strings.h>,
- <stdlib.h>, and <fcntl.h> if they are present. Declare strchr,
- strrchr, and strstr if no string header file exists. Include
- <sys/file.h> if it exists and <fcntl.h> does not. Define
- O_RDONLY and O_RDWR if necessary.
- * ar.c: Don't include "sysdep.h". Do include <sys/types.h> and
- <sys/stat.h>. Use HAVE_GOOD_UTIME_H rather than POSIX_UTIME. Use
- HAVE_UTIMES rather than !USE_UTIME. Don't include <errno.h>, and
- don't declare errno.
- * arsup.c: Don't include <sysdep.h>.
- * bucomm.c: Don't include "sysdep.h". Include <stdio.h>,
- <sys/types.h>, and <sys/stat.h>. Include <time.h> if it defines
- time_t. Define time_t if necessary.
- * coffdump.c: Don't include "sysdep.h".
- * coffgrok.c, filemode.c, nlmconv.c, size.c: Likewise.
- * srconv.c, strings.c: Likewise.
- * nm.c: Don't include "sysdep.h". Don't try to define HAVE_SBRK.
- * objcopy.c: Don't include "sysdep.h". Include <sys/types.h> and
- <sys/stat.h>.
- (simple_copy): Use creat rather than assuming that O_CREAT is
- defined.
- * objdump.c: Don't include "sysdep.h". Use
- NEED_DECLARATION_PRINTF rather than !FPRINTF_ALREADY_DECLARED.
- * sysdump.c: Include "bfd.h" and "bucomm.h". Don't include
- "sysdep.h" or <stdlib.h>.
- (dump_symbol_info): Rename from symbol_info. Change all callers.
-
-Mon Sep 4 14:30:00 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in (host_makefile_frag): Don't set. Substitute for
- @CC@, @CFLAGS@, @HDEFINES@ and @LDFLAGS@ in Makefile.
- * Makefile.in (AR_FLAGS): Set to rc rather than qv.
- (CC): Define as @CC@.
- (CFLAGS): Set to @CFLAGS@.
- (LDFLAGS): Define as @LDFLAGS@.
- (ALL_CFLAGS): Use @HDEFINES@ rather than $(HDEFINES).
-
- * configure.in: Don't bother to call config.bfd for each target.
- Just call it for the default target, and use the shell variable to
- decide whether underscores are used.
-
-Thu Aug 31 19:21:48 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in: match i[3-6]86-*-win32, not just i386-*-win32.
-
-Thu Aug 31 16:30:22 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (add_indirect): New.
- (asm_prefix): New
- (gen_exp_file): Timestamp should be 0. Insert prefix when
- needed. New code for indirection.
- (gen_lib_file): Timestamp should be 0. Insert prefix
- when needed.
- (usage): Document --add-indirect.
- (main): Cope with new option.
-
- * objdump.c (dump_private_headers): New.
- (usage): Document new option.
- (long_option): Add private-headers.
- (dump_bfd_private_header): New.
- (main): Cope with new option.
-
-Thu Aug 31 04:09:16 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * dlltool.c (run): Add missing 3rd arg to waitpid.
-
-Wed Aug 30 11:02:11 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * Makefile.in (TOOL_PROGS): Include dlltool if needed.
-
-Tue Aug 29 13:25:21 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (rva): Deleted.
- (rvaafter, rva_before): Use new assembler pseudo.
- (flush_page, gen_exp_file, gen_lib_file): Use new way of RVAing.
- (gen_exp_file): Don't generate .edata if no need.
- (gen_lib_file): Don't make timestamp.
- Put _iname in idata$7.
- (workout_prefix): Fix memory initialization bug.
- (usage): Tidy up, delete many single char options.
- (main): rva option is gone.
-
-Mon Aug 21 18:41:28 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (options): image-base is a synonym for rva.
- (gen_lib_file): Put dll name into ibase$7.
-
-Sun Aug 20 09:59:00 1995 steve chamberlain <sac@slash.cygnus.com>
-
- Modified to generate archives and objects rather than .s files.
- * dlltool.c (run) New function.
- (gen_exp_file, gen_lib_file): Use run.
- (workout_prefix): New.
- (usage): Document new options.
- (main): Parse new options.
-
-Wed Aug 16 16:26:52 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (gen_exp_file): Fix RVA handling.
- (rva_s, rva_n): Delete.
-
-Fri Aug 11 18:27:18 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * nm.c (main): Ignore -e.
-
-Thu Aug 10 17:35:00 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * Makefile.in (config.texi): New target. Write out a setting for
- texinfo variable VERSION.
- (binutils.dvi, binutils.info): Depend on it.
- * binutils.texi: Include it, and reference @value{VERSION} instead
- of explicitly specifying 2.2(!).
-
-Thu Aug 10 16:07:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * coffgrok.c (do_type): Handle array dimensions the same way gdb
- does.
-
-Tue Aug 8 17:10:42 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c (mtable): New fields.
- (ASM_RVA_BEFORE, ASM_RVA_AFTER): New.
- (flush_page): Use new macros.
-
-Sat Aug 5 00:16:37 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * objcopy.c (mark_symbols_used_in_relocations): Handle sections
- with no relocations.
- * coffgrok.c (do_sections_p1): Likewise.
-
-Mon Jul 31 12:51:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * strings.c (print_strings): For compatibility with existing
- strings programs, print strings which are not terminated with a
- null byte or a newline.
- * binutils.texi, strings.1: Update documentation accordingly.
-
- * ar.c (replace_members): For compatibility with existing ar
- programs, permit users to add the same file multiple times.
-
-Tue Jul 25 11:21:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * strings.c (DATA_FLAGS): Remove SEC_DATA.
- (main): If no file names are given, scan standard input.
- * binutils.texi, strings.1: strings now scans non-data sections by
- default.
-
-Mon Jul 24 13:52:28 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh.
- (writeINT): When size == -2, use 2 bytes for the h8300 and 4 bytes
- for the sh.
-
- * sysdump.c (fillup): Return size - 1, the last byte is a checksum
- and shouldn't be counted.
- * sysroff.info (hd): Changed segment identifier from a byte to a 1
- bit field. The sysroff 2.0-01 specification seems to be in error
- here. Reduce width of following "spare" field from 4 to 3 bits.
- (rl): Changed order and width of first 4 bitfields to correspond
- to sysroff specification.
- (dln_head, dln_inside, dln_tail): Removed.
-
-Tue Jul 18 23:00:03 1995 Fred Fish <fnf@cygnus.com>
-
- * nm.c (sort_symbols_by_size): Enclose expression being casted
- in parens so result is casted, not just first operand. Can't
- do pointer arithmetic on void* pointers.
-
-Fri Jul 14 13:42:42 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * sysdump.c (dh): Changed format of output to be 16 hex digits
- followed by 16 ascii characters, similar to Emacs' hexl-mode,
- to make it easier to read.
- (xcalloc): fix typo.
-
-Thu Jul 13 15:27:44 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * srconv.c (wr_tr): Write out handcrafted tr block.
- (walk_tree_symbol): Use evallen and evalue instead of
- vallen & value because of corresponding changes in
- sysroff.info.
-
- * sysdump.c (sysroff_swap_tr_in, sysroff_print_tr_out): New
- functions.
-
- * sysroff.info (tr): the tr block is a special case --- a block
- without contents --- which can't be handled by generated code.
- (den, dpp): only first byte is present for DENend, DPPend.
- (dsy): describe a conditional portion of block, rename some fields.
- (dps): describe a conditional portion of block.
- (dfl): removed.
-
- * sysinfo.y (yyerror): write error message to standard error.
-
-Thu Jul 13 10:43:59 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (DISTSTUFF): Add arparse.h and sysinfo.h.
- (mostlyclean): Remove y.output.
- (clean): Remove sysroff, sysroff.c, sysroff.h, and sysinfo.
-
- * nlmconv.c (powerpc_mangle_relocs): Cast memset arg to size_t.
- * objcopy.c (copy_object): Likewise.
-
- * nm.c (HAVE_SBRK): Define execpt on amigados and WINDOWS_NT.
- (struct size_sym): Define.
- (show_stats): New static variable.
- (long_options): Add undocumented option "stats".
- (main): Print memory stats if requested.
- (sort_bfd, sort_dynamic, sort_x, sort_y): New static variables.
- (numeric_forward): Use minisymbols rather than asymbols.
- (non_numeric_forward): Likewise.
- (size_forward1): Rename from size_forward. Use minisymbols.
- (size_forward2): New static function.
- (sort_symbols_by_size): Take new arguments dynamic, size, and
- symsizep. Use minisymbols. Don't store the size back in the
- symbol; store in a newly allocate struct size_sym array.
- (display_rel_file): Read minisymbols rather than asymbols. Set
- sort_* variables. Call print_size_symbols if sorting by size.
- (filter_symbols): Take new arguments dynamic and size. Use
- minisymbols.
- (print_symbols): Likewise. Call print_symbol for actual printing.
- (print_size_symbols): New static function.
- (print_symbol): New static function.
-
-Wed Jul 12 10:43:05 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (dump_section_stabs): Only print each stabs section
- once.
- (compare_relocs): Make it clear to gcc that this always returns a
- value.
-
-Wed Jul 12 10:40:23 1995 H.J. Lu <hjl@nynexst.com>
-
- * objcopy.c (simple_copy): Preserve errno on failure.
- (smart_rename): Print error mesage if simple_copy fails.
-
-Tue Jul 11 13:10:52 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * sysdump.c: re-indented file.
- (module): read blocks sequentially instead of trying to parse
- them, as that would require changing the parser recognize the
- difference between a DPSstart and DPSend block.
- (getone): Add break's between switch blocks as appropriate.
- (object_body_list): parse blocks according to sysroff spec.
-
-Mon Jul 10 12:37:25 1995 J.T. Conklin <jtc@poseidon.cygnus.com>
-
- * sysroff.info: re-indented file, prior formatting was confusing
- because it was indentation did not reflect nesting of conditional
- records. Change "space size within segment" record in hd record
- from bit to byte.
-
- * sysinfo.y (cond_it_field): Use xcalloc instead of calloc.
-
- * srconv.c (wr_cs): Reformatted cs header array, tag each byte
- with a comment describing the field.
- (wr_unit_info): Use SEEK_SET macro instead of constant 0.
- (main): Use FOPEN_WB macro instead of literal "wb".
- * sysroff.info: Remove fdl (dfl) field from cs block. Compare
- ptr->type with ED_TYPE_CONST instead of constant 2 in ed block.
-
-Tue Jul 4 14:48:42 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * nm.c (size_forward): Check yf against yn, not xn.
-
- * objcopy.c (copy_archive): Record all output BFD's, and close
- them before unlinking them and removing the temporary directory,
- to avoid NFS problems.
-
- * ar.c (replace_members): In verbose messages, use 'r' when
- replacing a member, and 'a' when adding one.
-
- * ar.c (ar_truncate): New static variable.
- (normalize): Change return type to const char *. Add abfd
- argument. Change all callers. If ar_truncate, chop the filename
- to abfd->ar_max_namelen.
- (main): For the 'f' modifier, set ar_truncate to true. Don't
- change quick_append to replace if ar_truncate is true.
- (do_quick_append): If ar_truncate, set BFD_TRADITIONAL_FORMAT.
- (write_archive): Likewise.
- * binutils.texi, ar.1: Document 'f' modifier.
-
- * objcopy.c (enum strip_action): Define strip_unneeded.
- (OPTION_STRIP_UNNEEDED): Define.
- (strip_options): Add "strip-unneeded".
- (copy_options): Likewise.
- (copy_usage): Mention --strip-unneeded.
- (strip_usage): Likewise.
- (is_strip_section): Strip debugging sections if strip_unneeded.
- (filter_symbols): If strip_unneeded, only keep BSF_KEEP symbols.
- (copy_object): If strip_all, discard symbols without checking
- discard_locals.
- (copy_object): Call filter_symbols if strip_unneeded.
- (setup_section): Strip debugging sections if strip_unneeded.
- (copy_section): Likewise.
- (strip_main): Handle OPTION_STRIP_UNNEEDED.
- (copy_main): Likewise.
- * binutils.texi, objcopy.1, strip.1: Document --strip-unneeded.
-
-Mon Jul 3 14:16:47 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in (i386-*-win32): New configuration.
- * dlltool.c (killat, xlate, usage, long_options, main):
- Understand and cope with -k option.
-
-Sat Jul 1 12:25:15 1995 Fred Fish <fnf@cygnus.com>
-
- * ar.c: (extract_file): Change "#if POSIX_UTIME" to
- "#ifdef POSIX_UTIME" to match other tests of POSIX_UTIME
- and avoid lossage when POSIX_UTIME is not defined at all.
-
-Wed Jun 28 17:51:24 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ar.c: (print_contents.c, extract_file, do_quick_append):
- Malloc buffers rather than allocate on stack (so it works
- on NT).
- * deflex.l: Names can have an @ in them.
- * dlltool.c: Loads of stuff. Can now generate .imp files which
- work with NT .dlls.
-
-Thu Jun 22 19:10:50 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.in (demangle.c.o): Remove.
- (arparse.h): Depend on arparse.c instead of arparse.y.
-
-Wed Jun 21 17:32:45 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (DISTSTUFF): Don't include info here.
- (diststuff): Include it here.
- (realclean): Remove *.info.
-
- * objdump.c (compare_relocs): If relocation entries have the same
- address, keep them in file order.
-
-Mon Jun 19 09:06:49 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * dlltool.c: Change names of generated files. .*.s-> -*.s
-
- * objdump.c (dump_section_stabs): Check for names
- which are supersets of selected names.
-
-Wed Jun 14 19:43:52 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * dlltool.c (mtable, ARM jump): Must redirect via pc offsetable ptr.
-
-Wed Jun 14 13:27:22 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * deflex.l, defparse.y, dlltool.c: New files.
- * Makefile.in, configure.in: Support for them.
-
-Mon Jun 12 11:27:54 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * sysdump.c: Include sysdep.h
- (main): Open input with FOPEN_RB.
-
-Fri Jun 9 17:26:11 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * objdump.c (wide_output): New flag variable.
- (usage): Print new -w, --wide options.
- (long_options): Add --wide support.
- (dump_section_header): If --wide, don't print a newline between
- the section's first line and the flags.
- (objdump_print_address): Use unsigned comparisons for the binary
- search, not signed.
- (disassemble_data): If --wide, don't put a \n between the
- disassembly output and relocation information.
- (main): Support -w option being the same as --wide.
-
-Thu Jun 1 17:09:27 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Sat May 6 08:52:24 1995 H.J. Lu (hjl@nynexst.com)
-
- * objcopy.c (smart_rename): make it smarter, clean up
- if rename () fails.
-
-Tue May 30 14:24:15 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in: Delete lines with lots of #### because four or more
- indicate a point for makefile fragment substitution.
-
-Tue May 9 17:17:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in: Don't build nlmconv on PowerPC eabi any more, it
- is not needed.
-
-Thu Apr 27 20:21:24 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (EXPECT): Define.
- (RUNTEST): Use one in source tree if present.
- (check): Set `rootme' for $(EXPECT).
-
-Wed Apr 26 18:26:21 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * srconv.c (main): Add support for -n option which disables
- prescan of common symbols.
- (wr_ob): If reading past the end of a section, fill with zeros.
-
-Tue Apr 25 19:14:37 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * objdump.c (dump_section_header): Display load address after
- virtual memory (run-time) address.
-
-Wed Apr 19 09:44:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * Makefile.in (cplus-dem.o): Pass -DVERSION='"$(VERSION)"' to the
- compile.
- (DEMANGLER_PROG): No longer uses version.o.
-
-Mon Apr 10 13:29:49 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- Merge in support for Mac MPW as a host.
- (Old change descriptions retained for informational value.)
-
- * mpw-config.in (TDEFINES): Define as empty in makefile frag.
-
- * mpw-config.in: Create mk.tmp, define ARCHDEFS in it.
-
- * mpw-config.in: New file, MPW configure fragment for binutils.
- * mpw-make.in (install-only): New target.
- (install): Also depend on install-only.
-
- * mpw-make.in (cplusfilt): Renamed from c++filt.
- (INCLUDES): Add more paths.
-
- * mpw-make.in: New file, MPW makefile fragment for binutils.
- (Normally automatically generated from Makefile.in.)
-
-Mon Mar 27 11:52:57 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ar.c (write_archive): Call make_tempname to get output file
- name, rather than using a fixed name based on the input file.
-
- * objcopy.c (make_tempname): Copy from here...
- * bucomm.c (make_tempname): ...to here, and make global.
- * bucomm.h (make_tempname): Declare.
-
-Fri Mar 24 11:47:42 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * strings.c: Include "bfd.h" before other headers. Include
- "sysdep.h".
- * bucomm.c (print_arelt_descr): Cast st_uid and st_gid to long,
- and print them with %ld.
-
-Fri Mar 10 13:09:42 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (strip_options): Add --keep-symbol.
- (copy_options): Likewise.
- (copy_usage): Mention --keep-symbol and -K.
- (strip_usage): Likewise.
- (keep_symbols): New static variable.
- (is_strip_symbol): Adjust the return value according to
- keep_symbols.
- (strip_main): Handle -K. For -N, check that -K was not given.
- (copy_main): Likewise.
- * binutils.texi, objcopy.1, strip.1: Document -K.
-
-Mon Mar 6 13:33:47 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * objcopy.c (copy_archive): Check result of mkdir.
- (copy_main): Cast an xmalloc result.
-
- * objdump.c (usage): Break long format string into shorter ones.
-
-Mon Mar 6 13:46:12 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bucomm.c (list_supported_targets): New function.
- * bucomm.h (list_supported_targets): Declare.
- * ar.c (usage): Call list_supported_targets.
- * nm.c (usage): Likewise.
- * objcopy.c (copy_usage, strip_usage): Likewise.
- * objdump.c (usage): Likewise.
- * size.c (usage): Likewise.
- * strings.c (usage): Likewise.
-
-Tue Feb 28 15:13:58 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bucomm.c (print_arelt_descr): Cast st_size to long before
- passing it to fprintf.
-
-Fri Feb 17 13:36:45 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (struct section_list): Add fields remove, set_flags,
- and flags. Change adjust from boolean to enum.
- (remove_sections): Remove static variable.
- (sections_removed): New static variable.
- (copy_options): Add --set-section-flags.
- (copy_usage): Mention --set-section-flags.
- (parse_flags): New static function.
- (find_section_list): New static function.
- (is_strip_symbol): Change return type from int to boolean.
- (is_strip_section): New static function.
- (filter_symbols): Call is_strip_section.
- (copy_object): When adding sections, check for specified flags or
- VMA. Call filter_symbols if any sections are being removed.
- (setup_section): Use find_section_list function rather than
- looking through remove_sections and adjust_sections. Handle
- --set-section-flags.
- (copy_section): Use find_section_list rather than looking through
- remove_sections.
- (strip_main): Use find_section_list instead of adding items to
- sections_removed.
- (copy_main): Use find_section_list instead of adding items to
- sections_removed and adjust_sections. Handle --set-section-flags.
- * binutils.texi, objcopy.1: Document --set-section-flags.
-
-Tue Feb 14 18:03:03 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (with_source_code): New global variable.
- (usage): Mention -S/--source.
- (long_options): Add --source.
- (prev_functionname, prev_line): New static variables.
- (struct print_file_list): Define.
- (print_files): New static variable.
- (skip_to_line, show_line): New static functions.
- (disassemble_data): Call show_line to handle -l and -S.
- (main): Handle -S.
- * binutils.texi, objdump.1: Document -S/--source.
-
-Thu Feb 9 16:11:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objcopy.c (copy_usage): Rename parameter to avoid shadowing.
- (strip_usage): Likewise.
-
- * objcopy.c (struct section_add): Define.
- (add_sections): New static variable.
- (copy_options): Accept --add-section.
- (copy_usage): Mention --add-section.
- (copy_object): Add sections from the add_sections list.
- (copy_main): Handle --add-section.
- * binutils.texi, objcopy.1: Document --add-section.
-
-Wed Feb 1 15:04:57 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * objdump.c (disassemble_data): Pass section offset, not absolute
- address, to bfd_find_nearest_line.
-
- * nlmconv.c (powerpc_mangle_relocs): Don't use const with
- reloc_howto_type.
-
-Thu Jan 26 18:50:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * objdump.c (compare_symbols): Use bfd_asymbol_value (VAR) rather
- than VAR->value.
- (objdump_print_address): Likewise.
- (disassemble_data): Don't change the symbol values. It can
- confuse bfd_canonicalize_reloc.
-
-Thu Jan 26 12:03:56 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in: Add support for powerpc-*-ebai.
-
-Wed Jan 18 10:02:12 1995 Steve Chamberlain <sac@splat>
-
- * coffdump.c: Include sysdep.h.
- (dump_coff_type): Handle coff_secdef_type.
- * coffgrok.c : Include sysdep.h.
- * srconv.c: Include libiberty.h
- (absolute_p, dty_start, dty_end, dump_tree_structure): Remove.
-
-Wed Jan 18 12:24:14 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * coffdump.c (dump_coff_scope): Cast pointer to unsigned long for
- printf.
- * coffgrok.c: Include bucomm.h. Don't declare xmalloc.
- (push_scope): Declare type of parameter link.
- * size.c: Include libiberty.h.
- * srconv.c: Include bucomm.h.
- (find_base): Declare at top of file.
- (wr_hd): Add default case to architecture switch.
- (wr_dps_start): Declare type of parameter nest.
- (wr_du): Comment out variables used only in commented out blocks.
- (wr_dus): Remove unused variable i.
- (wr_sc): Remove unused variables myinfo, low, and high.
- * strings.c: Include libiberty.h.
- * sysdump.c: Include <ctype.h>.
-
-Tue Dec 20 19:13:44 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ar.c (main): Ignore 'f' modifier used on HP/UX 9.
-
-Thu Dec 15 17:34:12 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * ar.c, nm.c, objcopy.c, objdump.c: Include progress.h.
- * ar.c, nm.c, objcopy.c, objdump.c (main): Add START_PROGRESS
- and END_PROGRESS.
- * ar.c (map_over_members, open_inarch): Call PROGRESS.
- * nm.c (main, display_archive, filter_symbols, print_symbols):
- Call PROGRESS.
-
- * objcopy.c (copy_usage): Break up long usage string.
-
-Wed Dec 14 15:51:56 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * objcopy.c (copy_object): Don't bother setting status after
- nonfatal() "call", because it won't return.
-
-Fri Dec 9 00:22:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (powerpc_mangle_relocs): Don't switch a reloc to use
- the section symbol if the symbol is undefined.
-
-Thu Dec 8 14:45:50 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * objcopy.c (add_strip_symbol): Cast return value of xmalloc.
-
-Wed Nov 30 11:05:43 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
-
- * ar.c (replace_members): Pass current->filename to normalize when
- checking for duplicates, because the filename of a newly added
- file will not have been normalized yet.
-
-Thu Nov 17 15:00:13 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ar.c (main): Don't call do_quick_append if any of the archive
- names are longer than 14 characters.
-
- * objcopy.c (main): Fix is_strip test. From
- pirker@eiunix.tuwien.ac.at (Martin Pirker).
-
-Thu Nov 17 15:37:19 1994 Mark W. Eichin <eichin@cygnus.com>
-
- * objcopy.c (add_strip_symbol): New function, adds a name to an
- explicit list of symbols to strip.
- (is_strip_symbol): New function, reports whether the name argument
- is in the explicit list.
- (filter_symbols): Check against is_strip_symbol above all.
- (strip_main): Recognize -N option. If used, don't default to
- strip_all.
- (copy_main): Recognize -N option.
- (strip_usage): Document -N and --strip-symbol options.
- (copy_usage): Ditto.
- * objcopy.1, strip.1, binutils.texi: Document -N and
- --strip-symbol options.
-
-Tue Nov 8 13:12:54 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * objdump.c (display_target_list, display_info_table): Pass an
- array to tmparg, rather than NULL, since some systems can't handle
- NULL.
-
- * objcopy.c (copy_archive): Keep a list of the names of the
- temporary files we created. Close each input BFD after we open
- its successor.
-
-Mon Nov 7 15:48:39 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (VERSION): Bump to 2.5.3.
-
-Thu Nov 3 19:04:34 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (install-info): Install info files from whatever
- directory they were found in.
-
- Patch from DJ Delorie:
- * configure.bat: do c++filt -> cxxfilt right
-
- * sysinfo.y: Include system header files early, so any potential
- declaration of abort() occurs before its use.
-
- * strings.c (strings_file): Try opening the file in binary mode
- first.
-
-Wed Nov 2 15:44:13 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ar.c (main): Treat ar qs like ar rs.
-
-Tue Oct 25 16:19:25 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * objcopy.c (gap_fill): Explicitly initialize, for clarity.
- (pad_to_set, pad_to): New static variables.
- (copy_options): Accept --pad-to.
- (copy_usage): Mention --pad-to.
- (copy_object): Support --pad-to.
- (compare_section_vma): Sort non loadable sections to the front.
- Sort sections with the same VMA by size.
- (copy_main): Handle --pad-to.
- * binutils.texi, objcopy.1: Document --pad-to.
-
-Thu Oct 20 13:51:31 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objcopy.c (gap_fill_set, gap_fill): New static variables.
- (copy_options): Accept --gap-fill.
- (copy_usage): Mention --gap-fill.
- (copy_object): Support --gap-fill.
- (get_sections, compare_section_vma): New static functions.
- (copy_main): Handle --gap-fill.
- * binutils.texi, objcopy.1: Document --gap-fill.
-
-Wed Oct 19 14:09:16 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * Makefile.in (check): Add a dummy else clause to the if
- statement.
-
- * objcopy.c (copy_object): Revert yesterday's change.
- * binutils.texi, objcopy.1: Remove special mention of --set-start
- and `binary' output format.
-
-Tue Oct 18 11:12:01 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * objcopy.c (copy_object): If the output file format is `binary',
- and the start address was not set using --set-start, default the
- start address to zero. This hack is because the `binary' output
- file format uses the start address to set the virtual address of
- the first byte in the file.
- * binutils.texi, objcopy.1: Add some notes on generating S-records
- and binary files.
-
- * nm.c (print_symdef_entry): Call print_symname to print the
- symbol name, so that --demangle works.
-
- * Makefile.in (mostlyclean): Remove tmpdir.
-
- * objcopy.c (struct section_list): Add fields used, adjust, val.
- (adjust_start, set_start_set, set_start): New static variables.
- (adjust_section_vma, adjust_sections): New static variables.
- (copy_options): Add --adjust-start, --adjust-vma,
- --adjust-section-vma, --adjust-warnings, --no-adjust-warnings,
- --set-start.
- (parse_vma): New static function.
- (copy_usage): Mention new options.
- (copy_object): Handle --set-start and --adjust-start.
- (setup_section): Correct type of last argument to PTR. Set used
- field if section is removed. Handle --adjust-vma and
- --adjust-section-vma.
- (copy_section): Correct type of last argument to PTR.
- (mark_symbols_used_in_relocations): Likewise.
- (strip_main): Clear used field when handling -R.
- (copy_main): Handle new options.
- * binutils.texi (objcopy): Document new options.
- * objcopy.1: Document new options.
-
-Fri Oct 14 14:38:13 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * configure.in (configdirs): Remove definition--testsuite is no
- longer configured.
- * Makefile.in (testsuite): Remove target.
- (site.exp): New target.
- (check): Rewrite.
- (clean, distclean): Don't recur into testsuite directory.
-
-Thu Oct 13 19:24:09 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (VERSION): Updated to 2.5.
- * Version 2.5 released.
-
-Tue Oct 11 15:26:42 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * Makefile.in (sysdump.o): Depends upon sysroff.c.
-
-Mon Oct 10 13:50:30 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * nlmconv.c (link_inputs): Pass -Ur flag to ld so that the
- ctor/dtor tables needed by C++ programs are built.
-
-Sun Oct 9 18:04:00 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * Makefile.in (srconv.o): Add dependence on sysroff.c.
-
-Tue Oct 4 12:19:51 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * configure.in: Use ${config_shell} when running config.bfd.
-
- * Makefile.in (sysroff.h): Split target away from sysroff.c.
- (srconv.o, sysdump.o): New targets.
- (srconv, sysdump): Don't depend upon sysroff.c.
-
-Wed Sep 28 13:04:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * Makefile.in (arparse.c): Don't ignore errors from mv.
- (sysinfo.c): Likewise. Also, depend upon arparse.c, to prevent a
- parallel make from trying to build both arparse.c and sysinfo.c
- simultaneously.
- (nlmheader.c): Similar change.
- (arparse.h): Separate target from arparse.c, so that a parallel
- make does not try to build both at once. Depend upon arparse.c.
- (sysinfo.h): Similar change.
-
- * objdump.c (disassemble_data): Pass the reloc buffer to free, not
- the pointer used to loop over the relocs.
-
-Sat Sep 24 16:16:57 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * objdump.c (disassemble_data): Cast result of xmalloc.
-
-Wed Sep 21 19:30:35 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * objdump.c (sorted_syms, sorted_symcount): New global variables.
- (objdump_print_address): Use sorted_syms and sorted_symcount
- instead of syms and symcount.
- (disassemble_data): Don't bother to get the relocs before looping
- over the sections. Before filtering and sorting the symbol table,
- copy it into sorted_syms.
-
-Fri Sep 16 11:27:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * objdump.c (struct objdump_disasm_info): Add field require_sec.
- (objdump_print_address): If aux->require_sec, require that the
- symbol be in aux->sec even if HAS_RELOC is not set. If we can't
- find a smaller symbol in the right section, look for a larger one.
- (disassemble_data): Set aux.require_sec around the
- objdump_print_address call for the instruction address.
-
-Thu Sep 15 21:43:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ar.c: Call xexit rather than exit.
- (output_filename, output_file, output_bfd): New static variables.
- (remove_output): New static function.
- (main): Call xatexit (remove_output). Call xexit rather than
- returning.
- (extract_file): Set output_filename and output_file while output
- file is open.
- (write_archive): Likewise, but use output_bfd, not output_file.
- * arsup.c: Include libiberty.h. Call xexit rather than exit.
- * bucomm.c: Likewise.
-
- * objdump.c (disassemble_all): New global variable.
- (usage): Document --disassemble-all.
- (long_options): Add disassemble-all as a synonym for -D.
- (compare_symbols): Make pointers const.
- (compare_relocs): New static function.
- (disassemble_data): Rename disassemble to disassemble_fn to avoid
- shadowing. If dump_reloc_info, print relocs along with
- disassembly. Skip sections which are not SEC_CODE unless
- disassemble_all or only is set.
- (display_bfd): Don't call dump_relocs if disassemble is set.
- (main): Accept and handle -D.
- * binutils.texi: Document -D/--disassemble-all.
- * objdump.1: Likewise.
-
-Wed Sep 14 12:19:07 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * objdump.c (disassemble_data): Initialize prevline to 0. Make
- prev_function non const. Copy functionname into an malloc buffer
- when setting prev_function, instead of assuming that the string
- will last forever.
-
- * nm.c: Include libiberty.h.
- (sort_by_size): New static variable.
- (long_options): Add --size-sort.
- (usage): Mention --size-sort.
- (numeric_forward): Make static. Change from void * to PTR.
- (numeric_reverse): Likewise.
- (non_numeric_forward, non_numeric_reverse): Likewise.
- (sorters): Change declaration from void * to PTR.
- (size_forward, sort_symbol_by_size): New static functions.
- (display_rel_file): Handle sort_by_size.
- (filter_symbols): If sort_by_size, discard absolute and undefined
- symbols.
- * binutils.texi (nm): Document --size-sort.
- * nm.1: Document --size-sort.
-
-Tue Sep 13 21:06:06 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * objcopy.c (copy_main): Initialize input_filename and
- output_filename to NULL.
-
-Tue Sep 13 14:17:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * Makefile.in (version.o): Depend upon Makefile, so that version.o
- gets rebuilt when make variable VERSION is changed.
-
- * objdump.c (dump_section_header): Print the SEC_NEVER_LOAD flag.
-
-Wed Aug 24 12:40:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * configure.in: Change i[34]86 to i[345]86.
-
-Tue Aug 23 11:00:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ar.c (ranlib_touch): Don't update the archive map if there isn't
- one.
-
-Mon Aug 22 16:02:18 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ar.c: Include libiberty.h.
- (inarch): Remove variable.
- (map_over_members): Make static. Add arch argument, and use it
- instead of inarch. Change all callers.
- (main): Treat --version as -v. Accept -t argument. Accept any
- number of archive arguments. Catch and use open_inarch return
- value, rather than using inarch.
- (open_inarch): Return newly opened BFD, rather than using inarch.
- (do_quick_append): Make archive_filename const.
- (write_archive): Add iarch argument, and use it instead of inarch.
- Change all callers.
- (delete_members, move_members, replace_members): Likewise.
- (ranlib_only): Don't exit on success. Catch and use open_inarch
- return value.
- (ranlib_touch): New function.
- * arsup.h (map_over_members): Don't declare.
- (ar_end, ar_extract): Declare.
- (open_inarch): Change return value in declaration to bfd *.
- * arsup.c (map_over_list): Make static. Always pass two arguments
- to function. Add arch argument, and use it instead of inarch.
- Change all callers.
- (ar_directory_doer): Make static. Add ignored second argument.
- Change all callers.
- (ar_directory): Use open_inarch return value rather than inarch.
- (ar_addlib_doer): Make static.
- (ar_addlib): Use open_inarch return value rather than inarch.
- (ar_extract): Remove unused local variable abfd.
-
-Thu Aug 11 14:55:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- Add support for removing named sections to objcopy and strip.
- * objcopy.c (struct section_list): Define.
- (remove_sections): New static variable.
- (strip_options, copy_options): Add remove-section.
- (copy_usage, strip_usage): Mention -R and --remove-section.
- (setup_section): If section is in remove_sections list, ignore it.
- (copy_section): Likewise.
- (strip_main, copy_main): Handle -R.
- * binutils.texi, objcopy.1, strip.1: Document new options.
-
-Wed Aug 10 10:19:55 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * nlmconv.c (powerpc_mangle_relocs): Rename symvalue to sym_value,
- so as not to conflict with the symvalue typedef in bfd.h.
-
-Mon Aug 1 13:19:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * nlmheader.y: Per current NetWare docs, accept a revision number
- of 0 and treat a revision number greater than 26 as 0.
-
-Mon Jul 25 12:58:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * objdump.c (objdump_print_address): Correct handling of end of
- symbols when looking for next symbol with a different value.
-
-Fri Jul 22 16:48:34 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * nm.c (numeric_forward): Treat undefined symbols as "less than"
- defined symbols with zero values. If numeric values are equal, or
- both symbols are undefined, sort alphabetically. Don't assume
- that the difference of two bfd_vma values will truncate to "int"
- and still have the same sign.
- (numeric_reverse): Call numeric_forward and negate the result.
- (print_symbol_info_bsd): For undefined symbols, print leading
- spaces equivalent to the width of a printed bfd_vma, rather than
- assuming that 8 will look right.
-
-Fri Jul 22 10:36:50 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * coffgrok.c (doit): Zero all fields of new structure.
- * srconv.c (sysroff_swap_*_out): Remove redundant trailing arg.
- * sysinfo.y: Generate sysroff_swap_*_out without requiring extra
- arg.
-
-Fri Jul 22 10:09:53 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * nlmheader.y: Make "stack" and "stacksize" synonyms in the lexer
- rather than the parser.
-
-Thu Jul 21 10:25:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * config/mh-alphaosf, config/mh-apollo68v, config/mh-delta88:
- Remove; obsolete.
-
-Sat Jul 16 22:34:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * objdump.c (slurp_dynamic_symtab): Try to get the dynamic symbols
- even if the bfd is not marked DYNAMIC. ELF executables are not
- marked DYNAMIC, but do have dynamic symbols.
-
-Fri Jul 15 01:41:35 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * coffgrok.c (do_where): Make data with no type 'int'.
- (do_define): Keep info on source file of a symbol.
- * coffgrok.h (coff_symbol): New field.
- * srconv.c (PROGRAM_VERSION): Now 1.3
- (wr_rl): Use external ref number for symbol.
- (wr_dus): Only keep one source file per debug unit.
- (wr_dln): Always emit line numbers for first source file,
- (wr_globals): Emit globals in the du of their owning source file.
-
-Mon Jul 11 15:59:03 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * nlmheader.y: Null terminate var_hdr->threadName.
-
-Fri Jul 8 17:33:22 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * Makefile.in (syslex.o, sysinfo.o): Permit C source files to be
- in $(srcdir), as they will be for FSF releases.
-
-Wed Jul 6 01:13:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (setup_sections): Preserve existing section flags when
- copying in flags from a new section.
-
-Tue Jul 5 15:56:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * objcopy.c: Include libiberty.h.
- (copy_file): If output_target is NULL, set it to the target of the
- input file.
-
-Wed Jun 29 17:17:14 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * nlmconv.c (link_inputs): Fixed memory allocation bug.
-
-Thu Jun 23 12:52:46 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * configure.in: Change --with-targets to --enable-targets.
-
-Tue Jun 21 12:53:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * Makefile.in (sysinfo): Does not depend upon $(ADDL_LIBS).
-
- * nlmconv.c (powerpc_build_stubs): Don't generate the PowerPC
- NetWare custom header; no longer needed.
- (powerpc_mangle_relocs): Convert relocs against the uninitialized
- data section into relocs against the data section.
-
- * configure.in: Set nlmconv_defs to -DNLMCONV_cputype for all the
- netware targets. Write it into Makefile as NLMCONV_DEFS.
- * Makefile.in (nlmconv.o): Pass $(NLMCONV_DEFS) to $(CC).
- * nlmconv.c: Only compile code for specific CPU types if
- NLMCONV_cputype is defined.
-
- * nlmconv.c (main): Change uses of bfd_abs_section, etc., to use
- bfd_abs_section_ptr or bfd_is_abs_section, etc.
- (i386_mangle_relocs, alpha_mangle_relocs): Likewise.
- (powerpc_build_stubs): Likewise.
- * nm.c (filter_symbols, print_symbols): Likewise.
- * objcopy.c (filter_symbols): Likewise.
- (mark_symbols_used_in_relocations): Likewise.
- * objdump.c (remove_useless_symbols, dump_relocs): Likewise.
- * size.c (sysv_internal_printer): Likewise.
-
-Mon Jun 20 16:43:03 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * Makefile.in (MANPAGES): Remove $(DEMANGLER_PROG).
- (install): Install it explicitly, from build dir, not srcdir.
-
-Mon Jun 20 16:29:54 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * objdump.c: Don't include elf/internal.h.
- (bfd_elf_find_section): Don't declare.
- (read_section_stabs): No special handling for ELF. Always read
- using BFD sections.
-
-Thu Jun 16 17:25:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Set UNDERSCORE in Makefile based on result of
- invoking config.bfd with a second argument of ``_''.
- * Makefile.in (underscore.c): Depend upon Makefile. Don't try to
- run $(CC) and $(NM), just use $(UNDERSCORE). Create via temporary
- file.
- (demangle.o): Remove target.
- ($(NM_PROG)): Don't depend upon demangle.o, and don't link against
- demangle.o. It's in libiberty anyhow.
- (cplus-dem.o): Don't depend upon demangle.o.
- * binutils.texi: Mention -n and --no-strip-underscores arguments
- to c++filt.
-
-Wed Jun 15 12:10:31 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nm.c (long_options): Add --no-demangle to turn off --demangle,
- and --no-cplus for Linux compatibility.
- (usage): Mention --no-demangle.
- * binutils.texi: Document --no-demangle.
-
-Fri Jun 10 15:41:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nm.c: HOST_64_BIT was renamed to BFD_HOST_64_BIT.
-
- * objcopy.c (copy_archive): Make the temporary directory in the
- same directory as the output BFD, since we may not have write
- permission on the current directory. Set the permissions of the
- new directory to 0700, not 0777.
-
-Mon Jun 6 21:36:43 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
-
- * configure.in: if this is an rs6000 (and we're not building for
- any other bfd targets) then build only nm (collect needs it on
- rs6000-lynx).
-
- * Makefile.in: define TOOL_PROGS which the list of programes to
- install in $tooldir -- replaces a hard-coded list.
-
-Fri Jun 3 10:59:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (display_target_list): Remove unused local ok.
-
-Thu May 26 18:05:52 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * config/mh-alphaosf (CFLAGS): Don't specify both -g and -O;
- they're not compatible under native cc. Use -O1 instead.
-
- * Makefile.in (VERSION): Updated to cygnus-2.4.1.
-
- Changes from binutils-2.4 net release:
-
- * Makefile.in (MANPAGES): Use $(DEMANGLER_PROG).
- ($(DEMANGLER_PROG).1): Build from cxxfilt.man, using sed.
- * cxxfilt.man: Renamed from c++filt.1, replaced "c++filt" with
- magic token to be replaced by sed.
-
- Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
-
- * configure.bat: update for latest makefile.in
-
-Fri May 13 23:25:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bucomm.c: Check ANSI_PROTOTYPES rather than __STDC__.
-
-Tue May 10 18:22:06 1994 Jason Molenda (crash@sendai.cygnus.com)
-
- * objcopy.c (copy_section): Set section size correctly if using
- interleave.
-
-Sat May 7 16:49:36 1994 Steve Chamberlain (sac@cygnus.com)
-
- * Makefile.in: Add rule for sysinfo.h
-
-Fri May 6 12:18:33 1994 Steve Chamberlain (sac@cygnus.com)
-
- * Makefile.in (SRCONV_PROG): Define.
- (PROGS): Use $(SRCONV_PROG) too.
-
-Thu May 5 19:41:43 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * Makefile.in (DISTSTUFF): Add sysinfo.c, syslex.c, in case
- someone configures with `targets=all'.
- (distclean): Remove y.*.
- (syslex.o): Depend on sysinfo.h.
- (sysinfo.c): Rename y.tab.h to sysinfo.h.
- (install-info): Don't try to install into $(infodir)/$(srcdir).
- * syslex.l: Include sysinfo.h, not y.tab.h.
-
-Thu May 5 11:50:55 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * syslex.l (yywrap): Define as function if not defined as a macro.
-
- * Makefile.in (objdump.o): Deleted special rule.
- * configure.in: Don't bother building ARCHDEFS variable for
- Makefile.
- * objdump.c (ARCH_*): Deleted handling.
- (disassemble_data): Call `disassembler' from opcodes library.
-
-Thu May 5 13:28:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (install): Correct handling of $(tooldir) and
- $(bindir) being on different devices.
-
-Fri Apr 29 09:50:38 1994 Steve Chamberlain (sac@cygnus.com)
-
- * sysdump.c (h8300, sh): Add declarations.
-
-Wed Apr 27 11:25:18 1994 Steve Chamberlain (sac@cygnus.com)
-
- * Makefile.in (syslex, sysinfo): Use CC_FOR_BUILD.
- * coffdump.c, coffgroc.c, coffgrog.h, srconv.c, sysdump.c,
- sysroff.info: Major changes.
-
-Tue Apr 26 18:18:24 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * objdump.c (print_section_stabs): Indicate the stab header symbol
- more clearly, print numbers of unrecognized stab n_type values.
-
-Tue Apr 26 16:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (copy_sections): Copy arelent pointers, not arelents.
-
-Mon Apr 25 16:14:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (distclean): Remove $(PROGS) and underscore.c.
-
-Fri Apr 22 11:14:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (setup_sections): Remove special handling of .reginfo
- section.
- (copy_sections): Likewise.
- (alpha_mangle_relocs): Use bfd_ecoff_get_gp_value rather than the
- special ECOFF .reginfo section.
-
- * objcopy.c (copy_object): Call bfd_copy_private_bfd_data after
- copying everything else, to let it fiddle with the file in its
- final state.
-
- * objdump.c: Include libiberty.h.
- (display_target_list): If a format fails, just go on to the next
- one. Check return value of bfd_set_format.
- (display_info_table): Likewise. Don't increment loop variable in
- for loop test, since that skips the first element.
- (display_target_tables): Rewrite loop for clarity. Ensure that it
- always prints at least one element.
-
- * nlmconv.c (main): Use CyGnUsEx rather than CyGnUsSeCs for
- sections header. Rename from cygnus_sections to cygnus_ext.
-
-Thu Apr 21 12:12:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (_DUMMY_NAME_): Don't define.
- (display_target_list): Use tmpnam to get a file name rather than
- using _DUMMY_NAME_. Unlink it when done.
- (display_info_table): Likewise.
-
- * nlmconv.c (secsec): New static variable.
- (main): Create .nlmsections section in output BFD. Store
- information about it in sections header.
- (setup_sections): Allocate space in sections header.
- (copy_sections): Copy zero sized sections. Put information about
- each section in the sections header.
-
-Wed Apr 20 14:34:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (powerpc_build_stubs): Take new outbfd argument.
- Change caller. Create custom header for new PowerPC NetWare
- format.
-
- * Makefile.in (nlmheader.o, nlmconv.o): Update dependencies.
- * nlmconv.c: Include bfd.h and libiberty.h with "", not <>.
- * nlmheader.y: Include bfd.h with "", not <>.
-
-Wed Apr 13 10:52:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c: Do an ifdef on __GO32__, not unix.
-
-Wed Apr 6 21:54:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Added -D (--dynamic) option to nm and -T (--dynamic-syms) and -R
- (--dynamic-reloc) arguments to objdump.
- * nm.c (dynamic): New static variable.
- (long_options): Added "dynamic".
- (usage): Mention -D and --dynamic.
- (main): Add D to getopt string. Handle -D by setting dynamic.
- (display_rel_file): If dynamic is non-zero, read dynamic symbols
- rather than normal symbols.
- * nm.1: Updated for -D (--dynamic) option.
- * objdump.c (dump_dynamic_symtab): New global variable.
- (dump_dynamic_reloc_info): New global variable.
- (dynsyms, dynsymcount): New global variables.
- (usage): Mention -R, -T, --dynamic-syms and --dynamic-reloc.
- (long_options): Added "dynamic-reloc" and "dynamic-syms".
- (slurp_symtab): If no symbols, return rather than exit.
- (slurp_dynamic_symtab): New function.
- (display_bfd): Handle dump_dynamic_symtab and
- dump_dynamic_reloc_info.
- (dump_symbols): Take new dynamic argument, indicating whether to
- display dynamic symbols.
- (dump_relocs): Move most printing into dump_reloc_set.
- (dump_dynamic_relocs): New function.
- (dump_reloc_set): New function, extracted from dump_relocs.
- (main): Add R and T to getopt string. Handle -T by setting
- dump_dynamic_symtab and -R by setting dump_dynamic_reloc_info.
- * objdump.1: Updated for -R (--dynamic-reloc) and -T
- (--dynamic-syms) options.
- * binutils.texi: Updated for new nm and objdump options.
-
-Wed Mar 30 15:52:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Update for recent BFD changes to symbol and reloc reading. Rename
- all uses of get_symtab_upper_bound to bfd_get_symtab_upper_bound.
- Also:
- * coffgrok.c (symcount): Change to long.
- (do_sections_p1): Check for error return from
- bfd_get_reloc_upper_bound. Change relcount to long, and check for
- error from bfd_canonicalize_reloc.
- (coff_grok): Change storage to long. Check for error from
- bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
- * nlmconv.c (main): Change symcount, newsymalloc, newsymcount, and
- i to long. Check for error from bfd_get_symtab_upper_bound and
- bfd_canonicalize_symtab.
- (copy_sections): Change reloc_size and reloc_count to long. Check
- for error from bfd_get_reloc_upper_bound and
- bfd_canonicalize_reloc.
- (mangle_relocs, i386_mangle_relocs, alpha_mangle_relocs): Change
- reloc_count_ptr argument to long *. Make corresponding changes to
- variables loaded from *reloc_count_ptr.
- * nm.c (display_rel_file): Change storage and symcount to long.
- Check for errors from bfd_get_symtab_upper_bound and
- bfd_canonicalize_symtab.
- * objcopy.c (filter_symbols): Change symcount, src_count and
- dst_count to long.
- (copy_object): Change symcount to long. Pass another argument to
- fprintf. Check for errors from bfd_get_symtab_upper_bound and
- bfd_canonicalize_symtab.
- (copy_section): Change relcount to long. Check for errors from
- bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
- (mark_symbols_used_in_relocations): Change relcount and i to long.
- Check for errors form bfd_get_reloc_upper_bound and
- bfd_canonicalize_reloc.
- * objdump.c (storage): Remove global variable.
- (symcount): Changed to long.
- (slurp_symtab): New local variable storage. Check for errors from
- bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
- (remove_useless_symbols): Change return value and count to long.
- (objdump_print_address): Change min, max, thisplace and i to long.
- (disassemble_data): Change i to long.
- (dump_symbols): Change count to long.
- (dump_relocs): Change relcount to long. Check for errors from
- bfd_ret_reloc_upper_bound and bfd_canonicalize_reloc.
- (display_info_table): Add casts when passing LONGEST_ARCH for
- printf %* argument.
-
-Tue Mar 29 14:59:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nm.c (display_archive): Close each archive element after it has
- been displayed.
- * objdump.c (display_file): Likewise.
-
-Mon Mar 28 13:04:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Change error message to refer to bfd/config.bfd
- rather than bfd/configure.in.
-
-Sun Mar 27 16:23:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * More fixes for object formats which allow multiple sections
- with the same name:
- * objcopy.c (setup_section): Make a new output section even if
- one already exists with the given name.
- (copy_section): Use isection->output_section rather than trying
- to look the output section up by its (possibly non-unique) name.
-
- * Makefile.in (install-info): Look for binutils.info in the
- current directory, then in $(srcdir). Don't use $<.
-
-Mon Mar 21 12:55:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (objdump_print_address): Make static. Declare with
- prototype. Change vardiff from int to bfd_signed_vma. Correct
- binary search termination condition. When looking for same
- section symbol in relocatable file, handle final symbol correctly.
-
-Sun Mar 20 11:26:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * Makefile.in: Avoid bug in hpux sed.
-
- * objcopy.c: Changes to keep it from stripping symbols used
- in output relocations.
- (mark_symbols_used_in_relocations): New function. Mark symbols
- used in output relocations with BSF_KEEP.
- (filter_symbols): Do not strip symbols marked with BSF_KEEP.
- (copy_object): Reorder actions. First setup sections, then
- build the output symbol table, then copy the section contents.
-
-Fri Mar 18 10:53:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ar.c (write_archive): Allocate space for the null byte. From
- Robert Lipe <robertl@arnet.com>.
-
-Thu Mar 17 16:20:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in: Built nm.new and strip.new to avoid problems with
- collect when . is in PATH.
- (STRIP_PROG): Change from strip to strip.new.
- (NM_PROG): Change from nm to nm.new.
- (install): Remove the .new when installing.
-
-Wed Mar 16 16:27:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (powerpc_build_stubs): Set BSF_DYNAMIC flag for each
- symbol for which we build a stub.
- (powerpc_mangle_relocs): Only reset TOC pointer for a call to a
- symbol with BSF_DYNAMIC flag set.
-
-Tue Mar 15 23:04:13 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * objcopy.c (filter_symbols): Use bfd_is_local_label to determine
- if a symbol represents a compiler-generated local label.
- (copy_object): Give the BFD backends a chance to copy any private
- bfd data from the input BFD to the output BFD.
- (setup_section): Give the BFD backends a chance to copy any private
- section data from the input section to the output section.
-
-Mon Mar 14 11:15:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * objcopy.c (mangle_section): Delete unused function.
- (setup_section): Set osection here instead of calling
- mangle section to do it.
-
-Mon Mar 14 12:11:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ar.c (write_archive): Close inarch before unlinking it.
-
-Fri Mar 11 22:20:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (main): For PowerPC, call powerpc_build_stubs and
- powerpc_resolve_stubs. Use __GOT0, not __toc_start. Handle it if
- the start and end symbols are not in the text section.
- (struct powerpc_stub): New struct definition.
- (powerpc_stubs, powerpc_stub_insns): New static variables.
- (powerpc_initial_got_size): New static variable.
- (powerpc_build_stubs): New function.
- (powerpc_resolve_stubs): New function.
- (powerpc_mangle_relocs): Clear extraneous data in .got section.
- Rearrange reloc handling to handle ELF relocs that are not
- partial_inplace. Resolve PC relative relocs.
-
-Wed Mar 9 13:48:11 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ar.c (move_members): Fix it so that the abi positional modifiers
- don't delete all archive members following the insert point.
-
-Tue Mar 8 13:14:43 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * coffgrok.[ch]: New files, understand coff objects.
- * coffdump.c: Uses coffgrok to dump out the debug info of a coff
- file.
- * sysroff.info: Description of a SYSROFF object file.
- * sysinfo.y, syslex.l: Parse info file, generate a reader, writer,
- header files and a printer.
- * srconv.c: Uses coffgrok.c and sysroff.info to convert a coff
- file to a SYSROFF file.
-
-Sat Feb 26 13:35:26 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * ar.c (do_quick_append): Pad with a genuine character 10,
- rather than whatever '\n' might happen to be.
-
-Tue Feb 22 18:25:52 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * nlmconv.c (main): Ignore debugging symbols when looking for
- special symbols by name.
-
-Sun Feb 20 18:47:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
-
- * nlmconv.c: Include libiberty.h.
-
- Support for PowerPC NetWare.
- * nlmconv.c (main): For PowerPC NetWare, automatically define the
- special symbols __toc_start.
- (select_output_format): Handle bfd_arch_powerpc.
- (mangle_relocs): Likewise.
- (powerpc_mangle_relocs): New function.
-
-Thu Feb 17 09:28:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ar.c, bucomm.c, nlmconv.c, nm.c, objcopy.c, objdump.c,
- size.c: Use bfd_get_error and bfd_set_error and new error names.
-
-Fri Feb 11 15:54:51 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * objcopy.c (strip_main, copy_main): Add missing 'break' in switch.
-
-Mon Feb 7 19:45:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (disassemble_data): Handle bfd_arch_powerpc.
-
-Sun Feb 6 22:08:20 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * strings.c objdump.c nlmconv.c objcopy.c nm.c ar.c size.c (main):
- Call xmalloc_set_program_name.
-
-Fri Feb 4 10:46:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * objcopy.c (filter_bytes): Make MEMHUNK a char *, not PTR, so we
- can do arithmetic on it.
-
-Thu Feb 3 14:06:41 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * objdump.c (dump_section_stabs, read_section_stabs,
- print_section_stabs): Functions broken out of dump_stabs_1.
- Free the stabs and strings when done with them.
-
-Wed Feb 2 13:42:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * nlmconv.c (main): Use bfd_get_flavour instead of struct member.
- * ar.c (print_contents, extract_file), size.c
- (print_berkeley_format, print_sysv_format): Use bfd_get_filename and
- bfd_my_archive instead of dereferencing the structs directly.
-
- * ar.c: Use bfd_fatal and bfd_nonfatal instead of bfd_perror and exit.
- Indent. Remove DEFUNs.
-
- * nlmconv.c (main), objcopy.c (copy_file): Print matching formats
- if ambiguous match.
- * nm.c (display_file, display_archive), size.c (display_bfd):
- Eliminate gotos.
- Print matching formats if there is an ambiguous match. Use
- bfd_nonfatal instead of hardcoded error message if nothing matches.
-
- * arsup.c, ar.c, objdump.c: Use bfd_get_filename instead of
- abfd->filename.
-
- * nm.c (display_archive): New function, from code in display_file.
- (display_rel_file): Renamed from do_one_rel_file.
-
- * size.c: Indent.
- (display_archive): New function from code in display_file.
- (display_file): Check bfd_close error return.
-
- * strings.c (strings_object_file): Check bfd_check_format
- error return.
-
- * strings.c, objdump.c, size.c: Use bfd_nonfatal instead of bfd_perror.
-
- * bucomm.c: Delete references to exit_handler. It wasn't set
- anywhere, and now that we're using the libiberty xmalloc, it
- wouldn't always get called before exiting.
- (list_matching_formats): Function moved from objdump.c.
- * bucomm.h: Declare it.
-
- * objdump.c (disassemble_data): Move some variable decls closer to
- their use. Add some comments. Replace a nested block with a
- return.
-
-Mon Jan 31 18:50:41 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * objdump.c (display_target_list, display_info_table): Check that
- the bfd of the dummy output file is not null.
-
-Wed Jan 26 13:13:18 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * objcopy.c (filter_bytes): New function.
- (copy_section): Call it.
- (copy_options, copy_usage, copy_main): Add --byte option to
- activate it. Appropriate the -b option (which was an undocumented
- synonym for -F) for it, also. Add --interleave, -i option for
- additional control.
- (setup_section, copy_section, mangle_section): Renamed with no `s'
- on the end.
- * objcopy.1, binutils.texi: Document the new options.
-
- * objdump.c (display_target_tables, display_target_list):
- New functions broken out of display_info.
- Eliminate some magic constants. Use more meaningful variable names.
- (dump_bfd_header): New function broken out of display_bfd.
- (dump_section_header): New function broken out of dump_headers.
- (remove_useless_symbols): Don't shadow global variable name with
- parameter.
- (objdump_print_address): Fix backward test.
-
-Tue Jan 25 19:40:54 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * bucomm.c (print_arelt_descr): Change decl of `when' to time_t.
- * objdump.h: Removed.
-
-Mon Jan 24 13:29:02 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * objdump.c (display_file): Remove call to list_matching_formats.
- It would never be called.
- (list_matching_formats): Take an arg giving the list of matching
- formats.
- (display_bfd): Pass the arg, and get it filled in by calling
- bfd_check_format_matches instead of bfd_check_format.
- (display_info, display_info_table): target_vector was renamed to
- bfd_target_vector.
-
- * binutils.texi (objdump): Note some limitations of -h section
- address printing.
-
-Sat Jan 22 16:20:46 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (MALLOC): Set to emptiness by default.
- (ALL_CFLAGS): Add and use.
- (arparse.h): Make it depend on arparse.y.
- * ar.c (libbfd.h): Don't require to be in ../bfd.
- * objdump.c (comp): Rename to compare_symbols.
-
-Fri Jan 21 20:22:30 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * objdump.c (list_matching_formats): If the file format is ambiguous,
- print the matching names so the user can choose one.
- (display_bfd): Call it.
- (display_file): Call it.
-
-Fri Jan 21 19:17:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (disassemble_data): Support bfd_arch_rs6000.
-
-Mon Jan 17 13:57:25 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * objdump.c (stab_name): Allocate dynamically.
- (stab_print): Use pointers to strings instead of char arrays.
- (dump_stabs): Change alloc and init of arrays appropriately.
- (dump_stabs_1): Always decide whether to print stab_name or
- the stab's type number, if unnamed.
-
-Fri Jan 14 14:42:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objcopy.c (strip_main, copy_main): Don't clobber the input file
- if copy_file fails.
-
- * nlmconv.c (main): Warn about an attempt to use a shared library
- with uninitialized data.
-
- * nlmconv.c (setup_sections): Make sure that we align the
- output_offset of each input section appropriately.
-
-Thu Jan 13 17:32:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (dump_relocs): Don't crash if section name is NULL.
-
-Tue Jan 11 19:46:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * filemode.c (filemodestring): Commented out; not used.
- (mode_string): Use POSIX definitions.
- (ftypelet): Likewise.
- (rwx): Removed; no longer used.
- * bucomm.c: Include bucomm.h.
- (bfd_nonfatal, bfd_fatal): Argument is const.
- (fatal): Make __STDC__ version.
- * bucomm.h (mode_string): Declare.
- * Makefile.in (bucomm.o): Depend upon bucomm.h
-
-Sun Jan 9 12:03:20 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * bucomm.c (xmalloc, xrealloc): Deleted.
- * bucomm.h (xmalloc, xrealloc): Fix prototypes, to correspond to
- libiberty version of functions.
-
-Thu Jan 6 06:18:15 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * binutils.texi: Add a chapter summarizing the ways to select
- aspects of the target for each program.
-
- * objdump.c (long_options, usage): Add long equivalents for all
- remaining short options that lacked them.
- * binutils.texi objdump.1: Document them.
-
- * size.c (usage): Tweak usage message.
- * size.1: Add missing `=' in examples.
-
- * binutils.texi strip.1 objcopy.1 nlmconv.1 objcopy.c nlmconv.c:
- Use "--target=bfdname" as the option to select the BFD target,
- like nm and size already do.
- Reserve "--format=format" for textual output selection options, but
- for now keep old option names as obsolete for backward compatibility.
-
- * strings.c (main, strings_object_file, usage): Add --target option.
- * binutils.texi strings.1: Document it.
-
-Sat Jan 1 13:58:24 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ar.c (main): Add \n in error message.
-
-Thu Dec 23 12:23:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- gcc -Wall lint:
- * ar.c (main): Put parens around assignment used as truth value.
- * objcopy.c (strip_main): Remove unused variables. Return 0.
- (copy_main): Remove unused variables. Return 0.
- * objdump.c (display_bfd): Declare return value as void.
- (stab_print): Use "" instead of 0 to initialize array.
- (dump_stabs_1): Print vma using printf_vma.
- (display_info): Put parens around assignment used as truth value.
- * strings.c (print_strings): Cast printf arguments.
-
- * objcopy.c (copy_main): Use copy_options, not strip_options.
-
- * nlmheader.y (command): Warn about illegal date values.
-
-Wed Dec 15 11:18:03 1993 David J. MacKenzie (djm@frosty.eng.umd.edu)
-
- * bucomm.c bucomm.h: Run through indent. De-ansidecl-ify.
- (bfd_nonfatal): New function.
- (bfd_fatal): Call it.
-
- * objcopy.c (smart_rename): Do a copy if the dest file has
- multiple hard links. Remove source file on successful copy.
- Try to preserve mode and owner on successful rename.
-
- * objcopy.c: Run through indent. Clean up a bit.
- Make global variables static.
- Make {input,output}_{target,filename}, show_version local
- to various functions.
- New global variable `status' for exit status.
- (strip_main, copy_main): New functions with code from main.
- (nonfatal): New macro. Use it globally instead of bfd_perror and
- bfd_fatal.
-
- (copy_object): Call mangle_sections with bfd_map_over_sections.
- (mangle_sections): Adjust for new calling convention.
-
-Fri Dec 10 11:28:11 1993 Ian Lance Taylor (ian@deneb.cygnus.com)
-
- * nlmheader.y (command): Accept MAP and FULLMAP without arguments.
- * nlmconv.c (main): Change error message for MAP and FULLMAP.
-
-Thu Dec 9 17:47:19 1993 Ian Lance Taylor (ian@deneb.cygnus.com)
-
- * nlmconv.c (main): Warn about imported symbols that are not in
- the IMPORT list even if the IMPORT keyword is not used.
-
- * nlmconv.c (debug, unlink_on_exit): New static variables.
- (long_options): Add "debug" and "linker".
- (main): Handle -d and -l arguments. Make command line input and
- output files optional. Parse the command file before opening the
- BFD's, which requires storing more information in local variables.
- If INPUT names multiple files, link them together. Use OUTPUT for
- the output file name if not named on command line.
- (show_usage): Changed for new options.
- (link_inputs): New function to automatically invoke linker to
- handle multiple INPUT files.
- (choose_temp_base_try, choose_temp_base, pexecute): New functions,
- mostly copied from gcc/gcc.c.
- * nlmconv.h (input_files, output_file): Declare.
- * nlmheader.y (input_files, output_file): Define.
- (command): Support INPUT with a string_list argument. Support
- OUTPUT.
- (string_list): Renamed from module_list.
- * Makefile.in (nlmconv.o): Define LD_NAME based on
- program_transform_name.
-
-Wed Dec 8 10:09:04 1993 Ian Lance Taylor (ian@deneb.cygnus.com)
-
- * nlmheader.y (nlmheader_identify): New function. Use it to print
- the program name just once, instead of with every error message.
-
-Mon Dec 6 16:11:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (long_options): Changed --header-info to --header-file
- to match documentation and usage message.
-
-Sun Dec 5 01:31:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * objdump.c (dump_relocs): Avoid dereferencing a NULL sym_ptr_ptr
- in a relocation.
-
-Thu Dec 2 16:00:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (main): Change various types from bfd_size_type to
- size_t, since they have to be arguments to fread and fwrite.
- Change set from char * to unsigned char *.
- (select_output_format): Make mach argument unsigned. Handle
- bfd_arch_alpha.
- (setup_sections): Don't copy the .reginfo section of an ECOFF
- file. Call bfd_set_reloc to initialize the relocation fields.
- (copy_sections): Don't copy the .reginfo section of an ECOFF file.
- Combine all relocs for a section.
- (mangle_relocs): Change type of relocs to permit specific
- functions to change it. Call alpha_mangle_relocs for alpha,
- default_mangle_relocs for other architectures.
- (default_mangle_relocs): New function. Adjust the address of all
- relocs by the output_offset.
- (i386_mangle_relocs): Change type of relocs argument. Cast length
- argument to memmove to size_t.
- (alpha_mangle_relocs): New function.
-
-Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com)
-
- * nlmconv.c (select_output_format): Use nlm32-sparc for
- bfd_arch_sparc.
-
-Wed Nov 17 14:41:35 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com)
-
- * nlmconv.1: added man page
- * objcopy.1: fixed format errors
-
-Wed Nov 17 12:03:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in: Use CFLAGS as well as LDFLAGS when linking.
-
-Wed Nov 17 04:50:55 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * strings.1: Fix typo.
-
-Mon Nov 15 12:03:20 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * Makefile.in (DISTSTUFF): Build "info".
- (VERSION): Updated to cygnus-2.3.1; 2.3 has gone out.
-
-Sun Nov 14 00:27:24 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * objdump.c (dump_stabs): Handle stabs-in-som as implemented
- by the new BFD SOM assembler.
-
-Sat Nov 13 07:14:05 1993 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * ar.1 c++filt.1 nm.1 objcopy.1 objdump.1 ranlib.1 size.1
- strings.1 strip.1: Replace \(em in NAME section with \- so
- makewhatis can grok it.
-
-Tue Nov 9 15:22:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (i386_mangle_relocs): Adjust reloc address by
- section output_offset.
-
-Fri Nov 5 12:11:52 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com)
-
- * binutils.texi: added nlmconv chapter
-
-Wed Nov 3 16:10:50 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: Change RUNTESTFLAGS to RUNTEST_FLAGS
-
-Wed Nov 3 15:09:23 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * Makefile.in (distclean): Don't get rid of dvi or info files.
-
-Tue Nov 2 13:29:59 1993 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * objcopy.c (S_ISLNK): Define as 0 if there's no S_IFLNK.
-
-Fri Oct 29 16:02:34 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * binutils.texi: Move objcopy docs into alphabetical order.
-
- * objdump.c: Use xmalloc instead of malloc.
-
-Fri Oct 29 11:11:14 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * objdump.c (info): Rename to formats_info.
- (dump_stabs_1): Better comments and formatting.
-
-Thu Oct 28 19:43:16 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * ar.c (main): Always create the archive when quick appending,
- even if no input files have been given.
-
-Wed Oct 27 12:03:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (main): Set sharedDebugRecordOffset and
- sharedDebugRecordCount fields in extended header.
-
- * nlmconv.c (main): Force moduleName field to upper case.
-
-Mon Oct 25 16:45:42 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objcopy.c (main): Give a usage message if there are too many
- arguments.
-
-Mon Oct 25 10:37:08 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * Makefile.in (install-info): Rewrite to take advantage of VPATH,
- so FSF distributions (with info files in $(srcdir)) install
- properly.
- (DISTSTUFF): Build nlmheader.c too.
-
-Fri Oct 22 11:43:23 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * ar.c (program_name): Don't define here.
- * objdump.c: Include "bucomm.h".
- (xmalloc): Don't declare here.
- (program_name): Don't define here.
- (program_version): Fixed type in declaration.
- * size.c: Include "bucomm.h".
- (program_name): Don't declare here.
-
-Fri Oct 22 14:10:41 1993 Mark Eichin (eichin@cygnus.com)
-
- * objdump.c (fprintf): hide declaration in FPRINTF_ALREADY_DECLARED
-
-Fri Oct 1 12:43:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (i386_mangle_relocs): Resolve and remove PC relative
- relocs against defined symbols in the same section.
-
-Thu Sep 30 16:46:26 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * Makefile.in (binutils.dvi): use TEXIDIR to find texinfo.tex
-
-Sat Sep 25 18:09:29 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * objcopy.c (simple_copy, smart_rename): New functions.
- (main): Use them.
-
-Fri Sep 24 15:38:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (clean, distclean): Recurse into testsuite.
-
-Thu Sep 23 01:05:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objcopy.c (setup_sections, copy_sections): If stripping, don't
- copy SEC_DEBUGGING sections.
- * objdump.c (dump_headers): Print SEC_DEBUGGING flag.
-
- * objdump.c (usage): Mention --stabs.
-
- * objcopy.c (copy_object): Copy all applicable file flags.
- (copy_file): Don't copy EXEC_P specially here.
-
-Mon Sep 20 19:28:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (main): Adjust data section size to correspond to bss
- alignment adjustment. Clear BSF_SECTION_SYM if symbol is moved to
- a different section. Use time_t for time variable.
- (setup_sections): Only put sections with contents in output NLM.
- (i386_mangle_relocs): No symbols are common at this point. Add
- casts to avoid warnings.
-
-Fri Sep 10 11:00:40 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * objdump.c: Made the --stabs option work for stabs-in-coff.
- (ELF_STAB_DISPLAY): Removed.
- (dump_elf_stabs): Renamed to dump_stabs, changed to run for
- any object file format.
- (dump_elf_stabs_1): Renamed to dump_stabs_1, added calls to
- generic BFD routines for non-ELF case, changed format of message
- for no-section-found case.
- (display_bfd): Always call dump_stabs if requested.
- (dump_data): Call bfd_section_size to get section size.
-
-Fri Sep 10 08:12:23 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in (install): Don't put strings in tooldir/bin.
-
-Mon Sep 6 15:39:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (total_bss_size): Removed.
- (main): Set the bss vma to always follow the data section. Move
- symbols into new sections, and adjust values by output_offset.
- (setup_sections): Don't copy all sections, but instead point all
- text sections to .text, all data sections to .data, and all bss
- sections to .bss.
- (copy_sections): Adjust accordingly.
-
-Thu Sep 2 12:34:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Only build nlmconv if configured for a NetWare target.
- * configure.in: If we have some *-*-netware* target, or are using
- all targets, set BUILD_NLMCONV to $(NLMCONV_PROG) in Makefile.
- * Makefile.in (PROGS): Use $(BUILD_NLMCONV) rather than
- $(NLMCONV_PROG).
-
-Tue Aug 31 14:13:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * objdump.c (ARCH_all): Define ARCH_hppa too.
- (dump_headers): Don't test for SEC_BALIGN if it's not defined by
- bfd.h.
-
-Tue Aug 31 13:29:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * nlmconv.c (main): Force creation of .bss section. Set up the
- sections before looking at the symbols. Move all common symbols
- into .bss section. Automatically define _edata and _end. Only
- export symbols in the export list, with multiple prefixes if
- necessary. Warn if no version. Always create extended header.
- Set date automatically if not already set.
- (setup_sections): Count size of bss sections.
- (mangle_relocs, i386_mangle_relocs): Accept section argument, and
- take reloc_count as a changeable pointer; changed callers.
- (i386_mangle_relocs): Remove PC relative relocs within a section,
- as they require no adjustment.
- * nlmheader.y: Fixed memory allocation throughout: token STRING is
- now allocated on the heap, and freed if not needed. Null
- terminated copyright message. Accept version with only two
- strings.
- (symbol_list_opt): New nonterminal, either symbol_list or empty.
- (symbol_list): Use left recursion to avoid overflowing parser
- stack.
- (yylex): Rearranged beginning of line check. Accept quoted
- strings using single quotes. End generic argument at comment
- character or parentheses.
- (string_list_append): Fixed.
- (string_list_append1): New function.
-
- * bucomm.h: The first argument to xrealloc is PTR, not char *.
- * bucomm.c (xrealloc): Use PTR rather than char *.
- * Makefile.in (objdump.o): Depend upon config.status to notice
- --with-targets changes.
- (nlmconv.o): Depend upon bucomm.h.
-
-Tue Aug 17 09:46:01 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * configure.in: Don't pass cpu to config.bfd.
-
-Thu Aug 12 16:43:04 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in ($(NM_PROG)): Depend on demangle.o.
- (demangle.o): New target.
- (cplus-dem.o): Depend on it, to force compilation order when doing
- parallel compiles.
-
- * nm.c (print_symbol_info_{bsd,sysv,posix}): Take a bfd arg.
- (struct output_fns print_symbol_info): Ditto.
- (long_options, usage, main): Add -C --demangle option.
- (print_symname): New function, demangling if requested.
- (print_symbols, print_symbol_info_{bsd,sysv,posix}): Use it.
-
-Wed Aug 11 22:57:23 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in: Put CFLAGS last in compilation rules and omit from
- linking rules. Use ARCHDEFS to compile objdump.c.
- Update dependencies.
- * configure.in: Construct ARCHDEFS based on the BFD target makefile
- fragments.
- * objdump.c: Conditionalize calls to the print_insn_ARCH functions
- according to ARCHDEFS.
-
-Thu Aug 12 08:06:15 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ar.c: Removed obsolete and non-functional GNU960 code.
-
-Wed Aug 11 13:08:26 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * size.c (berkeley_sum): New function.
- (bsssize, datasize, textsize): New global variables.
- (bss_section_name, data_section_name, text_section_name): Removed.
- (print_berkeley_format): Map berkeley_sum over all the sections,
- rather than only reporting sizes of specifically named sections.
- * Makefile.in ($(OBJDUMP_PROG)): Removed dependency on size.o.
-
-Tue Aug 10 10:46:01 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * nlmconv.c, nlmconv.h, nlmheader.y: New files for program to
- convert object files into NetWare Loadable Modules.
- * Makefile.in (NLMCONV_PROG): New macro, define to be nlmconv.
- (PROGS): Add NLMCONV_PROG.
- (nlmheader.c, nlmheader.o, nlmconv.o, $(NLMCONV_PROG)): New
- targets.
-
-Thu Aug 5 15:48:32 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * Makefile.in: define MAKEOVERRIDES to an empty string
-
-Wed Aug 4 17:08:08 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * objcopy.c (copy_file): Make failures to process a file nonfatal.
-
-Mon Aug 2 11:28:23 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * nm.c: Add -B option, like --format=bsd.
-
-Tue Jul 27 16:29:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objcopy.c (copy_file): If the file is neither an object nor an
- archive, give an error rather than returning success.
-
-Mon Jul 19 16:13:40 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * objdump.c (objdump_print_address): Prefer non-local symbols over
- local ones, and especially discriminate against debugging symbols.
- Also, for relocateable files, try to find a symbol in the current
- section, instead of picking one from some random section with a
- convenient value (read, section offset).
- (disassemble_data): Cast argument to malloc to size_t first.
- (dump_data): Likewise.
- (dump_relocs): If a single section name is specified, show relocs
- only for that section. Otherwise, silently omit sections without
- relocs. Format table nicely even if values are printed using 16
- digits instead of 8.
-
-Fri Jul 16 15:19:59 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * nm.c: Changes for final version of POSIX.2.
- (print_symbol_filename_{bsd,sysv,posix}): New functions.
- (formats): Add an element for a pointer to them.
- (print_symbols): Call it.
- (print_object_filename_posix, print_archive_member_posix): Produce
- output according to new POSIX.2 spec.
-
- * strings.c (print_strings): Handle STREAM being NULL.
- (strings_a_section): Pass a NULL.
- (main): Don't open /dev/null.
-
-Thu Jul 15 12:44:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (disassemble_data): Handle the m88k.
- (display_bfd): Use bfd_errmsg, rather than just claiming that the
- bfd is not an object file.
-
-Mon Jul 12 17:55:34 1993 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in (TAGS): make work again by naming directories
- explicitly rather than depending on undefined macros.
- (INSTALL_XFORM): correct bad install target.
-
-Fri Jul 2 16:58:34 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * strings.c: Doc fixes.
-
-Sun Jun 27 13:35:24 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in: Note dependencies on bucomm.h.
- (cplus-dem.o): Link c++filt with version.o.
-
- * strings.c: Include bucomm.h and add prototypes to other decls.
- Remove -h option.
-
- * bucomm.h: Declare xrealloc.
-
- * nm.c, objcopy.c, objdump.c, size.c, strings.c (main, usage): Add
- --help option. Put "GNU" in the version message.
- (usage): Take stream and exit status as args.
- (main): Pass new args to usage.
-
-Fri Jun 25 23:12:12 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * strings.c, strings.1: New files.
- * binutils.texi: Document strings.
- * Makefile.in: Add rules for it.
-
-Fri Jun 25 20:44:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * objdump.c: Use size-independent bfd elf section names.
-
-Sun Jun 20 23:09:06 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * objdump.c (objdump_print_address): Handle wide offsets by
- calling sprintf_vma.
-
-Fri Jun 18 14:29:12 1993 Per Bothner (bothner@deneb.cygnus.com)
-
- * objdump.c (syms2): Removed unused variable.
- * objdump.c (remove_useless_symbols): New function.
- * objdump.c (comp): Simplify.
- * objdump.c (dis-assemble_data): Make simpler and more
- efficient how we filter out useless symbols: Just filter
- BEFORE the sort (using remove_useless_symbols).
- * objdump.c (objdump_print_address): Simplify.
- Change output syntax to match gdb.
-
-Thu Jun 17 16:53:56 1993 david d `zoo' zuhn (zoo@cygnus.com)
-
- * Makefile.in: canonicalize install.sh; for use within
- this directory (and subdirs)
-
-Mon Jun 14 12:13:22 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
-
- * Makefile.in (install, install-info): remove parentdir support,
- use INSTALL_XFORM; define INSTALL_XFORM
-
-Thu Jun 10 17:29:21 1993 Per Bothner (bothner@cygnus.com)
-
- * objcopy.c (copy_object): Fix bad size passed to xmalloc().
-
-Mon Jun 7 12:41:12 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
- * configure.in: No longer need to configure to get sysdep.h.
- * objcopy.c (copy_object): Fix symbol table handling.
-
-Fri Jun 4 17:20:03 1993 Per Bothner (bothner@cygnus.com)
-
- * objcopy.c (filter_symbols): Cannot filter the symbols
- in place, because that confuses the relocs, so take separate
- parameter for output array.
- * objcopy.c (sympp): Make two variables: isympp and osympp.
- * objcopy.c (copy_object): Allocate separate array (osympp)
- for filtered symbols.
-
-Fri Jun 4 10:51:44 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: change recursion test to presence of a configured
- testsuite directory
-
-Thu Jun 3 14:05:57 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (underscore.c): Hack the backquoted command so it
- doesn't cause Solaris make to bomb.
-
-Thu Jun 3 10:40:19 1993 Jeffrey Osier (jeffrey@cygnus.com)
-
- * Makefile.in: added c++filt and objcopy to MANPAGES variable
-
-Thu Jun 3 00:32:52 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: rename LOADLIBES to EXTRALIBS
-
-Wed Jun 2 18:30:24 1993 Jeffrey Osier (jeffrey@cygnus.com)
-
- * c++filt.1, objcopy.1: new man pages
-
-Fri May 28 15:01:24 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in (install): Also install ar and ranlib in
- $(tooldir)/bin; needed for building libgcc.a.
- * objdump.c (objdump_print_address): Fix the check
- "coincidental" label matches by dis-allowing undefined
- or com symbols.
-
-Thu May 27 16:58:31 1993 Jeffrey Osier (jeffrey@cygnus.com)
-
- * biutils.texi: revised c++filt chapter
-
-Wed May 26 17:24:17 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (FLAGS_TO_PASS): Pass down CC and CFLAGS.
-
-Tue May 25 00:26:47 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * objdump.c (slurp_symtab): Print warning for bad symbol table.
- (bfd_elf32_find_section, Elf32_Internal_Shdr): Updated
- declarations and uses.
-
- * Makefile.in (DISTSTUFF): Don't build binutils.mm.
-
-Fri May 21 10:51:19 1993 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * nm.c: Add -f/--format, -P/--portability, -t/--radix options.
- Make global variables static.
- (main): Make -v like -n, not -V, and make -A like -o, for POSIX.2.
- (set_print_radix, set_output_format,
- print_{object_filename,archive_filename,archive_member,symbol_info}
- {bsd,sysv,posix}): New functions.
- (display_file, print_symbols): Call them.
-
- * ar.c: Improve error messages.
-
- * nm.c (main): Handle long options that just set a flag.
-
- * nm.c (main), ar.c (do_show_version), objcopy.c (main), size.c
- (main): Exit after printing the version number, per the GNU coding
- standards.
-
-Mon May 17 13:20:25 1993 Per Bothner (bothner@cygnus.com)
-
- * README, Makefile.in: Minor updates for 2.2.
-
-Fri May 14 11:12:26 1993 Per Bothner (bothner@cygnus.com)
-
- * Makefile.in (underscore.c): Automatically generate
- (using nm) a file with the variable prepends_underscore.
- * Makefile.in (c++filt): Link underscore.o with cplus-dem.o
- so that initial underscores get removed iff appropriate.
- * binutils.texi: Preliminary documentation for c++filt.
- * Makefile.in, binutils.texi: Set to version 2.2.
-
- * NEWS: Mention copy->objcopy renaming and new c++filt program.
-
-Wed May 12 12:05:36 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (cplus-dem.o, $(DEMANGLER_PROG)): Build the
- demangler via cplus-dem.o, rather than directly from the .c file.
-
- * objcopy.c: Renamed from copy.c, updated comments accordingly.
- * Makefile.in, binutils.texi: Renamed copy to objcopy.
- * is-strip.c, maybe-strip.c, not-strip.c: Updated comments for
- rename of copy to objcopy.
-
-Mon May 10 17:20:18 1993 Per Bothner (bothner@cygnus.com)
-
- * binutils.texi (strip, -v option): Fix typo.
-
-Fri May 7 13:57:50 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (RUNTEST): Define.
- (FLAGS_TO_PASS): Pass down RUNTEST.
-
-Tue May 4 10:06:50 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (DEMANGLER_PROG): Name it c++filt.
- (PROG): Also build and install COPY_PROG.
-
-Mon May 3 19:11:48 1993 Per Bothner (bothner@cygnus.com)
-
- * Makefile.in: Change definition of $(tooldir) to match FSF.
-
-Wed Apr 28 23:41:32 1993 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * size.c (usage): Add missing options.
- (main): Clean up option parser.
-
- * objdump.c (usage): Add missing options.
- (display_file): Print program name before calling
- bdf_perror.
-
- * nm.c (usage): Add missing options.
- (main): Clean up option parser.
- (display_file): Print program name before calling
- bdf_perror.
-
- * copy.c (copy_usage, strip_usage): Add missing options.
-
- * ar.c (usage): New function.
- (main): Call it.
- (open_inarch, do_quick_append): Print program name before calling
- bdf_perror.
-
-Thu Apr 22 15:01:35 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * nm.c (main): Accept and ignore -A and -B for MIPS compatibility.
-
-Mon Apr 19 14:06:59 1993 Rob Savoye (rob@cygnus.com)
-
- * Makefile.in: Added FLAGS_TO_PASS so tests get run on freshly
- built binaries if they exist. (otherwise the path)
-
-Wed Apr 7 22:22:50 1993 Rob Savoye (rob@cygnus.com)
-
- * Makefile.in: Changed check target to use DejaGnu.
-
-Thu Apr 1 12:37:13 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * Makefile.in: Remove am29k-pinsn.c, i960-pinsn.c.
- objdump.c: a29k and i960 are `disassemble' not `print'.
-
- * objdump.c: Rename print_address to objdump_print_address
- and change parameters.
- (disassemble_data): Use objdump_print_address.
-
-Wed Mar 31 10:25:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * objdump.c (disassemble_data): print_insn_sparc is now a
- `disassemble' not a `print'.
- Makefile.in: Remove sparc-pinsn.c (now in libopcodes.a).
-
- * objdump.c (disassemble_data): Use new read_memory_func stuff.
-
-Thu Mar 25 10:38:11 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * objdump.c (fprintf): Declaration of variadic function had better
- be a prototype for ANSI C systems.
-
-Mon Mar 22 23:19:46 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: rename test-install to install-check
-
-Fri Mar 19 14:40:08 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * objdump.c (disassemble_data): Add H8500.
-
-Fri Mar 19 10:56:51 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * objdump.c (usage): Mention long options.
-
-Thu Mar 18 14:22:17 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * nm.c: Modify behavior of -o flag for archives to match
- BSD4.4 and Sunos 4: Prefix archive name before each line.
-
- * m68k-pinsn.c: Removed. Subsumed by ../opcodes/m68k-dis.c.
- * i386-pinsn.c: Removed. Subsumed by ../opcodes/i386-dis.c.
- * Makefile.in: Adjust accordingly.
- * objdump.c: Support new-style disassemblers (ones that use
- the interface of ../include/dis-asm.h).
-
-Thu Feb 25 15:57:00 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: When making tar file, remove texinfo/*,
- except for texinfo/texinfo.tex.
- * ardup.c: Add extern declaration of strdup.
- * Makefile.in (testsuite): Add 'else true' since otherwise
- Ultrix /bin/sh complains.
-
-Wed Feb 24 19:44:18 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Set VERSION to 2.1.
- * README, NEWS: Updates.
- * nm.c: Add -v as a synonym for -V.
-
-Tue Feb 23 19:00:50 1993 Mike Werner (mtw@poseidon.cygnus.com)
-
- * configure.in: added testsuite to configdirs.
- * Makefile.in: added support for building testsuite.
-
-Mon Feb 22 22:52:10 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * objdump.c (disassemble_data): Print function names when
- given by bfd_find_nearest_line. If not - still print
- line numbers.
-
-Mon Feb 22 07:54:03 1993 Mike Werner (mtw@poseidon.cygnus.com)
-
- * binutils/testsuite: made modifications to testcases, etc., to allow
- them to work properly given the reorganization of deja-gnu and the
- relocation of the testcases from deja-gnu to a "tool" subdirectory.
-
-Mon Feb 22 10:27:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * objdump.c (dump_data): Free up section contents each time
- through the loop. Reported by minyard@bnr.ca.
-
-Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com)
-
- * binutils/testsuite: Initial creation of binutils/testsuite.
- Migrated dejagnu testcases and support files for testing nm to
- binutils/testsuite from deja-gnu. These files were moved "as is"
- with no modifications. This migration is part of a major overhaul
- of dejagnu. The modifications to these testcases, etc., which
- will allow them to work with the new version of dejagnu will be
- made in a future update.
-
-Fri Feb 12 10:05:20 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (LIBIBERTY_SRC_DIR, LIBIBERTY_BIN_DIR): New macros.
- * Makefile.in (LIBIBERTY): Use LIBIBERTY_BIN_DIR.
- * Makefile.in (DEMANGLER_PROG): New program to build. Add macro
- and rule.
- * Makefile.in (PROGS): Add DEMANGLER_PROG.
-
-Tue Jan 26 11:56:33 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * copy.c, nm.c, objdump.c, size.c: Use new bfd_is_com_section
- macro rather than checking for equality to bfd_com_section.
-
-Fri Jan 8 15:50:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (disassemble_data): Fix code to find first useless
- symbol.
-
-Thu Jan 7 13:13:31 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * objdump.c (disassemble_data): Use mips_print_insn for MIPS.
- Don't core dump if bfd_find_nearest_line returns false.
-
-Wed Jan 6 17:14:01 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * objdump.c (disassemble_data): know how to disassemble z8000s
- too.
-
-Wed Jan 6 15:16:27 1993 Per Bothner (bothner@cygnus.com)
-
- * arsup.h (interactive), bucomm.h (program_name): Prefix
- with 'extern', to avoid warnings from some compilers.
-
-Wed Jan 6 15:14:11 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * arparse.y: fix unnecessary shift/reduce
-
-Tue Dec 22 15:46:56 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Make check depend on all.
- * Makefile.in (distclean): Remove sysdep.h.
- * size.c: Use %u format where appropriate.
- * objdump.c: Standardize: L_SET -> SEEK_SET.
- * objdump.c: Use new macro bfd_asymbol_bfd.
- * configure.in: Allow std-host as the default ${mys_host}.
-
-Thu Dec 17 19:38:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: added dvi target, define and use TEXI2DVI
-
-Tue Dec 15 18:05:07 1992 Per Bothner (bothner@cygnus.com)
-
- * Makefile.in (dist): Fix permissions before release.
- * size.c: Use bfd_size_type (and long) where appropriate.
- * ar.c: Make writing a map the default, to be compatible
- with SYSV and Posix.2. Remove some bogus kludges that
- handled __.SYMDEF directly.
- * NEWS: New file.
-
-Mon Nov 9 13:36:53 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: flex no longer needs the -S flag
-
-Sat Nov 7 15:06:13 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * ar.c (extract_file): utime needs a pointer to a utimbuf
-
- * Makefile.in: handle -I includes better, adding $(BASEDIR)/bfd to
- the list (since some of the bfd/hosts/*.h files include other
- files from that directory)
-
-Fri Nov 6 00:12:51 1992 John Gilmore (gnu@cygnus.com)
-
- * i960-pinsn.c (MEM_MAX, MEM_SIZ): Set upper bound properly.
-
-Thu Nov 5 03:37:15 1992 John Gilmore (gnu@cygnus.com)
-
- Clean up some old BFD ansification macros.
-
- * arsup.h, bucomm.h, objdump.h: Remove EXFUN from binutils.
- It still remains as a local macro in gmalloc.c, which is derived
- from some other copy of GNU Malloc somewhere (FIXME).
-
- * ar.c, objdump.c, size.c: Replace EXFUN with PROTO. Make static
- fns really static.
- * arsup.h: Declare extract_files.
-
-Mon Nov 2 12:42:11 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * ar.c (extract_file): instead of checking USG: if POSIX_UTIME,
- use utime and utimbuf structure, otherwise if USE_UTIME use utime
- and array of two longs, otherwise use utimes.
-
-Thu Oct 15 13:57:35 1992 Per Bothner (bothner@cygnus.com)
-
- * binutils.tex: Document yesterday's changes to strip and copy.
-
-Wed Oct 14 13:22:14 1992 Per Bothner (bothner@cygnus.com)
-
- * copy.c: Re-do command-line parsing to use getopt_long().
- Add long option names. Re-think option letters to be more
- consistent.
- * copy.c: New function filter_symbols() for stripping only
- debug-symbols and/or local symbols. Use these to support
- the previously-missing options of the old FSF strip.
-
-Tue Oct 13 01:24:20 1992 John Gilmore (gnu@cygnus.com)
-
- * configure.in (host): Use ${srcdir}/../bfd/configure.host rather
- than repeating a copy of it here.
-
-Wed Oct 7 12:53:52 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * copy.c (main): Even if is_strip, accept -d argument indicating
- alternate output format. Needed by gdb for Nindy.
-
- * m68k-pinsn.c (print_insn_arg): Handle new "`" operand type.
-
-Tue Oct 6 16:33:56 1992 Jeffrey Osier (jeffrey@cygnus.com)
-
- * binutils.texi: added documentation for "copy"
-
-Tue Oct 6 14:22:56 1992 Per Bothner (bothner at PersSony)
-
- * Makefile.in (*clean rules): Some cleaning up.
- * Makefile.in (dist): Make diststuff in gprof for a dist.
-
- * ar.c (do_show_version): New function.
- * ar.c (main): Fix so "ar -V" works.
-
-Thu Oct 1 22:44:45 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: now uses the cpu-vendor-os triple instead of
- nested cases.
-
-Fri Sep 25 22:41:08 1992 John Gilmore (gnu@cygnus.com)
-
- * i960-pinsn.c: Change bzero to memset.
- * sparc-pinsn.c: Change index to strchr.
-
-Mon Sep 21 14:39:56 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * m68k-pinsn (print_insn_arg, fetch_arg): added support for
- operands to memory management instructions, from WRS.
-
-Tue Sep 15 15:26:38 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): if $(tooldir) exists, install nm and
- strip in $(tooldir)/bin.
-
-Thu Sep 3 11:57:40 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Let's call it version 2.0.
-
-Wed Sep 2 00:25:13 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Bump to version 0.98.
- * TODO, README: Minor updates.
-
- * Makefile.in: Added mostlyclean, distclean rules,
- and cleaned up clean, realclean.
-
-Sun Aug 30 21:18:59 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: map program names through program_transform_name
- when installing.
-
-Sun Aug 30 18:09:03 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Bump to versions 1.97.90.
- * cplus-dem.c: Removed. Was nowhere used - and if some
- programs are changed to to demangling should now use the
- versions in libiberty.
-
-Thu Aug 27 12:58:09 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * configure.in: add we32k
-
-Mon Aug 24 14:53:42 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ar.c (map_over_members): if the element of the archive has a
- null name, fill it in.
-
- * nm.c (do_one_rel_file): only warn if a bfd's flags say there
- will be symbols and there aren't any.
-
-Wed Aug 19 11:20:25 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * m68k-pinsn.c: handle new operand type 'r', introduced for cas2.
-
-Tue Aug 18 20:45:48 1992 Rob Savoye (rob@cygnus.com)
-
- * nm.c objdump.c: Added support for a +version (-V)
- to print the version number.
-
- * ar.c, copy.c: Added support for a -V option to print
- the version number.
-
-Tue Aug 18 13:28:44 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * config/mh-apollo68v: removed -g from CC definition.
-
- * Makefile.in: always create installation directories.
-
-Mon Aug 17 18:33:41 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * m68k-pinsn.c: Minor fix in style of output (don't use
- range to indicate floating point control registers).
-
-Tue Aug 11 23:42:21 1992 Per Bothner (bothner@cygnus.com)
-
- * ar.c (main): Don't *always* set the verbose flag!
-
-Wed Aug 5 11:25:27 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * copy.c: When is_strip (because it is invoked as the strip
- program), follow traditional argv processing:
- 'strip file1 file2' now strips file1 and file2, rather
- than stripping file1 (as input), leaving output in file2.
-
-Mon Jul 27 16:28:08 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * objdump.c (display_info, display_info_table): Call
- bfd_set_format() on dummy bfd before using it (twice).
- * ar.c: Make sure archive is created on command 'r'
- even when no elements are inserted. (Clean up and
- simplify some non-working related code.)
-
-Mon Jul 20 02:48:38 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
-
- * configure.in: hppa support doesn't assume hp OS (from sef).
-
-Sat Jul 18 14:35:22 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: recognize hppa hosts (bsd & hpux), error messages
- to stderr, not stdout
-
-Fri Jul 17 18:39:44 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * ar.1, binutils.texi, i960-pinsn.c, nm.1, objdump.1, ranlib.1,
- size.1, sparc-pinsn.c, strip.1: removed rcsid's.
-
-Thu Jul 16 16:55:24 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.dos: removed rcsid.
-
-Thu Jul 16 08:23:07 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * objdump.c (display_bfd): print state of BFD_IS_RELAXABLE too
-
-Tue Jun 30 20:26:15 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
-
- * Makefile.in: Add program_suffix (parallel to program_prefix)
-
-Thu Jun 25 04:52:45 1992 John Gilmore (gnu at cygnus.com)
-
- * nm.c (sorters): Lint. Remove excess whitespace.
-
-Wed Jun 24 13:48:07 1992 Per Bothner (bothner@cygnus.com)
-
- * nm.c (valueof macro): Add missing parentheses.
- (Their lack screwed up numeric_forward().)
-
-Sun Jun 14 10:33:27 1992 John Gilmore (gnu at cygnus.com)
-
- * objdump.c (dump_elf_stabs): Also dump .stab.index and
- .stab.excl sections.
- (dump_elf_stabs_1): Split out main body of old dump_elf_stabs.
- * objdump.1, binutils.texi: Document new sections dumped.
-
-Fri Jun 12 22:23:35 1992 John Gilmore (gnu at cygnus.com)
-
- * size.c, objdump.c, bucomm.c: Lint.
-
-Thu Jun 11 01:19:06 1992 John Gilmore (gnu at cygnus.com)
-
- * objdump.c (dump_elf_stabs): New feature: --stabs prints out a
- .stab section from an ELF file. Installed under #ifdef
- ELF_STAB_DISPLAY so it can be easily disabled, since it requires
- bfd-internals header files and such.
- * objdump.1, binutils.texi: Update for --stabs. Also fix
- objdump's doc to use -- rather than + for long options.
- (FIXME: Not yet fixed everywhere in binutils.texinfo.)
-
-Wed Jun 10 07:53:24 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * objdump.c(display_info), patches from
- mohring@informatik.tu-muenchen.de to print the table much more
- nicely.
-
-Thu May 28 13:36:16 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * objdump.c: Add another enum->int cast, for the sake of
- old compilers (such as PCC).
-
-Wed May 27 13:01:44 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * arlex.l: Don't include <sysdep.h> (unneeded conflicts).
- Add declaration of strdup().
-
-Fri May 22 13:40:37 1992 Per Bothner (bothner@cygnus.com)
-
- * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex
- rules, since these are used when building a distribution.
- * Makefile.in (arlex.c): Don't re-direct output, since that
- leaves a bogus output files if it fails.
-
- * arlex.l: Make work with lex, for what it's worth.
- * Makefile.in: Better lex support.
- * Makefile.in (dist): Generate flex and bison outputs
- for distribution.
-
-Thu May 14 17:17:59 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: get BISON definition right.
-
-Fri May 8 07:47:08 1992 K. Richard Pixley (rich@cygnus.com)
-
- * sanity.sh: default TMPDIR to ".".
-
-Thu May 7 12:34:50 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * binutils.texi: add doc for ar command language.
-
-Wed May 6 18:05:36 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * arparse.y: make END call ar_end
- * arsup.c (ar_end): added, deletes temp file if archive session
- aborted.
-
-
-Wed May 6 11:08:53 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: use bison & flex from ../ if they exist. Also,
- FLEX->LEX.
-
- * sanity.sh: remove temporary directory when finished.
-
-Tue May 5 12:00:58 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Bump to version 1.97.
- * ar.c: Declare errno for machines that need it.
-
-Mon May 4 23:29:51 1992 John Gilmore (gnu@cygnus.com)
-
- * objdump.c (display_info): Handle error cases without coredump.
- Close the dummy temporary file we open in the loop.
- * Makefile.in (arsup.o): Add kludge to build with Sun Make.
-
-Fri May 1 16:20:23 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: added test-install target.
-
- * sanity.sh: new file.
-
- * Makefile.in: use sanity test on make check.
-
-Tue Apr 21 13:38:37 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: rework CFLAGS so that they can be passed on the
- command line to make. Remove MINUS_G. Default CFLAGS to -g.
-
-Wed Apr 15 14:33:07 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * arsup.c, arsup.h, arparse.y, arlex.l: support for archive
- scripting language.
-
-Fri Mar 6 21:54:53 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: added check target.
-
-Thu Mar 5 21:35:49 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: added clean-info target.
-
-Tue Mar 3 15:36:37 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: remove $(COPY_PROG) from PROGS. It shouldn't be
- installed. added tooldir and program_prefix.
-
-Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in, configure.in: removed traces of namesubdir,
- -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
- copyrights to '92, changed some from Cygnus to FSF.
-
-Sun Feb 16 12:53:02 1992 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Bump version to 1.96, and remove -beta
- suffix from distribution name.
- * m68k-pinsn.c: New macro COERCE_SIGNED_CHAR to extract
- the signed value of a character (even if chars are unsigned).
- * sparc-pinsn.c: Add new operand types.
-
-Thu Feb 6 12:14:19 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * objdump.c (disassemble_data): don't print a section's contents
- if it's not loadable (eg bss)
-
-Tue Jan 28 11:11:06 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * m68k-pinsn.c (print_insn_arg): fixed so that -ve branch
- displacements don't get printed as large +ve ones.
-
-Fri Jan 24 14:47:53 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * copy.c, nm.c, objdump.c, size.c : changed to use the
- new reloc scheme.
-
-
-Mon Dec 30 18:34:41 1991 Per Bothner (bothner at cygnus.com)
-
- * bucomm.c (print_arelt_descr): Tweek the output format
- so that 'ar tv' output follows Posix 1003.2/D11.
- Output is now also identical to Sun's (except __.SYMDEF).
-
-Mon Dec 30 06:09:53 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in: Make `make' output more readable.
-
-Wed Dec 18 15:04:45 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Bump to version 1.94.
-
-Wed Dec 11 16:48:09 1991 Steve Chamberlain (sac at cygnus.com)
-
- * ar.c: added "b" to fopens for dos
- * configdj.bat, makefile.dos new files from DJ
-
-Tue Dec 10 04:07:26 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: infodir belongs in datadir.
-
-Sat Dec 7 17:09:37 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * bucomm.h: created to hold prototypes of bucomm.c
- * objdump.h: created to hold prototyes of objdump.c
- * am29k-pinsn.c: include objdump.h
- * ar.c: include bucomm.h, get ar.h from the right place and
- include libbfd.h
- * bucomm.c: defunize bfd_fatal
- * copy.c: include bucomm.h, lint.
- * i960-pinsn.h: include bucomm.h
- * m68k-pinsn.h: lint
- * nm.c: include bucomm.h, lint
- * objdump.c: lint
- * sparc-pinsn.c: include objdump.h
-
-
-
-Fri Dec 6 23:02:14 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: added standards.text support. install using
- INSTALL_PROGRAM and INSTALL_DATA.
-
- * configure.in: configure now does all of it's work from objdir so
- make file existence tests against ${srcdir}.
-
-Thu Dec 5 22:46:22 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: idestdir and ddestdir go away. Added copyrights
- and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
- and mandir now keyed off datadir by default.
-
-Wed Dec 4 22:42:03 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Bump to version 1.93.
- * Makefile.in: Add make-strip.o:maybe-strip.c dependency
- for make versions that provide half-baked VPATH-support (e.g. Sun's).
- * size.c: Improvements suggested by
- "david d [zoo] zuhn" <zoo@aps1.spa.umn.edu>:
- - Don't emit (Berkeley) headers if no files were found.
- - Return a non-zero return code on failure.
-
-Sat Nov 30 21:34:19 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- Changes due to include file renaming:
- * am29k-pinsn.c: a29k-opcode.h -> opcode/a29k.h
- * sparc-pinsn.c: sparc-opcode.h -> opcode/sparc.h
- * m68k-pinsn.c: m68k-opcode.h -> opcode/m68k.h
- * nm.c: stab.gnu.h -> aout/stab_gnu.h
-
-Tue Nov 19 19:20:43 1991 Per Bothner (bothner at cygnus.com)
-
- * README: Mention MINIMIZE flag for bfd's make.
-
-Mon Nov 18 12:05:37 1991 Per Bothner (bothner at cygnus.com)
-
- * README: Various improvements.
-
-Sun Nov 17 23:40:59 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Bump to version 1.92.
- * version.c, Makefile.in: Get version string from Makefile.
- * copy.c, is-strip.c, not-strip.c, maybe-strip.c, Makefile.in:
- Make the same change that we earlier did for ar/ranlib:
- Generate two different binaries for strip and copy and use
- a global variable with different values to distinguish
- ostrip from copy. (-1 means to use argv[0] to decide,
- so you can get the old behavior, but it is no longer the default).
- * copy.c (copy_file): Set EXEC_P of output bfd if input is so.
- * copy.c (main): If is_strip==-1, compare last 5 chars
- of argv[0], not the whole path.
- * copy.c (main): Return 0, not 1.
- * copy.c (setup_sections): Fix due to change in bfd_make_section
- now failing if asked for a duplicate section.
- * strip.c, ostrip.c: Removed obsolete files.
- * ar.c, not-ranlib.c, maybe-ranlib.c:
- Change encoding of is_ranlib variable to be consistent
- with is_strip for strip.copy (i.e -1 to means use argv[0]).
-
-Thu Nov 14 20:11:02 1991 Per Bothner (bothner at cygnus.com)
-
- * version.c (program_version): Update to version 1.92.
-
-Tue Nov 12 16:17:53 1991 Per Bothner (bothner at cygnus.com)
-
- * ar.c (get_pos_bfd): Previous fix was missing a "break".
-
-Thu Nov 7 08:55:56 1991 Steve Chamberlain (sac at cygnus.com)
-
- * am29k-pinsn.c: Fixed bug in mtacc, dmac and fmac instruction
- encodings. (Thaks to David Wood)
-
-Sun Nov 3 14:50:23 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in ($(DIST_NAME).tar.Z), TODO: Various fixes.
- * ar.c (get_pos_bfd): Fix to handling of before/after
- positioning options.
- * bucomm.c (fatal): MISSING_VFPRINTF is no longer an issue,
- since libiberty contains vfprintf etc if otherwise missing.
- * m68k-pinsn.c (print_insn_arg): Support BB/BW/BL
- type operands, as used by branch instructions.
- * nm.c: Delegate printing of symbols to BFD,
- by using bfd_print_symbol to do the formatting.
-
-Mon Oct 28 11:20:47 1991 Steve Chamberlain (steve at cygnus.com)
-
- * ar.c (write_archive.c): added unlink before rename since some
- systems can't rename onto an existant file.
-
-Mon Oct 21 09:47:23 1991 Steve Chamberlain (steve at rtl.cygnus.com)
-
- * nm.c: now doesn't crash if a symbol with no section and no
- SEC_ABS appears.
-
-Thu Oct 17 15:25:50 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in, version.c: Bump to version 1.91.
-
-Wed Oct 16 11:45:36 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in, ar.c, bucomm.c, copy.c, cplus-dem.c, filemode.c,
- i960-pinsn.c, m68k-pinsn.c, nm.c, objdump.c, size.c, sparc-pinsn.c,
- * strip.c: Add or update Copyright notice.
- * TODO: Add note on 'nm -a'.
- * version.c: Update version number to 1.90.
- * Makefile.in: Fix making of documentation for dist.
-
-Tue Oct 15 00:17:17 1991 Per Bothner (bothner at cygnus.com)
-
- * README: New file.
- * Makefile.in: New kludgy rules for making a tarfile.
- * Makefile.in: Fix bindir path.
-
-Mon Oct 14 17:34:29 1991 Roland H. Pesch (pesch at cygnus.com)
-
- * Makefile.in: add targets binutils.mm, binutils.me
-
-Fri Oct 11 22:44:21 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in: Avoid Sun Make VPATH bugs by adding dependencies.
-
-Fri Oct 11 12:51:33 1991 Roland H. Pesch (pesch at cygnus.com)
-
- * Makefile.in: add target "binutils.ms"
-
- * binutils.texinfo: minor restructuring for texi2roff comfort.
-
-Fri Oct 11 04:12:28 1991 John Gilmore (gnu at cygnus.com)
-
- Restructure configuration scheme for bfd, binutils, ld.
-
- * include/sys/h-*.h: Move to bfd/hosts/h-*.h.
- * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h.
- Change some config names to match other dirs.
- * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO()
- get defined first.
- * Makefile.in: Use -I. to get sysdep.h.
-
-Wed Oct 9 22:42:56 1991 Per Bothner (bothner at cygnus.com)
-
- * nm.c (print_symbols): Handle NULL name field of symbol.
- * Makefile.in: Removed spurious comment.
-
-Tue Oct 8 16:55:03 1991 Roland H. Pesch (pesch at cygnus.com)
-
- * binutils.texinfo: minor typos, phrasing, formatting fixes.
-
-Tue Oct 8 15:13:20 1991 Per Bothner (bothner at cygnus.com)
-
- * configure.in: Get host file from ../bfd/config, not config.
- * config/*: Remove config directory and its files.
-
-Tue Oct 8 13:58:59 1991 Roland H. Pesch (pesch at cygnus.com)
-
- * Makefile.in: new targets binutils.dvi, binutils.info
-
- * binutils.texinfo: remove most remaining FIXME's, delete
- references to __.SYMDEF by name
-
-
-Tue Oct 8 10:23:44 1991 Steve Chamberlain (steve at cygnus.com)
-
- * objdump.c (print_address) Print addresses nicely.
-
-Mon Oct 7 11:31:05 1991 Per Bothner (bothner at cygnus.com)
-
- * ar.c, Makefile.in, new files {is,not,maybe}-ranlib.c:
- Make two different binaries for ar and ranlib, instead of
- distinguishing them at run time using argv[0].
- (Old behavior is still available if you "make ar_with_ranlib",
- but it is not the default.)
- * ranlib.sh (new): An alternative one-line
- shell implementation of ranlib.
-
-Fri Oct 4 21:49:44 1991 John Gilmore (gnu at cygnus.com)
-
- * objdump.c: Cope with renames of a few BFD types & enums.
-
-Fri Oct 4 19:08:09 1991 Roland H. Pesch (pesch at cygnus.com)
-
- * binutils.texinfo: add new file (rudimentary docn)
-
-Mon Sep 30 12:30:39 1991 Per Bothner (bothner at cygnus.com)
-
- * config/hmake-news: Add new file (for Sony NEWSOS3).
- * bucomm.c (fatal): Conditionally compile fatal() depending on
- MISSING_VFPRINTF, and don't confuse the issue with NO_VARARGS.
- * objdump.c (dump_headers): Trivial output format change.
- * objdump.c (display_info): Loop over integers, not enums,
- to appease old compilers.
-
-Mon May 20 16:14:07 1991 Steve Chamberlain (steve at cygint.cygnus.com)
-
- *objdump.c *nm.c *copy.c: Changed some types to work with 64 bit
- object files.
-
-Thu May 16 16:06:55 1991 Steve Chamberlain (steve at cygint.cygnus.com)
- from bother
- * objdump.c (print_address): Make disasembled output more
- consistent with gdb and as: Add 0x when printing hex.
- Don't print extra leading zeros.
- Attempt to not print "filename.o".
- * objdump.c: Add some enum-to-int casts to accomodate old compilers.
-
-
-Fri May 3 22:21:44 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * copy.c: Change =& constructs to = &, since they confuse older
- C compilers.
+ command line switch "-M force-thumb".
+For older changes see ChangeLog-9899
Local Variables:
mode: change-log
diff --git a/gnu/usr.bin/binutils/binutils/Makefile.in b/gnu/usr.bin/binutils/binutils/Makefile.in
index 79d5626b469..7746499a34d 100644
--- a/gnu/usr.bin/binutils/binutils/Makefile.in
+++ b/gnu/usr.bin/binutils/binutils/Makefile.in
@@ -74,11 +74,15 @@ BUILD_WINDRES = @BUILD_WINDRES@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEMANGLER_NAME = @DEMANGLER_NAME@
DLLTOOL = @DLLTOOL@
DLLTOOL_DEFS = @DLLTOOL_DEFS@
EXEEXT = @EXEEXT@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
@@ -96,10 +100,13 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
NLMCONV_DEFS = @NLMCONV_DEFS@
OBJDUMP = @OBJDUMP@
+OBJDUMP_DEFS = @OBJDUMP_DEFS@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+STRIP = @STRIP@
UNDERSCORE = @UNDERSCORE@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
@@ -121,6 +128,9 @@ YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bis
YFLAGS = -d
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
+WARN_CFLAGS = @WARN_CFLAGS@
+AM_CFLAGS = $(WARN_CFLAGS)
+
# these two are almost the same program
AR_PROG = ar
RANLIB_PROG = ranlib
@@ -151,7 +161,8 @@ DLLWRAP_PROG = dllwrap
SRCONV_PROG = srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
-man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1
+man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 \
+ addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1
PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
@@ -173,15 +184,24 @@ MKDEP = gcc -MM
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
-HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h windres.h winduni.h
+HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
+ windres.h winduni.h
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
-CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c stabs.c strings.c sysdump.c version.c wrstabs.c windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c resres.c dllwrap.c rename.c
+CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \
+ dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c \
+ maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
+ objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
+ stabs.c strings.c sysdump.c version.c wrstabs.c \
+ windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \
+ resres.c dllwrap.c rename.c
-GENERATED_CFILES = underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c defparse.c deflex.c nlmheader.c rcparse.c rclex.c
+GENERATED_CFILES = \
+ underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
+ defparse.c deflex.c nlmheader.c rcparse.c rclex.c
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
@@ -198,12 +218,29 @@ LIBIBERTY = -liberty
POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
-EXPECT = `if [ -f $$r/../expect/expect ] ; then echo $$r/../expect/expect ; else echo expect ; fi`
+EXPECT = `if [ -f $$r/../expect/expect ] ; then \
+ echo $$r/../expect/expect ; \
+ else echo expect ; fi`
-RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest ; fi`
+RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
+ echo ${srcdir}/../dejagnu/runtest ; \
+ else echo runtest ; fi`
-CC_FOR_TARGET = ` if [ -f $$r/../gcc/xgcc ] ; then if [ -f $$r/../newlib/Makefile ] ; then echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; else echo $$r/../gcc/xgcc -B$$r/../gcc/; fi; else if [ "@host@" = "@target@" ] ; then echo $(CC); else echo gcc | sed '$(transform)'; fi; fi`
+CC_FOR_TARGET = ` \
+ if [ -f $$r/../gcc/xgcc ] ; then \
+ if [ -f $$r/../newlib/Makefile ] ; then \
+ echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
+ else \
+ echo $$r/../gcc/xgcc -B$$r/../gcc/; \
+ fi; \
+ else \
+ if [ "@host@" = "@target@" ] ; then \
+ echo $(CC); \
+ else \
+ echo gcc | sed '$(transform)'; \
+ fi; \
+ fi`
info_TEXINFOS = binutils.texi
@@ -216,7 +253,7 @@ objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
strings_SOURCES = strings.c $(BULIBS)
-readelf_SOURCES = readelf.c version.c
+readelf_SOURCES = readelf.c version.c unwind-ia64.c
readelf_LDADD = $(INTLLIBS) $(LIBIBERTY)
strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
@@ -248,25 +285,29 @@ sysdump_SOURCES = sysdump.c $(BULIBS)
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
-windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l winduni.c resres.c $(BULIBS)
+windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
+ winduni.c resres.c $(BULIBS)
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
dllwrap_SOURCES = dllwrap.c version.c
dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
-DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
+DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
+ syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
-DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h site.exp site.bak
+DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
+ site.exp site.bak
MAINTAINERCLEANFILES = config.texi
-MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum abcdefgh*
+MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum \
+ abcdefgh*
-CLEANFILES = dep.sed DEP DEP1 DEP2
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
@@ -283,71 +324,88 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-nlmconv_OBJECTS = nlmconv.o nlmheader.o bucomm.o version.o filemode.o
+nlmconv_OBJECTS = nlmconv.$(OBJEXT) nlmheader.$(OBJEXT) \
+bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
nlmconv_LDADD = $(LDADD)
nlmconv_DEPENDENCIES = ../bfd/libbfd.la
nlmconv_LDFLAGS =
-srconv_OBJECTS = srconv.o coffgrok.o bucomm.o version.o filemode.o
+srconv_OBJECTS = srconv.$(OBJEXT) coffgrok.$(OBJEXT) bucomm.$(OBJEXT) \
+version.$(OBJEXT) filemode.$(OBJEXT)
srconv_LDADD = $(LDADD)
srconv_DEPENDENCIES = ../bfd/libbfd.la
srconv_LDFLAGS =
-sysdump_OBJECTS = sysdump.o bucomm.o version.o filemode.o
+sysdump_OBJECTS = sysdump.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+filemode.$(OBJEXT)
sysdump_LDADD = $(LDADD)
sysdump_DEPENDENCIES = ../bfd/libbfd.la
sysdump_LDFLAGS =
-coffdump_OBJECTS = coffdump.o coffgrok.o bucomm.o version.o filemode.o
+coffdump_OBJECTS = coffdump.$(OBJEXT) coffgrok.$(OBJEXT) \
+bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
coffdump_LDADD = $(LDADD)
coffdump_DEPENDENCIES = ../bfd/libbfd.la
coffdump_LDFLAGS =
-dlltool_OBJECTS = dlltool.o defparse.o deflex.o bucomm.o \
-version.o filemode.o
+dlltool_OBJECTS = dlltool.$(OBJEXT) defparse.$(OBJEXT) deflex.$(OBJEXT) \
+bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
dlltool_DEPENDENCIES = ../bfd/libbfd.la
dlltool_LDFLAGS =
-windres_OBJECTS = windres.o resrc.o rescoff.o resbin.o rcparse.o \
-rclex.o winduni.o resres.o bucomm.o version.o filemode.o
+windres_OBJECTS = windres.$(OBJEXT) resrc.$(OBJEXT) rescoff.$(OBJEXT) \
+resbin.$(OBJEXT) rcparse.$(OBJEXT) rclex.$(OBJEXT) winduni.$(OBJEXT) \
+resres.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
windres_DEPENDENCIES = ../bfd/libbfd.la
windres_LDFLAGS =
-dllwrap_OBJECTS = dllwrap.o version.o
+dllwrap_OBJECTS = dllwrap.$(OBJEXT) version.$(OBJEXT)
dllwrap_DEPENDENCIES =
dllwrap_LDFLAGS =
-size_OBJECTS = size.o bucomm.o version.o filemode.o
+size_OBJECTS = size.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+filemode.$(OBJEXT)
size_LDADD = $(LDADD)
size_DEPENDENCIES = ../bfd/libbfd.la
size_LDFLAGS =
-objdump_OBJECTS = objdump.o prdbg.o rddbg.o debug.o stabs.o ieee.o \
-rdcoff.o bucomm.o version.o filemode.o
+objdump_OBJECTS = objdump.$(OBJEXT) prdbg.$(OBJEXT) rddbg.$(OBJEXT) \
+debug.$(OBJEXT) stabs.$(OBJEXT) ieee.$(OBJEXT) rdcoff.$(OBJEXT) \
+bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
objdump_DEPENDENCIES = ../opcodes/libopcodes.la ../bfd/libbfd.la
objdump_LDFLAGS =
-ar_OBJECTS = arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o \
-bucomm.o version.o filemode.o
+ar_OBJECTS = arparse.$(OBJEXT) arlex.$(OBJEXT) ar.$(OBJEXT) \
+not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) bucomm.$(OBJEXT) \
+version.$(OBJEXT) filemode.$(OBJEXT)
ar_DEPENDENCIES = ../bfd/libbfd.la
ar_LDFLAGS =
-strings_OBJECTS = strings.o bucomm.o version.o filemode.o
+strings_OBJECTS = strings.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+filemode.$(OBJEXT)
strings_LDADD = $(LDADD)
strings_DEPENDENCIES = ../bfd/libbfd.la
strings_LDFLAGS =
-ranlib_OBJECTS = ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o \
-bucomm.o version.o filemode.o
+ranlib_OBJECTS = ar.$(OBJEXT) is-ranlib.$(OBJEXT) arparse.$(OBJEXT) \
+arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) bucomm.$(OBJEXT) \
+version.$(OBJEXT) filemode.$(OBJEXT)
ranlib_DEPENDENCIES = ../bfd/libbfd.la
ranlib_LDFLAGS =
-objcopy_OBJECTS = objcopy.o not-strip.o rename.o rddbg.o debug.o \
-stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o
+objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) \
+rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
+ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrstabs.$(OBJEXT) bucomm.$(OBJEXT) \
+version.$(OBJEXT) filemode.$(OBJEXT)
objcopy_LDADD = $(LDADD)
objcopy_DEPENDENCIES = ../bfd/libbfd.la
objcopy_LDFLAGS =
-addr2line_OBJECTS = addr2line.o bucomm.o version.o filemode.o
+addr2line_OBJECTS = addr2line.$(OBJEXT) bucomm.$(OBJEXT) \
+version.$(OBJEXT) filemode.$(OBJEXT)
addr2line_LDADD = $(LDADD)
addr2line_DEPENDENCIES = ../bfd/libbfd.la
addr2line_LDFLAGS =
-readelf_OBJECTS = readelf.o version.o
+readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) \
+unwind-ia64.$(OBJEXT)
readelf_DEPENDENCIES =
readelf_LDFLAGS =
-nm_new_OBJECTS = nm.o bucomm.o version.o filemode.o
+nm_new_OBJECTS = nm.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
+filemode.$(OBJEXT)
nm_new_LDADD = $(LDADD)
nm_new_DEPENDENCIES = ../bfd/libbfd.la
nm_new_LDFLAGS =
-strip_new_OBJECTS = objcopy.o is-strip.o rename.o rddbg.o debug.o \
-stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o
+strip_new_OBJECTS = objcopy.$(OBJEXT) is-strip.$(OBJEXT) \
+rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
+ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrstabs.$(OBJEXT) bucomm.$(OBJEXT) \
+version.$(OBJEXT) filemode.$(OBJEXT)
strip_new_LDADD = $(LDADD)
strip_new_DEPENDENCIES = ../bfd/libbfd.la
strip_new_LDFLAGS =
@@ -389,7 +447,7 @@ INSTALL_MAN = install-man
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .txi .y
+.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
@@ -470,6 +528,11 @@ maintainer-clean-noinstPROGRAMS:
.c.o:
$(COMPILE) -c $<
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
.s.o:
$(COMPILE) -c $<
@@ -478,6 +541,7 @@ maintainer-clean-noinstPROGRAMS:
mostlyclean-compile:
-rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
clean-compile:
@@ -1039,6 +1103,9 @@ check-DEJAGNU: site.exp
installcheck:
/bin/sh $(srcdir)/sanity.sh $(bindir)
+objdump.o:objdump.c
+ $(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c
+
underscore.c: stamp-under ; @true
stamp-under: Makefile
@@ -1119,8 +1186,13 @@ diststuff: $(DISTSTUFF) info
DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
rm -f DEP1
$(MAKE) MKDEP="$(MKDEP)" DEP1
- sed -f dep.sed < DEP1 > $@
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
+ sed -f dep.sed < DEP1 > DEPA
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
+ if grep ' /' DEPA > /dev/null 2> /dev/null; then \
+ echo 'make DEP failed!'; exit 1; \
+ else \
+ mv -f DEPA $@; \
+ fi
DEP1: $(CFILES) $(GENERATED_CFILES)
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
@@ -1202,13 +1274,13 @@ addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h \
- arsup.h
+ arsup.h $(INCDIR)/filenames.h
arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/bin-bugs.h \
@@ -1219,13 +1291,13 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h debug.h
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \
- dlltool.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/demangle.h \
+ $(INCDIR)/dyn-string.h dlltool.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/ieee.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h budbg.h
+ $(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/filenames.h
is-ranlib.o: is-ranlib.c
is-strip.o: is-strip.c
maybe-ranlib.o: maybe-ranlib.c
@@ -1236,13 +1308,14 @@ nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmconv.h
nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/progress.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h \
- $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
+ $(INCDIR)/getopt.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
not-ranlib.o: not-ranlib.c
not-strip.o: not-strip.c
objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h budbg.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
+ budbg.h $(INCDIR)/filenames.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/getopt.h $(INCDIR)/progress.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h \
@@ -1307,14 +1380,15 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/d30v.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/mn10200.h \
$(INCDIR)/elf/mn10300.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/arc.h \
$(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \
- $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
+ $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \
+ $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h windres.h winduni.h
dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/dyn-string.h
rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
underscore.o: underscore.c
diff --git a/gnu/usr.bin/binutils/binutils/NEWS b/gnu/usr.bin/binutils/binutils/NEWS
index 746c2cc3d4c..fd07a6d776f 100644
--- a/gnu/usr.bin/binutils/binutils/NEWS
+++ b/gnu/usr.bin/binutils/binutils/NEWS
@@ -1,7 +1,27 @@
-*- text -*-
+* New command line switches added to objcopy to allow symbols to be kept as
+ global symbols, and also to specify files containing lists of such symbols.
+ by Honda Hiroki.
+
+Changes in binutils 2.11:
+
+* Add support for ARM v5t and v5te architectures and Intel's XScale ARM
+ extenstions.
+
+* Add --srec-len and --srec-forceS3 command line switch to objcopy.
+ By Luciano Gemme.
+
+* Support for the MIPS32, by Anders Norlander.
+
+* Support for the i860, by Jason Eckhardt.
+
+* Support for CRIS (Axis Communications ETRAX series).
+
Changes in binutils 2.10:
+* Support for 64-bit ELF on HPPA.
+
* New command line switch to objdump --file-start-context which shows the
entire file contents up to the source line first encountered for a given
file.
diff --git a/gnu/usr.bin/binutils/binutils/README b/gnu/usr.bin/binutils/binutils/README
index 4b2d2772449..9157a145ebc 100644
--- a/gnu/usr.bin/binutils/binutils/README
+++ b/gnu/usr.bin/binutils/binutils/README
@@ -111,7 +111,7 @@ with gdb-4.x) may also be of help.
Reporting bugs
==============
-Send bug reports and patches to bug-gnu-utils@gnu.org. Always mention
+Send bug reports and patches to bug-binutils@gnu.org. Always mention
the version number you are running; this is printed by running any of
the binutils with the --version option. We appreciate reports about
bugs, but we do not promise to fix them.
diff --git a/gnu/usr.bin/binutils/binutils/aclocal.m4 b/gnu/usr.bin/binutils/binutils/aclocal.m4
index 2d62d712078..32e6c1f7eda 100644
--- a/gnu/usr.bin/binutils/binutils/aclocal.m4
+++ b/gnu/usr.bin/binutils/binutils/aclocal.m4
@@ -12,6 +12,31 @@ dnl PARTICULAR PURPOSE.
sinclude(../bfd/acinclude.m4)
+dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
+dnl The lines below arrange for aclocal not to bring libtool.m4
+dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
+dnl to add a definition of LIBTOOL to Makefile.in.
+ifelse(yes,no,[
+AC_DEFUN([AM_PROG_LIBTOOL],)
+AC_SUBST(LIBTOOL)
+])
+
+dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
+ifelse(yes,no,[
+AC_DEFUN([CY_WITH_NLS],)
+AC_SUBST(INTLLIBS)
+])
+
+
+
+dnl AM_PROG_LEX
+dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
+AC_DEFUN(AM_PROG_LEX,
+[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
+AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex])
+AC_PROG_LEX
+AC_DECL_YYTEXT])
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
@@ -104,415 +129,6 @@ else
fi
AC_SUBST($1)])
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$lt_target" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$lt_target" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
@@ -536,360 +152,6 @@ for am_file in <<$1>>; do
done<<>>dnl>>)
changequote([,]))])
-
-dnl AM_PROG_LEX
-dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
-AC_DEFUN(AM_PROG_LEX,
-[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
-AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
-AC_PROG_LEX
-AC_DECL_YYTEXT])
-
-# This file is derived from `gettext.m4'. The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-AC_DEFUN(CY_WITH_NLS,
- [AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
-
- USE_INCLUDED_LIBINTL=no
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
- AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH(included-gettext,
- [ --with-included-gettext use the GNU gettext library included here],
- nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If gettext or catgets are available (in this order) we
- dnl use this. Else we have to fall back to GNU NLS library.
- dnl catgets is only used if permitted by option --with-catgets.
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- AC_CHECK_HEADER(libintl.h,
- [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
- [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
- gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for gettext in libintl],
- gt_cv_func_gettext_libintl,
- [AC_TRY_LINK([], [return (int) gettext ("")],
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)])])
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT, 1,
- [Define as 1 if you have gettext and don't want to use GNU gettext.])
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- AC_CHECK_FUNCS(dcgettext)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- INSTOBJEXT=.mo
- fi
- fi
- ])
-
- dnl In the standard gettext, we would now check for catgets.
- dnl However, we never want to use catgets for our releases.
-
- if test "$CATOBJEXT" = "NONE"; then
- dnl Neither gettext nor catgets in included in the C library.
- dnl Fall back on GNU gettext library.
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_SUBST(MSGFMT)
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext programs is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLDEPS)
- AC_SUBST(INTLLIBS)
- AC_SUBST(INTLOBJS)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
-
-AC_DEFUN(CY_GNU_GETTEXT,
- [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
-
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h])
- AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- AC_CHECK_FUNCS(stpcpy)
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
- fi
-
- AM_LC_MESSAGES
- CY_WITH_NLS
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- dnl The reference to <locale.h> in the installed <libintl.h> file
- dnl must be resolved because we cannot expect the users of this
- dnl to define HAVE_LOCALE_H.
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
- AC_SUBST(INCLUDE_LOCALE_H)
-
- dnl Determine which catalog format we have (if any is needed)
- dnl For now we know about two different formats:
- dnl Linux libc-5 and the normal X/Open format
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
- dnl Transform the SED scripts while copying because some dumb SEDs
- dnl cannot handle comments.
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- dnl po2tbl.sed is always needed.
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- dnl In the intl/Makefile.in we have a special dependency which makes
- dnl only sense for gettext. We comment this out for non-gettext
- dnl packages.
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
- AC_SUBST(GT_NO)
- AC_SUBST(GT_YES)
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
- AC_SUBST(MKINSTALLDIRS)
-
- dnl *** For now the libtool support in intl/Makefile is not for real.
- l=
- AC_SUBST(l)
-
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile. But only do this if the po directory
- dnl exists in srcdir.
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
- ])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your locale.h file contains LC_MESSAGES.])
- fi
- fi])
-
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
diff --git a/gnu/usr.bin/binutils/binutils/ar.1 b/gnu/usr.bin/binutils/binutils/ar.1
index cd71a407b37..d7b2caff8e6 100644
--- a/gnu/usr.bin/binutils/binutils/ar.1
+++ b/gnu/usr.bin/binutils/binutils/ar.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999 Free Software Foundation
+.\" Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH ar 1 "1999" "Cygnus Solutions" "GNU Development Tools"
+.TH ar 1 "1999" "Free Software Foundation" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -515,19 +515,377 @@ The GNU Binary Utilities\c
\&.
.SH COPYING
-Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999 Free Software Foundation, Inc.
+Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+This document is distributed under the terms of the GNU Free
+Documentation License, version 1.1. That license is described in the
+sources for this manual page, but it is not displayed here in order to
+make this manual more consise. Copies of this license can also be
+obtained from: http://www.gnu.org/copyleft/.
+
+\" .SH GNU Free Documentation License
+\" Version 1.1, March 2000
+
+\" Copyright (C) 2000 Free Software Foundation, Inc.
+\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\" Everyone is permitted to copy and distribute verbatim
+\" copies of this license document, but changing it is
+\" not allowed.
+\" .PP
+\" 0. PREAMBLE
+\" .PP
+\" The purpose of this License is to make a manual, textbook, or other
+\" written document "free" in the sense of freedom: to assure everyone
+\" the effective freedom to copy and redistribute it, with or without
+\" modifying it, either commercially or noncommercially. Secondarily,
+\" this License preserves for the author and publisher a way to get
+\" credit for their work, while not being considered responsible for
+\" modifications made by others.
+\" .PP
+\" This License is a kind of "copyleft", which means that derivative
+\" works of the document must themselves be free in the same sense. It
+\" complements the GNU General Public License, which is a copyleft
+\" license designed for free software.
+\" .PP
+\" We have designed this License in order to use it for manuals for free
+\" software, because free software needs free documentation: a free
+\" program should come with manuals providing the same freedoms that the
+\" software does. But this License is not limited to software manuals;
+\" it can be used for any textual work, regardless of subject matter or
+\" whether it is published as a printed book. We recommend this License
+\" principally for works whose purpose is instruction or reference.
+\" .PP
+\" 1. APPLICABILITY AND DEFINITIONS
+\" .PP
+\" This License applies to any manual or other work that contains a
+\" notice placed by the copyright holder saying it can be distributed
+\" under the terms of this License. The "Document", below, refers to any
+\" such manual or work. Any member of the public is a licensee, and is
+\" addressed as "you".
+\" .PP
+\" A "Modified Version" of the Document means any work containing the
+\" Document or a portion of it, either copied verbatim, or with
+\" modifications and/or translated into another language.
+\" .PP
+\" A "Secondary Section" is a named appendix or a front-matter section of
+\" the Document that deals exclusively with the relationship of the
+\" publishers or authors of the Document to the Document's overall subject
+\" (or to related matters) and contains nothing that could fall directly
+\" within that overall subject. (For example, if the Document is in part a
+\" textbook of mathematics, a Secondary Section may not explain any
+\" mathematics.) The relationship could be a matter of historical
+\" connection with the subject or with related matters, or of legal,
+\" commercial, philosophical, ethical or political position regarding
+\" them.
+\" .PP
+\" The "Invariant Sections" are certain Secondary Sections whose titles
+\" are designated, as being those of Invariant Sections, in the notice
+\" that says that the Document is released under this License.
+\" .PP
+\" The "Cover Texts" are certain short passages of text that are listed,
+\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+\" the Document is released under this License.
+\" .PP
+\" A "Transparent" copy of the Document means a machine-readable copy,
+\" represented in a format whose specification is available to the
+\" general public, whose contents can be viewed and edited directly and
+\" straightforwardly with generic text editors or (for images composed of
+\" pixels) generic paint programs or (for drawings) some widely available
+\" drawing editor, and that is suitable for input to text formatters or
+\" for automatic translation to a variety of formats suitable for input
+\" to text formatters. A copy made in an otherwise Transparent file
+\" format whose markup has been designed to thwart or discourage
+\" subsequent modification by readers is not Transparent. A copy that is
+\" not "Transparent" is called "Opaque".
+\" .PP
+\" Examples of suitable formats for Transparent copies include plain
+\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
+\" or XML using a publicly available DTD, and standard-conforming simple
+\" HTML designed for human modification. Opaque formats include
+\" PostScript, PDF, proprietary formats that can be read and edited only
+\" by proprietary word processors, SGML or XML for which the DTD and/or
+\" processing tools are not generally available, and the
+\" machine-generated HTML produced by some word processors for output
+\" purposes only.
+\" .PP
+\" The "Title Page" means, for a printed book, the title page itself,
+\" plus such following pages as are needed to hold, legibly, the material
+\" this License requires to appear in the title page. For works in
+\" formats which do not have any title page as such, "Title Page" means
+\" the text near the most prominent appearance of the work's title,
+\" preceding the beginning of the body of the text.
+\" .PP
+\" 2. VERBATIM COPYING
+\" .PP
+\" You may copy and distribute the Document in any medium, either
+\" commercially or noncommercially, provided that this License, the
+\" copyright notices, and the license notice saying this License applies
+\" to the Document are reproduced in all copies, and that you add no other
+\" conditions whatsoever to those of this License. You may not use
+\" technical measures to obstruct or control the reading or further
+\" copying of the copies you make or distribute. However, you may accept
+\" compensation in exchange for copies. If you distribute a large enough
+\" number of copies you must also follow the conditions in section 3.
+\" .PP
+\" You may also lend copies, under the same conditions stated above, and
+\" you may publicly display copies.
+\" .PP
+\" 3. COPYING IN QUANTITY
+\" .PP
+\" If you publish printed copies of the Document numbering more than 100,
+\" and the Document's license notice requires Cover Texts, you must enclose
+\" the copies in covers that carry, clearly and legibly, all these Cover
+\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+\" the back cover. Both covers must also clearly and legibly identify
+\" you as the publisher of these copies. The front cover must present
+\" the full title with all words of the title equally prominent and
+\" visible. You may add other material on the covers in addition.
+\" Copying with changes limited to the covers, as long as they preserve
+\" the title of the Document and satisfy these conditions, can be treated
+\" as verbatim copying in other respects.
+\" .PP
+\" If the required texts for either cover are too voluminous to fit
+\" legibly, you should put the first ones listed (as many as fit
+\" reasonably) on the actual cover, and continue the rest onto adjacent
+\" pages.
+\" .PP
+\" If you publish or distribute Opaque copies of the Document numbering
+\" more than 100, you must either include a machine-readable Transparent
+\" copy along with each Opaque copy, or state in or with each Opaque copy
+\" a publicly-accessible computer-network location containing a complete
+\" Transparent copy of the Document, free of added material, which the
+\" general network-using public has access to download anonymously at no
+\" charge using public-standard network protocols. If you use the latter
+\" option, you must take reasonably prudent steps, when you begin
+\" distribution of Opaque copies in quantity, to ensure that this
+\" Transparent copy will remain thus accessible at the stated location
+\" until at least one year after the last time you distribute an Opaque
+\" copy (directly or through your agents or retailers) of that edition to
+\" the public.
+\" .PP
+\" It is requested, but not required, that you contact the authors of the
+\" Document well before redistributing any large number of copies, to give
+\" them a chance to provide you with an updated version of the Document.
+\" .PP
+\" 4. MODIFICATIONS
+\" .PP
+\" You may copy and distribute a Modified Version of the Document under
+\" the conditions of sections 2 and 3 above, provided that you release
+\" the Modified Version under precisely this License, with the Modified
+\" Version filling the role of the Document, thus licensing distribution
+\" and modification of the Modified Version to whoever possesses a copy
+\" of it. In addition, you must do these things in the Modified Version:
+\" .PP
+\" A. Use in the Title Page (and on the covers, if any) a title distinct
+\" from that of the Document, and from those of previous versions
+\" (which should, if there were any, be listed in the History section
+\" of the Document). You may use the same title as a previous version
+\" if the original publisher of that version gives permission.
+\" .PP
+\" B. List on the Title Page, as authors, one or more persons or entities
+\" responsible for authorship of the modifications in the Modified
+\" Version, together with at least five of the principal authors of the
+\" Document (all of its principal authors, if it has less than five).
+\" .PP
+\" C. State on the Title page the name of the publisher of the
+\" Modified Version, as the publisher.
+\" .PP
+\" D. Preserve all the copyright notices of the Document.
+\" .PP
+\" E. Add an appropriate copyright notice for your modifications
+\" adjacent to the other copyright notices.
+\" .PP
+\" F. Include, immediately after the copyright notices, a license notice
+\" giving the public permission to use the Modified Version under the
+\" terms of this License, in the form shown in the Addendum below.
+\" Preserve in that license notice the full lists of Invariant Sections
+\" and required Cover Texts given in the Document's license notice.
+\" .PP
+\" H. Include an unaltered copy of this License.
+\" .PP
+\" I. Preserve the section entitled "History", and its title, and add to
+\" it an item stating at least the title, year, new authors, and
+\" publisher of the Modified Version as given on the Title Page. If
+\" there is no section entitled "History" in the Document, create one
+\" stating the title, year, authors, and publisher of the Document as
+\" given on its Title Page, then add an item describing the Modified
+\" Version as stated in the previous sentence.
+\" .PP
+\" J. Preserve the network location, if any, given in the Document for
+\" public access to a Transparent copy of the Document, and likewise
+\" the network locations given in the Document for previous versions
+\" it was based on. These may be placed in the "History" section.
+\" You may omit a network location for a work that was published at
+\" least four years before the Document itself, or if the original
+\" publisher of the version it refers to gives permission.
+\" .PP
+\" K. In any section entitled "Acknowledgements" or "Dedications",
+\" preserve the section's title, and preserve in the section all the
+\" substance and tone of each of the contributor acknowledgements
+\" and/or dedications given therein.
+\" .PP
+\" L. Preserve all the Invariant Sections of the Document,
+\" unaltered in their text and in their titles. Section numbers
+\" or the equivalent are not considered part of the section titles.
+\" .PP
+\" M. Delete any section entitled "Endorsements". Such a section
+\" may not be included in the Modified Version.
+\" .PP
+\" N. Do not retitle any existing section as "Endorsements"
+\" or to conflict in title with any Invariant Section.
+\" .PP
+\" If the Modified Version includes new front-matter sections or
+\" appendices that qualify as Secondary Sections and contain no material
+\" copied from the Document, you may at your option designate some or all
+\" of these sections as invariant. To do this, add their titles to the
+\" list of Invariant Sections in the Modified Version's license notice.
+\" These titles must be distinct from any other section titles.
+\" .PP
+\" You may add a section entitled "Endorsements", provided it contains
+\" nothing but endorsements of your Modified Version by various
+\" parties--for example, statements of peer review or that the text has
+\" been approved by an organization as the authoritative definition of a
+\" standard.
+\" .PP
+\" You may add a passage of up to five words as a Front-Cover Text, and a
+\" passage of up to 25 words as a Back-Cover Text, to the end of the list
+\" of Cover Texts in the Modified Version. Only one passage of
+\" Front-Cover Text and one of Back-Cover Text may be added by (or
+\" through arrangements made by) any one entity. If the Document already
+\" includes a cover text for the same cover, previously added by you or
+\" by arrangement made by the same entity you are acting on behalf of,
+\" you may not add another; but you may replace the old one, on explicit
+\" permission from the previous publisher that added the old one.
+\" .PP
+\" The author(s) and publisher(s) of the Document do not by this License
+\" give permission to use their names for publicity for or to assert or
+\" imply endorsement of any Modified Version.
+\" .PP
+
+\" 5. COMBINING DOCUMENTS
+\" .PP
+\" You may combine the Document with other documents released under this
+\" License, under the terms defined in section 4 above for modified
+\" versions, provided that you include in the combination all of the
+\" Invariant Sections of all of the original documents, unmodified, and
+\" list them all as Invariant Sections of your combined work in its
+\" license notice.
+\" .PP
+\" The combined work need only contain one copy of this License, and
+\" multiple identical Invariant Sections may be replaced with a single
+\" copy. If there are multiple Invariant Sections with the same name but
+\" different contents, make the title of each such section unique by
+\" adding at the end of it, in parentheses, the name of the original
+\" author or publisher of that section if known, or else a unique number.
+\" Make the same adjustment to the section titles in the list of
+\" Invariant Sections in the license notice of the combined work.
+\" .PP
+\" In the combination, you must combine any sections entitled "History"
+\" in the various original documents, forming one section entitled
+\" "History"; likewise combine any sections entitled "Acknowledgements",
+\" and any sections entitled "Dedications". You must delete all sections
+\" entitled "Endorsements."
+\" .PP
+
+\" 6. COLLECTIONS OF DOCUMENTS
+\" .PP
+\" You may make a collection consisting of the Document and other documents
+\" released under this License, and replace the individual copies of this
+\" License in the various documents with a single copy that is included in
+\" the collection, provided that you follow the rules of this License for
+\" verbatim copying of each of the documents in all other respects.
+\" .PP
+\" You may extract a single document from such a collection, and distribute
+\" it individually under this License, provided you insert a copy of this
+\" License into the extracted document, and follow this License in all
+\" other respects regarding verbatim copying of that document.
+\" .PP
+
+\" 7. AGGREGATION WITH INDEPENDENT WORKS
+\" .PP
+\" A compilation of the Document or its derivatives with other separate
+\" and independent documents or works, in or on a volume of a storage or
+\" distribution medium, does not as a whole count as a Modified Version
+\" of the Document, provided no compilation copyright is claimed for the
+\" compilation. Such a compilation is called an "aggregate", and this
+\" License does not apply to the other self-contained works thus compiled
+\" with the Document, on account of their being thus compiled, if they
+\" are not themselves derivative works of the Document.
+\" .PP
+\" If the Cover Text requirement of section 3 is applicable to these
+\" copies of the Document, then if the Document is less than one quarter
+\" of the entire aggregate, the Document's Cover Texts may be placed on
+\" covers that surround only the Document within the aggregate.
+\" Otherwise they must appear on covers around the whole aggregate.
+\" .PP
+
+\" 8. TRANSLATION
+\" .PP
+\" Translation is considered a kind of modification, so you may
+\" distribute translations of the Document under the terms of section 4.
+\" Replacing Invariant Sections with translations requires special
+\" permission from their copyright holders, but you may include
+\" translations of some or all Invariant Sections in addition to the
+\" original versions of these Invariant Sections. You may include a
+\" translation of this License provided that you also include the
+\" original English version of this License. In case of a disagreement
+\" between the translation and the original English version of this
+\" License, the original English version will prevail.
+\" .PP
+
+\" 9. TERMINATION
+\" .PP
+\" You may not copy, modify, sublicense, or distribute the Document except
+\" as expressly provided for under this License. Any other attempt to
+\" copy, modify, sublicense or distribute the Document is void, and will
+\" automatically terminate your rights under this License. However,
+\" parties who have received copies, or rights, from you under this
+\" License will not have their licenses terminated so long as such
+\" parties remain in full compliance.
+\" .PP
+
+\" 10. FUTURE REVISIONS OF THIS LICENSE
+\" .PP
+\" The Free Software Foundation may publish new, revised versions
+\" of the GNU Free Documentation License from time to time. Such new
+\" versions will be similar in spirit to the present version, but may
+\" differ in detail to address new problems or concerns. See
+\" http://www.gnu.org/copyleft/.
+\" .PP
+\" Each version of the License is given a distinguishing version number.
+\" If the Document specifies that a particular numbered version of this
+\" License "or any later version" applies to it, you have the option of
+\" following the terms and conditions either of that specified version or
+\" of any later version that has been published (not as a draft) by the
+\" Free Software Foundation. If the Document does not specify a version
+\" number of this License, you may choose any version ever published (not
+\" as a draft) by the Free Software Foundation.
+\" .PP
+
+\" ADDENDUM: How to use this License for your documents
+\" .PP
+\" To use this License in a document you have written, include a copy of
+\" the License in the document and put the following copyright and
+\" license notices just after the title page:
+\" .PP
+\" Copyright (c) YEAR YOUR NAME.
+\" Permission is granted to copy, distribute and/or
+\" modify this document under the terms of the GNU
+\" Free Documentation License, Version 1.1 or any later
+\" version published by the Free Software Foundation;
+\" with the Invariant Sections being LIST THEIR TITLES,
+\" with the Front-Cover Texts being LIST, and with the
+\" Back-Cover Texts being LIST. A copy of the license
+\" is included in the section entitled "GNU Free
+\" Documentation License".
+\" .PP
+\" If you have no Invariant Sections, write "with no Invariant Sections"
+\" instead of saying which ones are invariant. If you have no
+\" Front-Cover Texts, write "no Front-Cover Texts" instead of
+\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+\" .PP
+\" If your document contains nontrivial examples of program code, we
+\" recommend releasing these examples in parallel under your choice of
+\" free software license, such as the GNU General Public License,
+\" to permit their use in free software.
diff --git a/gnu/usr.bin/binutils/binutils/ar.c b/gnu/usr.bin/binutils/binutils/ar.c
index 7bc03d5fe24..211a79510d9 100644
--- a/gnu/usr.bin/binutils/binutils/ar.c
+++ b/gnu/usr.bin/binutils/binutils/ar.c
@@ -1,5 +1,5 @@
/* ar.c - Archive modify and extract.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -250,7 +250,7 @@ usage (help)
if (! is_ranlib)
{
/* xgettext:c-format */
- fprintf (s, _("Usage: %s [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"),
+ fprintf (s, _("Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"),
program_name);
/* xgettext:c-format */
fprintf (s, _(" %s -M [<mri-script]\n"), program_name);
@@ -276,6 +276,7 @@ usage (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, _(" [-X32_64] - (ignored)\n"));
}
else
/* xgettext:c-format */
@@ -307,10 +308,10 @@ normalize (file, abfd)
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (file, '\\');
- if (bslash > filename)
+ if (filename == NULL || (bslash != NULL && bslash > filename))
filename = bslash;
if (filename == NULL && file[0] != '\0' && file[1] == ':')
- filename = file + 1;
+ filename = file + 1;
}
#endif
if (filename != (char *) NULL)
@@ -392,7 +393,7 @@ main (argc, argv)
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (program_name, '\\');
- if (bslash > temp)
+ if (temp == NULL || (bslash != NULL && bslash > temp))
temp = bslash;
if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':')
temp = program_name + 1;
@@ -431,6 +432,17 @@ main (argc, argv)
xatexit (remove_output);
+ /* Ignored for (partial) AIX compatibility. On AIX,
+ the -X option can be used to ignore certain kinds
+ of object files in the archive (the 64-bit objects
+ or the 32-bit objects). GNU ar always looks at all
+ kinds of objects in an archive. */
+ while (argc > 1 && strcmp (argv[1], "-X32_64") == 0)
+ {
+ argv++;
+ argc--;
+ }
+
if (is_ranlib)
{
boolean touch = false;
@@ -812,7 +824,8 @@ print_contents (abfd)
fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
if (verbose)
- printf ("\n<%s>\n\n", bfd_get_filename (abfd));
+ /* xgettext:c-format */
+ printf (_("\n<member %s>\n\n"), bfd_get_filename (abfd));
bfd_seek (abfd, 0, SEEK_SET);
diff --git a/gnu/usr.bin/binutils/binutils/arlex.l b/gnu/usr.bin/binutils/binutils/arlex.l
index 2fd94da4dd8..71ef56ee6f9 100644
--- a/gnu/usr.bin/binutils/binutils/arlex.l
+++ b/gnu/usr.bin/binutils/binutils/arlex.l
@@ -1,7 +1,7 @@
%{
/* arlex.l - Strange script language lexer */
-/* Copyright (C) 1992, 95, 1997 Free Software Foundation, Inc.
+/* Copyright 1992, 1997, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/arparse.y b/gnu/usr.bin/binutils/binutils/arparse.y
index a5e90faeb1b..a03c2c42e2f 100644
--- a/gnu/usr.bin/binutils/binutils/arparse.y
+++ b/gnu/usr.bin/binutils/binutils/arparse.y
@@ -1,7 +1,7 @@
%{
/* arparse.y - Stange script language parser */
-/* Copyright (C) 1992, 93, 95, 97, 98, 1999 Free Software Foundation, Inc.
+/* Copyright 1992, 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/arsup.c b/gnu/usr.bin/binutils/binutils/arsup.c
index eebee997715..0058c0d31f5 100644
--- a/gnu/usr.bin/binutils/binutils/arsup.c
+++ b/gnu/usr.bin/binutils/binutils/arsup.c
@@ -1,5 +1,5 @@
/* arsup.c - Archive support for MRI compatibility
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1992, 1994, 1995, 1996, 1997, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/arsup.h b/gnu/usr.bin/binutils/binutils/arsup.h
index f54a34bcf35..26538beaf9b 100644
--- a/gnu/usr.bin/binutils/binutils/arsup.h
+++ b/gnu/usr.bin/binutils/binutils/arsup.h
@@ -1,5 +1,5 @@
/* arsup.h - archive support header file
- Copyright 1992 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/binutils.texi b/gnu/usr.bin/binutils/binutils/binutils.texi
index c2232e3026c..9fc11bc313a 100644
--- a/gnu/usr.bin/binutils/binutils/binutils.texi
+++ b/gnu/usr.bin/binutils/binutils/binutils.texi
@@ -26,11 +26,14 @@ END-INFO-DIR-ENTRY
@end ifinfo
@ifinfo
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
@ignore
Permission is granted to process this file through TeX and print the
@@ -39,14 +42,6 @@ notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
@end ifinfo
@synindex ky cp
@@ -54,10 +49,10 @@ into another language, under the above conditions for modified versions.
@c This file documents the GNU binary utilities "ar", "ld", "objcopy",
@c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib".
@c
-@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
@c
@c This text may be freely distributed under the terms of the GNU
-@c General Public License.
+@c Free Documentation License.
@c
@setchapternewpage odd
@@ -79,19 +74,15 @@ into another language, under the above conditions for modified versions.
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998, 2000, 2001 Free Software Foundation, Inc.
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
@end titlepage
@node Top
@@ -148,6 +139,10 @@ Create the files needed to build and use Dynamic Link Libraries
@end table
@end iftex
+This document is distributed under the terms of the GNU Free
+Documentation License. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+
@menu
* ar:: Create, modify, and extract from archives
* nm:: List symbols from object files
@@ -166,6 +161,7 @@ Create the files needed to build and use Dynamic Link Libraries
* dlltool:: Create files needed to build and use DLLs
* Selecting The Target System:: How these utilities determine the target.
* Reporting Bugs:: Reporting Bugs
+* GNU Free Documentation License:: GNU Free Documentation License
* Index:: Index
@end menu
@@ -234,7 +230,7 @@ program.
@section Controlling @code{ar} on the command line
@smallexample
-ar [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
+ar [-X32_64] [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
@end smallexample
@cindex Unix compatibility, @code{ar}
@@ -451,6 +447,12 @@ when the modifier @samp{v} is appended.
This modifier shows the version number of @code{ar}.
@end table
+@code{ar} ignores an initial option spelt @code{-X32_64}, for
+compatibility with AIX. The behaviour produced by this option is the
+default for GNU @code{ar}. @code{ar} does not support any of the other
+@code{-X} options; in particular, it does not support @code{-X32}
+which is the default for AIX @code{ar}.
+
@node ar scripts
@section Controlling @code{ar} with a script
@@ -630,14 +632,14 @@ The @sc{gnu} linker @code{ld} is now described in a separate manual.
@smallexample
nm [ -a | --debug-syms ] [ -g | --extern-only ]
- [ -B ] [ -C | --demangle ] [ -D | --dynamic ]
+ [ -B ] [ -C | --demangle[=@var{style}] ] [ -D | --dynamic ]
[ -s | --print-armap ] [ -A | -o | --print-file-name ]
[ -n | -v | --numeric-sort ] [ -p | --no-sort ]
[ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ]
[ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ]
[ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ]
- [ --defined-only ] [-l | --line-numbers ]
- [ --no-demangle ] [ -V | --version ] [ --help ] [ @var{objfile}@dots{} ]
+ [ --defined-only ] [-l | --line-numbers ] [ --no-demangle ]
+ [ -V | --version ] [ -X 32_64 ] [ --help ] [ @var{objfile}@dots{} ]
@end smallexample
@sc{gnu} @code{nm} lists the symbols from object files @var{objfile}@dots{}.
@@ -754,12 +756,14 @@ listed.
The same as @samp{--format=bsd} (for compatibility with the MIPS @code{nm}).
@item -C
-@itemx --demangle
+@itemx --demangle[=@var{style}]
@cindex demangling in nm
Decode (@dfn{demangle}) low-level symbol names into user-level names.
Besides removing any initial underscore prepended by the system, this
-makes C++ function names readable. @xref{c++filt}, for more information
-on demangling.
+makes C++ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler. @xref{c++filt},
+for more information on demangling.
@item --no-demangle
Do not demangle low-level symbol names. This is the default.
@@ -853,6 +857,12 @@ Display only defined symbols for each object file.
@itemx --version
Show the version number of @code{nm} and exit.
+@item -X
+This option is ignored for compatibility with the AIX version of
+@code{nm}. It takes one parameter which must be the string
+@code{32_64}. The default mode of AIX @code{nm} corresponds
+to @code{-X 32}, which is not supported by @sc{gnu} @code{nm}.
+
@item --help
Show a summary of the options to @code{nm} and exit.
@end table
@@ -867,6 +877,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
[ -S | --strip-all ] [ -g | --strip-debug ]
[ -K @var{symbolname} | --keep-symbol=@var{symbolname} ]
[ -N @var{symbolname} | --strip-symbol=@var{symbolname} ]
+ [ -G @var{symbolname} | --keep-global-symbol=@var{symbolname}]
[ -L @var{symbolname} | --localize-symbol=@var{symbolname} ]
[ -W @var{symbolname} | --weaken-symbol=@var{symbolname} ]
[ -x | --discard-all ] [ -X | --discard-locals ]
@@ -885,7 +896,13 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
[ --set-section-flags @var{section}=@var{flags} ]
[ --add-section @var{sectionname}=@var{filename} ]
[ --change-leading-char ] [ --remove-leading-char ]
+ [ --srec-len=@var{ival} ] [ --srec-forceS3 ]
[ --redefine-sym @var{old}=@var{new} ] [ --weaken ]
+ [ --keep-symbols=@var{filename} ]
+ [ --strip-symbols=@var{filename} ]
+ [ --keep-global-symbols=@var{filename} ]
+ [ --localize-symbols=@var{filename} ]
+ [ --weaken-symbols=@var{filename} ]
[ -v | --verbose ] [ -V | --version ] [ --help ]
@var{infile} [@var{outfile}]
@end smallexample
@@ -895,6 +912,9 @@ file to another. @code{objcopy} uses the @sc{gnu} @sc{bfd} Library to
read and write the object files. It can write the destination object
file in a format different from that of the source object file. The
exact behavior of @code{objcopy} is controlled by command-line options.
+Note that @code{objcopy} should be able to copy a fully linked file
+between any two formats. However, copying a relocatable object file
+between any two formats may not work as expected.
@code{objcopy} creates temporary files to do its translations and
deletes them afterward. @code{objcopy} uses @sc{bfd} to do all its
@@ -917,6 +937,11 @@ use @samp{-S} to remove sections containing debugging information. In
some cases @samp{-R} will be useful to remove sections which contain
information that is not needed by the binary file.
+Note - @code{objcopy} is not able to change the endianness of its input
+files. If the input format has an endianness, (some formats do not),
+@code{objcopy} can only copy the inputs into file formats that have the
+same endianness or which have no endianness (eg @samp{srec}).
+
@table @code
@item @var{infile}
@itemx @var{outfile}
@@ -974,6 +999,12 @@ be given more than once.
Do not copy symbol @var{symbolname} from the source file. This option
may be given more than once.
+@item -G @var{symbolname}
+@itemx --keep-global-symbol=@var{symbolname}
+Keep only symbol @var{symbolname} global. Make all other symbols local
+to the file, so that they are not visible externally. This option may
+be given more than once.
+
@item -L @var{symbolname}
@itemx --localize-symbol=@var{symbolname}
Make symbol @var{symbolname} local to the file, so that it is not
@@ -1137,6 +1168,15 @@ different conventions for symbol names. This is different from
when appropriate, regardless of the object file format of the output
file.
+@item --srec-len=@var{ival}
+Meaningful only for srec output. Set the maximum length of the Srecords
+being produced to @var{ival}. This length covers both address, data and
+crc fields.
+
+@item --srec-forceS3
+Meaningful only for srec output. Avoid generation of S1/S2 records,
+creating S3-only record format.
+
@item --redefine-sym @var{old}=@var{new}
Change the name of a symbol @var{old}, to @var{new}. This can be useful
when one is trying link two things together for which you have no
@@ -1148,6 +1188,36 @@ when building an object which will be linked against other objects using
the @code{-R} option to the linker. This option is only effective when
using an object file format which supports weak symbols.
+@item --keep-symbols=@var{filename}
+Apply @samp{--keep-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
+@item --strip-symbols=@var{filename}
+Apply @samp{--strip-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
+@item --keep-global-symbols=@var{filename}
+Apply @samp{--keep-global-symbol} option to each symbol listed in the
+file @var{filename}. @var{filename} is simply a flat file, with one
+symbol name per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
+
+@item --localize-symbols=@var{filename}
+Apply @samp{--localize-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
+@item --weaken-symbols=@var{filename}
+Apply @samp{--weaken-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
@item -V
@itemx --version
Show the version number of @code{objcopy}.
@@ -1170,7 +1240,7 @@ Show a summary of the options to @code{objcopy}.
@smallexample
objdump [ -a | --archive-headers ]
[ -b @var{bfdname} | --target=@var{bfdname} ]
- [ -C | --demangle ]
+ [ -C | --demangle[=@var{style}] ]
[ -d | --disassemble ]
[ -D | --disassemble-all ]
[ -z | --disassemble-zeroes ]
@@ -1255,12 +1325,14 @@ formats available with the @samp{-i} option.
@xref{Target Selection}, for more information.
@item -C
-@itemx --demangle
+@itemx --demangle[=@var{style}]
@cindex demangling in objdump
Decode (@dfn{demangle}) low-level symbol names into user-level names.
Besides removing any initial underscore prepended by the system, this
-makes C++ function names readable. @xref{c++filt}, for more information
-on demangling.
+makes C++ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler. @xref{c++filt},
+for more information on demangling.
@item -G
@item --debugging
@@ -1856,6 +1928,8 @@ the one specified by the C++ Annotated Reference Manual
the one used by the HP compiler
@item edg
the one used by the EDG compiler
+@item gnu-new-abi
+the one used by the @sc{gnu} compiler with the new ABI.
@end table
@item --help
@@ -1891,7 +1965,7 @@ c++filt @var{option} @var{symbol}
@smallexample
addr2line [ -b @var{bfdname} | --target=@var{bfdname} ]
- [ -C | --demangle ]
+ [ -C | --demangle[=@var{style} ]
[ -e @var{filename} | --exe=@var{filename} ]
[ -f | --functions ] [ -s | --basename ]
[ -H | --help ] [ -V | --version ]
@@ -1938,12 +2012,14 @@ Specify that the object-code format for the object files is
@var{bfdname}.
@item -C
-@itemx --demangle
+@itemx --demangle[=@var{style}]
@cindex demangling in objdump
Decode (@dfn{demangle}) low-level symbol names into user-level names.
Besides removing any initial underscore prepended by the system, this
-makes C++ function names readable. @xref{c++filt}, for more information
-on demangling.
+makes C++ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler. @xref{c++filt},
+for more information on demangling.
@item -e @var{filename}
@itemx --exe=@var{filename}
@@ -2449,7 +2525,7 @@ readelf [ -a | --all ]
[ -V | --version-info]
[ -D | --use-dynamic]
[ -x <number> | --hex-dump=<number>]
- [ -w[liapr] | --debug-dump[=info,=line,=abbrev,=pubnames,=ranges]]
+ [ -w[liaprf] | --debug-dump[=info,=line,=abbrev,=pubnames,=ranges,=frames]]
[ --histogram]
[ -v | --version]
[ -H | --help]
@@ -2537,8 +2613,8 @@ symbols section.
@itemx --hex-dump=<number>
Displays the contents of the indicated section as a hexadecimal dump.
-@item -w[liapr]
-@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges]
+@item -w[liaprf]
+@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]
Displays the contents of the debug sections in the file, if any are
present. If one of the optional letters or words follows the switch
then only data found in those specific sections will be dumped.
@@ -2871,7 +2947,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
In any event, we also recommend that you send bug reports for the binary
-utilities to @samp{bug-gnu-utils@@gnu.org}.
+utilities to @samp{bug-binutils@@gnu.org}.
The fundamental principle of reporting bugs usefully is this:
@strong{report all the facts}. If you are not sure whether to state a
@@ -2932,7 +3008,7 @@ A complete input file, or set of input files, that will reproduce the
bug. If the utility is reading an object file or files, then it is
generally most helpful to send the actual object files, uuencoded if
necessary to get them through the mail system. Note that
-@samp{bug-gnu-utils@@gnu.org} is a mailing list, so you should avoid
+@samp{bug-binutils@@gnu.org} is a mailing list, so you should avoid
sending very large files to it. Making the files available for
anonymous FTP is OK.
@@ -3020,6 +3096,370 @@ Such guesses are usually wrong. Even we cannot guess right about such
things without first using the debugger to find the facts.
@end itemize
+@node GNU Free Documentation License
+@chapter GNU Free Documentation License
+@cindex GNU Free Documentation License
+
+ GNU Free Documentation License
+
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+@end smallexample
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
@node Index
@unnumbered Index
diff --git a/gnu/usr.bin/binutils/binutils/bucomm.c b/gnu/usr.bin/binutils/binutils/bucomm.c
index 09f29b7bd0e..c9a21a5d4be 100644
--- a/gnu/usr.bin/binutils/binutils/bucomm.c
+++ b/gnu/usr.bin/binutils/binutils/bucomm.c
@@ -1,5 +1,5 @@
/* bucomm.c -- Bin Utils COMmon code.
- Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -157,7 +157,7 @@ list_supported_targets (name, f)
const char *name;
FILE *f;
{
- extern bfd_target *bfd_target_vector[];
+ extern const bfd_target *const *bfd_target_vector;
int t;
if (name == NULL)
@@ -222,7 +222,7 @@ make_tempname (filename, isdir)
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (filename, '\\');
- if (bslash > slash)
+ if (slash == NULL || (bslash != NULL && bslash > slash))
slash = bslash;
if (slash == NULL && filename[0] != '\0' && filename[1] == ':')
slash = filename + 1;
diff --git a/gnu/usr.bin/binutils/binutils/bucomm.h b/gnu/usr.bin/binutils/binutils/bucomm.h
index fd6a1516adf..d32d409f654 100644
--- a/gnu/usr.bin/binutils/binutils/bucomm.h
+++ b/gnu/usr.bin/binutils/binutils/bucomm.h
@@ -1,5 +1,5 @@
/* bucomm.h -- binutils common include file.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -138,12 +138,11 @@ void *alloca ();
# define N_(String) (String)
# endif
#else
-/* Stubs that do something close enough. */
-# define textdomain(String) (String)
-# define gettext(String) (String)
-# define dgettext(Domain,Message) (Message)
-# define dcgettext(Domain,Message,Type) (Message)
-# define bindtextdomain(Domain,Directory) (Domain)
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define textdomain(Domainname) while (0) /* nothing */
+# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
# define _(String) (String)
# define N_(String) (String)
#endif
diff --git a/gnu/usr.bin/binutils/binutils/coffdump.c b/gnu/usr.bin/binutils/binutils/coffdump.c
index 77dbd33276d..80b0817717e 100644
--- a/gnu/usr.bin/binutils/binutils/coffdump.c
+++ b/gnu/usr.bin/binutils/binutils/coffdump.c
@@ -1,5 +1,5 @@
/* Coff file dumper.
- Copyright (C) 1994, 95, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/coffgrok.c b/gnu/usr.bin/binutils/binutils/coffgrok.c
index 8c4e6c9c98e..1118faca1e7 100644
--- a/gnu/usr.bin/binutils/binutils/coffgrok.c
+++ b/gnu/usr.bin/binutils/binutils/coffgrok.c
@@ -1,5 +1,5 @@
/* coffgrok.c
- Copyright (C) 1994, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -245,7 +245,7 @@ static
struct coff_line *
do_lines (i, name)
int i;
- char *name;
+ char *name ATTRIBUTE_UNUSED;
{
struct coff_line *res = (struct coff_line *) xcalloc (sizeof (struct coff_line), 1);
asection *s;
diff --git a/gnu/usr.bin/binutils/binutils/config.texi b/gnu/usr.bin/binutils/binutils/config.texi
index 4c75b622163..56bdd12e9e3 100644
--- a/gnu/usr.bin/binutils/binutils/config.texi
+++ b/gnu/usr.bin/binutils/binutils/config.texi
@@ -1 +1 @@
-@set VERSION 2.10.1
+@set VERSION 2.11.2
diff --git a/gnu/usr.bin/binutils/binutils/configure b/gnu/usr.bin/binutils/binutils/configure
index 0c7c0e503bc..86a20d9af4e 100644
--- a/gnu/usr.bin/binutils/binutils/configure
+++ b/gnu/usr.bin/binutils/binutils/configure
@@ -22,10 +22,14 @@ ac_help="$ac_help
ac_help="$ac_help
--disable-libtool-lock avoid locking (might break parallel builds)"
ac_help="$ac_help
+ --with-pic try to use only PIC/non-PIC objects [default=use both]"
+ac_help="$ac_help
--enable-targets alternative target configurations"
ac_help="$ac_help
--enable-commonbfdlib build shared BFD/opcodes/libiberty library"
ac_help="$ac_help
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
--disable-nls do not use Native Language Support"
ac_help="$ac_help
--with-included-gettext use the GNU gettext library included here"
@@ -49,6 +53,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -163,6 +168,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -333,6 +339,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -498,12 +509,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -541,6 +556,68 @@ else
ac_n= ac_c='\c' ac_t=
fi
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:561: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<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=
@@ -590,7 +667,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:594: checking host system type" >&5
+echo "configure:671: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -611,7 +688,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:615: checking target system type" >&5
+echo "configure:692: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -629,7 +706,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:633: checking build system type" >&5
+echo "configure:710: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -654,7 +731,7 @@ test "$host_alias" != "$target_alias" &&
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:658: checking for $ac_word" >&5
+echo "configure:735: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -684,7 +761,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:688: checking for $ac_word" >&5
+echo "configure:765: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -735,7 +812,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:739: checking for $ac_word" >&5
+echo "configure:816: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -767,7 +844,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:848: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -778,12 +855,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 782 "configure"
+#line 859 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -809,12 +886,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:818: checking whether we are using GNU C" >&5
+echo "configure:895: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -823,7 +900,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -842,7 +919,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:846: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:923: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -874,7 +951,7 @@ else
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:878: checking for POSIXized ISC" >&5
+echo "configure:955: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -895,6 +972,7 @@ else
fi
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -907,7 +985,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:911: checking for a BSD compatible install" >&5
+echo "configure:989: 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
@@ -960,7 +1038,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:964: checking whether build environment is sane" >&5
+echo "configure:1042: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1017,7 +1095,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1021: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1099: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1046,7 +1124,7 @@ fi
PACKAGE=binutils
-VERSION=2.10.1
+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; }
@@ -1063,7 +1141,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1067: checking for working aclocal" >&5
+echo "configure:1145: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1076,7 +1154,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1080: checking for working autoconf" >&5
+echo "configure:1158: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1089,7 +1167,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1093: checking for working automake" >&5
+echo "configure:1171: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1102,7 +1180,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1106: checking for working autoheader" >&5
+echo "configure:1184: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1115,7 +1193,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1119: checking for working makeinfo" >&5
+echo "configure:1197: 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.
@@ -1198,36 +1276,6 @@ else
enable_fast_install=yes
fi
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1205: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1240,8 +1288,14 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1244: checking for ld used by GCC" >&5
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
+echo "configure:1292: checking for ld used by GCC" >&5
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
case "$ac_prog" in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
@@ -1264,10 +1318,10 @@ echo "configure:1244: 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:1268: checking for GNU ld" >&5
+echo "configure:1322: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1271: checking for non-GNU ld" >&5
+echo "configure:1325: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1302,7 +1356,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1306: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1360: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1315,10 +1369,23 @@ fi
fi
echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$ac_cv_prog_gnu_ld
+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+echo "configure:1377: checking for $LD option to reload object files" >&5
+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+
+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1322: checking for BSD-compatible nm" >&5
+echo "configure:1389: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1329,18 +1396,20 @@ else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ tmp_nm=$ac_dir/${ac_tool_prefix}nm
+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
+ # Tru64's nm complains that /dev/null is an invalid object file
+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
@@ -1354,7 +1423,7 @@ NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1358: checking whether ln -s works" >&5
+echo "configure:1427: 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
@@ -1374,12 +1443,484 @@ else
echo "$ac_t""no" 1>&6
fi
+echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
+echo "configure:1448: checking how to recognise dependant libraries" >&5
+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case "$host_os" in
+aix4*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin* | mingw* |pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
+freebsd* )
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case "$host_cpu" in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20*)
+ # TODO: Does this work for hpux-11 too?
+ lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+
+irix5* | irix6*)
+ case "$host_os" in
+ irix5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case "$LD" in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ case "$host_cpu" in
+ alpha* | i*86 | powerpc* | sparc* | ia64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ else
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case "$host_vendor" in
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ esac
+ ;;
esac
+fi
+
+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1591: checking for object suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1617: 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:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# Only perform the check for file, if the check method requires it
+case "$deplibs_check_method" in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+echo "configure:1660: checking for ${ac_tool_prefix}file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo $ac_n "checking for file""... $ac_c" 1>&6
+echo "configure:1722: checking for file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1793: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1825: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ RANLIB=":"
+fi
+fi
+
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1860: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1892: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ STRIP=":"
+fi
+fi
+
+
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
@@ -1398,13 +1939,24 @@ fi
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
+test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$lt_target" in
+case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1407 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1959 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1425,19 +1977,27 @@ case "$lt_target" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1429: checking whether the C compiler needs -belf" >&5
+echo "configure:1981: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1434 "configure"
+
+ 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 1994 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -1447,6 +2007,13 @@ else
lt_cv_cc_needs_belf=no
fi
rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
fi
echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
@@ -1510,12 +2077,14 @@ rm -f confcache
# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
# Reload cache, that may have been modified by ltconfig
@@ -1529,7 +2098,7 @@ fi
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -1539,6 +2108,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
exec 5>>./config.log
+
+
+
+
+
+
# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
enableval="$enable_targets"
@@ -1559,6 +2134,29 @@ if test "${enable_commonbfdlib+set}" = set; then
esac
fi
+build_warnings="-W -Wall"
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+
+
@@ -1573,7 +2171,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1577: checking for $ac_word" >&5
+echo "configure:2175: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1603,7 +2201,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1607: checking for $ac_word" >&5
+echo "configure:2205: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1654,7 +2252,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1658: checking for $ac_word" >&5
+echo "configure: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
else
@@ -1686,7 +2284,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1690: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2288: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1697,12 +2295,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1701 "configure"
+#line 2299 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1728,12 +2326,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2330: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1737: checking whether we are using GNU C" >&5
+echo "configure:2335: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1742,7 +2340,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1761,7 +2359,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1765: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2363: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1798,7 +2396,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1802: checking for $ac_word" >&5
+echo "configure:2400: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1829,7 +2427,7 @@ done
test -n "$YACC" || YACC="yacc"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1833: checking how to run the C preprocessor" >&5
+echo "configure:2431: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1844,13 +2442,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
+#line 2446 "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:1854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1861,13 +2459,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1865 "configure"
+#line 2463 "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:1871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1878,13 +2476,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1882 "configure"
+#line 2480 "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:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1914,7 +2512,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1918: checking for $ac_word" >&5
+echo "configure:2516: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1942,12 +2540,12 @@ fi
test -n "$LEX" && break
done
-test -n "$LEX" || LEX=""$missing_dir/missing flex""
+test -n "$LEX" || LEX="$missing_dir/missing flex"
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1951: checking for $ac_word" >&5
+echo "configure:2549: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1981,7 +2579,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:1985: checking for yywrap in -l$ac_lib" >&5
+echo "configure:2583: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1989,7 +2587,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1993 "configure"
+#line 2591 "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
@@ -2000,7 +2598,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2023,7 +2621,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2027: checking lex output file root" >&5
+echo "configure:2625: checking lex output file root" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2044,7 +2642,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2048: checking whether yytext is a pointer" >&5
+echo "configure:2646: checking whether yytext is a pointer" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2056,14 +2654,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 2060 "configure"
+#line 2658 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_prog_lex_yytext_pointer=yes
else
@@ -2086,13 +2684,43 @@ fi
ALL_LINGUAS=
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2691: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2091: checking for ANSI C header files" >&5
+echo "configure:2719: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2096 "configure"
+#line 2724 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2100,7 +2728,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2117,7 +2745,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2121 "configure"
+#line 2749 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2135,7 +2763,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2139 "configure"
+#line 2767 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2156,7 +2784,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2160 "configure"
+#line 2788 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2167,7 +2795,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2191,12 +2819,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2195: checking for working const" >&5
+echo "configure:2823: 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 2200 "configure"
+#line 2828 "configure"
#include "confdefs.h"
int main() {
@@ -2245,7 +2873,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2266,21 +2894,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2270: checking for inline" >&5
+echo "configure:2898: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2277 "configure"
+#line 2905 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2306,12 +2934,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2310: checking for off_t" >&5
+echo "configure:2938: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2315 "configure"
+#line 2943 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2339,12 +2967,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2343: checking for size_t" >&5
+echo "configure:2971: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2348 "configure"
+#line 2976 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2374,19 +3002,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2378: checking for working alloca.h" >&5
+echo "configure:3006: 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 2383 "configure"
+#line 3011 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2407,12 +3035,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2411: checking for alloca" >&5
+echo "configure:3039: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2416 "configure"
+#line 3044 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2440,7 +3068,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2472,12 +3100,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2476: checking whether alloca needs Cray hooks" >&5
+echo "configure:3104: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2481 "configure"
+#line 3109 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2502,12 +3130,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2506: checking for $ac_func" >&5
+echo "configure:3134: 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 2511 "configure"
+#line 3139 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2530,7 +3158,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2557,7 +3185,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2561: checking stack direction for C alloca" >&5
+echo "configure:3189: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2565,7 +3193,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2569 "configure"
+#line 3197 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2584,7 +3212,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2609,17 +3237,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2613: checking for $ac_hdr" >&5
+echo "configure:3241: 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 2618 "configure"
+#line 3246 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2648,12 +3276,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2652: checking for $ac_func" >&5
+echo "configure:3280: 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 2657 "configure"
+#line 3285 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2676,7 +3304,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2701,7 +3329,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2705: checking for working mmap" >&5
+echo "configure:3333: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2709,7 +3337,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2713 "configure"
+#line 3341 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2849,7 +3477,7 @@ main()
}
EOF
-if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2877,17 +3505,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2881: checking for $ac_hdr" >&5
+echo "configure:3509: 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 2886 "configure"
+#line 3514 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3519: \"$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*
@@ -2917,12 +3545,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2921: checking for $ac_func" >&5
+echo "configure:3549: 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 2926 "configure"
+#line 3554 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2945,7 +3573,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3577: \"$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
@@ -2974,12 +3602,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2978: checking for $ac_func" >&5
+echo "configure:3606: 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 2983 "configure"
+#line 3611 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3002,7 +3630,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3634: \"$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
@@ -3036,19 +3664,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3040: checking for LC_MESSAGES" >&5
+echo "configure:3668: 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 3045 "configure"
+#line 3673 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3069,7 +3697,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3073: checking whether NLS is requested" >&5
+echo "configure:3701: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3089,7 +3717,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3093: checking whether included gettext is requested" >&5
+echo "configure:3721: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3108,17 +3736,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3112: checking for libintl.h" >&5
+echo "configure:3740: 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 3117 "configure"
+#line 3745 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3750: \"$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*
@@ -3135,19 +3763,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3139: checking for gettext in libc" >&5
+echo "configure:3767: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3144 "configure"
+#line 3772 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3163,7 +3791,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3167: checking for bindtextdomain in -lintl" >&5
+echo "configure:3795: 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
@@ -3171,7 +3799,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3175 "configure"
+#line 3803 "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
@@ -3182,7 +3810,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3814: \"$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
@@ -3198,19 +3826,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3202: checking for gettext in libintl" >&5
+echo "configure:3830: 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 3207 "configure"
+#line 3835 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3238,7 +3866,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3242: checking for $ac_word" >&5
+echo "configure:3870: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3272,12 +3900,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3276: checking for $ac_func" >&5
+echo "configure:3904: 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 3281 "configure"
+#line 3909 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3300,7 +3928,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3932: \"$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
@@ -3327,7 +3955,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3331: checking for $ac_word" >&5
+echo "configure:3959: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3363,7 +3991,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3367: checking for $ac_word" >&5
+echo "configure:3995: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3395,7 +4023,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3399 "configure"
+#line 4027 "configure"
#include "confdefs.h"
int main() {
@@ -3403,7 +4031,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3435,7 +4063,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3439: checking for $ac_word" >&5
+echo "configure:4067: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3469,7 +4097,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3473: checking for $ac_word" >&5
+echo "configure:4101: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3505,7 +4133,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3509: checking for $ac_word" >&5
+echo "configure:4137: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3595,7 +4223,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3599: checking for catalogs to be installed" >&5
+echo "configure:4227: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -3623,17 +4251,17 @@ echo "configure:3599: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:3627: checking for linux/version.h" >&5
+echo "configure:4255: 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 3632 "configure"
+#line 4260 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4265: \"$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*
@@ -3696,7 +4324,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:3700: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4328: 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"
@@ -3718,72 +4346,10 @@ fi
MAINT=$MAINTAINER_MODE_TRUE
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:3723: 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 3728 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:3739: \"$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:3756: 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 3761 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:3768: \"$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
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3787: checking for executable suffix" >&5
+echo "configure:4353: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3793,10 +4359,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -3836,7 +4402,7 @@ AR=${AR-ar}
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3840: checking for $ac_word" >&5
+echo "configure:4406: 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
@@ -3875,7 +4441,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3879: checking for a BSD compatible install" >&5
+echo "configure:4445: 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
@@ -3942,7 +4508,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:3946: checking for build system executable suffix" >&5
+echo "configure:4512: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3977,17 +4543,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3981: checking for $ac_hdr" >&5
+echo "configure:4547: 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 3986 "configure"
+#line 4552 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4557: \"$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*
@@ -4014,12 +4580,12 @@ fi
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:4018: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:4584: 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 4023 "configure"
+#line 4589 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -4035,7 +4601,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:4039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -4058,19 +4624,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:4062: checking for working alloca.h" >&5
+echo "configure:4628: 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 4067 "configure"
+#line 4633 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:4074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4640: \"$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
@@ -4091,12 +4657,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4095: checking for alloca" >&5
+echo "configure:4661: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4100 "configure"
+#line 4666 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -4124,7 +4690,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -4156,12 +4722,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4160: checking whether alloca needs Cray hooks" >&5
+echo "configure:4726: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4165 "configure"
+#line 4731 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -4186,12 +4752,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4190: checking for $ac_func" >&5
+echo "configure:4756: 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 4195 "configure"
+#line 4761 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4214,7 +4780,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4784: \"$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
@@ -4241,7 +4807,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4245: checking stack direction for C alloca" >&5
+echo "configure:4811: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4249,7 +4815,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 4253 "configure"
+#line 4819 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -4268,7 +4834,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -4292,12 +4858,12 @@ fi
for ac_func in mkdtemp mkstemp sbrk utimes setmode
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4296: checking for $ac_func" >&5
+echo "configure:4862: 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 4301 "configure"
+#line 4867 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4320,7 +4886,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4890: \"$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
@@ -4348,14 +4914,14 @@ done
# Some systems have frexp only in -lm, not in -lc.
echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
-echo "configure:4352: checking for library containing frexp" >&5
+echo "configure:4918: 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 4359 "configure"
+#line 4925 "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
@@ -4366,7 +4932,7 @@ int main() {
frexp()
; return 0; }
EOF
-if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_frexp="none required"
else
@@ -4377,7 +4943,7 @@ rm -f conftest*
test "$ac_cv_search_frexp" = "no" && for i in m; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4381 "configure"
+#line 4947 "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
@@ -4388,7 +4954,7 @@ int main() {
frexp()
; return 0; }
EOF
-if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_frexp="-l$i"
break
@@ -4410,19 +4976,19 @@ else :
fi
echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
-echo "configure:4414: checking for time_t in time.h" >&5
+echo "configure:4980: checking for time_t in time.h" >&5
if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4419 "configure"
+#line 4985 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_time_h=yes
else
@@ -4443,19 +5009,19 @@ EOF
fi
echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:4447: checking for time_t in sys/types.h" >&5
+echo "configure:5013: checking for time_t in sys/types.h" >&5
if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4452 "configure"
+#line 5018 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:4459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_types_h=yes
else
@@ -4478,12 +5044,12 @@ fi
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
# by default.
echo $ac_n "checking for utime.h""... $ac_c" 1>&6
-echo "configure:4482: checking for utime.h" >&5
+echo "configure:5048: 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 4487 "configure"
+#line 5053 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TIME_H
@@ -4494,7 +5060,7 @@ int main() {
struct utimbuf s;
; return 0; }
EOF
-if { (eval echo configure:4498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_header_utime_h=yes
else
@@ -4515,12 +5081,12 @@ EOF
fi
echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
-echo "configure:4519: checking whether fprintf must be declared" >&5
+echo "configure:5085: checking whether fprintf must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4524 "configure"
+#line 5090 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4541,7 +5107,7 @@ int main() {
char *(*pfn) = (char *(*)) fprintf
; return 0; }
EOF
-if { (eval echo configure:4545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_fprintf=no
else
@@ -4562,12 +5128,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4566: checking whether strstr must be declared" >&5
+echo "configure:5132: 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 4571 "configure"
+#line 5137 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4588,7 +5154,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4609,12 +5175,12 @@ EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:4613: checking whether sbrk must be declared" >&5
+echo "configure:5179: 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 4618 "configure"
+#line 5184 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4635,7 +5201,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:4639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -4656,12 +5222,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4660: checking whether getenv must be declared" >&5
+echo "configure:5226: 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 4665 "configure"
+#line 5231 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4682,7 +5248,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:4686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -4703,12 +5269,12 @@ EOF
fi
echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:4707: checking whether environ must be declared" >&5
+echo "configure:5273: 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 4712 "configure"
+#line 5278 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4729,7 +5295,7 @@ int main() {
char *(*pfn) = (char *(*)) environ
; return 0; }
EOF
-if { (eval echo configure:4733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_environ=no
else
@@ -4784,6 +5350,7 @@ DLLTOOL_DEFS=
BUILD_WINDRES=
BUILD_DLLWRAP=
BUILD_MISC=
+OBJDUMP_DEFS=
for targ in $target $canon_targets
do
@@ -4815,6 +5382,11 @@ do
*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
esac
case $targ in
+ arm-epoc-pe*)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
arm-*pe* | arm-*-wince)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
@@ -4825,6 +5397,9 @@ do
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
+ arm*-* | xscale-* | strongarm-* | d10v-*)
+ OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS"
+ ;;
i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
@@ -4872,6 +5447,7 @@ done
+
cat >> confdefs.h <<EOF
#define TARGET "${target}"
EOF
@@ -5046,9 +5622,13 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%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
@@ -5078,7 +5658,6 @@ s%@l@%$l%g
s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
s%@HDEFINES@%$HDEFINES%g
s%@AR@%$AR%g
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
@@ -5092,6 +5671,7 @@ 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%@UNDERSCORE@%$UNDERSCORE%g
CEOF
diff --git a/gnu/usr.bin/binutils/binutils/configure.in b/gnu/usr.bin/binutils/binutils/configure.in
index 6aeba657f7a..21b8d41cb60 100644
--- a/gnu/usr.bin/binutils/binutils/configure.in
+++ b/gnu/usr.bin/binutils/binutils/configure.in
@@ -6,7 +6,10 @@ AC_INIT(ar.c)
AC_CANONICAL_SYSTEM
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(binutils, 2.10.1)
+changequote(,)dnl
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+changequote([,])dnl
+AM_INIT_AUTOMAKE(binutils, ${BFD_VERSION})
AM_PROG_LIBTOOL
@@ -26,6 +29,27 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
+build_warnings="-W -Wall"
+AC_ARG_ENABLE(build-warnings,
+[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi])dnl
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+AC_SUBST(WARN_CFLAGS)
+
AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
@@ -150,6 +174,7 @@ DLLTOOL_DEFS=
BUILD_WINDRES=
BUILD_DLLWRAP=
BUILD_MISC=
+OBJDUMP_DEFS=
for targ in $target $canon_targets
do
@@ -183,6 +208,11 @@ changequote([,])dnl
*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
esac
case $targ in
+ arm-epoc-pe*)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
arm-*pe* | arm-*-wince)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
@@ -193,6 +223,9 @@ changequote([,])dnl
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
+ arm*-* | xscale-* | strongarm-* | d10v-*)
+ OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS"
+ ;;
changequote(,)dnl
i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*)
changequote([,])dnl
@@ -241,6 +274,7 @@ AC_SUBST(DLLTOOL_DEFS)
AC_SUBST(BUILD_WINDRES)
AC_SUBST(BUILD_DLLWRAP)
AC_SUBST(BUILD_MISC)
+AC_SUBST(OBJDUMP_DEFS)
AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.])
diff --git a/gnu/usr.bin/binutils/binutils/debug.c b/gnu/usr.bin/binutils/binutils/debug.c
index 82a9094a07c..ffdc7667a4a 100644
--- a/gnu/usr.bin/binutils/binutils/debug.c
+++ b/gnu/usr.bin/binutils/binutils/debug.c
@@ -1,5 +1,5 @@
/* debug.c -- Handle generic debugging information.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/deflex.l b/gnu/usr.bin/binutils/binutils/deflex.l
index 15a43c04f40..8ff72b8aec0 100644
--- a/gnu/usr.bin/binutils/binutils/deflex.l
+++ b/gnu/usr.bin/binutils/binutils/deflex.l
@@ -1,6 +1,6 @@
%{/* deflex.l - Lexer for .def files */
-/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/defparse.y b/gnu/usr.bin/binutils/binutils/defparse.y
index 5718d461443..7e139654e2d 100644
--- a/gnu/usr.bin/binutils/binutils/defparse.y
+++ b/gnu/usr.bin/binutils/binutils/defparse.y
@@ -1,6 +1,6 @@
%{ /* defparse.y - parser for .def files */
-/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/dlltool.c b/gnu/usr.bin/binutils/binutils/dlltool.c
index 69ea7df33a7..7364c764224 100644
--- a/gnu/usr.bin/binutils/binutils/dlltool.c
+++ b/gnu/usr.bin/binutils/binutils/dlltool.c
@@ -1,5 +1,6 @@
/* dlltool.c -- tool to generate stuff for PE style DLLs
- Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -383,8 +384,12 @@ static FILE *output_def;
static FILE *base_file;
#ifdef DLLTOOL_ARM
+#ifdef DLLTOOL_ARM_EPOC
+static const char *mname = "arm-epoc";
+#else
static const char *mname = "arm";
#endif
+#endif
#ifdef DLLTOOL_I386
static const char *mname = "i386";
@@ -605,7 +610,7 @@ mtable[] =
,
{
#define MARM_EPOC 9
- "arm", ".byte", ".short", ".long", ".asciz", "@",
+ "arm-epoc", ".byte", ".short", ".long", ".asciz", "@",
"ldr\tip,[pc]\n\tldr\tpc,[ip]\n\t.long",
".global", ".space", ".align\t2",".align\t4", "",
"epoc-pe-arm-little", bfd_arch_arm,
@@ -726,6 +731,7 @@ rvaafter (machine)
case MMCORE_LE:
case MMCORE_ELF:
case MMCORE_ELF_LE:
+ case MARM_EPOC:
break;
default:
/* xgettext:c-format */
@@ -750,6 +756,7 @@ rvabefore (machine)
case MMCORE_LE:
case MMCORE_ELF:
case MMCORE_ELF_LE:
+ case MARM_EPOC:
return ".rva\t";
default:
/* xgettext:c-format */
@@ -773,6 +780,7 @@ asm_prefix (machine)
case MMCORE_LE:
case MMCORE_ELF:
case MMCORE_ELF_LE:
+ case MARM_EPOC:
break;
case M386:
return "_";
diff --git a/gnu/usr.bin/binutils/binutils/dllwrap.c b/gnu/usr.bin/binutils/binutils/dllwrap.c
index 4f3607dbb06..912c3291c60 100644
--- a/gnu/usr.bin/binutils/binutils/dllwrap.c
+++ b/gnu/usr.bin/binutils/binutils/dllwrap.c
@@ -1,5 +1,5 @@
/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
@@ -858,10 +858,10 @@ main (argc, argv)
dlltool_cmdline = dyn_string_new (cmdline_len);
if (verbose)
{
- dyn_string_append (dlltool_cmdline, " -v");
+ dyn_string_append_cstr (dlltool_cmdline, " -v");
}
- dyn_string_append (dlltool_cmdline, " --dllname ");
- dyn_string_append (dlltool_cmdline, dll_name);
+ dyn_string_append_cstr (dlltool_cmdline, " --dllname ");
+ dyn_string_append_cstr (dlltool_cmdline, dll_name);
for (i = 1; i < argc; ++i)
{
@@ -869,10 +869,10 @@ main (argc, argv)
{
char *arg = saved_argv[i];
int quote = (strchr (arg, ' ') || strchr (arg, '\t'));
- dyn_string_append (dlltool_cmdline,
+ dyn_string_append_cstr (dlltool_cmdline,
(quote) ? " \"" : " ");
- dyn_string_append (dlltool_cmdline, arg);
- dyn_string_append (dlltool_cmdline,
+ dyn_string_append_cstr (dlltool_cmdline, arg);
+ dyn_string_append_cstr (dlltool_cmdline,
(quote) ? "\"" : "");
}
}
@@ -895,9 +895,9 @@ main (argc, argv)
break;
}
}
- dyn_string_append (driver_cmdline, driver_flags);
- dyn_string_append (driver_cmdline, " -o ");
- dyn_string_append (driver_cmdline, dll_file_name);
+ dyn_string_append_cstr (driver_cmdline, driver_flags);
+ dyn_string_append_cstr (driver_cmdline, " -o ");
+ dyn_string_append_cstr (driver_cmdline, dll_file_name);
if (! entry_point || strlen (entry_point) == 0)
{
@@ -916,10 +916,10 @@ main (argc, argv)
break;
}
}
- dyn_string_append (driver_cmdline, " -Wl,-e,");
- dyn_string_append (driver_cmdline, entry_point);
- dyn_string_append (dlltool_cmdline, " --exclude-symbol=");
- dyn_string_append (dlltool_cmdline,
+ dyn_string_append_cstr (driver_cmdline, " -Wl,-e,");
+ dyn_string_append_cstr (driver_cmdline, entry_point);
+ dyn_string_append_cstr (dlltool_cmdline, " --exclude-symbol=");
+ dyn_string_append_cstr (dlltool_cmdline,
(entry_point[0] == '_') ? entry_point+1 : entry_point);
if (! image_base_str || strlen (image_base_str) == 0)
@@ -930,12 +930,12 @@ main (argc, argv)
image_base_str = tmpbuf;
}
- dyn_string_append (driver_cmdline, " -Wl,--image-base,");
- dyn_string_append (driver_cmdline, image_base_str);
+ dyn_string_append_cstr (driver_cmdline, " -Wl,--image-base,");
+ dyn_string_append_cstr (driver_cmdline, image_base_str);
if (verbose)
{
- dyn_string_append (driver_cmdline, " -v");
+ dyn_string_append_cstr (driver_cmdline, " -v");
}
for (i = 1; i < argc; ++i)
@@ -944,10 +944,10 @@ main (argc, argv)
{
char *arg = saved_argv[i];
int quote = (strchr (arg, ' ') || strchr (arg, '\t'));
- dyn_string_append (driver_cmdline,
+ dyn_string_append_cstr (driver_cmdline,
(quote) ? " \"" : " ");
- dyn_string_append (driver_cmdline, arg);
- dyn_string_append (driver_cmdline,
+ dyn_string_append_cstr (driver_cmdline, arg);
+ dyn_string_append_cstr (driver_cmdline,
(quote) ? "\"" : "");
}
}
@@ -964,15 +964,15 @@ main (argc, argv)
step_pre1 = dyn_string_new (1024);
- dyn_string_append (step_pre1, dlltool_cmdline->s);
+ dyn_string_append_cstr (step_pre1, dlltool_cmdline->s);
if (export_all)
{
- dyn_string_append (step_pre1, " --export-all --exclude-symbol=");
- dyn_string_append (step_pre1,
+ dyn_string_append_cstr (step_pre1, " --export-all --exclude-symbol=");
+ dyn_string_append_cstr (step_pre1,
"_cygwin_dll_entry@12,DllMainCRTStartup@12,DllMain@12,DllEntryPoint@12");
}
- dyn_string_append (step_pre1, " --output-def ");
- dyn_string_append (step_pre1, def_file_name);
+ dyn_string_append_cstr (step_pre1, " --output-def ");
+ dyn_string_append_cstr (step_pre1, def_file_name);
for (i = 1; i < argc; ++i)
{
@@ -984,10 +984,10 @@ main (argc, argv)
&& (arg[len-1] == 'o' || arg[len-1] == 'a'))
{
int quote = (strchr (arg, ' ') || strchr (arg, '\t'));
- dyn_string_append (step_pre1,
+ dyn_string_append_cstr (step_pre1,
(quote) ? " \"" : " ");
- dyn_string_append (step_pre1, arg);
- dyn_string_append (step_pre1,
+ dyn_string_append_cstr (step_pre1, arg);
+ dyn_string_append_cstr (step_pre1,
(quote) ? "\"" : "");
}
}
@@ -999,8 +999,8 @@ main (argc, argv)
dyn_string_delete (step_pre1);
}
- dyn_string_append (dlltool_cmdline, " --def ");
- dyn_string_append (dlltool_cmdline, def_file_name);
+ dyn_string_append_cstr (dlltool_cmdline, " --def ");
+ dyn_string_append_cstr (dlltool_cmdline, def_file_name);
if (verbose)
{
@@ -1035,18 +1035,18 @@ main (argc, argv)
dyn_string_t step1 = dyn_string_new (driver_cmdline->length
+ strlen (base_file_name)
+ 20);
- dyn_string_append (step1, "-Wl,--base-file,");
+ dyn_string_append_cstr (step1, "-Wl,--base-file,");
quote = (strchr (base_file_name, ' ')
|| strchr (base_file_name, '\t'));
- dyn_string_append (step1,
+ dyn_string_append_cstr (step1,
(quote) ? "\"" : "");
- dyn_string_append (step1, base_file_name);
- dyn_string_append (step1,
+ dyn_string_append_cstr (step1, base_file_name);
+ dyn_string_append_cstr (step1,
(quote) ? "\"" : "");
if (driver_cmdline->length)
{
- dyn_string_append (step1, " ");
- dyn_string_append (step1, driver_cmdline->s);
+ dyn_string_append_cstr (step1, " ");
+ dyn_string_append_cstr (step1, driver_cmdline->s);
}
if (run (driver_name, step1->s))
@@ -1086,28 +1086,28 @@ main (argc, argv)
+ strlen (exp_file_name)
+ 20);
- dyn_string_append (step2, "--base-file ");
+ dyn_string_append_cstr (step2, "--base-file ");
quote = (strchr (base_file_name, ' ')
|| strchr (base_file_name, '\t'));
- dyn_string_append (step2,
+ dyn_string_append_cstr (step2,
(quote) ? "\"" : "");
- dyn_string_append (step2, base_file_name);
- dyn_string_append (step2,
+ dyn_string_append_cstr (step2, base_file_name);
+ dyn_string_append_cstr (step2,
(quote) ? "\" " : " ");
- dyn_string_append (step2, "--output-exp ");
+ dyn_string_append_cstr (step2, "--output-exp ");
quote = (strchr (exp_file_name, ' ')
|| strchr (exp_file_name, '\t'));
- dyn_string_append (step2,
+ dyn_string_append_cstr (step2,
(quote) ? "\"" : "");
- dyn_string_append (step2, exp_file_name);
- dyn_string_append (step2,
+ dyn_string_append_cstr (step2, exp_file_name);
+ dyn_string_append_cstr (step2,
(quote) ? "\"" : "");
if (dlltool_cmdline->length)
{
- dyn_string_append (step2, " ");
- dyn_string_append (step2, dlltool_cmdline->s);
+ dyn_string_append_cstr (step2, " ");
+ dyn_string_append_cstr (step2, dlltool_cmdline->s);
}
if (run (dlltool_name, step2->s))
@@ -1130,27 +1130,27 @@ main (argc, argv)
+ strlen (exp_file_name)
+ strlen (base_file_name)
+ 20);
- dyn_string_append (step3, "-Wl,--base-file,");
+ dyn_string_append_cstr (step3, "-Wl,--base-file,");
quote = (strchr (base_file_name, ' ')
|| strchr (base_file_name, '\t'));
- dyn_string_append (step3,
+ dyn_string_append_cstr (step3,
(quote) ? "\"" : "");
- dyn_string_append (step3, base_file_name);
- dyn_string_append (step3,
+ dyn_string_append_cstr (step3, base_file_name);
+ dyn_string_append_cstr (step3,
(quote) ? "\" " : " ");
quote = (strchr (exp_file_name, ' ')
|| strchr (exp_file_name, '\t'));
- dyn_string_append (step3,
+ dyn_string_append_cstr (step3,
(quote) ? "\"" : "");
- dyn_string_append (step3, exp_file_name);
- dyn_string_append (step3,
+ dyn_string_append_cstr (step3, exp_file_name);
+ dyn_string_append_cstr (step3,
(quote) ? "\"" : "");
if (driver_cmdline->length)
{
- dyn_string_append (step3, " ");
- dyn_string_append (step3, driver_cmdline->s);
+ dyn_string_append_cstr (step3, " ");
+ dyn_string_append_cstr (step3, driver_cmdline->s);
}
if (run (driver_name, step3->s))
@@ -1171,34 +1171,34 @@ main (argc, argv)
+ strlen (exp_file_name)
+ 20);
- dyn_string_append (step4, "--base-file ");
+ dyn_string_append_cstr (step4, "--base-file ");
quote = (strchr (base_file_name, ' ')
|| strchr (base_file_name, '\t'));
- dyn_string_append (step4,
+ dyn_string_append_cstr (step4,
(quote) ? "\"" : "");
- dyn_string_append (step4, base_file_name);
- dyn_string_append (step4,
+ dyn_string_append_cstr (step4, base_file_name);
+ dyn_string_append_cstr (step4,
(quote) ? "\" " : " ");
- dyn_string_append (step4, "--output-exp ");
+ dyn_string_append_cstr (step4, "--output-exp ");
quote = (strchr (exp_file_name, ' ')
|| strchr (exp_file_name, '\t'));
- dyn_string_append (step4,
+ dyn_string_append_cstr (step4,
(quote) ? "\"" : "");
- dyn_string_append (step4, exp_file_name);
- dyn_string_append (step4,
+ dyn_string_append_cstr (step4, exp_file_name);
+ dyn_string_append_cstr (step4,
(quote) ? "\"" : "");
if (dlltool_cmdline->length)
{
- dyn_string_append (step4, " ");
- dyn_string_append (step4, dlltool_cmdline->s);
+ dyn_string_append_cstr (step4, " ");
+ dyn_string_append_cstr (step4, dlltool_cmdline->s);
}
if (output_lib_file_name)
{
- dyn_string_append (step4, " --output-lib ");
- dyn_string_append (step4, output_lib_file_name);
+ dyn_string_append_cstr (step4, " --output-lib ");
+ dyn_string_append_cstr (step4, output_lib_file_name);
}
if (run (dlltool_name, step4->s))
@@ -1224,16 +1224,16 @@ main (argc, argv)
+ 20);
quote = (strchr (exp_file_name, ' ')
|| strchr (exp_file_name, '\t'));
- dyn_string_append (step5,
+ dyn_string_append_cstr (step5,
(quote) ? "\"" : "");
- dyn_string_append (step5, exp_file_name);
- dyn_string_append (step5,
+ dyn_string_append_cstr (step5, exp_file_name);
+ dyn_string_append_cstr (step5,
(quote) ? "\"" : "");
if (driver_cmdline->length)
{
- dyn_string_append (step5, " ");
- dyn_string_append (step5, driver_cmdline->s);
+ dyn_string_append_cstr (step5, " ");
+ dyn_string_append_cstr (step5, driver_cmdline->s);
}
if (run (driver_name, step5->s))
diff --git a/gnu/usr.bin/binutils/binutils/filemode.c b/gnu/usr.bin/binutils/binutils/filemode.c
index f9811bc4926..7f9b1b76d46 100644
--- a/gnu/usr.bin/binutils/binutils/filemode.c
+++ b/gnu/usr.bin/binutils/binutils/filemode.c
@@ -1,5 +1,6 @@
/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 90, 91, 94, 95, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1985, 1990, 1991, 1994, 1995, 1997
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnu/usr.bin/binutils/binutils/ieee.c b/gnu/usr.bin/binutils/binutils/ieee.c
index 27409cc9ae0..ad5ddc7d65c 100644
--- a/gnu/usr.bin/binutils/binutils/ieee.c
+++ b/gnu/usr.bin/binutils/binutils/ieee.c
@@ -1,5 +1,5 @@
/* ieee.c -- Read and write IEEE-695 debugging information.
- Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -410,7 +410,7 @@ ieee_read_optional_number (info, pp, pv, ppresent)
}
ieee_error (info, *pp - 1, _("invalid number"));
- return false;
+ return false;
}
/* Read a required string from an IEEE file. */
@@ -563,7 +563,7 @@ ieee_read_expression (info, pp, pv)
ieee_error (info, start, _("unknown section"));
return false;
}
-
+
if (esp - expr_stack >= EXPR_STACK_SIZE)
{
ieee_error (info, start, _("expression stack overflow"));
@@ -4494,7 +4494,7 @@ ieee_start_range (info, low)
r->next = info->pending_ranges;
info->pending_ranges = r;
return true;
-}
+}
/* Finish a range started by ieee_start_range. */
@@ -4927,7 +4927,9 @@ ieee_start_compilation_unit (p, filename)
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *modname;
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
const char *backslash;
+#endif
char *c, *s;
unsigned int nindx;
@@ -4939,10 +4941,12 @@ ieee_start_compilation_unit (p, filename)
info->filename = filename;
modname = strrchr (filename, '/');
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
/* We could have a mixed forward/back slash case. */
- backslash = strrchr (modname, '\\');
- if (backslash > modname)
+ backslash = strrchr (filename, '\\');
+ if (modname == NULL || (backslash != NULL && backslash > modname))
modname = backslash;
+#endif
if (modname != NULL)
++modname;
@@ -5200,15 +5204,20 @@ ieee_add_bb11 (info, sec, low, high)
}
else
{
- const char *filename, *modname, *backslash;
+ const char *filename, *modname;
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ const char *backslash;
+#endif
char *c, *s;
/* Start the enclosing BB10 block. */
filename = bfd_get_filename (info->abfd);
modname = strrchr (filename, '/');
- backslash = strrchr (modname, '\\');
- if (backslash > modname)
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ backslash = strrchr (filename, '\\');
+ if (modname == NULL || (backslash != NULL && backslash > modname))
modname = backslash;
+#endif
if (modname != NULL)
++modname;
@@ -5838,7 +5847,7 @@ ieee_offset_type (p)
which seems pretty important. I'm going to punt this for now. */
return ieee_int_type (p, 4, true);
-}
+}
/* Make a method type. */
@@ -7312,7 +7321,7 @@ ieee_function_parameter (p, name, kind, val)
return false;
++info->fnargcount;
- return true;
+ return true;
}
/* Output pending function parameters. */
diff --git a/gnu/usr.bin/binutils/binutils/nlmconv.1 b/gnu/usr.bin/binutils/binutils/nlmconv.1
index cbc3aedd101..816201740b9 100644
--- a/gnu/usr.bin/binutils/binutils/nlmconv.1
+++ b/gnu/usr.bin/binutils/binutils/nlmconv.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1991, 1996 Free Software Foundation
+.\" Copyright (c) 1991, 1996, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH nlmconv 1 "March 1996" "cygnus support" "GNU Development Tools"
+.TH nlmconv 1 "March 1996" "Free Software Foundation" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -92,19 +92,381 @@ The GNU Binary Utilities\c
\&, Roland H. Pesch (June 1993).
.SH COPYING
-Copyright (c) 1993 Free Software Foundation, Inc.
+Copyright (c) 1993, 2000 Free Software Foundation, Inc.
.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+This document is distributed under the terms of the GNU Free
+Documenation License. That license is described in the GNU Free
+Documentation License section.
+
+This document is distributed under the terms of the GNU Free
+Documentation License, version 1.1. That license is described in the
+sources for this manual page, but it is not displayed here in order to
+make this manual more consise. Copies of this license can also be
+obtained from: http://www.gnu.org/copyleft/.
+
+\" .SH GNU Free Documentation License
+\" Version 1.1, March 2000
+
+\" Copyright (C) 2000 Free Software Foundation, Inc.
+\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\" Everyone is permitted to copy and distribute verbatim
+\" copies of this license document, but changing it is
+\" not allowed.
+\" .PP
+\" 0. PREAMBLE
+\" .PP
+\" The purpose of this License is to make a manual, textbook, or other
+\" written document "free" in the sense of freedom: to assure everyone
+\" the effective freedom to copy and redistribute it, with or without
+\" modifying it, either commercially or noncommercially. Secondarily,
+\" this License preserves for the author and publisher a way to get
+\" credit for their work, while not being considered responsible for
+\" modifications made by others.
+\" .PP
+\" This License is a kind of "copyleft", which means that derivative
+\" works of the document must themselves be free in the same sense. It
+\" complements the GNU General Public License, which is a copyleft
+\" license designed for free software.
+\" .PP
+\" We have designed this License in order to use it for manuals for free
+\" software, because free software needs free documentation: a free
+\" program should come with manuals providing the same freedoms that the
+\" software does. But this License is not limited to software manuals;
+\" it can be used for any textual work, regardless of subject matter or
+\" whether it is published as a printed book. We recommend this License
+\" principally for works whose purpose is instruction or reference.
+\" .PP
+\" 1. APPLICABILITY AND DEFINITIONS
+\" .PP
+\" This License applies to any manual or other work that contains a
+\" notice placed by the copyright holder saying it can be distributed
+\" under the terms of this License. The "Document", below, refers to any
+\" such manual or work. Any member of the public is a licensee, and is
+\" addressed as "you".
+\" .PP
+\" A "Modified Version" of the Document means any work containing the
+\" Document or a portion of it, either copied verbatim, or with
+\" modifications and/or translated into another language.
+\" .PP
+\" A "Secondary Section" is a named appendix or a front-matter section of
+\" the Document that deals exclusively with the relationship of the
+\" publishers or authors of the Document to the Document's overall subject
+\" (or to related matters) and contains nothing that could fall directly
+\" within that overall subject. (For example, if the Document is in part a
+\" textbook of mathematics, a Secondary Section may not explain any
+\" mathematics.) The relationship could be a matter of historical
+\" connection with the subject or with related matters, or of legal,
+\" commercial, philosophical, ethical or political position regarding
+\" them.
+\" .PP
+\" The "Invariant Sections" are certain Secondary Sections whose titles
+\" are designated, as being those of Invariant Sections, in the notice
+\" that says that the Document is released under this License.
+\" .PP
+\" The "Cover Texts" are certain short passages of text that are listed,
+\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+\" the Document is released under this License.
+\" .PP
+\" A "Transparent" copy of the Document means a machine-readable copy,
+\" represented in a format whose specification is available to the
+\" general public, whose contents can be viewed and edited directly and
+\" straightforwardly with generic text editors or (for images composed of
+\" pixels) generic paint programs or (for drawings) some widely available
+\" drawing editor, and that is suitable for input to text formatters or
+\" for automatic translation to a variety of formats suitable for input
+\" to text formatters. A copy made in an otherwise Transparent file
+\" format whose markup has been designed to thwart or discourage
+\" subsequent modification by readers is not Transparent. A copy that is
+\" not "Transparent" is called "Opaque".
+\" .PP
+\" Examples of suitable formats for Transparent copies include plain
+\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
+\" or XML using a publicly available DTD, and standard-conforming simple
+\" HTML designed for human modification. Opaque formats include
+\" PostScript, PDF, proprietary formats that can be read and edited only
+\" by proprietary word processors, SGML or XML for which the DTD and/or
+\" processing tools are not generally available, and the
+\" machine-generated HTML produced by some word processors for output
+\" purposes only.
+\" .PP
+\" The "Title Page" means, for a printed book, the title page itself,
+\" plus such following pages as are needed to hold, legibly, the material
+\" this License requires to appear in the title page. For works in
+\" formats which do not have any title page as such, "Title Page" means
+\" the text near the most prominent appearance of the work's title,
+\" preceding the beginning of the body of the text.
+\" .PP
+\" 2. VERBATIM COPYING
+\" .PP
+\" You may copy and distribute the Document in any medium, either
+\" commercially or noncommercially, provided that this License, the
+\" copyright notices, and the license notice saying this License applies
+\" to the Document are reproduced in all copies, and that you add no other
+\" conditions whatsoever to those of this License. You may not use
+\" technical measures to obstruct or control the reading or further
+\" copying of the copies you make or distribute. However, you may accept
+\" compensation in exchange for copies. If you distribute a large enough
+\" number of copies you must also follow the conditions in section 3.
+\" .PP
+\" You may also lend copies, under the same conditions stated above, and
+\" you may publicly display copies.
+\" .PP
+\" 3. COPYING IN QUANTITY
+\" .PP
+\" If you publish printed copies of the Document numbering more than 100,
+\" and the Document's license notice requires Cover Texts, you must enclose
+\" the copies in covers that carry, clearly and legibly, all these Cover
+\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+\" the back cover. Both covers must also clearly and legibly identify
+\" you as the publisher of these copies. The front cover must present
+\" the full title with all words of the title equally prominent and
+\" visible. You may add other material on the covers in addition.
+\" Copying with changes limited to the covers, as long as they preserve
+\" the title of the Document and satisfy these conditions, can be treated
+\" as verbatim copying in other respects.
+\" .PP
+\" If the required texts for either cover are too voluminous to fit
+\" legibly, you should put the first ones listed (as many as fit
+\" reasonably) on the actual cover, and continue the rest onto adjacent
+\" pages.
+\" .PP
+\" If you publish or distribute Opaque copies of the Document numbering
+\" more than 100, you must either include a machine-readable Transparent
+\" copy along with each Opaque copy, or state in or with each Opaque copy
+\" a publicly-accessible computer-network location containing a complete
+\" Transparent copy of the Document, free of added material, which the
+\" general network-using public has access to download anonymously at no
+\" charge using public-standard network protocols. If you use the latter
+\" option, you must take reasonably prudent steps, when you begin
+\" distribution of Opaque copies in quantity, to ensure that this
+\" Transparent copy will remain thus accessible at the stated location
+\" until at least one year after the last time you distribute an Opaque
+\" copy (directly or through your agents or retailers) of that edition to
+\" the public.
+\" .PP
+\" It is requested, but not required, that you contact the authors of the
+\" Document well before redistributing any large number of copies, to give
+\" them a chance to provide you with an updated version of the Document.
+\" .PP
+\" 4. MODIFICATIONS
+\" .PP
+\" You may copy and distribute a Modified Version of the Document under
+\" the conditions of sections 2 and 3 above, provided that you release
+\" the Modified Version under precisely this License, with the Modified
+\" Version filling the role of the Document, thus licensing distribution
+\" and modification of the Modified Version to whoever possesses a copy
+\" of it. In addition, you must do these things in the Modified Version:
+\" .PP
+\" A. Use in the Title Page (and on the covers, if any) a title distinct
+\" from that of the Document, and from those of previous versions
+\" (which should, if there were any, be listed in the History section
+\" of the Document). You may use the same title as a previous version
+\" if the original publisher of that version gives permission.
+\" .PP
+\" B. List on the Title Page, as authors, one or more persons or entities
+\" responsible for authorship of the modifications in the Modified
+\" Version, together with at least five of the principal authors of the
+\" Document (all of its principal authors, if it has less than five).
+\" .PP
+\" C. State on the Title page the name of the publisher of the
+\" Modified Version, as the publisher.
+\" .PP
+\" D. Preserve all the copyright notices of the Document.
+\" .PP
+\" E. Add an appropriate copyright notice for your modifications
+\" adjacent to the other copyright notices.
+\" .PP
+\" F. Include, immediately after the copyright notices, a license notice
+\" giving the public permission to use the Modified Version under the
+\" terms of this License, in the form shown in the Addendum below.
+\" Preserve in that license notice the full lists of Invariant Sections
+\" and required Cover Texts given in the Document's license notice.
+\" .PP
+\" H. Include an unaltered copy of this License.
+\" .PP
+\" I. Preserve the section entitled "History", and its title, and add to
+\" it an item stating at least the title, year, new authors, and
+\" publisher of the Modified Version as given on the Title Page. If
+\" there is no section entitled "History" in the Document, create one
+\" stating the title, year, authors, and publisher of the Document as
+\" given on its Title Page, then add an item describing the Modified
+\" Version as stated in the previous sentence.
+\" .PP
+\" J. Preserve the network location, if any, given in the Document for
+\" public access to a Transparent copy of the Document, and likewise
+\" the network locations given in the Document for previous versions
+\" it was based on. These may be placed in the "History" section.
+\" You may omit a network location for a work that was published at
+\" least four years before the Document itself, or if the original
+\" publisher of the version it refers to gives permission.
+\" .PP
+\" K. In any section entitled "Acknowledgements" or "Dedications",
+\" preserve the section's title, and preserve in the section all the
+\" substance and tone of each of the contributor acknowledgements
+\" and/or dedications given therein.
+\" .PP
+\" L. Preserve all the Invariant Sections of the Document,
+\" unaltered in their text and in their titles. Section numbers
+\" or the equivalent are not considered part of the section titles.
+\" .PP
+\" M. Delete any section entitled "Endorsements". Such a section
+\" may not be included in the Modified Version.
+\" .PP
+\" N. Do not retitle any existing section as "Endorsements"
+\" or to conflict in title with any Invariant Section.
+\" .PP
+\" If the Modified Version includes new front-matter sections or
+\" appendices that qualify as Secondary Sections and contain no material
+\" copied from the Document, you may at your option designate some or all
+\" of these sections as invariant. To do this, add their titles to the
+\" list of Invariant Sections in the Modified Version's license notice.
+\" These titles must be distinct from any other section titles.
+\" .PP
+\" You may add a section entitled "Endorsements", provided it contains
+\" nothing but endorsements of your Modified Version by various
+\" parties--for example, statements of peer review or that the text has
+\" been approved by an organization as the authoritative definition of a
+\" standard.
+\" .PP
+\" You may add a passage of up to five words as a Front-Cover Text, and a
+\" passage of up to 25 words as a Back-Cover Text, to the end of the list
+\" of Cover Texts in the Modified Version. Only one passage of
+\" Front-Cover Text and one of Back-Cover Text may be added by (or
+\" through arrangements made by) any one entity. If the Document already
+\" includes a cover text for the same cover, previously added by you or
+\" by arrangement made by the same entity you are acting on behalf of,
+\" you may not add another; but you may replace the old one, on explicit
+\" permission from the previous publisher that added the old one.
+\" .PP
+\" The author(s) and publisher(s) of the Document do not by this License
+\" give permission to use their names for publicity for or to assert or
+\" imply endorsement of any Modified Version.
+\" .PP
+
+\" 5. COMBINING DOCUMENTS
+\" .PP
+\" You may combine the Document with other documents released under this
+\" License, under the terms defined in section 4 above for modified
+\" versions, provided that you include in the combination all of the
+\" Invariant Sections of all of the original documents, unmodified, and
+\" list them all as Invariant Sections of your combined work in its
+\" license notice.
+\" .PP
+\" The combined work need only contain one copy of this License, and
+\" multiple identical Invariant Sections may be replaced with a single
+\" copy. If there are multiple Invariant Sections with the same name but
+\" different contents, make the title of each such section unique by
+\" adding at the end of it, in parentheses, the name of the original
+\" author or publisher of that section if known, or else a unique number.
+\" Make the same adjustment to the section titles in the list of
+\" Invariant Sections in the license notice of the combined work.
+\" .PP
+\" In the combination, you must combine any sections entitled "History"
+\" in the various original documents, forming one section entitled
+\" "History"; likewise combine any sections entitled "Acknowledgements",
+\" and any sections entitled "Dedications". You must delete all sections
+\" entitled "Endorsements."
+\" .PP
+
+\" 6. COLLECTIONS OF DOCUMENTS
+\" .PP
+\" You may make a collection consisting of the Document and other documents
+\" released under this License, and replace the individual copies of this
+\" License in the various documents with a single copy that is included in
+\" the collection, provided that you follow the rules of this License for
+\" verbatim copying of each of the documents in all other respects.
+\" .PP
+\" You may extract a single document from such a collection, and distribute
+\" it individually under this License, provided you insert a copy of this
+\" License into the extracted document, and follow this License in all
+\" other respects regarding verbatim copying of that document.
+\" .PP
+
+\" 7. AGGREGATION WITH INDEPENDENT WORKS
+\" .PP
+\" A compilation of the Document or its derivatives with other separate
+\" and independent documents or works, in or on a volume of a storage or
+\" distribution medium, does not as a whole count as a Modified Version
+\" of the Document, provided no compilation copyright is claimed for the
+\" compilation. Such a compilation is called an "aggregate", and this
+\" License does not apply to the other self-contained works thus compiled
+\" with the Document, on account of their being thus compiled, if they
+\" are not themselves derivative works of the Document.
+\" .PP
+\" If the Cover Text requirement of section 3 is applicable to these
+\" copies of the Document, then if the Document is less than one quarter
+\" of the entire aggregate, the Document's Cover Texts may be placed on
+\" covers that surround only the Document within the aggregate.
+\" Otherwise they must appear on covers around the whole aggregate.
+\" .PP
+
+\" 8. TRANSLATION
+\" .PP
+\" Translation is considered a kind of modification, so you may
+\" distribute translations of the Document under the terms of section 4.
+\" Replacing Invariant Sections with translations requires special
+\" permission from their copyright holders, but you may include
+\" translations of some or all Invariant Sections in addition to the
+\" original versions of these Invariant Sections. You may include a
+\" translation of this License provided that you also include the
+\" original English version of this License. In case of a disagreement
+\" between the translation and the original English version of this
+\" License, the original English version will prevail.
+\" .PP
+
+\" 9. TERMINATION
+\" .PP
+\" You may not copy, modify, sublicense, or distribute the Document except
+\" as expressly provided for under this License. Any other attempt to
+\" copy, modify, sublicense or distribute the Document is void, and will
+\" automatically terminate your rights under this License. However,
+\" parties who have received copies, or rights, from you under this
+\" License will not have their licenses terminated so long as such
+\" parties remain in full compliance.
+\" .PP
+
+\" 10. FUTURE REVISIONS OF THIS LICENSE
+\" .PP
+\" The Free Software Foundation may publish new, revised versions
+\" of the GNU Free Documentation License from time to time. Such new
+\" versions will be similar in spirit to the present version, but may
+\" differ in detail to address new problems or concerns. See
+\" http://www.gnu.org/copyleft/.
+\" .PP
+\" Each version of the License is given a distinguishing version number.
+\" If the Document specifies that a particular numbered version of this
+\" License "or any later version" applies to it, you have the option of
+\" following the terms and conditions either of that specified version or
+\" of any later version that has been published (not as a draft) by the
+\" Free Software Foundation. If the Document does not specify a version
+\" number of this License, you may choose any version ever published (not
+\" as a draft) by the Free Software Foundation.
+\" .PP
+
+\" ADDENDUM: How to use this License for your documents
+\" .PP
+\" To use this License in a document you have written, include a copy of
+\" the License in the document and put the following copyright and
+\" license notices just after the title page:
+\" .PP
+\" Copyright (c) YEAR YOUR NAME.
+\" Permission is granted to copy, distribute and/or
+\" modify this document under the terms of the GNU
+\" Free Documentation License, Version 1.1 or any later
+\" version published by the Free Software Foundation;
+\" with the Invariant Sections being LIST THEIR TITLES,
+\" with the Front-Cover Texts being LIST, and with the
+\" Back-Cover Texts being LIST. A copy of the license
+\" is included in the section entitled "GNU Free
+\" Documentation License".
+\" .PP
+\" If you have no Invariant Sections, write "with no Invariant Sections"
+\" instead of saying which ones are invariant. If you have no
+\" Front-Cover Texts, write "no Front-Cover Texts" instead of
+\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+\" .PP
+\" If your document contains nontrivial examples of program code, we
+\" recommend releasing these examples in parallel under your choice of
+\" free software license, such as the GNU General Public License,
+\" to permit their use in free software.
diff --git a/gnu/usr.bin/binutils/binutils/nlmconv.c b/gnu/usr.bin/binutils/binutils/nlmconv.c
index 26602d7b6a7..9c7dd3737fc 100644
--- a/gnu/usr.bin/binutils/binutils/nlmconv.c
+++ b/gnu/usr.bin/binutils/binutils/nlmconv.c
@@ -1,5 +1,5 @@
/* nlmconv.c -- NLM conversion program
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -2086,9 +2086,6 @@ powerpc_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
#define LD_NAME "ld"
#endif
-/* Temporary file name base. */
-static char *temp_filename;
-
/* The user has specified several input files. Invoke the linker to
link them all together, and convert and delete the resulting output
file. */
@@ -2137,10 +2134,7 @@ link_inputs (inputs, ld)
if (ld == NULL)
ld = (char *) LD_NAME;
- temp_filename = choose_temp_base ();
-
- unlink_on_exit = xmalloc (strlen (temp_filename) + 3);
- sprintf (unlink_on_exit, "%s.O", temp_filename);
+ unlink_on_exit = make_temp_file (".O");
argv[0] = ld;
argv[1] = (char *) "-Ur";
diff --git a/gnu/usr.bin/binutils/binutils/nlmheader.c b/gnu/usr.bin/binutils/binutils/nlmheader.c
index 830e6b70a0e..b6afc4214c9 100644
--- a/gnu/usr.bin/binutils/binutils/nlmheader.c
+++ b/gnu/usr.bin/binutils/binutils/nlmheader.c
@@ -42,7 +42,7 @@
#line 1 "nlmheader.y"
/* nlmheader.y - parse NLM header specification keywords.
- Copyright (C) 1993, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -335,7 +335,7 @@ static const short yycheck[] = { 3,
-1, 48, -1, -1, 68
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/share/misc/bison.simple"
+#line 3 "/usr/share/bison/bison.simple"
/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
@@ -549,7 +549,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
#endif
#endif
-#line 217 "/usr/share/misc/bison.simple"
+#line 217 "/usr/share/bison/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -1281,7 +1281,7 @@ case 51:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/share/misc/bison.simple"
+#line 543 "/usr/share/bison/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
diff --git a/gnu/usr.bin/binutils/binutils/nlmheader.y b/gnu/usr.bin/binutils/binutils/nlmheader.y
index 0f1e22aa5e3..3ab5a794a13 100644
--- a/gnu/usr.bin/binutils/binutils/nlmheader.y
+++ b/gnu/usr.bin/binutils/binutils/nlmheader.y
@@ -1,5 +1,5 @@
%{/* nlmheader.y - parse NLM header specification keywords.
- Copyright (C) 1993, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/nm.1 b/gnu/usr.bin/binutils/binutils/nm.1
index c2ad99e559a..dbb116c7b61 100644
--- a/gnu/usr.bin/binutils/binutils/nm.1
+++ b/gnu/usr.bin/binutils/binutils/nm.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1991 Free Software Foundation
+.\" Copyright (c) 1991, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH nm 1 "5 November 1991" "cygnus support" "GNU Development Tools"
+.TH nm 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -212,19 +212,377 @@ The GNU Binary Utilities\c
.SH COPYING
-Copyright (c) 1991 Free Software Foundation, Inc.
+Copyright (c) 1991, 2000 Free Software Foundation, Inc.
.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+This document is distributed under the terms of the GNU Free
+Documentation License, version 1.1. That license is described in the
+sources for this manual page, but it is not displayed here in order to
+make this manual more consise. Copies of this license can also be
+obtained from: http://www.gnu.org/copyleft/.
+
+\" .SH GNU Free Documentation License
+\" Version 1.1, March 2000
+
+\" Copyright (C) 2000 Free Software Foundation, Inc.
+\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\" Everyone is permitted to copy and distribute verbatim
+\" copies of this license document, but changing it is
+\" not allowed.
+\" .PP
+\" 0. PREAMBLE
+\" .PP
+\" The purpose of this License is to make a manual, textbook, or other
+\" written document "free" in the sense of freedom: to assure everyone
+\" the effective freedom to copy and redistribute it, with or without
+\" modifying it, either commercially or noncommercially. Secondarily,
+\" this License preserves for the author and publisher a way to get
+\" credit for their work, while not being considered responsible for
+\" modifications made by others.
+\" .PP
+\" This License is a kind of "copyleft", which means that derivative
+\" works of the document must themselves be free in the same sense. It
+\" complements the GNU General Public License, which is a copyleft
+\" license designed for free software.
+\" .PP
+\" We have designed this License in order to use it for manuals for free
+\" software, because free software needs free documentation: a free
+\" program should come with manuals providing the same freedoms that the
+\" software does. But this License is not limited to software manuals;
+\" it can be used for any textual work, regardless of subject matter or
+\" whether it is published as a printed book. We recommend this License
+\" principally for works whose purpose is instruction or reference.
+\" .PP
+\" 1. APPLICABILITY AND DEFINITIONS
+\" .PP
+\" This License applies to any manual or other work that contains a
+\" notice placed by the copyright holder saying it can be distributed
+\" under the terms of this License. The "Document", below, refers to any
+\" such manual or work. Any member of the public is a licensee, and is
+\" addressed as "you".
+\" .PP
+\" A "Modified Version" of the Document means any work containing the
+\" Document or a portion of it, either copied verbatim, or with
+\" modifications and/or translated into another language.
+\" .PP
+\" A "Secondary Section" is a named appendix or a front-matter section of
+\" the Document that deals exclusively with the relationship of the
+\" publishers or authors of the Document to the Document's overall subject
+\" (or to related matters) and contains nothing that could fall directly
+\" within that overall subject. (For example, if the Document is in part a
+\" textbook of mathematics, a Secondary Section may not explain any
+\" mathematics.) The relationship could be a matter of historical
+\" connection with the subject or with related matters, or of legal,
+\" commercial, philosophical, ethical or political position regarding
+\" them.
+\" .PP
+\" The "Invariant Sections" are certain Secondary Sections whose titles
+\" are designated, as being those of Invariant Sections, in the notice
+\" that says that the Document is released under this License.
+\" .PP
+\" The "Cover Texts" are certain short passages of text that are listed,
+\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+\" the Document is released under this License.
+\" .PP
+\" A "Transparent" copy of the Document means a machine-readable copy,
+\" represented in a format whose specification is available to the
+\" general public, whose contents can be viewed and edited directly and
+\" straightforwardly with generic text editors or (for images composed of
+\" pixels) generic paint programs or (for drawings) some widely available
+\" drawing editor, and that is suitable for input to text formatters or
+\" for automatic translation to a variety of formats suitable for input
+\" to text formatters. A copy made in an otherwise Transparent file
+\" format whose markup has been designed to thwart or discourage
+\" subsequent modification by readers is not Transparent. A copy that is
+\" not "Transparent" is called "Opaque".
+\" .PP
+\" Examples of suitable formats for Transparent copies include plain
+\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
+\" or XML using a publicly available DTD, and standard-conforming simple
+\" HTML designed for human modification. Opaque formats include
+\" PostScript, PDF, proprietary formats that can be read and edited only
+\" by proprietary word processors, SGML or XML for which the DTD and/or
+\" processing tools are not generally available, and the
+\" machine-generated HTML produced by some word processors for output
+\" purposes only.
+\" .PP
+\" The "Title Page" means, for a printed book, the title page itself,
+\" plus such following pages as are needed to hold, legibly, the material
+\" this License requires to appear in the title page. For works in
+\" formats which do not have any title page as such, "Title Page" means
+\" the text near the most prominent appearance of the work's title,
+\" preceding the beginning of the body of the text.
+\" .PP
+\" 2. VERBATIM COPYING
+\" .PP
+\" You may copy and distribute the Document in any medium, either
+\" commercially or noncommercially, provided that this License, the
+\" copyright notices, and the license notice saying this License applies
+\" to the Document are reproduced in all copies, and that you add no other
+\" conditions whatsoever to those of this License. You may not use
+\" technical measures to obstruct or control the reading or further
+\" copying of the copies you make or distribute. However, you may accept
+\" compensation in exchange for copies. If you distribute a large enough
+\" number of copies you must also follow the conditions in section 3.
+\" .PP
+\" You may also lend copies, under the same conditions stated above, and
+\" you may publicly display copies.
+\" .PP
+\" 3. COPYING IN QUANTITY
+\" .PP
+\" If you publish printed copies of the Document numbering more than 100,
+\" and the Document's license notice requires Cover Texts, you must enclose
+\" the copies in covers that carry, clearly and legibly, all these Cover
+\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+\" the back cover. Both covers must also clearly and legibly identify
+\" you as the publisher of these copies. The front cover must present
+\" the full title with all words of the title equally prominent and
+\" visible. You may add other material on the covers in addition.
+\" Copying with changes limited to the covers, as long as they preserve
+\" the title of the Document and satisfy these conditions, can be treated
+\" as verbatim copying in other respects.
+\" .PP
+\" If the required texts for either cover are too voluminous to fit
+\" legibly, you should put the first ones listed (as many as fit
+\" reasonably) on the actual cover, and continue the rest onto adjacent
+\" pages.
+\" .PP
+\" If you publish or distribute Opaque copies of the Document numbering
+\" more than 100, you must either include a machine-readable Transparent
+\" copy along with each Opaque copy, or state in or with each Opaque copy
+\" a publicly-accessible computer-network location containing a complete
+\" Transparent copy of the Document, free of added material, which the
+\" general network-using public has access to download anonymously at no
+\" charge using public-standard network protocols. If you use the latter
+\" option, you must take reasonably prudent steps, when you begin
+\" distribution of Opaque copies in quantity, to ensure that this
+\" Transparent copy will remain thus accessible at the stated location
+\" until at least one year after the last time you distribute an Opaque
+\" copy (directly or through your agents or retailers) of that edition to
+\" the public.
+\" .PP
+\" It is requested, but not required, that you contact the authors of the
+\" Document well before redistributing any large number of copies, to give
+\" them a chance to provide you with an updated version of the Document.
+\" .PP
+\" 4. MODIFICATIONS
+\" .PP
+\" You may copy and distribute a Modified Version of the Document under
+\" the conditions of sections 2 and 3 above, provided that you release
+\" the Modified Version under precisely this License, with the Modified
+\" Version filling the role of the Document, thus licensing distribution
+\" and modification of the Modified Version to whoever possesses a copy
+\" of it. In addition, you must do these things in the Modified Version:
+\" .PP
+\" A. Use in the Title Page (and on the covers, if any) a title distinct
+\" from that of the Document, and from those of previous versions
+\" (which should, if there were any, be listed in the History section
+\" of the Document). You may use the same title as a previous version
+\" if the original publisher of that version gives permission.
+\" .PP
+\" B. List on the Title Page, as authors, one or more persons or entities
+\" responsible for authorship of the modifications in the Modified
+\" Version, together with at least five of the principal authors of the
+\" Document (all of its principal authors, if it has less than five).
+\" .PP
+\" C. State on the Title page the name of the publisher of the
+\" Modified Version, as the publisher.
+\" .PP
+\" D. Preserve all the copyright notices of the Document.
+\" .PP
+\" E. Add an appropriate copyright notice for your modifications
+\" adjacent to the other copyright notices.
+\" .PP
+\" F. Include, immediately after the copyright notices, a license notice
+\" giving the public permission to use the Modified Version under the
+\" terms of this License, in the form shown in the Addendum below.
+\" Preserve in that license notice the full lists of Invariant Sections
+\" and required Cover Texts given in the Document's license notice.
+\" .PP
+\" H. Include an unaltered copy of this License.
+\" .PP
+\" I. Preserve the section entitled "History", and its title, and add to
+\" it an item stating at least the title, year, new authors, and
+\" publisher of the Modified Version as given on the Title Page. If
+\" there is no section entitled "History" in the Document, create one
+\" stating the title, year, authors, and publisher of the Document as
+\" given on its Title Page, then add an item describing the Modified
+\" Version as stated in the previous sentence.
+\" .PP
+\" J. Preserve the network location, if any, given in the Document for
+\" public access to a Transparent copy of the Document, and likewise
+\" the network locations given in the Document for previous versions
+\" it was based on. These may be placed in the "History" section.
+\" You may omit a network location for a work that was published at
+\" least four years before the Document itself, or if the original
+\" publisher of the version it refers to gives permission.
+\" .PP
+\" K. In any section entitled "Acknowledgements" or "Dedications",
+\" preserve the section's title, and preserve in the section all the
+\" substance and tone of each of the contributor acknowledgements
+\" and/or dedications given therein.
+\" .PP
+\" L. Preserve all the Invariant Sections of the Document,
+\" unaltered in their text and in their titles. Section numbers
+\" or the equivalent are not considered part of the section titles.
+\" .PP
+\" M. Delete any section entitled "Endorsements". Such a section
+\" may not be included in the Modified Version.
+\" .PP
+\" N. Do not retitle any existing section as "Endorsements"
+\" or to conflict in title with any Invariant Section.
+\" .PP
+\" If the Modified Version includes new front-matter sections or
+\" appendices that qualify as Secondary Sections and contain no material
+\" copied from the Document, you may at your option designate some or all
+\" of these sections as invariant. To do this, add their titles to the
+\" list of Invariant Sections in the Modified Version's license notice.
+\" These titles must be distinct from any other section titles.
+\" .PP
+\" You may add a section entitled "Endorsements", provided it contains
+\" nothing but endorsements of your Modified Version by various
+\" parties--for example, statements of peer review or that the text has
+\" been approved by an organization as the authoritative definition of a
+\" standard.
+\" .PP
+\" You may add a passage of up to five words as a Front-Cover Text, and a
+\" passage of up to 25 words as a Back-Cover Text, to the end of the list
+\" of Cover Texts in the Modified Version. Only one passage of
+\" Front-Cover Text and one of Back-Cover Text may be added by (or
+\" through arrangements made by) any one entity. If the Document already
+\" includes a cover text for the same cover, previously added by you or
+\" by arrangement made by the same entity you are acting on behalf of,
+\" you may not add another; but you may replace the old one, on explicit
+\" permission from the previous publisher that added the old one.
+\" .PP
+\" The author(s) and publisher(s) of the Document do not by this License
+\" give permission to use their names for publicity for or to assert or
+\" imply endorsement of any Modified Version.
+\" .PP
+
+\" 5. COMBINING DOCUMENTS
+\" .PP
+\" You may combine the Document with other documents released under this
+\" License, under the terms defined in section 4 above for modified
+\" versions, provided that you include in the combination all of the
+\" Invariant Sections of all of the original documents, unmodified, and
+\" list them all as Invariant Sections of your combined work in its
+\" license notice.
+\" .PP
+\" The combined work need only contain one copy of this License, and
+\" multiple identical Invariant Sections may be replaced with a single
+\" copy. If there are multiple Invariant Sections with the same name but
+\" different contents, make the title of each such section unique by
+\" adding at the end of it, in parentheses, the name of the original
+\" author or publisher of that section if known, or else a unique number.
+\" Make the same adjustment to the section titles in the list of
+\" Invariant Sections in the license notice of the combined work.
+\" .PP
+\" In the combination, you must combine any sections entitled "History"
+\" in the various original documents, forming one section entitled
+\" "History"; likewise combine any sections entitled "Acknowledgements",
+\" and any sections entitled "Dedications". You must delete all sections
+\" entitled "Endorsements."
+\" .PP
+
+\" 6. COLLECTIONS OF DOCUMENTS
+\" .PP
+\" You may make a collection consisting of the Document and other documents
+\" released under this License, and replace the individual copies of this
+\" License in the various documents with a single copy that is included in
+\" the collection, provided that you follow the rules of this License for
+\" verbatim copying of each of the documents in all other respects.
+\" .PP
+\" You may extract a single document from such a collection, and distribute
+\" it individually under this License, provided you insert a copy of this
+\" License into the extracted document, and follow this License in all
+\" other respects regarding verbatim copying of that document.
+\" .PP
+
+\" 7. AGGREGATION WITH INDEPENDENT WORKS
+\" .PP
+\" A compilation of the Document or its derivatives with other separate
+\" and independent documents or works, in or on a volume of a storage or
+\" distribution medium, does not as a whole count as a Modified Version
+\" of the Document, provided no compilation copyright is claimed for the
+\" compilation. Such a compilation is called an "aggregate", and this
+\" License does not apply to the other self-contained works thus compiled
+\" with the Document, on account of their being thus compiled, if they
+\" are not themselves derivative works of the Document.
+\" .PP
+\" If the Cover Text requirement of section 3 is applicable to these
+\" copies of the Document, then if the Document is less than one quarter
+\" of the entire aggregate, the Document's Cover Texts may be placed on
+\" covers that surround only the Document within the aggregate.
+\" Otherwise they must appear on covers around the whole aggregate.
+\" .PP
+
+\" 8. TRANSLATION
+\" .PP
+\" Translation is considered a kind of modification, so you may
+\" distribute translations of the Document under the terms of section 4.
+\" Replacing Invariant Sections with translations requires special
+\" permission from their copyright holders, but you may include
+\" translations of some or all Invariant Sections in addition to the
+\" original versions of these Invariant Sections. You may include a
+\" translation of this License provided that you also include the
+\" original English version of this License. In case of a disagreement
+\" between the translation and the original English version of this
+\" License, the original English version will prevail.
+\" .PP
+
+\" 9. TERMINATION
+\" .PP
+\" You may not copy, modify, sublicense, or distribute the Document except
+\" as expressly provided for under this License. Any other attempt to
+\" copy, modify, sublicense or distribute the Document is void, and will
+\" automatically terminate your rights under this License. However,
+\" parties who have received copies, or rights, from you under this
+\" License will not have their licenses terminated so long as such
+\" parties remain in full compliance.
+\" .PP
+
+\" 10. FUTURE REVISIONS OF THIS LICENSE
+\" .PP
+\" The Free Software Foundation may publish new, revised versions
+\" of the GNU Free Documentation License from time to time. Such new
+\" versions will be similar in spirit to the present version, but may
+\" differ in detail to address new problems or concerns. See
+\" http://www.gnu.org/copyleft/.
+\" .PP
+\" Each version of the License is given a distinguishing version number.
+\" If the Document specifies that a particular numbered version of this
+\" License "or any later version" applies to it, you have the option of
+\" following the terms and conditions either of that specified version or
+\" of any later version that has been published (not as a draft) by the
+\" Free Software Foundation. If the Document does not specify a version
+\" number of this License, you may choose any version ever published (not
+\" as a draft) by the Free Software Foundation.
+\" .PP
+
+\" ADDENDUM: How to use this License for your documents
+\" .PP
+\" To use this License in a document you have written, include a copy of
+\" the License in the document and put the following copyright and
+\" license notices just after the title page:
+\" .PP
+\" Copyright (c) YEAR YOUR NAME.
+\" Permission is granted to copy, distribute and/or
+\" modify this document under the terms of the GNU
+\" Free Documentation License, Version 1.1 or any later
+\" version published by the Free Software Foundation;
+\" with the Invariant Sections being LIST THEIR TITLES,
+\" with the Front-Cover Texts being LIST, and with the
+\" Back-Cover Texts being LIST. A copy of the license
+\" is included in the section entitled "GNU Free
+\" Documentation License".
+\" .PP
+\" If you have no Invariant Sections, write "with no Invariant Sections"
+\" instead of saying which ones are invariant. If you have no
+\" Front-Cover Texts, write "no Front-Cover Texts" instead of
+\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+\" .PP
+\" If your document contains nontrivial examples of program code, we
+\" recommend releasing these examples in parallel under your choice of
+\" free software license, such as the GNU General Public License,
+\" to permit their use in free software.
diff --git a/gnu/usr.bin/binutils/binutils/nm.c b/gnu/usr.bin/binutils/binutils/nm.c
index ad5a00d3770..79283751a18 100644
--- a/gnu/usr.bin/binutils/binutils/nm.c
+++ b/gnu/usr.bin/binutils/binutils/nm.c
@@ -1,5 +1,6 @@
/* nm.c -- Describe symbol table of a rel file.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -260,7 +261,7 @@ static bfd *lineno_cache_rel_bfd;
static struct option long_options[] =
{
{"debug-syms", no_argument, &print_debug_syms, 1},
- {"demangle", no_argument, &do_demangle, 1},
+ {"demangle", optional_argument, 0, 'C'},
{"dynamic", no_argument, &dynamic, 1},
{"extern-only", no_argument, &external_only, 1},
{"format", required_argument, 0, 'f'},
@@ -297,7 +298,9 @@ usage (stream, status)
-a, --debug-syms Display debugger-only symbols\n\
-A, --print-file-name Print name of the input file before every symbol\n\
-B Same as --format=bsd\n\
- -C, --demangle Decode low-level symbol names into user-level names\n\
+ -C, --demangle[=STYLE] Decode low-level symbol names into user-level names\n\
+ The STYLE, if specified, can be `auto' (the default),\n\
+ `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-abi'\n\
--no-demangle Do not demangle low-level symbol names\n\
-D, --dynamic Display dynamic symbols instead of normal symbols\n\
--defined-only Display only defined symbols\n\
@@ -319,6 +322,7 @@ usage (stream, status)
--target=BFDNAME Specify the target object format as BFDNAME\n\
-u, --undefined-only Display only undefined symbols\n\
-V, --version Display this program's version number\n\
+ -X 32_64 (ignored)\n\
\n"));
list_supported_targets (program_name, stream);
if (status == 0)
@@ -407,7 +411,8 @@ main (argc, argv)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "aABCDef:glnopPrst:uvV", long_options, (int *) 0)) != EOF)
+ while ((c = getopt_long (argc, argv, "aABCDef:glnopPrst:uvVX:",
+ long_options, (int *) 0)) != EOF)
{
switch (c)
{
@@ -423,6 +428,17 @@ main (argc, argv)
break;
case 'C':
do_demangle = 1;
+ if (optarg != NULL)
+ {
+ enum demangling_styles style;
+
+ style = cplus_demangle_name_to_style (optarg);
+ if (style == unknown_demangling)
+ fatal (_("unknown demangling style `%s'"),
+ optarg);
+
+ cplus_demangle_set_style (style);
+ }
break;
case 'D':
dynamic = 1;
@@ -466,6 +482,17 @@ main (argc, argv)
case 'V':
show_version = 1;
break;
+ case 'X':
+ /* Ignored for (partial) AIX compatibility. On AIX, the
+ argument has values 32, 64, or 32_64, and specfies that
+ only 32-bit, only 64-bit, or both kinds of objects should
+ be examined. The default is 32. So plain AIX nm on a
+ library archive with both kinds of objects will ignore
+ the 64-bit ones. For GNU nm, the default is and always
+ has been -X 32_64, and other options are not supported. */
+ if (strcmp (optarg, "32_64") != 0)
+ fatal (_("Only -X 32_64 is supported"));
+ break;
case OPTION_TARGET: /* --target */
target = optarg;
@@ -1447,13 +1474,10 @@ print_symbol_info_bsd (info, abfd)
{
if (bfd_is_undefined_symclass (info->type))
{
- printf ("%*s",
#ifdef BFD64
- 16,
-#else
- 8,
+ printf (" ");
#endif
- "");
+ printf (" ");
}
else
print_value (info->value);
diff --git a/gnu/usr.bin/binutils/binutils/objcopy.1 b/gnu/usr.bin/binutils/binutils/objcopy.1
index 80ca21664aa..a6aa1815fa8 100644
--- a/gnu/usr.bin/binutils/binutils/objcopy.1
+++ b/gnu/usr.bin/binutils/binutils/objcopy.1
@@ -1,332 +1,548 @@
-.\" Copyright (c) 1991, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation
-.\" See section COPYING for conditions for redistribution
-.TH objcopy 1 "05 April 2000" "Cygnus Solutions" "GNU Development Tools"
-.de BP
-.sp
-.ti \-.2i
-\(**
+.\" Automatically generated by Pod::Man version 1.02
+.\" Wed May 30 12:24:28 2001
+.\"
+.\" Standard preamble:
+.\" ======================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
-.SH NAME
-objcopy \- copy and translate object files
-
-.SH SYNOPSIS
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. | 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
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` `
+. ds C' '
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr
+.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
+.\" index entries marked with X<> in POD. Of course, you'll have to process
+.\" the output yourself in some meaningful fashion.
+.if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+. .
+. nr % 0
+. rr F
+.\}
+.\"
+.\" For nroff, turn off justification. Always turn off hyphenation; it
+.\" makes way too many mistakes in technical documents.
.hy 0
-.na
-.TP
-.B objcopy
-.RB "[\|" \-F\ \fIbfdname\fR\ |\ \fB\-\-target=\fIbfdname\fR "\|]"
-.RB "[\|" \-I\ \fIbfdname\fR\ |\ \fB\-\-input\-target=\fIbfdname\fR "\|]"
-.RB "[\|" \-O\ \fIbfdname\fR\ |\ \fB\-\-output\-target=\fIbfdname\fR "\|]"
-.RB "[\|" \-j\ \fIsectionname\fR\ |\ \fB\-\-only\-section=\fIsectionname\fR "\|]"
-.RB "[\|" \-R\ \fIsectionname\fR\ |\ \fB\-\-remove\-section=\fIsectionname\fR "\|]"
-.RB "[\|" \-S\fR\ |\ \fB\-\-strip\-all\fR "\|]"
-.RB "[\|" \-g\fR\ |\ \fB\-\-strip\-debug\fR "\|]"
-.RB "[\|" \-\-strip\-unneeded\fR "\|]"
-.RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]"
-.RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]"
-.RB "[\|" \-L\ \fIsymbolname\fR\ |\ \fB\-\-localize\-symbol=\fIsymbolname\fR "\|]"
-.RB "[\|" \-W\ \fIsymbolname\fR\ |\ \fB\-\-weaken\-symbol=\fIsymbolname\fR "\|]"
-.RB "[\|" \-x\fR\ |\ \fB\-\-discard\-all\fR "\|]"
-.RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals\fR "\|]"
-.RB "[\|" \-b\ \fIbyte\fR\ |\ \fB\-\-byte=\fIbyte\fR "\|]"
-.RB "[\|" \-i\ \fIinterleave\fR\ |\ \fB\-\-interleave=\fIinterleave\fR "\|]"
-.RB "[\|" \-p\fR\ |\ \fB\-\-preserve\-dates\fR "\|]"
-.RB "[\|" \-\-debugging "\|]"
-.RB "[\|" \-\-gap\-fill=\fIval\fR "\|]"
-.RB "[\|" \-\-pad\-to=\fIaddress\fR "\|]"
-.RB "[\|" \-\-set\-start=\fIval\fR "\|]"
-.RB "[\|" \-\-change\-start=\fIincr\fR "\|]"
-.RB "[\|" \-\-change\-addresses=\fIincr\fR "\|]"
-.RB "[\|" \-\-change\-section\-address\ \fIsection{=,+,-}val\fR "\|]"
-.RB "[\|" \-\-change\-section\-lma\ \fIsection{=,+,-}val\fR "\|]"
-.RB "[\|" \-\-change\-section\-vma\ \fIsection{=,+,-}val\fR "\|]"
-.RB "[\|" \-\-change\-warnings\fR "\|]"
-.RB "[\|" \-\-no\-change\-warnings\fR "\|]"
-.RB "[\|" \-\-set\-section\-flags\ \fIsection=flags\fR "\|]"
-.RB "[\|" \-\-add\-section\ \fIsectionname=filename\fR "\|]"
-.RB "[\|" \-\-change\-leading\-char\fR "\|]"
-.RB "[\|" \-\-remove\-leading\-char\fR "\|]"
-.RB "[\|" \-\-redefine\-sym\ \fIold=new\fR "\|]"
-.RB "[\|" \-\-weaken\fR "\|]"
-.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
-.RB "[\|" \-V\ |\ \-\-version\fR "\|]"
-.RB "[\|" \-\-help\fR "\|]"
-.B infile
-.RB "[\|" outfile\fR "\|]"
-.SH DESCRIPTION
-The GNU
-.B objcopy
-utility copies the contents of an object file to another.
-.B objcopy
-uses the GNU BFD Library to read and write the object files. It can
-write the destination object file in a format different from that of
-the source object file. The exact behavior of
-.B objcopy
-is controlled by command-line options.
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+.bd B 3
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ======================================================================
+.\"
+.IX Title "OBJCOPY.1 1"
+.TH OBJCOPY.1 1 "binutils-2.11.90" "2001-05-30" "GNU"
+.UC
+.SH "NAME"
+objcopy \- copy and translate object files
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+objcopy [ \-F \fIbfdname\fR | \-\-target=\fIbfdname\fR ]
+ [ \-I \fIbfdname\fR | \-\-input-target=\fIbfdname\fR ]
+ [ \-O \fIbfdname\fR | \-\-output-target=\fIbfdname\fR ]
+ [ \-B \fIbfdarch\fR | \-\-binary-architecture=\fIbfdarch\fR ]
+ [ \-S | \-\-strip-all ] [ \-g | \-\-strip-debug ]
+ [ \-K \fIsymbolname\fR | \-\-keep-symbol=\fIsymbolname\fR ]
+ [ \-N \fIsymbolname\fR | \-\-strip-symbol=\fIsymbolname\fR ]
+ [ \-G \fIsymbolname\fR | \-\-keep-global-symbol=\fIsymbolname\fR]
+ [ \-L \fIsymbolname\fR | \-\-localize-symbol=\fIsymbolname\fR ]
+ [ \-W \fIsymbolname\fR | \-\-weaken-symbol=\fIsymbolname\fR ]
+ [ \-x | \-\-discard-all ] [ \-X | \-\-discard-locals ]
+ [ \-b \fIbyte\fR | \-\-byte=\fIbyte\fR ]
+ [ \-i \fIinterleave\fR | \-\-interleave=\fIinterleave\fR ]
+ [ \-j \fIsectionname\fR | \-\-only-section=\fIsectionname\fR ]
+ [ \-R \fIsectionname\fR | \-\-remove-section=\fIsectionname\fR ]
+ [ \-p | \-\-preserve-dates ] [ \-\-debugging ]
+ [ \-\-gap-fill=\fIval\fR ] [ \-\-pad-to=\fIaddress\fR ]
+ [ \-\-set-start=\fIval\fR ] [ \-\-adjust-start=\fIincr\fR ]
+ [ \-\-change-addresses=\fIincr\fR ]
+ [ \-\-change-section-address \fIsection\fR{=,+,\-}\fIval\fR ]
+ [ \-\-change-section-lma \fIsection\fR{=,+,\-}\fIval\fR ]
+ [ \-\-change-section-vma \fIsection\fR{=,+,\-}\fIval\fR ]
+ [ \-\-change-warnings ] [ \-\-no-change-warnings ]
+ [ \-\-set-section-flags \fIsection\fR=\fIflags\fR ]
+ [ \-\-add-section \fIsectionname\fR=\fIfilename\fR ]
+ [ \-\-change-leading-char ] [ \-\-remove-leading-char ]
+ [ \-\-srec-len=\fIival\fR ] [ \-\-srec-forceS3 ]
+ [ \-\-redefine-sym \fIold\fR=\fInew\fR ] [ \-\-weaken ]
+ [ \-\-keep-symbols=\fIfilename\fR ]
+ [ \-\-strip-symbols=\fIfilename\fR ]
+ [ \-\-keep-global-symbols=\fIfilename\fR ]
+ [ \-\-localize-symbols=\fIfilename\fR ]
+ [ \-\-weaken-symbols=\fIfilename\fR ]
+ [ \-v | \-\-verbose ] [ \-V | \-\-version ] [ \-\-help ]
+ \fIinfile\fR [\fIoutfile\fR]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+The \s-1GNU\s0 \f(CW\*(C`objcopy\*(C'\fR utility copies the contents of an object
+file to another. \f(CW\*(C`objcopy\*(C'\fR uses the \s-1GNU\s0 \s-1BFD\s0 Library to
+read and write the object files. It can write the destination object
+file in a format different from that of the source object file. The
+exact behavior of \f(CW\*(C`objcopy\*(C'\fR is controlled by command-line options.
+Note that \f(CW\*(C`objcopy\*(C'\fR should be able to copy a fully linked file
+between any two formats. However, copying a relocatable object file
+between any two formats may not work as expected.
.PP
-.B objcopy
-creates temporary files to do its translations and deletes them
-afterward.
-.B objcopy
-uses BFD to do all its translation work; it knows about all the
-formats BFD knows about, and thus is able to recognize most formats
-without being told explicitly.
+\&\f(CW\*(C`objcopy\*(C'\fR creates temporary files to do its translations and
+deletes them afterward. \f(CW\*(C`objcopy\*(C'\fR uses \s-1BFD\s0 to do all its
+translation work; it has access to all the formats described in \s-1BFD\s0
+and thus is able to recognize most formats without being told
+explicitly.
.PP
-.B objcopy
-can be used to generate S-records by using an output target of
-.B srec
-(e.g., use
-.B -O srec).
+\&\f(CW\*(C`objcopy\*(C'\fR can be used to generate S-records by using an output
+target of \fBsrec\fR (e.g., use \fB\-O srec\fR).
.PP
-.B objcopy
-can be used to generate a raw binary file by using an output target of
-.B binary
-(e.g., use
-.B -O binary).
-When
-.B objcopy
-generates a raw binary file, it will essentially produce a memory dump
-of the contents of the input object file. All symbols and relocation
-information will be discarded. The memory dump will start at the
-virtual address of the lowest section copied into the output file.
+\&\f(CW\*(C`objcopy\*(C'\fR can be used to generate a raw binary file by using an
+output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When
+\&\f(CW\*(C`objcopy\*(C'\fR generates a raw binary file, it will essentially produce
+a memory dump of the contents of the input object file. All symbols and
+relocation information will be discarded. The memory dump will start at
+the load address of the lowest section copied into the output file.
.PP
When generating an S-record or a raw binary file, it may be helpful to
-use
-.B -S
-to remove sections containing debugging information. In some cases
-.B -R
-will be useful to remove sections which contain information which is
-not needed by the binary file.
+use \fB\-S\fR to remove sections containing debugging information. In
+some cases \fB\-R\fR will be useful to remove sections which contain
+information that is not needed by the binary file.
.PP
-.I infile
-and
-.I outfile
-are the source and output files respectively. If you do not specify
-.IR outfile ,
-.B objcopy
-creates a temporary file and destructively renames the result with the
-name of the input file.
-
-.SH OPTIONS
-.TP
-.B \-I \fIbfdname\fR, \fB\-\-input\-target=\fIbfdname
-Consider the source file's object format to be
-.IR bfdname ,
-rather than attempting to deduce it.
-.TP
-.B \-O \fIbfdname\fR, \fB\-\-output\-target=\fIbfdname
-Write the output file using the object format
-.IR bfdname .
-.TP
-.B \-F \fIbfdname\fR, \fB\-\-target=\fIbfdname
-Use
-.I bfdname
-as the object format for both the input and the output file; i.e.
-simply transfer data from source to destination with no translation.
-.TP
-.B \-j \fIsectionname\fR, \fB\-\-only\-section=\fIsectionname
-Copy only the named section from the input file to the output file,
-discarding all other sections. This option may be given more than
-once. Note that using this option inappropriately may make the output
-file unusable.
-.TP
-.B \-R \fIsectionname\fR, \fB\-\-remove-section=\fIsectionname
-Remove the named section from the file. This option may be given more
-than once. Note that using this option inappropriately may make the
-output file unusable.
-.TP
-.B \-S\fR, \fB\-\-strip\-all
+Note \- \f(CW\*(C`objcopy\*(C'\fR is not able to change the endianness of its input
+files. If the input format has an endianness, (some formats do not),
+\&\f(CW\*(C`objcopy\*(C'\fR can only copy the inputs into file formats that have the
+same endianness or which have no endianness (eg \fBsrec\fR).
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.Ip "\f(CW\*(C`\f(CIinfile\f(CW\*(C'\fR" 4
+.IX Item "infile"
+.Ip "\f(CW\*(C`\f(CIoutfile\f(CW\*(C'\fR" 4
+.IX Item "outfile"
+The input and output files, respectively.
+If you do not specify \fIoutfile\fR, \f(CW\*(C`objcopy\*(C'\fR creates a
+temporary file and destructively renames the result with
+the name of \fIinfile\fR.
+.Ip "\f(CW\*(C`\-I \f(CIbfdname\f(CW \*(C'\fR" 4
+.IX Item "-I bfdname "
+.Ip "\f(CW\*(C`\-\-input\-target=\f(CIbfdname\f(CW\*(C'\fR" 4
+.IX Item "--input-target=bfdname"
+Consider the source file's object format to be \fIbfdname\fR, rather than
+attempting to deduce it.
+.Ip "\f(CW\*(C`\-O \f(CIbfdname\f(CW\*(C'\fR" 4
+.IX Item "-O bfdname"
+.Ip "\f(CW\*(C`\-\-output\-target=\f(CIbfdname\f(CW\*(C'\fR" 4
+.IX Item "--output-target=bfdname"
+Write the output file using the object format \fIbfdname\fR.
+.Ip "\f(CW\*(C`\-F \f(CIbfdname\f(CW\*(C'\fR" 4
+.IX Item "-F bfdname"
+.Ip "\f(CW\*(C`\-\-target=\f(CIbfdname\f(CW\*(C'\fR" 4
+.IX Item "--target=bfdname"
+Use \fIbfdname\fR as the object format for both the input and the output
+file; i.e., simply transfer data from source to destination with no
+translation.
+.Ip "\f(CW\*(C`\-B \f(CIbfdarch\f(CW\*(C'\fR" 4
+.IX Item "-B bfdarch"
+.Ip "\f(CW\*(C`\-\-binary\-architecture=\f(CIbfdarch\f(CW\*(C'\fR" 4
+.IX Item "--binary-architecture=bfdarch"
+Useful when transforming a raw binary input file into an object file.
+In this case the output architecture can be set to \fIbfdarch\fR. This
+option will be ignored if the input file has a known \fIbfdarch\fR. You
+can access this binary data inside a program by referencing the special
+symbols that are created by the conversion process. These symbols are
+called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and
+_binary_\fIobjfile\fR_size. e.g. you can transform a picture file into
+an object file and then access it in your code using these symbols.
+.Ip "\f(CW\*(C`\-j \f(CIsectionname\f(CW\*(C'\fR" 4
+.IX Item "-j sectionname"
+.Ip "\f(CW\*(C`\-\-only\-section=\f(CIsectionname\f(CW\*(C'\fR" 4
+.IX Item "--only-section=sectionname"
+Copy only the named section from the input file to the output file.
+This option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+.Ip "\f(CW\*(C`\-R \f(CIsectionname\f(CW\*(C'\fR" 4
+.IX Item "-R sectionname"
+.Ip "\f(CW\*(C`\-\-remove\-section=\f(CIsectionname\f(CW\*(C'\fR" 4
+.IX Item "--remove-section=sectionname"
+Remove any section named \fIsectionname\fR from the output file. This
+option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+.Ip "\f(CW\*(C`\-S\*(C'\fR" 4
+.IX Item "-S"
+.Ip "\f(CW\*(C`\-\-strip\-all\*(C'\fR" 4
+.IX Item "--strip-all"
Do not copy relocation and symbol information from the source file.
-.TP
-.B \-g\fR, \fB\-\-strip\-debug
+.Ip "\f(CW\*(C`\-g\*(C'\fR" 4
+.IX Item "-g"
+.Ip "\f(CW\*(C`\-\-strip\-debug\*(C'\fR" 4
+.IX Item "--strip-debug"
Do not copy debugging symbols from the source file.
-.TP
-.B \-\-strip\-unneeded
+.Ip "\f(CW\*(C`\-\-strip\-unneeded\*(C'\fR" 4
+.IX Item "--strip-unneeded"
Strip all symbols that are not needed for relocation processing.
-.TP
-.B \-K \fIsymbolname\fR, \fB\-\-keep\-symbol=\fIsymbolname
-Copy only symbol \fIsymbolname\fP from the source file. This option
+.Ip "\f(CW\*(C`\-K \f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "-K symbolname"
+.Ip "\f(CW\*(C`\-\-keep\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "--keep-symbol=symbolname"
+Copy only symbol \fIsymbolname\fR from the source file. This option may
+be given more than once.
+.Ip "\f(CW\*(C`\-N \f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "-N symbolname"
+.Ip "\f(CW\*(C`\-\-strip\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "--strip-symbol=symbolname"
+Do not copy symbol \fIsymbolname\fR from the source file. This option
may be given more than once.
-.TP
-.B \-N \fIsymbolname\fR, \fB\-\-strip\-symbol=\fIsymbolname
-Do not copy symbol \fIsymbolname\fP from the source file. This option
-may be given more than once.
-.TP
-.B \-L \fIsymbolname\fR, \fB\-\-localize\-symbol=\fIsymbolname
-Make symbol \fIsymbolname\fP local to the file, so that it is not
+.Ip "\f(CW\*(C`\-G \f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "-G symbolname"
+.Ip "\f(CW\*(C`\-\-keep\-global\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "--keep-global-symbol=symbolname"
+Keep only symbol \fIsymbolname\fR global. Make all other symbols local
+to the file, so that they are not visible externally. This option may
+be given more than once.
+.Ip "\f(CW\*(C`\-L \f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "-L symbolname"
+.Ip "\f(CW\*(C`\-\-localize\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "--localize-symbol=symbolname"
+Make symbol \fIsymbolname\fR local to the file, so that it is not
visible externally. This option may be given more than once.
-.TP
-.B \-W \fIsymbolname\fR, \fB\-\-weaken\-symbol=\fIsymbolname
-Make symbol \fIsymbolname\fP weak. This option may be given more than once.
-.TP
-.B \-x\fR, \fB\-\-discard\-all
+.Ip "\f(CW\*(C`\-W \f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "-W symbolname"
+.Ip "\f(CW\*(C`\-\-weaken\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
+.IX Item "--weaken-symbol=symbolname"
+Make symbol \fIsymbolname\fR weak. This option may be given more than once.
+.Ip "\f(CW\*(C`\-x\*(C'\fR" 4
+.IX Item "-x"
+.Ip "\f(CW\*(C`\-\-discard\-all\*(C'\fR" 4
+.IX Item "--discard-all"
Do not copy non-global symbols from the source file.
-.TP
-.B \-X\fR, \fB\-\-discard\-locals
-Do not copy compiler-generated local symbols. (These usually start
-with "L" or ".").
-.TP
-.B \-b \fIbyte\fR, \fB\-\-byte=\fIbyte
-Keep only every \fIbyte\fPth byte of the input file (header data is
-not affected). \fIbyte\fP can be in the range from 0 to the
-interleave-1. This option is useful for creating files to program
-ROMs. It is typically used with an srec output target.
-.TP
-.B \-i \fIinterleave\fR, \fB\-\-interleave=\fIinterleave
-Only copy one out of every \fIinterleave\fP bytes. Which one to copy is
-selected by the \fB\-b\fP or \fB\-\-byte\fP option. The default is 4.
-The interleave is ignored if neither \fB\-b\fP nor \fB\-\-byte\fP is given.
-.TP
-.B \-p\fR, \fB\-\-preserve\-dates
+.Ip "\f(CW\*(C`\-X\*(C'\fR" 4
+.IX Item "-X"
+.Ip "\f(CW\*(C`\-\-discard\-locals\*(C'\fR" 4
+.IX Item "--discard-locals"
+Do not copy compiler-generated local symbols.
+(These usually start with \fBL\fR or \fB.\fR.)
+.Ip "\f(CW\*(C`\-b \f(CIbyte\f(CW\*(C'\fR" 4
+.IX Item "-b byte"
+.Ip "\f(CW\*(C`\-\-byte=\f(CIbyte\f(CW\*(C'\fR" 4
+.IX Item "--byte=byte"
+Keep only every \fIbyte\fRth byte of the input file (header data is not
+affected). \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1,
+where \fIinterleave\fR is given by the \fB\-i\fR or \fB\*(--interleave\fR
+option, or the default of 4. This option is useful for creating files
+to program \s-1ROM\s0. It is typically used with an \f(CW\*(C`srec\*(C'\fR output
+target.
+.Ip "\f(CW\*(C`\-i \f(CIinterleave\f(CW\*(C'\fR" 4
+.IX Item "-i interleave"
+.Ip "\f(CW\*(C`\-\-interleave=\f(CIinterleave\f(CW\*(C'\fR" 4
+.IX Item "--interleave=interleave"
+Only copy one out of every \fIinterleave\fR bytes. Select which byte to
+copy with the \fI\-b\fR or \fB\*(--byte\fR option. The default is 4.
+\&\f(CW\*(C`objcopy\*(C'\fR ignores this option if you do not specify either \fB\-b\fR or
+\&\fB\*(--byte\fR.
+.Ip "\f(CW\*(C`\-p\*(C'\fR" 4
+.IX Item "-p"
+.Ip "\f(CW\*(C`\-\-preserve\-dates\*(C'\fR" 4
+.IX Item "--preserve-dates"
Set the access and modification dates of the output file to be the same
as those of the input file.
-.TP
-.B \-\-debugging
+.Ip "\f(CW\*(C`\-\-debugging\*(C'\fR" 4
+.IX Item "--debugging"
Convert debugging information, if possible. This is not the default
because only certain debugging formats are supported, and the
conversion process can be time consuming.
-.TP
-.B \-\-gap\-fill=\fIval
-Fill gaps between sections with \fIval\fP. This operation applies to
-the \fIload address\fP (LMA) of the sections. It is done by increasing
+.Ip "\f(CW\*(C`\-\-gap\-fill \f(CIval\f(CW\*(C'\fR" 4
+.IX Item "--gap-fill val"
+Fill gaps between sections with \fIval\fR. This operation applies to
+the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing
the size of the section with the lower address, and filling in the extra
-space created with \fIval\fP.
-.TP
-.B \-\-pad\-to=\fIaddress
-Pad the output file up to the load address \fIaddress\fP. This is
+space created with \fIval\fR.
+.Ip "\f(CW\*(C`\-\-pad\-to \f(CIaddress\f(CW\*(C'\fR" 4
+.IX Item "--pad-to address"
+Pad the output file up to the load address \fIaddress\fR. This is
done by increasing the size of the last section. The extra space is
-filled in with the value specified by \fB\-\-gap\-fill\fP (default
-zero).
-.TP
-.B \fB\-\-set\-start=\fIval
-Set the start address of the new file to \fIval\fP. Not all object
-file formats support setting the start address.
-.TP
-.B \fB\-\-change\-start=\fIincr\fR, \fB\-\-adjust\-start=\fIincr
-Changes the start address by adding \fIincr\fP. Not all object file
+filled in with the value specified by \fB\*(--gap-fill\fR (default zero).
+.Ip "\f(CW\*(C`\-\-set\-start \f(CIval\f(CW\*(C'\fR" 4
+.IX Item "--set-start val"
+Set the start address of the new file to \fIval\fR. Not all object file
+formats support setting the start address.
+.Ip "\f(CW\*(C`\-\-change\-start \f(CIincr\f(CW\*(C'\fR" 4
+.IX Item "--change-start incr"
+.Ip "\f(CW\*(C`\-\-adjust\-start \f(CIincr\f(CW\*(C'\fR" 4
+.IX Item "--adjust-start incr"
+Change the start address by adding \fIincr\fR. Not all object file
formats support setting the start address.
-.TP
-.B \fB\-\-change\-addresses=\fIincr\fR, \fB\-\-adjust\-vma=\fIincr
-Changes the address of all sections, as well as the start address, by
-adding \fIincr\fP. Some object file formats do not permit section
-addresses to be changed arbitrarily. Note that this does not relocate
-the sections; if the program expects sections to be loaded at a
+.Ip "\f(CW\*(C`\-\-change\-addresses \f(CIincr\f(CW\*(C'\fR" 4
+.IX Item "--change-addresses incr"
+.Ip "\f(CW\*(C`\-\-adjust\-vma \f(CIincr\f(CW\*(C'\fR" 4
+.IX Item "--adjust-vma incr"
+Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start
+address, by adding \fIincr\fR. Some object file formats do not permit
+section addresses to be changed arbitrarily. Note that this does not
+relocate the sections; if the program expects sections to be loaded at a
certain address, and this option is used to change the sections such
-that they are loaded at a different address, the program may fail.
-.TP
-.B \fB\-\-change\-section\-address\ \fIsection{=,+,-}val\fR, \fB\-\-adjust\-section\-vma\ \fIsection{=,+,-}val
-Set or changes the VMA and LMA addresses of the named \fIsection\fP.
-If \fI=\fP is used, the section address is set to \fIval\fP.
-Otherwise, \fIval\fP is added to or subtracted from the section
-address. See the comments under \fB\-\-change\-addresses\fP, above. If
-\fIsection\fP does not exist in the input file, a warning will be
-issued, unless \fB\-\-no\-change\-warnings\fP is used.
-.TP
-.B \fB\-\-change\-section\-lma\ \fIsection{=,+,-}val
-Set or change the LMA address of the named \fIsection\fP. If \fI=\fP is
-used, the section address is set to \fIval\fP. Otherwise, \fIval\fP
-is added to or subtracted from the section address. See the comments
-under \fB\-\-change\-addresses\fP, above. If \fIsection\fP does not exist
-in the input file, a warning will be issued, unless
-\fB\-\-no\-change\-warnings\fP is used.
-.TP
-.B \fB\-\-change\-section\-vma\ \fIsection{=,+,-}val
-Set or change the VMA address of the named \fIsection\fP. If \fI=\fP is
-used, the section address is set to \fIval\fP. Otherwise, \fIval\fP
-is added to or subtracted from the section address. See the comments
-under \fB\-\-change\-addresses\fP, above. If \fIsection\fP does not exist
-in the input file, a warning will be issued, unless
-\fB\-\-no\-change\-warnings\fP is used.
-.TP
-.B \fB\-\-change\-warnings\fR, \fB\-\-adjust\-warnings
-If \fB\-\-change\-section\-XXX\fP is used, and the named section does
-not exist, issue a warning. This is the default.
-.TP
-.B \fB\-\-no\-change\-warnings\fR, \fB\-\-no\-adjust\-warnings
-Do not issue a warning if \fB\-\-change\-section\-XXX\fP is used, even
-if the named section does not exist.
-.TP
-.B \fB\-\-set\-section\-flags\ \fIsection=flags
-Set the flags for the named section. The \fIflags\fP argument is a
+that they are loaded at a different address, the program may fail.
+.Ip "\f(CW\*(C`\-\-change\-section\-address \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4
+.IX Item "--change-section-address section{=,+,-}val"
+.Ip "\f(CW\*(C`\-\-adjust\-section\-vma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4
+.IX Item "--adjust-section-vma section{=,+,-}val"
+Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named
+\&\fIsection\fR. If \fB=\fR is used, the section address is set to
+\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
+section address. See the comments under \fB\*(--change-addresses\fR,
+above. If \fIsection\fR does not exist in the input file, a warning will
+be issued, unless \fB\*(--no-change-warnings\fR is used.
+.Ip "\f(CW\*(C`\-\-change\-section\-lma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4
+.IX Item "--change-section-lma section{=,+,-}val"
+Set or change the \s-1LMA\s0 address of the named \fIsection\fR. The \s-1LMA\s0
+address is the address where the section will be loaded into memory at
+program load time. Normally this is the same as the \s-1VMA\s0 address, which
+is the address of the section at program run time, but on some systems,
+especially those where a program is held in \s-1ROM\s0, the two can be
+different. If \fB=\fR is used, the section address is set to
+\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
+section address. See the comments under \fB\*(--change-addresses\fR,
+above. If \fIsection\fR does not exist in the input file, a warning
+will be issued, unless \fB\*(--no-change-warnings\fR is used.
+.Ip "\f(CW\*(C`\-\-change\-section\-vma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4
+.IX Item "--change-section-vma section{=,+,-}val"
+Set or change the \s-1VMA\s0 address of the named \fIsection\fR. The \s-1VMA\s0
+address is the address where the section will be located once the
+program has started executing. Normally this is the same as the \s-1LMA\s0
+address, which is the address where the section will be loaded into
+memory, but on some systems, especially those where a program is held in
+\&\s-1ROM\s0, the two can be different. If \fB=\fR is used, the section address
+is set to \fIval\fR. Otherwise, \fIval\fR is added to or subtracted
+from the section address. See the comments under
+\&\fB\*(--change-addresses\fR, above. If \fIsection\fR does not exist in
+the input file, a warning will be issued, unless
+\&\fB\*(--no-change-warnings\fR is used.
+.Ip "\f(CW\*(C`\-\-change\-warnings\*(C'\fR" 4
+.IX Item "--change-warnings"
+.Ip "\f(CW\*(C`\-\-adjust\-warnings\*(C'\fR" 4
+.IX Item "--adjust-warnings"
+If \fB\*(--change-section-address\fR or \fB\*(--change-section-lma\fR or
+\&\fB\*(--change-section-vma\fR is used, and the named section does not
+exist, issue a warning. This is the default.
+.Ip "\f(CW\*(C`\-\-no\-change\-warnings\*(C'\fR" 4
+.IX Item "--no-change-warnings"
+.Ip "\f(CW\*(C`\-\-no\-adjust\-warnings\*(C'\fR" 4
+.IX Item "--no-adjust-warnings"
+Do not issue a warning if \fB\*(--change-section-address\fR or
+\&\fB\*(--adjust-section-lma\fR or \fB\*(--adjust-section-vma\fR is used, even
+if the named section does not exist.
+.Ip "\f(CW\*(C`\-\-set\-section\-flags \f(CIsection\f(CW=\f(CIflags\f(CW\*(C'\fR" 4
+.IX Item "--set-section-flags section=flags"
+Set the flags for the named section. The \fIflags\fR argument is a
comma separated string of flag names. The recognized names are
-\fIalloc\fP, \fIcontents\fP, \fIload\fP, \fInoload\fP, \fIreadonly\fP,
-\fIcode\fP, \fIdata\fP, \fIrom\fP, \fIshare\fP, and \fIdebug\fP. Not
-all flags are meaningful for all object file formats.
-.TP
-.B \fB\-\-add\-section\ \fIsectionname=filename
+\&\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR,
+\&\fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and
+\&\fBdebug\fR. You can set the \fBcontents\fR flag for a section which
+does not have contents, but it is not meaningful to clear the
+\&\fBcontents\fR flag of a section which does have contents\*(--just remove
+the section instead. Not all flags are meaningful for all object file
+formats.
+.Ip "\f(CW\*(C`\-\-add\-section \f(CIsectionname\f(CW=\f(CIfilename\f(CW\*(C'\fR" 4
+.IX Item "--add-section sectionname=filename"
Add a new section named \fIsectionname\fR while copying the file. The
-contents of the new section are taken from the file \fIfilename\fR.
-The size of the section will be the size of the file. This option
-only works on file formats which can support sections with arbitrary
-names.
-.TP
-.B \-\-change\-leading\-char
+contents of the new section are taken from the file \fIfilename\fR. The
+size of the section will be the size of the file. This option only
+works on file formats which can support sections with arbitrary names.
+.Ip "\f(CW\*(C`\-\-change\-leading\-char\*(C'\fR" 4
+.IX Item "--change-leading-char"
Some object file formats use special characters at the start of
symbols. The most common such character is underscore, which compilers
-often add before every symbol. This option tells
-.B objcopy
-to change the leading character of every symbol when it converts
-between object file formats. If the object file formats use the same
-leading character, this option has no effect. Otherwise, it will add
-a character, or remove a character, or change a character, as
+often add before every symbol. This option tells \f(CW\*(C`objcopy\*(C'\fR to
+change the leading character of every symbol when it converts between
+object file formats. If the object file formats use the same leading
+character, this option has no effect. Otherwise, it will add a
+character, or remove a character, or change a character, as
appropriate.
-.TP
-.B \-\-remove\-leading\-char
+.Ip "\f(CW\*(C`\-\-remove\-leading\-char\*(C'\fR" 4
+.IX Item "--remove-leading-char"
If the first character of a global symbol is a special symbol leading
character used by the object file format, remove the character. The
most common symbol leading character is underscore. This option will
-remove a leading underscore from all global symbols. This can be
-useful if you want to link together objects of different file formats
-with different conventions for symbol names. This is different from
-\fB\-\-change\-leading\-char\fP because it always changes the symbol name
+remove a leading underscore from all global symbols. This can be useful
+if you want to link together objects of different file formats with
+different conventions for symbol names. This is different from
+\&\f(CW\*(C`\-\-change\-leading\-char\*(C'\fR because it always changes the symbol name
when appropriate, regardless of the object file format of the output
-.TP
-.B \-\-redefine\-sym\ \fIold=new
-Change the name of symbol \fIold\fR to \fInew\fR. This can be useful
+file.
+.Ip "\f(CW\*(C`\-\-srec\-len=\f(CIival\f(CW\*(C'\fR" 4
+.IX Item "--srec-len=ival"
+Meaningful only for srec output. Set the maximum length of the Srecords
+being produced to \fIival\fR. This length covers both address, data and
+crc fields.
+.Ip "\f(CW\*(C`\-\-srec\-forceS3\*(C'\fR" 4
+.IX Item "--srec-forceS3"
+Meaningful only for srec output. Avoid generation of S1/S2 records,
+creating S3\-only record format.
+.Ip "\f(CW\*(C`\-\-redefine\-sym \f(CIold\f(CW=\f(CInew\f(CW\*(C'\fR" 4
+.IX Item "--redefine-sym old=new"
+Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful
when one is trying link two things together for which you have no
source, and there are name collisions.
-.TP
-.B \-\-weaken
-Change all global symbols in the file to be weak.
-.TP
-.B \-v\fR, \fB\-\-verbose
+.Ip "\f(CW\*(C`\-\-weaken\*(C'\fR" 4
+.IX Item "--weaken"
+Change all global symbols in the file to be weak. This can be useful
+when building an object which will be linked against other objects using
+the \f(CW\*(C`\-R\*(C'\fR option to the linker. This option is only effective when
+using an object file format which supports weak symbols.
+.Ip "\f(CW\*(C`\-\-keep\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
+.IX Item "--keep-symbols=filename"
+Apply \fB\*(--keep-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.Ip "\f(CW\*(C`\-\-strip\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
+.IX Item "--strip-symbols=filename"
+Apply \fB\*(--strip-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.Ip "\f(CW\*(C`\-\-keep\-global\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
+.IX Item "--keep-global-symbols=filename"
+Apply \fB\*(--keep-global-symbol\fR option to each symbol listed in the
+file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
+symbol name per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
+.Ip "\f(CW\*(C`\-\-localize\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
+.IX Item "--localize-symbols=filename"
+Apply \fB\*(--localize-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.Ip "\f(CW\*(C`\-\-weaken\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
+.IX Item "--weaken-symbols=filename"
+Apply \fB\*(--weaken-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.Ip "\f(CW\*(C`\-V\*(C'\fR" 4
+.IX Item "-V"
+.Ip "\f(CW\*(C`\-\-version\*(C'\fR" 4
+.IX Item "--version"
+Show the version number of \f(CW\*(C`objcopy\*(C'\fR.
+.Ip "\f(CW\*(C`\-v\*(C'\fR" 4
+.IX Item "-v"
+.Ip "\f(CW\*(C`\-\-verbose\*(C'\fR" 4
+.IX Item "--verbose"
Verbose output: list all object files modified. In the case of
-archives, "\fBobjcopy \-V\fR" lists all members of the archive.
-.TP
-.B \-V\fR, \fB\-\-version
-Show the version number of
-.B objcopy
-and exit.
-.TP
-.B \-\-help
-Show a summary of the options to
-.B objcopy
-and exit.
+archives, \fBobjcopy \-V\fR lists all members of the archive.
+.Ip "\f(CW\*(C`\-\-help\*(C'\fR" 4
+.IX Item "--help"
+Show a summary of the options to \f(CW\*(C`objcopy\*(C'\fR.
.SH "SEE ALSO"
-.RB "`\|" binutils "\|'"
-entry in
-.B
-info\c
-\&;
-.I
-The GNU Binary Utilities\c
-\&, Roland H. Pesch (June 1993).
-
-.SH COPYING
-Copyright (c) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
-.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
+.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 Free Software Foundation, Inc.
.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/binutils/objcopy.c b/gnu/usr.bin/binutils/binutils/objcopy.c
index 55bf9d6db24..c29ab70e1c2 100644
--- a/gnu/usr.bin/binutils/binutils/objcopy.c
+++ b/gnu/usr.bin/binutils/binutils/objcopy.c
@@ -1,5 +1,6 @@
/* objcopy.c -- copy object file from input to output, optionally massaging it.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -56,6 +57,7 @@ static void copy_section PARAMS ((bfd *, asection *, PTR));
static void get_sections PARAMS ((bfd *, asection *, PTR));
static int compare_section_lma PARAMS ((const PTR, const PTR));
static void add_specific_symbol PARAMS ((const char *, struct symlist **));
+static void add_specific_symbols PARAMS ((const char *, struct symlist **));
static boolean is_specified_symbol PARAMS ((const char *, struct symlist *));
static boolean is_strip_section PARAMS ((bfd *, asection *));
static unsigned int filter_symbols
@@ -183,11 +185,13 @@ static boolean change_leading_char = false;
static boolean remove_leading_char = false;
-/* List of symbols to strip, keep, localize, weaken, or redefine. */
+/* List of symbols to strip, keep, localize, keep-global, weaken,
+ or redefine. */
static struct symlist *strip_specific_list = NULL;
static struct symlist *keep_specific_list = NULL;
static struct symlist *localize_specific_list = NULL;
+static struct symlist *keepglobal_specific_list = NULL;
static struct symlist *weaken_specific_list = NULL;
static struct redefine_node *redefine_sym_list = NULL;
@@ -215,6 +219,13 @@ static boolean weaken = false;
#define OPTION_STRIP_UNNEEDED (OPTION_SET_START + 1)
#define OPTION_WEAKEN (OPTION_STRIP_UNNEEDED + 1)
#define OPTION_REDEFINE_SYM (OPTION_WEAKEN + 1)
+#define OPTION_SREC_LEN (OPTION_REDEFINE_SYM + 1)
+#define OPTION_SREC_FORCES3 (OPTION_SREC_LEN + 1)
+#define OPTION_STRIP_SYMBOLS (OPTION_SREC_FORCES3 + 1)
+#define OPTION_KEEP_SYMBOLS (OPTION_STRIP_SYMBOLS + 1)
+#define OPTION_LOCALIZE_SYMBOLS (OPTION_KEEP_SYMBOLS + 1)
+#define OPTION_KEEPGLOBAL_SYMBOLS (OPTION_LOCALIZE_SYMBOLS + 1)
+#define OPTION_WEAKEN_SYMBOLS (OPTION_KEEPGLOBAL_SYMBOLS + 1)
/* Options to handle if running as "strip". */
@@ -276,6 +287,7 @@ static struct option copy_options[] =
{"pad-to", required_argument, 0, OPTION_PAD_TO},
{"preserve-dates", no_argument, 0, 'p'},
{"localize-symbol", required_argument, 0, 'L'},
+ {"keep-global-symbol", required_argument, 0, 'G'},
{"remove-leading-char", no_argument, 0, OPTION_REMOVE_LEADING_CHAR},
{"remove-section", required_argument, 0, 'R'},
{"set-section-flags", required_argument, 0, OPTION_SET_SECTION_FLAGS},
@@ -290,6 +302,13 @@ static struct option copy_options[] =
{"weaken", no_argument, 0, OPTION_WEAKEN},
{"weaken-symbol", required_argument, 0, 'W'},
{"redefine-sym", required_argument, 0, OPTION_REDEFINE_SYM},
+ {"srec-len", required_argument, 0, OPTION_SREC_LEN},
+ {"srec-forceS3", no_argument, 0, OPTION_SREC_FORCES3},
+ {"keep-symbols", required_argument, 0, OPTION_KEEP_SYMBOLS},
+ {"strip-symbols", required_argument, 0, OPTION_STRIP_SYMBOLS},
+ {"keep-global-symbols", required_argument, 0, OPTION_KEEPGLOBAL_SYMBOLS},
+ {"localize-symbols", required_argument, 0, OPTION_LOCALIZE_SYMBOLS},
+ {"weaken-symbols", required_argument, 0, OPTION_WEAKEN_SYMBOLS},
{0, no_argument, 0, 0}
};
@@ -301,6 +320,14 @@ extern char *program_name;
-1 means if we should use argv[0] to decide. */
extern int is_strip;
+/* The maximum length of an S record. This variable is declared in srec.c
+ and can be modified by the --srec-len parameter. */
+extern unsigned int Chunk;
+
+/* Restrict the generation of Srecords to type S3 only.
+ This variable is declare in bfd/srec.c and can be toggled
+ on by the --srec-forceS3 command line switch. */
+extern boolean S3Forced;
static void
copy_usage (stream, exit_status)
@@ -323,6 +350,7 @@ copy_usage (stream, exit_status)
-N --strip-symbol <name> Do not copy symbol <name>\n\
-K --keep-symbol <name> Only copy symbol <name>\n\
-L --localize-symbol <name> Force symbol <name> to be marked as a local\n\
+ -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\
-x --discard-all Remove all non-global symbols\n\
@@ -350,6 +378,13 @@ copy_usage (stream, exit_status)
--change-leading-char Force output format's leading character style\n\
--remove-leading-char Remove leading character from global symbols\n\
--redefine-sym <old>=<new> Redefine symbol name <old> to <new>\n\
+ --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\
+ --keep-symbols <file> -K for all symbols listed in <file>\n\
+ --localize-symbols <file> -L for all symbols listed in <file>\n\
+ --keep-global-symbols <file> -G for all symbols listed in <file>\n\
+ --weaken-symbols <file> -W for all symbols listed in <file>\n\
-v --verbose List all object files modified\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
@@ -498,6 +533,122 @@ add_specific_symbol (name, list)
*list = tmp_list;
}
+/* Add symbols listed in `filename' to strip_specific_list. */
+
+#define IS_WHITESPACE(c) ((c) == ' ' || (c) == '\t')
+#define IS_LINE_TERMINATOR(c) ((c) == '\n' || (c) == '\r' || (c) == '\0')
+
+static void
+add_specific_symbols (filename, list)
+ const char *filename;
+ struct symlist **list;
+{
+ struct stat st;
+ FILE * f;
+ char * line;
+ char * buffer;
+ unsigned int line_count;
+
+ if (stat (filename, & st) < 0)
+ fatal (_("cannot stat: %s: %s"), filename, strerror (errno));
+ if (st.st_size == 0)
+ return;
+
+ buffer = (char *) xmalloc (st.st_size + 2);
+ f = fopen (filename, FOPEN_RT);
+ if (f == NULL)
+ fatal (_("cannot open: %s: %s"), filename, strerror (errno));
+
+ if (fread (buffer, 1, st.st_size, f) == 0 || ferror (f))
+ fatal (_("%s: fread failed"), filename);
+
+ fclose (f);
+ buffer [st.st_size] = '\n';
+ buffer [st.st_size + 1] = '\0';
+
+ line_count = 1;
+
+ for (line = buffer; * line != '\0'; line ++)
+ {
+ char * eol;
+ char * name;
+ char * name_end;
+ int finished = false;
+
+ for (eol = line;; eol ++)
+ {
+ switch (* eol)
+ {
+ case '\n':
+ * eol = '\0';
+ /* Cope with \n\r. */
+ if (eol[1] == '\r')
+ ++ eol;
+ finished = true;
+ break;
+
+ case '\r':
+ * eol = '\0';
+ /* Cope with \r\n. */
+ if (eol[1] == '\n')
+ ++ eol;
+ finished = true;
+ break;
+
+ case 0:
+ finished = true;
+ break;
+
+ case '#':
+ /* Line comment, Terminate the line here, in case a
+ name is present and then allow the rest of the
+ loop to find the real end of the line. */
+ * eol = '\0';
+ break;
+
+ default:
+ break;
+ }
+
+ if (finished)
+ break;
+ }
+
+ /* A name may now exist somewhere between 'line' and 'eol'.
+ Strip off leading whitespace and trailing whitespace,
+ then add it to the list. */
+ for (name = line; IS_WHITESPACE (* name); name ++)
+ ;
+ for (name_end = name;
+ (! IS_WHITESPACE (* name_end))
+ && (! IS_LINE_TERMINATOR (* name_end));
+ name_end ++)
+ ;
+
+ if (! IS_LINE_TERMINATOR (* name_end))
+ {
+ char * extra;
+
+ for (extra = name_end + 1; IS_WHITESPACE (* extra); extra ++)
+ ;
+
+ if (! IS_LINE_TERMINATOR (* extra))
+ non_fatal (_("Ignoring rubbish found on line %d of %s"),
+ line_count, filename);
+ }
+
+ * name_end = '\0';
+
+ if (name_end > name)
+ add_specific_symbol (name, list);
+
+ /* Advance line pointer to end of line. The 'eol ++' in the for
+ loop above will then advance us to the start of the next line. */
+ line = eol;
+ line_count ++;
+ }
+}
+
/* See whether a symbol should be stripped or kept based on
strip_specific_list and keep_symbols. */
@@ -557,6 +708,8 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
{
register asymbol **from = isyms, **to = osyms;
long src_count = 0, dst_count = 0;
+ int relocatable = (abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC))
+ == HAS_RELOC;
for (; src_count < symcount; src_count++)
{
@@ -611,6 +764,15 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
&& ((*bfd_get_section (sym)->symbol_ptr_ptr)->flags
& BSF_KEEP) != 0))
keep = 1;
+ else if (relocatable /* Relocatable file. */
+ && (flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
+ keep = 1;
+ else if (bfd_decode_symclass (sym) == 'I')
+ /* Global symbols in $idata sections need to be retained
+ even if relocatable is false. External users of the
+ library containing the $idata section may reference these
+ symbols. */
+ keep = 1;
else if ((flags & BSF_GLOBAL) != 0 /* Global symbol. */
|| (flags & BSF_WEAK) != 0
|| bfd_is_und_section (bfd_get_section (sym))
@@ -640,7 +802,9 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
sym->flags |= BSF_WEAK;
}
if (keep && (flags & (BSF_GLOBAL | BSF_WEAK))
- && is_specified_symbol (name, localize_specific_list))
+ && (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;
@@ -746,6 +910,13 @@ copy_object (ibfd, obfd)
long symsize;
PTR dhandle;
+ if (ibfd->xvec->byteorder != obfd->xvec->byteorder
+ && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
+ && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
+ {
+ fatal (_("Unable to change endianness of input file(s)"));
+ return;
+ }
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
RETURN_NONFATAL (bfd_get_filename (obfd));
@@ -945,6 +1116,7 @@ copy_object (ibfd, obfd)
|| strip_specific_list != NULL
|| keep_specific_list != NULL
|| localize_specific_list != NULL
+ || keepglobal_specific_list != NULL
|| weaken_specific_list != NULL
|| sections_removed
|| sections_copied
@@ -1242,7 +1414,7 @@ setup_section (ibfd, isection, obfdarg)
bfd_vma vma;
bfd_vma lma;
flagword flags;
- char *err;
+ const char *err;
if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0
&& (strip_symbols == STRIP_DEBUG
@@ -1265,7 +1437,7 @@ setup_section (ibfd, isection, obfdarg)
if (osection == NULL)
{
- err = "making";
+ err = _("making");
goto loser;
}
@@ -1274,7 +1446,7 @@ setup_section (ibfd, isection, obfdarg)
size = (size + interleave - 1) / interleave;
if (! bfd_set_section_size (obfd, osection, size))
{
- err = "size";
+ err = _("size");
goto loser;
}
@@ -1288,7 +1460,7 @@ setup_section (ibfd, isection, obfdarg)
if (! bfd_set_section_vma (obfd, osection, vma))
{
- err = "vma";
+ err = _("vma");
goto loser;
}
@@ -1314,7 +1486,7 @@ setup_section (ibfd, isection, obfdarg)
bfd_section_alignment (ibfd, isection))
== false)
{
- err = "alignment";
+ err = _("alignment");
goto loser;
}
@@ -1323,7 +1495,7 @@ setup_section (ibfd, isection, obfdarg)
flags = p->flags | (flags & SEC_HAS_CONTENTS);
if (!bfd_set_section_flags (obfd, osection, flags))
{
- err = "flags";
+ err = _("flags");
goto loser;
}
@@ -1337,7 +1509,7 @@ setup_section (ibfd, isection, obfdarg)
from the input section to the output section. */
if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection))
{
- err = "private data";
+ err = _("private data");
goto loser;
}
@@ -1659,7 +1831,7 @@ strip_main (argc, argv)
struct section_list *p;
char *output_file = NULL;
- while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXVv",
+ while ((c = getopt_long (argc, argv, "b:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXVvW:",
strip_options, (int *) 0)) != EOF)
{
switch (c)
@@ -1683,7 +1855,7 @@ strip_main (argc, argv)
break;
case 'S':
case 'g':
- case 'd': /* NetBSD, historic BSD strip */
+ case 'd': /* Historic BSD alias for -g. Used by early NetBSD. */
strip_symbols = STRIP_DEBUG;
break;
case OPTION_STRIP_UNNEEDED:
@@ -1862,6 +2034,10 @@ copy_main (argc, argv)
add_specific_symbol (optarg, &localize_specific_list);
break;
+ case 'G':
+ add_specific_symbol (optarg, &keepglobal_specific_list);
+ break;
+
case 'W':
add_specific_symbol (optarg, &weaken_specific_list);
break;
@@ -2120,6 +2296,34 @@ copy_main (argc, argv)
set_start_set = true;
break;
+ case OPTION_SREC_LEN:
+ Chunk = parse_vma (optarg, "--srec-len");
+ break;
+
+ case OPTION_SREC_FORCES3:
+ S3Forced = true;
+ break;
+
+ case OPTION_STRIP_SYMBOLS:
+ add_specific_symbols (optarg, &strip_specific_list);
+ break;
+
+ case OPTION_KEEP_SYMBOLS:
+ add_specific_symbols (optarg, &keep_specific_list);
+ break;
+
+ case OPTION_LOCALIZE_SYMBOLS:
+ add_specific_symbols (optarg, &localize_specific_list);
+ break;
+
+ case OPTION_KEEPGLOBAL_SYMBOLS:
+ add_specific_symbols (optarg, &keepglobal_specific_list);
+ break;
+
+ case OPTION_WEAKEN_SYMBOLS:
+ add_specific_symbols (optarg, &weaken_specific_list);
+ break;
+
case 0:
break; /* we've been given a long option */
diff --git a/gnu/usr.bin/binutils/binutils/objdump.1 b/gnu/usr.bin/binutils/binutils/objdump.1
index ddc153ed8a3..1c2fa612a29 100644
--- a/gnu/usr.bin/binutils/binutils/objdump.1
+++ b/gnu/usr.bin/binutils/binutils/objdump.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation
+.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH objdump 1 "5 November 1991" "cygnus support" "GNU Development Tools"
+.TH objdump 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -396,17 +396,376 @@ The GNU Binary Utilities\c
.SH COPYING
Copyright (c) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+This document is distributed under the terms of the GNU Free
+Documentation License, version 1.1. That license is described in the
+sources for this manual page, but it is not displayed here in order to
+make this manual more consise. Copies of this license can also be
+obtained from: http://www.gnu.org/copyleft/.
+
+\" .SH GNU Free Documentation License
+\" Version 1.1, March 2000
+
+\" Copyright (C) 2000 Free Software Foundation, Inc.
+\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\" Everyone is permitted to copy and distribute verbatim
+\" copies of this license document, but changing it is
+\" not allowed.
+\" .PP
+\" 0. PREAMBLE
+\" .PP
+\" The purpose of this License is to make a manual, textbook, or other
+\" written document "free" in the sense of freedom: to assure everyone
+\" the effective freedom to copy and redistribute it, with or without
+\" modifying it, either commercially or noncommercially. Secondarily,
+\" this License preserves for the author and publisher a way to get
+\" credit for their work, while not being considered responsible for
+\" modifications made by others.
+\" .PP
+\" This License is a kind of "copyleft", which means that derivative
+\" works of the document must themselves be free in the same sense. It
+\" complements the GNU General Public License, which is a copyleft
+\" license designed for free software.
+\" .PP
+\" We have designed this License in order to use it for manuals for free
+\" software, because free software needs free documentation: a free
+\" program should come with manuals providing the same freedoms that the
+\" software does. But this License is not limited to software manuals;
+\" it can be used for any textual work, regardless of subject matter or
+\" whether it is published as a printed book. We recommend this License
+\" principally for works whose purpose is instruction or reference.
+\" .PP
+\" 1. APPLICABILITY AND DEFINITIONS
+\" .PP
+\" This License applies to any manual or other work that contains a
+\" notice placed by the copyright holder saying it can be distributed
+\" under the terms of this License. The "Document", below, refers to any
+\" such manual or work. Any member of the public is a licensee, and is
+\" addressed as "you".
+\" .PP
+\" A "Modified Version" of the Document means any work containing the
+\" Document or a portion of it, either copied verbatim, or with
+\" modifications and/or translated into another language.
+\" .PP
+\" A "Secondary Section" is a named appendix or a front-matter section of
+\" the Document that deals exclusively with the relationship of the
+\" publishers or authors of the Document to the Document's overall subject
+\" (or to related matters) and contains nothing that could fall directly
+\" within that overall subject. (For example, if the Document is in part a
+\" textbook of mathematics, a Secondary Section may not explain any
+\" mathematics.) The relationship could be a matter of historical
+\" connection with the subject or with related matters, or of legal,
+\" commercial, philosophical, ethical or political position regarding
+\" them.
+\" .PP
+\" The "Invariant Sections" are certain Secondary Sections whose titles
+\" are designated, as being those of Invariant Sections, in the notice
+\" that says that the Document is released under this License.
+\" .PP
+\" The "Cover Texts" are certain short passages of text that are listed,
+\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+\" the Document is released under this License.
+\" .PP
+\" A "Transparent" copy of the Document means a machine-readable copy,
+\" represented in a format whose specification is available to the
+\" general public, whose contents can be viewed and edited directly and
+\" straightforwardly with generic text editors or (for images composed of
+\" pixels) generic paint programs or (for drawings) some widely available
+\" drawing editor, and that is suitable for input to text formatters or
+\" for automatic translation to a variety of formats suitable for input
+\" to text formatters. A copy made in an otherwise Transparent file
+\" format whose markup has been designed to thwart or discourage
+\" subsequent modification by readers is not Transparent. A copy that is
+\" not "Transparent" is called "Opaque".
+\" .PP
+\" Examples of suitable formats for Transparent copies include plain
+\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
+\" or XML using a publicly available DTD, and standard-conforming simple
+\" HTML designed for human modification. Opaque formats include
+\" PostScript, PDF, proprietary formats that can be read and edited only
+\" by proprietary word processors, SGML or XML for which the DTD and/or
+\" processing tools are not generally available, and the
+\" machine-generated HTML produced by some word processors for output
+\" purposes only.
+\" .PP
+\" The "Title Page" means, for a printed book, the title page itself,
+\" plus such following pages as are needed to hold, legibly, the material
+\" this License requires to appear in the title page. For works in
+\" formats which do not have any title page as such, "Title Page" means
+\" the text near the most prominent appearance of the work's title,
+\" preceding the beginning of the body of the text.
+\" .PP
+\" 2. VERBATIM COPYING
+\" .PP
+\" You may copy and distribute the Document in any medium, either
+\" commercially or noncommercially, provided that this License, the
+\" copyright notices, and the license notice saying this License applies
+\" to the Document are reproduced in all copies, and that you add no other
+\" conditions whatsoever to those of this License. You may not use
+\" technical measures to obstruct or control the reading or further
+\" copying of the copies you make or distribute. However, you may accept
+\" compensation in exchange for copies. If you distribute a large enough
+\" number of copies you must also follow the conditions in section 3.
+\" .PP
+\" You may also lend copies, under the same conditions stated above, and
+\" you may publicly display copies.
+\" .PP
+\" 3. COPYING IN QUANTITY
+\" .PP
+\" If you publish printed copies of the Document numbering more than 100,
+\" and the Document's license notice requires Cover Texts, you must enclose
+\" the copies in covers that carry, clearly and legibly, all these Cover
+\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+\" the back cover. Both covers must also clearly and legibly identify
+\" you as the publisher of these copies. The front cover must present
+\" the full title with all words of the title equally prominent and
+\" visible. You may add other material on the covers in addition.
+\" Copying with changes limited to the covers, as long as they preserve
+\" the title of the Document and satisfy these conditions, can be treated
+\" as verbatim copying in other respects.
+\" .PP
+\" If the required texts for either cover are too voluminous to fit
+\" legibly, you should put the first ones listed (as many as fit
+\" reasonably) on the actual cover, and continue the rest onto adjacent
+\" pages.
+\" .PP
+\" If you publish or distribute Opaque copies of the Document numbering
+\" more than 100, you must either include a machine-readable Transparent
+\" copy along with each Opaque copy, or state in or with each Opaque copy
+\" a publicly-accessible computer-network location containing a complete
+\" Transparent copy of the Document, free of added material, which the
+\" general network-using public has access to download anonymously at no
+\" charge using public-standard network protocols. If you use the latter
+\" option, you must take reasonably prudent steps, when you begin
+\" distribution of Opaque copies in quantity, to ensure that this
+\" Transparent copy will remain thus accessible at the stated location
+\" until at least one year after the last time you distribute an Opaque
+\" copy (directly or through your agents or retailers) of that edition to
+\" the public.
+\" .PP
+\" It is requested, but not required, that you contact the authors of the
+\" Document well before redistributing any large number of copies, to give
+\" them a chance to provide you with an updated version of the Document.
+\" .PP
+\" 4. MODIFICATIONS
+\" .PP
+\" You may copy and distribute a Modified Version of the Document under
+\" the conditions of sections 2 and 3 above, provided that you release
+\" the Modified Version under precisely this License, with the Modified
+\" Version filling the role of the Document, thus licensing distribution
+\" and modification of the Modified Version to whoever possesses a copy
+\" of it. In addition, you must do these things in the Modified Version:
+\" .PP
+\" A. Use in the Title Page (and on the covers, if any) a title distinct
+\" from that of the Document, and from those of previous versions
+\" (which should, if there were any, be listed in the History section
+\" of the Document). You may use the same title as a previous version
+\" if the original publisher of that version gives permission.
+\" .PP
+\" B. List on the Title Page, as authors, one or more persons or entities
+\" responsible for authorship of the modifications in the Modified
+\" Version, together with at least five of the principal authors of the
+\" Document (all of its principal authors, if it has less than five).
+\" .PP
+\" C. State on the Title page the name of the publisher of the
+\" Modified Version, as the publisher.
+\" .PP
+\" D. Preserve all the copyright notices of the Document.
+\" .PP
+\" E. Add an appropriate copyright notice for your modifications
+\" adjacent to the other copyright notices.
+\" .PP
+\" F. Include, immediately after the copyright notices, a license notice
+\" giving the public permission to use the Modified Version under the
+\" terms of this License, in the form shown in the Addendum below.
+\" Preserve in that license notice the full lists of Invariant Sections
+\" and required Cover Texts given in the Document's license notice.
+\" .PP
+\" H. Include an unaltered copy of this License.
+\" .PP
+\" I. Preserve the section entitled "History", and its title, and add to
+\" it an item stating at least the title, year, new authors, and
+\" publisher of the Modified Version as given on the Title Page. If
+\" there is no section entitled "History" in the Document, create one
+\" stating the title, year, authors, and publisher of the Document as
+\" given on its Title Page, then add an item describing the Modified
+\" Version as stated in the previous sentence.
+\" .PP
+\" J. Preserve the network location, if any, given in the Document for
+\" public access to a Transparent copy of the Document, and likewise
+\" the network locations given in the Document for previous versions
+\" it was based on. These may be placed in the "History" section.
+\" You may omit a network location for a work that was published at
+\" least four years before the Document itself, or if the original
+\" publisher of the version it refers to gives permission.
+\" .PP
+\" K. In any section entitled "Acknowledgements" or "Dedications",
+\" preserve the section's title, and preserve in the section all the
+\" substance and tone of each of the contributor acknowledgements
+\" and/or dedications given therein.
+\" .PP
+\" L. Preserve all the Invariant Sections of the Document,
+\" unaltered in their text and in their titles. Section numbers
+\" or the equivalent are not considered part of the section titles.
+\" .PP
+\" M. Delete any section entitled "Endorsements". Such a section
+\" may not be included in the Modified Version.
+\" .PP
+\" N. Do not retitle any existing section as "Endorsements"
+\" or to conflict in title with any Invariant Section.
+\" .PP
+\" If the Modified Version includes new front-matter sections or
+\" appendices that qualify as Secondary Sections and contain no material
+\" copied from the Document, you may at your option designate some or all
+\" of these sections as invariant. To do this, add their titles to the
+\" list of Invariant Sections in the Modified Version's license notice.
+\" These titles must be distinct from any other section titles.
+\" .PP
+\" You may add a section entitled "Endorsements", provided it contains
+\" nothing but endorsements of your Modified Version by various
+\" parties--for example, statements of peer review or that the text has
+\" been approved by an organization as the authoritative definition of a
+\" standard.
+\" .PP
+\" You may add a passage of up to five words as a Front-Cover Text, and a
+\" passage of up to 25 words as a Back-Cover Text, to the end of the list
+\" of Cover Texts in the Modified Version. Only one passage of
+\" Front-Cover Text and one of Back-Cover Text may be added by (or
+\" through arrangements made by) any one entity. If the Document already
+\" includes a cover text for the same cover, previously added by you or
+\" by arrangement made by the same entity you are acting on behalf of,
+\" you may not add another; but you may replace the old one, on explicit
+\" permission from the previous publisher that added the old one.
+\" .PP
+\" The author(s) and publisher(s) of the Document do not by this License
+\" give permission to use their names for publicity for or to assert or
+\" imply endorsement of any Modified Version.
+\" .PP
+
+\" 5. COMBINING DOCUMENTS
+\" .PP
+\" You may combine the Document with other documents released under this
+\" License, under the terms defined in section 4 above for modified
+\" versions, provided that you include in the combination all of the
+\" Invariant Sections of all of the original documents, unmodified, and
+\" list them all as Invariant Sections of your combined work in its
+\" license notice.
+\" .PP
+\" The combined work need only contain one copy of this License, and
+\" multiple identical Invariant Sections may be replaced with a single
+\" copy. If there are multiple Invariant Sections with the same name but
+\" different contents, make the title of each such section unique by
+\" adding at the end of it, in parentheses, the name of the original
+\" author or publisher of that section if known, or else a unique number.
+\" Make the same adjustment to the section titles in the list of
+\" Invariant Sections in the license notice of the combined work.
+\" .PP
+\" In the combination, you must combine any sections entitled "History"
+\" in the various original documents, forming one section entitled
+\" "History"; likewise combine any sections entitled "Acknowledgements",
+\" and any sections entitled "Dedications". You must delete all sections
+\" entitled "Endorsements."
+\" .PP
+
+\" 6. COLLECTIONS OF DOCUMENTS
+\" .PP
+\" You may make a collection consisting of the Document and other documents
+\" released under this License, and replace the individual copies of this
+\" License in the various documents with a single copy that is included in
+\" the collection, provided that you follow the rules of this License for
+\" verbatim copying of each of the documents in all other respects.
+\" .PP
+\" You may extract a single document from such a collection, and distribute
+\" it individually under this License, provided you insert a copy of this
+\" License into the extracted document, and follow this License in all
+\" other respects regarding verbatim copying of that document.
+\" .PP
+
+\" 7. AGGREGATION WITH INDEPENDENT WORKS
+\" .PP
+\" A compilation of the Document or its derivatives with other separate
+\" and independent documents or works, in or on a volume of a storage or
+\" distribution medium, does not as a whole count as a Modified Version
+\" of the Document, provided no compilation copyright is claimed for the
+\" compilation. Such a compilation is called an "aggregate", and this
+\" License does not apply to the other self-contained works thus compiled
+\" with the Document, on account of their being thus compiled, if they
+\" are not themselves derivative works of the Document.
+\" .PP
+\" If the Cover Text requirement of section 3 is applicable to these
+\" copies of the Document, then if the Document is less than one quarter
+\" of the entire aggregate, the Document's Cover Texts may be placed on
+\" covers that surround only the Document within the aggregate.
+\" Otherwise they must appear on covers around the whole aggregate.
+\" .PP
+
+\" 8. TRANSLATION
+\" .PP
+\" Translation is considered a kind of modification, so you may
+\" distribute translations of the Document under the terms of section 4.
+\" Replacing Invariant Sections with translations requires special
+\" permission from their copyright holders, but you may include
+\" translations of some or all Invariant Sections in addition to the
+\" original versions of these Invariant Sections. You may include a
+\" translation of this License provided that you also include the
+\" original English version of this License. In case of a disagreement
+\" between the translation and the original English version of this
+\" License, the original English version will prevail.
+\" .PP
+
+\" 9. TERMINATION
+\" .PP
+\" You may not copy, modify, sublicense, or distribute the Document except
+\" as expressly provided for under this License. Any other attempt to
+\" copy, modify, sublicense or distribute the Document is void, and will
+\" automatically terminate your rights under this License. However,
+\" parties who have received copies, or rights, from you under this
+\" License will not have their licenses terminated so long as such
+\" parties remain in full compliance.
+\" .PP
+
+\" 10. FUTURE REVISIONS OF THIS LICENSE
+\" .PP
+\" The Free Software Foundation may publish new, revised versions
+\" of the GNU Free Documentation License from time to time. Such new
+\" versions will be similar in spirit to the present version, but may
+\" differ in detail to address new problems or concerns. See
+\" http://www.gnu.org/copyleft/.
+\" .PP
+\" Each version of the License is given a distinguishing version number.
+\" If the Document specifies that a particular numbered version of this
+\" License "or any later version" applies to it, you have the option of
+\" following the terms and conditions either of that specified version or
+\" of any later version that has been published (not as a draft) by the
+\" Free Software Foundation. If the Document does not specify a version
+\" number of this License, you may choose any version ever published (not
+\" as a draft) by the Free Software Foundation.
+\" .PP
+
+\" ADDENDUM: How to use this License for your documents
+\" .PP
+\" To use this License in a document you have written, include a copy of
+\" the License in the document and put the following copyright and
+\" license notices just after the title page:
+\" .PP
+\" Copyright (c) YEAR YOUR NAME.
+\" Permission is granted to copy, distribute and/or
+\" modify this document under the terms of the GNU
+\" Free Documentation License, Version 1.1 or any later
+\" version published by the Free Software Foundation;
+\" with the Invariant Sections being LIST THEIR TITLES,
+\" with the Front-Cover Texts being LIST, and with the
+\" Back-Cover Texts being LIST. A copy of the license
+\" is included in the section entitled "GNU Free
+\" Documentation License".
+\" .PP
+\" If you have no Invariant Sections, write "with no Invariant Sections"
+\" instead of saying which ones are invariant. If you have no
+\" Front-Cover Texts, write "no Front-Cover Texts" instead of
+\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+\" .PP
+\" If your document contains nontrivial examples of program code, we
+\" recommend releasing these examples in parallel under your choice of
+\" free software license, such as the GNU General Public License,
+\" to permit their use in free software.
diff --git a/gnu/usr.bin/binutils/binutils/objdump.c b/gnu/usr.bin/binutils/binutils/objdump.c
index e8f8cbeda93..27002ab80ff 100644
--- a/gnu/usr.bin/binutils/binutils/objdump.c
+++ b/gnu/usr.bin/binutils/binutils/objdump.c
@@ -1,5 +1,6 @@
/* objdump.c -- dump information about an object file.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -255,7 +256,9 @@ usage (stream, status)
-EL --endian=little Assume little endian format when disassembling\n\
--file-start-context Include context from start of file (with -S)\n\
-l, --line-numbers Include line numbers and filenames in output\n\
- -C, --demangle Decode mangled/processed symbol names\n\
+ -C, --demangle[=STYLE] Decode mangled/processed symbol names\n\
+ The STYLE, if specified, can be `auto', 'gnu',\n\
+ 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-abi'\n\
-w, --wide Format output for more than 80 columns\n\
-z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\
--start-address=ADDR Only process data whoes address is >= ADDR\n\
@@ -288,7 +291,7 @@ static struct option long_options[]=
{"architecture", required_argument, NULL, 'm'},
{"archive-headers", no_argument, NULL, 'a'},
{"debugging", no_argument, NULL, 'g'},
- {"demangle", no_argument, NULL, 'C'},
+ {"demangle", optional_argument, NULL, 'C'},
{"disassemble", no_argument, NULL, 'd'},
{"disassemble-all", no_argument, NULL, 'D'},
{"disassembler-options", required_argument, NULL, 'M'},
@@ -371,6 +374,8 @@ dump_section_header (abfd, section, ignored)
PF (SEC_NEVER_LOAD, "NEVER_LOAD");
PF (SEC_EXCLUDE, "EXCLUDE");
PF (SEC_SORT_ENTRIES, "SORT_ENTRIES");
+ PF (SEC_BLOCK, "BLOCK");
+ PF (SEC_CLINK, "CLINK");
PF (SEC_SMALL_DATA, "SMALL_DATA");
PF (SEC_SHARED, "SHARED");
@@ -1354,13 +1359,15 @@ disassemble_bytes (info, disassemble_fn, insns, data,
info->bytes_per_line = 0;
info->bytes_per_chunk = 0;
+#ifdef DISASSEMBLER_NEEDS_RELOCS
/* FIXME: This is wrong. It tests the number of octets
in the last instruction, not the current one. */
if (*relppp < relppend
&& (**relppp)->address >= addr_offset
- && (**relppp)->address < addr_offset + octets / opb)
+ && (**relppp)->address <= addr_offset + octets / opb)
info->flags = INSN_HAS_RELOC;
else
+#endif
info->flags = 0;
octets = (*disassemble_fn) (section->vma + addr_offset, info);
@@ -1500,12 +1507,20 @@ disassemble_bytes (info, disassemble_fn, insns, data,
need_nl = true;
}
- if (dump_reloc_info
- && (section->flags & SEC_RELOC) != 0)
+ if ((section->flags & SEC_RELOC) != 0
+#ifndef DISASSEMBLER_NEEDS_RELOCS
+ && dump_reloc_info
+#endif
+ )
{
while ((*relppp) < relppend
&& ((**relppp)->address >= (bfd_vma) addr_offset
&& (**relppp)->address < (bfd_vma) addr_offset + octets / opb))
+#ifdef DISASSEMBLER_NEEDS_RELOCS
+ if (! dump_reloc_info)
+ ++(*relppp);
+ else
+#endif
{
arelent *q;
@@ -1661,8 +1676,11 @@ disassemble_data (abfd)
if (only != (char *) NULL && strcmp (only, section->name) != 0)
continue;
- if (dump_reloc_info
- && (section->flags & SEC_RELOC) != 0)
+ if ((section->flags & SEC_RELOC) != 0
+#ifndef DISASSEMBLER_NEEDS_RELOCS
+ && dump_reloc_info
+#endif
+ )
{
long relsize;
@@ -2627,14 +2645,14 @@ endian_string (endian)
static void
display_target_list ()
{
- extern bfd_target *bfd_target_vector[];
+ extern const bfd_target *const *bfd_target_vector;
char *dummy_name;
int t;
dummy_name = make_temp_file (NULL);
for (t = 0; bfd_target_vector[t]; t++)
{
- bfd_target *p = bfd_target_vector[t];
+ const bfd_target *p = bfd_target_vector[t];
bfd *abfd = bfd_openw (dummy_name, p->name);
int a;
@@ -2675,7 +2693,7 @@ display_info_table (first, last)
int first;
int last;
{
- extern bfd_target *bfd_target_vector[];
+ extern const bfd_target *const *bfd_target_vector;
int t, a;
char *dummy_name;
@@ -2693,7 +2711,7 @@ display_info_table (first, last)
bfd_printable_arch_mach (a, 0));
for (t = first; t < last && bfd_target_vector[t]; t++)
{
- bfd_target *p = bfd_target_vector[t];
+ const bfd_target *p = bfd_target_vector[t];
boolean ok = true;
bfd *abfd = bfd_openw (dummy_name, p->name);
@@ -2744,7 +2762,7 @@ static void
display_target_tables ()
{
int t, columns;
- extern bfd_target *bfd_target_vector[];
+ extern const bfd_target *const *bfd_target_vector;
char *colum;
columns = 0;
@@ -2831,6 +2849,17 @@ main (argc, argv)
break;
case 'C':
do_demangle = true;
+ if (optarg != NULL)
+ {
+ enum demangling_styles style;
+
+ style = cplus_demangle_name_to_style (optarg);
+ if (style == unknown_demangling)
+ fatal (_("unknown demangling style `%s'"),
+ optarg);
+
+ cplus_demangle_set_style (style);
+ }
break;
case 'w':
wide_output = true;
diff --git a/gnu/usr.bin/binutils/binutils/prdbg.c b/gnu/usr.bin/binutils/binutils/prdbg.c
index abd684dfeb0..41c78cbbb85 100644
--- a/gnu/usr.bin/binutils/binutils/prdbg.c
+++ b/gnu/usr.bin/binutils/binutils/prdbg.c
@@ -1,5 +1,5 @@
/* prdbg.c -- Print out generic debugging information.
- Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/rdcoff.c b/gnu/usr.bin/binutils/binutils/rdcoff.c
index e1385c7140e..058289567f8 100644
--- a/gnu/usr.bin/binutils/binutils/rdcoff.c
+++ b/gnu/usr.bin/binutils/binutils/rdcoff.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information
- Copyright (C) 1996, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -99,6 +99,7 @@ static debug_type parse_coff_enum_type
static boolean parse_coff_symbol
PARAMS ((bfd *, struct coff_types *, asymbol *, long,
struct internal_syment *, PTR, debug_type, boolean));
+static boolean external_coff_symbol_p PARAMS ((int sym_class));
/* Return the slot for a type. */
@@ -588,6 +589,7 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
return false;
break;
+ case C_WEAKEXT:
case C_EXT:
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
DEBUG_GLOBAL, bfd_asymbol_value (sym)))
@@ -656,6 +658,23 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
return true;
}
+/* Determine if a symbol has external visibility. */
+
+static boolean
+external_coff_symbol_p (sym_class)
+ int sym_class;
+{
+ switch (sym_class)
+ {
+ case C_EXT:
+ case C_WEAKEXT:
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
/* This is the main routine. It looks through all the symbols and
handles them. */
@@ -767,6 +786,7 @@ parse_coff (abfd, syms, symcount, dhandle)
if (syment.n_type == T_NULL)
break;
/* Fall through. */
+ case C_WEAKEXT:
case C_EXT:
if (ISFCN (syment.n_type))
{
@@ -805,7 +825,7 @@ parse_coff (abfd, syms, symcount, dhandle)
return false;
if (! debug_record_function (dhandle, fnname, type,
- fnclass == C_EXT,
+ external_coff_symbol_p (fnclass),
bfd_asymbol_value (sym)))
return false;
diff --git a/gnu/usr.bin/binutils/binutils/rddbg.c b/gnu/usr.bin/binutils/binutils/rddbg.c
index f9fae05d669..e6ace775577 100644
--- a/gnu/usr.bin/binutils/binutils/rddbg.c
+++ b/gnu/usr.bin/binutils/binutils/rddbg.c
@@ -1,5 +1,5 @@
/* rddbg.c -- Read debugging information into a generic form.
- Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/binutils/resrc.c b/gnu/usr.bin/binutils/binutils/resrc.c
index a522a9ff3ba..a7d2c3bac87 100644
--- a/gnu/usr.bin/binutils/binutils/resrc.c
+++ b/gnu/usr.bin/binutils/binutils/resrc.c
@@ -1,5 +1,5 @@
/* resrc.c -- read and write Windows rc files.
- Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -78,7 +78,7 @@
/* The default preprocessor. */
-#define DEFAULT_PREPROCESSOR "gcc -E -xc-header -DRC_INVOKED"
+#define DEFAULT_PREPROCESSOR "gcc -E -xc -DRC_INVOKED"
/* We read the directory entries in a cursor or icon file into
instances of this structure. */
@@ -498,9 +498,6 @@ read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file)
static void
close_input_stream ()
{
- if (cpp_pipe != NULL)
- pclose (cpp_pipe);
-
if (istream_type == ISTREAM_FILE)
{
if (cpp_pipe != NULL)
@@ -844,19 +841,42 @@ define_control (text, id, x, y, width, height, class, style, exstyle)
n->height = height;
n->class.named = 0;
n->class.u.id = class;
- if (text != NULL)
- res_string_to_id (&n->text, text);
- else
- {
- n->text.named = 0;
- n->text.u.id = 0;
- }
+ if (text == NULL)
+ text = "";
+ res_string_to_id (&n->text, text);
n->data = NULL;
n->help = 0;
return n;
}
+struct dialog_control *
+define_icon_control (iid, id, x, y, style, exstyle, help, data, ex)
+ struct res_id iid;
+ unsigned long id;
+ unsigned long x;
+ unsigned long y;
+ unsigned long style;
+ unsigned long exstyle;
+ unsigned long help;
+ struct rcdata_item *data;
+ struct dialog_ex *ex;
+{
+ struct dialog_control *n;
+ if (style == 0)
+ style = SS_ICON | WS_CHILD | WS_VISIBLE;
+ n = define_control (0, id, x, y, 0, 0, CTL_STATIC, style, exstyle);
+ n->text = iid;
+ if (help && !ex)
+ rcparse_warning (_("help ID requires DIALOGEX"));
+ if (data && !ex)
+ rcparse_warning (_("control data requires DIALOGEX"));
+ n->help = help;
+ n->data = data;
+
+ return n;
+}
+
/* Define a font resource. */
void
diff --git a/gnu/usr.bin/binutils/binutils/size.c b/gnu/usr.bin/binutils/binutils/size.c
index 070834b63c0..47a91ad6fe1 100644
--- a/gnu/usr.bin/binutils/binutils/size.c
+++ b/gnu/usr.bin/binutils/binutils/size.c
@@ -1,5 +1,5 @@
/* size.c -- report size of various sections of an executable file.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -77,8 +77,10 @@ usage (stream, status)
int status;
{
fprintf (stream, _("\
-Usage: %s [-ABdoxV] [--format=berkeley|sysv] [--radix=8|10|16]\n\
- [--target=bfdname] [--version] [--help] [file...]\n"), program_name);
+Usage: %s [-A | --format=sysv | -B | --format=berkeley]\n\
+ [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n\
+ [-V | --version] [--target=bfdname] [--help] [file...]\n"),
+ program_name);
#if BSD_DEFAULT
fputs (_("default is --format=berkeley\n"), stream);
#else
@@ -120,7 +122,7 @@ main (argc, argv)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "ABVdox", long_options,
+ while ((c = getopt_long (argc, argv, "ABVdfox", long_options,
(int *) 0)) != EOF)
switch (c)
{
@@ -186,6 +188,16 @@ main (argc, argv)
case 'o':
radix = octal;
break;
+ case 'f': /* FIXME : For sysv68, `-f' means `full format', i.e.
+ `[fname:] M(.text) + N(.data) + O(.bss) + P(.comment) = Q'
+ where `fname: ' appears only if there are >= 2 input files,
+ and M, N, O, P, Q are expressed in decimal by default,
+ hexa or octal if requested by `-x' or `-o'.
+ Just to make things interesting, Solaris also accepts -f,
+ which prints out the size of each allocatable section, the
+ name of the section, and the total of the section sizes. */
+ /* For the moment, accept `-f' silently, and ignore it. */
+ break;
case 0:
break;
case '?':
diff --git a/gnu/usr.bin/binutils/binutils/srconv.c b/gnu/usr.bin/binutils/binutils/srconv.c
index c317d9807fa..d5a232419ba 100644
--- a/gnu/usr.bin/binutils/binutils/srconv.c
+++ b/gnu/usr.bin/binutils/binutils/srconv.c
@@ -1,5 +1,6 @@
/* srconv.c -- Sysroff conversion program
- Copyright (C) 1994, 95, 96, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -224,7 +225,7 @@ writeBARRAY (data, ptr, idx, size, file)
barray data;
char *ptr;
int *idx;
- int size;
+ int size ATTRIBUTE_UNUSED;
FILE *file;
{
int i;
@@ -299,7 +300,7 @@ wr_un (ptr, sfile, first, nsecs)
struct coff_ofile *ptr;
struct coff_sfile *sfile;
int first;
- int nsecs;
+ int nsecs ATTRIBUTE_UNUSED;
{
struct IT_un un;
@@ -438,7 +439,7 @@ wr_hd (p)
static void
wr_sh (p, sec)
- struct coff_ofile *p;
+ struct coff_ofile *p ATTRIBUTE_UNUSED;
struct coff_section *sec;
{
struct IT_sh sh;
@@ -453,7 +454,7 @@ wr_sh (p, sec)
static void
wr_ob (p, section)
- struct coff_ofile *p;
+ struct coff_ofile *p ATTRIBUTE_UNUSED;
struct coff_section *section;
{
bfd_size_type i;
@@ -514,7 +515,7 @@ wr_ob (p, section)
static void
wr_rl (ptr, sec)
- struct coff_ofile *ptr;
+ struct coff_ofile *ptr ATTRIBUTE_UNUSED;
struct coff_section *sec;
{
int nr = sec->nrelocs;
@@ -586,7 +587,7 @@ wr_object_body (p)
static void
wr_dps_start (sfile, section, scope, type, nest)
struct coff_sfile *sfile;
- struct coff_section *section;
+ struct coff_section *section ATTRIBUTE_UNUSED;
struct coff_scope *scope;
int type;
int nest;
@@ -623,8 +624,8 @@ wr_dps_start (sfile, section, scope, type, nest)
static void
wr_dps_end (section, scope, type)
- struct coff_section *section;
- struct coff_scope *scope;
+ struct coff_section *section ATTRIBUTE_UNUSED;
+ struct coff_scope *scope ATTRIBUTE_UNUSED;
int type;
{
struct IT_dps dps;
@@ -960,7 +961,7 @@ walk_tree_type (sfile, symbol, type, nest)
static void
walk_tree_symbol (sfile, section, symbol, nest)
struct coff_sfile *sfile;
- struct coff_section *section;
+ struct coff_section *section ATTRIBUTE_UNUSED;
struct coff_symbol *symbol;
int nest;
{
@@ -1329,7 +1330,7 @@ wr_du (p, sfile, n)
static void
wr_dus (p, sfile)
- struct coff_ofile *p;
+ struct coff_ofile *p ATTRIBUTE_UNUSED;
struct coff_sfile *sfile;
{
@@ -1373,11 +1374,12 @@ find_base (sfile, section)
{
return sfile->section[section->number].low;
}
+
static void
wr_dln (p, sfile, n)
- struct coff_ofile *p;
+ struct coff_ofile *p ATTRIBUTE_UNUSED;
struct coff_sfile *sfile;
- int n;
+ int n ATTRIBUTE_UNUSED;
{
#if 0
@@ -1517,7 +1519,7 @@ static void
wr_globals (p, sfile, n)
struct coff_ofile *p;
struct coff_sfile *sfile;
- int n;
+ int n ATTRIBUTE_UNUSED;
{
struct coff_symbol *sy;
for (sy = p->symbol_list_head;
@@ -1734,7 +1736,7 @@ return scount;
static void
wr_er (ptr, sfile, first)
struct coff_ofile *ptr;
- struct coff_sfile *sfile;
+ struct coff_sfile *sfile ATTRIBUTE_UNUSED;
int first;
{
int idx = 0;
@@ -1760,7 +1762,7 @@ wr_er (ptr, sfile, first)
static void
wr_ed (ptr, sfile, first)
struct coff_ofile *ptr;
- struct coff_sfile *sfile;
+ struct coff_sfile *sfile ATTRIBUTE_UNUSED;
int first;
{
struct coff_symbol *s;
diff --git a/gnu/usr.bin/binutils/binutils/stabs.c b/gnu/usr.bin/binutils/binutils/stabs.c
index 5f600354257..daea3014295 100644
--- a/gnu/usr.bin/binutils/binutils/stabs.c
+++ b/gnu/usr.bin/binutils/binutils/stabs.c
@@ -1,5 +1,6 @@
/* stabs.c -- Parse stabs debugging information
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -33,6 +34,7 @@
#include "demangle.h"
#include "debug.h"
#include "budbg.h"
+#include "filenames.h"
/* Meaningless definition needs by aout64.h. FIXME. */
#define BYTES_IN_WORD 4
@@ -40,14 +42,6 @@
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
-#ifndef DIR_SEPARATOR
-#ifdef _WIN32
-#define DIR_SEPARATOR '\\'
-#else
-#define DIR_SEPARATOR '/'
-#endif
-#endif
-
/* The number of predefined XCOFF types. */
#define XCOFF_TYPE_COUNT 34
@@ -568,12 +562,7 @@ parse_stab (dhandle, handle, type, desc, value, string)
f = info->so_string;
- if ( (string[0] == '/')
- || (string[0] == DIR_SEPARATOR)
- || ( (DIR_SEPARATOR == '\\')
- && (string[1] == ':')
- && ( (string[2] == DIR_SEPARATOR)
- || (string[2] == '/'))))
+ if (IS_ABSOLUTE_PATH (string))
info->so_string = xstrdup (string);
else
info->so_string = concat (info->so_string, string,
@@ -706,6 +695,7 @@ parse_stab (dhandle, handle, type, desc, value, string)
case N_OBJ:
case N_ENDM:
case N_MAIN:
+ case N_WARNING:
break;
}
@@ -1822,7 +1812,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
else if (n3 == (bfd_signed_vma) 0xffffffff)
return debug_make_int_type (dhandle, 4, true);
#ifdef BFD64
- else if (n3 == ((((bfd_vma) 0xffffffff) << 32) | 0xffffffff))
+ else if (n3 == ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff))
return debug_make_int_type (dhandle, 8, true);
#endif
}
diff --git a/gnu/usr.bin/binutils/binutils/strings.1 b/gnu/usr.bin/binutils/binutils/strings.1
index 4d33b7996b7..4233630cde7 100644
--- a/gnu/usr.bin/binutils/binutils/strings.1
+++ b/gnu/usr.bin/binutils/binutils/strings.1
@@ -1,6 +1,6 @@
.\" Copyright (c) 1993, 94, 95, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH strings 1 "09 March 2000" "cygnus support" "GNU Development Tools"
+.TH strings 1 "09 March 2000" "Free Software Foundation" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -133,19 +133,377 @@ The GNU Binary Utilities\c
.SH COPYING
-Copyright (c) 1993 Free Software Foundation, Inc.
+Copyright (c) 1993, 2000 Free Software Foundation, Inc.
.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+This document is distributed under the terms of the GNU Free
+Documentation License, version 1.1. That license is described in the
+sources for this manual page, but it is not displayed here in order to
+make this manual more consise. Copies of this license can also be
+obtained from: http://www.gnu.org/copyleft/.
+
+\" .SH GNU Free Documentation License
+\" Version 1.1, March 2000
+
+\" Copyright (C) 2000 Free Software Foundation, Inc.
+\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\" Everyone is permitted to copy and distribute verbatim
+\" copies of this license document, but changing it is
+\" not allowed.
+\" .PP
+\" 0. PREAMBLE
+\" .PP
+\" The purpose of this License is to make a manual, textbook, or other
+\" written document "free" in the sense of freedom: to assure everyone
+\" the effective freedom to copy and redistribute it, with or without
+\" modifying it, either commercially or noncommercially. Secondarily,
+\" this License preserves for the author and publisher a way to get
+\" credit for their work, while not being considered responsible for
+\" modifications made by others.
+\" .PP
+\" This License is a kind of "copyleft", which means that derivative
+\" works of the document must themselves be free in the same sense. It
+\" complements the GNU General Public License, which is a copyleft
+\" license designed for free software.
+\" .PP
+\" We have designed this License in order to use it for manuals for free
+\" software, because free software needs free documentation: a free
+\" program should come with manuals providing the same freedoms that the
+\" software does. But this License is not limited to software manuals;
+\" it can be used for any textual work, regardless of subject matter or
+\" whether it is published as a printed book. We recommend this License
+\" principally for works whose purpose is instruction or reference.
+\" .PP
+\" 1. APPLICABILITY AND DEFINITIONS
+\" .PP
+\" This License applies to any manual or other work that contains a
+\" notice placed by the copyright holder saying it can be distributed
+\" under the terms of this License. The "Document", below, refers to any
+\" such manual or work. Any member of the public is a licensee, and is
+\" addressed as "you".
+\" .PP
+\" A "Modified Version" of the Document means any work containing the
+\" Document or a portion of it, either copied verbatim, or with
+\" modifications and/or translated into another language.
+\" .PP
+\" A "Secondary Section" is a named appendix or a front-matter section of
+\" the Document that deals exclusively with the relationship of the
+\" publishers or authors of the Document to the Document's overall subject
+\" (or to related matters) and contains nothing that could fall directly
+\" within that overall subject. (For example, if the Document is in part a
+\" textbook of mathematics, a Secondary Section may not explain any
+\" mathematics.) The relationship could be a matter of historical
+\" connection with the subject or with related matters, or of legal,
+\" commercial, philosophical, ethical or political position regarding
+\" them.
+\" .PP
+\" The "Invariant Sections" are certain Secondary Sections whose titles
+\" are designated, as being those of Invariant Sections, in the notice
+\" that says that the Document is released under this License.
+\" .PP
+\" The "Cover Texts" are certain short passages of text that are listed,
+\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+\" the Document is released under this License.
+\" .PP
+\" A "Transparent" copy of the Document means a machine-readable copy,
+\" represented in a format whose specification is available to the
+\" general public, whose contents can be viewed and edited directly and
+\" straightforwardly with generic text editors or (for images composed of
+\" pixels) generic paint programs or (for drawings) some widely available
+\" drawing editor, and that is suitable for input to text formatters or
+\" for automatic translation to a variety of formats suitable for input
+\" to text formatters. A copy made in an otherwise Transparent file
+\" format whose markup has been designed to thwart or discourage
+\" subsequent modification by readers is not Transparent. A copy that is
+\" not "Transparent" is called "Opaque".
+\" .PP
+\" Examples of suitable formats for Transparent copies include plain
+\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
+\" or XML using a publicly available DTD, and standard-conforming simple
+\" HTML designed for human modification. Opaque formats include
+\" PostScript, PDF, proprietary formats that can be read and edited only
+\" by proprietary word processors, SGML or XML for which the DTD and/or
+\" processing tools are not generally available, and the
+\" machine-generated HTML produced by some word processors for output
+\" purposes only.
+\" .PP
+\" The "Title Page" means, for a printed book, the title page itself,
+\" plus such following pages as are needed to hold, legibly, the material
+\" this License requires to appear in the title page. For works in
+\" formats which do not have any title page as such, "Title Page" means
+\" the text near the most prominent appearance of the work's title,
+\" preceding the beginning of the body of the text.
+\" .PP
+\" 2. VERBATIM COPYING
+\" .PP
+\" You may copy and distribute the Document in any medium, either
+\" commercially or noncommercially, provided that this License, the
+\" copyright notices, and the license notice saying this License applies
+\" to the Document are reproduced in all copies, and that you add no other
+\" conditions whatsoever to those of this License. You may not use
+\" technical measures to obstruct or control the reading or further
+\" copying of the copies you make or distribute. However, you may accept
+\" compensation in exchange for copies. If you distribute a large enough
+\" number of copies you must also follow the conditions in section 3.
+\" .PP
+\" You may also lend copies, under the same conditions stated above, and
+\" you may publicly display copies.
+\" .PP
+\" 3. COPYING IN QUANTITY
+\" .PP
+\" If you publish printed copies of the Document numbering more than 100,
+\" and the Document's license notice requires Cover Texts, you must enclose
+\" the copies in covers that carry, clearly and legibly, all these Cover
+\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+\" the back cover. Both covers must also clearly and legibly identify
+\" you as the publisher of these copies. The front cover must present
+\" the full title with all words of the title equally prominent and
+\" visible. You may add other material on the covers in addition.
+\" Copying with changes limited to the covers, as long as they preserve
+\" the title of the Document and satisfy these conditions, can be treated
+\" as verbatim copying in other respects.
+\" .PP
+\" If the required texts for either cover are too voluminous to fit
+\" legibly, you should put the first ones listed (as many as fit
+\" reasonably) on the actual cover, and continue the rest onto adjacent
+\" pages.
+\" .PP
+\" If you publish or distribute Opaque copies of the Document numbering
+\" more than 100, you must either include a machine-readable Transparent
+\" copy along with each Opaque copy, or state in or with each Opaque copy
+\" a publicly-accessible computer-network location containing a complete
+\" Transparent copy of the Document, free of added material, which the
+\" general network-using public has access to download anonymously at no
+\" charge using public-standard network protocols. If you use the latter
+\" option, you must take reasonably prudent steps, when you begin
+\" distribution of Opaque copies in quantity, to ensure that this
+\" Transparent copy will remain thus accessible at the stated location
+\" until at least one year after the last time you distribute an Opaque
+\" copy (directly or through your agents or retailers) of that edition to
+\" the public.
+\" .PP
+\" It is requested, but not required, that you contact the authors of the
+\" Document well before redistributing any large number of copies, to give
+\" them a chance to provide you with an updated version of the Document.
+\" .PP
+\" 4. MODIFICATIONS
+\" .PP
+\" You may copy and distribute a Modified Version of the Document under
+\" the conditions of sections 2 and 3 above, provided that you release
+\" the Modified Version under precisely this License, with the Modified
+\" Version filling the role of the Document, thus licensing distribution
+\" and modification of the Modified Version to whoever possesses a copy
+\" of it. In addition, you must do these things in the Modified Version:
+\" .PP
+\" A. Use in the Title Page (and on the covers, if any) a title distinct
+\" from that of the Document, and from those of previous versions
+\" (which should, if there were any, be listed in the History section
+\" of the Document). You may use the same title as a previous version
+\" if the original publisher of that version gives permission.
+\" .PP
+\" B. List on the Title Page, as authors, one or more persons or entities
+\" responsible for authorship of the modifications in the Modified
+\" Version, together with at least five of the principal authors of the
+\" Document (all of its principal authors, if it has less than five).
+\" .PP
+\" C. State on the Title page the name of the publisher of the
+\" Modified Version, as the publisher.
+\" .PP
+\" D. Preserve all the copyright notices of the Document.
+\" .PP
+\" E. Add an appropriate copyright notice for your modifications
+\" adjacent to the other copyright notices.
+\" .PP
+\" F. Include, immediately after the copyright notices, a license notice
+\" giving the public permission to use the Modified Version under the
+\" terms of this License, in the form shown in the Addendum below.
+\" Preserve in that license notice the full lists of Invariant Sections
+\" and required Cover Texts given in the Document's license notice.
+\" .PP
+\" H. Include an unaltered copy of this License.
+\" .PP
+\" I. Preserve the section entitled "History", and its title, and add to
+\" it an item stating at least the title, year, new authors, and
+\" publisher of the Modified Version as given on the Title Page. If
+\" there is no section entitled "History" in the Document, create one
+\" stating the title, year, authors, and publisher of the Document as
+\" given on its Title Page, then add an item describing the Modified
+\" Version as stated in the previous sentence.
+\" .PP
+\" J. Preserve the network location, if any, given in the Document for
+\" public access to a Transparent copy of the Document, and likewise
+\" the network locations given in the Document for previous versions
+\" it was based on. These may be placed in the "History" section.
+\" You may omit a network location for a work that was published at
+\" least four years before the Document itself, or if the original
+\" publisher of the version it refers to gives permission.
+\" .PP
+\" K. In any section entitled "Acknowledgements" or "Dedications",
+\" preserve the section's title, and preserve in the section all the
+\" substance and tone of each of the contributor acknowledgements
+\" and/or dedications given therein.
+\" .PP
+\" L. Preserve all the Invariant Sections of the Document,
+\" unaltered in their text and in their titles. Section numbers
+\" or the equivalent are not considered part of the section titles.
+\" .PP
+\" M. Delete any section entitled "Endorsements". Such a section
+\" may not be included in the Modified Version.
+\" .PP
+\" N. Do not retitle any existing section as "Endorsements"
+\" or to conflict in title with any Invariant Section.
+\" .PP
+\" If the Modified Version includes new front-matter sections or
+\" appendices that qualify as Secondary Sections and contain no material
+\" copied from the Document, you may at your option designate some or all
+\" of these sections as invariant. To do this, add their titles to the
+\" list of Invariant Sections in the Modified Version's license notice.
+\" These titles must be distinct from any other section titles.
+\" .PP
+\" You may add a section entitled "Endorsements", provided it contains
+\" nothing but endorsements of your Modified Version by various
+\" parties--for example, statements of peer review or that the text has
+\" been approved by an organization as the authoritative definition of a
+\" standard.
+\" .PP
+\" You may add a passage of up to five words as a Front-Cover Text, and a
+\" passage of up to 25 words as a Back-Cover Text, to the end of the list
+\" of Cover Texts in the Modified Version. Only one passage of
+\" Front-Cover Text and one of Back-Cover Text may be added by (or
+\" through arrangements made by) any one entity. If the Document already
+\" includes a cover text for the same cover, previously added by you or
+\" by arrangement made by the same entity you are acting on behalf of,
+\" you may not add another; but you may replace the old one, on explicit
+\" permission from the previous publisher that added the old one.
+\" .PP
+\" The author(s) and publisher(s) of the Document do not by this License
+\" give permission to use their names for publicity for or to assert or
+\" imply endorsement of any Modified Version.
+\" .PP
+
+\" 5. COMBINING DOCUMENTS
+\" .PP
+\" You may combine the Document with other documents released under this
+\" License, under the terms defined in section 4 above for modified
+\" versions, provided that you include in the combination all of the
+\" Invariant Sections of all of the original documents, unmodified, and
+\" list them all as Invariant Sections of your combined work in its
+\" license notice.
+\" .PP
+\" The combined work need only contain one copy of this License, and
+\" multiple identical Invariant Sections may be replaced with a single
+\" copy. If there are multiple Invariant Sections with the same name but
+\" different contents, make the title of each such section unique by
+\" adding at the end of it, in parentheses, the name of the original
+\" author or publisher of that section if known, or else a unique number.
+\" Make the same adjustment to the section titles in the list of
+\" Invariant Sections in the license notice of the combined work.
+\" .PP
+\" In the combination, you must combine any sections entitled "History"
+\" in the various original documents, forming one section entitled
+\" "History"; likewise combine any sections entitled "Acknowledgements",
+\" and any sections entitled "Dedications". You must delete all sections
+\" entitled "Endorsements."
+\" .PP
+
+\" 6. COLLECTIONS OF DOCUMENTS
+\" .PP
+\" You may make a collection consisting of the Document and other documents
+\" released under this License, and replace the individual copies of this
+\" License in the various documents with a single copy that is included in
+\" the collection, provided that you follow the rules of this License for
+\" verbatim copying of each of the documents in all other respects.
+\" .PP
+\" You may extract a single document from such a collection, and distribute
+\" it individually under this License, provided you insert a copy of this
+\" License into the extracted document, and follow this License in all
+\" other respects regarding verbatim copying of that document.
+\" .PP
+
+\" 7. AGGREGATION WITH INDEPENDENT WORKS
+\" .PP
+\" A compilation of the Document or its derivatives with other separate
+\" and independent documents or works, in or on a volume of a storage or
+\" distribution medium, does not as a whole count as a Modified Version
+\" of the Document, provided no compilation copyright is claimed for the
+\" compilation. Such a compilation is called an "aggregate", and this
+\" License does not apply to the other self-contained works thus compiled
+\" with the Document, on account of their being thus compiled, if they
+\" are not themselves derivative works of the Document.
+\" .PP
+\" If the Cover Text requirement of section 3 is applicable to these
+\" copies of the Document, then if the Document is less than one quarter
+\" of the entire aggregate, the Document's Cover Texts may be placed on
+\" covers that surround only the Document within the aggregate.
+\" Otherwise they must appear on covers around the whole aggregate.
+\" .PP
+
+\" 8. TRANSLATION
+\" .PP
+\" Translation is considered a kind of modification, so you may
+\" distribute translations of the Document under the terms of section 4.
+\" Replacing Invariant Sections with translations requires special
+\" permission from their copyright holders, but you may include
+\" translations of some or all Invariant Sections in addition to the
+\" original versions of these Invariant Sections. You may include a
+\" translation of this License provided that you also include the
+\" original English version of this License. In case of a disagreement
+\" between the translation and the original English version of this
+\" License, the original English version will prevail.
+\" .PP
+
+\" 9. TERMINATION
+\" .PP
+\" You may not copy, modify, sublicense, or distribute the Document except
+\" as expressly provided for under this License. Any other attempt to
+\" copy, modify, sublicense or distribute the Document is void, and will
+\" automatically terminate your rights under this License. However,
+\" parties who have received copies, or rights, from you under this
+\" License will not have their licenses terminated so long as such
+\" parties remain in full compliance.
+\" .PP
+
+\" 10. FUTURE REVISIONS OF THIS LICENSE
+\" .PP
+\" The Free Software Foundation may publish new, revised versions
+\" of the GNU Free Documentation License from time to time. Such new
+\" versions will be similar in spirit to the present version, but may
+\" differ in detail to address new problems or concerns. See
+\" http://www.gnu.org/copyleft/.
+\" .PP
+\" Each version of the License is given a distinguishing version number.
+\" If the Document specifies that a particular numbered version of this
+\" License "or any later version" applies to it, you have the option of
+\" following the terms and conditions either of that specified version or
+\" of any later version that has been published (not as a draft) by the
+\" Free Software Foundation. If the Document does not specify a version
+\" number of this License, you may choose any version ever published (not
+\" as a draft) by the Free Software Foundation.
+\" .PP
+
+\" ADDENDUM: How to use this License for your documents
+\" .PP
+\" To use this License in a document you have written, include a copy of
+\" the License in the document and put the following copyright and
+\" license notices just after the title page:
+\" .PP
+\" Copyright (c) YEAR YOUR NAME.
+\" Permission is granted to copy, distribute and/or
+\" modify this document under the terms of the GNU
+\" Free Documentation License, Version 1.1 or any later
+\" version published by the Free Software Foundation;
+\" with the Invariant Sections being LIST THEIR TITLES,
+\" with the Front-Cover Texts being LIST, and with the
+\" Back-Cover Texts being LIST. A copy of the license
+\" is included in the section entitled "GNU Free
+\" Documentation License".
+\" .PP
+\" If you have no Invariant Sections, write "with no Invariant Sections"
+\" instead of saying which ones are invariant. If you have no
+\" Front-Cover Texts, write "no Front-Cover Texts" instead of
+\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+\" .PP
+\" If your document contains nontrivial examples of program code, we
+\" recommend releasing these examples in parallel under your choice of
+\" free software license, such as the GNU General Public License,
+\" to permit their use in free software.
diff --git a/gnu/usr.bin/binutils/binutils/strings.c b/gnu/usr.bin/binutils/binutils/strings.c
index 54f29e43abb..5d3aa6d4fa7 100644
--- a/gnu/usr.bin/binutils/binutils/strings.c
+++ b/gnu/usr.bin/binutils/binutils/strings.c
@@ -1,5 +1,5 @@
/* strings -- print the strings of printable characters in files
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -76,10 +76,13 @@
#endif
#endif
-#ifdef isascii
-#define isgraphic(c) (isascii (c) && isprint (c))
+/* Not all printable characters have ASCII codes (depending upon the
+ LOCALE set) but on some older systems it is not safe to test isprint
+ without first testing isascii... */
+#if defined isascii && !defined HAVE_LOCALE_H
+#define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t'))
#else
-#define isgraphic(c) (isprint (c))
+#define isgraphic(c) (isprint (c) || (c) == '\t')
#endif
#ifndef errno
@@ -141,7 +144,7 @@ main (argc, argv)
boolean files_given = false;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
- setlocale (LC_MESSAGES, "");
+ setlocale (LC_ALL, "");
#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
diff --git a/gnu/usr.bin/binutils/binutils/strip.1 b/gnu/usr.bin/binutils/binutils/strip.1
index 1fc415c8a78..5bd6dfbaebb 100644
--- a/gnu/usr.bin/binutils/binutils/strip.1
+++ b/gnu/usr.bin/binutils/binutils/strip.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation
+.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH strip 1 "5 November 1991" "cygnus support" "GNU Development Tools"
+.TH strip 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -167,19 +167,377 @@ entry in
Roland H. Pesch (October 1991).
.SH COPYING
-Copyright (c) 1991 Free Software Foundation, Inc.
+Copyright (c) 1991, 2000 Free Software Foundation, Inc.
.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+This document is distributed under the terms of the GNU Free
+Documentation License, version 1.1. That license is described in the
+sources for this manual page, but it is not displayed here in order to
+make this manual more consise. Copies of this license can also be
+obtained from: http://www.gnu.org/copyleft/.
+
+\" .SH GNU Free Documentation License
+\" Version 1.1, March 2000
+
+\" Copyright (C) 2000 Free Software Foundation, Inc.
+\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\" Everyone is permitted to copy and distribute verbatim
+\" copies of this license document, but changing it is
+\" not allowed.
+\" .PP
+\" 0. PREAMBLE
+\" .PP
+\" The purpose of this License is to make a manual, textbook, or other
+\" written document "free" in the sense of freedom: to assure everyone
+\" the effective freedom to copy and redistribute it, with or without
+\" modifying it, either commercially or noncommercially. Secondarily,
+\" this License preserves for the author and publisher a way to get
+\" credit for their work, while not being considered responsible for
+\" modifications made by others.
+\" .PP
+\" This License is a kind of "copyleft", which means that derivative
+\" works of the document must themselves be free in the same sense. It
+\" complements the GNU General Public License, which is a copyleft
+\" license designed for free software.
+\" .PP
+\" We have designed this License in order to use it for manuals for free
+\" software, because free software needs free documentation: a free
+\" program should come with manuals providing the same freedoms that the
+\" software does. But this License is not limited to software manuals;
+\" it can be used for any textual work, regardless of subject matter or
+\" whether it is published as a printed book. We recommend this License
+\" principally for works whose purpose is instruction or reference.
+\" .PP
+\" 1. APPLICABILITY AND DEFINITIONS
+\" .PP
+\" This License applies to any manual or other work that contains a
+\" notice placed by the copyright holder saying it can be distributed
+\" under the terms of this License. The "Document", below, refers to any
+\" such manual or work. Any member of the public is a licensee, and is
+\" addressed as "you".
+\" .PP
+\" A "Modified Version" of the Document means any work containing the
+\" Document or a portion of it, either copied verbatim, or with
+\" modifications and/or translated into another language.
+\" .PP
+\" A "Secondary Section" is a named appendix or a front-matter section of
+\" the Document that deals exclusively with the relationship of the
+\" publishers or authors of the Document to the Document's overall subject
+\" (or to related matters) and contains nothing that could fall directly
+\" within that overall subject. (For example, if the Document is in part a
+\" textbook of mathematics, a Secondary Section may not explain any
+\" mathematics.) The relationship could be a matter of historical
+\" connection with the subject or with related matters, or of legal,
+\" commercial, philosophical, ethical or political position regarding
+\" them.
+\" .PP
+\" The "Invariant Sections" are certain Secondary Sections whose titles
+\" are designated, as being those of Invariant Sections, in the notice
+\" that says that the Document is released under this License.
+\" .PP
+\" The "Cover Texts" are certain short passages of text that are listed,
+\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+\" the Document is released under this License.
+\" .PP
+\" A "Transparent" copy of the Document means a machine-readable copy,
+\" represented in a format whose specification is available to the
+\" general public, whose contents can be viewed and edited directly and
+\" straightforwardly with generic text editors or (for images composed of
+\" pixels) generic paint programs or (for drawings) some widely available
+\" drawing editor, and that is suitable for input to text formatters or
+\" for automatic translation to a variety of formats suitable for input
+\" to text formatters. A copy made in an otherwise Transparent file
+\" format whose markup has been designed to thwart or discourage
+\" subsequent modification by readers is not Transparent. A copy that is
+\" not "Transparent" is called "Opaque".
+\" .PP
+\" Examples of suitable formats for Transparent copies include plain
+\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
+\" or XML using a publicly available DTD, and standard-conforming simple
+\" HTML designed for human modification. Opaque formats include
+\" PostScript, PDF, proprietary formats that can be read and edited only
+\" by proprietary word processors, SGML or XML for which the DTD and/or
+\" processing tools are not generally available, and the
+\" machine-generated HTML produced by some word processors for output
+\" purposes only.
+\" .PP
+\" The "Title Page" means, for a printed book, the title page itself,
+\" plus such following pages as are needed to hold, legibly, the material
+\" this License requires to appear in the title page. For works in
+\" formats which do not have any title page as such, "Title Page" means
+\" the text near the most prominent appearance of the work's title,
+\" preceding the beginning of the body of the text.
+\" .PP
+\" 2. VERBATIM COPYING
+\" .PP
+\" You may copy and distribute the Document in any medium, either
+\" commercially or noncommercially, provided that this License, the
+\" copyright notices, and the license notice saying this License applies
+\" to the Document are reproduced in all copies, and that you add no other
+\" conditions whatsoever to those of this License. You may not use
+\" technical measures to obstruct or control the reading or further
+\" copying of the copies you make or distribute. However, you may accept
+\" compensation in exchange for copies. If you distribute a large enough
+\" number of copies you must also follow the conditions in section 3.
+\" .PP
+\" You may also lend copies, under the same conditions stated above, and
+\" you may publicly display copies.
+\" .PP
+\" 3. COPYING IN QUANTITY
+\" .PP
+\" If you publish printed copies of the Document numbering more than 100,
+\" and the Document's license notice requires Cover Texts, you must enclose
+\" the copies in covers that carry, clearly and legibly, all these Cover
+\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+\" the back cover. Both covers must also clearly and legibly identify
+\" you as the publisher of these copies. The front cover must present
+\" the full title with all words of the title equally prominent and
+\" visible. You may add other material on the covers in addition.
+\" Copying with changes limited to the covers, as long as they preserve
+\" the title of the Document and satisfy these conditions, can be treated
+\" as verbatim copying in other respects.
+\" .PP
+\" If the required texts for either cover are too voluminous to fit
+\" legibly, you should put the first ones listed (as many as fit
+\" reasonably) on the actual cover, and continue the rest onto adjacent
+\" pages.
+\" .PP
+\" If you publish or distribute Opaque copies of the Document numbering
+\" more than 100, you must either include a machine-readable Transparent
+\" copy along with each Opaque copy, or state in or with each Opaque copy
+\" a publicly-accessible computer-network location containing a complete
+\" Transparent copy of the Document, free of added material, which the
+\" general network-using public has access to download anonymously at no
+\" charge using public-standard network protocols. If you use the latter
+\" option, you must take reasonably prudent steps, when you begin
+\" distribution of Opaque copies in quantity, to ensure that this
+\" Transparent copy will remain thus accessible at the stated location
+\" until at least one year after the last time you distribute an Opaque
+\" copy (directly or through your agents or retailers) of that edition to
+\" the public.
+\" .PP
+\" It is requested, but not required, that you contact the authors of the
+\" Document well before redistributing any large number of copies, to give
+\" them a chance to provide you with an updated version of the Document.
+\" .PP
+\" 4. MODIFICATIONS
+\" .PP
+\" You may copy and distribute a Modified Version of the Document under
+\" the conditions of sections 2 and 3 above, provided that you release
+\" the Modified Version under precisely this License, with the Modified
+\" Version filling the role of the Document, thus licensing distribution
+\" and modification of the Modified Version to whoever possesses a copy
+\" of it. In addition, you must do these things in the Modified Version:
+\" .PP
+\" A. Use in the Title Page (and on the covers, if any) a title distinct
+\" from that of the Document, and from those of previous versions
+\" (which should, if there were any, be listed in the History section
+\" of the Document). You may use the same title as a previous version
+\" if the original publisher of that version gives permission.
+\" .PP
+\" B. List on the Title Page, as authors, one or more persons or entities
+\" responsible for authorship of the modifications in the Modified
+\" Version, together with at least five of the principal authors of the
+\" Document (all of its principal authors, if it has less than five).
+\" .PP
+\" C. State on the Title page the name of the publisher of the
+\" Modified Version, as the publisher.
+\" .PP
+\" D. Preserve all the copyright notices of the Document.
+\" .PP
+\" E. Add an appropriate copyright notice for your modifications
+\" adjacent to the other copyright notices.
+\" .PP
+\" F. Include, immediately after the copyright notices, a license notice
+\" giving the public permission to use the Modified Version under the
+\" terms of this License, in the form shown in the Addendum below.
+\" Preserve in that license notice the full lists of Invariant Sections
+\" and required Cover Texts given in the Document's license notice.
+\" .PP
+\" H. Include an unaltered copy of this License.
+\" .PP
+\" I. Preserve the section entitled "History", and its title, and add to
+\" it an item stating at least the title, year, new authors, and
+\" publisher of the Modified Version as given on the Title Page. If
+\" there is no section entitled "History" in the Document, create one
+\" stating the title, year, authors, and publisher of the Document as
+\" given on its Title Page, then add an item describing the Modified
+\" Version as stated in the previous sentence.
+\" .PP
+\" J. Preserve the network location, if any, given in the Document for
+\" public access to a Transparent copy of the Document, and likewise
+\" the network locations given in the Document for previous versions
+\" it was based on. These may be placed in the "History" section.
+\" You may omit a network location for a work that was published at
+\" least four years before the Document itself, or if the original
+\" publisher of the version it refers to gives permission.
+\" .PP
+\" K. In any section entitled "Acknowledgements" or "Dedications",
+\" preserve the section's title, and preserve in the section all the
+\" substance and tone of each of the contributor acknowledgements
+\" and/or dedications given therein.
+\" .PP
+\" L. Preserve all the Invariant Sections of the Document,
+\" unaltered in their text and in their titles. Section numbers
+\" or the equivalent are not considered part of the section titles.
+\" .PP
+\" M. Delete any section entitled "Endorsements". Such a section
+\" may not be included in the Modified Version.
+\" .PP
+\" N. Do not retitle any existing section as "Endorsements"
+\" or to conflict in title with any Invariant Section.
+\" .PP
+\" If the Modified Version includes new front-matter sections or
+\" appendices that qualify as Secondary Sections and contain no material
+\" copied from the Document, you may at your option designate some or all
+\" of these sections as invariant. To do this, add their titles to the
+\" list of Invariant Sections in the Modified Version's license notice.
+\" These titles must be distinct from any other section titles.
+\" .PP
+\" You may add a section entitled "Endorsements", provided it contains
+\" nothing but endorsements of your Modified Version by various
+\" parties--for example, statements of peer review or that the text has
+\" been approved by an organization as the authoritative definition of a
+\" standard.
+\" .PP
+\" You may add a passage of up to five words as a Front-Cover Text, and a
+\" passage of up to 25 words as a Back-Cover Text, to the end of the list
+\" of Cover Texts in the Modified Version. Only one passage of
+\" Front-Cover Text and one of Back-Cover Text may be added by (or
+\" through arrangements made by) any one entity. If the Document already
+\" includes a cover text for the same cover, previously added by you or
+\" by arrangement made by the same entity you are acting on behalf of,
+\" you may not add another; but you may replace the old one, on explicit
+\" permission from the previous publisher that added the old one.
+\" .PP
+\" The author(s) and publisher(s) of the Document do not by this License
+\" give permission to use their names for publicity for or to assert or
+\" imply endorsement of any Modified Version.
+\" .PP
+
+\" 5. COMBINING DOCUMENTS
+\" .PP
+\" You may combine the Document with other documents released under this
+\" License, under the terms defined in section 4 above for modified
+\" versions, provided that you include in the combination all of the
+\" Invariant Sections of all of the original documents, unmodified, and
+\" list them all as Invariant Sections of your combined work in its
+\" license notice.
+\" .PP
+\" The combined work need only contain one copy of this License, and
+\" multiple identical Invariant Sections may be replaced with a single
+\" copy. If there are multiple Invariant Sections with the same name but
+\" different contents, make the title of each such section unique by
+\" adding at the end of it, in parentheses, the name of the original
+\" author or publisher of that section if known, or else a unique number.
+\" Make the same adjustment to the section titles in the list of
+\" Invariant Sections in the license notice of the combined work.
+\" .PP
+\" In the combination, you must combine any sections entitled "History"
+\" in the various original documents, forming one section entitled
+\" "History"; likewise combine any sections entitled "Acknowledgements",
+\" and any sections entitled "Dedications". You must delete all sections
+\" entitled "Endorsements."
+\" .PP
+
+\" 6. COLLECTIONS OF DOCUMENTS
+\" .PP
+\" You may make a collection consisting of the Document and other documents
+\" released under this License, and replace the individual copies of this
+\" License in the various documents with a single copy that is included in
+\" the collection, provided that you follow the rules of this License for
+\" verbatim copying of each of the documents in all other respects.
+\" .PP
+\" You may extract a single document from such a collection, and distribute
+\" it individually under this License, provided you insert a copy of this
+\" License into the extracted document, and follow this License in all
+\" other respects regarding verbatim copying of that document.
+\" .PP
+
+\" 7. AGGREGATION WITH INDEPENDENT WORKS
+\" .PP
+\" A compilation of the Document or its derivatives with other separate
+\" and independent documents or works, in or on a volume of a storage or
+\" distribution medium, does not as a whole count as a Modified Version
+\" of the Document, provided no compilation copyright is claimed for the
+\" compilation. Such a compilation is called an "aggregate", and this
+\" License does not apply to the other self-contained works thus compiled
+\" with the Document, on account of their being thus compiled, if they
+\" are not themselves derivative works of the Document.
+\" .PP
+\" If the Cover Text requirement of section 3 is applicable to these
+\" copies of the Document, then if the Document is less than one quarter
+\" of the entire aggregate, the Document's Cover Texts may be placed on
+\" covers that surround only the Document within the aggregate.
+\" Otherwise they must appear on covers around the whole aggregate.
+\" .PP
+
+\" 8. TRANSLATION
+\" .PP
+\" Translation is considered a kind of modification, so you may
+\" distribute translations of the Document under the terms of section 4.
+\" Replacing Invariant Sections with translations requires special
+\" permission from their copyright holders, but you may include
+\" translations of some or all Invariant Sections in addition to the
+\" original versions of these Invariant Sections. You may include a
+\" translation of this License provided that you also include the
+\" original English version of this License. In case of a disagreement
+\" between the translation and the original English version of this
+\" License, the original English version will prevail.
+\" .PP
+
+\" 9. TERMINATION
+\" .PP
+\" You may not copy, modify, sublicense, or distribute the Document except
+\" as expressly provided for under this License. Any other attempt to
+\" copy, modify, sublicense or distribute the Document is void, and will
+\" automatically terminate your rights under this License. However,
+\" parties who have received copies, or rights, from you under this
+\" License will not have their licenses terminated so long as such
+\" parties remain in full compliance.
+\" .PP
+
+\" 10. FUTURE REVISIONS OF THIS LICENSE
+\" .PP
+\" The Free Software Foundation may publish new, revised versions
+\" of the GNU Free Documentation License from time to time. Such new
+\" versions will be similar in spirit to the present version, but may
+\" differ in detail to address new problems or concerns. See
+\" http://www.gnu.org/copyleft/.
+\" .PP
+\" Each version of the License is given a distinguishing version number.
+\" If the Document specifies that a particular numbered version of this
+\" License "or any later version" applies to it, you have the option of
+\" following the terms and conditions either of that specified version or
+\" of any later version that has been published (not as a draft) by the
+\" Free Software Foundation. If the Document does not specify a version
+\" number of this License, you may choose any version ever published (not
+\" as a draft) by the Free Software Foundation.
+\" .PP
+
+\" ADDENDUM: How to use this License for your documents
+\" .PP
+\" To use this License in a document you have written, include a copy of
+\" the License in the document and put the following copyright and
+\" license notices just after the title page:
+\" .PP
+\" Copyright (c) YEAR YOUR NAME.
+\" Permission is granted to copy, distribute and/or
+\" modify this document under the terms of the GNU
+\" Free Documentation License, Version 1.1 or any later
+\" version published by the Free Software Foundation;
+\" with the Invariant Sections being LIST THEIR TITLES,
+\" with the Front-Cover Texts being LIST, and with the
+\" Back-Cover Texts being LIST. A copy of the license
+\" is included in the section entitled "GNU Free
+\" Documentation License".
+\" .PP
+\" If you have no Invariant Sections, write "with no Invariant Sections"
+\" instead of saying which ones are invariant. If you have no
+\" Front-Cover Texts, write "no Front-Cover Texts" instead of
+\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+\" .PP
+\" If your document contains nontrivial examples of program code, we
+\" recommend releasing these examples in parallel under your choice of
+\" free software license, such as the GNU General Public License,
+\" to permit their use in free software.
diff --git a/gnu/usr.bin/binutils/binutils/sysdump.c b/gnu/usr.bin/binutils/binutils/sysdump.c
index fd2a0ea3e47..65d2ca676bd 100644
--- a/gnu/usr.bin/binutils/binutils/sysdump.c
+++ b/gnu/usr.bin/binutils/binutils/sysdump.c
@@ -1,5 +1,5 @@
/* Sysroff object format dumper.
- Copyright (C) 1994, 95, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -131,8 +131,8 @@ barray
getBARRAY (ptr, idx, dsize, max)
unsigned char *ptr;
int *idx;
- int dsize;
- int max;
+ int dsize ATTRIBUTE_UNUSED;
+ int max ATTRIBUTE_UNUSED;
{
barray res;
int i;
diff --git a/gnu/usr.bin/binutils/binutils/sysinfo.y b/gnu/usr.bin/binutils/binutils/sysinfo.y
index 0aa87375dd6..fef16cbddc6 100644
--- a/gnu/usr.bin/binutils/binutils/sysinfo.y
+++ b/gnu/usr.bin/binutils/binutils/sysinfo.y
@@ -1,3 +1,22 @@
+/* Copyright 2001 Free Software Foundation, Inc.
+ Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
+
+This file is part of GNU binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
%{
#include <stdio.h>
#include <stdlib.h>
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/ChangeLog b/gnu/usr.bin/binutils/binutils/testsuite/ChangeLog
index 078f8d53c70..db2a85977bf 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/ChangeLog
+++ b/gnu/usr.bin/binutils/binutils/testsuite/ChangeLog
@@ -1,13 +1,132 @@
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-06-07 H.J. Lu <hjl@gnu.org>
+ * binutils-all/readelf.ss-mips: Support stabs.
+ * binutils-all/readelf.ss-tmips: Likewise.
+
+ 2001-05-25 H.J. Lu <hjl@gnu.org>
+ * binutils-all/readelf.exp (readelf_test): Set target_machine
+ to tmips for traditional mips.
+ * binutils-all/readelf.s: Support traditional mips.
+ * binutils-all/readelf.ss-tmips: New for traditional mips.
+
+ 2001-05-25 Alan Modra <amodra@one.net.au>
+ * binutils-all/readelf.exp: Replace linuxoldld with linux*oldld
+ and linuxaout with linux*aout.
+ * binutils-all/objcopy.exp: Remove xfail for linuxaout.
+
+ 2001-03-30 H.J. Lu <hjl@gnu.org>
+ * binutils-all/readelf.exp: Run on more ELF targets.
+
+ 2001-02-11 H.J. Lu <hjl@gnu.org>
+ * config/default.exp: Set up gcc_gas_flag.
+ * binutils-all/objcopy.exp (copy_setup): Process gcc_gas_flag
+ for Linux only.
+ * binutils-all/testprog.c: Include <string.h> and don't use
+ exit ().
+
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * (binutils-all/ar.exp, binutils-all/nm.exp,
+ binutils-all/objcopy.exp, binutils-all/objdump.exp,
+ binutils-all/readelf.exp, binutils-all/size.exp,
+ binutils-all/hppa/objdump.exp, config/default.exp,
+ lib/utils-lib.exp): Update copyright notices.
+
+2001-01-16 Matthew Green <mrg@redhat.com>
+
+ * binutils-all/readelf.s-64: Match readelf -S output.
+
+2000-12-09 Nick Clifton <nickc@redhat.com>
+
+ * binutils-all/objdump.exp (cpus_expected): Add tic54x and
+ tms320c54x.
+
+2000-11-28 Hans-Peter Nilsson <hp@axis.com>
+
+ * binutils-all/readelf.s: Adjust to readelf.c formatting changes.
+
+2000-11-02 Chris Demetriou <cgd@sibyte.com>
+
+ * binutils-all/readelf.exp (regexp_diff): Add code
+ from gas testsuite to treat "#..." at beginning of line
+ as an indicator to skip extra non-matching lines at that
+ location.
+ (readelf_test): Add support for using a machine-specific
+ regexp comparison file.
+ (readelf -S test, readelf -s test): Remove v850*-*-* and
+ mips*-*-* from list of expected failures.
+ * binutils-all/readelf.s: Accomodate changes due to
+ additional sections (and therefore section numbering
+ differences) on v850*-*-* and mips*-*-* targets.
+ * binutils-all/readelf.ss: Likewise.
+ * binutils-all/readelf.ss-mips: New file, which matches
+ expected output of readelf -s test for mips*-*-*.
+
+2000-10-25 Hans-Peter Nilsson <hp@axis.com>
+
+ * binutils-all/readelf.exp (-wi test): Add cris-*-* to xfails.
+
+2000-10-19 Chris Demetriou <cgd@sibyte.com>
+
+ * binutils-all/readelf.exp (readelf_test): Work properly
+ when multiple targets expect failtures.
+ (readelf -S test, readelf -s test): Expect mips*-*-*
+ to fail.
+
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
+
+ * lib/utils-lib.exp (default_binutils_assemble): Don't do the hppa
+ sed fudges for hppa-linux.
+
+2000-07-01 Frank Ch. Eigler <fche@redhat.com>
+
+ * binutils-all/objdump.exp (cpus_expected, cpus_regex): Reorganize
+ syntax to display more tcl nature.
+
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * binutils-all/objdump.exp (cpus_expected): Recognize m68hc11 and
+ m68hc12.
+
+2000-06-18 Nick Clifton <nickc@redhat.com>
+
+ * binutils-all/readelf.wi: Do not assume the compilation tag to be
+ unit 1.
+
+ * binutils-all/objcopy.exp: Expect all arm variants to fail the
+ copying executable test.
+
+2000-06-14 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * binutils-all/readelf.exp (regexp_diff): Do not break when a
+ mismatching line is found.
+ (readelf_find_size): New.
+ (readelf_size): New global variable.
+ (readelf_test): Add newline to send_log of command.
+ If $srcdir/$subdir/$regexp_file-$readelf_size exists, use it
+ instead of $srcdir/$subdir/$regexp_file.
+ (*-*elf test): Fix typo in message.
+ * binutils-all/readelf.s-64: New.
+ * binutils-all/readelf.ss-64: New.
+
+2000-05-02 Alan Modra <alan@linuxcare.com.au>
+
+ * binutils-all/objcopy.exp (simple copy): Clear xfail for hppa-linux.
+
+ * binutils-all/hppa/objdump.exp: Disable test for elf.
+
2000-03-13 Nick Clifton <nickc@cygnus.com>
- * binutils-all/readelf.s: Adjust to match noew format of readelf
- output.
- * binutils-all/readelf.ss: Adjust to match noew format of readelf
- output.
+ * binutils-all/readelf.s: Adjust to match new format of readelf
+ output.
+ * binutils-all/readelf.ss: Adjust to match new format of readelf
+ output.
1999-11-01 Nick Clifton <nickc@cygnus.com>
- * binutils-all/objcopy.exp: Expect simple objcopy test for fail
+ * binutils-all/objcopy.exp: Expect simple objcopy test to fail
for COFF based ARM and Thumb ports.
Tue Sep 14 00:28:17 1999 Jeffrey A Law (law@cygnus.com)
@@ -35,7 +154,7 @@ Sat Aug 28 00:24:27 1999 Jerry Quinn <jquinn@nortelnetworks.com>
1999-06-29 Nick Clifton <nickc@cygnus.com>
* binutils-all/objdump.exp: Add fr30 and MCore to expected cpus
- list.
+ list.
* binutils-all/readelf.r: Do not assume a fixed number of spaces
in the output.
@@ -56,13 +175,13 @@ Wed Jun 9 11:59:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1999-03-12 Nick Clifton <nickc@cygnus.com>
- * binutils-all/readelf.wi: Remove FR30 specific componnts.
+ * binutils-all/readelf.wi: Remove FR30 specific components.
* binutils-all/readelf.s: Remove RELA specific components.
1999-02-16 Nick Clifton <nickc@cygnus.com>
* binutils-all/readelf.s: Do not assume section alignment is 4.
- * binutils-all/readelf.r: Do not assume rela's are being used.
+ * binutils-all/readelf.r: Do not assume rela's are being used.
* binutils-all/readelf.exp: disable tests for non ELF based
targets.
@@ -127,30 +246,30 @@ Fri May 29 14:50:24 1998 Ian Lance Taylor <ian@cygnus.com>
Thu Nov 6 14:32:37 1997 Bob Manson <manson@charmed.cygnus.com>
* lib/utils-lib.exp: Temporary definition of target_assemble and
- default_target_assemble so that testing can work with older
- dejagnu versions.
+ default_target_assemble so that testing can work with older
+ dejagnu versions.
Wed Sep 24 12:09:15 1997 Bob Manson <manson@charmed.cygnus.com>
* binutils-all/objcopy.exp(strip_executable): Make a new copy of
- the executable being tested.
+ the executable being tested.
Mon Sep 15 21:25:20 1997 Bob Manson <manson@charmed.cygnus.com>
* binutils-all/objcopy.exp: Compile the executables to be tested
- on the target with a status wrapper (as necessary).
+ on the target with a status wrapper (as necessary).
* binutils-all/ar.exp: If testing on a remote host, don't bother
- looking on the local host for the program being tested. Use the
- correct filenames on the remote host.
+ looking on the local host for the program being tested. Use the
+ correct filenames on the remote host.
* binutils-all/nm.exp: Ditto.
* binutils-all/size.exp: Ditto.
* binutils-all/objdump.exp: Ditto.
- (cpus_expected): Add the target CPU to the regexp of CPUs to be
- expected, if it's not already there.
+ (cpus_expected): Add the target CPU to the regexp of CPUs to be
+ expected, if it's not already there.
Thu Aug 28 09:57:27 1997 Doug Evans <dje@canuck.cygnus.com>
@@ -165,7 +284,7 @@ Tue Jun 3 17:12:54 1997 Bob Manson <manson@charmed.cygnus.com>
* config/default.exp: Remove expect_before statement.
* binutils-all/objcopy.exp: Don't use global exec_output variable;
- the output is returned from remote_load instead.
+ the output is returned from remote_load instead.
Mon May 12 22:14:20 1997 Bob Manson <manson@charmed.cygnus.com>
@@ -179,14 +298,14 @@ Mon May 12 22:14:20 1997 Bob Manson <manson@charmed.cygnus.com>
Wed Apr 30 20:37:51 1997 Bob Manson <manson@charmed.cygnus.com>
Changes to support multilib and remote hosted testing, along with
- general cleanups and simplifications.
+ general cleanups and simplifications.
* lib/utils-lib.exp(binutil_version): Use remote_exec.
(default_binutils_run): Ditto.
(default_binutils_assemble): Remove first argument; call
- target_compile to actually do the assembly.
+ target_compile to actually do the assembly.
(default_binutils_compile,default_binutils_remove,prune_warnings):
- Delete.
+ Delete.
* config/default.exp: Remove AS and ASFLAGS.
(binutils_compile,binutils_remove): Delete.
@@ -225,7 +344,7 @@ Wed Jan 29 00:16:43 1997 Bob Manson <manson@charmed.cygnus.com>
* binutils-all/objdump.exp: Ditto.
* binutils-all/size.exp: Ditto.
* binutils-all/hppa/objdump.exp: Ditto.
-
+
Wed Oct 16 22:57:59 1996 Jeffrey A Law (law@cygnus.com)
@@ -602,9 +721,9 @@ Fri Jul 2 12:41:20 1993 Ian Lance Taylor (ian@cygnus.com)
* binutils.all/*.exp: Use -- for long arguments rather than +.
-Fri Jun 4 10:52:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+Fri Jun 4 10:52:29 1993 david d `zoo' zuhn (zoo@cirdan.cygnus.com)
- * configure.in: change srctrigger to Makefile.in
+ * configure.in: change srctrigger to Makefile.in
Wed May 26 17:27:46 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -625,9 +744,9 @@ Thu Mar 25 05:38:47 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
Mon Feb 22 07:54:03 1993 Mike Werner (mtw@poseidon.cygnus.com)
- * binutils/testsuite: made modifications to testcases, etc., to allow
- them to work properly given the reorganization of deja-gnu and the
- relocation of the testcases from deja-gnu to a "tool" subdirectory.
+ * binutils/testsuite: made modifications to testcases, etc., to allow
+ them to work properly given the reorganization of deja-gnu and the
+ relocation of the testcases from deja-gnu to a "tool" subdirectory.
Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com)
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/ar.exp b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/ar.exp
index 4b38c6b066e..bbd03aba938 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/ar.exp
+++ b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/ar.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+# Copyright 1995, 1997 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/hppa/objdump.exp b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/hppa/objdump.exp
index 2e2155ed6d9..859b82701f8 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/hppa/objdump.exp
+++ b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/hppa/objdump.exp
@@ -1,4 +1,5 @@
-# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+# Copyright 1993, 1994, 1995, 1997, 1999, 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
@@ -29,6 +30,11 @@ if [istarget hppa*w-*-*] then {
return
}
+# elf hppa assembler doesn't support .subspa
+if {[istarget *-*-*elf*] || [istarget *-*-linux*]} then {
+ return
+}
+
if {[which $OBJDUMP] == 0} then {
perror "$OBJDUMP does not exist"
return
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/nm.exp b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/nm.exp
index 76c7c5f38c9..8069eda608e 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/nm.exp
+++ b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/nm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+# Copyright 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objcopy.exp b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objcopy.exp
index 1c40e0a6682..972013d8aa5 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objcopy.exp
+++ b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objcopy.exp
@@ -1,4 +1,5 @@
-# Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -72,7 +73,7 @@ if ![string match "" $got] then {
setup_xfail "sh-*-coff" "sh-*-hms"
setup_xfail "m68*-*-hpux*" "m68*-*-sunos*" "m68*-*-coff" "m68*-*-vxworks*"
setup_xfail "m68*-ericsson-ose" "m68k*-motorola-sysv*"
- setup_xfail "i*86-*-linuxaout*" "i*86-*-aout*"
+ setup_xfail "i*86-*-aout*"
setup_xfail "i*86-*-sysv3" "i*86-*-isc*" "i*86-*-sco*" "i*86-*-coff"
setup_xfail "i*86-*-aix*" "i*86-*-go32*" "i*86-*-msdos*"
setup_xfail "a29k-*-udi" "a29k-*-coff" "a29k-*-vxworks*"
@@ -80,7 +81,7 @@ if ![string match "" $got] then {
setup_xfail "h8300-*-hms" "h8300-*-coff"
setup_xfail "h8500-*-hms" "h8500-*-coff"
setup_xfail "hppa*-*-*"
- clear_xfail "hppa*-*-*elf*"
+ clear_xfail "hppa*-*-*elf*" "hppa*-*-linux*"
setup_xfail "m88*-*-coff" "m88*-motorola-sysv*"
setup_xfail "z8*-*-coff"
@@ -398,6 +399,7 @@ strip_test_with_saving_a_symbol
proc copy_setup { } {
global srcdir
global subdir
+ global gcc_gas_flag
set res [build_wrapper testglue.o];
set flags { debug };
@@ -409,6 +411,11 @@ proc copy_setup { } {
set add_libs "";
}
+ if { [istarget *-*-linux*] } {
+ foreach i $gcc_gas_flag {
+ set flags "additional_flags=$i $flags"
+ }
+ }
if { [target_compile "$srcdir/$subdir/testprog.c $add_libs" tmpdir/testprog executable $flags] != "" } {
return 2
}
@@ -473,7 +480,7 @@ proc copy_executable { prog flags test1 test2 } {
# mips_elf_sym_is_global.
setup_xfail "mips*-*-elf"
- setup_xfail "arm*-*-coff"
+ setup_xfail "*arm*-*-coff"
setup_xfail "arm*-*-pe"
setup_xfail "thumb*-*-coff"
setup_xfail "thumb*-*-pe"
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objdump.exp b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objdump.exp
index 89040fc2e97..d2bd46c4056 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objdump.exp
+++ b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/objdump.exp
@@ -1,4 +1,5 @@
-# Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 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
@@ -33,14 +34,23 @@ send_user "Version [binutil_version $OBJDUMP]"
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -i"]
-set cpus_expected "(a29k|alliant|alpha|arc|arm|convex|d10v|d30v|fr30|h8|hppa|i386|i860|i960|m32r|m68k|m88k|MCore|mips|mn10200|mn10300|ns32k|pj|powerpc|pyramid|romp|rs6000|sh|sparc|tahoe|v850|vax|we32k|z8k|z8001|z8002)"
+set cpus_expected [list]
+lappend cpus_expected a29k alliant alpha arc arm convex
+lappend cpus_expected d10v d30v fr30 h8 hppa i386 i860 i960
+lappend cpus_expected m32r m68hc11 m68hc12 m68k m88k MCore
+lappend cpus_expected mips mn10200 mn10300 ns32k pj powerpc pyramid
+lappend cpus_expected romp rs6000 sh sparc tahoe tic54x tms320c54x v850
+lappend cpus_expected vax we32k z8k z8001 z8002
# Make sure the target CPU shows up in the list.
-if ![regexp $cpus_expected $target_cpu] {
- regsub "^\[(\]" "$cpus_expected" "(${target_cpu}|" cpus_expected;
-}
+lappend cpus_expected ${target_cpu}
+
+# Create regexp
+set cpus_regex "([join $cpus_expected | ])"
-set want "BFD header file version.*srec\[^\n\]*\n\[^\n\]*header \[^\n\]*endian\[^\n\]*, data \[^\n\]*endian.*$cpus_expected"
+verbose -log "CPU regex: $cpus_regex"
+
+set want "BFD header file version.*srec\[^\n\]*\n\[^\n\]*header \[^\n\]*endian\[^\n\]*, data \[^\n\]*endian.*$cpus_regex"
if [regexp $want $got] then {
pass "objdump -i"
@@ -64,7 +74,7 @@ if [is_remote host] {
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f $testfile"]
-set want "$testfile:\[ \]*file format.*architecture:\[ \]*${cpus_expected}.*HAS_RELOC.*HAS_SYMS"
+set want "$testfile:\[ \]*file format.*architecture:\[ \]*${cpus_regex}.*HAS_RELOC.*HAS_SYMS"
if ![regexp $want $got] then {
fail "objdump -f"
@@ -83,7 +93,14 @@ if ![regexp $want $got all text_name text_size data_name data_size] then {
} else {
verbose "text name is $text_name size is $text_size"
verbose "data name is $data_name size is $data_size"
- if {[expr "0x$text_size"] < 8 || [expr "0x$data_size"] < 4} then {
+ set ets 8
+ set eds 4
+ # c54x section sizes are in bytes, not octets; adjust accordingly
+ if [istarget *c54x*-*-*] then {
+ set ets 4
+ set eds 2
+ }
+ if {[expr "0x$text_size"] < $ets || [expr "0x$data_size"] < $eds} then {
send_log "sizes too small\n"
fail "objdump -h"
} else {
@@ -126,7 +143,7 @@ if [regexp $want $got] then {
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -s $testfile"]
-set want "$testfile:\[ \]*file format.*Contents.*(text|TEXT|\\\$CODE\\\$)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000001|01000000).*Contents.*(data|DATA)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000002|02000000)"
+set want "$testfile:\[ \]*file format.*Contents.*(text|TEXT|\\\$CODE\\\$)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000001|01000000|00000100).*Contents.*(data|DATA)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000002|02000000|00000200)"
if [regexp $want $got] then {
pass "objdump -s"
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/size.exp b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/size.exp
index b908c9198bf..b91ba23c28d 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/size.exp
+++ b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/size.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+# Copyright 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/testprog.c b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/testprog.c
index c2b1856dedd..57de4610a60 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/testprog.c
+++ b/gnu/usr.bin/binutils/binutils/testsuite/binutils-all/testprog.c
@@ -1,6 +1,7 @@
/* This program is used to test objcopy and strip. */
#include <stdio.h>
+#include <string.h>
int common;
int global = 1;
@@ -22,9 +23,9 @@ main ()
|| strcmp (string, "string") != 0)
{
printf ("failed\n");
- exit (1);
+ return (1);
}
printf ("ok\n");
- exit (0);
+ return (0);
}
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/config/default.exp b/gnu/usr.bin/binutils/binutils/testsuite/config/default.exp
index 2a2802e3a14..56acd9542e3 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/config/default.exp
+++ b/gnu/usr.bin/binutils/binutils/testsuite/config/default.exp
@@ -1,4 +1,5 @@
-# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+# Copyright 1993, 1994, 1995, 1997, 1999, 2001
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -70,6 +71,20 @@ if ![info exists READELFFLAGS] then {
if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
+# Make a symlink from tmpdir/gas/as and tmpdir/gas/ld to the assembler
+# and linker in the build tree, so that we can use a -B option to gcc
+# to force it to use the newly built assembler/linker.
+if {![file isdirectory tmpdir/gas]} then {
+ catch "exec mkdir tmpdir/gas" status
+ if {[file isfile ../gas/as-new]} then {
+ catch "exec ln -s ../../../gas/as-new tmpdir/gas/as" status
+ }
+ if {[file isfile ../ld/ld-new]} then {
+ catch "exec ln -s ../../../ld/ld-new tmpdir/gas/ld" status
+ }
+}
+set gcc_gas_flag "-B[pwd]/tmpdir/gas/"
+
#
# binutils_run
# run a program, returning the output
diff --git a/gnu/usr.bin/binutils/binutils/testsuite/lib/utils-lib.exp b/gnu/usr.bin/binutils/binutils/testsuite/lib/utils-lib.exp
index e27f21710c9..e43019cb388 100644
--- a/gnu/usr.bin/binutils/binutils/testsuite/lib/utils-lib.exp
+++ b/gnu/usr.bin/binutils/binutils/testsuite/lib/utils-lib.exp
@@ -1,4 +1,5 @@
-# Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
+# Copyright 1993, 1994, 1995, 1996, 1997, 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
@@ -90,10 +91,11 @@ proc default_binutils_assemble { source object } {
# This is a hack in that it won't scale well if other targets need
# similar transformations to assemble. We'll generalize the hack
# if/when other targets need similar handling.
- if [istarget "hppa*-*-*" ] then {
- send_log "sed -f $srcdir/config/hppa.sed < $source > asm.s\n"
- verbose "sed -f $srcdir/config/hppa.sed < $source > asm.s"
- catch "exec sed -f $srcdir/config/hppa.sed < $source > asm.s";
+ if { [istarget "hppa*-*-*"] && ![istarget "*-*-linux*" ] } then {
+ set sed_file $srcdir/config/hppa.sed
+ send_log "sed -f $sed_file < $source > asm.s\n"
+ verbose "sed -f $sed_file < $source > asm.s"
+ catch "exec sed -f $sed_file < $source > asm.s";
set source asm.s
}
diff --git a/gnu/usr.bin/binutils/binutils/version.c b/gnu/usr.bin/binutils/binutils/version.c
index cb893cf9837..5a4aefe84a6 100644
--- a/gnu/usr.bin/binutils/binutils/version.c
+++ b/gnu/usr.bin/binutils/binutils/version.c
@@ -1,5 +1,6 @@
/* version.c -- binutils version information
- Copyright 1991, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -36,7 +37,7 @@ print_version (name)
/* This output is intended to follow the GNU standards document. */
/* xgettext:c-format */
printf ("GNU %s %s\n", name, program_version);
- printf (_("Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 1997, 98, 99, 2000, 2001 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
diff --git a/gnu/usr.bin/binutils/binutils/wrstabs.c b/gnu/usr.bin/binutils/binutils/wrstabs.c
index c74af2ee72a..0b29511b115 100644
--- a/gnu/usr.bin/binutils/binutils/wrstabs.c
+++ b/gnu/usr.bin/binutils/binutils/wrstabs.c
@@ -1,5 +1,5 @@
/* wrstabs.c -- Output stabs debugging information
- Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
diff --git a/gnu/usr.bin/binutils/config-ml.in b/gnu/usr.bin/binutils/config-ml.in
index 503f7cf1a18..c968bf0d719 100644
--- a/gnu/usr.bin/binutils/config-ml.in
+++ b/gnu/usr.bin/binutils/config-ml.in
@@ -280,6 +280,17 @@ arm-*-*)
esac
done
fi
+ if [ x"$enable_nofmult" = xno ]
+ then
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *nofmult* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
;;
m68*-*-*)
if [ x$enable_softfloat = xno ]
@@ -362,6 +373,28 @@ mips*-*-*)
esac
done
fi
+ case " $multidirs " in
+ *" mabi=64 "*)
+ # We will not be able to create libraries with -mabi=64 if
+ # we cannot even link a trivial program. It usually
+ # indicates the 64bit libraries are missing.
+ if echo 'main() {}' > conftest.c &&
+ ${CC-gcc} -mabi=64 conftest.c -o conftest; then
+ :
+ else
+ echo Could not link program with -mabi=64, disabling it.
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *mabi=64* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ rm -f conftest.c conftest
+ ;;
+ esac
;;
powerpc*-*-* | rs6000*-*-*)
if [ x$enable_softfloat = xno ]
@@ -442,6 +475,30 @@ powerpc*-*-* | rs6000*-*-*)
done
fi
;;
+sparc*-*-*)
+ case " $multidirs " in
+ *" m64 "*)
+ # We will not be able to create libraries with -m64 if
+ # we cannot even link a trivial program. It usually
+ # indicates the 64bit libraries are missing.
+ if echo 'main() {}' > conftest.c &&
+ ${CC-gcc} -m64 conftest.c -o conftest; then
+ :
+ else
+ echo Could not link program with -m64, disabling it.
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *m64* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ rm -f conftest.c conftest
+ ;;
+ esac
+ ;;
esac
# Remove extraneous blanks from multidirs.
@@ -472,6 +529,8 @@ multi-do:
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(CFLAGS) $${flags}" \
+ prefix="$(prefix)" \
+ exec_prefix="$(exec_prefix)" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
@@ -615,7 +674,24 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
echo "pwd: `pwd`"
fi
- if [ -d ${ml_dir} ]; then true; else mkdir ${ml_dir}; fi
+ if [ -d ${ml_dir} ]; then true; else
+ # ``mkdir -p ${ml_dir}'' See also mkinstalldirs.
+ pathcomp=""
+ for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
+ fi
+ if test ! -d "$pathcomp"; then
+ exit $lasterr
+ fi
+ pathcomp="$pathcomp/"
+ done
+ fi
if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi
# Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../
@@ -666,9 +742,86 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
cd ${ml_dir}/${ml_libdir}
if [ -f ${ml_newsrcdir}/configure ]; then
- ml_recprog=${ml_newsrcdir}/configure
+ ml_recprog="${ml_newsrcdir}/configure --cache-file=../config.cache"
fi
- if eval ${ml_config_shell} ${ml_recprog} \
+
+ # find compiler flag corresponding to ${ml_dir}
+ for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
+ dir=`echo $i | sed -e 's/;.*$//'`
+ if [ "${dir}" = "${ml_dir}" ]; then
+ flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`
+ break
+ fi
+ done
+ ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags"'
+
+ if [ "${with_target_subdir}" = "." ]; then
+ CC_=$CC' '
+ CXX_=$CXX' '
+ else
+ # Create a regular expression that matches any string as long
+ # as ML_POPDIR.
+ popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'`
+ CC_=
+ for arg in ${CC}; do
+ case $arg in
+ -[BIL]"${ML_POPDIR}"/*)
+ CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;;
+ "${ML_POPDIR}"/*)
+ CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ *)
+ CC_="${CC_}${arg} " ;;
+ esac
+ done
+
+ CXX_=
+ for arg in ${CXX}; do
+ case $arg in
+ -[BIL]"${ML_POPDIR}"/*)
+ CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ "${ML_POPDIR}"/*)
+ CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ *)
+ CXX_="${CXX_}${arg} " ;;
+ esac
+ done
+
+ if test "x${LD_LIBRARY_PATH+set}" = xset; then
+ LD_LIBRARY_PATH_=
+ for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
+ case "$arg" in
+ "${ML_POPDIR}"/*)
+ arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`
+ ;;
+ esac
+ if test "x$LD_LIBRARY_PATH_" != x; then
+ LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg
+ else
+ LD_LIBRARY_PATH_=$arg
+ fi
+ done
+ ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_"
+ fi
+
+ if test "x${SHLIB_PATH+set}" = xset; then
+ SHLIB_PATH_=
+ for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do
+ case "$arg" in
+ "${ML_POPDIR}"/*)
+ arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`
+ ;;
+ esac
+ if test "x$SHLIB_PATH_" != x; then
+ SHLIB_PATH_=$SHLIB_PATH_:$arg
+ else
+ SHLIB_PATH_=$arg
+ fi
+ done
+ ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_"
+ fi
+ fi
+
+ if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
${ml_arguments} ${ml_srcdiroption} ; then
true
diff --git a/gnu/usr.bin/binutils/config.guess b/gnu/usr.bin/binutils/config.guess
index 331990284ef..751486443ba 100644
--- a/gnu/usr.bin/binutils/config.guess
+++ b/gnu/usr.bin/binutils/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
-version='2000-09-05'
+timestamp='2001-03-16'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -32,30 +32,41 @@ version='2000-09-05'
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
+# don't specify an explicit build system type.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
-Output the configuration name of this system.
+Output the configuration name of the system \`$me' is run on.
Operation modes:
- -h, --help print this help, then exit
- -V, --version print version number, then exit"
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
- case "$1" in
- --version | --vers* | -V )
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
@@ -64,9 +75,7 @@ while test $# -gt 0 ; do
- ) # Use stdin as input.
break ;;
-* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
+ echo "$me: invalid option $1$help" >&2
exit 1 ;;
* )
break ;;
@@ -78,19 +87,30 @@ if test $# != 0; then
exit 1
fi
-# Use $HOST_CC if defined. $CC may point to a cross-compiler
-if test x"$CC_FOR_BUILD" = x; then
- if test x"$HOST_CC" != x; then
- CC_FOR_BUILD="$HOST_CC"
- else
- if test x"$CC" != x; then
- CC_FOR_BUILD="$CC"
- else
- CC_FOR_BUILD=cc
- fi
- fi
-fi
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int dummy(){}" > $dummy.c
+ for c in cc gcc c89 ; do
+ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
+ if test $? = 0 ; then
+ CC_FOR_BUILD="$c"; break
+ fi
+ done
+ rm -f $dummy.c $dummy.o $dummy.rel
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
@@ -100,12 +120,9 @@ fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
-
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -129,16 +146,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ibmrt|romp-ibm) machine=romp-ibm ;;
*) machine=${UNAME_MACHINE}-unknown ;;
esac
- # The Operating System including object format.
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE}" in
+ i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
# The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
@@ -247,7 +272,7 @@ EOF
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
- SR2?01:HI-UX/MPP:*:*)
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
@@ -389,7 +414,7 @@ EOF
EOF
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm $dummy.c $dummy && exit 0
+ && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
@@ -443,6 +468,14 @@ EOF
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >$dummy.c
@@ -456,7 +489,7 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
@@ -465,9 +498,9 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
- *:AIX:*:4)
+ *:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
- if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -475,7 +508,7 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=4.${UNAME_RELEASE}
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
@@ -501,10 +534,28 @@ EOF
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
+ case "${HPUX_REV}" in
+ 11.[0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ esac ;;
+ esac
+ fi ;;
+ esac
+ if [ "${HP_ARCH}" = "" ]; then
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
@@ -539,11 +590,16 @@ EOF
}
EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
+ fi ;;
esac
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
@@ -570,7 +626,7 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
@@ -634,23 +690,24 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY*T3E:*:*:*)
+ CRAY*T3D:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
- F300:UNIX_System_V:*:*)
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
- F301:UNIX_System_V:*:*)
- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
- exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -699,57 +756,38 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
- *:Linux:*:*)
-
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- ld_help_string=`cd /; ld --help 2>&1`
- ld_supported_emulations=`echo $ld_help_string \
- | sed -ne '/supported emulations:/!d
- s/[ ][ ]*/ /g
- s/.*supported emulations: *//
- s/ .*//
- p'`
- case "$ld_supported_emulations" in
- *ia64)
- echo "${UNAME_MACHINE}-unknown-linux"
- exit 0
- ;;
- i?86linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0
- ;;
- elf_i?86)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- i?86coff)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0
- ;;
- sparclinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- armlinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32arm*)
- echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
- exit 0
- ;;
- armelf_linux*)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
- exit 0
- ;;
- m68klinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32ppc | elf32ppclinux)
- # Determine Lib Version
- cat >$dummy.c <<EOF
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+int main (int argc, char *argv[]) {
+#else
+int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ ;;
+ ppc:Linux:*:*)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
#include <features.h>
#if defined(__GLIBC__)
extern char __libc_version[];
@@ -762,129 +800,127 @@ main(argc, argv)
#if defined(__GLIBC__)
printf("%s %s\n", __libc_version, __libc_release);
#else
- printf("unkown\n");
+ printf("unknown\n");
#endif
return 0;
}
EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ alpha:Linux:*:*)
+ cat <<EOF >$dummy.s
+ .data
+ \$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+ .text
+ .globl main
+ .align 4
+ .ent main
+ main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `./$dummy` in
+ 0-0) UNAME_MACHINE="alpha" ;;
+ 1-0) UNAME_MACHINE="alphaev5" ;;
+ 1-1) UNAME_MACHINE="alphaev56" ;;
+ 1-101) UNAME_MACHINE="alphapca56" ;;
+ 2-303) UNAME_MACHINE="alphaev6" ;;
+ 2-307) UNAME_MACHINE="alphaev67" ;;
+ esac
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
- ./$dummy | grep 1\.99 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
+ LIBC="libc1"
fi
- rm -f $dummy.c $dummy
- echo powerpc-unknown-linux-gnu${LIBC}
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ i?86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_supported_emulations=`cd /; ld --help 2>&1 \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ i?86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
- shelf_linux)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ elf_i?86)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ i?86coff)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0
;;
esac
-
- if test "${UNAME_MACHINE}" = "alpha" ; then
- cat <<EOF >$dummy.s
- .data
- \$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
- main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- esac
-
- objdump --private-headers $dummy | \
- grep ld.so.1 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
- fi
- rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
- elif test "${UNAME_MACHINE}" = "mips" ; then
- cat >$dummy.c <<EOF
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __MIPSEB__
- printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
- printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
- return 0;
-}
-EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- elif test "${UNAME_MACHINE}" = "s390"; then
- echo s390-ibm-linux && exit 0
- elif test "${UNAME_MACHINE}" = "x86_64"; then
- echo x86_64-unknown-linux-gnu && exit 0
- else
- # Either a pre-BFD a.out linker (linux-gnuoldld)
- # or one that does not give us useful --help.
- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
- # If ld does not provide *any* "supported emulations:"
- # that means it is gnuoldld.
- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-
- case "${UNAME_MACHINE}" in
- i?86)
- VENDOR=pc;
- ;;
- *)
- VENDOR=unknown;
- ;;
- esac
- # Determine whether the default compiler is a.out or elf
- cat >$dummy.c <<EOF
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@@ -908,10 +944,10 @@ EOF
return 0;
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
- fi ;;
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i?86:DYNIX/ptx:4*:*)
@@ -988,7 +1024,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1011,9 +1047,12 @@ EOF
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
@@ -1093,6 +1132,9 @@ EOF
NSR-[KW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit 0 ;;
@@ -1110,6 +1152,29 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
+ i?86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1201,11 +1266,24 @@ main ()
#endif
#if defined (vax)
-#if !defined (ultrix)
- printf ("vax-dec-bsd\n"); exit (0);
-#else
- printf ("vax-dec-ultrix\n"); exit (0);
-#endif
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
#endif
#if defined (alliant) && defined (i860)
@@ -1216,7 +1294,7 @@ main ()
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
# Apollos put the system type in the environment.
@@ -1252,8 +1330,9 @@ fi
cat >&2 <<EOF
$0: unable to guess system type
-The $version version of this script cannot recognize your system type.
-Please download the most up to date version of the config scripts:
+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/
@@ -1262,7 +1341,7 @@ send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
-config.guess version = $version
+config.guess timestamp = $timestamp
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
@@ -1289,7 +1368,7 @@ exit 1
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "version='"
+# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
diff --git a/gnu/usr.bin/binutils/config.sub b/gnu/usr.bin/binutils/config.sub
index 42fc991d08a..7146a2ffc1c 100644
--- a/gnu/usr.bin/binutils/config.sub
+++ b/gnu/usr.bin/binutils/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
-version='2000-09-11'
+timestamp='2001-03-19'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -60,16 +60,30 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS
Canonicalize a configuration name.
Operation modes:
- -h, --help print this help, then exit
- -V, --version print version number, then exit"
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
- case "$1" in
- --version | --vers* | -V )
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
@@ -78,9 +92,7 @@ while test $# -gt 0 ; do
- ) # Use stdin as input.
break ;;
-* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
+ echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
@@ -105,7 +117,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu*)
+ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -203,22 +215,25 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
- | arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
+ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
+ | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
- | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
+ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | sh[34] \
| powerpc | powerpcle \
- | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+ | 1750a | dsp16xx | pdp10 | pdp11 \
+ | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
- | mips64vr5000 | miprs64vr5000el | mcore \
+ | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
- | thumb | d10v | d30v | fr30 | avr)
+ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
+ | pj | pjl | h8500)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
@@ -226,7 +241,7 @@ case $basic_machine in
basic_machine=$basic_machine-unknown
os=-none
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
;;
# We use `pc' rather than `unknown'
@@ -243,26 +258,28 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
# FIXME: clean up the formatting here.
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
+ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| xmp-* | ymp-* \
- | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
+ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
| hppa2.0n-* | hppa64-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
| alphaev6[78]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
- | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
+ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
+ | [cjt]90-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
- | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
- | bs2000-* | tic54x-* | c54x-* | x86_64-*)
+ | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
+ | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -353,8 +370,8 @@ case $basic_machine in
basic_machine=cray2-cray
os=-unicos
;;
- [ctj]90-cray)
- basic_machine=c90-cray
+ [cjt]90)
+ basic_machine=${basic_machine}-cray
os=-unicos
;;
crds | unos)
@@ -410,6 +427,10 @@ case $basic_machine in
basic_machine=tron-gmicro
os=-sysv
;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
@@ -509,18 +530,6 @@ case $basic_machine in
basic_machine=i386-unknown
os=-vsta
;;
- i386-go32 | go32)
- basic_machine=i386-unknown
- os=-go32
- ;;
- i386-mingw32 | mingw32)
- basic_machine=i386-unknown
- os=-mingw32
- ;;
- i[34567]86-pw32 | pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@@ -546,6 +555,10 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -576,7 +589,7 @@ case $basic_machine in
os=-coff
;;
msdos)
- basic_machine=i386-unknown
+ basic_machine=i386-pc
os=-msdos
;;
mvs)
@@ -640,6 +653,10 @@ case $basic_machine in
basic_machine=i960-intel
os=-mon960
;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
np1)
basic_machine=np1-gould
;;
@@ -675,28 +692,28 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5 | k5 | k6 | nexen)
+ pentium | p5 | k5 | k6 | nexgen)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
basic_machine=i686-pc
;;
pentiumii | pentium2)
- basic_machine=i786-pc
+ basic_machine=i686-pc
;;
- pentium-* | p5-* | k5-* | k6-* | nexen-*)
+ pentium-* | p5-* | k5-* | k6-* | nexgen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
- power) basic_machine=rs6000-ibm
+ power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
@@ -711,6 +728,10 @@ case $basic_machine in
ps2)
basic_machine=i386-ibm
;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -901,6 +922,10 @@ case $basic_machine in
vax)
basic_machine=vax-dec
;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
pdp11)
basic_machine=pdp11-dec
;;
@@ -908,7 +933,7 @@ case $basic_machine in
basic_machine=we32k-att
;;
sh3 | sh4)
- base_machine=sh-unknown
+ basic_machine=sh-unknown
;;
sparc | sparcv9)
basic_machine=sparc-sun
@@ -991,7 +1016,8 @@ case $os in
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32*)
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1089,7 +1115,7 @@ case $os in
-xenix)
os=-xenix
;;
- -*mint | -*MiNT)
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-none)
@@ -1123,6 +1149,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
+ pdp10-*)
+ os=-tops20
+ ;;
pdp11-*)
os=-none
;;
@@ -1231,7 +1260,7 @@ case $basic_machine in
*-masscomp)
os=-rtu
;;
- f301-fujitsu)
+ f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
@@ -1309,7 +1338,7 @@ case $basic_machine in
-mpw* | -macos*)
vendor=apple
;;
- -*mint | -*MiNT)
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
esac
@@ -1322,7 +1351,7 @@ exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "version='"
+# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
diff --git a/gnu/usr.bin/binutils/config/ChangeLog b/gnu/usr.bin/binutils/config/ChangeLog
index b5746b102f5..920ab3226a8 100644
--- a/gnu/usr.bin/binutils/config/ChangeLog
+++ b/gnu/usr.bin/binutils/config/ChangeLog
@@ -1,3 +1,16 @@
+Fri Jul 14 18:13:23 2000 Mark P Mitchell <mark@codesourcery.com>
+
+ * mh-irix6 (CC): Don't set it.
+
+2000-06-21 Branko Cibej <branko.cibej@hermes.si>
+
+ * mh-sparcpic: Use single instead of double quotes.
+ * mt-sparcpic: Likewise.
+
+2000-06-19 Syd Polk <spolk@redhat.com>
+
+ * acinclude.m4: Updated for Incr Tcl 3.0.
+
2000-02-23 Linas Vepstas <linas@linas.org>
* mh-i370pic: New file.
@@ -12,6 +25,10 @@
* mh-aix43: Delete, move to mt-aix43.
* mt-aix43: New file.
+Tue Sep 7 23:31:01 1999 Linas Vepstas <linas@linas.org>
+
+ * mh-openedition: New file.
+
1999-04-07 Michael Meissner <meissner@cygnus.com>
* mt-d30v: New file, pass -g -Os -Wa,-C as default options.
diff --git a/gnu/usr.bin/binutils/config/mh-sparcpic b/gnu/usr.bin/binutils/config/mh-sparcpic
index f6dbc22e3ca..e218bb48aa4 100644
--- a/gnu/usr.bin/binutils/config/mh-sparcpic
+++ b/gnu/usr.bin/binutils/config/mh-sparcpic
@@ -1 +1 @@
-PICFLAG=`case "${LIBCFLAGS} ${LIBCXXFLAGS}" in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac`
+PICFLAG=`case '${LIBCFLAGS} ${LIBCXXFLAGS}' in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac`
diff --git a/gnu/usr.bin/binutils/config/mt-sparcpic b/gnu/usr.bin/binutils/config/mt-sparcpic
index fd0ec271afc..a62b38bd9c1 100644
--- a/gnu/usr.bin/binutils/config/mt-sparcpic
+++ b/gnu/usr.bin/binutils/config/mt-sparcpic
@@ -1 +1 @@
-PICFLAG_FOR_TARGET=`case "${LIBCFLAGS} ${LIBCXXFLAGS}" in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac`
+PICFLAG_FOR_TARGET=`case '${LIBCFLAGS} ${LIBCXXFLAGS}' in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac`
diff --git a/gnu/usr.bin/binutils/configure b/gnu/usr.bin/binutils/configure
index b45efbc9cae..75d932d779e 100644
--- a/gnu/usr.bin/binutils/configure
+++ b/gnu/usr.bin/binutils/configure
@@ -86,7 +86,7 @@ subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
-version="$Revision: 1.7 $"
+version="$Revision: 1.8 $"
x11=default
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
@@ -237,7 +237,7 @@ do
esac
enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
- eval "$enableopt='$optarg'"
+ eval "$enableopt=\$optarg"
enableoptions="$enableoptions '$option'"
;;
--exec-prefix* | --ex*)
@@ -370,7 +370,7 @@ do
esac
withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
- eval $withopt="$optarg"
+ eval $withopt="\$optarg"
withoptions="$withoptions $option"
;;
--without-*)
@@ -518,7 +518,8 @@ fi
configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
-topsrcdir=`cd \`dirname ${progname}\`; pwd`
+## the sed command below emulates the dirname command
+topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd`
# this is a hack. sun4 must always be a valid host alias or this will fail.
@@ -576,7 +577,6 @@ case "${srcdir}" in
fi
esac
-
# default exec_prefix
case "${exec_prefixoption}" in
"") exec_prefix="\$(prefix)" ;;
@@ -902,9 +902,6 @@ do
test -n "$DEFAULT_LEX" && break
done
-# BINUTILS LOCAL: This is included in the default CFLAGS when using gcc.
-warn_cflags="-W -Wall"
-
if [ "${build}" != "${host}" ]; then
# If we are doing a Canadian Cross, in which the host and build systems
# are not the same, we set reasonable default values for the tools.
@@ -915,9 +912,10 @@ if [ "${build}" != "${host}" ]; then
tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
+ tools="${tools} OBJCOPY OBJDUMP"
for var in ${tools}; do
- if [ -z "`eval 'echo $'"${var}"`" ] && [ -r Makefile ]; then
+ if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
@@ -926,7 +924,7 @@ t loop
< Makefile > Makefile.v
t=`tail -1 Makefile.v`
if [ -n "${t}" ]; then
- eval "${var}='${t}'"
+ eval "${var}=\${t}"
fi
rm -f Makefile.v
fi
@@ -938,7 +936,7 @@ t loop
AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
BISON=${BISON-bison}
CC=${CC-${host_alias}-gcc}
- CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"}
+ CFLAGS=${CFLAGS-"-g -O2"}
CXX=${CXX-${host_alias}-c++}
CXXFLAGS=${CXXFLAGS-"-g -O2"}
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
@@ -958,6 +956,8 @@ t loop
RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
WINDRES=${WINDRES-${host_alias}-windres}
WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
+ OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
+ OBJDUMP=${OBJDUMP-${host_alias}-objdump}
if [ -z "${YACC}" ]; then
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
@@ -1008,6 +1008,8 @@ t loop
export NM
export RANLIB
export WINDRES
+ export OBJCOPY
+ export OBJDUMP
else
# If CC is still not set, try to get gcc.
if [ -z "${CC}" ]; then
@@ -1018,10 +1020,10 @@ else
CC="gcc"
echo 'void f(){}' > conftest.c
if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"}
+ CFLAGS=${CFLAGS-"-g -O2"}
CXXFLAGS=${CXXFLAGS-"-g -O2"}
else
- CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"}
+ CFLAGS=${CFLAGS-"-O2"}
CXXFLAGS=${CXXFLAGS-"-O2"}
fi
rm -f conftest*
@@ -1038,10 +1040,10 @@ else
*gcc)
echo 'void f(){}' > conftest.c
if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"}
+ CFLAGS=${CFLAGS-"-g -O2"}
CXXFLAGS=${CXXFLAGS-"-g -O2"}
else
- CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"}
+ CFLAGS=${CFLAGS-"-O2"}
CXXFLAGS=${CXXFLAGS-"-O2"}
fi
rm -f conftest*
@@ -1411,6 +1413,7 @@ EOF
-e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \
-e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \
-e "s|^tooldir[ ]*=.*$|tooldir = ${tooldir}|" \
+ -e "s|^build_tooldir[ ]*=.*$|build_tooldir = ${tooldir}|" \
-e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
-e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
-e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
@@ -1423,7 +1426,7 @@ EOF
# tools.
if [ "${build}" != "${host}" ]; then
for var in ${tools}; do
- val=`eval 'echo $'"${var}"`
+ eval val=\$${var}
sed -e "/^${var}[ ]*=/{
:loop1
/\\\\$/ N
diff --git a/gnu/usr.bin/binutils/configure.in b/gnu/usr.bin/binutils/configure.in
index 4e4ac8f162d..d586acbb99c 100644
--- a/gnu/usr.bin/binutils/configure.in
+++ b/gnu/usr.bin/binutils/configure.in
@@ -47,10 +47,20 @@ if [ "${enable_gdbgui}" = "yes" ] ; then
host_libs="${host_libs} libgui"
fi
+# Set up configure/Makefile variables if libstdc++-v3 is to be built.
+if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then
+ libstdcxx_version="target-libstdc++-v3"
+ # Don't use libstdc++-v3's flags to configure/build itself.
+ libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs'
+else
+ libstdcxx_version="target-libio target-libstdc++"
+ libstdcxx_flags='-isystem $$s/libstdc++ -isystem $$s/libstdc++/std -isystem $$s/libstdc++/stl -isystem $$s/libio/ -isystem $$s/libio/stdio -L$$r/$(TARGET_SUBDIR)/libstdc++'
+fi
+
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
# know that we are building the simulator.
-host_tools="byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
+host_tools="byacc flex bison binutils ld gas gcc cgen sid sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
@@ -58,10 +68,15 @@ host_tools="byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr
target_libs="target-libiberty \
target-libgloss \
target-newlib \
- target-libio \
- target-librx \
- target-libstdc++ \
- target-libg++"
+ ${libstdcxx_version} \
+ target-libf2c \
+ target-libchill \
+ target-libffi \
+ target-libjava \
+ target-zlib \
+ target-boehm-gc \
+ target-qthreads \
+ target-libobjc"
# these tools are built using the target libs, and are intended to run only
# in the target environment
@@ -154,6 +169,9 @@ case "${host}" in
mips*-*-sysv*)
host_makefile_frag="${host_makefile_frag} config/mh-riscos"
;;
+ i370-ibm-opened*)
+ host_makefile_frag="${host_makefile_frag} config/mh-openedition"
+ ;;
i[3456]86-*-sysv5*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
;;
@@ -291,6 +309,9 @@ if [ x${shared} = xyes ]; then
i370-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-i370pic"
;;
+ ia64-*-*)
+ host_makefile_frag="${host_makefile_frag} config/mh-ia64pic"
+ ;;
sparc64-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-sparcpic"
;;
@@ -524,7 +545,7 @@ case "${host}" in
noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext"
;;
i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
- noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext"
+ noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext libffi"
;;
i[3456]86-*-mingw32*)
# noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv"
@@ -542,18 +563,21 @@ case "${host}" in
ppc*-*-pe)
noconfigdirs="patch diff make tk tcl expect dejagnu cvssrc autoconf automake texinfo bison send-pr gprof rcs guile perl apache inet itcl tix db snavigator gnuserv"
;;
+ powerpc-*-beos*)
+ noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
+ ;;
esac
case "${target}" in
*-*-netware)
- noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-librx target-newlib target-libiberty target-libgloss"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss target-libffi"
;;
*-*-rtems*)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
*-*-vxworks*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
;;
alpha*-dec-osf*)
# ld works, but does not support shared libraries. emacs doesn't
@@ -562,13 +586,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs gas ld emacs fileutils target-newlib target-libgloss"
;;
alpha*-*-*vms*)
- noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss"
- ;;
- alpha*-*-linux*)
- # newlib is not 64 bit ready
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- # linux has rx in libc
- skipdirs="$skipdirs target-librx"
+ noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss target-libffi"
;;
alpha*-*-*)
# newlib is not 64 bit ready
@@ -577,20 +595,20 @@ case "${target}" in
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs target-libjava target-libffi target-zlib"
noconfigdirs="$noconfigdirs target-boehm-gc target-qthreads target-examples"
- noconfigdirs="$noconfigdirs target-librx target-libiberty texinfo send-pr"
+ noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
noconfigdirs="$noconfigdirs expect dejagnu"
# the C++ libraries don't build on top of CE's C libraries
- noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version}"
skipdirs="$skipdirs target-newlib"
case "${host}" in
*-*-cygwin*) ;; # keep gdb and readline
- *) noconfigdirs="$noconfigdirs gdb readline target-libio target-libstdc++ target-libg++"
+ *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
;;
esac
;;
arc-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss"
@@ -608,40 +626,55 @@ case "${target}" in
fi
;;
arm-*-oabi*)
- noconfigdirs="$noconfigdirs target-libgloss"
- ;;
- c4x-*-*)
- noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
thumb-*-coff)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
thumb-*-elf)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
thumb-*-oabi)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
strongarm-*-elf)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
strongarm-*-coff)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
+ xscale-*-elf)
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
+ xscale-*-coff)
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
thumb-*-pe)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
arm-*-riscix*)
- noconfigdirs="$noconfigdirs ld target-libgloss"
+ noconfigdirs="$noconfigdirs ld target-libgloss target-libffi"
+ ;;
+ c4x-*-*)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
+ ;;
+ c54x*-*-* | tic54x-*-*)
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi gcc gdb newlib"
;;
d10v-*-*)
- noconfigdirs="$noconfigdirs target-librx target-libg++ target-libstdc++ target-libio"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
;;
d30v-*-*)
;;
@@ -652,12 +685,13 @@ case "${target}" in
;;
h8300*-*-* | \
h8500-*-*)
- noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
;;
hppa*-*-*elf* | \
hppa*-*-linux-gnu* | \
- hppa*-*-lites*)
- # Do configure ld/binutils/gas for the above cases.
+ hppa*-*-lites* | \
+ hppa*64*-*-*)
+ # Do configure ld/binutils/gas for this case.
;;
hppa*-*-*)
# HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach
@@ -669,6 +703,10 @@ case "${target}" in
esac
noconfigdirs="$noconfigdirs ld shellutils"
;;
+ ia64*-*-elf*)
+ # No gdb support yet.
+ noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
+ ;;
i[3456]86-*-coff | i[3456]86-*-elf)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
@@ -676,11 +714,11 @@ case "${target}" in
;;
i[3456]86-*-go32* | i[3456]-*-msdosdjgpp*)
# but don't build gdb
- noconfigdirs="$noconfigdirs gdb target-libg++ target-libstdc++ target-libio target-librx"
+ noconfigdirs="$noconfigdirs gdb ${libstdcxx_version} target-libffi"
;;
i[3456]86-*-mingw32*)
target_configdirs="$target_configdirs target-mingw"
- noconfigdirs="$noconfigdirs expect target-libgloss"
+ noconfigdirs="$noconfigdirs expect target-libgloss target-libffi"
# Can't build gdb for mingw32 if not native.
case "${host}" in
@@ -691,7 +729,7 @@ case "${target}" in
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-gperf target-libgloss target-libffi"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
@@ -703,15 +741,15 @@ case "${target}" in
esac
;;
i[3456]86-*-pe)
- noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
;;
i[3456]86-*-sco3.2v5*)
# The linker does not yet know about weak symbols in COFF,
# and is not configured to handle mixed ELF and COFF.
- noconfigdirs="$noconfigdirs ld target-libgloss"
+ noconfigdirs="$noconfigdirs ld target-libgloss target-libffi"
;;
i[3456]86-*-sco*)
- noconfigdirs="$noconfigdirs gprof target-libgloss"
+ noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
;;
i[3456]86-*-solaris2*)
noconfigdirs="$noconfigdirs target-libgloss"
@@ -723,12 +761,15 @@ case "${target}" in
*) ;;
esac
# but that's okay since emacs doesn't work anyway
- noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss"
+ noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss target-libffi"
;;
i[3456]86-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
;;
- m68k-*-elf*)
+ m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
+ noconfigdirs="$noconfigdirs target-libiberty target-librx target-libg++ target-libstdc++ target-libio target-libf2c target-libchill target-zlib target-libobjc"
+ ;;
+ m68k-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
@@ -739,13 +780,13 @@ case "${target}" in
fi
;;
mn10200-*-*)
- noconfigdirs="$noconfigdirs"
+ noconfigdirs="$noconfigdirs target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
;;
mn10300-*-*)
- noconfigdirs="$noconfigdirs"
+ noconfigdirs="$noconfigdirs target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
@@ -756,18 +797,21 @@ case "${target}" in
# GNU ld is known to be broken for AIX 4.2 and 4.3 (at least)
# The symptom is that GDBtk 4.18 fails at startup with a segfault
# if linked by GNU ld, but not if linked by the native ld.
- noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss ld"
+ noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss target-libffi ld"
use_gnu_ld=no
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv"
+ noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv target-libffi"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
# This is temporary until we can link against shared libraries
powerpcle-*-solaris*)
- noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv"
+ noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv target-libffi"
+ ;;
+ powerpc-*-beos*)
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
;;
powerpc-*-eabi)
if [ x${is_cross_compiler} != xno ] ; then
@@ -776,22 +820,21 @@ case "${target}" in
;;
rs6000-*-lynxos*)
# The CVS server code doesn't work on the RS/6000
- # Newlib makes problems for libg++ in crosses.
- noconfigdirs="$noconfigdirs target-newlib gprof cvssrc"
+ noconfigdirs="$noconfigdirs target-newlib gprof cvssrc target-libffi"
;;
rs6000-*-aix*)
# The configure and build of ld are currently disabled because
# GNU ld is known to be broken for AIX 4.2 and 4.3 (at least)
# The symptom is that GDBtk 4.18 fails at startup with a segfault
# if linked by GNU ld, but not if linked by the native ld.
- noconfigdirs="$noconfigdirs gprof ld"
+ noconfigdirs="$noconfigdirs gprof target-libffi ld"
use_gnu_ld=no
;;
rs6000-*-*)
- noconfigdirs="$noconfigdirs gprof"
+ noconfigdirs="$noconfigdirs gprof target-libffi"
;;
m68k-apollo-*)
- noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss"
+ noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss target-libffi"
;;
mips*-*-irix5*)
# The GNU linker does not support shared libraries.
@@ -803,28 +846,23 @@ case "${target}" in
# emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss"
;;
- mips*-*-linux*)
- noconfigdirs="$noconfigdirs gprof"
- # linux has rx in libc
- skipdirs="$skipdirs target-librx"
- ;;
mips*-dec-bsd*)
- noconfigdirs="$noconfigdirs gprof target-libgloss"
+ noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
;;
mips*-*-bsd*)
- noconfigdirs="$noconfigdirs gprof target-libgloss"
+ noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
;;
mipstx39-*-*)
- noconfigdirs="$noconfigdirs gprof" # same as generic mips
+ noconfigdirs="$noconfigdirs gprof target-libffi" # same as generic mips
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
;;
mips*-*-openbsd*)
;;
mips*-*-*)
- noconfigdirs="$noconfigdirs gprof"
+ noconfigdirs="$noconfigdirs gprof target-libffi"
;;
romp-*-*)
- noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss"
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss target-libffi"
;;
sh-*-*)
case "${host}" in
@@ -833,7 +871,7 @@ case "${target}" in
i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
*) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
esac
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
sparc-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
@@ -844,11 +882,13 @@ case "${target}" in
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
+ noconfigdirs="target-libffi"
;;
sparclite-*-*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
+ noconfigdirs="target-libffi"
;;
sparc-*-sunos4*)
if [ x${is_cross_compiler} != xno ] ; then
@@ -858,38 +898,34 @@ case "${target}" in
fi
;;
v810-*-*)
- noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libio target-libg++ target-libstdc++ opcodes target-libgloss"
+ noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss target-libffi"
;;
v850-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
v850e-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
v850ea-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
vax-*-vms)
- noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss"
+ noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss target-libffi"
;;
vax-*-openbsd*)
noconfigdirs="$noconfigdirs ld gas gprof"
;;
vax-*-*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
- *-*-linux*)
- # linux has rx in libc
- skipdirs="$skipdirs target-librx"
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
;;
*-*-lynxos*)
- # Newlib makes problems for libg++ in crosses.
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
;;
*-*-macos* | \
*-*-mpw*)
# Macs want a resource compiler.
configdirs="$configdirs grez"
+ noconfigdirs="target-libffi"
;;
esac
@@ -912,6 +948,55 @@ if [ x$with_gnu_as = xno ]; then
noconfigdirs="$noconfigdirs gas"
fi
+# Figure out what language subdirectories are present.
+# Look if the user specified --enable-languages="..."; if not, use
+# the environment variable $LANGUAGES if defined. $LANGUAGES might
+# go away some day.
+if test x"${enable_languages+set}" != xset; then
+ if test x"${LANGUAGES+set}" = xset; then
+ enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
+ else
+ enable_languages=all
+ fi
+else
+ if test x"${enable_languages}" = x; then
+ echo configure.in: --enable-languages needs at least one argument 1>&2
+ exit 1
+ fi
+fi
+subdirs=
+for lang in ${srcdir}/gcc/*/config-lang.in ..
+do
+ case $lang in
+ ..) ;;
+ # The odd quoting in the next line works around
+ # an apparent bug in bash 1.12 on linux.
+ ${srcdir}/gcc/[*]/config-lang.in) ;;
+ *)
+ lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
+ this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
+ build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
+ if test "x$lang_alias" = x
+ then
+ echo "$lang doesn't set \$language." 1>&2
+ exit 1
+ fi
+ case ${build_by_default},${enable_languages}, in
+ *,$lang_alias,*) add_this_lang=yes ;;
+ no,*) add_this_lang=no ;;
+ *,all,*) add_this_lang=yes ;;
+ *) add_this_lang=no ;;
+ esac
+ if test x"${add_this_lang}" = xyes; then
+ eval target_libs='"$target_libs "'\"$this_lang_libs\"
+ else
+ eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs\"
+ fi
+ ;;
+ esac
+done
+
+
# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
# $target_configdirs.
# If we have the source for $noconfigdirs entries, add them to $notsupp.
@@ -1052,6 +1137,12 @@ if [ x${shared} = xyes ]; then
i[3456]86-*)
target_makefile_frag="${target_makefile_frag} config/mt-x86pic"
;;
+ ia64-*)
+ target_makefile_frag="${target_makefile_frag} config/mt-ia64pic"
+ ;;
+ powerpc*-*-aix*)
+ # We don't want -fPIC on AIX.
+ ;;
powerpc*-*)
target_makefile_frag="${target_makefile_frag} config/mt-ppcpic"
;;
@@ -1170,7 +1261,7 @@ fi
# provide a proper gxx_include_dir.
# Note, if you change the default, make sure to fix both here and in
-# the gcc, libio, libstdc++ and libg++ subdirectories.
+# the gcc, libio, and libstdc++ subdirectories.
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
gxx_include_dir=
if test -n "${with_gxx_include_dir}"; then
@@ -1197,9 +1288,113 @@ else
gxx_include_dir=${gxx_include_dir}
fi
-targargs="--host=${target_alias} --build=${build_alias} ${targargs}"
+FLAGS_FOR_TARGET=
+case " $skipdirs " in
+*" target-newlib "*) ;;
+*)
+ case "$target" in
+ *-cygwin*)
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;;
+ esac
+
+ # If we're not building GCC, don't discard standard headers.
+ if test -d ${topsrcdir}/gcc; then
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
+
+ if test "${build}" != "${host}"; then
+ # On Canadian crosses, CC_FOR_TARGET will have already been set
+ # by `configure', so we won't have an opportunity to add -Bgcc/
+ # to it. This is right: we don't want to search that directory
+ # for binaries, but we want the header files in there, so add
+ # them explicitly.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
+
+ # Someone might think of using the pre-installed headers on
+ # Canadian crosses, in case the installed compiler is not fully
+ # compatible with the compiler being built. In this case, it
+ # would be better to flag an error than risking having
+ # incompatible object files being constructed. We can't
+ # guarantee that an error will be flagged, but let's hope the
+ # compiler will do it, when presented with incompatible header
+ # files.
+ fi
+ fi
+
+ # If we're building newlib, use its generic headers last, but search
+ # for any libc-related directories first (so make it the last -B
+ # switch).
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
+ ;;
+esac
+
+# On Canadian crosses, we'll be searching the right directories for
+# the previously-installed cross compiler, so don't bother to add
+# flags for directories within the install tree of the compiler
+# being built; programs in there won't even run.
+if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then
+ # Search for pre-installed headers if nothing else fits.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
+fi
+
+if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno &&
+ echo " ${configdirs} " | grep " ld " > /dev/null &&
+ test -d ${srcdir}/ld; then
+ # Arrange for us to find uninstalled linker scripts.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
+fi
+
+if test "x${CC_FOR_TARGET+set}" = xset; then
+ :
+elif test -d ${topsrcdir}/gcc; then
+ CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
+elif test "$host" = "$target"; then
+ CC_FOR_TARGET='$(CC)'
+else
+ CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
+fi
+# On Canadian crosses, configure reads CC_FOR_TARGET from Makefile,
+# if Makefile exists. Prevent $(FLAGS_FOR_TARGET) from being duplicated.
+case $CC_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
+
+if test "x${CHILL_FOR_TARGET+set}" = xset; then
+ :
+elif test -d ${topsrcdir}/gcc; then
+ CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/'
+elif test "$host" = "$target"; then
+ CHILL_FOR_TARGET='$(CC)'
+else
+ CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
+fi
+case $CHILL_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
+
+if test "x${CXX_FOR_TARGET+set}" = xset; then
+ :
+elif test -d ${topsrcdir}/gcc; then
+ CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
+elif test "$host" = "$target"; then
+ CXX_FOR_TARGET='$(CXX)'
+else
+ CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}`
+fi
+case $CXX_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
+qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'`
+
+targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"
sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
-e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \
+ -e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \
+ -e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \
+ -e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \
+ -e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \
-e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \
-e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
Makefile > Makefile.tem
diff --git a/gnu/usr.bin/binutils/gas/COPYING b/gnu/usr.bin/binutils/gas/COPYING
index 60549be514a..c27986e64cd 100644
--- a/gnu/usr.bin/binutils/gas/COPYING
+++ b/gnu/usr.bin/binutils/gas/COPYING
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ Copyright 1989, 1991, 1997 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/gnu/usr.bin/binutils/gas/ChangeLog b/gnu/usr.bin/binutils/gas/ChangeLog
index ce918a5ed5c..6d9ad983627 100644
--- a/gnu/usr.bin/binutils/gas/ChangeLog
+++ b/gnu/usr.bin/binutils/gas/ChangeLog
@@ -1,5849 +1,5135 @@
-2000-11-02 Theo Honohan <th@futuretv.com>
-
- * config/tc-arm.c (do_msr): Improve error message.
-
-2000-11-01 Philip Blundell <philb@gnu.org>
-
- From 2000-08-01 Nick Clifton <nickc@cygnus.com>
- * config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag.
-
-2000-10-16 Philip Blundell <pb@futuretv.com>
-
- * configure.in: Set version number to 2.10.1.
+2001-06-18 Philip Blundell <philb@gnu.org>
+
+ * config/tc-arm.c (do_msr): Remove restriction on usage of
+ immediate operands.
+
+2001-06-13 Philip Blundell <philb@gnu.org>
+
+ * config/tc-arm.c (thumb_shift): Improve wording of error message.
+ (do_t_arit): Likewise.
+
+2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-sh.c (md_pseudo_table): Only intercept the .file and
+ .loc pseudos if the dfwarf2 functions are available.
+ (md_assemble): Only call dwarf2_emit_insn if it is available.
+
+2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ Merge from mainline:
+ 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
+ * config/tc-arm.c (arm_handle_align): When truncating an aligned
+ block, ensure that the low order bits of the alignment are
+ preserved.
+ 2001-05-06 Nick Clifton <nickc@cambridge.redhat.com>
+ * config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
+ * config/tc-arm.c (arm_handle_align): Do not insert more than
+ MAX_MEM_FOR_RS_ALIGN_CODE bytes.
+ (arm_frag_align_code): Use MAX_MEM_FOR_RS_ALIGN_CODE.
+ 2001-04-26 Nick Clifton <nickc@cambridge.redhat.com>
+ * config/tc-arm.c (arm_handle_align): New Function: Generate
+ no-op filled alignment frags.
+ (arm_frag_align_code): New Function: Create a code alignment frag.
+ (arm_init_frag): New Function: Initialse the target dependent
+ parts of a frag.
+ * config/tc-arm.h (TC_FRAG_TYPE): Define.
+ (TC_FRAG_INIT): Define.
+ (HANDLE_ALIGN): Define.
+ (md_do_align): Define.
+ 2001-03-12 Nick Clifton <nickc@redhat.com>
+ * config/tc-arm.c (md_begin): Always set machine type based on
+ cpu_variant.
+ 2001-03-06 Nick Clifton <nickc@redhat.com>
+ * config/tc-arm.c (md_apply_fix3): Clear bit zero of offset in
+ BLX(1) instruction.
+
+2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * doc/as.texinfo (Infix Ops): Document that comparison and
+ combiner operators can be used as infix operators.
+
+2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c: Fix test for overlow of literal pool.
+
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-06-08 Alan Modra <amodra@bigpond.net.au>
+ * config/tc-mips.c (mips16_mark_labels): Reduce number of calls to
+ S_GET_VALUE by using a temp.
+ (append_insn): Likewise, and for S_SET_VALUE too.
+ (mips_emit_delays): Likewise.
+ (my_getExpression): Likewise.
+ (md_apply_fix): Likewise. Use "valueT" rather than "long" for "value".
+ (mips16_extended_frag): Cater for first relaxation pass having
+ bogus addresses. Use relax_marker to reliably determine whether a
+ symbol frag has been reached on the current pass.
+
+ 2001-06-07 H.J. Lu <hjl@gnu.org>
+ * configure.in: Use MIPS_STABS_ELF for Linux/mips.
* configure: Regenerate.
-2000-10-14 Philip Blundell <philb@gnu.org>
-
- From 2000-06-17 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER
- to BFD_ASSEMBLER.
-
-2000-09-08 Philip Blundell <philb@gnu.org>
-
- * config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when
- offset is negative.
-
-2000-08-30 Matthew Jacob <mjacob@feral.com>
-
- * config/tc-alpha.c (md_undefined_symbol): Properly understand that
- $at is the integer register $r28, vs. both $r28 and the floating
- point register $f28.
+ 2001-06-07 H.J. Lu <hjl@gnu.org>
+ * config/tc-mips.c (mips_pseudo_table): Add "extern" if
+ MIPS_STABS_ELF is defined.
-2000-04-14 Matthew Green <mrg@cygnus.com>
-
- * configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support.
- * configure: Regenerate.
+ 2001-06-06 Christian Groessler <cpg@aladdin.de>
+ * config/tc-z8k.c: Removed many warnings by removing unused
+ variables and tagging unused parameters as such.
+ (md_begin): Fixed a typo (","instead of ";").
+ (struct ctrl_table): Add parentheses to initialize array
+ correctly.
+ (struct flag_table): Likewise.
+ (struct intr_table): Likewise.
+ (struct table): Likewise.
+ (check_operand): "#if 0"'ed since it doesn't seem to be used.
-2000-06-09 Nick Clifton <nickc@cygnus.com>
+ 2001-06-06 Peter Jakubek <pjak@snafu.de>
+ * gas/config/tc-m68k.c (md_show_usage): Add all supported ColdFire
+ options to list (e.g. m5206e, m5307, m5407).
- * config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value
- for size 1 fixes.
+ 2001-06-06 Alan Modra <amodra@bigpond.net.au>
+ * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints.
+ <JumpByte, JumpDword insn output>: Remove dead code.
-2000-06-01 Scott Bambrough <scottb@netwinder.org>
-
- * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly.
+ 2001-06-05 Nick Clifton <nickc@cambridge.redhat.com>
+ * symbols.c (S_SET_EXTERNAL): Do not override a section symbol's
+ status.
-2000-05-22 David O'Brien <obrien@FreeBSD.org>
+ 2001-05-27 Alan Modra <amodra@one.net.au>
+ * config/tc-m68k.c (md_assemble): Ensure variable part of frag is
+ allocated in the same chunk as the fixed part.
- * configure.in: Recognize alpha-*-freebsd*.
+ 2001-05-25 Alan Modra <amodra@one.net.au>
+ * configure.in: Replace linuxoldld with linux*oldld.
* configure: Regenerate.
-2000-05-26 Scott Bambrough <scottb@netwinder.org>
-
- Port of patch to mainline by Nick Clifton <nickc@cygnus.com>:
- * config/tc-arm.c (struct asm_psr): Add boolean field
- distinguishing between CSPR and SPSR. Rename 'number' field
- to 'field'.
- (psrs): Rearrange contents to match new asm_psr structure.
- (arm_psr_parse): Move next to psr_required_here. Make it
- return an asm_psr structure.
- (psr_required_here): Use asm_psr structure returned by
- arm_psr_parse.
- (do_msr): Reorganise to allow psr_required_here to be called
- only once.
- (md_undefined_name): Mark 'name' parameter as unused, since
- the COFF target does not use it.
-
- Port of patch to mainline by Nick Clifton <nickc@cygnus.com>:
- * testsuite/gas/arm/arch4t.s: Add tests of new fields
- to msr instruction.
-
- * NEWS: Mention change in behaviour when assembling msr
- instruction.
-
-2000-04-24 Nick Clifton <nickc@cygnus.com>
-
- * doc/c-arm.texi (ARM Directives): Document behaviour of .align 0.
- * doc/as.texinfo (Align): Include arm and strongarm in list of
- targets that have the second form of the behaviour of the .align
- directive.
-
-2000-05-29 Philip Blundell <philb@gnu.org>
-
- * doc/as.texinfo: Update copyright dates.
- (Local Labels): Delete misplaced mention of ARM.
- * NEWS: Mention ARM ELF support.
-
-Tue May 23 00:57:05 2000 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.in (i386-*-freebsd a.out entry): Quote properly.
+ 2000-05-24 Tom Rix <trix@redhat.com>
+ * config/obj-coff.c (add_lineno): xcoff allows negative line
+ numbers
+ * config/tc-ppc.c (ppc_stabx): fix generated symbol
+
+ 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
+ architecture, remove erraneous ISA_MIPS32.
+ (md_show_usage): Add MIPS r12k support.
+ (mips_cpu_info_table): Add MIPS r12k support.
+
+ 2001-05-22 Alan Modra <amodra@one.net.au>
+ * config/tc-m68k.c (relaxable_symbol): Only treat external symbols
+ as relaxable if embedded system, make weak syms non-relaxable.
+ Move definition..
+ (tc_m68k_fix_adjustable): ..so it can be used here.
+ (md_apply_fix_2): Sign extend without conditional.
+
+ 2001-05-16 Jeff Johnston <jjohnstn@redhat.com>
+ * cgen.c (gas_cgen_tc_gen_reloc): Changed error message when
+ howto entry is not found.
+
+ 2001-05-10 Alan Modra <amodra@one.net.au>
+ * config/obj-vms.c (obj_crawl_symbol_chain): Don't take address of
+ symbol_next.
+ * config/tc-fr30.c (md_estimate_size_before_relax): Return size of
+ current variable part of frag.
+ * config/tc-m32r.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-m68hc11.c (RELAX_STATE): Define.
+ (RELAX_LENGTH): Define.
+ (md_estimate_size_before_relax): Handle non-relaxable cases
+ separately from relaxable cases for clarity, and return correct
+ size for multi-pass relaxation.
+ * config/tc-tahoe.c (RELAX_LENGTH): Correct.
+ (md_estimate_size_before_relax): As for tc-m68hc11.c.
+ (md_convert_frag): Remove "length_code".
+ * config/tc-vax.c (RELAX_STATE): Define.
+ (RELAX_LENGTH): Define.
+ (md_relax_table): Add missing entry.
+ (md_estimate_size_before_relax): As for tc-m68hc11.c.
+ (md_convert_frag): Remove "length_code".
+ * config/tc-ns32k.c (md_estimate_size_before_relax): Simplify and
+ don't bother setting fr_var. Return correct size for multi-pass
+ relaxation.
+ * config/tc-h8500.c (md_convert_frag): Don't bother clearing fr_var.
+ (md_estimate_size_before_relax): No need to set fr_var.
+ * config/tc-mcore.c (md_convert_frag): Don't bother clearing fr_var.
+ (md_estimate_size_before_relax): No need to set fr_var.
+
+ 2001-05-08 Andreas Schwab <schwab@suse.de>
+ * config/tc-m68k.c: Instead of replacing -1 by 64 in assignment to
+ fx_pcrel_adjust explicitly sign extend when reading it.
+
+ 2001-05-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * Makefile.am (TARG_ENV_HFILES): Add te-hppa64.h and te-hppalinux64.h.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * configure.in: Remove duplicate mips-*-ecoff* entry.
* configure: Regenerate.
-
-2000-05-23 Philip Blundell <pb@futuretv.com>
-
- * configure.in: Set version to 2.10.
+ * config/obj-ecoff.c (obj_pseudo_table): Fix terminating entry.
+ (n_names): Cast away type mismatch.
+ (ecoff_sec_sym_ok_for_reloc): Add unused attribute.
+ (obj_ecoff_frob_symbol): Likewise.
+ * ecoff.c: (add_file): Add unused attribute.
+ (ecoff_directive_begin): Likewise.
+ (ecoff_directive_bend): Likewise.
+ (ecoff_directive_def): Likewise.
+ (ecoff_directive_dim): Likewise.
+ (ecoff_directive_scl): Likewise.
+ (ecoff_directive_size): Likewise.
+ (ecoff_directive_type): Likewise.
+ (ecoff_directive_tag): Likewise.
+ (ecoff_directive_val): Likewise.
+ (ecoff_directive_endef): Likewise.
+ (ecoff_directive_end): Likewise.
+ (ecoff_directive_ent): Likewise.
+ (ecoff_directive_extern): Likewise.
+ (ecoff_directive_file): Likewise.
+ (ecoff_directive_fmask): Likewise.
+ (ecoff_directive_frame): Likewise.
+ (ecoff_directive_mask): Likewise.
+ (ecoff_directive_loc): Likewise.
+ (mark_stabs): Likewise.
+ (ecoff_stab): Likewise.
+ (ecoff_frob_symbol): Cast away type mismatch.
+ (ecoff_padding_adjust): Likewise.
+ (ecoff_build_symbols): Likewise.
+ (ecoff_build_procs): Likewise.
+ (ecoff_build_aux): Likewise.
+ (ecoff_build_strings): Likewise.
+ (ecoff_build_fdr): Likewise.
+ (ecoff_build_debug): Likewise.
+ * itbl-ops.c (itbl_assemble): Variable initialization.
+
+ 2001-04-29 Keith M Wesolowski <wesolows@foobazco.org>
+ * config/tc-mips.c (md_parse_option): Also accept
+ elf64-tradbigmips and elf64-tradlittlemips for OPTION_64.
+
+ 2001-04-27 Sean McNeil <sean@mcneil.com>
+ * configure.in: Add arm-vxworks.
* configure: Regenerate.
-2000-05-23 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (md_assemble): Pass jump reloc in fr_var...
- (md_estimate_size_before_relax): so we can use it here instead of
- old kludges. Localise vars to blocks. Comment.
-
- * frags.c (frag_new): Update fr_var comments.
- * frags.h (struct frag): Ditto.
-
- * config/tc-i386.c (tc_i386_fix_adjustable): Prevent adjustment
- for OBJ_MAYBE_ELF too. Use S_IS_EXTERNAL instead of S_IS_EXTERN.
- (md_estimate_size_before_relax): Ensure jumps to weak and
- externally visible symbols are relocatable.
-
-2000-05-14 David O'Brien <obrien@FreeBSD.org>
+ 2001-04-25 Nick Clifton <nickc@cambridge.redhat.com>
+ * config/obj-coff.c (do_linenos_for): Check to see if the filename
+ symbol has been initialised before extracting its symbol index.
- * config/te-freebsd.h: New file.
+ 2001-04-24 Christian Groessler <cpg@aladdin.de>
+ * config/tc-z8k.c (build_bytes): 12 and 16 bit displacements now
+ generate R_CALLR and R_REL16 relocations
- * doc/as.1: Fix unbalanced brackets.
+ 2000-04-20 Jason Eckhardt <jle@redhat.com>
+ * config/tc-d10v.h (tc_frob_label): Update the symbol's frag
+ since frag_now can change after d10v_cleanup is called.
- * config/tc-i386.c (comment_chars): Don't use '/' as comment start if
- TE_FreeBSD.
- (line_comment_chars): Set to '/' if TE_FreeBSD.
+ 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
+ * dwarf2dbg.c (process_entries): Don't optimize redundant line notes.
-1999-07-03 Joel Sherrill <joel@OARcorp.com>
+ 2001-04-07 Steven J. Hill <sjhill@cotw.com>
+ * config/tc-mips.c: Support ELF64 for traditional MIPS targets.
+ * Makefile.am: (TARG_ENV_HFILES): Add tc-mips.h.
+ * Makefile.in: Regenerated.
+ * configure.in: Use traditional MIPS targets for Linux/MIPS.
+ * configure: Regenerated.
- * configure.in (*rtems except sh): Move RTEMS targets to elf.
+ 2001-04-05 Alan Modra <alan@linuxcare.com.au>
+ * configure.in: Add h8500-*-coff and h8500-*-rtems targets.
* configure: Regenerate.
-
-2000-05-08 Alan Modra <alan@linuxcare.com.au>
-
- * as.h: #include "file", not <file> on files from ../include.
- (as_abort, as_fatal): Add ATTRIBUTE_NORETURN.
- * config/tc-m68k.c (m68k_ip): Fix signed/unsigned warnings.
- (md_convert_frag): Add ATTRIBUTE_UNUSED.
- (tc_coff_symbol_emit_hook): Ditto.
- (OPTCOUNT): Cast to int to avoid compiler warning.
- (md_begin): Fix signed/unsigned warnings.
-
-2000-05-08 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * config/tc-m68k.c (md_convert_frag_1): Abort if we end up in the
- ABRANCH LONG case for a conditional branch on a 68000.
- (md_estimate_size_before_relax): Likewise. Also handle
- flag_short_refs correctly for ABRANCH, BCC68000, and DBCC.
- (m68k-ip: case ABSL): Relax absolute references to 16-bit
- PC-relative on all CPUs.
- (md_estimate_size_before_relax): Likewise.
-
-2000-05-04 Alan Modra <alan@linuxcare.com.au>
-
- * as.c (parse_args): Just mention current year in printed
- copyright message.
-
-2000-05-03 Ian Lance Taylor <ian@zembu.com>
-
- * config/atof-ieee.c (gen_to_words): When adding carry back in,
- don't permit lp to become less than the words array.
-
-2000-05-03 David O'Brien <obrien@NUXI.com>
-
- * as.c (parse_args): Update copyright.
-
-2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
-
- * gas/config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4
- for the .bss section too.
-
-2000-04-29 Andreas Jaeger <aj@suse.de>
-
- * as.h: Correctly check GCC version.
-
-2000-04-20 Alexandre Oliva <aoliva@cygnus.com>
-
- * config/tc-mn10300.c (HAVE_AM30): Define.
- (md_assemble): Use it.
-
-2000-04-19 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am: (CPU_MULTI_VALID): Remove.
- (MULTI_CPU_TYPES): Define.
- (MULTI_CPU_OBJ_VALID): Define.
- (DEPTC): Use the above.
- (DEPOBJ): Same here.
- (DEP2): And here.
- Regenerate dependencies.
- * Makefile.in: Regenerate.
-
-2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * Makefile.am (YACC, LEX): Get them from configure.
-
- * as.h (SEEK_SET): Define if undefined.
-
-2000-04-09 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am (CPU_TYPES): Add 'avr'.
- (TARGET_CPU_CFILES): Add 'tc-avr.c'.
- (TARGET_CPU_HFILES): Add 'tc-avr.h'.
-
-2000-04-05 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * config/tc-sparc.c (sparc_ip): Avoid string pasting.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * po/gas.pot: Regenerate.
-
- * as.c (show_usage): Restore translated part of bug string.
- * gasp.c (show_usage): Likewise.
-
- * Makefile.am (MKDEP): Use gcc -MM rather than ../mkdep.
- (DEP): Quote when passing vars to sub-make. Use "mv -f" rather
- than move-if-change.
- (DEP1): Modify for "gcc -MM".
- (DEPTC): Likewise.
- (DEPOBJ): Likewise.
- (DEP2): Likewise.
- (CLEANFILES): Add DEPTCA, DEPOBJA, DEP2a, DEPA.
- Update dependencies.
- * Makefile.in: Regenerate.
-
-2000-04-04 Alexandre Oliva <aoliva@cygnus.com>
-
- * config/tc-mn10300.c (md_pseudo_table): Use constant names.
+ * config/tc-h8500.c (md_estimate_size_before_relax): Add missing
+ cases, and always return size based on current fr_subtype.
+ (md_begin): Move initialization of md_relax_table..
+ (md_relax_table): ..to static initializer. Set rlx_length for
+ UNDEF_WORD_DISP cases.
+ * config/tc-w65.c (md_estimate_size_before_relax): Likewise.
(md_begin): Likewise.
- (HAVE_AM33): New macro.
- (md_assemble): Use it. Match r_regs and xr_regs only if
- HAVE_AM33.
-
-2000-04-03 Alan Modra <alan@linuxcare.com.au>
-
- * as.h: #include "bin-bugs.h"
- * as.c (show_usage): Use REPORT_BUGS_TO.
- * gasp.c: #include "bin-bugs.h"
- (show_usage): Use REPORT_BUGS_TO.
-
- * config/tc-sparc.c (md_show_usage): Add a trailing newline.
-
-2000-04-03 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (i386_immediate): Don't assume a constant
- immediate is necessarily 16 bits when in 16 bit code mode.
- (md_assemble): Instead set guess_suffix here after we have checked
- registers.
-
-2000-04-02 Richard Henderson <rth@cygnus.com>
-
- * config/tc-d30v.c (check_range): Allow signed or unsigned 32-bit
- quantities. Correct right shift sign extension.
- (build_insn): Make `number' unsigned long. Mask top 6 bits of
- 32-bit value when shifting into place.
-
-2000-04-01 Ian Lance Taylor <ian@zembu.com>
-
- * app.c: Add ATTRIBUTE_UNUSED as needed.
- * config/tc-ppc.c: Likewise.
- (ppc_size): Make unsigned long.
- (ppc_insert_operand): Add casts to avoid warnings.
-
-2000-03-31 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d10v.h (md_flush_pending_output): Define.
-
-2000-03-29 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-sh.h (SEG_NAME): New macro: return the name of a
- segment. Works for both BFD_ASSEMBLER and others.
- (SUB_SEGMENT_ALIGN): Use SEG_NAME.
-
-2000-03-29 Nick Clifton <nickc@cygnus.com
-
- * config/tc-arm.c (tinsns): Add "bal" instruction pattern.
-
-2000-03-28 Alan Modra <alan@linuxcare.com.au>
-
- * listing.c (LISTING_LHS_WIDTH): Default depends on
- LISTING_WORD_SIZE.
- (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH.
-
-2000-03-27 Ian Lance Taylor <ian@zembu.com>
-
- * config/tc-sh.c (md_show_usage): Use backslash before newline in
- string literal.
-
-2000-03-27 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-avr.h (TC_HANDLES_FX_DONE): Define.
-
- * config/tc-avr.c (mcu_types): Add missing initialiser.
- (md_pcrel_from_section): Add prototype.
- (avr_operand): Remove redundant test of unsigned < 0.
- (avr_cons_fix_new): Ensure exp_mod_pm zero on function exit.
-
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * config/tc-avr.c: New file for AVR support.
- * config/tc-avr.h: Likewise.
- * configure.in: Add AVR support.
+ (md_relax_table): Likewise.
+ * config/tc-mcore.c (md_estimate_size_before_relax): Likewise.
+ (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases.
+ Set rlx_backward and rlx_forward to zero for unused states.
+ * config/tc-sh.c (md_estimate_size_before_relax): Likewise.
+ (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases.
+ (UNCOND12, UNCOND32): Remove duplicate defines.
+
+ 2001-03-30 Alan Modra <alan@linuxcare.com.au>
+ * dwarf2dbg.c (dwarf2_directive_file): Fix warnings.
+
+ 2001-03-30 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-sh.c (md_estimate_size_before_relax): Add extra
+ do-nothing cases to switch to avoid abort on a second relaxation
+ pass, and tidy code a little.
+ * config/tc-h8500.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-w65.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-mcore.c (COND12, UNCD12): Rename to DISP12 throughout.
+ (COND32, UNCD32): Rename to DISP32 throughout.
+ (UNDEF_WORD_DISP): Renumber to 3.
+ (md_estimate_size_before_relax): Add extra do-nothing cases.
+ * config/tc-mn10200.c (md_estimate_size_before_relax): Rewrite.
+ * config/tc-ns32k.c (md_estimate_size_before_relax): Add cases to
+ handle word and dword branches.
+
+ 2001-03-17 Alan Modra <alan@linuxcare.com.au>
+ * read.c (do_org): Handle complex expressions.
+ * cgen.c (gas_cgen_finish_insn): Likewise.
+
+ 2001-03-15 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-sh.c (parse_reg): Match capital MACH and MACL.
+
+ 2001-03-06 Igor Shevlyakov <igor@windriver.com>
+ * config/tc-m68k.c : Add 5407 to archs[] table.
+ (HAVE_LONG_BRANCH): Add mcf5407.
+ (select_control_regs): Recognize 5407.
+
+ 2001-03-02 Richard Sandiford <rsandifo@redhat.com>
+ * config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): New macro.
+ (gen_to_words): Print warnings if NaNs are found and the target CPU
+ does not support them. Allow largest exponent to be used in normal
+ numbers if TC_LARGEST_EXPONENT_IS_NORMAL evaluates to true.
+
+ 2001-02-27 Alan Modra <alan@linuxcare.com.au>
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
* configure: Regenerate.
-2000-03-26 Timothy Wall <twall@cygnus.com>
-
- * gasp.c (macro_op): Add new argument to check_macro call.
- Macro structure definitions moved to macro.h
- * sb.h: Add argument to prototype for input_scrub_include_sb.
- * input-scrub.c (input_scrub_include_sb): Allow disabling of sb
- nesting checks with an additional flag.
- (struct input_save): Add flag to indicate whether current sb
- should be checked for proper macro/conditional nesting.
- (input_scrub_push/pop): Save/restore nest check flag.
- (input_scrub_next_buffer): Ditto. Also call end of macro hook if
- defined.
- * macro.c (check_macro): Allow caller to retrieve parsed macro
- information if a pointer is provided. This information may be
- used by the new macro hooks.
- * macro.h: Update prototype for check_macro. Macro struct
- definitions moved here from macro.c/gasp.c.
- * read.c (read_a_source_file): Add parameter to check_macro call,
- and pass macro info to the macro hook, if defined.
- (input_scrub_insert_line): New. Allow insertion of a line of
- characters into the input stream.
- (input_scrub_insert_file): New. Allow insertion of an arbitrary
- file into the input stream.
- (s_include): Use input_scrub_insert_file.
- * internals.texi: Document new macro hooks.
- * as.h: New prototypes added.
-
-2000-03-26 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c: Don't start any as_bad or as_warn message with
- an initial capital letter.
- (i386_index_check): Reindent.
-
-2000-03-19 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_apply_fix3): Fix bug detectng overflow of pc
- relative branches.
-
-2000-03-17 Thomas de Lellis <tdel@windriver.com>
-
- * config/tc-arm.c (do_t_adr): Flag "adr Rd,label"
- instruction operand bad if Rd > 7 when generating
- thumb instructions. Prevents for example,
- "adr r12,label" from silently failing and generating
- the wrong instruction.
-
-2000-03-17 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_apply_fix3): Handle same-section relocations
- that have a destingation >= 0x400000.
- Fix compile time warning messages.
-
-Thu Mar 16 23:45:16 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-sh.c (md_begin): When encountering insn that are
- not supported by the current arch, only change the name if
- its contents are the same as prev_name.
- (get_specific): If the the architecture doesn't match, fail.
-
-Thu Mar 16 21:18:13 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-sh.c (IDENT_CHAR): Define.
- (parse_reg): Use it instead of isalnum. Put r[0..7]_bank operand
- matching back where it came from.
-
-Thu Mar 16 20:58:10 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-sh.c (md_show_usage): Add description of -dsp.
-
-2000-03-15 Jonathan Larmour <jlarmour@redhat.co.uk>
-
- * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before
- normal operands.
-
-2000-03-15 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate.
-
-Mon Mar 13 22:02:59 2000 Hans-Peter Nilsson <hp@axis.se>
-
- * expr.c (operand) [case 'f']: When testing if '0f' can start a
- floating-point-number, make sure 'f' is in FLT_CHARS.
-
-Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson <hp@axis.se>
-
- * read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition.
- (s_lcomm_internal): Use it.
- * doc/internals.texi (CPU backend): Document it.
- * config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3
- bytes.
-
-2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
-
- * config/tc-mips.c (mips_ip): Don't put stuff in .rodata
- when embedded-pic.
-
- * config/tc-mips.c (SWITCH_TABLE): The ELF embedded-pic
- implementation doesn't have special handling for switch
- statements.
- (macro_build): Allow for code in sections other than .text.
- (macro): Likewise.
- (mips_ip): Likewise.
- (md_apply_fix): Do pc-relative relocation madness for MIPS ELF.
- Don't perform relocs if we will be outputting them.
- (tc_gen_reloc): For ELF, just use fx_addnumber for pc-relative
- relocations. Allow BFD_RELOC_16_PCREL_S2 relocs when
- embedded-pic.
+ 2001-02-26 Mark Elbrecht <snowball3@bigfoot.com>
+ * config/obj-coff.c [BFD_ASSEMBLER] (obj_coff_section): Set
+ SEC_NEVER_LOAD when the 'n' flag is used.
+ Add SEC_NEVER_LOAD to matchflags.
-2000-03-09 Catherine Moore <clm@cygnus.com>
-
- * config/tc-m32r.c (m32r_fix_adjustable): Look up the
- relocation type based on the entry in the fixup structure.
+ 2001-02-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+ * symbols.c (decode_local_label_name): Initialize message_format
+ only when an error is reported (perf pb due to I18N).
-2000-03-08 H.J. Lu (hjl@gnu.org)
+ 2001-02-23 H.J. Lu <hjl@gnu.org>
+ * dwarf2dbg.c (dwarf2_directive_file): Call s_app_file (0) if
+ BFD_ASSEMBLER is not defined.
- * Makefile.am (install-exec-tooldir): Depend on
- install-exec-bindir for parallel make.
- * Makefile.in: Regenerated.
+ 2001-02-16 matthew green <mrg@redhat.com>
+ * cgen.c (gas_cgen_md_apply_fix3): Support BFD_RELOC_64.
-2000-03-06 Nick Clifton <nickc@cygnus.com>
+ 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * config/tc-mips.c (macro): For M_LA_AB emit a
+ BFD_RELOC_MIPS_CALL16 relocation or a
+ BFD_RELOC_MIPS_CALL_HI16/BFD_RELOC_MIPS_CALL_LO16 pair instead of
+ BFD_RELOC_MIPS_GOT16 and
+ BFD_RELOC_MIPS_GOT_HI16/BFD_RELOC_MIPS_GOT_LO16, respectively for
+ loading the jump register when generating SVR4_PIC code.
- * config/tc-m32r.c (struct md_longopts): Add -m32r command line
- switch.
- (md_parse_option): Parse -m32r command line switch - disable m32rx
- compatability.
- (md_show_usage): Document new option.
+ 2001-02-10 Chris Demetriou <cgd@broadcom.com>
+ * configure.in: Make 'mipself' and 'mipsecoff' emulations
+ map to MIPS-specific files, as they used to do before the
+ change on 2000-05-21.
+ * configure: Regerate.
- * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi.
- * doc/Makefile.in: Regenerate.
- * doc/c-m32r.texi (M32R-Opts): Document new command line switch.
+ 2001-02-10 Chris Demetriou <cgd@broadcom.com>
+ * config/tc-mips.c (md_parse_option): Don't try to compile
+ ELF-only option code if not ELF.
-2000-03-02 Michael Meissner <meissner@redhat.com>
+2001-06-10 Philip Blundell <philb@gnu.org>
- * config/tc-d30v.c (check_range): Remove code that incorrectly
- sign extended values where bits < 32.
-
-2000-03-02 H.J. Lu (hjl@gnu.org)
-
- * configure.in: Support --enable-targets=all on ia32.
- * configure: Regenerated.
-
-2000-03-01 Nick Clifton <nickc@cygnus.com>
-
- * gasp.c (do_align): Remove bogus check of alignment value.
-
-2000-02-27 Thomas de Lellis <tdel@windriver.com>
-
- * config/obj-elf.c (elf_frob_symbol): Remove code which when
- TC_PPC was defined forced the type of a symbol with no other type
- to be BSF_OBJECT.
-
-2000-02-27 Hans-Peter Nilsson <hp@axis.com>
-
- * doc/internals.texi (CPU backend): Mention that
- line_separator_chars do not break up comments. Fix typos for
- LEX_AT and LEX_NAME descriptions. Document operands for
- TC_EQUAL_IN_INSN, md_operand and md_section_align. Correct
- description of md_create_short_jump usage. Document argument for
- md_undefined_symbol.
-
-2000-02-27 Jakub Jelinek <jakub@redhat.com>
-
- * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option.
- (md_parse_option): Handle it.
- (md_show_usage): Document it.
-
-2000-02-27 Ian Lance Taylor <ian@zembu.com>
-
- * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an
- opcode, for the instruction `pal19'. From Andrea Arcangeli
- <andrea@suse.de>.
-
-2000-02-26 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (i386_immediate): Move constant operand sizing
- from here..
- (md_assemble): To here, before template operands are matched.
- Also ensure a constant immediate is sign extended when we know the
- size is at most 16 bits. This is to catch cases like "add
- $0xffc0,%ax" where we don't know the size, and thus that the
- immediate can be represented as Imm8S until after parsing the
- register operand.
- (i386_displacement): Similarly sign extend 16 bit constant
- displacements.
- (md_assemble): Relax 16-bit jump constant range check to suit sign
- extended displacements.
-
-2000-02-26 Andreas Jaeger <aj@suse.de>
-
- * doc/c-mips.texi (MIPS Opts): Fix typo in last patch.
-
-2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (md_assemble): Don't swap intersegment jmp and
- call operands when intel_syntax.
- (intel_float_operand): Return 2 for "fi...".
- (i386_operand_modifier): Change "DWORD PTR" test to suit above.
- Return SHORT_MNEM_SUFFIX for "WORD PTR" when "fi...". Revert
- earlier "SHORT" change.
- (md_assemble): When determining suffix from Regs, exclude
- InOutPortReg.
-
-2000-02-24 Nick Clifton <nickc@cygnus.com>
-
- * configure: Add arm-wince, mips-pe and sh-pe targets.
+ * configure.in: Set version to 2.11.1.
* configure: Regenerate.
- * config/obj-coff.h (COFF_WITH_PE): Define for mips-pe and
- sh-pe targets.
- (TARGET_FORMAT): Set to "pe-shl" for the sh-pe target and to
- "pe-mips" for the mips-pe target.
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
- * config/tc-arm.c (insns): Change displacement encoded in BL
- and B instructions if the target port is arm-wince.
- (do_ldst): Do not bias the relocation offset if the target
- port is arm-wince.
- (md_pcrel_from): Add in missing relocation offset bias if the
- target os arm-wince.
+ * Most files: Update copyright notices.
- * config/tc-mips.c (mips_target_format): Support COFF flavour.
- (md_begin): Disable -G support for mips-pe target.
- (md_apply_fix): Treat BFD_RELOC_RVA reloc as BFD_RELOC_32.
- * config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Add support for
- COFF flavour.
+2001-06-06 Hans-Peter Nilsson <hp@axis.com>
- * config/tc-sh.c (md_begin): sh-pe target is little endian.
- * config/tc-sh.h (SUB_SEGMENT_ALIGN): If using a BFD
- assembler, just set the alignment to 4.
+ * config/tc-cris.c (cris_insn_first_word_frag): New.
+ (md_assemble): Call cris_insn_first_word_frag to get the first
+ frag in an insn, not frag_more. Don't call dwarf2_emit_insn at
+ end. Drop variable insn_size.
+ (gen_bdap): Call cris_insn_first_word_frag, not frag_more.
- * config/te-wince-pe.h: New file for WinCE targets. Define
- TE_WINCE.
+2001-06-06 Nick Clifton <nickc@cambridge.redhat.com>
-2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * as.c (show_usage): Remove L from listing options. It is not a
+ generic option.
- * config/tc-i386.c (md_assemble): Swap segments too for intel mode
- string instructions.
- (i386_operand_modifier): Set i.suffix = WORD_MNEM_SUFFIX for SHORT.
- (i386_intel_memory_operand): After finding a segment override,
- check again for no `[' before looking for a displacement. Bomb if
- more than one displacement rather than silently discarding the
- second and subsequent ones. Free strings malloc'd by
- build_displacement_string.
+2001-06-06 Tracy Kuhrt <Tracy.Kuhrt@microchip.com>
-2000-02-24 Catherine Moore <clm@cygnus.com>
+ * as.c (parse_args): Correct option name "listing-lhs-width2".
- * config/obj-som.c (obj_pseudo_table): Add "weak".
- (obj_som_weak): New routine.
+2001-05-30 Richard Henderson <rth@redhat.com>
-2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * read.c (emit_leb128_expr): Call md_cons_align.
- * config/tc-i386.c (union i386_op): New.
- (struct _i386_insn): Delete disps[], imms[], regs[]. Add op[].
- Throughout file replace occurences of disps[n], imms[n], regs[n]
- with equivalent op[n].disps, op[n].imms, op[n].regs. Simplify
- intel mode operand swapping. Add assert in regKludge and
- fake_zero_displacement code. Test i.types[n] when outputting
- displacements and immediates. Combine output of Disp16 with
- Disp32.
- (md_assemble): Don't try to fix broken UNIXWARE_COMPAT opcodes
- when in intel mode by (not) reversing fsub and fdiv operands
- before the template search. This fails for single operand
- shorthand forms of the instruction, and if UNIXWARE_COMPAT is
- undefined. Instead fix the base_opcode after we've found the
- template. Move base_opcode xor with found_reverse_match from
- opcode output code to before this fix so we test for the correct
- opcodes.
- (md_assemble): Don't use strcmp when deciding to ignore the suffix
- check in intel mode. Instead compare opcodes.
-
- * config/tc-i386.h (TC_RELOC): Delete.
- * config/tc-i386.c (TC_RELOC): Delete. Replace usage of TC_RELOC
- with equivalent call to reloc.
-
- * as.h (flag_m68k_mri): Move declaration after target include, and
- only declare when TC_M68K defined. Define as zero otherwise.
- (LABELS_WITHOUT_COLONS, NO_PSEUDO_DOT): If undefined, define as 0.
- * app.c (scrub_m68k_mri): Declare only when TC_M68K defined.
- Define as zero otherwise.
- (do_scrub_begin): Use m68k_mri parameter only when TC_M68K defined.
- (struct app_save): Declare scrub_m68k_mri only when TC_M68K.
- (app_push, app_pop): Save scrub_m68k_mri only when TC_M68K.
- (do_scrub_chars): Use LABELS_WITHOUT_COLONS directly rather than
- testing whether defined.
- * cond.c (ignore_input): Use NO_PSEUDO_DOT directly.
- * expr.c (operand): #ifdef unused case labels when TC_M68K undefined.
- * read.c: Use LABELS_WITHOUT_COLONS and NO_PSEUDO_DOT directly
- rather than testing whether defined.
- (s_mri): Set flag_m68k_mri only when TC_M68K defined.
- (parse_mri_cons): Declare and use only when TC_M68K.
- * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define as 1.
- * config/tc-m68k.h (NO_PSEUDO_DOT): Define as 1.
- * config/tc-m88k.h (NO_PSEUDO_DOT): Define as 1.
-
- * NEWS: Mention IBM 370 support.
+2001-05-28 Jeff Sturm <jsturm@one-point.com>
-2000-02-23 Richard Henderson <rth@cygnus.com>
-
- * config/tc-i386.c (md_assemble): When swapping operands for
- intel_syntax, assume everything that's not Imm or Disp is a
- register.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * config/tc-i370.c, config/tc-i370.h: New files.
- * Makefile.am: Add support for Linux/IBM 370.
- * configure.in: Likewise.
- * app.c (do_scrub_begin): Don't lex single quote when TC_I370.
- * config/obj-elf.c: Include elf/i370.h
- (obj_elf_section): Don't do anything special for flag_mri if TC_I370.
+ * config/tc-sparc.c (md_apply_fix3): Handle BFD_RELOC_SPARC_UA16,
+ BFD_RELOC_SPARC_UA32 and BFD_RELOC_SPARC_UA64.
+ (tc_gen_reloc): Likewise.
+ (sparc_cons_align): Don't clear sparc_no_align_cons.
+ (cons_fix_new_sparc): Substitute BFD_RELOC_SPARC_UA{16|32|64} for
+ BFD_RELOC_{16|32|64} iff sparc_no_align_cons is set.
+
+2001-05-23 Alan Modra <amodra@one.net.au>
+
+ Merge from mainline.
+ 2001-05-22 Alan Modra <amodra@one.net.au>
+ * config/tc-arc.c (md_assemble): Use is_end_of_line instead of
+ testing for NULs.
+
+ 2001-05-16 Alan Modra <amodra@one.net.au>
+ * config/tc-arc.c (md_assemble): Correct dwarf2_emit_insn param
+ for 8 byte insns.
+ * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn before
+ opcodes are output rather than after. Delete insn_size.
+ * config/tc-v850.c (md_assemble): Similarly, but delete
+ total_insn_size. Update copyright.
+
+ 2001-05-03 Alan Modra <amodra@one.net.au>
+ * config/tc-i386.c (i386_displacement): Call as_bad for bad GOTOFF
+ expressions rather than triggering an assert.
+
+ 2001-03-30 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-i386.c (UNCOND_JUMP, COND_JUMP, COND_JUMP86): Decrement.
+ (md_relax_table): Remove first four unused entries. Increment
+ rlx_length by one throughout table, and update comments to suit.
+ (md_estimate_size_before_relax): Return size of current variable
+ part of frag to reflect reality when relaxing more than once.
+
+ 2001-03-25 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-i386.c (i386_scale): Accept an absolute expression for
+ scale factor, and return the end of the expression.
+ (i386_operand): Modify for above.
+
+ 2001-03-13 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-i386.c (RELOC_ENUM): Define. Use throughout file.
+ (NUM_FLAG_CODE): Define.
+ (lex_got): New function.
+ (got_reloc): New global var.
+ (x86_cons_fix_new): New function.
+ (x86_cons): New function.
+ (i386_immediate): Use lex_got here, replacing inline code. Change
+ "ignoring junk.." error message to "junk.."
+ (i386_displacement): Likewise.
+ * config/tc-i386.h (TC_PARSE_CONS_EXPRESSION): Define.
+ (x86_cons): Declare.
+ (TC_CONS_FIX_NEW): Define.
+ (x86_cons_fix_new): Declare.
+
+ 2001-03-07 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-i386.c (struct _i386_insn): Rename disp_reloc to reloc.
+ (md_assemble) <smallest displacement>: Use correct field of i.op[]
+ union.
+ <JumpInterSegment output>: Use correct i.disp_reloc[].
+ <immediate output>: Likewise.
+
+ 2001-02-13 Alan Modra <alan@linuxcare.com.au>
+ * doc/c-i386.texi (i386-Arch): Add "jumps"/"nojumps" blurb.
+ Mention effect of < 386 architectures on jump promotion.
+ (i386-Jumps): xref above. Don't assume long disp is 32 bits.
+
+ * config/tc-i386.c (no_cond_jump_promotion): New.
+ (set_cpu_arch): Parse "jumps" arch modifier.
+ (insn_size): Modify usage comment.
+ (ENCODE_RELAX_STATE): Reformat and protect macro arg.
+ (SIZE_FROM_RELAX_STATE): Rename to DISP_SIZE_FROM_RELAX_STATE.
+ (TYPE_FROM_RELAX_STATE): New define.
+ (UNCOND_JUMP, COND_JUMP): Renumber.
+ (md_relax_table): Reorder to suit.
+ (COND_JUMP86): New define.
+ (md_relax_table): Handle COND_JUMP86 cases. Add a few comments.
+ (md_assemble): Create frag var for jumps of max size, encode relax
+ state for COND_JUMP86.
+ (md_estimate_size_before_relax): Handle COND_JUMP86 cases, and
+ leave conditional jumps small if no_cond_jump_promotion.
+ (md_convert_frag): Likewise.
- * Makefile.in: Regenerate.
+ 2001-05-10 Alan Modra <amodra@one.net.au>
+ * config/tc-v850.c (md_estimate_size_before_relax): Rewrite.
+ (md_convert_frag): Don't bother clearing fr_var.
+ (md_pseudo_table): Correct initialization.
+
+ 2001-05-12 Peter Targett <peter.targett@arccores.com>
+ * config/tc-arc.c: Update copyright and tidy source comments.
+ (md_pseudo_table): Add directive .cpu back as an alias for
+ .option. Add .file and .line for dwarf2 support.
+ (arc_mach_type): Make bfd_mach_arc_6 default.
+ (md_longopts): Add entry 'pre-v6' representing old command line
+ option when assembling for 'arc5' core versions.
+ (md_parse_option): Make OPTION_ARC same as OPTION_ARC6, for new
+ default behaviour.
+ (arc_code_symbol): Make symbol value for @h30 fixup expression
+ equal to O_constant.
+ (md_assemble): Call dwarf2_emit_insn.
+ Include "dwarf2dbg2.h". Formatting fixes throughout file.
+ * config/tc-arc.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+ * doc/c-arc.texi (ARC_CORE_DEFAULT): Update to new default.
+
+ 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (mn10300_force_relocation): Don't
+ optimize differences between symbols in code sections to
+ constants.
+ (mn10300_fix_adjustable): Don't adjust to section+offset
+ relocations pointing at symbols in code sections.
+
+ 2001-05-14 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (md_assemble): Anchor dwarf2 line info
+ before a relaxable insns.
+
+ 2001-05-13 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (tc_gen_reloc): Don't reject differences
+ between symbols if the base symbol is in the current section;
+ emit a PC-relative relocation instead.
+
+ 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (md_apply_fix3): Accept PC-relative relocs.
+
+ 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (md_assemble): Subtract operand->shift
+ from offset in non-pcrel operands too.
+
+ 2001-04-14 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (md_assemble): Simplify offset adjustment of
+ pc-relative relocations not placed at the end of the instruction.
+
+ 2001-04-06 Alexandre Oliva <aoliva@redhat.com>
+ * config/tc-mn10300.c (xr_registers): Added `pc'.
+
+ 2001-03-30 Alan Modra <alan@linuxcare.com.au>
+ * config/tc-mn10300.c (md_estimate_size_before_relax): Rewrite.
+
+ 2001-02-23 Richard Sandiford <rsandifo@redhat.com>
+ * config/tc-mn10300.c (md_apply_fix3): Don't mark a fixup as
+ done if it's against a symbol.
+
+ 2001-03-28 H.J. Lu <hjl@gnu.org>
+ * read.c (equals): Set to local for COFF only if it hasn't been
+ defined before.
+
+ 2001-03-27 Nick Papadonis <nick@coelacanth.com>
+ * read.c (equals): (for COFF) default symbols to being local.
+
+ 2001-03-23 Richard Sandiford <rsandifo@redhat.com>
+ * write.c (fix_new_exp): Print an error if passed a register.
+
+ 2001-03-20 Alan Modra <alan@linuxcare.com.au>
+ * frags.h (struct frag): Add relax_marker.
+ * write.c (is_dnrange): Delete.
+ (relax_frag): Use correct types for `aim', `target', `address'.
+ Delete `offset', `was_address'. Test `relax_marker' instead of
+ using fragile (and slow) address test.
+ (relax_segment): Init and flip `relax_marker'.
+
+ 2001-02-13 Ian Lance Taylor <ian@zembu.com>
+ * write.c (is_dnrange): Stop as soon as the address becomes
+ larger.
+ (relax_frag): Add segment parameter. Only call symbol_get_frag
+ once. Only call is_dnrange if the symbol is in the same segment,
+ and the symbol address is larger.
+ (relax_segment): Pass segment to md_relax_frag and relax_frag.
+ * write.h (relax_frag): Update declaration.
+ * config/tc-fr30.c (fr30_relax_frag): Add segment parameter. Pass
+ it to relax_frag.
+ * config/tc-m32r.c (m32r_relax_frag): Likewise.
+ * config/tc-m32r.h (md_relax_frag): Add segment parameter.
+ (m32r_relax_frag): Update declaration.
+ * config/tc-mips.h (md_relax_frag): Add segment parameter.
+ * config/tc-tic54x.h (md_relax_frag): Likewise.
+ * doc/internals.texi (CPU backend): Update documentation for
+ md_relax_frag.
+
+ 2001-03-15 DJ Delorie <dj@redhat.com>
+ * stabs.c (s_stab_generic): Don't corrupt the notes obstack by
+ blindly freeing string if it isn't at the top of the obstack.
+
+2001-05-14 Richard Henderson <rth@redhat.com>
+
+ * ehopt.c (eh_frame_convert_frag): Fix missed subtype adjustment
+ last change.
+
+2001-05-14 Richard Henderson <rth@redhat.com>
+
+ * ehopt.c (get_cie_info): Rename from eh_frame_code_alignment;
+ also collect whether to expect an FDE augmentation.
+ (check_eh_frame): Rewrite as a state machine. Track where in
+ an FDE we are located, skip any augmentation.
+ (eh_frame_estimate_size_before_relax): Get code alignment from
+ the fragment subtype.
+ (eh_frame_relax_frag, eh_frame_convert_frag): Likewise.
+ * read.c (emit_leb128_expr): Call check_eh_frame.
+
+2001-05-09 Richard Henderson <rth@redhat.com>
+
+ * config/tc-ia64.c (generate_unwind_image): Align the fragment
+ beginning a function's unwind info block.
+
+2001-04-27 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (dot_spillmem_p): Fix output_spill_?sprel_p()
+ argument passing order: predicate goes last, not first.
+
+2001-04-16 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in: Add the em type for FreeBSD targets.
* configure: Regenerate.
- * doc/c-i370.texi: New file.
- * doc/all.texi: Include it.
- * doc/as.texinfo: And here.
- * doc/Makefile.am(CPU_DOCS): Add c-i370.texi.
- * doc/Makefile.in: Regenerate.
-
-2000-02-19 Michael Meissner <meissner@redhat.com>
-
- * config/tc-d30v.c (parallel_ok): Use FLAG_NOT_WITH_ADDSUBppp to
- determine if an instruction can be used in parallel with an ADDppp
- or SUBppp instruction.
-
-2000-02-22 Andrew Haley <aph@cygnus.com>
-
- * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64.
-
-1999-12-30 Andrew Haley <aph@cygnus.com>
-
- * config/tc-mips.c (mips_gp32): New variable.
- (macro_build) Use mips_gp32.
- (mips_ip): Ditto.
- (md_longopts): Add "-mgp32" and "-mgp64".
- (md_parse_option): Add OPTION_GP32 and OPTION_GP64.
-
-2000-02-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * config/obj-coff.c (add_lineno): Accept non-positive lineno with
- warning, and bump it to 1.
-
-2000-02-22 Ian Lance Taylor <ian@zembu.com>
+2001-04-13 Jim Wilson <wilson@redhat.com>
- From Brad Lucier <lucier@math.purdue.edu>:
- * dwarf2dbg.c (print_stats): Add cast to force printf argument to
- match format.
+ * tc-ia64.c (is_conditional_branch): Return true for br, brl, and br.
+ excluding br.i.
-2000-02-21 Catherine Moore <clm@cygnus.com>
+2001-04-02 Philip Blundell <philb@gnu.org>
- * config/tc-mips.c (MF_HILO_INSN): Define.
- (mips_7000_hilo_fix): Declare.
- (append_insn): Conditionally insert nops after an mfhi/mflo insn.
- (md_parse_option): Check for 7000_HILO_FIX options.
- (OPTION_M7000_HILO_FIX): Define.
- (OPTION_NO_M7000_HILO_FIX): Define.
- * doc/c-mips.texi (-mfix7000): Describe.
+ From 2001-03-17 Richard Henderson <rth@redhat.com>
+ * dwarf2dbg.c (user_filenum, user_filenum_allocated): Remove.
+ (dwarf2_directive_loc): Don't use them.
+ (dwarf2_directive_file): Reject duplicate file definitions.
+ (get_filenum): Zero allocated memory.
+ (out_file_list): Complain about missing file definitions.
-2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * listing.c (print_lines): Remove unused variable `end'.
+2001-03-31 Alan Modra <alan@linuxcare.com.au>
- * config/tc-i386.c (md_assemble): Use `reloc()' to select reloc
- type for JumpInterSegment output. Use enum bfd_reloc_code_real for
- reloc_type when BFD_ASSEMBLER.
- (md_estimate_size_before_relax): Use enum bfd_reloc_code_real for
- reloc_type when BFD_ASSEMBLER. Move common code out of switch
- statement and quell signed vs. unsigned comparison warning.
+ * listing.c (listing_listing): Enable listing on EDICT_NOLIST_NEXT
+ for one line if not already enabled.
+ * cond.c (s_elseif): Correct conditional assembly listing.
+ (s_else): Likewise.
-2000-02-18 Nick Clifton <nickc@cygnus.com>
+ * cond.c (s_endif): Correct handling of "if .. elseif .." trees.
+ Don't abort on NULL current_cframe.
- * config/tc-d10v.c (find_opcode): Add a symbol's value to
- the computed frag offset, rather than overwriting it.
+2001-03-30 Richard Henderson <rth@redhat.com>
-Thu Feb 17 00:11:08 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+ * write.c (relax_seg, size_seg): Split from relax_and_size_seg.
+ (write_object_file): Relax code then data, then size sections.
- * config/tc-sh.c ("elf/sh.h"): Include.
- (sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables.
- (md.begin): Initialize target_arch.
- Only include opcodes in has table that match selected architecture.
- (parse_reg): Recognize register names for sh-dsp.
- (parse_at): Recognize post-modify addressing.
- (get_operands): The leading space is now optional.
- (get_specific): Remove FDREG_N support. Add support for sh-dsp
- arguments. Update valid_arch.
- (build_Mytes): Add support for SDT_REG_N.
- (find_cooked_opcode): New function, broken out of md_assemble.
- (assemble_ppi, sh_elf_final_processing): New functions.
- (md_assemble): Use find_cooked_opcode and assemble_ppi.
- (md_longopts, md_parse_option): New option: -dsp.
- * config/tc-sh.h (elf_tc_final_processing): Define.
- (sh_elf_final_processing): Declare.
+ * config/tc-i386.c (md_convert_frag): Don't die on local symbols
+ that have been finalized.
-Fri Feb 11 14:21:51 2000 Jeffrey A Law (law@cygnus.com)
+2001-03-28 Alan Modra <alan@linuxcare.com.au>
- * config/tc-hppa.c (pa_build_unwind_subspace): Use subseg_new to create
- the unwinder subspace. Save the current seg/subseg before creating
- the new seg/subseg.
+ * config/tc-hppa.c (DEFAULT_LEVEL): Define.
+ (md_begin): Use it when setting default architecture.
-2000-02-10 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-mcore.c (INST_BYTE0): Redefine to handle big and
- little endian targets.
- (INST_BYTE1): Redefine to handle big and little endian
- targets.
- (cpu_type): New type: Select between M340 and M210.
- (parse_psrmod): New function: Parse the PSRCLR and PSRSET
- instructions of the M340.
- (md_assemble): Add support for the MULSH and OPSR classes of
- instructions.
- (md_atof): Add support for little endian targets.
- (md_parse_option): Add support for -EL, -EB and -mcpu command
- line switches.
- (md_convert_frag): Add support for little endian targets.
- (md_apply_fix3): Add support for little endian targets.
- (md_number_to_chars): Add support for little endian targets.
-
-2000-02-10 Timothy Wall <twall@redhat.com>
-
- * read.c (read_a_source_file): If TC_START_LABEL_WITHOUT_COLON is
- defined, use it to verify the symbol just read should be a label.
-
-2000-02-10 Timothy Wall <twall@redhat.com>
-
- * app.c (do_scrub_chars): Handle "||" for parallel instructions
- when DOUBLEBAR_PARALLEL is defined. Avoid stripping whitespace
- around colons when KEEP_WHITE_AROUND_COLON is defined.
- * doc/internals.texi (CPU backend): Document DOUBLEBAR_PARALLEL
- and KEEP_WHITE_AROUND_COLON.
-
-2000-02-08 Timothy Wall <twall@redhat.com>
-
- * read.c (s_rept): Call do_repeat, which abstracts the repeat
- logic.
- (do_repeat): New. Abstract repeat logic so that a "break" can be
- implemented.
- (end_repeat): New. Provide support for a "break" out of the
- repeat loop.
- * read.h: Add prototypes for new functions.
-
-2000-02-08 Timothy Wall <twall@redhat.com>
-
- * doc/internals.texi: Document NUMBERS_WITH_SUFFIX macro.
- * as.h: Provide a default NUMBERS_WITH_SUFFIX definition (zero).
- * expr.c: Handle numbers with suffixes if NUMBERS_WITH_SUFFIX is
- non-zero.
-
-2000-02-08 Timothy Wall <twall@redhat.com>
-
- * read.c: Added elseif to directives table.
- * read.h: Added prototype for s_elseif.
- * doc/as.texinfo: Added description for elseif.
- * cond.c (s_elseif): New function
-
-2000-02-04 Timothy Wall <twall@redhat.com>
-
- * listing.c (print_lines): Remove conditionals causing bug in
- listings.
-
-2000-02-03 Timothy Wall <twall@cygnus.com>
-
- * as.h: Define OCTETS_PER_BYTE and OCTETS_PER_BYTE_POWER
- default values.
- * frags.c (frag_new): Calculate fr_fix in octets
- (frag_now_fix) Return offset as target address offset (bytes).
- (frag_now_fix_octets) New - Return offset in octets (8-bit
- quantities).
- * frags.h: Added prototype for frag_now_fix_octets().
- Distinguish between octets and bytes in field descriptions.
- * listing.c (calc_hex): Account for octets vs bytes when
- printing addresses/offsets.
- (print_lines) Ditto. Also, if LISTING_WORD_SIZE is not 1, and
- target is little-endian, print the octets in a word in big-endian
- order so that the display looks like a proper hexadecimal number,
- instead of having the octets reversed.
- * read.c (do_align): When recording alignment, alignment power
- should be in terms of target bytes (minimum addressible unit)
- instead of octets.
- (do_org) Convert ORG target address (byte) argument into an
- octet offset when generating a variable fragment.
- * symbols.c (resolve_symbol_value): Symbol final value
- converted to a target address offset (bytes) from its octet offset.
- * config/obj-coff.c (coff_frob_symbol): Symbol target address
- offset (bytes) is adjusted by the frag offset (octets) converted
- to bytes.
- (coff_frob_section) Section alignment power is in terms of bytes;
- convert it to an octet alignment power when calculating size (and
- size mask) in octets. Don't modify the section size in order to
- "align" it for TI COFF, since that format has a different method
- for storing alignment information.
-
-2000-02-01 Timothy Wall <twall@cygnus.com>
-
- * stabs.c (generate_asm_file): Escape backslashes in stabs file
- entries, matching the way GCC generates them. If not escaped, the
- filename is encoded incorrectly.
-
-2000-01-31 Nick Clifton <nickc@cygnus.com>
- * config/tc-arm.c (reg_table): Add support for ATPCS register
- naming conventions.
-
-2000-01-31 Geoff Keating <geoffk@cygnus.com>
-
- * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if
- already defined.
- * config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES):
- New macro.
- * config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag
- of a symbol when we really care about its value.
-
-2000-01-19 Chandra Chavva <cchavva@cygnus.com>
-
- * config/tc-mcore.c (md_assemble): Give warning message if
- operands passes to instruction are more than the spec.
-
-2000-01-27 Thomas de Lellis <tdel@windriver.com>
-
- * config/tc-arm.c (armadjust_symtab): If the assembler is in
- Thumb mode but the label seen was not declared as '.thumb_func'
- then set the ST_INFO type to STT_ARM_16BIT mode. This allows
- correct disassembly of Thumb code bounded by non function labels.
-
-2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c
- Add dependencies for e-i386aout.o. Fix 2 comment lines.
-
- * Makefile.in: Same here.
- Update copyright.
-
- * configure.in: Set bfd_gas for i386-aout when primary target
- is bfd. Handle i386aout emulation. Don't use te_file=multi, as
- we may need the primary te_file. Remove incorrect comment.
+2001-03-27 Hans-Peter Nilsson <hp@axis.com>
+ * configure.in (cris-*-*): Change default emulation to criself.
+ (cris-*-*aout*): New rule.
* configure: Regenerate.
- * config/e-i386aout.c: New file.
-
- * as.c (USE_EMULATIONS): Move to before print_version_id.
- (struct emulation): Add i386aout.
- (show_usage): Split text strings. Reformat -a text. Add --em
- help.
- Update copyright.
-
- * obj.h (struct format_ops): Add s_get_other and s_get_desc.
- (aout_format_ops): New.
- Update copyright.
-
- * read.c (s_lcomm_internal): Rewrite OBJ_AOUT,OBJ_BOUT
- preprocessor conditional and add aout USE_EMULATIONS tests.
- (read_a_source_file): Don't pass error strings to printf as
- format arg.
- Update copyright.
-
- * gasp.c (exp_get_abs): Don't pass error strings to printf as
- format arg.
- (do_data): Same here.
- (process_file): And here.
- Update copyright.
-
- * symbols.c (colon): Rewrite "already defined" fatal message
- code for aout with USE_EMULATIONS.
- Update copyright.
-
- * config/obj-aout.c (OBJ_HEADER): Define.
- (obj_pseudo_table): Rename to aout_pseudo_table. Init all
- fields of sentinel.
- (obj_aout_frob_symbol): Expand S_GET_DESC, S_GET_TYPE,
- S_GET_OTHER, S_SET_TYPE macros since we don't need obj-multi
- forms here.
- (obj_aout_type): Expand S_SET_OTHER here too.
- (obj_read_begin_hook): Remove.
- (aout_pop_insert): New.
- (obj_aout_s_get_other): New.
- (obj_aout_s_get_desc): New.
- (aout_format_ops): New.
- Update copyright.
-
- * config/obj-aout.h (obj_pop_insert): Define so non-multi usage
- gets aout_pseudo_table.
- (aout_pseudo_table): Declare.
- (obj_read_begin_hook): Define.
- Update copyright.
-
- * config/obj-coff.c (obj_pseudo_table): Rename to
- coff_pseudo_table.
- (coff_pop_insert): Use coff_pseudo_table.
- (coff_sec_sym_ok_for_reloc): Remove.
- (coff_format_ops): Add 0 entries for s_get_size, s_set_size,
- and comment all zero entries and remove #if 0 code.
- Update copyright.
-
- * config/obj-coff.h (obj_pop_insert): Define.
- (coff_pseudo_table): Declare.
- Update copyright.
-
- * config/obj-ecoff.c (ecoff_format_ops): Add 0 entries for
- s_get_size, s_set_size. Comment all zero entries.
- Update copyright.
-
- * config/obj-elf.c (elf_s_get_other): New function.
- (obj_read_begin_hook): Rename to elf_obj_read_begin_hook.
- (obj_symbol_new_hook): Rename to elf_obj_symbol_new_hook.
- (elf_format_ops): Add elf_s_get_other, 0 s_get_size entry, and
- comment.
- (obj_elf_parse_section_letters): Don't pass error strings to
- printf as format arg.
- Update copyright.
-
- * config/obj-elf.h (ECOFF_DEBUGGING): Define when
- OBJ_MAYBE_ECOFF.
- (elf_s_get_other): Declare.
- (S_GET_OTHER) Define as elf_s_get_other if not already
- defined.
- (S_SET_OTHER): Only define when not already defined.
- (elf_obj_read_begin_hook): Declare.
- (obj_read_begin_hook): Define.
- (elf_obj_symbol_new_hook): Declare.
- (obj_symbol_new_hook): Define.
- Update copyright.
-
- * config/obj-multi.h: Add copyright header and protect against
- multiple inclusion. Add * to all function pointers.
- (OBJ_HEADER): If defined, include it rather than other defines
- in this file.
- (obj_frob_file_after_relocs): Test for NULL.
- (obj_symbol_new_hook): Here too.
- (obj_sec_sym_ok_for_reloc): And here.
- (S_GET_OTHER): Define.
- (S_GET_DESC): Define.
- (ECOFF_DEBUGGING): Remove as it's done in obj-elf.h
- (OBJ_MAYBE_ELF): Update comment.
-
- * config/tc-i386.c (i386_immediate): Add OBJ_MAYBE_AOUT to
- OBJ_AOUT preprocessor conditional and handle emulation by
- testing OUTPUT_FLAVOR.
- (i386_displacement): Here too.
- (md_section_align): Similarly here.
- (i386_target_format): Conditionally compile when more than one
- of OBJ_MAYBE_{ELF,COFF,AOUT} defined. Add aout case.
- (i386_immediate): Fix error message for aout BFD_ASSMBLER.
- (i386_displacement): Here too.
- Update copyright.
-
- * config/tc-i386.h (AOUT_TARGET_FORMAT): Define for each TE_*.
- Define TARGET_FORMAT for aout only when not multi.
- Update copyright.
-
- * config/te-multi.h: Delete file as it's identical to te-generic.h
+2001-03-19 Alan Modra <alan@linuxcare.com.au>
-2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-i386.c (md_assemble <REGISTER_WARNINGS>): Correct
+ used register name.
- * config/tc-i386.h (DWORD_MNEM_SUFFIX): Delete.
- * config/tc-i386.c (DWORD_MNEM_SUFFIX): Rename all occurrences to
- LONG_MNEM_SUFFIX.
+2001-03-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
- * config/tc-i386.h (INTEL_DWORD_MNEM_SUFFIX): Rename to
- DWORD_MNEM_SUFFIX.
- * config/tc-i386.c (INTEL_DWORD_MNEM_SUFFIX): Here too. Fix some
- comments.
-
-2000-01-13 Clinton Popetz <cpopetz@cygnus.com>
+ * config/tc-m68hc11.c (md_pseudo_table): Recognize xrefb to comply
+ with 'Motorola specification for assembly language input standard'.
- * config/tc-mips.c (mips_do_align): New function.
- * config/tc-mips.h (md_do_align): Define.
+2001-03-18 Dave Brolley <brolley@redhat.com>
-2000-01-10 Philip Blundell <philb@gnu.org>
+ * config/tc-m32r.c (expand_debug_syms): Call frag_align_code rather
+ than m32r_do_align.
- * doc/c-arm.texi (ARM Options): Fix typo.
- (ARM-Chars): Correct description of `#'. Mention that `;' is a
- line separator for Linux.
- * doc/as.texinfo (Comments): Mention the ARM.
+2001-03-16 Philip Blundell <philb@gnu.org>
-2000-01-10 Philip Blundell <pb@futuretv.com>
-
- * configure.in (arm*-*-conix*): New target.
- (arm*-*-linux-gnu*): Match instead of arm-*-linux* and
- armv*-*-linux-gnu.
* configure: Regenerate.
-2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
-
- * config/obj-elf.c (elf_pseudo_table): Define visibility pseudos.
- (obj_elf_visibility): New function.
-
- * doc/as.texinfo (Visibility): New node: document visibility
- pseudo ops.
-
-1999-12-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (MATCH): Relax JumpAbsolute check. Emit a
- warning for absolute jump/call without `*' in non-intel mode. No
- need to set i.types[0] JumpAbsolute in intel mode.
-
-1999-12-22 Philip Blundell <pb@futuretv.com>
-
- * config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate
- hook function when changing sections.
- (arm_s_data): Likewise.
-
-1999-12-14 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_parse_option): Add support for -marm720
- command line switch.
-
-Tue Nov 30 22:59:00 1999 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (md_pseudo_table): Add ".am33" pseudo-op.
- (r_registers, xr_registers): Define.
- (r_register_name, xr_register_name): New functions.
- (md_assemble): Handle new am33 operand types and instruction
- formats.
- (mn10300_insert_operand, check_operand): Likewise.
-
-1999-11-29 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (thumb_mode): Turn into a tristate variable.
- (s_force_thumb): Set thumb_mode to 2.
- (md_assemble): Do not complain about thumb instructions on a
- non-thumb target if thumb_mode is set to 2.
-
-1999-11-28 Michael Meissner <meissner@cygnus.com>
-
- * config/tc-alpha.c (toplevel): Include struc-symbol.h.
- (alpha_macro_arg): Add MACRO_{LITERAL,BASE,BYTOFF,JSR} cases.
- (O_...): Add new machine dependent expressions if we are handling
- explicit relocations.
- (alpha_reloc_op): New static table holding the explicit relocation
- information.
- (alpha_literal_hash): New static to hold the hash table for
- explicit relocations.
- (alpha_macros): Add support for explicit relocations.
- (md_begin): If explicit relocations, initialize hash table.
- (md_assemble): Don't print a second error if tokenize_arguments
- already printed an error message.
- (md_apply_fix): Add support for explicit relocations.
- (alpha_force_relocation): Ditto.
- (alpha_fix_adjustable): Ditto.
- (alpha_adjust_symtab): New function to support explicit
- relocations.
- (alpha_adjust_symtab_relocs): Ditto.
- (debug_exp): Debug stub compiled if DEBUG_ALPHA is defined.
- (tokenize_arguments): Add debug code if DEBUG_ALPHA is defined.
- Add support for explicit relocations. Return -2 if an error
- message was already printed.
- (find_macro_match): Add support for explicit relocations. Comment
- each of the cases.
- (emit_insn): Add support for explicit relocations.
- (assemble_tokens): Ditto.
- (emit_ldgp): Ditto.
- (load_expression): Ditto.
- (emit_lda): Ditto.
- (emit_ldah): Ditto.
- (emit_ir_load): Ditto.
- (emit_loadstore): Ditto.
- (emit_ldXu): Ditto.
- (emit_ldil): Ditto.
- (emit_sextX): Ditto.
- (emit_division): Ditto.
- (emit_jsrjmp): Ditto.
- (emit_retjcr): Ditto.
-
- * config/tc-alpha.h (RELOC_OP_P): Enable explicit relocations if
- ELF object format.
- (tc_adjust_symtab): If explicit relocations, call the function
- alpha_adjust_symtab.
- (TC_FIX_TYPE): Add fields to be able to move explicit lituse
- relocations next to the literal relocation they reference.
- (TC_INIT_FIX_DATA): Initialize the new fields.
- (TC_FIX_DATA_PRINT): Print the new fields if DEBUG5 is defined.
-
-Wed Nov 24 20:27:58 1999 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-hppa.c (pa_ip): Handle PA2.0 unit completers. Handle
- 'B' operand for PA2.0 bb instruction.
-
-1999-11-18 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-mcore.h (TC_FORCE_RELOCATION): Define for Mcore-pe
- target.
-
- * config/tc-mcore.c (tc_gen_reloc): Support generation of RVA
- relocs.
- (mcore_force_relocation): Force relocations to be generated for
- RVA relocs.
-
-1999-11-16 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (i386_immediate): Disallow O_big immediates.
- (i386_displacement): Disallow O_big displacements.
-
-Mon Nov 15 20:12:43 1999 Donald Lindsay <dlindsay@cygnus.com>
-
- * config/tc-arm.c (do_mia,do_mar,do_mra,do_pld,do_ldrl,do_co_reg): Small
- improvements in error checking.
- (md_assemble): Support for unconditional ARM instructions.
- (md_parse_option): Support for -m[arm]v5e flag.
-
-1999-11-12 Nick Clifton <nickc@cygnus.com>
-
- * macro.c (buffer_and_nest): Do not check beyond the end of the
- buffer.
-
-1999-11-11 Nick Clifton <nickc@cygnus.com>
-
- * macro.c (buffer_and_nest): Look for seperator after TO and
- FROM tokens.
-
-1999-11-08 Andrew Haley <aph@cygnus.com>
-
- * app.c (do_scrub_chars): When in State 10, treat backslash
- characters in the same way as as symbol characters.
-
-1999-11-07 Richard Henderson <rth@cygnus.com>
-
- * config/tc-alpha.c (alpha_align): Check, don't assert, that
- the previous label was in the current section before playing
- with auto-alignment.
-
-1999-11-06 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c (v850_force_relocation): Force relocation
- for weak symbols.
- (v850_pcrel_from_selection): Do not compute a pcrel offset if
- the symbol is weak.
-
-1999-11-05 Michael Meissner <meissner@cygnus.com>
-
- * expr.h (operatorT): Increase machine dependent operators to 16.
- * expr.c (op_rank): Ditto.
+2001-03-15 David Mosberger <davidm@hpl.hp.com>
-1999-11-03 Ian Lance Taylor <ian@zembu.com>
+ * config/tc-ia64.c (md): New member keep_pending_output.
+ (ia64_flush_pending_output): Flush only if md.keep_pending_output
+ is not set.
+ (dot_xdata): Turn on md.keep_pending_output for the duration of
+ this function.
+ (dot_xfloat_cons): Ditto.
+ (dot_xstringer): Ditto.
+ (dot_xdata_ua): Ditto.
+ (dot_xfloat_cons_ua): Ditto.
- * read.c (pseudo_set): Reject attempts to set the value of a
- section symbol.
-
- * config/obj-elf.c (obj_elf_ident): Call md_flush_pending_output
- if it is defined.
-
- * config/obj-elf.c (elf_set_index): Add ATTRIBUTE_UNUSED.
-
- * config/obj-elf.c (elf_frob_file_after_relocs): Don't pass NULL
- to bfd_set_section_contents.
-
-1999-11-03 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-mcore.h (TARGET_BYTES_BIG_ENDIAN): Change to false.
-
-1999-11-01 Gavin Romig-Koch <gavin@cygnus.com>
-
- * config/tc-mips.c (macro_build): Use OPCODE_IS_MEMBER.
- (mips_ip): Use OPCODE_IS_MEMBER.
-
-Wed Oct 27 16:50:44 1999 Don Lindsay <dlindsay@cygnus.com>
-
- * config/tc-arm.c (reg_required_here): Improve comments.
-
- * config/tc-arm.c (thumb_opcode): Add "variants" field.
- (tinsns): Initialize variants field.
-
- * config/tc-arm.c (bad_args, bad_pc): Renamed to BAD_ARGS and
- BAD_PC respectively.
-
-1999-10-27 Scott Bambrough <scottb@netwinder.org>
-
- * config/tc-arm.c (reloc_map[]): Fix compiler warning.
- * config/tc-arm.h: Fix compile time warnings.
-
-Mon Oct 18 18:11:10 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
-
- * tc_d10v.c (find_opcode): Allow ATSIGN to match expressions of the
- form @abs16, @(abs16) and @(abs16 + imm).
-
-1999-10-21 Gavin Romig-Koch <gavin@cygnus.com>
-
- * config/tc-mips.c (ISA_HAS_COPROC_DELAYS) : New.
- (ISA_HAS_64_BIT_REGS) New.
- (gpr_interlocks,md_begin,reg_needs_delay,append_insn,
- mips_emit_delays,macro_build,load_register,load_addresss,
- macro,macro2,mips_ip,s_cprestore,s_cpadd): Simplify
- and/or use new ISA_xxx macros in expressions involving
- ISA, particularly mips_opts.isa.
-
-1999-10-18 Michael Meissner <meissner@cygnus.com>
-
- * expr.h (operatorT): Add machine dependent operators md1..md8.
- (expressionS): Make X_op 8 bits instead of 7. Add a X_md field
- for the machine dependent operators to use.
-
- * expr.c (op_rank): Add machine dependent operators.
-
- * config/tc-alpha.c (O_pregister): Define as a machine dependent
- operator.
- (O_cpregister): Ditto.
- (md_begin): Change X_op test that field is wide enough to use
- O_max instead of O_alpha_max.
- (cpu_types): Fill in missing initializer.
- (alpha_num_macros): Make unsigned.
- (md_assemble): Make opnamelen be size_t.
- (md_apply_fix): Cast alpha_num_operands to int before testing.
- (alpha_force_relocation): Ditto.
- (alpha_fix_adjustable): Ditto.
- (alpha_fix_adjustable): Mark unused arguments ATTRIBUTE_UNUSED.
- (tc_gen_reloc): Ditto.
- (tc_get_register): Ditto.
- (emit_ldgp): Ditto.
- (emit_lda): Ditto.
- (emit_ldah): Ditto.
- (emit_ldil): Ditto.
- (s_alpha_ent): Ditto.
- (s_alpha_end): Ditto.
- (s_alpha_frame): Ditto.
- (s_alpha_prologue): Ditto.
- (s_alpha_file): Ditto.
- (s_alpha_gprel32): Ditto.
- (s_alpha_proc): Ditto.
- (s_alpha_set): Ditto.
- (s_alpha_base): Ditto.
- (s_alpha_align): Ditto.
- (s_alpha_arch): Ditto.
- (alpha_align): Ditto.
- (assemble_insn): Suppress unused variable warning.
- (emit_insn): Ditto.
- (assemble_insn): Don't assume X_op and X_unsigned are in a given
- order in the structure.
- (s_alpha_coff_wrapper): Avoid int/unsigned comparison.
-
-Sun Oct 17 17:15:58 1999 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-hppa.c (md_apply_fix): Make "fmt" an int.
-
-1999-10-12 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (i386_index_check): Correct #endif location.
-
-Mon Oct 11 14:02:40 1999 Geoffrey Keating <geoffk@cygnus.com>
-
- * as.c (show_usage): Document new options.
- (parse_args): Add --no-warn, --warn, --fatal-warnings,
- which become 'W', OPTION_WARN, and OPTION_WARN_FATAL.
- (parse_args): Parse the new options.
- (main): If there were warnings, and --fatal-warnings
- was specified, print an error.
- * as.h: New variable, flag_fatal_warnings, for new option.
-
-Sun Oct 10 01:47:23 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org>
-
- * config/tc-hppa.c (pa_ip): Add new codes 'cc', 'cd', 'cC', 'co',
- '@'. Change autoincrement completers to fall through to cache control
- completers.
-
- * config/tc-hppa.c (pa_ip): Remove unused args. Add code to '?W'
- arg.
- (pa_parse_addb_64_cmpltr): New function.
-
- * config/tc-hppa.c (pa_ip): Change error message.
- (pa_ip,pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr) Fix '?N' and
- '?Q' args to allow falling through.
-
- * configtc-hppa.c (pa_ip): Implement conditional codes "?N", "?Q".
- Remove unused conditional codes.
- (pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr): New.
-
-Thu Oct 7 00:23:53 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
-
- * config/tc-d30v.c (CHAR_BIT): Define.
- (check_range): Fix bit operations to support integers bigger than
- 32 bits.
-
-Thu Oct 7 00:11:50 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
-
- * config/tc-d10v.c (check_range): Check range for RESTRICTED_NUM3
- operands.
+2001-03-15 Jim Wilson <wilson@redhat.com>
-Mon Oct 4 17:24:23 1999 Nick Clifton <nickc@cygnus.com>
- Doug Evans <devans@cygnus.com>
+ * config/tc-ia64.c (ia64_unrecognized_line, case '['): Add local
+ label support.
- Add support for m32rx.
- * config/tc-m32r.c (enable_m32rx): New static global.
- (enable_special,warn_explicit_parallel_conflicts,optimize): Ditto.
- (allow_m32rx): New function.
- (M32R_SHORTOPTS): Add `O'.
- (md_longopts): Add --m32rx plus several warning options.
- (md_parse_option): Handle new options.
- (md_show_usage): Print them.
- (md_begin): Enable m32rx.
- (OPERAND_IS_COND_BIT): New macro.
- (first_writes_to_seconds_operands): New function.
- (writes_to_pc,can_make_parallel,make_parallel): New functions.
- (target_make_parallel,assemble_two_insns): New functions.
- (md_assemble): Recognize "insn1 -> insn2" and "insn1 || insn2".
- If optimizing and m32rx, try to make consecutive insns parallel.
+2001-03-11 Philip Blundell <philb@gnu.org>
-Tue Sep 28 14:06:44 1999 Geoffrey Keating <geoffk@cygnus.com>
+ * configure.in: Set version to 2.11.
- * config/tc-mips.c (nopic_need_relax): Allow for the
- .sdata.foo sections generated by -fdata-sections,
- and for the .gnu.linkonce.s sections generated by C++.
+2001-02-28 Andreas Jaeger <aj@suse.de>, Bo Thorsen <bo@suse.de>
-Thu Sep 23 07:13:45 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+ * config/tc-i386.c (tc_gen_reloc): Remove ugly hack which is not needed
+ anymore since we use bfd_elf_generic_reloc now.
+ (md_apply_fix3): Only apply hack for partial_inplace if not using RELA.
- * config/tc-hppa.c (pa_ip): Replace 'B', 'M', 'l' and 'g' handling
- with cleaner code using completer prefixes. Add 'Y'.
+2001-02-21 David Mosberger <davidm@hpl.hp.com>
- * config/tc-hppa.c (pa_ip): Add parens to silence compiler.
+ * config/tc-ia64.c (enum operand_match_result): New type.
+ (operand_match): Change return type to operand_match_result.
+ Fix all returns appropriately, adding support for returning the
+ out-of-range result.
+ (parse_operands): New locals result, error_pos, out_of_range_pos,
+ curr_out_of_range_pos. Rewrite operand matching loop to give better
+ error messages.
-Wed Sep 22 09:37:19 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-21 David Mosberger <davidm@hpl.hp.com>
- * config/tc-hppa.c (pa_ip): Avoid ANSI specific initialization.
- (pa_ip, case 'm'): Failure to get a CBIT specifier just means the
- insn does not match and we should try the next insn in the table.
+ * config/tc-ia64.c (struct unwind): Add member "prologue_count".
+ (dot_proc): Clear unwind.prologue_count to zero.
+ (dot_prologue): Increment unwind.prologue_count.
+ (dot_restore): If second operand is omitted, use
+ unwind.prologue_count -1 for "ecount" (# of additional regions to
+ pop). Decrement unwind.prologue_count by number of regions
+ popped.
-1999-09-22 Nick Clifton <nickc@cygnus.com>
+2001-02-20 Bo Thorsen <bo@suse.de>
- * config/tc-arm.c (MULTI_SET_PSR): Rename to LDM_TYPE_2_OR_3.
+ * config/tc-i386.c (tc_i386_fix_adjustable): Fix GOTPCREL GOT
+ entry.
-Mon Sep 20 04:01:41 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-18 David O'Brien <obrien@FreeBSD.org>
- * config/tc-hppa.c (pa_ip): Fix thinkos in recent cleanup
- of PA2.0 support.
-
-1999-09-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * config/tc-i386.c (md_shortopts): Check OBJ_MAYBE_ELF as well as
- OBJ_ELF. If ELF, add "sq".
- (md_parse_option): If ELF, ignore -s and -q.
- (md_show_usage): Mention ELF options.
-
-Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-hppa.c (pa_ip): Handle 'J', 'K' and 'cc'
- operands.
+ * configure.in (cpu_type, arch): Add a generic FreeBSD specification as
+ all FreeBSD platforms should look the same at this level.
+ * configure: Rebuilt.
+ * config/tc-i386.c: Add support for old FreeBSD a.out hosts.
+
+2001-02-14 Philip Blundell <pb@futuretv.com>
+
+ From 2001-02-06 H.J. Lu <hjl@gnu.org>
+ * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): Do fixup if
+ there is no relocation.
+
+ From 2001-02-06 H.J. Lu <hjl@gnu.org>
+ * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): New. Defined.
+ * config/tc-ia64.c (md_parse_option): Only accept the valid
+ ia64 options on "-axxx".
+
+2001-02-13 Alan Modra <alan@linuxcare.com.au>
+
+ * expr.c (operator): Don't bump input_line_pointer for two char
+ operators. Instead return operator size via new param num_chars.
+ (expr): Use above to parse multi-char operators correctly.
- * config/tc-hppa.c (pa_ip); Handle "fe", and 'cJ'.
+2001-02-12 Philip Blundell <pb@futuretv.com>
- * config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'.
+ * config/tc-arm.c (do_ldst): Improve warnings for unpredictable
+ ldrt/strt instructions.
- * config/tc-hppa.c (struct pa_it): New field "trunc".
- (pa_ip): Hadnle 'h', 'm', '=', '{', and '_' operands.
- (pa_parse_ftest_gfx_completer): New function
- (pa_parse_fp_cnv_format): New function.
+Mon Feb 12 17:44:08 CET 2001 Jan Hubicka <jh@suse.cz>
- * config/tc-hppa.c (pa_ip): Handle 'X' operand.
- (md_apply_fix): Handle 22bit pc-rel branches.
+ * tc-i386.c (i386_displacement): Fix handling of
+ BFD_RELOC_X86_64_GOTPCREL.
+ (i386_validate_fix): Likewise.
- * config/tc-hppa.c (pa_ip): Handle 'B' operand.
+2001-02-09 David Mosberger <davidm@hpl.hp.com>
- * config/tc-hppa.c (pa_ip): Handle 'L' and 'M' operands.
+ * config/tc-ia64.h (md_elf_section_type): New macro.
+ (ELF_TC_SPECIAL_SECTIONS): Drop .IA_64.unwind and .IA_64.unwind_info
+ (they're now handled via ia64_elf_section_type.
- * config/tc-hppa.c (pa_ip): Handle 'l' operand.
+ * config/tc-ia64.c (unwind): New members saved_text_seg,
+ saved_text_subseg, and force_unwind_entry.
+ (optimize_unw_records): New function to optimize away unnecessary
+ unwind directives.
+ (ia64_elf_section_type): New function.
+ (output_unw_records): Generate unwind info only if the size is
+ non-zero or if it's forced for some other reason (e.g.,
+ handlerdata or a personality routine).
+ (generate_unwind_image): Don't switch back to previous
+ section---stay inside the unwind info section instead so that
+ handlerdata that may follow goes into the right place.
+ (dot_handlerdata): Force generation of unwind entry and save the
+ current active text segment before generating unwind image.
+ (dot_unwentry): Force generation of unwind entry.
+ (dot_personality): Ditto.
+ (dot_endp): Generate unwind table entry only if there is
+ some unwind info or the unwind entry was forced.
- * config/tc-hppa.c (pa_ip): Handle 'g' operand.
+ * config/tc-ia64.c (make_unw_section_name): New macro to form
+ unwind section name.
+ (generate_unwind_image): Add "text_name" argument. Use it to
+ form unwind section name.
+ (dot_handlerdata): Determine current segment (section) name and
+ pass it to generate_unwind_image().
+ (dot_endp): Determine current segment (section) name and use
+ it to determine the appropriate unwind section name.
+ (ia64_md_do_align): Add missing ATTRIBUTE_UNUSED declarations to
+ n, fill, and max arguments.
-at Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-09 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling.
- (pa_ip): Handle 'fX'.
+ * config/tc-sh.c (md_pseudo_table): Add uaquad. Use s_uacons for
+ 2byte, 4byte and 8byte.
-Sat Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-08 Alan Modra <alan@linuxcare.com.au>
- * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling.
- (pa_ip): Handle 'fX'.
+ * config/tc-hppa.c (pa_build_unwind_subspace): Don't call
+ md_number_to_chars with size > sizeof (valueT).
-Fri Sep 17 11:57:34 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-05 Jim Wilson <wilson@redhat.com>
- * config/tc-hppa.c (pa_build_unwind_subspace): Do not build
- unwinds unless the function is in the text space.
- (pa_type_args): Set BSF_FUNCTION for an exproted data symbol.
+ * config/tc-ia64.c (errata_nop_necessary_p): Return 0 instead of
+ aborting for invalid operands.
-Wed Sep 15 05:14:32 1999 Jeffrey A Law (law@cygnus.com)
+2001-02-06 Alan Modra <alan@linuxcare.com.au>
- * config/tc-hppa.c (pa_ip): Move dwarf2 stuff from here.
- (md_assemble): To here. Tweak address generation.
+ * config/tc-hppa.c (fix_new_hppa): Pass in unwind directly rather
+ than via pointer. Update all callers.
+ (UNWIND_LOW32): Define.
+ (UNWIND_HIGH32): Define.
+ (pa_build_unwind_subspace): Use the above macros instead of dumping
+ bitfields directly. Call frag_more once rather than multiple times.
+ (md_assemble): Use UNWIND_LOW32.
+ (pa_entry): Likewise
+ (pa_procend): Likewise.
+ (process_exit): Use UNWIND_HIGH32.
- * config/tc-hppa.c: Include dwarf2dbg.h if OBJ_ELF. Declare
- debug_line.
- (md_pseudo_table): Add .file and .line pseudo-ops for OBJ_ELF.
- (md_assemble): Call dwarf2_where for OBJ_ELF.
- (pa_ip): Call dwarf2_gen_line_info for OBJ_ELF.
- (pa_end_of_source): New function.
- * tc-hppa.h (md_end): Define for OBJ_ELF.
+2001-02-04 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-1999-09-14 Michael Meissner <meissner@cygnus.com>
+ * config/tc-m68hc11.h (LISTING_HEADER): Use m68hc11_listing_header
+ function to select the header according to the cpu.
+ (md_after_pass_hook, md_do_align): Remove.
+ (md_cleanup, m68hc11_cleanup): Remove.
+ (md_pcrel_from_section): Declare.
+ * config/tc-m68hc11.c (build_dbranch_insn): Remove insn_size.
+ (build_jump_insn, build_insn): Likewise.
+ (m68hc11_listing_header): New function.
+ (m68hc11_cleanup): Remove.
+
+2001-02-02 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (relaxable_symbol): Relax externally visible
+ symbols because there is no support for shared libraries and these
+ symbols can't be overridden (unless they are weak).
+
+2001-02-01 Momchil Velikov <velco@fadata.bg>
- * configure.in (Canonicalization of target names): Remove adding
- ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
- generates $ac_config_sub with a ${CONFIG_SHELL} already.
- * configure: Regenerate.
+ * dwarf2dbg.c (out_debug_abbrev): Terminate the abbreviations
+ for the compilation unit with a zero byte.
+
+2001-01-30 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (pa_ip): Support 12 bit branches to absolute
+ destinations. Correct range check for 17 and 22 bit branches.
+
+2001-01-25 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-m68k.c (tc_gen_reloc): Do not abort if tcbit is
+ still set. Issue an error message instead.
+ (md_estimate_size_before_relax): Delete unused variable
+ 'buffer_address'. Fixup parentheses around if statement.
+
+2001-01-23 Kazu Hirata <kazu@hxi.com>
+
+ * as.c: Fix formatting.
+ * ehopt.c: Likewise.
+ * messages.c: Likewise.
+ * stabs.c: Likewise.
+ * symbols.c: Likewise.
-1999-09-14 Donn Terry <donn@interix.com>
+2001-01-23 Ben Elliston <bje@redhat.com>
- * config/te-interix.h (GLOBAL_OFFSET_TABLE_NAME): Define.
+ * config/tc-m32r.c (m32r_handle_align): Declare type of fragp.
-1999-09-13 Alan Modra <alan@spri.levels.unisa.edu.au>
+2001-01-22 Kazu Hirata <kazu@hxi.com>
- * config/tc-i386.c (md_assemble): Handle "jmp/call constant" as a
- pc-relative jmp/call to an absolute symbol.
- (md_apply_fix3): When OBJ_ELF, don't add the values in twice for
- absolute section symbols.
+ * config/tc-alpha.c: Fix formatting.
- * config/tc-i386.c (md_assemble): Correct frag_var size. Tidy
- jump handling code and comments.
+2001-01-19 Kazu Hirata <kazu@hxi.com>
-1999-09-12 Ian Lance Taylor <ian@zembu.com>
+ * config/tc-alpha.c: Fix formatting.
- * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to
- the value if TE_PE and a global defined symbol.
+2001-01-18 Kazu Hirata <kazu@hxi.com>
-1999-09-11 Ian Lance Taylor <ian@zembu.com>
+ * config/tc-alpha.c: Fix formatting.
- * write.c (dump_section_relocs): Call print_symbol_value_1 to
- print the symbol, rather than printing it here.
+2001-01-18 Nick Clifton <nickc@redhat.com>
-1999-09-11 Donn Terry <donn@interix.com>
+ * config/tc-arm.c (ldm_flags): Remove redundant bit from "fa" and
+ "da" flags.
+ (stm_flags): Remove redundant bit from "ed" and "da" flags.
- * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
- BFD_RELOC_RVA relocations.
+2001-01-18 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-i386.c (md_undefined_symbol): Compare the name against
- the macro GLOBAL_OFFSET_TABLE_NAME, rather than assuming that it
- starts with "_G".
+ * configure.in (cpu_type, arch): Match i386 too.
+ * configure: Rebuilt.
- * write.c (write_relocs): Call SET_SECTION_RELOCS if it is
- defined.
- * config/obj-coff.h (SET_SECTION_RELOCS): Define.
- * doc/internals.texi (Object format backend): Document
- SET_SECTION_RELOCS.
+2001-01-16 Kazu Hirata <kazu@hxi.com>
- * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
- relocations against global symbols if TE_PE.
+ * config/tc-i386.c: Fix formatting.
- * config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version.
- (obj_pseudo_table): Always handle ".ident" with obj-coff_ident.
+2001-01-16 Alan Modra <alan@linuxcare.com.au>
- * config/obj-coff.c (coff_frob_symbol): Prohibit weak common
- symbols.
+ * config/tc-hppa.c (tc_gen_reloc): Use SEGREL32 instead of DIR32
+ relocs for .PARISC.unwind section.
- * config/obj-coff.c (obj_coff_endef): Don't merge labels, or
- symbols which do not have a constant value, or tags with
- non-tags. Remove the symbol from the list before adding it at the
- end.
+ * config/tc-hppa.c (pa_build_unwind_subspace): Build unwind
+ depending on section flags, not just for .text.
- * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef
- C_FCN symbol differently if TE_PE.
- (obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which
- appears in the pseudo-op, rather coff_line_base which is only set
- for a .bf symbol.
+2001-01-15 Jim Wilson <wilson@redhat.com>
- * config/obj-coff.c (obj_coff_loc): New static function.
- (obj_pseudo_table): Add "loc".
+ * config/tc-ia64.c (ia64_flush_insns): Handle unwind directives
+ not immediately followed by an instruction.
- * config/obj-coff.c (add_lineno): Check that the line number is
- positive.
+2001-01-15 Kazu Hirata <kazu@hxi.com>
- * config/atof-ieee.c (atof_ieee): Change what_kind to int.
- * config/atof-vax.c (flonum_gen2vax): Change format_letter to
- int.
- (md_atof): Return NULL rather than 0.
- * config/tc-i386.c (md_atof): Change type to int.
- * expr.c (expr): Change first parameter to int.
- * config/obj-coff.c: Add declarations for static functions.
- (coff_frob_symbol): Use SYM_AUXENT.
- * config/tc-i386.h (flag_16bit_code): Don't declare.
+ * config/tc-m68hc11.c: Fix formatting.
- * config/obj-coff.c (obj_coff_section): Default to setting
- SEC_LOAD. Don't set SEC_DATA for 'w' modifier.
+2001-01-15 Nick Clifton <nickc@redhat.com>
- * write.c (adjust_reloc_syms): Print adjusted fixup.
+ * symbols.c (colon): Change 'already defined symbol' from a
+ fatal error to an ordinary error. There is no reason why this
+ error should be fatal.
- * expr.c (integer_constant): Correct too_many_digits calculation
- in base 10 case.
+ * message.c (as_fatal): Delete output file, if one has been
+ created.
-1999-09-09 Andreas Schwab <schwab@suse.de>
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
- * doc/c-arm.texi: Fix arguments of @var to not contain
- punctuation.
+ * config/tc-hppa.h (TARGET_FORMAT): Add hppa-linux variants.
-1999-09-08 Philip Blundell <pb@nexus.co.uk>
+2001-01-14 Kazu Hirata <kazu@hxi.com>
- * config/tc-arm.c (s_thumb_set): Only support interworking for ELF
- and COFF targets.
- (md_parse_option): Only support -k flag for ELF and COFF targets.
+ * config/tc-alpha.c: Fix formatting.
+ * config/tc-arc.c: Likewise.
+ * config/tc-arc.h: Likewise.
+ * config/tc-d10v.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i386.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-vax.c: Likewise.
-Tue Sep 7 13:28:59 1999 Jeffrey A Law (law@cygnus.com)
+ * config/tc-arc.c: Fix formatting.
- * config/tc-hppa.c (pa_ip): Put strict register checks before
- call to pa_parse_number.
+ * config/tc-arc.c: Fix formatting.
- * config/tc-hppa.c (pa_ip): Support 'Z' argument.
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
-1999-09-06 Ian Lance Taylor <ian@zembu.com>
+ * config/tc-hppa.c (pa_build_unwind_subspace): Use SEGREL32 for
+ both 32 and 64 bit ELF.
- * config/obj-coff.c: Add ATTRIBUTE_UNUSED as needed for
- BFD_ASSEMBLER code.
+ * config/tc-hppa.c (pa_ip): Store `a' flag in bit zero of operand
+ and don't bother storing `m' for "ce" completer. Tidy handling of
+ 'J' and 'K' operands to suit. Handle '<' and '>' operands.
-1999-09-06 Donn Terry <donn@interix.com>
+Sun Jan 14 00:36:42 MET 2001 Jan Hubicka <jh@suse.cz>
- * as.c (perform_an_assembly_pass): Set SEC_DATA for data_section.
+ * tc-i386.h (TARGET_MACH): New macro.
+ (i386_mach): Declare.
+ * tc-i386.c (i386_mach): New function.
-Mon Sep 6 04:26:56 1999 Jeffrey A Law (law@cygnus.com)
+2001-01-13 Philip Blundell <philb@gnu.org>
- * config/tc-hppa.c (pa_ip): Get strict/non-strict mode from the
- candidate instruction. Require registers for register arguments
- when in strict mode. Require assemble-time constants for
- constants when in strict mode.
- (pa_get_absolute_expression): Require a constant when in strict
- mode.
-
-1999-09-06 Nick Clifton <nickc@cygnus.com>
+ * doc/as.texinfo: Fix spelling and cross-references.
- * config/tc-m32r.c (md_longopts): Fix value for -Wnuh.
+ * doc/c-arm.texi: Fix typos. Say that `;' is a line separator
+ character for all systems, not just GNU/Linux. Make it explicit
+ that `-k' doesn't affect code generation, just ELF flags.
-1999-09-04 Steve Chamberlain <sac@pobox.com>
+Sat Jan 13 01:47:35 MET 2001 Jan Hubicka <jh@suse.cz>
- * config/tc-pj.c: New file, supports picoJava in ELF.
- * config/tc-pj.h: Ditto.
- * configure.in (pjl*, pj*): New targets.
- * Makefile.am: Rebuild dependencies.
- (CPU_TYPES): Add pj.
- (TARGET_CPU_CFILES): Add config/tc-pj.c.
- (TARGET_CPU_HFILES): Add config/tc-pj.h.
- * doc/c-pj.texi: New file.
- * doc/as.texinfo: Add some PJ specifics.
- * doc/all.texi: Add PJ to the list of all architectures, sort them
- all alphabetically.
- * doc/Makefile.in (CPU_DOCS): Add c-pj.texi.
- * configure, Makefile.in, doc/Makefile.in: Rebuild.
+ * config/tc-i386.c (md_assemble): Check cpu_flags even for nullary
+ instructions.
-1999-09-02 Alan Modra <alan@spri.levels.unisa.edu.au>
+2001-01-12 Frank Ch. Eigler <fche@redhat.com>
- * config/obj-multi.h: Include obj-elf.h if OBJ_MAYBE_ELF. Reformat.
- (obj_frob_file): Test for null pointer.
- (OBJ_COPY_SYMBOL_ATTRIBUTES): Here too.
- (OBJ_PROCESS_STAB): And here.
- (elf_obj_sy): Remove
+ * cgen.c (gas_cgen_finish_insn): Call dwarf2_emit_insn.
- * config/obj-elf.h: #ifndef everything defined in obj-multi.h,
- except OBJ_PROCESS_STAB, which we #undef for ecoff.
- (elf_obj_sy): Remove #ifndef OBJ_SYMFIELD_TYPE.
+2001-01-12 Nick Clifton <nickc@redhat.com>
- * config/obj-coff.c (no_func): Remove.
- (coff_format_ops): Change occurrences of no_func to 0, as we test
- for 0 in obj-multi.h.
+ * as.c (print_args): Update copyright date to 2001.
- * configure.in: Enable bfd for i386-coff when primary target is
- bfd. Enable i386 elf,coff emulation support. Don't set
- USE_EMULATIONS=1 or te_file=multi unless there is more than one
- emulation to support.
- *configure: Regenerate.
+2001-01-12 Peter Targett <peter.targett@arccores.com>
-1999-09-02 Nick Clifton <nickc@cygnus.com>
+ * doc/c-arc.texi: New file.
+ Some sections to be expanded.
- * config/tc-mcore.c (mcore_s_section): Do not dump literals if a
- .section .line directive is encountered.
+2001-01-12 Alan Modra <alan@linuxcare.com.au>
-1999-09-01 Nick Clifton <nickc@cygnus.com>
+ * config/tc-i386.c (md_longopts): Recognize "--64" only for ELF.
+ (md_parse_option): Always accept "--32".
- * config/tc-arm.c (md_section_align): Do not align sections in ELF
- format.
+2001-01-11 Peter Targett <peter.targett@arccores.com>
- * as.c (show_usage): Add --gdwarf2 to list of options displayed.
- * as.texinfo: Document --gdwarf2 command line option.
- Add additional documentation of ARM command line switches.
+ * as.h (TC_ARC): Ensure struc-symbol.h included.
+ * as.c (dwarf2dbg.h): Include to remove implicit declaration
+ warnings.
+ * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Define.
+ (TARGET_SYMBOL_FIELDS) added.
-1999-08-30 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * doc/Makefile.am (CPU_DOCS): Added c-arc.texi.
+ * doc/c-arc.texi: New file.
+ Some sections to be expanded.
+ * doc/as.texinfo: Update command-line options.
+ Removed outdated text for ARC dependant features, instead include
+ text from above file.
- * config/tc-i386.c (i386_intel_memory_operand): Combine
- i386_is_reg and parse_register calls. Remove END_STRING_AND_SAVE
- and RESTORE_END_STRING around parse_register calls.
- (i386_operand): Here too.
- (i386_is_reg): Remove.
- (parse_register): Move as_bad calls from within this function to
- callers.
+ * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Define local flag.
+ (TARGET_SYMBOL_FIELDS): Alias to previous definition.
+ (targ-cpu.h) header.
+ * config/tc-arc.h:
+ * config/tc-arc.c: New updated configuration for
+ ARC, including selection of core variants, and extensibility of
+ instructions, registers etc. through directives.
-1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-arc.c (arc_extinst): Minor corrections for
+ error messages.
+ (arc_common) Likewise. Make alignment argument optional for local
+ symbols also, with default of zero.
- Based on a patch from H.J. Lu <hjl@gnu.org>
- * config/tc-i386.c (parse_register): Handle FP regs specially.
- (md_begin): Remove '(' and ')' from register_chars.
+2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-1999-08-29 Doug Evans <devans@casey.cygnus.com>
+ * config/tc-m68hc11.c (md_estimate_size_before_relax): Fix
+ STATE_INDEXED_OFFSET when the symbol is undefined (16-bit offset).
+ (build_indexed_byte): Don't relax indexed byte, use 16-bit offset
+ and fix_new_exp() instead.
+ (md_convert_frag): For indexed post byte use the symbol value
+ rather than the displacement.
+ (md_relax_table): Fix indexed offset relax.
- * config/tc-m32r.c (md_parse_option): Delete unrecognized option
- error message (done elsewhere).
+2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-Sat Aug 28 01:23:11 1999 Jeffrey A Law (law@cygnus.com)
+ * config/tc-m68hc11.c (md_estimate_size_before_relax):Don't
+ relax weak symbols.
+ (relaxable_symbol): New function.
- * config/tc-hppa.c (pa_ip): Do not allow '*' in 32bit completers.
+2001-01-11 Andreas Jaeger <aj@suse.de>
-Sat Aug 28 00:26:26 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+ * config/tc-i386.h (TC_RELOC_GLOBAL_OFFSET_TABLE): Removed, it's
+ not used anywhere.
- * config/tc-hppa.c (pa_ip): Replace 'f' by 'v'. Prefix float register
- args by 'f'.
+2001-01-10 Nick Clifton <nickc@redhat.com>
- * config/tc-hppa.c (pa_ip): Add args q, %, and |.
+ * config/tc-arm.c (arm_fix_adjustable): Define for OBJ_COFF.
+ * config/tc-arm.h (obj_fix_adjustable): Define for OBJ_COFF
- * config/tc-hppa.c (pa_ip): Absorb white space in instructions
- between args.
- Add new completers. Fix bug in 64 bit condition handling.
+2001-01-10 Nick Clifton <nickc@redhat.com>
- * config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH',
- 'cS', and 'c*'.
+ * symbols.c (DOLLAR_LABEL_CHAR): New constant - the magic
+ character used to dollar local symbols.
+ (LOCAL_LABEL_CHAR): New constant - the magic character used to
+ local label symbols.
+ (dollar_label_name): Use DOLLAR_LABEL_CHAR.
+ (fb_label_name): Prefix local labels with LOCAL_LABEL_PREFIX,
+ if defined.
+ Use LOCAL_LABEL_CHAR.
+ (decode_local_label_name): Skip LOCAL_LABEL_PREFIX.
+ Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR.
+ (S_IS_LOCAL): Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR.
- * config/tc-hppa.c (pa_ip): Place completers behind prefix 'c'.
+2001-01-08 Bo Thorsen <bo@suse.de>
- * config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!'
+ * config/tc-i386.c (i386_immediate, i386_displacement):
+ GOTPCREL check fix.
- * config/tc-hppa.c (pa_ip): Add case for 'I'.
+2001-01-07 Ian Lance Taylor <ian@zembu.com>
-1999-08-27 Jim Wilson <wilson@cygnus.com>
+ * doc/c-i386.texi (i386-Arch): Remove spaces incorrectly inserted
+ in last change.
- * dwarf2dbg.c (MAX_SPECIAL_ADDR_DELTA): Correct typo in comment.
- (struct ls): Add frag field. Initialize it to zero.
- (out_end_sequence): New local text_frag. Set it while in text section.
- Replace address check with frag check. Set ls.frag to text_frag if
- out_set_addr called.
- (dwarf2_gen_line_info): Add explanatory comment. New local saved_frag.
- Set it before switching sections. Replace address check with frag
- check. Set ls.frag to saved_frag if out_set_addr called.
+2001-01-07 Philip Blundell <philb@gnu.org>
-1999-08-26 David Mosberger <davidm@hpl.hp.com>
+ * doc/as.texinfo (Bug Reporting): Update email address for
+ reports.
+ * README: Likewise.
- * dwarf2dbg.c (out_end_sequence): If address changed, directly
- output "advance_pc" opcode instead of calling gen_addr_line().
- The latter has the undesired side-effect of creating a new row
- in the debug line info matrix.
+Sat Jan 6 13:33:10 MET 2001 Jan Hubicka <jh@suse.cz>
-1999-08-26 Jim Wilson <wilson@cygnus.com>
+ * configure.in: Define DEFAULT_ARCH for i386.
+ * tc-i386.c (md_assemble): Return after the error message;
+ move testing for 64bit operands to proper place.
- * dwarf2dbg.c (out_end_sequence): Correct comments. Set last to
- ls.last_filename if last is less than zero. Set ls.last_filename
- when allocating new entry.
- (dwarf2_gen_line_info): Save seg and subseg info before subseg_new
- call.
+2001-01-06 Jan Hubicka <jh@suse.cz>, Andreas Jaeger <aj@suse.de>
-1999-08-20 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * doc/as.texinfo: Document '#' as comment character for i386 and
+ x86_64. Add AMD x86-64 into menu of machine dependent information.
- * config/tc-i386.c (i386_index_check): Fix the displacement size
- when INFER_ADDR_PREFIX.
+ * doc/c-i386.texi: Document x86_64 extensions.
-1999-08-18 Nick Clifton <nickc@cygnus.com>
+Fri Jan 5 13:26:42 MET 2001 Jan Hubicka <jh@suse.cz>
- * config/tc-arm.c (md_apply_fix3): If an offset is invalid,
- display its value.
+ * tc-i386.c (md_assemble): Handle third byte of the opcode as prefix.
-1999-08-17 Ian Lance Taylor <ian@zembu.com>
+Thu Jan 4 22:25:26 MET 2001 Jan Hubicka <jh@suse.cz>
- * config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to
- handle 0xffffNNNN constants correctly.
+ * tc-i386.c (cpu_arch): Add Pentium4 and modify sledgehammer entry.
+ * NEWS: Add note about Pentium4 support.
-1999-08-16 Nick Clifton <nickc@cygnus.com>
+Wed Jan 3 17:26:32 MET 2001 Jan Hubicka <jh@suse.cz>
- * config/tc-arm.c (do_ldst): Look for register conflicts on stores
- as well as loads.
+ * tc-i387.c (pi, pte, pt): Update.
+ (type_names): Add new types.
-1999-08-13 Nick Clifton <nickc@cygnus.com>
+Wed Jan 3 16:26:52 MET 2001 Jan Hubicka <jh@suse.cz>
- * config/tc-arm.c (validate_offset_imm): Work on unsigned values.
- (md_apply_fix3): Always pass positive values to
- validate_offset_imm.
+ * tc-i386.h (CpuK6, CpuAthlon, CpuSledgehammer, CpuMMX, Cpu3dnow,
+ CpuUnknown): Renumber
+ (CpuP4, CpuSSE2): New.
+ (CpuUnknownFlags): Add CpuP4 and CpuSSE2
-1999-08-12 Nick Clifton <nickc@cygnus.com>
+2001-01-03 Philip Blundell <pb@futuretv.com>
- * config/tc-arm.c (skip_whitespace): New macro.
- Formatting tidy ups.
-
- (md_apply_fix3): Store relocation offset in addend for ELF based
+ * config/tc-alpha.c (alpha_force_relocation): Handle vtable
relocs.
- (arm_force_relocation): Always generate relocs for Thumb function
- calls.
-
-1999-08-11 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (md_assemble): Remove dead code. intel_syntax
- LONG_DOUBLE_MNEM_SUFFIX floating point is done in opcode/i386.h
-
-Tue Aug 10 12:58:31 1999 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-hppa.c (pa_build_unwind_subspace): Use sane section
- flags for the unwind subspace.
-
- * config/tc-hppa.c (UNWIND_SECTION_NAME): Define for ELF.
- (pa_build_unwind_subspace): Remove #if 0 wrapper. Select a
- suitable relocation based on the size of the target's pointer.
- Always Use subsegment zero for the unwinders.
- (pa_level): Handle "2.0w".
-
-Mon Aug 9 20:02:22 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-d30v.c (write_2_short): Don't group repeat instructions
- with the following instruction unless this was specified.
+ (alpha_fix_adjustable): Likewise.
+ (md_apply_fix): Likewise.
-1999-08-09 Ian Lance Taylor <ian@zembu.com>
-
- * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 for
- certain sections, to match BFD changes.
-
-1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Makefile.am (noinst_SCRIPTS): Change .gdbinit to $(GDBINIT).
- (EXTRA_SCRIPTS): Define to keep automake happy.
- * Makefile.in: Rebuild.
-
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
-
- * Makefile.am: Rename .dep* files to DEP*.
- (MKDEP): Rename from DEP. Change all uses. Use $${srcdir} rather
- than $(srcdir). Rename TCDEP targets to DEPTC. Rename OBJDEP
- targets to DEPOBJ.
- * Makefile.in: Rebuild.
+2000-12-31 H.J. Lu <hjl@gnu.org>
-1999-08-08 Jakub Jelinek <jj@ultra.linux.cz>
-
- * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg.
-
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
-
- * Makefile.am: Change all uses of itbl-test-ops to itbl-tops to
- avoid problems on DOS filesystems.
- * Makefile.in: Rebuild.
-
- * doc/as.texinfo (Section): Document 's' flag for COFF version.
-
-1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
-
- * config/obj-coff.c (obj_coff_section): Handle 's' (shared)
- section flag.
-
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
-
- * configure.in: Define and substitute GDBINIT. Change AC_OUTPUT
- line to create ${GDBINIT} rather than .gdbinit.
- * configure, Makefile.in, doc/Makefile.in: Rebuild.
-
-Fri Aug 6 12:12:44 1999 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-hppa.c (pa_ip, case '?'): Add missing break.
-
-Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
-
- * config/tc-hppa.c (pa_ip): Add 64 bit condition completers.
-
-1999-08-06 Jakub Jelinek <jj@ultra.linux.cz>
-
- * config/tc-sparc.h (tc_fix_adjustable): Fix check for PIC local
- non-adjustable symbols.
-
-Thu Aug 5 16:52:51 1999 Jerry Quinn <jquinn@nortelnetworks.com>
-
- * config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix.
-
-Thu Aug 5 23:05:56 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-sh.c (md_assemble): Call as_bad when there are excess
- operands.
-
-1999-08-05 Donn Terry <donn@interix.com>
+ * listing.c (listing_message): Allocate string only if it is
+ used.
- * config/te-interix.h: New file.
- * configure.in (i386-*-interix*): New target.
* configure: Rebuild.
-Wed Aug 4 13:12:17 1999 Jeffrey A Law (law@cygnus.com)
+2000-12-31 Hans-Peter Nilsson <hp@bitrange.com>
- * config/tc-hppa.c (pa_chk_field_selector): Allow 3 byte
- selectors for ELF too.
- (selector_table): Add "ltp" and "rtp" selectors.
+ * doc/internals.texi (Relaxing with a table) <after relaxation>:
+ Point out caveats with generating fixups for the opcode in a frag.
-1999-08-04 Alan Modra <alan@spri.levels.unisa.edu.au>
+Sat Dec 30 19:02:48 MET 2000 Jan Hubicka <jh@suse.cz>
- * config/tc-i386.c (i386_operand): No need to change
- operand_string pointer in segment reg case before goto
- do_memory_reference. Initialise displacement_string_start and
- displacement_string_end after do_memory_reference label.
- (i386_index_check): Add operand_string param, and print error
- message on failure here.
- (i386_intel_memory_operand): Instead of here.
- (i386_operand): And here.
- (INFER_ADDR_PREFIX): Enable.
-
- * doc/c-i386.texi (i386-16bit): Document .code16gcc.
-
- * config/tc-i386.h (DefaultSize): Define. Renumber following
- opcode_modifier defines.
-
- From Etienne Lorrain <etienne.lorrain@ibm.net>
- * config/tc-i386.c (stackop_size): New variable.
- (set_16bit_code_flag): Clear it here.
- (set_16bit_gcc_code_flag): New function.
- (md_pseudo_table): Add "code16gcc" entry.
- (md_assemble): Set i.suffix for insns with DefaultSize modifier.
-
-1999-08-03 Ian Lance Taylor <ian@zembu.com>
-
- * config/obj-coff.c (coff_frob_symbol): Always update set_end with
- next_set_end even if the end symbol is being discarded.
-
- * gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER.
- * output-file.c, symbols.c, config/tc-i386.c: Likewise.
- * config/obj-coff.c: Likewise.
- (seg_info_type): Remove.
- (seg_info_off_by_4): Change to array of segT.
- (s_get_segment): Adjust accordingly.
- (obj_pseudo_table): Fully initialize sentinel entry.
+ * configure.in: Add support for x86_64 and x86_64-*-linux-gnu*
+ * NEWS: Add x86_64.
- * config/tc-mips.c (append_insn): Correct INSN_SYNC test. From
- Ralf Baechle <ralf@uni-koblenz.de>.
+2000-12-29 H.J. Lu <hjl@gnu.org>
-1999-08-03 Etienne Lorrain <etienne.lorrain@ibm.net>
+ * listing.c (calc_hex): Print the variable part only if the
+ fragment type is rs_fill.
- * config/tc-i386.c (f16_3): New. Fixes 16 bit 3 byte nop.
+2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
-1999-08-03 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * doc/internals.texi (tc_conditional_pseudoop,
+ TC_LINKRELAX_FIXUP): Fix typos.
- * config/tc-i386.c: Indentation and white space changes.
- (i386_index_check): New function. Add INFER_ADDR_PREFIX code, but
- don't enable it by default.
- (i386_intel_operand): Remove redundant prototype.
- Move check on number of memory operands, and i.mem_operands++
- (i386_intel_memory_operand): To here.
- Remove i386_immediate code from here. Remove special case code
- for input and output using (%dx). Remove base/index checks and
- call i386_index_check instead. Save initial operand_string
- argument for error message.
- (i386_operand): Remove redundant prototype. Move base/index
- checks to i386_index_check.
- (i386_displacement): Move intel mode check for non-zero
- i.disp_operand
- (i386_intel_memory_operand): To here.
+2000-12-28 Richard Henderson <rth@redhat.com>
-1999-07-30 Jakub Jelinek <jj@ultra.linux.cz>
+ * write.c (subsegs_finish): Fix thinko last change -- don't
+ "optimize" the alignment == 0 case.
- * config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option.
- (sparc_ip): Warn if %g2 or %g3 register is used and not covered
- by .register pseudo-op if -64 and --no-undeclared-regs.
- (s_register, sparc_adjust_symtab): New functions.
- * config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab):
- Declare sparc_adjust_symtab as tc_adjust_symtab.
- * doc/c-sparc.texi: Add description of #ignore special literal
- for .register pseudo-op.
+2000-12-28 Richard Henderson <rth@redhat.com>
-1999-07-30 Catherine Moore <clm@cygnus.com>
-
- * config/tc-arm.c (tc_gen_reloc): Record the vtable entry in
- the relocation's section offset.
-
-1999-07-29 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * write.c (fixup_segment): Fix generic error check overflow test.
-
- * config/tc-i386.c (pe): Change %d to %ld, %x to %lx, and cast
- X_add_number to long.
-
-Wed Jul 28 02:04:24 1999 "Jerry Quinn" <jquinn@nortelnetworks.com>
-
- * config/tc-hppa.c (pa_ip): Add 'J' and 'K' code
- processing.
-
-1999-07-27 Ian Lance Taylor <ian@zembu.com>
-
- * config/tc-sparc.h (tc_fix_adjustable): Don't adjust GOT, PLT, or
- VTABLE relocations.
-
-1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/te-go32.h (COFF_LONG_SECTION_NAMES): Define.
-
- * configure.bat: Remove; obsolete.
- * config/go32.cfg: Likewise.
-
-1999-07-21 Brad M. Garcia <bgarcia@fore.com>
-
- * configure.in (i386-*-vxworks*): New target.
- * configure: Rebuild.
-
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
-
- * doc/c-sparc.texi: Document .register and .nword pseudo-ops.
-
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
-
- * config/tc-sparc.c (sparc_ip): Allow OLO10 relocations
- on -64 and not pic.
- (output_insn): Put OLO10's secondary addend into tc_fix_data.
- (md_apply_fix3): Handle BFD_RELOC_SPARC_OLO10.
- (tc_gen_reloc): Return two relocs for OLO10, LO10 and SPARC13.
- * config/tc-sparc.h (RELOC_EXPANSION_POSSIBLE,
- MAX_RELOC_EXPANSION): Define.
- (TC_FIX_TYPE, TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise.
-
-1999-07-16 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (intel_float_operand): Add prototype, make static.
- (md_assemble): Localize *exp variable to if (fake_zero_displacement)
- block. Print a warning if an 8-bit or 16-bit constant
- displacement or immediate is truncated on output.
- (i386_immediate): Ensure Imm16 is always legal for a 16-bit mode
- immediate.
- (i386_operand): Disallow immediate jump absolute operand.
-
-1999-07-15 Ian Lance Taylor <ian@zembu.com>
+ * as.h (rs_align_test): New.
+ * frags.c (NOP_OPCODE): Move default from read.c.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New default.
+ (frag_align_code): New.
+ * frags.h (frag_align_code): Declare.
+ * read.c (NOP_OPCODE): Remove.
+ (do_align): Use frag_align_code.
+ * write.c (NOP_OPCODE): Remove.
+ (get_recorded_alignment): New.
+ (cvt_frag_to_fill): Handle rs_align_test.
+ (relax_segment): Likewise.
+ (subsegs_finish): Align last subseg in section to the
+ section alignment. Use frag_align_code.
+ * write.h (get_recorded_alignment): Declare.
+ * config/obj-coff.c (size_section): Handle rs_align_test.
+ (fill_section, fixup_mdeps): Likewise.
+ (write_object_file): Use frag_align_code.
+
+ * config/tc-alpha.c (alpha_align): Use frag_align_code.
+ (alpha_handle_align): New.
+ * config/tc-alpha.h (HANDLE_ALIGN): New.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+ * config/tc-i386.h (md_do_align): Use frag_align_code.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+ * config/tc-ia64.c (ia64_md_do_align): Don't do code alignment.
+ (ia64_handle_align): New.
+ * config/tc-ia64.h (HANDLE_ALIGN): New.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+ * config/tc-m32r.c (m32r_do_align): Remove.
+ (m32r_handle_align): New.
+ (fill_insn): Use frag_align_code.
+ * config/tc-m32r.h (md_do_align): Remove.
+ (HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New.
+ * config/tc-m88k.c, config/tc-m88k.h: Similarly.
+ * config/tc-mips.c, config/tc-mips.h: Similarly.
+
+ * config/tc-sh.c (sh_cons_align): Use rs_align_test.
+ (sh_handle_align): Likewise. Handle rs_align_code.
+ (sh_do_align): Remove.
+ * config/tc-sh.h (md_do_align): Remove.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+ * config/tc-sparc.c (sparc_cons_align): Use rs_align_test.
+ (sparc_handle_align): Likewise. Handle rs_align_code.
+ * config/tc-sparc.h (md_do_align): Remove.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+2000-12-22 DJ Delorie <dj@redhat.com>
+
+ * config/tc-d10v.c (md_assemble): set prev_seg and prev_subseg
+ when we assemble the first half of a pair.
+
+2000-12-22 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-i386.c (reloc): Update the macro for non-bfd
+ assembler.
+ (BFD_RELOC_X86_64_GOTPCREL): Set to 0 for non-bfd assembler.
+
+2000-12-22 H.J. Lu <hjl@gnu.org>
+
+ * dwarf2dbg.c (dwarf2_finish): Remove #if BFD_ASSEMBLER.
+
+Wed Dec 20 14:21:22 MET 2000 Jan Hubicka <jh@suse.cz>
+
+ * tc-i386.h (i386_target_format): Define even for ELFs.
+ (QWORD_MNEM_SUFFIX): New macro.
+ (CpuK6,CpuAthlon,CpuSledgehammer, Cpu64, CpuNo64, CpuUnknownFlags):
+ New macros
+ (CpuMMX,CpuSSE,Cpu3dnow, CpuUnknown): Renumber.
+ (IgnoreSize, DefaultSize, No_?Suf, FWait, IsString, regKludge, IsPrefix,
+ ImmExt): Renumber.
+ (Size64, No_qSuf, NoRex64, Rex64): New macros.
+ (Reg64, Imm32S, Imm64, Disp32S, Disp64): New macros.
+ (Imm8, Imm8S, Imm16, Imm32, Imm1, BaseIndex, Disp8, Disp16, Disp32,
+ InOutPortReg,ShiftCount, Control, Debug, Test, FloatReg, FloatAcc,
+ SReg2, SReg3, Acc, JumpAbsolute, RegMMX, RegXMM, EsSeg, InvMem):
+ Renumber.
+ (Reg, WordReg): Add Reg64.
+ (Imm): Add Imm32S and Imm64.
+ (EncImm): New.
+ (Disp): Add Disp64 and Disp32S.
+ (AnyMem): Add Disp32S.
+ (RegRex, RegRex64): New macros.
+ (rex_byte): New type.
+ * tc-i386.c (set_16bit_code_flag): Kill.
+ (fits_in_unsigned_long, fits_in_signed_long): New functions.
+ (reloc): New parameter "signed"; support x86_64.
+ (set_code_flag): New.
+ (DEFAULT_ARCH): New macro; default to "i386".
+ (default_arch): New static variable.
+ (struct _i386_insn): New fields Operand_PCrel; rex.
+ (flag_16bit_code): Kill; All tests replaced to "flag_code == CODE_64BIT"
+ (flag_code): New enum and static variable.
+ (use_rela_relocations): New static variable.
+ (flag_code_names): New static variable.
+ (cpu_arch_flags): Default to CpuUnknownFlags|CpuNo64.
+ (cpu_arch): Add "sledgehammer"; Add CPUAthlon to Athlon and CpuK6 to
+ K6 and Athlon.
+ (i386_align_code): Return plain "nop" for x86_64.
+ (mode_from_disp_size): Support Disp32S.
+ (smallest_imm_type): Support Imm32S and Imm64.
+ (offset_in_range): Support size of 8.
+ (set_cpu_arch): Do not clobber to Cpu64/CpuNo64.
+ (md_pseudo_table): Add "code64"; use set_code_flat.
+ (md_begin): Emit sane error message on hash failure.
+ (tc_i386_fix_adjustable): Support x86_64 relocations.
+ (md_assemble): Support QWORD_MNEM_SUFFIX, REX registers,
+ instructions supported on particular arch just partially,
+ output of 64bit immediates, handling of Imm32S and Disp32S type.
+ (i386_immedaite): Support x86_64 relocations; support 64bit constants.
+ (i386_displacement): Likewise.
+ (i386_index_check): Cleanup; support 64bit addresses.
+ (md_apply_fix3): Support x86_64 relocation and rela.
+ (md_longopts): Add "32" and "64".
+ (md_parse_option): Add OPTION_32 and OPTION_64.
+ (i386_target_format): Call even for ELFs; choose between
+ elf64-x86-64 and elf32-i386.
+ (i386_validate_fix): Refuse GOTOFF in 64bit mode.
+ (tc_gen_reloc): Support rela relocations and x86_64.
+ (intel_e09_1): Support QWORD.
- * configure.in: Bump version number to 2.9.5.
- * configure: Rebuild.
+2000-12-15 Diego Novillo <dnovillo@redhat.com>
- * dwarf2dbg.c (dwarf2_gen_line_info): Don't assume that long long
- or %llx work.
+ * config/tc-i386.c (intel_e09_1): Only flag as a memory operand if
+ it's not an offset expression.
+ (intel_e10_1): Ditto. Also, if the operand is an offset expression,
+ keep the braces '[' and ']' in the output string.
+ (intel_e11): Ditto. Also remove comparison intel_parser.op_modifier
+ != FLAT. There is no such op_modifier.
-Thu Jul 15 02:45:30 1999 Jeffrey A Law (law@cygnus.com)
+2000-12-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * config/tc-hppa.c (md_pseudo_table): Add ".dword" pseudo-op.
- (cons_fix_new_hppa): Derive size of fixup from size of the object.
+ * dwarf2dbg.c: If we don't have <limits.h>, try including <sys/param.h>
+ if we have it.
-1999-07-14 Philip Blundell <pb@nexus.co.uk>
+2000-12-13 Kazu Hirata <kazu@hxi.com>
- * symbols.c (dollar_label_name): Prepend LOCAL_LABEL_PREFIX if it
- is defined.
- * config/tc-arm.h (LOCAL_LABEL_PREFIX): Define to '.' for ELF.
+ * as.h: Fix formatting.
+ * cgen.h: Likewise.
+ * dwarf2dbg.c: Likewise.
+ * input-scrub.c: Likewise.
+ * read.h: Likewise.
- * config/tc-arm.c (md_begin): Set F_SOFTFLOAT in the output file
- if -mno-fpu was given.
- (tc_gen_reloc): Fix typo. Delete bogus code related to GOTPC
- relocs.
- (cons_fix_new_arm): Remove misleading comments.
+2000-12-13 Mark Elbrecht <snowball3@bigfoot.com>
-1999-07-14 Ian Lance Taylor <ian@zembu.com>
+ * configure.in (i386-*-msdosdjgpp): Set bfd_gas to yes.
+ configure: Regenerate.
- * write.c (cvt_frag_to_fill): Use frag file and line in rs_org
- error message.
- (relax_segment): Likewise. After giving a rs_org error, convert
- the frag to rs_align to avoid cascading errors.
+2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-1999-07-12 Andreas Schwab <schwab@suse.de>
+ * dwarf2dbg.c: #include <limits.h> only if it exists.
- * config/tc-m68k.c: Add some ATTRIBUTE_UNUSED.
+2000-12-13 Rodney Brown <RodneyBrown@mynd.com>
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
+ * config/tc-hppa.c (pa_ip): Correct CHECK_FIELD typo.
+ (md_apply_fix): Here too.
- * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
- as appropriate. Fill in structure initializations. Add variable
- initializations. Add casts.
- * dwarf2dbg.c (print_stats): Change i to size_t.
- * listing.c (listing_listing): Change list_line to unsigned int.
+2000-12-12 Jim Wilson <wilson@redhat.com>
-1999-07-10 Ian Lance Taylor <ian@zembu.com>
+ * config/tc-ia64.h (ia64_init): Add prototype.
- * config/tc-ppc.h (tc_fix_adjustable) [OBJ_ELF]: Call S_IS_LOCAL
- rather than checking for \001 and \002 in symbol name.
- * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: Likewise.
+2000-12-12 H.J. Lu <hjl@gnu.org>
-Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
+ * dwarf2dbg.c: Enabled only if BFD_ASSEMBLER is defined.
- * configure.in (hppa*-linux-gnu*): New target.
- * configure: Rebuilt.
+ * read.h (outputting_stabs_line_debug): Change it to int.
+ * stabs.c (outputting_stabs_line_debug): Likewise.
-1999-07-08 Nick Clifton <nickc@cygnus.com>
+2000-12-12 Geoffrey Keating <geoffk@redhat.com>
- * doc/c-arm.texi (ARM Directives): Document .thumb_set directive.
+ * config/obj-bout.c (obj_crawl_symbol_chain): Don't take
+ the address of a function result.
-1999-07-07 Nick Clifton <nickc@cygnus.com>
+2000-12-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
- * config/tc-v850.c (v850_comm): Use symbol_get_obj() rather than
- accessing symbolP directly.
+ * config/tc-ppc.c (md_pseudo_table): Add .file and .loc.
+ (md_assemble): Call dwarf2_emit_insn.
+ (shlib): Fix typo SHILB -> SHLIB.
+ (md_parse_option): Likewise.
+ (ppc_elf_validate_fix): Likewise:
+ * config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
-Tue Jul 6 10:41:42 1999 Jeffrey A Law (law@cygnus.com)
+2000-12-12 Nick Clifton <nickc@redhat.com>
- * config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol
- for ELF.
+ * cgen.h: Fix formatting.
+ * input-scrub.c: Fix formatting.
+ * macro.c: Fix formatting.
+ * config/tc-mips.c: Fix formatting.
+ * doc/c-mips.texi: Fix formatting.
-1999-07-05 Nick Clifton <nickc@cygnus.com>
+Mon Dec 11 14:35:42 MET 2000 Jan hubicka <jh@suse.cz>
- * config/tc-arm.c (ARM_EXT_V5): Define.
- (ARM_ARCH_V5, ARM_ARCH_V5T): Define.
- (md_begin): Detect ARM v5 architectures.
- (md_parse_option): Accept arm v5 specification.
- (md_show_usage): Documment -marmv5 switch.
+ * tc-i386.c (md_assemble): Refuse 's' and 'l' suffixes in the intel
+ mode; convert 'd' suffix to 's' or 'l'; remove all DWORD_MNEM_SUFFIX
+ references.
+ (intel_e09_1): Convert QWORD to 'l' suffix for FP operations; refuse
+ otherwise.
+ * tc-i386.h (DWORD_MNEM_SUFFIX): Kill.
+ (No_dSuf): Kill.
- * doc/c-arm.texi: Document -marmv5 command line option.
-
- * config/tc-arm.c (do_adrl): New function. Implement ADRL pseudo
- op.
- (validate_immediate_twopart): New function. Determine if a
- constant can be computed by two ADD instructions.
- (output_inst): Remove its command line parameter - it was never
- used.
- (md_apply_fix3): Support BFD_RELOC_ARM_ADRL_IMMEDIATE, used to
- implememt the ADRL pseudo op.
- (tc_gen_reloc): Generate a suitable error message if an ADRL
- instruction tries to generate a real reloc.
+ * i386.h (*_Suf): Remove No_dSuf.
+ (d_suf, wld_Suf,sld_Suf, sldx_Suf, bwld_Suf, d_FP, sld_FP, sldx_FP)
+ Remove.
+ (i386_optab): Remove 'd' in the suffixes.
- * doc/c-arm.texi: Document NOP, ADR and ADRL pseudo ops.
+2000-12-06 Mark Elbrecht <snowball3@bigfoot.com>
-Thu Jul 1 15:33:10 1999 Jeffrey A Law (law@cygnus.com)
+ * config/tc-i386.c (T_SHORT): Undefine before defining.
- * config/tc-hppa.c (pa_ip): Convert the opcode and all completers
- into lower case.
+2000-12-05 Kazu Hirata <kazu@hxi.com>
-1999-06-27 H.J. Lu <hjl@gnu.org>
+ * config/tc-mips.c: Fix formatting.
- * subsegs.c (subseg_text_p): Use 1/0 instead of true/false for
- non BFD_ASSEMBLER case.
+2000-12-04 Matthew Hiller <hiller@redhat.com>
-1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
+ * config/tc-d10v.c (flag_allow_gstabs_packing): New variable.
+ (md_longopts): New options --gstabs-packing, --no-gstabs-packing.
+ (md_show_usage): Ditto.
+ (md_parse_option): Ditto.
+ (d10v_cleanup): Writes pending instruction only if
+ ! outputting_stabs_line_debug || ! flag_allow_gstabs_packing.
+ Fix compile time warning messages.
- * config/obj-coff.c (obj_coff_section): Mark writable sections as
- data.
+ * doc/c-d10v.texi: Documents new options.
-1999-06-26 David Mosberger <davidm@hpl.hp.com>
+2000-12-04 Matthew Hiller <hiller@redhat.com>
- * dwarf2dbg.c (dwarf2_gen_line_info): Don't call
- out_end_sequence() when the address decreases due to a new frag.
- (gen_dir_list): Set ls.file[i].dir to j + 1 (not j) because file
- numbering starts with 1.
+ * stabs.c (outputting_stabs_line_debug): New variable.
+ (stabs_generate_asm_lineno): Set outputting_stabs_line_debug at
+ function entry and unset at function exit.
-1999-06-23 Nick Clifton <nickc@cygnus.com>
+ * read.h (outputting_stabs_line_debug): New extern declaration.
- * config/tc-mcore.c (md_pseudo_table): Add .comm for ELF and allow
- .section for COFF.
- (mcore_s_text): Call obj_elf_text for ELF target.
- (mcore_s_data): Call obj_elf_data for ELF target.
- (mcore_s_section): No longer ELF specific. Call obj_coff_section
- for COFF target.
- (mcore_s_bss): New function: Dump literal table before changing
- sections.
- (mcore_s_comm): New function: Dump literal table before changing
- sections.
-
- * config/obj-elf.c (obj_elf_common, obj_elf_data, obj_elf_text):
- No longer static functions.
- * config/obj-elf.h (obj_elf_common, obj_elf_data, obj_elf_text):
- Provide prototypes for these functions.
+ * as.c: Include dwarf2dbg.h for definition of dwarf2_finish.
-1999-06-22 Ian Lance Taylor <ian@zembu.com>
+ * dwarf2dbg.c: Fix compile time warning messages.
- * subsegs.c (subseg_text_p): Rewrite non BFD_ASSEMBLER case to use
- a list of names, to try obj_segment_name, and to try abbreviated
- names when using COFF without long section names.
+2000-12-03 Kazu Hirata <kazu@hxi.com>
- * config/tc-alpha.c: More use of symbol accessor functions.
- * config/tc-arc.c: Likewise.
- * config/tc-d30v.c: Likewise.
- * config/tc-fr30.c: Likewise.
+ * config/tc-a29k.c: Fix formatting.
+ * config/tc-alpha.c: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-cris.c: Likewise.
+ * config/tc-hppa.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i386.c: Likewise.
* config/tc-i860.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-m68hc11.c: Likewise.
+ * config/tc-m68k.c: Likewise.
* config/tc-m88k.c: Likewise.
- * config/tc-mcore.c: Likewise.
- * config/tc-ns32k.c: Likewise.
+ * config/tc-pj.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-sh.c: Likewise.
* config/tc-sparc.c: Likewise.
- * config/tc-v850.c: Likewise.
-
- * config/tc-arc.c (get_arc_exp_reloc_type): Change uses of
- sy_value with appropriate accessor functions.
- * config/tc-arm.c (md_apply_fix3): Likewise.
- * config/tc-d10v.c (AT_WORD_P): Likewise.
- * config/tc-v850.c (reg_name_search): Likewise.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-vax.c: Likewise.
+
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ * config/tc-mips.c (mips_ip): When calculating offsets,
+ don't accept as constant the difference between the
+ addresses of symbols in two different sections.
+
+ * config/tc-mips.c (macro_build): Add new 'U' and 'J' operand
+ specifiers.
+ (validate_mips_insn): Likewise. Also, update 'B' operand
+ specifier to use OP_*_CODE20 constants and delete 'm' operand
+ specifier.
+ (mips_ip): Remove 'm' operand specifier, add 'U' and 'J'
+ operand specifiers. Change warning generated by 'B' operand
+ specifier to reflect its new multi-purpose usage.
+
+ * config/tc-mips.c (mips_set_options): Use ISA_UNKNOWN rather than
+ -1, and update comment.
+ (file_mips_isa): Likewise.
+ (mips_cpu): Use CPU_UNKNOWN rather than -1, and update comment.
+ (ISA_HAS_COPROC_DELAYS, ISA_HAS_64BIT_REGS, gpr_interlocks): Use
+ ISA_* constants rather than hard-coded numbers.
+ (mips_cpu_info): New structure.
+ (mips_cpu_info_table): New table describing CPU and ISA names
+ and numbers.
+ (mips_cpu_info_from_name, mips_cpu_info_from_isa,
+ mips_cpu_info_from_cpu): New functions.
+ (mips_isa_to_str): New function to get string for ISA name.
+ (mips_cpu_to_str): Convert to use mips_cpu_info_from_cpu, and
+ return const char *.
+ (md_begin): Redo CPU and ISA selection logic, using
+ mips_cpu_info_from_*. Convert to use ISA_* constants rather
+ than hard-coded numbers.
+ (append_insn, mips_emit_delays, macro, macro2): Convert to use
+ ISA_* constants rather than hard-coded numbers.
+ (mips_ip): Convert to use mips_isa_to_str to get ISA name.
+ (md_longopts): Delete OPTION_NO_MIPS32.
+ (md_parse_option): Convert to use ISA_* constants rather than
+ hard-coded numbers. Make OPTIONS_MIPS32 case treat MIPS32
+ as an ISA. Delete OPTION_NO_MIPS32 case. Convert OPTION_MCPU
+ to use strcasecmp to recognize "default" and to use
+ mips_cpu_info_from_name to get CPU numbers from argument.
+ (md_show_usage): Move -mips32 so it's with the rest of the ISA
+ flags. Change 4Kc, 4Kp and 4Km CPU entries to just be
+ mips32-4k.
+ (s_mipsset): Accept ISA value 32.
+ * doc/as.texinfo: Clean up MIPS options summary slightly,
+ remove -no-mips32. Add note about -mips4 and -mips32
+ specifying those ISA levels. Delete -mips32 and -no-mips32
+ cpu flag descriptions.
+ * doc/c-mips.texi: Add -mips32 to list of ISA switches. Clean
+ up the supported CPU switch list, and replace 4Kc, 4Km, and
+ 4Kp entries with a single mips32-4k entry. Note that you can
+ use ".set mips32".
+
+ * tc-mips.c (ISA_HAS_64BIT_REGS): Add checks for ISA_MIPS5 and
+ ISA_MIPS64.
+ (md_longopts, OPTION_MIPS5, OPTION_MIPS64): Add options for
+ -mips5 and -mips64.
+ (md_parse_option): Add cases for OPTION_MIPS5 and
+ OPTION_MIPS64.
+ (md_show_usage): Mention -mips5 and -mips64 arguments.
+ (s_mipsset): Add cases for MIPS5 and MIPS64.
+ (mips_cpu_info_table): Add entries for MIPS5 and MIPS64 ISAs
+ and pseudo-CPUs.
+ * doc/as.texinfo: Mention -mips5 and -mips64 options
+ and their meanings.
+ * doc/c-mips.texi: Likewise. Also update introduction
+ and ".set" usage information.
+
+ * config/tc-mips.c (md_show_usage): Add "sb1" to the
+ CPU list.
+ (mips_cpu_info_table): Add SB-1 entries.
+ * doc/c-mips.texi: Add "sb1" to the list of CPUs
+ known to the -mcpu option.
+
+ * doc/as.texinfo: Correct description of MIPS -mcpu
+ option, by copying some of the text from doc/c-mips.texi.
+
+2000-12-01 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.in (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
+ New targets.
+ (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
+ (sparc*-*-rtems*): Switched from a.out to ELF.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * po/gas.pot: Regenerate.
- * config/obj-ecoff.c (obj_ecoff_set_ext): Change uses of bsym to
- use symbol_get_bfdsym instead.
- * config/tc-ppc.c (md_assemble): Likewise.
- * config/tc-v850.c (v850_comm): Likewise.
+2000-11-30 Philip Blundell <pb@futuretv.com>
-1999-06-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+ * config/obj-coff.c (obj_coff_weak): Use S_SET_WEAK if it exists,
+ even in non BFD_ASSEMBLER case.
- * config/tc-arc.c (tc_gen_reloc): Use symbol_get_bfdsym to get at
- the symbol, rather than accessing the bsym member.
- * config/tc-d10v.c (tc_gen_reloc): Likewise.
- * config/tc-d30v.c (tc_gen_reloc): Likewise.
- * config/tc-mcore.c (tc_gen_reloc): Likewise.
- * config/tc-mn10200.c (tc_gen_reloc): Likewise.
- * config/tc-mn10300.c (tc_gen_reloc): Likewise.
- * config/tc-ns32k.c (tc_gen_reloc): Likewise.
- * config/tc-tic30.c (tc_gen_reloc): Likewise.
- * config/tc-v850.c (tc_gen_reloc): Likewise.
+2000-11-30 Diego Novillo <dnovillo@redhat.com>
-Mon Jun 21 16:45:19 1999 Jeffrey A Law (law@cygnus.com)
+ * tc-i386.c (md_assemble): Swap i.disp_relocs when using intel
+ syntax.
- * tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
- (hppa_gen_reloc_type): Conditionalize on BFD64.
- (tc_gen_reloc): Re-enable ELF relocations.
- * tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format.
+2000-11-29 Richard Henderson <rth@redhat.com>
-1999-06-21 Ian Lance Taylor <ian@zembu.com>
+ * dwarf2dbg.c: Rewrite from scratch. Queue all debugging output
+ until dwarf2_finish; use relaxation to get cross-fragment offsets;
+ thread multiple subsegments properly; handle multiple code
+ sections properly; emit proper compilation unit info for assembler
+ generated debugging.
- * config/tc-arm.c (ldst_extend): Add parentheses to avoid
- warning.
- (do_ldst): Move assignment out of if condition.
- (md_apply_fix3): Add casts to avoid printf format warnings. Add
- parentheses to avoid warning.
+ * as.h (enum _relax_state): Add rs_dwarf2dbg.
+ * dwarf2dbg.h (struct dwarf2_line_info): Remove filename.
+ (dwarf2dbg_estimate_size_before_relax): Declare.
+ (dwarf2dbg_relax_frag, dwarf2dbg_convert_frag): Declare.
+ * write.c: Include dwarf2dbg.h.
+ (cvt_frag_to_fill): Handle rs_dwarf2dbg.
+ (relax_segment): Likewise.
-1999-06-21 Nick Clifton <nickc@cygnus.com>
+2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
- * config/tc-arm.c (arm_adjust_symtab): Use symbol_get_bfdsym()
- macro to get at the BFD symbol associated with a GAS symbol.
+ * config/tc-sh.c (md_convert_frag) <undefined symbol, conditional
+ jump>: Use as_bad_where instead of as_bad. Tweak error message
+ accordingly. Stabilize frag by updating fix part and resetting
+ variant part.
+ <undefined symbol, unconditional jump>: Ditto.
+ (sh_elf_cons): Cast *input_line_pointer to unsigned char when
+ indexing is_end_of_line[].
+ (md_assemble): Initialize size to 0.
+ (md_section_align): Mark parameter seg as unused.
+ (parse_reg): Parse names case-insensitively.
-1999-06-19 Ian Lance Taylor <ian@zembu.com>
+2000-11-28 Kazu Hirata <kazu@hxi.com>
- * config/tc-ppc.c: Update for symbol handling changes.
+ * config/obj-aout.h: Fix formatting.
+ * config/obj-bout.h: Likewise.
* config/obj-coff.c: Likewise.
+ * config/obj-coff.h: Likewise.
+ * config/obj-elf.h: Likewise.
+ * config/obj-som.h: Likewise.
+ * config/obj-vms.c: Likewise.
+ * config/obj-vms.h: Likewise.
+ * config/tc-h8300.h: Likewise.
+ * config/tc-ns32k.h: Likewise.
+ * config/tc-sparc.h: Likewise.
+ * config/tc-tic54x.h: Likewise.
+ * config/tc-z8k.h: Likewise.
-Fri Jun 18 14:34:18 1999 Jeffrey A Law (law@cygnus.com)
-
- * tc-hppa.c: General cleanups of ELF support. No more spaces
- and subspaces for ELF.
- (GDB_DEBUG_SPACE_NAME): Delete definition for ELF.
- (GDB_STRINGS_SUBSPACE_NAME): Likewise.
- (GDB_SYMBOLS_SUBSPACE_NAME): Likewise
- (UNWIND_SECTION_NAME): Likewise.
- (space/subspace related structures): Conditionalize definitions
- on OBJ_SOM.
- (space/subspace directives and support routines): Conditionalize
- definitions and references/uses on OBJ_SOM.
- (label_symbol_struct): For ELF, track the symbol's segment. For
- SOM track its space.
- (pa_define_label, pa_undefine_label, pa_get_label): Corresponding
- changes.
- (USE_ALIASES): Kill for both SOM & ELF.
- (pa_def_subspaces, pa_def_spaces): Corresponding changes.
- (pa_space, pa_subspace): Corresponding changes.
- (pa_spaces_begin): Corresponding chagnes.
- (md_begin): Do not muck around with space/subspace stuff for
- OBJ_ELF.
- (md_apply_fix): Temporarily disable argument relocation stuff
- for OBJ_ELF.
- (tc_gen_reloc): Temporarily disable relocation generation for
- OBJ_ELF
- (pa_build_unwind_subspace): Similarly.
-
-1999-06-16 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (thumb_set): New pseudo op.
- (text, data, section): Override these pseudo ops with ARM
- specific versions.
- (s_thumb_set): New function: Perform the same as a .set pseudo
- op, but also mark the alias'ed symbol as being a Thumb
- function.
- (arm_s_text): New function: Perform the same as the .text
- pseudo op, but dump the literal pool before changing
- sections.
- (arm_s_data): New function: Perform the same as the .data
- pseudo op, but dump the literal pool before changing
- sections.
- (arm_s_section): New function: Perform the same as the
- .section pseudo op, but dump the literal pool before changing
- sections.
- (arm_cleanup): Do not reset the current section before dumping
- the literal pool.
-
-1999-06-17 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-m32r.c (md_longopts): Fix OPTION_WARN_UNMATCHED and
- OPTION_NO_WARN_UNMATCHED entries.
- (md_parse_option): Generate a warning message if an unrecognised
- option is encountered.
-
- * config/tc-d10v.c (do_not_ignore_hash): New variable.
- (get_operands): When parsing an expression after an '@' symbol
- has been detected, do not ignore '#' symbols.
- (md_operand): Only ignore '#' symbols if do_not_ignore_hash is
- false.
-
-1999-06-13 Ian Lance Taylor <ian@zembu.com>
-
- From K. Richard Pixley <rich@noir.com>:
- * configure.in (ppc-*-vxworks*): New target.
- * configure: Rebuild.
-
-1999-06-12 Philip Blundell <philb@gnu.org>
-
- * config/tc-arm.c (tc_gen_reloc): Fix handling of GOTPC relocs.
-
-1999-06-13 Ian Lance Taylor <ian@zembu.com>
-
- * write.c (adjust_reloc_syms): Rather than never reducing reloc
- which refer to symbols in linkonce sections, permit reducing the
- relocs if the symbol is local.
-
-1999-06-12 Ian Lance Taylor <ian@zembu.com>
-
- * subsegs.c (subseg_text_p): New function.
- * as.h (subseg_text_p): Declare.
- * read.c (do_align): Use subseg_text_p to set the default fill.
- * write.c (subsegs_finish): Likewise.
- * config/obj-coff.c (write_object_file): Likewise.
- * config/tc-i386.h (md_maybe_text): Don't define.
- (md_do_align): Use subseg_text_p to set the default fill.
- * config/tc-m32r.c (m32r_do_align): Likewise.
- * config/tc-sh.c (sh_do_align): Likewise.
- * config/tc-sparc.h (md_do_align): Likewise.
-
-1999-06-12 David O'Brien <obrien@freebsd.org>
-
- * configure.in: (i[3456]86-*-freebsd*): Now defaults to ELF.
- * configure: Rebuild.
-
-1999-06-12 Ian Lance Taylor <ian@zembu.com>
-
- * dwarf2dbg.c: Include elf/dwarf2.h with "", not <>.
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
-
- * config/tc-i386.c (i386_immediate): Remove unused label
- seg_unimplemented.
-
- * struc-symbol.h: Put local_symbol code in ifdef BFD_ASSEMBLER.
- * symbols.c: Likewise.
- * config/obj-aout.c (obj_crawl_symbol_chain): Refer directly to
- sy_next field when taking address, rather than symbol_next.
-
- * dwarf2dbg.c: Change bfd_vma to addressT and bfd_signed_vma to
- offsetT.
- (out_set_addr): Don't use BYTES_PER_ADDRESS. Instead, get the
- value from the output file architecture.
- (dwarf2_gen_line_info): Ifdef BFD_ASSEMBLER specific code.
- * dwarf2dbg.h: Change bfd_vma to addressT.
-
-1999-06-11 Ian Lance Taylor <ian@zembu.com>
-
- * dwarf2dbg.h: Use PARAMS in function declarations.
-
-1999-06-11 Martin Dorey <mdorey@madge.com>
-
- * write.c (fixup_segment): Don't add symbol value for i960 ELF.
- * config/tc-i960.c (s_leafproc): Don't call tc_set_bal_of_cal if
- OBJ_ELF.
- (md_apply_fix): Simplify BFD_ASSEMBLER handling.
-
-1999-06-11 Ian Lance Taylor <ian@zembu.com>
-
- * config/tc-i386.c (md_apply_fix3): Add default case to switch.
-
- * config/tc-sparc.c (md_pseudo_table): Remove pushsection and
- popsection.
-
- * config/tc-sparc.c (sparc_ip): Add default case to reloc switch.
-
- * read.c (read_a_source_file): Only declare inescape if
- QUOTES_IN_INSN.
-
- * itbl-ops.c (itbl_disassemble): Change sprintf format strings to
- match parameters.
- (find_entry_byval): Add parens to avoid warning.
-
- * as.c: If HAVE_ITBL_CPU, include "itbl-ops.h".
-
- * symbols.c (resolve_symbol_value): Don't permit subtraction of
- undefined symbols.
-
-1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
-
- * config/tc-sparc.c (sparc_ip): Don't use side-effect expression
- with isoctal.
-
- * config/tc-sparc.c (synthetize_setuw, synthetize_setsw,
- synthetize_setx): New functions.
- (md_assemble): Broken the special cases into the above
- functions. Make compiler happy if sizeof(bfd_vma)==4.
- Fix sethi generated from set/setuw. If instructions have a relloc,
- always clear the fields to be relocated in the opcode.
- (sparc_ip): Remove special_case global variable.
-
-1999-06-10 Ian Lance Taylor <ian@zembu.com>
+2000-11-28 Nick Clifton <nickc@redhat.com>
- Based on patches from John W. Woznack <jwoznack@concentric.net>:
- * itbl-ops.c (itbl_get_reg_val): Add pval parameter. Return
- indication of success rather than a value.
- (itbl_get_val): Likewise.
- (itbl_get_field): Use strcspn. Change delimiters to include
- parens.
- * itbl-ops.h (itbl_get_reg_val): Update declaration.
- (itbl_get_val): Likewise.
- * config/tc-mips.c (mips_ip): Update call to itbl_get_reg_val.
+ * doc/as.1 (COPYING): Mention that the GNU Free Documentation
+ License is present in the sources, but not the output, and
+ also available from the GNU website.
+ (GNU Free Documentation License): Comment out this section.
- * symbols.c (copy_symbol_attributes): Convert local symbols to
- regular symbols.
+2000-11-28 Hans-Peter Nilsson <hp@axis.com>
-1999-06-10 Nick Clifton <nickc@cygnus.com>
+ * Makefile.am (CPU_OBJ_VALID): Add case to filter out invalid coff
+ targets. Remove i860 from valid a.out targets.
+ * Makefile.in: Regenerate.
- * config/tc-arm.c (md_parse_option): Add support for ARM920 and
- ARM920t.
+ * config/tc-cris.c: Include dwarf2dbg.h.
+ (md_pseudo_table): Add .file and .loc.
+ (md_assemble): Call dwarf2_emit_insn if generating ELF.
+ (s_cris_file, s_cris_loc): New.
+ * config/tc-cris.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
-1999-06-07 Jakub Jelinek <jj@ultra.linux.cz>
+2000-11-28 Alan Modra <alan@linuxcare.com.au>
- * config/tc-sparc.c (md_assemble): Fix up setx, support setsw.
- Optimize set if sizeof(bfd_vma) == 64.
- (sparc_ip): Fix sethi - without %hi() it should generate
- R_SPARC_22 reloc, not R_SPARC_HI22.
- (tc_gen_reloc): Handle BFD_RELOC_SPARC22.
+ * expr.c (STANDARD_MUL_PRECEDENCE): Correct value.
+ (MRI_MUL_PRECEDENCE): Likewise.
+ (op_rank): Fix a comment typo.
-1999-06-07 Jakub Jelinek <jj@ultra.linux.cz>
+2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr>
- * config/tc-sparc.c (md_begin): Handle native wordsize aliases.
- (s_ncons): New function.
- (native_op_table): New table.
- (sparc_ip): Be more strict on %hi() etc.; prepare assembler for
- R_SPARC_OLO10 handling.
+ * config/tc-m68hc11.c (build_indexed_byte): Print the offset in
+ the error message.
+ (get_operand): Fix analysis for movw/movb instructions.
-Mon Jun 7 10:22:16 1999 Richard Henderson <rth@cygnus.com>
+2000-11-24 Nick Clifton <nickc@redhat.com>
- * expr.h (struct expressionS): Revert last change; widen X_op.
- * config/tc-alpha.c (md_begin): Check the field is wide enough.
+ * configure.in (xscale-elf): Add target.
+ (xscale-coff): Add target.
+ * configure: Regenerate.
-Mon Jun 7 11:25:16 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+ * config/tc-arm.c (ARM_EXT_V5E): New ARM architecture
+ extenstion.
+ (ARM_EXT_XSCALE): New ARM architecture extension.
+ (ARM_LONGMUL): Rename to ARM_EXT_LONGMUL.
+ (ARM_HALFWORD): Rename to ARM_EXT_HALFWORD.
+ (ARM_THUMB): Rename to ARM_EXT_THUMB.
+ (ARM_ARCH_V4): Remove processor from architecture.
+ (ARM_ARCH_3M): New architecutre definition.
+ (ARM_ARCH_V5TE): New architecutre definition.
+ (ARM_ARCH_XSCALE): New architecutre definition.
+ (CPU_DEFAULT): Allow to be defaulted to XScale.
+ (atpcs): New boolean variable.
+ (ldr_flags): Support 'd' flag for double word loads.
+ (str_flags): Support 'd' flag for double word stored.
+ (do_mia): New function.
+ (do_mar): New function.
+ (do_mra): New function.
+ (do_pld): New function.
+ (do_ldrd): New function.
+ (do_blx): New function.
+ (do_bkpt): New function.
+ (do_clz): New function.
+ (do_lstc2): New function.
+ (do_cdp2): New function.
+ (do_t_blx): New function.
+ (do_t_bkpt): New function.
+ (do_smla): New function.
+ (do_smlal): New function.
+ (do_smul): New function.
+ (do_qadd): New function.
+ (do_co_reg2c): New function.
+ (LONGEST_INSN): Redefine to 7.
+
+ * doc/c-arm.texi: Document -mxscale, -mmarmv5te and -matpcs
+ command line switches.
+
+2000-11-22 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (pseudo_func): Add missing initializers.
+ (struct rsrc): Make line unsigned.
+ (gr_values): Add missing initializer.
+ (SLOT_NUM_NOT_SET): Add unsigned cast.
+ (ia64_elf_section_flags, output_vbyte_mem, count_output, dot_radix,
+ dot_fframe, dot_vframe, dot_vframesp, dot_vframepsp, dot_save,
+ dot_restore, dot_restorereg, dot_restorereg_p, dot_handlerdata,
+ dot_unwentry, dot_altrp, dot_saveg, dot_savef, dot_saveb, dot_savegf,
+ dot_spill, dot_spillreg, dot_spillreg_p, dot_label_state,
+ dot_copy_state, dot_unwabi, dot_personality, dot_proc, dot_body,
+ dot_prologue, dot_endp, dot_regstk, dot_psr, dot_alias, dot_ln,
+ dot_reg_val, dot_entry, dot_mem_offset, ia64_init, mark_resource,
+ md_undefined_symbol, md_apply_fix3, tc_gen_reloc, ia64_md_do_align):
+ Add ATTRIBUTE_UNUSED to unused parameters.
+ (convert_expr_to_ab_reg): Add parens.
+ (convert_expr_to_xy_reg): Add parens. Comment out >= REG_GR test.
+ (dot_prologue): Initialize grsave when declared.
+ (md_pseudo_table): Add missing initializers.
+ (operand_match): Add casts to bfd_vma.
+ (emit_one_bundle): Delete unused local prev. Make required_template
+ unsigned.
+ (specify_resource): Cast i to unsigned.
+ (note_register_values): Use fprintf_vma.
+ (print_dependency): Likewise.
+
+2000-11-21 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (generate_unwind_image): Call record_alignment
+ for unwind info section.
+ (dot_endp): Likewise for unwind section.
+
+ * config/tc-ia64.c (emit_one_bundle): Pass size of 8 not 4 to
+ fix_new_exp.
+
+2000-11-21 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.c (md_pseudo_table): Add .file and .loc.
+ (output_insn): Call dwarf2_emit_insn.
+ * config/tc-sparc.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * ehopt.c (eh_frame_code_alignment): New arg `in_seg', update all
+ callers. Don't switch segments. Expect CIE == -1 in .debug_frame.
+ (check_eh_frame): Handle .eh_frame and .debug_frame concurrently.
+
+2000-11-17 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (md_pseudo_table): Add support for .line and
+ .file pseudo ops.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * config/tc-i386.c (md_pseudo_table): Add .file and .loc.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * dwarf2dbg.c (dwarf2_gen_line_info): Early out for no line number.
+ * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Adjust for
+ tri-state definition of alpha_flag_mdebug.
+ * config/tc-alpha.c (alpha_flag_mdebug): Init to -1.
+ (s_alpha_file): Store first .file directive.
+ (s_alpha_stab): New.
+ (md_pseudo_table): Add stabs and stabn.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * as.c (debug_type): Init to DEBUG_UNSPECIFIED.
+ (main): Call dwarf2_finish.
+ * as.h (debug_type): Clarify documentation of the meaning
+ of this variable.
+ * dwarf2dbg.c (DWARF2_LINE_MIN_INSN_LENGTH): Default to 1.
+ (print_stats): Fix parenthesis problem.
+ (now_subseg_size): New.
+ (dwarf2_finish): Use it. If DEBUG_DWARF2, emit bits for .debug_info.
+ (dwarf2_directive_file): Don't set debug_type.
+ (dwarf2_where): Honor DEBUG_DWARF2 first.
+ (dwarf2_emit_insn): Renamed from dwarf2_generate_asm_lineno;
+ do nothing if not emitting dwarf2 debug info, or no work.
+ * dwarf2dbg.h (dwarf2_emit_insn): Update.
+ * ecoff.c (add_file): Turn on DEBUG_ECOFF only if DEBUG_UNSPECIFIED.
+ (ecoff_new_file): Likewise.
+ * read.c (generate_lineno_debug): Kill ecoff hackery. Update
+ commentary wrt dwarf2.
+
+ * config/tc-alpha.c (alpha_adjust_symtab_relocs): Add
+ ATTRIBUTE_UNUSED as needed.
+ (emit_insn): Call dwarf2_emit_insn.
+ (s_alpha_file): New.
+ (s_alpha_loc): New.
+ (s_alpha_coff_wrapper): Don't handle them.
+ (md_pseudo_table): Update for .file and .loc.
+ * config/tc-alpha.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
+
+ * config/tc-arm.c (output_inst): Update for dwarf2_emit_insn;
+ don't protect with debug_type.
+ * config/tc-hppa.c (md_assemble): Likewise.
+ * config/tc-m68hc11.c (m68hc11_new_insn): Likewise.
+ * config/tc-mn10300.c (md_assemble): Likewise.
+ * config/tc-sh.c (md_assemble): Likewise.
+ * config/tc-v850.c (md_assemble): Likewise.
- * Makefile.am (TARGET_CPU_CFILES): Add config/tc-fr30.c.
- (TARGET_CPU_HFILES): Add config/tc-fr30.h.
- (TARG_ENV_HFILES): Add config/te-epoc-pe.h.
- * Makefile.in: Regenerated.
+ * config/tc-arm.c (arm_end_of_source): Remove.
+ * config/tc-hppa.c (pa_end_of_source): Remove.
+ * config/tc-m68hc11.c (m68hc11_end_of_source): Remove.
+ * config/tc-mn10300.c (mn10300_finalize): Remove.
+ * config/tc-sh.c (sh_finalize): Remove.
+ * config/tc-v850.c (sh_finalize): Remove.
- * config/obj-elf.c (obj_elf_common): In MRI mode if called as
- `common' pass on to s_mri_common.
- (elf_pseudo_table): Pass 1 to obj_elf_common for `common'.
+ * config/tc-arm.h (md_end): Remove.
+ * config/tc-hppa.h (md_end): Remove.
+ (DWARF2_LINE_MIN_INSN_LENGTH): New.
+ * config/tc-m68hc11.h (md_end): Remove.
+ * config/tc-mn10300.h (md_end): Remove.
+ * config/tc-sh.h (md_end): Remove.
+ * config/tc-v850.h (md_end): Remove.
-1999-06-06 Richard Henderson <rth@cygnus.com>
+ * config/tc-ia64.c (emit_one_bundle): Don't protect
+ dwarf2 bits with debug_type.
+ (md_assemble): Likewise.
+ (ia64_end_of_source): Don't call dwarf2_finish.
- * config/obj-elf.c (obj_elf_section): Don't free the return
- value of demand_copy_C_string.
+2000-11-16 Jim Wilson <wilson@redhat.com>
-1999-06-05 Richard Henderson <rth@cygnus.com>
+ * config/tc-ia64.c (errata_nop_necessary_p): Abort if general regno
+ >= 128 instead of > 128. Abort if predicate regno is >= 64 instead of
+ > 16.
- * dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol
- creation logic from obj_elf_create_section.
+2000-11-16 H.J. Lu <hjl@gnu.org>
- * config/obj-elf.c (elf_pseudo_tab): Add pushsection/popsection.
- (section_stack): New.
- (special_sections): Make const.
- (obj_elf_section): Gut and rewrite parsing.
- (obj_elf_change_section): New function broken out of obj_elf_section.
- (obj_elf_parse_section_letters): Likewise.
- (obj_elf_section_word): Likewise.
- (obj_elf_section_type): Likewise.
- (obj_elf_previous): Treat as a toggle.
- (obj_elf_popsection): New.
- * config/tc-ppc.c (ppc_section_word): Take str+len not ptr_str.
- (ppc_section_type): Likewise.
- * config/tc-ppc.h: Likewise.
+ * config/obj-elf.c (obj_elf_symver): Don't check the missing
+ version name.
- * expr.h (struct expressionS): Don't make X_op a bitfield.
- * config/tc-alpha.c: Update for symbol handling changes.
- (md_apply_fix) [case GPREL]: Use now_seg instead of absolute_section.
- (load_expression, emit_ir_load, emit_loadstore, emit_jsrjmp): Likewise.
+2000-11-15 Kazu Hirata <kazu@hxi.com>
-1999-06-05 Richard Henderson <rth@cygnus.com>
+ * config/tc-tic30.c: Fix formatting.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-v850.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * config/tc-w65.c: Likewise.
+ * config/tc-z8k.c: Likewise.
- * dwarf2dbg.c (*): Convert to K&R + prototypes.
- (dwarf2_gen_line_info): Kill unused variables.
- (dwarf2_finish): Likewise.
- (dwarf2_where): Likewise.
- (dwarf2_directive_file): If we've only got a string,
- hand off to s_app_file.
- * ecoff.c: Move the include of ecoff.h.
- * symbols.h (S_IS_FUNCTION): Prototype.
+2000-11-14 DJ Delorie <dj@redhat.com>
- * read.c (LEX_HASH): Supply a default.
- (lex_type): Use it.
- (s_globl): Update `c' after skipping whitespace.
- * read.h (LEX_END_NAME, is_name_ender): New.
- * expr.c (get_symbol_end): Respect it.
+ * config/tc-v850.c: Support dwarf2.
+ * config/tc-v850.h: Ditto.
-1999-06-04 Mark Klein <mklein@dis.com>
+ * config/tc-v850.c (cons_fix_new_v850): Don't rely on
+ parse_cons_expression_v850 to initialize hold_cons_reloc.
- * config/tc-hppa.c (md_begin): Convert local symbol dummy_symbol
- to real if OBJ_SOM
- (tc_gen_reloc): Still need bfd_abs_symbol in some relocs.
+2000-11-15 Bernd Schmidt <bernds@redhat.com>
- * config/tc-hppa.c: Update for symbol handling changes.
+ * tc-ia64.c (struct md): New entries LAST_GROUPS, GROUP_IDX.
+ (errata_nops_necessary_p): New function.
+ (emit_one_bundle): Call it. Update the GROUP_IDX field in struct
+ md.
-1999-06-03 Ian Lance Taylor <ian@zembu.com>
+2000-11-14 Jim Wilson <wilson@redhat.com>
- * cgen.c: Update for symbol handling changes.
- * config/tc-m32r.c: Likewise.
+ * config/tc-ia64.c (ia64_target_format): If EF_IA_64_BE not set, then
+ return little endian bfd formats.
- * config/tc-hppa.h: Update for symbol handling changes.
- * config/tc-hppa.c: Likewise.
+2000-11-14 Kazu Hirata <kazu@hxi.com>
- * config/tc-arm.h: Update for symbol handling changes.
+ * config/aout_gnu.h: Fix formatting.
+ * config/atof-vax.c: Likewise.
+ * config/m68k-parse.h: Likewise.
+ * config/m88k-opcode.h: Likewise.
+ * config/obj-elf.c: Likewise.
* config/tc-arm.c: Likewise.
- (symbol_make_empty): Remove. Just use symbol_create.
-
- * symbols.c (symbol_set_tc): Correct name.
+ * config/tc-cris.c: Likewise.
+ * config/tc-i386.c: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-mn10300.c: Likewise.
+ * config/te-386bsd.h: Likewise.
+ * config/te-hppa.h: Likewise.
+ * config/te-nbsd.h: Likewise.
+ * config/te-ppcnw.h: Likewise.
+ * config/te-sparcaout.h: Likewise.
+ * config/te-tmips.h: Likewise.
+ * config/vax-inst.h: Likewise.
+ * config/vms-conf.h: Likewise.
- * Makefile.am: Rebuild dependencies.
- ($(OBJS)): Don't depend upon struc-symbol.h.
- (.dep1, .tcdep, .objdep): Create itbl-parse.h.
- * dep-in.sed: Don't remove struc-symbol.h.
- * Makefile.in: Rebuild.
-
- * doc/internals.texi (Symbols): Describe changes in symbol
- handling.
-
-1999-06-03 Richard Henderson <rth@cygnus.com>
-
- * dwarf2dbg.c (dwarf2_gen_line_info): Use section_symbol
- instead of doing the work by hand.
-
-1999-06-03 David Mosberger <davidm@hpl.hp.com>
-
- * dwarf2dbg.c (INITIAL_STATE): New macro encapsulating initial
- state of line state-machine.
- (struct ls): Collect DWARF2 line state-machine state in new member
- SM. Add member EMPTY_SEQUENCE to keep track if a code sequence
- resulted in any DWARF2 directives.
- (reset_state_machine): New function.
- (out_end_sequence): Ditto.
- (dwarf2_gen_line_info): When switching sections or switching to a
- lower text address, call out_end_sequence() first to terminate the
- previous code sequence as code sequences MUST have monotonically
- increasing addresses.
- (dwarf2_finish): Call out_end_sequence() instead of open coding it.
-
-1999-06-03 David Mosberger <davidm@hpl.hp.com>
-
- * as.c (parse_args): Add option -gdwarf2 to allow requesting
- DWARF2 debug info (line information only, at this point).
- * as.h: Update comment about supported debug formats.
- * dwarf2dbg.c, dwarf2dbg.h: New files.
- * Makefile.am (GAS_CFILES, HFILES, GENERIC_OBJS): Add them.
-
- * expr.c (operand): Don't use [ for parens if we want an index op.
- (op_encoding): Switch [ into O_index, if desired.
- (op_rank): Renumber with O_index on bottom.
- (expr): If O_index, match closing bracket.
- * expr.h (O_index): New.
-
- * read.c (read_a_source_file): Conditionally allow matched "
- in lines passed to md_assemble.
-
- * config/obj-elf.c (elf_pseudo_table): Add `common'.
-
-1999-06-03 Ian Lance Taylor <ian@zembu.com>
-
- Add support for storing local symbols in a small structure to save
- memory when assembling large files.
- * as.h: Don't include struc-symbol.h.
- (symbolS): Add typedef.
- * symbols.c: Include struc-symbol.h.
- (local_hash): New static variable.
- (save_symbol_name): New static function, from symbol_create.
- (symbol_create): Call save_symbol_name.
- (local_symbol_count): New static variable.
- (local_symbol_conversion_count): Likewise.
- (LOCAL_SYMBOL_CHECK): Define.
- (local_symbol_make): New static function.
- (local_symbol_convert): New static function.
- (colon): Handle local symbols. Create local symbol for local
- label name.
- (symbol_table_insert): Handle local symbols.
- (symbol_find_or_make): Create local symbol for local label name.
- (symbol_find_base): Check for local symbol.
- (symbol_append, symbol_insert): Check for local symbols.
- (symbol_clear_list_pointers, symbol_remove): Likewise.
- (verify_symbol_chain): Likewise.
- (copy_symbol_attributes): Likewise.
- (resolve_symbol_value): Handle local symbols.
- (resolve_local_symbol): New static function.
- (resolve_local_symbol_values): New function.
- (S_GET_VALUE, S_SET_VALUE): Handle local symbols.
- (S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise.
- (S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise.
- (S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise.
- (S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise.
- (symbol_previous, symbol_next): New functions.
- (symbol_get_value_expression): Likewise.
- (symbol_set_value_expression): Likewise.
- (symbol_set_frag, symbol_get_frag): Likewise.
- (symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise.
- (symbol_mark_used_in_reloc): Likewise.
- (symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise.
- (symbol_mark_mri_common, symbol_clear_mri_common): Likewise.
- (symbol_mri_common_p): Likewise.
- (symbol_mark_written, symbol_clear_written): Likewise.
- (symbol_written_p): Likewise.
- (symbol_mark_resolved, symbol_resolved_p): Likewise.
- (symbol_section_p, symbol_equated_p): Likewise.
- (symbol_constant_p): Likewise.
- (symbol_get_bfdsym, symbol_set_bfdsym): Likewise.
- (symbol_get_obj, symbol_set_obj): Likewise.
- (symbol_get_tc, symbol_set_tc): Likewise.
- (symbol_begin): Initialize local_hash.
- (print_symbol_value_1): Handle local symbols.
- (symbol_print_statistics): Print local symbol statistics.
- * symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER.
- Declare new symbols.c functions. Move many declarations here from
- struc-symbol.h.
- (SYMBOLS_NEED_BACKPOINTERS): Define if needed.
- * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set.
- (struct symbol): Move bsym to make it clearly the first field.
- Remove TARGET_SYMBOL_FIELDS.
- (symbolS): Don't typedef.
- (struct broken_word): Remove.
- (N_TYPE_seg, seg_N_TYPE): Move to symbol.h.
- (SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise.
- (symbol_clear_list_pointers): Likewise.
- (symbol_insert, symbol_remove): Likewise.
- (symbol_previous, symbol_append): Likewise.
- (verify_symbol_chain, verify_symbol_chain_2): Likewise.
- (struct local_symbol): Define.
- (local_symbol_converted_p, local_symbol_mark_converted): Define.
- (local_symbol_resolved_p, local_symbol_mark_resolved): Define.
- (local_symbol_get_frag, local_symbol_set_frag): Define.
- (local_symbol_get_real_symbol): Define.
- (local_symbol_set_real_symbol): Define.
- Define.
- * write.c (write_object_file): Call resolve_local_symbol_values.
- * config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define.
- (TARGET_SYMBOL_FIELDS): Don't define.
- * config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field. If
- ECOFF_DEBUGGING, add ECOFF fields.
- (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
- * config/obj-multi.h (struct elf_obj_sy): Add local field. If
- ECOFF_DEBUGGING, add ECOFF fields.
- (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
- (ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define.
- * config/tc-mcore.h: Don't include struc-symbol.h.
- (TARGET_SYMBOL_FIELDS): Don't define.
- (struct mcore_tc_sy): Define.
- (TC_SYMFIELD_TYPE): Define.
- * Many files: Use symbolS instead of struct symbol. Use new
- accessor functions rather than referring to symbolS fields
- directly.
-
- * read.c (s_mri_common): Don't add in value of line_label.
-
- * config/tc-mips.c (md_apply_fix): Correct parenthesization when
- checking for SEC_LINK_ONCE.
-
- * config/tc-sh.h (sh_fix_adjustable): Declare.
-
- * app.c (input_buffer): New static variable.
- (app_push): Save saved_input in allocated buffer.
- (app_pop): Restored saved_input.
- (do_scrub_chars): Change get parameter to take char * and int as
- arguments. Change GET macro to pass input_buffer to get
- function. Don't save input into allocated buffer.
- * as.h (do_scrub_chars): Update declaration.
- * input-file.c (input_file_get): Change to take char * and int.
- Read data into passed in buffer. Remove static buffer.
- * read.c (scrub_from_string): Change to take char * and int. Copy
- data into passed in buffer.
-
- * hash.h: Neaten. Declare hash_traverse.
- * hash.c: Complete rewrite based on BFD hashing code.
- * gasp.c (chunksize): New variable.
- * macro.c (macro_expand_body): Call hash_jam with NULL rather than
- hash_delete.
-
-1999-05-28 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_apply_fix3): Add pipeline offset into reloc
- addend unless the target uses an old ABI.
-
-Mon May 24 13:36:55 1999 Doug Evans <devans@canuck.cygnus.com>
-
- -Wchar-subscripts cleanup
- * listing.c (listing_newline): Use unsigned char variable, so
- calls to isascii,iscntrl are correct.
- * atof-generic.c (atof_generic): Cast arg to isdigit, et. al. with
- (unsigned char).
- * ecoff.c (ecoff_directive_ent,ecoff_stab): Ditto.
- * config/obj-elf.c (obj_elf_vtable_inherit): Ditto.
- * config/tc-mips.c (mips_ip,mips16_ip): Ditto.
- (my_getSmallExpression,get_number,s_mips_ent): Ditto.
-
-1999-05-28 Torbjorn Granlund <tege@matematik.su.se>
-
- * config/tc-m68k.c (m68k_ip): Check for disallowed index register
- width for Coldfire.
- (arch_coldfire_p): New #define.
- (m68k_ip, m68k_init_after_args): Use arch_coldfire_p.
-
-1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
-
- * config/tc-m68k.c (install_operand): Add places `n', `o'.
-
- * config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'.
- (install_operand): Add place `N'.
- (init_table): Add registers ACC, MACSR, MASK.
-
- * config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK.
-
- * config/tc-m68k.c: Change mcf5200 --> mcf.
- (archs): Add mcf5206e, mcf5307.
- (m68k_ip): Add format `u'.
- (install_operand): Add place `m', `M', `h'.
- (init_table): Add upper/lower registers.
-
- * config/m68k-parse.h (m68k_register): Add upper/lower registers.
-
-1999-05-28 Martin Dorey <mdorey@madge.com>
-
- * config/tc-i960.c: Several minor changes to add ELF and
- BFD_ASSEMBLER support.
- * config/tc-i960.h: Likewise.
- * configure.in (i960-*-elf*): New target.
- * aclocal.m4, configure: Rebuild.
+2000-11-14 Jakub Jelinek <jakub@redhat.com>
-1999-05-25 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-alpha.c (s_alpha_prologue): Preserve visibility bits.
- * config/tc-i386.c (md_apply_fix3): Only do 1999-05-17 fx_pcrel
- reloc changes when defined(BFD_ASSEMBLER).
+2000-11-13 H.J. Lu <hjl@gnu.org>
-1999-05-17 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/obj-elf.c (elf_frob_symbol): Support
+ ".symver name,name2@@@nodename".
+ (elf_frob_file_before_adjust): Likewise.
- * config/tc-i386.c (tc_gen_reloc): Remove F and MAP macros.
+ * doc/as.texinfo: Updated for ".symver name,name2@@@nodename"
+ and ".symver name,name2@@@nodename".
+ Fix a typo.
- * write.c (write_print_statistics): Output to file, not stderr.
+2000-11-12 H.J. Lu (hjl@gnu.org)
- * expr.c (generic_bignum_to_int32,64): Prototype.
+ * config/obj-elf.c (obj_elf_symver): Check missing version
+ name.
- * read.c (s_lcomm_internal, sizeof_sleb128, sizeof_uleb128,
- output_sleb128, output_uleb128, output_big_sleb128,
- output_big_uleb128, output_big_leb128): Prototype.
- (output_big_sleb128, output_big_uleb128): Make inline.
- (output_big_leb128): Remove inline
+2000-11-12 H.J. Lu (hjl@gnu.org)
- From Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- * config/tc-i386.c (md_apply_fix3): Convert BFD_RELOC_16 with
- fx_pcrel set to BFD_RELOC_16_PCREL. Similarly for BFD_RELOC_8.
- Handle BFD_RELOC_16_PCREL and BFD_RELOC_8_PCREL. Return changed
- value for correct overflow check in write.c:fixup_segment.
- * write.c (fixup_segment): Move bitfield overflow checks to after
- the md_apply_fix call.
- * config/obj-coff.c (fixup_segment): Likewise.
- * doc/internals.texi (CPU backend): Mention md_apply_fix modifying
- valueT *val argument.
+ * dwarf2dbg.c (dwarf2_generate_asm_lineno): Use addressT
+ instead of bfd_vma for non-bfd assemblers.
-Fri May 14 10:52:13 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+2000-11-09 Kazu Hirata <kazu@hxi.com>
- * config/atof-ieee.c (gen_to_words): Correctly round a
- denormalized number. Fix off-by-one in range checking for
- exponent in a denormal.
+ * itbl-ops.c: Fix comment typos.
-1999-05-10 Nick Clifton <nickc@cygnus.com>
+2000-11-08 Jim Wilson <wilson@redhat.com>
- * config/tc-mcore.c (parse_reg): Accept 'sp' as a valid register
- name.
+ * config/tc-ia64.c (struct unw_rec_list): Add slot_frag field.
+ (struct unwind): Add next_slot_frag field.
+ (slot_index): New parameters slot_frag and first_frag. Add code
+ to add in frag sizes when different. Add comments.
+ (fixup_unw_records): New locals first_frag and last_frag. Pass new
+ arguments to slot_index.
+ (emit_one_bundle): Set slot_frag field. Set next_slot_number after
+ loop end. Set next_slot_frag field.
-Thu May 13 09:46:59 1999 Joel Sherrill (joel@OARcorp.com)
+2000-11-07 H.J. Lu <hjl@gnu.org>
- * configure.in (i386-*-rtemself*, sh-*-rtemself*): New targets.
+ * doc/as.texinfo (.symver): Updated for versioned symbol
+ reference.
-1999-05-12 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * obj.h (format_ops): Add the frob_file_before_adjust field.
- * config/tc-i386.h (InvMem): New flag. Add to AnyMem.
- (ReverseRegRegmem): Remove.
- (ImmExt): New flag. Renumber some of the opcode_modifier bits.
- * config/tc-i386.c (md_assemble): Test for PIII SIMD and AMD
- 3DNow! via ImmExt opcode_modifier. Remove ReverseRegRegmem
- kludge.
+ * config/obj-aout.c (aout_format_ops): Set the
+ frob_file_before_adjust field to 0.
+ * config/obj-coff.c (coff_format_ops): Likewise.
+ * config/obj-ecoff.c (ecoff_format_ops): Likewise.
- From Doug Ledford <dledford@redhat.com>
- * config/tc-i386.h (RegXMM): New for P/III.
- * config/tc-i386.c: Add support for P/III.
+ * config/obj-elf.c (obj_elf_symver): Allow duplicated version
+ name.
+ (elf_frob_file_before_adjust): New function to remove unneeded
+ versioned symbols from the symbol table.
+ (elf_format_ops): Set the frob_file_before_adjust field to
+ elf_frob_file_before_adjust.
-Sat May 8 23:28:50 1999 Richard Henderson <rth@cygnus.com>
+ * config/obj-elf.h (obj_frob_file_before_adjust): Defined if
+ not defined.
- * config/tc-ppc.c (md_parse_option): Recognize -mppc64bridge.
- (md_begin): Allow ppc32 insns in ppc64bridge mode.
- (ppc_insert_operand): Accept SIGNOPT in ppc64 mode.
+ * config/obj-multi.h (obj_frob_file_before_adjust): Defined.
-Thu May 6 23:13:39 1999 Richard Henderson <rth@cygnus.com>
+2000-11-07 Peter Targett <peter.targett@arccores.com>
- * config/tc-i386.c (i386_immediate): Skip whitespace before
- complaining about junk after expression.
- (i386_displacement): Likewise.
+ * gas/config/tc-arc.h: Avoid warnings for LITTLE_ENDIAN and
+ BIG_ENDIAN macros.
+ * gas/config/tc-arc.c: Use S_IS_LOCAL to test local symbols.
+ Fix compile time warning messages.
-Thu May 6 19:50:14 1999 Richard Henderson <rth@cygnus.com>
+2000-11-07 Nick Clifton <nickc@redhat.com>
- * symbols.c (symbol_find_base): Use memcpy instead of strcpy.
- Don't copy before downcaseing.
+ * stabs.c (generate_asm_file): Increase length of xmalloc'ed
+ buffer in order to avoid buffer overflows.
-1999-05-05 Catherine Moore <clm@cygnus.com>
-
- * tc-m68k.c: Include elf/m68k.h.
- (m68k_elf_final_processing): New routine.
- * tc-m68k.h (elf_tc_final_processing m68k_elf_final_processing):
- Define.
-
-Mon May 3 10:26:03 1999 Jeffrey A Law (law@cygnus.com)
+2000-11-06 Steve Ellcey <sje@cup.hp.com>
- * config/tc-hppa.c (md_apply_fix): Handle 22 bit fmt insn like a
- 17 bit fmt insn.
-
-1999-04-30 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-mcore.c (mcore_s_section): Dump literals before
- changing section.
-
-1999-04-29 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-mcore.c (md_apply_fix3): Insert reloc addend into insn
- for COFF/PE port.
-
-Mon Apr 26 12:34:37 1999 Doug Evans <devans@canuck.cygnus.com>
+ * config/tc-ia64.c (md_shortopts, md_parse_option, md_show_usage):
+ Change M to m for -milp32 or -mlp64 to match gcc.
+ (dot_endp): Use bytes_per_address instead of 8.
+ (emit_one_bundle): Use number_to_chars_littleendian instead of
+ md_number_to_chars.
+ (fix_insn): Likewise.
+ (ia64_init): New function.
+ (ia64_target_format): New function.
+ (md_begin): Set endianness, arch, and machine as appropriate.
+ * config/tc-ia64.h: (TARGET_BYTES_BIG_ENDIAN, md_number_to_chars):
+ Make these macros depend on TE_HPUX macro.
+ (TARGET_FORMAT): Define.
+ (HOST_SPECIAL_INIT): Define.
+ * config/te-hpux.h: New file.
+ * configure.in: Add "ia64-*-hpux*" target to configure.
+ * configure: Regenerate.
- * config/tc-fr30.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h.
- (TC_INIT_FIX_DATA): Delete.
- * config/tc-m32r.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h.
- (TC_INIT_FIX_DATA): Delete.
- * write.h (struct fix): New member fx_cgen, ifdef USING_CGEN.
- * write.c (fix_new_internal): Initialize fx_cgen member.
- * cgen.c (gas_cgen_record_fixup,gas_cgen_record_fixup_exp): Update.
- (gas_cgen_md_apply_fix3): Update.
- * config/tc-m32r.c (md_cgen_lookup_reloc): Update.
- (md_cgen_record_fixup_exp): Update.
- (FX_OPINFO_R_TYPE): Update.
+2000-11-06 Kazu Hirata <kazu@hxi.com>
- * frags.c (frag_var,frag_variant): Initialize fr_cgen here.
- * config/tc-fr30.h (TC_FRAG_INIT): Delete.
- * config/tc-m32r.h (TC_FRAG_INIT): Delete.
- * frags.h (struct frag): Make opindex, opinfo ints.
+ * as.c: Fix formatting.
+ * dwarf2dbg.c: Likewise.
+ * input-file.c: Likewise.
+ * input-file.h: Likewise.
+ * input-scrub.c: Likewise.
+ * itbl-ops.c: Likewise.
+ * listing.c: Likewise.
+ * macro.h: Likewise.
+ * messages.c: Likewise.
+ * read.c: Likewise.
+ * subsegs.c: Likewise.
+ * subsegs.h: Likewise.
+ * write.c: Likewise.
- * config/tc-fr30.c (FX_OPINFO_R_TYPE): Delete, unused.
+2000-11-06 Nick Clifton <nickc@redhat.com>
-1999-04-26 Tom Tromey <tromey@cygnus.com>
+ * doc/as.texinfo: Add GNU Free Documentation License.
+ * doc/gasp.texi: Add GNU Free Documentation License.
+ * doc/as.1: Add GNU Free Documentation License.
- * aclocal.m4, configure: Updated for new version of libtool.
+2000-11-05 Nick Clifton <nickc@redhat.com>
-1999-04-22 Nick Clifton <nickc@cygnus.com>
+ * config/tc-arm.c: Add include of "dwarf2dbg.h"
- * config/tc-mcore.c (md_apply_fix3): Renamed function from
- md_apply_fix.
- (md_apply_fix3): Do not fix up absolute relocations against
- symbolic values.
+2000-11-02 Per Lundberg <plundis@chaosdev.org>
- * config/tc-mcore.h (MD_APPLY_FIX3): Define.
+ * configure.in: Recognise i[3456]86-chaosdev-storm-chaos.
+ * configure: Regenerate.
-1999-04-20 Nick Clifton <nickc@cygnus.com>
+2000-11-01 Nick Clifton <nickc@redhat.com>
- * config/tc-mcore.c (md_pseudo_table): Add intercepts for section
- changes and data-in-text directives.
- (mcore_cons): New function: intercept cons() operations.
- (mcore_float_cons): New function: intercept float_cons()
- operations.
- (mcore_stringer): New function: intercept stringer() operations.
+ * read.c (original_case_string): New global variable.
+ (read_a_source_file): Copy opcode string into
+ original_case_string if clobbering the case of the opcode.
+ * read.h: Export the definition of original_case_string.
+ * config/tc-arm.c (md_assembler): When parsing a .req
+ directive use the original opcode string, not the case
+ clobbered version.
-1999-04-18 Ian Lance Taylor <ian@zembu.com>
+2000-11-02 Nick Clifton <nickc@redhat.com>
- * obj.h (struct format_ops): Change generate_asm_lineno field to
- take no parameters.
- * config/obj-ecoff.h (OBJ_GENERATE_ASM_LINENO): Don't define.
+ * config/tc-mn10300.c (debug_line): Remove this static
+ variable.
+ (md_assemble): Call dwarf2_generate_asm_lineno instead of
+ dwarf2_where and dwarf2_gen_line_info.
- * config/tc-alpha.c (find_opcode_match): Add default case to
- switch.
- (find_macro_match): Likewise.
- (load_expression): Parenthesize && within ||.
+2000-11-02 Theo Honohan <th@futuretv.com>
- * config/tc-alpha.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
+ * config/tc-arm.c (do_msr): Improve error message.
-1999-04-17 Nick Clifton <nickc@cygnus.com>
+2000-10-31 Eric Christopher <echristo@redhat.com>
- * config/tc-mcore.c (md_pseudo_table): Add overrides for .bss
- .text .data .section pseudo ops.
- (mcore_s_section): New function. Dump lits before changing secs.
- (mcore_s_text): New function. Dump lits before changing secs.
- (mcore_s_data): New function. Dump lits before changing secs.
+ * config/tc-mn10300.c (md_apply_fix3): Use valuep if fully resolved
+ or pc-relative, else use fx_offset.
-1999-04-16 Gavin Romig-Koch <gavin@cygnus.com>
+2000-10-31 Jim Wilson <wilson@redhat.com>
- * config/tc-mips.c (mips_32bitmode): New.
- (md_begin): Set mips_32bitmode if needed.
- (mips_elf_final_processing): Don't set EF_MIPS_ARCH.
- Set EF_MIPS_32BITMODE.
+ * config/tc-ia64.c (struct md): New field tag_fixups.
+ (ia64_flush_insns): Handle tag_fixups. Error if dangling
+ qualifying predicate.
+ (emit_one_bundle): Delete spurious multiplication by one. Handle
+ tag_fixups.
+ (ia64_start_line): Error if dangling qualifying predicate.
+ (defining_tag): New static variable.
+ (ia64_unrecognized_line, case '['): Parse tags.
+ (ia64_frob_label): Create tag_fixups.
+ (md_assemble): Reset md.qp.X_op after using it.
-Fri Apr 16 12:26:39 1999 Bob Manson <manson@charmed.cygnus.com>
+2000-10-31 Kaz Kojima <kkojima@rr.iij4u.or.jp>
- * config/obj-coff.c (c_section_symbol): Fix typo in previous
- change.
+ * config/tc-sh.c (md_apply_fix [BFD_RELOC_SH_PCDISP12BY2]): Allow 4094.
-1999-04-16 Nick Clifton <nickc@cygnus.com>
+2000-10-31 Bernd Schmidt <bernds@redhat.co.uk>
- * config/tc-mcore.h (LOCAL_LABELS_FB): Define to 1.
+ * tc-ia64.c (extra_goodness): Only prefer F in slot 1 and B in slot 2.
-Thu Apr 15 16:52:09 1999 Jeffrey A Law (law@cygnus.com)
+2000-10-30 Kazu Hirata <kazu@hxi.com>
- * tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3"
- expressions correctly.
+ * expr.c: Fix formatting.
+ * flonum-copy.c: Likewise.
+ * flonum.h: Likewise.
+ * gasp.c: Likewise.
+ * hash.c: Likewise.
+2000-10-30 Hans-Peter Nilsson <hp@bitrange.com>
-1999-04-15 Gavin Romig-Koch <gavin@cygnus.com>
+ * as.h (OPTION_MD_BASE): Bump to 190.
+ * as.c (parse_args) <std_longopts>: Add comment about the need to
+ check OPTION_MD_BASE in as.h.
- * config/tc-mips.c (mips_elf_final_processing): Set EF_MIPS_ARCH.
+ * config/tc-sh.c (md_apply_fix): For ELF, do not "adjust back" VAL
+ for weak symbols.
-Mon Apr 12 23:45:07 1999 Jeffrey A Law (law@cygnus.com)
+2000-10-27 Nick Clifton <nickc@redhat.com>
- * tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd
- and fmpynfadd instructions.
+ * configure.in (emulations): Add m68hc12.
+ * configure: Regenerate.
+ * po/gas.pot: Regenerate.
-1999-04-11 Richard Henderson <rth@cygnus.com>
+2000-10-27 Aldy Hernandez <aldyh@redhat.com>
+
+ * config/tc-arm.c (psrs): Remove lowercase versions of spsr* and
+ cpsr*.
+ (arm_psr_parse): Handle lowercase CPSR and SPSR.
+
+2000-10-25 Nick Clifton <nickc@redhat.com>
+
+ * dwarf2out.c (dwarf2_generate_asm_lineno): New function: Generate
+ a DWARF2 line number information sequence.
+
+ *dwarf2out.h: Add prototype for dwarf2_generate_asm_lineno.
+
+ * read.c (generate_lineno_debug): Update comment describing why
+ DWARF2 line number debug information is not generated
+ automatically by this function.
+
+ * doc/as.texinfo: Note that --gdwarf2 only works on some targets,
+ not all.
+
+ * config/tc-arm.h (md_end): Define.
+ (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+
+ * config/tc-arm.c (output_inst): Call dwarf2_generate_asm_lineno
+ if generating DWARF2 line numbers.
+ (arm_end_of_source): New function. Call dwarf2_finish if
+ necessary.
+
+ * config/tc-hppa.c (md_assemble): Use dwarf2_generate_asm_lineno.
+ * config/tc-m68hc11.c (m68hc11_new_insn): Use dwarf2_generate_asm_lineno.
+ * config/tc-sh.c (md_assemble): Use dwarf2_generate_asm_lineno.
+
+2000-10-25 Diego Novillo <dnovillo@cygnus.com>
+
+ * tc-i386.c: Fix prototype declarations for functions taking no
+ arguments.
+
+2000-10-24 Diego Novillo <dnovillo@cygnus.com>
+
+ * tc-i386.c (i386_operand_modifier): Remove.
+ (build_displacement_string): Remove.
+ (i386_parse_seg): Remove.
+ (i386_intel_memory_operand): Remove.
+ (i386_intel_operand): Re-write using recursive descent parser based
+ on MASM documentation.
+ (struct intel_parser_s): New structure.
+ (intel_parser): New static variable.
+ (struct intel_token): New structure.
+ (cur_token, prev_token): New static variables.
+ (T_NIL): Define.
+ (T_CONST): Define.
+ (T_REG): Define.
+ (T_BYTE): Define.
+ (T_WORD): Define.
+ (T_DWORD): Define.
+ (T_QWORD): Define.
+ (T_XWORD): Define.
+ (T_SHORT): Define.
+ (T_OFFSET): Define.
+ (T_PTR): Define.
+ (T_ID): Define.
+ (intel_match_token): New function.
+ (intel_get_token): New function.
+ (intel_putback_token): New function.
+ (intel_expr): New function.
+ (intel_e05): New function.
+ (intel_e05_1): New function.
+ (intel_e06): New function.
+ (intel_e06_1): New function.
+ (intel_e09): New function.
+ (intel_e09_1): New function.
+ (intel_e10): New function.
+ (intel_e10_1): New function.
+ (intel_e11): New function.
- * as.h (environ): Declare it, if needed.
- * as.c (dump_statistics): Don't declare environ.
- * configure.in (environ): Detect declaration.
- * configure, config.in: Rebuild
+2000-10-20 Jakub Jelinek <jakub@redhat.com>
- * config/tc-i386.c (i386_immediate): Accept @GOT relocations.
- (i386_displacement): Allocate enough space for replacement buffer.
- Clean up replacement buffer initialization.
+ * config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p
+ instructions to loose any special insn->architecture mask.
-1999-04-11 Bob Manson <manson@charmed.cygnus.com>:
+ * config/tc-sparc.c (v9a_asr_table): Add v9b ASRs.
+ (sparc_md_end, sparc_arch_types, sparc_arch,
+ sparc_elf_final_processing): Handle v8plusb and v9b architectures.
+ (sparc_ip): Handle siam mode operands. Support v9b ASRs (and
+ request v9b architecture if they are used).
- * subsegs.c (section_symbol): Don't create a new symbol if one
- already exists; instead, use the existing one, but set its segment
- and frag data if it hasn't already been defined.
- * config/obj-coff.c (c_section_symbol): Likewise.
+2000-10-18 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config/tc-m68k.c: Fix the previous misapplied patch.
+
+2000-10-18 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config/tc-m68k.h (RELAX_RELOC_*): New definitions for both
+ BFD_ASSEMBLER and !BFD_ASSEMBLER.
+ * config/tc-m68k.c (md_convert_frag_1): Use them instead of
+ BFD_RELOC_*.
+
+2000-10-17 Kazu Hirata <kazu@hxi.com>
+
+ * debug.c: Fix formatting.
+ * depend.c: Likewise.
+ * dwarf2dbg.c: Likewise.
+ * dwarf2dbg.h: Likewise.
+ * ecoff.c: Likewise.
+ * expr.c: Likewise.
+ * expr.h: Likewise.
+ * flonum-konst.c: Likewise.
+ * frags.h: Likewise.
+
+2000-10-17 Chandrakala Chavva <cchavva@redhat.com>
+
+ * as.c: New option OPTION_TARGET_HELP. Prints all target specific
+ options.
+ * doc/as.texinfo: Added notes about this new option.
+
+2000-10-16 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/tc-sh.c (JREG): Remove.
+ (md_convert_frag): Remove #if 0:d code using JREG.
+
+2000-10-15 Diego Novillo <dnovillo@cygnus.com>
+
+ * config/tc-i386.c (i386_operand_modifier): Only match
+ modifiers SHORT and FLAT if they are followed by a space.
+ (parse_register): When `allow_naked_reg' is set, do not confuse
+ identifiers that start with a register name with a register.
+
+2000-10-12 Kazu Hirata <kazu@hxi.com>
+
+ * app.c: Fix formatting.
+ * as.c: Likewise.
+ * as.h: Likewise.
+ * bit_fix.h: Likewise.
+ * cgen.c: Likewise.
+ * cgen.h: Likewise.
+ * cond.c: Likewise.
+
+2000-10-11 Alan Modra <alan@linuxcare.com.au>
+
+ * config/obj-elf.c (elf_frob_symbol): Revert 2000-10-07 change.
+
+2000-10-07 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (md_apply_fix): Remove plainly wrong assert.
+ Re-arrange function a little and improve error message.
+
+ * write.c (write_relocs): Fix a comment.
+
+ * config/obj-elf.c (elf_frob_symbol): Make section syms global on
+ link-once sections.
+
+2000-10-05 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-ia64.c (resources_match): Handle IA64_RS_PRr.
+
+2000-10-05 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c: Delete some useless comments, reformat others.
-Sat Apr 10 20:10:02 1999 Richard Henderson <rth@cygnus.com>
+ * config/tc-i386.h (TC_FIX_ADJUSTABLE): Add check to cover
+ non-global syms in linkonce sections.
- * tc-alpha.c (load_expression): Call as_bad instead of abort.
+2000-10-04 Ralf Baechle <ralf@gnu.org>
-1999-04-08 Nick Clifton <nickc@cygnus.com>
+ * config/tc-ia64.c (operand_match): Don't use // style comments.
+ * config/tc-i370.c: Likewise.
- * config/tc-mcore.c: New File: Support routines for MCore
- assembler.
- * config/tc-mcore.h: New File: Definitions for MCore assembler.
- * config/obj-coff.c: Add support for mcore-pe target.
+2000-09-29 Hans-Peter Nilsson <hp@axis.com>
- * Makefile.am: Add support for MCore targets.
- * Makefile.in: Regenerate.
- * configure.in: Add support for MCore targets.
- * configure: Regenerate.
+ Changes to handle varying register prefix and user symbol prefix.
+ * config/tc-cris.c (SYNTAX_RELAX_REG_PREFIX,
+ SYNTAX_ENFORCE_REG_PREFIX, SYNTAX_USER_SYM_LEADING_UNDERSCORE,
+ SYNTAX_USER_SYM_NO_LEADING_UNDERSCORE, REGISTER_PREFIX_CHAR): New.
+ (s_syntax, cris_force_reg_prefix, cris_relax_reg_prefix,
+ cris_sym_leading_underscore, cris_sym_no_leading_underscore): New.
+ (demand_register_prefix): New variable.
+ (md_pseudo_table): New pseudo ".syntax".
+ (md_longopts): New options --no-underscore and --underscore.
+ (cris_target_format): Return elf32-us-cris or elf32-cris depending
+ on symbols_have_leading_underscore.
+ (get_gen_reg): Accept or require REGISTER_PREFIX_CHAR.
+ (get_spec_reg): Ditto.
+ (cris_number_to_imm) <case BFD_RELOC_VTABLE_ENTRY>: Remove FIXME.
+ Fix formatting.
+ (md_parse_option) <case 'h' 'H'>: Deprecate; add reference to
+ --help.
+ <case OPTION_NO_US, case OPTION_US>: New.
+ (md_show_usage): Be brief and reformat to match continuation of
+ --help.
+ * po/gas.pot: Regenerate.
- * doc/all.texi: Set MCORE.
- * doc/as.texinfo: Document MCore specific command line options.
-
- * write.h: Prevent multiple inclusion.
+2000-09-28 Alan Modra <alan@linuxcare.com.au>
-1999-04-06 Ian Lance Taylor <ian@zembu.com>
+ * config/tc-hppa.c (hppa_force_relocation): If OBJ_SOM, don't
+ force relocs for 12 bit branches.
+ (md_apply_fix): Similarly, adjust logic here.
- * asintl.h (LC_MESSAGES): Never define.
- * as.c (main): Don't pass LC_MESSAGES to setlocale if the system
- does not define it.
- * gasp.c (main): Don't pass LC_MESSAGES to setlocale if the system
- does not define it.
+2000-09-28 Alan Modra <alan@linuxcare.com.au>
- * Makefile.am (m68k-parse.c): If configuring in the source
- directory, copy m68k-parse.y into the local directory before
- running ylwrap, to remove spurious differences when generating
- snapshots.
- * Makefile.in: Rebuild.
+ * config/tc-hppa.c (md_apply_fix): Add fmt assertion. Don't
+ adjust for external and weak syms as we will use a reloc. Allow
+ for +8 offset when calculating limits of branches.
+ (hppa_fix_adjustable): Undo 2000-09-23 change.
+ (hppa_force_relocation): Likewise. Add fx_addsy assertion.
+ Correct distance calculation.
+ (tc_gen_reloc): Print the file name and line number if we can't
+ handle a fixup.
- * config/tc-sparc.h (md_do_align): Just allocate the number of
- bytes necessary, rather than always allocating 1024.
+ From John David Anglin <dave@hiauly1.hia.nrc.ca>
+ * config/tc-hppa.c (nonzero_dibits): Define.
+ (arg_reloc_stub_needed): Check each arg and return value
+ separately for zero case.
+ (pa_align): Declare argument `bytes'.
-1999-04-04 Ian Lance Taylor <ian@zembu.com>
+2000-09-25 Kazu Hirata <kazu@hxi.com>
- * listing.c (listing_newline): Add cast to avoid warning.
- * read.c (generate_lineno_debug): Add cases to switch. Reindent.
- * config/tc-i386.c (i386_scale): Add return value.
- (build_displacement_string): Remove unused local temp_disp2.
- (i386_intel_memory_operand): Add parentheses to avoid warning.
- (i386_intel_operand): Remove unused local end_of_operand_string.
- (i386_operand): Remove unused local operand_modifier.
- (i386_operand): Add parens to avoid warning.
+ * config/tc-cris.c: Fix formatting.
+ * config/tc-d10v.h: Likewise.
+ * config/tc-d30v.c: Likewise.
+ * config/tc-d30v.h: Likewise.
+ * config/tc-fr30.c: Likewise.
+ * config/tc-fr30.h: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * config/tc-m68k.h: Likewise.
+ * config/tc-pj.h: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-ppc.h: Likewise.
+ * config/tc-sh.c: Likewise.
+ * config/tc-sh.h: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-v850.h: Likewise.
+ * config/tc-vax.h: Likewise.
+ * config/tc-w65.h: Likewise.
+ * config/tc-z8k.h: Likewise.
-1999-04-04 Don Bowman <don@pixsci.com>
+2000-09-23 Alan Modra <alan@linuxcare.com.au>
- * configure.in: Add mips*-*-vxworks* target; have it define
- MIPS_STABS_ELF.
- * configure, config.in: Rebuild.
+ * config/tc-hppa.c (hppa_fix_adjustable): Do the external and weak
+ checks only for ELF.
+ (hppa_force_relocation): Likewise.
-1999-03-31 Nick Clifton <nickc@cygnus.com>
+2000-09-22 Jim Wilson <wilson@cygnus.com>
- * configure.in (emulations): Add support for arm-epoc-pe.
- * configure: Regenerate.
- * config/te-epoc-pe.h: New file. Define macros specific to
- arm-epoc-pe target.
- * config/tc-arm.h: Select epoc-pe-arm target format if configured
- for arm-epoc-pe target.
+ * config/tc-ia64.c (dv_sem): Add "stop".
+ (specify_resource, case IA64_RS_PR): Only handles regs 1 to 15 now.
+ (specify_resource, case IA64_RS_PRr): New for regs 16 to 62.
+ (specify_resource, case IA64_RS_PR63): Reorder (note == 7) test to
+ match above.
+ (mark_resources): Check IA64_RS_PRr.
-Mon Mar 29 10:15:40 CST 1999 Catherine Moore <clm@cygnus.com>
+2000-09-22 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * tc-mips.c (md_apply_fix): Adjust value for linkonce sections.
+ * config/tc-m68k.c (md_relax_table, m68k_ip, md_convert_frag_1,
+ md_estimate_size_before_relax): Redesign and clean up the
+ relaxation mechanism.
-Wed Mar 24 14:11:10 1999 Jeffrey A Law (law@cygnus.com)
+2000-09-21 Kazu Hirata <kazu@hxi.com>
- * tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Clean up code to
- detect ",n" without a condition.
- (pa_parse_neg_cmpsub_cmpltr): Likewise.
+ * config/tc-ns32k.c: Fix formatting.
+ * config/tc-ns32k.h: Likewise.
+2000-09-20 Kazu Hirata <kazu@hxi.com>
-Tue Mar 23 11:28:23 1999 Jeffrey A Law (law@cygnus.com)
+ * config/tc-m32r.c: Fix formatting.
+ * config/tc-m32r.h: Likewise.
+ * config/tc-m68851.h: Likewise.
+ * config/tc-m68hc11.c: Likewise.
+ * config/tc-m68hc11.h: Likewise.
+ * config/tc-m88k.c: Likewise.
+ * config/tc-mcore.c: Likewise.
+ * config/tc-mcore.h: Likewise.
+ * config/tc-mips.c: Likewise.
+ * config/tc-mips.h: Likewise.
+ * config/tc-mn10200.h: Likewise.
+ * config/tc-mn10300.h: Likewise.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-tahoe.h: Likewise.
- * tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit
- instruction is encoded with one bit.
+2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+ * config/tc-vax.c (synthetic_votstrs): Remove jbssi and jbcci.
+ Likewise in relaxation description comments.
-1999-03-23 Ian Lance Taylor <ian@zembu.com>
+2000-09-18 Alan Modra <alan@linuxcare.com.au>
- * doc/internals.texi (CPU backend): Mention that
- line_separator_chars should not include newline. From thi
- <ttn@mingle.glug.org>.
+ * config/tc-hppa.h (TC_FORCE_RELOCATION_SECTION): Allow
+ subtraction of two syms without emitting a relocation.
-1999-03-22 Doug Evans <devans@casey.cygnus.com>
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * config/tc-hppa.c (hppa_force_relocation): Force relocations for
+ global or weak symbols.
- * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open.
- * config/tc-m32r.c (md_begin): Update call to m32r_cgen_cpu_open.
+2000-09-15 Kazu Hirata <kazu@hxi.com>
-Sun Mar 21 18:08:18 1999 Richard Henderson <rth@cygnus.com>
+ * config/tc-h8300.h: Fix formatting.
+ * config/tc-h8500.c: Likewise.
+ * config/tc-h8500.h: Likewise.
+ * config/tc-hppa.h: Likewise.
+ * config/tc-i370.h: Likewise.
+ * config/tc-i386.h: Likewise.
+ * config/tc-i860.c: Likewise.
+ * config/tc-i860.h: Likewise.
+ * config/tc-i960.h: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-ia64.h: Likewise.
- * tc-alpha.c (md_assemble): Allow '6' in an opcode.
+2000-09-14 Kazu Hirata <kazu@hxi.com>
-Thu Mar 18 10:55:30 1999 Jeffrey A Law (law@cygnus.com)
+ * config/tc-a29k.c: Fix formatting.
+ * config/tc-alpha.c: Likewise.
+ * config/tc-arc.c: Likewise.
+ * config/tc-arc.h: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-arm.h: Likewise.
+ * config/tc-avr.c: Likewise.
+ * config/tc-avr.h: Likewise.
+ * config/tc-tic30.c: Likewise.
+ * config/tc-tic30.h: Likewise.
+ * config/tc-tic54x.c: Likewise.
+ * config/tc-tic54x.h: Likewise.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-tic80.h: Likewise.
+
+2000-09-14 Timothy Wall <twall@cygnus.com>
+
+ * config/tc-ia64.c (specify_resource): For PR%/PR63, note types of
+ parallel comparisons for later use.
+ (struct rsrc): Add parallel comparison type.
+ (resources_match): Skip special cases of PR usage (non-conflicting
+ parallel compares).
+
+2000-09-13 Kazu Hirata <kazu@hxi.com>
+
+ * config/obj-ecoff.c: Fix formatting.
+ * config/obj-elf.c: Likewise.
+ * config/obj-elf.h: Likewise.
+ * config/obj-evax.h: Likewise.
+ * config/obj-generic.h: Likewise.
+ * config/obj-hp300.c: Likewise.
+ * config/obj-hp300.h: Likewise.
+ * config/obj-ieee.h: Likewise.
+ * config/obj-vms.c: Likewise.
+ * config/obj-vms.h: Likewise.
+
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
+
+ * config/tc-mips.c (md_begin): Recognize 4Kc, 4Km and 4Kp processors.
+ (md_parse_option): Ditto.
+ (md_longopts): Add -mips32 option.
+ (md_show_usage): Document new options.
+ (mips_ip): Assemble sdbbp 20 bit 'm' args for MIPS32.
+ (mips_ip): Assemble mfc0 with a sub-selection code.
+ (validate_mips_insn): Handle 'H' (OP_*_SEL) and 'm' (OP_*_CODE20).
+ (mips_cpu_to_str): New function.
+ (mips_ip): Use mips_cpu_to_str instead of printing numeric cpu value.
+ Use CPU_* defines instead of hardcoded numbers.
+
+ * doc/as.texinfo: Document new options.
+ * doc/c-mips.texi: Ditto.
+
+2000-09-12 Kazu Hirata <kazu@hxi.com>
+
+ * as.h: Fix formatting.
+ * asintl.h: Likewise.
+ * bit_fix.h: Likewise.
+ * config/obj-aout.c: Likewise.
+ * config/obj-aout.h: Likewise.
+ * config/obj-bout.c: Likewise.
+ * config/obj-bout.h: Likewise.
+ * config/obj-coff.c: Likewise.
+ * config/obj-coff.h: Likewise.
+ * dwarf2dbg.h: Likewise.
+ * expr.h: Likewise.
+ * flonum.h: Likewise.
+ * frags.h: Likewise.
+ * itbl-ops.h: Likewise.
+ * macro.h: Likewise.
+ * read.h: Likewise.
+ * sb.h: Likewise.
+ * struc-symbol.h: Likewise.
+ * subsegs.h: Likewise.
+ * symbols.h: Likewise.
+ * tc.h: Likewise.
+ * write.h: Likewise.
+
+2000-09-11 Kazu Hirata <kazu@hxi.com>
+
+ * bignum-copy.c: Fix formatting.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * ehopt.c: Likewise.
+ * flonum-copy.c: Likewise.
+ * flonum-konst.c: Likewise.
+ * flonum-mult.c: Likewise.
+ * literal.c: Likewise.
+ * read.c: Likewise.
+ * sb.c: Likewise.
+ * stabs.c: Likewise.
+ * subsegs.c: Likewise.
+
+2000-09-09 Philip Blundell <philb@gnu.org>
+
+ * configure.in (arm*-*-uclinux*): New target.
+ * configure: Regenerate.
- * tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr.
+2000-09-09 Kazu Hirata <kazu@hxi.com>
+ * input-file.c: Fix formatting.
+ * itbl-ops.c: Likewise.
+ * messages.c: Likewise.
-Thu Mar 18 02:30:07 1999 Jeffrey A Law (law@cygnus.com)
+2000-09-08 Philip Blundell <philb@gnu.org>
- * tc-hppa.c (pa_ip, case 'd'): Do not allow ",n".
-
-1999-03-15 Martin Hunt <hunt@cygnus.com>
+ * config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when
+ offset is negative.
- * app.c (do_scrub_begin): Change '-' back to a symbol char
- so we can use multiple opcodes on a line again.
+2000-09-07 H.J. Lu <hjl@gnu.org>
- * config/tc-d30v.c: By default, warn if a symbol has
- the same name as a register. Plus some minor
- updates from the branch.
+ * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
+ * configure: Rebuild.
-1999-03-13 Nick Clifton <nickc@cygnus.com>
+2000-09-07 Kazu Hirata <kazu@hxi.com>
- * config/tc-d30v.c (md_apply_fix3): Handle BFD_RELOC_8,
- BFD_RELOC_16 and BFD_RELOC_64.
+ * atof-generic.c: Fix formatting.
+ * config/tc-mips.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * input-scrub.c: Likewise.
-1999-03-12 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+2000-09-07 Alexandre Oliva <aoliva@redhat.com>
- * expr.c (expr): Add missing else.
+ * config/tc-sh.h (TARGET_FORMAT): Use sh-linux targets.
+ * configure.in (sh-*-linux*): Added.
+ * configure: Rebuilt.
-1999-03-12 Nick Clifton <nickc@cygnus.com>
+2000-09-06 Kazu Hirata <kazu@hxi.com>
- * config/tc-arm.c (md_apply_fix3): Improve error message.
+ * config/tc-hppa.c: Fix formatting.
-1999-03-11 Doug Evans <devans@casey.cygnus.com>
+ * ecoff.c: Fix formatting.
- * Makefile.am (CPU_TYPES): Add fr30.
- (cgen.o): Add $(CGEN_CPU_PREFIX)-desc.h dependency.
- (fr30,m32r dependencies): Update.
- * Makefile.in: Rebuild.
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
- * cgen.c (gas_cgen_record_fixup): Update use of operand->type.
- (gas_cgen_record_fixup_exp): Ditto.
- (gas_cgen_finish_insn): Call cgen_operand_lookup_by_num.
- (gas_cgen_md_apply_fix3): Ditto. Update call to set_vma_operand.
- * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open.
- (md_cgen_lookup_reloc): Update use of operand->type.
- * config/tc-m32r.c (md_begin): Update call to fr30_cgen_cpu_open.
- (md_convert_frag): Call cgen_operand_lookup_by_num.
- (md_cgen_lookup_reloc): Update use of operand->type.
- (m32r_cgen_record_fixup_exp): Ditto.
-
-1999-03-09 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * config/tc-mips.c (md_show_usage): Fix message.
-
-1999-03-03 Nick Clifton <nickc@cygnus.com>
-
- * doc/c-arm.texi (ARM Syntax): Document new command line switches
- and LDR reg,=<expr> instruction.
-
- * config/tc-arm.c: Add support for -mcpu=arm810, -mcpu=arm9 and
- -mcpu=arm9tdmi.
-
-Fri Feb 19 09:36:30 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/c-arm.texi (ARM-Chars): Fix typo in use of '@'.
-
-1999-02-17 Nick Clifton <nickc@cygnus.com>
-
- This patch was created by: Scott Bambrough
- <scottb@corelcomputer.com>
-
- * app.c:
- Special cased '@' character. The '@' character is used as the
- ARM assembler comment character, as a special character
- and in ELF .symver pseudo-op's, and as a special character in
- .type and .section pseudo-ops.
- (symver_pseudo): New static variable.
- (symver_state): New static variable.
- (struct app_save): Add field 'symver_state'.
- (app_push): Save global symver_state int struct app_save.
- (app_pop): Restore global symver_state from struct app_save.
- (do_scrub_chars): Special case handling of '@' character in
- .symver pseudo-ops.
-
- * configure.in: Modified to recognize armv* uname syntax from ARM
- Linux kernel.
- * configure: Regenerated.
-
- * config/obj-elf.c (obj_elf_section): Allow '%' as well as '@' as
- a prefix to the section's type.
- (obj_elf_type): Allow '%' as well as '@' and '#' as prefixes to
- the type's typename.
-
- * config/tc-arm.h: Add support for PIC generation:
- (pic_code): New boolean.
- (obj_relocate_extern): Define.
- (TC_RELOC_RTSYM_LOC_FIXUP): Define
- (TC_CONS_FIX_NEW): Define.
- (tc_fix_adjustable): Define.
- (GLOBAL_OFFSET_TABLE_NAME): Define.
-
- * config/tc-arm.c: Add support for PIC generation:
- (line_seperator_chars): Allow ';' as a seperator for Linux.
- (is_immediate_prefix): New macro.
- (arm_parse_reloc): New function.
- (s_arm_elf_cons): New function.
- (do_branch): Special case for BFD_RELOC_ARM_PLT32.
- (md_undefined_symbol): Special case handling for the Global Offset
- Table's symbol.
- (md_apply_fix3): Handle PIC relocs.
- (tc_gen_reloc): Handle PIC relocs.
- (md_parse_option): Add support for '-k' command line switch to
- enable PIC generation.
- (cons_fix_new_arm): New function.
- (s_arm_elf_cons): New function.
-
-Tue Feb 16 16:31:53 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add comments for uses of AC_DEFINE.
- * acinclude.m4: Likewise.
- * acconfig.h: Remove.
- * aclocal.m4: Rebuild.
- * configure: Rebuild.
- * Makefile.in: Rebuild.
- * config.in: Rebuild.
+ * configure: Rebuilt with new libtool.m4.
-1999-02-15 Jim Lemke <jlemke@cygnus.com>
+2000-09-05 Kazu Hirata <kazu@hxi.com>
- * config/tc-mips.c (mips_ip: case 'o'): Fix assertion failure for
- non-constant offset from a base register.
+ * cgen.c: Fix formatting.
+ * config/tc-ia64.c: Likewise.
-1999-02-14 Ken Raeburn <raeburn@raeburn.org>
+2000-09-05 Nick Clifton <nickc@redhat.com>
- * config/tc-alpha.c (md_show_usage): Put \ before newline in
- strings always.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * po/gas.pot: Regenerate.
-Sat Feb 13 14:10:10 1999 Richard Henderson <rth@cygnus.com>
+2000-09-05 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/tc-cris.c: Correct comment typos.
+
+2000-09-05 Eric Christopher <echristo@cygnus.com>
+
+ * config/tc-mn10300.c: Cleanup.
+ (md_pcrel_from): Enable.
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ * expr.c (operand): Fix a comment typo.
+ * write.c (write_relocs): Fix a signed/unsigned warning.
+
+ * config/tc-hppa.c (fudge_reg_expressions): New
+ (hppa_force_reg_syms_absolute): New.
+ (pa_equ): Allow reg_section expressions.
+ * config/tc-hppa.c (md_optimize_expr): Define.
+ (hppa_force_reg_syms_absolute): Prototype.
+
+ * config/tc-hppa.c (pa_11_fp_reg_struct): Delete.
+ (pa_parse_number): Pass in arg to select fp reg parsing.
+ Return 1 to indicate format checks pass. If strict, then only
+ accept a register or register symbol. Return value in...
+ (pa_number): New static for pa_parse_number.
+ (FP_REG_BASE): Define.
+ (FP_REG_RSEL): Define.
+ (pre_defined_registers): Apply FP_REG_BASE and FP_REG_RSEL as
+ appropriate. White space changes.
+ (need_pa11_opcode): Don't bother passing any params, get them from
+ globals instead.
+ (pa_ip): Modify all calls to pa_parse_number and need_pa11_opcode.
+ Remove extraneous check in case 'Q'.
+ (pa_equ): Modify call to pa_parse_number to do strict parsing. If
+ reg, set section of resulting symbol to reg_section.
+ (pa_parse_space_stmt): Modify call to pa_parse_number.
+ (pa_space): Likewise.
+
+ * config/tc-hppa.c: (md_apply_fix): Handle vtable relocs.
+ (hppa_force_relocation): Handle vtable relocs.
+ (pa_vtable_entry): New.
+ (pa_vtable_inherit): New.
+ (md_pseudo_table): Add entries for vtable pseudos.
+ (hppa_fix_adjustable): Reject reduction of R_PARISC_GNU_VTINHERIT
+ and R_PARISC_GNU_VTENTRY relocs. Reject reduction of relocs
+ against weak syms.
+ (tc_gen_reloc): Remove ELF_ARG_RELOC_INSN code.
+ (pa_type_args): Don't call symbol_get_bfdsym multiple times.
+ Set STT_PARISC_MILLICODE for OBJ_ELF when encountering a
+ millicode import.
+ * config/obj-elf.c (obj_elf_type): Allow md_elf_symbol_type to
+ specify a symbol type.
+
+ * config/tc-hppa.h: Reorganize file a little, grouping OBJ_ELF
+ dependent things together.
+ (md_elf_symbol_type): Define.
+
+ * config/tc-hppa.c (fix_new_hppa): Elide "$PIC_pcrel$0" pseudo
+ symbol.
+ * config/tc-hppa.h (tc_frob_symbol): Elide "$PIC_pcrel$0" here too.
- * config/tc-alpha.c (cpu_types): Enable EV6 PALcode with -m21264.
- (emit_insn): Look for pc-relative and no-overflow specifiers on
- internal relocation types.
+ * config/obj-elf.h (obj_elf_vtable_inherit): Declare.
+ (obj_elf_vtable_entry): Declare.
-1999-02-13 Jim Blandy <jimb@zwingli.cygnus.com>
+ * config/obj-elf.c (obj_elf_vtable_inherit): Return struct fix *
+ and export function.
+ (obj_elf_vtable_entry): Similarly.
+ (elf_pseudo_table): Fix the damage with a cast.
- * doc/c-mips.texi (MIPS Opts): Updated list of -mNNNN and
- -mcpu=NNNN flags.
+2000-09-03 Richard Henderson <rth@cygnus.com>
- * config/tc-mips.c: Remove all the mips_NNNN variables; just use
- mips_cpu instead.
- (mips_4650, mips_4010, mips_4100): Variables removed.
- (hilo_interlocks, gpr_interlocks, append_insn, macro_build, macro,
- macro2, mips16_macro, mips_ip): Test mips_cpu, not the mips_NNNN
- variables.
- (md_begin): Don't bother initializing the mips_NNNN variables;
- mips_cpu is set, and that's good enough now.
- (md_parse_option): Have the -mNNNN options set mips_cpu instead of
- the mips_NNNN variable. The -no-mNNNN flags are now no-ops.
- (show): New function, to handle wrapping in the CPU lists.
- (md_show_usage): Update lists of -mcpu and -mNNNN switches.
+ * config/tc-ia64.c (emit_one_bundle): Stop collecting insns
+ for template selection when a label is needed.
-Sat Feb 13 00:17:26 1999 Richard Henderson <rth@cygnus.com>
+2000-09-02 Kazu Hirata <kazu@hxi.com>
- * config/tc-i386.c (i386_intel_operand): Ignore `SHORT' rather
- than treat as an immediate specifier.
+ * config/tc-ia64.c: Fix formatting.
-Thu Feb 11 16:18:31 1999 Richard Henderson <rth@cygnus.com>
+2000-09-02 Nick Clifton <nickc@redhat.com>
- * config/tc-i386.c: Prototype many functions.
- (set_intel_syntax): Accept `prefix'/`noprefix' specifiers.
- (i386_immediate): Remove unused second argument.
- (i386_intel_operand): Fix i386_is_reg typo.
- (i386_operand): Use allow_naked_reg.
- (output_invalid): Make operand int for K&R.
+ * configure.in: Increase version number to 2.10.91.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/gas.pot: Regenerate.
+ * Makefile.in: Regenerate.
-Thu Feb 11 11:21:02 1999 Ian Lance Taylor <ian@cygnus.com>
+2000-09-01 Alexandre Oliva <aoliva@redhat.com>
- * Makefile.am (EXTRA_as_new_SOURCES): Uncomment--fixed by automake
- patch.
- * Makefile.in: Rebuild.
+ * config/tc-sh.h [OBJ_ELF] (TC_FIX_ADJUSTABLE): Define.
+ * config/tc-sh.c (md_apply_fix): Map 32-bit relocations that
+ become PC-relative to BFD_RELOC_32_PCREL. Reject 16- or 8-bit
+ similar relocs.
+ (sh_obj_adjustable): Return 1 for PC-relative offsets used in
+ branches.
-1999-02-09 Doug Evans <devans@casey.cygnus.com>
+2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
- * Makefile.am (DISTCLEANFILES): Change cgen-opc.h to cgen-desc.h.
- (cgen.o): Ditto.
- (EXTRA_as_new_SOURCES): Comment out.
- (.tcdep): <arch>-opc.h renamed to <arch>-desc.h.
- * Makefile.in: Rebuild.
- * doc/Makefile.in: Rebuild.
- * configure.in: Require autoconf 2.13. Redo using_cgen handling.
- Delete call to AM_CYGWIN32. Replace AM_EXEEXT with AC_EXEEXT.
- (AC_OUTPUT): <arch>-opc.h renamed to <arch>-desc.h.
- * configure: Rebuild.
- * aclocal.m4: Rebuild.
- * config.in: Rebuild.
- * cgen.c: Include cgen-desc.h, not cgen-opc.h.
- (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
- (gas_cgen_cpu_desc): Renamed from gas_cgen_opcode_desc.
- CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
- CGEN_OPERAND_ATTR renamed to CGEN_OPERAND_ATTR_VALUE.
- (gas_cgen_record_fixup): Remove unnecessary != 0 test.
- (gas_cgen_record_fixup_exp): Ditto.
- (gas_cgen_finish_insn): Ditto. Refer to operand table via cpu
- descriptor, not global variable.
- (gas_cgen_md_apply_fix3): Refer to operand_table via cpu
- descriptor, not global variable. Refer to insert_operand handler
- via cpu descriptor, not global function.
- * cgen.h (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
- * config/tc-fr30.c: Include opcodes/fr30-desc.h.
- (*): gas_cgen_opcode_desc renamed to gas_cgen_cpu_desc.
- CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
- Update call to CGEN_OPERAND_TYPE,CGEN_INSN_OPERANDS.
- * config/tc-m32r.c: Ditto.
- (assemble_two_insns): Update calls to cgen_lookup_get_insn_operands.
- (md_assemble): Ditto.
- (md_convert_frag): Update call to CGEN_OPERAND_ENTRY.
-
-1999-02-09 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_apply_fix3): Fix handling of label1 - label2
- relocations for ELF targets.
-
-1999-02-08 Nick Clifton <nickc@cygnus.com>
-
- * configure.in: Add support for StrongARM target.
- * configure: Regenerate.
+ * config/tc-sh.h (DIFF_EXPR_OK, GLOBAL_OFFSET_TABLE_NAME,
+ TC_RELOC_GLOBAL_OFFSET_TABLE, TC_RELOC_RTSYM_LOC_FIXUP): Define.
+ * config/tc-sh.c (sh_elf_cons, sh_elf_suffix): New functions.
+ [OBJ_ELF] (md_pseudo_table) <long, int, word, short>: Use them.
+ (GOT_symbol): New variable.
+ (md_undefined_symbol): Set it.
-1999-02-05 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.h: Tidy OBJ_ELF and OBJ_COFF definitions.
-
- * config/tc-arm.c (md_apply_fix3): Fix BFD_RELOC_ARM_PCREL_BRANCH
- for COFF ports.
-
-Wed Feb 3 11:35:47 1999 Richard Henderson <rth@cygnus.com>
-
- * config/tc-alpha.c (md_show_usage): Document pca56 and ev6 options.
-
-Mon Feb 1 20:37:30 1999 Catherine Moore <clm@cygnus.com>
-
- * config/tc-i386.h (LONG_DOUBLE_MNEM_SUFFIX): Define.
- (INTEL_DWORD_MNEM_SUFFIX): Define.
- (BYTE_PTR): Define.
- (WORD_PTR): Define.
- (DWORD_PTR): Define.
- (XWORD_PTR): Define.
- (SHORT): Define.
- (OFFSET_FLAT): Define.
- (FLAT): Define.
- (NONE_FOUND): Define.
- (No_dSuf): Define.
- (No_xSuf): Define.
- * config/tc-i386.c (set_intel_syntax): New routine.
- (intel_syntax): Declare.
- (allow_naked_reg): Declare.
- (md_pseudo_table): Support .intel_syntax and .att_syntax.
- (intel_float_operand): New routine.
- (md_assemble): Handle INTEL_DWORD_MNEM_SUFFIX.
- Handle brackets as well as parens. Call i386_intel_operand for
- intel syntax. Reverse operands if appropriate. Handle new
- suffixes. Handle movzx and movsx.
- (i386_is_reg): New routine.
- (i386_immediate): New routine.
- (i386_scale): New routine.
- (i386_displacement): New routine.
- (i386_operand_modifier): New routine.
- (build_displacement_string): New routine.
- (i386_parse_seg): New routine.
- (i386_intel_memory_operand): New routine.
- (i386_intel_operand): New routine.
- (i386_operand): Call i386_displacement, i386_immediate,
- i386_scale, etc. instead of handling inline.
- (parse_register): Handle registers without prefix.
-
-Mon Feb 1 12:24:58 1999 Catherine Moore <clm@cygnus.com>
-
- * configure: Regenerate.
- * configure.in (arm-*-oabi): New.
- (thumb-*-oabi): New.
- * config/tc-arm.c (target_oabi): Declare.
- (md_apply_fix3): Support REL relocs.
- (md_parse_option): Handle -oabi.
- (elf32_arm_target_format): New routine.
- (md_longopts): Add OPTION_OABI.
- * config/tc-arm.h: Redefine TARGET_FORMAT.
-
-
-1999-01-28 Nick Clifton <nickc@cygnus.com>
-
- * write.c (write_relocs): Handle out of range error.
-
- * config/tc-fr30.c (fr30_fix_adjustable): New function.
- (fr30_force_relocation): Default to 0.
-
- * config/tc-fr30.h (obj_fix_adjustable): Define.
- (TC_FORCE_RELOCATION): Define.
-
- * cgen.c (gas_cgen_md_apply_fix3): Do not apply fixes to VTABLE
- relocs.
-
-1999-01-16 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d30v.c (write_2_short): Do not generate a sequential
- merge of two instructions if the left instruciton kills the right.
-
-1999-01-11 Doug Evans <devans@casey.cygnus.com>
+2000-09-01 Richard Henderson <rth@cygnus.com>
- * Makefile.in: Regenerate.
- * configure.in: Redo test for using cgen.
- * configure: Regenerate.
+ * config/tc-ia64.c (match): Don't inline.
+ (extra_goodness): New.
+ (md_begin): Prefer nop.f and nop.b for best_template.
-1999-01-09 Nick Clifton <nickc@cygnus.com>
+2000-08-31 Kazu Hirata <kazu@hxi.com>
- * config/obj-coff.h (obj_adjust_symtab): Prevent accidental
- redefinition of this macro.
+ * as.c: Fix formatting.
+ * cond.c: Likewise.
+ * frags.c: Likewise.
+ * macro.c: Likewise.
-Tue Jan 5 21:58:03 1999 Doug Evans <devans@canuck.cygnus.com>
+2000-08-31 Eric Christopher <echristo@cygnus.com>
- * config/tc-mips.c (mips_frob_file): Disable "Unmatched %hi reloc"
- warning.
+ * config/tc-mn10300.c: Cleanup and fix warnings.
+ (md_pseudo_table): Add initializers.
+ (md_show_usage): Cleanup.
+ (md_parse_option): Fix warnings.
+ (md_undefined_symbol): Fix warnings.
+ (md_conver_frag): Fix warnings.
+ (tc_gen_reloc): Fix warnings.
+ (md_apply_fix3): Fix warnings.
+ (check_operand): Fix warnings.
-1998-12-29 Gavin Romig-Koch <gavin@cygnus.com>
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mips.c (append_insn): For mips16, insert a nop between
- a read of HI or LO and an immediatly following branch.
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
-1998-12-29 Gavin Romig-Koch <gavin@cygnus.com>
+2000-08-30 Mark Hatle <mhatle@mvista.com>
- * config/tc-mips.c (md_begin): Another correction to the setting of
- mips_eabi64.
+ * config/tc-ppc.c (md_parse_option): Recognize -m405.
-1998-12-23 Gavin Romig-Koch <gavin@cygnus.com>
+2000-08-31 Kazu Hirata <kazu@hxi.com>
- * config/tc-mips.c (md_begin): Correct type-o in setting of mips_eabi64.
+ * listing.c: Fix formatting.
-1998-12-21 Nick Clifton <nickc@cygnus.com>
+2000-08-29 Kazu Hirata <kazu@hxi.com>
- * config/tc-m32r.c (md_assemble): Emit a NOP after a relaxable 16
- bit insn when optimizing, so that parallelised instructions will
- start on a 32 bit boundary.
+ * app.c: Fix a comment typo. Fix formatting.
-1998-12-19 Gavin Romig-Koch <gavin@cygnus.com>
+2000-08-25 J. David Anglin <dave@hiauly1.hia.nrc.ca>
- * config/tc-mips.c (mips_eabi64): New.
- (md_begin): Set mips_eabi64.
- (mips_elf_final_processing): Use it.
+ * tc-vax.c (md_convert_frag): Correctly calculate the pc relative
+ offset of the target destination for jmp instructions.
+ (md_assemble): Change mode to VAX_ABSOLUTE_MODE as per comments.
-1998-12-18 Gavin Romig-Koch <gavin@cygnus.com>
+2000-08-24 Hans-Peter Nilsson <hp@axis.com>
- * config/tc-mips.c (mips_elf_final_processing):
- Correct setting of ABI in e_flags.
+ * NEWS: Mention support for CRIS.
-Wed Dec 16 16:17:22 1998 Dave Brolley <brolley@cygnus.com>
+Thu Aug 24 20:41:05 2000 Denis Chertykov <denisc@overta.ru>
- * config/tc-fr30.c (md_assemble): Warn about invalid instructions in delay slots.
+ * config/tc-avr.h (TC_IMPLICIT_LCOMM_ALIGNMENT): New macros.
+ Sets `.lcomm' alignment to zero.
-1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
+2000-08-23 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mips.c (md_begin,md_parse_option): Handle vr4111.
-
-1998-12-15 Doug Evans <devans@casey.cygnus.com>
+ * config/tc-i386.h <OBJ_MAYBE_ELF, OBJ_MAYBE_COFF>
+ (TC_FIX_ADJUSTABLE): Define.
- * cgen.c (gas_cgen_md_apply_fix3): Mark as an error, rather than a
- warning, values that don't fit in the field.
+2000-08-23 Jim Wilson <wilson@cygnus.com>
-1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
+ * config/tc-ia64.c (output_unw_records): Set U & E flags only if
+ unwind.personality_routine is set.
- * config/tc-mips.c (mips_abi_string): New.
- (md_parse_option,md_longopts): Add mabi.
- (mips_elf_final_processing): Set e_flags based on mabi flag.
+2000-08-23 H.J. Lu <hjl@gnu.org>
-1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
+ * write.c (TC_FIX_ADJUSTABLE): Remove the duplicate.
- * config/tc-mips.c (md_parse_option): Handle vr4111.
+2000-08-23 Alexandre Oliva <aoliva@redhat.com>
-98-12-11 Ken Raeburn <raeburn@cygnus.com>
+ * config/tc-i386.h (TC_FIX_ADJUSTABLE): Do *NOT* define if target
+ environment is pe.
- * config/tc-h8300.c (build_bytes): Change message given if the
- instruction requires H8/300H mode and we're not in Hmode, to
- suggest that it may be the operand modes that are the problem, not
- necessarily the opcode.
+2000-08-22 H.J. Lu <hjl@gnu.org>
-1998-12-10 Nick Clifton <nickc@cygnus.com>
+ * config.in (STRICTCOFF): New for strict COFF.
- * config/tc-fr30.c: Add line separator character.
+ * configure.in: Define STRICTCOFF for i386-*-msdosdjgpp*,
+ i386-*-go32* and i386-go32-rtems*.
+ * configure: Rebuilt.
-Tue Dec 8 19:51:50 1998 Mark Klein <mklein@dis.com>
+ * config/obj-coff.c (obj_coff_endef): Follow the historical
+ behavior if STRICTCOFF is not defined.
- * configure.in (hppa-*-mpeix*): New target.
- * config/obj-som.h (obj_som_compiler): Declare.
- * config/obj-som.c (compiler_seen): New static variable.
- (obj_som_compiler): New function.
- * config/tc-hppa.c: Update tc_data uses for change to bfd/som.h.
- (md_pseudo_table): Add "compiler" if OBJ_SOM.
- (pa_type_args): Set hppa_priv_level.
- (pa_compiler): New static function if OBJ_SOM.
- * configure: Rebuild.
+ * doc/internals.texi: Document STRICTCOFF.
-Tue Dec 8 15:00:50 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-08-22 Alexandre Oliva <aoliva@redhat.com>
- * read.c (output_leb128): Don't mark as inline.
+ * write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined.
+ (fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE.
+ * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
+ <OBJ_ELF, OBJ_COFF, TE_PE> (TC_FIX_ADJUSTABLE): Define.
+ * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
+ <OBJ_ELF> (TC_FIX_ADJUSTABLE): Define.
+ * config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h:
+ Likewise.
-1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
+2000-08-22 Eric Christopher <echristo@cygnus.com>
- * config/tc-ppc.c (ppc_vbyte): Prototype and new function for
- AIX .vbyte unaligned data support.
- (md_pseudo_table): Add 'vbyte' to list of valid pseudos.
- (ppc_elf_validate_fix): Add eh_frame to list of ELF relocatable
- sections.
+ * config/tc-mn10300.c: (md_apply_fix): New function.
+ (mn10300_force_relocation): New function.
+ (mn10300_fix_adjustable): New function.
-1998-12-07 Nick Clifton <nickc@cygnus.com>
+ * config/tc-mn10300.h: (TC_FORCE_RELOCATION): Define.
+ (TC_HANDLES_FX_DONE): Define.
+ (obj_fix_adjustable): Define.
+ (MD_APPLY_FIX3): Define.
+ (TC_LINKRELAX_FIXUP): Define.
- * config/tc-d30v.c (md_assemble, do_assemble): Improve erroneous
- input handling.
+ * write.c: (TC_LINKRELAX_FIXUP): Define if not
+ previously defined.
+ (fixup_segment): Use TC_LINKRELAX_FIXUP.
-Mon Dec 7 09:48:34 1998 Catherine Moore <clm@cygnus.com>
+ * doc/internals.texi: Document TC_LINKRELAX_FIXUP.
- * config/tc-arm.c (elf32_arm_force_relocation): Check for
- BFD_RELOC_ARM_PCREL_BRANCH.
+2000-08-21 Jason Eckhardt <jle@cygnus.com>
-Sun Dec 6 12:46:36 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i860.c (md_apply_fix3): Do not insert the immediate
+ if the fixup resulted in a relocation.
- * configure.in: Define TARGET_BYTES_{BIG,LITTLE}_ENDIAN after
- checking the target type.
- (mips-dec-bsd*): Set endian to little.
- * configure: Rebuild.
+2000-08-18 Nick Clifton <nickc@redhat.com>
- COFF weak symbol support, based on patches from Mark Elbrecht
- <snowball3@usa.net>:
- * config/obj-coff.h (S_IS_WEAK): Define if not BFD_ASSEMBLER.
- * config/obj-coff.c (obj_coff_weak): New static function.
- (obj_coff_endef) [both versions]: Handle weak symbols.
- (coff_frob_symbol): Likewise.
- (yank_symbols): Likewise.
- (obj_pseudo_table): Add "weak".
-
- * configure.in (m68k-*-gnu*): New target. From Aymeric Vincent
- <aymeric.vincent@emi.u-bordeaux.fr>.
- * aclocal.m4: Rebuild with current tools.
- * configure: Rebuild.
+ * config/tc-arm.c (decode_shift): Replace as_tsktsk with as_warn.
+ Make reference to first element of shift_names explicit.
- * config/tc-alpha.c (emit_ldgp): Give an error message rather than
- an assertion failure for a case we can't handle when OBJ_ECOFF.
+2000-08-18 Alexandre Oliva <aoliva@redhat.com>
- * expr.c (operator): And with 0xff to avoid problems with signed
- char.
+ * write.c (fixup_segment) [TC_DONT_FIX_NON_ADJUSTABLE]: Use
+ obj_fix_adjustable() and tc_fix_adjustable() to tell whether to
+ add a symbol's address. Removed all target-specific #ifdefs that
+ used to accomplished the same.
+ * config/tc-v850.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+ * config/tc-m68k.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+ * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+ * config/tc-i960.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+ * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
-1998-12-03 Nick Clifton <nickc@cygnus.com>
+2000-08-17 Kazu Hirata <kazu@hxi.com>
- * config/tc-fr30.c (md_cgen_lookup_reloc): Generate
- BFD_RELOC_FR30_48 instead of BFD_RELOC_FR30_32.
+ * dwarf2dbg.c: Fix formatting.
-1998-12-02 Nick Clifton <nickc@cygnus.com>
+2000-08-17 Nick Clifton <nickc@redhat.com>
- * config/tc-fr30.c (md_cgen_lookup_reloc): Enable relocs for
- LDI:20 insn.
+ * config/tc-arm.c (decode_shift): Allow illegal shifts by zero
+ to be recoded as logical shift lefts by zero.
-Thu Nov 26 11:23:48 1998 Dave Brolley <brolley@cygnus.com>
+2000-08-16 Jim Wilson <wilson@cygnus.com>
- * config/tc-fr30.c (md_pcrel_from_section): Restore previous calculation
- of pcrel point.
+ * config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle
+ postincrement modified registers. Handle IA64_OPND_R3_2 addl
+ source registers.
+ (note_register_values): Handle IA64_OPND_R3_2 operands.
-Tue Nov 24 17:21:52 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-16 Jason Eckhardt <jle@cygnus.com>
- * config/tc-fr30.c (md_pcrel_from_section): Fix calculation of
- pcrel point.
+ * config/tc-i860.c (md_operand): Silly typo fixed.
-Tue Nov 24 14:54:38 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-16 Nick Clifton <nickc@redhat.com>
- * config/tc-d10v.c (md_assemble): Make static 'etype' have file
- scope.
- (d10v_cleanup): Only generate previous insn if a multiline insn is
- not pending.
+ * config/tc-arm.c (struct asm_shift): Delete.
+ (shift[]): Delete.
+ (enum asm_shift_index): New.
+ (struct asm_shift_properties): New.
+ (struct asm_shift_name): New.
+ (shift_properties[]); New.
+ (shift_names[]); New.
-Fri Nov 20 11:41:13 1998 Nick Clifton <nickc@cygnus.com>
+ (decode_shift): Use new structures.
+ Issue a warning is "ROR #0" is used.
+ Issue a warning if "ASR #0" or "LSR #0" is used.
- * config/tc-fr30.c (md_cgen_lookup_reloc): Add support for
- FR30_OPERAND_I32.
+ (md_begin): Initialise arm_shift_hsh table from new
+ asm_shift_name array.
-Thu Nov 19 15:01:29 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-16 Jakub Jelinek <jakub@redhat.com>
- * config/tc-arm.c (md_parse_option): Add support for -marm7xxx and
- -marm6xxx command line switches.
+ * config/tc-sparc.c: Kill all warnings.
+ (md_parse_option): Set -32/-64 for -xarch=, allow all -A archs
+ in -xarch= as well.
+ (md_show_usage): Update usage text.
-1998-11-18 Doug Evans <devans@casey.cygnus.com>
+2000-08-16 Nick Clifton <nickc@redhat.com>
- * Makefile.am (DEP): Use $(srcdir)/../mkdep.
- (itbl-ops.o): Delete duplicate dependencies.
- Rebuild dependencies.
- Add fr30 dependencies.
- * Makefile.in: Rebuild.
+ * config/tc-arm.c (do_bx): Warn about "bx px" not being very
+ useful.
-Tue Nov 17 13:42:42 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-15 Will Cohen <wcohen@redhat.com>
- * config/tc-fr30.c (md_cgen_lookup_reloc): Updated to match latest
- opcode list.
- * listing.c: Ignore line terminator characters found inside
- strings.
+ * config/tc-sh.h (DWARF2_LINE_MIN_INSN_LENGTH): Defined.
-Thu Nov 12 19:21:24 1998 Dave Brolley <brolley@cygnus.com>
+ * config/tc-sh.c (md_assemble): Changed so debug_type
+ test performed for ppi_assemble
+ * config/tc-sh.c: Included dwarf2dbg.h.
+ (debug_line): Defined.
+ (md_assemble): Generates dwarf2 line info.
+ (sh_finalize): New function. Finalize dwarf2 info.
+ (assemble_ppi): Returns size of code generated.
+ (build_Mytes): Returns size of code generated.
+ (md_pseudo_table): Added "file" and "loc" psuedo ops.
+ * config/tc-sh.h (md_end): Defined.
+ (sh_finalize): Declared.
- * po/gas.pot: Regenerated.
+2000-08-15 Alexandre Oliva <aoliva@redhat.com>
-Thu Nov 12 10:54:16 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-sh.c (md_apply_fix) [BFD_RELOC_32, BFD_RELOC_16]: Use
+ md_number_to_chars.
- * config/tc-fr30.c (fr30_is_colon_insn): New name for
- fr30_is_label_start(). Also checks for delay slot insns.
+2000-08-14 Nick Clifton <nickc@redhat.com>
- * config/tc-fr30.c (fr30_is_label_start): New function: Handle
- FR30 instructions which contain a colon in the mnemonic.
+ * config/tc-arm.c (do_bx): Allow "bx pc".
- * config/tc-fr30.h (TC_START_LABEL): Define this macro.
+2000-08-14 Jim Wilson <wilson@cygnus.com>
-Wed Nov 11 09:58:21 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-ia64.c (md_longopts): Add -mconstant-gp and -mauto-pic.
+ (md_parse_option): Add OPTION_MCONSTANT_GP and OPTION_MAUTO_PIC.
+ (md_begin): Change assignment to md.flag to OR in the new bit.
- * config/tc-fr30.c: Removed currently superflous code.
+2000-08-14 Mark Elbrecht <snowball3@bigfoot.com>
-Tue Nov 10 13:13:05 1998 Nick Clifton <nickc@cygnus.com>
+ * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Set the debug
+ flag for storage types C_ARG, C_REGPARM, C_FIELD, C_MOS, C_MOE,
+ C_MOU, and C_EOS.
- * config/tc-fr30.h: New file.
- * config/tc-fr30.c: Tweaking so that it will compile.
+2000-08-14 Jason Eckhardt <jle@cygnus.com>
-Tue Nov 10 14:41:33 1998 Catherine Moore <clm@cygnus.com>
+ * NEWS: Mention i860 support.
- * config/tc-d10v.h (obj_fix_adjustable): Define.
- (TC_FORCE_RELOCATION): Define.
- (d10v_force_relocation): Declare.
- * config/tc-d10v.c (tc_gen_reloc): Handle Vtable relocs.
- (md_apply_fix3): Handle Vtable relocs.
- (d10v_fix_adjustable): New.
- (d10v_force_relocation): New.
+Mon Aug 14 11:49:12 2000 Jeffrey A Law (law@cygnus.com)
-Mon Nov 9 14:25:06 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-mn10300.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
- * config/tc-d30v.c: Change default behaviour to ignore potential
- conflicts between register name and symbol names.
+2000-08-14 Andreas Schwab <schwab@suse.de>
-Wed Nov 4 18:42:00 1998 Dave Brolley <brolley@cygnus.com>
+ * doc/c-arm.texi (ARM Directives): Fix warnings from makeinfo.
- * configure.in: Add fr30-*-*.
- * config/tc-fr30.c: New file.
- * Makefile.in: Regenerated.
- * config.in: Regenerated.
- * configure: Regenerated.
- * doc/Makefile.in: Regenerated.
- * po/gas.pot: Regenerated.
+2000-08-11 Andreas Schwab <schwab@suse.de>
-Mon Nov 2 20:54:16 1998 Doug Evans <devans@canuck.cygnus.com>
+ * doc/c-i860.texi (Opcodes for i860): Remove braces from @item
+ argument.
- * config/tc-m32r.c (assemble_two_insns): Ensure both insns
- are 16 bit insns.
+2000-08-11 Kazu Hirata <kazu@hxi.com>
-Mon Nov 2 20:10:18 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
+ * expr.c: Fix formatting.
+ * config/obj-bout.c: Likewise.
- * app.c (do_scrub_begin): Set characters above 127 to be symbol
- characters.
- (do_scrub_chars): Add some casts to unsigned char to avoid
- unwanted sign extension.
- * read.c (lex_type): Set characters about 127 to be symbol
- characters.
- * config/tc-i386.c (md_begin): Set identifier_chars and
- operand_chars for values above 127.
+2000-08-10 Jason Eckhardt <jle@cygnus.com>
-Mon Nov 2 15:05:33 1998 Geoffrey Noer <noer@cygnus.com>
+ * doc/c-i860.texi: Flesh out the i860 section more.
- * configure.in: detect cygwin* instead of cygwin32*
- * configure: regenerate
+2000-08-10 Kazu Hirata <kazu@hxi.com>
-Tue Oct 27 13:18:40 1998 Nick Clifton <nickc@cygnus.com>
+ * symbols.c: Fix formatting.
+ * expr.c: Likewise.
- * listing.c: Add support for producing a listing from piped
- input.
+Wed Aug 9 16:28:21 EDT 2000 Diego Novillo <dnovillo@cygnus.com>
-Tue Oct 27 08:56:44 1998 Gavin Romig-Koch <gavin@cygnus.com>
+ * tc-i386.c (md_assemble): Skip suffix check if the opcode modifier
+ has the IgnoreSize bit set.
- * config/tc-mips.c (hilo_interlocks): Remove mips_3900.
- (append_insn): Account for the tx39's multiply behavior.
+2000-08-09 Alan Modra <alan@linuxcare.com.au>
-1998-10-26 Michael Meissner <meissner@cygnus.com>
+ From Rodney Brown <RodneyBrown@mynd.com>
+ * configure.in: Use elf on Unixware 7 (i586-sco-sysv5uw7.1.0)
+ * configure: Regenerate.
- * config/tc-m32r.c (assemble_two_insns): Rename assemble_two_insns
- from assemble_parallel_insns. Add support for '->' to indicate
- explicitly serializing the instructions.
- (md_assemble): Ditto.
+2000-08-09 Kazu Hirata <kazu@hxi.com>
-Sat Oct 24 15:12:19 1998 Catherine Moore <clm@cygnus.com>
+ * hash.c: Fix formatting.
+ * gasp.c: Likewise.
- * config/tc-sh.c (sh_fix_adjustable): Adjust EXTERN and
- WEAK handling.
+2000-08-08 Jason Eckhardt <jle@cygnus.com>
-Thu Oct 22 12:41:33 1998 Catherine Moore <clm@cygnus.com>
+ * config/tc-i860.h: Rework completely for BFD_ASSEMBLER.
+ (i860_fix_info): New enum.
+ (MD_APPLY_FIX3): Define.
+ (WORKING_DOT_WORD): Define.
+ (TC_HANDLES_FX_DONE): Define.
+ (DIFF_EXPR_OK): Define.
+ (LISTING_HEADER): Define.
+ (TARGET_FORMAT): Select target format based on endian flag.
+ (TARGET_BYTES_BIG_ENDIAN): Default to little endian.
+ (target_big_endian): Add external declaration.
- * cgen.c (gas_cgen_md_apply_fix3): Revert last change.
+ * config/tc-i860.c: All existing code reworked completely. Other
+ new code shown below.
+ (SYNTAX_SVR4): Define.
+ (target_warn_expand): New variable.
+ (md_shortopts): Declare and define (-Qy, -Qn, and -V options).
+ (md_longopts): Declare and define with new options (-EL, -EB,
+ and -mwarn-expand).
+ (md_show_usage): New function.
+ (md_operand): New function.
+ (obtain_reloc_for_imm16): New function.
+ (md_apply_fix3): New function.
+ (tc_gen_reloc): New function.
-Thu Oct 22 10:03:15 1998 Ron Unrau <runrau@cygnus.com>
+2000-08-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
- * config/tc-mips.c : support frame and regmask/fregmask when
- MIPS_STABS_ELF is specified.
+ * config/tc-m68hc11.c (build_jump_insn): Make sure the
+ 2 bytes of the jump address are in the same frag.
+ (find): Accept 68hc12 register indirect modes.
-Wed Oct 21 11;34:51 1998 Catherine Moore <clm@cygnus.com>
+ * NEWS: Mention 68HC11 & 68HC12 support.
- * config/tc-sh.c (sh_fix_adjustable): Only include if OBJ_ELF.
- (md_apply_fix): Don't return 1 for VTABLE relocs.
- * config/tc-sh.h (obj_fix_adjustable): Define only if OBJ_ELF.
+2000-08-07 Richard Henderson <rth@cygnus.com>
-Tue Oct 20 11:18:28 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-ia64.c (unwind): Add prologue_mask member.
+ (dot_vframe): Elide psp_gr record if it overlaps prologue_gr.
+ (dot_save): Likewise for pfs_gr, rp_gr, and preds_gr.
+ (dot_body): Clear unwind.prologue_mask.
+ (dot_prologue): Set it. Accept a register second argument.
- * doc/c-i386.texi: Replace occurences of "opcode" with
- "instruction mnemonic", "instruction", or "mnemonic" when
- referring to the name of an instruction. Use "opcode" when
- referring to the sequence of machine bytes.
+2000-08-07 Kazu Hirata <kazu@hxi.com>
- * config/tc-i386.c (opcode_chars): Rename to mnemonic_chars.
- (is_opcode_char): Rename to is_mnemonic_char.
- (md_assemble and i386_operand): Correct error messages from
- "opcode" to "instruction mnemonic"
- Rename throughout opcode[] -> mnemonic[], opp -> mnem_p,
- MAX_OPCODE_SIZE -> MAX_MNEM_SIZE,
- DWORD_OPCODE_SUFFIX -> DWORD_MNEM_SUFFIX,
- WORD_OPCODE_SUFFIX -> WORD_MNEM_SUFFIX,
- BYTE_OPCODE_SUFFIX -> BYTE_MNEM_SUFFIX,
- SHORT_OPCODE_SUFFIX -> SHORT_MNEM_SUFFIX
- LONG_OPCODE_SUFFIX -> LONG_MNEM_SUFFIX
+ * config/atof-ieee.c: Fix formatting.
+ * config/atof-tahoe.c: Likewise.
- * config/tc-i386.h (*_MNEM_SUFFIX): Rename from *_OPCODE_SUFFIX.
+2000-08-06 Nick Clifton <nickc@cygnus.com>
- * config/tc-i386.c (i386_operand): Check for garbage after
- register name.
+ * config/tc-sparc.c (md_begin): Fix typo in recent formatting
+ work.
-Tue Oct 20 10:49:42 1998 Ian Lance Taylor <ian@cygnus.com>
+ * doc/as.texinfo (Pseudo Ops): Update to include descriptions
+ of .popsection, .previous, .pushsection, .subsection,
+ .version, .vtable_entry, .vtable_inherit and .weak.
- * config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc
- for BFD_ASSEMBLER to only change value when COFF if TE_PE.
+2000-08-05 Kazu Hirata <kazu@hxi.com>
-Mon Oct 19 20:20:42 1998 Catherine Moore <clm@cygnus.com>
+ * config/tc-cris.c: Fix formatting.
+ * config/tc-i386.c: Likewise.
+ * config/tc-sparc.c (sparc_ip): Simplify the code.
- * config/tc-sh.h (obj_fix_adjustable): Define.
- * config/tc-sh.c (sh_force_relocation): Handle VT relocs.
- (md_apply_fix): Likewise.
- (tc_gen_reloc): Likewise.
- (sh_fix_adjustable): New.
+2000-08-04 Kazu Hirata <kazu@hxi.com>
-Mon Oct 19 12:35:43 1998 Doug Evans <devans@seba.cygnus.com>
+ * config/tc-cris.c: Rearrange code for readability.
+ * config/tc-d10v.c: Fix formatting.
+ * config/tc-m32r.c: Likewise.
+ * config/tc-sparc.c: Likewise.
- * cgen.c (gas_cgen_finish_insn): Update handling of CGEN_INT_INSN_P.
- * cgen.h (gas_cgen_finish_insn): Update prototype.
- * config/tc-m32r.c (m32r_insn): CGEN_INT_INSN -> CGEN_INT_INSN_P.
- cgen_insn_t -> CGEN_INSN_INT.
- (make_parallel): Update handling of CGEN_INT_INSN_P.
- (assemble_parallel_insn): Ditto.
- (target_make_parallel): New function.
- (md_assemble): Use it.
+2000-08-02 Jim Wilson <wilson@cygnus.com>
-Mon Oct 19 13:16:12 1998 Catherine Moore <clm@cygnus.com>
+ * config/tc-ia64.c (emit_one_bundle): Call ia64_free_opcode
+ before ia64_find_opcode.
+ (md_assemble): Likewise.
- * config/tc-m32r.c (m32r_force_relocation): Fix typo.
+2000-08-01 Nick Clifton <nickc@cygnus.com>
-Sun Oct 18 18:48:57 1998 Jeffrey A Law (law@cygnus.com)
+ * config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag.
+ Undo some formatting fixes.
- * config/tc-sh.c (md_assemble): Make sure the entire opcode is
- converted into lower case.
+2000-08-01 Kazu Hirata <kazu@hxi.com>
-Fri Oct 16 13:36:34 CDT Catherine Moore <clm@cygnus.com>
+ * config/obj-som.c: Fix formatting.
+ * config/obj-ieee.c: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-v850.c: Likewise.
- * cgen.c (gas_cgen_md_apply_fix3): Handle VTABLE relocs.
- (gas_cgen_tc_gen_reloc): Likewise.
- * config/tc-m32r.h (obj_fix_adjustable): Define.
- * config/tc-m32r.c (m32r_fix_adjustable): New.
- (m32r_force_relocation): Handle VTABLE relocs.
+2000-08-01 Nick Clifton <nickc@redhat.com>
-Wed Oct 14 11:33:38 1998 Nick Clifton <nickc@cygnus.com>
+ * doc/c-m68k.texi (section M680x0 Options): Turn into a table
+ index by command line option.
- * doc/c-arm.texi (ARM Directives): Document .ltorn directive.
+2000-08-01 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-Mon Oct 12 11:07:21 1998 Nick Clifton <nickc@cygnus.com>
+ * doc/c-m68k.texi (@cindex @samp{--pcrel}): Rewrite option description.
+ (@node M68K-Branch): Rewrite to match the reality.
- * config/tc-m32r.c (assemble_parallel_insn): Convert second opcode
- to lower case before parsing.
+2000-07-31 Jason Eckhardt <jle@cygnus.com>
- * config/tc-d30v.c (parallel_ok): Ignore conflicts when explicitly
- parallel insns modift buts in the PSW as a side effect.
+ * doc/c-i860.texi: New file.
+ * doc/Makefile.am (CPU_DOCS): Add c-i860.texi.
+ * doc/Makefile.in: Regenerate.
+ * doc/all.texi: Add I860 as relevant architecture.
+ * doc/as.texinfo: Include i860 dependent file c-i860.texi.
-Thu Oct 8 10:18:33 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-31 Kazu Hirata <kazu@hxi.com>
- * config/tc-d30v.c (find_format): Test for missing flag and
- control registers.
-
- (md_apply_fix3): Fix error messages to avoid
- assumption about presence of a symbol.
+ * config/tc-d30v.c: Fix formatting.
- (parallel_ok): Disallow parallel instructions that both modify the
- same flag register.
+2000-07-31 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- (find_format): Generate a warning if an odd numbered register is
- used as the first register in a mutli-register instruction.
+ * config/tc-m68k.c (flag_keep_pcrel, OPTION_PCREL): Add --pcrel option.
+ (md_convert_frag_1, md_estimate_size_before_relax): When making DBcc
+ long emit a long branch if available instead of an absolute jump, never
+ emit absolute jumps for anything with --pcrel.
-Wed Oct 7 14:09:14 1998 Nick Clifton <nickc@cygnus.com>
+ * doc/c-m68k.texi: Document new command line option.
- * config/tc-d30v.c (md_apply_fix3): Do not assume that bad
- relocations are always associated with a symbol.
+2000-07-29 Marek Michalkiewicz <marekm@linux.org.pl>
-Tue Oct 6 09:31:15 1998 Catherine Moore <clm@cygnus.com>
+ * config/tc-avr.c: Use PARAMS macro in function declarations.
+ Don't declare md_pcrel_from_section (already in tc-avr.h).
+ (avr_operands): Use AVR_UNDEF_P and AVR_SKIP_P macros.
+ (avr_operand): Don't set (unsigned) op_mask to -1.
- * tc-sparc.h (TC_FORCE_RELOCATION): Define.
- (elf32_sparc_force_relocation): Declare.
- * tc-sparc.c (md_apply_fix3): Handle vtable relocs.
- (tc_gen_reloc): Handle vtable relocs.
- (elf32_sparc_force_relocation): New.
+2000-07-28 Jason Eckhardt <jle@cygnus.com>
-Mon Oct 5 09:25:32 1998 Catherine Moore <clm@cygnsu.com>
+ * configure.in: Add bits for i860-stardent-{sysv4, elf}*.
+ * configure: Regenerated.
+ * config/obj-elf.c (obj_elf_type): Recognize a fifth type
+ of operand to the .type directive (.e.g, "type").
- * symbols.c (S_IS_FUNCTION): New.
- * config/tc-v850.h (obj_fix_adjustable): Define.
- (TC_FORCE_RELOCATION): Define.
- (v850_force_relocation): Declare.
- * config/tc-v850.c (tc_gen_reloc): Use offset instead
- of fx_addnumber for VTABLE reloc addends.
- (md_apply_fix3): Handle VTABLE relocs.
- (v850_fix_adjustable): New.
- (v850_force_relocation): New.
+2000-07-28 Alan Modra <alan@linuxcare.com.au>
-Mon Oct 5 00:48:52 1998 Jeffrey A Law (law@cygnus.com)
+ * as.h (warn_comment, found_comment, found_comment_file): Declare.
+ * app.c (do_scrub_chars): Record where first comment found.
+ * read.c (read_a_source_file): Init found_comment on entry, and
+ notify whether comments found on exit.
+ * config/tc-hppa.c (md_shortopts): Add "c".
+ (md_longopts): Add warn-comment.
+ (md_parse_option): Handle it.
+ (md_show_usage): Show available options.
+ * config/tc-hppa.h (WARN_COMMENTS): Define if TE_LINUX
- * tc-hppa.c (fp_operand_format): Add some additional formats.
- (pa_ip): Do not automatically promote into pa2.0 mode.
- (pa_level): Handle ".level 2.0".
+Thu Jul 27 11:25:01 2000 Andrew Cagney <cagney@b1.cygnus.com>
-Sun Oct 4 20:57:43 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-mn10300.c (md_convert_frag): Fix printfs.
+ (tc_gen_reloc): Add cast when assigning bfd_abs_symbol to
+ sym_ptr_ptr
+ (md_estimate_size_before_relax): Don't fall off end of function.
- * config/tc-i386.c (md_assemble): Handle AMD_3DNOW_OPCODE.
- * config/tc-i386.h (template.extension_opcode): Change to
- unsigned int to allow full range of 8-bit opcode suffixes.
- (None): Redefine as 0xffff.
+2000-07-27 Kazu Hirata <kazu@hxi.com>
- From Jeff B Epler <jepler@usgs.gov>
- * doc/c-i386.texi (i386-SIMD): New section.
+ * config/tc-avr.c: Fix formatting.
+ * config/tc-ns32k.c: Likewise.
-Thu Oct 1 15:37:54 1998 Richard Henderson <rth@cygnus.com>
+2000-07-27 Alan Modra <alan@linuxcare.com.au>
- * read.c (discard_rest_of_line): New function.
- * read.h: Declare it.
- * config/tc-alpha.c (s_alpha_mask, s_alpha_frame): Use it.
+ * config/tc-d10v.c (find_opcode): Remove extraneous `='.
-Thu Oct 1 10:33:53 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-27 Kazu Hirata <kazu@hxi.com>
- * config/tc-d10v.c (find_symbol_matching_register): New function.
- (find_opcode): Cope with the case where a register name matches
- a symbol name.
+ * config/tc-d10v.c: Fix formatting.
+ * config/tc-z8k.c: Likewise.
+ * config/tc-sparc.c: Likewise.
-Wed Sep 30 10:52:32 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-26 Dave Brolley <brolley@redhat.com>
- * config/tc-v850.c (md_pcrel_from): Rename to
- v850_pcrel_from_section.
- (v850_pcrel_from_section): Do not resolves symbols in other
- sections.
+ * cgen.c (queue_fixup): Declare opinfo.
+ (gas_cgen_parse_operand): Mark unused parameters with ATTRIBUTE_UNUSED.
+ (gas_cgen_md_operand): Ditto.
+ (gas_cgen_md_apply_fix3): Ditto.
- * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define.
+2000-07-24 Mark Elbrecht <snowball3@bigfoot.com>
-Mon Sep 28 11:01:20 1998 Nick Clifton <nickc@cygnus.com>
+ * config/obj-coff.c (obj_frob_symbol): Don't merge
+ labels. Don't merge if the symbol isn't constant. Return
+ immediately if a symbol is merged.
- * config/tc-d10v.c (find_opcode): Generate an error if a register
- is supplied for an operand that should not be a register.
+2000-07-22 Alan Modra <alan@linuxcare.com.au>
-Fri Sep 25 10:04:21 1998 Nick Clifton <nickc@cygnus.com>
+ * frags.c (frag_align): Correct absolute section alignment.
- * config/tc-d30v.c (write_2_short): But do allow delayed branch
- instructions to have another instruction in the right bin.
+2000-07-20 DJ Delorie <dj@redhat.com>
-Thu Sep 24 09:28:34 1998 Nick Clifton <nickc@cygnus.com>
+ * config/obj-coff.c (obj_frob_symbol): revert previous change,
+ it breaks linking against DLLs.
- * config/tc-d30v.c (write_2_short): Do not allow instructions in
- the right container if the left container holds a branch
- instruction.
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
-Wed Sep 23 10:54:29 1998 Nick Clifton <nickc@cygnus.com>
+ * configure.in: Add CRIS support.
+ * configure: Regenerate.
+ * Makefile.am: (CPU_TYPES): Add cris.
+ (CPU_OBJ_VALID) [aout]: Add cris.
+ (MULTI_CPU_TYPES): Add cris.
+ (MULTI_CPU_OBJ_VALID) [aout]: Add cris.
+ [coff]: Only i386 and mips are valid.
+ (TARGET_CPU_CFILES): Add config/tc-cris.c.
+ (TARGET_CPU_HFILES): Add config/tc-cris.h.
+ (MULTI_CFILES): Add config/e-crisaout.c and config/e-criself.c.
+ Regenerate dependencies.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * as.c: Declare crisaout, criself.
+ * config/tc-cris.h, config/tc-cris.c: New.
+ * config/e-criself.c, config/e-crisaout.c: New.
+ * po/POTFILES.in, po/gas.pot: Regenerate.
- * config/tc-d30v.c (reg_name_search): Only warn if a name matches
- both a register name and symbol name.
- (find_format): Allow correct parsing of MVTSYS and MVFSYS insns.
+2000-07-20 Kazu Hirata <kazu@hxi.com>
-Tue Sep 22 17:49:16 1998 Nick Clifton <nickc@cygnus.com>
+ * read.c: Fix formatting.
+ * write.c: Fix formatting.
- * config/tc-d30v.c (write_2_short): Implement EITHER_BUT_PREFER_MU
- execution unit class.
+2000-07-19 H.J. Lu <hjl@gnu.org>
- (reg_name_search): If a name matches a register and a symbol,
- prefer the register.
- (find_format): Disallow flag registers when a general purpose
- register is required.
- If a number is required, but a register has been given, check to
- see if a symbol with the same name as the register exists, and if
- so, use that symbol.
+ * sb.c: Include <stdlib.h> if exists for abort ().
-Tue Sep 22 16:40:52 1998 Jim Wilson <wilson@cygnus.com>
+2000-07-19 Alan Modra <alan@linuxcare.com.au>
- * config/obj-elf.h (ECOFF_DEBUGGING): Add missing parens.
+ * config/tc-hppa.c (hppa_fix_adjustable): Correct LR%/RR% comment.
+ (arg_reloc_stub_needed): #ifdef OBJ_SOM, not #ifdef SOM.
+ (pa_type_args): Same here.
-Tue Sep 22 15:44:21 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-17 Mark Elbrecht <snowball3@bigfoot.com>
- * config/tc-d30v.c (find_format): Do not accept flag registers as
- general purpose registers.
- (find_format): If an immediate value is expected at a given place
- in a format, but a register name has been provided instead, check
- to see if that register name matches the name of a predefined
- symbol and if it does, then use the symbol instead.
- (reg_name_search): If a register name matches a symbol name,
- prefer the register name to the symbol name.
+ * config/obj-coff.c (obj_frob_symbol): Don't merge labels. Don't
+ merge if the symbol isn't constant. Don't call S_SET_EXTERNAL if
+ the storage class is already set.
-Mon Sep 21 10:42:57 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-17 Kazu Hirata <kazu@hxi.com>
- * config/tc-m32r.c (m32r_do_align): After inserting NOPs, reset
- the previous insn to empty.
+ * config/tc-m68hc11.c: Fix formatting.
+ * config/tc-mn10200.c: Likewise.
+ * config/tc-mn10300.c: Likewise.
+ * config/tc-pj.c: Likewise.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-w65.c: Likewise.
-1998-09-20 Michael Meissner <meissner@cygnus.com>
+2000-07-17 Frank Ch. Eigler <fche@redhat.com>
- * config/tc-ppc.c (md_apply_fix3): Do not break string into two
- pieces, forcing the use of an ANSI compiler.
+ * expr.c (operand): Permit %bin literals if LITERAL_PREFIXPERCENT_BIN
+ is defined.
-Sun Sep 20 00:58:12 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-07-15 Ian Lance Taylor <ian@zembu.com>
- * config/tc-m68k.h (TC_FORCE_RELOCATION): New macro. Force vtable
- relocs.
- * config/tc-m68k.c (md_apply_fix_2): Do nothing for vtable relocs.
+ * doc/c-mips.texi (MIPS Opts): Remove erroneous space after
+ @code.
-Tue Sep 15 08:51:07 1998 Catherine Moore <clm@cygnus.com>
-
- * config/obj-elf.c (obj_elf_vtable_inherit): Handle arm
- assembler syntax.
- (obj_elf_vtable_entry): Likewise.
- * config/tc-arm.h: Define TC_FORCE_RELOCATION for OBJ_ELF.
- * config/tc-arm.c (md_apply_fix3): Handle VTABLE relocations.
- (tc_gen_reloc): Likewise.
- (arm_fix_adjustable): Likewise.
- (elf32_arm_force_relocation): New.
- (armelf_frob_symbol): Remove coff-style symbol support.
+2000-07-15 Alan Modra <alan@linuxcare.com.au>
-Wed Sep 9 11:27:16 1998 Richard Henderson <rth@cygnus.com>
+ * config/tc-hppa.c (hppa_fix_adjustable): Use the same checks for
+ ELF as are used for SOM (except the 32-bit reloc one) to decide
+ whether a symbol can be reduced to a section symbol. Expand on
+ the comment for symbols involved in LR% and RR% expressions.
- * config/tc-i386.c (i386_operand): Fix typo in last patch.
+2000-07-14 Nick Clifton <nickc@cygnus.com>
-Tue Sep 8 18:10:01 1998 Catherine Moore <clm@cygnus.com>
-
- * config/tc-arm.c (arm_adjust_symtab): Move #ifdef
- OBJ_COFF so that routine is defined for a.out format.
+ * config/tc-mips.c (mips_disable_float_construction): New
+ static variable. Set to true if doubles should not be
+ constructed by loading two single width fp registers with
+ halves of the value.
+ (mips_ip): Test mips_disable_float_construction.
+ (md_longopts): Add command line switches --construct-floats
+ and --no-construct-floats.
+ (md_parse_option): Parse new command line options.
+ (md_show_usage): Describe new command line options.
-Tue Sep 8 15:56:19 1998 Richard Henderson <rth@cygnus.com>
+ * doc/c-mips.texi: Document new command line options.
- * config/tc-i386.c (i386_operand): Detect non-segment registers
- used as segment prefixes.
+2000-07-13 Koundinya K <kk@ddeorg.soft.net>
-Sat Sep 5 19:00:38 1998 Ian Lance Taylor <ian@cygnus.com>
+ * configure.in: Remove the test /usr/dde for mips-*-sysv4*MP*
+ * configure: Regenerate.
- * ehopt.c (check_eh_frame): Check the size of the FDE, and don't
- optimize across FDE boundaries.
+2000-07-13 Hans-Peter Nilsson <hp@axis.com>
- * config/obj-coff.c (obj_coff_section): Preserve any link once
- flags when setting the section flags.
+ * configure.in (DEFAULT_EMULATION setting): Revert part of
+ 2000-07-01 change that set te_multi=multi unless set to tmips.
+ * configure: Regenerate.
-Fri Sep 4 17:07:14 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-12 Mark Elbrecht <snowball3@bigfoot.com>
- * config/tc-arm.h (obj_adjust_symtab): Fixed typo.
- * config/tc-arm.c (armelf_adjust_symtab): Reformatted.
+ * config/obj-coff.c (coff_frob_section): Add padding to the last
+ section when aligning it increases its size.
-Fri Sep 4 13:57:43 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
+2000-07-11 Kazu Hirata <kazu@hxi.com>
- * config/tc-sparc.c (in_signed_range): Sign extend 32-bit words
- to the host width.
+ * config/tc-tic54x.c: Fix formatting.
-Wed Sep 2 11:31:14 1998 Richard Henderson <rth@cygnus.com>
+2000-07-10 Kazu Hirata <kazu@hxi.com>
- * frags.c (frag_grow): Include the size of the frag struct in the
- obstack chunk size.
+ * config/tc-h8500.c: Fix formatting.
+ * config/tc-tic54x.c: Fix formatting.
- * subsegs.c (subseg_set_rest): Adjust the seginfo frchain start
- if the new subseg comes before the old.
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
-Tue Sep 1 15:01:33 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
+ * config/tc-hppa.c (md_apply_fix): Check fmt 12 and 22 pc-rel
+ displacements correctly.
- * config/tc-sparc.c (sparc_ip): Allow all digits in an instruction
- to handle edge8 and edge16.
+ * read.h (s_abort): Add ATTRIBUTE_NORETURN.
-Mon Aug 31 09:51:14 1998 Richard Henderson <rth@cygnus.com>
+2000-07-10 Ryan Bradetich <rbradetich@uswest.net>
- * config/obj-elf.c (obj_elf_vtable_inherit): Print error message
- before we clobber the symbol involved.
+ * hash.c (hash_insert): Add cast to obstruct_alloc to fix
+ warning.
+ (hash_jam): Ditto.
-Mon Aug 31 10:58:06 1998 Catherine Moore <clm@cygnus.com>
+2000-07-09 Alan Modra <alan@linuxcare.com.au>
- * config/tc-arm.c: Remove OBJ_ELF definitions for
- S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. Only
- use arm_adjust_symtab for OBJ_COFF.
- (armelf_adjust_symtab): New Routine.
- * config/tc-arm.h: Define obj_adjust_symtab to
- armelf_adjust_symtab for OBJ_ELF.
-
-Sat Aug 29 22:18:51 1998 Richard Henderson <rth@cygnus.com>
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * config/te-hppalinux64.h: Add a new emulation.
+ * configure.in (emulations): Add configure bits to support the
+ 64-bit Linux/parisc target.
+ * configure: Regenerate.
- * configure.in: Make all i386-elf targets use bfd_gas.
- * config/tc-i386.c (tc_i386_force_relocation): New.
- (tc_i386_fix_adjustable): Don't fix vtable relocs.
- (md_apply_fix3): Likewise.
- (tc_gen_reloc): Handle them.
- * config/tc-i386.h (TC_FORCE_RELOCATION): Always define, calling
- tc_i386_force_relocation.
+ * config/tc-hppa.c (md_parse_option): Support `-V' for ELF.
+ (md_shortopts): Add `V' for ELF.
+
+ * config/tc-hppa.c (arg_reloc_stub_needed): Define as zero except
+ when SOM or ELF_ARG_RELOC are defined.
+ (pa_type_args): Only set symbol_arg_reloc_info when SOM or
+ ELF_ARG_RELOC are defined.
+ (pa_stringer_aux): Don't pa_check_current_space_and_subspace here..
+ (pa_stringer): ..Do it here instead. Fix comment typos.
+ (hppa_force_relocation): Cast enums to int before comparing with
+ ints.
+
+ From Ryan Bradetich <rbradetich@uswest.net>
+ * config/tc-hppa.c: Removed unneeded libbfd.h to fix macro
+ redifinition warning.
+ (md_apply_fix): Added cast from enum to int for fixP->fx_r_type.
+ (hppa_force_relocation): ditto
+ (md_apply_fix): Added cast to buf to fix warnings.
+
+ * config/tc-hppa.h (pa_define_label, parse_cons_expression_hppa,
+ cons_fix_new_hppa, hppa_force_relocation): Prototype.
+
+ * config/tc-hppa.c (reloc_type): It's an enum for OBJ_ELF.
+ (R_N0SEL, R_N1SEL): Define only for OBJ_SOM.
+ (tc_gen_reloc): Make `code' a reloc_type and `codes' a
+ reloc_type** to avoid warnings in switch.
+ (md_apply_fix): Make insn, val signed. Zap buf_wd and read insn a
+ little earlier instead.
+
+ * config/tc-hppa.c (symbol_arg_reloc_info): Define for both som
+ and elf.
+ (pa_type_args): Use symbol_arg_reloc_info.
+ (struct pa_it): Make arg_reloc unsigned int.
+ (struct hppa_fix_struct): Likewise for fx_arg_reloc.
+ (pa_text, pa_data, pa_comm): Don't compile for TE_LINUX.
+ (pa_code): Delete. pa_text duplicates this function.
+ (md_pseudo_table): Call obj_elf_text for ".code" if TE_LINUX.
+ (fix_new_hppa): Argument offset is offsetT, arg_reloc is unsigned
+ int.
+ (cons_fix_new_hppa): Actually change selector to e_fsel when
+ warning about assuming so.
+ (tc_gen_reloc): More example elf arg reloc code.
+ (md_apply_fix): Use arg_reloc_stub_needed for elf too.
+ (hppa_force_relocation): Likewise.
-Mon Aug 24 13:40:21 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-hppa.h: Use TARGET_ARCH_SIZE to select target include
+ files.
+ (pa_end_of_source): Prototype.
+ (hppa_fix_adjustable): Prototype.
+ (LABELS_WITHOUT_COLONS): Move it..
+ * config/te-hppa.h: To here.
- * config/tc-arm.c (md_show_usage): Improve formatting of --help output.
+ * config/te-hppa64.h: New file.
-Fri Aug 21 18:43:48 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-hppa.c: Use TARGET_ARCH_SIZE to select target reloc
+ type.
+ (md_apply_fix): Pass stdoutput to bfd_hppa_insn2fmt. Handle
+ format -10, -16, 16 relocs.
+ (hppa_elf_mark_end_of_function): Test for null
+ last_call_info->start_symbol
- * config/tc-d30v.c (md_assemble): Copy previous opcode over
- current opcode after writing the first insturction of a reverse
- sequential pair.
-
-Fri Aug 21 07:30:35 1998 Doug Evans <devans@canuck.cygnus.com>
+ * config/tc-hppa.c (pa_ip): In case 'V', pass `strict' to
+ CHECK_FIELD, not INSERT_FIELD_AND_CONTINUE. Don't pass opcode to
+ re_assesmble_* functions. Delete extraneous statements. Fix
+ typos in comments.
+ (md_apply_fix): Compare against 1048575 in case 21. Don't pass
+ insn to re_assemble_*.
- * read.h (generate_lineno_debug): Add prototype.
- * read.c (generate_lineno_debug): Make non-static.
+2000-07-08 Ulf Carlsson <ulfc@engr.sgi.com>
-Thu Aug 20 23:17:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * doc/internals.texi (Expressions): Fix typo.
- * config/tc-i386.c (md_assemble): Only warn for address/data size
- prefixes.
+2000-07-08 Kazu Hirata <kazu@hxi.com>
-Thu Aug 20 14:45:08 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-sh.c: Fix formatting.
+ * config/tc-tic54x.c: Fix formatting.
+ * depend.c: Fix formatting.
+ * flonum-konst.c: Likewise.
+ * flonum-mult.c: Likewise.
- * config/tc-arm.c (arm_fix_adjustable): Do not adjust relocations
- against Thumb function names, as the linker needs this information.
+2000-07-07 Kazu Hirata <kazu@hxi.com>
-1998-08-20 Vladimir N. Makarov <vmakarov@cygnus.com>
+ * config/tc-sh.c: Fix comments.
+ * config/obj-vms.c: Fix comments.
+ * config/tc-a29k.c: Likewise.
+ * config/tc-alpha.c: Likewise.
+ * config/tc-h8300.c: Likewise.
+ * config/tc-h8500.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-m68hc11.c: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * config/tc-mips.c: Likewise.
+ * config/tc-ns32k.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-z8k.c: Likewise.
- * expr.c (operand): Check also that there is no advance in operand
- after atof_generic in order to decide "is it label 0f or floating
- point number?".
+2000-07-06 Mark Elbrecht <snowball3@bigfoot.com>
-Wed Aug 19 09:30:16 1998 Nick Clifton <nickc@cygnus.com>
+ * config/obj-coff.c (TC_COFF_SECTION_DEFAULT_ATTRIBUTES): New.
+ Default to '(SEC_LOAD | SEC_DATA)'.
+ (obj_coff_section) [BFD_ASSEMBLER]: Use it.
- * config/tc-m32r.c: Replace double dash prefix to M32R specific
- command line options with a single dash.
- * doc/c-m32r.texi: Replace double dash prefix with a single dash.
+ * doc/internals.texi (CPU Backend): Describe
+ TC_COFF_SECTION_DEFAULT_ATTRIBUTES.
-Tue Aug 18 11:59:43 1998 Catherine Moore <clm@cygnus.com>
+Thu Jul 6 17:20:58 2000 Andrew Cagney <cagney@b1.cygnus.com>
- * tc-arm.h: Define obj_fix_adjustable for OBJ_ELF.
- * tc-arm.c (arm_fix_adjustable): New routine.
+ * as.c (parse_args): NULL terminate the long option list.
-1998-08-13 Vladimir N. Makarov <vmakarov@cygnus.com>
+Tue Jul 4 14:08:28 2000 Andrew Cagney <cagney@b1.cygnus.com>
- * read.c (s_align, s_comm, s_mri_common, s_fail, s_globl, s_space,
- s_float_space, s_struct, cons_worker): Move ignore_rest_of_line or
- demand_empty_rest_of_line before mri_comment_end.
- (equals): Check garbage after expression before
- mri_comment_end in MRI mode.
+ * config/tc-d30v.h: Include "write.h" for fixS.
+ (d30v_start_line, md_pcrel_from_section): Add function prototypes.
-Thu Aug 13 15:08:42 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-05 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (macro): Correct M_SGE_I/M_SGEUI_I case for a
- small immediate constant to use the constant itself rather than
- always using 1.
+ * config/tc-d30v.c (write_2_short): Further changes to warning
+ messages produced when combining EITHER_BUT_PREFER_MU attributed
+ opcodes.
-Wed Aug 12 18:47:38 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-05 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS: new
+
+2000-07-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-arm.c (psrs): Accept combinations of flags.
+
+2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * config/tc-avr.c: Change _ () to _() around all strings marked
+ for translation (exception from the usual coding style).
+ (avr_opt): New struct variable, how the new switches are set.
+ (OPTION_MMCU): Define as 'm' and actually use.
+ (md_longopts): Add -mall-opcodes, -mno-skip-bug, -mno-wrap.
+ (show_mcu_list): New function, display the list of known MCUs.
+ (md_show_usage): Document the new switches. Call show_mcu_list.
+ (avr_set_arch): Change 'm' to OPTION_MMCU.
+ (md_parse_option): Call show_mcu_list if unknown MCU specified.
+ Handle the new switches.
+ (avr_operands): Disable warnings for undefined combinations of
+ operands if -mall-opcodes. Disable warnings for skipping two-word
+ instructions if enhanced core or -mno-skip-bug.
+ (avr_operand): Accept all addressing modes on avr1 if -mall-opcodes.
+ (md_apply_fix3): Reject 8K wrap if >8K or -mno-wrap.
+ (md_assemble): Accept opcodes not supported by MCU if -mall-opcodes.
+ (avr_ldi_expression): Warn about implicit lo8().
+ * config/tc-avr.h (md_pcrel_from_section): Add prototype.
+
+2000-07-01 Koundinya K <kk@ddeorg.soft.net>
+
+ * configure.in: Add entry for mips-*-sysv4*MP*
+ * configure: Rebuild
+ * config/tc-mips.c (mips_target_format): Return elf32-tradbigmips or
+ elf32-tradlittlemips for traditional mips targets.
+ * config/tc-mips.c (md_estimate_size_before_relax): Duplicate the
+ test for Link Once sections as in adjust_reloc_syms.
+ * config/te-tmips.h: New file for traditional mips targets. Define
+ TE_TMIPS.
+
+2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c (obj_coff_setcion) [BFD_ASSEMBLER]: If the
+ flags argument is not present, don't change an existing section's
+ section's attributes. If the flags argument is present, warn if the
+ attributes don't match the section's current attributes. When
+ long section names are supported, set SEC_LINK_ONCE and
+ SEC_LINK_DUPLICATES_DISCARD for a new .gnu.linkonce section.
+
+Thu Jun 29 21:30:00 2000 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/obj-aout.c (obj_aout_type): Do not ignore for undefined
+ symbols; create them.
+
+2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * write.c (set_segment_vma): New: Set vma and lma for a segment.
+ (write_object_file) [BFD_ASSEMBLER && OBJ_COFF && TE_GO32]: Use it.
+
+2000-06-27 Aldy Hernandez <aldyh@redhat.com>
+
+ * config/tc-mips.c (mips_ip): handle "(foo-.-4)" type of
+ expressions. Ignore the problem when handling 16 bit signed
+ immediates, because the assembler will take care of the relocation
+ later.
+
+2000-06-27 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-d30v.c (write_2_short): Do not allow opcodes with
+ the EITHER_BUT_PREFER_MU attribute to be combined into a reverse
+ sequential order, and emit warning messages if the input source
+ code contains constructs like that, or parallel constructs
+ containing such opcodes.
+
+2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * config/tc-avr.c (mcu_types): Rename avr4 to avr5, add avr4.
+ Add more MCU types for avr4 and avr5. Replace at94k{10,20,40}
+ with just at94k. Change AVR_ISA_85xx back to AVR_ISA_2xxx.
+ (md_show_usage): Update usage message.
+ (md_parse_option): Allow redefinition of MCU type within the
+ same avr[1-5] bfd machine type. Show both old and new MCU type
+ in the error message.
+ (md_apply_fix3): Support 8K wrap if AVR_ISA_MEGA is not set.
+ Simplify 8K wrap code.
+
+2000-06-25 Kazu Hirata <kazu@hxi.com>
+
+ * config/obj-aout.c: Remove all uses of DEFUN.
+ * config/obj-ieee.c: Likewise.
+ * config/tc-sh.c: Fix comment typos.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * config/tc-w65.c: Likewise.
+ * config/tc-z8k.c: Likewise.
+ * config/tc-h8300.c (build_bytes): Assemble ldmac correctly.
- * config/tc-hppa.c (pa_enter): Call as_bad rather than abort.
- (pa_leave): Likewise.
+2000-06-24 DJ Delorie <dj@cygnus.com>
-Wed Aug 12 13:25:03 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-i386.c (md_estimate_size_before_relax): Revert
+ more changes from Sept 1999
+ (tc_i386_fix_adjustable): ditto
+ (md_apply_fix3): ditto
- * config/tc-i386.c (md_assemble): Emit a warning for stand-alone
- prefixes.
- (i386_operand): Fix an error message.
+2000-06-24 Frank Ch. Eigler <fche@redhat.com>
-Tue Aug 11 14:44:32 1998 Nick Clifton <nickc@cygnus.com>
+ * cgen.c (expr_jmp_buf_p): New validity flag for expr_jmp_buf.
+ (gas_cgen_parse_operand): Set it around expression() call.
+ (gas_cgen_md_operand): Test for it before longjmp().
- * doc/c-arm.texi (ARM Directives): Document .req directive.
+2000-06-24 Kazu Hirata <kazu@hxi.com>
- * config/tc-arm.c (reg_required_here): Display erroneous string if
- the register name could not be decoded.
- Do not set inst.instruction if the sift is -1.
+ * config/tc-h8500.c: Remove all uses of DEFUN.
+ * config/tc-sh.c: Likewise.
+ * config/tc-w65.c: Likewise.
+ * config/tc-z8k.c: Likewise.
-Mon Aug 10 15:39:56 1998 Richard Henderson <rth@cygnus.com>
+ * config/tc-h8500.c: Fix typos in comments.
- * config/tc-alpha.c (tc_gen_reloc): Bias WEAK symbols just as
- we do for EXTERN.
+2000-06-23 Frank Ch. Eigler <fche@redhat.com>
-Mon Aug 10 15:06:18 1998 Nick Clifton <nickc@cygnus.com>
+ * expr.c (operand): Permit $hex literals if LITERAL_PREFIXDOLLAR_HEX
+ is defined.
- * config/tc-d30v.c (d30v_align): Always perform alignment request,
- even if it is belived to be unnecessary.
-
-Mon Aug 10 17:48:09 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- config/tc-i386.c (i386_operand): Size immediate constants by
- suffix (erroneously removed as part of July 7 change).
+2000-06-23 matthew green <mrg@redhat.com>
-Sun Aug 9 20:45:32 1998 Catherine Moore <clm@cygnus.com>
+ * expr.c (operand): Do not as_bad() if RELAX_PAREN_GROUPING is
+ defined. Fix error message for `[' grouping.
- * config/obj-elf.h: Check for redefinition of obj_frob_symbol.
- * config/tc-arm.c: Define S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS.
- (armelf_frob_symbol): New Routine.
- * config/tc-arm.h: Define obj_frob_symbol if OBJ_ELF.
+2000-06-22 Kazu Hirata <kazu@hxi.com>
-Sat Aug 8 15:21:28 1998 Richard Henderson <rth@cygnus.com>
+ * config/tc-h8300.c: Fix formatting and comment typos.
- * config/tc-alpha.c (alpha_fix_adjustable): Don't adjust weak syms.
+2000-06-22 Timothy Wall <twall@cygnus.com>
-Wed Aug 5 15:54:14 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-ia64.c (note_register_values): Move premature QP
+ notation clearing into the appropriate place.
- * config/tc-arm.c (md_begin): Set BFD private flags depending upon
- command line switches passed to assembler.
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
-Mon Aug 3 14:02:52 1998 Doug Evans <devans@seba.cygnus.com>
+ * dep-in.sed: Escape literal `.'s on patterns. Trim off `../'
+ first before anything else. Add bin-bugs.h, emul.h and progress.h
+ Sort list of files as for $(OBJS) in Makefile.am.
- * cgen.h (GAS_CGEN_MAX_FIXUPS): GAS_ prepended, all uses updated.
- (gas_cgen_opcode_desc): Declare.
- (gas_cgen_parse_operand): Declare.
- (*): Prepend gas_ to gas specific fns to denote them as such.
- All uses updated.
- * cgen.c (gas_cgen_opcode_desc): New global
- (gas_cgen_init_parse): Renamed from cgen_asm_init_parse.
- (queue_fixup): Renamed from cgen_queue_fixup.
- (*): Prepend gas_ to gas specific fns to denote them as such.
- All uses updated.
- (gas_cgen_md_apply_fix3): Update call to insert_operand.
- (gas_cgen_finish_insn): Renamed from cgen_asm_finish_insn.
- * config/tc-m32r.c (md_begin): Remove use of CGEN_SYM.
- Open opcode table and initialize it.
- (make_parallel): Use gas_cgen_opcode_desc.
- (assemble_parallel_insn): Ditto. Remove use of CGEN_SYM.
- (md_assemble): Ditto.
-
-Sat Aug 1 19:27:30 1998 Richard Henderson <rth@cygnus.com>
-
- * as.h (debug_info_type): Add entries for unspecified and dwarf*.
- * ecoff.c (ecoff_generate_asm_lineno): Take no arguments; call
- as_where ourselves. Provide a stub for !ECOFF_DEBUGGING.
- * ecoff.h: Move ECOFF_DEBUGGING protection inside GAS_ECOFF_H.
- Move ecoff_generate_asm_lineno outside ECOFF_DEBUGGING protection.
- * read.c (generate_lineno_debug): Tidy ECOFF bits. Use
- DEBUG_UNSPECIFIED rather than DEBUG_NONE for initial test.
- * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Define to a variable.
- (SEPARATE_STAB_SECTIONS): Conditionalize on value of ECOFF_DEBUGGING.
- (INIT_STAB_SECTION): Likewise.
- (OBJ_PROCESS_STAB): Likewise.
-
- * config/tc-alpha.c (md_longopts): New options -mdebug/-no-mdebug.
- (md_parse_option): Watch for them.
- (alpha_cur_ent_sym, alpha_flag_mdebug): New variables.
- (md_begin): Kill neverdef code.
- (s_alpha_ent, s_alpha_end, s_alpha_mask, s_alpha_frame): New.
- (s_alpha_prologue): Watch alpha_cur_ent_sym.
- (s_alpha_coff_wrapper): New.
- (md_pseudo_table): Trap all ECOFF pseudos.
-
-Fri Jul 31 16:45:54 1998 Ron Unrau <runrau@cygnus.com>
-
- Start of changes to remove mdebug section from mips*-elf
- Based on MIPS_STAB_ELF definition
- * acconfig.h: undef if not configured
- * config.in: undef if not configured
- * config/mips-elf.h: only set ECOFF debugging if not stabs-in-elf
- * config/tc-mips.c (s_ent): set BSF_FUNCTION
- * stabs.c (s_stab_generic): flush frag
-
-Fri Jul 31 16:14:45 1998 Catherine Moore <clm@cygnus.com>
-
- * configure.in: (arm-*-elf): Handle.
- (thumb-*-elf): Handle.
- * configure: Regenerate.
- * read.c (stringer): Fix typo in comment.
- * write.c (fixup_segment): Don't add symbol value to addend if
- TC_ARM and OBJ_ELF.
- * config/tc-arm.c (md_section_align): Don't align dwarf debug
- sections.
- (tc_gen_reloc): Always set the reloc addend to fixp->fx_offset
- for OBJ_ELF.
-
-Thu Jul 30 21:38:43 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * config/tc-d30v.c ({cur,prev}_left_kills_right_p): New variables.
- (write_2_short): Emit warning if new flag is set.
- (do_assemble): Set flags if left instruction is one of special
- "right-instruction-killer" type.
-
-Tue Jun 28 18:12:28 1998 Stan Cox <scox@cygnus.com>
-
- * config/tc-sparc.c (md_number_to_chars, cons_fix_new_sparc):
- Always output words in debug_info section as big endian.
- (sparc_target_format): Choose correct bfd target.
- (md_apply_fix3): Rename BFD_RELOC_SPARC_32LE to BFD_RELOC_SPARC_REV32.
-
-Tue Jul 28 11:01:21 1998 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (md_assemble): Fix "errmsg" initialization
- to work with internationalization code. Issue an error when two
- operands match that are not allowed to match.
-
-Mon Jul 27 16:25:58 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * configure.in (install_tooldir): Allow target to specify whether
- it wants to be installed in $(tooldir)/bin.
- * configure: Regenerate.
- * Makefile.am (install-exec-local): Set install-exec-tooldir
- dependency via configure.
+ * Makefile.am (DEP): grep for leading `/' in DEPA, and fail if we
+ find one. Remake dependencies.
+ ($(OBJS)): Add bin-bugs.h, emul.h, and progress.h Sort the list.
* Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
-Fri Jul 24 19:58:59 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * Makefile.am (install-exec-local): Split into two ...
- (install-exec-bindir,install-exec-tooldir): New rules.
- * Makefile.in: Regenerate.
+ * config/tc-i386.c (i386_displacement): Don't assume a constant
+ displacement is necessarily 16 bits when in 16 bit code mode.
+ (md_assemble): Instead size the displacement here after we know
+ for sure that a .code16gcc operand hasn't automatically added
+ operand size prefixes.
-Fri Jul 24 16:31:49 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-21 H.J. Lu <hjl@gnu.org>
- * Makefile.am (install-exec-local): Don't remove the file before
- checking whether $(bindir) == $(tooldir)/bin. From Maciej
- W. Rozycki <macro@ds2.pg.gda.pl>.
+ * Makefile.am: Rebuild dependency.
* Makefile.in: Rebuild.
-Fri Jul 24 09:13:46 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * cgen.c: Include libiberty.h.
- (cgen_md_apply_fix3): Update call to md_cgen_lookup_reloc.
- (cgen_tc_gen_reloc): Use xmalloc, not bfd_alloc.
- * cgen.h (cgen_md_apply_fix3,cgen_tc_gen_reloc): Declare.
- (md_cgen_lookup_reloc)): Declare.
- (md_cgen_record_fixup_exp): Declare.
- * config/tc-m32r.h (md_pcrel_from_section): Declare.
- (m32r_relax_frag): Declare.
- (cgen_md_apply_fix3): Decls moved to cgen.h.
- (cgen_record_fixup_exp,cgen_tc_gen_reloc): Ditto.
- (m32r_cgen_record_fixup_exp): Delete decl.
- * config/tc-m32r.c (m32r_cpu_desc): #if 0 out.
- (assemble_nop): Delete.
- (expand_debug_syms): Delete unused `exp'.
- (md_cgen_lookup_reloc): Renamed from CGEN_SYM (lookup_reloc).
- Add default case for -Wall.
- (m32r_cgen_record_fixup_exp): Add default case for -Wall.
- (md_atof): Delete unused wordP.
+2000-06-21 Kazu Hirata <kazu@hxi.com>
-Thu Jul 23 13:19:50 1998 Jeffrey A Law (law@cygnus.com)
+ * config/tc-h8300.c (parse_reg): Make the function static.
+ (parse_exp): Likewise.
- * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL
- value.
+2000-06-20 DJ Delorie <dj@cygnus.com>
-Wed Jul 22 14:36:56 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.c (tc_i386_fix_adjustable): Revert change from
+ Sept 1999; RVA relocs need to be treated more like DIR32 relocs
+ for cygwin import libraries to work properly.
- * doc/as.texinfo: Add documentation for .end, .exitm, .fail,
- .ifc, .ifeqs, .ifge, .ifgt, .ifle, .iflt, .ifnc, .ifne, .ifnes,
- .print, .purgem, and .struct. Remove documentation for
- .app-file.
+2000-06-20 H.J. Lu <hjl@gnu.org>
-Tue Jul 21 16:50:52 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.c (cgen_md_apply_fix3): set_operand renamed to set_vma_operand.
- Update call to insert_operand.
-
-Fri Jul 17 11:42:20 1998 Nick Clifton <nickc@cygnus.com>
+ * Makefile.am: Rebuild dependency.
+ * Makefile.in: Rebuild.
+ * configure: Likewise.
+ * doc/Makefile.in: Likewise.
- * config/tc-m32r.c (ms_show_usage): Formatting changes.
+2000-06-20 Timothy Wall <twall@cygnus.com>
-Wed Jul 15 15:38:28 1998 Ian Lance Taylor <ian@cygnus.com>
+ * doc/internals.texi (CPU backend): Add @itemx for
+ TC_START_LABEL_WITHOUT_COLON.
+ * doc/c-tic54x.texi: New.
+ * doc/as.texinfo: Add tic54x features and include primary tic54x
+ documentation file.
+ * doc/all.texi: Add C54X.
+ * doc/Makefile.am (CPU_DOCS): Add c-tic54x.texi.
+ * doc/Makefile.in: Regenerate.
+ * configure.in: Add tic54x and define LIBM for tic54x.
+ * configure: Regenrate.
+ * config/tc-tic54x.[ch]: New.
+ * config/obj-coff.h: Add tic54x.
+ * Makefile.am: (CPU_TYPES): Add tic54x.
+ (TARGET_CPU_CFILES): Add 'tc-tic54x.c'.
+ (TARGET_CPU_HFILES): Add 'tc-tic54x.h'.
+ (as_new_LDADD): Add $(LIBM).
+ * Makefile.in: Regenerate.
- * config/tc-i386.c (md_assemble): Don't get confused by trailing
- whitespace after a prefix operator.
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
-Tue Jul 14 15:32:56 1998 Richard Henderson <rth@cygnus.com>
+ * doc/Makefile.am (CPU_DOCS): Added 68hc11 file.
+ * doc/c-m68hc11.texi: Document 68HC11 and 68HC12 port.
+ * doc/as.texinfo: Likewise.
- * configure.in (i386-*-beos{pe,elf,}*): Recognize.
+ * configure, Makefile.in: Regenerate.
+ * configure.in (emulations): Recognize m6811 and m6812.
+ * Makefile.am (CPU_TYPES, TARGET_CPU_CFILES, TARGET_CPU_HFILES):
+ Added files for 68hc11 and 68hc12 assembler.
+ * config/tc-m68hc11.c: Assembler for 68hc11 and 68hc12.
+ * config/tc-m68hc11.h: Header definition for that assembler.
-Tue Jul 14 12:33:44 1998 Chris Torek <torek@bsdi.com>
+2000-06-18 Nick Clifton <nickc@redhat.com>
- * config/tc-sparc.c (log2): New static function.
- (s_reserve): Use log2 to convert alignment before calling
- record_alignment.
- (s_common): Use log2 to convert alignment before calling
- record_alignment and frag_align.
- (sparc_cons_align): Use log2.
+ * symbols.c (resolve_symbol_value): Use bfd_octets_per_byte
+ instead of OCTETS_PER_BYTE.
-Tue Jul 14 11:58:40 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-v850.c: Fix compile time warnings.
+ * config/tc-ppc.c: Fix compile time warnings.
- * config/tc-sparc.c (s_reserve): Set symbol size if OBJ_ELF.
- (s_common): Likewise.
+2000-06-18 H.J. Lu <hjl@gnu.org>
- * config/tc-sparc.c (sparc_handle_align): Reindent a bit. Correct
- initialization of waddr.
- (sparc_elf_final_processing): Add default case to switch.
+ * configure.in: Don't emulate i386-pc-pe-coff with i386coff.
+ * configure: Rebuild.
-Tue Jul 14 11:00:16 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+2000-06-17 Mark Elbrecht <snowball3@bigfoot.com>
- * doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather
- than temporary real.
+ * config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER
+ to BFD_ASSEMBLER.
-Mon Jul 13 13:55:42 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-16 Nick Clifton <nickc@cygnus.com>
- * write.c (subsegs_finish): Don't align the segments if there were
- any errors.
+ * config/tc-mips.c (md_parse_option): Accept RM5200,RM5230,
+ RM5231, RM5261, RM5721 and RM7000 as r5000 cpu variants.
- * config/obj-coff.c (c_symbol_merge): Correct number of bytes when
- copying aux information.
+ * doc/c-mips.texi: Document newly accepted cpu variants.
- * expr.c (make_expr_symbol): Catch attempts to turn an O_big
- expression into a symbol.
+2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
-Mon Jul 13 13:29:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-mips.h: Remove definition of ONLY_STANDARD_ESCAPES.
- * config/tc-i386.c (mode_from_disp_size): Change arg and return
- type to unsigned int.
- (md_assemble): Change type used to store offsets from unsigned
- long to long.
- (i386_operand): Switch error check to only call RESTORE_END_STRING
- once after parse_register.
+2000-06-13 Ulf Carlsson <ulfc@engr.sgi.com>
-Fri Jul 10 16:00:04 1998 Nick Clifton <nickc@cygnus.com>
+ * macro.c (getstring): Make it possible to escape the quote
+ character.
- * config/tc-v850.c (md_show_usage): Changed format to match that
- of gcc, ld, etc.
+Tue Jun 13 20:58:28 2000 Catherine Moore <clm@redhat.com>
- * as.c (show_usage): Changed format to match that of gcc, ld, etc.
+ * config/tc-hppa.c (pa_export): Weak symbols can be global.
-Thu Jul 9 12:09:57 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-06-13 H.J. Lu <hjl@gnu.org>
- * config/tc-m68k.c (tc_m68k_fix_adjustable): Don't adjust vtable
- relocs.
- (md_apply_fix_2): Force the symbol of the vtable reloc to be
- weak.
-
-Thu Jul 9 11:31:54 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/Makefile.am (MAINTAINERCLEANFILES): Define.
- * doc/Makefile.in: Rebuild.
-
-Wed Jul 8 12:18:56 1998 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mips.c (mips_ip, case 'i' and 'j'): Mask off high bits
- for %lo expressions.
- (mips_ip, case 'u'): Move range check after code to mask
- off bits in %hi/%lo expressions. Mask off high bits for
- %lo expressions.
-
-Tue Jul 7 17:57:38 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/Makefile.am (gasver.texi): New target.
- (as.info, as.dvi): Depends upon gasver.texi.
- * doc/as.texinfo: Include gasver.texi. Mention version number on
- title page and in top node.
- * doc/Makefile.in: Rebuild.
-
-Tue Jul 7 11:42:16 1998 Richard Henderson <rth@cygnus.com>
-
- * listing.c (listing_listing): For EDICT_LIST, skip all lines up to
- but not including the line containing the edict.
- * listing.h (LISTING_EOF): New.
- * input-scrub.c (input_scrub_next_buffer): Call it.
-
-Tue Jul 7 13:00:37 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (i386_operand): Don't set the size of an
- immediate address based solely on the suffix and the mode.
-
- * config/tc-i386.c (md_assemble): Add assertion to make sure
- overlap2 does not set Imm.
-
- * config/tc-i386.c (space_chars): Remove. The scrubber converts
- sequences of whitespace to a single space.
- (is_space_chars): Just compare with space.
- (md_begin): Don't initialize space_chars.
- (md_assemble): Just skip a single whitespace character.
- (i386_operand): Rewrite base-index parsing to use new
- parse_register, and to skip white space. Skip white space in a
- number of other places too. Don't give error message if
- parse_register fails.
- (parse_register): Change reg_string parameter to be non-const.
- Add end_op parameter. Skip white space after the `%', and return
- end of register string. Give error message here rather than
- caller.
-
-Fri Jul 3 15:34:34 1998 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patch from Matt Semersky <matts@scd.hp.com>:
- * expr.c (op_encoding): Make const.
- (expr_set_precedence): New function.
- (expr_begin): Don't set operator rankings, just call
- expr_set_precedence.
- * expr.h (expr_set_precedence): Declare.
- * read.c (s_mri): Call expr_set_precedence.
-
-Thu Jul 2 16:24:58 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/as.texinfo (Statements): Remove paragraph discussing
- continuing lines with a backslash. This hasn't worked for years,
- if it ever did.
-
-Thu Jul 2 14:06:22 1998 Klaus Kaempf <kkaempf@rmi.de>
-
- * obj-vms.c: Add C++ support with ctors/dtors sections. Add weak
- symbol definitions.
- (Ctors_Symbols, Dtors_Symbols): New symbol chains.
- (ps_CTORS, ps_DTORS): New section types.
- (vms_fixup_xtors_section): New function
- (Ctors_Psect, Dtors_Psect): Define.
- (IS_GXX_XTOR): Define
- (global_symbol_directory): Change check of gxx_bug_fixed to 0.
- Filter static constructors/destructors and add to
- Ctors_Symbols/Dtors_Symbols chain.
- (vms_write_object_file): Write Ctors_Symbols/Dtors_Symbols to
- appropriate section.
-
- * tc-alpha.h (TARGET_FORMAT): Rename "evax-alpha" to "vms-alpha".
- * makefile.vms: Merge vax/vms support.
-
-Wed Jul 1 20:06:20 1998 Richard Henderson <rth@cygnus.com>
-
- * config/obj-elf.c (obj_elf_vtable_inherit, obj_elf_vtable_entry): New.
- (elf_pseudo_table): Add them.
- * config/tc-mips.c (mips_force_relocation): Force vtable relocs.
- (md_apply_fix): Accept them.
- (mips_fix_adjustable): Don't adjust them.
- (tc_gen_reloc): Mung BFD_RELOC_VTABLE_ENTRY for Rel.
- * config/tc-ppc.c (md_apply_fix3): Accept vtable relocs.
- * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Force vtable relocs.
- (tc_fix_adjustable): Don't adjust them.
-
-Wed Jul 1 16:35:32 1998 Doug Evans <devans@seba.cygnus.com>
-
- * Makefile.am (CGEN_CPU_PREFIX): New variable.
- (cgen.o): Use it.
- * Makefile.in: Regenerate.
- * configure.in: AC_SUBST cgen_cpu_prefix.
* configure: Regenerate.
-Wed Jul 1 21:38:56 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-sh (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define.
- Changed all users of COND12_DELAY.
+2000-06-09 Alan Modra <alan@linuxcare.com.au>
-Fri Jun 26 11:21:11 1998 Jeffrey A Law (law@cygnus.com)
+ * app.c (do_scrub_begin): Don't default lex[';'] as a line
+ separator.
+ * doc/internals.texi (line_separator_chars): Semicolon is no
+ longer a default. Mention null and newline as defaults.
- * config/tc-mn10300.c (set_arch_mach): New function.
- (md_pseudo_table): Add pseudo-ops to set the current machine type.
- (md_begin): Default to mn10300 mode.
- (md_assemble): Only accept instructions for the core mn10300
- chip and the active machine type.
+ * read.c (is_end_of_line): Remove ifdef TC_HPPA.
-Wed Jun 24 19:06:04 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.h (line_separator_chars): Explicitly mention `;'
+ * config/tc-i860.h (line_separator_chars): Likewise.
+ * config/tc-h8300.c (line_separator_chars): Likewise.
+ * config/tc-i960.c (line_separator_chars): Likewise.
+ * config/tc-m68k.c (line_separator_chars): Likewise.
+ * config/tc-mips.c (line_separator_chars): Likewise.
+ * config/tc-ns32k.c (line_separator_chars): Likewise.
+ * config/tc-sparc.c (line_separator_chars): Likewise.
+ * config/tc-vax.c (line_separator_chars): Likewise.
- * subsegs.h (segment_info_type): Give the struct a name.
- * config/tc-h8300.h (tc_reloc_mangle): Add prototype.
- * config/tc-h8500.h (tc_reloc_mangle): Declare.
- * config/tc-sh.h (sh_coff_reloc_mangle): Add prototype.
- * config/tc-w65.h (tc_reloc_mangle): Declare.
- * config/tc-z8k.h (tc_reloc_mangle): Declare.
+ * config/tc-h8300.c (comment_chars): Use string initialiser.
+ * config/tc-i960.c (line_comment_chars): Likewise.
+ * config/tc-z8k.c (comment_chars, line_comment_chars,
+ line_separator_chars): Likewise.
-Wed Jun 24 13:45:00 1998 Catherine Moore <clm@cygnus.com>
+ * config/tc-arm.c (line_separator_chars): Always use `;', not just
+ for TE_LINUX.
- * config/tc-v850.c (v850_comm): Restore old section
- after common processing.
+2000-06-08 Nick Clifton <nickc@cygnus.com>
-Wed Jun 24 11:50:54 1998 Klaus Kaempf <kkaempf@progis.de>
-
- * config/obj-vms.c (Create_VMS_Object_File): Force binary file.
+ * config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value
+ for size 1 fixes.
-Tue Jun 23 17:47:31 1998 Jim Wilson <wilson@cygnus.com>
+2000-06-08 David O'Brien <obrien@FreeBSD.org>
- * config/tc-h8300.c (do_a_fix_imm, build_bytes): Replace cast to
- char with code that explicitly sign-extends.
+ * configure.in (VERSION): Update to show this is the CVS mainline.
-Tue Jun 23 13:54:57 1998 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c (md_begin): Restore text section as the current
- section after creating call table sections.
- * config/obj-coff.h (SYM_AUXINFO): New macro to conceal ugly
- code.
+2000-06-08 Matthew Jacob <mjacob@feral.com>
- * config/obj-coff.c (c_symbol_merge): Replace complex expresion
- with call to macro SYM_AUXINFO.
+ * config/tc-alpha.c (md_undefined_symbol): Properly understand that
+ $at is the integer register $r28, vs. both $r28 and the floating
+ point register $f28.
-Tue Jun 23 15:09:27 1998 Mike Stump <mrs@wrs.com>
+2000-06-08 James E. Wilson <wilson@cygnus.com>
- * Makefile.am (install-exec-local): Don't let EXEEXT interfere
- with the program transform name.
- * Makefile.in: Rebuild.
+ * config/tc-ia64.c (generate_unwind_image): Call ia64_flush_insns.
+ (dot_endp): Don't call ia64_flush_insns.
+ (emit_one_bundle): Don't delete prologue/body records from
+ unwind_record list in first loop. Rewrite second loop to account for
+ this.
-Mon Jun 22 19:52:42 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-07 David Mosberger <davidm@hpl.hp.com>
- * config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary
- information.
+ * config/tc-ia64.c: Add missing prototypes.
+ (generate_unwind_image): Cast argument to output_unw_records call.
-Mon Jun 22 15:18:58 1998 Ian Lance Taylor <ian@cygnus.com>
+Wed Jun 7 22:44:14 2000 Denis Chertykov <denisc@overta.ru>
- * config/tc-i386.c (i386_operand): Be prepared for a space between
- the open parenthesis and the start of the register operand,
- because of the June 16 change.
+ * config/tc-avr.c (avr_operand): fix the formatting of the comment.
-Sun Jun 21 21:27:03 1998 Ian Lance Taylor <ian@cygnus.com>
+Wed Jun 7 21:26:15 2000 Denis Chertykov <denisc@overta.ru>
- * config/tc-sh.c (md_apply_fix): Handle weak symbols correctly if
- BFD_ASSEMBLER.
+ * config/tc-avr.c (AVR_ISA_???): moved to include/opcode/avr.h
+ (REGISTER_P): likewise.
+ (avr_opcodes): uses include/opcode/avr.h
+ (avr_operand): enable ld r,Z or st r,Z for at90s1200.
-Sun Jun 21 12:26:36 1998 Nick Clifton <nickc@cygnus.com>
+2000-06-04 Alan Modra <alan@linuxcare.com.au>
- * config/tc-d30v.c (d30v_align): Always perform alignment request,
- even if it is belived to be unnecessary.
+ * read.c (is_end_of_line): No ';' for TC_HPPA. Add missing
+ initializers too.
-Fri Jun 19 13:57:06 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-03 H.J. Lu <hjl@gnu.org>
- * write.c (adjust_reloc_syms): Never adjust relocs against weak
- symbols.
- * config/tc-mips.c (md_apply_fix): Adjust accordingly.
+ * read.c (is_end_of_line): Put back `;'.
-Fri Jun 19 09:50:17 1998 Jeffrey A Law (law@cygnus.com)
+2000-06-03 Alan Modra <alan@linuxcare.com.au>
- * config/tc-mn10300.c (mn10300_insert_operand): Do not hardcode the
- shift amount for a repeated operand. The shift amount for the
- repeated copy comes from the size of the operand.
+ * config/tc-i386.c (md_shortopts): Remove 'm', add 'q' to non-elf.
-Fri Jun 19 00:44:19 1998 Jeffrey A Law (law@cygnus.com)
+2000-06-01 Alan Modra <alan@linuxcare.com.au>
- * config/tc-h8300.c (get_operand): Fix typos in ldm/stm support.
+ * expr.c (operand): Test is_end_of_line outside switch to catch
+ line separator chars that are also operators.
+ (operator): Return O_illegal for line separator chars.
-Wed Jun 17 13:07:05 1998 Ian Lance Taylor <ian@cygnus.com>
+ * read.c (is_end_of_line): Use 1 instead of 99. Don't set `;'
+ entry (or `!' entry for TC_HPPA).
- * config/tc-mips.c (md_show_usage): Fix -mipsN usage.
+ * config/tc-arm.c (my_get_float_expression): Cast to unsigned char
+ before indexing is_end_of_line. Remove redundant check for '\0'.
+ (fp_op2): Likewise.
+ * config/tc-h8500.c (md_assemble): Likewise.
+ * config/tc-mcore.c (md_assemble): Likewise.
+ * config/tc-tic30.c (tic30_find_parallel_insn): Likewise.
+ (md_atof): Likewise
-Tue Jun 16 13:06:21 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-m88k.c (s_bss): Cast to unsigned char before indexing
+ is_end_of_line.
+ * config/tc-mcore.c (mcore_cons): Likewise.
+ (mcore_float_cons): Likewise.
+ (mcore_stringer): Likewise.
+ * config/tc-tic30.c (tic30_find_parallel_insn): Likewise.
- * app.c (do_scrub_begin): If tc_symbol_chars is defined, treat all
- characters in it as LEX_IS_SYMBOL_COMPONENT.
- * config/tc-i386.h (tc_symbol_chars): Define.
- (extra_symbol_chars): Declare.
- * config/tc-i386.c (extra_symbol_chars): Define.
- (comment_chars): Don't use '/' as comment start if TE_LINUX.
- (line_comment_chars): Set to '/' if TE_LINUX.
- * doc/c-i386.texi (i386-prefixes): Update.
- * doc/internals.texi (CPU backend): Document tc_symbol_chars.
+2000-06-01 Scott Bambrough <scottb@netwinder.org>
-Fri Jun 12 13:36:54 1998 Tom Tromey <tromey@cygnus.com>
+ * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly.
- * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
- ($(PACKAGE).pot): Unconditionally depend on POTFILES.
+2000-05-29 Nick Clifton <nickc@cygnus.com>
-1998-06-12 Vladimir N. Makarov <vmakarov@cygnus.com>
+ * config/tc-sh.c: Fix compile time warning messages.
- * config/tc-d10v.c (md_apply_fix3): Checking displacement
- constraint in instructions REP & REPI.
+ * config/tc-mips.c: Fix compile time warning messages.
-Thu Jun 11 08:56:46 1998 Nick Clifton <nickc@cygnus.com>
+2000-05-29 Philip Blundell <philb@gnu.org>
- * config/tc-d30v.c (md_apply_fix3): Catch BFD_RELOC_8,
- BFD_RELOC_16, BFD_RELOC_64 and issue appropriate error messages.
+ * doc/as.texinfo: Update copyright dates.
+ (Local Labels): Delete misplaced mention of ARM.
+ * NEWS: Mention ARM ELF support.
- (check_range): If the operand is shifted, then shift the number
- before checking its range.
+2000-05-27 Alexandre Oliva <aoliva@cygnus.com>
- * write.c (adjust_reloc_syms): Add more checks for NULL pointers.
+ * config/tc-mn10300.c (md_assemble): Copy size to real_size before
+ it is modified, and use the real_size to compute the frag address
+ for dwarf2 line info.
- * config/tc-v850.c (v850_comm): Set SEC_COMMON bit on special
- common sections.
+2000-05-27 Alan Modra <alan@linuxcare.com.au>
-Wed Jun 10 17:26:35 1998 Nick Clifton <nickc@cygnus.com>
+ * Makefile.am (DEP, DEP1, dep, dep-in, dep-am): Use a better sed
+ line-matching scheme to cope with automake moving variables around.
+ ($(TARG_CPU_O)): Remove dependency on TARG_CPU_DEP_@target_cpu_type@
+ * Makefile.in: Regenerate.
- * config/tc-v850.c (v850_comm): Create special sections as needed.
+2000-05-26 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.c (sparc_relax): New.
+ (md_longopts): Add -relax and -no-relax options.
+ (md_parse_options, md_show_usage): Likewise.
+ (md_apply_fix3): Optimize tail call into branch always if possible.
+
+Thu May 4 15:27:07 2000 Donald Lindsay <dlindsay@cygnus.com>
+
+ * config/tc-d10v.c (write_2_short, parallel_ok, md_assemble,
+ d10v_cleanup) implement Mitsubishi's newly explained branch-packing
+ rules, with warning when a GAS statement specifies a packing that
+ will result in an instruction being squashed.
+ Added typdef packing_type and enumerals, changed various integer
+ literals to use the enumerals.
+
+2000-05-24 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (dot_restorereg_p): New function.
+ (md_pseudo_table): Add restorereg.p.
+ (output_X3_format): Fix typo: record type should be UNW_X3, not UNW_X1.
+ (output_X4_format): Fix typo: record type should be UNW_X4, not UNW_X2.
+
+ * config/tc-ia64.h (unw_record_type): Add unwabi.
+ (unw_r_record): Rename member MASK to GRMASK. Add sub-structure
+ called MASK with members for imask, and the masks produced by
+ fr_mem, gr_mem, br_mem, and frgr_mem.
+ (unw_p_record): Add members ABI and CONTEXT.
+ (unw_x_record): Add member AB.
+ * config/tc-ia64.c (enum reg_symbol): Add REG_PSP and REG_PRIUNAT
+ as pseudo-register for use during unwind info generation.
+ (AR_PFS, AR_LC): New macros.
+ (enum pseudo_type): Add PSEUDO_FUNC_REG to permit declaring registers
+ whose names start with an at sign (as in "@priunat").
+ (pseudo_func): Add "svr4", "hpux", "nt" constants and "priunat"
+ register.
+ (unwind_list, unwind_tail, current_unwind_entry, proc_start,
+ proc_end, unwind_info, personality_routine): Consolidate into
+ "unwind" structure to reduce offset-table use. Add member
+ NEXT_SLOT_NUMBER to track the slot number for the next instruction
+ to be emitted.
+ (output_R1_format, output_R3_format, output_P3_format,
+ output_P6_format): Initialize R with zero to reduce compiler warnings.
+ (output_P7_format): Ditto. Add `default' branch to switch
+ statement to reduce compiler warnings.
+ (output_P8_format, output_B1_format, output_B4_format): Ditto.
+ (output_P4_format): Rename 2nd & 3rd arg to IMASK and IMASK_SIZE.
+ (format_ab_reg): Rename from format_a_b_reg. Merge A and B args
+ into single argument.
+ (output_X1_format, output_X3_format): Initialize R with zero to reduce
+ compiler warnings. Merge A and B args into single argument.
+ (output_X2_format, output_X4_format): Remove unused variable R. Merge
+ A and B args into single argument.
+ (free_record): Removed (wasn't used).
+ (free_list_records): Also free imasks in prologue records.
+ (output_prologue, output_prologue_gr): Initialize mask bits to zero.
+ (output_spill_mask): Remove.
+ (output_unwabi): New function.
+ (output_epilogue, output_label_state, output_copy_state): Call
+ alloc_record.
+ (output_spill_psprel, output_spill_sprel, output_spill_psprel_p,
+ output_spill_sprel_p, output_spill_reg, output_spill_reg_p): Add AB
+ argument.
+ (process_one_record): New locals FR_MASK and GR_MASK. Ignore
+ gr_mem, fr_mem, br_mem, and frgr_mem records and instead emit them
+ as part of handling the prologue records. Emit region's imask if
+ we have one. Handle unwabi, epilogue, label_state, copy_state,
+ spill_psprel, spill_sprel, spill_reg, spill_psprel_p,
+ spill_sprel_p, and spill_reg_p records.
+ (set_imask, count_bits, slot_index): New function.
+ (fixup_unw_records): Fix region size computation. Handle
+ epilogue, spill_reg, spill_sprel, spill_psprel, spill_reg_p,
+ spill_sprel_p, and spill_psprel_p records. Merge mask bits of
+ frgr_mem, fr_mem, gr_mem, br_mem on a per-region basis and
+ set_imask accordingly. Update imask for gr_gr, and br_gr records.
+ (convert_expr_to_ab_reg, convert_expr_to_xy_reg): New function.
+ (dot_save): Use manifest constants for applicaton registers.
+ Handle REG_PR and REG_PRIUNAT.
+ (dot_restore): Don't just ignore it.
+ (dot_restorereg): New function..
+ (generate_unwind_image): Ensure unwind info is a multiple of eight
+ bytes, not just four bytes.
+ (dot_handlerdata, dot_unwentry): Demand empty rest of line.
+ (dot_altrp): Don't just ignore it.
+ (dot_savemem): New function. Replaces dot_savesp() and
+ dot_savepsp(). Use manifest constants for applicaton registers.
+ Handle REG_PR and REG_PRIUNAT.
+ (dot_savef): Simplify.
+ (dot_saveb): Support generation of br_gr.
+ (dot_spillreg, dot_spillmem, dot_spillreg_p, dot_spillmem_p,
+ dot_label_state, dot_copy_state): New function.
+ (dot_unwabi): Don't just ignore it.
+ (md_pseudo_table): Add restorereg, spillreg, spillsp, spillpsp,
+ spillreg.p, spillsp.p, spillpsp, label_state, copy_state,
+ unwabi, vframesp, and vframepsp. Fix typo alprp->altrp.
+ (emit_one_bundle): Set slot number for prologue/body records
+ *before* emitting the first insn.
+ (emit_one_bundle): Set UNWIND.NEXT_SLOT_NUMBER.
+ (md_begin): Declare "psp" pseudo-register.
+ (md_operand): Handle PSEUDO_FUNC_REG. Fix printing of error message
+ so we don't get segfault.
+ (output_psp_sprel): Output sp/psp relative offsets as 4-byte word
+ counts as required per SW Conventions manual
+ (output_rp_psprel, output_rp_sprel, output_pfs_psprel,output_pfs_sprel,
+ output_preds_psprel, output_preds_sprel, output_spill_base,
+ output_unat_psprel, output_unat_sprel, output_lc_psprel,
+ output_lc_sprel, output_fpsr_psprel, output_fpsr_sprel,
+ output_priunat_psprel, output_priunat_sprel, output_bsp_psprel,
+ output_bsp_sprel, output_bspstore_psprel, output_bspstore_sprel,
+ output_rnat_psprel, output_rnat_sprel, output_spill_psprel,
+ output_spill_sprel, output_spill_psprel_p, output_spill_sprel_p):Ditto.
+ (dot_vframe): Implement.
+ (dot_vframesp, dot_vframepsp): New function.
-1998-06-10 Vladimir N. Makarov <vmakarov@cygnus.com>
+Tue May 23 00:57:05 2000 Hans-Peter Nilsson <hp@axis.com>
- * config/tc-d10v.c (write_2_short): Addition of swapping
- instructions for sequential and reverse sequential order when
- given order is not possible.
+ * configure.in (i386-*-freebsd a.out entry): Quote properly.
+ * configure: Regenerate.
-Tue Jun 9 13:52:53 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-05-23 Alan Modra <alan@linuxcare.com.au>
- * Makefile.am: Rebuild dependencies.
- (DEP_INCLUDES): Fix reference to intl build directory.
- * Makefile.in: Rebuild.
+ * config/tc-i386.c (md_assemble): Pass jump reloc in fr_var...
+ (md_estimate_size_before_relax): so we can use it here instead of
+ old kludges. Localise vars to blocks. Comment.
-Tue Jun 9 12:20:05 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * doc/c-i386.texi: Update 16 bit documentation.
-
- * config/tc-i386.h: Change Data16 to Size16, Data32 to Size32,
- IgnoreDataSize to IgnoreSize as they are used for address size as
- well as data size.
- * config/tc-i386.c: Likewise. Add code to reject addr32/data32 in
- 32-bit mode, similarly addr16/data16 and variants.
-
-Mon Jun 8 18:32:01 1998 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d30v.c (md_assemble): Fix handling of reverse
- sequential word multiply instructions.
-
- (do_assemble): Add extra command line argument, to allow mul32
- attribute to be preserved across parallel insns.
- (md_assemble): Insert NOPs between explicitly parallel insns which
- contain an 32 bit multiply and a 16 multiply.
-
-Mon Jun 8 12:20:30 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c: REPNE renamed to REPNE_PREFIX_OPCODE, and
- likewise for REPE.
-
- * config/tc-i386.c (reloc): Add braces.
-
- * config/tc-i386.c (struct _i386_insn): Rename bi to sib to be
- consistent with Intel naming.
- * config/tc-i386.h (base_index_byte): Rename to sib_byte. Don't
- use bitfields in sib_byte.
- (modrm_byte): Don't use bitfields here either.
-
- * config/tc-i386.c (current_templates): Add const.
- (parse_register): Add const to return, param, and char *s.
- (i386_operand): Add const to reg_entry *r.
- * config/tc-i386.h (templates): Add const to start, end.
-
- Inspired by code for 16 bit gas support from Martynas Kunigelis
- <martynas@nm3.ktu.lt>:
- * config/tc-i386.c (md_assemble): Add full support for 16 bit
- modrm, and Jump, JumpByte, JumpDword, JumpInterSegment insns.
- (uses_mem_addrmode): Remove.
- (md_estimate_size_before_relax): Add support here too.
- (md_relax_table): Rewrite interface to md_relax for 16 bit
- support.
- (BYTE, WORD, DWORD, UNKNOWN_SIZE): Remove.
- (opcode_suffix_to_type): Remove.
- (CODE16, SMALL, SMALL16, BIG, BIG16): Define.
- (SIZE_FROM_RELAX_STATE): Modify to suit above.
- (md_convert_frag): Likewise.
- (i386_operand): Add support for 16 bit base/index regs,
- immediates, and displacements. Remove some unnecessary casts, and
- localise end_of_operand_string, displacement_string_start,
- displacement_string_end variables. Add GCC_ASM_O_HACK.
- * config/tc-i386.h (NO_BASE_REGISTER_16): Define.
-
- * config/tc-i386.c (prefix_hash): Remove.
- (md_begin): Rewrite without obstacks. Remove prefix hash table
- handling. Rewrite lexical table handling.
- (i386_print_statistics): Don't print prefix statistics.
- (md_assemble): Rewrite instruction parser so that line is not
- converted to lower case. Don't do a hash_find for prefixes,
- instead recognise them via opcode modifier.
- (expecting_operand, paren_not_balanced): Localise variables.
- * config/tc-i386.h (IsPrefix): Define.
- (prefix_entry): Remove.
-
- * config/tc-i386.h (PREFIX_SEPERATOR): Don't define.
- * config/tc-i386.c (PREFIX_SEPARATOR): Define here instead, using
- '\\' in case where comment_chars contains '/'.
-
- * config/tc-i386.c (MATCH): Ensure given operand and template
- match for JumpAbsolute. Makes e.g. `ljmp table(%ebx)' invalid;
- you must write `ljmp *table(%ebx)'.
-
- From H.J. Lu <hjl@gnu.org>:
- * config/tc-i386.c (BFD_RELOC_16, BFD_RELOC_16_PCREL): Define
- as 0 ifndef BFD_ASSEMBLER.
- (md_assemble): Allow immediate operands without suffix or
- other reg operand to default in size to the current code size.
-
-Mon Jun 8 09:45:00 1998 Catherine Moore <clm@cygnus.com>
-
- * config/tc-v850.c (md_begin): Restore creation of
- .call_table_text and .call_table_data sections.
-
-Sat Jun 6 00:02:41 1998 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d30v.c (md_assemble): Set execution type to unknown
- after emitting a word of noops.
-
-Fri Jun 5 23:27:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (mode_from_disp_size): Disp16 is mode 2.
- (i386_operand): Simplify checks for valid base/index combinations.
- Disallow `in 4(%dx),%al'.
-
- * config/tc-i386.c (struct _i386_insn): Make regs, base_reg, and
- index_reg const.
- (add_prefix): Change parameter from char to int.
-
- * config/tc-i386.h (Ugh): Define opcode modifier.
- * config/tc-i386.c (md_assemble): Print warnings for Ugh insns.
-
- * config/tc-i386.c (md_assemble): Rewrite MATCH and
- CONSISTENT_REGISTER_MATCH macros to check register types more
- thoroughly. Check for illegal suffix/operand combinations
- when matching insns with operands. Handle new `s' suffix, and
- associated FloatMF opcode modifier for float insns with memory
- operands.
- * config/tc-i386.h (FloatMF): Define new opcode modifier.
- (No_sSuf, No_bSuf, No_wSuf, No_lSuf): Likewise.
- (SHORT_OPCODE_SUFFIX, LONG_OPCODE_SUFFIX): Define.
- * config/tc-i386.c: Rename WORD_PREFIX_OPCODE to
- DATA_PREFIX_OPCODE throughout.
-
- * config/tc-i386.c (REGISTER_WARNINGS): Define.
- (md_assemble): Rewrite suffix/register operand checking code to be
- more thorough. Remove Abs8,16,32. Change occurrences of Mem to
- AnyMem, the better to grep.
- (pi): Remove Abs.
- (i386_operand): Don't set Mem bits in i.types[this_operand] when
- given a memory operand. Don't set Abs bits either.
- (type_names): Remove Mem*, Abs*.
- * config/tc-i386.h (Mem8, Mem16, Mem32, Abs8, Abs16, Abs32): Don't
- define opcode_modifiers as these cases are handled by Disp8,
- Disp16, Disp32 and suffix checks.
- (COMES_IN_BOTH_DIRECTIONS): Remove.
- (FloatR): Define. It's OK to share the bit with ReverseRegRegmem.
-
- * config/tc-i386.c (md_assemble): Don't emit operand size prefix
- if IgnoreDataSize modifier given. Remove ShortformW modifier
- test. Add test for ShortForm in W base_opcode modification.
- Merge Seg2ShortForm and Seg3ShortForm code.
- * config/tc-i386.h (ShortFormW): Remove.
- (IgnoreDataSize): Define.
-
-Fri Jun 5 10:50:53 1998 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d30v.c (md_assemble): Store previous segment state
- with previous instruction.
-
-Wed Jun 3 18:21:56 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (SCALE1_WHEN_NO_INDEX): Define.
- (ebp, esp): Remove static variables.
- (MATCH): Remove test for InOutPortReg.
- (i386_operand): Properly handle InOutPortReg here instead.
- Disallows `inb (%dx,2)', `inb %es:(%dx)' and `mov (%dx),%ax'
- (md_assemble): Simplify and correct modrm and sib generation.
- (i386_operand): Add warning for scale without index.
- Rewrite checks for valid base/index combinations.
-
- * config/tc-i386.c (END_STRING_AND_SAVE): Protect arguments of
- macros and enclose in do while(0).
- (RESTORE_END_STRING): Likewise.
- (md_assemble): Add one to printed operand number so we start
- from 1 not 0. Add some more gettext invocations.
- (i386_operand): Fix `%%s' -> `%%%s'. Inc printed operand
- number here too.
-
- * config/tc-i386.h (WAIT_PREFIX, LOCKREP_PREFIX, ADDR_PREFIX,
- DATA_PREFIX, SEG_PREFIX): Define.
- * config/tc-i386.c (struct _i386_insn): Remove wait_prefix field.
- (check_prefix): Remove function.
- (add_prefix): New function. Add prefix to i.prefix as well as
- doing checks.
- (md_assemble): Changes for add_prefix. Remove hack for wait
- prefix, instead always output prefixes in fixed order. Test
- for jcxz/loop when selecting between word & dword operations,
- and add address size prefix rather than operand size prefix.
- Remove operand -> address size hack when emitting jcxz/loop.
- (i386_operand): Remove O_Absent check as it's done in expr.
-
-Wed Jun 3 15:09:10 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Recognize m5200 as a cpu_type of m68k.
- * aclocal.m4: Rebuild with current libtool.
- * configure: Rebuild.
+ * frags.c (frag_new): Update fr_var comments.
+ * frags.h (struct frag): Ditto.
-Wed Jun 3 14:11:59 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-05-22 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-ia64.c (FUNC_PC_RELATIVE): New.
+ (pseudo_func): Add pcrel.
+ (operand_match): Handle IA64_OPND_TGT64.
+ (build_insn): Likewise.
+ (md_begin): Initialize pseudo_func[FUNC_PC_RELATIVE].
+ (ia64_gen_real_reloc_type): Handle FUNC_PC_RELATIVE.
+ (fix_insn): Handle all three 64-bit relocation types.
+
+Mon May 22 22:43:32 2000 Hans-Peter Nilsson <hp@axis.com>
+
+ * obj.h (struct format_ops): New members begin, app_file,
+ s_set_other, s_set_desc, s_get_type, s_set_type,
+ separate_stab_sections, init_stab_section.
+
+ * config/obj-multi.h: Update GPL notice to v2.
+ (obj_begin): New.
+ (obj_app_file): New.
+ (S_SET_SIZE): Test s_set_size for NULL before calling.
+ (S_SET_ALIGN): Similar for s_set_align.
+ (S_SET_OTHER): New.
+ (S_SET_DESC): New.
+ (S_GET_TYPE): New.
+ (S_SET_TYPE): New.
+ (SEPARATE_STAB_SECTIONS): New.
+ (INIT_STAB_SECTION): New.
+ (EMIT_SECTION_SYMBOLS): New.
+ (AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.
+
+ * config/obj-elf.h: Update GPL notice to v2.
+ Mention that this file is included from obj-multi.h.
+ (obj_begin): Wrap definition in ifndef.
+ (elf_file_symbol): Constify declaration.
+ (obj_app_file): Ditto.
+ (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
+ Wrap in ifndef SEPARATE_STAB_SECTIONS.
+
+ * config/obj-elf.c (elf_s_set_other): New.
+ (elf_file_symbol): Constify argument.
+ (elf_separate_stab_sections): New.
+ (elf_init_stab_section): New.
+ (elf_format_ops): Add new members. Remove comma at end.
+
+ * config/obj-ecoff.c (ecoff_separate_stab_sections): New.
+ (ecoff_format_ops): Add new fields. Remove comma at end.
+ Mention inconsistency for emit_section_symbols.
+
+ * config/obj-coff.h (c_dot_file_symbol): Constify declaration.
+
+ * config/obj-coff.c (c_dot_file_symbol): Constify argument.
+ (coff_separate_stab_sections): New.
+ (coff_format_ops): Add new members.
+
+ * config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
+ (obj_aout_s_set_other): New.
+ (obj_aout_s_set_desc): New.
+ (obj_aout_s_get_type): New.
+ (obj_aout_s_set_type): New.
+ (obj_aout_separate_stab_sections): New.
+ (aout_format_ops): New members added. Use obj_aout_process_stab,
+ not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0.
+ (obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
+ appropriate.
+ (obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
- * config/tc-m68k.c (md_estimate_size_before_relax): Add more calls
- to relaxable_symbol to prevent references to external symbol from
- being relaxed.
+2000-05-22 Alan Modra <alan@linuxcare.com.au>
-Wed Jun 3 14:10:36 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.c (tc_i386_fix_adjustable): Prevent adjustment
+ for OBJ_MAYBE_ELF too. Use S_IS_EXTERNAL instead of S_IS_EXTERN.
+ (md_estimate_size_before_relax): Ensure jumps to weak and
+ externally visible symbols are relocatable.
- * config/tc-m68k.c (relaxable_symbol): If TARGET_OS is "elf", all
- symbols are relaxable.
+Sat May 20 16:41:55 2000 Hans-Peter Nilsson <hp@axis.com>
-Wed Jun 3 09:16:00 1998 Catherine Moore <clm@cygnus.com>
-
- * config/tc-v850.c (md_begin): Don't create special
- sections by default.
-
-Tue Jun 2 14:52:56 1998 Jeffrey A Law (law@cygnus.com)
+ * stabs.c (aout_process_stab): Make global.
+ (s_desc): Add ATTRIBUTE_UNUSED to args as appropriate.
+ * read.h (aout_process_stab): Declare.
- * config/tc-mips.c (macro): For div and udiv, close the
- reorder block as soon as possible.
+ * configure.in (EMULATIONS) [i386aout, i386coff, i386elf]:
+ Generalize to *aout, *coff *elf.
+ * configure: Regenerated.
-Tue Jun 2 15:36:13 1998 Ian Lance Taylor <ian@cygnus.com>
+ * doc/internals.texi (Object format backend): Say
+ SEPARATE_STAB_SECTIONS needs to be nonzero, not just defined.
- From Matt Semersky <matts@scd.hp.com>:
- * macro.c (macro_mri_mode): New function.
- * macro.h (macro_mri_mode): Declare.
- * read.c (s_mri): Call macro_mri_mode when switching in and out of
- MRI mode.
+ * Makefile.am (TARG_ENV_HFILES): Delete te-multi.h.
+ * Makefile.in: Regenerated.
-Tue Jun 2 13:32:22 1998 Klaus Kaempf <kkaempf@progis.de>
+2000-05-19 Catherine Moore <clm@cygnus.com>
- * config/tc-alpha.c (s_alpha_comm): Allow alignment parameter in
- OBJ_EVAX case.
+ * cgen.h (GAS_CGEN_MAX_FIXUPS): Check if already defined.
- * config/tc-alpha.c (s_alpha_comm): Defer restoring character
- until after xstrdup in OBJ_EVAX case.
+2000-05-18 Alan Modra <alan@linuxcare.com.au>
-Tue Jun 2 13:11:13 1998 Pat Rankin <rankin@eql.caltech.edu>
+ * config/tc-hppa.c (md_apply_fix): Mask out immediate bits of
+ instruction to reflect change in re_assemble_*.
- * config/tc-vax.c (md_create_short_jump): Fix off by two bug in
- offset calculation. Also, use VAX_BRW from vax-inst.h instead
- of hardcoded magic number.
- (md_create_long_jump): Use VAX_JMP and VAX_ABSOLUTE_MODE macros.
+Thu May 18 10:52:14 2000 Jeffrey A Law (law@cygnus.com)
-Tue Jun 2 09:25:34 1998 Doug Evans <devans@canuck.cygnus.com>
+ * configure.in (hppa-*-hpux11*): If the cpu is hppa*64*, then
+ build PA64 ELF tools.
+ * configure: Rebuilt.
- * read.c (do_s_func): New function.
- (s_func): Call it.
- * read.h (do_s_func): Add prototype.
+2000-05-17 Alan Modra <alan@linuxcare.com.au>
-Mon Jun 1 12:47:30 1998 Doug Evans <devans@canuck.cygnus.com>
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
- * config/tc-m32r.c (m32r_do_align): Only fill code sections with
- nops if fill pattern not specified.
+2000-05-15 Nick Clifton <nickc@cygnus.com>
-Mon Jun 1 14:08:35 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (struct asm_psr): Add boolean field
+ distinguishing between CSPR and SPSR. Rename 'number' field
+ to 'field'.
+ (psrs): Rearrange contents to match new asm_psr structure.
+ (arm_psr_parse): Move next to psr_required_here. Make it
+ return an asm_psr structure.
+ (psr_required_here): Use asm_psr structure returned by
+ arm_psr_parse.
+ (do_msr): Reorganise to allow psr_required_here to be called
+ only once.
+ (md_undefined_name): Mark 'name' parameter as unused, since
+ the COFF target does not use it.
- From Andrew Crabtree <andrewc@typhoon.rose.hp.com>:
- * config/te-go32.h (TE_GO32): Define.
- * config/tc-i386.h (LOCAL_LABEL): Don't define if TE_GO32.
+2000-05-14 David O'Brien <obrien@FreeBSD.org>
-Sun May 31 15:43:06 1998 Doug Evans <devans@canuck.cygnus.com>
+ * config/te-386bsd.h: Clean up comments to adhere to the GNU coding
+ standards.
+ * config/te-aux.h: Likewise.
+ * config/te-dpx2.h: Likewise.
+ * config/te-go32.h: Likewise.
+ * config/te-hp300.h: Likewise.
+ * config/te-hppa.h: Likewise.
+ * config/te-i386aix.h: Likewise.
+ * config/te-ic960.h: Likewise.
+ * config/te-interix.h: Likewise.
+ * config/te-nbsd532.h: Likewise.
+ * config/te-pc532mach.h: Likewise.
+ * config/te-ppcnw.h: Likewise.
+ * config/te-psos.h: Likewise.
+ * config/te-sparcaout.h: Likewise.
+ * config/te-sun3.h: Likewise.
+ * config/te-sysv32.h: Likewise.
+
+2000-05-14 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-h8300.c (do_a_fix_imm): Don't rely on `short' being 16
+ bits. Instead explicitly mask and sign extend. Do the 8 bit mask
+ and sign extend without an if statement.
+ (build_bytes): Likewise.
+
+2000-05-14 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-h8300.c (do_a_fix_imm): Output a reloc for no
+ X_add_symbol L_32 case.
- Implement .func/.endfunc pseudo-ops.
- * read.h (stabs_generate_asm_func,stabs_generate_asm_endfunc): Declare.
- (s_func): Declare.
- * read.c (potable): Add .func,.endfunc.
- (s_func): New function.
- * stabs.c (stabs_generate_asm_func,stabs_generate_asm_endfunc): New
- functions.
- (in_doc_func_p,current_function_label): New static globals.
- (stabs_generate_asm_lineno): Emit function relative stabs if in .func.
+2000-05-14 David O'Brien <obrien@FreeBSD.org>
-Fri May 29 18:13:12 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/te-freebsd.h: New file.
- * config/tc-a29k.h (WORKING_DOT_WORD): Define.
- * config/tc-alpha.h (WORKING_DOT_WORD): Define.
- * config/tc-arm.h (WORKING_DOT_WORD): Define.
- * config/tc-h8300.h (WORKING_DOT_WORD): Define.
- * config/tc-h8500.h (WORKING_DOT_WORD): Define.
- * config/tc-hppa.h (WORKING_DOT_WORD): Define.
- * config/tc-i860.h (WORKING_DOT_WORD): Define.
- * config/tc-i960.h (WORKING_DOT_WORD): Define.
- * config/tc-tic30.h (WORKING_DOT_WORD): Define.
- * config/tc-w65.h (WORKING_DOT_WORD): Define.
- * config/tc-z8k.h (WORKING_DOT_WORD): Define.
- * config/tc-a29k.c: Don't define md_short_jump_size,
- md_long_jump_size, md_create_short_jump or md_create_long_jump.
- * config/tc-alpha.c: Likewise.
- * config/tc-alpha.h: Likewise.
- * config/tc-arm.c: Likewise.
- * config/tc-h8300.c: Likewise.
- * config/tc-h8500.c: Likewise.
- * config/tc-hppa.c: Likewise.
- * config/tc-i860.c: Likewise.
- * config/tc-i960.c: Likewise.
- * config/tc-ppc.c: Likewise.
- * config/tc-sh.c: Likewise.
- * config/tc-sparc.h: Likewise.
- * config/tc-tic30.c: Likewise.
- * config/tc-w65.c: Likewise.
- * config/tc-z8k.c: Likewise.
+2000-05-13 Alan Modra <alan@linuxcare.com.au>
-Fri May 29 16:03:26 1998 Pat Rankin <rankin@eql.caltech.edu>
+ * asintl.h (gettext, dgettext, dcgettext, textdomain,
+ bindtextdomain): Replace defines with those from intl/libgettext.h
+ to quieten gcc warnings.
- * config/tc-vax.c (_): Delete this macro used for placeholder
- values in vax_operand_width_size; it conflicts with the _() macro
- used for internationalization.
+ * NEWS: Mention x86 .arch and -q.
-Fri May 29 13:46:07 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.c (quiet_warnings): New.
+ (md_assemble): Use quiet_warnings.
+ (md_parse_option): Set quiet_warnings from -q.
+ (md_show_usage): Mention -q, delete -m.
+ (flag_do_long_jump): Delete.
+ (md_parse_option): Remove -m.
+ (md_show_usage): Remove -m.
+ (md_create_long_jump): Remove useless flag_do_long_jump code.
- * symbols.c (symbol_find_base): Fix case insensitive symbol name
- code. From Chris Moller <moller@bops.com>.
+ * as.c (parse_args): In case OPTION_DEFSYM, use a valueT to hold
+ the symbol value, and use bfd_scan_vma if BFD_ASSEMBLER.
- Based on patch from Klaus Kaempf <kkaempf@progis.de>:
- * struc-symbol.h (struct broken_word): Add seg and subseg fields.
- * read.c (emit_expr): Initialize seg and subseg fields of a new
- broken word.
- * write.c (write_object_file): Switch to the appropriate segment
- and subsegment when processing a broken word.
+2000-05-13 Alan Modra <alan@linuxcare.com.au>
+ Alexander Sokolov <robocop@netlink.ru>
- * config/tc-m68k.c (mri_assemble): New static function.
- (build_mri_control_operand): Call mri_assemble rather than
- md_assemble.
- (s_mri_else, s_mri_break, s_mri_next, s_mri_for): Likewise.
- (s_mri_endf, s_mri_endw): Likewise.
+ * doc/c-i386.texi (i386-Arch): New section.
+ (i386-Syntax): Mention .intel_syntax and .att_syntax.
-Wed May 27 11:16:25 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.c (cpu_arch_name, cpu_arch_flags): New.
+ (smallest_imm_type): Use smallest opcode for shift by one if cpu
+ architecture has been given and is not 486.
+ (set_cpu_arch): New.
+ (md_pseudo_table): Add .arch.
+ (md_assemble): Warn if cpu architecture has been given and an
+ unsupported instruction.
- * read.c (s_org): Call md_flush_pending_output if it is defined.
+ * config/tc-i386.h (SMALLEST_DISP_TYPE): Delete.
+ Move operand_types bit defines after relevant template field.
+ (template): Add cpu_flags.
+ (Cpu*): Define.
+ (arch_entry): New.
- * config/tc-sparc.c (md_show_usage): Add \n\ to new string.
+2000-05-12 Alexandre Oliva <aoliva@cygnus.com>
-Tue May 26 19:27:52 1998 Stan Cox <scox@equinox.cygnus.com>
+ * config/tc-mn10300.h (md_end): Define.
+ (mn10300_finalize): Declare.
+ * config/tc-mn10300.c: Include dwarf2dbg.h.
+ (debug_line): Define.
+ (md_assemble): Generate dwarf2 line info.
+ (mn10300_finalize): New function. Finalize dwarf2 info.
- * config/tc-sparc.c (OPTION_LITTLE_ENDIAN_DATA): New.
- (md_parse_option): Add for same.
- (sparc_md_end): Set bfd_mach_sparc_sparclite_le.
- (md_apply_fix3, tc_gen_reloc): Allow BFD_RELOC_SPARC_32LE.
- (cons_fix_new_sparc): Added to create BFD_RELOC_SPARC_32LE.
+2000-05-11 Ulf Carlsson <ulfc@engr.sgi.com>
- * config/tc-sparc.h (cons_fix_new_sparc): Added.
-
-Thu May 21 15:02:41 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-mips.c (md_estimate_size_before_relax): Use the
+ external version of the relocation for weak symbols.
- * config/tc-arm.c (find_real_start): Relax definition of local
- labels.
+2000-05-08 David Mosberger <davidm@hpl.hp.com>
-Tue May 19 16:59:44 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-ia64.c (output_P7_format, case mem_stack_f): Output fixed
+ frame size in units of 16 bytes, as required per SW Conventions manual.
+ (output_unw_records): Output info-block header as a dword to get
+ byte-order right.
- * config/tc-d30v.c (d30v_align): Apply address adjustment to all
- symbols at the given address, not just the last one specified.
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
-Tue May 19 08:25:19 1998 Catherine Moore <clm@cygnus.com>
+ * as.h: #include "file", not <file> on files from ../include.
+ (as_abort, as_fatal): Add ATTRIBUTE_NORETURN.
+ * config/tc-m68k.c (m68k_ip): Fix signed/unsigned warnings.
+ (md_convert_frag): Add ATTRIBUTE_UNUSED.
+ (tc_coff_symbol_emit_hook): Ditto.
+ (OPTCOUNT): Cast to int to avoid compiler warning.
+ (md_begin): Fix signed/unsigned warnings.
- * config/tc-sparc.c (sparc_handle_align): Use number_to_chars_bigendian
- or number_to_chars_littleendian to write data.
+2000-05-08 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-Mon May 18 17:09:30 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-m68k.c (md_convert_frag_1): Abort if we end up in the
+ ABRANCH LONG case for a conditional branch on a 68000.
+ (md_estimate_size_before_relax): Likewise. Also handle
+ flag_short_refs correctly for ABRANCH, BCC68000, and DBCC.
+ (m68k-ip: case ABSL): Relax absolute references to 16-bit
+ PC-relative on all CPUs.
+ (md_estimate_size_before_relax): Likewise.
- * config/tc-v850.c (md_assemble): Remove artificially created
- register name symbols.
+2000-05-04 Alan Modra <alan@linuxcare.com.au>
-Mon May 18 13:47:06 1998 Doug Evans <devans@canuck.cygnus.com>
+ * as.c (parse_args): Just mention current year in printed
+ copyright message.
- * write.c (fixup_segment): Change "segment" to "section" in
- error message.
+2000-05-03 J.T. Conklin <jtc@redback.com>
-Mon May 18 16:55:40 1998 Michael Meissner <meissner@cygnus.com>
+ * config/tc-ppc.c (pre_defined_registers): Add entries for vector
+ unit registers.
+ (md_parse_option): Recognize -m7400.
- * write.c (fixup_segment): Change sym1-sym2 message again.
+2000-05-03 Ian Lance Taylor <ian@zembu.com>
-Mon May 18 09:31:43 1998 Michael Meissner <meissner@cygnus.com>
+ * config/atof-ieee.c (gen_to_words): When adding carry back in,
+ don't permit lp to become less than the words array.
- * write.c (fixup_segment): Improve error message for sym1-sym2
- errors when sym1 is in a different segment from sym2.
+2000-05-03 Rodney Brown <RodneyBrown@pmsc.com>
-Wed May 13 10:16:37 1998 Doug Evans <devans@canuck.cygnus.com>
+ config/tc-mcore.c (md_apply_fix3): BFD_RELOC_MCORE_PCREL_IMM11BY2
+ Fix little-endian case.
- * config/tc-m32r.c (warn_unmatched_high): New static local.
- (OPTION_WARN_PARALLEL): Rename from OPTION_WARN.
- (OPTION_NO_WARN_PARALLEL): Rename from OPTION_NO_WARN.
- (md_longopts): Recognize --{no-,}warn-unmatched-high.
- (md_parse_option): Likewise.
- (md_show_usage): Likewise.
- (m32r_frob_file): Likewise.
-
- * read.c (generate_file_debug,generate_lineno_debug): New functions.
- (read_a_source_file): Call them.
- * read.h (stabs_generate_asm_file): Declare.
- * stabs.c (stabs_generate_asm_file): New function.
- (generate_asm_file): New function.
- (stabs_generate_asm_lineno): Move file name handling into
- generate_asm_file.
-
-Tue May 12 12:03:44 1998 Richard Henderson <rth@cygnus.com>
-
- * config/tc-d30v.c (cur_mul32_p, prev_mul32_p): Make static.
- (d30v_current_align, d30v_current_align_seg): New variables.
- (d30v_last_label): New variable.
- (d30v_align, s_d30v_align, s_d30v_text): New functions.
- (s_d30v_data, s_d30v_section): Likewise.
- (md_pseudo_table): Call them.
- (md_begin): Initialize d30v_current_align_seg.
- (md_assemble): Call d30v_align when needed by known current alignment.
- (d30v_frob_label, d30v_cons_align): New functions.
- * config/tc-d30v.h (md_do_align): Remove.
- (tc_frob_label): Call d30v_frob_label.
- (md_cons_align): New.
-
- * config/tc-d30v.c (find_format): Convert complex expressions to
- expression symbols before processing. Clean up code formatting.
-
-Sun May 10 22:35:02 1998 Jeffrey A Law (law@cygnus.com)
-
- * po/Make-in (install-info): New target.
-
-Thu May 7 15:49:07 1998 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10200.c (md_assemble): Handle "bra" just like "jmp"
- instructions.
- * config/tc-mn10300.c (md_assemble): Likewise.
+2000-05-03 David O'Brien <obrien@NUXI.com>
-Thu May 7 11:47:22 1998 Doug Evans <devans@canuck.cygnus.com>
+ * as.c (parse_args): Update copyright.
- * Makefile.am: Update with `make dep-am'.
- (HFILES): Add cgen.h.
- (cgen.o): Depend on cgen.h.
- * Makefile.in: Regenerate.
+2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
- * cgen.c (cgen_md_apply_fix3): Don't pass newline to as_warn_where.
+ * gas/config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4
+ for the .bss section too.
-Thu May 7 13:20:56 1998 Anders Blomdell <anders.blomdell@control.lth.se>
+2000-05-02 Alan Modra <alan@linuxcare.com.au>
- * gasp.c (grab_label): Permit a label to be a preprocessor
- variable by permitting a label to start with a backslash.
+ * configure.in: Set em=linux for hppa-*-linux.
+ * configure: Regenerate.
+ * doc/Makefile.in: Regenerate with correct automake.
+
+ * frags.c (frag_grow): Sanity check chunk_size.
+
+ * config/obj-elf.h: #include "bfd.h" not <bfd.h>
+ * config/obj-som.h: Likewise.
+ * config/obj-ieee.h: Likewise.
+
+ * config/tc-hppa.h: Test BFD_ARCH_SIZE, not BFD64.
+
+ * config/tc-hppa.c (log2): Only compile when OBJ_SOM.
+ (md_pseudo_table): Fully initialise OBJ_ELF cases.
+ (fix_new_hppa): Add ATTRIBUTE_UNUSED to args as appropriate.
+ (pa_ip): low_sign_unext now returns via function value. Use
+ re_assemble_* instead of dis_assemble_* and
+ INSERT_FIELD_AND_CONTINUE combination. Don't call sign_unext
+ unnecessarily.
+ (md_convert_frag): Add ATTRIBUTE_UNUSED to args as appropriate.
+ (md_section_align, md_parse_option, md_show_usage,
+ md_undefined_symbol, pa_align, pa_block, pa_brtab, pa_try,
+ pa_callinfo, pa_code, pa_comm, pa_end, pa_enter, pa_entry,
+ pa_exit, pa_export, pa_import, pa_label, pa_leave, pa_level,
+ pa_origin, pa_param, pa_proc, pa_procend, pa_space, pa_spnum,
+ pa_version, pa_compiler, pa_copyright, pa_data, pa_fill, pa_lsym,
+ pa_text): Likewise.
+ (md_apply_fix): Change type of new_val to offsetT. Delete w1, w2,
+ w, resulti. Add insn, val. Move bfd_get_32 and bfd_put_32
+ outside of switch. Correct mask and shifting errors in case 10
+ and case -11. In case 21, compare against signed range to suit
+ hppa_field_adjust changes. In case 12, use re_assemble_12. In
+ case 17 and case 22, use offsetT variable to properly check range.
+ Use re_assemble_* here too.
+ (evaluate_absolute): Change type of value to offsetT. Call
+ hppa_field_adjust to do the work for us.
+ (pa_parse_cmpb_64_cmpltr): Delete save_s.
+ (pa_parse_cmpib_64_cmpltr): Ditto.
+ (pa_build_unwind_subspace): Delete unused var subseg. Change type
+ of i to unsigned int.
+ (pa_type_args): Conditionally declare symbol if OBJ_SOM.
+ (pa_end_of_source): Return type is void.
+
+Mon May 1 08:54:23 2000 Catherine Moore <clm@cygnus.com>
+
+ * macro.c (macro_expand_body): Don't prepend macro number with zeroes.
+
+Mon May 1 14:19:39 2000 Denis Chertykov <denisc@overta.ru>
+
+ * config/tc-avr.c: ATTRIBUTE_UNUSED added to the necessary places.
+ More comments added.
+ (md_begin): Removed "construct symbols for each register name".
+ Because register names conflicts with GCC generated function
+ names.
+ (avr_operand): Now constant numbers can be used as a register
+ identifiers (0 as r0, 31 as r31).
+ (md_assemble): use skip_space () before parsing instruction
+ operands.
-Thu May 7 12:50:33 1998 Frank Ch. Eigler <fche@cygnus.com>
+2000-05-01 Alan Modra <alan@linuxcare.com.au>
- * config/tc-mips.c (validate_mips_insn): Removed hack
- for previously inaccessible bitfields in some INSN_TRAP
- instructions.
+ * configure.in: Set bfd_gas=yes on i386-*-pe and i386-*-nt* to
+ ensure all pe targets use bfd. Remove unnecessary bfd_gas=yes on
+ arm-*-netbsd* and arm-*-wince as this is set for all arm*.
+ * configure: Regenerate.
-Thu May 7 11:13:00 1998 Frank Ch. Eigler <fche@cygnus.com>
+2000-04-29 Andreas Jaeger <aj@suse.de>
- * config/tc-d30v.c (do_assemble): Abort with error message
- if opcode operands do not match.
-
-Thu May 7 09:36:06 1998 Frank Ch. Eigler <fche@cygnus.com>
+ * as.h: Correctly check GCC version.
- * config/tc-mips.c (macro_build, validate_mips_insn): Implement
- 'q' operand format for 20-bit "break"/"sdbbp" instructions.
- (mips_ip): Truncate overflowed "break" 'c' operand. Implement
- similar new 'q' operand.
+2000-04-26 David O'Brien <obrien@FreeBSD.org>
-Thu May 7 07:47:14 1998 Michael Meissner <meissner@cygnus.com>
+ * doc/as.1: Fix unbalanced brackets.
- * cgen.c (cgen_asm_finish_insn): Fix typo.
+ * config/tc-i386.c (comment_chars): Don't use '/' as comment start if
+ TE_FreeBSD.
+ (line_comment_chars): Set to '/' if TE_FreeBSD.
-Thu May 7 02:19:14 1998 Doug Evans <devans@charmed.cygnus.com>
+Tue Apr 25 11:02:02 2000 Jeffrey A Law (law@cygnus.com)
- * cgen.h: New file.
- * cgen.c: Include it.
- (MAX_FIXUPS): Renamed to CGEN_MAX_FIXUPS.
- (cgen_asm_finish_insn): Result is now void. New arg `result'.
- All callers updated.
- * config/tc-m32r.c: Include cgen.h.
- (m23r_insn): New members num_fixups,fixups.
+ * configure.in: Configury support for PA64 (currently disabled).
+ * configure: Rebuilt.
-Wed May 6 16:29:19 1998 Jeffrey A Law (law@cygnus.com)
+2000-04-25 Machida Hiroyuki <machida@sm.sony.co.jp>
- * config/tc-hppa.c (md_apply_fix): Slightly rework some code
- to avoid compiler warning.
+ * config/tc-mips.c (s_change_sec): Use record_alignment, not
+ bfd_set_section_alignment.
-Wed May 6 15:26:34 1998 Klaus Kaempf <kkaempf@progis.de>
+2000-04-25 Alan Modra <alan@linuxcare.com.au>
- * makefile.vms: Run dec c with /nodebug. Pass CC value when
- calling make.
+ * config/tc-i386.c (offset_in_range): Ensure shift counts are less
+ than 32.
- * makefile.vms (OBJS): Add ehopt.obj
+2000-04-24 Nick Clifton <nickc@cygnus.com>
-Wed May 6 15:11:12 1998 Klaus Kaempf <kkaempf@progis.de>
+ * doc/c-arm.texi (ARM Directives): Document behaviour of .align 0.
+ * doc/as.texinfo (Align): Include arm and strongarm in list of
+ targets that have the second form of the behaviour of the .align
+ directive.
- * doc/c-vax.texi: Correct and extend vax/vms documentation.
+2000-04-24 Mark Klein <mklein@dis.com>
-Wed May 6 11:51:51 1998 Richard Henderson <rth@cygnus.com>
+ * obj-som.c: Terminate obj_pseudo_table.
- * config/tc-d30v.c (do_assemble): Accept a new parameter requesting
- a short format insn.
- (md_assemble): Set it for explicitly packed insns.
-
-Tue May 5 13:23:13 1998 Nick Clifton <nickc@cygnus.com>
+Mon Apr 24 15:21:11 2000 Clinton Popetz <cpopetz@cygnus.com>
- * config/obj-coff.c (c_symbol_merge): Do not take address of
- native fields when performing the memcpy.
+ * as.c (parse_args): Allow md_parse_option to override -a listing
+ option.
+ * config/obj-coff.c (add_lineno): Change type of offset parameter
+ from "int" to "bfd_vma."
+ * config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine."
+ (ppc_mach, ppc_subseg_align, ppc_target_format): New.
+ (ppc_change_csect): Align correctly for XCOFF64.
+ (ppc_machine): New function, which discards "ppc_machine" line.
+ (ppc_tc): Cons for 8 when code is 64 bit.
+ (md_apply_fix3): Don't check operand->insert. Handle 64 bit
+ relocations.
+ (md_parse_option): Handle -a64 and -a32.
+ (ppc_xcoff64): New.
+ * config/tc-ppc.h (TARGET_MACH): Define.
+ (TARGET_FORMAT): Move to function.
+ (SUB_SEGMENT_ALIGN): Use ppc_subseg_align.
+
+Sun Apr 23 16:45:45 2000 Denis Chertykov <denisc@overta.ru>
+
+ * config/tc-avr.c: New AVR_ISA_ defined.
+ (md_assemble): Handle opcodes with optional operands (lpm,elpm).
+ (avr_operand): Handle 'a', 'v' and 'z' constraint letters needed
+ for `fmul', `movw' and `lpm R,Z' instructions.
+ (avr_operands): Warn if current opcode is a two-word instruction
+ and previous opcode was cpse/sbic/sbis/sbrc/sbrs.
+ (avr_opcodes): New commands added.
+ (REGISTER_P): Check 'a' and 'v' constraint letters.
+ (mcu_types): New MCU added.
+
+2000-04-22 Timothy Wall <twall@cygnus.com>
+
+ * config/tc-ia64.c (pseudo_func[]): Add new "nat" entry equivalent
+ to "natval".
+ (operand_match): Conditionally insert default bit values for IMMU9.
-Tue May 5 13:10:41 1998 Gavin Koch <gavin@cygnus.com>
+2000-04-14 Matthew Green <mrg@cygnus.com>
- * config/tc-mips.c (macro,macro2): Implement
- M_DMULO_I, M_MULO_I, M_DMULOU_I, and M_MULOU_I.
+ * configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support.
+ * configure: Rebuilt.
-Mon May 4 17:49:14 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+Fri Apr 21 14:29:43 2000 Jeffrey A Law (law@cygnus.com)
+ Jason Eckhardt <jle@cygnus.com>
- * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Changed to keep
- relocations against globally visible symbols.
- * config/tc-m68k.c (relaxable_symbol): New macro.
- (m68k_ip, md_estimate_size_before_relax): Use it.
- (tc_m68k_fix_adjustable): Also handle weak symbols.
+ * config/tc-hppa.c (md_apply_fix): Handle new PA2.0 formats.
-Mon May 4 16:12:23 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.c (CHECK_ALIGN): New macro.
+ Added handling of new operand types l,y,&,fe,fE,fx.
- * config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Keep relocs for all
- references to externally visible symbols.
- * config/tc-i386.c (md_apply_fix3): When OBJ_ELF, don't add the
- values in twice for a PC relative reloc if the symbol is
- externally defined.
+Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+ Timothy Wall <twall@cygnus.com>
+ Andrew MacLeod <amacleod@cygnus.com>
+ Jim Wilson <wilson@cygnus.com>
- * config/tc-sparc.h (tc_fix_adjustable) [OBJ_AOUT]: When PIC,
- don't adjust a PC relative reloc against an externally visible
- symbol.
- * config/tc-sparc.c (md_apply_fix3): When generating a.out PIC,
- for a PC relative fixup against an externally visible defined
- symbol, arrange to store object file and addend values as though
- the symbol were not defined.
- (tc_gen_reloc): Likewise.
+ * Makefile.am (CPU_TYPES): Add ia64.
+ (TARGET_CPU_CFILES): Add config/tc-ia64.c.
+ (TARGET_CPU_HFILES): Add config/tc-ia64.h.
+ * Makefile.in: Rebuild.
+ * app.c (do_scrub_chars): Handle DOUBLESLASH_COMMENTS.
+ * configure: Rebuild.
+ * configure.in: Recognize ia64 as cpu type. Set bfd_gas.
+ (ia64-*-elf*, ia64-*-linux-gnu*): New targets.
+ * expr.c (expr): Handle md_optimize_expr.
+ * read.c (LEX_HASH): Add comment.
+ * config/tc-ia64.c, config/tc-ia64.h: New files.
-Thu Apr 30 13:09:39 1998 Fred Fish <fnf@ninemoons.com>
+2000-04-21 Richard Henderson <rth@cygnus.com>
- * read.c (sizeof_leb128): Referenced externally by write.c so
- don't inline.
+ * config/tc-d30v.c (write_2_short): Disregard opcode1->ecc when
+ bundling a non-delayed branch type instruction.
-Wed Apr 29 15:45:57 1998 Michael Meissner <meissner@cygnus.com>
+2000-04-20 Alexandre Oliva <aoliva@cygnus.com>
- * config/tc-m32r.c ({,expand_}debug_sym): New functions to record
- and expand a 'debug' symbol associated with the next instruction
- that does not cause a short instruction to be filled with a NOP.
- (md_pseudo_table): Add support for .debugsym.
- (assemble_parallel_insn): Add calls to expand_debug_sym as
- appropriate.
- (md_assemble): Ditto.
+ * config/tc-mn10300.c (HAVE_AM30): Define.
+ (md_assemble): Use it.
-Tue Apr 28 19:16:26 1998 Tom Tromey <tromey@cygnus.com>
+2000-04-19 Alan Modra <alan@linuxcare.com.au>
- * as.c (main): Conditionally call setlocale.
- * gasp.c (main): Likewise.
- * asintl.h: Include <locale.h> if HAVE_LOCALE_H.
- (LC_MESSAGES): Now can be defined even when ENABLE_NLS.
+ * config/obj-elf.c (obj_elf_change_section): Check for changed
+ section attributes.
-Tue Apr 28 18:33:23 1998 Frank Ch. Eigler <fche@cygnus.com>
+ * Makefile.am: (CPU_MULTI_VALID): Remove.
+ (MULTI_CPU_TYPES): Define.
+ (MULTI_CPU_OBJ_VALID): Define.
+ (DEPTC): Use the above.
+ (DEPOBJ): Same here.
+ (DEP2): And here.
+ Regenerate dependencies.
+ * Makefile.in: Regenerate.
- * config/tc-d30v.c (md_show_usage): Correct gettext typo.
-
-Tue Apr 28 12:16:30 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * config/tc-hppa.c: Change all calls to bzero to use memset.
- (pa_ip): Add cast to avoid warning.
- (tc_gen_reloc, md_apply_fix): Likewise.
- (pa_find_space_by_number): Likewise.
- (hppa_force_relocation): Likewise.
- (pa_block): Change i to unsigned int.
- * config/obj-som.h (obj_som_copyright): Declare.
+ * Makefile.am (YACC, LEX): Get them from configure.
-Tue Apr 28 11:35:56 1998 Frank Ch. Eigler <fche@cygnus.com>
+2000-04-18 H.J. Lu (hjl@gnu.org)
- * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno
- for line numbers for assembly source.
+ * config/tc-i386.c (offset_in_range): Use addressT instead of
+ bfd_vma for non-bfd assemblers.
-Mon Apr 27 15:58:46 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-17 Alan Modra <alan@linuxcare.com.au>
- * configure.in: Change version number to 2.9.4
- * configure: Rebuild.
+ * config/tc-i386.c (offset_in_range): Sign extend val so BFD64
+ doesn't give spurious errors.
-Mon Apr 27 12:07:33 1998 Doug Evans <devans@seba.cygnus.com>
+2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * cgen.c (cgen_asm_finish_insn): New arg relax_p. All callers updated.
+ * as.h (SEEK_SET): Define if undefined.
-Mon Apr 27 15:16:12 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-13 Alan Modra <alan@linuxcare.com.au>
- * ecoff.h: Change symbolS in function declaration to struct
- symbol.
+ * config/tc-arm.c (md_apply_fix3): Don't use UL suffix on
+ constants, and don't assume offsetT is 32 bits.
-Sun Apr 26 13:44:22 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-sh.c (parse_reg): Add casts to avoid warnings.
- (md_convert_frag): Fix i18n typo.
-
-Sat Apr 25 20:12:02 1998 Richard Henderson <rth@cygnus.com>
-
- * ecoff.c (ecoff_get_cur_proc_sym): New function.
- * ecoff.h: Protoype it.
- * config/tc-alpha.c [ELF] (s_alpha_prologue): New function.
- [EVAX] (s_alpha_prologue): Delete.
- (md_pseudo_table): Update.
-
-Sat Apr 25 14:00:52 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-i960.c (md_assemble): Change bp_error_msg from static
- array to local pointer.
- (get_args, parse_expr): Add casts to avoid warnings.
-
-Fri Apr 24 12:47:42 1998 Philippe De Muyter <phdm@macqel.be>
-
- * read.c (s_set): Cast xmalloc return value to fragS *.
- * config/tc-m68k.c (m68k_ip): Function made static to match
- previous forward declaration.
- (insert_reg, init_regtable, md_convert_frag_1): Likewise.
-
-Fri Apr 24 09:26:46 1998 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c: Add internationalisation macros to error
- strings.
-
- * config/tc-m32r.c (can_make_parallel): Add internationalisation
- macros to error strings.
-
-Thu Apr 23 19:23:23 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-ppc.c (ppc_fix_adjustable): Correct test of whether a
- reloc is in the TOC csect.
- (md_apply_fix3): Correct gettext typo.
-
-Thu Apr 23 14:58:31 1998 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (find_real_start): Ignore symbols starting with
- .L - they are local labels and the branches are not really
- function calls but rather far jumps.
-
-Wed Apr 22 15:57:21 1998 Tom Tromey <tromey@cygnus.com>
-
- * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
-
-Wed Apr 22 14:52:36 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-i386.c (md_assemble): Print operand number rather than
- using ordinal_names.
- (i386_operand): Likewise.
-
-Tue Apr 21 22:34:25 1998 Tom Tromey <tromey@scribbles.cygnus.com>
-
- * Makefile.am (INTLLIBS): Define to work around apparent automake
- bug.
- All Makefiles: Regenerated.
-
- * Many files: Added gettext invocations around user-visible
- strings.
- * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
- HAVE_LC_MESSAGES): Define.
- * dep-in.sed: Added asintl.h.
- * po/Make-in: New file.
- * gasp.c (main): Call setlocale, bindtextdomain, and textdomain.
- Include "asintl.h".
- * read.c (Z_): Renamed from `_'.
- * Makefile.am (SUBDIRS): Added po.
- (POTFILES): new macro.
- (po/POTFILES.in): New target.
- ($(OBJS)): Added asintl.h.
- (HFILES): Likewise.
- (INCLUDES): Added -DLOCALEDIR, -I$(top_srcdir)/../intl.
- (as_new_LDADD): Added $(INTLLIBS).
- (as_new_DEPENDENCIES): Added $(INTLDEPS).
- (gasp_new_LDADD): Added $(INTLLIBS).
- (gasp_new_DEPENDENCIES): New macro.
- * configure, aclocal.m4: Rebuilt.
- * configure.in: Call CY_GNU_GETTEXT. Generate po/Makefile.in and
- po/Makefile.
- (ALL_LINGUAS): Define.
- * macro.c: Include "asintl.h".
- * as.c (main): Call setlocale, bindtextdomain, and textdomain.
- * as.h: Include "asintl.h".
- * config/tc-i386.c (ordinal_names): Removed.
- (md_assemble): Changed error text to avoid ordinal_names.
- (i386_operand): Likewise.
- (reloc): Added as_bad to avoid i18n problems.
- (tc_gen_reloc): Likewise.
- * config/tc-arm.c (bad_args): Now a #define.
- (bad_pc): Likewise.
- * config/obj-vms.c (VMS_stab_parse): Changed type of
- `long_const_msg'.
- (global_symbol_directory): Unified strings to avoid i18n
- problems.
- * config/tc-m68k.c (get_reloc_code): Added some as_bad calls to
- avoid i18n problems.
- * config/tc-ns32k.c (reloc): Added as_bad to avoid i18n problems.
- * config/tc-ppc.c (md_apply_fix3): Added as_bad_where to avoid
- i18n problems.
- * config/tc-sh.c (md_convert_frag): Added as_bad to avoid i18n
- problems.
- * config/tc-v850.c (md_assemble): Changed C++ comment into C
- comment.
- * config/tc-vax.c (md_assemble): Added as_warn to avoid i18n
- problems.
- * as.c (print_version_id): Added an fprintf to avoid i18n
- problems.
- * cond.c (cond_finish_check): Added as_bad call to avoid i18n
- problems.
- * expr.c (expr): Added as_warn call to avoid i18n problems.
- * messages.c (as_assert): Changed code to avoid i18n problems.
- (as_abort): Likewise.
- * read.c (pseudo_set): Added as_bad call to avoid i18n problems.
- (s_space): Likewise.
- * po/Make-in, po/POTFILES.in, po/gas.pot: New files.
-
-Tue Apr 21 17:01:22 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (check_prefix): New static function, split out
- from md_assemble.
- (struct _i386_insn): Add wait_prefix field.
- (md_assemble): Remove wait_prefix local variable. Use
- check_prefix when adding a prefix.
-
- * config/tc-i386.c (current_templates): New static variable.
- (md_assemble): Remove current_templates local variable.
- (md_assemble, i386_operand): Improve error and warning messages in
- many places. Add RESTORE_END_STRING in many places before error
- return. Clarify some comments.
-
- * config/tc-i386.c (struct _i386_insn): Change seg field to a two
- element array.
- (md_assemble): Parse string instruction operands, looking for
- segment override prefixes. Check for invalid segment prefixes on
- string instruction.
- (i386_operand): i.seg[] and max mem_operand changes for string
- insns.
- * config/tc-i386.h (EsSeg): Define.
-
- * config/tc-i386.h (regKludge): Define.
- (iclrKludge, imulKludge): Don't define.
- * config/tc-i386.c (md_assemble): Merge imulKludge and iclrKludge
- code. Move ReverseRegRegmem fudges into Modrm case. Reorder
- opcode_modifier checks to look for more common cases first. Add
- default_seg for IsString case.
-
-Tue Apr 21 16:18:12 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Call AM_PROG_LEX rather than AC_PROG_LEX and
- AC_DECL_YYTEXT.
- * configure: Rebuild with new automake and libtool.
- * aclocal.m4, Makefile.in: Likewise.
-
- * doc/Makefile.am (as.dvi): New target.
- * doc/Makefile.in: Rebuild.
-
-Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com>
-
- * configure.in: Added sparc86x support.
-
- * configure: Rebuild.
-
- * config/tc-sparc.c (lookup_arch): Added arch_type to struct
- sparc_arch.
- (md_parse_option): Warn if -EL is not supported for this architecture.
+2000-04-12 Andrew Cagney <cagney@b1.cygnus.com>
- * config/tc-sparc.h (SPARC_BIENDIAN) Always define.
-
-Sat Apr 18 01:19:01 1998 Jeffrey A Law (law@cygnus.com)
+ * config/tc-d10v.h: Include "write.h" to get definition of fixS.
+ (md_pcrel_from_section): Add prototype.
+ (d10v_fix_adjustable): Add prototype.
+ (d10v_force_relocation): Replace 'struct fix' with 'fixS'.
- * config/tc-mips.c (mips_ip): Note when we use get match on
- the full instruction name.
+ * config/tc-d10v.c (md_apply_fix3): Add paren around &&.
-Wed Apr 15 15:17:27 1998 Richard Henderson <rth@cygnus.com>
+2000-04-12 Nick Clifton <nickc@cygnus.com>
- * symbols.c (resolve_symbol_value) [O_symbol]: Also store the symbol
- back into the expression to handle add/sub simplification correctly.
+ * config/tc-d10v.c (find_opcode): Correctly calculate position of
+ symbol in frag chain.
-Wed Apr 15 07:06:04 1998 Catherine Moore <clm@cygnus.com>
+2000-04-10 Alan Modra <alan@linuxcare.com.au>
- * config/tc-mips.c (hilo_interlocks): Remove 4300.
+ * config/tc-i386.c (fits_in_signed_byte): Change arg to offsetT.
+ (fits_in_unsigned_byte, fits_in_unsigned_word): Ditto.
+ (fits_in_signed_word, smallest_imm_type): Ditto.
+ (md_assemble): Use an offsetT var to hold offsetT values, not a
+ long.
+ (offset_in_range): New.
+ (md_assemble): Use it.
+ (md_convert_frag): Change type of target_address, opcode_address,
+ and displacement_from_opcode_start to offsetT.
+ (md_create_short_jump): Change type of offset to offsetT.
+ (md_create_long_jump): Ditto.
+ (md_apply_fix3): Use -4, not 0xfffffffc for BFD_RELOC_386_PLT32.
+ (md_chars_to_number): Remove.
+ (output_invalid): Remove duplicate prototype.
-Mon Apr 13 16:51:04 1998 Nick Clifton <nickc@cygnus.com>
+2000-04-09 Nick Clifton <nickc@cygnus.com>
- * config/tc-arm.c (do_msr): Support undocumented 'msr cpsr_flg,
- #<n>' instruction.
+ * Makefile.am (CPU_TYPES): Add 'avr'.
+ (TARGET_CPU_CFILES): Add 'tc-avr.c'.
+ (TARGET_CPU_HFILES): Add 'tc-avr.h'.
-Thu Apr 9 10:29:42 1998 Doug Evans <devans@canuck.cygnus.com>
+ * Makefile.in: Regenerate.
- * symbols.c (max_indent_level): New global.
- (print_symbol_value_1): Use it.
- * expr.h (expr_build_dot): Declare.
- * expr.c (expr_build_dot): New function.
+ * doc/as.texinfo: Add M32R documentation.
-Wed Apr 8 16:16:11 1998 Doug Evans <devans@canuck.cygnus.com>
+Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
- * symbols.c (print_binary): New function.
- (print_expr_1): Call it.
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure: Re-generate.
-Mon Apr 6 12:06:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-04-07 Nick Clifton <nickc@cygnus.com>
- * config/tc-m68k.c (m68k_ip, case "#B"): Install the offset of the
- operand in the opcode.
+ * config/tc-arm.c (md_apply_fix3): Treat BFD_RELOC_ARM_PCREL_BLX
+ in the same way as BFD_RELOC_ARM_PCREL_BRANCH, and
+ BFD_RELOC_THUMB_PCREL_BLX lie BFD_RELOC_THUMB_PCREL_BRANCH.
+ (tc_gen_reloc): Accept BFD_RELOC_{ARM|THUMB}_PCREL_BLX.
+ (arm_force_relocation): Force relocations for
+ BFD_RELOC_{ARM|THUMB}_PCREL_BLX as well.
-Fri Apr 3 11:58:19 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+Wed Apr 5 22:26:32 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
- * config/tc-i386.h: Reorder operand flags and opcode modifier
- flags for clarity. Remove unused definitions: Unknown,
- ImmUnknown, DispUnknown, NoModrm.
- * config/tc-i386.c (type_names): Add missing Debug type.
- (md_assemble): Better duplicate prefix checking. Quicker string
- instruction check via new opcode_modifier flag.
+ * config/tc-sh.c (get_operands): There's no third operand if the
+ first operand is an immediate.
-Fri Apr 3 11:44:34 1998 Ian Lance Taylor <ian@cygnus.com>
+Wed Apr 5 22:07:19 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
- * doc/as.texinfo (Invoking): Clarify -Wa example.
+ * config/tc-sh.c (immediate): Delete.
+ (sh_operand_info): Add immediate member.
+ (parse_reg): Use A_PC for pc.
+ (parse_exp): Add second argument 'op'. All callers changed.
+ (parse_at): Expect pc to be coded as A_PC.
+ Use immediate field in *op.
+ (insert): Add fourth argument 'op'. All callers changed.
+ (build_relax): Add second argument 'op'. All callers changed.
+ (insert_loop_bounds): New function.
+ (build_Mytes): Remove DISP_4.
+ Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}. Add REPEAT.
+ (assemble_ppi): Use immediate field in *operand.
+ (sh_force_relocation): Handle BFD_RELOC_SH_LOOP_{START,END}.
+ (md_apply_fix): Likewise.
+ (tc_gen_reloc): Likewise. Check for a pcrel BFD_RELOC_SH_LABEL.
-Fri Apr 3 09:12:23 1998 Gavin Koch <gavin@cetus.cygnus.com>
+Wed Apr 5 06:35:45 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
- * config/tc-mips.c (mips_pseudo_table): Add weakext entry.
- (s_mips_weakext): Define.
- * ecoff.c (ecoff_directive_weakext): Don't define if defined(TC_MIPS).
- * config/obj-ecoff.c (obj_pseudo_table): Don't add weakext if
- defined(TC_MIPS).
-
-Thu Apr 2 22:42:02 1998 Jeffrey A Law (law@cygnus.com)
+ * config/tc-sparc.c (sparc_ip): Avoid string pasting.
- * config/tc-mn10200.c (tc_gen_reloc): The difference of two symbols
- is an error if the value can not be computed at assembly time.
- * config/tc-mn10300.c (tc_gen-reloc): Likewise.
+Tue Apr 4 19:27:50 2000 Hans-Peter Nilsson <hp@axis.com>
-Thu Apr 2 16:36:47 1998 Ian Lance Taylor <ian@cygnus.com>
+ * internals.texi (CPU backend): Document
+ TC_CHECK_ADJUSTED_BROKEN_DOT_WORD.
- * gasp.c (main): Set next field of new include_path structure to
- NULL. From Avery Pennarun <averyp@gdc.ca>.
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
- * read.c (s_mri_sect): Call as_bad rather than abort for an
- unsupported MRI target.
+ * po/gas.pot: Regenerate.
-Wed Apr 1 11:08:27 1998 Nick Clifton <nickc@cygnus.com>
+ * as.c (show_usage): Restore translated part of bug string.
+ * gasp.c (show_usage): Likewise.
- * config/tc-arm.c (arm_validate_fix): New function. Determine if
- the destination of a branch instruction should be altered.
- (find_real_start): New function: Locate the real, Thumb coded
- start of a Thumb function.
- (do_t_branch23): Alter the destination of branches to Thumb
- functions.
+ * Makefile.am (MKDEP): Use gcc -MM rather than ../mkdep.
+ (DEP): Quote when passing vars to sub-make. Use "mv -f" rather
+ than move-if-change.
+ (DEP1): Modify for "gcc -MM".
+ (DEPTC): Likewise.
+ (DEPOBJ): Likewise.
+ (DEP2): Likewise.
+ (CLEANFILES): Add DEPTCA, DEPOBJA, DEP2a, DEPA.
+ Update dependencies.
+ * Makefile.in: Regenerate.
- * config/tc-arm.h: Define TC_VALIDATE_FIX.
+2000-04-03 Alexandre Oliva <aoliva@cygnus.com>
-Tue Mar 31 13:27:33 1998 Dean M. Deaver <deaver@amt.tay1.dec.com>
+ * config/tc-mn10300.c (md_pseudo_table): Use constant names.
+ (md_begin): Likewise.
+ (HAVE_AM33): New macro.
+ (md_assemble): Use it. Match r_regs and xr_regs only if
+ HAVE_AM33.
- * config/tc-arm.c (decode_shift): Handle addressing mode 2 w/rrx
- also.
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
-Wed Apr 1 13:13:20 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * as.h: #include "bin-bugs.h"
+ * as.c (show_usage): Use REPORT_BUGS_TO.
+ * gasp.c: #include "bin-bugs.h"
+ (show_usage): Use REPORT_BUGS_TO.
- * doc/as.texinfo: Use @itemx for a secondary item in a table.
- * doc/c-hppa.texi: Likewise.
+ * config/tc-sparc.c (md_show_usage): Add a trailing newline.
-Tue Mar 31 17:52:40 1998 Ian Lance Taylor <ian@cygnus.com>
+Mon Apr 3 13:56:03 2000 Hans-Peter Nilsson <hp@axis.com>
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
+ * write.c (write_object_file) [! WORKING_DOT_WORD]: If defined,
+ call TC_CHECK_ADJUSTED_BROKEN_DOT_WORD for each word after
+ adjustments.
- * Makefile.am (DEP_INCLUDES): New variable.
- (.dep1): Change to work when srcdir is not an absolute path.
- (.tcdep, .objdep, .dep2, dep.sed): Likewise.
- * Makefile.in: Rebuild.
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
-Mon Mar 30 12:46:48 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.c (i386_immediate): Don't assume a constant
+ immediate is necessarily 16 bits when in 16 bit code mode.
+ (md_assemble): Instead set guess_suffix here after we have checked
+ registers.
- * config/tc-i386.h, config/tc-i386.c: Revert March 24
- LinearAddress patch.
+2000-04-02 Richard Henderson <rth@cygnus.com>
- * configure.in: Set version to 2.9.1.
- * configure: Rebuild.
+ * config/tc-d30v.c (check_range): Allow signed or unsigned 32-bit
+ quantities. Correct right shift sign extension.
+ (build_insn): Make `number' unsigned long. Mask top 6 bits of
+ 32-bit value when shifting into place.
- * Branched binutils 2.9.
-
-Mon Mar 30 11:22:08 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.h (FWait): Define.
- * config/tc-i386.c (md_assemble): Emit fwait prefix before any
- other prefixes. Check FWait flag in opcode table to see which
- instructions require an fwait prefix.
-
-Mon Mar 30 10:12:00 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * stabs.c (get_stab_string_offset): Always create a stab string
- section.
-
-Sat Mar 28 22:28:02 1998 Ian Lance Taylor <ian@cygnus.com>
-
- Fix some gcc -Wall warnings:
- * atof-generic.c (atof_generic): Add casts to avoid warnings.
- * ehopt.c (eh_frame_code_alignment): Likewise.
- * expr.c (integer_constant, operand): Likewise.
- * frags.c (frag_align): Likewise.
- * gasp.c (level_0, change_base, doinstr): Likewise.
- * hash.c (hash_ask): Likewise.
- * listing.c (listing_page, calc_hex, print_lines): Likewise.
- (debugging_pseudo): Likewise.
- * macro.c (define_macro, check_macro): Likewise.
- * read.c (read_a_source_file, s_align, s_float_space): Likewise.
- (ignore_rest_of_line, float_cons): Likewise.
- * symbols.c (decode_local_label_name): Likewise.
- * write.c (record_alignment, cvs_frag_to_fill): Likewise.
- (fixup_segment, number_to_chars_bigendian): Likewise.
- (number_to_chars_littleendian): Likewise.
- * config/atof-ieee.c (gen_to_words): Likewise.
- * config/tc-sparc.c (md_begin, md_assemble): Likewise.
- (sparc_ip, parse_keyword_arg, s_common): Likewise.
- * read.c (output_big_sleb128): Initialize locals to avoid
- warnings.
- (output_big_uleb128, equals): Likewise.
- * atof-generic.c (atof_generic): Change number_of_digits_* locals
- to unsigned int. Change zeros to unsigned int.
- * cond.c (s_if): Add return to default case.
- * frags.c (frag_now_fix): Change return type to addressT.
- * frags.h (frag_now_fix): Update declaration.
- * listing.c (file_info_struct): Change linenum to unsigned int.
- (struct list_info_struct): Change hll_line to unsigned int.
- (print_source): Update format string.
- * read.c (emit_expr): Change scan to unsigned int, and don't
- bother to initialize it.
- * symbols.c (dollar_label_count): Change to unsigned long.
- * write.c (adjust_reloc_syms): Remove unused label reduce_fixup.
- * config/tc-sparc.c (sparc_memory_model): Only define if OBJ_ELF.
- * config/tc-sparc.c (tc_gen_reloc): Add return to default case.
-
-Fri Mar 27 12:46:47 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-m68k.c (m68k_ip): Check legal addressing modes for
- mcf5200 just as we do for m68000.
- (m68k_init_after_args): Likewise.
- (md_estimate_size_before_relax): Likewise.
+2000-04-01 Ian Lance Taylor <ian@zembu.com>
-Fri Mar 27 10:30:01 1998 Catherine Moore <clm@cygnus.com>
+ * app.c: Add ATTRIBUTE_UNUSED as needed.
+ * config/tc-ppc.c: Likewise.
+ (ppc_size): Make unsigned long.
+ (ppc_insert_operand): Add casts to avoid warnings.
- * config/tc-v850.c (md_assemble): Store relocation addend in
- fixup instead of instruction.
+2000-03-31 Nick Clifton <nickc@cygnus.com>
-Thu Mar 26 23:07:18 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-d10v.h (md_flush_pending_output): Define.
- * config/tc-i386.c (md_assemble): Swap template arguments to
- CONSISTENT_REGISTER_MATCH macro in reverse direction test.
- This macro is currently symmetric, so passing them the wrong
- way didn't cause any problem, but may if the macro is changed
- in the future.
- After copying template to i.tm, use i.tm. rather than t-> to
- access fields, and make t a const*
- Move i.tm.operand_types[] swap to immediately after the copy.
+2000-03-29 Nick Clifton <nickc@cygnus.com>
-Wed Mar 25 13:44:18 1998 Doug Evans <devans@canuck.cygnus.com>
+ * config/tc-sh.h (SEG_NAME): New macro: return the name of a
+ segment. Works for both BFD_ASSEMBLER and others.
+ (SUB_SEGMENT_ALIGN): Use SEG_NAME.
- * expr.h (expr_build_uconstant): Add prototype.
- (expr_build_unary,expr_build_binary): Add prototypes.
- * expr.c (expr_build_uconstant): New function.
- (expr_build_unary,expr_build_binary): New functions.
+2000-03-29 Nick Clifton <nickc@cygnus.com
-Wed Mar 25 13:10:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
+ * config/tc-arm.c (tinsns): Add "bal" instruction pattern.
- * gasp.c (IS*): Cast argument to unsigned char, not unsigned int.
- * macro.c (macro_expand_body): Increase buffer size.
- * messages.c (as_warn): Likewise.
- (as_warn_where, as_bad, as_bad_where): Likewise.
+2000-03-28 Alan Modra <alan@linuxcare.com.au>
-Wed Mar 25 12:59:07 1998 Ian Lance Taylor <ian@cygnus.com>
+ * listing.c (LISTING_LHS_WIDTH): Default depends on
+ LISTING_WORD_SIZE.
+ (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH.
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * Makefile.am (DISTSTUFF): New variable.
- (diststuff): New target.
- * Makefile.in: Rebuild.
+2000-03-27 Ian Lance Taylor <ian@zembu.com>
-Tue Mar 24 16:51:29 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-sh.c (md_show_usage): Use backslash before newline in
+ string literal.
- * config/tc-m32r.h (md_cleanup, md_elf_section_change_hook): Call
- m32r_elf_section_change_hook.
+2000-03-27 Alan Modra <alan@linuxcare.com.au>
- * config/tc-m32r.c (m32r_elf_section_change_hook): New function to
- emit a nop if a section ends with a 16 bit instruction.
+ * config/tc-avr.h (TC_HANDLES_FX_DONE): Define.
-Tue Mar 24 19:48:09 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-avr.c (mcu_types): Add missing initialiser.
+ (md_pcrel_from_section): Add prototype.
+ (avr_operand): Remove redundant test of unsigned < 0.
+ (avr_cons_fix_new): Ensure exp_mod_pm zero on function exit.
- * config/obj-coff.c (obj_coff_bss): Compile unconditionally. Call
- s_lcomm rather than obj_coff_lcomm.
- (obj_pseudo_table): Compile .bss pseudo-op unconditionally.
+2000-03-27 Denis Chertykov <denisc@overta.ru>
-Tue Mar 24 18:30:58 1998 H.J. Lu <hjl@gnu.org>
+ * config/tc-avr.c: New file for AVR support.
+ * config/tc-avr.h: Likewise.
+ * configure.in: Add AVR support.
+ * configure: Regenerate.
- * config/tc-i386.h (LinearAddress): Define.
- * config/tc-i386.c (md_assemble): If LinearAddress is set for the
- instruction, don't use a default segment.
+2000-03-26 Timothy Wall <twall@cygnus.com>
-Mon Mar 23 18:53:40 1998 Joel Sherrill <joel@OARcorp.com>
+ * gasp.c (macro_op): Add new argument to check_macro call.
+ Macro structure definitions moved to macro.h
+ * sb.h: Add argument to prototype for input_scrub_include_sb.
+ * input-scrub.c (input_scrub_include_sb): Allow disabling of sb
+ nesting checks with an additional flag.
+ (struct input_save): Add flag to indicate whether current sb
+ should be checked for proper macro/conditional nesting.
+ (input_scrub_push/pop): Save/restore nest check flag.
+ (input_scrub_next_buffer): Ditto. Also call end of macro hook if
+ defined.
+ * macro.c (check_macro): Allow caller to retrieve parsed macro
+ information if a pointer is provided. This information may be
+ used by the new macro hooks.
+ * macro.h: Update prototype for check_macro. Macro struct
+ definitions moved here from macro.c/gasp.c.
+ * read.c (read_a_source_file): Add parameter to check_macro call,
+ and pass macro info to the macro hook, if defined.
+ (input_scrub_insert_line): New. Allow insertion of a line of
+ characters into the input stream.
+ (input_scrub_insert_file): New. Allow insertion of an arbitrary
+ file into the input stream.
+ (s_include): Use input_scrub_insert_file.
+ * internals.texi: Document new macro hooks.
+ * as.h: New prototypes added.
- * configure.in: (sh*-*-rtems*): Switched from ELF to COFF.
- * configure: Rebuild.
+2000-03-26 Alan Modra <alan@linuxcare.com.au>
-Fri Mar 20 19:15:44 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.c: Don't start any as_bad or as_warn message with
+ an initial capital letter.
+ (i386_index_check): Reindent.
- * aclocal.m4, configure: Rebuild with libtool 1.2.
+2000-03-19 Nick Clifton <nickc@cygnus.com>
-Thu Mar 19 16:03:12 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-arm.c (md_apply_fix3): Fix bug detecting overflow of pc
+ relative branches.
- * config/tc-arm.c (md_apply_fix3): fix code to test the range of
- PC relative branches. Patch courtesy of Jonathan Walton.
+2000-03-17 Thomas de Lellis <tdel@windriver.com>
-
-Wed Mar 18 09:29:51 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-arm.c (do_t_adr): Flag "adr Rd,label"
+ instruction operand bad if Rd > 7 when generating
+ thumb instructions. Prevents for example,
+ "adr r12,label" from silently failing and generating
+ the wrong instruction.
- * configure.in (emulations): Add thumb-pe target.
+2000-03-17 Nick Clifton <nickc@cygnus.com>
- * configure (emulations): Add thumb-pe target.
+ * config/tc-arm.c (md_apply_fix3): Handle same-section relocations
+ that have a destingation >= 0x400000.
+ Fix compile time warning messages.
-1998-03-17 Ken Raeburn <raeburn@cygnus.com>
+Thu Mar 16 23:45:16 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
- * itbl-lex.l (yywrap): Don't define if already defined as a
- macro.
+ * config/tc-sh.c (md_begin): When encountering insn that are
+ not supported by the current arch, only change the name if
+ its contents are the same as prev_name.
+ (get_specific): If the the architecture doesn't match, fail.
-Fri Mar 13 16:31:38 1998 Tom Tromey <tromey@cygnus.com>
+Thu Mar 16 21:18:13 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
- * depend.c (quote_string_for_make): New function.
- (wrap_output): Use it.
+ * config/tc-sh.c (IDENT_CHAR): Define.
+ (parse_reg): Use it instead of isalnum. Put r[0..7]_bank operand
+ matching back where it came from.
-Thu Mar 12 18:28:22 1998 Nick Clifton <nickc@cygnus.com>
+Thu Mar 16 20:58:10 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
- * config/obj-elf.c (obj_elf_section): Set bss flag in seg_info
- structure if type is SHT_NOBITS. [Bug fix courtesy of rth]
+ * config/tc-sh.c (md_show_usage): Add description of -dsp.
-Sat Feb 28 17:28:55 1998 Richard Henderson <rth@cygnus.com>
+2000-03-15 Jonathan Larmour <jlarmour@redhat.co.uk>
- * config/tc-alpha.c (md_shortopts, md_longopts, md_parse_option):
- Recognize -GN and -relax.
- (md_begin): Initialize gp size from -G switch.
- (alpha_force_relocation): Always force if -relax.
- (alpha_align): Take a new argument that will specify when to
- emit an R_ALPHA_ALIGN relocation (though we don't do that now).
- Change all callers. Emit nop alignment padding as nop+unop pair.
+ * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before
+ normal operands.
-Sat Feb 28 17:06:22 1998 Richard Henderson <rth@cygnus.com>
+2000-03-15 Kazu Hirata <kazu@hxi.com>
- * config/obj-elf.c [TC_ALPHA]: Include <elf/alpha.h>.
- * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): New.
+ * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate.
-Thu Feb 26 15:49:04 1998 Michael Meissner <meissner@cygnus.com>
+Mon Mar 13 22:02:59 2000 Hans-Peter Nilsson <hp@axis.se>
- * config/tc-d30v.c (write_2_short): Delayed jsr instructions don't
- require padding to the next long word boundary.
+ * expr.c (operand) [case 'f']: When testing if '0f' can start a
+ floating-point-number, make sure 'f' is in FLT_CHARS.
-Mon Feb 23 11:29:06 1998 Doug Evans <devans@seba.cygnus.com>
+Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson <hp@axis.se>
- * cgen.c: #include symcat.h.
- * config/tc-m32r.c: Likewise.
+ * read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition.
+ (s_lcomm_internal): Use it.
+ * doc/internals.texi (CPU backend): Document it.
+ * config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3
+ bytes.
-Mon Feb 23 10:27:40 1998 Jeffrey A Law (law@cygnus.com)
+2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
- * config/tc-mips.c (mips_ip, case 'P'): Make 'P' arguments be
- absolute expressions instead of '$' prefixed register names.
+ * config/tc-mips.c (mips_ip): Don't put stuff in .rodata
+ when embedded-pic.
-Sat Feb 21 22:36:52 1998 Richard Henderson <rth@cygnus.com>
+ * config/tc-mips.c (SWITCH_TABLE): The ELF embedded-pic
+ implementation doesn't have special handling for switch
+ statements.
+ (macro_build): Allow for code in sections other than .text.
+ (macro): Likewise.
+ (mips_ip): Likewise.
+ (md_apply_fix): Do pc-relative relocation madness for MIPS ELF.
+ Don't perform relocs if we will be outputting them.
+ (tc_gen_reloc): For ELF, just use fx_addnumber for pc-relative
+ relocations. Allow BFD_RELOC_16_PCREL_S2 relocs when
+ embedded-pic.
- * read.c (s_set): Record file and line info for symbols when -as.
- (pseudo_set): Don't overwrite that dummy fragment.
+2000-03-09 Catherine Moore <clm@cygnus.com>
-Fri Feb 20 15:03:13 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-m32r.c (m32r_fix_adjustable): Look up the
+ relocation type based on the entry in the fixup structure.
+ Put S_IS_EXTERN processing back in.
- * config/tc-ppc.c (md_pseudo_table): Add "section".
- (ppc_named_section): New static function.
+2000-03-08 H.J. Lu (hjl@gnu.org)
-Thu Feb 19 22:25:42 1998 Richard Henderson <rth@cygnus.com>
+ * Makefile.am (install-exec-tooldir): Depend on
+ install-exec-bindir for parallel make.
+ * Makefile.in: Regenerated.
- * tc-ppc.c (ppc_biei): Cache the last symbol we inserted
- so we don't have to scan the entire list.
+2000-03-06 Nick Clifton <nickc@cygnus.com>
-Tue Feb 17 17:02:15 1998 Fred Fish <fnf@cygnus.com>
+ * config/tc-m32r.c (struct md_longopts): Add -m32r command line
+ switch.
+ (md_parse_option): Parse -m32r command line switch - disable m32rx
+ compatability.
+ (md_show_usage): Document new option.
- * config/tc-d30v.c (parallel_ok): For the explicitly parallel
- case, allow the parallel instructions to modify the same flag
- bits.
+ * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi.
+ * doc/Makefile.in: Regenerate.
+ * doc/c-m32r.texi (M32R-Opts): Document new command line switch.
-Thu Feb 19 16:08:15 1998 Richard Henderson <rth@cygnus.com>
+2000-03-02 Michael Meissner <meissner@redhat.com>
- * listing.c (list_symbol_table): Categorize symbols by
- undefined_section rather than sy_frag->line == NULL.
+ * config/tc-d30v.c (check_range): Remove code that incorrectly
+ sign extended values where bits < 32.
-Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com>
+2000-03-02 H.J. Lu (hjl@gnu.org)
- * Makefile.am (install-exec-local): Install properly when ln
- fails or tooldir == prefix.
+ * configure.in: Support --enable-targets=all on ia32.
+ * configure: Regenerated.
-Tue Feb 17 18:58:51 1998 Doug Evans <devans@seba.cygnus.com>
+2000-03-01 Nick Clifton <nickc@cygnus.com>
- * cgen.c (cgen_md_apply_fix3): Delete call to validate_operand.
- Test result of insert_operand for error.
+ * gasp.c (do_align): Remove bogus check of alignment value.
-Fri Feb 13 16:41:42 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-27 Thomas de Lellis <tdel@windriver.com>
- * Makefile.am (AUTOMAKE_OPTIONS): Add cygnus.
- * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
- * doc/Makefile.am (AUTOMAKE_OPTIONS): Define.
- * doc/Makefile.in: Rebuild.
+ * config/obj-elf.c (elf_frob_symbol): Remove code which when
+ TC_PPC was defined forced the type of a symbol with no other type
+ to be BSF_OBJECT.
-Fri Feb 13 00:47:44 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-27 Hans-Peter Nilsson <hp@axis.com>
- * config/tc-mips.c (macro_build): Handle operand type 'C'.
- (macro): Fix handling of M_COP[0-3].
+ * doc/internals.texi (CPU backend): Mention that
+ line_separator_chars do not break up comments. Fix typos for
+ LEX_AT and LEX_NAME descriptions. Document operands for
+ TC_EQUAL_IN_INSN, md_operand and md_section_align. Correct
+ description of md_create_short_jump usage. Document argument for
+ md_undefined_symbol.
-Thu Feb 12 14:06:59 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-27 Jakub Jelinek <jakub@redhat.com>
- Based on patches from Ross Harvey <ross@teraflop.com>:
- * macro.c (ISSEP): Only treat '<' and '>' as separator characters
- if macro_alternate or macro_mri.
- (getstring): Remove support for byte constants between < and >.
- (get_any_string): '<' only starts a string if macro_alternate or
- macro_mri.
- (macro_expand_body): Permit keyword parameters following
- positional parameters.
+ * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option.
+ (md_parse_option): Handle it.
+ (md_show_usage): Document it.
- NetBSD patches from Gordon W. Ross <gwr@mc.com>:
- * configure.in (alpha*-*-netbsd*): New target.
- * config/te-nbsd.h (LOCAL_LABELS_FB): Define.
- * configure: Rebuild.
+2000-02-27 Ian Lance Taylor <ian@zembu.com>
- * as.h (flag_warn_suppress_instructionswap): Move from here...
- * config/tc-d10v.c (flag_warn_suppress_instructionswap): ...to
- here, and make static.
+ * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an
+ opcode, for the instruction `pal19'. From Andrea Arcangeli
+ <andrea@suse.de>.
- * ehopt.c (eh_frame_code_alignment): Only use seg_info if
- BFD_ASSEMBLER or MANY_SEGMENTS.
+2000-02-26 Alan Modra <alan@spri.levels.unisa.edu.au>
- * as.c (show_usage): Update bug-gnu-utils address.
- * gasp.c (show_usage): Likewise.
- * doc/as.texinfo (Bug Reporting): Likewise.
+ * config/tc-i386.c (i386_immediate): Move constant operand sizing
+ from here..
+ (md_assemble): To here, before template operands are matched.
+ Also ensure a constant immediate is sign extended when we know the
+ size is at most 16 bits. This is to catch cases like "add
+ $0xffc0,%ax" where we don't know the size, and thus that the
+ immediate can be represented as Imm8S until after parsing the
+ register operand.
+ (i386_displacement): Similarly sign extend 16 bit constant
+ displacements.
+ (md_assemble): Relax 16-bit jump constant range check to suit sign
+ extended displacements.
-Wed Feb 11 23:26:28 1998 Jeffrey A Law (law@cygnus.com)
+2000-02-26 Andreas Jaeger <aj@suse.de>
- * config/tc-mips.c (load_address): Don't use mips III or mips IV
- insns regardless of the size of a pointer if we're in mips I or
- MIPS II mode.
- (macro, macro2, s_cprestore, s_cpadd): Likewise.
+ * doc/c-mips.texi (MIPS Opts): Fix typo in last patch.
-Thu Feb 12 03:41:00 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
-Fix rac to accept only a0:
- * tc-d10v.c (parallel_ok, find_opcode):
- Split OPERAND_ACC into OPERAND_ACC0 and OPERAND_ACC1.
- Introduce OPERAND_GPR.
+ * config/tc-i386.c (md_assemble): Don't swap intersegment jmp and
+ call operands when intel_syntax.
+ (intel_float_operand): Return 2 for "fi...".
+ (i386_operand_modifier): Change "DWORD PTR" test to suit above.
+ Return SHORT_MNEM_SUFFIX for "WORD PTR" when "fi...". Revert
+ earlier "SHORT" change.
+ (md_assemble): When determining suffix from Regs, exclude
+ InOutPortReg.
-Wed Feb 11 16:28:13 1998 Richard Henderson <rth@cygnus.com>
+2000-02-24 Nick Clifton <nickc@cygnus.com>
- * read.c (s_fill): Handle non-constant repeat counts by creating
- an rs_space fragment.
+ * configure: Add arm-wince, mips-pe and sh-pe targets.
+ * configure: Regenerate.
-Tue Feb 10 18:31:31 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-coff.h (COFF_WITH_PE): Define for mips-pe and
+ sh-pe targets.
+ (TARGET_FORMAT): Set to "pe-shl" for the sh-pe target and to
+ "pe-mips" for the mips-pe target.
- * config/tc-i386.c (i386_operand): Change error added Jan 2 1998
- from as_bad to as_warn.
+ * config/tc-arm.c (insns): Change displacement encoded in BL
+ and B instructions if the target port is arm-wince.
+ (do_ldst): Do not bias the relocation offset if the target
+ port is arm-wince.
+ (md_pcrel_from): Add in missing relocation offset bias if the
+ target os arm-wince.
-Tue Feb 10 18:04:00 1998 Jim Lemke <jlemke@cygnus.com>
+ * config/tc-mips.c (mips_target_format): Support COFF flavour.
+ (md_begin): Disable -G support for mips-pe target.
+ (md_apply_fix): Treat BFD_RELOC_RVA reloc as BFD_RELOC_32.
+ * config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Add support for
+ COFF flavour.
- * as.c: (perform_an_assembly_pass): Use [TEXT|DATA|BSS]_SECTION_NAME
- * as.h: Define default values of [TEXT|DATA|BSS]_SECTION_NAME
- * config/obj-elf.c (elf_begin): Use [TEXT|DATA|BSS]_SECTION_NAME
+ * config/tc-sh.c (md_begin): sh-pe target is little endian.
+ * config/tc-sh.h (SUB_SEGMENT_ALIGN): If using a BFD
+ assembler, just set the alignment to 4.
-Tue Feb 10 17:58:18 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/te-wince-pe.h: New file for WinCE targets. Define
+ TE_WINCE.
- * ehopt.c (eh_frame_code_alignment): If not BFD_ASSEMBLER, use
- seg_fix_rotP rather than fix_root from seg_info.
+2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
-Tue Feb 10 15:32:22 1998 Ian Carmichael <iancarm@cygnus.com>
+ * config/tc-i386.c (md_assemble): Swap segments too for intel mode
+ string instructions.
+ (i386_operand_modifier): Set i.suffix = WORD_MNEM_SUFFIX for SHORT.
+ (i386_intel_memory_operand): After finding a segment override,
+ check again for no `[' before looking for a displacement. Bomb if
+ more than one displacement rather than silently discarding the
+ second and subsequent ones. Free strings malloc'd by
+ build_displacement_string.
- * expr.c: Add support for 0x1_2_3_4 bignums.
+2000-02-24 Catherine Moore <clm@cygnus.com>
-Tue Feb 10 14:43:40 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-som.c (obj_pseudo_table): Add "weak".
+ (obj_som_weak): New routine.
- * configure.in: Change -linux* to -linux-gnu*.
- * configure: Rebuild.
+2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
- * app.c (do_scrub_begin): Treat \r as whitespace.
+ * config/tc-i386.c (union i386_op): New.
+ (struct _i386_insn): Delete disps[], imms[], regs[]. Add op[].
+ Throughout file replace occurences of disps[n], imms[n], regs[n]
+ with equivalent op[n].disps, op[n].imms, op[n].regs. Simplify
+ intel mode operand swapping. Add assert in regKludge and
+ fake_zero_displacement code. Test i.types[n] when outputting
+ displacements and immediates. Combine output of Disp16 with
+ Disp32.
+ (md_assemble): Don't try to fix broken UNIXWARE_COMPAT opcodes
+ when in intel mode by (not) reversing fsub and fdiv operands
+ before the template search. This fails for single operand
+ shorthand forms of the instruction, and if UNIXWARE_COMPAT is
+ undefined. Instead fix the base_opcode after we've found the
+ template. Move base_opcode xor with found_reverse_match from
+ opcode output code to before this fix so we test for the correct
+ opcodes.
+ (md_assemble): Don't use strcmp when deciding to ignore the suffix
+ check in intel mode. Instead compare opcodes.
-Mon Feb 9 14:16:11 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.h (TC_RELOC): Delete.
+ * config/tc-i386.c (TC_RELOC): Delete. Replace usage of TC_RELOC
+ with equivalent call to reloc.
- * Makefile.am: Update dependencies.
- * Makefile.in: Rebuild.
+ * as.h (flag_m68k_mri): Move declaration after target include, and
+ only declare when TC_M68K defined. Define as zero otherwise.
+ (LABELS_WITHOUT_COLONS, NO_PSEUDO_DOT): If undefined, define as 0.
+ * app.c (scrub_m68k_mri): Declare only when TC_M68K defined.
+ Define as zero otherwise.
+ (do_scrub_begin): Use m68k_mri parameter only when TC_M68K defined.
+ (struct app_save): Declare scrub_m68k_mri only when TC_M68K.
+ (app_push, app_pop): Save scrub_m68k_mri only when TC_M68K.
+ (do_scrub_chars): Use LABELS_WITHOUT_COLONS directly rather than
+ testing whether defined.
+ * cond.c (ignore_input): Use NO_PSEUDO_DOT directly.
+ * expr.c (operand): #ifdef unused case labels when TC_M68K undefined.
+ * read.c: Use LABELS_WITHOUT_COLONS and NO_PSEUDO_DOT directly
+ rather than testing whether defined.
+ (s_mri): Set flag_m68k_mri only when TC_M68K defined.
+ (parse_mri_cons): Declare and use only when TC_M68K.
+ * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define as 1.
+ * config/tc-m68k.h (NO_PSEUDO_DOT): Define as 1.
+ * config/tc-m88k.h (NO_PSEUDO_DOT): Define as 1.
-Sat Feb 7 15:33:51 1998 Ian Lance Taylor <ian@cygnus.com>
+ * NEWS: Mention IBM 370 support.
- * configure, aclocal.m4: Rebuild with new libtool.
+2000-02-23 Richard Henderson <rth@cygnus.com>
-Fri Feb 6 16:08:30 1998 Jeffrey A Law (law@cygnus.com)
+ * config/tc-i386.c (md_assemble): When swapping operands for
+ intel_syntax, assume everything that's not Imm or Disp is a
+ register.
- * config/tc-mips.c (md_begin): If mips_cpu is set, then use it as
- the argument to bfd_set_arch_mach.
- (load_address): Use bfd_arch_bits_per_address to determine the
- bit size of an address instead of looking at the isa level.
- (macro, macro2, s_cprestore, s_cpadd): Likewise.
+2000-02-23 Linas Vepstas <linas@linas.org>
-Fri Feb 6 14:44:34 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-i370.c, config/tc-i370.h: New files.
+ * Makefile.am: Add support for Linux/IBM 370.
+ * configure.in: Likewise.
+ * app.c (do_scrub_begin): Don't lex single quote when TC_I370.
+ * config/obj-elf.c: Include elf/i370.h
+ (obj_elf_section): Don't do anything special for flag_mri if TC_I370.
- * config/tc-v850.c (md_parse_option): Add -mv850any command line option.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
-Thu Feb 5 12:39:08 1998 Ian Lance Taylor <ian@cygnus.com>
+ * doc/c-i370.texi: New file.
+ * doc/all.texi: Include it.
+ * doc/as.texinfo: And here.
+ * doc/Makefile.am(CPU_DOCS): Add c-i370.texi.
+ * doc/Makefile.in: Regenerate.
- * ehopt.c: New file.
- * as.h (enum _relax_state): Add rs_cfa.
- (check_eh_frame, eh_frame_estimate_size_before_relax): Declare.
- (eh_frame_relax_frag, eh_frame_convert_frag): Declare.
- * read.c (emit_expr): Call check_eh_frame.
- * write.c (cvt_frag_to_fill): Handle rs_cfa.
- (relax_segment): Likewise.
- * Makefile.am: Rebuild dependencies.
- (GAS_CFILES): Add ehopt.c.
- (GENERIC_OBJS): Add ehopt.o.
- * doc/internals.texi (Frags): Document rs_cfa.
-
- * as.c (show_usage): Mention --traditional-format.
- (parse_args): Accept --traditional-format.
- * as.h (flag_traditional_format): Declare.
- * output-file.c (output_file_create): If flag_traditional_format,
- set BFD_TRADITIONAL_FORMAT on stdoutput.
- * doc/as.texinfo, doc/as.1: Document --traditional-format.
-
- * config/tc-mips.c (append_insn): Make sure that if we have a
- fixup for an unmatched %hi reloc, it does not associated with a
- variant frag.
-
- * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
- * doc/Makefile.in: Likewise.
+2000-02-19 Michael Meissner <meissner@redhat.com>
-Wed Feb 4 15:41:54 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-d30v.c (parallel_ok): Use FLAG_NOT_WITH_ADDSUBppp to
+ determine if an instruction can be used in parallel with an ADDppp
+ or SUBppp instruction.
- * config/tc-m32r.c (check_for_side_effects): New function.
- (can_make_parallel): Add checks for instruction side effects
- clashing with the other instruction.
- (assemble_parallel_insn): Improve warning messages. Return error
- message from non-swapped instruction order.
+2000-02-22 Andrew Haley <aph@cygnus.com>
-Wed Feb 4 20:00:26 1998 James G. Smith <jsmith@teknema.demon.co.uk>
+ * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64.
- * config/tc-arm.c: Rename arm_after_pass_hook() to arm_cleanup().
+2000-02-22 Andrew Haley <aph@cygnus.com>
- * config/tc-arm.h: Replace md_after_pass_hook definition with a
- md_cleanup definition. This moves the forced literal output to
- the end of the source pass, and avoids macro's inserting literals
- into the code immediately after the macro expansion.
+ * config/tc-mips.c (mips_gp32): New variable.
+ (macro_build) Use mips_gp32.
+ (mips_ip): Ditto.
+ (md_longopts): Add "-mgp32" and "-mgp64".
+ (md_parse_option): Add OPTION_GP32 and OPTION_GP64.
-Wed Feb 4 13:17:19 1998 Ian Lance Taylor <ian@cygnus.com>
+ (OPTION_M7900): Change offset
+ (OPTION_NO_M7900): Ditto.
- * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: A reloc against
- a gas internal symbol is adjustable.
- * config/tc-ppc.h (tc_fix_adjustable): Likewise.
+2000-02-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
- * as.h: If gcc version greater than 2.6, use `__format__' and
- `__printf__' in function attributes, rather than `format' and
- `printf'.
+ * config/obj-coff.c (add_lineno): Accept non-positive lineno with
+ warning, and bump it to 1.
-Mon Feb 2 18:38:18 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
- * config/tc-sparc.c: Only include elf/sparc.h if OBJ_ELF.
+ From Brad Lucier <lucier@math.purdue.edu>:
+ * dwarf2dbg.c (print_stats): Add cast to force printf argument to
+ match format.
-Mon Feb 2 18:30:34 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
+2000-02-21 Catherine Moore <clm@cygnus.com>
- Add tms320c30 support:
- * config/tc-tic30.h: New file.
- * config/tc-tic30.c: New file.
- * config/obj-coff.h: If TC_TIC30, include coff/tic30.h and define
- TARGET_FORMAT as "coff-tic30".
- * configure.in (tic30-*-*aout*, tic30-*-*coff*): New targets.
- * Makefile.am: Rebuild dependencies.
- (CPU_TYPES): Add tic30.
- (CPU_OBJ_VALID): tic30-aout is valid.
- (TARGET_CPU_CFILES): Add config/tc-tic30.c.
- (TARGET_CPU_HFILES): Add config/tc-tic30.h.
- * configure, Makefile.in: Rebuild.
+ * config/tc-mips.c (MF_HILO_INSN): Define.
+ (mips_7000_hilo_fix): Declare.
+ (append_insn): Conditionally insert nops after an mfhi/mflo insn.
+ (md_parse_option): Check for 7000_HILO_FIX options.
+ (OPTION_M7000_HILO_FIX): Define.
+ (OPTION_NO_M7000_HILO_FIX): Define.
+ * doc/c-mips.texi (-mfix7000): Describe.
-Mon Feb 2 10:20:37 1998 Nick Clifton <nickc@cygnus.com>
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-v850.c (md_assemble): Improvements to error messages.
+ * listing.c (print_lines): Remove unused variable `end'.
-Mon Feb 2 12:39:05 1998 Geoff Keating <geoffk@ozemail.com.au>
+ * config/tc-i386.c (md_assemble): Use `reloc()' to select reloc
+ type for JumpInterSegment output. Use enum bfd_reloc_code_real for
+ reloc_type when BFD_ASSEMBLER.
+ (md_estimate_size_before_relax): Use enum bfd_reloc_code_real for
+ reloc_type when BFD_ASSEMBLER. Move common code out of switch
+ statement and quell signed vs. unsigned comparison warning.
- * config/tc-ppc.c (md_apply_fix3): Change BFD_RELOC_HI16 and
- BFD_RELOC_HI16_S to store the high bits of any value.
+2000-02-18 Nick Clifton <nickc@cygnus.com>
- * config/tc-ppc.h (tc_fix_adjustable): Undo change of Fri Jun 27.
- (TC_RELOC_RTSYM_LOC_FIXUP): Don't let the
- assembler calculate relocations to any external symbol at all.
- * config/tc-ppc.c (md_apply_fix3) [OBJ_ELF]: Correct bugs
- involving generation of pc-relative relocs.
- (md_pcrel_from_section) [OBJ_ELF]: The job this code used to do
- has been moved to md_apply_fix3.
+ * config/tc-d10v.c (find_opcode): Add a symbol's value to
+ the computed frag offset, rather than overwriting it.
- * config/tc-ppc.c (md_apply_fix3): Fix test for too-far branch.
- (ppc_elf_suffix): Warn about 'identifier+constant@got' syntax,
- which actually means (the address of identifier's GOT entry) +
- constant, which is not particularly useful.
+Thu Feb 17 00:11:08 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-Fri Jan 30 11:02:35 1998 Doug Evans <devans@canuck.cygnus.com>
+ * config/tc-sh.c ("elf/sh.h"): Include.
+ (sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables.
+ (md.begin): Initialize target_arch.
+ Only include opcodes in has table that match selected architecture.
+ (parse_reg): Recognize register names for sh-dsp.
+ (parse_at): Recognize post-modify addressing.
+ (get_operands): The leading space is now optional.
+ (get_specific): Remove FDREG_N support. Add support for sh-dsp
+ arguments. Update valid_arch.
+ (build_Mytes): Add support for SDT_REG_N.
+ (find_cooked_opcode): New function, broken out of md_assemble.
+ (assemble_ppi, sh_elf_final_processing): New functions.
+ (md_assemble): Use find_cooked_opcode and assemble_ppi.
+ (md_longopts, md_parse_option): New option: -dsp.
+ * config/tc-sh.h (elf_tc_final_processing): Define.
+ (sh_elf_final_processing): Declare.
- * read.h (include_dirs): Declare.
- (include_dir_count,include_dir_maxlen): Declare.
+Fri Feb 11 14:21:51 2000 Jeffrey A Law (law@cygnus.com)
-Fri Jan 30 11:47:02 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.c (pa_build_unwind_subspace): Use subseg_new to create
+ the unwinder subspace. Save the current seg/subseg before creating
+ the new seg/subseg.
- * configure.in: Correct check for shared opcodes library.
- * configure: Rebuild.
+2000-02-10 Nick Clifton <nickc@cygnus.com>
- * listing.c (buffer_line): If we can't open the file, set at_end.
- (listing_print): Remove unused local variable fi.
+ * config/tc-mcore.c (INST_BYTE0): Redefine to handle big and
+ little endian targets.
+ (INST_BYTE1): Redefine to handle big and little endian
+ targets.
+ (cpu_type): New type: Select between M340 and M210.
+ (parse_psrmod): New function: Parse the PSRCLR and PSRSET
+ instructions of the M340.
+ (md_assemble): Add support for the MULSH and OPSR classes of
+ instructions.
+ (md_atof): Add support for little endian targets.
+ (md_parse_option): Add support for -EL, -EB and -mcpu command
+ line switches.
+ (md_convert_frag): Add support for little endian targets.
+ (md_apply_fix3): Add support for little endian targets.
+ (md_number_to_chars): Add support for little endian targets.
- * config/m68k-parse.y (reglistpair): Handle register list in
- either order.
+2000-02-10 Timothy Wall <twall@redhat.com>
- * config/vms-conf.h: Don't undef VERSION.
+ * read.c (read_a_source_file): If TC_START_LABEL_WITHOUT_COLON is
+ defined, use it to verify the symbol just read should be a label.
-Thu Jan 29 14:42:44 1998 Pat Rankin <rankin@eql.caltech.edu>
+2000-02-10 Timothy Wall <twall@redhat.com>
- * Makefile.am (CONFIG_OBJS): New variable, containing part of old
- OBJS variable.
- (GENERIC_OBJS): New variable, with the rest of the old OBJS
- variable.
- (OBJS): Now just $(CONFIG_OBJS) and $(GENERIC_OBJS).
- ($(srcdir)/make-gas.com): Rename from make-gas.com.
- (stamp-mk.com): Replace $(OBJS) with $(GENERIC_OBJS).
- (EXTRA_DIST): Define.
- * vmsconf.sh: Handle {targ-cpu, obj-format, atof-targ} modules
- explicitly rather than via the list of object files.
- (gcc-as.opt): New file created when make-gas.com is run.
- * config-gas.com: Create {targ-cpu.h, obj-format.h, targ-env.h,
- itbl-cpu.h} to #include appropriate file rather than copying that
- file.
- * config/vms-conf.h: Synchronize with current config.in.
- * Makefile.in: Rebuild.
+ * app.c (do_scrub_chars): Handle "||" for parallel instructions
+ when DOUBLEBAR_PARALLEL is defined. Avoid stripping whitespace
+ around colons when KEEP_WHITE_AROUND_COLON is defined.
+ * doc/internals.texi (CPU backend): Document DOUBLEBAR_PARALLEL
+ and KEEP_WHITE_AROUND_COLON.
-Thu Jan 29 18:48:19 1998 Bill Moyer <billm@cygnus.com>
+2000-02-08 Timothy Wall <twall@redhat.com>
- * config/tc-d30v.c (do_assemble): Added flag_explicitly_parallel.
- (parallel_ok): Relaxed parallel subinstruction dependency check.
+ * read.c (s_rept): Call do_repeat, which abstracts the repeat
+ logic.
+ (do_repeat): New. Abstract repeat logic so that a "break" can be
+ implemented.
+ (end_repeat): New. Provide support for a "break" out of the
+ repeat loop.
+ * read.h: Add prototypes for new functions.
-Wed Jan 28 14:35:00 1998 Bill Moyer <billm@cygnus.com>
+2000-02-08 Timothy Wall <twall@redhat.com>
- * as.h (flag_warn_suppress_instructionswap): added new flag.
- * tc-d10v.c (md_parse_option,md_longopts): added "--nowarnswap"
- command line argument.
- * tc-d10v.c (write_2_short): emit "Swapping instructions"
- warning only if flag_warn_suppress_instructionswap is false.
+ * doc/internals.texi: Document NUMBERS_WITH_SUFFIX macro.
+ * as.h: Provide a default NUMBERS_WITH_SUFFIX definition (zero).
+ * expr.c: Handle numbers with suffixes if NUMBERS_WITH_SUFFIX is
+ non-zero.
-Wed Jan 28 16:41:19 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
+2000-02-08 Timothy Wall <twall@redhat.com>
- * configure.in (i386-*-mingw32*): New target.
- * configure: Rebuild.
+ * read.c: Added elseif to directives table.
+ * read.h: Added prototype for s_elseif.
+ * doc/as.texinfo: Added description for elseif.
+ * cond.c (s_elseif): New function
-Wed Jan 28 14:51:18 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-04 Timothy Wall <twall@redhat.com>
- * symbols.c (resolve_symbol_value): Don't set the segment if it
- hasn't changed, and this is OBJ_AOUT without BFD_ASSEMBLER.
+ * listing.c (print_lines): Remove conditionals causing bug in
+ listings.
- * config/obj-aout.h (S_IS_LOCAL): Correct typo--pass argument to
- S_GET_SEGMENT.
+2000-02-03 Timothy Wall <twall@cygnus.com>
-Wed Jan 28 13:54:50 1998 Pat Rankin <rankin@eql.caltech.edu>
+ * as.h: Define OCTETS_PER_BYTE and OCTETS_PER_BYTE_POWER
+ default values.
+ * frags.c (frag_new): Calculate fr_fix in octets
+ (frag_now_fix) Return offset as target address offset (bytes).
+ (frag_now_fix_octets) New - Return offset in octets (8-bit
+ quantities).
+ * frags.h: Added prototype for frag_now_fix_octets().
+ Distinguish between octets and bytes in field descriptions.
+ * listing.c (calc_hex): Account for octets vs bytes when
+ printing addresses/offsets.
+ (print_lines) Ditto. Also, if LISTING_WORD_SIZE is not 1, and
+ target is little-endian, print the octets in a word in big-endian
+ order so that the display looks like a proper hexadecimal number,
+ instead of having the octets reversed.
+ * read.c (do_align): When recording alignment, alignment power
+ should be in terms of target bytes (minimum addressible unit)
+ instead of octets.
+ (do_org) Convert ORG target address (byte) argument into an
+ octet offset when generating a variable fragment.
+ * symbols.c (resolve_symbol_value): Symbol final value
+ converted to a target address offset (bytes) from its octet offset.
+ * config/obj-coff.c (coff_frob_symbol): Symbol target address
+ offset (bytes) is adjusted by the frag offset (octets) converted
+ to bytes.
+ (coff_frob_section) Section alignment power is in terms of bytes;
+ convert it to an octet alignment power when calculating size (and
+ size mask) in octets. Don't modify the section size in order to
+ "align" it for TI COFF, since that format has a different method
+ for storing alignment information.
- as.h (unlink): Reverse 13-Feb-97 change; use of unlink vs remove
- depends upon HAVE_{UNLINK,REMOVE} values rather than host
- compiler.
+2000-02-01 Timothy Wall <twall@cygnus.com>
-Wed Jan 28 13:48:08 1998 Ian Lance Taylor <ian@cygnus.com>
+ * stabs.c (generate_asm_file): Escape backslashes in stabs file
+ entries, matching the way GCC generates them. If not escaped, the
+ filename is encoded incorrectly.
- * config/obj-coff.h (RESOLVE_SYMBOL_REDEFINITION): Define.
+2000-01-31 Nick Clifton <nickc@cygnus.com>
-Wed Jan 28 09:52:00 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-arm.c (reg_table): Add support for ATPCS register
+ naming conventions.
- * config/tc-v850.c (v850_insert_operand): Display instruction when
- an error is encountered.
+2000-01-31 Geoff Keating <geoffk@cygnus.com>
-Tue Jan 27 13:32:01 1998 Robert Lipe <robertl@dgii.com>
+ * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if
+ already defined.
+ * config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES):
+ New macro.
+ * config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag
+ of a symbol when we really care about its value.
- * configure.in (i386-*-sco3.2v5*): Defaults to ELF now.
- (i386-*-sco3.2v5*coff): New target.
- (i386-*-sco3.2*): New target.
- * configure: Rebuild.
+2000-01-19 Chandra Chavva <cchavva@cygnus.com>
-Tue Jan 27 11:06:52 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-mcore.c (md_assemble): Give warning message if
+ operands passes to instruction are more than the spec.
- * config/tc-v850.c: Tidy error message production.
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
-Tue Jan 27 12:24:32 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (armadjust_symtab): If the assembler is in
+ Thumb mode but the label seen was not declared as '.thumb_func'
+ then set the ST_INFO type to STT_ARM_16BIT mode. This allows
+ correct disassembly of Thumb code bounded by non function labels.
- * config/tc-arm.c (md_apply_fix3): Add new variable newimm to hold
- validate_immediate return value in the right type for comparisons
- to FAIL.
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-Tue Jan 27 06:51:59 1998 Richard Henderson <rth@cygnus.com>
+ * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c
+ Add dependencies for e-i386aout.o. Fix 2 comment lines.
- * listing.c (MAX_BYTES): Use listing variables not constants.
- (data_buffer): No longer an array, but a pointer.
- (calc_hex): sizeof(data_buffer) -> MAX_BYTES.
- (listing_listing): Allocate data_buffer.
+ * Makefile.in: Same here.
+ Update copyright.
-Tue Jan 27 06:38:35 1998 Richard Henderson <rth@cygnus.com>
+ * configure.in: Set bfd_gas for i386-aout when primary target
+ is bfd. Handle i386aout emulation. Don't use te_file=multi, as
+ we may need the primary te_file. Remove incorrect comment.
- * as.c (parse_args): Add --listing-lhs-width, --listing-lhs-width2,
- --listing-rhs-width, --listing-cont-lines.
- (show_usage): Update.
- * listing.c (listing_lhs_width, listing_lhs_width_second): New vars.
- (listing_lhs_cont_lines, listing_rhs_width): New vars.
- (print_lines): Use the variables instead of the constants.
- (listing_listing): Likewise.
- * listing.h: Declare the new vars.
-
-Tue Jan 27 05:32:05 1998 Richard Henderson <rth@cygnus.com>
+ * configure: Regenerate.
- * as.c (parse_args): Add --keep-locals alias for -L.
- Add --strip-local-absolute.
- (show_usage): Update.
- * as.h (flag_strip_local_absolute): New flag.
- * symbols.c (S_IS_LOCAL): Use it.
- * config/obj-aout.h (S_IS_LOCAL): Likewise.
- * config/obj-bout.h (S_IS_LOCAL): Likewise.
- * config/obj-coff.h (S_IS_LOCAL): Likewise.
+ * config/e-i386aout.c: New file.
-Mon Jan 26 13:07:41 1998 Nick Clifton <nickc@cygnus.com>
+ * as.c (USE_EMULATIONS): Move to before print_version_id.
+ (struct emulation): Add i386aout.
+ (show_usage): Split text strings. Reformat -a text. Add --em
+ help.
+ Update copyright.
- * config/tc-m32r.c: Detect if explicitly parallel instructions
- might have an io conflict and issue a warning message.
+ * obj.h (struct format_ops): Add s_get_other and s_get_desc.
+ (aout_format_ops): New.
+ Update copyright.
-Thu Jan 22 17:51:44 1998 Nick Clifton <nickc@cygnus.com>
+ * read.c (s_lcomm_internal): Rewrite OBJ_AOUT,OBJ_BOUT
+ preprocessor conditional and add aout USE_EMULATIONS tests.
+ (read_a_source_file): Don't pass error strings to printf as
+ format arg.
+ Update copyright.
- * cgen.c (cgen_save_fixups, cgen_restore_fixups,
- cgen_swap_fixups): Functions to save, restore and swap the fixup
- chain with a backup copy.
- (cgen_asm_finish_insn): Returns address of constructed insn.
+ * gasp.c (exp_get_abs): Don't pass error strings to printf as
+ format arg.
+ (do_data): Same here.
+ (process_file): And here.
+ Update copyright.
-Wed Jan 21 16:49:10 1998 Richard Henderson <rth@cygnus.com>
+ * symbols.c (colon): Rewrite "already defined" fatal message
+ code for aout with USE_EMULATIONS.
+ Update copyright.
- * listing.c (file_info_struct): Remove FILE, add POS.
- (last_open_file_info, last_open_file): New; a one entry FILE* cache.
- (file_info): Don't open the file.
- (buffer_line): Check for the file in the last_open cache, updating
- as necessary.
- (print_source): Don't reference file_info->file.
- (listing_listing): Likewise.
- (listing_print): Close the file in the cache, if any.
+ * config/obj-aout.c (OBJ_HEADER): Define.
+ (obj_pseudo_table): Rename to aout_pseudo_table. Init all
+ fields of sentinel.
+ (obj_aout_frob_symbol): Expand S_GET_DESC, S_GET_TYPE,
+ S_GET_OTHER, S_SET_TYPE macros since we don't need obj-multi
+ forms here.
+ (obj_aout_type): Expand S_SET_OTHER here too.
+ (obj_read_begin_hook): Remove.
+ (aout_pop_insert): New.
+ (obj_aout_s_get_other): New.
+ (obj_aout_s_get_desc): New.
+ (aout_format_ops): New.
+ Update copyright.
-Fri Jan 16 14:51:48 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-aout.h (obj_pop_insert): Define so non-multi usage
+ gets aout_pseudo_table.
+ (aout_pseudo_table): Declare.
+ (obj_read_begin_hook): Define.
+ Update copyright.
- * read.c (dwarf_file_string): New file static variable.
- (emit_expr): Look for constant sequence that leads up to a file
- name in DWARF debugging output.
- (stringer): Use dwarf_file_string to decide whether to accept a
- string as a file name.
+ * config/obj-coff.c (obj_pseudo_table): Rename to
+ coff_pseudo_table.
+ (coff_pop_insert): Use coff_pseudo_table.
+ (coff_sec_sym_ok_for_reloc): Remove.
+ (coff_format_ops): Add 0 entries for s_get_size, s_set_size,
+ and comment all zero entries and remove #if 0 code.
+ Update copyright.
-Fri Jan 16 11:30:37 1998 Richard Henderson <rth@cygnus.com>
+ * config/obj-coff.h (obj_pop_insert): Define.
+ (coff_pseudo_table): Declare.
+ Update copyright.
- * tc-m68k.c (m68k_ip): Remove absl->reglst MRI hack.
- (crack_operand): Add reg->reglst MRI hack.
- (r_seg): Put reglst symbols in reg_section.
- (m68k_frob_symbol): Frob reglst symbols into absolute_section.
+ * config/obj-ecoff.c (ecoff_format_ops): Add 0 entries for
+ s_get_size, s_set_size. Comment all zero entries.
+ Update copyright.
-Thu Jan 15 14:19:01 1998 Richard Henderson <rth@cygnus.com>
+ * config/obj-elf.c (elf_s_get_other): New function.
+ (obj_read_begin_hook): Rename to elf_obj_read_begin_hook.
+ (obj_symbol_new_hook): Rename to elf_obj_symbol_new_hook.
+ (elf_format_ops): Add elf_s_get_other, 0 s_get_size entry, and
+ comment.
+ (obj_elf_parse_section_letters): Don't pass error strings to
+ printf as format arg.
+ Update copyright.
- * tc-sh.c (get_specific): Handle SGR & DBR.
+ * config/obj-elf.h (ECOFF_DEBUGGING): Define when
+ OBJ_MAYBE_ECOFF.
+ (elf_s_get_other): Declare.
+ (S_GET_OTHER) Define as elf_s_get_other if not already
+ defined.
+ (S_SET_OTHER): Only define when not already defined.
+ (elf_obj_read_begin_hook): Declare.
+ (obj_read_begin_hook): Define.
+ (elf_obj_symbol_new_hook): Declare.
+ (obj_symbol_new_hook): Define.
+ Update copyright.
-Thu Jan 15 13:46:48 1998 Richard Henderson <rth@cygnus.com>
+ * config/obj-multi.h: Add copyright header and protect against
+ multiple inclusion. Add * to all function pointers.
+ (OBJ_HEADER): If defined, include it rather than other defines
+ in this file.
+ (obj_frob_file_after_relocs): Test for NULL.
+ (obj_symbol_new_hook): Here too.
+ (obj_sec_sym_ok_for_reloc): And here.
+ (S_GET_OTHER): Define.
+ (S_GET_DESC): Define.
+ (ECOFF_DEBUGGING): Remove as it's done in obj-elf.h
+ (OBJ_MAYBE_ELF): Update comment.
- * tc-h8300.c (parse_reg): Take the length of the symbol into
- account when attempting to match a register name.
- * tc-h8500.c (parse_reg): Likewise.
+ * config/tc-i386.c (i386_immediate): Add OBJ_MAYBE_AOUT to
+ OBJ_AOUT preprocessor conditional and handle emulation by
+ testing OUTPUT_FLAVOR.
+ (i386_displacement): Here too.
+ (md_section_align): Similarly here.
+ (i386_target_format): Conditionally compile when more than one
+ of OBJ_MAYBE_{ELF,COFF,AOUT} defined. Add aout case.
+ (i386_immediate): Fix error message for aout BFD_ASSMBLER.
+ (i386_displacement): Here too.
+ Update copyright.
-Wed Jan 14 17:52:33 1998 Nick Clifton <nickc@cygnus.com>
+ * config/tc-i386.h (AOUT_TARGET_FORMAT): Define for each TE_*.
+ Define TARGET_FORMAT for aout only when not multi.
+ Update copyright.
- * cgen.c: Formatting changes to improve readability.
+ * config/te-multi.h: Delete file as it's identical to te-generic.h
-Wed Jan 14 15:41:41 1998 Jeffrey A Law (law@cygnus.com)
+2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-mips.c (macro): Rework division code to avoid unfilled
- delay slot.
+ * config/tc-i386.h (DWORD_MNEM_SUFFIX): Delete.
+ * config/tc-i386.c (DWORD_MNEM_SUFFIX): Rename all occurrences to
+ LONG_MNEM_SUFFIX.
-Wed Jan 14 18:04:20 1998 Michael Meissner <meissner@cygnus.com>
+ * config/tc-i386.h (INTEL_DWORD_MNEM_SUFFIX): Rename to
+ DWORD_MNEM_SUFFIX.
+ * config/tc-i386.c (INTEL_DWORD_MNEM_SUFFIX): Here too. Fix some
+ comments.
- Based on a patch from Jim Wilson
- * config/tc-d30v.c (do_assemble): Remove non-ansi default case.
- (tc_gen_reloc): Handle cross section PC relative relocs
- correctly.
+2000-01-13 Clinton Popetz <cpopetz@cygnus.com>
-Wed Jan 14 15:02:19 1998 Doug Evans <devans@seba.cygnus.com>
+ * config/tc-mips.c (mips_do_align): New function.
+ * config/tc-mips.h (md_do_align): Define.
- * config/tc-mips.c (mips_ip): Don't test pinfo flags if INSN_MACRO.
+2000-01-10 Philip Blundell <philb@gnu.org>
-Mon Jan 12 13:04:57 1998 Doug Evans <devans@seba.cygnus.com>
+ * doc/c-arm.texi (ARM Options): Fix typo.
+ (ARM-Chars): Correct description of `#'. Mention that `;' is a
+ line separator for Linux.
+ * doc/as.texinfo (Comments): Mention the ARM.
- * cgen.c: #include setjmp.h. Clean up pass over `struct foo' usage.
- (expr_jmp_buf): New static local.
- (cgen_parse_operand): Allow use of longjmp in parsing to handle errors.
- (cgen_md_operand): New function.
- * tc-m32r.c: Clean up pass over `struct foo' usage.
- (md_estimate_size_before_relax): Use CGEN_INSN_MNEMONIC.
+2000-01-10 Philip Blundell <pb@futuretv.com>
-Tue Jan 6 15:36:02 1998 Richard Henderson <rth@cygnus.com>
+ * configure.in (arm*-*-conix*): New target.
+ (arm*-*-linux-gnu*): Match instead of arm-*-linux* and
+ armv*-*-linux-gnu.
+ * configure: Regenerate.
- * symbols.c (S_SET_SEGMENT): Don't set the segment for section syms.
- (S_IS_EXTERNAL, S_IS_LOCAL): Correct parenthetication.
+2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
-Fri Jan 2 16:08:54 1998 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-elf.c (elf_pseudo_table): Define visibility pseudos.
+ (obj_elf_visibility): New function.
- * config/tc-i386.c (i386_operand): Give an error if there are
- unrecognized characters after an expression.
+ * doc/as.texinfo (Visibility): New node: document visibility
+ pseudo ops.
-For older changes see ChangeLog-9697
+For older changes see ChangeLog-9899
diff --git a/gnu/usr.bin/binutils/gas/Makefile.in b/gnu/usr.bin/binutils/gas/Makefile.in
index 8a8e86d9e35..fa6de3c4c01 100644
--- a/gnu/usr.bin/binutils/gas/Makefile.in
+++ b/gnu/usr.bin/binutils/gas/Makefile.in
@@ -69,9 +69,13 @@ BFDLIB = @BFDLIB@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
GDBINIT = @GDBINIT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -81,6 +85,7 @@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLOBJS = @INTLOBJS@
+LIBM = @LIBM@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
@@ -88,11 +93,13 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+STRIP = @STRIP@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
@@ -116,6 +123,9 @@ tooldir = $(exec_prefix)/$(target_alias)
YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
+WARN_CFLAGS = @WARN_CFLAGS@
+AM_CFLAGS = $(WARN_CFLAGS)
+
MKDEP = gcc -MM
TARG_CPU = @target_cpu_type@
@@ -143,17 +153,20 @@ CPU_TYPES = \
arc \
arm \
avr \
+ cris \
d10v \
d30v \
fr30 \
h8300 \
h8500 \
hppa \
+ ia64 \
i370 \
i386 \
i860 \
i960 \
m32r \
+ m68hc11 \
m68k \
m88k \
mcore \
@@ -167,6 +180,7 @@ CPU_TYPES = \
sparc \
tahoe \
tic30 \
+ tic54x \
tic80 \
vax \
w65 \
@@ -175,7 +189,7 @@ CPU_TYPES = \
# Object format types. This is only used for dependency information.
-# We deliberately omit som, since it does not work as a cross assembler.
+# We deliberately omit SOM, since it does not work as a cross assembler.
OBJ_FORMATS = \
aout \
@@ -199,14 +213,18 @@ CPU_OBJ_VALID = \
case $$o in \
aout) \
case $$c in \
- a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \
+ a29k | arm | cris | i386 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \
valid=yes ;; \
esac ;; \
bout) \
case $$c in \
i960) valid=yes ;; \
esac ;; \
- coff) valid=yes ;; \
+ coff) valid=yes; \
+ case $$c in \
+ cris | i860) \
+ valid= ;; \
+ esac ;; \
ecoff) \
case $$c in \
mips | alpha) valid=yes ;; \
@@ -229,16 +247,19 @@ CPU_OBJ_VALID = \
# These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case.
-MULTI_CPU_TYPES = i386 mips
+MULTI_CPU_TYPES = i386 mips cris
MULTI_CPU_OBJ_VALID = \
valid= ; \
case $$o in \
aout) \
case $$c in \
- i386) valid=yes ;; \
+ i386 | cris) valid=yes ;; \
+ esac ;; \
+ coff) \
+ case $$c in \
+ i386 | mips) valid=yes ;; \
esac ;; \
- coff) valid=yes ;; \
ecoff) \
case $$c in \
mips) valid=yes ;; \
@@ -319,17 +340,20 @@ TARGET_CPU_CFILES = \
config/tc-arc.c \
config/tc-arm.c \
config/tc-avr.c \
+ config/tc-cris.c \
config/tc-d10v.c \
config/tc-d30v.c \
config/tc-fr30.c \
config/tc-h8300.c \
config/tc-h8500.c \
config/tc-hppa.c \
+ config/tc-ia64.c \
config/tc-i370.c \
config/tc-i386.c \
config/tc-i860.c \
config/tc-i960.c \
config/tc-m32r.c \
+ config/tc-m68hc11.c \
config/tc-m68k.c \
config/tc-m88k.c \
config/tc-mcore.c \
@@ -343,6 +367,7 @@ TARGET_CPU_CFILES = \
config/tc-sparc.c \
config/tc-tahoe.c \
config/tc-tic30.c \
+ config/tc-tic54x.c \
config/tc-tic80.c \
config/tc-vax.c \
config/tc-w65.c \
@@ -356,17 +381,20 @@ TARGET_CPU_HFILES = \
config/tc-arc.h \
config/tc-arm.h \
config/tc-avr.h \
+ config/tc-cris.h \
config/tc-d10v.h \
config/tc-d30v.h \
config/tc-fr30.h \
config/tc-h8300.h \
config/tc-h8500.h \
config/tc-hppa.h \
+ config/tc-ia64.h \
config/tc-i370.h \
config/tc-i386.h \
config/tc-i860.h \
config/tc-i960.h \
config/tc-m32r.h \
+ config/tc-m68hc11.h \
config/tc-m68k.h \
config/tc-m88k.h \
config/tc-mcore.h \
@@ -380,6 +408,7 @@ TARGET_CPU_HFILES = \
config/tc-sparc.h \
config/tc-tahoe.h \
config/tc-tic30.h \
+ config/tc-tic54x.h \
config/tc-tic80.h \
config/tc-vax.h \
config/tc-w65.h \
@@ -429,6 +458,8 @@ TARG_ENV_HFILES = \
config/te-go32.h \
config/te-hp300.h \
config/te-hppa.h \
+ config/te-hppa64.h \
+ config/te-hppalinux64.h \
config/te-i386aix.h \
config/te-ic960.h \
config/te-linux.h \
@@ -436,7 +467,6 @@ TARG_ENV_HFILES = \
config/te-lynx.h \
config/te-mach.h \
config/te-macos.h \
- config/te-multi.h \
config/te-nbsd.h \
config/te-nbsd532.h \
config/te-pc532mach.h \
@@ -447,12 +477,15 @@ TARG_ENV_HFILES = \
config/te-sparcaout.h \
config/te-sun3.h \
config/te-svr4.h \
- config/te-sysv32.h
+ config/te-sysv32.h \
+ config/te-tmips.h
# Multi files in config
MULTI_CFILES = \
+ config/e-crisaout.c \
+ config/e-criself.c \
config/e-i386aout.c \
config/e-i386coff.c \
config/e-i386elf.c \
@@ -545,7 +578,7 @@ STAGESTUFF = *.o $(noinst_PROGRAMS)
as_new_SOURCES = $(GAS_CFILES)
as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS) $(INTLLIBS)
+ $(extra_objects) $(GASLIBS) $(INTLLIBS) $(LIBM)
as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
$(extra_objects) $(GASLIBSDEP) $(INTLDEPS)
@@ -587,463 +620,458 @@ MOSTLYCLEANFILES = $(STAGESTUFF) core stamp-mk.com \
testsuite/site.exp site.bak site.exp stage stage1 stage2
-CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2a DEP1 DEPA DEP DEPDIR
+CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2A DEP1 DEPA DEP DEPDIR
against = stage2
-# Automatic dependency computation. This is a real pain, because the
-# dependencies change based on target_cpu_type and obj_format. We
-# currently ignore any dependencies caused by emulation files.
-
DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
$(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES)
-DEPTC_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/opcode/a29k.h
-DEPTC_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/opcode/a29k.h
+AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
+DEPTC_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
-DEPTC_a29k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \
- emul.h $(INCDIR)/opcode/a29k.h
+DEPTC_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
-DEPTC_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
- $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h \
- $(srcdir)/config/atof-vax.c
+DEPTC_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h $(INCDIR)/opcode/a29k.h
-DEPTC_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \
- $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
+DEPTC_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \
+ $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
-DEPTC_alpha_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \
- emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \
+DEPTC_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+ subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/alpha.h \
$(srcdir)/config/atof-vax.c
-DEPTC_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \
- $(srcdir)/config/tc-alpha.h emul.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
+DEPTC_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
+ $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/atof-vax.c
+
+DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
+ subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \
+ $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
+
+DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
+ $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+
+DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
+ $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h
+DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
-DEPTC_arc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
- $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
-DEPTC_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h
+DEPTC_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h
-DEPTC_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h
+DEPTC_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h
-DEPTC_arm_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h \
- $(INCDIR)/elf/reloc-macros.h
+DEPTC_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h
-DEPTC_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
- $(INCDIR)/obstack.h
+DEPTC_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/cris.h dwarf2dbg.h
-DEPTC_avr_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \
- emul.h subsegs.h $(INCDIR)/obstack.h
+DEPTC_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h dwarf2dbg.h
-DEPTC_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
+DEPTC_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \
+ $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h
+
+DEPTC_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h \
$(INCDIR)/elf/reloc-macros.h
-DEPTC_d10v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \
- $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
-DEPTC_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
+DEPTC_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
-DEPTC_d30v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
+DEPTC_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \
+ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \
+ cgen.h
-DEPTC_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
+DEPTC_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \
cgen.h
-DEPTC_fr30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \
- $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/fr30-opc.h cgen.h
+DEPTC_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
-DEPTC_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
+DEPTC_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
-DEPTC_h8300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
+DEPTC_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
-DEPTC_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
+DEPTC_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \
+ $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
-DEPTC_h8500_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
+DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
-DEPTC_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
- $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/libbfd.h \
- $(INCDIR)/opcode/hppa.h
+DEPTC_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
+ $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \
+ dwarf2dbg.h
-DEPTC_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
- $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h
+DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h
-DEPTC_i370_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \
- emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \
- $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h
+DEPTC_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h
-DEPTC_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h
+DEPTC_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h
-DEPTC_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h
+DEPTC_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \
+ $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h \
+ $(INCDIR)/elf/i370.h
-DEPTC_i386_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h
+DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ dwarf2dbg.h $(INCDIR)/opcode/i386.h
-DEPTC_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/opcode/i860.h
+DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \
+ $(INCDIR)/opcode/i386.h
-DEPTC_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/i860.h
+DEPTC_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \
+ $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/i386.h
-DEPTC_i860_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \
- emul.h $(INCDIR)/opcode/i860.h
+DEPTC_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h \
+ $(INCDIR)/elf/reloc-macros.h
-DEPTC_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \
- $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/i960.h
+DEPTC_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
-DEPTC_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+DEPTC_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
-DEPTC_i960_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \
- emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+DEPTC_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/i960.h
-DEPTC_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
+DEPTC_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \
+ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
+ cgen.h
+
+DEPTC_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
cgen.h
-DEPTC_m32r_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \
- $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/m32r-opc.h cgen.h
+DEPTC_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h \
+ dwarf2dbg.h
-DEPTC_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
- $(srcdir)/config/m68k-parse.h
+DEPTC_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h
+
+DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
-DEPTC_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
+DEPTC_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
$(srcdir)/config/m68k-parse.h
-DEPTC_m68k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \
- emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
- $(srcdir)/config/m68k-parse.h $(INCDIR)/elf/m68k.h \
- $(INCDIR)/elf/reloc-macros.h
+DEPTC_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h $(INCDIR)/obstack.h \
+ subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \
+ $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_m68k_hp300 = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-hp300.h \
- $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
+DEPTC_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
+ $(srcdir)/config/m68k-parse.h
+
+DEPTC_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
-DEPTC_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
+DEPTC_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \
+ $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
-DEPTC_m88k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
+DEPTC_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h
-DEPTC_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h
+DEPTC_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \
+ $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_mcore_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
+DEPTC_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
- $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-DEPTC_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
+DEPTC_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-DEPTC_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
+DEPTC_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
+
+DEPTC_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h itbl-ops.h \
$(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-DEPTC_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \
- $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/reloc-macros.h
-
-DEPTC_mips_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
- itbl-ops.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
+DEPTC_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
-DEPTC_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
+DEPTC_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
-DEPTC_mn10200_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
+DEPTC_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h \
+ dwarf2dbg.h
-DEPTC_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h
+DEPTC_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
-DEPTC_mn10300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h
+DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \
+ $(INCDIR)/obstack.h
-DEPTC_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
+DEPTC_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
-DEPTC_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/ns32k.h \
+DEPTC_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h $(INCDIR)/opcode/ns32k.h \
$(INCDIR)/obstack.h
-DEPTC_ns32k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \
- emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
+DEPTC_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/opcode/pj.h
-DEPTC_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/pj.h
+DEPTC_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h $(INCDIR)/opcode/pj.h
-DEPTC_pj_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
- emul.h $(INCDIR)/opcode/pj.h
+DEPTC_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h
-DEPTC_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h
+DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_ppc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h \
- $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
+ struc-symbol.h dwarf2dbg.h
-DEPTC_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h
+DEPTC_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \
+ $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h struc-symbol.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_sh_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/sparc.h
-DEPTC_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h
+DEPTC_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h
-DEPTC_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h
+DEPTC_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_sparc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h \
- $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
+DEPTC_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
+DEPTC_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \
- emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
+DEPTC_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \
- emul.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sb.h macro.h \
+ subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/tic54x.h
-DEPTC_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/opcode/tic80.h
+DEPTC_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h sb.h \
+ macro.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \
+ $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
+ $(BFDDIR)/libcoff.h
-DEPTC_tic80_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
- emul.h $(INCDIR)/opcode/tic80.h
+DEPTC_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic80.h
-DEPTC_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/vax.h
+DEPTC_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h $(INCDIR)/opcode/tic80.h
-DEPTC_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(srcdir)/config/vax-inst.h \
+DEPTC_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-DEPTC_vax_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \
- emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/vax.h
+DEPTC_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-DEPTC_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def emul.h $(srcdir)/config/vax-inst.h \
+DEPTC_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h $(srcdir)/config/vax-inst.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-DEPTC_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
+DEPTC_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-DEPTC_w65_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
+DEPTC_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
-DEPTC_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h
+DEPTC_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \
+ $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
-DEPTC_v850_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h
+DEPTC_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \
+ dwarf2dbg.h
-DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \
- $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h emul.h
+DEPTC_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h dwarf2dbg.h
-DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \
- $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(srcdir)/config/tc-z8k.h emul.h
+DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
+DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h
DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \
@@ -1055,415 +1083,412 @@ DEPTC_i386_multi = $(DEPTC_i386_aout) $(DEPTC_i386_coff) \
DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \
$(DEPTC_mips_elf)
-DEPOBJ_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf)
+DEPOBJ_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_a29k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \
- $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h
+DEPOBJ_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(BFDDIR)/libecoff.h
-DEPOBJ_alpha_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \
- emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
+ $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/aout/aout64.h
-DEPOBJ_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \
- $(srcdir)/config/tc-alpha.h emul.h
+DEPOBJ_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
+DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ struc-symbol.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_arc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_arm_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_avr_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_d10v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_d30v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_fr30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_h8300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_h8500_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i370_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h \
- $(INCDIR)/aout/aout64.h
+DEPOBJ_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
+ $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i386_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_i860_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \
- $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h
+DEPOBJ_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i960_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m32r_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+
+DEPOBJ_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/bin-bugs.h \
- $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/aout/aout64.h \
+DEPOBJ_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/obstack.h
-DEPOBJ_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m88k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_mcore_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \
- $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h
+DEPOBJ_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mips_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \
- emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/aout/aout64.h
+DEPOBJ_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mn10200_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(BFDDIR)/libecoff.h
-DEPOBJ_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \
+ $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mn10300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_ns32k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_pj_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_ppc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
+DEPOBJ_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_sh_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_sparc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tahoe_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tic30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_tic80_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
+DEPOBJ_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
subsegs.h
-DEPOBJ_vax_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def emul.h subsegs.h $(INCDIR)/obstack.h
+DEPOBJ_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_w65_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_v850_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_z8k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- emul.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def subsegs.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_z8k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
- emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+
+DEPOBJ_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+
+DEPOBJ_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
+
+DEPOBJ_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+
+DEPOBJ_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+
+DEPOBJ_z8k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \
@@ -1475,6 +1500,7 @@ DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \
DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \
$(DEPOBJ_mips_elf)
+DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf)
DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -1522,6 +1548,13 @@ DEP_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h
+DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
+DEP_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h
+
DEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
@@ -1562,6 +1595,18 @@ DEP_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
DEP_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
+ $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h
+
+DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
+DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h
+
DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
@@ -1580,12 +1625,6 @@ DEP_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h
-DEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-
-DEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-
DEP_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h
@@ -1606,6 +1645,14 @@ DEP_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h
+DEP_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+
+DEP_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h
+
DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -1729,6 +1776,14 @@ DEP_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h
+DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
+DEP_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h
+
DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
@@ -1780,6 +1835,8 @@ DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \
DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \
$(DEP_mips_elf)
+DEP_cris_multi = $(DEP_cris_aout) $(DEP_cris_elf)
+BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
@@ -1792,16 +1849,21 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-itbl_test_OBJECTS = itbl-parse.o itbl-lex.o
+itbl_test_OBJECTS = itbl-parse.$(OBJEXT) itbl-lex.$(OBJEXT)
itbl_test_DEPENDENCIES = itbl-tops.o itbl-test.o
itbl_test_LDFLAGS =
-as_new_OBJECTS = app.o as.o atof-generic.o bignum-copy.o cond.o \
-depend.o dwarf2dbg.o ecoff.o ehopt.o expr.o flonum-copy.o \
-flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o \
-listing.o literal.o macro.o messages.o output-file.o read.o sb.o \
-stabs.o subsegs.o symbols.o write.o
+as_new_OBJECTS = app.$(OBJEXT) as.$(OBJEXT) atof-generic.$(OBJEXT) \
+bignum-copy.$(OBJEXT) cond.$(OBJEXT) depend.$(OBJEXT) \
+dwarf2dbg.$(OBJEXT) ecoff.$(OBJEXT) ehopt.$(OBJEXT) expr.$(OBJEXT) \
+flonum-copy.$(OBJEXT) flonum-konst.$(OBJEXT) flonum-mult.$(OBJEXT) \
+frags.$(OBJEXT) hash.$(OBJEXT) input-file.$(OBJEXT) \
+input-scrub.$(OBJEXT) listing.$(OBJEXT) literal.$(OBJEXT) \
+macro.$(OBJEXT) messages.$(OBJEXT) output-file.$(OBJEXT) read.$(OBJEXT) \
+sb.$(OBJEXT) stabs.$(OBJEXT) subsegs.$(OBJEXT) symbols.$(OBJEXT) \
+write.$(OBJEXT)
as_new_LDFLAGS =
-gasp_new_OBJECTS = gasp.o macro.o sb.o hash.o
+gasp_new_OBJECTS = gasp.$(OBJEXT) macro.$(OBJEXT) sb.$(OBJEXT) \
+hash.$(OBJEXT)
gasp_new_LDFLAGS =
SCRIPTS = $(noinst_SCRIPTS)
@@ -1827,7 +1889,7 @@ OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .l .lo .o .s .y
+.SUFFIXES: .S .c .l .lo .o .obj .s .y
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
@@ -1885,6 +1947,11 @@ maintainer-clean-noinstPROGRAMS:
.c.o:
$(COMPILE) -c $<
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
.s.o:
$(COMPILE) -c $<
@@ -1893,6 +1960,7 @@ maintainer-clean-noinstPROGRAMS:
mostlyclean-compile:
-rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
clean-compile:
@@ -2220,9 +2288,10 @@ $(OBJS): @ALL_OBJ_DEPS@
# Stuff that every object file depends upon. If anything is removed
# from this list, remove it from dep-in.sed as well.
-$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \
- expr.h write.h frags.h hash.h read.h symbols.h tc.h \
- obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h asintl.h
+$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
+ $(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \
+ as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \
+ frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h
check-DEJAGNU: site.exp
if [ -d testsuite ]; then \
@@ -2249,7 +2318,7 @@ check-DEJAGNU: site.exp
# The implicit .c.o rule doesn't work for these, perhaps because of
# the variables, or perhaps because the sources are not on vpath.
-$(TARG_CPU_O): $(TARG_CPU_C) $(TARG_CPU_DEP_@target_cpu_type@)
+$(TARG_CPU_O): $(TARG_CPU_C)
$(COMPILE) -c $(TARG_CPU_C)
$(ATOF_TARG_O): $(ATOF_TARG_C)
$(COMPILE) -c $(ATOF_TARG_C)
@@ -2296,6 +2365,10 @@ e-i386coff.o: $(srcdir)/config/e-i386coff.c
$(COMPILE) -c $(srcdir)/config/e-i386coff.c
e-i386elf.o: $(srcdir)/config/e-i386elf.c
$(COMPILE) -c $(srcdir)/config/e-i386elf.c
+e-crisaout.o: $(srcdir)/config/e-crisaout.c
+ $(COMPILE) -c $(srcdir)/config/e-crisaout.c
+e-criself.o: $(srcdir)/config/e-criself.c
+ $(COMPILE) -c $(srcdir)/config/e-criself.c
# If m68k-parse.y is in a different directory, then ylwrap will use an
# absolute path when it invokes yacc, which will cause yacc to put the
@@ -2448,20 +2521,33 @@ de-stage3:
- (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..)
- rmdir stage3
+# Automatic dependency computation. This is a real pain, because the
+# dependencies change based on target_cpu_type and obj_format.
+# Just to make things even more complicated, automake separates the
+# dependency variable assignments from the dependency rules, and tacks
+# on a .NOEXPORT at the end of Makefile.in.
+
DEP: dep.sed $(DEP_FILE_DEPS) DEPTC DEPOBJ DEP2
- rm -f DEP1
+ rm -f DEP1 # delete because we use $? in DEP1 rule
srcdir=`cd $(srcdir); pwd`; \
$(MAKE) MKDEP="$(MKDEP)" srcdir="$${srcdir}" VPATH="$${srcdir}" DEP1
rm -rf DEPDIR
- sed -f dep.sed < DEP1 > DEPA
+ echo 'AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' > DEPA
sed -f dep.sed < DEPTC >> DEPA
sed -f dep.sed < DEPOBJ >> DEPA
sed -f dep.sed < DEP2 >> DEPA
+ echo 'BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA
+ echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' >> DEPA
+ sed -f dep.sed < DEP1 >> DEPA
echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> DEPA
echo '$$(TARG_CPU_O): $$(DEPTC_@target''_cpu_type@_@obj''_format@)' >> DEPA
echo '$$(OBJ_FORMAT_O): $$(DEPOBJ_@target''_cpu_type@_@obj''_format@)' >> DEPA
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
- mv -f DEPA $@
+ echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA
+ if grep ' /' DEPA > /dev/null 2> /dev/null; then \
+ echo 'make DEP failed!'; exit 1; \
+ else \
+ mv -f DEPA $@; \
+ fi
DEP1: $(CFILES) $(MULTI_CFILES)
if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
@@ -2472,9 +2558,7 @@ DEP1: $(CFILES) $(MULTI_CFILES)
echo '' > targ-env.h; \
echo '' > itbl-cpu.h; \
echo '' > itbl-parse.h; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP; \
- echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? >> DEP
+ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? > DEP
mv -f DEPDIR/DEP $@
# Work out the special dependencies for the tc-*.c files.
@@ -2505,7 +2589,7 @@ DEPTC: $(TARGET_CPU_CFILES)
echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPTCA
echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> DEPTCA
for c in $(MULTI_CPU_TYPES); do \
- echo 'DEPTC_'"$${c}"'_multi = \' >> DEPTCA; \
+ echo "DEPTC_$${c}"'_multi = \' >> DEPTCA; \
for o in $(OBJ_FORMATS); do \
$(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
@@ -2544,7 +2628,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES)
echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> DEPOBJA
echo ' $$(INCDIR)/aout/stab.def' >> DEPOBJA
for c in $(MULTI_CPU_TYPES); do \
- echo 'DEPOBJ_'"$${c}"'_multi = \' >> DEPOBJA; \
+ echo "DEPOBJ_$${c}"'_multi = \' >> DEPOBJA; \
for o in $(OBJ_FORMATS); do \
$(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
@@ -2558,7 +2642,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES)
# Work out the dependencies for each CPU/OBJ combination.
# Note that SOM is a special case, because it only works native.
DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES)
- rm -f DEP2a
+ rm -f DEP2A
if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
cd DEPDIR; \
@@ -2569,22 +2653,22 @@ DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES)
echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
$(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
- sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2a; \
+ sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2A; \
else true; fi; \
done; \
done
- echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2a
+ echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2A
for c in $(MULTI_CPU_TYPES); do \
- echo 'DEP_'"$${c}"'_multi = \' >> DEP2a; \
+ echo "DEP_$${c}"'_multi = \' >> DEP2A; \
for o in $(OBJ_FORMATS); do \
$(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
- echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2a; \
+ echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2A; \
else true; fi; \
done; \
- echo '' >> DEP2a; \
+ echo '' >> DEP2A; \
done
- mv -f DEP2a DEP2
+ mv -f DEP2A DEP2
dep.sed: dep-in.sed config.status
srcdir=`cd $(srcdir); pwd`; \
@@ -2594,85 +2678,74 @@ dep.sed: dep-in.sed config.status
-e "s!@SRCDIR@!$${srcdir}!"
dep: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
+ sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \
+ < Makefile > tmp-Makefile
cat DEP >> tmp-Makefile
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
dep-in: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
+ sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \
+ < $(srcdir)/Makefile.in > tmp-Makefile.in
cat DEP >> tmp-Makefile.in
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
dep-am: DEP
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
+ sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \
+ < $(srcdir)/Makefile.am > tmp-Makefile.am
cat DEP >> tmp-Makefile.am
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
+# HEED THE MKDEP WARNINGS.
+# ANYTHING CHANGED OR ADDED BETWEEN THE WARNING LINES MAY GO AWAY.
.PHONY: dep dep-in dep-am
-
-# DO NOT DELETE THIS LINE -- mkdep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-app.o: app.c $(INCDIR)/bin-bugs.h emul.h
-as.o: as.c $(INCDIR)/bin-bugs.h emul.h subsegs.h $(INCDIR)/obstack.h \
- output-file.h sb.h macro.h
-atof-generic.o: atof-generic.c $(INCDIR)/bin-bugs.h \
- emul.h
-bignum-copy.o: bignum-copy.c $(INCDIR)/bin-bugs.h emul.h
-cond.o: cond.c $(INCDIR)/bin-bugs.h emul.h macro.h \
- sb.h $(INCDIR)/obstack.h
-depend.o: depend.c $(INCDIR)/bin-bugs.h emul.h
-dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/bin-bugs.h emul.h \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
-ecoff.o: ecoff.c $(INCDIR)/bin-bugs.h emul.h ecoff.h
-ehopt.o: ehopt.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
-expr.o: expr.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h
-flonum-copy.o: flonum-copy.c $(INCDIR)/bin-bugs.h emul.h
+#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
+app.o: app.c
+as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \
+ sb.h macro.h dwarf2dbg.h
+atof-generic.o: atof-generic.c
+bignum-copy.o: bignum-copy.c
+cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h
+depend.o: depend.c
+dwarf2dbg.o: dwarf2dbg.c dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/elf/dwarf2.h
+ecoff.o: ecoff.c ecoff.h
+ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
+expr.o: expr.c $(INCDIR)/obstack.h
+flonum-copy.o: flonum-copy.c
flonum-konst.o: flonum-konst.c
flonum-mult.o: flonum-mult.c
-frags.o: frags.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \
- $(INCDIR)/obstack.h
-hash.o: hash.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h
-input-file.o: input-file.c $(INCDIR)/bin-bugs.h emul.h \
- input-file.h
-input-scrub.o: input-scrub.c $(INCDIR)/bin-bugs.h emul.h \
- input-file.h sb.h
-listing.o: listing.c $(INCDIR)/bin-bugs.h emul.h input-file.h \
- subsegs.h
-literal.o: literal.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \
- $(INCDIR)/obstack.h
+frags.o: frags.c subsegs.h $(INCDIR)/obstack.h
+hash.o: hash.c $(INCDIR)/obstack.h
+input-file.o: input-file.c input-file.h
+input-scrub.o: input-scrub.c input-file.h sb.h
+listing.o: listing.c input-file.h subsegs.h
+literal.o: literal.c subsegs.h $(INCDIR)/obstack.h
macro.o: macro.c sb.h macro.h
-messages.o: messages.c $(INCDIR)/bin-bugs.h emul.h
-output-file.o: output-file.c $(INCDIR)/bin-bugs.h emul.h \
- output-file.h
-read.o: read.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \
- $(INCDIR)/obstack.h sb.h macro.h ecoff.h
+messages.o: messages.c
+output-file.o: output-file.c output-file.h
+read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \
+ ecoff.h
sb.o: sb.c sb.h
-stabs.o: stabs.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \
- subsegs.h ecoff.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
-subsegs.o: subsegs.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \
- $(INCDIR)/obstack.h
-symbols.o: symbols.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \
- subsegs.h struc-symbol.h
-write.o: write.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \
- $(INCDIR)/obstack.h output-file.h
-gasp.o: gasp.c $(INCDIR)/bin-bugs.h sb.h macro.h
-itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/bin-bugs.h \
- emul.h itbl-parse.h
-e-i386aout.o: $(srcdir)/config/e-i386aout.c $(INCDIR)/bin-bugs.h \
- emul.h emul-target.h
-e-i386coff.o: $(srcdir)/config/e-i386coff.c $(INCDIR)/bin-bugs.h \
- emul.h emul-target.h
-e-i386elf.o: $(srcdir)/config/e-i386elf.c $(INCDIR)/bin-bugs.h \
- emul.h emul-target.h
-e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c $(INCDIR)/bin-bugs.h \
- emul.h emul-target.h
-e-mipself.o: $(srcdir)/config/e-mipself.c $(INCDIR)/bin-bugs.h \
- emul.h emul-target.h
+stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+subsegs.o: subsegs.c subsegs.h $(INCDIR)/obstack.h
+symbols.o: symbols.c $(INCDIR)/obstack.h subsegs.h \
+ struc-symbol.h
+write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \
+ dwarf2dbg.h
+gasp.o: gasp.c sb.h macro.h
+itbl-ops.o: itbl-ops.c itbl-ops.h
+e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h
+e-criself.o: $(srcdir)/config/e-criself.c emul-target.h
+e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h
+e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h
+e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h
+e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h
+e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h
$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
$(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@)
$(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@)
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
+#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gnu/usr.bin/binutils/gas/NEWS b/gnu/usr.bin/binutils/gas/NEWS
index 4143540ef13..6c3439d5939 100644
--- a/gnu/usr.bin/binutils/gas/NEWS
+++ b/gnu/usr.bin/binutils/gas/NEWS
@@ -1,5 +1,27 @@
-*- text -*-
+Changes in 2.11:
+
+x86 gas now supports the full Pentium4 instruction set.
+
+Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs.
+
+Support for Motorola 68HC11 and 68HC12.
+
+Support for Texas Instruments TMS320C54x (tic54x).
+
+Support for IA-64.
+
+Support for i860, by Jason Eckhardt.
+
+Support for CRIS (Axis Communications ETRAX series).
+
+x86 gas has a new .arch pseudo op to specify the target CPU architecture.
+
+x86 gas -q command line option quietens warnings about register size changes
+due to suffix, indirect jmp/call without `*', stand-alone prefixes, and
+translating various deprecated floating point instructions.
+
Changes in 2.10:
Support for the ARM msr instruction was changed to only allow an immediate
diff --git a/gnu/usr.bin/binutils/gas/README b/gnu/usr.bin/binutils/gas/README
index 4ac27db82fe..87666dfefdc 100644
--- a/gnu/usr.bin/binutils/gas/README
+++ b/gnu/usr.bin/binutils/gas/README
@@ -229,7 +229,7 @@ warning message when this happens.
REPORTING BUGS IN GAS
=====================
-Bugs in gas should be reported to bug-gnu-utils@gnu.org. They may be
+Bugs in gas should be reported to bug-binutils@gnu.org. They may be
cross-posted to bug-gcc if they affect the use of gas with gcc. They
should not be reported just to bug-gcc, since I don't read that list,
and therefore wouldn't see them.
diff --git a/gnu/usr.bin/binutils/gas/aclocal.m4 b/gnu/usr.bin/binutils/gas/aclocal.m4
index 4b4ca84b06c..2a3ccb77f9d 100644
--- a/gnu/usr.bin/binutils/gas/aclocal.m4
+++ b/gnu/usr.bin/binutils/gas/aclocal.m4
@@ -67,6 +67,22 @@ done
$1=[$]_gas_uniq_newlist
])dnl
+sinclude(../libtool.m4)
+dnl The lines below arrange for aclocal not to bring libtool.m4
+dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
+dnl to add a definition of LIBTOOL to Makefile.in.
+ifelse(yes,no,[
+AC_DEFUN([AM_PROG_LIBTOOL],)
+AC_DEFUN([AC_CHECK_LIBM],)
+AC_SUBST(LIBTOOL)
+])
+
+sinclude(../gettext.m4)
+ifelse(yes,no,[
+AC_DEFUN([CY_WITH_NLS],)
+AC_SUBST(INTLLIBS)
+])
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
@@ -159,415 +175,6 @@ else
fi
AC_SUBST($1)])
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$lt_target" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$lt_target" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
@@ -600,351 +207,6 @@ AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
AC_PROG_LEX
AC_DECL_YYTEXT])
-# This file is derived from `gettext.m4'. The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-AC_DEFUN(CY_WITH_NLS,
- [AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
-
- USE_INCLUDED_LIBINTL=no
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
- AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH(included-gettext,
- [ --with-included-gettext use the GNU gettext library included here],
- nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If gettext or catgets are available (in this order) we
- dnl use this. Else we have to fall back to GNU NLS library.
- dnl catgets is only used if permitted by option --with-catgets.
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- AC_CHECK_HEADER(libintl.h,
- [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
- [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
- gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for gettext in libintl],
- gt_cv_func_gettext_libintl,
- [AC_TRY_LINK([], [return (int) gettext ("")],
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)])])
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT, 1,
- [Define as 1 if you have gettext and don't want to use GNU gettext.])
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- AC_CHECK_FUNCS(dcgettext)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- INSTOBJEXT=.mo
- fi
- fi
- ])
-
- dnl In the standard gettext, we would now check for catgets.
- dnl However, we never want to use catgets for our releases.
-
- if test "$CATOBJEXT" = "NONE"; then
- dnl Neither gettext nor catgets in included in the C library.
- dnl Fall back on GNU gettext library.
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_SUBST(MSGFMT)
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext programs is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLDEPS)
- AC_SUBST(INTLLIBS)
- AC_SUBST(INTLOBJS)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
-
-AC_DEFUN(CY_GNU_GETTEXT,
- [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
-
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h])
- AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- AC_CHECK_FUNCS(stpcpy)
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
- fi
-
- AM_LC_MESSAGES
- CY_WITH_NLS
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- dnl The reference to <locale.h> in the installed <libintl.h> file
- dnl must be resolved because we cannot expect the users of this
- dnl to define HAVE_LOCALE_H.
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
- AC_SUBST(INCLUDE_LOCALE_H)
-
- dnl Determine which catalog format we have (if any is needed)
- dnl For now we know about two different formats:
- dnl Linux libc-5 and the normal X/Open format
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
- dnl Transform the SED scripts while copying because some dumb SEDs
- dnl cannot handle comments.
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- dnl po2tbl.sed is always needed.
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- dnl In the intl/Makefile.in we have a special dependency which makes
- dnl only sense for gettext. We comment this out for non-gettext
- dnl packages.
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
- AC_SUBST(GT_NO)
- AC_SUBST(GT_YES)
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
- AC_SUBST(MKINSTALLDIRS)
-
- dnl *** For now the libtool support in intl/Makefile is not for real.
- l=
- AC_SUBST(l)
-
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile. But only do this if the po directory
- dnl exists in srcdir.
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
- ])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your locale.h file contains LC_MESSAGES.])
- fi
- fi])
-
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
diff --git a/gnu/usr.bin/binutils/gas/app.c b/gnu/usr.bin/binutils/gas/app.c
index 2613e7440b3..5111598ba22 100644
--- a/gnu/usr.bin/binutils/gas/app.c
+++ b/gnu/usr.bin/binutils/gas/app.c
@@ -1,5 +1,6 @@
/* This is the Assembler Pre-Processor
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -48,7 +49,7 @@ static int scrub_m68k_mri;
static const char mri_pseudo[] = ".mri 0";
#if defined TC_ARM && defined OBJ_ELF
-/* The pseudo-op for which we need to special-case `@' characters.
+/* The pseudo-op for which we need to special-case `@' characters.
See the comment in do_scrub_chars. */
static const char symver_pseudo[] = ".symver";
static const char * symver_state;
@@ -88,9 +89,9 @@ static int process_escape PARAMS ((int));
/* FIXME-soon: The entire lexer/parser thingy should be
built statically at compile time rather than dynamically
- each and every time the assembler is run. xoxorich. */
+ each and every time the assembler is run. xoxorich. */
-void
+void
do_scrub_begin (m68k_mri)
int m68k_mri ATTRIBUTE_UNUSED;
{
@@ -101,7 +102,6 @@ do_scrub_begin (m68k_mri)
lex['\t'] = LEX_IS_WHITESPACE;
lex['\r'] = LEX_IS_WHITESPACE;
lex['\n'] = LEX_IS_NEWLINE;
- lex[';'] = LEX_IS_LINE_SEPARATOR;
lex[':'] = LEX_IS_COLON;
#ifdef TC_M68K
@@ -212,24 +212,23 @@ static char mri_last_ch;
state at the time .include is interpreted is completely unrelated.
That's why we have to save it all. */
-struct app_save
- {
- int state;
- int old_state;
- char * out_string;
- char out_buf[sizeof (out_buf)];
- int add_newlines;
- char * saved_input;
- int saved_input_len;
+struct app_save {
+ int state;
+ int old_state;
+ char * out_string;
+ char out_buf[sizeof (out_buf)];
+ int add_newlines;
+ char * saved_input;
+ int saved_input_len;
#ifdef TC_M68K
- int scrub_m68k_mri;
+ int scrub_m68k_mri;
#endif
- const char * mri_state;
- char mri_last_ch;
+ const char * mri_state;
+ char mri_last_ch;
#if defined TC_ARM && defined OBJ_ELF
- const char * symver_state;
+ const char * symver_state;
#endif
- };
+};
char *
app_push ()
@@ -259,7 +258,7 @@ app_push ()
saved->symver_state = symver_state;
#endif
- /* do_scrub_begin() is not useful, just wastes time. */
+ /* do_scrub_begin() is not useful, just wastes time. */
state = 0;
saved_input = NULL;
@@ -267,13 +266,13 @@ app_push ()
return (char *) saved;
}
-void
+void
app_pop (arg)
char *arg;
{
register struct app_save *saved = (struct app_save *) arg;
- /* There is no do_scrub_end (). */
+ /* There is no do_scrub_end (). */
state = saved->state;
old_state = saved->old_state;
out_string = saved->out_string;
@@ -303,7 +302,7 @@ app_pop (arg)
/* @@ This assumes that \n &c are the same on host and target. This is not
necessarily true. */
-static int
+static int
process_escape (ch)
int ch;
{
@@ -780,19 +779,20 @@ do_scrub_chars (get, tostart, tolen)
}
#ifdef KEEP_WHITE_AROUND_COLON
- if (lex[ch] == LEX_IS_COLON)
- {
- /* only keep this white if there's no white *after* the colon */
- ch2 = GET ();
- UNGET (ch2);
- if (!IS_WHITESPACE (ch2))
- {
- state = 9;
- UNGET (ch);
- PUT (' ');
- break;
- }
- }
+ if (lex[ch] == LEX_IS_COLON)
+ {
+ /* Only keep this white if there's no white *after* the
+ colon. */
+ ch2 = GET ();
+ UNGET (ch2);
+ if (!IS_WHITESPACE (ch2))
+ {
+ state = 9;
+ UNGET (ch);
+ PUT (' ');
+ break;
+ }
+ }
#endif
if (IS_COMMENT (ch)
|| ch == '/'
@@ -913,6 +913,21 @@ do_scrub_chars (get, tostart, tolen)
ch = ' ';
goto recycle;
}
+#ifdef DOUBLESLASH_LINE_COMMENTS
+ else if (ch2 == '/')
+ {
+ do
+ {
+ ch = GET ();
+ }
+ while (ch != EOF && !IS_NEWLINE (ch));
+ if (ch == EOF)
+ as_warn ("end of file in comment; newline inserted");
+ state = 0;
+ PUT ('\n');
+ break;
+ }
+#endif
else
{
if (ch2 != EOF)
@@ -1000,7 +1015,7 @@ do_scrub_chars (get, tostart, tolen)
case LEX_IS_COLON:
#ifdef KEEP_WHITE_AROUND_COLON
- state = 9;
+ state = 9;
#else
if (state == 9 || state == 10)
state = 3;
@@ -1017,7 +1032,7 @@ do_scrub_chars (get, tostart, tolen)
--add_newlines;
UNGET (ch);
}
- /* fall thru into... */
+ /* Fall through. */
case LEX_IS_LINE_SEPARATOR:
state = 0;
@@ -1026,13 +1041,13 @@ do_scrub_chars (get, tostart, tolen)
#ifdef TC_V850
case LEX_IS_DOUBLEDASH_1ST:
- ch2 = GET();
+ ch2 = GET ();
if (ch2 != '-')
{
UNGET (ch2);
goto de_fault;
}
- /* read and skip to end of line */
+ /* Read and skip to end of line. */
do
{
ch = GET ();
@@ -1045,10 +1060,10 @@ do_scrub_chars (get, tostart, tolen)
state = 0;
PUT ('\n');
break;
-#endif
+#endif
#ifdef DOUBLEBAR_PARALLEL
case LEX_IS_DOUBLEBAR_1ST:
- ch2 = GET();
+ ch2 = GET ();
if (ch2 != '|')
{
UNGET (ch2);
@@ -1060,7 +1075,7 @@ do_scrub_chars (get, tostart, tolen)
PUT ('|');
PUT ('|');
break;
-#endif
+#endif
case LEX_IS_LINE_COMMENT_START:
/* FIXME-someday: The two character comment stuff was badly
thought out. On i386, we want '/' as line comment start
@@ -1109,7 +1124,7 @@ do_scrub_chars (get, tostart, tolen)
PUT ('\n');
break;
}
- /* Loks like `# 123 "filename"' from cpp. */
+ /* Looks like `# 123 "filename"' from cpp. */
UNGET (ch);
old_state = 4;
state = -1;
@@ -1126,12 +1141,14 @@ do_scrub_chars (get, tostart, tolen)
Trap is the only short insn that has a first operand that is
neither register nor label.
We must prevent exef0f ||trap #1 to degenerate to exef0f ||trap#1 .
- We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is already
- LEX_IS_LINE_COMMENT_START. However, it is the only character in
- line_comment_chars for d10v, hence we can recognize it as such. */
+ We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is
+ already LEX_IS_LINE_COMMENT_START. However, it is the
+ only character in line_comment_chars for d10v, hence we
+ can recognize it as such. */
/* An alternative approach would be to reset the state to 1 when
we see '||', '<'- or '->', but that seems to be overkill. */
- if (state == 10) PUT (' ');
+ if (state == 10)
+ PUT (' ');
#endif
/* We have a line comment character which is not at the
start of a line. If this is also a normal comment
@@ -1151,12 +1168,16 @@ do_scrub_chars (get, tostart, tolen)
#if defined TC_ARM && defined OBJ_ELF
/* On the ARM, `@' is the comment character.
Unfortunately this is also a special character in ELF .symver
- directives (and .type, though we deal with those another way). So
- we check if this line is such a directive, and treat the character
- as default if so. This is a hack. */
+ directives (and .type, though we deal with those another way).
+ So we check if this line is such a directive, and treat
+ the character as default if so. This is a hack. */
if ((symver_state != NULL) && (*symver_state == 0))
goto de_fault;
#endif
+#ifdef WARN_COMMENTS
+ if (!found_comment)
+ as_where (&found_comment_file, &found_comment);
+#endif
do
{
ch = GET ();
@@ -1199,7 +1220,7 @@ do_scrub_chars (get, tostart, tolen)
{
int type;
- ch2 = * (unsigned char *) s;
+ ch2 = *(unsigned char *) s;
type = lex[ch2];
if (type != 0
&& type != LEX_IS_SYMBOL_COMPONENT)
@@ -1236,7 +1257,7 @@ do_scrub_chars (get, tostart, tolen)
case 2: *to++ = *from++;
case 1: *to++ = *from++;
}
- }
+ }
ch = GET ();
}
}
diff --git a/gnu/usr.bin/binutils/gas/as.c b/gnu/usr.bin/binutils/gas/as.c
index f02c42a9b1b..e8c22125f7f 100644
--- a/gnu/usr.bin/binutils/gas/as.c
+++ b/gnu/usr.bin/binutils/gas/as.c
@@ -1,5 +1,6 @@
/* as.c - GAS main program.
- Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,21 +18,18 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
-/*
- * Main program for AS; a 32-bit assembler of GNU.
+/* Main program for AS; a 32-bit assembler of GNU.
* Understands command arguments.
* Has a few routines that don't fit in other modules because they
* are shared.
*
- *
* bugs
*
* : initialisers
* Since no-one else says they will support them in future: I
* don't support them now.
- *
*/
#include "ansidecl.h"
@@ -43,6 +41,7 @@
#include "output-file.h"
#include "sb.h"
#include "macro.h"
+#include "dwarf2dbg.h"
#ifdef HAVE_ITBL_CPU
#include "itbl-ops.h"
@@ -63,19 +62,21 @@ static void dump_statistics PARAMS ((void));
static void perform_an_assembly_pass PARAMS ((int argc, char **argv));
static int macro_expr PARAMS ((const char *, int, sb *, int *));
-int listing; /* true if a listing is wanted */
+/* True if a listing is wanted. */
+int listing;
-static char *listing_filename = NULL; /* Name of listing file. */
+/* Name of listing file. */
+static char *listing_filename = NULL;
/* Type of debugging to generate. */
-enum debug_info_type debug_type = DEBUG_NONE;
+enum debug_info_type debug_type = DEBUG_UNSPECIFIED;
/* Maximum level of macro nesting. */
-
int max_macro_nest = 100;
-char *myname; /* argv[0] */
+/* argv[0] */
+char *myname;
#ifdef BFD_ASSEMBLER
segT reg_section, expr_section;
segT text_section, data_section, bss_section;
@@ -92,8 +93,7 @@ int debug_memory = 0;
/* We build a list of defsyms as we read the options, and then define
them after we have initialized everything. */
-struct defsym_list
-{
+struct defsym_list {
struct defsym_list *next;
char *name;
valueT value;
@@ -101,10 +101,9 @@ struct defsym_list
static struct defsym_list *defsyms;
-/* Keep a record of the itbl files we read in. */
+/* Keep a record of the itbl files we read in. */
-struct itbl_file_list
-{
+struct itbl_file_list {
struct itbl_file_list *next;
char *name;
};
@@ -117,6 +116,7 @@ static struct itbl_file_list *itbl_files;
extern struct emulation mipsbelf, mipslelf, mipself;
extern struct emulation mipsbecoff, mipslecoff, mipsecoff;
extern struct emulation i386coff, i386elf, i386aout;
+extern struct emulation crisaout, criself;
static struct emulation *const emulations[] = { EMULATIONS };
static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]);
@@ -142,7 +142,7 @@ select_emulation_mode (argc, argv)
if (p)
p++;
else
- p = argv[i+1];
+ p = argv[i + 1];
if (!p || !*p)
as_fatal (_("missing emulation mode name"));
@@ -232,7 +232,6 @@ Options:\n\
m include macro expansions\n\
n omit forms processing\n\
s include symbols\n\
- L include line debug statistics (if applicable)\n\
=FILE list to FILE (must be last sub-option)\n"));
fprintf (stream, _("\
@@ -246,12 +245,12 @@ Options:\n\
fprintf (stream, "\
--em=[");
- for (i = 0; i < n_emulations-1; i++)
+ for (i = 0; i < n_emulations - 1; i++)
fprintf (stream, "%s | ", emulations[i]->name);
fprintf (stream, "%s]\n", emulations[i]->name);
def_em = getenv (EMULATION_ENVIRON);
- if (!def_em)
+ if (!def_em)
def_em = DEFAULT_EMULATION;
fprintf (stream, _("\
emulate output (default %s)\n"), def_em);
@@ -266,6 +265,8 @@ Options:\n\
fprintf (stream, _("\
--help show this message and exit\n"));
fprintf (stream, _("\
+ --target-help show target specific options\n"));
+ fprintf (stream, _("\
-I DIR add DIR to search list for .include directives\n"));
fprintf (stream, _("\
-J don't warn about signed overflow\n"));
@@ -326,16 +327,14 @@ Options:\n\
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
}
-/*
- * Since it is easy to do here we interpret the special arg "-"
- * to mean "use stdin" and we set that argv[] pointing to "".
- * After we have munged argv[], the only things left are source file
- * name(s) and ""(s) denoting stdin. These file names are used
- * (perhaps more than once) later.
- *
- * check for new machine-dep cmdline options in
- * md_parse_option definitions in config/tc-*.c
- */
+/* Since it is easy to do here we interpret the special arg "-"
+ to mean "use stdin" and we set that argv[] pointing to "".
+ After we have munged argv[], the only things left are source file
+ name(s) and ""(s) denoting stdin. These file names are used
+ (perhaps more than once) later.
+
+ check for new machine-dep cmdline options in
+ md_parse_option definitions in config/tc-*.c. */
static void
parse_args (pargc, pargv)
@@ -352,24 +351,23 @@ parse_args (pargc, pargv)
char *shortopts;
extern CONST char *md_shortopts;
- static const char std_shortopts[] =
- {
- '-', 'J',
+ static const char std_shortopts[] = {
+ '-', 'J',
#ifndef WORKING_DOT_WORD
- /* -K is not meaningful if .word is not being hacked. */
- 'K',
+ /* -K is not meaningful if .word is not being hacked. */
+ 'K',
#endif
- 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':',
+ 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':',
#ifndef VMS
- /* -v takes an argument on VMS, so we don't make it a generic
- option. */
- 'v',
+ /* -v takes an argument on VMS, so we don't make it a generic
+ option. */
+ 'v',
#endif
- 'w', 'X',
- /* New option for extending instruction set (see also --itbl below) */
- 't', ':',
- '\0'
- };
+ 'w', 'X',
+ /* New option for extending instruction set (see also --itbl below) */
+ 't', ':',
+ '\0'
+ };
struct option *longopts;
extern struct option md_longopts[];
extern size_t md_longopts_size;
@@ -403,7 +401,7 @@ parse_args (pargc, pargv)
#define OPTION_LISTING_LHS_WIDTH (OPTION_STD_BASE + 9)
{"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH},
#define OPTION_LISTING_LHS_WIDTH2 (OPTION_STD_BASE + 10)
- {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
+ {"listing-lhs-width2", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
#define OPTION_LISTING_RHS_WIDTH (OPTION_STD_BASE + 11)
{"listing-rhs-width", required_argument, NULL, OPTION_LISTING_RHS_WIDTH},
#define OPTION_LISTING_CONT_LINES (OPTION_STD_BASE + 12)
@@ -421,17 +419,26 @@ parse_args (pargc, pargv)
{"no-warn", no_argument, NULL, 'W'},
#define OPTION_WARN (OPTION_STD_BASE + 18)
{"warn", no_argument, NULL, OPTION_WARN},
-#define OPTION_WARN_FATAL (OPTION_STD_BASE + 19)
+#define OPTION_TARGET_HELP (OPTION_STD_BASE + 19)
+ {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
+#define OPTION_WARN_FATAL (OPTION_STD_BASE + 20)
{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
+ /* When you add options here, check that they do not collide with
+ OPTION_MD_BASE. See as.h. */
};
- /* Construct the option lists from the standard list and the
- target dependent list. */
+ /* Construct the option lists from the standard list and the target
+ dependent list. Include space for an extra NULL option and
+ always NULL terminate. */
shortopts = concat (std_shortopts, md_shortopts, (char *) NULL);
- longopts = (struct option *) xmalloc (sizeof (std_longopts) + md_longopts_size);
+ longopts = (struct option *) xmalloc (sizeof (std_longopts)
+ + md_longopts_size
+ + sizeof (struct option));
memcpy (longopts, std_longopts, sizeof (std_longopts));
memcpy ((char *) longopts + sizeof (std_longopts),
md_longopts, md_longopts_size);
+ memset ((char *) longopts + sizeof (std_longopts) + md_longopts_size,
+ 0, sizeof (struct option));
/* Make a local copy of the old argv. */
old_argc = *pargc;
@@ -471,7 +478,7 @@ parse_args (pargc, pargv)
VMS code in md_parse_option can return 0 in that case,
but it has no way of pushing the filename argument back. */
if (optarg && *optarg)
- new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL;
+ new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL;
else
#else
case 'v':
@@ -480,7 +487,7 @@ parse_args (pargc, pargv)
print_version_id ();
break;
}
- /*FALLTHRU*/
+ /* Fall through. */
case '?':
exit (EXIT_FAILURE);
@@ -492,6 +499,10 @@ parse_args (pargc, pargv)
new_argv[new_argc] = NULL;
break;
+ case OPTION_TARGET_HELP:
+ md_show_usage (stdout);
+ exit (EXIT_SUCCESS);
+
case OPTION_HELP:
show_usage (stdout);
exit (EXIT_SUCCESS);
@@ -514,7 +525,7 @@ parse_args (pargc, pargv)
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
printf (_("GNU assembler %s\n"), VERSION);
- printf (_("Copyright 2000 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2001 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
@@ -546,7 +557,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case OPTION_DEFSYM:
{
char *s;
- long i;
+ valueT i;
struct defsym_list *n;
for (s = optarg; *s != '\0' && *s != '='; s++)
@@ -554,7 +565,11 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
if (*s == '\0')
as_fatal (_("bad defsym; format is --defsym name=value"));
*s++ = '\0';
+#ifdef BFD_ASSEMBLER
+ i = bfd_scan_vma (s, (const char **) NULL, 0);
+#else
i = strtol (s, (char **) NULL, 0);
+#endif
n = (struct defsym_list *) xmalloc (sizeof *n);
n->next = defsyms;
n->name = optarg;
@@ -566,29 +581,29 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case OPTION_INSTTBL:
case 't':
{
- /* optarg is the name of the file containing the instruction
- formats, opcodes, register names, etc. */
+ /* optarg is the name of the file containing the instruction
+ formats, opcodes, register names, etc. */
struct itbl_file_list *n;
if (optarg == NULL)
{
- as_warn ( _("No file name following -t option\n") );
+ as_warn (_("No file name following -t option\n"));
break;
}
-
+
n = (struct itbl_file_list *) xmalloc (sizeof *n);
n->next = itbl_files;
n->name = optarg;
itbl_files = n;
/* Parse the file and add the new instructions to our internal
- table. If multiple instruction tables are specified, the
- information from this table gets appended onto the existing
- internal table. */
+ table. If multiple instruction tables are specified, the
+ information from this table gets appended onto the existing
+ internal table. */
itbl_files->name = xstrdup (optarg);
if (itbl_parse (itbl_files->name) != 0)
{
- fprintf (stderr, _("Failed to read instruction table %s\n"),
+ fprintf (stderr, _("Failed to read instruction table %s\n"),
itbl_files->name);
exit (EXIT_SUCCESS);
}
@@ -602,7 +617,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case OPTION_GSTABS:
debug_type = DEBUG_STABS;
break;
-
+
case OPTION_GDWARF2:
debug_type = DEBUG_DWARF2;
break;
@@ -622,22 +637,22 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
break;
case OPTION_LISTING_LHS_WIDTH:
- listing_lhs_width = atoi(optarg);
+ listing_lhs_width = atoi (optarg);
if (listing_lhs_width_second < listing_lhs_width)
listing_lhs_width_second = listing_lhs_width;
break;
case OPTION_LISTING_LHS_WIDTH2:
{
- int tmp = atoi(optarg);
+ int tmp = atoi (optarg);
if (tmp > listing_lhs_width)
listing_lhs_width_second = tmp;
}
break;
case OPTION_LISTING_RHS_WIDTH:
- listing_rhs_width = atoi(optarg);
+ listing_rhs_width = atoi (optarg);
break;
case OPTION_LISTING_CONT_LINES:
- listing_lhs_cont_lines = atoi(optarg);
+ listing_lhs_cont_lines = atoi (optarg);
break;
case 'M':
@@ -672,6 +687,9 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case 'a':
if (optarg)
{
+ if (md_parse_option (optc, optarg) != 0)
+ break;
+
while (*optarg)
{
switch (*optarg)
@@ -713,8 +731,8 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
break;
case 'D':
- /* DEBUG is implemented: it debugs different */
- /* things from other people's assemblers. */
+ /* DEBUG is implemented: it debugs different
+ things from other people's assemblers. */
flag_debug = 1;
break;
@@ -723,7 +741,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
break;
case 'I':
- { /* Include file directory */
+ { /* Include file directory. */
char *temp = xstrdup (optarg);
add_include_dir (temp);
break;
@@ -737,7 +755,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
break;
case 'X':
- /* -X means treat warnings as errors */
+ /* -X means treat warnings as errors. */
break;
}
}
@@ -751,7 +769,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
static long start_time;
-int
+int
main (argc, argv)
int argc;
char **argv;
@@ -806,7 +824,7 @@ main (argc, argv)
symbol_begin ();
frag_init ();
subsegs_begin ();
- parse_args (&argc, &argv);
+ parse_args (&argc, &argv);
read_begin ();
input_scrub_begin ();
expr_begin ();
@@ -859,7 +877,8 @@ main (argc, argv)
PROGRESS (1);
- perform_an_assembly_pass (argc, argv); /* Assemble it. */
+ /* Assemble it. */
+ perform_an_assembly_pass (argc, argv);
cond_finish_check (-1);
@@ -867,6 +886,10 @@ main (argc, argv)
md_end ();
#endif
+ /* If we've been collecting dwarf2 .debug_line info, either for
+ assembly debugging or on behalf of the compiler, emit it now. */
+ dwarf2_finish ();
+
if (seen_at_least_1_file ()
&& (flag_always_generate_output || had_errors () == 0))
keep_it = 1;
@@ -895,8 +918,8 @@ main (argc, argv)
output_file_close (out_file_name);
#endif
- if (flag_fatal_warnings && had_warnings() > 0 && had_errors () == 0)
- as_bad (_("%d warnings, treating warnings as errors"), had_warnings());
+ if (flag_fatal_warnings && had_warnings () > 0 && had_errors () == 0)
+ as_bad (_("%d warnings, treating warnings as errors"), had_warnings ());
if (had_errors () > 0 && ! flag_always_generate_output)
keep_it = 0;
@@ -947,19 +970,16 @@ dump_statistics ()
#endif
}
+/* Here to attempt 1 pass over each input file.
+ We scan argv[*] looking for filenames or exactly "" which is
+ shorthand for stdin. Any argv that is NULL is not a file-name.
+ We set need_pass_2 TRUE if, after this, we still have unresolved
+ expressions of the form (unknown value)+-(unknown value).
-/* perform_an_assembly_pass()
- *
- * Here to attempt 1 pass over each input file.
- * We scan argv[*] looking for filenames or exactly "" which is
- * shorthand for stdin. Any argv that is NULL is not a file-name.
- * We set need_pass_2 TRUE if, after this, we still have unresolved
- * expressions of the form (unknown value)+-(unknown value).
- *
- * Note the un*x semantics: there is only 1 logical input file, but it
- * may be a catenation of many 'physical' input files.
- */
-static void
+ Note the un*x semantics: there is only 1 logical input file, but it
+ may be a catenation of many 'physical' input files. */
+
+static void
perform_an_assembly_pass (argc, argv)
int argc;
char **argv;
@@ -978,7 +998,7 @@ perform_an_assembly_pass (argc, argv)
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
segment_info[i].fix_root = 0;
}
- /* Create the three fixed ones */
+ /* Create the three fixed ones. */
{
segT seg;
@@ -1009,7 +1029,7 @@ perform_an_assembly_pass (argc, argv)
data_section = subseg_new (DATA_SECTION_NAME, 0);
bss_section = subseg_new (BSS_SECTION_NAME, 0);
/* @@ FIXME -- we're setting the RELOC flag so that sections are assumed
- to have relocs, otherwise we don't find out in time. */
+ to have relocs, otherwise we don't find out in time. */
applicable = bfd_applicable_section_flags (stdoutput);
bfd_set_section_flags (stdoutput, text_section,
applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC
@@ -1036,22 +1056,24 @@ perform_an_assembly_pass (argc, argv)
obj_begin ();
#endif
- argv++; /* skip argv[0] */
- argc--; /* skip argv[0] */
+ /* Skip argv[0]. */
+ argv++;
+ argc--;
+
while (argc--)
{
if (*argv)
- { /* Is it a file-name argument? */
+ { /* Is it a file-name argument? */
PROGRESS (1);
saw_a_file++;
- /* argv->"" if stdin desired, else->filename */
+ /* argv->"" if stdin desired, else->filename */
read_a_source_file (*argv);
}
- argv++; /* completed that argv */
+ argv++; /* completed that argv */
}
if (!saw_a_file)
read_a_source_file ("");
-} /* perform_an_assembly_pass() */
+}
/* The interface between the macro code and gas expression handling. */
@@ -1080,5 +1102,3 @@ macro_expr (emsg, idx, in, val)
return idx;
}
-
-/* end of as.c */
diff --git a/gnu/usr.bin/binutils/gas/as.h b/gnu/usr.bin/binutils/gas/as.h
index e56d6cda782..75abfa94877 100644
--- a/gnu/usr.bin/binutils/gas/as.h
+++ b/gnu/usr.bin/binutils/gas/as.h
@@ -1,5 +1,6 @@
/* as.h - global header file
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -21,8 +22,7 @@
#ifndef GAS
#define GAS 1
-/*
- * I think this stuff is largely out of date. xoxorich.
+/* I think this stuff is largely out of date. xoxorich.
*
* CAPITALISED names are #defined.
* "lowercaseH" is #defined if "lowercase.h" has been #include-d.
@@ -80,7 +80,7 @@ extern void *alloca ();
/* Now, tend to the rest of the configuration. */
-/* System include files first... */
+/* System include files first... */
#include <stdio.h>
#include <ctype.h>
#ifdef HAVE_STRING_H
@@ -106,8 +106,8 @@ extern void *alloca ();
150 isn't special; it's just an arbitrary non-ASCII char value. */
#define OPTION_STD_BASE 150
/* The first getopt value for machine-dependent long options.
- 170 gives the standard options room to grow. */
-#define OPTION_MD_BASE 170
+ 190 gives the standard options room to grow. */
+#define OPTION_MD_BASE 190
#ifdef DEBUG
#undef NDEBUG
@@ -136,8 +136,7 @@ extern void *alloca ();
#endif
-
-/* Now GNU header files... */
+/* Now GNU header files... */
#include "ansidecl.h"
#ifdef BFD_ASSEMBLER
#include "bfd.h"
@@ -185,9 +184,9 @@ extern char **environ;
/* Make Saber happier on obstack.h. */
#ifdef SABER
#undef __PTR_TO_INT
-#define __PTR_TO_INT(P) ((int)(P))
+#define __PTR_TO_INT(P) ((int) (P))
#undef __INT_TO_PTR
-#define __INT_TO_PTR(P) ((char *)(P))
+#define __INT_TO_PTR(P) ((char *) (P))
#endif
#ifndef __LINE__
@@ -222,11 +221,11 @@ extern char **environ;
#include "asintl.h"
-#define BAD_CASE(val) \
-{ \
- as_fatal(_("Case value %ld unexpected at line %d of file \"%s\"\n"), \
- (long) val, __LINE__, __FILE__); \
- }
+#define BAD_CASE(val) \
+ { \
+ as_fatal (_("Case value %ld unexpected at line %d of file \"%s\"\n"), \
+ (long) val, __LINE__, __FILE__); \
+ }
#include "flonum.h"
@@ -246,7 +245,7 @@ typedef addressT valueT;
#ifndef COMMON
#ifdef TEST
-#define COMMON /* declare our COMMONs storage here. */
+#define COMMON /* declare our COMMONs storage here. */
#else
#define COMMON extern /* our commons live elswhere */
#endif
@@ -263,12 +262,9 @@ typedef addressT valueT;
/* input_scrub.c */
-/*
- * Supplies sanitised buffers to read.c.
- * Also understands printing line-number part of error messages.
- */
+/* Supplies sanitised buffers to read.c.
+ Also understands printing line-number part of error messages. */
-
/* subsegs.c Sub-segments. Also, segment(=expression type)s.*/
#ifndef BFD_ASSEMBLER
@@ -291,20 +287,19 @@ typedef addressT valueT;
#define SEG_LIST SEG_TEXT,SEG_DATA,SEG_BSS
#endif
-typedef enum _segT
- {
- SEG_ABSOLUTE = 0,
- SEG_LIST,
- SEG_UNKNOWN,
- SEG_GOOF, /* Only happens if AS has a logic error. */
- /* Invented so we don't crash printing */
- /* error message involving weird segment. */
- SEG_EXPR, /* Intermediate expression values. */
- SEG_DEBUG, /* Debug segment */
- SEG_NTV, /* Transfert vector preload segment */
- SEG_PTV, /* Transfert vector postload segment */
- SEG_REGISTER /* Mythical: a register-valued expression */
- } segT;
+typedef enum _segT {
+ SEG_ABSOLUTE = 0,
+ SEG_LIST,
+ SEG_UNKNOWN,
+ SEG_GOOF, /* Only happens if AS has a logic error. */
+ /* Invented so we don't crash printing */
+ /* error message involving weird segment. */
+ SEG_EXPR, /* Intermediate expression values. */
+ SEG_DEBUG, /* Debug segment */
+ SEG_NTV, /* Transfert vector preload segment */
+ SEG_PTV, /* Transfert vector postload segment */
+ SEG_REGISTER /* Mythical: a register-valued expression */
+} segT;
#define SEG_MAXIMUM_ORDINAL (SEG_REGISTER)
#else
@@ -319,7 +314,7 @@ typedef int subsegT;
/* What subseg we are accreting now? */
COMMON subsegT now_subseg;
-/* Segment our instructions emit to. */
+/* Segment our instructions emit to. */
COMMON segT now_seg;
#ifdef BFD_ASSEMBLER
@@ -351,51 +346,57 @@ extern segT text_section, data_section, bss_section;
/* relax() */
-enum _relax_state
- {
- /* Variable chars to be repeated fr_offset times.
- Fr_symbol unused. Used with fr_offset == 0 for a
- constant length frag. */
- rs_fill = 1,
-
- /* Align. The fr_offset field holds the power of 2 to which to
- align. The fr_var field holds the number of characters in the
- fill pattern. The fr_subtype field holds the maximum number of
- bytes to skip when aligning, or 0 if there is no maximum. */
- rs_align,
-
- /* Align code. The fr_offset field holds the power of 2 to which
- to align. This type is only generated by machine specific
- code, which is normally responsible for handling the fill
- pattern. The fr_subtype field holds the maximum number of
- bytes to skip when aligning, or 0 if there is no maximum. */
- rs_align_code,
-
- /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill
- character. */
- rs_org,
+enum _relax_state {
+ /* Variable chars to be repeated fr_offset times.
+ Fr_symbol unused. Used with fr_offset == 0 for a
+ constant length frag. */
+ rs_fill = 1,
+
+ /* Align. The fr_offset field holds the power of 2 to which to
+ align. The fr_var field holds the number of characters in the
+ fill pattern. The fr_subtype field holds the maximum number of
+ bytes to skip when aligning, or 0 if there is no maximum. */
+ rs_align,
+
+ /* Align code. The fr_offset field holds the power of 2 to which
+ to align. This type is only generated by machine specific
+ code, which is normally responsible for handling the fill
+ pattern. The fr_subtype field holds the maximum number of
+ bytes to skip when aligning, or 0 if there is no maximum. */
+ rs_align_code,
+
+ /* Test for alignment. Like rs_align, but used by several targets
+ to warn if data is not properly aligned. */
+ rs_align_test,
+
+ /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill
+ character. */
+ rs_org,
#ifndef WORKING_DOT_WORD
- /* JF: gunpoint */
- rs_broken_word,
+ /* JF: gunpoint */
+ rs_broken_word,
#endif
- /* machine-specific relaxable (or similarly alterable) instruction */
- rs_machine_dependent,
+ /* machine-specific relaxable (or similarly alterable) instruction */
+ rs_machine_dependent,
- /* .space directive with expression operand that needs to be computed
- later. Similar to rs_org, but different.
- fr_symbol: operand
- 1 variable char: fill character */
- rs_space,
+ /* .space directive with expression operand that needs to be computed
+ later. Similar to rs_org, but different.
+ fr_symbol: operand
+ 1 variable char: fill character */
+ rs_space,
- /* A DWARF leb128 value; only ELF uses this. The subtype is 0 for
- unsigned, 1 for signed. */
- rs_leb128,
+ /* A DWARF leb128 value; only ELF uses this. The subtype is 0 for
+ unsigned, 1 for signed. */
+ rs_leb128,
- /* Exception frame information which we may be able to optimize. */
- rs_cfa
- };
+ /* Exception frame information which we may be able to optimize. */
+ rs_cfa,
+
+ /* Cross-fragment dwarf2 line number optimization. */
+ rs_dwarf2dbg
+};
typedef enum _relax_state relax_stateT;
@@ -436,7 +437,7 @@ COMMON int flag_fatal_warnings; /* --fatal-warnings */
are detected. */
COMMON unsigned char flag_always_generate_output; /* -Z */
-/* This is true if the assembler should output time and space usage. */
+/* This is true if the assembler should output time and space usage. */
COMMON unsigned char flag_print_statistics;
/* True if local absolute symbols are to be stripped. */
@@ -451,7 +452,7 @@ COMMON char *out_file_name;
/* name of file defining extensions to the basic instruction set */
COMMON char *insttbl_file_name;
-/* TRUE if we need a second pass. */
+/* TRUE if we need a second pass. */
COMMON int need_pass_2;
/* TRUE if we should do no relaxing, and
@@ -461,18 +462,22 @@ COMMON int linkrelax;
/* TRUE if we should produce a listing. */
extern int listing;
-/* Type of debugging information we should generate. We currently
- support stabs, ECOFF, and DWARF2. */
+/* Type of debugging information we should generate. We currently support
+ stabs, ECOFF, and DWARF2.
+
+ NOTE! This means debug information about the assembly source code itself
+ and _not_ about possible debug information from a high-level language.
+ This is especially relevant to DWARF2, since the compiler may emit line
+ number directives that the assembler resolves. */
-enum debug_info_type
- {
- DEBUG_UNSPECIFIED,
- DEBUG_NONE,
- DEBUG_STABS,
- DEBUG_ECOFF,
- DEBUG_DWARF,
- DEBUG_DWARF2
- };
+enum debug_info_type {
+ DEBUG_UNSPECIFIED,
+ DEBUG_NONE,
+ DEBUG_STABS,
+ DEBUG_ECOFF,
+ DEBUG_DWARF,
+ DEBUG_DWARF2
+};
extern enum debug_info_type debug_type;
@@ -483,15 +488,14 @@ extern int max_macro_nest;
increase malloc calls for monitoring memory allocation. */
extern int chunksize;
-struct _pseudo_type
- {
- /* assembler mnemonic, lower case, no '.' */
- const char *poc_name;
- /* Do the work */
- void (*poc_handler) PARAMS ((int));
- /* Value to pass to handler */
- int poc_val;
- };
+struct _pseudo_type {
+ /* assembler mnemonic, lower case, no '.' */
+ const char *poc_name;
+ /* Do the work */
+ void (*poc_handler) PARAMS ((int));
+ /* Value to pass to handler */
+ int poc_val;
+};
typedef struct _pseudo_type pseudo_typeS;
@@ -619,6 +623,10 @@ void eh_frame_convert_frag PARAMS ((fragS *));
/* this one starts the chain of target dependant headers */
#include "targ-env.h"
+#ifdef TC_ARC
+#include "struc-symbol.h"
+#endif
+
#include "write.h"
#include "frags.h"
#include "hash.h"
@@ -640,6 +648,12 @@ COMMON int flag_m68k_mri;
#define flag_m68k_mri 0
#endif
+#ifdef WARN_COMMENTS
+COMMON int warn_comment;
+COMMON unsigned int found_comment;
+COMMON char *found_comment_file;
+#endif
+
#ifndef NUMBERS_WITH_SUFFIX
#define NUMBERS_WITH_SUFFIX 0
#endif
@@ -677,5 +691,3 @@ COMMON int flag_m68k_mri;
#endif
#endif /* GAS */
-
-/* end of as.h */
diff --git a/gnu/usr.bin/binutils/gas/atof-generic.c b/gnu/usr.bin/binutils/gas/atof-generic.c
index de29f21341f..1309566de0b 100644
--- a/gnu/usr.bin/binutils/gas/atof-generic.c
+++ b/gnu/usr.bin/binutils/gas/atof-generic.c
@@ -1,5 +1,5 @@
/* atof_generic.c - turn a string of digits into a Flonum
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1998
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#include <ctype.h>
#include <string.h>
@@ -78,14 +79,14 @@ atof_generic (address_of_string_pointer,
string_of_decimal_marks,
string_of_decimal_exponent_marks,
address_of_generic_floating_point_number)
- /* return pointer to just AFTER number we read. */
+ /* return pointer to just AFTER number we read. */
char **address_of_string_pointer;
- /* At most one per number. */
+ /* At most one per number. */
const char *string_of_decimal_marks;
const char *string_of_decimal_exponent_marks;
FLONUM_TYPE *address_of_generic_floating_point_number;
{
- int return_value; /* 0 means OK. */
+ int return_value; /* 0 means OK. */
char *first_digit;
unsigned int number_of_digits_before_decimal;
unsigned int number_of_digits_after_decimal;
@@ -184,9 +185,9 @@ atof_generic (address_of_string_pointer,
}
else
{
- break; /* p -> char after pre-decimal digits. */
+ break; /* p -> char after pre-decimal digits. */
}
- } /* For each digit before decimal mark. */
+ } /* For each digit before decimal mark. */
#ifndef OLD_FLOAT_READS
/* Ignore trailing 0's after the decimal point. The original code here
@@ -222,7 +223,7 @@ atof_generic (address_of_string_pointer,
{
if (isdigit ((unsigned char) c))
{
- /* This may be retracted below. */
+ /* This may be retracted below. */
number_of_digits_after_decimal++;
if ( /* seen_significant_digit || */ c > '0')
@@ -238,7 +239,7 @@ atof_generic (address_of_string_pointer,
}
break;
}
- } /* For each digit after decimal mark. */
+ } /* For each digit after decimal mark. */
}
while (number_of_digits_after_decimal
@@ -295,8 +296,6 @@ atof_generic (address_of_string_pointer,
*address_of_string_pointer = p;
-
-
number_of_digits_available =
number_of_digits_before_decimal + number_of_digits_after_decimal;
return_value = 0;
@@ -311,7 +310,7 @@ atof_generic (address_of_string_pointer,
}
else
{
- int count; /* Number of useful digits left to scan. */
+ int count; /* Number of useful digits left to scan. */
LITTLENUM_TYPE *digits_binary_low;
unsigned int precision;
@@ -326,7 +325,7 @@ atof_generic (address_of_string_pointer,
precision = (address_of_generic_floating_point_number->high
- address_of_generic_floating_point_number->low
- + 1); /* Number of destination littlenums. */
+ + 1); /* Number of destination littlenums. */
/* Includes guard bits (two littlenums worth) */
#if 0 /* The integer version below is very close, and it doesn't
@@ -335,12 +334,12 @@ atof_generic (address_of_string_pointer,
maximum_useful_digits = (((double) (precision - 2))
* ((double) (LITTLENUM_NUMBER_OF_BITS))
/ (LOG_TO_BASE_2_OF_10))
- + 2; /* 2 :: guard digits. */
+ + 2; /* 2 :: guard digits. */
#else
maximum_useful_digits = (((precision - 2))
* ( (LITTLENUM_NUMBER_OF_BITS))
* 1000000 / 3321928)
- + 2; /* 2 :: guard digits. */
+ + 2; /* 2 :: guard digits. */
#endif
if (number_of_digits_available > maximum_useful_digits)
@@ -388,7 +387,7 @@ atof_generic (address_of_string_pointer,
memset ((char *) digits_binary_low, '\0', size_of_digits_in_chars);
- /* Digits_binary_low[] is allocated and zeroed. */
+ /* Digits_binary_low[] is allocated and zeroed. */
/*
* Parse the decimal digits as if * digits_low was in the units position.
@@ -440,11 +439,10 @@ atof_generic (address_of_string_pointer,
}
else
{
- ++count; /* '.' doesn't alter digits used count. */
+ ++count; /* '.' doesn't alter digits used count. */
}
}
-
/*
* Digits_binary_low[] properly encodes the value of the digits.
* Forget about any high-order littlenums that are 0.
@@ -480,7 +478,7 @@ atof_generic (address_of_string_pointer,
LITTLENUM_TYPE *power_binary_low;
int decimal_exponent_is_negative;
- /* This refers to the "-56" in "12.34E-56". */
+ /* This refers to the "-56" in "12.34E-56". */
/* FALSE: decimal_exponent is positive (or 0) */
/* TRUE: decimal_exponent is negative */
FLONUM_TYPE temporary_flonum;
@@ -489,7 +487,7 @@ atof_generic (address_of_string_pointer,
unsigned int size_of_power_in_chars;
size_of_power_in_littlenums = precision;
- /* Precision has a built-in fudge factor so we get a few guard bits. */
+ /* Precision has a built-in fudge factor so we get a few guard bits. */
decimal_exponent_is_negative = decimal_exponent < 0;
if (decimal_exponent_is_negative)
@@ -497,7 +495,7 @@ atof_generic (address_of_string_pointer,
decimal_exponent = -decimal_exponent;
}
- /* From now on: the decimal exponent is > 0. Its sign is separate. */
+ /* From now on: the decimal exponent is > 0. Its sign is separate. */
size_of_power_in_chars = size_of_power_in_littlenums
* sizeof (LITTLENUM_TYPE) + 2;
@@ -530,7 +528,7 @@ atof_generic (address_of_string_pointer,
int place_number_limit;
/* Any 10^(2^n) whose "n" exceeds this */
/* value will fall off the end of */
- /* flonum_XXXX_powers_of_ten[]. */
+ /* flonum_XXXX_powers_of_ten[]. */
int place_number;
const FLONUM_TYPE *multiplicand; /* -> 10^(2^n) */
@@ -540,8 +538,8 @@ atof_generic (address_of_string_pointer,
? flonum_negative_powers_of_ten
: flonum_positive_powers_of_ten);
- for (place_number = 1;/* Place value of this bit of exponent. */
- decimal_exponent;/* Quit when no more 1 bits in exponent. */
+ for (place_number = 1;/* Place value of this bit of exponent. */
+ decimal_exponent;/* Quit when no more 1 bits in exponent. */
decimal_exponent >>= 1, place_number++)
{
if (decimal_exponent & 1)
@@ -586,7 +584,7 @@ atof_generic (address_of_string_pointer,
(void) putchar ('\n');
#endif
} /* If this bit of decimal_exponent was computable.*/
- } /* If this bit of decimal_exponent was set. */
+ } /* If this bit of decimal_exponent was set. */
} /* For each bit of binary representation of exponent */
#ifdef TRACE
printf ("after computing power_of_10_flonum:\n");
@@ -605,7 +603,7 @@ atof_generic (address_of_string_pointer,
*/
flonum_multip (&power_of_10_flonum, &digits_flonum, address_of_generic_floating_point_number);
- /* Assert sign of the number we made is '+'. */
+ /* Assert sign of the number we made is '+'. */
address_of_generic_floating_point_number->sign = digits_sign_char;
}
diff --git a/gnu/usr.bin/binutils/gas/cond.c b/gnu/usr.bin/binutils/gas/cond.c
index 025ca51b11a..6c6e8adfa38 100644
--- a/gnu/usr.bin/binutils/gas/cond.c
+++ b/gnu/usr.bin/binutils/gas/cond.c
@@ -1,5 +1,5 @@
/* cond.c - conditional assembly pseudo-ops, and .include
- Copyright (C) 1990, 91, 92, 93, 95, 96, 97, 98, 99, 2000
+ Copyright 1990, 1991, 1992, 1993, 1995, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -24,11 +24,11 @@
#include "obstack.h"
-/* This is allocated to grow and shrink as .ifdef/.endif pairs are scanned. */
+/* This is allocated to grow and shrink as .ifdef/.endif pairs are
+ scanned. */
struct obstack cond_obstack;
-struct file_line
-{
+struct file_line {
char *file;
unsigned int line;
};
@@ -36,8 +36,7 @@ struct file_line
/* We push one of these structures for each .if, and pop it at the
.endif. */
-struct conditional_frame
-{
+struct conditional_frame {
/* The source file & line number of the "if". */
struct file_line if_file_line;
/* The source file & line of the "else". */
@@ -48,7 +47,9 @@ struct conditional_frame
int else_seen;
/* Whether we are currently ignoring input. */
int ignoring;
- /* Whether a conditional at a higher level is ignoring input. */
+ /* Whether a conditional at a higher level is ignoring input.
+ Set also when a branch of an "if .. elseif .." tree has matched
+ to prevent further matches. */
int dead_tree;
/* Macro nesting level at which this conditional was created. */
int macro_nest;
@@ -59,15 +60,18 @@ static char *get_mri_string PARAMS ((int, int *));
static struct conditional_frame *current_cframe = NULL;
-void
+void
s_ifdef (arg)
int arg;
{
- register char *name; /* points to name of symbol */
- register symbolS *symbolP; /* Points to symbol */
+ /* Points to name of symbol. */
+ register char *name;
+ /* Points to symbol. */
+ register symbolS *symbolP;
struct conditional_frame cframe;
- SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */
+ /* Leading whitespace is part of operand. */
+ SKIP_WHITESPACE ();
name = input_line_pointer;
if (!is_name_beginner (*name))
@@ -98,9 +102,9 @@ s_ifdef (arg)
demand_empty_rest_of_line ();
} /* if a valid identifyer name */
-} /* s_ifdef() */
+}
-void
+void
s_if (arg)
int arg;
{
@@ -113,7 +117,8 @@ s_if (arg)
if (flag_mri)
stop = mri_comment_field (&stopc);
- SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */
+ /* Leading whitespace is part of operand. */
+ SKIP_WHITESPACE ();
if (current_cframe != NULL && current_cframe->ignoring)
{
@@ -158,7 +163,7 @@ s_if (arg)
mri_comment_end (stop, stopc);
demand_empty_rest_of_line ();
-} /* s_if() */
+}
/* Get a string for the MRI IFC or IFNC pseudo-ops. */
@@ -246,17 +251,13 @@ s_ifc (arg)
demand_empty_rest_of_line ();
}
-void
+void
s_elseif (arg)
int arg;
{
- expressionS operand;
- int t;
-
if (current_cframe == NULL)
{
as_bad (_("\".elseif\" without matching \".if\" - ignored"));
-
}
else if (current_cframe->else_seen)
{
@@ -273,60 +274,60 @@ s_elseif (arg)
as_where (&current_cframe->else_file_line.file,
&current_cframe->else_file_line.line);
- if (!current_cframe->dead_tree)
- {
- current_cframe->ignoring = !current_cframe->ignoring;
- if (LISTING_SKIP_COND ())
- {
- if (! current_cframe->ignoring)
- listing_list (1);
- else
- listing_list (2);
- }
- } /* if not a dead tree */
- } /* if error else do it */
-
-
- SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */
+ current_cframe->dead_tree |= !current_cframe->ignoring;
+ current_cframe->ignoring = current_cframe->dead_tree;
+ }
- if (current_cframe != NULL && current_cframe->ignoring)
+ if (current_cframe == NULL || current_cframe->ignoring)
{
- operand.X_add_number = 0;
while (! is_end_of_line[(unsigned char) *input_line_pointer])
++input_line_pointer;
+
+ if (current_cframe == NULL)
+ return;
}
else
{
+ expressionS operand;
+ int t;
+
+ /* Leading whitespace is part of operand. */
+ SKIP_WHITESPACE ();
+
expression (&operand);
if (operand.X_op != O_constant)
as_bad (_("non-constant expression in \".elseif\" statement"));
- }
-
- switch ((operatorT) arg)
- {
- case O_eq: t = operand.X_add_number == 0; break;
- case O_ne: t = operand.X_add_number != 0; break;
- case O_lt: t = operand.X_add_number < 0; break;
- case O_le: t = operand.X_add_number <= 0; break;
- case O_ge: t = operand.X_add_number >= 0; break;
- case O_gt: t = operand.X_add_number > 0; break;
- default:
- abort ();
- return;
- }
- current_cframe->ignoring = current_cframe->dead_tree || ! t;
+ switch ((operatorT) arg)
+ {
+ case O_eq: t = operand.X_add_number == 0; break;
+ case O_ne: t = operand.X_add_number != 0; break;
+ case O_lt: t = operand.X_add_number < 0; break;
+ case O_le: t = operand.X_add_number <= 0; break;
+ case O_ge: t = operand.X_add_number >= 0; break;
+ case O_gt: t = operand.X_add_number > 0; break;
+ default:
+ abort ();
+ return;
+ }
+
+ current_cframe->ignoring = current_cframe->dead_tree || ! t;
+ }
if (LISTING_SKIP_COND ()
- && current_cframe->ignoring
&& (current_cframe->previous_cframe == NULL
|| ! current_cframe->previous_cframe->ignoring))
- listing_list (2);
+ {
+ if (! current_cframe->ignoring)
+ listing_list (1);
+ else
+ listing_list (2);
+ }
demand_empty_rest_of_line ();
}
-void
+void
s_endif (arg)
int arg ATTRIBUTE_UNUSED;
{
@@ -356,16 +357,15 @@ s_endif (arg)
}
demand_empty_rest_of_line ();
-} /* s_endif() */
+}
-void
+void
s_else (arg)
int arg ATTRIBUTE_UNUSED;
{
if (current_cframe == NULL)
{
as_bad (_(".else without matching .if - ignored"));
-
}
else if (current_cframe->else_seen)
{
@@ -382,20 +382,21 @@ s_else (arg)
as_where (&current_cframe->else_file_line.file,
&current_cframe->else_file_line.line);
- if (!current_cframe->dead_tree)
+ current_cframe->ignoring =
+ current_cframe->dead_tree | !current_cframe->ignoring;
+
+ if (LISTING_SKIP_COND ()
+ && (current_cframe->previous_cframe == NULL
+ || ! current_cframe->previous_cframe->ignoring))
{
- current_cframe->ignoring = !current_cframe->ignoring;
- if (LISTING_SKIP_COND ())
- {
- if (! current_cframe->ignoring)
- listing_list (1);
- else
- listing_list (2);
- }
- } /* if not a dead tree */
+ if (! current_cframe->ignoring)
+ listing_list (1);
+ else
+ listing_list (2);
+ }
current_cframe->else_seen = 1;
- } /* if error else do it */
+ }
if (flag_mri)
{
@@ -404,9 +405,9 @@ s_else (arg)
}
demand_empty_rest_of_line ();
-} /* s_else() */
+}
-void
+void
s_ifeqs (arg)
int arg;
{
@@ -443,9 +444,9 @@ s_ifeqs (arg)
listing_list (2);
demand_empty_rest_of_line ();
-} /* s_ifeqs() */
+}
-int
+int
ignore_input ()
{
char *s;
@@ -477,9 +478,9 @@ ignore_input ()
return 0;
return (current_cframe != NULL) && (current_cframe->ignoring);
-} /* ignore_input() */
+}
-static void
+static void
initialize_cframe (cframe)
struct conditional_frame *cframe;
{
@@ -533,5 +534,3 @@ cond_exit_macro (nest)
obstack_free (&cond_obstack, hold);
}
}
-
-/* end of cond.c */
diff --git a/gnu/usr.bin/binutils/gas/config/atof-ieee.c b/gnu/usr.bin/binutils/gas/config/atof-ieee.c
index 2e3c0dc6d0f..ce6afbbd340 100644
--- a/gnu/usr.bin/binutils/gas/config/atof-ieee.c
+++ b/gnu/usr.bin/binutils/gas/config/atof-ieee.c
@@ -1,5 +1,5 @@
/* atof_ieee.c - turn a Flonum into an IEEE floating point number
- Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,6 +19,13 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+/* Some float formats are based on the IEEE standard, but use the
+ largest exponent for normal numbers instead of NaNs and infinites.
+ The macro TC_LARGEST_EXPONENT_IS_NORMAL should evaluate to true
+ if the target machine uses such a format. The macro can depend on
+ command line flags if necessary. There is no need to define the
+ macro if it would always be 0. */
+
#include "as.h"
/* Flonums returned here. */
@@ -29,7 +36,7 @@ static void unget_bits PARAMS ((int));
static void make_invalid_floating_point_number PARAMS ((LITTLENUM_TYPE *));
extern const char EXP_CHARS[];
-/* Precision in LittleNums. */
+/* Precision in LittleNums. */
/* Don't count the gap in the m68k extended precision format. */
#define MAX_PRECISION (5)
#define F_PRECISION (2)
@@ -37,9 +44,13 @@ extern const char EXP_CHARS[];
#define X_PRECISION (5)
#define P_PRECISION (5)
-/* Length in LittleNums of guard bits. */
+/* Length in LittleNums of guard bits. */
#define GUARD (2)
+#ifndef TC_LARGEST_EXPONENT_IS_NORMAL
+#define TC_LARGEST_EXPONENT_IS_NORMAL 0
+#endif
+
static const unsigned long mask[] =
{
0x00000000,
@@ -77,7 +88,6 @@ static const unsigned long mask[] =
0xffffffff,
};
-
static int bits_left_in_littlenum;
static int littlenums_left;
static LITTLENUM_TYPE *littlenum_pointer;
@@ -100,18 +110,22 @@ next_bits (number_of_bits)
{
bits_left_in_littlenum = LITTLENUM_NUMBER_OF_BITS - number_of_bits;
--littlenum_pointer;
- return_value |= (*littlenum_pointer >> bits_left_in_littlenum) & mask[number_of_bits];
+ return_value |=
+ (*littlenum_pointer >> bits_left_in_littlenum)
+ & mask[number_of_bits];
}
}
else
{
bits_left_in_littlenum -= number_of_bits;
- return_value = mask[number_of_bits] & (*littlenum_pointer >> bits_left_in_littlenum);
+ return_value =
+ mask[number_of_bits] & (*littlenum_pointer >> bits_left_in_littlenum);
}
- return (return_value);
+ return return_value;
}
-/* Num had better be less than LITTLENUM_NUMBER_OF_BITS */
+/* Num had better be less than LITTLENUM_NUMBER_OF_BITS. */
+
static void
unget_bits (num)
int num;
@@ -124,7 +138,8 @@ unget_bits (num)
}
else if (bits_left_in_littlenum + num > LITTLENUM_NUMBER_OF_BITS)
{
- bits_left_in_littlenum = num - (LITTLENUM_NUMBER_OF_BITS - bits_left_in_littlenum);
+ bits_left_in_littlenum =
+ num - (LITTLENUM_NUMBER_OF_BITS - bits_left_in_littlenum);
++littlenum_pointer;
++littlenums_left;
}
@@ -137,7 +152,8 @@ make_invalid_floating_point_number (words)
LITTLENUM_TYPE *words;
{
as_bad (_("cannot create floating-point number"));
- words[0] = (LITTLENUM_TYPE) ((unsigned) -1) >> 1; /* Zero the leftmost bit */
+ /* Zero the leftmost bit. */
+ words[0] = (LITTLENUM_TYPE) ((unsigned) -1) >> 1;
words[1] = (LITTLENUM_TYPE) -1;
words[2] = (LITTLENUM_TYPE) -1;
words[3] = (LITTLENUM_TYPE) -1;
@@ -145,29 +161,27 @@ make_invalid_floating_point_number (words)
words[5] = (LITTLENUM_TYPE) -1;
}
-/************************************************************************\
- * Warning: this returns 16-bit LITTLENUMs. It is up to the caller *
- * to figure out any alignment problems and to conspire for the *
- * bytes/word to be emitted in the right order. Bigendians beware! *
- * *
-\************************************************************************/
+/* Warning: This returns 16-bit LITTLENUMs. It is up to the caller to
+ figure out any alignment problems and to conspire for the
+ bytes/word to be emitted in the right order. Bigendians beware! */
/* Note that atof-ieee always has X and P precisions enabled. it is up
to md_atof to filter them out if the target machine does not support
them. */
-/* Returns pointer past text consumed. */
+/* Returns pointer past text consumed. */
+
char *
atof_ieee (str, what_kind, words)
- char *str; /* Text to convert to binary. */
- int what_kind; /* 'd', 'f', 'g', 'h' */
- LITTLENUM_TYPE *words; /* Build the binary here. */
+ char *str; /* Text to convert to binary. */
+ int what_kind; /* 'd', 'f', 'g', 'h'. */
+ LITTLENUM_TYPE *words; /* Build the binary here. */
{
- /* Extra bits for zeroed low-order bits. The 1st MAX_PRECISION are
- zeroed, the last contain flonum bits. */
+ /* Extra bits for zeroed low-order bits.
+ The 1st MAX_PRECISION are zeroed, the last contain flonum bits. */
static LITTLENUM_TYPE bits[MAX_PRECISION + MAX_PRECISION + GUARD];
char *return_value;
- /* Number of 16-bit words in the format. */
+ /* Number of 16-bit words in the format. */
int precision;
long exponent_bits;
FLONUM_TYPE save_gen_flonum;
@@ -186,7 +200,7 @@ atof_ieee (str, what_kind, words)
generic_floating_point_number.sign = '\0';
/* Use more LittleNums than seems necessary: the highest flonum may
- have 15 leading 0 bits, so could be useless. */
+ have 15 leading 0 bits, so could be useless. */
memset (bits, '\0', sizeof (LITTLENUM_TYPE) * MAX_PRECISION);
@@ -247,6 +261,7 @@ atof_ieee (str, what_kind, words)
}
/* Turn generic_floating_point_number into a real float/double/extended. */
+
int
gen_to_words (words, precision, exponent_bits)
LITTLENUM_TYPE *words;
@@ -274,19 +289,21 @@ gen_to_words (words, precision, exponent_bits)
if (generic_floating_point_number.low > generic_floating_point_number.leader)
{
- /* 0.0e0 seen. */
+ /* 0.0e0 seen. */
if (generic_floating_point_number.sign == '+')
words[0] = 0x0000;
else
words[0] = 0x8000;
memset (&words[1], '\0',
(words_end - words - 1) * sizeof (LITTLENUM_TYPE));
- return (return_value);
+ return return_value;
}
- /* NaN: Do the right thing */
+ /* NaN: Do the right thing. */
if (generic_floating_point_number.sign == 0)
{
+ if (TC_LARGEST_EXPONENT_IS_NORMAL)
+ as_warn ("NaNs are not supported by this target\n");
if (precision == F_PRECISION)
{
words[0] = 0x7fff;
@@ -301,17 +318,17 @@ gen_to_words (words, precision, exponent_bits)
words[3] = 0xffff;
words[4] = 0xffff;
words[5] = 0xffff;
-#else /* ! TC_M68K */
+#else /* ! TC_M68K */
#ifdef TC_I386
words[0] = 0xffff;
words[1] = 0xc000;
words[2] = 0;
words[3] = 0;
words[4] = 0;
-#else /* ! TC_I386 */
+#else /* ! TC_I386 */
abort ();
-#endif /* ! TC_I386 */
-#endif /* ! TC_M68K */
+#endif /* ! TC_I386 */
+#endif /* ! TC_M68K */
}
else
{
@@ -324,7 +341,10 @@ gen_to_words (words, precision, exponent_bits)
}
else if (generic_floating_point_number.sign == 'P')
{
- /* +INF: Do the right thing */
+ if (TC_LARGEST_EXPONENT_IS_NORMAL)
+ as_warn ("Infinities are not supported by this target\n");
+
+ /* +INF: Do the right thing. */
if (precision == F_PRECISION)
{
words[0] = 0x7f80;
@@ -339,17 +359,17 @@ gen_to_words (words, precision, exponent_bits)
words[3] = 0;
words[4] = 0;
words[5] = 0;
-#else /* ! TC_M68K */
+#else /* ! TC_M68K */
#ifdef TC_I386
words[0] = 0x7fff;
words[1] = 0x8000;
words[2] = 0;
words[3] = 0;
words[4] = 0;
-#else /* ! TC_I386 */
+#else /* ! TC_I386 */
abort ();
-#endif /* ! TC_I386 */
-#endif /* ! TC_M68K */
+#endif /* ! TC_I386 */
+#endif /* ! TC_M68K */
}
else
{
@@ -358,11 +378,14 @@ gen_to_words (words, precision, exponent_bits)
words[2] = 0;
words[3] = 0;
}
- return (return_value);
+ return return_value;
}
else if (generic_floating_point_number.sign == 'N')
{
- /* Negative INF */
+ if (TC_LARGEST_EXPONENT_IS_NORMAL)
+ as_warn ("Infinities are not supported by this target\n");
+
+ /* Negative INF. */
if (precision == F_PRECISION)
{
words[0] = 0xff80;
@@ -377,17 +400,17 @@ gen_to_words (words, precision, exponent_bits)
words[3] = 0;
words[4] = 0;
words[5] = 0;
-#else /* ! TC_M68K */
+#else /* ! TC_M68K */
#ifdef TC_I386
words[0] = 0xffff;
words[1] = 0x8000;
words[2] = 0;
words[3] = 0;
words[4] = 0;
-#else /* ! TC_I386 */
+#else /* ! TC_I386 */
abort ();
-#endif /* ! TC_I386 */
-#endif /* ! TC_M68K */
+#endif /* ! TC_I386 */
+#endif /* ! TC_M68K */
}
else
{
@@ -396,46 +419,49 @@ gen_to_words (words, precision, exponent_bits)
words[2] = 0x0;
words[3] = 0x0;
}
- return (return_value);
+ return return_value;
}
- /*
- * The floating point formats we support have:
- * Bit 15 is sign bit.
- * Bits 14:n are excess-whatever exponent.
- * Bits n-1:0 (if any) are most significant bits of fraction.
- * Bits 15:0 of the next word(s) are the next most significant bits.
- *
- * So we need: number of bits of exponent, number of bits of
- * mantissa.
- */
+
+ /* The floating point formats we support have:
+ Bit 15 is sign bit.
+ Bits 14:n are excess-whatever exponent.
+ Bits n-1:0 (if any) are most significant bits of fraction.
+ Bits 15:0 of the next word(s) are the next most significant bits.
+
+ So we need: number of bits of exponent, number of bits of
+ mantissa. */
bits_left_in_littlenum = LITTLENUM_NUMBER_OF_BITS;
littlenum_pointer = generic_floating_point_number.leader;
littlenums_left = (1
+ generic_floating_point_number.leader
- generic_floating_point_number.low);
- /* Seek (and forget) 1st significant bit */
+
+ /* Seek (and forget) 1st significant bit. */
for (exponent_skippage = 0; !next_bits (1); ++exponent_skippage);;
exponent_1 = (generic_floating_point_number.exponent
+ generic_floating_point_number.leader
+ 1
- generic_floating_point_number.low);
+
/* Radix LITTLENUM_RADIX, point just higher than
- generic_floating_point_number.leader. */
+ generic_floating_point_number.leader. */
exponent_2 = exponent_1 * LITTLENUM_NUMBER_OF_BITS;
- /* Radix 2. */
+
+ /* Radix 2. */
exponent_3 = exponent_2 - exponent_skippage;
- /* Forget leading zeros, forget 1st bit. */
+
+ /* Forget leading zeros, forget 1st bit. */
exponent_4 = exponent_3 + ((1 << (exponent_bits - 1)) - 2);
- /* Offset exponent. */
+ /* Offset exponent. */
lp = words;
- /* Word 1. Sign, exponent and perhaps high bits. */
+ /* Word 1. Sign, exponent and perhaps high bits. */
word1 = ((generic_floating_point_number.sign == '+')
? 0
: (1 << (LITTLENUM_NUMBER_OF_BITS - 1)));
- /* Assume 2's complement integers. */
+ /* Assume 2's complement integers. */
if (exponent_4 <= 0)
{
int prec_bits;
@@ -443,7 +469,8 @@ gen_to_words (words, precision, exponent_bits)
unget_bits (1);
num_bits = -exponent_4;
- prec_bits = LITTLENUM_NUMBER_OF_BITS * precision - (exponent_bits + 1 + num_bits);
+ prec_bits =
+ LITTLENUM_NUMBER_OF_BITS * precision - (exponent_bits + 1 + num_bits);
#ifdef TC_I386
if (precision == X_PRECISION && exponent_bits == 15)
{
@@ -457,14 +484,15 @@ gen_to_words (words, precision, exponent_bits)
if (num_bits >= LITTLENUM_NUMBER_OF_BITS - exponent_bits)
{
- /* Bigger than one littlenum */
+ /* Bigger than one littlenum. */
num_bits -= (LITTLENUM_NUMBER_OF_BITS - 1) - exponent_bits;
*lp++ = word1;
- if (num_bits + exponent_bits + 1 > precision * LITTLENUM_NUMBER_OF_BITS)
+ if (num_bits + exponent_bits + 1
+ > precision * LITTLENUM_NUMBER_OF_BITS)
{
- /* Exponent overflow */
+ /* Exponent overflow. */
make_invalid_floating_point_number (words);
- return (return_value);
+ return return_value;
}
#ifdef TC_M68K
if (precision == X_PRECISION && exponent_bits == 15)
@@ -490,14 +518,15 @@ gen_to_words (words, precision, exponent_bits)
}
else
{
- word1 |= next_bits ((LITTLENUM_NUMBER_OF_BITS - 1) - (exponent_bits + num_bits));
+ word1 |= next_bits ((LITTLENUM_NUMBER_OF_BITS - 1)
+ - (exponent_bits + num_bits));
*lp++ = word1;
}
}
while (lp < words_end)
*lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS);
- /* Round the mantissa up, but don't change the number */
+ /* Round the mantissa up, but don't change the number. */
if (next_bits (1))
{
--lp;
@@ -568,17 +597,15 @@ gen_to_words (words, precision, exponent_bits)
return return_value;
}
- else if ((unsigned long) exponent_4 >= mask[exponent_bits])
+ else if ((unsigned long) exponent_4 > mask[exponent_bits]
+ || (! TC_LARGEST_EXPONENT_IS_NORMAL
+ && (unsigned long) exponent_4 == mask[exponent_bits]))
{
- /*
- * Exponent overflow. Lose immediately.
- */
-
- /*
- * We leave return_value alone: admit we read the
- * number, but return a floating exception
- * because we can't encode the number.
- */
+ /* Exponent overflow. Lose immediately. */
+
+ /* We leave return_value alone: admit we read the
+ number, but return a floating exception
+ because we can't encode the number. */
make_invalid_floating_point_number (words);
return return_value;
}
@@ -591,7 +618,7 @@ gen_to_words (words, precision, exponent_bits)
*lp++ = word1;
/* X_PRECISION is special: on the 68k, it has 16 bits of zero in the
- middle. Either way, it is then followed by a 1 bit. */
+ middle. Either way, it is then followed by a 1 bit. */
if (exponent_bits == 15 && precision == X_PRECISION)
{
#ifdef TC_M68K
@@ -601,21 +628,19 @@ gen_to_words (words, precision, exponent_bits)
| next_bits (LITTLENUM_NUMBER_OF_BITS - 1));
}
- /* The rest of the words are just mantissa bits. */
+ /* The rest of the words are just mantissa bits. */
while (lp < words_end)
*lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS);
if (next_bits (1))
{
unsigned long carry;
- /*
- * Since the NEXT bit is a 1, round UP the mantissa.
- * The cunning design of these hidden-1 floats permits
- * us to let the mantissa overflow into the exponent, and
- * it 'does the right thing'. However, we lose if the
- * highest-order bit of the lowest-order word flips.
- * Is that clear?
- */
+ /* Since the NEXT bit is a 1, round UP the mantissa.
+ The cunning design of these hidden-1 floats permits
+ us to let the mantissa overflow into the exponent, and
+ it 'does the right thing'. However, we lose if the
+ highest-order bit of the lowest-order word flips.
+ Is that clear? */
/* #if (sizeof(carry)) < ((sizeof(bits[0]) * BITS_PER_CHAR) + 2)
Please allow at least 1 more bit in carry than is in a LITTLENUM.
@@ -640,33 +665,36 @@ gen_to_words (words, precision, exponent_bits)
{
#ifdef TC_M68K
/* On the m68k there is a gap of 16 bits. We must
- explicitly propagate the carry into the exponent. */
+ explicitly propagate the carry into the exponent. */
words[0] += words[1];
words[1] = 0;
lp++;
#endif
- /* Put back the integer bit. */
+ /* Put back the integer bit. */
lp[1] |= 1 << (LITTLENUM_NUMBER_OF_BITS - 1);
}
- }
+ }
if ((word1 ^ *words) & (1 << (LITTLENUM_NUMBER_OF_BITS - 1)))
{
- /* We leave return_value alone: admit we read the
- * number, but return a floating exception
- * because we can't encode the number.
- */
+ /* We leave return_value alone: admit we read the number,
+ but return a floating exception because we can't encode
+ the number. */
*words &= ~(1 << (LITTLENUM_NUMBER_OF_BITS - 1));
- /* make_invalid_floating_point_number (words); */
- /* return return_value; */
+#if 0
+ make_invalid_floating_point_number (words);
+ return return_value;
+#endif
}
}
- return (return_value);
+ return return_value;
}
-#if 0 /* unused */
+#if 0
+/* Unused. */
/* This routine is a real kludge. Someone really should do it better,
but I'm too lazy, and I don't understand this stuff all too well
anyway. (JF) */
+
static void
int_to_gen (x)
long x;
@@ -705,13 +733,9 @@ print_gen (gen)
sprintf (sbuf + strlen (sbuf), "%x %x %.12g\n", arr[0], arr[1], fv);
if (gen)
- {
- generic_floating_point_number = f;
- }
+ generic_floating_point_number = f;
return (sbuf);
}
#endif
-
-/* end of atof-ieee.c */
diff --git a/gnu/usr.bin/binutils/gas/config/atof-tahoe.c b/gnu/usr.bin/binutils/gas/config/atof-tahoe.c
index 760485c5fde..bd31eee18db 100644
--- a/gnu/usr.bin/binutils/gas/config/atof-tahoe.c
+++ b/gnu/usr.bin/binutils/gas/config/atof-tahoe.c
@@ -1,27 +1,25 @@
-
/* atof_tahoe.c - turn a string into a Tahoe floating point number
- Copyright (C) 1987, 1998 Free Software Foundation, Inc.
- */
+ Copyright 1987, 1993, 2000 Free Software Foundation, Inc.
/* This is really a simplified version of atof_vax.c. I glommed it wholesale
and then shaved it down. I don't even know how it works. (Don't you find
- my honesty refreshing? bowen@cs.Buffalo.EDU (Devon E Bowen)
+ my honesty refreshing? Devon E Bowen <bowen@cs.buffalo.edu>
- I don't allow uppercase letters in the precision descrpitors. Ie 'f' and
- 'd' are allowed but 'F' and 'D' aren't */
+ I don't allow uppercase letters in the precision descrpitors.
+ i.e. 'f' and 'd' are allowed but 'F' and 'D' aren't. */
#include "as.h"
-/* Precision in LittleNums. */
+/* Precision in LittleNums. */
#define MAX_PRECISION (4)
#define D_PRECISION (4)
#define F_PRECISION (2)
-/* Precision in chars. */
+/* Precision in chars. */
#define D_PRECISION_CHARS (8)
#define F_PRECISION_CHARS (4)
-/* Length in LittleNums of guard bits. */
+/* Length in LittleNums of guard bits. */
#define GUARD (2)
static const long int mask[] =
@@ -61,22 +59,21 @@ static const long int mask[] =
0xffffffff
};
-
-/* Shared between flonum_gen2tahoe and next_bits */
+/* Shared between flonum_gen2tahoe and next_bits. */
static int bits_left_in_littlenum;
static LITTLENUM_TYPE *littlenum_pointer;
static LITTLENUM_TYPE *littlenum_end;
#if __STDC__ == 1
-int flonum_gen2tahoe (int format_letter, FLONUM_TYPE * f, LITTLENUM_TYPE * words);
+int flonum_gen2tahoe (int format_letter, FLONUM_TYPE * f,
+ LITTLENUM_TYPE * words);
-#else /* not __STDC__ */
+#else /* not __STDC__ */
int flonum_gen2tahoe ();
-#endif /* not __STDC__ */
-
+#endif /* not __STDC__ */
static int
next_bits (number_of_bits)
@@ -103,23 +100,29 @@ next_bits (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;
{
- *words = 0x8000; /* Floating Reserved Operand Code */
+ /* Floating Reserved Operand Code. */
+ *words = 0x8000;
}
-static int /* 0 means letter is OK. */
+static int /* 0 means letter is OK. */
what_kind_of_float (letter, precisionP, exponent_bitsP)
- char letter; /* In: lowercase please. What kind of float? */
- int *precisionP; /* Number of 16-bit words in the float. */
- long int *exponent_bitsP; /* Number of exponent bits. */
+ /* In: lowercase please. What kind of float? */
+ char letter;
+
+ /* Number of 16-bit words in the float. */
+ int *precisionP;
+
+ /* Number of exponent bits. */
+ long int *exponent_bitsP;
{
- int retval; /* 0: OK. */
+ int retval; /* 0: OK. */
retval = 0;
switch (letter)
@@ -141,28 +144,23 @@ what_kind_of_float (letter, precisionP, exponent_bitsP)
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! *
-* *
-\***********************************************************************/
-
-char * /* Return pointer past text consumed. */
+/* 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! */
+
+char * /* Return pointer past text consumed. */
atof_tahoe (str, what_kind, words)
- char *str; /* Text to convert to binary. */
+ char *str; /* Text to convert to binary. */
char what_kind; /* 'd', 'f', 'g', 'h' */
- LITTLENUM_TYPE *words; /* Build the binary here. */
+ 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. */
+ int precision; /* Number of 16-bit words in the format. */
long int exponent_bits;
return_value = str;
@@ -174,51 +172,50 @@ atof_tahoe (str, what_kind, words)
if (what_kind_of_float (what_kind, &precision, &exponent_bits))
{
- return_value = NULL; /* We lost. */
+ /* We lost. */
+ return_value = NULL;
make_invalid_floating_point_number (words);
}
if (return_value)
{
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 */
+ /* We lost. */
+ return_value = NULL;
}
else
{
if (flonum_gen2tahoe (what_kind, &f, words))
- {
- return_value = NULL;
- }
+ return_value = NULL;
}
}
- return (return_value);
+ return return_value;
}
-/*
- * In: a flonum, a Tahoe floating point format.
- * Out: a Tahoe floating-point bit pattern.
- */
+/* In: a flonum, a Tahoe floating point format.
+ Out: a Tahoe floating-point bit pattern. */
-int /* 0: OK. */
+int /* 0: OK. */
flonum_gen2tahoe (format_letter, f, words)
- char format_letter; /* One of 'd' 'f'. */
+ char format_letter; /* One of 'd' 'f'. */
FLONUM_TYPE *f;
- LITTLENUM_TYPE *words; /* Deliver answer here. */
+ LITTLENUM_TYPE *words; /* Deliver answer here. */
{
LITTLENUM_TYPE *lp;
int precision;
long int exponent_bits;
- int return_value; /* 0 == OK. */
+ int return_value; /* 0 == OK. */
- return_value = what_kind_of_float (format_letter, &precision, &exponent_bits);
+ return_value =
+ what_kind_of_float (format_letter, &precision, &exponent_bits);
if (return_value != 0)
{
make_invalid_floating_point_number (words);
@@ -227,7 +224,7 @@ flonum_gen2tahoe (format_letter, f, words)
{
if (f->low > f->leader)
{
- /* 0.0e0 seen. */
+ /* 0.0e0 seen. */
memset (words, '\0', sizeof (LITTLENUM_TYPE) * precision);
}
else
@@ -239,95 +236,91 @@ flonum_gen2tahoe (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 tahoe floating_point formats 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.
- *
- * So we need: number of bits of exponent, number of bits of
- * mantissa.
- */
+ /* All tahoe floating_point formats 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.
+
+ 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++)
- {
- }
+ ;
+
exponent_1 = f->exponent + f->leader + 1 - f->low;
- /* Radix LITTLENUM_RADIX, point just higher than f -> leader. */
+
+ /* Radix LITTLENUM_RADIX, point just higher than f -> leader. */
exponent_2 = exponent_1 * LITTLENUM_NUMBER_OF_BITS;
- /* Radix 2. */
+
+ /* Radix 2. */
exponent_3 = exponent_2 - exponent_skippage;
- /* Forget leading zeros, forget 1st bit. */
+
+ /* Forget leading zeros, forget 1st bit. */
exponent_4 = exponent_3 + (1 << (exponent_bits - 1));
- /* Offset exponent. */
+
+ /* Offset exponent. */
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. */
- word1 = ((exponent_4 & mask[exponent_bits]) << (15 - exponent_bits))
+ /* 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);
*lp++ = word1;
- /* The rest of the words are just mantissa bits. */
+ /* 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 int 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--)
@@ -337,26 +330,22 @@ flonum_gen2tahoe (format_letter, f, words)
carry >>= LITTLENUM_NUMBER_OF_BITS;
}
- if ((word1 ^ *words) & (1 << (LITTLENUM_NUMBER_OF_BITS - 1)))
+ 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);
+ } /* if (we needed to round up) */
+ } /* if (exponent overflow) */
+ } /* if (0.0e0) */
+ } /* if (float_type was OK) */
+ return return_value;
}
-/*
- * md_atof()
- *
- * In: input_line_pointer -> the 1st character of a floating-point
+/* 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.
@@ -367,8 +356,7 @@ flonum_gen2tahoe (format_letter, f, words)
* 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.
- */
+ * Number of chars we used for the literal. */
char *
md_atof (what_statement_type, literalP, sizeP)
@@ -383,15 +371,15 @@ md_atof (what_statement_type, literalP, sizeP)
switch (what_statement_type)
{
- case 'f': /* .ffloat */
- case 'd': /* .dfloat */
+ case 'f': /* .ffloat */
+ case 'd': /* .dfloat */
kind_of_float = what_statement_type;
break;
default:
kind_of_float = 0;
break;
- };
+ }
if (kind_of_float)
{
@@ -400,12 +388,10 @@ md_atof (what_statement_type, literalP, sizeP)
input_line_pointer = atof_tahoe (input_line_pointer,
kind_of_float,
words);
- /*
- * The atof_tahoe() builds up 16-bit numbers.
- * Since the assembler may not be running on
- * a different-endian machine, be very careful about
- * converting words to chars.
- */
+ /* The atof_tahoe() builds up 16-bit numbers.
+ Since the assembler may not be running on
+ a different-endian machine, be very careful about
+ converting words to chars. */
number_of_chars = (kind_of_float == 'f' ? F_PRECISION_CHARS :
(kind_of_float == 'd' ? D_PRECISION_CHARS : 0));
know (number_of_chars <= MAX_PRECISION * sizeof (LITTLENUM_TYPE));
@@ -417,15 +403,13 @@ md_atof (what_statement_type, literalP, sizeP)
md_number_to_chars (literalP, *littlenum_pointer,
sizeof (LITTLENUM_TYPE));
literalP += sizeof (LITTLENUM_TYPE);
- };
+ }
}
else
{
number_of_chars = 0;
- };
+ }
*sizeP = number_of_chars;
return kind_of_float ? 0 : _("Bad call to md_atof()");
}
-
-/* atof_tahoe.c */
diff --git a/gnu/usr.bin/binutils/gas/config/atof-vax.c b/gnu/usr.bin/binutils/gas/config/atof-vax.c
index 76ff0782868..7c9f04e7fd1 100644
--- a/gnu/usr.bin/binutils/gas/config/atof-vax.c
+++ b/gnu/usr.bin/binutils/gas/config/atof-vax.c
@@ -1,5 +1,5 @@
/* atof_vax.c - turn a Flonum into a VAX floating point number
- Copyright (C) 1987, 1992, 93, 95, 97, 98, 1999
+ Copyright 1987, 1992, 1993, 1995, 1997, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -27,20 +27,20 @@ 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. */
+/* Precision in LittleNums. */
#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. */
+/* Length in LittleNums of guard bits. */
#define GUARD (2)
int flonum_gen2vax PARAMS ((int format_letter, FLONUM_TYPE * f,
LITTLENUM_TYPE * words));
-/* Number of chars in flonum type 'letter'. */
+/* Number of chars in flonum type 'letter'. */
static int
atof_vax_sizeof (letter)
int letter;
@@ -154,13 +154,13 @@ make_invalid_floating_point_number (words)
*words = 0x8000; /* Floating Reserved Operand Code */
}
-static int /* 0 means letter is OK. */
+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. */
+ int *precisionP; /* Number of 16-bit words in the float. */
+ long *exponent_bitsP; /* Number of exponent bits. */
{
- int retval; /* 0: OK. */
+ int retval; /* 0: OK. */
retval = 0;
switch (letter)
@@ -201,19 +201,19 @@ what_kind_of_float (letter, precisionP, exponent_bitsP)
* *
\***********************************************************************/
-static char * /* Return pointer past text consumed. */
+static char * /* Return pointer past text consumed. */
atof_vax (str, what_kind, words)
- char *str; /* Text to convert to binary. */
+ char *str; /* Text to convert to binary. */
int what_kind; /* 'd', 'f', 'g', 'h' */
- LITTLENUM_TYPE *words; /* Build the binary here. */
+ 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. */
+ /* Extra bits for zeroed low-order bits. */
/* The 1st MAX_PRECISION are zeroed, */
- /* the last contain flonum bits. */
+ /* the last contain flonum bits. */
char *return_value;
- int precision; /* Number of 16-bit words in the format. */
+ int precision; /* Number of 16-bit words in the format. */
long exponent_bits;
return_value = str;
@@ -225,7 +225,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; /* We lost. */
make_invalid_floating_point_number (words);
}
@@ -235,7 +235,7 @@ atof_vax (str, what_kind, words)
/* Use more LittleNums than seems */
/* necessary: the highest flonum may have */
- /* 15 leading 0 bits, so could be useless. */
+ /* 15 leading 0 bits, so could be useless. */
f.high = f.low + precision - 1 + GUARD;
if (atof_generic (&return_value, ".", "eE", &f))
@@ -259,16 +259,16 @@ atof_vax (str, what_kind, words)
* Out: a vax floating-point bit pattern.
*/
-int /* 0: OK. */
+int /* 0: OK. */
flonum_gen2vax (format_letter, f, words)
- int format_letter; /* One of 'd' 'f' 'g' 'h'. */
+ int format_letter; /* One of 'd' 'f' 'g' 'h'. */
FLONUM_TYPE *f;
- LITTLENUM_TYPE *words; /* Deliver answer here. */
+ LITTLENUM_TYPE *words; /* Deliver answer here. */
{
LITTLENUM_TYPE *lp;
int precision;
long exponent_bits;
- int return_value; /* 0 == OK. */
+ int return_value; /* 0 == OK. */
return_value = what_kind_of_float (format_letter, &precision, &exponent_bits);
@@ -280,7 +280,7 @@ flonum_gen2vax (format_letter, f, words)
{
if (f->low > f->leader)
{
- /* 0.0e0 seen. */
+ /* 0.0e0 seen. */
memset (words, '\0', sizeof (LITTLENUM_TYPE) * precision);
}
else
@@ -340,13 +340,13 @@ flonum_gen2vax (format_letter, f, words)
exponent_skippage++);;
exponent_1 = f->exponent + f->leader + 1 - f->low;
- /* Radix LITTLENUM_RADIX, point just higher than f->leader. */
+ /* Radix LITTLENUM_RADIX, point just higher than f->leader. */
exponent_2 = exponent_1 * LITTLENUM_NUMBER_OF_BITS;
- /* Radix 2. */
+ /* Radix 2. */
exponent_3 = exponent_2 - exponent_skippage;
- /* Forget leading zeros, forget 1st bit. */
+ /* Forget leading zeros, forget 1st bit. */
exponent_4 = exponent_3 + (1 << (exponent_bits - 1));
- /* Offset exponent. */
+ /* Offset exponent. */
if (exponent_4 & ~mask[exponent_bits])
{
@@ -366,14 +366,14 @@ flonum_gen2vax (format_letter, f, words)
{
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));
*lp++ = word1;
- /* The rest of the words are just mantissa bits. */
+ /* The rest of the words are just mantissa bits. */
for (; lp < words + precision; lp++)
{
*lp = next_bits (LITTLENUM_NUMBER_OF_BITS);
@@ -426,7 +426,6 @@ flonum_gen2vax (format_letter, f, words)
return (return_value);
} /* flonum_gen2vax() */
-
/* JF this used to be in vax.c but this looks like a better place for it */
/*
@@ -446,7 +445,7 @@ flonum_gen2vax (format_letter, f, words)
* Number of chars we used for the literal.
*/
-#define MAXIMUM_NUMBER_OF_LITTLENUMS (8) /* For .hfloats. */
+#define MAXIMUM_NUMBER_OF_LITTLENUMS (8) /* For .hfloats. */
char *
md_atof (what_statement_type, literalP, sizeP)
diff --git a/gnu/usr.bin/binutils/gas/config/m68k-parse.h b/gnu/usr.bin/binutils/gas/config/m68k-parse.h
index cdb5f60eb53..6482007504a 100644
--- a/gnu/usr.bin/binutils/gas/config/m68k-parse.h
+++ b/gnu/usr.bin/binutils/gas/config/m68k-parse.h
@@ -1,5 +1,5 @@
/* m68k-parse.h -- header file for m68k assembler
- Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 1999
+ Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -88,7 +88,7 @@ enum m68k_register
MACSR, /* MAC Status Reg */
MASK, /* Modulus Reg */
- /* These have to be grouped together for the movec instruction to work. */
+ /* These have to be grouped together for the movec instruction to work. */
USP, /* User Stack Pointer */
ISP, /* Interrupt stack pointer */
SFC,
@@ -171,7 +171,7 @@ enum m68k_register
ZADDR7,
/* Upper and lower half of data and address registers. Order *must*
- be DATAxL, ADDRxL, DATAxU, ADDRxU. */
+ be DATAxL, ADDRxL, DATAxU, ADDRxU. */
DATA0L, /* lower half of data registers */
DATA1L,
DATA2L,
diff --git a/gnu/usr.bin/binutils/gas/config/m68k-parse.y b/gnu/usr.bin/binutils/gas/config/m68k-parse.y
index 70a4e4fe86e..e24110f832a 100644
--- a/gnu/usr.bin/binutils/gas/config/m68k-parse.y
+++ b/gnu/usr.bin/binutils/gas/config/m68k-parse.y
@@ -1,5 +1,5 @@
/* m68k.y -- bison grammar for m68k operand parsing
- Copyright (C) 1995, 96, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Ken Raeburn and Ian Lance Taylor, Cygnus Support
This file is part of GAS, the GNU Assembler.
diff --git a/gnu/usr.bin/binutils/gas/config/obj-aout.c b/gnu/usr.bin/binutils/gas/config/obj-aout.c
index e258238735b..329ccb99f04 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-aout.c
+++ b/gnu/usr.bin/binutils/gas/config/obj-aout.c
@@ -1,5 +1,5 @@
/* a.out object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@ the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+02111-1307, USA. */
#define OBJ_HEADER "obj-aout.h"
@@ -99,13 +99,12 @@ const pseudo_typeS aout_pseudo_table[] =
{NULL, NULL, 0} /* end sentinel */
}; /* aout_pseudo_table */
-
#ifdef BFD_ASSEMBLER
void
obj_aout_frob_symbol (sym, punt)
symbolS *sym;
- int *punt;
+ int *punt ATTRIBUTE_UNUSED;
{
flagword flags;
asection *sec;
@@ -223,7 +222,7 @@ obj_aout_frob_file ()
#else /* ! BFD_ASSEMBLER */
-/* Relocation. */
+/* Relocation. */
/*
* emit_relocations()
@@ -233,7 +232,7 @@ obj_aout_frob_file ()
void
obj_emit_relocations (where, fixP, segment_address_in_file)
char **where;
- fixS *fixP; /* Fixup chain for this segment. */
+ fixS *fixP; /* Fixup chain for this segment. */
relax_addressT segment_address_in_file;
{
for (; fixP; fixP = fixP->fx_next)
@@ -322,13 +321,13 @@ obj_emit_symbols (where, symbol_rootP)
for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
{
/* Used to save the offset of the name. It is used to point
- to the string in memory but must be a file offset. */
+ to the string in memory but must be a file offset. */
register char *temp;
temp = S_GET_NAME (symbolP);
S_SET_OFFSET (symbolP, symbolP->sy_name_offset);
- /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */
+ /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */
if (!S_IS_DEBUG (symbolP) && !S_IS_DEFINED (symbolP))
S_SET_EXTERNAL (symbolP);
@@ -355,11 +354,11 @@ obj_emit_symbols (where, symbol_rootP)
static void
obj_aout_line (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
/* Assume delimiter is part of expression.
BSD4.2 as fails with delightful bug, so we
- are not being incompatible here. */
+ are not being incompatible here. */
new_logical_line ((char *) NULL, (int) (get_absolute_expression ()));
demand_empty_rest_of_line ();
} /* obj_aout_line() */
@@ -368,7 +367,7 @@ obj_aout_line (ignore)
static void
obj_aout_weak (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -396,12 +395,12 @@ obj_aout_weak (ignore)
/* Handle .type. On {Net,Open}BSD, this is used to set the n_other field,
which is then apparently used when doing dynamic linking. Older
- versions ogas ignored the .type pseudo-op, so we also ignore it if
+ versions of gas ignored the .type pseudo-op, so we also ignore it if
we can't parse it. */
static void
obj_aout_type (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -409,31 +408,28 @@ obj_aout_type (ignore)
name = input_line_pointer;
c = get_symbol_end ();
- sym = symbol_find (name);
+ sym = symbol_find_or_make (name);
*input_line_pointer = c;
- if (sym != NULL)
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == ',')
{
+ ++input_line_pointer;
SKIP_WHITESPACE ();
- if (*input_line_pointer == ',')
+ if (*input_line_pointer == '@')
{
++input_line_pointer;
- SKIP_WHITESPACE ();
- if (*input_line_pointer == '@')
- {
- ++input_line_pointer;
- if (strncmp (input_line_pointer, "object", 6) == 0)
+ if (strncmp (input_line_pointer, "object", 6) == 0)
#ifdef BFD_ASSEMBLER
- aout_symbol (symbol_get_bfdsym (sym))->other = 1;
+ aout_symbol (symbol_get_bfdsym (sym))->other = 1;
#else
- S_SET_OTHER (sym, 1);
+ S_SET_OTHER (sym, 1);
#endif
- else if (strncmp (input_line_pointer, "function", 8) == 0)
+ else if (strncmp (input_line_pointer, "function", 8) == 0)
#ifdef BFD_ASSEMBLER
- aout_symbol (symbol_get_bfdsym (sym))->other = 2;
+ aout_symbol (symbol_get_bfdsym (sym))->other = 2;
#else
- S_SET_OTHER (sym, 2);
+ S_SET_OTHER (sym, 2);
#endif
- }
}
}
@@ -453,7 +449,7 @@ obj_crawl_symbol_chain (headers)
tc_crawl_symbol_chain (headers);
- symbolPP = &symbol_rootP; /*->last symbol chain link. */
+ symbolPP = &symbol_rootP; /*->last symbol chain link. */
while ((symbolP = *symbolPP) != NULL)
{
if (symbolP->sy_mri_common)
@@ -496,8 +492,7 @@ obj_crawl_symbol_chain (headers)
switch was passed to gas.
All other symbols are output. We complain if a deleted
- symbol was marked external. */
-
+ symbol was marked external. */
if (!S_IS_REGISTER (symbolP)
&& (!S_GET_NAME (symbolP)
@@ -521,11 +516,11 @@ obj_crawl_symbol_chain (headers)
end of each string */
if (!S_IS_STABD (symbolP))
{
- /* Ordinary case. */
+ /* Ordinary case. */
symbolP->sy_name_offset = string_byte_count;
string_byte_count += strlen (S_GET_NAME (symbolP)) + 1;
}
- else /* .Stabd case. */
+ else /* .Stabd case. */
symbolP->sy_name_offset = 0;
symbolPP = &symbolP->sy_next;
}
@@ -541,7 +536,7 @@ obj_crawl_symbol_chain (headers)
register names... */
{
as_bad (_("Local symbol %s never defined."), decode_local_label_name (S_GET_NAME (symbolP)));
- } /* oops. */
+ } /* oops. */
/* Unhook it from the chain */
*symbolPP = symbol_next (symbolP);
@@ -592,7 +587,7 @@ obj_pre_write_hook (headers)
}
void
-DEFUN_VOID (s_sect)
+s_sect ()
{
/* Strip out the section name */
char *section_name;
@@ -655,7 +650,14 @@ DEFUN_VOID (s_sect)
static void aout_pop_insert PARAMS ((void));
static int obj_aout_s_get_other PARAMS ((symbolS *));
+static void obj_aout_s_set_other PARAMS ((symbolS *, int));
static int obj_aout_s_get_desc PARAMS ((symbolS *));
+static void obj_aout_s_set_desc PARAMS ((symbolS *, int));
+static int obj_aout_s_get_type PARAMS ((symbolS *));
+static void obj_aout_s_set_type PARAMS ((symbolS *, int));
+static int obj_aout_separate_stab_sections PARAMS ((void));
+static int obj_aout_sec_sym_ok_for_reloc PARAMS ((asection *));
+static void obj_aout_process_stab PARAMS ((segT, int, const char *, int, int, int));
static void
aout_pop_insert ()
@@ -670,6 +672,33 @@ obj_aout_s_get_other (sym)
return aout_symbol (symbol_get_bfdsym (sym))->other;
}
+static void
+obj_aout_s_set_other (sym, o)
+ symbolS *sym;
+ int o;
+{
+ aout_symbol (symbol_get_bfdsym (sym))->other = o;
+}
+
+static int
+obj_aout_sec_sym_ok_for_reloc (sec)
+ asection *sec ATTRIBUTE_UNUSED;
+{
+ return obj_sec_sym_ok_for_reloc (sec);
+}
+
+static void
+obj_aout_process_stab (seg, w, s, t, o, d)
+ segT seg ATTRIBUTE_UNUSED;
+ int w;
+ const char *s;
+ int t;
+ int o;
+ int d;
+{
+ aout_process_stab (w, s, t, o, d);
+}
+
static int
obj_aout_s_get_desc (sym)
symbolS *sym;
@@ -677,30 +706,67 @@ obj_aout_s_get_desc (sym)
return aout_symbol (symbol_get_bfdsym (sym))->desc;
}
+static void
+obj_aout_s_set_desc (sym, d)
+ symbolS *sym;
+ int d;
+{
+ aout_symbol (symbol_get_bfdsym (sym))->desc = d;
+}
+
+static int
+obj_aout_s_get_type (sym)
+ symbolS *sym;
+{
+ return aout_symbol (symbol_get_bfdsym (sym))->type;
+}
+static void
+obj_aout_s_set_type (sym, t)
+ symbolS *sym;
+ int t;
+{
+ aout_symbol (symbol_get_bfdsym (sym))->type = t;
+}
+
+static int
+obj_aout_separate_stab_sections ()
+{
+ return 0;
+}
+
+/* When changed, make sure these table entries match the single-format
+ definitions in obj-aout.h. */
const struct format_ops aout_format_ops =
{
bfd_target_aout_flavour,
1, /* dfl_leading_underscore */
0, /* emit_section_symbols */
+ 0, /* begin */
+ 0, /* app_file */
obj_aout_frob_symbol,
obj_aout_frob_file,
+ 0, /* frob_file_before_adjust */
0, /* frob_file_after_relocs */
0, /* s_get_size */
0, /* s_set_size */
0, /* s_get_align */
0, /* s_set_align */
obj_aout_s_get_other,
+ obj_aout_s_set_other,
obj_aout_s_get_desc,
+ obj_aout_s_set_desc,
+ obj_aout_s_get_type,
+ obj_aout_s_set_type,
0, /* copy_symbol_attributes */
0, /* generate_asm_lineno */
- 0, /* process_stab */
- 0, /* sec_sym_ok_for_reloc */
+ obj_aout_process_stab,
+ obj_aout_separate_stab_sections,
+ 0, /* init_stab_section */
+ obj_aout_sec_sym_ok_for_reloc,
aout_pop_insert,
0, /* ecoff_set_ext */
0, /* read_begin_hook */
0 /* symbol_new_hook */
};
#endif BFD_ASSEMBLER
-
-/* end of obj-aout.c */
diff --git a/gnu/usr.bin/binutils/gas/config/obj-aout.h b/gnu/usr.bin/binutils/gas/config/obj-aout.h
index d08302a49bf..54168d1f700 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-aout.h
+++ b/gnu/usr.bin/binutils/gas/config/obj-aout.h
@@ -1,5 +1,5 @@
/* obj-aout.h, a.out object file format for gas, the assembler.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
/* Tag to validate a.out object file format processing */
#define OBJ_AOUT 1
@@ -33,7 +33,7 @@
#else /* ! BFD_ASSEMBLER */
#ifndef VMS
-#include "aout_gnu.h" /* Needed to define struct nlist. Sigh. */
+#include "aout_gnu.h" /* Needed to define struct nlist. Sigh. */
#else
#include "a_out.h"
#endif
@@ -229,12 +229,12 @@ extern void obj_aout_frob_file PARAMS ((void));
typedef struct
{
struct exec header; /* a.out header */
- long string_table_size; /* names + '\0' + sizeof(int) */
+ long string_table_size; /* names + '\0' + sizeof (int) */
}
object_headers;
-/* line numbering stuff. */
+/* line numbering stuff. */
#define OBJ_EMIT_LINENO(a, b, c) {;}
struct fix;
@@ -248,5 +248,3 @@ void tc_aout_fix_to_chars PARAMS ((char *where, struct fix *fixP, relax_addressT
#define EMIT_SECTION_SYMBOLS 0
#define AOUT_STABS
-
-/* end of obj-aout.h */
diff --git a/gnu/usr.bin/binutils/gas/config/obj-bout.c b/gnu/usr.bin/binutils/gas/config/obj-bout.c
index dc79718620a..fcfbb56c0ad 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-bout.c
+++ b/gnu/usr.bin/binutils/gas/config/obj-bout.c
@@ -1,5 +1,5 @@
/* b.out object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,42 +17,43 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#include "as.h"
#include "obstack.h"
-const short /* in: segT out: N_TYPE bits */
- seg_N_TYPE[] =
+
+/* 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 */
+ 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 */
+{ /* N_TYPE == 0x1E = 32-2 */
+ SEG_UNKNOWN, /* N_UNDF == 0 */
SEG_GOOF,
- SEG_ABSOLUTE, /* N_ABS == 2 */
+ SEG_ABSOLUTE, /* N_ABS == 2 */
SEG_GOOF,
- SEG_TEXT, /* N_TEXT == 4 */
+ SEG_TEXT, /* N_TEXT == 4 */
SEG_GOOF,
- SEG_DATA, /* N_DATA == 6 */
+ SEG_DATA, /* N_DATA == 6 */
SEG_GOOF,
- SEG_BSS, /* N_BSS == 8 */
+ 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_REGISTER, /* dummy N_REGISTER for regs = 30 */
SEG_GOOF,
};
@@ -60,9 +61,9 @@ static void obj_bout_line PARAMS ((int));
const pseudo_typeS obj_pseudo_table[] =
{
- {"line", obj_bout_line, 0}, /* source code line number */
+ {"line", obj_bout_line, 0}, /* Source code line number. */
-/* coff debugging directives. Currently ignored silently */
+/* coff debugging directives. Currently ignored silently. */
{"def", s_ignore, 0},
{"dim", s_ignore, 0},
{"endef", s_ignore, 0},
@@ -77,20 +78,17 @@ const pseudo_typeS obj_pseudo_table[] =
{"ABORT", s_ignore, 0},
{"ident", s_ignore, 0},
- {NULL} /* end sentinel */
-}; /* obj_pseudo_table */
+ {NULL} /* End sentinel. */
+};
+
+/* Relocation. */
-/* Relocation. */
+/* Crawl along a fixS chain. Emit the segment's relocations. */
-/*
- * 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. */
+ fixS *fixP; /* Fixup chain for this segment. */
relax_addressT segment_address_in_file;
{
for (; fixP; fixP = fixP->fx_next)
@@ -108,33 +106,35 @@ obj_emit_relocations (where, fixP, segment_address_in_file)
tc_bout_fix_to_chars (*where, fixP, segment_address_in_file);
*where += sizeof (struct relocation_info);
- } /* if there's a symbol */
- } /* for each fixup */
+ } /* if there's a symbol */
+ } /* for each fixup */
+}
-} /* emit_relocations() */
+/* Aout file generation & utilities . */
-/* Aout file generation & utilities */
+/* Convert a lvalue to machine dependent data. */
-/* Convert a lvalue to machine dependent data */
void
obj_header_append (where, headers)
char **where;
object_headers *headers;
{
- /* Always leave in host byte order */
+ /* Always leave in host byte order. */
headers->header.a_talign = section_alignment[SEG_TEXT];
+ /* Force to at least 2. */
if (headers->header.a_talign < 2)
{
headers->header.a_talign = 2;
- } /* force to at least 2 */
+ }
headers->header.a_dalign = section_alignment[SEG_DATA];
headers->header.a_balign = section_alignment[SEG_BSS];
headers->header.a_tload = 0;
- headers->header.a_dload = md_section_align (SEG_DATA, H_GET_TEXT_SIZE (headers));
+ headers->header.a_dload =
+ md_section_align (SEG_DATA, H_GET_TEXT_SIZE (headers));
headers->header.a_relaxable = linkrelax;
@@ -170,19 +170,27 @@ obj_header_append (where, headers)
#else /* ! CROSS_COMPILE */
append (where, (char *) &headers->header, sizeof (headers->header));
#endif /* ! CROSS_COMPILE */
-} /* a_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));
+ 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));
append (where, (char *) &symbolP->sy_symbol, sizeof (obj_symbol_type));
-} /* obj_symbol_to_chars() */
+}
void
obj_emit_symbols (where, symbol_rootP)
@@ -191,26 +199,24 @@ obj_emit_symbols (where, symbol_rootP)
{
symbolS *symbolP;
- /*
- * Emit all symbols left in the symbol chain.
- */
+ /* 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. */
+ /* 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;
temp = S_GET_NAME (symbolP);
S_SET_OFFSET (symbolP, symbolP->sy_name_offset);
- /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */
+ /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */
if (!S_IS_DEBUG (symbolP) && !S_IS_DEFINED (symbolP))
S_SET_EXTERNAL (symbolP);
obj_symbol_to_chars (where, symbolP);
S_SET_NAME (symbolP, temp);
}
-} /* emit_symbols() */
+}
void
obj_symbol_new_hook (symbolP)
@@ -224,12 +230,12 @@ static void
obj_bout_line (ignore)
int ignore;
{
- /* Assume delimiter is part of expression. */
- /* BSD4.2 as fails with delightful bug, so we */
- /* are not being incompatible here. */
+ /* 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_bout_line() */
+}
void
obj_read_begin_hook ()
@@ -246,13 +252,13 @@ obj_crawl_symbol_chain (headers)
tc_crawl_symbol_chain (headers);
- symbolPP = &symbol_rootP; /*->last symbol chain link. */
+ symbolPP = &symbol_rootP; /* -> last symbol chain link. */
while ((symbolP = *symbolPP) != NULL)
{
if (flag_readonly_data_in_text && (S_GET_SEGMENT (symbolP) == SEG_DATA))
{
S_SET_SEGMENT (symbolP, SEG_TEXT);
- } /* if pusing data into text */
+ } /* if pusing data into text */
resolve_symbol_value (symbolP, 1);
@@ -267,63 +273,62 @@ obj_crawl_symbol_chain (headers)
/* 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. */
+ All other symbols are output. We complain if a deleted
+ symbol was marked external. */
if (1
&& !S_IS_REGISTER (symbolP)
&& (!S_GET_NAME (symbolP)
|| S_IS_DEBUG (symbolP)
#ifdef TC_I960
- /* FIXME-SOON this ifdef seems highly dubious to me. xoxorich. */
+ /* FIXME-SOON this ifdef seems highly dubious to me. xoxorich. */
|| !S_IS_DEFINED (symbolP)
|| S_IS_EXTERNAL (symbolP)
#endif /* TC_I960 */
- || (S_GET_NAME (symbolP)[0] != '\001' && (flag_keep_locals || !S_LOCAL_NAME (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 */
+ /* The + 1 after strlen account for the \0 at the end of
+ each string. */
if (!S_IS_STABD (symbolP))
{
- /* Ordinary case. */
+ /* Ordinary case. */
symbolP->sy_name_offset = string_byte_count;
string_byte_count += strlen (S_GET_NAME (symbolP)) + 1;
}
- else /* .Stabd case. */
+ else /* .Stabd case. */
symbolP->sy_name_offset = 0;
- symbolPP = &(symbol_next (symbolP));
+ symbolPP = &(symbolP->sy_next);
}
else
{
if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP))
{
- as_bad (_("Local symbol %s never defined"), S_GET_NAME (symbolP));
- } /* oops. */
+ as_bad (_("Local symbol %s never defined"),
+ S_GET_NAME (symbolP));
+ } /* Oops. */
- /* Unhook it from the chain */
+ /* Unhook it from the chain. */
*symbolPP = symbol_next (symbolP);
- } /* if this symbol should be in the output */
- } /* for each symbol */
+ } /* 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.
- */
+/* Find strings by crawling along symbol table chain. */
void
obj_emit_strings (where)
@@ -336,14 +341,14 @@ obj_emit_strings (where)
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));
+ 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 (where, S_GET_NAME (symbolP), (unsigned long) (strlen (S_GET_NAME (symbolP)) + 1));
- } /* walk symbol chain */
+ append (where, S_GET_NAME (symbolP),
+ (unsigned long) (strlen (S_GET_NAME (symbolP)) + 1));
+ } /* Walk symbol chain. */
}
-
-/* end of obj-bout.c */
diff --git a/gnu/usr.bin/binutils/gas/config/obj-bout.h b/gnu/usr.bin/binutils/gas/config/obj-bout.h
index ec539a0cf44..f01fdca0848 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-bout.h
+++ b/gnu/usr.bin/binutils/gas/config/obj-bout.h
@@ -1,5 +1,5 @@
/* b.out object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public
License along with GAS; see the file COPYING. If not, write
to the Free Software Foundation, 59 Temple Place - Suite 330, Cambridge, MA
- 02139, USA. */
+ 02139, USA. */
/*
* This file is a modified version of 'a.out.h'. It is to be used in all GNU
@@ -56,7 +56,6 @@
* relocation info are never sent to the target.
*/
-
#define OBJ_BOUT 1
#define OUTPUT_FLAVOR bfd_target_aout_flavour
@@ -108,7 +107,7 @@ struct exec
};
#define N_BADMAG(x) (((x).a_magic)!=BMAGIC)
-#define N_TXTOFF(x) ( sizeof(struct exec) )
+#define N_TXTOFF(x) ( sizeof (struct exec) )
#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
#define N_TROFF(x) ( N_DATOFF(x) + (x).a_data )
#define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize )
@@ -240,14 +239,14 @@ struct relocation_info
/* File header macro and type definition */
-#define H_GET_FILE_SIZE(h) (sizeof(struct exec) + \
+#define H_GET_FILE_SIZE(h) (sizeof (struct exec) + \
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)->string_table_size)
-#define H_GET_HEADER_SIZE(h) (sizeof(struct exec))
+#define H_GET_HEADER_SIZE(h) (sizeof (struct exec))
#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)
@@ -276,7 +275,7 @@ struct relocation_info
#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) * \
- sizeof(struct nlist))
+ sizeof (struct nlist))
#define H_SET_MAGIC_NUMBER(h,v) ((h)->header.a_magic = (v))
@@ -292,12 +291,12 @@ struct relocation_info
typedef struct
{
struct exec header; /* a.out header */
- long string_table_size; /* names + '\0' + sizeof(int) */
+ long string_table_size; /* names + '\0' + sizeof (int) */
}
object_headers;
-/* unused hooks. */
+/* unused hooks. */
#define OBJ_EMIT_LINENO(a, b, c) {;}
#define obj_pre_write_hook(a) {;}
@@ -312,5 +311,3 @@ extern void tc_bout_fix_to_chars PARAMS ((char *where,
relax_addressT segment_address));
#define AOUT_STABS
-
-/* end of obj-bout.h */
diff --git a/gnu/usr.bin/binutils/gas/config/obj-coff.c b/gnu/usr.bin/binutils/gas/config/obj-coff.c
index a0847c4c600..69e5558a3b4 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-coff.c
+++ b/gnu/usr.bin/binutils/gas/config/obj-coff.c
@@ -1,5 +1,6 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS.
@@ -30,6 +31,13 @@
#define KEEP_RELOC_INFO
#endif
+/* The BFD_ASSEMBLER version of obj_coff_section will use this macro to set
+ a new section's attributes when a directive has no valid flags or the
+ "w" flag is used. This default should be appropriate for most. */
+#ifndef TC_COFF_SECTION_DEFAULT_ATTRIBUTES
+#define TC_COFF_SECTION_DEFAULT_ATTRIBUTES (SEC_LOAD | SEC_DATA)
+#endif
+
static void obj_coff_bss PARAMS ((int));
const char *s_get_name PARAMS ((symbolS * s));
static void obj_coff_ln PARAMS ((int));
@@ -204,7 +212,7 @@ obj_coff_weak (ignore)
char *name;
int c;
symbolS *symbolP;
-
+
do
{
name = input_line_pointer;
@@ -213,7 +221,7 @@ obj_coff_weak (ignore)
*input_line_pointer = c;
SKIP_WHITESPACE ();
-#ifdef BFD_ASSEMBLER
+#if defined BFD_ASSEMBLER || defined S_SET_WEAK
S_SET_WEAK (symbolP);
#endif
@@ -241,7 +249,7 @@ obj_coff_weak (ignore)
static void SA_SET_SYM_TAGNDX PARAMS ((symbolS *, symbolS *));
#define GET_FILENAME_STRING(X) \
-((char*)(&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1])
+((char*) (&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1])
/* @@ Ick. */
static segT
@@ -316,7 +324,7 @@ S_SET_STORAGE_CLASS (sym, val)
return val;
}
-/* Merge a debug symbol containing debug information into a normal symbol. */
+/* Merge a debug symbol containing debug information into a normal symbol. */
void
c_symbol_merge (debug, normal)
@@ -340,13 +348,13 @@ c_symbol_merge (debug, normal)
* sizeof (*SYM_AUXINFO (debug))));
}
- /* Move the debug flags. */
+ /* Move the debug flags. */
SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug));
}
void
c_dot_file_symbol (filename)
- char *filename;
+ const char *filename;
{
symbolS *symbolP;
@@ -401,7 +409,7 @@ coff_obj_symbol_new_hook (symbolP)
{
long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type);
char * s = (char *) xmalloc (sz);
-
+
memset (s, 0, sz);
coffsymbol (symbol_get_bfdsym (symbolP))->native = (combined_entry_type *) s;
@@ -411,7 +419,7 @@ coff_obj_symbol_new_hook (symbolP)
if (S_IS_STRING (symbolP))
SF_SET_STRING (symbolP);
-
+
if (S_IS_LOCAL (symbolP))
SF_SET_LOCAL (symbolP);
}
@@ -429,7 +437,7 @@ int coff_n_line_nos;
static void
add_lineno (frag, offset, num)
fragS *frag;
- int offset;
+ addressT offset;
int num;
{
struct line_no *new_line =
@@ -438,12 +446,17 @@ add_lineno (frag, offset, num)
{
abort ();
}
- if (num <= 0)
+
+#ifndef OBJ_XCOFF
+ /* The native aix assembler accepts negative line number */
+
+ if (num <= 0)
{
/* Zero is used as an end marker in the file. */
as_warn (_("Line numbers must be positive integers\n"));
num = 1;
}
+#endif /* OBJ_XCOFF */
new_line->next = line_nos;
new_line->frag = frag;
new_line->l.line_number = num;
@@ -652,7 +665,7 @@ static void
obj_coff_endef (ignore)
int ignore ATTRIBUTE_UNUSED;
{
- symbolS *symbolP;
+ symbolS *symbolP = NULL;
/* DIM BUG FIX sac@cygnus.com */
dim_index = 0;
@@ -663,7 +676,7 @@ obj_coff_endef (ignore)
return;
} /* if not inside .def/.endef */
- /* Set the section number according to storage class. */
+ /* Set the section number according to storage class. */
switch (S_GET_STORAGE_CLASS (def_symbol_in_progress))
{
case C_STRTAG:
@@ -678,7 +691,7 @@ obj_coff_endef (ignore)
break;
case C_EFCN:
- SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */
+ SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */
/* intentional fallthrough */
case C_BLOCK:
SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing */
@@ -693,7 +706,7 @@ obj_coff_endef (ignore)
{
switch (name[1])
{
- case 'b':
+ case 'b':
/* .bf */
if (! in_function ())
as_warn (_("`%s' symbol without preceding function"), name);
@@ -702,12 +715,12 @@ obj_coff_endef (ignore)
clear_function ();
break;
#ifdef TE_PE
- case 'e':
+ case 'e':
/* .ef */
/* The MS compilers output the actual endline, not the
function-relative one... we want to match without
changing the assembler input. */
- SA_SET_SYM_LNNO (def_symbol_in_progress,
+ SA_SET_SYM_LNNO (def_symbol_in_progress,
(SA_GET_SYM_LNNO (def_symbol_in_progress)
+ coff_line_base));
break;
@@ -725,16 +738,49 @@ obj_coff_endef (ignore)
case C_ARG:
case C_REGPARM:
case C_FIELD:
+
+ /* According to the COFF documentation:
+
+ http://osr5doc.sco.com:1996/topics/COFF_SectNumFld.html
+
+ A special section number (-2) marks symbolic debugging symbols,
+ including structure/union/enumeration tag names, typedefs, and
+ the name of the file. A section number of -1 indicates that the
+ symbol has a value but is not relocatable. Examples of
+ absolute-valued symbols include automatic and register variables,
+ function arguments, and .eos symbols.
+
+ But from Ian Lance Taylor:
+
+ http://sources.redhat.com/ml/binutils/2000-08/msg00202.html
+
+ the actual tools all marked them as section -1. So the GNU COFF
+ assembler follows historical COFF assemblers.
+
+ However, it causes problems for djgpp
+
+ http://sources.redhat.com/ml/binutils/2000-08/msg00210.html
+
+ By defining STRICTCOFF, a COFF port can make the assembler to
+ follow the documented behavior. */
+#ifdef STRICTCOFF
+ case C_MOS:
+ case C_MOE:
+ case C_MOU:
+ case C_EOS:
+#endif
SF_SET_DEBUG (def_symbol_in_progress);
S_SET_SEGMENT (def_symbol_in_progress, absolute_section);
break;
+#ifndef STRICTCOFF
case C_MOS:
case C_MOE:
case C_MOU:
case C_EOS:
S_SET_SEGMENT (def_symbol_in_progress, absolute_section);
break;
+#endif
case C_EXT:
case C_WEAKEXT:
@@ -768,11 +814,11 @@ obj_coff_endef (ignore)
lineno entry MUST point to the definition function or else it
will point off into space when obj_crawl_symbol_chain() merges
the debug symbol into the real symbol. Therefor, let's presume
- the debug symbol is a real function reference. */
+ the debug symbol is a real function reference. */
/* FIXME-SOON If for some reason the definition label/symbol is
never seen, this will probably leave an undefined symbol at link
- time. */
+ time. */
if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN
|| S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL
@@ -803,7 +849,7 @@ obj_coff_endef (ignore)
symbols. [loic] */
/* The debug entry (def_symbol_in_progress) is merged into the
- previous definition. */
+ previous definition. */
c_symbol_merge (def_symbol_in_progress, symbolP);
symbol_remove (def_symbol_in_progress, &symbol_rootP, &symbol_lastP);
@@ -816,7 +862,7 @@ obj_coff_endef (ignore)
{
/* For functions, and tags, and static symbols, the symbol
*must* be where the debug symbol appears. Move the
- existing symbol to the current place. */
+ existing symbol to the current place. */
/* If it already is at the end of the symbol list, do nothing */
if (def_symbol_in_progress != symbol_lastP)
{
@@ -846,7 +892,7 @@ obj_coff_endef (ignore)
if (symbolP == NULL)
{
/* That is, if this is the first time we've seen the
- function... */
+ function... */
symbol_table_insert (def_symbol_in_progress);
} /* definition follows debug */
} /* Create the line number entry pointing to the function being defined */
@@ -982,7 +1028,7 @@ obj_coff_tag (ignore)
#endif
/* Assume that the symbol referred to by .tag is always defined.
- This was a bad assumption. I've added find_or_make. xoxorich. */
+ This was a bad assumption. I've added find_or_make. xoxorich. */
SA_SET_SYM_TAGNDX (def_symbol_in_progress,
tag_find_or_make (symbol_name));
if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L)
@@ -1065,7 +1111,7 @@ obj_coff_val (ignore)
just below. */
}
/* Otherwise, it is the name of a non debug symbol and its value
- will be calculated later. */
+ will be calculated later. */
*input_line_pointer = name_end;
}
else
@@ -1079,7 +1125,7 @@ obj_coff_val (ignore)
void
coff_obj_read_begin_hook ()
{
- /* These had better be the same. Usually 18 bytes. */
+ /* These had better be the same. Usually 18 bytes. */
#ifndef BFD_HEADERS
know (sizeof (SYMENT) == sizeof (AUXENT));
know (SYMESZ == AUXESZ);
@@ -1087,7 +1133,6 @@ coff_obj_read_begin_hook ()
tag_init ();
}
-
symbolS *coff_last_function;
static symbolS *coff_last_bf;
@@ -1132,11 +1177,14 @@ coff_frob_symbol (symp, punt)
symbolS *real;
if (!SF_GET_LOCAL (symp)
&& !SF_GET_STATICS (symp)
+ && S_GET_STORAGE_CLASS (symp) != C_LABEL
+ && symbol_constant_p(symp)
&& (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP))
&& real != symp)
{
c_symbol_merge (symp, real);
*punt = 1;
+ return;
}
if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp))
{
@@ -1196,7 +1244,7 @@ coff_frob_symbol (symp, punt)
if (SF_GET_FUNCTION (symp))
symbol_get_bfdsym (symp)->flags |= BSF_FUNCTION;
- /* more ... */
+ /* more ... */
}
/* Double check weak symbols. */
@@ -1353,7 +1401,7 @@ obj_coff_section (ignore)
char c;
char *name;
unsigned int exp;
- flagword flags;
+ flagword flags, oldflags;
asection *sec;
if (flag_mri)
@@ -1375,7 +1423,7 @@ obj_coff_section (ignore)
SKIP_WHITESPACE ();
exp = 0;
- flags = SEC_LOAD;
+ flags = SEC_NO_FLAGS;
if (*input_line_pointer == ',')
{
@@ -1392,7 +1440,7 @@ obj_coff_section (ignore)
switch (*input_line_pointer)
{
case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break;
- case 'n': flags &=~ SEC_LOAD; break;
+ case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break;
case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */
case 'w': flags &=~ SEC_READONLY; break;
case 'x': flags |= SEC_CODE | SEC_LOAD; break;
@@ -1420,18 +1468,35 @@ obj_coff_section (ignore)
sec = subseg_new (name, (subsegT) exp);
- if (flags != SEC_NO_FLAGS)
+ oldflags = bfd_get_section_flags (stdoutput, sec);
+ if (oldflags == SEC_NO_FLAGS)
{
- flagword oldflags;
+ /* Set section flags for a new section just created by subseg_new.
+ Provide a default if no flags were parsed. */
+ if (flags == SEC_NO_FLAGS)
+ flags = TC_COFF_SECTION_DEFAULT_ATTRIBUTES;
- oldflags = bfd_get_section_flags (stdoutput, sec);
- oldflags &= SEC_LINK_ONCE | SEC_LINK_DUPLICATES;
- flags |= oldflags;
+#ifdef COFF_LONG_SECTION_NAMES
+ /* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce
+ sections so adjust_reloc_syms in write.c will correctly handle
+ relocs which refer to non-local symbols in these sections. */
+ if (strncmp (name, ".gnu.linkonce", sizeof (".gnu.linkonce") - 1) == 0)
+ flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+#endif
if (! bfd_set_section_flags (stdoutput, sec, flags))
- as_warn (_("error setting flags for \"%s\": %s"),
- bfd_section_name (stdoutput, sec),
- bfd_errmsg (bfd_get_error ()));
+ as_warn (_("error setting flags for \"%s\": %s"),
+ bfd_section_name (stdoutput, sec),
+ bfd_errmsg (bfd_get_error ()));
+ }
+ else if (flags != SEC_NO_FLAGS)
+ {
+ /* This section's attributes have already been set. Warn if the
+ attributes don't match. */
+ flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ | SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD);
+ if ((flags ^ oldflags) & matchflags)
+ as_warn (_("Ignoring changed section attributes for %s"), name);
}
demand_empty_rest_of_line ();
@@ -1459,14 +1524,26 @@ coff_frob_section (sec)
rounded up to multiples of the corresponding section alignments,
supposedly because standard COFF has no other way of encoding alignment
for sections. If your COFF flavor has a different way of encoding
- section alignment, then skip this step, as TICOFF does. */
+ section alignment, then skip this step, as TICOFF does. */
size = bfd_get_section_size_before_reloc (sec);
mask = ((bfd_vma) 1 << align_power) - 1;
#if !defined(TICOFF)
if (size & mask)
{
- size = (size + mask) & ~mask;
- bfd_set_section_size (stdoutput, sec, size);
+ bfd_vma new_size;
+ fragS *last;
+
+ new_size = (size + mask) & ~mask;
+ bfd_set_section_size (stdoutput, sec, new_size);
+
+ /* If the size had to be rounded up, add some padding in
+ the last non-empty frag. */
+ fragp = seg_info (sec)->frchainP->frch_root;
+ last = seg_info (sec)->frchainP->frch_last;
+ while (fragp->fr_next != last)
+ fragp = fragp->fr_next;
+ last->fr_address = size;
+ fragp->fr_offset += new_size - size;
}
#endif
@@ -1526,9 +1603,9 @@ obj_coff_init_stab_section (seg)
char *stabstr_name;
unsigned int stroff;
- /* Make space for this first symbol. */
+ /* Make space for this first symbol. */
p = frag_more (12);
- /* Zero it out. */
+ /* Zero it out. */
memset (p, 0, 12);
as_where (&file, (unsigned int *) NULL);
stabstr_name = (char *) alloca (strlen (seg->name) + 4);
@@ -1555,7 +1632,7 @@ symbol_dump ()
for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
{
- printf(_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"),
+ printf (_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"),
(unsigned long) symbolP,
S_GET_NAME(symbolP),
(long) S_GET_DATA_TYPE(symbolP),
@@ -1569,7 +1646,7 @@ symbol_dump ()
#else /* not BFD_ASSEMBLER */
#include "frags.h"
-/* This is needed because we include internal bfd things. */
+/* This is needed because we include internal bfd things. */
#include <time.h>
#include "libbfd.h"
@@ -1616,7 +1693,7 @@ int function_lineoff = -1; /* Offset in line#s where the last function
/* structure used to keep the filenames which
are too long around so that we can stick them
into the string table */
-struct filename_list
+struct filename_list
{
char *filename;
struct filename_list *next;
@@ -1641,22 +1718,18 @@ bfd *abfd;
static void fixup_segment PARAMS ((segment_info_type *segP,
segT this_segment_type));
-
static void fixup_mdeps PARAMS ((fragS *,
object_headers *,
segT));
-
static void fill_section PARAMS ((bfd * abfd,
object_headers *,
unsigned long *));
-
static int c_line_new PARAMS ((symbolS * symbol, long paddr,
int line_number,
fragS * frag));
-
static void w_symbols PARAMS ((bfd * abfd, char *where,
symbolS * symbol_rootP));
@@ -1717,7 +1790,6 @@ relax_align (address, alignment)
return (new_address - address);
}
-
segT
s_get_segment (x)
symbolS * x;
@@ -1760,6 +1832,7 @@ size_section (abfd, idx)
break;
case rs_align:
case rs_align_code:
+ case rs_align_test:
{
addressT off;
@@ -1780,7 +1853,6 @@ size_section (abfd, idx)
return size;
}
-
static unsigned int
count_entries_in_chain (idx)
unsigned int idx;
@@ -1986,7 +2058,6 @@ do_relocs_for (abfd, h, file_cursor)
H_SET_RELOCATION_SIZE (h, *file_cursor - reloc_start, 0);
}
-
/* run through a frag chain and write out the data to go with it, fill
in the scnhdrs with the info on the file postions
*/
@@ -2010,7 +2081,7 @@ fill_section (abfd, h, file_cursor)
if (s->s_name[0])
{
fragS *frag = segment_info[i].frchainP->frch_root;
- char *buffer;
+ char *buffer = NULL;
if (s->s_size == 0)
s->s_scnptr = 0;
@@ -2071,6 +2142,7 @@ fill_section (abfd, h, file_cursor)
case rs_fill:
case rs_align:
case rs_align_code:
+ case rs_align_test:
case rs_org:
if (frag->fr_fix)
{
@@ -2181,7 +2253,6 @@ coff_header_append (abfd, h)
}
}
-
char *
symbol_to_chars (abfd, where, symbolP)
bfd * abfd;
@@ -2232,7 +2303,7 @@ coff_obj_symbol_new_hook (symbolP)
char underscore = 0; /* Symbol has leading _ */
/* Effective symbol */
- /* Store the pointer in the offset. */
+ /* Store the pointer in the offset. */
S_SET_ZEROES (symbolP, 0L);
S_SET_DATA_TYPE (symbolP, T_NULL);
S_SET_STORAGE_CLASS (symbolP, 0);
@@ -2360,7 +2431,6 @@ obj_coff_def (what)
unsigned int dim_index;
-
static void
obj_coff_endef (ignore)
int ignore ATTRIBUTE_UNUSED;
@@ -2375,7 +2445,7 @@ obj_coff_endef (ignore)
return;
} /* if not inside .def/.endef */
- /* Set the section number according to storage class. */
+ /* Set the section number according to storage class. */
switch (S_GET_STORAGE_CLASS (def_symbol_in_progress))
{
case C_STRTAG:
@@ -2390,7 +2460,7 @@ obj_coff_endef (ignore)
break;
case C_EFCN:
- SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */
+ SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */
/* intentional fallthrough */
case C_BLOCK:
SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing */
@@ -2411,7 +2481,7 @@ obj_coff_endef (ignore)
SF_SET_PROCESS (def_symbol_in_progress);
function_lineoff = -1;
}
- /* Value is always set to . */
+ /* Value is always set to . */
def_symbol_in_progress->sy_frag = frag_now;
S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ());
break;
@@ -2462,11 +2532,11 @@ obj_coff_endef (ignore)
lineno entry MUST point to the definition function or else it
will point off into space when crawl_symbols() merges the debug
symbol into the real symbol. Therefor, let's presume the debug
- symbol is a real function reference. */
+ symbol is a real function reference. */
/* FIXME-SOON If for some reason the definition label/symbol is
never seen, this will probably leave an undefined symbol at link
- time. */
+ time. */
if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN
|| S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL
@@ -2492,7 +2562,7 @@ obj_coff_endef (ignore)
previous definition. */
c_symbol_merge (def_symbol_in_progress, symbolP);
- /* FIXME-SOON Should *def_symbol_in_progress be free'd? xoxorich. */
+ /* FIXME-SOON Should *def_symbol_in_progress be free'd? xoxorich. */
def_symbol_in_progress = symbolP;
if (SF_GET_FUNCTION (def_symbol_in_progress)
@@ -2501,7 +2571,7 @@ obj_coff_endef (ignore)
{
/* For functions, and tags, and static symbols, the symbol
*must* be where the debug symbol appears. Move the
- existing symbol to the current place. */
+ existing symbol to the current place. */
/* If it already is at the end of the symbol list, do nothing */
if (def_symbol_in_progress != symbol_lastP)
{
@@ -2535,7 +2605,7 @@ obj_coff_endef (ignore)
if (symbolP == NULL)
{
/* That is, if this is the first time we've seen the
- function... */
+ function... */
symbol_table_insert (def_symbol_in_progress);
} /* definition follows debug */
} /* Create the line number entry pointing to the function being defined */
@@ -2682,7 +2752,7 @@ obj_coff_tag (ignore)
#endif
/* Assume that the symbol referred to by .tag is always defined.
- This was a bad assumption. I've added find_or_make. xoxorich. */
+ This was a bad assumption. I've added find_or_make. xoxorich. */
SA_SET_SYM_TAGNDX (def_symbol_in_progress,
(long) tag_find_or_make (symbol_name));
if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L)
@@ -2764,7 +2834,7 @@ obj_coff_val (ignore)
just below. */
}
/* Otherwise, it is the name of a non debug symbol and
- its value will be calculated later. */
+ its value will be calculated later. */
*input_line_pointer = name_end;
/* FIXME: this is to avoid an error message in the
@@ -2802,7 +2872,7 @@ obj_coff_pe_handle_link_once (type)
void
coff_obj_read_begin_hook ()
{
- /* These had better be the same. Usually 18 bytes. */
+ /* These had better be the same. Usually 18 bytes. */
#ifndef BFD_HEADERS
know (sizeof (SYMENT) == sizeof (AUXENT));
know (SYMESZ == AUXESZ);
@@ -2857,7 +2927,7 @@ yank_symbols ()
/* Debug symbols do not need all this rubbish */
symbolS *real_symbolP;
- /* L* and C_EFCN symbols never merge. */
+ /* L* and C_EFCN symbols never merge. */
if (!SF_GET_LOCAL (symbolP)
&& !SF_GET_STATICS (symbolP)
&& S_GET_STORAGE_CLASS (symbolP) != C_LABEL
@@ -2866,12 +2936,12 @@ yank_symbols ()
&& real_symbolP != symbolP)
{
/* FIXME-SOON: where do dups come from?
- Maybe tag references before definitions? xoxorich. */
+ Maybe tag references before definitions? xoxorich. */
/* Move the debug data from the debug symbol to the
real symbol. Do NOT do the oposite (i.e. move from
real symbol to debug symbol and remove real symbol from the
list.) Because some pointers refer to the real symbol
- whereas no pointers refer to the debug symbol. */
+ whereas no pointers refer to the debug symbol. */
c_symbol_merge (symbolP, real_symbolP);
/* Replace the current symbol by the real one */
/* The symbols will never be the last or the first
@@ -2909,7 +2979,7 @@ yank_symbols ()
/* Mainly to speed up if not -g */
if (SF_GET_PROCESS (symbolP))
{
- /* Handle the nested blocks auxiliary info. */
+ /* Handle the nested blocks auxiliary info. */
if (S_GET_STORAGE_CLASS (symbolP) == C_BLOCK)
{
if (!strcmp (S_GET_NAME (symbolP), ".bb"))
@@ -2927,7 +2997,7 @@ yank_symbols ()
/* If we are able to identify the type of a function, and we
are out of a function (last_functionP == 0) then, the
function symbol will be associated with an auxiliary
- entry. */
+ entry. */
if (last_functionP == (symbolS *) 0 &&
SF_GET_FUNCTION (symbolP))
{
@@ -2938,7 +3008,7 @@ yank_symbols ()
S_SET_NUMBER_AUXILIARY (symbolP, 1);
} /* make it at least 1 */
- /* Clobber possible stale .dim information. */
+ /* Clobber possible stale .dim information. */
#if 0
/* Iffed out by steve - this fries the lnnoptr info too */
bzero (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen,
@@ -2971,7 +3041,7 @@ yank_symbols ()
else if (SF_GET_TAG (symbolP))
{
/* First descriptor of a structure must point to
- the first slot after the structure description. */
+ the first slot after the structure description. */
last_tagP = symbolP;
}
@@ -3011,8 +3081,7 @@ yank_symbols ()
[21] foo external
[22] .be
ld will move the symbol 21 to the end of the list but
- endndx will still be 22 instead of 21. */
-
+ endndx will still be 22 instead of 21. */
if (SF_GET_LOCAL (symbolP))
{
@@ -3086,7 +3155,6 @@ yank_symbols ()
}
-
static unsigned int
glue_symbols (head, tail)
symbolS **head;
@@ -3165,7 +3233,7 @@ crawl_symbols (h, abfd)
* undefined symbols at the end of the list.
*/
- /* Is there a .file symbol ? If not insert one at the beginning. */
+ /* Is there a .file symbol ? If not insert one at the beginning. */
if (symbol_rootP == NULL
|| S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE)
{
@@ -3176,7 +3244,6 @@ crawl_symbols (h, abfd)
* Build up static symbols for the sections, they are filled in later
*/
-
for (i = SEG_E0; i < SEG_LAST; i++)
if (segment_info[i].scnhdr.s_name[0])
segment_info[i].dot = c_section_symbol (segment_info[i].name,
@@ -3272,7 +3339,6 @@ do_linenos_for (abfd, h, file_cursor)
{
segment_info_type *s = segment_info + idx;
-
if (s->scnhdr.s_nlnno != 0)
{
struct lineno_list *line_ptr;
@@ -3289,19 +3355,19 @@ do_linenos_for (abfd, h, file_cursor)
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 */
- line_ptr->line.l_addr.l_symndx =
- ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number;
+ /* 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++;
@@ -3318,7 +3384,6 @@ do_linenos_for (abfd, h, file_cursor)
H_SET_LINENO_SIZE (h, *file_cursor - start);
}
-
/* Now we run through the list of frag chains in a segment and
make all the subsegment frags appear at the end of the
list, as if the seg 0 was extra long */
@@ -3359,7 +3424,6 @@ write_object_file ()
unsigned int addr;
abfd = bfd_openw (out_file_name, TARGET_FORMAT);
-
if (abfd == 0)
{
as_perror (_("FATAL: Can't create %s"), out_file_name);
@@ -3388,21 +3452,22 @@ write_object_file ()
md_do_align (SUB_SEGMENT_ALIGN (now_seg), (char *) NULL, 0, 0,
alignment_done);
#endif
- frag_align (SUB_SEGMENT_ALIGN (now_seg),
- subseg_text_p (now_seg) ? NOP_OPCODE : 0,
- 0);
+ if (subseg_text_p (now_seg))
+ frag_align_code (SUB_SEGMENT_ALIGN (now_seg), 0);
+ else
+ frag_align (SUB_SEGMENT_ALIGN (now_seg), 0, 0);
+
#ifdef md_do_align
alignment_done:
#endif
+
frag_wane (frag_now);
frag_now->fr_fix = 0;
know (frag_now->fr_next == NULL);
}
-
remove_subsegs ();
-
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
{
relax_segment (segment_info[i].frchainP->frch_root, i);
@@ -3476,7 +3541,7 @@ write_object_file ()
}
/* Look for ".stab" segments and fill in their initial symbols
- correctly. */
+ correctly. */
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
{
name = segment_info[i].name;
@@ -3537,7 +3602,7 @@ write_object_file ()
coff_header_append (abfd, &headers);
#if 0
/* Recent changes to write need this, but where it should
- go is up to Ken.. */
+ go is up to Ken.. */
if (bfd_close_all_done (abfd) == false)
as_fatal (_("Can't close %s: %s"), out_file_name,
bfd_errmsg (bfd_get_error ()));
@@ -3683,7 +3748,6 @@ obj_coff_section (ignore)
demand_empty_rest_of_line ();
}
-
static void
obj_coff_text (ignore)
int ignore ATTRIBUTE_UNUSED;
@@ -3691,7 +3755,6 @@ obj_coff_text (ignore)
subseg_new (".text", get_absolute_expression ());
}
-
static void
obj_coff_data (ignore)
int ignore ATTRIBUTE_UNUSED;
@@ -3733,7 +3796,7 @@ c_symbol_merge (debug, normal)
(unsigned int) (S_GET_NUMBER_AUXILIARY (debug) * AUXESZ));
} /* Move all the auxiliary information */
- /* Move the debug flags. */
+ /* Move the debug flags. */
SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug));
} /* c_symbol_merge() */
@@ -3763,7 +3826,6 @@ c_line_new (symbol, paddr, line_number, frag)
new_line->frag = (char *) frag;
new_line->next = (struct lineno_list *) NULL;
-
if (s->lineno_list_head == (struct lineno_list *) NULL)
{
s->lineno_list_head = new_line;
@@ -3805,13 +3867,13 @@ c_dot_file_symbol (filename)
SA_SET_FILE_FNAME_ZEROS (symbolP, 0);
SA_SET_FILE_FNAME_OFFSET (symbolP, 1);
- if (filename_list_tail)
+ if (filename_list_tail)
filename_list_tail->next = f;
else
filename_list_head = f;
- filename_list_tail = f;
+ filename_list_tail = f;
}
- else
+ else
{
SA_SET_FILE_FNAME (symbolP, filename);
}
@@ -3930,7 +3992,7 @@ w_symbols (abfd, where, symbol_rootP)
for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
{
/* Used to save the offset of the name. It is used to point
- to the string in memory but must be a file offset. */
+ to the string in memory but must be a file offset. */
register char *temp;
/* We can't fix the lnnoptr field in yank_symbols with the other
@@ -4001,10 +4063,10 @@ obj_coff_lcomm (ignore)
}
*p = 0;
- symbolP = symbol_find_or_make(name);
+ symbolP = symbol_find_or_make (name);
- if (S_GET_SEGMENT(symbolP) == SEG_UNKNOWN &&
- S_GET_VALUE(symbolP) == 0)
+ if (S_GET_SEGMENT (symbolP) == SEG_UNKNOWN &&
+ S_GET_VALUE (symbolP) == 0)
{
if (! need_pass_2)
{
@@ -4018,14 +4080,14 @@ obj_coff_lcomm (ignore)
(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);
+ S_SET_SEGMENT (symbolP, SEG_E2);
+ S_SET_STORAGE_CLASS (symbolP, C_STAT);
}
}
else
- as_bad(_("Symbol %s already defined"), name);
+ as_bad (_("Symbol %s already defined"), name);
- demand_empty_rest_of_line();
+ demand_empty_rest_of_line ();
#endif
}
@@ -4042,6 +4104,7 @@ fixup_mdeps (frags, h, this_segment)
{
case rs_align:
case rs_align_code:
+ case rs_align_test:
case rs_org:
#ifdef HANDLE_ALIGN
HANDLE_ALIGN (frags);
@@ -4112,7 +4175,7 @@ fixup_segment (segP, this_segment_type)
if (fixP->fx_tcbit && SF_GET_CALLNAME (add_symbolP))
{
/* Relocation should be done via the associated 'bal' entry
- point symbol. */
+ point symbol. */
if (!SF_GET_BALNAME (tc_get_bal_of_call (add_symbolP)))
{
@@ -4210,7 +4273,7 @@ fixup_segment (segP, this_segment_type)
{
/* Difference of 2 symbols from same segment. Can't
make difference of 2 undefineds: 'value' means
- something different for N_UNDF. */
+ something different for N_UNDF. */
#ifdef TC_I960
/* Makes no sense to use the difference of 2 arbitrary symbols
as the target of a call instruction. */
@@ -4237,7 +4300,7 @@ fixup_segment (segP, this_segment_type)
}
else
{
- /* Different segments in subtraction. */
+ /* Different segments in subtraction. */
know (!(S_IS_EXTERNAL (sub_symbolP) && (S_GET_SEGMENT (sub_symbolP) == absolute_section)));
if ((S_GET_SEGMENT (sub_symbolP) == absolute_section))
@@ -4246,7 +4309,7 @@ fixup_segment (segP, this_segment_type)
}
#ifdef DIFF_EXPR_OK
else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type
-#if 0 /* Okay for 68k, at least... */
+#if 0 /* Okay for 68k, at least... */
&& !pcrel
#endif
)
@@ -4306,7 +4369,7 @@ fixup_segment (segP, this_segment_type)
the i386 are relaxed, this could only arise with a
call instruction. */
- pcrel = 0; /* Lie. Don't want further pcrel processing. */
+ pcrel = 0; /* Lie. Don't want further pcrel processing. */
if (!TC_FORCE_RELOCATION (fixP))
{
fixP->fx_addsy = NULL;
@@ -4332,7 +4395,6 @@ fixup_segment (segP, this_segment_type)
break;
default:
-
#if defined(TC_A29K) || (defined(TE_PE) && defined(TC_I386)) || defined(TC_M88K)
/* This really should be handled in the linker, but
backward compatibility forbids. */
@@ -4367,13 +4429,12 @@ fixup_segment (segP, this_segment_type)
/* This is also true for 68k COFF on sysv machines
(Checked on Motorola sysv68 R3V6 and R3V7.1, and also on
UNIX System V/M68000, Release 1.0 from ATT/Bell Labs)
- Philippe De Muyter <phdm@info.ucl.ac.be>. */
+ Philippe De Muyter <phdm@info.ucl.ac.be>. */
if (S_IS_COMMON (add_symbolP))
add_number += S_GET_VALUE (add_symbolP);
#endif
break;
-
} /* switch on symbol seg */
} /* if not in local seg */
} /* if there was a + symbol */
@@ -4452,7 +4513,7 @@ fixup_segment (segP, this_segment_type)
(unsigned long) (fragP->fr_address + where));
#endif
} /* not a bit fix */
- } /* For each fixS in this segment. */
+ } /* For each fixS in this segment. */
} /* fixup_segment() */
#endif
@@ -4468,9 +4529,9 @@ obj_coff_init_stab_section (seg)
char *stabstr_name;
unsigned int stroff;
- /* Make space for this first symbol. */
+ /* Make space for this first symbol. */
p = frag_more (12);
- /* Zero it out. */
+ /* Zero it out. */
memset (p, 0, 12);
as_where (&file, (unsigned int *) NULL);
stabstr_name = (char *) alloca (strlen (segment_info[seg].name) + 4);
@@ -4495,7 +4556,7 @@ adjust_stab_section(abfd, seg)
int i, strsz = 0, nsyms;
fragS *frag = segment_info[seg].frchainP->frch_root;
- /* Look for the associated string table section. */
+ /* Look for the associated string table section. */
secname = segment_info[seg].name;
name = (char *) alloca (strlen (secname) + 4);
@@ -4512,14 +4573,14 @@ adjust_stab_section(abfd, seg)
}
}
- /* If we found the section, get its size. */
+ /* If we found the section, get its size. */
if (stabstrseg != SEG_UNKNOWN)
strsz = size_section (abfd, stabstrseg);
nsyms = size_section (abfd, seg) / 12 - 1;
/* Look for the first frag of sufficient size for the initial stab
- symbol, and collect a pointer to it. */
+ symbol, and collect a pointer to it. */
while (frag && frag->fr_fix < 12)
frag = frag->fr_next;
assert (frag != 0);
@@ -4527,7 +4588,7 @@ adjust_stab_section(abfd, seg)
assert (p != 0);
/* Write in the number of stab symbols and the size of the string
- table. */
+ table. */
bfd_h_put_16 (abfd, (bfd_vma) nsyms, (bfd_byte *) p + 6);
bfd_h_put_32 (abfd, (bfd_vma) strsz, (bfd_byte *) p + 8);
}
@@ -4582,6 +4643,7 @@ const pseudo_typeS coff_pseudo_table[] =
/* Support for a COFF emulation. */
static void coff_pop_insert PARAMS ((void));
+static int coff_separate_stab_sections PARAMS ((void));
static void
coff_pop_insert ()
@@ -4589,23 +4651,38 @@ coff_pop_insert ()
pop_insert (coff_pseudo_table);
}
+static int
+coff_separate_stab_sections ()
+{
+ return 1;
+}
+
const struct format_ops coff_format_ops =
{
bfd_target_coff_flavour,
0, /* dfl_leading_underscore */
1, /* emit_section_symbols */
+ 0, /* begin */
+ c_dot_file_symbol,
coff_frob_symbol,
0, /* frob_file */
+ 0, /* frob_file_before_adjust */
coff_frob_file_after_relocs,
0, /* s_get_size */
0, /* s_set_size */
0, /* s_get_align */
0, /* s_set_align */
0, /* s_get_other */
+ 0, /* s_set_other */
0, /* s_get_desc */
+ 0, /* s_set_desc */
+ 0, /* s_get_type */
+ 0, /* s_set_type */
0, /* copy_symbol_attributes */
0, /* generate_asm_lineno */
0, /* process_stab */
+ coff_separate_stab_sections,
+ obj_coff_init_stab_section,
0, /* sec_sym_ok_for_reloc */
coff_pop_insert,
0, /* ecoff_set_ext */
diff --git a/gnu/usr.bin/binutils/gas/config/obj-coff.h b/gnu/usr.bin/binutils/gas/config/obj-coff.h
index f60ae365fb9..f862f7725ea 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-coff.h
+++ b/gnu/usr.bin/binutils/gas/config/obj-coff.h
@@ -1,5 +1,6 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS.
@@ -39,7 +40,7 @@
#include "bfd.h"
/* This internal_lineno crap is to stop namespace pollution from the
- bfd internal coff headerfile. */
+ bfd internal coff headerfile. */
#define internal_lineno bfd_internal_lineno
#include "coff/internal.h"
#undef internal_lineno
@@ -149,6 +150,11 @@
#define TARGET_FORMAT "coff-tic30"
#endif
+#ifdef TC_TIC54X
+#include "coff/tic54x.h"
+#define TARGET_FORMAT "coff1-c54x"
+#endif
+
#ifdef TC_TIC80
#include "coff/tic80.h"
#define TARGET_FORMAT "coff-tic80"
@@ -250,7 +256,7 @@ extern void obj_coff_section PARAMS ((int));
/* The number of auxiliary entries */
#define S_SET_NUMBER_AUXILIARY(s,v) (S_GET_NUMBER_AUXILIARY (s) = (v))
-/* True if a symbol name is in the string table, i.e. its length is > 8. */
+/* True if a symbol name is in the string table, i.e. its length is > 8. */
#define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0)
extern int S_SET_DATA_TYPE PARAMS ((symbolS *, int));
@@ -294,13 +300,13 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
* differently.
*/
-#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
+#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
#define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */
#define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */
#define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */
#define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */
-#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */
+#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */
#define SF_STATICS (0x00001000) /* Mark the .text & all symbols */
#define SF_DEFINED (0x00002000) /* Symbol is defined in this file */
@@ -314,8 +320,8 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
#define SF_TAGGED (0x00040000) /* Is associated with a tag */
#define SF_TAG (0x00080000) /* Is a tag */
#define SF_DEBUG (0x00100000) /* Is in debug or abs section */
-#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
-/* All other bits are unused. */
+#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
+/* All other bits are unused. */
/* Accessors */
#define SF_GET(s) (*symbol_get_obj (s))
@@ -341,7 +347,7 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
/* Modifiers */
#define SF_SET(s,v) (SF_GET (s) = (v))
-#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK))
+#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK))
#define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK))
#define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE)
#define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS)
@@ -368,8 +374,7 @@ extern int coff_n_line_nos;
#define obj_emit_lineno(WHERE,LINE,FILE_START) abort ()
extern void coff_add_linesym PARAMS ((symbolS *));
-
-void c_dot_file_symbol PARAMS ((char *filename));
+void c_dot_file_symbol PARAMS ((const char *filename));
#define obj_app_file c_dot_file_symbol
extern void coff_frob_symbol PARAMS ((symbolS *, int *));
@@ -430,10 +435,9 @@ hey ! Where is the C_LEAFSTAT definition ? i960 - coff support is depending on i
extern const segT N_TYPE_seg[];
-/* Magic number of paged executable. */
+/* Magic number of paged executable. */
#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 0x8300
-
/* SYMBOL TABLE */
/* Symbol table entry data type */
@@ -442,7 +446,7 @@ typedef struct
{
/* Basic symbol */
struct internal_syment ost_entry;
- /* Auxiliary entry. */
+ /* Auxiliary entry. */
union internal_auxent ost_auxent[OBJ_COFF_MAX_AUXENTRIES];
/* obj_coff internal use only flags */
unsigned int ost_flags;
@@ -502,7 +506,7 @@ typedef struct
*/
#define S_IS_COMMON(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \
&& S_GET_VALUE (s) != 0)
-/* True if a symbol name is in the string table, i.e. its length is > 8. */
+/* True if a symbol name is in the string table, i.e. its length is > 8. */
#define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0)
/* True if a symbol is defined as weak. */
@@ -517,7 +521,7 @@ typedef struct
/* Accessors */
/* The name of the symbol */
-#define S_GET_NAME(s) ((char*)(s)->sy_symbol.ost_entry.n_offset)
+#define S_GET_NAME(s) ((char*) (s)->sy_symbol.ost_entry.n_offset)
/* The pointer to the string table */
#define S_GET_OFFSET(s) ((s)->sy_symbol.ost_entry.n_offset)
/* The numeric value of the segment */
@@ -531,7 +535,7 @@ typedef struct
/* Modifiers */
/* Set the name of the symbol */
-#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long)(v))
+#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long) (v))
/* Set the offset of the symbol */
#define S_SET_OFFSET(s,v) ((s)->sy_symbol.ost_entry.n_offset = (v))
/* The numeric value of the segment */
@@ -591,13 +595,13 @@ typedef struct
* differently.
*/
-#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
+#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
#define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */
#define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */
#define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */
#define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */
-#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */
+#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */
#define SF_STATICS (0x00001000) /* Mark the .text & all symbols */
#define SF_DEFINED (0x00002000) /* Symbol is defined in this file */
@@ -611,9 +615,9 @@ typedef struct
#define SF_TAGGED (0x00040000) /* Is associated with a tag */
#define SF_TAG (0x00080000) /* Is a tag */
#define SF_DEBUG (0x00100000) /* Is in debug or abs section */
-#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
+#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
#define SF_ADJ_LNNOPTR (0x00400000) /* Has a lnnoptr */
-/* All other bits are unused. */
+/* All other bits are unused. */
/* Accessors */
#define SF_GET(s) ((s)->sy_symbol.ost_flags)
@@ -639,7 +643,7 @@ typedef struct
/* Modifiers */
#define SF_SET(s,v) (SF_GET (s) = (v))
-#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK))
+#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK))
#define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK))
#define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE)
#define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS)
@@ -674,31 +678,31 @@ typedef struct
#endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */
#define H_GET_FILE_SIZE(h) \
- (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \
+ (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \
H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h) + \
H_GET_SYMBOL_TABLE_SIZE(h) + \
(h)->string_table_size)
#define H_GET_TEXT_FILE_OFFSET(h) \
- (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \
+ (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ)
#define H_GET_DATA_FILE_OFFSET(h) \
- (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \
+ (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
H_GET_TEXT_SIZE(h))
#define H_GET_BSS_FILE_OFFSET(h) 0
#define H_GET_RELOCATION_FILE_OFFSET(h) \
- (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \
+ (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h))
#define H_GET_LINENO_FILE_OFFSET(h) \
- (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \
+ (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \
H_GET_RELOCATION_SIZE(h))
#define H_GET_SYMBOL_TABLE_FILE_OFFSET(h) \
- (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \
+ (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \
H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h))
@@ -728,11 +732,11 @@ typedef struct
#define H_GET_LINENO_SIZE(h) ((h)->lineno_size)
#ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER
-#define H_GET_HEADER_SIZE(h) (sizeof(FILHDR) \
- + sizeof(AOUTHDR)\
+#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \
+ + sizeof (AOUTHDR)\
+ (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ))
#else /* OBJ_COFF_OMIT_OPTIONAL_HEADER */
-#define H_GET_HEADER_SIZE(h) (sizeof(FILHDR) \
+#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \
+ (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ))
#endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */
@@ -767,17 +771,15 @@ typedef struct
typedef struct
{
struct internal_aouthdr aouthdr; /* a.out header */
- struct internal_filehdr filehdr; /* File header, not machine dep. */
- long string_table_size; /* names + '\0' + sizeof(int) */
+ struct internal_filehdr filehdr; /* File header, not machine dep. */
+ long string_table_size; /* names + '\0' + sizeof (int) */
long relocation_size; /* Cumulated size of relocation
information for all sections in
- bytes. */
+ bytes. */
long lineno_size; /* Size of the line number information
table in bytes */
} object_headers;
-
-
struct lineno_list
{
struct bfd_internal_lineno line;
@@ -785,9 +787,6 @@ struct lineno_list
struct lineno_list *next; /* Forward chain pointer */
};
-
-
-
#define obj_segment_name(i) (segment_info[(int) (i)].scnhdr.s_name)
#define obj_add_segment(s) obj_coff_add_segment (s)
diff --git a/gnu/usr.bin/binutils/gas/config/obj-ecoff.c b/gnu/usr.bin/binutils/gas/config/obj-ecoff.c
index 767dc588c82..d1eabceefb9 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-ecoff.c
+++ b/gnu/usr.bin/binutils/gas/config/obj-ecoff.c
@@ -1,5 +1,5 @@
/* ECOFF object file format.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>.
@@ -34,6 +34,7 @@
static int ecoff_sec_sym_ok_for_reloc PARAMS ((asection *));
static void obj_ecoff_frob_symbol PARAMS ((symbolS *, int *));
static void ecoff_pop_insert PARAMS ((void));
+static int ecoff_separate_stab_sections PARAMS ((void));
/* These are the pseudo-ops we support in this file. Only those
relating to debugging information are supported here.
@@ -84,7 +85,7 @@ const pseudo_typeS obj_pseudo_table[] =
{ "extern", ecoff_directive_extern, 0 },
#ifndef TC_MIPS
- /* For TC_MIPS, tc-mips.c adds this. */
+ /* For TC_MIPS, tc-mips.c adds this. */
{ "weakext", ecoff_directive_weakext, 0 },
#endif
@@ -94,7 +95,7 @@ const pseudo_typeS obj_pseudo_table[] =
{ "verstamp", s_ignore, 0 },
/* Sentinel. */
- { NULL }
+ { NULL, s_ignore, 0 }
};
/* Swap out the symbols and debugging information for BFD. */
@@ -140,7 +141,7 @@ ecoff_frob_file ()
/* bss segment */
".sbss", ".bss",
};
-#define n_names (sizeof (names) / sizeof (names[0]))
+#define n_names ((int) (sizeof (names) / sizeof (names[0])))
addr = 0;
{
@@ -271,7 +272,7 @@ obj_ecoff_set_ext (sym, ext)
static int
ecoff_sec_sym_ok_for_reloc (sec)
- asection *sec;
+ asection *sec ATTRIBUTE_UNUSED;
{
return 1;
}
@@ -279,7 +280,7 @@ ecoff_sec_sym_ok_for_reloc (sec)
static void
obj_ecoff_frob_symbol (sym, puntp)
symbolS *sym;
- int *puntp;
+ int *puntp ATTRIBUTE_UNUSED;
{
ecoff_frob_symbol (sym);
}
@@ -290,26 +291,44 @@ ecoff_pop_insert ()
pop_insert (obj_pseudo_table);
}
+static int
+ecoff_separate_stab_sections ()
+{
+ return 0;
+}
+
const struct format_ops ecoff_format_ops =
{
bfd_target_ecoff_flavour,
0, /* dfl_leading_underscore */
+
+ /* FIXME: A comment why emit_section_symbols is different here (1) from
+ the single-format definition (0) would be in order. */
1, /* emit_section_symbols */
+ 0, /* begin */
+ ecoff_new_file,
obj_ecoff_frob_symbol,
ecoff_frob_file,
+ 0, /* frob_file_before_adjust */
0, /* frob_file_after_relocs */
0, /* s_get_size */
0, /* s_set_size */
0, /* s_get_align */
0, /* s_set_align */
0, /* s_get_other */
+ 0, /* s_set_other */
0, /* s_get_desc */
+ 0, /* s_set_desc */
+ 0, /* s_get_type */
+ 0, /* s_set_type */
0, /* copy_symbol_attributes */
ecoff_generate_asm_lineno,
ecoff_stab,
+ ecoff_separate_stab_sections,
+ 0, /* init_stab_section */
ecoff_sec_sym_ok_for_reloc,
ecoff_pop_insert,
ecoff_set_ext,
ecoff_read_begin_hook,
- ecoff_symbol_new_hook,
+ ecoff_symbol_new_hook
};
diff --git a/gnu/usr.bin/binutils/gas/config/obj-ecoff.h b/gnu/usr.bin/binutils/gas/config/obj-ecoff.h
index 8bca254c0ce..01a67d73e84 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-ecoff.h
+++ b/gnu/usr.bin/binutils/gas/config/obj-ecoff.h
@@ -1,5 +1,6 @@
/* ECOFF object file format header file.
- Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1999
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Ian Lance Taylor <ian@cygnus.com>.
diff --git a/gnu/usr.bin/binutils/gas/config/obj-elf.c b/gnu/usr.bin/binutils/gas/config/obj-elf.c
index 21fd0fa2241..162f02fa290 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-elf.c
+++ b/gnu/usr.bin/binutils/gas/config/obj-elf.c
@@ -1,5 +1,5 @@
/* ELF object file format
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#define OBJ_HEADER "obj-elf.h"
#include "as.h"
@@ -54,9 +54,12 @@ static bfd_vma elf_s_get_size PARAMS ((symbolS *));
static void elf_s_set_size PARAMS ((symbolS *, bfd_vma));
static bfd_vma elf_s_get_align PARAMS ((symbolS *));
static void elf_s_set_align PARAMS ((symbolS *, bfd_vma));
+static void elf_s_set_other PARAMS ((symbolS *, int));
static void elf_copy_symbol_attributes PARAMS ((symbolS *, symbolS *));
static int elf_sec_sym_ok_for_reloc PARAMS ((asection *));
static void adjust_stab_sections PARAMS ((bfd *, asection *, PTR));
+static int elf_separate_stab_sections PARAMS ((void));
+static void elf_init_stab_section PARAMS ((segT));
#ifdef NEED_ECOFF_DEBUG
static boolean elf_get_extr PARAMS ((asymbol *, EXTR *));
@@ -72,8 +75,6 @@ static void obj_elf_weak PARAMS ((int));
static void obj_elf_local PARAMS ((int));
static void obj_elf_visibility PARAMS ((int));
static void obj_elf_symver PARAMS ((int));
-static void obj_elf_vtable_inherit PARAMS ((int));
-static void obj_elf_vtable_entry PARAMS ((int));
static void obj_elf_subsection PARAMS ((int));
static void obj_elf_popsection PARAMS ((int));
@@ -95,7 +96,7 @@ static const pseudo_typeS elf_pseudo_table[] =
{"version", obj_elf_version, 0},
{"weak", obj_elf_weak, 0},
- /* These define symbol visibility. */
+ /* These define symbol visibility. */
{"internal", obj_elf_visibility, STV_INTERNAL},
{"hidden", obj_elf_visibility, STV_HIDDEN},
{"protected", obj_elf_visibility, STV_PROTECTED},
@@ -110,10 +111,10 @@ static const pseudo_typeS elf_pseudo_table[] =
{"subsection", obj_elf_subsection, 0},
/* These are GNU extensions to aid in garbage collecting C++ vtables. */
- {"vtable_inherit", obj_elf_vtable_inherit, 0},
- {"vtable_entry", obj_elf_vtable_entry, 0},
+ {"vtable_inherit", (void (*) PARAMS ((int))) &obj_elf_vtable_inherit, 0},
+ {"vtable_entry", (void (*) PARAMS ((int))) &obj_elf_vtable_entry, 0},
- /* These are used for dwarf. */
+ /* These are used for dwarf. */
{"2byte", cons, 2},
{"4byte", cons, 4},
{"8byte", cons, 8},
@@ -234,6 +235,14 @@ elf_s_get_other (sym)
}
static void
+elf_s_set_other (sym, other)
+ symbolS *sym;
+ int other;
+{
+ S_SET_OTHER (sym, other);
+}
+
+static void
elf_copy_symbol_attributes (dest, src)
symbolS *dest, *src;
{
@@ -249,7 +258,7 @@ elf_sec_sym_ok_for_reloc (sec)
void
elf_file_symbol (s)
- char *s;
+ const char *s;
{
symbolS *sym;
@@ -533,7 +542,6 @@ obj_elf_visibility (visibility)
demand_empty_rest_of_line ();
}
-
static segT previous_section;
static int previous_subsection;
@@ -546,7 +554,6 @@ struct section_stack
static struct section_stack *section_stack;
-
/* Handle the .section pseudo-op. This code supports two different
syntaxes.
@@ -617,8 +624,10 @@ obj_elf_change_section (name, type, attr, push)
char *name;
int type, attr, push;
{
- int new_sec;
+ asection *old_sec;
segT sec;
+ flagword flags;
+ int i;
#ifdef md_flush_pending_output
md_flush_pending_output ();
@@ -639,49 +648,57 @@ obj_elf_change_section (name, type, attr, push)
previous_section = now_seg;
previous_subsection = now_subseg;
- new_sec = bfd_get_section_by_name (stdoutput, name) == NULL;
+ old_sec = bfd_get_section_by_name (stdoutput, name);
sec = subseg_new (name, 0);
- if (new_sec)
- {
- flagword flags;
- symbolS *secsym;
- int i;
-
- /* See if this is one of the special sections. */
- for (i = 0; special_sections[i].name != NULL; i++)
- if (strcmp (name, special_sections[i].name) == 0)
- {
- if (type == SHT_NULL)
- type = special_sections[i].type;
- else if (type != special_sections[i].type)
- as_warn (_("Setting incorrect section type for %s"), name);
-
- if ((attr &~ special_sections[i].attributes) != 0)
+ /* See if this is one of the special sections. */
+ for (i = 0; special_sections[i].name != NULL; i++)
+ if (strcmp (name, special_sections[i].name) == 0)
+ {
+ if (type == SHT_NULL)
+ type = special_sections[i].type;
+ else if (type != special_sections[i].type)
+ {
+ if (old_sec == NULL)
+ {
+ as_warn (_("Setting incorrect section type for %s"), name);
+ }
+ else
{
- /* As a GNU extension, we permit a .note section to be
- allocatable. If the linker sees an allocateable .note
- section, it will create a PT_NOTE segment in the output
- file. */
- if (strcmp (name, ".note") != 0
- || attr != SHF_ALLOC)
- as_warn (_("Setting incorrect section attributes for %s"),
- name);
+ as_warn (_("Ignoring incorrect section type for %s"), name);
+ type = special_sections[i].type;
}
- attr |= special_sections[i].attributes;
- break;
}
-
- /* Convert ELF type and flags to BFD flags. */
- flags = (SEC_RELOC
- | ((attr & SHF_WRITE) ? 0 : SEC_READONLY)
- | ((attr & SHF_ALLOC) ? SEC_ALLOC : 0)
- | (((attr & SHF_ALLOC) && type != SHT_NOBITS) ? SEC_LOAD : 0)
- | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0));
+ if ((attr &~ special_sections[i].attributes) != 0
+ && old_sec == NULL)
+ {
+ /* As a GNU extension, we permit a .note section to be
+ allocatable. If the linker sees an allocateable .note
+ section, it will create a PT_NOTE segment in the output
+ file. */
+ if (strcmp (name, ".note") != 0
+ || attr != SHF_ALLOC)
+ as_warn (_("Setting incorrect section attributes for %s"),
+ name);
+ }
+ attr |= special_sections[i].attributes;
+ break;
+ }
+
+ /* Convert ELF type and flags to BFD flags. */
+ flags = (SEC_RELOC
+ | ((attr & SHF_WRITE) ? 0 : SEC_READONLY)
+ | ((attr & SHF_ALLOC) ? SEC_ALLOC : 0)
+ | (((attr & SHF_ALLOC) && type != SHT_NOBITS) ? SEC_LOAD : 0)
+ | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0));
#ifdef md_elf_section_flags
- flags = md_elf_section_flags (flags, attr, type);
+ flags = md_elf_section_flags (flags, attr, type);
#endif
+ if (old_sec == NULL)
+ {
+ symbolS *secsym;
+
/* Prevent SEC_HAS_CONTENTS from being inadvertently set. */
if (type == SHT_NOBITS)
seg_info (sec)->bss = 1;
@@ -695,9 +712,19 @@ obj_elf_change_section (name, type, attr, push)
else
symbol_table_insert (section_symbol (sec));
}
+ else if (attr != 0)
+ {
+ /* If section attributes are specified the second time we see a
+ particular section, then check that they are the same as we
+ saw the first time. */
+ if ((old_sec->flags ^ flags)
+ & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ | SEC_EXCLUDE | SEC_SORT_ENTRIES))
+ as_warn (_("Ignoring changed section attributes for %s"), name);
+ }
#ifdef md_elf_section_change_hook
- md_elf_section_change_hook ();
+ md_elf_section_change_hook ();
#endif
}
@@ -802,7 +829,7 @@ obj_elf_section (push)
char mri_type;
#ifdef md_flush_pending_output
- md_flush_pending_output ();
+ md_flush_pending_output ();
#endif
previous_section = now_seg;
@@ -1054,7 +1081,7 @@ obj_elf_line (ignore)
int ignore ATTRIBUTE_UNUSED;
{
/* Assume delimiter is part of expression. BSD4.2 as fails with
- delightful bug, so we are not being incompatible here. */
+ delightful bug, so we are not being incompatible here. */
new_logical_line ((char *) NULL, (int) (get_absolute_expression ()));
demand_empty_rest_of_line ();
}
@@ -1080,14 +1107,6 @@ obj_elf_symver (ignore)
*input_line_pointer = c;
- if (symbol_get_obj (sym)->versioned_name != NULL)
- {
- as_bad (_("multiple .symver directives for symbol `%s'"),
- S_GET_NAME (sym));
- ignore_rest_of_line ();
- return;
- }
-
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
@@ -1106,16 +1125,34 @@ obj_elf_symver (ignore)
*input_line_pointer++ = c;
}
- symbol_get_obj (sym)->versioned_name = xstrdup (name);
+ if (symbol_get_obj (sym)->versioned_name == NULL)
+ {
+ symbol_get_obj (sym)->versioned_name = xstrdup (name);
- *input_line_pointer = c;
+ *input_line_pointer = c;
- if (strchr (symbol_get_obj (sym)->versioned_name, ELF_VER_CHR) == NULL)
+ if (strchr (symbol_get_obj (sym)->versioned_name,
+ ELF_VER_CHR) == NULL)
+ {
+ as_bad (_("missing version name in `%s' for symbol `%s'"),
+ symbol_get_obj (sym)->versioned_name,
+ S_GET_NAME (sym));
+ ignore_rest_of_line ();
+ return;
+ }
+ }
+ else
{
- as_bad (_("missing version name in `%s' for symbol `%s'"),
- symbol_get_obj (sym)->versioned_name, S_GET_NAME (sym));
- ignore_rest_of_line ();
- return;
+ if (strcmp (symbol_get_obj (sym)->versioned_name, name))
+ {
+ as_bad (_("multiple versions [`%s'|`%s'] for symbol `%s'"),
+ name, symbol_get_obj (sym)->versioned_name,
+ S_GET_NAME (sym));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ *input_line_pointer = c;
}
demand_empty_rest_of_line ();
@@ -1125,7 +1162,7 @@ obj_elf_symver (ignore)
to the linker the hierarchy in which a particular table resides. The
syntax is ".vtable_inherit CHILDNAME, PARENTNAME". */
-static void
+struct fix *
obj_elf_vtable_inherit (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -1158,7 +1195,7 @@ obj_elf_vtable_inherit (ignore)
{
as_bad ("expected comma after name in .vtable_inherit");
ignore_rest_of_line ();
- return;
+ return NULL;
}
++input_line_pointer;
@@ -1185,19 +1222,19 @@ obj_elf_vtable_inherit (ignore)
demand_empty_rest_of_line ();
if (bad)
- return;
+ return NULL;
assert (symbol_get_value_expression (csym)->X_op == O_constant);
- fix_new (symbol_get_frag (csym),
- symbol_get_value_expression (csym)->X_add_number, 0, psym, 0, 0,
- BFD_RELOC_VTABLE_INHERIT);
+ return fix_new (symbol_get_frag (csym),
+ symbol_get_value_expression (csym)->X_add_number,
+ 0, psym, 0, 0, BFD_RELOC_VTABLE_INHERIT);
}
/* This handles the .vtable_entry pseudo-op, which is used to indicate
to the linker that a vtable slot was used. The syntax is
".vtable_entry tablename, offset". */
-static void
+struct fix *
obj_elf_vtable_entry (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -1219,7 +1256,7 @@ obj_elf_vtable_entry (ignore)
{
as_bad ("expected comma after name in .vtable_entry");
ignore_rest_of_line ();
- return;
+ return NULL;
}
++input_line_pointer;
@@ -1228,10 +1265,10 @@ obj_elf_vtable_entry (ignore)
offset = get_absolute_expression ();
- fix_new (frag_now, frag_now_fix (), 0, sym, offset, 0,
- BFD_RELOC_VTABLE_ENTRY);
-
demand_empty_rest_of_line ();
+
+ return fix_new (frag_now, frag_now_fix (), 0, sym, offset, 0,
+ BFD_RELOC_VTABLE_ENTRY);
}
void
@@ -1277,7 +1314,7 @@ obj_elf_version (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer == '\"')
{
- ++input_line_pointer; /* -> 1st char of string. */
+ ++input_line_pointer; /* -> 1st char of string. */
name = input_line_pointer;
while (is_a_char (c = next_char_of_string ()))
@@ -1370,7 +1407,7 @@ obj_elf_size (ignore)
}
/* Handle the ELF .type pseudo-op. This sets the type of a symbol.
- There are four syntaxes:
+ There are five syntaxes:
The first (used on Solaris) is
.type SYM,#function
@@ -1380,6 +1417,8 @@ obj_elf_size (ignore)
.type SYM STT_FUNC
The fourth (used on NetBSD/Arm and Linux/ARM) is
.type SYM,%function
+ The fifth (used on SVR4/860) is
+ .type SYM,"function"
*/
static void
@@ -1391,10 +1430,12 @@ obj_elf_type (ignore)
int type;
const char *typename;
symbolS *sym;
+ elf_symbol_type *elfsym;
name = input_line_pointer;
c = get_symbol_end ();
sym = symbol_find_or_make (name);
+ elfsym = (elf_symbol_type *) symbol_get_bfdsym (sym);
*input_line_pointer = c;
SKIP_WHITESPACE ();
@@ -1404,6 +1445,7 @@ obj_elf_type (ignore)
SKIP_WHITESPACE ();
if ( *input_line_pointer == '#'
|| *input_line_pointer == '@'
+ || *input_line_pointer == '"'
|| *input_line_pointer == '%')
++input_line_pointer;
@@ -1417,12 +1459,19 @@ obj_elf_type (ignore)
else if (strcmp (typename, "object") == 0
|| strcmp (typename, "STT_OBJECT") == 0)
type = BSF_OBJECT;
+#ifdef md_elf_symbol_type
+ else if ((type = md_elf_symbol_type (typename, sym, elfsym)) != -1)
+ ;
+#endif
else
as_bad (_("ignoring unrecognized symbol type \"%s\""), typename);
*input_line_pointer = c;
- symbol_get_bfdsym (sym)->flags |= type;
+ if (*input_line_pointer == '"')
+ ++input_line_pointer;
+
+ elfsym->symbol.flags |= type;
demand_empty_rest_of_line ();
}
@@ -1471,9 +1520,9 @@ obj_elf_init_stab_section (seg)
UnixWare ar crashes. */
bfd_set_section_alignment (stdoutput, seg, 2);
- /* Make space for this first symbol. */
+ /* Make space for this first symbol. */
p = frag_more (12);
- /* Zero it out. */
+ /* Zero it out. */
memset (p, 0, 12);
as_where (&file, (unsigned int *) NULL);
stabstr_name = (char *) alloca (strlen (segment_name (seg)) + 4);
@@ -1605,6 +1654,11 @@ elf_frob_symbol (symp, puntp)
if (sy_obj->versioned_name != NULL)
{
+ char *p;
+
+ p = strchr (sy_obj->versioned_name, ELF_VER_CHR);
+ know (p != NULL);
+
/* This symbol was given a new name with the .symver directive.
If this is an external reference, just rename the symbol to
@@ -1618,13 +1672,9 @@ elf_frob_symbol (symp, puntp)
if (! S_IS_DEFINED (symp))
{
- char *p;
-
/* Verify that the name isn't using the @@ syntax--this is
reserved for definitions of the default version to link
against. */
- p = strchr (sy_obj->versioned_name, ELF_VER_CHR);
- know (p != NULL);
if (p[1] == ELF_VER_CHR)
{
as_bad (_("invalid attempt to declare external version name as default in symbol `%s'"),
@@ -1635,36 +1685,50 @@ elf_frob_symbol (symp, puntp)
}
else
{
- symbolS *symp2;
+ if (p [1] == ELF_VER_CHR && p [2] == ELF_VER_CHR)
+ {
+ size_t l;
+
+ /* The @@@ syntax is a special case. It renames the
+ symbol name to versioned_name with one `@' removed. */
+ l = strlen (&p[3]) + 1;
+ memmove (&p [2], &p[3], l);
+ S_SET_NAME (symp, sy_obj->versioned_name);
+ }
+ else
+ {
+ symbolS *symp2;
- /* FIXME: Creating a new symbol here is risky. We're in the
- final loop over the symbol table. We can get away with
- it only because the symbol goes to the end of the list,
- where the loop will still see it. It would probably be
- better to do this in obj_frob_file_before_adjust. */
+ /* FIXME: Creating a new symbol here is risky. We're
+ in the final loop over the symbol table. We can
+ get away with it only because the symbol goes to
+ the end of the list, where the loop will still see
+ it. It would probably be better to do this in
+ obj_frob_file_before_adjust. */
- symp2 = symbol_find_or_make (sy_obj->versioned_name);
+ symp2 = symbol_find_or_make (sy_obj->versioned_name);
- /* Now we act as though we saw symp2 = sym. */
+ /* Now we act as though we saw symp2 = sym. */
- S_SET_SEGMENT (symp2, S_GET_SEGMENT (symp));
+ S_SET_SEGMENT (symp2, S_GET_SEGMENT (symp));
- /* Subtracting out the frag address here is a hack because
- we are in the middle of the final loop. */
- S_SET_VALUE (symp2,
- (S_GET_VALUE (symp)
- - symbol_get_frag (symp)->fr_address));
+ /* Subtracting out the frag address here is a hack
+ because we are in the middle of the final loop. */
+ S_SET_VALUE (symp2,
+ (S_GET_VALUE (symp)
+ - symbol_get_frag (symp)->fr_address));
- symbol_set_frag (symp2, symbol_get_frag (symp));
+ symbol_set_frag (symp2, symbol_get_frag (symp));
- /* This will copy over the size information. */
- copy_symbol_attributes (symp2, symp);
+ /* This will copy over the size information. */
+ copy_symbol_attributes (symp2, symp);
- if (S_IS_WEAK (symp))
- S_SET_WEAK (symp2);
+ if (S_IS_WEAK (symp))
+ S_SET_WEAK (symp2);
- if (S_IS_EXTERNAL (symp))
- S_SET_EXTERNAL (symp2);
+ if (S_IS_EXTERNAL (symp))
+ S_SET_EXTERNAL (symp2);
+ }
}
}
@@ -1715,6 +1779,42 @@ elf_frob_file ()
#endif
}
+/* It removes any unneeded versioned symbols from the symbol table. */
+
+void
+elf_frob_file_before_adjust ()
+{
+ if (symbol_rootP)
+ {
+ symbolS *symp;
+
+ for (symp = symbol_rootP; symp; symp = symbol_next (symp))
+ if (symbol_get_obj (symp)->versioned_name)
+ {
+ if (!S_IS_DEFINED (symp))
+ {
+ char *p;
+
+ /* The @@@ syntax is a special case. If the symbol is
+ not defined, 2 `@'s will be removed from the
+ versioned_name. */
+
+ p = strchr (symbol_get_obj (symp)->versioned_name,
+ ELF_VER_CHR);
+ know (p != NULL);
+ if (p [1] == ELF_VER_CHR && p [2] == ELF_VER_CHR)
+ {
+ size_t l = strlen (&p[3]) + 1;
+ memmove (&p [1], &p[3], l);
+ }
+ if (symbol_used_p (symp) == 0
+ && symbol_used_in_reloc_p (symp) == 0)
+ symbol_remove (symp, &symbol_rootP, &symbol_lastP);
+ }
+ }
+ }
+}
+
/* It is required that we let write_relocs have the opportunity to
optimize away fixups before output has begun, since it is possible
to eliminate all fixups for a section and thus we never should
@@ -1890,18 +1990,45 @@ sco_id ()
#endif /* SCO_ELF */
+static int
+elf_separate_stab_sections ()
+{
+#ifdef NEED_ECOFF_DEBUG
+ return (!ECOFF_DEBUGGING);
+#else
+ return 1;
+#endif
+}
+
+static void
+elf_init_stab_section (seg)
+ segT seg;
+{
+#ifdef NEED_ECOFF_DEBUG
+ if (!ECOFF_DEBUGGING)
+#endif
+ obj_elf_init_stab_section (seg);
+}
+
const struct format_ops elf_format_ops =
{
bfd_target_elf_flavour,
0, /* dfl_leading_underscore */
1, /* emit_section_symbols */
+ elf_begin,
+ elf_file_symbol,
elf_frob_symbol,
elf_frob_file,
+ elf_frob_file_before_adjust,
elf_frob_file_after_relocs,
elf_s_get_size, elf_s_set_size,
elf_s_get_align, elf_s_set_align,
elf_s_get_other,
+ elf_s_set_other,
0, /* s_get_desc */
+ 0, /* s_set_desc */
+ 0, /* s_get_type */
+ 0, /* s_set_type */
elf_copy_symbol_attributes,
#ifdef NEED_ECOFF_DEBUG
ecoff_generate_asm_lineno,
@@ -1910,6 +2037,8 @@ const struct format_ops elf_format_ops =
0, /* generate_asm_lineno */
0, /* process_stab */
#endif
+ elf_separate_stab_sections,
+ elf_init_stab_section,
elf_sec_sym_ok_for_reloc,
elf_pop_insert,
#ifdef NEED_ECOFF_DEBUG
@@ -1918,5 +2047,5 @@ const struct format_ops elf_format_ops =
0, /* ecoff_set_ext */
#endif
elf_obj_read_begin_hook,
- elf_obj_symbol_new_hook,
+ elf_obj_symbol_new_hook
};
diff --git a/gnu/usr.bin/binutils/gas/config/obj-elf.h b/gnu/usr.bin/binutils/gas/config/obj-elf.h
index 722c5fdf94d..8e3ce7dd3ff 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-elf.h
+++ b/gnu/usr.bin/binutils/gas/config/obj-elf.h
@@ -1,12 +1,12 @@
/* ELF object file format.
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
+ the Free Software Foundation; either version 2, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
@@ -19,7 +19,6 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-
/* HP PA-RISC support was contributed by the Center for Software Science
at the University of Utah. */
@@ -28,11 +27,14 @@
#define OBJ_ELF 1
+/* Note that all macros in this file should be wrapped in #ifndef, for
+ sake of obj-multi.h which includes this file. */
+
#ifndef OUTPUT_FLAVOR
#define OUTPUT_FLAVOR bfd_target_elf_flavour
#endif
-#include <bfd.h>
+#include "bfd.h"
#define BYTES_IN_WORD 4 /* for now */
#include "bfd/elf-bfd.h"
@@ -40,7 +42,7 @@
#include "targ-cpu.h"
#ifdef TC_ALPHA
-#define ECOFF_DEBUGGING alpha_flag_mdebug
+#define ECOFF_DEBUGGING (alpha_flag_mdebug > 0)
extern int alpha_flag_mdebug;
#endif
@@ -83,16 +85,26 @@ struct elf_obj_sy
#define OBJ_SYMFIELD_TYPE struct elf_obj_sy
+/* Symbol fields used by the ELF back end. */
+#define ELF_TARGET_SYMBOL_FIELDS int local:1;
+
+/* Don't change this; change ELF_TARGET_SYMBOL_FIELDS instead. */
+#define TARGET_SYMBOL_FIELDS ELF_TARGET_SYMBOL_FIELDS
+
+/* #include "targ-cpu.h" */
+
#ifndef FALSE
#define FALSE 0
#define TRUE !FALSE
#endif
+#ifndef obj_begin
#define obj_begin() elf_begin ()
+#endif
extern void elf_begin PARAMS ((void));
/* should be conditional on address size! */
-#define elf_symbol(asymbol) ((elf_symbol_type *)(&(asymbol)->the_bfd))
+#define elf_symbol(asymbol) ((elf_symbol_type *) (&(asymbol)->the_bfd))
#ifndef S_GET_SIZE
#define S_GET_SIZE(S) \
@@ -128,13 +140,20 @@ extern asection *gdb_section;
#endif
extern void elf_frob_file PARAMS ((void));
+#ifndef obj_frob_file_before_adjust
+#define obj_frob_file_before_adjust elf_frob_file_before_adjust
+#endif
+extern void elf_frob_file_before_adjust PARAMS ((void));
+
#ifndef obj_frob_file_after_relocs
#define obj_frob_file_after_relocs elf_frob_file_after_relocs
#endif
extern void elf_frob_file_after_relocs PARAMS ((void));
+#ifndef obj_app_file
#define obj_app_file elf_file_symbol
-extern void elf_file_symbol PARAMS ((char *));
+#endif
+extern void elf_file_symbol PARAMS ((const char *));
extern void obj_elf_section_change_hook PARAMS ((void));
@@ -144,6 +163,8 @@ extern void obj_elf_version PARAMS ((int));
extern void obj_elf_common PARAMS ((int));
extern void obj_elf_data PARAMS ((int));
extern void obj_elf_text PARAMS ((int));
+extern struct fix *obj_elf_vtable_inherit PARAMS ((int));
+extern struct fix *obj_elf_vtable_entry PARAMS ((int));
/* BFD wants to write the udata field, which is a no-no for the
globally defined sections. */
@@ -189,6 +210,12 @@ do \
while (0)
#endif
+#ifndef SEPARATE_STAB_SECTIONS
+/* Avoid ifndef each separate macro setting by wrapping the whole of the
+ stab group on the assumption that whoever sets SEPARATE_STAB_SECTIONS
+ caters to ECOFF_DEBUGGING and the right setting of INIT_STAB_SECTIONS
+ and OBJ_PROCESS_STAB too, without needing the tweaks below. */
+
/* Stabs go in a separate section. */
#define SEPARATE_STAB_SECTIONS 1
@@ -206,7 +233,7 @@ extern void obj_elf_init_stab_section PARAMS ((segT));
#undef INIT_STAB_SECTION
#define INIT_STAB_SECTION(seg) \
- ((void)(ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0)))
+ ((void) (ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0)))
#undef OBJ_PROCESS_STAB
#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
@@ -214,6 +241,8 @@ extern void obj_elf_init_stab_section PARAMS ((segT));
ecoff_stab ((seg), (what), (string), (type), (other), (desc))
#endif /* ECOFF_DEBUGGING */
+#endif /* SEPARATE_STAB_SECTIONS not defined. */
+
extern void elf_frob_symbol PARAMS ((symbolS *, int *));
#ifndef obj_frob_symbol
#define obj_frob_symbol(symp, punt) elf_frob_symbol (symp, &punt)
diff --git a/gnu/usr.bin/binutils/gas/config/obj-ieee.c b/gnu/usr.bin/binutils/gas/config/obj-ieee.c
index 30a0798e295..521a0d72a3f 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-ieee.c
+++ b/gnu/usr.bin/binutils/gas/config/obj-ieee.c
@@ -1,5 +1,6 @@
/* obj-format for ieee-695 records.
- Copyright (C) 1991, 92, 93, 94, 95, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1997, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,19 +17,12 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
+/* Created by Steve Chamberlain <steve@cygnus.com>. */
-/*
- created by
-
- steve chamberlain steve@cygnus.com
- */
-
-/*
- this will hopefully become the port through which bfd and gas talk,
- for the moment, only ieee is known to work well.
- */
+/* This will hopefully become the port through which bfd and gas talk,
+ for the moment, only ieee is known to work well. */
#include "bfd.h"
#include "as.h"
@@ -38,11 +32,15 @@
bfd *abfd;
-/* How many addresses does the .align take? */
+/* How many addresses does the .align take? */
+
static relax_addressT
relax_align (address, alignment)
- register relax_addressT address; /* Address now. */
- register long alignment; /* Alignment (binary). */
+ /* Address now. */
+ register relax_addressT address;
+
+ /* Alignment (binary). */
+ register long alignment;
{
relax_addressT mask;
relax_addressT new_address;
@@ -50,18 +48,20 @@ relax_align (address, alignment)
mask = ~((~0) << alignment);
new_address = (address + mask) & (~mask);
return (new_address - address);
-} /* relax_align() */
+}
+
+/* Calculate the size of the frag chain
+ and create a bfd section to contain all of it. */
-/* calculate the size of the frag chain and create a bfd section
- to contain all of it */
static void
-DEFUN (size_section, (abfd, idx),
- bfd * abfd AND
- unsigned int idx)
+size_section (abfd, idx)
+ bfd *abfd;
+ unsigned int idx;
{
asection *sec;
unsigned int size = 0;
fragS *frag = segment_info[idx].frag_root;
+
while (frag)
{
if (frag->fr_address != size)
@@ -92,25 +92,28 @@ DEFUN (size_section, (abfd, idx),
if (size)
{
char *name = segment_info[idx].name;
+
if (name == (char *) NULL)
- {
- name = ".data";
- }
- segment_info[idx].user_stuff = (char *) (sec = bfd_make_section (abfd, name));
- /* Make it output through itself */
+ name = ".data";
+
+ segment_info[idx].user_stuff =
+ (char *) (sec = bfd_make_section (abfd, name));
+ /* Make it output through itself. */
sec->output_section = sec;
sec->flags |= SEC_HAS_CONTENTS;
bfd_set_section_size (abfd, sec, size);
}
}
-/* run through a frag chain and write out the data to go with it */
+/* Run through a frag chain and write out the data to go with it. */
+
static void
-DEFUN (fill_section, (abfd, idx),
- bfd * abfd AND
- unsigned int idx)
+fill_section (abfd, idx)
+ bfd *abfd;
+ unsigned int idx;
{
asection *sec = segment_info[idx].user_stuff;
+
if (sec)
{
fragS *frag = segment_info[idx].frag_root;
@@ -156,16 +159,16 @@ DEFUN (fill_section, (abfd, idx),
}
}
-/* Count the relocations in a chain */
+/* Count the relocations in a chain. */
static unsigned int
-DEFUN (count_entries_in_chain, (idx),
- unsigned int idx)
+count_entries_in_chain (idx)
+ unsigned int idx;
{
unsigned int nrelocs;
fixS *fixup_ptr;
- /* Count the relocations */
+ /* Count the relocations. */
fixup_ptr = segment_info[idx].fix_root;
nrelocs = 0;
while (fixup_ptr != (fixS *) NULL)
@@ -176,10 +179,11 @@ DEFUN (count_entries_in_chain, (idx),
return nrelocs;
}
-/* output all the relocations for a section */
+/* Output all the relocations for a section. */
+
void
-DEFUN (do_relocs_for, (idx),
- unsigned int idx)
+do_relocs_for (idx)
+ unsigned int idx;
{
unsigned int nrelocs;
arelent **reloc_ptr_vector;
@@ -188,11 +192,13 @@ DEFUN (do_relocs_for, (idx),
asection *section = (asection *) (segment_info[idx].user_stuff);
unsigned int i;
fixS *from;
+
if (section)
{
nrelocs = count_entries_in_chain (idx);
- reloc_ptr_vector = (arelent **) malloc ((nrelocs + 1) * sizeof (arelent *));
+ reloc_ptr_vector =
+ (arelent **) malloc ((nrelocs + 1) * sizeof (arelent *));
reloc_vector = (arelent *) malloc (nrelocs * sizeof (arelent));
ptrs = (asymbol **) malloc (nrelocs * sizeof (asymbol *));
from = segment_info[idx].fix_root;
@@ -203,8 +209,10 @@ DEFUN (do_relocs_for, (idx),
reloc_ptr_vector[i] = to;
to->howto = (reloc_howto_type *) (from->fx_r_type);
-#if 0 /* We can't represent complicated things in a reloc yet */
- if (from->fx_addsy == 0 || from->fx_subsy != 0) abort();
+#if 0
+ /* We can't represent complicated things in a reloc yet. */
+ if (from->fx_addsy == 0 || from->fx_subsy != 0)
+ abort ();
#endif
s = &(from->fx_addsy->sy_symbol.sy);
@@ -218,7 +226,7 @@ DEFUN (do_relocs_for, (idx),
If this relocation is pcrelative, and we know the
destination, we still want to keep the relocation - since
the linker might relax some of the bytes, but it stops
- being pc relative and turns into an absolute relocation. */
+ being pc relative and turns into an absolute relocation. */
if (s)
{
if ((s->flags & BSF_UNDEFINED) == 0)
@@ -233,10 +241,9 @@ DEFUN (do_relocs_for, (idx),
to->sym_ptr_ptr = 0;
if (to->howto->pcrel_offset)
- {
- /* This is a pcrel relocation, the addend should be adjusted */
- to->addend -= to->address + 1;
- }
+ /* This is a pcrel relocation, the addend should
+ be adjusted. */
+ to->addend -= to->address + 1;
}
else
{
@@ -245,33 +252,30 @@ DEFUN (do_relocs_for, (idx),
to->sym_ptr_ptr = ptrs;
if (to->howto->pcrel_offset)
- {
- /* This is a pcrel relocation, the addend should be adjusted */
- to->addend -= to->address - 1;
- }
+ /* This is a pcrel relocation, the addend should
+ be adjusted. */
+ to->addend -= to->address - 1;
}
-
}
else
- {
- to->section = 0;
- }
+ to->section = 0;
ptrs++;
from = from->fx_next;
}
- /* attatch to the section */
+ /* Attatch to the section. */
section->orelocation = reloc_ptr_vector;
section->reloc_count = nrelocs;
section->flags |= SEC_LOAD;
}
}
-/* do the symbols.. */
+/* Do the symbols. */
+
static void
-DEFUN (do_symbols, (abfd),
- bfd * abfd)
+do_symbols (abfd)
+ bfd *abfd;
{
extern symbolS *symbol_rootP;
symbolS *ptr;
@@ -280,7 +284,6 @@ DEFUN (do_symbols, (abfd),
unsigned int count = 0;
unsigned int index;
-
for (ptr = symbol_rootP;
ptr != (symbolS *) NULL;
ptr = ptr->sy_next)
@@ -291,9 +294,7 @@ DEFUN (do_symbols, (abfd),
(asection *) (segment_info[ptr->sy_symbol.seg].user_stuff);
S_SET_VALUE (ptr, S_GET_VALUE (ptr) + ptr->sy_frag->fr_address);
if (ptr->sy_symbol.sy.flags == 0)
- {
- ptr->sy_symbol.sy.flags = BSF_LOCAL;
- }
+ ptr->sy_symbol.sy.flags = BSF_LOCAL;
}
else
{
@@ -330,18 +331,15 @@ DEFUN (do_symbols, (abfd),
}
/* The generic as->bfd converter. Other backends may have special case
- code */
+ code. */
void
-DEFUN_VOID (bfd_as_write_hook)
+bfd_as_write_hook ()
{
int i;
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- size_section (abfd, i);
- }
-
+ size_section (abfd, i);
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
fill_section (abfd, i);
@@ -350,7 +348,6 @@ DEFUN_VOID (bfd_as_write_hook)
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
do_relocs_for (i);
-
}
S_SET_SEGMENT (x, y)
@@ -437,7 +434,8 @@ obj_ieee_section (ignore)
char *p = input_line_pointer;
char *s = p;
int i;
- /* Look up the name, if it doesn't exist, make it */
+
+ /* Look up the name, if it doesn't exist, make it. */
while (*p && *p != ' ' && *p != ',' && !is_end_of_line[*p])
{
p++;
@@ -447,10 +445,7 @@ obj_ieee_section (ignore)
if (segment_info[i].hadone)
{
if (strncmp (segment_info[i].name, s, p - s) == 0)
- {
- goto ok;
-
- }
+ goto ok;
}
else
break;
@@ -470,32 +465,26 @@ ok:
while (!is_end_of_line[*p])
p++;
input_line_pointer = p;
-
}
-
void cons ();
void s_ignore ();
-
void s_globl ();
const pseudo_typeS obj_pseudo_table[] =
{
{"section", obj_ieee_section, 0},
- {"data.b", cons, 1},
- {"data.w", cons, 2},
- {"data.l", cons, 4},
- {"export", s_globl, 0},
- {"option", s_ignore, 0},
- {"end", s_ignore, 0},
- {"import", s_ignore, 0},
- {"sdata", stringer, 0},
+ {"data.b" , cons , 1},
+ {"data.w" , cons , 2},
+ {"data.l" , cons , 4},
+ {"export" , s_globl , 0},
+ {"option" , s_ignore , 0},
+ {"end" , s_ignore , 0},
+ {"import" , s_ignore , 0},
+ {"sdata" , stringer , 0},
0,
-
};
-
-
void
obj_symbol_new_hook (symbolP)
symbolS *symbolP;
@@ -503,13 +492,9 @@ obj_symbol_new_hook (symbolP)
symbolP->sy_symbol.sy.the_bfd = abfd;
}
-
-
-
-
#if 1
extern void
-DEFUN_VOID (write_object_file)
+write_object_file ()
{
int i;
struct frchain *frchain_ptr;
@@ -531,10 +516,10 @@ DEFUN_VOID (write_object_file)
frchain_ptr != (struct frchain *) NULL;
frchain_ptr = frchain_ptr->frch_next)
{
- /* Run through all the sub-segments and align them up. Also close any
- open frags. We tack a .fill onto the end of the frag chain so
- that any .align's size can be worked by looking at the next
- frag. */
+ /* Run through all the sub-segments and align them up. Also
+ close any open frags. We tack a .fill onto the end of the
+ frag chain so that any .align's size can be worked by looking
+ at the next frag. */
subseg_set (frchain_ptr->frch_seg, frchain_ptr->frch_subseg);
#ifndef SUB_SEGMENT_ALIGN
@@ -547,18 +532,19 @@ DEFUN_VOID (write_object_file)
}
/* Now build one big frag chain for each segment, linked through
- fr_next. */
+ fr_next. */
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
{
-
fragS **prev_frag_ptr_ptr;
struct frchain *next_frchain_ptr;
- /* struct frag **head_ptr = segment_info[i].frag_root;*/
+#if 0
+ struct frag **head_ptr = segment_info[i].frag_root;
+#endif
segment_info[i].frag_root = segment_info[i].frchainP->frch_root;
#if 0
- /* Im not sure what this is for */
+ /* I'm not sure what this is for. */
for (frchain_ptr = segment_info[i].frchainP->frch_root;
frchain_ptr != (struct frchain *) NULL;
frchain_ptr = frchain_ptr->frch_next)
@@ -566,17 +552,13 @@ DEFUN_VOID (write_object_file)
*head_ptr = frchain_ptr;
head_ptr = &frchain_ptr->next;
}
-
-
#endif
}
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- relax_segment (segment_info[i].frag_root, i);
- }
+ relax_segment (segment_info[i].frag_root, i);
- /* Now the addresses of the frags are correct within the segment */
+ /* Now the addresses of the frags are correct within the segment. */
bfd_as_write_hook ();
bfd_close (abfd);
@@ -623,5 +605,3 @@ H_GET_TEXT_RELOCATION_SIZE ()
{
abort ();
}
-
-/* end of obj-ieee.c */
diff --git a/gnu/usr.bin/binutils/gas/config/obj-multi.h b/gnu/usr.bin/binutils/gas/config/obj-multi.h
index 42b7eb33e3c..225de2c63ab 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-multi.h
+++ b/gnu/usr.bin/binutils/gas/config/obj-multi.h
@@ -1,12 +1,12 @@
/* Multiple object format emulation.
- Copyright (C) 1995, 96, 97, 99, 2000
+ Copyright 1995, 1996, 1997, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
+ the Free Software Foundation; either version 2, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
@@ -32,6 +32,16 @@
#define OUTPUT_FLAVOR \
(this_format->flavor)
+#define obj_begin() \
+ (this_format->begin \
+ ? (*this_format->begin) () \
+ : (void) 0)
+
+#define obj_app_file(NAME) \
+ (this_format->app_file \
+ ? (*this_format->app_file) (NAME) \
+ : (void) 0)
+
#define obj_frob_symbol(S,P) \
(*this_format->frob_symbol) (S, &(P))
@@ -40,6 +50,11 @@
? (*this_format->frob_file) () \
: (void) 0)
+#define obj_frob_file_before_adjust() \
+ (this_format->frob_file_before_adjust \
+ ? (*this_format->frob_file_before_adjust) () \
+ : (void) 0)
+
#define obj_frob_file_after_relocs() \
(this_format->frob_file_after_relocs \
? (*this_format->frob_file_after_relocs) () \
@@ -69,21 +84,43 @@
#define S_GET_SIZE \
(*this_format->s_get_size)
-#define S_SET_SIZE \
- (*this_format->s_set_size)
+#define S_SET_SIZE(S, N) \
+ (this_format->s_set_size \
+ ? (*this_format->s_set_size) (S, N) \
+ : (void) 0)
#define S_GET_ALIGN \
(*this_format->s_get_align)
-#define S_SET_ALIGN \
- (*this_format->s_set_align)
+#define S_SET_ALIGN(S, N) \
+ (this_format->s_set_align \
+ ? (*this_format->s_set_align) (S, N) \
+ : (void) 0)
#define S_GET_OTHER \
(*this_format->s_get_other)
+#define S_SET_OTHER(S, O) \
+ (this_format->s_set_other \
+ ? (*this_format->s_set_other) (S, O) \
+ : (void) 0)
+
#define S_GET_DESC \
(*this_format->s_get_desc)
+#define S_SET_DESC(S, D) \
+ (this_format->s_set_desc \
+ ? (*this_format->s_set_desc) (S, D) \
+ : (void) 0)
+
+#define S_GET_TYPE \
+ (*this_format->s_get_desc)
+
+#define S_SET_TYPE(S, T) \
+ (this_format->s_set_type \
+ ? (*this_format->s_set_type) (S, T) \
+ : (void) 0)
+
#define OBJ_COPY_SYMBOL_ATTRIBUTES(d,s) \
(this_format->copy_symbol_attributes \
? (*this_format->copy_symbol_attributes) (d, s) \
@@ -94,11 +131,27 @@
? (*this_format->process_stab) (SEG,W,S,T,O,D) \
: (void) 0)
+#define SEPARATE_STAB_SECTIONS \
+ ((*this_format->separate_stab_sections) ())
+
+#define INIT_STAB_SECTION(S) \
+ (this_format->init_stab_section \
+ ? (*this_format->init_stab_section) (S) \
+ : (void) 0)
+
+#define EMIT_SECTION_SYMBOLS (this_format->emit_section_symbols)
+
#ifdef OBJ_MAYBE_ELF
/* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c
We also need various STAB defines for stab.c */
#include "obj-elf.h"
#endif
+#ifdef OBJ_MAYBE_AOUT
+/* We want aout_process_stab in stabs.c for the aout table. Defining this
+ macro will have no other effect. */
+#define AOUT_STABS
+#endif
+
#endif /* !OBJ_HEADER */
#endif /* _OBJ_MULTI_H */
diff --git a/gnu/usr.bin/binutils/gas/config/obj-som.c b/gnu/usr.bin/binutils/gas/config/obj-som.c
index 65d4adad58c..b7e3f0fc1fa 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-som.c
+++ b/gnu/usr.bin/binutils/gas/config/obj-som.c
@@ -1,5 +1,5 @@
/* SOM object file format.
- Copyright (C) 1993, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1998, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -30,7 +30,8 @@ static void obj_som_weak PARAMS ((int));
const pseudo_typeS obj_pseudo_table[] =
{
- {"weak", obj_som_weak, 0}
+ {"weak", obj_som_weak, 0},
+ {NULL, NULL, 0}
};
static int version_seen = 0;
@@ -38,12 +39,16 @@ static int copyright_seen = 0;
static int compiler_seen = 0;
/* Unused by SOM. */
-void obj_read_begin_hook () {}
+
+void
+obj_read_begin_hook ()
+{
+}
/* Handle a .compiler directive. This is intended to create the
compilation unit auxiliary header for MPE such that the linkeditor
can handle SOM extraction from archives. The format of the quoted
- string is "sourcefile language version" and is delimited by blanks.*/
+ string is "sourcefile language version" and is delimited by blanks. */
void
obj_som_compiler (unused)
@@ -93,8 +98,9 @@ obj_som_compiler (unused)
}
*p = '\000';
- language_name = ++p;
- while (*p != ' ' && *p != '\000') p++;
+ language_name = ++p;
+ while (*p != ' ' && *p != '\000')
+ p++;
if (*p == '\000')
{
as_bad (".compiler directive missing version");
@@ -102,8 +108,9 @@ obj_som_compiler (unused)
}
*p = '\000';
- version_id = ++p;
- while (*p != '\000') p++;
+ version_id = ++p;
+ while (*p != '\000')
+ p++;
/* Remove the trailing quote. */
*(--p) = '\000';
@@ -154,7 +161,8 @@ obj_som_version (unused)
if (bfd_som_attach_aux_hdr (stdoutput, VERSION_AUX_ID, version) == false)
{
bfd_perror (stdoutput->filename);
- as_perror (_("FATAL: Attaching version header %s"), stdoutput->filename);
+ as_perror (_("FATAL: Attaching version header %s"),
+ stdoutput->filename);
exit (EXIT_FAILURE);
}
*input_line_pointer = c;
@@ -199,7 +207,8 @@ obj_som_copyright (unused)
if (bfd_som_attach_aux_hdr (stdoutput, COPYRIGHT_AUX_ID, copyright) == false)
{
bfd_perror (stdoutput->filename);
- as_perror (_("FATAL: Attaching copyright header %s"), stdoutput->filename);
+ as_perror (_("FATAL: Attaching copyright header %s"),
+ stdoutput->filename);
exit (EXIT_FAILURE);
}
*input_line_pointer = c;
@@ -227,7 +236,7 @@ obj_som_init_stab_section (seg)
space = bfd_make_section_old_way (stdoutput, "$GDB_DEBUG$");
/* Set SOM specific attributes for the space. In particular we set
- the space "defined", "private", "sort_key", and "spnum" values.
+ the space "defined", "private", "sort_key", and "spnum" values.
Due to a bug in pxdb (called by hpux linker), the sort keys
of the various stabs spaces/subspaces need to be "small". We
@@ -244,7 +253,7 @@ obj_som_init_stab_section (seg)
/* Make some space for the first special stab entry and zero the memory.
It contains information about the length of this file's
- stab string and the like. Using it avoids the need to
+ stab string and the like. Using it avoids the need to
relocate the stab strings.
The $GDB_STRINGS$ space will be created as a side effect of
@@ -313,7 +322,7 @@ obj_som_weak (ignore)
char *name;
int c;
symbolS *symbolP;
-
+
do
{
name = input_line_pointer;
@@ -326,14 +335,13 @@ obj_som_weak (ignore)
symbol_get_obj (symbolP)->local = 1;
#endif
if (c == ',')
- {
- input_line_pointer++;
- SKIP_WHITESPACE ();
- if (*input_line_pointer == '\n')
- c = '\n';
- }
+ {
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '\n')
+ c = '\n';
+ }
}
while (c == ',');
demand_empty_rest_of_line ();
}
-
diff --git a/gnu/usr.bin/binutils/gas/config/obj-som.h b/gnu/usr.bin/binutils/gas/config/obj-som.h
index 62087b125f7..23d79eb2b11 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-som.h
+++ b/gnu/usr.bin/binutils/gas/config/obj-som.h
@@ -1,5 +1,5 @@
/* SOM object file format.
- Copyright (C) 1993, 1994, 1995, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1998, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -26,7 +26,7 @@
#define OBJ_SOM 1
-#include <bfd.h>
+#include "bfd.h"
#include "bfd/som.h"
#include "targ-cpu.h"
@@ -36,7 +36,7 @@
#endif
/* should be conditional on address size! */
-#define som_symbol(asymbol) ((som_symbol_type *)(&(asymbol)->the_bfd))
+#define som_symbol(asymbol) ((som_symbol_type *) (&(asymbol)->the_bfd))
extern void som_file_symbol PARAMS ((char *));
extern void obj_som_version PARAMS ((int));
diff --git a/gnu/usr.bin/binutils/gas/config/obj-vms.c b/gnu/usr.bin/binutils/gas/config/obj-vms.c
index 0f08f8eb3f3..426a250d283 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-vms.c
+++ b/gnu/usr.bin/binutils/gas/config/obj-vms.c
@@ -1,5 +1,6 @@
/* vms.c -- Write out a VAX/VMS object file
- Copyright (C) 1987, 88, 92, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -30,10 +31,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "subsegs.h"
#include "obstack.h"
-/* What we do if there is a goof. */
+/* What we do if there is a goof. */
#define error as_fatal
-#ifdef VMS /* These are of no use if we are cross assembling. */
+#ifdef VMS /* These are of no use if we are cross assembling. */
#include <fab.h> /* Define File Access Block */
#include <nam.h> /* Define NAM Block */
#include <xab.h> /* Define XAB - all different types*/
@@ -102,7 +103,6 @@ struct input_file
static struct input_file *file_root = (struct input_file *) NULL;
-
/*
* Styles of PSECTS (program sections) that we generate; just shorthand
* to avoid lists of section attributes. Used by VMS_Psect_Spec().
@@ -154,7 +154,7 @@ struct VMS_DBG_Symbol
};
#define SYMTYPLST_SIZE (1<<4) /* 16; must be power of two */
-#define SYMTYP_HASH(x) ((unsigned)(x) & (SYMTYPLST_SIZE-1))
+#define SYMTYP_HASH(x) ((unsigned) (x) & (SYMTYPLST_SIZE-1))
struct VMS_DBG_Symbol *VMS_Symbol_type_list[SYMTYPLST_SIZE];
/*
@@ -253,10 +253,9 @@ static int total_len; /* used to calculate the total length of variable
descriptor plus array descriptor - used for len byte*/
/* Flag if we have told user about finding global constants in the text
- section. */
+ section. */
static int gave_compiler_message = 0;
-
/*
* Global data (Object records limited to 512 bytes by VAX-11 "C" runtime)
*/
@@ -269,8 +268,8 @@ static int Current_Object_Record_Type; /* Type of record in above */
* Macros for moving data around. Must work on big-endian systems.
*/
#ifdef VMS /* These are more efficient for VMS->VMS systems */
-#define COPY_LONG(dest,val) ( *(long *)(dest) = (val) )
-#define COPY_SHORT(dest,val) ( *(short *)(dest) = (val) )
+#define COPY_LONG(dest,val) ( *(long *) (dest) = (val) )
+#define COPY_SHORT(dest,val) ( *(short *) (dest) = (val) )
#else
#define COPY_LONG(dest,val) md_number_to_chars ((dest), (val), 4)
#define COPY_SHORT(dest,val) md_number_to_chars ((dest), (val), 2)
@@ -447,7 +446,6 @@ const pseudo_typeS obj_pseudo_table[] =
{0, 0, 0},
}; /* obj_pseudo_table */
-
/* Routine to perform RESOLVE_SYMBOL_REDEFINITION(). */
int
@@ -484,7 +482,6 @@ vms_resolve_symbol_redef (sym)
return 0;
}
-
/* `tc_frob_label' handler for colon(symbols.c), used to examine the
dummy label(s) gcc inserts at the beginning of each file it generates.
gcc 1.x put "gcc_compiled."; gcc 2.x (as of 2.7) puts "gcc2_compiled."
@@ -518,14 +515,12 @@ symbolS *symbolP;
return;
}
-
void
obj_read_begin_hook ()
{
return;
}
-
void
obj_crawl_symbol_chain (headers)
object_headers *headers;
@@ -534,7 +529,7 @@ obj_crawl_symbol_chain (headers)
symbolS **symbolPP;
int symbol_number = 0;
- symbolPP = &symbol_rootP; /* -> last symbol chain link. */
+ symbolPP = &symbol_rootP; /* -> last symbol chain link. */
while ((symbolP = *symbolPP) != NULL)
{
resolve_symbol_value (symbolP, 1);
@@ -557,14 +552,14 @@ obj_crawl_symbol_chain (headers)
{
symbolP->sy_number = symbol_number++;
symbolP->sy_name_offset = 0;
- symbolPP = &(symbol_next (symbolP));
+ symbolPP = &symbolP->sy_next;
}
else
{
if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP))
{
as_bad (_("Local symbol %s never defined"), S_GET_NAME (symbolP));
- } /* oops. */
+ } /* oops. */
/* Unhook it from the chain. */
*symbolPP = symbol_next (symbolP);
@@ -579,7 +574,6 @@ obj_crawl_symbol_chain (headers)
/****** VMS OBJECT FILE HACKING ROUTINES *******/
-
/* Create the VMS object file. */
static void
@@ -600,7 +594,6 @@ Create_VMS_Object_File ()
Current_Object_Record_Type = -1;
}
-
/* Flush the object record buffer to the object file. */
static void
@@ -610,7 +603,7 @@ Flush_VMS_Object_Record_Buffer ()
if (Object_Record_Offset == 0)
return;
-#ifndef VMS /* For cross-assembly purposes. */
+#ifndef VMS /* For cross-assembly purposes. */
{
char RecLen[2];
@@ -640,7 +633,6 @@ Flush_VMS_Object_Record_Buffer ()
Object_Record_Offset = 0;
}
-
/* Declare a particular type of object file record. */
static void
@@ -656,7 +648,6 @@ Set_VMS_Object_File_Record (Type)
Current_Object_Record_Type = Type;
}
-
/* Close the VMS Object file. */
static void
@@ -665,7 +656,7 @@ Close_VMS_Object_File ()
/* Flush (should never be necessary) and reset saved record-type context. */
Set_VMS_Object_File_Record (-1);
-#ifndef VMS /* For cross-assembly purposes. */
+#ifndef VMS /* For cross-assembly purposes. */
{
char RecLen[2];
int minus_one = -1;
@@ -689,7 +680,6 @@ Close_VMS_Object_File ()
/****** Text Information and Relocation routines ******/
-
/* Stack Psect base followed by signed, varying-sized offset.
Common to several object records. */
@@ -709,15 +699,15 @@ vms_tir_stack_psect (Psect_Index, Offset, Force)
switch (Sta_P(psect_width,offset_width))
{
case Sta_P(1,1): PUT_CHAR (TIR_S_C_STA_PB);
- PUT_CHAR ((char)(unsigned char) Psect_Index);
+ PUT_CHAR ((char) (unsigned char) Psect_Index);
PUT_CHAR ((char) Offset);
break;
case Sta_P(1,2): PUT_CHAR (TIR_S_C_STA_PW);
- PUT_CHAR ((char)(unsigned char) Psect_Index);
+ PUT_CHAR ((char) (unsigned char) Psect_Index);
PUT_SHORT (Offset);
break;
case Sta_P(1,4): PUT_CHAR (TIR_S_C_STA_PL);
- PUT_CHAR ((char)(unsigned char) Psect_Index);
+ PUT_CHAR ((char) (unsigned char) Psect_Index);
PUT_LONG (Offset);
break;
case Sta_P(2,1): PUT_CHAR (TIR_S_C_STA_WPB);
@@ -736,7 +726,6 @@ vms_tir_stack_psect (Psect_Index, Offset, Force)
#undef Sta_P
}
-
/* Store immediate data in current Psect. */
static void
@@ -773,7 +762,6 @@ VMS_Store_Immediate_Data (Pointer, Size, Record_Type)
Flush_VMS_Object_Record_Buffer ();
}
-
/* Make a data reference. */
static void
@@ -796,7 +784,6 @@ VMS_Set_Data (Psect_Index, Offset, Record_Type, Force)
Flush_VMS_Object_Record_Buffer ();
}
-
/* Make a debugger reference to a struct, union or enum. */
static void
@@ -817,7 +804,6 @@ VMS_Store_Struct (Struct_Index)
Flush_VMS_Object_Record_Buffer ();
}
-
/* Make a debugger reference to partially define a struct, union or enum. */
static void
@@ -854,7 +840,6 @@ VMS_Set_Struct (Struct_Index)
/****** Traceback Information routines ******/
-
/* Write the Traceback Module Begin record. */
static void
@@ -888,7 +873,6 @@ VMS_TBT_Module_Begin ()
VMS_Store_Immediate_Data (Local, Size, OBJ_S_C_TBT);
}
-
/* Write the Traceback Module End record. */
static void
@@ -903,7 +887,6 @@ VMS_TBT_Module_End ()
VMS_Store_Immediate_Data (Local, 2, OBJ_S_C_TBT);
}
-
/* Write a Traceback Routine Begin record. */
static void
@@ -949,7 +932,6 @@ VMS_TBT_Routine_Begin (symbolP, Psect)
VMS_Store_Immediate_Data (Local, Size, OBJ_S_C_TBT);
}
-
/* Write a Traceback Routine End record.
We *must* search the symbol table to find the next routine, since the
@@ -1006,7 +988,6 @@ VMS_TBT_Routine_End (Max_Size, sp)
VMS_Store_Immediate_Data (Local, 7, OBJ_S_C_TBT);
}
-
/* Write a Traceback Block Begin record. */
static void
@@ -1050,7 +1031,6 @@ VMS_TBT_Block_Begin (symbolP, Psect, Name)
VMS_Store_Immediate_Data (Local, Size, OBJ_S_C_DBG);
}
-
/* Write a Traceback Block End record. */
static void
@@ -1281,13 +1261,12 @@ VMS_TBT_Source_File (Filename, ID_Number)
/* Library module name (none). */
*cp++ = 0;
/* Now that size is known, fill it in and write out the record. */
- Local[4] = cp - &Local[5]; /* source file declaration size */
+ Local[4] = cp - &Local[5]; /* source file declaration size */
Local[0] = cp - &Local[1]; /* TBT record size */
VMS_Store_Immediate_Data (Local, cp - Local, OBJ_S_C_TBT);
return 1;
}
-
/* Traceback information is described in terms of lines from compiler
listing files, not lines from source files. We need to set up the
correlation between listing line numbers and source line numbers.
@@ -1302,7 +1281,7 @@ VMS_TBT_Source_Lines (ID_Number, Starting_Line_Number, Number_Of_Lines)
{
char *cp;
int chunk_limit;
- char Local[128]; /* room enough to describe 1310700 lines... */
+ char Local[128]; /* room enough to describe 1310700 lines... */
cp = &Local[1]; /* Put size in Local[0] later. */
*cp++ = DST_S_C_SOURCE; /* DST type is "source file". */
@@ -1347,7 +1326,6 @@ VMS_TBT_Source_Lines (ID_Number, Starting_Line_Number, Number_Of_Lines)
/****** Debugger Information support routines ******/
-
/* This routine locates a file in the list of files. If an entry does
not exist, one is created. For include files, a new entry is always
created such that inline functions can be properly debugged. */
@@ -1394,7 +1372,6 @@ find_file (sp)
return fpnt;
}
-
/* This routine converts a number string into an integer, and stops when
it sees an invalid character. The return value is the address of the
character just past the last character read. No error is generated. */
@@ -1426,7 +1403,6 @@ cvt_integer (str, rtn)
* sections have already been output.
*/
-
/* This routine fixes the names that are generated by C++, ".this" is a good
example. The period does not work for the debugger, since it looks like
the syntax for a structure element, and thus it gets mightily confused.
@@ -1468,7 +1444,6 @@ fix_name (pnt)
return pnt;
}
-
/* When defining a structure, this routine is called to find the name of
the actual structure. It is assumed that str points to the equal sign
in the definition, and it moves backward until it finds the start of the
@@ -1497,7 +1472,6 @@ get_struct_name (str)
return pnt;
}
-
/* Search symbol list for type number dbx_type.
Return a pointer to struct. */
@@ -1519,7 +1493,6 @@ find_symbol (dbx_type)
return find_symbol (spnt->type2);
}
-
#if 0 /* obsolete */
/* this routine puts info into either Local or Asuffix, depending on the sign
* of size. The reason is that it is easier to build the variable descriptor
@@ -1556,7 +1529,6 @@ push (value, size1)
}
#endif
-
static void
fpush (value, size)
int value, size;
@@ -1595,7 +1567,6 @@ rpush (value, size)
}
}
-
/* This routine generates the array descriptor for a given array. */
static void
@@ -1652,7 +1623,6 @@ array_suffix (spnt2)
}
}
-
/* This routine generates the start of a variable descriptor based upon
a struct/union/enum that has yet to be defined. We define this spot as
a new location, and save four bytes for the address. When the struct is
@@ -1675,7 +1645,6 @@ new_forward_ref (dbx_type)
struct_number = -fpnt->struc_numb;
}
-
/* This routine generates the variable descriptor used to describe non-basic
variables. It calls itself recursively until it gets to the bottom of it
all, and then builds the descriptor backwards. It is easiest to do it
@@ -1780,7 +1749,6 @@ gen1 (spnt, array_suffix_len)
return 0;
}
-
/* This generates a suffix for a variable. If it is not a defined type yet,
then dbx_type contains the type we are expecting so we can generate a
forward reference. This calls gen1 to build most of the descriptor, and
@@ -1860,7 +1828,6 @@ generate_suffix (spnt, dbx_type)
Lpnt = 0;
}
-
/* "novel length" type doesn't work for simple atomic types */
#define USE_BITSTRING_DESCRIPTOR(t) ((t)->advanced == BASIC)
#undef SETUP_BASIC_TYPES
@@ -1887,7 +1854,6 @@ bitfield_suffix (spnt, width)
VMS_Store_Struct (spnt->struc_numb); /* output 4 more bytes */
}
-
/* Formally define a builtin type, so that it can serve as the target of
an indirect reference. It makes bitfield_suffix() easier by avoiding
the need to use a forward reference for the first occurrence of each
@@ -1942,7 +1908,6 @@ setup_basic_type (spnt)
return;
}
-
/* This routine generates a symbol definition for a C symbol for the debugger.
It takes a psect and offset for global symbols; if psect < 0, then this is
a local variable and the offset is relative to FP. In this case it can
@@ -1988,7 +1953,6 @@ VMS_DBG_record (spnt, Psect, Offset, Name)
generate_suffix (spnt, 0);
}
-
/* This routine parses the stabs entries in order to make the definition
for the debugger of local symbols and function parameters. */
@@ -2046,7 +2010,7 @@ VMS_local_stab_Parse (sp)
str1++;
}
if (*str1 == ':' && *pnt2 == ':')
- return; /* they are the same! lets skip this one */
+ return; /* They are the same! Let's skip this one. */
} /* for */
pnt++; /* skip p in case no register */
} /* if */
@@ -2062,7 +2026,6 @@ VMS_local_stab_Parse (sp)
return;
}
-
/* This routine parses a stabs entry to find the information required
to define a variable. It is used for global and static variables.
Basically we need to know the address of the symbol. With older
@@ -2170,7 +2133,6 @@ VMS_stab_parse (sp, expected_type, type1, type2, Text_Psect)
return;
}
-
/* Simpler interfaces into VMS_stab_parse(). */
static void
@@ -2197,7 +2159,6 @@ VMS_STSYM_Parse (sp, Text_Psect)
VMS_stab_parse (sp, 'S', N_DATA, -1, Text_Psect);
}
-
/* For register symbols, we must figure out what range of addresses
within the psect are valid. We will use the brackets in the stab
directives to give us guidance as to the PC range that this variable
@@ -2319,7 +2280,6 @@ VMS_RSYM_Parse (sp, Current_Routine, Text_Psect)
generate_suffix (spnt, 0);
}
-
/* This function examines a structure definition, checking all of the elements
to make sure that all of them are fully defined. The only thing that we
kick out are arrays of undefined structs, since we do not know how big
@@ -2353,7 +2313,6 @@ forward_reference (pnt)
return 0; /* no forward refences found */
}
-
/* Used to check a single element of a structure on the final pass. */
static int
@@ -2372,7 +2331,6 @@ final_forward_reference (spnt)
return 0; /* no forward refences found */
}
-
/* This routine parses the stabs directives to find any definitions of dbx
type numbers. It makes a note of all of them, creating a structure
element of VMS_DBG_Symbol that describes it. This also generates the
@@ -2802,7 +2760,6 @@ VMS_typedef_parse (str)
return 0;
}
-
/* This is the root routine that parses the stabs entries for definitions.
it calls VMS_typedef_parse, which can in turn call itself. We need to
be careful, since sometimes there are forward references to other symbol
@@ -2947,7 +2904,6 @@ VMS_LSYM_Parse ()
}
}
-
static void
Define_Local_Symbols (s0P, s2P, Current_Routine, Text_Psect)
symbolS *s0P, *s2P;
@@ -2987,7 +2943,6 @@ Define_Local_Symbols (s0P, s2P, Current_Routine, Text_Psect)
} /* for */
}
-
/* This function crawls the symbol chain searching for local symbols that
need to be described to the debugger. When we enter a new scope with
a "{", it creates a new "block", which helps the debugger keep track
@@ -3072,7 +3027,6 @@ get_VMS_time_on_unix (Now)
}
#endif /* not VMS */
-
/* Write the MHD (Module Header) records. */
static void
@@ -3179,7 +3133,6 @@ Write_VMS_MHD_Records ()
Flush_VMS_Object_Record_Buffer ();
}
-
/* Write the EOM (End Of Module) record. */
static void
@@ -3195,7 +3148,7 @@ Write_VMS_EOM_Record (Psect, Offset)
*/
Set_VMS_Object_File_Record (OBJ_S_C_EOM);
PUT_CHAR (OBJ_S_C_EOM); /* Record type. */
- PUT_CHAR (0); /* Error severity level (we ignore it). */
+ PUT_CHAR (0); /* Error severity level (we ignore it). */
/*
* Store the entry point, if it exists
*/
@@ -3417,7 +3370,6 @@ VMS_Case_Hack_Symbol (In, Out)
#define GLOBALSYMBOL_BIT 0x10000
#define GLOBALVALUE_BIT 0x20000
-
static void
VMS_Modify_Psect_Attributes (Name, Attribute_Pointer)
const char *Name;
@@ -3525,7 +3477,7 @@ VMS_Modify_Psect_Attributes (Name, Attribute_Pointer)
#define GBLSYM_REF 0
#define GBLSYM_DEF 1
#define GBLSYM_VAL 2
-#define GBLSYM_LCL 4 /* not GBL after all... */
+#define GBLSYM_LCL 4 /* not GBL after all... */
#define GBLSYM_WEAK 8
/*
@@ -3663,30 +3615,30 @@ VMS_Psect_Spec (Name, Size, Type, vsp)
switch (Type)
{
case ps_TEXT:
- /* Text psects are PIC,noOVR,REL,noGBL,SHR,EXE,RD,noWRT. */
+ /* Text psects are PIC,noOVR,REL,noGBL,SHR,EXE,RD,noWRT. */
Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_REL|GPS_S_M_SHR|GPS_S_M_EXE
|GPS_S_M_RD);
break;
case ps_DATA:
- /* Data psects are PIC,noOVR,REL,noGBL,noSHR,noEXE,RD,WRT. */
+ /* Data psects are PIC,noOVR,REL,noGBL,noSHR,noEXE,RD,WRT. */
Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_REL|GPS_S_M_RD|GPS_S_M_WRT);
break;
case ps_COMMON:
- /* Common block psects are: PIC,OVR,REL,GBL,noSHR,noEXE,RD,WRT. */
+ /* Common block psects are: PIC,OVR,REL,GBL,noSHR,noEXE,RD,WRT. */
Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_OVR|GPS_S_M_REL|GPS_S_M_GBL
|GPS_S_M_RD|GPS_S_M_WRT);
break;
case ps_CONST:
- /* Const data psects are: PIC,OVR,REL,GBL,noSHR,noEXE,RD,noWRT. */
+ /* Const data psects are: PIC,OVR,REL,GBL,noSHR,noEXE,RD,noWRT. */
Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_OVR|GPS_S_M_REL|GPS_S_M_GBL
|GPS_S_M_RD);
break;
case ps_CTORS:
- /* Ctor psects are PIC,noOVR,REL,GBL,noSHR,noEXE,RD,noWRT. */
+ /* Ctor psects are PIC,noOVR,REL,GBL,noSHR,noEXE,RD,noWRT. */
Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_REL|GPS_S_M_GBL|GPS_S_M_RD);
break;
case ps_DTORS:
- /* Dtor psects are PIC,noOVR,REL,GBL,noSHR,noEXE,RD,noWRT. */
+ /* Dtor psects are PIC,noOVR,REL,GBL,noSHR,noEXE,RD,noWRT. */
Psect_Attributes = (GPS_S_M_PIC|GPS_S_M_REL|GPS_S_M_GBL|GPS_S_M_RD);
break;
default:
@@ -3805,7 +3757,6 @@ VMS_Initialized_Data_Size (s0P, End_Of_Data)
return (offsetT) (nearest_val - s0P_val);
}
-
/* Check symbol names for the Psect hack with a globalvalue, and then
generate globalvalues for those that have it. */
@@ -3883,7 +3834,7 @@ VMS_Emit_Globalvalues (text_siz, data_siz, Data_Segment)
Size = VMS_Initialized_Data_Size (sp, text_siz + data_siz);
if (Size > 4)
error (_("Invalid data type for globalvalue"));
- globalvalue = md_chars_to_number (Data_Segment +
+ globalvalue = md_chars_to_number (Data_Segment +
S_GET_VALUE (sp) - text_siz , Size);
/* Three times for good luck. The linker seems to get confused
if there are fewer than three */
@@ -4533,7 +4484,6 @@ struct vms_obj_state {
#define Local_Initd_Data_Size vms_obj_state.local_initd_data_size
#define Data_Segment vms_obj_state.data_segment
-
#define IS_GXX_VTABLE(symP) (strncmp (S_GET_NAME (symP), "__vt.", 5) == 0)
#define IS_GXX_XTOR(symP) (strncmp (S_GET_NAME (symP), "__GLOBAL_.", 10) == 0)
#define XTOR_SIZE 4
@@ -4671,7 +4621,6 @@ synthesize_data_segment (data_siz, text_siz, data_frag_root)
return;
}
-
/* Perform data segment fixups. */
static void
@@ -5105,7 +5054,6 @@ local_symbols_DST (s0P, Current_Routine)
}
}
-
/* Construct and output the debug symbol table. */
static void
@@ -5429,7 +5377,6 @@ vms_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
if (data_siz > 0)
synthesize_data_segment (data_siz, text_siz, data_frag_root);
-
/******* Global Symbol Directory *******/
/*
@@ -5473,7 +5420,6 @@ vms_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
vsp->Psect_Index = Data_Psect;
}
-
if (Ctors_Symbols != 0)
{
char *ps_name = "$ctors";
@@ -5524,12 +5470,10 @@ vms_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
vms_fixup_xtors_section (Dtors_Symbols, Dtors_Psect);
}
-
/******* Debugger Symbol Table Records *******/
vms_build_DST (text_siz);
-
/******* Wrap things up *******/
/*
@@ -5545,5 +5489,3 @@ vms_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
*/
Close_VMS_Object_File ();
}
-
-/* end of obj-vms.c */
diff --git a/gnu/usr.bin/binutils/gas/config/obj-vms.h b/gnu/usr.bin/binutils/gas/config/obj-vms.h
index ad8fdce00dd..fa4f3bd8f94 100644
--- a/gnu/usr.bin/binutils/gas/config/obj-vms.h
+++ b/gnu/usr.bin/binutils/gas/config/obj-vms.h
@@ -1,5 +1,5 @@
/* VMS object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 1999
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@ the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+02111-1307, USA. */
/* Tag to validate a.out object file format processing */
#define OBJ_VMS 1
@@ -48,7 +48,7 @@ extern unsigned char const_flag;
#define IN_DEFAULT_SECTION 0x80
-/* These are defined in obj-vms.c. */
+/* These are defined in obj-vms.c. */
extern const short seg_N_TYPE[];
extern const segT N_TYPE_seg[];
@@ -59,7 +59,7 @@ enum reloc_type
};
#define N_BADMAG(x) (0)
-#define N_TXTOFF(x) ( sizeof(struct exec) )
+#define N_TXTOFF(x) ( sizeof (struct exec) )
#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
#define N_TROFF(x) ( N_DATOFF(x) + (x).a_data )
#define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize )
@@ -84,7 +84,7 @@ struct exec
typedef struct
{
struct exec header; /* a.out header */
- long string_table_size; /* names + '\0' + sizeof(int) */
+ long string_table_size; /* names + '\0' + sizeof (int) */
}
object_headers;
@@ -145,7 +145,7 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */
#define S_IS_DEBUG(s) ((s)->sy_symbol.n_type & N_STAB)
/* True if a symbol is local symbol name */
/* A symbol name whose name begin with ^A is a gas internal pseudo symbol
- nameless symbols come from .stab directives. */
+ nameless symbols come from .stab directives. */
#define S_IS_LOCAL(s) (S_GET_NAME(s) && \
!S_IS_DEBUG(s) && \
(strchr(S_GET_NAME(s), '\001') != 0 || \
@@ -191,7 +191,6 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */
/* Set the n_type expression value */
#define S_SET_TYPE(s,v) ((s)->sy_symbol.n_type = (v))
-
/* File header macro and type definition */
#define H_GET_TEXT_SIZE(h) ((h)->header.a_text)
@@ -204,9 +203,9 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */
#define H_SET_STRING_SIZE(h,v) ((h)->string_table_size = (v))
#define H_SET_SYMBOL_TABLE_SIZE(h,v) ((h)->header.a_syms = (v) * \
- sizeof(struct nlist))
+ sizeof (struct nlist))
-/* line numbering stuff. */
+/* line numbering stuff. */
#define OBJ_EMIT_LINENO(a, b, c) {;}
#define obj_symbol_new_hook(s) {;}
@@ -223,7 +222,7 @@ extern void tc_aout_fix_to_chars PARAMS ((char *,struct fix *,relax_addressT));
extern int vms_resolve_symbol_redef PARAMS ((symbolS *));
#define RESOLVE_SYMBOL_REDEFINITION(X) vms_resolve_symbol_redef(X)
-/* Compiler-generated label "__vax_g_doubles" is used to augment .stabs. */
+/* Compiler-generated label "__vax_g_doubles" is used to augment .stabs. */
extern void vms_check_for_special_label PARAMS ((symbolS *));
#define obj_frob_label(X) vms_check_for_special_label(X)
@@ -547,5 +546,3 @@ extern void vms_write_object_file PARAMS ((unsigned,unsigned,unsigned,
#define DBG_S_C_COMPLEX_ARRAY DST_K_TS_ARRAY
#endif /* WANT_VMS_OBJ_DEFS */
-
-/* end of obj-vms.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-a29k.c b/gnu/usr.bin/binutils/gas/config/tc-a29k.c
index 600fec58857..d4d4c435944 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-a29k.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-a29k.c
@@ -1,5 +1,5 @@
/* tc-a29k.c -- Assemble for the AMD 29000.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1998
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -98,7 +98,7 @@ const char comment_chars[] = ";";
.line and .file directives will appear in the pre-processed output */
/* Note that input_file.c hand checks for '#' at the beginning of the
first line of the input file. This is because the compiler outputs
- #NO_APP at the beginning of its output. */
+ #NO_APP at the beginning of its output. */
/* Also note that comments like this one will always work */
const char line_comment_chars[] = "#";
@@ -148,7 +148,7 @@ s_use (ignore)
return;
}
/* Literals can't go in the text segment because you can't read from
- instruction memory on some 29k's. So, into initialized data. */
+ instruction memory on some 29k's. So, into initialized data. */
if (strncmp (input_line_pointer, ".lit", 4) == 0)
{
input_line_pointer += 4;
@@ -283,7 +283,7 @@ md_begin ()
}
/* Hack to avoid multiple opcode entries. We pre-locate all the
- variations (b/i field and P/A field) and handle them. */
+ variations (b/i field and P/A field) and handle them. */
if (!strcmp (name, machine_opcodes[i + 1].name))
{
@@ -427,7 +427,7 @@ machine_ip (str)
/* Build the opcode, checking as we go to make sure that the
operands match.
-
+
If an operand matches, we modify the_insn or opcode appropriately,
and do a "continue". If an operand fails to match, we "break". */
@@ -445,7 +445,7 @@ machine_ip (str)
case '\0': /* end of args */
if (*s == '\0')
{
- /* We are truly done. */
+ /* We are truly done. */
the_insn.opcode = opcode;
return;
}
@@ -669,7 +669,6 @@ machine_ip (str)
}
break;
-
case 'f': /* FS bits of CONVERT */
if (operand->X_op == O_constant &&
operand->X_add_number < 4)
@@ -710,8 +709,8 @@ machine_ip (str)
but I'm not sure.
Turn a string in input_line_pointer into a floating point constant
- of type type, and store the appropriate bytes in *litP. The number
- of LITTLENUMS emitted is stored in *sizeP . An error message is
+ 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 */
@@ -792,7 +791,6 @@ md_apply_fix (fixP, val)
fixP->fx_addnumber = val; /* Remember value for emit_reloc */
-
know (fixP->fx_size == 4);
know (fixP->fx_r_type < NO_RELOC);
@@ -1004,7 +1002,7 @@ print_insn (insn)
On sparc/29k: first 4 bytes are normal unsigned long address, next three
bytes are index, most sig. byte first. Byte 7 is broken up with
bit 7 as external, bits 6 & 5 unused, and the lower
- five bits as relocation type. Next 4 bytes are long addend. */
+ five bits as relocation type. Next 4 bytes are long addend. */
/* Thanx and a tip of the hat to Michael Bloom, mb@ttidca.tti.com */
#ifdef OBJ_AOUT
@@ -1042,7 +1040,7 @@ CONST char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -1121,7 +1119,7 @@ md_undefined_symbol (name)
long maxreg;
/* Parse the number, make sure it has no extra zeroes or
- trailing chars. */
+ trailing chars. */
regnum = atol (&name[2]);
if (name[0] == 's' || name[0] == 'S')
@@ -1235,7 +1233,7 @@ md_operand (expressionP)
type = 'x';
fieldlimit = 4;
}
- else
+ else
{
return;
}
@@ -1266,7 +1264,7 @@ md_operand (expressionP)
SKIP_WHITESPACE ();
input_line_pointer = s;
- expressionP->X_op = O_constant;
+ expressionP->X_op = O_constant;
expressionP->X_unsigned = 1;
expressionP->X_add_number = ((floatbuf[fieldnum * 2]
<< LITTLENUM_NUMBER_OF_BITS)
@@ -1292,5 +1290,3 @@ md_pcrel_from (fixP)
{
return fixP->fx_where + fixP->fx_frag->fr_address;
}
-
-/* end of tc-a29k.c */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-a29k.h b/gnu/usr.bin/binutils/gas/config/tc-a29k.h
index b60f6058257..24e53ed9996 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-a29k.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-a29k.h
@@ -1,5 +1,6 @@
/* tc-a29k.h -- Assemble for the AMD 29000.
- Copyright (C) 1989, 90, 91, 92, 93, 95, 1998 Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1991, 1992, 1993, 1995, 1998
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/gnu/usr.bin/binutils/gas/config/tc-alpha.c b/gnu/usr.bin/binutils/gas/config/tc-alpha.c
index dff7ac84bca..81a95b4c7f3 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-alpha.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-alpha.c
@@ -1,5 +1,6 @@
/* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU.
- Copyright (C) 1989, 93-98, 1999 Free Software Foundation, Inc.
+ Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Carnegie Mellon University, 1993.
Written by Alessandro Forin, based on earlier gas-1.38 target CPU files.
Modified by Ken Raeburn for gas-2.x and ECOFF support.
@@ -58,10 +59,10 @@
#ifdef OBJ_ELF
#include "elf/alpha.h"
+#include "dwarf2dbg.h"
#endif
#include <ctype.h>
-
/* Local types */
@@ -71,22 +72,19 @@
#define MAX_INSN_FIXUPS 2
#define MAX_INSN_ARGS 5
-struct alpha_fixup
-{
+struct alpha_fixup {
expressionS exp;
bfd_reloc_code_real_type reloc;
};
-struct alpha_insn
-{
+struct alpha_insn {
unsigned insn;
int nfixups;
struct alpha_fixup fixups[MAX_INSN_FIXUPS];
unsigned sequence[MAX_INSN_FIXUPS];
};
-enum alpha_macro_arg
-{
+enum alpha_macro_arg {
MACRO_EOA = 1,
MACRO_IR,
MACRO_PIR,
@@ -100,15 +98,14 @@ enum alpha_macro_arg
MACRO_JSR
};
-struct alpha_macro
-{
+struct alpha_macro {
const char *name;
void (*emit) PARAMS ((const expressionS *, int, const PTR));
const PTR arg;
enum alpha_macro_arg argsets[16];
};
-/* Extra expression types. */
+/* Extra expression types. */
#define O_pregister O_md1 /* O_register, in parentheses */
#define O_cpregister O_md2 /* + a leading comma */
@@ -127,7 +124,6 @@ struct alpha_macro
#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_gprellow)
#endif
-
/* Macros for extracting the type and number of encoded register tokens */
#define is_ir_num(x) (((x) & 32) == 0)
@@ -145,14 +141,14 @@ struct alpha_macro
#if 1
#define range_signed_16(x) \
- (((offsetT)(x) >> 15) == 0 || ((offsetT)(x) >> 15) == -1)
+ (((offsetT) (x) >> 15) == 0 || ((offsetT) (x) >> 15) == -1)
#define range_signed_32(x) \
- (((offsetT)(x) >> 31) == 0 || ((offsetT)(x) >> 31) == -1)
+ (((offsetT) (x) >> 31) == 0 || ((offsetT) (x) >> 31) == -1)
#else
-#define range_signed_16(x) ((offsetT)(x) >= -(offsetT)0x8000 && \
- (offsetT)(x) <= (offsetT)0x7FFF)
-#define range_signed_32(x) ((offsetT)(x) >= -(offsetT)0x80000000 && \
- (offsetT)(x) <= (offsetT)0x7FFFFFFF)
+#define range_signed_16(x) ((offsetT) (x) >= -(offsetT) 0x8000 && \
+ (offsetT) (x) <= (offsetT) 0x7FFF)
+#define range_signed_32(x) ((offsetT) (x) >= -(offsetT) 0x80000000 && \
+ (offsetT) (x) <= (offsetT) 0x7FFFFFFF)
#endif
/* Macros for sign extending from 16- and 32-bits. */
@@ -160,36 +156,35 @@ struct alpha_macro
but really a predicate should be found to use the non-cast forms. */
#if 1
-#define sign_extend_16(x) ((short)(x))
-#define sign_extend_32(x) ((int)(x))
+#define sign_extend_16(x) ((short) (x))
+#define sign_extend_32(x) ((int) (x))
#else
-#define sign_extend_16(x) ((offsetT)(((x) & 0xFFFF) ^ 0x8000) - 0x8000)
-#define sign_extend_32(x) ((offsetT)(((x) & 0xFFFFFFFF) \
+#define sign_extend_16(x) ((offsetT) (((x) & 0xFFFF) ^ 0x8000) - 0x8000)
+#define sign_extend_32(x) ((offsetT) (((x) & 0xFFFFFFFF) \
^ 0x80000000) - 0x80000000)
#endif
/* Macros to build tokens */
-#define set_tok_reg(t, r) (memset(&(t), 0, sizeof(t)), \
+#define set_tok_reg(t, r) (memset (&(t), 0, sizeof (t)), \
(t).X_op = O_register, \
(t).X_add_number = (r))
-#define set_tok_preg(t, r) (memset(&(t), 0, sizeof(t)), \
+#define set_tok_preg(t, r) (memset (&(t), 0, sizeof (t)), \
(t).X_op = O_pregister, \
(t).X_add_number = (r))
-#define set_tok_cpreg(t, r) (memset(&(t), 0, sizeof(t)), \
+#define set_tok_cpreg(t, r) (memset (&(t), 0, sizeof (t)), \
(t).X_op = O_cpregister, \
(t).X_add_number = (r))
-#define set_tok_freg(t, r) (memset(&(t), 0, sizeof(t)), \
+#define set_tok_freg(t, r) (memset (&(t), 0, sizeof (t)), \
(t).X_op = O_register, \
- (t).X_add_number = (r)+32)
-#define set_tok_sym(t, s, a) (memset(&(t), 0, sizeof(t)), \
+ (t).X_add_number = (r) + 32)
+#define set_tok_sym(t, s, a) (memset (&(t), 0, sizeof (t)), \
(t).X_op = O_symbol, \
(t).X_add_symbol = (s), \
(t).X_add_number = (a))
-#define set_tok_const(t, n) (memset(&(t), 0, sizeof(t)), \
+#define set_tok_const(t, n) (memset (&(t), 0, sizeof (t)), \
(t).X_op = O_constant, \
(t).X_add_number = (n))
-
/* Prototypes for all local functions */
@@ -246,6 +241,9 @@ static void s_alpha_end PARAMS ((int));
static void s_alpha_mask PARAMS ((int));
static void s_alpha_frame PARAMS ((int));
static void s_alpha_prologue PARAMS ((int));
+static void s_alpha_file PARAMS ((int));
+static void s_alpha_loc PARAMS ((int));
+static void s_alpha_stab PARAMS ((int));
static void s_alpha_coff_wrapper PARAMS ((int));
#endif
#ifdef OBJ_EVAX
@@ -269,7 +267,6 @@ static void alpha_align PARAMS ((int, char *, symbolS *, int));
#ifdef RELOC_OP_P
static void alpha_adjust_symtab_relocs PARAMS ((bfd *, asection *, PTR));
#endif
-
/* Generic assembler global variables which must be defined by all
targets. */
@@ -306,19 +303,18 @@ const char *md_shortopts = "Fm:gG:";
struct option md_longopts[] = {
#define OPTION_32ADDR (OPTION_MD_BASE)
{ "32addr", no_argument, NULL, OPTION_32ADDR },
-#define OPTION_RELAX (OPTION_32ADDR+1)
+#define OPTION_RELAX (OPTION_32ADDR + 1)
{ "relax", no_argument, NULL, OPTION_RELAX },
#ifdef OBJ_ELF
-#define OPTION_MDEBUG (OPTION_RELAX+1)
-#define OPTION_NO_MDEBUG (OPTION_MDEBUG+1)
+#define OPTION_MDEBUG (OPTION_RELAX + 1)
+#define OPTION_NO_MDEBUG (OPTION_MDEBUG + 1)
{ "mdebug", no_argument, NULL, OPTION_MDEBUG },
{ "no-mdebug", no_argument, NULL, OPTION_NO_MDEBUG },
#endif
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof(md_longopts);
-
+size_t md_longopts_size = sizeof (md_longopts);
#ifdef OBJ_EVAX
#define AXP_REG_R0 0
@@ -376,7 +372,7 @@ static segT alpha_dtors_section;
#endif
static segT alpha_lit8_section;
-/* Symbols referring to said sections. */
+/* Symbols referring to said sections. */
#ifdef OBJ_ECOFF
static symbolS *alpha_lita_symbol;
static symbolS *alpha_lit4_symbol;
@@ -394,8 +390,8 @@ static offsetT alpha_lit4_literal;
static offsetT alpha_lit8_literal;
#endif
-/* The active .ent symbol. */
#ifdef OBJ_ELF
+/* The active .ent symbol. */
static symbolS *alpha_cur_ent_sym;
#endif
@@ -433,7 +429,7 @@ static int alpha_debug;
#ifdef OBJ_ELF
/* Whether we are emitting an mdebug section. */
-int alpha_flag_mdebug = 1;
+int alpha_flag_mdebug = -1;
#endif
/* Don't fully resolve relocations, allowing code movement in the linker. */
@@ -475,7 +471,7 @@ static int alpha_flag_show_after_trunc = 0; /* -H */
#define ALPHA_RELOC_TABLE(op) \
&alpha_reloc_op[ ((!USER_RELOC_P (op)) \
? (abort (), 0) \
- : (int)(op) - (int)O_literal) ]
+ : (int) (op) - (int) O_literal) ]
#define LITUSE_BASE 1
#define LITUSE_BYTOFF 2
@@ -547,13 +543,13 @@ static const struct alpha_reloc_op_tag {
};
static const int alpha_num_reloc_op
- = sizeof(alpha_reloc_op) / sizeof(*alpha_reloc_op);
+ = sizeof (alpha_reloc_op) / sizeof (*alpha_reloc_op);
/* Maximum # digits needed to hold the largest sequence # */
#define ALPHA_RELOC_DIGITS 25
/* Whether a sequence number is valid. */
-#define ALPHA_RELOC_SEQUENCE_OK(X) ((X) > 0 && ((unsigned)(X)) == (X))
+#define ALPHA_RELOC_SEQUENCE_OK(X) ((X) > 0 && ((unsigned) (X)) == (X))
/* Structure to hold explict sequence information. */
struct alpha_literal_tag
@@ -573,14 +569,12 @@ static struct hash_control *alpha_literal_hash;
/* A table of CPU names and opcode sets. */
-static const struct cpu_type
-{
+static const struct cpu_type {
const char *name;
unsigned flags;
-} cpu_types[] =
-{
+} cpu_types[] = {
/* Ad hoc convention: cpu number gets palcode, process code doesn't.
- This supports usage under DU 4.0b that does ".arch ev4", and
+ This supports usage under DU 4.0b that does ".arch ev4", and
usage in MILO that does -m21064. Probably something more
specific like -m21064-pal should be used, but oh well. */
@@ -635,24 +629,24 @@ static const struct alpha_macro alpha_macros[] = {
{ "ldt", emit_loadstore, "ldt",
{ MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "ldb", emit_ldX, (PTR)0,
+ { "ldb", emit_ldX, (PTR) 0,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "ldbu", emit_ldXu, (PTR)0,
+ { "ldbu", emit_ldXu, (PTR) 0,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "ldw", emit_ldX, (PTR)1,
+ { "ldw", emit_ldX, (PTR) 1,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "ldwu", emit_ldXu, (PTR)1,
+ { "ldwu", emit_ldXu, (PTR) 1,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "uldw", emit_uldX, (PTR)1,
+ { "uldw", emit_uldX, (PTR) 1,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "uldwu", emit_uldXu, (PTR)1,
+ { "uldwu", emit_uldXu, (PTR) 1,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "uldl", emit_uldX, (PTR)2,
+ { "uldl", emit_uldX, (PTR) 2,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "uldlu", emit_uldXu, (PTR)2,
+ { "uldlu", emit_uldXu, (PTR) 2,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "uldq", emit_uldXu, (PTR)3,
+ { "uldq", emit_uldXu, (PTR) 3,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldgp", emit_ldgp, NULL,
@@ -696,15 +690,15 @@ static const struct alpha_macro alpha_macros[] = {
{ "stt", emit_loadstore, "stt",
{ MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "stb", emit_stX, (PTR)0,
+ { "stb", emit_stX, (PTR) 0,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "stw", emit_stX, (PTR)1,
+ { "stw", emit_stX, (PTR) 1,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "ustw", emit_ustX, (PTR)1,
+ { "ustw", emit_ustX, (PTR) 1,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "ustl", emit_ustX, (PTR)2,
+ { "ustl", emit_ustX, (PTR) 2,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
- { "ustq", emit_ustX, (PTR)3,
+ { "ustq", emit_ustX, (PTR) 3,
{ MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
/* Arithmetic macros */
@@ -717,11 +711,11 @@ static const struct alpha_macro alpha_macros[] = {
{ "absq" emit_absq, 2, { EXP, IR } },
#endif
- { "sextb", emit_sextX, (PTR)0,
+ { "sextb", emit_sextX, (PTR) 0,
{ MACRO_IR, MACRO_IR, MACRO_EOA,
MACRO_IR, MACRO_EOA,
/* MACRO_EXP, MACRO_IR, MACRO_EOA */ } },
- { "sextw", emit_sextX, (PTR)1,
+ { "sextw", emit_sextX, (PTR) 1,
{ MACRO_IR, MACRO_IR, MACRO_EOA,
MACRO_IR, MACRO_EOA,
/* MACRO_EXP, MACRO_IR, MACRO_EOA */ } },
@@ -801,7 +795,7 @@ static const struct alpha_macro alpha_macros[] = {
};
static const unsigned int alpha_num_macros
- = sizeof(alpha_macros) / sizeof(*alpha_macros);
+ = sizeof (alpha_macros) / sizeof (*alpha_macros);
/* Public interface functions */
@@ -824,12 +818,12 @@ md_begin ()
/* Create the opcode hash table */
alpha_opcode_hash = hash_new ();
- for (i = 0; i < alpha_num_opcodes; )
+ for (i = 0; i < alpha_num_opcodes;)
{
const char *name, *retval, *slash;
name = alpha_opcodes[i].name;
- retval = hash_insert (alpha_opcode_hash, name, (PTR)&alpha_opcodes[i]);
+ retval = hash_insert (alpha_opcode_hash, name, (PTR) &alpha_opcodes[i]);
if (retval)
as_fatal (_("internal error: can't hash opcode `%s': %s"), name, retval);
@@ -844,7 +838,7 @@ md_begin ()
memcpy (p, name, slash - name);
strcpy (p + (slash - name), slash + 1);
- (void)hash_insert(alpha_opcode_hash, p, (PTR)&alpha_opcodes[i]);
+ (void) hash_insert (alpha_opcode_hash, p, (PTR) &alpha_opcodes[i]);
/* Ignore failures -- the opcode table does duplicate some
variants in different forms, like "hw_stq" and "hw_st/q". */
}
@@ -858,14 +852,15 @@ md_begin ()
/* Create the macro hash table */
alpha_macro_hash = hash_new ();
- for (i = 0; i < alpha_num_macros; )
+ for (i = 0; i < alpha_num_macros;)
{
const char *name, *retval;
name = alpha_macros[i].name;
- retval = hash_insert (alpha_macro_hash, name, (PTR)&alpha_macros[i]);
+ retval = hash_insert (alpha_macro_hash, name, (PTR) &alpha_macros[i]);
if (retval)
- as_fatal (_("internal error: can't hash macro `%s': %s"), name, retval);
+ as_fatal (_("internal error: can't hash macro `%s': %s"),
+ name, retval);
while (++i < alpha_num_macros
&& (alpha_macros[i].name == name
@@ -878,16 +873,16 @@ md_begin ()
for (i = 0; i < 32; ++i)
{
char name[4];
- sprintf(name, "$%d", i);
- alpha_register_table[i] = symbol_create(name, reg_section, i,
- &zero_address_frag);
+ sprintf (name, "$%d", i);
+ alpha_register_table[i] = symbol_create (name, reg_section, i,
+ &zero_address_frag);
}
for (; i < 64; ++i)
{
char name[5];
- sprintf(name, "$f%d", i-32);
- alpha_register_table[i] = symbol_create(name, reg_section, i,
- &zero_address_frag);
+ sprintf (name, "$f%d", i - 32);
+ alpha_register_table[i] = symbol_create (name, reg_section, i,
+ &zero_address_frag);
}
/* Create the special symbols and sections we'll be using */
@@ -911,17 +906,17 @@ md_begin ()
#ifdef OBJ_ELF
if (ECOFF_DEBUGGING)
{
- segT sec = subseg_new(".mdebug", (subsegT)0);
- bfd_set_section_flags(stdoutput, sec, SEC_HAS_CONTENTS|SEC_READONLY);
- bfd_set_section_alignment(stdoutput, sec, 3);
+ segT sec = subseg_new (".mdebug", (subsegT) 0);
+ bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY);
+ bfd_set_section_alignment (stdoutput, sec, 3);
}
#endif /* OBJ_ELF */
- subseg_set(text_section, 0);
+ subseg_set (text_section, 0);
#ifdef RELOC_OP_P
/* Create literal lookup hash table. */
- alpha_literal_hash = hash_new();
+ alpha_literal_hash = hash_new ();
#endif
}
@@ -964,15 +959,15 @@ md_section_align (seg, size)
segT seg;
valueT size;
{
- int align = bfd_get_section_alignment(stdoutput, seg);
- valueT mask = ((valueT)1 << align) - 1;
+ int align = bfd_get_section_alignment (stdoutput, seg);
+ valueT mask = ((valueT) 1 << align) - 1;
return (size + mask) & ~mask;
}
/* Turn a string in input_line_pointer into a floating point constant
- of type type, and store the appropriate bytes in *litP. The number
- of LITTLENUMS emitted is stored in *sizeP. An error message is
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
/* Equal to MAX_PRECISION in atof-ieee.c */
@@ -1060,25 +1055,25 @@ md_parse_option (c, arg)
break;
case 'G':
- g_switch_value = atoi(arg);
+ g_switch_value = atoi (arg);
break;
case 'm':
{
const struct cpu_type *p;
for (p = cpu_types; p->name; ++p)
- if (strcmp(arg, p->name) == 0)
+ if (strcmp (arg, p->name) == 0)
{
alpha_target_name = p->name, alpha_target = p->flags;
goto found;
}
- as_warn(_("Unknown CPU identifier `%s'"), arg);
+ as_warn (_("Unknown CPU identifier `%s'"), arg);
found:;
}
break;
#ifdef OBJ_EVAX
- case '+': /* For g++. Hash any name > 63 chars long. */
+ case '+': /* For g++. Hash any name > 63 chars long. */
alpha_flag_hash_long_names = 1;
break;
@@ -1116,7 +1111,7 @@ void
md_show_usage (stream)
FILE *stream;
{
- fputs(_("\
+ fputs (_("\
Alpha options:\n\
-32addr treat addresses as 32-bit values\n\
-F lack floating point instructions support\n\
@@ -1243,7 +1238,7 @@ md_apply_fix (fixP, valueP)
case BFD_RELOC_23_PCREL_S2:
if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
{
- image = bfd_getl32(fixpos);
+ image = bfd_getl32 (fixpos);
image = (image & ~0x1FFFFF) | ((value >> 2) & 0x1FFFFF);
goto write_done;
}
@@ -1252,7 +1247,7 @@ md_apply_fix (fixP, valueP)
case BFD_RELOC_ALPHA_HINT:
if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
{
- image = bfd_getl32(fixpos);
+ image = bfd_getl32 (fixpos);
image = (image & ~0x3FFF) | ((value >> 2) & 0x3FFF);
goto write_done;
}
@@ -1290,16 +1285,20 @@ md_apply_fix (fixP, valueP)
abort ();
#endif
+ case BFD_RELOC_VTABLE_INHERIT:
+ case BFD_RELOC_VTABLE_ENTRY:
+ return 1;
+
default:
{
const struct alpha_operand *operand;
- if ((int)fixP->fx_r_type >= 0)
+ if ((int) fixP->fx_r_type >= 0)
as_fatal (_("unhandled relocation type %s"),
bfd_get_reloc_code_name (fixP->fx_r_type));
- assert (-(int)fixP->fx_r_type < (int)alpha_num_operands);
- operand = &alpha_operands[-(int)fixP->fx_r_type];
+ assert (-(int) fixP->fx_r_type < (int) alpha_num_operands);
+ operand = &alpha_operands[-(int) fixP->fx_r_type];
/* The rest of these fixups only exist internally during symbol
resolution and have no representation in the object file.
@@ -1310,9 +1309,9 @@ md_apply_fix (fixP, valueP)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("non-absolute expression in constant field"));
- image = bfd_getl32(fixpos);
- image = insert_operand(image, operand, (offsetT)value,
- fixP->fx_file, fixP->fx_line);
+ image = bfd_getl32 (fixpos);
+ image = insert_operand (image, operand, (offsetT) value,
+ fixP->fx_file, fixP->fx_line);
}
goto write_done;
}
@@ -1321,13 +1320,13 @@ md_apply_fix (fixP, valueP)
return 1;
else
{
- as_warn_where(fixP->fx_file, fixP->fx_line,
- _("type %d reloc done?\n"), (int)fixP->fx_r_type);
+ as_warn_where (fixP->fx_file, fixP->fx_line,
+ _("type %d reloc done?\n"), (int) fixP->fx_r_type);
goto done;
}
write_done:
- md_number_to_chars(fixpos, image, 4);
+ md_number_to_chars (fixpos, image, 4);
done:
fixP->fx_done = 1;
@@ -1339,7 +1338,7 @@ done:
*/
symbolS *
-md_undefined_symbol(name)
+md_undefined_symbol (name)
char *name;
{
if (*name == '$')
@@ -1355,7 +1354,7 @@ md_undefined_symbol(name)
/* FALLTHRU */
case 'r':
- if (!isdigit(*++name))
+ if (!isdigit (*++name))
break;
/* FALLTHRU */
@@ -1363,7 +1362,7 @@ md_undefined_symbol(name)
case '5': case '6': case '7': case '8': case '9':
if (name[1] == '\0')
num = name[0] - '0';
- else if (name[0] != '0' && isdigit(name[1]) && name[2] == '\0')
+ else if (name[0] != '0' && isdigit (name[1]) && name[2] == '\0')
{
num = (name[0] - '0') * 10 + name[1] - '0';
if (num >= 32)
@@ -1373,14 +1372,14 @@ md_undefined_symbol(name)
break;
if (!alpha_noat_on && (num + is_float) == AXP_REG_AT)
- as_warn(_("Used $at without \".set noat\""));
+ as_warn (_("Used $at without \".set noat\""));
return alpha_register_table[num + is_float];
case 'a':
if (name[1] == 't' && name[2] == '\0')
{
if (!alpha_noat_on)
- as_warn(_("Used $at without \".set noat\""));
+ as_warn (_("Used $at without \".set noat\""));
return alpha_register_table[AXP_REG_AT];
}
break;
@@ -1459,6 +1458,8 @@ alpha_force_relocation (f)
case BFD_RELOC_ALPHA_USER_GPRELHIGH:
case BFD_RELOC_ALPHA_USER_GPRELLOW:
#endif
+ case BFD_RELOC_VTABLE_INHERIT:
+ case BFD_RELOC_VTABLE_ENTRY:
return 1;
case BFD_RELOC_23_PCREL_S2:
@@ -1468,7 +1469,8 @@ alpha_force_relocation (f)
return 0;
default:
- assert((int)f->fx_r_type < 0 && -(int)f->fx_r_type < (int)alpha_num_operands);
+ assert ((int) f->fx_r_type < 0
+ && -(int) f->fx_r_type < (int) alpha_num_operands);
return 0;
}
}
@@ -1518,6 +1520,8 @@ alpha_fix_adjustable (f)
case BFD_RELOC_ALPHA_USER_GPRELHIGH:
case BFD_RELOC_ALPHA_USER_GPRELLOW:
#endif
+ case BFD_RELOC_VTABLE_ENTRY:
+ case BFD_RELOC_VTABLE_INHERIT:
return 0;
case BFD_RELOC_GPREL32:
@@ -1528,8 +1532,8 @@ alpha_fix_adjustable (f)
return 1;
default:
- assert ((int)f->fx_r_type < 0
- && - (int)f->fx_r_type < (int)alpha_num_operands);
+ assert ((int) f->fx_r_type < 0
+ && - (int) f->fx_r_type < (int) alpha_num_operands);
return 1;
}
/*NOTREACHED*/
@@ -1552,7 +1556,7 @@ tc_gen_reloc (sec, fixp)
/* Make sure none of our internal relocations make it this far.
They'd better have been fully resolved by this point. */
- assert ((int)fixp->fx_r_type > 0);
+ assert ((int) fixp->fx_r_type > 0);
reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
if (reloc->howto == NULL)
@@ -1588,7 +1592,7 @@ tc_gen_reloc (sec, fixp)
* of thing, and as a result we need to fake it out here.
*/
if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy))
- && !S_IS_COMMON(fixp->fx_addsy))
+ && !S_IS_COMMON (fixp->fx_addsy))
reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value;
#endif
}
@@ -1615,7 +1619,7 @@ tc_get_register (frame)
char c = get_symbol_end ();
symbolS *sym = md_undefined_symbol (s);
- *strchr(s, '\0') = c;
+ *strchr (s, '\0') = c;
if (sym && (framereg = S_GET_VALUE (sym)) <= 31)
goto found;
}
@@ -1647,10 +1651,10 @@ alpha_frob_file_before_adjust ()
#ifdef RELOC_OP_P
-/* Before the relocations are written, reorder them, so that user supplied
- !lituse relocations follow the appropriate !literal relocations. Also
- convert the gas-internal relocations to the appropriate linker relocations.
- */
+/* Before the relocations are written, reorder them, so that user
+ supplied !lituse relocations follow the appropriate !literal
+ relocations. Also convert the gas-internal relocations to the
+ appropriate linker relocations. */
void
alpha_adjust_symtab ()
@@ -1661,20 +1665,21 @@ alpha_adjust_symtab ()
fprintf (stderr, "alpha_adjust_symtab called\n");
#endif
- /* Go over each section, reordering the relocations so that all of the
- explicit LITUSE's are adjacent to the explicit LITERAL's */
- bfd_map_over_sections (stdoutput, alpha_adjust_symtab_relocs, (char *) 0);
+ /* Go over each section, reordering the relocations so that all
+ of the explicit LITUSE's are adjacent to the explicit
+ LITERAL's. */
+ bfd_map_over_sections (stdoutput, alpha_adjust_symtab_relocs,
+ (char *) 0);
}
}
-
/* Inner function to move LITUSE's next to the LITERAL. */
static void
alpha_adjust_symtab_relocs (abfd, sec, ptr)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
- PTR ptr;
+ PTR ptr ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
fixS **prevP;
@@ -1689,8 +1694,9 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
int n_dup_literals = 0;
#endif
- /* If seginfo is NULL, we did not create this section; don't do anything with
- it. By using a pointer to a pointer, we can update the links in place. */
+ /* If seginfo is NULL, we did not create this section; don't do
+ anything with it. By using a pointer to a pointer, we can update
+ the links in place. */
if (seginfo == NULL)
return;
@@ -1703,7 +1709,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
for (fixp = seginfo->fix_root; fixp; fixp = next)
{
next = fixp->fx_next;
- fixp->fx_next = (fixS *)0;
+ fixp->fx_next = (fixS *) 0;
#ifdef DEBUG2_ALPHA
n++;
#endif
@@ -1716,7 +1722,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
#ifdef DEBUG2_ALPHA
fprintf (stderr,
"alpha_adjust_symtab_relocs: 0x%lx, other relocation %s\n",
- (long)fixp,
+ (long) fixp,
bfd_get_reloc_code_name (fixp->fx_r_type));
#endif
break;
@@ -1731,7 +1737,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
n_dup_literals++;
fprintf (stderr,
"alpha_adjust_symtab_relocs: 0x%lx, !literal!%.6d, # literals = %2d\n",
- (long)fixp,
+ (long) fixp,
fixp->tc_fix_data.info->sequence,
fixp->tc_fix_data.info->n_literals);
#endif
@@ -1749,10 +1755,10 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
#ifdef DEBUG2_ALPHA
fprintf (stderr,
"alpha_adjust_symtab_relocs: 0x%lx, !lituse !%.6d, # lituses = %2d, next_lituse = 0x%lx\n",
- (long)fixp,
+ (long) fixp,
fixp->tc_fix_data.info->sequence,
fixp->tc_fix_data.info->n_lituses,
- (long)fixp->tc_fix_data.next_lituse);
+ (long) fixp->tc_fix_data.next_lituse);
#endif
break;
}
@@ -1785,7 +1791,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
&& ! fixp->tc_fix_data.info->multi_section_p)
{
for (lituse = fixp->tc_fix_data.info->lituse;
- lituse != (fixS *)0;
+ lituse != (fixS *) 0;
lituse = lituse->tc_fix_data.next_lituse)
{
lituse->fx_next = fixp->fx_next;
@@ -1813,7 +1819,6 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
}
#endif /* RELOC_OP_P */
-
#ifdef DEBUG_ALPHA
static void
@@ -1882,7 +1887,7 @@ debug_exp (tok, ntok)
fprintf (stderr, ", %s(%s, %s, %d)", name,
(t->X_add_symbol) ? S_GET_NAME (t->X_add_symbol) : "--",
(t->X_op_symbol) ? S_GET_NAME (t->X_op_symbol) : "--",
- (int)t->X_add_number);
+ (int) t->X_add_number);
}
fprintf (stderr, "\n");
fflush (stderr);
@@ -1960,7 +1965,7 @@ tokenize_arguments (str, tok, ntok)
}
r = &alpha_reloc_op[0];
- for (i = alpha_num_reloc_op-1; i >= 0; i--, r++)
+ for (i = alpha_num_reloc_op - 1; i >= 0; i--, r++)
{
if (len == r->length
&& memcmp (input_line_pointer, r->name, len) == 0)
@@ -1968,7 +1973,8 @@ tokenize_arguments (str, tok, ntok)
}
if (i < 0)
{
- as_bad (_("Unknown relocation operand: !%s"), input_line_pointer);
+ as_bad (_("Unknown relocation operand: !%s"),
+ input_line_pointer);
goto err_report;
}
@@ -1981,7 +1987,8 @@ tokenize_arguments (str, tok, ntok)
if (tok->X_op != O_constant
|| ! ALPHA_RELOC_SEQUENCE_OK (tok->X_add_number))
{
- as_bad (_("Bad sequence number: !%s!%s"), r->name, input_line_pointer);
+ as_bad (_("Bad sequence number: !%s!%s"),
+ r->name, input_line_pointer);
goto err_report;
}
@@ -2002,7 +2009,7 @@ tokenize_arguments (str, tok, ntok)
{
char *hold = input_line_pointer++;
- /* First try for parenthesized register ... */
+ /* First try for parenthesized register ... */
expression (tok);
if (*input_line_pointer == ')' && tok->X_op == O_register)
{
@@ -2059,7 +2066,7 @@ err_report:
syntax match. */
static const struct alpha_opcode *
-find_opcode_match(first_opcode, tok, pntok, pcpumatch)
+find_opcode_match (first_opcode, tok, pntok, pcpumatch)
const struct alpha_opcode *first_opcode;
const expressionS *tok;
int *pntok;
@@ -2101,22 +2108,22 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch)
{
case AXP_OPERAND_IR:
if (tok[tokidx].X_op != O_register
- || !is_ir_num(tok[tokidx].X_add_number))
+ || !is_ir_num (tok[tokidx].X_add_number))
goto match_failed;
break;
case AXP_OPERAND_FPR:
if (tok[tokidx].X_op != O_register
- || !is_fpr_num(tok[tokidx].X_add_number))
+ || !is_fpr_num (tok[tokidx].X_add_number))
goto match_failed;
break;
- case AXP_OPERAND_IR|AXP_OPERAND_PARENS:
+ case AXP_OPERAND_IR | AXP_OPERAND_PARENS:
if (tok[tokidx].X_op != O_pregister
- || !is_ir_num(tok[tokidx].X_add_number))
+ || !is_ir_num (tok[tokidx].X_add_number))
goto match_failed;
break;
- case AXP_OPERAND_IR|AXP_OPERAND_PARENS|AXP_OPERAND_COMMA:
+ case AXP_OPERAND_IR | AXP_OPERAND_PARENS | AXP_OPERAND_COMMA:
if (tok[tokidx].X_op != O_cpregister
- || !is_ir_num(tok[tokidx].X_add_number))
+ || !is_ir_num (tok[tokidx].X_add_number))
goto match_failed;
break;
@@ -2139,7 +2146,7 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch)
default:
/* everything else should have been fake */
- abort();
+ abort ();
}
++tokidx;
}
@@ -2153,11 +2160,11 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch)
match_failed:;
}
- while (++opcode-alpha_opcodes < alpha_num_opcodes
- && !strcmp(opcode->name, first_opcode->name));
+ while (++opcode - alpha_opcodes < alpha_num_opcodes
+ && !strcmp (opcode->name, first_opcode->name));
if (*pcpumatch)
- *pcpumatch = got_cpu_match;
+ *pcpumatch = got_cpu_match;
return NULL;
}
@@ -2166,7 +2173,7 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch)
match. */
static const struct alpha_macro *
-find_macro_match(first_macro, tok, pntok)
+find_macro_match (first_macro, tok, pntok)
const struct alpha_macro *first_macro;
const expressionS *tok;
int *pntok;
@@ -2193,7 +2200,7 @@ find_macro_match(first_macro, tok, pntok)
/* index register */
case MACRO_IR:
if (tokidx >= ntok || tok[tokidx].X_op != O_register
- || !is_ir_num(tok[tokidx].X_add_number))
+ || !is_ir_num (tok[tokidx].X_add_number))
goto match_failed;
++tokidx;
break;
@@ -2201,7 +2208,7 @@ find_macro_match(first_macro, tok, pntok)
/* parenthesized index register */
case MACRO_PIR:
if (tokidx >= ntok || tok[tokidx].X_op != O_pregister
- || !is_ir_num(tok[tokidx].X_add_number))
+ || !is_ir_num (tok[tokidx].X_add_number))
goto match_failed;
++tokidx;
break;
@@ -2209,14 +2216,14 @@ find_macro_match(first_macro, tok, pntok)
/* optional parenthesized index register */
case MACRO_OPIR:
if (tokidx < ntok && tok[tokidx].X_op == O_pregister
- && is_ir_num(tok[tokidx].X_add_number))
+ && is_ir_num (tok[tokidx].X_add_number))
++tokidx;
break;
/* leading comma with a parenthesized index register */
case MACRO_CPIR:
if (tokidx >= ntok || tok[tokidx].X_op != O_cpregister
- || !is_ir_num(tok[tokidx].X_add_number))
+ || !is_ir_num (tok[tokidx].X_add_number))
goto match_failed;
++tokidx;
break;
@@ -2224,7 +2231,7 @@ find_macro_match(first_macro, tok, pntok)
/* floating point register */
case MACRO_FPR:
if (tokidx >= ntok || tok[tokidx].X_op != O_register
- || !is_fpr_num(tok[tokidx].X_add_number))
+ || !is_fpr_num (tok[tokidx].X_add_number))
goto match_failed;
++tokidx;
break;
@@ -2298,8 +2305,8 @@ find_macro_match(first_macro, tok, pntok)
++arg;
}
}
- while (++macro-alpha_macros < alpha_num_macros
- && !strcmp(macro->name, first_macro->name));
+ while (++macro - alpha_macros < alpha_num_macros
+ && !strcmp (macro->name, first_macro->name));
return NULL;
}
@@ -2307,7 +2314,7 @@ find_macro_match(first_macro, tok, pntok)
/* Insert an operand value into an instruction. */
static unsigned
-insert_operand(insn, operand, val, file, line)
+insert_operand (insn, operand, val, file, line)
unsigned insn;
const struct alpha_operand *operand;
offsetT val;
@@ -2335,11 +2342,11 @@ insert_operand(insn, operand, val, file, line)
_("operand out of range (%s not between %d and %d)");
char buf[sizeof (val) * 3 + 2];
- sprint_value(buf, val);
+ sprint_value (buf, val);
if (file)
- as_warn_where(file, line, err, buf, min, max);
+ as_warn_where (file, line, err, buf, min, max);
else
- as_warn(err, buf, min, max);
+ as_warn (err, buf, min, max);
}
}
@@ -2363,7 +2370,7 @@ insert_operand(insn, operand, val, file, line)
*/
static void
-assemble_insn(opcode, tok, ntok, insn)
+assemble_insn (opcode, tok, ntok, insn)
const struct alpha_opcode *opcode;
const expressionS *tok;
int ntok;
@@ -2379,12 +2386,12 @@ assemble_insn(opcode, tok, ntok, insn)
for (argidx = opcode->operands; *argidx; ++argidx)
{
const struct alpha_operand *operand = &alpha_operands[*argidx];
- const expressionS *t = (const expressionS *)0;
+ const expressionS *t = (const expressionS *) 0;
if (operand->flags & AXP_OPERAND_FAKE)
{
/* fake operands take no value and generate no fixup */
- image = insert_operand(image, operand, 0, NULL, 0);
+ image = insert_operand (image, operand, 0, NULL, 0);
continue;
}
@@ -2407,7 +2414,7 @@ assemble_insn(opcode, tok, ntok, insn)
}
break;
default:
- abort();
+ abort ();
}
}
else
@@ -2418,12 +2425,12 @@ assemble_insn(opcode, tok, ntok, insn)
case O_register:
case O_pregister:
case O_cpregister:
- image = insert_operand(image, operand, regno(t->X_add_number),
- NULL, 0);
+ image = insert_operand (image, operand, regno (t->X_add_number),
+ NULL, 0);
break;
case O_constant:
- image = insert_operand(image, operand, t->X_add_number, NULL, 0);
+ image = insert_operand (image, operand, t->X_add_number, NULL, 0);
break;
default:
@@ -2431,7 +2438,7 @@ assemble_insn(opcode, tok, ntok, insn)
struct alpha_fixup *fixup;
if (insn->nfixups >= MAX_INSN_FIXUPS)
- as_fatal(_("too many fixups"));
+ as_fatal (_("too many fixups"));
fixup = &insn->fixups[insn->nfixups++];
@@ -2451,12 +2458,12 @@ assemble_insn(opcode, tok, ntok, insn)
static void
emit_insn (insn)
- struct alpha_insn *insn;
+ struct alpha_insn *insn;
{
char *f;
int i;
- /* Take care of alignment duties */
+ /* Take care of alignment duties. */
if (alpha_auto_align_on && alpha_current_align < 2)
alpha_align (2, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > 2)
@@ -2467,10 +2474,14 @@ emit_insn (insn)
f = frag_more (4);
md_number_to_chars (f, insn->insn, 4);
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (4);
+#endif
+
/* Apply the fixups in order */
for (i = 0; i < insn->nfixups; ++i)
{
- const struct alpha_operand *operand = (const struct alpha_operand *)0;
+ const struct alpha_operand *operand = (const struct alpha_operand *) 0;
struct alpha_fixup *fixup = &insn->fixups[i];
int size, pcrel;
fixS *fixP;
@@ -2480,48 +2491,49 @@ emit_insn (insn)
#endif
/* Some fixups are only used internally and so have no howto */
- if ((int)fixup->reloc < 0)
+ if ((int) fixup->reloc < 0)
{
- operand = &alpha_operands[-(int)fixup->reloc];
+ operand = &alpha_operands[-(int) fixup->reloc];
size = 4;
pcrel = ((operand->flags & AXP_OPERAND_RELATIVE) != 0);
}
- else switch (fixup->reloc)
- {
+ else
+ switch (fixup->reloc)
+ {
#ifdef OBJ_ELF
- /* These relocation types are only used internally. */
- case BFD_RELOC_ALPHA_GPDISP_HI16:
- case BFD_RELOC_ALPHA_GPDISP_LO16:
- size = 2;
- pcrel = 0;
- break;
+ /* These relocation types are only used internally. */
+ case BFD_RELOC_ALPHA_GPDISP_HI16:
+ case BFD_RELOC_ALPHA_GPDISP_LO16:
+ size = 2;
+ pcrel = 0;
+ break;
#endif
#ifdef RELOC_OP_P
- /* and these also are internal only relocations */
- case BFD_RELOC_ALPHA_USER_LITERAL:
- case BFD_RELOC_ALPHA_USER_LITUSE_BASE:
- case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF:
- case BFD_RELOC_ALPHA_USER_LITUSE_JSR:
- case BFD_RELOC_ALPHA_USER_GPDISP:
- case BFD_RELOC_ALPHA_USER_GPRELHIGH:
- case BFD_RELOC_ALPHA_USER_GPRELLOW:
- size = 2;
- pcrel = 0;
- break;
+ /* and these also are internal only relocations */
+ case BFD_RELOC_ALPHA_USER_LITERAL:
+ case BFD_RELOC_ALPHA_USER_LITUSE_BASE:
+ case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF:
+ case BFD_RELOC_ALPHA_USER_LITUSE_JSR:
+ case BFD_RELOC_ALPHA_USER_GPDISP:
+ case BFD_RELOC_ALPHA_USER_GPRELHIGH:
+ case BFD_RELOC_ALPHA_USER_GPRELLOW:
+ size = 2;
+ pcrel = 0;
+ break;
#endif
- default:
- {
- reloc_howto_type *reloc_howto
- = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
- assert (reloc_howto);
+ default:
+ {
+ reloc_howto_type *reloc_howto
+ = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
+ assert (reloc_howto);
- size = bfd_get_reloc_size (reloc_howto);
- pcrel = reloc_howto->pc_relative;
+ size = bfd_get_reloc_size (reloc_howto);
+ pcrel = reloc_howto->pc_relative;
+ }
+ assert (size >= 1 && size <= 4);
+ break;
}
- assert (size >= 1 && size <= 4);
- break;
- }
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size,
&fixup->exp, pcrel, fixup->reloc);
@@ -2559,7 +2571,7 @@ emit_insn (insn)
info->segment = now_seg;
info->sequence = insn->sequence[i];
strcpy (info->string, buffer);
- errmsg = hash_insert (alpha_literal_hash, info->string, (PTR)info);
+ errmsg = hash_insert (alpha_literal_hash, info->string, (PTR) info);
if (errmsg)
as_bad (errmsg);
}
@@ -2590,7 +2602,7 @@ emit_insn (insn)
info->segment = now_seg;
info->sequence = insn->sequence[i];
strcpy (info->string, buffer);
- errmsg = hash_insert (alpha_literal_hash, info->string, (PTR)info);
+ errmsg = hash_insert (alpha_literal_hash, info->string, (PTR) info);
if (errmsg)
as_bad (errmsg);
}
@@ -2605,7 +2617,7 @@ emit_insn (insn)
#endif
default:
- if ((int)fixup->reloc < 0)
+ if ((int) fixup->reloc < 0)
{
if (operand->flags & AXP_OPERAND_NOOVERFLOW)
fixP->fx_no_overflow = 1;
@@ -2622,7 +2634,7 @@ emit_insn (insn)
than one insn in an insn structure. */
static void
-assemble_tokens_to_insn(opname, tok, ntok, insn)
+assemble_tokens_to_insn (opname, tok, ntok, insn)
const char *opname;
const expressionS *tok;
int ntok;
@@ -2645,7 +2657,7 @@ assemble_tokens_to_insn(opname, tok, ntok, insn)
as_bad (_("inappropriate arguments for opcode `%s'"), opname);
else
as_bad (_("opcode `%s' not supported for target %s"), opname,
- alpha_target_name);
+ alpha_target_name);
}
else
as_bad (_("unknown opcode `%s'"), opname);
@@ -2684,12 +2696,12 @@ assemble_tokens (opname, tok, ntok, local_macros_on)
}
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, opname);
+ (int) reloc_exp->X_add_number, opname);
ntok--;
}
#endif
@@ -2718,7 +2730,6 @@ assemble_tokens (opname, tok, ntok, local_macros_on)
else
as_bad (_("unknown opcode `%s'"), opname);
}
-
/* Some instruction sets indexed by lg(size) */
static const char * const sextX_op[] = { "sextb", "sextw", "sextl", NULL };
@@ -2751,12 +2762,12 @@ FIXME
expressionS addend;
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, "ldgp");
+ (int) reloc_exp->X_add_number, "ldgp");
ntok--;
}
#endif
@@ -2839,7 +2850,7 @@ add_to_link_pool (basesym, sym, addend)
{
if (range_signed_16 (offset))
{
- return offset;
+ return offset;
}
}
}
@@ -2938,7 +2949,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
- assert (explicit_reloc == (const expressionS *)0);
+ assert (explicit_reloc == (const expressionS *) 0);
assert (insn.nfixups == 1);
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITERAL;
#endif /* OBJ_ECOFF */
@@ -2960,8 +2971,9 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
/* XXX: Disable this .got minimizing optimization so that we can get
better instruction offset knowledge in the compiler. This happens
very infrequently anyway. */
- if (1 || (!range_signed_32 (addend)
- && (alpha_noat_on || targreg == AXP_REG_AT)))
+ if (1
+ || (!range_signed_32 (addend)
+ && (alpha_noat_on || targreg == AXP_REG_AT)))
{
newtok[1] = *exp;
addend = 0;
@@ -2994,7 +3006,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
/* Find symbol or symbol pointer in link section. */
- assert (explicit_reloc == (const expressionS *)0);
+ assert (explicit_reloc == (const expressionS *) 0);
if (exp->X_add_symbol == alpha_evax_proc.symbol)
{
if (range_signed_16 (addend))
@@ -3033,7 +3045,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
}
#endif /* OBJ_EVAX */
- emit_insn(&insn);
+ emit_insn (&insn);
#ifndef OBJ_EVAX
emit_lituse = 1;
@@ -3053,14 +3065,14 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
break;
case O_constant:
- assert (explicit_reloc == (const expressionS *)0);
+ assert (explicit_reloc == (const expressionS *) 0);
break;
case O_subtract:
/* Assume that this difference expression will be resolved to an
- absolute value and that that value will fit in 16 bits. */
+ absolute value and that that value will fit in 16 bits. */
- assert (explicit_reloc == (const expressionS *)0);
+ assert (explicit_reloc == (const expressionS *) 0);
set_tok_reg (newtok[0], targreg);
newtok[1] = *exp;
set_tok_preg (newtok[2], basereg);
@@ -3162,7 +3174,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
if (insn.nfixups > 0)
{
memmove (&insn.fixups[1], &insn.fixups[0],
- sizeof(struct alpha_fixup) * insn.nfixups);
+ sizeof (struct alpha_fixup) * insn.nfixups);
}
insn.nfixups++;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
@@ -3254,22 +3266,22 @@ emit_lda (tok, ntok, opname)
const PTR opname;
{
int basereg;
- const expressionS *reloc = (const expressionS *)0;
+ const expressionS *reloc = (const expressionS *) 0;
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
const struct alpha_reloc_op_tag *r;
- reloc = &tok[ntok-1];
+ reloc = &tok[ntok - 1];
r = ALPHA_RELOC_TABLE (reloc->X_op);
switch (reloc->X_op)
{
default:
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc->X_add_number, (const char *)opname);
+ (int) reloc->X_add_number, (const char *) opname);
- reloc = (const expressionS *)0;
+ reloc = (const expressionS *) 0;
ntok--;
break;
@@ -3283,15 +3295,15 @@ emit_lda (tok, ntok, opname)
case O_lituse_base:
if (ntok != 4
|| tok[0].X_op != O_register
- || !is_ir_num(tok[0].X_add_number)
+ || !is_ir_num (tok[0].X_add_number)
|| tok[1].X_op != O_constant
|| tok[2].X_op != O_pregister
- || !is_ir_num(tok[2].X_add_number))
+ || !is_ir_num (tok[2].X_add_number))
{
- as_bad (_("bad instruction format for lda !%s!%d"), r->name,
- reloc->X_add_number);
+ as_bad (_("bad instruction format for lda !%s!%ld"), r->name,
+ (long) reloc->X_add_number);
- reloc = (const expressionS *)0;
+ reloc = (const expressionS *) 0;
ntok--;
break;
}
@@ -3322,12 +3334,12 @@ emit_ldah (tok, ntok, unused)
expressionS newtok[3];
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, "ldah");
+ (int) reloc_exp->X_add_number, "ldah");
ntok--;
}
#endif
@@ -3354,13 +3366,13 @@ emit_ir_load (tok, ntok, opname)
struct alpha_insn insn;
#ifdef RELOC_OP_P
- const expressionS *reloc = (const expressionS *)0;
+ const expressionS *reloc = (const expressionS *) 0;
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
const struct alpha_reloc_op_tag *r;
- reloc = &tok[ntok-1];
+ reloc = &tok[ntok - 1];
switch (reloc->X_op)
{
case O_lituse_base:
@@ -3368,7 +3380,7 @@ emit_ir_load (tok, ntok, opname)
break;
case O_literal:
- if (strcmp ((const char *)opname, "ldq") == 0)
+ if (strcmp ((const char *) opname, "ldq") == 0)
{
emit_lda (tok, ntok, opname);
return;
@@ -3379,7 +3391,7 @@ emit_ir_load (tok, ntok, opname)
ntok--;
r = ALPHA_RELOC_TABLE (reloc->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc->X_add_number, (const char *)opname);
+ (int) reloc->X_add_number, (const char *) opname);
}
}
#endif
@@ -3390,12 +3402,12 @@ emit_ir_load (tok, ntok, opname)
basereg = tok[2].X_add_number;
lituse = load_expression (tok[0].X_add_number, &tok[1], &basereg,
- &newtok[1], (const expressionS *)0);
+ &newtok[1], (const expressionS *) 0);
newtok[0] = tok[0];
set_tok_preg (newtok[2], basereg);
- assemble_tokens_to_insn ((const char *)opname, newtok, 3, &insn);
+ assemble_tokens_to_insn ((const char *) opname, newtok, 3, &insn);
#ifdef RELOC_OP_P
if (reloc)
@@ -3419,7 +3431,7 @@ emit_ir_load (tok, ntok, opname)
if (insn.nfixups > 0)
{
memmove (&insn.fixups[1], &insn.fixups[0],
- sizeof(struct alpha_fixup) * insn.nfixups);
+ sizeof (struct alpha_fixup) * insn.nfixups);
}
insn.nfixups++;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
@@ -3445,16 +3457,16 @@ emit_loadstore (tok, ntok, opname)
struct alpha_insn insn;
#ifdef RELOC_OP_P
- const expressionS *reloc = (const expressionS *)0;
+ const expressionS *reloc = (const expressionS *) 0;
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
reloc = &tok[--ntok];
if (reloc->X_op != O_lituse_base)
{
- const struct alpha_reloc_op_tag *r = &alpha_reloc_op[ reloc->X_md ];
+ const struct alpha_reloc_op_tag *r = &alpha_reloc_op[reloc->X_md];
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc->X_add_number, (const char *)opname);
+ (int) reloc->X_add_number, (const char *) opname);
}
}
#endif
@@ -3464,13 +3476,13 @@ emit_loadstore (tok, ntok, opname)
else
basereg = tok[2].X_add_number;
- if (tok[1].X_op != O_constant || !range_signed_16(tok[1].X_add_number))
+ if (tok[1].X_op != O_constant || !range_signed_16 (tok[1].X_add_number))
{
if (alpha_noat_on)
as_bad (_("macro requires $at register while noat in effect"));
lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1],
- (const expressionS *)0);
+ (const expressionS *) 0);
}
else
{
@@ -3481,7 +3493,7 @@ emit_loadstore (tok, ntok, opname)
newtok[0] = tok[0];
set_tok_preg (newtok[2], basereg);
- assemble_tokens_to_insn ((const char *)opname, newtok, 3, &insn);
+ assemble_tokens_to_insn ((const char *) opname, newtok, 3, &insn);
#ifdef RELOC_OP_P
if (reloc)
@@ -3505,7 +3517,7 @@ emit_loadstore (tok, ntok, opname)
if (insn.nfixups > 0)
{
memmove (&insn.fixups[1], &insn.fixups[0],
- sizeof(struct alpha_fixup) * insn.nfixups);
+ sizeof (struct alpha_fixup) * insn.nfixups);
}
insn.nfixups++;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
@@ -3526,20 +3538,20 @@ emit_ldXu (tok, ntok, vlgsize)
const PTR vlgsize;
{
if (alpha_target & AXP_OPCODE_BWX)
- emit_ir_load (tok, ntok, ldXu_op[(long)vlgsize]);
+ emit_ir_load (tok, ntok, ldXu_op[(long) vlgsize]);
else
{
expressionS newtok[3];
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r
= ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, "ldbu/ldwu");
+ (int) reloc_exp->X_add_number, "ldbu/ldwu");
ntok--;
}
#endif
@@ -3564,7 +3576,7 @@ emit_ldXu (tok, ntok, vlgsize)
set_tok_reg (newtok[1], AXP_REG_AT);
newtok[2] = newtok[0];
- assemble_tokens (extXl_op[(long)vlgsize], newtok, 3, 1);
+ assemble_tokens (extXl_op[(long) vlgsize], newtok, 3, 1);
}
}
@@ -3577,7 +3589,7 @@ emit_ldX (tok, ntok, vlgsize)
const PTR vlgsize;
{
emit_ldXu (tok, ntok, vlgsize);
- assemble_tokens (sextX_op[(long)vlgsize], tok, 1, 1);
+ assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1);
}
/* Load an integral value from an unaligned address as an unsigned
@@ -3589,7 +3601,7 @@ emit_uldXu (tok, ntok, vlgsize)
int ntok;
const PTR vlgsize;
{
- long lgsize = (long)vlgsize;
+ long lgsize = (long) vlgsize;
expressionS newtok[3];
if (alpha_noat_on)
@@ -3611,7 +3623,7 @@ emit_uldXu (tok, ntok, vlgsize)
/* emit "ldq_u $t10, size-1($at)" */
set_tok_reg (newtok[0], AXP_REG_T10);
- set_tok_const (newtok[1], (1<<lgsize)-1);
+ set_tok_const (newtok[1], (1 << lgsize) - 1);
assemble_tokens ("ldq_u", newtok, 3, 1);
/* emit "extXl $t9, $at, $t9" */
@@ -3646,7 +3658,7 @@ emit_uldX (tok, ntok, vlgsize)
const PTR vlgsize;
{
emit_uldXu (tok, ntok, vlgsize);
- assemble_tokens (sextX_op[(long)vlgsize], tok, 1, 1);
+ assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1);
}
/* Implement the ldil macro. */
@@ -3660,17 +3672,17 @@ emit_ldil (tok, ntok, unused)
expressionS newtok[2];
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, "ldil");
+ (int) reloc_exp->X_add_number, "ldil");
ntok--;
}
#endif
- memcpy (newtok, tok, sizeof(newtok));
+ memcpy (newtok, tok, sizeof (newtok));
newtok[1].X_add_number = sign_extend_32 (tok[1].X_add_number);
assemble_tokens ("lda", newtok, ntok, 1);
@@ -3684,7 +3696,7 @@ emit_stX (tok, ntok, vlgsize)
int ntok;
const PTR vlgsize;
{
- int lgsize = (int)(long)vlgsize;
+ int lgsize = (int) (long) vlgsize;
if (alpha_target & AXP_OPCODE_BWX)
emit_loadstore (tok, ntok, stX_op[lgsize]);
@@ -3693,7 +3705,7 @@ emit_stX (tok, ntok, vlgsize)
expressionS newtok[3];
if (alpha_noat_on)
- as_bad(_("macro requires $at register while noat in effect"));
+ as_bad (_("macro requires $at register while noat in effect"));
/* emit "lda $at, exp" */
@@ -3742,7 +3754,7 @@ emit_ustX (tok, ntok, vlgsize)
int ntok;
const PTR vlgsize;
{
- int lgsize = (int)(long)vlgsize;
+ int lgsize = (int) (long) vlgsize;
expressionS newtok[3];
/* emit "lda $at, exp" */
@@ -3761,7 +3773,7 @@ emit_ustX (tok, ntok, vlgsize)
/* emit "ldq_u $10, size-1($at)" */
set_tok_reg (newtok[0], AXP_REG_T10);
- set_tok_const (newtok[1], (1 << lgsize)-1);
+ set_tok_const (newtok[1], (1 << lgsize) - 1);
assemble_tokens ("ldq_u", newtok, 3, 1);
/* emit "insXl src, $at, $t11" */
@@ -3812,7 +3824,7 @@ emit_ustX (tok, ntok, vlgsize)
/* emit "stq_u $t10, size-1($at)" */
set_tok_reg (newtok[0], AXP_REG_T10);
- set_tok_const (newtok[1], (1 << lgsize)-1);
+ set_tok_const (newtok[1], (1 << lgsize) - 1);
assemble_tokens ("stq_u", newtok, 3, 1);
}
@@ -3825,7 +3837,7 @@ emit_sextX (tok, ntok, vlgsize)
int ntok;
const PTR vlgsize;
{
- long lgsize = (long)vlgsize;
+ long lgsize = (long) vlgsize;
if (alpha_target & AXP_OPCODE_BWX)
assemble_tokens (sextX_op[lgsize], tok, ntok, 0);
@@ -3835,14 +3847,14 @@ emit_sextX (tok, ntok, vlgsize)
expressionS newtok[3];
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r
= ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, "setxt");
+ (int) reloc_exp->X_add_number, "setxt");
ntok--;
}
#endif
@@ -3894,12 +3906,12 @@ emit_division (tok, ntok, symname)
expressionS newtok[3];
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, (char char *)symname);
+ (int) reloc_exp->X_add_number, (char char *) symname);
ntok--;
}
#endif
@@ -3945,7 +3957,7 @@ emit_division (tok, ntok, symname)
{
set_tok_reg (newtok[0], xr);
set_tok_reg (newtok[1], AXP_REG_R16);
- assemble_tokens ("mov", newtok, 2, 1);
+ assemble_tokens ("mov", newtok, 2, 1);
}
if (yr != AXP_REG_R16 && yr != AXP_REG_R17)
@@ -3956,7 +3968,7 @@ emit_division (tok, ntok, symname)
}
}
- sym = symbol_find_or_make ((const char *)symname);
+ sym = symbol_find_or_make ((const char *) symname);
set_tok_reg (newtok[0], AXP_REG_AT);
set_tok_sym (newtok[1], sym, 0);
@@ -4004,12 +4016,12 @@ emit_division (tok, ntok, symname)
expressionS newtok[3];
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, (const char *)symname);
+ (int) reloc_exp->X_add_number, (const char *) symname);
ntok--;
}
#endif
@@ -4022,7 +4034,7 @@ emit_division (tok, ntok, symname)
else
rr = regno (tok[2].X_add_number);
- sym = symbol_find_or_make ((const char *)symname);
+ sym = symbol_find_or_make ((const char *) symname);
/* Move the operands into the right place */
if (yr == AXP_REG_T10 && xr == AXP_REG_T11)
@@ -4057,7 +4069,7 @@ emit_division (tok, ntok, symname)
{
set_tok_reg (newtok[0], xr);
set_tok_reg (newtok[1], AXP_REG_T10);
- assemble_tokens ("mov", newtok, 2, 1);
+ assemble_tokens ("mov", newtok, 2, 1);
}
if (yr != AXP_REG_T10 && yr != AXP_REG_T11)
@@ -4111,12 +4123,12 @@ emit_jsrjmp (tok, ntok, vopname)
int r, tokidx = 0, lituse = 0;
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, opname);
+ (int) reloc_exp->X_add_number, opname);
ntok--;
}
#endif
@@ -4138,7 +4150,7 @@ emit_jsrjmp (tok, ntok, vopname)
{
int basereg = alpha_gp_register;
lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], &basereg, NULL,
- (const expressionS *)0);
+ (const expressionS *) 0);
}
#endif
@@ -4162,7 +4174,7 @@ emit_jsrjmp (tok, ntok, vopname)
if (insn.nfixups > 0)
{
memmove (&insn.fixups[1], &insn.fixups[0],
- sizeof(struct alpha_fixup) * insn.nfixups);
+ sizeof (struct alpha_fixup) * insn.nfixups);
}
insn.nfixups++;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
@@ -4183,17 +4195,17 @@ emit_retjcr (tok, ntok, vopname)
int ntok;
const PTR vopname;
{
- const char *opname = (const char *)vopname;
+ const char *opname = (const char *) vopname;
expressionS newtok[3];
int r, tokidx = 0;
#ifdef RELOC_OP_P
- if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
{
- const expressionS *reloc_exp = &tok[ntok-1];
+ const expressionS *reloc_exp = &tok[ntok - 1];
const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op);
as_bad (_("Cannot use !%s!%d with %s"), r->name,
- (int)reloc_exp->X_add_number, opname);
+ (int) reloc_exp->X_add_number, opname);
ntok--;
}
#endif
@@ -4216,7 +4228,7 @@ emit_retjcr (tok, ntok, vopname)
if (tokidx < ntok)
newtok[2] = tok[tokidx];
else
- set_tok_const (newtok[2], strcmp(opname, "ret") == 0);
+ set_tok_const (newtok[2], strcmp (opname, "ret") == 0);
assemble_tokens (opname, newtok, 3, 0);
}
@@ -4309,7 +4321,7 @@ s_alpha_comm (ignore)
{
offsetT align;
- input_line_pointer++;
+ input_line_pointer++;
align = get_absolute_expression ();
bfd_set_section_alignment (stdoutput, new_seg, align);
}
@@ -4324,7 +4336,7 @@ s_alpha_comm (ignore)
#ifdef OBJ_EVAX
if (bfd_section_size (stdoutput, new_seg) > 0)
- {
+ {
if (bfd_section_size (stdoutput, new_seg) != temp)
as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
@@ -4343,7 +4355,7 @@ s_alpha_comm (ignore)
#endif
else
{
-#ifdef OBJ_EVAX
+#ifdef OBJ_EVAX
subseg_set (new_seg, 0);
p = frag_more (temp);
new_seg->flags |= SEC_IS_COMMON;
@@ -4499,7 +4511,7 @@ s_alpha_end (dummy)
(expressionS *) xmalloc (sizeof (expressionS));
symbol_get_obj (sym)->size->X_op = O_subtract;
symbol_get_obj (sym)->size->X_add_symbol
- = symbol_new ("L0\001", now_seg, frag_now_fix (), frag_now);
+ = symbol_new ("L0\001", now_seg, frag_now_fix (), frag_now);
symbol_get_obj (sym)->size->X_op_symbol = sym;
symbol_get_obj (sym)->size->X_add_number = 0;
}
@@ -4519,9 +4531,9 @@ s_alpha_mask (fp)
if (ECOFF_DEBUGGING)
{
if (fp)
- ecoff_directive_fmask (0);
+ ecoff_directive_fmask (0);
else
- ecoff_directive_mask (0);
+ ecoff_directive_mask (0);
}
else
discard_rest_of_line ();
@@ -4555,19 +4567,87 @@ s_alpha_prologue (ignore)
switch (arg)
{
- case 0: /* No PV required. */
- S_SET_OTHER (sym, STO_ALPHA_NOPV);
- break;
- case 1: /* Std GP load. */
- S_SET_OTHER (sym, STO_ALPHA_STD_GPLOAD);
- break;
- case 2: /* Non-std use of PV. */
- break;
-
- default:
- as_bad (_("Invalid argument %d to .prologue."), arg);
- break;
- }
+ case 0: /* No PV required. */
+ S_SET_OTHER (sym, STO_ALPHA_NOPV
+ | (S_GET_OTHER (sym) & ~STO_ALPHA_STD_GPLOAD));
+ break;
+ case 1: /* Std GP load. */
+ S_SET_OTHER (sym, STO_ALPHA_STD_GPLOAD
+ | (S_GET_OTHER (sym) & ~STO_ALPHA_STD_GPLOAD));
+ break;
+ case 2: /* Non-std use of PV. */
+ break;
+
+ default:
+ as_bad (_("Invalid argument %d to .prologue."), arg);
+ break;
+ }
+}
+
+static char *first_file_directive;
+
+static void
+s_alpha_file (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ /* Save the first .file directive we see, so that we can change our
+ minds about whether ecoff debugging should or shouldn't be enabled. */
+ if (alpha_flag_mdebug < 0 && ! first_file_directive)
+ {
+ char *start = input_line_pointer;
+ size_t len;
+
+ discard_rest_of_line ();
+
+ len = input_line_pointer - start;
+ first_file_directive = xmalloc (len + 1);
+ memcpy (first_file_directive, start, len);
+ first_file_directive[len] = '\0';
+
+ input_line_pointer = start;
+ }
+
+ if (ECOFF_DEBUGGING)
+ ecoff_directive_file (0);
+ else
+ dwarf2_directive_file (0);
+}
+
+static void
+s_alpha_loc (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ if (ECOFF_DEBUGGING)
+ ecoff_directive_loc (0);
+ else
+ dwarf2_directive_loc (0);
+}
+
+static void
+s_alpha_stab (n)
+ int n;
+{
+ /* If we've been undecided about mdebug, make up our minds in favour. */
+ if (alpha_flag_mdebug < 0)
+ {
+ segT sec = subseg_new (".mdebug", 0);
+ bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY);
+ bfd_set_section_alignment (stdoutput, sec, 3);
+
+ ecoff_read_begin_hook ();
+
+ if (first_file_directive)
+ {
+ char *save_ilp = input_line_pointer;
+ input_line_pointer = first_file_directive;
+ ecoff_directive_file (0);
+ input_line_pointer = save_ilp;
+ free (first_file_directive);
+ }
+
+ alpha_flag_mdebug = 1;
+ }
+ s_stab (n);
}
static void
@@ -4580,17 +4660,15 @@ s_alpha_coff_wrapper (which)
ecoff_directive_def,
ecoff_directive_dim,
ecoff_directive_endef,
- ecoff_directive_file,
ecoff_directive_scl,
ecoff_directive_tag,
ecoff_directive_val,
- ecoff_directive_loc,
};
- assert (which >= 0 && which < (int)(sizeof(fns)/sizeof(*fns)));
+ assert (which >= 0 && which < (int) (sizeof (fns)/sizeof (*fns)));
if (ECOFF_DEBUGGING)
- (*fns[which])(0);
+ (*fns[which]) (0);
else
{
as_bad (_("ECOFF debugging is disabled."));
@@ -4600,16 +4678,16 @@ s_alpha_coff_wrapper (which)
#endif /* OBJ_ELF */
#ifdef OBJ_EVAX
-
+
/* Handle the section specific pseudo-op. */
-
+
static void
s_alpha_section (secid)
int secid;
{
int temp;
#define EVAX_SECTION_COUNT 5
- static char *section_name[EVAX_SECTION_COUNT+1] =
+ static char *section_name[EVAX_SECTION_COUNT + 1] =
{ "NULL", ".rdata", ".comm", ".link", ".ctors", ".dtors" };
if ((secid <= 0) || (secid > EVAX_SECTION_COUNT))
@@ -4626,7 +4704,6 @@ s_alpha_section (secid)
alpha_current_align = 0;
}
-
/* Parse .ent directives. */
static void
@@ -4664,7 +4741,6 @@ s_alpha_ent (ignore)
return;
}
-
/* Parse .frame <framreg>,<framesize>,RA,<rsa_offset> directives. */
static void
@@ -4757,15 +4833,15 @@ s_alpha_pdesc (ignore)
name = input_line_pointer;
name_end = get_symbol_end ();
- if (strncmp(name, "stack", 5) == 0)
+ if (strncmp (name, "stack", 5) == 0)
{
alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_STACK;
}
- else if (strncmp(name, "reg", 3) == 0)
+ else if (strncmp (name, "reg", 3) == 0)
{
alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_REGISTER;
}
- else if (strncmp(name, "null", 4) == 0)
+ else if (strncmp (name, "null", 4) == 0)
{
alpha_evax_proc.pdsckind = PDSC_S_K_KIND_NULL;
}
@@ -4790,34 +4866,33 @@ s_alpha_pdesc (ignore)
seginfo->literal_pool_size += 16;
*p = alpha_evax_proc.pdsckind
- | ((alpha_evax_proc.framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0);
- *(p+1) = PDSC_S_M_NATIVE
- | PDSC_S_M_NO_JACKET;
+ | ((alpha_evax_proc.framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0);
+ *(p + 1) = PDSC_S_M_NATIVE | PDSC_S_M_NO_JACKET;
switch (alpha_evax_proc.pdsckind)
{
- case PDSC_S_K_KIND_NULL:
- *(p+2) = 0;
- *(p+3) = 0;
- break;
- case PDSC_S_K_KIND_FP_REGISTER:
- *(p+2) = alpha_evax_proc.fp_save;
- *(p+3) = alpha_evax_proc.ra_save;
- break;
- case PDSC_S_K_KIND_FP_STACK:
- md_number_to_chars (p+2, (valueT)alpha_evax_proc.rsa_offset, 2);
- break;
- default: /* impossible */
- break;
+ case PDSC_S_K_KIND_NULL:
+ *(p + 2) = 0;
+ *(p + 3) = 0;
+ break;
+ case PDSC_S_K_KIND_FP_REGISTER:
+ *(p + 2) = alpha_evax_proc.fp_save;
+ *(p + 3) = alpha_evax_proc.ra_save;
+ break;
+ case PDSC_S_K_KIND_FP_STACK:
+ md_number_to_chars (p + 2, (valueT) alpha_evax_proc.rsa_offset, 2);
+ break;
+ default: /* impossible */
+ break;
}
- *(p+4) = 0;
- *(p+5) = alpha_evax_proc.type & 0x0f;
+ *(p + 4) = 0;
+ *(p + 5) = alpha_evax_proc.type & 0x0f;
/* Signature offset. */
- md_number_to_chars (p+6, (valueT)0, 2);
+ md_number_to_chars (p + 6, (valueT) 0, 2);
- fix_new_exp (frag_now, p-frag_now->fr_literal+8, 8, &exp, 0, BFD_RELOC_64);
+ fix_new_exp (frag_now, p - frag_now->fr_literal+8, 8, &exp, 0, BFD_RELOC_64);
if (alpha_evax_proc.pdsckind == PDSC_S_K_KIND_NULL)
return;
@@ -4829,12 +4904,12 @@ s_alpha_pdesc (ignore)
seginfo->literal_pool_size += 8;
/* pdesc+16: Size. */
- md_number_to_chars (p, (valueT)alpha_evax_proc.framesize, 4);
+ md_number_to_chars (p, (valueT) alpha_evax_proc.framesize, 4);
- md_number_to_chars (p+4, (valueT)0, 2);
+ md_number_to_chars (p + 4, (valueT) 0, 2);
/* Entry length. */
- md_number_to_chars (p+6, alpha_evax_proc.prologue, 2);
+ md_number_to_chars (p + 6, alpha_evax_proc.prologue, 2);
if (alpha_evax_proc.pdsckind == PDSC_S_K_KIND_FP_REGISTER)
return;
@@ -4848,12 +4923,11 @@ s_alpha_pdesc (ignore)
/* pdesc+24: register masks. */
md_number_to_chars (p, alpha_evax_proc.imask, 4);
- md_number_to_chars (p+4, alpha_evax_proc.fmask, 4);
+ md_number_to_chars (p + 4, alpha_evax_proc.fmask, 4);
return;
}
-
/* Support for crash debug on vms. */
static void
@@ -4889,12 +4963,11 @@ s_alpha_name (ignore)
p = frag_more (8);
seginfo->literal_pool_size += 8;
- fix_new_exp (frag_now, p-frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64);
+ fix_new_exp (frag_now, p - frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64);
return;
}
-
static void
s_alpha_linkage (ignore)
int ignore;
@@ -4923,7 +4996,6 @@ s_alpha_linkage (ignore)
return;
}
-
static void
s_alpha_code_address (ignore)
int ignore;
@@ -4952,7 +5024,6 @@ s_alpha_code_address (ignore)
return;
}
-
static void
s_alpha_fp_save (ignore)
int ignore;
@@ -4964,7 +5035,6 @@ s_alpha_fp_save (ignore)
return;
}
-
static void
s_alpha_mask (ignore)
int ignore;
@@ -4979,14 +5049,13 @@ s_alpha_mask (ignore)
else
{
alpha_evax_proc.imask = val;
- (void)get_absolute_expression ();
+ (void) get_absolute_expression ();
}
demand_empty_rest_of_line ();
return;
}
-
static void
s_alpha_fmask (ignore)
int ignore;
@@ -5022,7 +5091,6 @@ s_alpha_end (ignore)
return;
}
-
static void
s_alpha_file (ignore)
int ignore;
@@ -5064,13 +5132,13 @@ s_alpha_gprel32 (ignore)
switch (e.X_op)
{
case O_constant:
- e.X_add_symbol = section_symbol(absolute_section);
+ e.X_add_symbol = section_symbol (absolute_section);
e.X_op = O_symbol;
/* FALLTHRU */
case O_symbol:
break;
default:
- abort();
+ abort ();
}
#else
#ifdef OBJ_ECOFF
@@ -5097,7 +5165,7 @@ s_alpha_gprel32 (ignore)
p = frag_more (4);
memset (p, 0, 4);
- fix_new_exp (frag_now, p-frag_now->fr_literal, 4,
+ fix_new_exp (frag_now, p - frag_now->fr_literal, 4,
&e, 0, BFD_RELOC_GPREL32);
}
@@ -5366,45 +5434,43 @@ s_alpha_arch (ignored)
ch = get_symbol_end ();
for (p = cpu_types; p->name; ++p)
- if (strcmp(name, p->name) == 0)
+ if (strcmp (name, p->name) == 0)
{
- alpha_target_name = p->name, alpha_target = p->flags;
+ alpha_target_name = p->name, alpha_target = p->flags;
goto found;
}
- as_warn("Unknown CPU identifier `%s'", name);
+ as_warn ("Unknown CPU identifier `%s'", name);
found:
*input_line_pointer = ch;
demand_empty_rest_of_line ();
}
-
-
#ifdef DEBUG1
/* print token expression with alpha specific extension. */
static void
-alpha_print_token(f, exp)
- FILE *f;
- const expressionS *exp;
+alpha_print_token (f, exp)
+ FILE *f;
+ const expressionS *exp;
{
switch (exp->X_op)
{
- case O_cpregister:
- putc (',', f);
- /* FALLTHRU */
- case O_pregister:
- putc ('(', f);
- {
- expressionS nexp = *exp;
- nexp.X_op = O_register;
- print_expr (f, &nexp);
- }
- putc (')', f);
- break;
- default:
- print_expr (f, exp);
- break;
+ case O_cpregister:
+ putc (',', f);
+ /* FALLTHRU */
+ case O_pregister:
+ putc ('(', f);
+ {
+ expressionS nexp = *exp;
+ nexp.X_op = O_register;
+ print_expr (f, &nexp);
+ }
+ putc (')', f);
+ break;
+ default:
+ print_expr (f, exp);
+ break;
}
return;
}
@@ -5412,8 +5478,7 @@ alpha_print_token(f, exp)
/* The target specific pseudo-ops which we support. */
-const pseudo_typeS md_pseudo_table[] =
-{
+const pseudo_typeS md_pseudo_table[] = {
#ifdef OBJ_ECOFF
{"comm", s_alpha_comm, 0}, /* osf1 compiler does this */
{"rdata", s_alpha_rdata, 0},
@@ -5455,17 +5520,19 @@ const pseudo_typeS md_pseudo_table[] =
{"fmask", s_alpha_mask, 1},
{"frame", s_alpha_frame, 0},
{"prologue", s_alpha_prologue, 0},
+ {"file", s_alpha_file, 5},
+ {"loc", s_alpha_loc, 9},
+ {"stabs", s_alpha_stab, 's'},
+ {"stabn", s_alpha_stab, 'n'},
/* COFF debugging related pseudos. */
{"begin", s_alpha_coff_wrapper, 0},
{"bend", s_alpha_coff_wrapper, 1},
{"def", s_alpha_coff_wrapper, 2},
{"dim", s_alpha_coff_wrapper, 3},
{"endef", s_alpha_coff_wrapper, 4},
- {"file", s_alpha_coff_wrapper, 5},
- {"scl", s_alpha_coff_wrapper, 6},
- {"tag", s_alpha_coff_wrapper, 7},
- {"val", s_alpha_coff_wrapper, 8},
- {"loc", s_alpha_coff_wrapper, 9},
+ {"scl", s_alpha_coff_wrapper, 5},
+ {"tag", s_alpha_coff_wrapper, 6},
+ {"val", s_alpha_coff_wrapper, 7},
#else
{"prologue", s_ignore, 0},
#endif
@@ -5518,7 +5585,6 @@ const pseudo_typeS md_pseudo_table[] =
{NULL, 0, 0},
};
-
/* Build a BFD section with its flags set appropriately for the .lita,
.lit8, or .lit4 sections. */
@@ -5566,7 +5632,8 @@ select_gp_value ()
assert (alpha_gp_value == 0);
/* Get minus-one in whatever width... */
- alpha_gp_value = 0; alpha_gp_value--;
+ alpha_gp_value = 0;
+ alpha_gp_value--;
/* Select the smallest VMA of these existing sections. */
maybe_set_gp (alpha_lita_section);
@@ -5607,27 +5674,8 @@ alpha_align (n, pfill, label, force)
if (pfill == NULL)
{
- if (n > 2
- && (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
- {
- static char const unop[4] = { 0x00, 0x00, 0xe0, 0x2f };
- static char const nopunop[8] = {
- 0x1f, 0x04, 0xff, 0x47,
- 0x00, 0x00, 0xe0, 0x2f
- };
-
- /* First, make sure we're on a four-byte boundary, in case
- someone has been putting .byte values into the text
- section. The DEC assembler silently fills with unaligned
- no-op instructions. This will zero-fill, then nop-fill
- with proper alignment. */
- if (alpha_current_align < 2)
- frag_align (2, 0, 0);
- if (alpha_current_align < 3)
- frag_align_pattern (3, unop, sizeof unop, 0);
- if (n > 3)
- frag_align_pattern (n, nopunop, sizeof nopunop, 0);
- }
+ if (subseg_text_p (now_seg))
+ frag_align_code (n, 0);
else
frag_align (n, 0, 0);
}
@@ -5644,10 +5692,55 @@ alpha_align (n, pfill, label, force)
record_alignment (now_seg, n);
- /* ??? if alpha_flag_relax && force && elf, record the requested alignment
+ /* ??? If alpha_flag_relax && force && elf, record the requested alignment
in a reloc for the linker to see. */
}
+/* This is called from HANDLE_ALIGN in write.c. Fill in the contents
+ of an rs_align_code fragment. */
+
+void
+alpha_handle_align (fragp)
+ fragS *fragp;
+{
+ static char const unop[4] = { 0x00, 0x00, 0xe0, 0x2f };
+ static char const nopunop[8] = {
+ 0x1f, 0x04, 0xff, 0x47,
+ 0x00, 0x00, 0xe0, 0x2f
+ };
+
+ int bytes, fix;
+ char *p;
+
+ if (fragp->fr_type != rs_align_code)
+ return;
+
+ bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
+ p = fragp->fr_literal + fragp->fr_fix;
+ fix = 0;
+
+ if (bytes & 3)
+ {
+ fix = bytes & 3;
+ memset (p, 0, fix);
+ p += fix;
+ bytes -= fix;
+ }
+
+ if (bytes & 4)
+ {
+ memcpy (p, unop, 4);
+ p += 4;
+ bytes -= 4;
+ fix += 4;
+ }
+
+ memcpy (p, nopunop, 8);
+
+ fragp->fr_fix += fix;
+ fragp->fr_var = 8;
+}
+
/* The Alpha has support for some VAX floating point types, as well as for
IEEE floating point. We consider IEEE to be the primary floating point
format, and sneak in the VAX floating point support here. */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-alpha.h b/gnu/usr.bin/binutils/gas/config/tc-alpha.h
index 9a8ed4ed861..52207dd76f8 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-alpha.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-alpha.h
@@ -1,5 +1,6 @@
/* This file is tc-alpha.h
- Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by Ken Raeburn <raeburn@cygnus.com>.
This file is part of GAS, the GNU Assembler.
@@ -90,6 +91,11 @@ extern void alpha_define_label PARAMS ((symbolS *));
#define md_cons_align(nbytes) alpha_cons_align (nbytes)
extern void alpha_cons_align PARAMS ((int));
+#define HANDLE_ALIGN(fragp) alpha_handle_align (fragp)
+extern void alpha_handle_align PARAMS ((struct frag *));
+
+#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 8)
+
#ifdef OBJ_ECOFF
#define tc_frob_file_before_adjust() alpha_frob_file_before_adjust ()
extern void alpha_frob_file_before_adjust PARAMS ((void));
@@ -146,3 +152,5 @@ do { \
(long)fixP->tc_fix_data.next_lituse); \
} while (0)
#endif
+
+#define DWARF2_LINE_MIN_INSN_LENGTH 4
diff --git a/gnu/usr.bin/binutils/gas/config/tc-arm.c b/gnu/usr.bin/binutils/gas/config/tc-arm.c
index 04f0060cbd8..99aff8ef313 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-arm.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-arm.c
@@ -1,5 +1,6 @@
/* tc-arm.c -- Assemble for the ARM
- Copyright (C) 1994, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -25,7 +26,7 @@
#define NO_RELOC 0
#include "as.h"
-/* need TARGET_CPU */
+/* Need TARGET_CPU. */
#include "config.h"
#include "subsegs.h"
#include "obstack.h"
@@ -34,6 +35,7 @@
#ifdef OBJ_ELF
#include "elf/arm.h"
+#include "dwarf2dbg.h"
#endif
/* Types of processor to assemble for. */
@@ -42,46 +44,53 @@
#define ARM_3 0x00000004
#define ARM_250 ARM_3
#define ARM_6 0x00000008
-#define ARM_7 ARM_6 /* same core instruction set */
-#define ARM_8 ARM_6 /* same core instruction set */
-#define ARM_9 ARM_6 /* same core instruction set */
+#define ARM_7 ARM_6 /* Same core instruction set. */
+#define ARM_8 ARM_6 /* Same core instruction set. */
+#define ARM_9 ARM_6 /* Same core instruction set. */
#define ARM_CPU_MASK 0x0000000f
-/* The following bitmasks control CPU extensions (ARM7 onwards): */
-#define ARM_LONGMUL 0x00000010 /* allow long multiplies */
-#define ARM_HALFWORD 0x00000020 /* allow half word loads */
-#define ARM_THUMB 0x00000040 /* allow BX instruction */
-#define ARM_EXT_V5 0x00000080 /* allow CLZ etc */
-#define ARM_EXT_V5E 0x00000200 /* "El Segundo" */
+/* The following bitmasks control CPU extensions (ARM7 onwards): */
+#define ARM_EXT_LONGMUL 0x00000010 /* Allow long multiplies. */
+#define ARM_EXT_HALFWORD 0x00000020 /* Allow half word loads. */
+#define ARM_EXT_THUMB 0x00000040 /* Allow BX instruction. */
+#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */
+#define ARM_EXT_V5E 0x00000100 /* "El Segundo". */
+#define ARM_EXT_XSCALE 0x00000200 /* Allow MIA etc. */
/* Architectures are the sum of the base and extensions. */
-#define ARM_ARCH_V4 (ARM_7 | ARM_LONGMUL | ARM_HALFWORD)
-#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_THUMB)
+#define ARM_ARCH_V3M ARM_EXT_LONGMUL
+#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_HALFWORD)
+#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_THUMB)
#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5)
-#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_THUMB)
+#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_THUMB)
+#define ARM_ARCH_V5TE (ARM_ARCH_V5T | ARM_EXT_V5E)
+#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_EXT_XSCALE)
/* Some useful combinations: */
#define ARM_ANY 0x00ffffff
#define ARM_2UP (ARM_ANY - ARM_1)
-#define ARM_ALL ARM_2UP /* Not arm1 only */
+#define ARM_ALL ARM_2UP /* Not arm1 only. */
#define ARM_3UP 0x00fffffc
-#define ARM_6UP 0x00fffff8 /* Includes ARM7 */
+#define ARM_6UP 0x00fffff8 /* Includes ARM7. */
#define FPU_CORE 0x80000000
#define FPU_FPA10 0x40000000
#define FPU_FPA11 0x40000000
#define FPU_NONE 0
-/* Some useful combinations */
-#define FPU_ALL 0xff000000 /* Note this is ~ARM_ANY */
-#define FPU_MEMMULTI 0x7f000000 /* Not fpu_core */
+/* Some useful combinations. */
+#define FPU_ALL 0xff000000 /* Note this is ~ARM_ANY. */
+#define FPU_MEMMULTI 0x7f000000 /* Not fpu_core. */
-
#ifndef CPU_DEFAULT
+#if defined __XSCALE__
+#define CPU_DEFAULT (ARM_9 | ARM_ARCH_XSCALE)
+#else
#if defined __thumb__
-#define CPU_DEFAULT (ARM_ARCH_V4 | ARM_THUMB)
+#define CPU_DEFAULT (ARM_7 | ARM_ARCH_V4T)
#else
-#define CPU_DEFAULT ARM_ALL
+#define CPU_DEFAULT ARM_ALL
+#endif
#endif
#endif
@@ -90,17 +99,18 @@
#endif
#define streq(a, b) (strcmp (a, b) == 0)
-#define skip_whitespace(str) while (* (str) == ' ') ++ (str)
+#define skip_whitespace(str) while (*(str) == ' ') ++(str)
-static unsigned long cpu_variant = CPU_DEFAULT | FPU_DEFAULT;
+static unsigned long cpu_variant = CPU_DEFAULT | FPU_DEFAULT;
static int target_oabi = 0;
#if defined OBJ_COFF || defined OBJ_ELF
-/* Flags stored in private area of BFD structure */
-static boolean uses_apcs_26 = false;
-static boolean support_interwork = false;
-static boolean uses_apcs_float = false;
-static boolean pic_code = false;
+/* Flags stored in private area of BFD structure. */
+static boolean uses_apcs_26 = false;
+static boolean atpcs = false;
+static boolean support_interwork = false;
+static boolean uses_apcs_float = false;
+static boolean pic_code = false;
#endif
/* This array holds the chars that always start a comment. If the
@@ -116,19 +126,15 @@ CONST char comment_chars[] = "@";
/* Also note that comments like this one will always work. */
CONST char line_comment_chars[] = "#";
-#ifdef TE_LINUX
CONST char line_separator_chars[] = ";";
-#else
-CONST char line_separator_chars[] = "";
-#endif
/* Chars that can be used to separate mant
from exp in floating point numbers. */
CONST char EXP_CHARS[] = "eE";
-/* Chars that mean this number is a floating point constant */
-/* As in 0f12.456 */
-/* or 0d1.2345e12 */
+/* Chars that mean this number is a floating point constant. */
+/* As in 0f12.456 */
+/* or 0d1.2345e12 */
CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP";
@@ -137,14 +143,19 @@ CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP";
#define is_immediate_prefix(C) ((C) == '#' || (C) == '$')
#ifdef OBJ_ELF
-symbolS * GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
+/* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
+symbolS * GOT_symbol;
#endif
-CONST int md_reloc_size = 8; /* Size of relocation record */
+/* Size of relocation record. */
+CONST int md_reloc_size = 8;
+
+/* 0: assemble for ARM,
+ 1: assemble for Thumb,
+ 2: assemble for Thumb even though target CPU does not support thumb
+ instructions. */
+static int thumb_mode = 0;
-static int thumb_mode = 0; /* 0: assemble for ARM, 1: assemble for Thumb,
- 2: assemble for Thumb even though target cpu
- does not support thumb instructions. */
typedef struct arm_fix
{
int thumb_mode;
@@ -157,35 +168,61 @@ struct arm_it
int suffix;
int size;
struct
- {
- bfd_reloc_code_real_type type;
- expressionS exp;
- int pc_rel;
- } reloc;
+ {
+ bfd_reloc_code_real_type type;
+ expressionS exp;
+ int pc_rel;
+ } reloc;
};
struct arm_it inst;
-struct asm_shift
+enum asm_shift_index
{
- CONST char * template;
- unsigned long value;
+ SHIFT_LSL = 0,
+ SHIFT_LSR,
+ SHIFT_ASR,
+ SHIFT_ROR,
+ SHIFT_RRX
};
-static CONST struct asm_shift shift[] =
-{
- {"asl", 0},
- {"lsl", 0},
- {"lsr", 0x00000020},
- {"asr", 0x00000040},
- {"ror", 0x00000060},
- {"rrx", 0x00000060},
- {"ASL", 0},
- {"LSL", 0},
- {"LSR", 0x00000020},
- {"ASR", 0x00000040},
- {"ROR", 0x00000060},
- {"RRX", 0x00000060}
+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 }
};
#define NO_SHIFT_RESTRICT 1
@@ -193,7 +230,7 @@ static CONST struct asm_shift shift[] =
#define NUM_FLOAT_VALS 8
-CONST char * fp_const[] =
+CONST char * fp_const[] =
{
"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0", 0
};
@@ -217,9 +254,11 @@ LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS];
#define CP_T_UD 0x00800000
#define CP_T_WB 0x00200000
-#define CONDS_BIT (0x00100000)
-#define LOAD_BIT (0x00100000)
-#define TRANS_BIT (0x00200000)
+#define CONDS_BIT 0x00100000
+#define LOAD_BIT 0x00100000
+#define TRANS_BIT 0x00200000
+
+#define DOUBLE_LOAD_FLAG 0x00000001
struct asm_cond
{
@@ -230,7 +269,7 @@ struct asm_cond
/* This is to save a hash look-up in the common case. */
#define COND_ALWAYS 0xe0000000
-static CONST struct asm_cond conds[] =
+static CONST struct asm_cond conds[] =
{
{"eq", 0x00000000},
{"ne", 0x10000000},
@@ -255,8 +294,8 @@ static CONST struct asm_cond conds[] =
the set_bits: */
struct asm_flg
{
- CONST char * template; /* Basic flag string */
- unsigned long set_bits; /* Bits to set */
+ CONST char * template; /* Basic flag string. */
+ unsigned long set_bits; /* Bits to set. */
};
static CONST struct asm_flg s_flag[] =
@@ -267,6 +306,7 @@ static CONST struct asm_flg s_flag[] =
static CONST struct asm_flg ldr_flags[] =
{
+ {"d", DOUBLE_LOAD_FLAG},
{"b", 0x00400000},
{"t", TRANS_BIT},
{"bt", 0x00400000 | TRANS_BIT},
@@ -278,6 +318,7 @@ static CONST struct asm_flg ldr_flags[] =
static CONST struct asm_flg str_flags[] =
{
+ {"d", DOUBLE_LOAD_FLAG},
{"b", 0x00400000},
{"t", TRANS_BIT},
{"bt", 0x00400000 | TRANS_BIT},
@@ -303,24 +344,24 @@ static CONST struct asm_flg ldm_flags[] =
{"ed", 0x01800000},
{"fd", 0x00800000},
{"ea", 0x01000000},
- {"fa", 0x08000000},
+ {"fa", 0x00000000},
{"ib", 0x01800000},
{"ia", 0x00800000},
{"db", 0x01000000},
- {"da", 0x08000000},
+ {"da", 0x00000000},
{NULL, 0}
};
static CONST struct asm_flg stm_flags[] =
{
- {"ed", 0x08000000},
+ {"ed", 0x00000000},
{"fd", 0x01000000},
{"ea", 0x00800000},
{"fa", 0x01800000},
{"ib", 0x01800000},
{"ia", 0x00800000},
{"db", 0x01000000},
- {"da", 0x08000000},
+ {"da", 0x00000000},
{NULL, 0}
};
@@ -386,8 +427,11 @@ struct asm_psr
unsigned long field;
};
-#define SPSR_BIT (1 << 22) /* The bit that distnguishes CPSR and SPSR. */
-#define PSR_SHIFT 16 /* How many bits to shift the PSR_xxx bits up by. */
+/* The bit that distnguishes CPSR and SPSR. */
+#define SPSR_BIT (1 << 22)
+
+/* How many bits to shift the PSR_xxx bits up by. */
+#define PSR_SHIFT 16
#define PSR_c (1 << 0)
#define PSR_x (1 << 1)
@@ -403,7 +447,7 @@ static CONST struct asm_psr psrs[] =
{"CPSR_flg", true, PSR_f},
{"CPSR_f", true, PSR_f},
{"SPSR_flg", false, PSR_f},
- {"SPSR_f", false, PSR_f},
+ {"SPSR_f", false, PSR_f},
{"CPSR_c", true, PSR_c},
{"CPSR_ctl", true, PSR_c},
{"SPSR_c", false, PSR_c},
@@ -412,24 +456,131 @@ static CONST struct asm_psr psrs[] =
{"CPSR_s", true, PSR_s},
{"SPSR_x", false, PSR_x},
{"SPSR_s", false, PSR_s},
- /* For backwards compatability with older toolchain we also
- support lower case versions of some of these flags. */
- {"cpsr", true, PSR_c | PSR_f},
- {"cpsr_all", true, PSR_c | PSR_f},
- {"spsr", false, PSR_c | PSR_f},
- {"spsr_all", false, PSR_c | PSR_f},
- {"cpsr_flg", true, PSR_f},
- {"cpsr_f", true, PSR_f},
- {"spsr_flg", false, PSR_f},
- {"spsr_f", false, PSR_f},
- {"cpsr_c", true, PSR_c},
- {"cpsr_ctl", true, PSR_c},
- {"spsr_c", false, PSR_c},
- {"spsr_ctl", false, PSR_c}
+ /* Combinations of flags. */
+ {"CPSR_fs", true, PSR_f | PSR_s},
+ {"CPSR_fx", true, PSR_f | PSR_x},
+ {"CPSR_fc", true, PSR_f | PSR_c},
+ {"CPSR_sf", true, PSR_s | PSR_f},
+ {"CPSR_sx", true, PSR_s | PSR_x},
+ {"CPSR_sc", true, PSR_s | PSR_c},
+ {"CPSR_xf", true, PSR_x | PSR_f},
+ {"CPSR_xs", true, PSR_x | PSR_s},
+ {"CPSR_xc", true, PSR_x | PSR_c},
+ {"CPSR_cf", true, PSR_c | PSR_f},
+ {"CPSR_cs", true, PSR_c | PSR_s},
+ {"CPSR_cx", true, PSR_c | PSR_x},
+ {"CPSR_fsx", true, PSR_f | PSR_s | PSR_x},
+ {"CPSR_fsc", true, PSR_f | PSR_s | PSR_c},
+ {"CPSR_fxs", true, PSR_f | PSR_x | PSR_s},
+ {"CPSR_fxc", true, PSR_f | PSR_x | PSR_c},
+ {"CPSR_fcs", true, PSR_f | PSR_c | PSR_s},
+ {"CPSR_fcx", true, PSR_f | PSR_c | PSR_x},
+ {"CPSR_sfx", true, PSR_s | PSR_f | PSR_x},
+ {"CPSR_sfc", true, PSR_s | PSR_f | PSR_c},
+ {"CPSR_sxf", true, PSR_s | PSR_x | PSR_f},
+ {"CPSR_sxc", true, PSR_s | PSR_x | PSR_c},
+ {"CPSR_scf", true, PSR_s | PSR_c | PSR_f},
+ {"CPSR_scx", true, PSR_s | PSR_c | PSR_x},
+ {"CPSR_xfs", true, PSR_x | PSR_f | PSR_s},
+ {"CPSR_xfc", true, PSR_x | PSR_f | PSR_c},
+ {"CPSR_xsf", true, PSR_x | PSR_s | PSR_f},
+ {"CPSR_xsc", true, PSR_x | PSR_s | PSR_c},
+ {"CPSR_xcf", true, PSR_x | PSR_c | PSR_f},
+ {"CPSR_xcs", true, PSR_x | PSR_c | PSR_s},
+ {"CPSR_cfs", true, PSR_c | PSR_f | PSR_s},
+ {"CPSR_cfx", true, PSR_c | PSR_f | PSR_x},
+ {"CPSR_csf", true, PSR_c | PSR_s | PSR_f},
+ {"CPSR_csx", true, PSR_c | PSR_s | PSR_x},
+ {"CPSR_cxf", true, PSR_c | PSR_x | PSR_f},
+ {"CPSR_cxs", true, PSR_c | PSR_x | PSR_s},
+ {"CPSR_fsxc", true, PSR_f | PSR_s | PSR_x | PSR_c},
+ {"CPSR_fscx", true, PSR_f | PSR_s | PSR_c | PSR_x},
+ {"CPSR_fxsc", true, PSR_f | PSR_x | PSR_s | PSR_c},
+ {"CPSR_fxcs", true, PSR_f | PSR_x | PSR_c | PSR_s},
+ {"CPSR_fcsx", true, PSR_f | PSR_c | PSR_s | PSR_x},
+ {"CPSR_fcxs", true, PSR_f | PSR_c | PSR_x | PSR_s},
+ {"CPSR_sfxc", true, PSR_s | PSR_f | PSR_x | PSR_c},
+ {"CPSR_sfcx", true, PSR_s | PSR_f | PSR_c | PSR_x},
+ {"CPSR_sxfc", true, PSR_s | PSR_x | PSR_f | PSR_c},
+ {"CPSR_sxcf", true, PSR_s | PSR_x | PSR_c | PSR_f},
+ {"CPSR_scfx", true, PSR_s | PSR_c | PSR_f | PSR_x},
+ {"CPSR_scxf", true, PSR_s | PSR_c | PSR_x | PSR_f},
+ {"CPSR_xfsc", true, PSR_x | PSR_f | PSR_s | PSR_c},
+ {"CPSR_xfcs", true, PSR_x | PSR_f | PSR_c | PSR_s},
+ {"CPSR_xsfc", true, PSR_x | PSR_s | PSR_f | PSR_c},
+ {"CPSR_xscf", true, PSR_x | PSR_s | PSR_c | PSR_f},
+ {"CPSR_xcfs", true, PSR_x | PSR_c | PSR_f | PSR_s},
+ {"CPSR_xcsf", true, PSR_x | PSR_c | PSR_s | PSR_f},
+ {"CPSR_cfsx", true, PSR_c | PSR_f | PSR_s | PSR_x},
+ {"CPSR_cfxs", true, PSR_c | PSR_f | PSR_x | PSR_s},
+ {"CPSR_csfx", true, PSR_c | PSR_s | PSR_f | PSR_x},
+ {"CPSR_csxf", true, PSR_c | PSR_s | PSR_x | PSR_f},
+ {"CPSR_cxfs", true, PSR_c | PSR_x | PSR_f | PSR_s},
+ {"CPSR_cxsf", true, PSR_c | PSR_x | PSR_s | PSR_f},
+ {"SPSR_fs", false, PSR_f | PSR_s},
+ {"SPSR_fx", false, PSR_f | PSR_x},
+ {"SPSR_fc", false, PSR_f | PSR_c},
+ {"SPSR_sf", false, PSR_s | PSR_f},
+ {"SPSR_sx", false, PSR_s | PSR_x},
+ {"SPSR_sc", false, PSR_s | PSR_c},
+ {"SPSR_xf", false, PSR_x | PSR_f},
+ {"SPSR_xs", false, PSR_x | PSR_s},
+ {"SPSR_xc", false, PSR_x | PSR_c},
+ {"SPSR_cf", false, PSR_c | PSR_f},
+ {"SPSR_cs", false, PSR_c | PSR_s},
+ {"SPSR_cx", false, PSR_c | PSR_x},
+ {"SPSR_fsx", false, PSR_f | PSR_s | PSR_x},
+ {"SPSR_fsc", false, PSR_f | PSR_s | PSR_c},
+ {"SPSR_fxs", false, PSR_f | PSR_x | PSR_s},
+ {"SPSR_fxc", false, PSR_f | PSR_x | PSR_c},
+ {"SPSR_fcs", false, PSR_f | PSR_c | PSR_s},
+ {"SPSR_fcx", false, PSR_f | PSR_c | PSR_x},
+ {"SPSR_sfx", false, PSR_s | PSR_f | PSR_x},
+ {"SPSR_sfc", false, PSR_s | PSR_f | PSR_c},
+ {"SPSR_sxf", false, PSR_s | PSR_x | PSR_f},
+ {"SPSR_sxc", false, PSR_s | PSR_x | PSR_c},
+ {"SPSR_scf", false, PSR_s | PSR_c | PSR_f},
+ {"SPSR_scx", false, PSR_s | PSR_c | PSR_x},
+ {"SPSR_xfs", false, PSR_x | PSR_f | PSR_s},
+ {"SPSR_xfc", false, PSR_x | PSR_f | PSR_c},
+ {"SPSR_xsf", false, PSR_x | PSR_s | PSR_f},
+ {"SPSR_xsc", false, PSR_x | PSR_s | PSR_c},
+ {"SPSR_xcf", false, PSR_x | PSR_c | PSR_f},
+ {"SPSR_xcs", false, PSR_x | PSR_c | PSR_s},
+ {"SPSR_cfs", false, PSR_c | PSR_f | PSR_s},
+ {"SPSR_cfx", false, PSR_c | PSR_f | PSR_x},
+ {"SPSR_csf", false, PSR_c | PSR_s | PSR_f},
+ {"SPSR_csx", false, PSR_c | PSR_s | PSR_x},
+ {"SPSR_cxf", false, PSR_c | PSR_x | PSR_f},
+ {"SPSR_cxs", false, PSR_c | PSR_x | PSR_s},
+ {"SPSR_fsxc", false, PSR_f | PSR_s | PSR_x | PSR_c},
+ {"SPSR_fscx", false, PSR_f | PSR_s | PSR_c | PSR_x},
+ {"SPSR_fxsc", false, PSR_f | PSR_x | PSR_s | PSR_c},
+ {"SPSR_fxcs", false, PSR_f | PSR_x | PSR_c | PSR_s},
+ {"SPSR_fcsx", false, PSR_f | PSR_c | PSR_s | PSR_x},
+ {"SPSR_fcxs", false, PSR_f | PSR_c | PSR_x | PSR_s},
+ {"SPSR_sfxc", false, PSR_s | PSR_f | PSR_x | PSR_c},
+ {"SPSR_sfcx", false, PSR_s | PSR_f | PSR_c | PSR_x},
+ {"SPSR_sxfc", false, PSR_s | PSR_x | PSR_f | PSR_c},
+ {"SPSR_sxcf", false, PSR_s | PSR_x | PSR_c | PSR_f},
+ {"SPSR_scfx", false, PSR_s | PSR_c | PSR_f | PSR_x},
+ {"SPSR_scxf", false, PSR_s | PSR_c | PSR_x | PSR_f},
+ {"SPSR_xfsc", false, PSR_x | PSR_f | PSR_s | PSR_c},
+ {"SPSR_xfcs", false, PSR_x | PSR_f | PSR_c | PSR_s},
+ {"SPSR_xsfc", false, PSR_x | PSR_s | PSR_f | PSR_c},
+ {"SPSR_xscf", false, PSR_x | PSR_s | PSR_c | PSR_f},
+ {"SPSR_xcfs", false, PSR_x | PSR_c | PSR_f | PSR_s},
+ {"SPSR_xcsf", false, PSR_x | PSR_c | PSR_s | PSR_f},
+ {"SPSR_cfsx", false, PSR_c | PSR_f | PSR_s | PSR_x},
+ {"SPSR_cfxs", false, PSR_c | PSR_f | PSR_x | PSR_s},
+ {"SPSR_csfx", false, PSR_c | PSR_s | PSR_f | PSR_x},
+ {"SPSR_csxf", false, PSR_c | PSR_s | PSR_x | PSR_f},
+ {"SPSR_cxfs", false, PSR_c | PSR_x | PSR_f | PSR_s},
+ {"SPSR_cxsf", false, PSR_c | PSR_x | PSR_s | PSR_f},
};
/* Functions called by parser. */
-/* ARM instructions */
+/* ARM instructions. */
static void do_arit PARAMS ((char *, unsigned long));
static void do_cmp PARAMS ((char *, unsigned long));
static void do_mov PARAMS ((char *, unsigned long));
@@ -437,25 +588,49 @@ static void do_ldst PARAMS ((char *, unsigned long));
static void do_ldmstm PARAMS ((char *, unsigned long));
static void do_branch PARAMS ((char *, unsigned long));
static void do_swi PARAMS ((char *, unsigned long));
-/* Pseudo Op codes */
+/* Pseudo Op codes. */
static void do_adr PARAMS ((char *, unsigned long));
static void do_adrl PARAMS ((char *, unsigned long));
static void do_nop PARAMS ((char *, unsigned long));
-/* ARM 2 */
+/* ARM 2. */
static void do_mul PARAMS ((char *, unsigned long));
static void do_mla PARAMS ((char *, unsigned long));
-/* ARM 3 */
+/* ARM 3. */
static void do_swap PARAMS ((char *, unsigned long));
-/* ARM 6 */
+/* ARM 6. */
static void do_msr PARAMS ((char *, unsigned long));
static void do_mrs PARAMS ((char *, unsigned long));
-/* ARM 7M */
+/* ARM 7M. */
static void do_mull PARAMS ((char *, unsigned long));
-/* ARM THUMB */
+/* ARM THUMB. */
static void do_bx PARAMS ((char *, unsigned long));
-
-/* Coprocessor Instructions */
+/* ARM_EXT_XScale. */
+static void do_mia PARAMS ((char *, unsigned long));
+static void do_mar PARAMS ((char *, unsigned long));
+static void do_mra PARAMS ((char *, unsigned long));
+static void do_pld PARAMS ((char *, unsigned long));
+static void do_ldrd PARAMS ((char *, unsigned long));
+
+/* ARM_EXT_V5. */
+static void do_blx PARAMS ((char *, unsigned long));
+static void do_bkpt PARAMS ((char *, unsigned long));
+static void do_clz PARAMS ((char *, unsigned long));
+static void do_lstc2 PARAMS ((char *, unsigned long));
+static void do_cdp2 PARAMS ((char *, unsigned long));
+static void do_co_reg2 PARAMS ((char *, unsigned long));
+
+static void do_t_blx PARAMS ((char *));
+static void do_t_bkpt PARAMS ((char *));
+
+/* ARM_EXT_V5E. */
+static void do_smla PARAMS ((char *, unsigned long));
+static void do_smlal PARAMS ((char *, unsigned long));
+static void do_smul PARAMS ((char *, unsigned long));
+static void do_qadd PARAMS ((char *, unsigned long));
+static void do_co_reg2c PARAMS ((char *, unsigned long));
+
+/* Coprocessor Instructions. */
static void do_cdp PARAMS ((char *, unsigned long));
static void do_lstc PARAMS ((char *, unsigned long));
static void do_co_reg PARAMS ((char *, unsigned long));
@@ -512,30 +687,49 @@ static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void));
take 2: */
#define INSN_SIZE 4
-/* LONGEST_INST is the longest basic instruction name without conditions or
- flags. ARM7M has 4 of length 5. */
+/* LONGEST_INST is the longest basic instruction name without
+ conditions or flags. ARM7M has 4 of length 5. El Segundo
+ has one basic instruction name of length 7 (SMLALxy). */
+#define LONGEST_INST 7
-#define LONGEST_INST 5
+struct asm_opcode
+{
+ /* Basic string to match. */
+ CONST char * template;
+ /* Basic instruction code. */
+ unsigned long value;
-struct asm_opcode
-{
- CONST char * template; /* Basic string to match */
- unsigned long value; /* Basic instruction code */
+ /* Compulsory suffix that must follow conds. If "", then the
+ instruction is not conditional and must have no suffix. */
+ CONST char * comp_suffix;
- /* Compulsory suffix that must follow conds. If "", then the
- instruction is not conditional and must have no suffix. */
- CONST char * comp_suffix;
+ /* Bits to toggle if flag 'n' set. */
+ CONST struct asm_flg * flags;
- CONST struct asm_flg * flags; /* Bits to toggle if flag 'n' set */
- unsigned long variants; /* Which CPU variants this exists for */
- /* Function to call to parse args */
- void (* parms) PARAMS ((char *, unsigned long));
+ /* Which CPU variants this exists for. */
+ unsigned long variants;
+
+ /* Function to call to parse args. */
+ void (* parms) PARAMS ((char *, unsigned long));
};
-static CONST struct asm_opcode insns[] =
-{
-/* ARM Instructions */
+static CONST struct asm_opcode insns[] =
+{
+/* Intel XScale extensions to ARM V5 ISA. */
+ {"mia", 0x0e200010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
+ {"miaph", 0x0e280010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
+ {"miabb", 0x0e2c0010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
+ {"miabt", 0x0e2d0010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
+ {"miatb", 0x0e2e0010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
+ {"miatt", 0x0e2f0010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
+ {"mar", 0x0c400000, NULL, NULL, ARM_EXT_XSCALE, do_mar},
+ {"mra", 0x0c500000, NULL, NULL, ARM_EXT_XSCALE, do_mra},
+ {"pld", 0xf450f000, "", NULL, ARM_EXT_XSCALE, do_pld},
+ {"ldr", 0x000000d0, NULL, ldr_flags, ARM_ANY, do_ldrd},
+ {"str", 0x000000f0, NULL, str_flags, ARM_ANY, do_ldrd},
+
+/* ARM Instructions. */
{"and", 0x00000000, NULL, s_flag, ARM_ANY, do_arit},
{"eor", 0x00200000, NULL, s_flag, ARM_ANY, do_arit},
{"sub", 0x00400000, NULL, s_flag, ARM_ANY, do_arit},
@@ -564,36 +758,36 @@ static CONST struct asm_opcode insns[] =
{"bl", 0x0bfffffe, NULL, NULL, ARM_ANY, do_branch},
{"b", 0x0afffffe, NULL, NULL, ARM_ANY, do_branch},
#endif
-
-/* Pseudo ops */
+
+/* Pseudo ops. */
{"adr", 0x028f0000, NULL, NULL, ARM_ANY, do_adr},
{"adrl", 0x028f0000, NULL, NULL, ARM_ANY, do_adrl},
{"nop", 0x01a00000, NULL, NULL, ARM_ANY, do_nop},
-/* ARM 2 multiplies */
+/* ARM 2 multiplies. */
{"mul", 0x00000090, NULL, s_flag, ARM_2UP, do_mul},
{"mla", 0x00200090, NULL, s_flag, ARM_2UP, do_mla},
-/* ARM 3 - swp instructions */
+/* ARM 3 - swp instructions. */
{"swp", 0x01000090, NULL, byte_flag, ARM_3UP, do_swap},
-/* ARM 6 Coprocessor instructions */
+/* ARM 6 Coprocessor instructions. */
{"mrs", 0x010f0000, NULL, NULL, ARM_6UP, do_mrs},
{"msr", 0x0120f000, NULL, NULL, ARM_6UP, do_msr},
/* ScottB: our code uses 0x0128f000 for msr.
NickC: but this is wrong because the bits 16 through 19 are
handled by the PSR_xxx defines above. */
-/* ARM 7M long multiplies - need signed/unsigned flags! */
- {"smull", 0x00c00090, NULL, s_flag, ARM_LONGMUL, do_mull},
- {"umull", 0x00800090, NULL, s_flag, ARM_LONGMUL, do_mull},
- {"smlal", 0x00e00090, NULL, s_flag, ARM_LONGMUL, do_mull},
- {"umlal", 0x00a00090, NULL, s_flag, ARM_LONGMUL, do_mull},
+/* ARM 7M long multiplies - need signed/unsigned flags! */
+ {"smull", 0x00c00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull},
+ {"umull", 0x00800090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull},
+ {"smlal", 0x00e00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull},
+ {"umlal", 0x00a00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull},
-/* ARM THUMB interworking */
- {"bx", 0x012fff10, NULL, NULL, ARM_THUMB, do_bx},
+/* ARM THUMB interworking. */
+ {"bx", 0x012fff10, NULL, NULL, ARM_EXT_THUMB, do_bx},
-/* Floating point instructions */
+/* Floating point instructions. */
{"wfs", 0x0e200110, NULL, NULL, FPU_ALL, do_fp_ctrl},
{"rfs", 0x0e300110, NULL, NULL, FPU_ALL, do_fp_ctrl},
{"wfc", 0x0e400110, NULL, NULL, FPU_ALL, do_fp_ctrl},
@@ -647,6 +841,48 @@ static CONST struct asm_opcode insns[] =
{"stc", 0x0c000000, NULL, cplong_flag, ARM_2UP, do_lstc},
{"mcr", 0x0e000010, NULL, NULL, ARM_2UP, do_co_reg},
{"mrc", 0x0e100010, NULL, NULL, ARM_2UP, do_co_reg},
+
+/* ARM ISA extension 5. */
+/* Note: blx is actually 2 opcodes, so the .value is set dynamically.
+ And it's sometimes conditional and sometimes not. */
+ {"blx", 0, NULL, NULL, ARM_EXT_V5, do_blx},
+ {"clz", 0x016f0f10, NULL, NULL, ARM_EXT_V5, do_clz},
+ {"bkpt", 0xe1200070, "", NULL, ARM_EXT_V5, do_bkpt},
+ {"ldc2", 0xfc100000, "", cplong_flag, ARM_EXT_V5, do_lstc2},
+ {"stc2", 0xfc000000, "", cplong_flag, ARM_EXT_V5, do_lstc2},
+ {"cdp2", 0xfe000000, "", NULL, ARM_EXT_V5, do_cdp2},
+ {"mcr2", 0xfe000010, "", NULL, ARM_EXT_V5, do_co_reg2},
+ {"mrc2", 0xfe100010, "", NULL, ARM_EXT_V5, do_co_reg2},
+
+/* ARM ISA extension 5E, El Segundo. */
+ {"smlabb", 0x01000080, NULL, NULL, ARM_EXT_V5E, do_smla},
+ {"smlatb", 0x010000a0, NULL, NULL, ARM_EXT_V5E, do_smla},
+ {"smlabt", 0x010000c0, NULL, NULL, ARM_EXT_V5E, do_smla},
+ {"smlatt", 0x010000e0, NULL, NULL, ARM_EXT_V5E, do_smla},
+
+ {"smlawb", 0x01200080, NULL, NULL, ARM_EXT_V5E, do_smla},
+ {"smlawt", 0x012000c0, NULL, NULL, ARM_EXT_V5E, do_smla},
+
+ {"smlalbb",0x01400080, NULL, NULL, ARM_EXT_V5E, do_smlal},
+ {"smlaltb",0x014000a0, NULL, NULL, ARM_EXT_V5E, do_smlal},
+ {"smlalbt",0x014000c0, NULL, NULL, ARM_EXT_V5E, do_smlal},
+ {"smlaltt",0x014000e0, NULL, NULL, ARM_EXT_V5E, do_smlal},
+
+ {"smulbb", 0x01600080, NULL, NULL, ARM_EXT_V5E, do_smul},
+ {"smultb", 0x016000a0, NULL, NULL, ARM_EXT_V5E, do_smul},
+ {"smulbt", 0x016000c0, NULL, NULL, ARM_EXT_V5E, do_smul},
+ {"smultt", 0x016000e0, NULL, NULL, ARM_EXT_V5E, do_smul},
+
+ {"smulwb", 0x012000a0, NULL, NULL, ARM_EXT_V5E, do_smul},
+ {"smulwt", 0x012000e0, NULL, NULL, ARM_EXT_V5E, do_smul},
+
+ {"qadd", 0x01000050, NULL, NULL, ARM_EXT_V5E, do_qadd},
+ {"qdadd", 0x01400050, NULL, NULL, ARM_EXT_V5E, do_qadd},
+ {"qsub", 0x01200050, NULL, NULL, ARM_EXT_V5E, do_qadd},
+ {"qdsub", 0x01600050, NULL, NULL, ARM_EXT_V5E, do_qadd},
+
+ {"mcrr", 0x0c400000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c},
+ {"mrrc", 0x0c500000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c},
};
/* Defines for various bits that we will want to toggle. */
@@ -786,75 +1022,85 @@ static int thumb_reg PARAMS ((char ** str, int hi_lo));
#define THUMB_HALFWORD 1
#define THUMB_BYTE 0
-struct thumb_opcode
+struct thumb_opcode
{
- CONST char * template; /* Basic string to match */
- unsigned long value; /* Basic instruction code */
- int size;
- unsigned long variants; /* Which CPU variants this exists for */
- void (* parms) PARAMS ((char *)); /* Function to call to parse args */
+ /* Basic string to match. */
+ CONST char * template;
+
+ /* Basic instruction code. */
+ unsigned long value;
+
+ int size;
+
+ /* Which CPU variants this exists for. */
+ unsigned long variants;
+
+ /* Function to call to parse args. */
+ void (* parms) PARAMS ((char *));
};
static CONST struct thumb_opcode tinsns[] =
{
- {"adc", 0x4140, 2, ARM_THUMB, do_t_arit},
- {"add", 0x0000, 2, ARM_THUMB, do_t_add},
- {"and", 0x4000, 2, ARM_THUMB, do_t_arit},
- {"asr", 0x0000, 2, ARM_THUMB, do_t_asr},
- {"b", T_OPCODE_BRANCH, 2, ARM_THUMB, do_t_branch12},
- {"beq", 0xd0fe, 2, ARM_THUMB, do_t_branch9},
- {"bne", 0xd1fe, 2, ARM_THUMB, do_t_branch9},
- {"bcs", 0xd2fe, 2, ARM_THUMB, do_t_branch9},
- {"bhs", 0xd2fe, 2, ARM_THUMB, do_t_branch9},
- {"bcc", 0xd3fe, 2, ARM_THUMB, do_t_branch9},
- {"bul", 0xd3fe, 2, ARM_THUMB, do_t_branch9},
- {"blo", 0xd3fe, 2, ARM_THUMB, do_t_branch9},
- {"bmi", 0xd4fe, 2, ARM_THUMB, do_t_branch9},
- {"bpl", 0xd5fe, 2, ARM_THUMB, do_t_branch9},
- {"bvs", 0xd6fe, 2, ARM_THUMB, do_t_branch9},
- {"bvc", 0xd7fe, 2, ARM_THUMB, do_t_branch9},
- {"bhi", 0xd8fe, 2, ARM_THUMB, do_t_branch9},
- {"bls", 0xd9fe, 2, ARM_THUMB, do_t_branch9},
- {"bge", 0xdafe, 2, ARM_THUMB, do_t_branch9},
- {"blt", 0xdbfe, 2, ARM_THUMB, do_t_branch9},
- {"bgt", 0xdcfe, 2, ARM_THUMB, do_t_branch9},
- {"ble", 0xddfe, 2, ARM_THUMB, do_t_branch9},
- {"bal", 0xdefe, 2, ARM_THUMB, do_t_branch9},
- {"bic", 0x4380, 2, ARM_THUMB, do_t_arit},
- {"bl", 0xf7fffffe, 4, ARM_THUMB, do_t_branch23},
- {"bx", 0x4700, 2, ARM_THUMB, do_t_bx},
- {"cmn", T_OPCODE_CMN, 2, ARM_THUMB, do_t_arit},
- {"cmp", 0x0000, 2, ARM_THUMB, do_t_compare},
- {"eor", 0x4040, 2, ARM_THUMB, do_t_arit},
- {"ldmia", 0xc800, 2, ARM_THUMB, do_t_ldmstm},
- {"ldr", 0x0000, 2, ARM_THUMB, do_t_ldr},
- {"ldrb", 0x0000, 2, ARM_THUMB, do_t_ldrb},
- {"ldrh", 0x0000, 2, ARM_THUMB, do_t_ldrh},
- {"ldrsb", 0x5600, 2, ARM_THUMB, do_t_lds},
- {"ldrsh", 0x5e00, 2, ARM_THUMB, do_t_lds},
- {"ldsb", 0x5600, 2, ARM_THUMB, do_t_lds},
- {"ldsh", 0x5e00, 2, ARM_THUMB, do_t_lds},
- {"lsl", 0x0000, 2, ARM_THUMB, do_t_lsl},
- {"lsr", 0x0000, 2, ARM_THUMB, do_t_lsr},
- {"mov", 0x0000, 2, ARM_THUMB, do_t_mov},
- {"mul", T_OPCODE_MUL, 2, ARM_THUMB, do_t_arit},
- {"mvn", T_OPCODE_MVN, 2, ARM_THUMB, do_t_arit},
- {"neg", T_OPCODE_NEG, 2, ARM_THUMB, do_t_arit},
- {"orr", 0x4300, 2, ARM_THUMB, do_t_arit},
- {"pop", 0xbc00, 2, ARM_THUMB, do_t_push_pop},
- {"push", 0xb400, 2, ARM_THUMB, do_t_push_pop},
- {"ror", 0x41c0, 2, ARM_THUMB, do_t_arit},
- {"sbc", 0x4180, 2, ARM_THUMB, do_t_arit},
- {"stmia", 0xc000, 2, ARM_THUMB, do_t_ldmstm},
- {"str", 0x0000, 2, ARM_THUMB, do_t_str},
- {"strb", 0x0000, 2, ARM_THUMB, do_t_strb},
- {"strh", 0x0000, 2, ARM_THUMB, do_t_strh},
- {"swi", 0xdf00, 2, ARM_THUMB, do_t_swi},
- {"sub", 0x0000, 2, ARM_THUMB, do_t_sub},
- {"tst", T_OPCODE_TST, 2, ARM_THUMB, do_t_arit},
- /* Pseudo ops: */
- {"adr", 0x0000, 2, ARM_THUMB, do_t_adr},
- {"nop", 0x46C0, 2, ARM_THUMB, do_t_nop}, /* mov r8,r8 */
+ {"adc", 0x4140, 2, ARM_EXT_THUMB, do_t_arit},
+ {"add", 0x0000, 2, ARM_EXT_THUMB, do_t_add},
+ {"and", 0x4000, 2, ARM_EXT_THUMB, do_t_arit},
+ {"asr", 0x0000, 2, ARM_EXT_THUMB, do_t_asr},
+ {"b", T_OPCODE_BRANCH, 2, ARM_EXT_THUMB, do_t_branch12},
+ {"beq", 0xd0fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bne", 0xd1fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bcs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bhs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bcc", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bul", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"blo", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bmi", 0xd4fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bpl", 0xd5fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bvs", 0xd6fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bvc", 0xd7fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bhi", 0xd8fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bls", 0xd9fe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bge", 0xdafe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"blt", 0xdbfe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bgt", 0xdcfe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"ble", 0xddfe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bal", 0xdefe, 2, ARM_EXT_THUMB, do_t_branch9},
+ {"bic", 0x4380, 2, ARM_EXT_THUMB, do_t_arit},
+ {"bl", 0xf7fffffe, 4, ARM_EXT_THUMB, do_t_branch23},
+ {"blx", 0, 0, ARM_EXT_V5, do_t_blx},
+ {"bkpt", 0xbe00, 2, ARM_EXT_V5, do_t_bkpt},
+ {"bx", 0x4700, 2, ARM_EXT_THUMB, do_t_bx},
+ {"cmn", T_OPCODE_CMN, 2, ARM_EXT_THUMB, do_t_arit},
+ {"cmp", 0x0000, 2, ARM_EXT_THUMB, do_t_compare},
+ {"eor", 0x4040, 2, ARM_EXT_THUMB, do_t_arit},
+ {"ldmia", 0xc800, 2, ARM_EXT_THUMB, do_t_ldmstm},
+ {"ldr", 0x0000, 2, ARM_EXT_THUMB, do_t_ldr},
+ {"ldrb", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrb},
+ {"ldrh", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrh},
+ {"ldrsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds},
+ {"ldrsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds},
+ {"ldsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds},
+ {"ldsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds},
+ {"lsl", 0x0000, 2, ARM_EXT_THUMB, do_t_lsl},
+ {"lsr", 0x0000, 2, ARM_EXT_THUMB, do_t_lsr},
+ {"mov", 0x0000, 2, ARM_EXT_THUMB, do_t_mov},
+ {"mul", T_OPCODE_MUL, 2, ARM_EXT_THUMB, do_t_arit},
+ {"mvn", T_OPCODE_MVN, 2, ARM_EXT_THUMB, do_t_arit},
+ {"neg", T_OPCODE_NEG, 2, ARM_EXT_THUMB, do_t_arit},
+ {"orr", 0x4300, 2, ARM_EXT_THUMB, do_t_arit},
+ {"pop", 0xbc00, 2, ARM_EXT_THUMB, do_t_push_pop},
+ {"push", 0xb400, 2, ARM_EXT_THUMB, do_t_push_pop},
+ {"ror", 0x41c0, 2, ARM_EXT_THUMB, do_t_arit},
+ {"sbc", 0x4180, 2, ARM_EXT_THUMB, do_t_arit},
+ {"stmia", 0xc000, 2, ARM_EXT_THUMB, do_t_ldmstm},
+ {"str", 0x0000, 2, ARM_EXT_THUMB, do_t_str},
+ {"strb", 0x0000, 2, ARM_EXT_THUMB, do_t_strb},
+ {"strh", 0x0000, 2, ARM_EXT_THUMB, do_t_strh},
+ {"swi", 0xdf00, 2, ARM_EXT_THUMB, do_t_swi},
+ {"sub", 0x0000, 2, ARM_EXT_THUMB, do_t_sub},
+ {"tst", T_OPCODE_TST, 2, ARM_EXT_THUMB, do_t_arit},
+ /* Pseudo ops: */
+ {"adr", 0x0000, 2, ARM_EXT_THUMB, do_t_adr},
+ {"nop", 0x46C0, 2, ARM_EXT_THUMB, do_t_nop}, /* mov r8,r8 */
};
struct reg_entry
@@ -871,7 +1117,7 @@ struct reg_entry
#define REG_LR 14
#define REG_SP 13
-/* These are the standard names. Users can add aliases with .req */
+/* These are the standard names. Users can add aliases with .req. */
static CONST struct reg_entry reg_table[] =
{
/* Processor Register Numbers. */
@@ -911,13 +1157,14 @@ static CONST struct reg_entry reg_table[] =
#define BAD_PC _("r15 not allowed here")
#define BAD_FLAGS _("Instruction should not have flags")
#define BAD_COND _("Instruction is not conditional")
+#define ERR_NO_ACCUM _("acc0 expected")
-static struct hash_control * arm_ops_hsh = NULL;
-static struct hash_control * arm_tops_hsh = NULL;
-static struct hash_control * arm_cond_hsh = NULL;
+static struct hash_control * arm_ops_hsh = NULL;
+static struct hash_control * arm_tops_hsh = NULL;
+static struct hash_control * arm_cond_hsh = NULL;
static struct hash_control * arm_shift_hsh = NULL;
-static struct hash_control * arm_reg_hsh = NULL;
-static struct hash_control * arm_psr_hsh = NULL;
+static struct hash_control * arm_reg_hsh = NULL;
+static struct hash_control * arm_psr_hsh = NULL;
/* This table describes all the machine specific pseudo-ops the assembler
has to support. The fields are:
@@ -947,7 +1194,8 @@ static int my_get_expression PARAMS ((expressionS *, char **));
CONST pseudo_typeS md_pseudo_table[] =
{
- { "req", s_req, 0 }, /* Never called becasue '.req' does not start line */
+ /* Never called becasue '.req' does not start line. */
+ { "req", s_req, 0 },
{ "bss", s_bss, 0 },
{ "align", s_align, 0 },
{ "arm", s_arm, 0 },
@@ -962,13 +1210,15 @@ CONST pseudo_typeS md_pseudo_table[] =
/* Allow for the effect of section changes. */
{ "text", arm_s_text, 0 },
{ "data", arm_s_data, 0 },
-#ifdef OBJ_ELF
+#ifdef OBJ_ELF
{ "section", arm_s_section, 0 },
{ "section.s", arm_s_section, 0 },
{ "sect", arm_s_section, 0 },
{ "sect.s", arm_s_section, 0 },
{ "word", s_arm_elf_cons, 4 },
{ "long", s_arm_elf_cons, 4 },
+ { "file", dwarf2_directive_file, 0 },
+ { "loc", dwarf2_directive_loc, 0 },
#else
{ "word", cons, 4},
#endif
@@ -991,19 +1241,24 @@ CONST pseudo_typeS md_pseudo_table[] =
symbolS * last_label_seen;
static int label_is_thumb_function_name = false;
-/* Literal stuff */
+/* Literal stuff. */
#define MAX_LITERAL_POOL_SIZE 1024
typedef struct literalS
{
- struct expressionS exp;
- struct arm_it * inst;
+ struct expressionS exp;
+ struct arm_it * inst;
} literalT;
-literalT literals[MAX_LITERAL_POOL_SIZE];
-int next_literal_pool_place = 0; /* Next free entry in the pool */
-int lit_pool_num = 1; /* Next literal pool number */
+literalT literals[MAX_LITERAL_POOL_SIZE];
+
+/* Next free entry in the pool. */
+int next_literal_pool_place = 0;
+
+/* Next literal pool number. */
+int lit_pool_num = 1;
+
symbolS * current_poolP = NULL;
static int
@@ -1019,21 +1274,32 @@ add_to_lit_pool ()
while (lit_count < next_literal_pool_place)
{
if (literals[lit_count].exp.X_op == inst.reloc.exp.X_op
- && inst.reloc.exp.X_op == O_constant
- && literals[lit_count].exp.X_add_number
- == inst.reloc.exp.X_add_number
- && literals[lit_count].exp.X_unsigned == inst.reloc.exp.X_unsigned)
+ && inst.reloc.exp.X_op == O_constant
+ && (literals[lit_count].exp.X_add_number
+ == inst.reloc.exp.X_add_number)
+ && literals[lit_count].exp.X_unsigned == inst.reloc.exp.X_unsigned)
+ break;
+
+ if (literals[lit_count].exp.X_op == inst.reloc.exp.X_op
+ && inst.reloc.exp.X_op == O_symbol
+ && (literals[lit_count].exp.X_add_number
+ == inst.reloc.exp.X_add_number)
+ && (literals[lit_count].exp.X_add_symbol
+ == inst.reloc.exp.X_add_symbol)
+ && (literals[lit_count].exp.X_op_symbol
+ == inst.reloc.exp.X_op_symbol))
break;
+
lit_count++;
}
- if (lit_count == next_literal_pool_place) /* new entry */
+ if (lit_count == next_literal_pool_place) /* New entry. */
{
- if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE)
- {
- inst.error = _("Literal Pool Overflow");
- return FAIL;
- }
+ if (next_literal_pool_place >= MAX_LITERAL_POOL_SIZE)
+ {
+ inst.error = _("Literal Pool Overflow");
+ return FAIL;
+ }
literals[next_literal_pool_place].exp = inst.reloc.exp;
lit_count = next_literal_pool_place++;
@@ -1045,21 +1311,22 @@ add_to_lit_pool ()
return SUCCESS;
}
-
+
/* Can't use symbol_new here, so have to create a symbol and then at
a later date assign it a value. Thats what these functions do. */
+
static void
symbol_locate (symbolP, name, segment, valu, frag)
- symbolS * symbolP;
- CONST char * name; /* It is copied, the caller can modify */
- segT segment; /* Segment identifier (SEG_<something>) */
- valueT valu; /* Symbol value */
- fragS * frag; /* Associated fragment */
+ symbolS * symbolP;
+ CONST char * name; /* It is copied, the caller can modify. */
+ segT segment; /* Segment identifier (SEG_<something>). */
+ valueT valu; /* Symbol value. */
+ fragS * frag; /* Associated fragment. */
{
unsigned int name_length;
char * preserved_copy_of_name;
- name_length = strlen (name) + 1; /* +1 for \0 */
+ name_length = strlen (name) + 1; /* +1 for \0. */
obstack_grow (&notes, name, name_length);
preserved_copy_of_name = obstack_finish (&notes);
#ifdef STRIP_UNDERSCORE
@@ -1094,41 +1361,43 @@ symbol_locate (symbolP, name, segment, valu, frag)
#ifdef tc_symbol_new_hook
tc_symbol_new_hook (symbolP);
#endif
-
+
#ifdef DEBUG_SYMS
verify_symbol_chain (symbol_rootP, symbol_lastP);
-#endif /* DEBUG_SYMS */
+#endif /* DEBUG_SYMS */
}
-/* Check that an immediate is valid, and if so,
- convert it to the right format. */
+/* Check that an immediate is valid.
+ If so, convert it to the right format. */
+
static unsigned int
validate_immediate (val)
unsigned int val;
{
unsigned int a;
unsigned int i;
-
+
#define rotate_left(v, n) (v << n | v >> (32 - n))
-
+
for (i = 0; i < 32; i += 2)
if ((a = rotate_left (val, i)) <= 0xff)
- return a | (i << 7); /* 12-bit pack: [shift-cnt,const] */
-
+ return a | (i << 7); /* 12-bit pack: [shift-cnt,const]. */
+
return FAIL;
}
/* Check to see if an immediate can be computed as two seperate immediate
values, added together. We already know that this value cannot be
computed by just one ARM instruction. */
+
static unsigned int
validate_immediate_twopart (val, highpart)
- unsigned int val;
+ unsigned int val;
unsigned int * highpart;
{
unsigned int a;
unsigned int i;
-
+
for (i = 0; i < 32; i += 2)
if (((a = rotate_left (val, i)) & 0xff) != 0)
{
@@ -1142,19 +1411,17 @@ validate_immediate_twopart (val, highpart)
{
if (a & 0xff000000)
continue;
-
* highpart = (a >> 16) | ((i + 16) << 7);
}
else
{
assert (a & 0xff000000);
-
* highpart = (a >> 24) | ((i + 8) << 7);
}
return (a & 0xff) | (i << 7);
}
-
+
return FAIL;
}
@@ -1164,11 +1431,10 @@ validate_offset_imm (val, hwse)
int hwse;
{
if ((hwse && val > 255) || val > 4095)
- return FAIL;
+ return FAIL;
return val;
}
-
static void
s_req (a)
int a ATTRIBUTE_UNUSED;
@@ -1181,7 +1447,7 @@ s_bss (ignore)
int ignore ATTRIBUTE_UNUSED;
{
/* We don't support putting frags in the BSS segment, we fake it by
- marking in_bss, then looking at s_skip for clues?.. */
+ marking in_bss, then looking at s_skip for clues. */
subseg_set (bss_section, 0);
demand_empty_rest_of_line ();
}
@@ -1190,11 +1456,12 @@ static void
s_even (ignore)
int ignore ATTRIBUTE_UNUSED;
{
- if (!need_pass_2) /* Never make frag if expect extra pass. */
+ /* Never make frag if expect extra pass. */
+ if (!need_pass_2)
frag_align (1, 0, 0);
-
+
record_alignment (now_seg, 1);
-
+
demand_empty_rest_of_line ();
}
@@ -1208,8 +1475,8 @@ s_ltorg (ignored)
if (current_poolP == NULL)
return;
- /* Align pool as you have word accesses */
- /* Only make a frag if we have to ... */
+ /* Align pool as you have word accesses.
+ Only make a frag if we have to. */
if (!need_pass_2)
frag_align (2, 0, 0);
@@ -1222,21 +1489,23 @@ s_ltorg (ignored)
symbol_table_insert (current_poolP);
ARM_SET_THUMB (current_poolP, thumb_mode);
-
+
#if defined OBJ_COFF || defined OBJ_ELF
ARM_SET_INTERWORK (current_poolP, support_interwork);
#endif
-
+
while (lit_count < next_literal_pool_place)
/* First output the expression in the instruction to the pool. */
- emit_expr (&(literals[lit_count++].exp), 4); /* .word */
+ emit_expr (&(literals[lit_count++].exp), 4); /* .word */
next_literal_pool_place = 0;
current_poolP = NULL;
}
+/* Same as s_align_ptwo but align 0 => align 2. */
+
static void
-s_align (unused) /* Same as s_align_ptwo but align 0 => align 2 */
+s_align (unused)
int unused ATTRIBUTE_UNUSED;
{
register int temp;
@@ -1263,7 +1532,7 @@ s_align (unused) /* Same as s_align_ptwo but align 0 => align 2 */
if (!temp)
temp = 2;
- /* Only make a frag if we HAVE to. . . */
+ /* Only make a frag if we HAVE to. */
if (temp && !need_pass_2)
frag_align (temp, (int) temp_fill, 0);
demand_empty_rest_of_line ();
@@ -1280,14 +1549,13 @@ s_force_thumb (ignore)
This is used by gcc/config/arm/lib1funcs.asm for example
to compile interworking support functions even if the
target processor should not support interworking. */
-
if (! thumb_mode)
{
thumb_mode = 2;
-
+
record_alignment (now_seg, 1);
}
-
+
demand_empty_rest_of_line ();
}
@@ -1295,11 +1563,13 @@ static void
s_thumb_func (ignore)
int ignore ATTRIBUTE_UNUSED;
{
+ if (! thumb_mode)
+ opcode_select (16);
+
/* The following label is the name/address of the start of a Thumb function.
We need to know this for the interworking support. */
-
label_is_thumb_function_name = true;
-
+
demand_empty_rest_of_line ();
}
@@ -1318,16 +1588,14 @@ s_thumb_set (equiv)
register char * end_name;
register symbolS * symbolP;
- /*
- * Especial apologies for the random logic:
- * this just grew, and could be parsed much more simply!
- * Dean in haste.
- */
+ /* Especial apologies for the random logic:
+ This just grew, and could be parsed much more simply!
+ Dean - in haste. */
name = input_line_pointer;
delim = get_symbol_end ();
end_name = input_line_pointer;
*end_name = delim;
-
+
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
@@ -1344,7 +1612,7 @@ s_thumb_set (equiv)
if (name[0] == '.' && name[1] == '\0')
{
- /* XXX - this should not happen to .thumb_set */
+ /* XXX - this should not happen to .thumb_set. */
abort ();
}
@@ -1358,8 +1626,9 @@ s_thumb_set (equiv)
if (listing & LISTING_SYMBOLS)
{
extern struct list_info_struct * listing_tail;
- fragS * dummy_frag = (fragS *) xmalloc (sizeof(fragS));
- memset (dummy_frag, 0, sizeof(fragS));
+ fragS * dummy_frag = (fragS *) xmalloc (sizeof (fragS));
+
+ memset (dummy_frag, 0, sizeof (fragS));
dummy_frag->fr_type = rs_fill;
dummy_frag->line = listing_tail;
symbolP = symbol_new (name, undefined_section, 0, dummy_frag);
@@ -1367,13 +1636,13 @@ s_thumb_set (equiv)
}
else
#endif
- symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
-
+ symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+
#ifdef OBJ_COFF
- /* "set" symbols are local unless otherwise specified. */
+ /* "set" symbols are local unless otherwise specified. */
SF_SET_LOCAL (symbolP);
-#endif /* OBJ_COFF */
- } /* make a new symbol */
+#endif /* OBJ_COFF */
+ } /* Make a new symbol. */
symbol_table_insert (symbolP);
@@ -1385,11 +1654,11 @@ s_thumb_set (equiv)
as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP));
pseudo_set (symbolP);
-
+
demand_empty_rest_of_line ();
/* XXX Now we come to the Thumb specific bit of code. */
-
+
THUMB_SET_FUNC (symbolP, 1);
ARM_SET_THUMB (symbolP, 1);
#if defined OBJ_ELF || defined OBJ_COFF
@@ -1398,13 +1667,14 @@ s_thumb_set (equiv)
}
/* If we change section we must dump the literal pool first. */
+
static void
arm_s_text (ignore)
int ignore;
{
if (now_seg != text_section)
s_ltorg (0);
-
+
#ifdef OBJ_ELF
obj_elf_text (ignore);
#else
@@ -1423,7 +1693,7 @@ arm_s_data (ignore)
}
else if (now_seg != data_section)
s_ltorg (0);
-
+
#ifdef OBJ_ELF
obj_elf_data (ignore);
#else
@@ -1451,23 +1721,27 @@ opcode_select (width)
case 16:
if (! thumb_mode)
{
- if (! (cpu_variant & ARM_THUMB))
+ if (! (cpu_variant & ARM_EXT_THUMB))
as_bad (_("selected processor does not support THUMB opcodes"));
+
thumb_mode = 1;
- /* No need to force the alignment, since we will have been
- coming from ARM mode, which is word-aligned. */
- record_alignment (now_seg, 1);
+ /* No need to force the alignment, since we will have been
+ coming from ARM mode, which is word-aligned. */
+ record_alignment (now_seg, 1);
}
break;
case 32:
if (thumb_mode)
{
- if ((cpu_variant & ARM_ANY) == ARM_THUMB)
+ if ((cpu_variant & ARM_ANY) == ARM_EXT_THUMB)
as_bad (_("selected processor does not support ARM opcodes"));
+
thumb_mode = 0;
- if (!need_pass_2)
+
+ if (!need_pass_2)
frag_align (2, 0, 0);
+
record_alignment (now_seg, 1);
}
break;
@@ -1526,9 +1800,9 @@ static int
skip_past_comma (str)
char ** str;
{
- char *p = *str, c;
+ char * p = * str, c;
int comma = 0;
-
+
while ((c = *p) == ' ' || c == ',')
{
p++;
@@ -1544,17 +1818,18 @@ skip_past_comma (str)
}
/* A standard register must be given at this point.
- Shift is the place to put it in inst.instruction.
- Restores input start point on err.
+ SHIFT is the place to put it in inst.instruction.
+ Restores input start point on error.
Returns the reg#, or FAIL. */
+
static int
reg_required_here (str, shift)
char ** str;
int shift;
{
- static char buff [128]; /* XXX */
- int reg;
- char * start = *str;
+ static char buff [128]; /* XXX */
+ int reg;
+ char * start = * str;
if ((reg = arm_reg_parse (str)) != FAIL && int_register (reg))
{
@@ -1565,7 +1840,7 @@ reg_required_here (str, shift)
/* Restore the start point, we may have got a reg of the wrong class. */
*str = start;
-
+
/* In the few cases where we might be able to accept something else
this error can be overridden. */
sprintf (buff, _("Register expected, not '%.100s'"), start);
@@ -1595,6 +1870,13 @@ arm_psr_parse (ccp)
/* Terminate the word. */
*--p = 0;
+ /* CPSR's and SPSR's can now be lowercase. This is just a convenience
+ feature for ease of use and backwards compatibility. */
+ if (!strncmp (start, "cpsr", 4))
+ strncpy (start, "CPSR", 4);
+ else if (!strncmp (start, "spsr", 4))
+ strncpy (start, "SPSR", 4);
+
/* Now locate the word in the psr hash table. */
psr = (CONST struct asm_psr *) hash_find (arm_psr_hsh, start);
@@ -1609,13 +1891,14 @@ arm_psr_parse (ccp)
}
/* Parse the input looking for a PSR flag. */
+
static int
psr_required_here (str)
char ** str;
{
- char * start = *str;
+ char * start = * str;
CONST struct asm_psr * psr;
-
+
psr = arm_psr_parse (str);
if (psr)
@@ -1626,7 +1909,7 @@ psr_required_here (str)
/* Set the psr flags in the MSR instruction. */
inst.instruction |= psr->field << PSR_SHIFT;
-
+
return SUCCESS;
}
@@ -1736,8 +2019,8 @@ fp_reg_required_here (str, where)
char ** str;
int where;
{
- int reg;
- char * start = *str;
+ int reg;
+ char * start = * str;
if ((reg = arm_reg_parse (str)) != FAIL && fp_register (reg))
{
@@ -1770,14 +2053,14 @@ cp_address_offset (str)
}
(*str)++;
-
+
if (my_get_expression (& inst.reloc.exp, str))
return FAIL;
-
+
if (inst.reloc.exp.X_op == O_constant)
{
offset = inst.reloc.exp.X_add_number;
-
+
if (offset & 3)
{
inst.error = _("co-processor address must be word aligned");
@@ -1826,12 +2109,12 @@ cp_address_required_here (str)
if (*p == ']')
{
p++;
-
+
if (skip_past_comma (& p) == SUCCESS)
{
- /* [Rn], #expr */
+ /* [Rn], #expr */
write_back = WRITE_BACK;
-
+
if (reg == REG_PC)
{
inst.error = _("pc may not be used in post-increment");
@@ -1846,7 +2129,7 @@ cp_address_required_here (str)
}
else
{
- /* '['Rn, #expr']'[!] */
+ /* '['Rn, #expr']'[!] */
if (skip_past_comma (& p) == FAIL)
{
@@ -1855,7 +2138,7 @@ cp_address_required_here (str)
}
pre_inc = PRE_INDEX;
-
+
if (cp_address_offset (& p) == FAIL)
return FAIL;
@@ -1888,7 +2171,7 @@ cp_address_required_here (str)
return FAIL;
inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM;
- inst.reloc.exp.X_add_number -= 8; /* PC rel adjust */
+ inst.reloc.exp.X_add_number -= 8; /* PC rel adjust. */
inst.reloc.pc_rel = 1;
inst.instruction |= (REG_PC << 16);
pre_inc = PRE_INDEX;
@@ -1916,7 +2199,7 @@ do_mrs (str, flags)
unsigned long flags;
{
int skip = 0;
-
+
/* Only one syntax. */
skip_whitespace (str);
@@ -1940,8 +2223,9 @@ do_mrs (str, flags)
|| strcmp (str, "cpsr") == 0
|| strcmp (str, "spsr") == 0)
skip = 4;
+
/* This is for backwards compatability with older toolchains. */
- else if (strcmp (str, "cpsr_all") == 0
+ else if ( strcmp (str, "cpsr_all") == 0
|| strcmp (str, "spsr_all") == 0)
skip = 8;
else
@@ -1953,7 +2237,7 @@ do_mrs (str, flags)
if (* str == 's' || * str == 'S')
inst.instruction |= SPSR_BIT;
str += skip;
-
+
inst.instruction |= flags;
end_of_line (str);
}
@@ -1961,6 +2245,7 @@ do_mrs (str, flags)
/* Two possible forms:
"{C|S}PSR_<field>, Rm",
"{C|S}PSR_f, #expression". */
+
static void
do_msr (str, flags)
char * str;
@@ -1970,7 +2255,7 @@ do_msr (str, flags)
if (psr_required_here (& str) == FAIL)
return;
-
+
if (skip_past_comma (& str) == FAIL)
{
inst.error = _("comma missing after psr flags");
@@ -1981,7 +2266,7 @@ do_msr (str, flags)
if (reg_required_here (& str, 0) != FAIL)
{
- inst.error = NULL;
+ inst.error = NULL;
inst.instruction |= flags;
end_of_line (str);
return;
@@ -1989,27 +2274,35 @@ do_msr (str, flags)
if (! is_immediate_prefix (* str))
{
- inst.error = _("only a register or immediate value can follow a psr flag");
+ inst.error =
+ _("only a register or immediate value can follow a psr flag");
return;
}
str ++;
inst.error = NULL;
-
+
if (my_get_expression (& inst.reloc.exp, & str))
{
- inst.error = _("only a register or immediate value can follow a psr flag");
+ inst.error =
+ _("only a register or immediate value can follow a psr flag");
return;
}
-
- if (inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT))
+
+#if 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 = _("only flag field of psr can be set with immediate value");
+ inst.error = _("immediate value cannot be used to set this field");
return;
}
-
+#endif
+
flags |= INST_IMMEDIATE;
-
+
if (inst.reloc.exp.X_add_symbol)
{
inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
@@ -2018,17 +2311,17 @@ do_msr (str, flags)
else
{
unsigned value = validate_immediate (inst.reloc.exp.X_add_number);
-
+
if (value == (unsigned) FAIL)
{
inst.error = _("Invalid constant");
return;
}
-
+
inst.instruction |= value;
}
- inst.error = NULL;
+ inst.error = NULL;
inst.instruction |= flags;
end_of_line (str);
}
@@ -2037,8 +2330,8 @@ do_msr (str, flags)
UMULL RdLo, RdHi, Rm, Rs
SMULL RdLo, RdHi, Rm, Rs
UMLAL RdLo, RdHi, Rm, Rs
- SMLAL RdLo, RdHi, Rm, Rs
-*/
+ SMLAL RdLo, RdHi, Rm, Rs. */
+
static void
do_mull (str, flags)
char * str;
@@ -2046,7 +2339,7 @@ do_mull (str, flags)
{
int rdlo, rdhi, rm, rs;
- /* Only one format "rdlo, rdhi, rm, rs" */
+ /* Only one format "rdlo, rdhi, rm, rs". */
skip_whitespace (str);
if ((rdlo = reg_required_here (&str, 12)) == FAIL)
@@ -2069,7 +2362,7 @@ do_mull (str, flags)
return;
}
- /* rdhi, rdlo and rm must all be different */
+ /* rdhi, rdlo and rm must all be different. */
if (rdlo == rdhi || rdlo == rm || rdhi == rm)
as_tsktsk (_("rdhi, rdlo and rm must all be different"));
@@ -2085,7 +2378,7 @@ do_mull (str, flags)
inst.error = BAD_PC;
return;
}
-
+
inst.instruction |= flags;
end_of_line (str);
return;
@@ -2093,12 +2386,12 @@ do_mull (str, flags)
static void
do_mul (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
int rd, rm;
-
- /* Only one format "rd, rm, rs" */
+
+ /* Only one format "rd, rm, rs". */
skip_whitespace (str);
if ((rd = reg_required_here (&str, 16)) == FAIL)
@@ -2149,12 +2442,12 @@ do_mul (str, flags)
static void
do_mla (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
int rd, rm;
- /* Only one format "rd, rm, rs, rn" */
+ /* Only one format "rd, rm, rs, rn". */
skip_whitespace (str);
if ((rd = reg_required_here (&str, 16)) == FAIL)
@@ -2205,8 +2498,1073 @@ do_mla (str, flags)
return;
}
-/* Returns the index into fp_values of a floating point number, or -1 if
- not in the table. */
+/* Expects *str -> the characters "acc0", possibly with leading blanks.
+ Advances *str to the next non-alphanumeric.
+ Returns 0, or else FAIL (in which case sets inst.error).
+
+ (In a future XScale, there may be accumulators other than zero.
+ At that time this routine and its callers can be upgraded to suit.) */
+
+static int
+accum0_required_here (str)
+ char ** str;
+{
+ 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++;
+
+ *--p = 0; /* Aap nul into input buffer at non-alnum. */
+
+ if (! ( streq (*str, "acc0") || streq (*str, "ACC0")))
+ {
+ sprintf (buff, _("acc0 expected, not '%.100s'"), *str);
+ inst.error = buff;
+ result = FAIL;
+ }
+
+ *p = c; /* Unzap. */
+ *str = p; /* Caller's string pointer to after match. */
+ return result;
+}
+
+/* Expects **str -> after a comma. May be leading blanks.
+ Advances *str, recognizing a load mode, and setting inst.instruction.
+ Returns rn, or else FAIL (in which case may set inst.error
+ and not advance str)
+
+ Note: doesn't know Rd, so no err checks that require such knowledge. */
+
+static int
+ld_mode_required_here (string)
+ char ** string;
+{
+ char * str = * string;
+ int rn;
+ int pre_inc = 0;
+
+ skip_whitespace (str);
+
+ if (* str == '[')
+ {
+ str++;
+
+ skip_whitespace (str);
+
+ if ((rn = reg_required_here (& str, 16)) == FAIL)
+ return FAIL;
+
+ skip_whitespace (str);
+
+ if (* str == ']')
+ {
+ str ++;
+
+ if (skip_past_comma (& str) == SUCCESS)
+ {
+ /* [Rn],... (post inc) */
+ if (ldst_extend (& str, 1) == FAIL)
+ return FAIL;
+ }
+ else /* [Rn] */
+ {
+ skip_whitespace (str);
+
+ if (* str == '!')
+ {
+ str ++;
+ inst.instruction |= WRITE_BACK;
+ }
+
+ inst.instruction |= INDEX_UP | HWOFFSET_IMM;
+ pre_inc = 1;
+ }
+ }
+ else /* [Rn,...] */
+ {
+ if (skip_past_comma (& str) == FAIL)
+ {
+ inst.error = _("pre-indexed expression expected");
+ return FAIL;
+ }
+
+ pre_inc = 1;
+
+ if (ldst_extend (& str, 1) == FAIL)
+ return FAIL;
+
+ skip_whitespace (str);
+
+ if (* str ++ != ']')
+ {
+ inst.error = _("missing ]");
+ return FAIL;
+ }
+
+ skip_whitespace (str);
+
+ if (* str == '!')
+ {
+ str ++;
+ inst.instruction |= WRITE_BACK;
+ }
+ }
+ }
+ else if (* str == '=') /* ldr's "r,=label" syntax */
+ /* We should never reach here, because <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;
+
+ 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);
+
+ rn = REG_PC;
+ pre_inc = 1;
+ }
+
+ inst.instruction |= (pre_inc ? PRE_INDEX : 0);
+ * string = str;
+
+ return rn;
+}
+
+/* ARM V5E (El Segundo) signed-multiply-accumulate (argument parse)
+ SMLAxy{cond} Rd,Rm,Rs,Rn
+ SMLAWy{cond} Rd,Rm,Rs,Rn
+ Error if any register is R15. */
+
+static void
+do_smla (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ 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 if (flags)
+ inst.error = BAD_FLAGS;
+
+ else
+ end_of_line (str);
+}
+
+/* ARM V5E (El Segundo) signed-multiply-accumulate-long (argument parse)
+ SMLALxy{cond} Rdlo,Rdhi,Rm,Rs
+ Error if any register is R15.
+ Warning if Rdlo == Rdhi. */
+
+static void
+do_smlal (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rdlo, rdhi, rm, rs;
+
+ skip_whitespace (str);
+
+ if ((rdlo = reg_required_here (& str, 12)) == FAIL
+ || skip_past_comma (& str) == FAIL
+ || (rdhi = reg_required_here (& str, 16)) == FAIL
+ || skip_past_comma (& str) == FAIL
+ || (rm = reg_required_here (& str, 0)) == FAIL
+ || skip_past_comma (& str) == FAIL
+ || (rs = reg_required_here (& str, 8)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (rdlo == REG_PC || rdhi == REG_PC || rm == REG_PC || rs == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ if (rdlo == rdhi)
+ as_tsktsk (_("rdhi and rdlo must be different"));
+
+ if (flags)
+ inst.error = BAD_FLAGS;
+ else
+ end_of_line (str);
+}
+
+/* ARM V5E (El Segundo) signed-multiply (argument parse)
+ SMULxy{cond} Rd,Rm,Rs
+ Error if any register is R15. */
+
+static void
+do_smul (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rd, rm, rs;
+
+ skip_whitespace (str);
+
+ if ((rd = reg_required_here (& str, 16)) == FAIL
+ || skip_past_comma (& str) == FAIL
+ || (rm = reg_required_here (& str, 0)) == FAIL
+ || skip_past_comma (& str) == FAIL
+ || (rs = reg_required_here (& str, 8)) == FAIL)
+ inst.error = BAD_ARGS;
+
+ else if (rd == REG_PC || rm == REG_PC || rs == REG_PC)
+ inst.error = BAD_PC;
+
+ else if (flags)
+ inst.error = BAD_FLAGS;
+
+ else
+ end_of_line (str);
+}
+
+/* ARM V5E (El Segundo) saturating-add/subtract (argument parse)
+ Q[D]{ADD,SUB}{cond} Rd,Rm,Rn
+ Error if any register is R15. */
+
+static void
+do_qadd (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rd, rm, rn;
+
+ skip_whitespace (str);
+
+ if ((rd = reg_required_here (& str, 12)) == FAIL
+ || skip_past_comma (& str) == FAIL
+ || (rm = reg_required_here (& str, 0)) == FAIL
+ || skip_past_comma (& str) == FAIL
+ || (rn = reg_required_here (& str, 16)) == FAIL)
+ inst.error = BAD_ARGS;
+
+ else if (rd == REG_PC || rm == REG_PC || rn == REG_PC)
+ inst.error = BAD_PC;
+
+ else if (flags)
+ inst.error = BAD_FLAGS;
+
+ else
+ end_of_line (str);
+}
+
+/* ARM V5E (el Segundo)
+ MCRRcc <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. */
+
+static void
+do_co_reg2c (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rd, rn;
+
+ skip_whitespace (str);
+
+ if (co_proc_number (& str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_opc_expr (& str, 4, 4) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || (rd = reg_required_here (& str, 12)) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || (rn = reg_required_here (& str, 16)) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ /* Unpredictable result if rd or rn is R15. */
+ if (rd == REG_PC || rn == REG_PC)
+ as_tsktsk
+ (_("Warning: Instruction unpredictable when using r15"));
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_reg_required_here (& str, 0) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (flags)
+ inst.error = BAD_COND;
+
+ end_of_line (str);
+}
+
+/* ARM V5 count-leading-zeroes instruction (argument parse)
+ CLZ{<cond>} <Rd>, <Rm>
+ Condition defaults to COND_ALWAYS.
+ Error if Rd or Rm are R15. */
+
+static void
+do_clz (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rd, rm;
+
+ if (flags)
+ {
+ as_bad (BAD_FLAGS);
+ return;
+ }
+
+ skip_whitespace (str);
+
+ if (((rd = reg_required_here (& str, 12)) == FAIL)
+ || (skip_past_comma (& str) == FAIL)
+ || ((rm = reg_required_here (& str, 0)) == FAIL))
+ inst.error = BAD_ARGS;
+
+ else if (rd == REG_PC || rm == REG_PC )
+ inst.error = BAD_PC;
+
+ else
+ end_of_line (str);
+}
+
+/* ARM V5 (argument parse)
+ LDC2{L} <coproc>, <CRd>, <addressing mode>
+ STC2{L} <coproc>, <CRd>, <addressing mode>
+ Instruction is not conditional, and has 0xf in the codition field.
+ Otherwise, it's the same as LDC/STC. */
+
+static void
+do_lstc2 (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ if (flags)
+ inst.error = BAD_COND;
+
+ skip_whitespace (str);
+
+ if (co_proc_number (& str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ }
+ else if (skip_past_comma (& str) == FAIL
+ || cp_reg_required_here (& str, 12) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ }
+ else if (skip_past_comma (& str) == FAIL
+ || cp_address_required_here (& str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ }
+ else
+ end_of_line (str);
+}
+
+/* ARM V5 (argument parse)
+ CDP2 <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, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ if (co_proc_number (& str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_opc_expr (& str, 20,4) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_reg_required_here (& str, 12) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_reg_required_here (& str, 16) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_reg_required_here (& str, 0) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == SUCCESS)
+ {
+ if (cp_opc_expr (& str, 5, 3) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+ }
+
+ if (flags)
+ inst.error = BAD_FLAGS;
+
+ end_of_line (str);
+}
+
+/* ARM V5 (argument parse)
+ MCR2 <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. */
+
+static void
+do_co_reg2 (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ if (co_proc_number (& str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_opc_expr (& str, 21, 3) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || reg_required_here (& str, 12) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_reg_required_here (& str, 16) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || cp_reg_required_here (& str, 0) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == SUCCESS)
+ {
+ if (cp_opc_expr (& str, 5, 3) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+ }
+
+ if (flags)
+ inst.error = BAD_COND;
+
+ end_of_line (str);
+}
+
+/* THUMB V5 breakpoint instruction (argument parse)
+ BKPT <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 ++;
+
+ memset (& expr, '\0', sizeof (expr));
+ if (my_get_expression (& expr, & str) || (expr.X_op != O_constant))
+ {
+ inst.error = _("bad or missing expression");
+ return;
+ }
+
+ number = expr.X_add_number;
+
+ /* Check it fits an 8 bit unsigned. */
+ if (number != (number & 0xff))
+ {
+ inst.error = _("immediate value out of range");
+ return;
+ }
+
+ inst.instruction |= number;
+
+ end_of_line (str);
+}
+
+/* ARM V5 branch-link-exchange (argument parse) for BLX(1) only.
+ Expects inst.instruction is set for BLX(1).
+ Note: this is cloned from do_branch, and the reloc changed to be a
+ new one that can cope with setting one extra bit (the H bit). */
+
+static void
+do_branch25 (str, flags)
+ char * str;
+ unsigned long flags ATTRIBUTE_UNUSED;
+{
+ if (my_get_expression (& inst.reloc.exp, & str))
+ return;
+
+#ifdef OBJ_ELF
+ {
+ char * save_in;
+
+ /* ScottB: February 5, 1998 */
+ /* Check to see of PLT32 reloc required for the instruction. */
+
+ /* arm_parse_reloc() works on input_line_pointer.
+ We actually want to parse the operands to the branch instruction
+ passed in 'str'. Save the input pointer and restore it later. */
+ save_in = input_line_pointer;
+ input_line_pointer = str;
+
+ if (inst.reloc.exp.X_op == O_symbol
+ && *str == '('
+ && arm_parse_reloc () == BFD_RELOC_ARM_PLT32)
+ {
+ inst.reloc.type = BFD_RELOC_ARM_PLT32;
+ inst.reloc.pc_rel = 0;
+ /* Modify str to point to after parsed operands, otherwise
+ end_of_line() will complain about the (PLT) left in str. */
+ str = input_line_pointer;
+ }
+ else
+ {
+ inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX;
+ inst.reloc.pc_rel = 1;
+ }
+
+ input_line_pointer = save_in;
+ }
+#else
+ inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX;
+ inst.reloc.pc_rel = 1;
+#endif /* OBJ_ELF */
+
+ end_of_line (str);
+}
+
+/* ARM V5 branch-link-exchange instruction (argument parse)
+ BLX <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_blx (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ char * mystr = str;
+ int rm;
+
+ if (flags)
+ {
+ as_bad (BAD_FLAGS);
+ return;
+ }
+
+ skip_whitespace (mystr);
+ rm = reg_required_here (& mystr, 0);
+
+ /* The above may set inst.error. Ignore his opinion. */
+ inst.error = 0;
+
+ if (rm != FAIL)
+ {
+ /* Arg is a register.
+ Use the condition code our caller put in inst.instruction.
+ Pass ourselves off as a BX with a funny opcode. */
+ inst.instruction |= 0x012fff30;
+ do_bx (str, flags);
+ }
+ else
+ {
+ /* This must be is BLX <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, flags);
+ }
+}
+
+/* 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. */
+
+static void
+do_t_blx (str)
+ char * str;
+{
+ char * mystr = str;
+ int rm;
+
+ skip_whitespace (mystr);
+ inst.instruction = 0x4780;
+
+ /* Note that this call is to the ARM register recognizer. BLX(2)
+ uses the ARM register space, not the Thumb one, so a call to
+ thumb_reg() would be wrong. */
+ rm = reg_required_here (& mystr, 3);
+ inst.error = 0;
+
+ if (rm != FAIL)
+ {
+ /* It's BLX(2). The .instruction was zapped with rm & is final. */
+ inst.size = 2;
+ }
+ else
+ {
+ /* No ARM register. This must be BLX(1). Change the .instruction. */
+ inst.instruction = 0xf7ffeffe;
+ inst.size = 4;
+
+ if (my_get_expression (& inst.reloc.exp, & mystr))
+ return;
+
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX;
+ inst.reloc.pc_rel = 1;
+ }
+
+ end_of_line (mystr);
+}
+
+/* ARM V5 breakpoint instruction (argument parse)
+ BKPT <16 bit unsigned immediate>
+ Instruction is not conditional.
+ The bit pattern given in insns[] has the COND_ALWAYS condition,
+ and it is an error if the caller tried to override that.
+ Note "flags" is nonzero if a flag was supplied (which is an error). */
+
+static void
+do_bkpt (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ expressionS expr;
+ unsigned long number;
+
+ skip_whitespace (str);
+
+ /* Allow optional leading '#'. */
+ if (is_immediate_prefix (* str))
+ str++;
+
+ memset (& expr, '\0', sizeof (expr));
+
+ if (my_get_expression (& expr, & str) || (expr.X_op != O_constant))
+ {
+ inst.error = _("bad or missing expression");
+ return;
+ }
+
+ number = expr.X_add_number;
+
+ /* Check it fits a 16 bit unsigned. */
+ if (number != (number & 0xffff))
+ {
+ inst.error = _("immediate value out of range");
+ return;
+ }
+
+ /* Top 12 of 16 bits to bits 19:8. */
+ inst.instruction |= (number & 0xfff0) << 4;
+
+ /* Bottom 4 of 16 bits to bits 3:0. */
+ inst.instruction |= number & 0xf;
+
+ end_of_line (str);
+
+ if (flags)
+ inst.error = BAD_FLAGS;
+}
+
+/* Xscale multiply-accumulate (argument parse)
+ MIAcc acc0,Rm,Rs
+ MIAPHcc acc0,Rm,Rs
+ MIAxycc acc0,Rm,Rs. */
+
+static void
+do_mia (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rs;
+ int rm;
+
+ if (flags)
+ as_bad (BAD_FLAGS);
+
+ else if (accum0_required_here (& str) == FAIL)
+ inst.error = ERR_NO_ACCUM;
+
+ else if (skip_past_comma (& str) == FAIL
+ || (rm = reg_required_here (& str, 0)) == FAIL)
+ inst.error = BAD_ARGS;
+
+ else if (skip_past_comma (& str) == FAIL
+ || (rs = reg_required_here (& str, 12)) == FAIL)
+ inst.error = BAD_ARGS;
+
+ /* inst.instruction has now been zapped with both rm and rs. */
+ else if (rm == REG_PC || rs == REG_PC)
+ inst.error = BAD_PC; /* Undefined result if rm or rs is R15. */
+
+ else
+ end_of_line (str);
+}
+
+/* Xscale move-accumulator-register (argument parse)
+
+ MARcc acc0,RdLo,RdHi. */
+
+static void
+do_mar (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rdlo, rdhi;
+
+ if (flags)
+ as_bad (BAD_FLAGS);
+
+ else if (accum0_required_here (& str) == FAIL)
+ inst.error = ERR_NO_ACCUM;
+
+ else if (skip_past_comma (& str) == FAIL
+ || (rdlo = reg_required_here (& str, 12)) == FAIL)
+ inst.error = BAD_ARGS;
+
+ else if (skip_past_comma (& str) == FAIL
+ || (rdhi = reg_required_here (& str, 16)) == FAIL)
+ inst.error = BAD_ARGS;
+
+ /* inst.instruction has now been zapped with both rdlo and rdhi. */
+ else if (rdlo == REG_PC || rdhi == REG_PC)
+ inst.error = BAD_PC; /* Undefined result if rdlo or rdhi is R15. */
+
+ else
+ end_of_line (str);
+}
+
+/* Xscale move-register-accumulator (argument parse)
+
+ MRAcc RdLo,RdHi,acc0. */
+
+static void
+do_mra (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rdlo;
+ int rdhi;
+
+ if (flags)
+ {
+ as_bad (BAD_FLAGS);
+ return;
+ }
+
+ skip_whitespace (str);
+
+ if ((rdlo = reg_required_here (& str, 12)) == FAIL)
+ inst.error = BAD_ARGS;
+
+ else if (skip_past_comma (& str) == FAIL
+ || (rdhi = reg_required_here (& str, 16)) == FAIL)
+ inst.error = BAD_ARGS;
+
+ else if (skip_past_comma (& str) == FAIL
+ || accum0_required_here (& str) == FAIL)
+ inst.error = ERR_NO_ACCUM;
+
+ /* inst.instruction has now been zapped with both rdlo and rdhi. */
+ else if (rdlo == rdhi)
+ inst.error = BAD_ARGS; /* Undefined result if 2 writes to same reg. */
+
+ else if (rdlo == REG_PC || rdhi == REG_PC)
+ inst.error = BAD_PC; /* Undefined result if rdlo or rdhi is R15. */
+ else
+ end_of_line (str);
+}
+
+/* Xscale: Preload-Cache
+
+ PLD <addr_mode>
+
+ Syntactically, like LDR with B=1, W=0, L=1. */
+
+static void
+do_pld (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rd;
+
+ if (flags)
+ {
+ as_bad (BAD_FLAGS);
+ return;
+ }
+
+ skip_whitespace (str);
+
+ if (* str != '[')
+ {
+ inst.error = _("'[' expected after PLD mnemonic");
+ return;
+ }
+
+ ++ str;
+ skip_whitespace (str);
+
+ if ((rd = reg_required_here (& str, 16)) == FAIL)
+ return;
+
+ skip_whitespace (str);
+
+ if (* str == ']')
+ {
+ /* [Rn], ... ? */
+ ++ str;
+ skip_whitespace (str);
+
+ if (skip_past_comma (& str) == SUCCESS)
+ {
+ if (ldst_extend (& str, 0) == FAIL)
+ return;
+ }
+ else if (* str == '!') /* [Rn]! */
+ {
+ inst.error = _("writeback used in preload instruction");
+ ++ str;
+ }
+ else /* [Rn] */
+ inst.instruction |= INDEX_UP | PRE_INDEX;
+ }
+ else /* [Rn, ...] */
+ {
+ if (skip_past_comma (& str) == FAIL)
+ {
+ inst.error = _("pre-indexed expression expected");
+ return;
+ }
+
+ if (ldst_extend (& str, 0) == FAIL)
+ return;
+
+ skip_whitespace (str);
+
+ if (* str != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+
+ ++ str;
+ skip_whitespace (str);
+
+ if (* str == '!') /* [Rn]! */
+ {
+ inst.error = _("writeback used in preload instruction");
+ ++ str;
+ }
+
+ inst.instruction |= PRE_INDEX;
+ }
+
+ end_of_line (str);
+}
+
+/* Xscale load-consecutive (argument parse)
+ Mode is like LDRH.
+
+ LDRccD R, mode
+ STRccD R, mode. */
+
+static void
+do_ldrd (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rd;
+ int rn;
+
+ if (flags != DOUBLE_LOAD_FLAG)
+ {
+ /* Change instruction pattern to normal ldr/str. */
+ if (inst.instruction & 0x20)
+ inst.instruction = (inst.instruction & COND_MASK) | 0x04000000; /* str */
+ else
+ inst.instruction = (inst.instruction & COND_MASK) | 0x04100000; /* ldr */
+
+ /* Perform a normal load/store instruction parse. */
+ do_ldst (str, flags);
+
+ return;
+ }
+
+ if ((cpu_variant & ARM_EXT_XSCALE) != ARM_EXT_XSCALE)
+ {
+ static char buff[128];
+
+ --str;
+ while (isspace (*str))
+ --str;
+ str -= 4;
+
+ /* Deny all knowledge. */
+ sprintf (buff, _("bad instruction '%.100s'"), str);
+ inst.error = buff;
+ return;
+ }
+
+ skip_whitespace (str);
+
+ if ((rd = reg_required_here (& str, 12)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL
+ || (rn = ld_mode_required_here (& str)) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ /* inst.instruction has now been zapped with Rd and the addressing mode. */
+ if (rd & 1) /* Unpredictable result if Rd is odd. */
+ {
+ inst.error = _("Destination register must be even");
+ return;
+ }
+
+ if (rd == REG_LR || rd == 12)
+ {
+ inst.error = _("r12 or r14 not allowed here");
+ return;
+ }
+
+ if (((rd == rn) || (rd + 1 == rn))
+ &&
+ ((inst.instruction & WRITE_BACK)
+ || (!(inst.instruction & PRE_INDEX))))
+ as_warn (_("pre/post-indexing used when modified address register is destination"));
+
+ end_of_line (str);
+}
+
+/* Returns the index into fp_values of a floating point number,
+ or -1 if not in the table. */
+
static int
my_get_float_expression (str)
char ** str;
@@ -2218,9 +3576,10 @@ my_get_float_expression (str)
int j;
memset (words, 0, MAX_LITTLENUMS * sizeof (LITTLENUM_TYPE));
- /* Look for a raw floating point number */
+
+ /* Look for a raw floating point number. */
if ((save_in = atof_ieee (*str, 'x', words)) != NULL
- && (is_end_of_line [(int)(*save_in)] || *save_in == '\0'))
+ && is_end_of_line[(unsigned char) *save_in])
{
for (i = 0; i < NUM_FLOAT_VALS; i++)
{
@@ -2239,7 +3598,7 @@ my_get_float_expression (str)
}
/* Try and parse a more complex expression, this will probably fail
- unless the code uses a floating point prefix (eg "0f") */
+ unless the code uses a floating point prefix (eg "0f"). */
save_in = input_line_pointer;
input_line_pointer = *str;
if (expression (&exp) == absolute_section
@@ -2248,7 +3607,7 @@ my_get_float_expression (str)
{
/* 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 (gen_to_words (words, 5, (long) 15) == 0)
{
for (i = 0; i < NUM_FLOAT_VALS; i++)
{
@@ -2273,7 +3632,8 @@ my_get_float_expression (str)
return -1;
}
-/* Return true if anything in the expression is a bignum */
+/* Return true if anything in the expression is a bignum. */
+
static int
walk_no_bignums (sp)
symbolS * sp;
@@ -2298,7 +3658,7 @@ my_get_expression (ep, str)
{
char * save_in;
segT seg;
-
+
save_in = input_line_pointer;
input_line_pointer = *str;
seg = expression (ep);
@@ -2337,116 +3697,130 @@ my_get_expression (ep, str)
return 0;
}
-/* unrestrict should be one if <shift> <register> is permitted for this
- instruction */
+/* UNRESTRICT should be one if <shift> <register> is permitted for this
+ instruction. */
static int
decode_shift (str, unrestrict)
char ** str;
int unrestrict;
{
- struct asm_shift * shft;
+ const struct asm_shift_name * shift;
char * p;
char c;
-
+
skip_whitespace (* str);
-
- for (p = *str; isalpha (*p); p++)
+
+ for (p = * str; isalpha (* p); p ++)
;
- if (p == *str)
+ if (p == * str)
{
inst.error = _("Shift expression expected");
return FAIL;
}
- c = *p;
- *p = '\0';
- shft = (struct asm_shift *) hash_find (arm_shift_hsh, *str);
- *p = c;
- if (shft)
+ c = * p;
+ * p = '\0';
+ shift = (const struct asm_shift_name *) hash_find (arm_shift_hsh, * str);
+ * p = c;
+
+ if (shift == NULL)
{
- if (!strncmp (*str, "rrx", 3)
- || !strncmp (*str, "RRX", 3))
- {
- *str = p;
- inst.instruction |= shft->value;
- return SUCCESS;
- }
+ inst.error = _("Shift expression expected");
+ return FAIL;
+ }
- skip_whitespace (p);
-
- if (unrestrict && reg_required_here (&p, 8) != FAIL)
- {
- inst.instruction |= shft->value | SHIFT_BY_REG;
- *str = p;
- return SUCCESS;
- }
- else if (is_immediate_prefix (* p))
- {
- inst.error = NULL;
- p++;
- if (my_get_expression (&inst.reloc.exp, &p))
- return FAIL;
+ assert (shift->properties->index == shift_properties[shift->properties->index].index);
- /* Validate some simple #expressions */
- if (inst.reloc.exp.X_op == O_constant)
- {
- unsigned num = inst.reloc.exp.X_add_number;
+ if (shift->properties->index == SHIFT_RRX)
+ {
+ * str = p;
+ inst.instruction |= shift->properties->bit_field;
+ return SUCCESS;
+ }
- /* Reject operations greater than 32, or lsl #32 */
- if (num > 32 || (num == 32 && shft->value == 0))
- {
- inst.error = _("Invalid immediate shift");
- return FAIL;
- }
+ skip_whitespace (p);
- /* Shifts of zero should be converted to lsl (which is zero)*/
- if (num == 0)
- {
- *str = p;
- return SUCCESS;
- }
+ if (unrestrict && reg_required_here (& p, 8) != FAIL)
+ {
+ inst.instruction |= shift->properties->bit_field | SHIFT_BY_REG;
+ * str = p;
+ return SUCCESS;
+ }
+ else if (! is_immediate_prefix (* p))
+ {
+ inst.error = (unrestrict
+ ? _("shift requires register or #expression")
+ : _("shift requires #expression"));
+ * str = p;
+ return FAIL;
+ }
- /* Shifts of 32 are encoded as 0, for those shifts that
- support it. */
- if (num == 32)
- num = 0;
+ inst.error = NULL;
+ p ++;
- inst.instruction |= (num << 7) | shft->value;
- *str = p;
- return SUCCESS;
- }
+ if (my_get_expression (& inst.reloc.exp, & p))
+ return FAIL;
- inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
- inst.reloc.pc_rel = 0;
- inst.instruction |= shft->value;
- *str = p;
- return SUCCESS;
- }
- else
+ /* Validate some simple #expressions. */
+ if (inst.reloc.exp.X_op == O_constant)
+ {
+ unsigned num = inst.reloc.exp.X_add_number;
+
+ /* Reject operations greater than 32. */
+ if (num > 32
+ /* Reject a shift of 0 unless the mode allows it. */
+ || (num == 0 && shift->properties->allows_0 == 0)
+ /* Reject a shift of 32 unless the mode allows it. */
+ || (num == 32 && shift->properties->allows_32 == 0)
+ )
{
- inst.error = unrestrict ? _("shift requires register or #expression")
- : _("shift requires #expression");
- *str = p;
- return FAIL;
+ /* As a special case we allow a shift of zero for
+ modes that do not support it to be recoded as an
+ logical shift left of zero (ie nothing). We warn
+ about this though. */
+ if (num == 0)
+ {
+ as_warn (_("Shift of 0 ignored."));
+ shift = & shift_names[0];
+ assert (shift->properties->index == SHIFT_LSL);
+ }
+ else
+ {
+ inst.error = _("Invalid immediate shift");
+ return FAIL;
+ }
}
+
+ /* Shifts of 32 are encoded as 0, for those shifts that
+ support it. */
+ if (num == 32)
+ num = 0;
+
+ inst.instruction |= (num << 7) | shift->properties->bit_field;
+ }
+ else
+ {
+ inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
+ inst.reloc.pc_rel = 0;
+ inst.instruction |= shift->properties->bit_field;
}
- inst.error = _("Shift expression expected");
- return FAIL;
+ * str = p;
+ return SUCCESS;
}
-/* Do those data_ops which can take a negative immediate constant */
-/* by altering the instuction. A bit of a hack really */
-/* MOV <-> MVN
+/* Do those data_ops which can take a negative immediate constant
+ by altering the instuction. A bit of a hack really.
+ MOV <-> MVN
AND <-> BIC
ADC <-> SBC
by inverting the second operand, and
ADD <-> SUB
CMP <-> CMN
- by negating the second operand.
-*/
+ by negating the second operand. */
+
static int
negate_data_op (instruction, value)
unsigned long * instruction;
@@ -2461,60 +3835,60 @@ negate_data_op (instruction, value)
op = (*instruction >> DATA_OP_SHIFT) & 0xf;
switch (op)
{
- /* First negates */
- case OPCODE_SUB: /* ADD <-> SUB */
+ /* First negates. */
+ case OPCODE_SUB: /* ADD <-> SUB */
new_inst = OPCODE_ADD;
value = negated;
break;
- case OPCODE_ADD:
- new_inst = OPCODE_SUB;
+ case OPCODE_ADD:
+ new_inst = OPCODE_SUB;
value = negated;
break;
- case OPCODE_CMP: /* CMP <-> CMN */
+ case OPCODE_CMP: /* CMP <-> CMN */
new_inst = OPCODE_CMN;
value = negated;
break;
- case OPCODE_CMN:
- new_inst = OPCODE_CMP;
+ case OPCODE_CMN:
+ new_inst = OPCODE_CMP;
value = negated;
break;
- /* Now Inverted ops */
- case OPCODE_MOV: /* MOV <-> MVN */
- new_inst = OPCODE_MVN;
+ /* Now Inverted ops. */
+ case OPCODE_MOV: /* MOV <-> MVN */
+ new_inst = OPCODE_MVN;
value = inverted;
break;
- case OPCODE_MVN:
+ case OPCODE_MVN:
new_inst = OPCODE_MOV;
value = inverted;
break;
- case OPCODE_AND: /* AND <-> BIC */
- new_inst = OPCODE_BIC;
+ case OPCODE_AND: /* AND <-> BIC */
+ new_inst = OPCODE_BIC;
value = inverted;
break;
- case OPCODE_BIC:
+ case OPCODE_BIC:
new_inst = OPCODE_AND;
value = inverted;
break;
- case OPCODE_ADC: /* ADC <-> SBC */
- new_inst = OPCODE_SBC;
+ case OPCODE_ADC: /* ADC <-> SBC */
+ new_inst = OPCODE_SBC;
value = inverted;
break;
- case OPCODE_SBC:
+ case OPCODE_SBC:
new_inst = OPCODE_ADC;
value = inverted;
break;
- /* We cannot do anything */
- default:
+ /* We cannot do anything. */
+ default:
return FAIL;
}
@@ -2523,7 +3897,7 @@ negate_data_op (instruction, value)
*instruction &= OPCODE_MASK;
*instruction |= new_inst << DATA_OP_SHIFT;
- return value;
+ return value;
}
static int
@@ -2534,7 +3908,7 @@ data_op2 (str)
expressionS expr;
skip_whitespace (* str);
-
+
if (reg_required_here (str, 0) != FAIL)
{
if (skip_past_comma (str) == SUCCESS)
@@ -2545,12 +3919,12 @@ data_op2 (str)
}
else
{
- /* Immediate expression */
+ /* Immediate expression. */
if (is_immediate_prefix (**str))
{
(*str)++;
inst.error = NULL;
-
+
if (my_get_expression (&inst.reloc.exp, str))
return FAIL;
@@ -2563,7 +3937,7 @@ data_op2 (str)
{
if (skip_past_comma (str) == SUCCESS)
{
- /* #x, y -- ie explicit rotation by Y */
+ /* #x, y -- ie explicit rotation by Y. */
if (my_get_expression (&expr, str))
return FAIL;
@@ -2572,8 +3946,8 @@ data_op2 (str)
inst.error = _("Constant expression expected");
return FAIL;
}
-
- /* Rotate must be a multiple of 2 */
+
+ /* Rotate must be a multiple of 2. */
if (((unsigned) expr.X_add_number) > 30
|| (expr.X_add_number & 1) != 0
|| ((unsigned) inst.reloc.exp.X_add_number) > 255)
@@ -2587,13 +3961,13 @@ data_op2 (str)
return SUCCESS;
}
- /* Implicit rotation, select a suitable one */
+ /* Implicit rotation, select a suitable one. */
value = validate_immediate (inst.reloc.exp.X_add_number);
if (value == FAIL)
{
- /* Can't be done, perhaps the code reads something like
- "add Rd, Rn, #-n", where "sub Rd, Rn, #n" would be ok */
+ /* Can't be done. Perhaps the code reads something like
+ "add Rd, Rn, #-n", where "sub Rd, Rn, #n" would be OK. */
if ((value = negate_data_op (&inst.instruction,
inst.reloc.exp.X_add_number))
== FAIL)
@@ -2626,7 +4000,7 @@ fp_op2 (str)
return SUCCESS;
else
{
- /* Immediate expression */
+ /* Immediate expression. */
if (*((*str)++) == '#')
{
int i;
@@ -2635,8 +4009,8 @@ fp_op2 (str)
skip_whitespace (* str);
- /* First try and match exact strings, this is to guarantee that
- some formats will work even for cross assembly */
+ /* First try and match exact strings, this is to guarantee
+ that some formats will work even for cross assembly. */
for (i = 0; fp_const[i]; i++)
{
@@ -2645,7 +4019,7 @@ fp_op2 (str)
char *start = *str;
*str += strlen (fp_const[i]);
- if (is_end_of_line[(int)**str] || **str == '\0')
+ if (is_end_of_line[(unsigned char) **str])
{
inst.instruction |= i + 8;
return SUCCESS;
@@ -2667,14 +4041,15 @@ fp_op2 (str)
inst.error = _("Invalid floating point immediate expression");
return FAIL;
}
- inst.error = _("Floating point register or immediate expression expected");
+ inst.error =
+ _("Floating point register or immediate expression expected");
return FAIL;
}
}
static void
do_arit (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
@@ -2697,7 +4072,7 @@ do_arit (str, flags)
static void
do_adr (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
/* This is a pseudo-op of the form "adr rd, label" to be converted
@@ -2712,26 +4087,26 @@ do_adr (str, flags)
inst.error = BAD_ARGS;
return;
}
-
+
/* Frag hacking will turn this into a sub instruction if the offset turns
out to be negative. */
inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
inst.reloc.exp.X_add_number -= 8; /* PC relative adjust. */
inst.reloc.pc_rel = 1;
inst.instruction |= flags;
+
end_of_line (str);
- return;
}
static void
do_adrl (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
/* This is a pseudo-op of the form "adrl rd, label" to be converted
into a relative address of the form:
add rd, pc, #low(label-.-8)"
- add rd, rd, #high(label-.-8)" */
+ add rd, rd, #high(label-.-8)" */
skip_whitespace (str);
@@ -2743,23 +4118,23 @@ do_adrl (str, flags)
inst.error = BAD_ARGS;
return;
}
-
+
end_of_line (str);
-
+
/* Frag hacking will turn this into a sub instruction if the offset turns
out to be negative. */
inst.reloc.type = BFD_RELOC_ARM_ADRL_IMMEDIATE;
- inst.reloc.exp.X_add_number -= 8; /* PC relative adjust */
+ inst.reloc.exp.X_add_number -= 8; /* PC relative adjust */
inst.reloc.pc_rel = 1;
inst.instruction |= flags;
inst.size = INSN_SIZE * 2;
-
+
return;
}
static void
do_cmp (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
@@ -2789,7 +4164,7 @@ do_cmp (str, flags)
static void
do_mov (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
@@ -2833,8 +4208,8 @@ ldst_extend (str, hwse)
{
int value = inst.reloc.exp.X_add_number;
- if ((hwse && (value < -255 || value > 255))
- || (value < -4095 || value > 4095))
+ if ((hwse && (value < -255 || value > 255))
+ || (value < -4095 || value > 4095))
{
inst.error = _("address offset too large");
return FAIL;
@@ -2846,42 +4221,47 @@ ldst_extend (str, hwse)
add = 0;
}
- /* Halfword and signextension instructions have the
- immediate value split across bits 11..8 and bits 3..0 */
- if (hwse)
- inst.instruction |= add | HWOFFSET_IMM | ((value >> 4) << 8) | (value & 0xF);
- else
- inst.instruction |= add | value;
+ /* Halfword and signextension instructions have the
+ immediate value split across bits 11..8 and bits 3..0. */
+ if (hwse)
+ inst.instruction |= (add | HWOFFSET_IMM
+ | ((value >> 4) << 8) | (value & 0xF));
+ else
+ inst.instruction |= add | value;
}
else
{
- if (hwse)
- {
- inst.instruction |= HWOFFSET_IMM;
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
- }
- else
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
+ if (hwse)
+ {
+ inst.instruction |= HWOFFSET_IMM;
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
+ }
+ else
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
inst.reloc.pc_rel = 0;
}
return SUCCESS;
case '-':
- add = 0; /* and fall through */
+ add = 0;
+ /* Fall through. */
+
case '+':
- (*str)++; /* and fall through */
+ (*str)++;
+ /* Fall through. */
+
default:
if (reg_required_here (str, 0) == FAIL)
return FAIL;
if (hwse)
- inst.instruction |= add;
+ inst.instruction |= add;
else
- {
- inst.instruction |= add | OFFSET_REG;
- if (skip_past_comma (str) == SUCCESS)
- return decode_shift (str, SHIFT_RESTRICT);
- }
+ {
+ inst.instruction |= add | OFFSET_REG;
+ if (skip_past_comma (str) == SUCCESS)
+ return decode_shift (str, SHIFT_RESTRICT);
+ }
return SUCCESS;
}
@@ -2899,27 +4279,27 @@ do_ldst (str, flags)
/* This is not ideal, but it is the simplest way of dealing with the
ARM7T halfword instructions (since they use a different
- encoding, but the same mnemonic): */
+ encoding, but the same mnemonic): */
halfword = (flags & 0x80000000) != 0;
if (halfword)
{
/* This is actually a load/store of a halfword, or a
- signed-extension load */
- if ((cpu_variant & ARM_HALFWORD) == 0)
- {
- inst.error
+ signed-extension load. */
+ if ((cpu_variant & ARM_EXT_HALFWORD) == 0)
+ {
+ inst.error
= _("Processor does not support halfwords or signed bytes");
- return;
- }
+ return;
+ }
- inst.instruction = (inst.instruction & COND_MASK)
- | (flags & ~COND_MASK);
+ inst.instruction = ((inst.instruction & COND_MASK)
+ | (flags & ~COND_MASK));
flags = 0;
}
skip_whitespace (str);
-
+
if ((conflict_reg = reg_required_here (& str, 12)) == FAIL)
{
if (!inst.error)
@@ -2952,41 +4332,57 @@ do_ldst (str, flags)
if (*str == ']')
{
str ++;
-
+
if (skip_past_comma (&str) == SUCCESS)
{
- /* [Rn],... (post inc) */
+ /* [Rn],... (post inc) */
if (ldst_extend (&str, halfword) == FAIL)
return;
if (conflict_reg)
- as_warn (_("%s register same as write-back base"),
- (inst.instruction & LOAD_BIT) ? _("destination") : _("source") );
+ {
+ if (flags & TRANS_BIT)
+ as_warn (_("Rn and Rd must be different in %s"),
+ ((inst.instruction & LOAD_BIT)
+ ? "LDRT" : "STRT"));
+ else
+ as_warn (_("%s register same as write-back base"),
+ ((inst.instruction & LOAD_BIT)
+ ? _("destination") : _("source")));
+ }
}
else
{
- /* [Rn] */
- if (halfword)
- inst.instruction |= HWOFFSET_IMM;
+ /* [Rn] */
+ if (halfword)
+ inst.instruction |= HWOFFSET_IMM;
- skip_whitespace (str);
+ skip_whitespace (str);
- if (*str == '!')
- {
- if (conflict_reg)
- as_warn (_("%s register same as write-back base"),
- (inst.instruction & LOAD_BIT) ? _("destination") : _("source") );
- str++;
- inst.instruction |= WRITE_BACK;
- }
+ if (*str == '!')
+ {
+ if (conflict_reg)
+ as_warn (_("%s register same as write-back base"),
+ ((inst.instruction & LOAD_BIT)
+ ? _("destination") : _("source")));
+ str++;
+ inst.instruction |= WRITE_BACK;
+ }
flags |= INDEX_UP;
- if (! (flags & TRANS_BIT))
- pre_inc = 1;
+ if (flags & TRANS_BIT)
+ {
+ if (conflict_reg)
+ as_warn (_("Rn and Rd must be different in %s"),
+ ((inst.instruction & LOAD_BIT)
+ ? "LDRT" : "STRT"));
+ }
+ else
+ pre_inc = 1;
}
}
else
{
- /* [Rn,...] */
+ /* [Rn,...] */
if (skip_past_comma (&str) == FAIL)
{
inst.error = _("pre-indexed expression expected");
@@ -3011,7 +4407,8 @@ do_ldst (str, flags)
{
if (conflict_reg)
as_warn (_("%s register same as write-back base"),
- (inst.instruction & LOAD_BIT) ? _("destination") : _("source") );
+ ((inst.instruction & LOAD_BIT)
+ ? _("destination") : _("source")));
str++;
inst.instruction |= WRITE_BACK;
}
@@ -3019,7 +4416,7 @@ do_ldst (str, flags)
}
else if (*str == '=')
{
- /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op */
+ /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */
str++;
skip_whitespace (str);
@@ -3035,36 +4432,36 @@ do_ldst (str, flags)
}
if (inst.reloc.exp.X_op == O_constant
- && (value = validate_immediate(inst.reloc.exp.X_add_number)) != FAIL)
+ && (value = validate_immediate (inst.reloc.exp.X_add_number)) != FAIL)
{
- /* This can be done with a mov instruction */
+ /* This can be done with a mov instruction. */
inst.instruction &= LITERAL_MASK;
inst.instruction |= INST_IMMEDIATE | (OPCODE_MOV << DATA_OP_SHIFT);
inst.instruction |= (flags & COND_MASK) | (value & 0xfff);
- end_of_line(str);
- return;
+ end_of_line (str);
+ return;
}
else
{
- /* Insert into literal pool */
+ /* Insert into literal pool. */
if (add_to_lit_pool () == FAIL)
{
if (!inst.error)
- inst.error = _("literal pool insertion failed");
+ inst.error = _("literal pool insertion failed");
return;
}
- /* Change the instruction exp to point to the pool */
- if (halfword)
- {
- inst.instruction |= HWOFFSET_IMM;
- inst.reloc.type = BFD_RELOC_ARM_HWLITERAL;
- }
- else
+ /* Change the instruction exp to point to the pool. */
+ if (halfword)
+ {
+ inst.instruction |= HWOFFSET_IMM;
+ inst.reloc.type = BFD_RELOC_ARM_HWLITERAL;
+ }
+ else
inst.reloc.type = BFD_RELOC_ARM_LITERAL;
inst.reloc.pc_rel = 1;
inst.instruction |= (REG_PC << 16);
- pre_inc = 1;
+ pre_inc = 1;
}
}
else
@@ -3073,20 +4470,21 @@ do_ldst (str, flags)
return;
if (halfword)
- {
- inst.instruction |= HWOFFSET_IMM;
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
- }
+ {
+ inst.instruction |= HWOFFSET_IMM;
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
+ }
else
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
#ifndef TE_WINCE
- inst.reloc.exp.X_add_number -= 8; /* PC rel adjust */
+ /* PC rel adjust. */
+ inst.reloc.exp.X_add_number -= 8;
#endif
inst.reloc.pc_rel = 1;
inst.instruction |= (REG_PC << 16);
pre_inc = 1;
}
-
+
if (pre_inc && (flags & TRANS_BIT))
inst.error = _("Pre-increment instruction with translate");
@@ -3099,11 +4497,11 @@ static long
reg_list (strp)
char ** strp;
{
- char * str = *strp;
+ char * str = * strp;
long range = 0;
int another_range;
- /* We come back here if we get ranges concatenated by '+' or '|' */
+ /* We come back here if we get ranges concatenated by '+' or '|'. */
do
{
another_range = 0;
@@ -3112,21 +4510,21 @@ reg_list (strp)
{
int in_range = 0;
int cur_reg = -1;
-
+
str++;
do
{
int reg;
-
+
skip_whitespace (str);
if ((reg = reg_required_here (& str, -1)) == FAIL)
return FAIL;
-
+
if (in_range)
{
int i;
-
+
if (reg <= cur_reg)
{
inst.error = _("Bad range in register list");
@@ -3136,7 +4534,7 @@ reg_list (strp)
for (i = cur_reg + 1; i < reg; i++)
{
if (range & (1 << i))
- as_tsktsk
+ as_tsktsk
(_("Warning: Duplicated register (r%d) in register list"),
i);
else
@@ -3153,8 +4551,9 @@ reg_list (strp)
range |= 1 << reg;
cur_reg = reg;
- } while (skip_past_comma (&str) != FAIL
- || (in_range = 1, *str++ == '-'));
+ }
+ while (skip_past_comma (&str) != FAIL
+ || (in_range = 1, *str++ == '-'));
str--;
skip_whitespace (str);
@@ -3173,7 +4572,7 @@ reg_list (strp)
if (expr.X_op == O_constant)
{
- if (expr.X_add_number
+ if (expr.X_add_number
!= (expr.X_add_number & 0x0000ffff))
{
inst.error = _("invalid register mask");
@@ -3186,7 +4585,7 @@ reg_list (strp)
regno &= -regno;
regno = (1 << regno) - 1;
- as_tsktsk
+ as_tsktsk
(_("Warning: Duplicated register (r%d) in register list"),
regno);
}
@@ -3214,7 +4613,8 @@ reg_list (strp)
str++;
another_range = 1;
}
- } while (another_range);
+ }
+ while (another_range);
*strp = str;
return range;
@@ -3222,7 +4622,7 @@ reg_list (strp)
static void
do_ldmstm (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
int base_reg;
@@ -3268,11 +4668,11 @@ do_ldmstm (str, flags)
static void
do_swi (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
-
+
/* Allow optional leading '#'. */
if (is_immediate_prefix (*str))
str++;
@@ -3283,19 +4683,19 @@ do_swi (str, flags)
inst.reloc.type = BFD_RELOC_ARM_SWI;
inst.reloc.pc_rel = 0;
inst.instruction |= flags;
-
+
end_of_line (str);
-
+
return;
}
static void
do_swap (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
int reg;
-
+
skip_whitespace (str);
if ((reg = reg_required_here (&str, 12)) == FAIL)
@@ -3354,20 +4754,20 @@ do_swap (str, flags)
static void
do_branch (str, flags)
- char * str;
+ char * str;
unsigned long flags ATTRIBUTE_UNUSED;
{
if (my_get_expression (&inst.reloc.exp, &str))
return;
-
+
#ifdef OBJ_ELF
{
char * save_in;
-
- /* ScottB: February 5, 1998 */
- /* Check to see of PLT32 reloc required for the instruction. */
-
- /* arm_parse_reloc() works on input_line_pointer.
+
+ /* ScottB: February 5, 1998 - Check to see of PLT32 reloc
+ required for the instruction. */
+
+ /* arm_parse_reloc () works on input_line_pointer.
We actually want to parse the operands to the branch instruction
passed in 'str'. Save the input pointer and restore it later. */
save_in = input_line_pointer;
@@ -3392,15 +4792,15 @@ do_branch (str, flags)
#else
inst.reloc.type = BFD_RELOC_ARM_PCREL_BRANCH;
inst.reloc.pc_rel = 1;
-#endif /* OBJ_ELF */
-
+#endif /* OBJ_ELF */
+
end_of_line (str);
return;
}
static void
do_bx (str, flags)
- char * str;
+ char * str;
unsigned long flags ATTRIBUTE_UNUSED;
{
int reg;
@@ -3413,15 +4813,16 @@ do_bx (str, flags)
return;
}
+ /* Note - it is not illegal to do a "bx pc". Useless, but not illegal. */
if (reg == REG_PC)
- inst.error = BAD_PC;
+ as_tsktsk (_("Use of r15 in bx in ARM mode is not really useful"));
end_of_line (str);
}
static void
do_cdp (str, flags)
- char * str;
+ char * str;
unsigned long flags ATTRIBUTE_UNUSED;
{
/* Co-processor data operation.
@@ -3483,7 +4884,7 @@ do_cdp (str, flags)
static void
do_lstc (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
/* Co-processor register load/store.
@@ -3521,7 +4922,7 @@ do_lstc (str, flags)
static void
do_co_reg (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
/* Co-processor register transfer.
@@ -3588,7 +4989,7 @@ do_co_reg (str, flags)
static void
do_fp_ctrl (str, flags)
- char * str;
+ char * str;
unsigned long flags ATTRIBUTE_UNUSED;
{
/* FP control registers.
@@ -3609,7 +5010,7 @@ do_fp_ctrl (str, flags)
static void
do_fp_ldst (str, flags)
- char * str;
+ char * str;
unsigned long flags ATTRIBUTE_UNUSED;
{
skip_whitespace (str);
@@ -3651,7 +5052,7 @@ do_fp_ldst (str, flags)
static void
do_fp_ldmstm (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
int num_regs;
@@ -3665,7 +5066,7 @@ do_fp_ldmstm (str, flags)
return;
}
- /* Get Number of registers to transfer */
+ /* Get Number of registers to transfer. */
if (skip_past_comma (&str) == FAIL
|| my_get_expression (&inst.reloc.exp, &str))
{
@@ -3744,7 +5145,8 @@ do_fp_ldmstm (str, flags)
str++;
if (reg == REG_PC)
{
- inst.error = _("R15 not allowed as base register with write-back");
+ inst.error =
+ _("R15 not allowed as base register with write-back");
return;
}
}
@@ -3753,14 +5155,14 @@ do_fp_ldmstm (str, flags)
if (flags & CP_T_Pre)
{
- /* Pre-decrement */
+ /* Pre-decrement. */
offset = 3 * num_regs;
if (write_back)
flags |= CP_T_WB;
}
else
{
- /* Post-increment */
+ /* Post-increment. */
if (write_back)
{
flags |= CP_T_WB;
@@ -3790,7 +5192,7 @@ do_fp_ldmstm (str, flags)
static void
do_fp_dyadic (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
@@ -3839,7 +5241,7 @@ do_fp_dyadic (str, flags)
static void
do_fp_monadic (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
@@ -3880,7 +5282,7 @@ do_fp_monadic (str, flags)
static void
do_fp_cmp (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
@@ -3907,7 +5309,7 @@ do_fp_cmp (str, flags)
static void
do_fp_from_reg (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
@@ -3948,7 +5350,7 @@ do_fp_from_reg (str, flags)
static void
do_fp_to_reg (str, flags)
- char * str;
+ char * str;
unsigned long flags;
{
skip_whitespace (str);
@@ -3969,13 +5371,14 @@ do_fp_to_reg (str, flags)
return;
}
-/* Thumb specific routines */
+/* Thumb specific routines. */
/* Parse and validate that a register is of the right form, this saves
- repeated checking of this information in many similar cases.
- Unlike the 32-bit case we do not insert the register into the opcode
- here, since the position is often unknown until the full instruction
+ repeated checking of this information in many similar cases.
+ Unlike the 32-bit case we do not insert the register into the opcode
+ here, since the position is often unknown until the full instruction
has been parsed. */
+
static int
thumb_reg (strp, hi_lo)
char ** strp;
@@ -4013,6 +5416,7 @@ thumb_reg (strp, hi_lo)
/* Parse an add or subtract instruction, SUBTRACT is non-zero if the opcode
was SUB. */
+
static void
thumb_add_sub (str, subtract)
char * str;
@@ -4044,8 +5448,8 @@ thumb_add_sub (str, subtract)
if (skip_past_comma (&str) == FAIL)
{
- /* Two operand format, shuffle the registers and pretend there
- are 3 */
+ /* Two operand format, shuffle the registers
+ and pretend there are 3. */
Rn = Rs;
Rs = Rd;
}
@@ -4060,7 +5464,7 @@ thumb_add_sub (str, subtract)
}
/* We now have Rd and Rs set to registers, and Rn set to a register or FAIL;
- for the latter case, EXPR contains the immediate that was found. */
+ for the latter case, EXPR contains the immediate that was found. */
if (Rn != FAIL)
{
/* All register format. */
@@ -4072,7 +5476,7 @@ thumb_add_sub (str, subtract)
return;
}
- /* Can't do this for SUB */
+ /* Can't do this for SUB. */
if (subtract)
{
inst.error = _("subtract valid only on lo regs");
@@ -4106,7 +5510,7 @@ thumb_add_sub (str, subtract)
if (inst.reloc.exp.X_op != O_constant)
{
/* Value isn't known yet, all we can do is store all the fragments
- we know about in the instruction and let the reloc hacking
+ we know about in the instruction and let the reloc hacking
work it all out. */
inst.instruction = (subtract ? 0x8000 : 0) | (Rd << 4) | Rs;
inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD;
@@ -4123,7 +5527,7 @@ thumb_add_sub (str, subtract)
offset = -offset;
subtract = 1;
- /* Quick check, in case offset is MIN_INT */
+ /* Quick check, in case offset is MIN_INT. */
if (offset < 0)
{
inst.error = _("immediate value out of range");
@@ -4177,7 +5581,7 @@ thumb_add_sub (str, subtract)
}
}
}
-
+
end_of_line (str);
}
@@ -4208,13 +5612,13 @@ thumb_shift (str, shift)
}
else
{
- if ((Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
+ if ((Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
return;
if (skip_past_comma (&str) == FAIL)
{
- /* Two operand format, shuffle the registers and pretend there
- are 3 */
+ /* Two operand format, shuffle the registers
+ and pretend there are 3. */
Rn = Rs;
Rs = Rd;
}
@@ -4229,7 +5633,7 @@ thumb_shift (str, shift)
}
/* We now have Rd and Rs set to registers, and Rn set to a register or FAIL;
- for the latter case, EXPR contains the immediate that was found. */
+ for the latter case, EXPR contains the immediate that was found. */
if (Rn != FAIL)
{
@@ -4260,8 +5664,7 @@ thumb_shift (str, shift)
if (inst.reloc.exp.X_op != O_constant)
{
/* Value isn't known yet, create a dummy reloc and let reloc
- hacking fix it up */
-
+ hacking fix it up. */
inst.reloc.type = BFD_RELOC_ARM_THUMB_SHIFT;
}
else
@@ -4274,11 +5677,11 @@ thumb_shift (str, shift)
return;
}
- /* Shifts of zero are handled by converting to LSL */
+ /* Shifts of zero are handled by converting to LSL. */
if (shift_value == 0)
inst.instruction = T_OPCODE_LSL_I;
- /* Shifts of 32 are encoded as a shift of zero */
+ /* Shifts of 32 are encoded as a shift of zero. */
if (shift_value == 32)
shift_value = 0;
@@ -4287,7 +5690,7 @@ thumb_shift (str, shift)
inst.instruction |= Rd | (Rs << 3);
}
-
+
end_of_line (str);
}
@@ -4323,7 +5726,7 @@ thumb_mov_compare (str, move)
{
if (move == THUMB_MOVE)
/* A move of two lowregs is encoded as ADD Rd, Rs, #0
- since a MOV instruction produces unpredictable results */
+ since a MOV instruction produces unpredictable results. */
inst.instruction = T_OPCODE_ADD_I3;
else
inst.instruction = T_OPCODE_CMP_LR;
@@ -4429,7 +5832,7 @@ thumb_load_store (str, load_store, size)
}
else if (*str == '=')
{
- /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op */
+ /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */
str++;
skip_whitespace (str);
@@ -4438,7 +5841,7 @@ thumb_load_store (str, load_store, size)
return;
end_of_line (str);
-
+
if ( inst.reloc.exp.X_op != O_constant
&& inst.reloc.exp.X_op != O_symbol)
{
@@ -4449,25 +5852,26 @@ thumb_load_store (str, load_store, size)
if (inst.reloc.exp.X_op == O_constant
&& ((inst.reloc.exp.X_add_number & ~0xFF) == 0))
{
- /* This can be done with a mov instruction */
+ /* This can be done with a mov instruction. */
inst.instruction = T_OPCODE_MOV_I8 | (Rd << 8);
inst.instruction |= inst.reloc.exp.X_add_number;
- return;
+ return;
}
- /* Insert into literal pool */
+ /* Insert into literal pool. */
if (add_to_lit_pool () == FAIL)
{
if (!inst.error)
- inst.error = "literal pool insertion failed";
+ inst.error = "literal pool insertion failed";
return;
}
inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
inst.reloc.pc_rel = 1;
inst.instruction = T_OPCODE_LDR_PC | (Rd << 8);
- inst.reloc.exp.X_add_number += 4; /* Adjust ARM pipeline offset to Thumb */
+ /* Adjust ARM pipeline offset to Thumb. */
+ inst.reloc.exp.X_add_number += 4;
return;
}
@@ -4478,7 +5882,7 @@ thumb_load_store (str, load_store, size)
inst.instruction = T_OPCODE_LDR_PC | (Rd << 8);
inst.reloc.pc_rel = 1;
- inst.reloc.exp.X_add_number -= 4; /* Pipeline offset */
+ inst.reloc.exp.X_add_number -= 4; /* Pipeline offset. */
inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
end_of_line (str);
return;
@@ -4532,7 +5936,7 @@ thumb_load_store (str, load_store, size)
}
else if (Ro == FAIL)
{
- /* Immediate offset */
+ /* Immediate offset. */
if (size == THUMB_WORD)
inst.instruction = (load_store == THUMB_LOAD
? T_OPCODE_LDR_IW : T_OPCODE_STR_IW);
@@ -4548,7 +5952,7 @@ thumb_load_store (str, load_store, size)
if (inst.reloc.exp.X_op == O_constant)
{
unsigned offset = inst.reloc.exp.X_add_number;
-
+
if (offset & ~(0x1f << size))
{
inst.error = _("Invalid offset");
@@ -4561,7 +5965,7 @@ thumb_load_store (str, load_store, size)
}
else
{
- /* Register offset */
+ /* Register offset. */
if (size == THUMB_WORD)
inst.instruction = (load_store == THUMB_LOAD
? T_OPCODE_LDR_RW : T_OPCODE_STR_RW);
@@ -4582,14 +5986,15 @@ static void
do_t_nop (str)
char * str;
{
- /* Do nothing */
+ /* Do nothing. */
end_of_line (str);
return;
}
-/* Handle the Format 4 instructions that do not have equivalents in other
+/* Handle the Format 4 instructions that do not have equivalents in other
formats. That is, ADC, AND, EOR, SBC, ROR, TST, NEG, CMN, ORR, MUL,
BIC and MVN. */
+
static void
do_t_arit (str)
char * str;
@@ -4602,8 +6007,8 @@ do_t_arit (str)
|| skip_past_comma (&str) == FAIL
|| (Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
{
- inst.error = BAD_ARGS;
- return;
+ inst.error = BAD_ARGS;
+ return;
}
if (skip_past_comma (&str) != FAIL)
@@ -4614,7 +6019,7 @@ do_t_arit (str)
if (inst.instruction == T_OPCODE_TST
|| inst.instruction == T_OPCODE_CMN
|| inst.instruction == T_OPCODE_NEG
- || inst.instruction == T_OPCODE_MVN)
+ || inst.instruction == T_OPCODE_MVN)
{
inst.error = BAD_ARGS;
return;
@@ -4625,7 +6030,7 @@ do_t_arit (str)
if (Rs != Rd)
{
- inst.error = _("dest and source1 one must be the same register");
+ inst.error = _("dest and source1 must be the same register");
return;
}
Rs = Rn;
@@ -4685,23 +6090,23 @@ find_real_start (symbolP)
const char * name = S_GET_NAME (symbolP);
symbolS * new_target;
- /* This definiton must agree with the one in gcc/config/arm/thumb.c */
+ /* This definiton must agree with the one in gcc/config/arm/thumb.c. */
#define STUB_NAME ".real_start_of"
if (name == NULL)
- abort();
+ abort ();
/* Names that start with '.' are local labels, not function entry points.
The compiler may generate BL instructions to these labels because it
needs to perform a branch to a far away location. */
if (name[0] == '.')
return symbolP;
-
+
real_start = malloc (strlen (name) + strlen (STUB_NAME) + 1);
sprintf (real_start, "%s%s", STUB_NAME, name);
new_target = symbol_find (real_start);
-
+
if (new_target == NULL)
{
as_warn ("Failed to find real start of function: %s\n", name);
@@ -4713,14 +6118,13 @@ find_real_start (symbolP)
return new_target;
}
-
static void
do_t_branch23 (str)
char * str;
{
if (my_get_expression (& inst.reloc.exp, & str))
return;
-
+
inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23;
inst.reloc.pc_rel = 1;
end_of_line (str);
@@ -4733,7 +6137,8 @@ do_t_branch23 (str)
&& inst.reloc.exp.X_add_symbol != NULL
&& S_IS_DEFINED (inst.reloc.exp.X_add_symbol)
&& ! THUMB_IS_FUNC (inst.reloc.exp.X_add_symbol))
- inst.reloc.exp.X_add_symbol = find_real_start (inst.reloc.exp.X_add_symbol);
+ inst.reloc.exp.X_add_symbol =
+ find_real_start (inst.reloc.exp.X_add_symbol);
}
static void
@@ -4791,7 +6196,7 @@ do_t_ldmstm (str)
if (inst.reloc.type != BFD_RELOC_NONE)
{
- /* This really doesn't seem worth it. */
+ /* This really doesn't seem worth it. */
inst.reloc.type = BFD_RELOC_NONE;
inst.error = _("Expression too complex");
return;
@@ -4891,7 +6296,7 @@ do_t_push_pop (str)
if (inst.reloc.type != BFD_RELOC_NONE)
{
- /* This really doesn't seem worth it. */
+ /* This really doesn't seem worth it. */
inst.reloc.type = BFD_RELOC_NONE;
inst.error = _("Expression too complex");
return;
@@ -4985,7 +6390,7 @@ do_t_adr (str)
inst.reloc.exp.X_add_number -= 4; /* PC relative adjust. */
inst.reloc.pc_rel = 1;
inst.instruction |= REG_PC; /* Rd is already placed into the instruction. */
-
+
end_of_line (str);
}
@@ -4993,10 +6398,10 @@ static void
insert_reg (entry)
int entry;
{
- int len = strlen (reg_table[entry].name) + 2;
- char * buf = (char *) xmalloc (len);
+ int len = strlen (reg_table[entry].name) + 2;
+ char * buf = (char *) xmalloc (len);
char * buf2 = (char *) xmalloc (len);
- int i = 0;
+ int i = 0;
#ifdef REGISTER_PREFIX
buf[i++] = REGISTER_PREFIX;
@@ -5009,8 +6414,8 @@ insert_reg (entry)
buf2[i] = '\0';
- hash_insert (arm_reg_hsh, buf, (PTR) &reg_table[entry]);
- hash_insert (arm_reg_hsh, buf2, (PTR) &reg_table[entry]);
+ hash_insert (arm_reg_hsh, buf, (PTR) & reg_table[entry]);
+ hash_insert (arm_reg_hsh, buf2, (PTR) & reg_table[entry]);
}
static void
@@ -5019,7 +6424,7 @@ insert_reg_alias (str, regnum)
int regnum;
{
struct reg_entry *new =
- (struct reg_entry *)xmalloc (sizeof (struct reg_entry));
+ (struct reg_entry *) xmalloc (sizeof (struct reg_entry));
char *name = xmalloc (strlen (str) + 1);
strcpy (name, str);
@@ -5035,7 +6440,7 @@ set_constant_flonums ()
int i;
for (i = 0; i < NUM_FLOAT_VALS; i++)
- if (atof_ieee ((char *)fp_const[i], 'x', fp_values[i]) == NULL)
+ if (atof_ieee ((char *) fp_const[i], 'x', fp_values[i]) == NULL)
abort ();
}
@@ -5044,7 +6449,7 @@ md_begin ()
{
unsigned mach;
unsigned int i;
-
+
if ( (arm_ops_hsh = hash_new ()) == NULL
|| (arm_tops_hsh = hash_new ()) == NULL
|| (arm_cond_hsh = hash_new ()) == NULL
@@ -5052,15 +6457,15 @@ md_begin ()
|| (arm_reg_hsh = hash_new ()) == NULL
|| (arm_psr_hsh = hash_new ()) == NULL)
as_fatal (_("Virtual memory exhausted"));
-
+
for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++)
hash_insert (arm_ops_hsh, insns[i].template, (PTR) (insns + i));
for (i = 0; i < sizeof (tinsns) / sizeof (struct thumb_opcode); i++)
hash_insert (arm_tops_hsh, tinsns[i].template, (PTR) (tinsns + i));
for (i = 0; i < sizeof (conds) / sizeof (struct asm_cond); i++)
hash_insert (arm_cond_hsh, conds[i].template, (PTR) (conds + i));
- for (i = 0; i < sizeof (shift) / sizeof (struct asm_shift); i++)
- hash_insert (arm_shift_hsh, shift[i].template, (PTR) (shift + i));
+ for (i = 0; i < sizeof (shift_names) / sizeof (struct asm_shift_name); i++)
+ hash_insert (arm_shift_hsh, shift_names[i].name, (PTR) (shift_names + i));
for (i = 0; i < sizeof (psrs) / sizeof (struct asm_psr); i++)
hash_insert (arm_psr_hsh, psrs[i].template, (PTR) (psrs + i));
@@ -5072,7 +6477,7 @@ md_begin ()
#if defined OBJ_COFF || defined OBJ_ELF
{
unsigned int flags = 0;
-
+
/* Set the flags in the private structure. */
if (uses_apcs_26) flags |= F_APCS26;
if (support_interwork) flags |= F_INTERWORK;
@@ -5081,45 +6486,70 @@ md_begin ()
if ((cpu_variant & FPU_ALL) == FPU_NONE) flags |= F_SOFT_FLOAT;
bfd_set_private_flags (stdoutput, flags);
+
+ /* We have run out flags in the COFF header to encode the
+ status of ATPCS support, so instead we create a dummy,
+ empty, debug section called .arm.atpcs. */
+ if (atpcs)
+ {
+ asection * sec;
+
+ sec = bfd_make_section (stdoutput, ".arm.atpcs");
+
+ if (sec != NULL)
+ {
+ bfd_set_section_flags
+ (stdoutput, sec, SEC_READONLY | SEC_DEBUGGING /* | SEC_HAS_CONTENTS */);
+ bfd_set_section_size (stdoutput, sec, 0);
+ bfd_set_section_contents (stdoutput, sec, NULL, 0, 0);
+ }
+ }
}
#endif
-
+
/* Record the CPU type as well. */
switch (cpu_variant & ARM_CPU_MASK)
{
case ARM_2:
mach = bfd_mach_arm_2;
break;
-
+
case ARM_3: /* Also ARM_250. */
mach = bfd_mach_arm_2a;
break;
-
+
default:
case ARM_6 | ARM_3 | ARM_2: /* Actually no CPU type defined. */
mach = bfd_mach_arm_4;
break;
-
+
case ARM_7: /* Also ARM_6. */
mach = bfd_mach_arm_3;
break;
}
-
+
/* Catch special cases. */
- if (cpu_variant != (FPU_DEFAULT | CPU_DEFAULT))
+ if (cpu_variant & ARM_EXT_XSCALE)
+ mach = bfd_mach_arm_XScale;
+ else if (cpu_variant & ARM_EXT_V5E)
+ mach = bfd_mach_arm_5TE;
+ else if (cpu_variant & ARM_EXT_V5)
{
- if (cpu_variant & (ARM_EXT_V5 & ARM_THUMB))
+ if (cpu_variant & ARM_EXT_THUMB)
mach = bfd_mach_arm_5T;
- else if (cpu_variant & ARM_EXT_V5)
+ else
mach = bfd_mach_arm_5;
- else if (cpu_variant & ARM_THUMB)
+ }
+ else if (cpu_variant & ARM_EXT_HALFWORD)
+ {
+ if (cpu_variant & ARM_EXT_THUMB)
mach = bfd_mach_arm_4T;
- else if ((cpu_variant & ARM_ARCH_V4) == ARM_ARCH_V4)
+ else
mach = bfd_mach_arm_4;
- else if (cpu_variant & ARM_LONGMUL)
- mach = bfd_mach_arm_3M;
}
-
+ else if (cpu_variant & ARM_EXT_LONGMUL)
+ mach = bfd_mach_arm_3M;
+
bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach);
}
@@ -5129,6 +6559,7 @@ md_begin ()
THE RIGHT THING, whatever it is. Possible values for n are 1 (byte)
2 (short) and 4 (long) Floating numbers are put out as a series of
LITTLENUMS (shorts, here at least). */
+
void
md_number_to_chars (buf, val, n)
char * buf;
@@ -5141,10 +6572,10 @@ md_number_to_chars (buf, val, n)
number_to_chars_littleendian (buf, val, n);
}
-static valueT
+static valueT
md_chars_to_number (buf, n)
char * buf;
- int n;
+ int n;
{
valueT result = 0;
unsigned char * where = (unsigned char *) buf;
@@ -5170,8 +6601,8 @@ md_chars_to_number (buf, n)
}
/* Turn a string in input_line_pointer into a floating point constant
- of type TYPE, and store the appropriate bytes in *litP. The number
- of LITTLENUMS emitted is stored in *sizeP . An error message is
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK.
Note that fp constants aren't represent in the normal way on the ARM.
@@ -5253,16 +6684,18 @@ md_atof (type, litP, sizeP)
return 0;
}
-/* The knowledge of the PC's pipeline offset is built into the insns themselves. */
+/* The knowledge of the PC's pipeline offset is built into the insns
+ themselves. */
+
long
md_pcrel_from (fixP)
fixS * fixP;
{
- if ( fixP->fx_addsy
+ if (fixP->fx_addsy
&& S_GET_SEGMENT (fixP->fx_addsy) == undefined_section
&& fixP->fx_subsy == NULL)
return 0;
-
+
if (fixP->fx_pcrel && (fixP->fx_r_type == BFD_RELOC_ARM_THUMB_ADD))
{
/* PC relative addressing on the Thumb is slightly odd
@@ -5280,7 +6713,8 @@ md_pcrel_from (fixP)
#endif
}
-/* Round up a section size to the appropriate boundary. */
+/* Round up a section size to the appropriate boundary. */
+
valueT
md_section_align (segment, size)
segT segment ATTRIBUTE_UNUSED;
@@ -5289,15 +6723,14 @@ md_section_align (segment, size)
#ifdef OBJ_ELF
return size;
#else
- /* Round all sects to multiple of 4 */
+ /* Round all sects to multiple of 4. */
return (size + 3) & ~3;
#endif
}
-/* Under ELF we need to default _GLOBAL_OFFSET_TABLE. Otherwise
- we have no need to default values of symbols. */
+/* Under ELF we need to default _GLOBAL_OFFSET_TABLE.
+ Otherwise we have no need to default values of symbols. */
-/* ARGSUSED */
symbolS *
md_undefined_symbol (name)
char * name ATTRIBUTE_UNUSED;
@@ -5310,20 +6743,20 @@ md_undefined_symbol (name)
{
if (symbol_find (name))
as_bad ("GOT already in the symbol table");
-
+
GOT_symbol = symbol_new (name, undefined_section,
- (valueT)0, & zero_address_frag);
+ (valueT) 0, & zero_address_frag);
}
-
+
return GOT_symbol;
}
#endif
-
+
return 0;
}
-/* arm_reg_parse () := if it looks like a register, return its token and
- advance the pointer. */
+/* arm_reg_parse () := if it looks like a register, return its token and
+ advance the pointer. */
static int
arm_reg_parse (ccp)
@@ -5355,7 +6788,7 @@ arm_reg_parse (ccp)
*--p = 0;
reg = (struct reg_entry *) hash_find (arm_reg_hsh, start);
*p = c;
-
+
if (reg)
{
*ccp = p;
@@ -5367,9 +6800,9 @@ arm_reg_parse (ccp)
int
md_apply_fix3 (fixP, val, seg)
- fixS * fixP;
- valueT * val;
- segT seg;
+ fixS * fixP;
+ valueT * val;
+ segT seg;
{
offsetT value = * val;
offsetT newval;
@@ -5382,7 +6815,9 @@ md_apply_fix3 (fixP, val, seg)
assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
/* Note whether this will delete the relocation. */
-#if 0 /* patch from REarnshaw to JDavis (disabled for the moment, since it doesn't work fully) */
+#if 0
+ /* Patch from REarnshaw to JDavis (disabled for the moment, since it
+ doesn't work fully.) */
if ((fixP->fx_addsy == 0 || symbol_constant_p (fixP->fx_addsy))
&& !fixP->fx_pcrel)
#else
@@ -5401,14 +6836,16 @@ md_apply_fix3 (fixP, val, seg)
{
if (target_oabi
&& (fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH
- ))
+ || fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BLX
+ ))
value = 0;
else
value += md_pcrel_from (fixP);
}
}
- fixP->fx_addnumber = value; /* Remember value for emit_reloc. */
+ /* Remember value for emit_reloc. */
+ fixP->fx_addnumber = value;
switch (fixP->fx_r_type)
{
@@ -5434,7 +6871,7 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_ARM_ADRL_IMMEDIATE:
{
unsigned int highpart = 0;
- unsigned int newinsn = 0xe1a00000; /* nop */
+ unsigned int newinsn = 0xe1a00000; /* nop. */
newimm = validate_immediate (value);
temp = md_chars_to_number (buf, INSN_SIZE);
@@ -5443,26 +6880,30 @@ md_apply_fix3 (fixP, val, seg)
if (newimm == (unsigned int) FAIL
&& (newimm = negate_data_op (& temp, value)) == (unsigned int) FAIL)
{
- /* No ? OK - try using two ADD instructions to generate the value. */
+ /* No ? OK - try using two ADD instructions to generate
+ the value. */
newimm = validate_immediate_twopart (value, & highpart);
- /* Yes - then make sure that the second instruction is also an add. */
+ /* Yes - then make sure that the second instruction is
+ also an add. */
if (newimm != (unsigned int) FAIL)
newinsn = temp;
/* Still No ? Try using a negated value. */
else if ((newimm = validate_immediate_twopart (- value, & highpart)) != (unsigned int) FAIL)
- temp = newinsn = (temp & OPCODE_MASK) | OPCODE_SUB << DATA_OP_SHIFT;
+ temp = newinsn = (temp & OPCODE_MASK) | OPCODE_SUB << DATA_OP_SHIFT;
/* Otherwise - give up. */
else
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Unable to compute ADRL instructions for PC offset of 0x%x"), value);
+ _("Unable to compute ADRL instructions for PC offset of 0x%lx"),
+ value);
break;
}
- /* Replace the first operand in the 2nd instruction (which is the PC)
- with the destination register. We have already added in the PC in the
- first instruction and we do not want to do it again. */
+ /* Replace the first operand in the 2nd instruction (which
+ is the PC) with the destination register. We have
+ already added in the PC in the first instruction and we
+ do not want to do it again. */
newinsn &= ~ 0xf0000;
newinsn |= ((newinsn & 0x0f000) << 4);
}
@@ -5477,16 +6918,17 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_ARM_OFFSET_IMM:
sign = value >= 0;
-
+
if (value < 0)
value = - value;
-
+
if (validate_offset_imm (value, 0) == FAIL)
- {
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("bad immediate value for offset (%ld)"), (long) value);
- break;
- }
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("bad immediate value for offset (%ld)"),
+ (long) value);
+ break;
+ }
newval = md_chars_to_number (buf, INSN_SIZE);
newval &= 0xff7ff000;
@@ -5494,23 +6936,23 @@ md_apply_fix3 (fixP, val, seg)
md_number_to_chars (buf, newval, INSN_SIZE);
break;
- case BFD_RELOC_ARM_OFFSET_IMM8:
- case BFD_RELOC_ARM_HWLITERAL:
+ case BFD_RELOC_ARM_OFFSET_IMM8:
+ case BFD_RELOC_ARM_HWLITERAL:
sign = value >= 0;
-
+
if (value < 0)
value = - value;
if (validate_offset_imm (value, 1) == FAIL)
- {
- if (fixP->fx_r_type == BFD_RELOC_ARM_HWLITERAL)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid literal constant: pool needs to be closer"));
- else
- as_bad (_("bad immediate value for half-word offset (%ld)"),
+ {
+ if (fixP->fx_r_type == BFD_RELOC_ARM_HWLITERAL)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("invalid literal constant: pool needs to be closer"));
+ else
+ as_bad (_("bad immediate value for half-word offset (%ld)"),
(long) value);
- break;
- }
+ break;
+ }
newval = md_chars_to_number (buf, INSN_SIZE);
newval &= 0xff7ff0f0;
@@ -5520,13 +6962,13 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_ARM_LITERAL:
sign = value >= 0;
-
+
if (value < 0)
value = - value;
if (validate_offset_imm (value, 0) == FAIL)
{
- as_bad_where (fixP->fx_file, fixP->fx_line,
+ as_bad_where (fixP->fx_file, fixP->fx_line,
_("invalid literal constant: pool needs to be closer"));
break;
}
@@ -5540,7 +6982,7 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_ARM_SHIFT_IMM:
newval = md_chars_to_number (buf, INSN_SIZE);
if (((unsigned long) value) > 32
- || (value == 32
+ || (value == 32
&& (((newval & 0x60) == 0) || (newval & 0x60) == 0x60)))
{
as_bad_where (fixP->fx_file, fixP->fx_line,
@@ -5549,12 +6991,13 @@ md_apply_fix3 (fixP, val, seg)
}
if (value == 0)
- newval &= ~0x60; /* Shifts of zero must be done as lsl */
+ /* Shifts of zero must be done as lsl. */
+ newval &= ~0x60;
else if (value == 32)
value = 0;
newval &= 0xfffff07f;
newval |= (value & 0x1f) << 7;
- md_number_to_chars (buf, newval , INSN_SIZE);
+ md_number_to_chars (buf, newval, INSN_SIZE);
break;
case BFD_RELOC_ARM_SWI:
@@ -5570,11 +7013,11 @@ md_apply_fix3 (fixP, val, seg)
else
{
if (((unsigned long) value) > 0x00ffffff)
- as_bad_where (fixP->fx_file, fixP->fx_line,
+ as_bad_where (fixP->fx_file, fixP->fx_line,
_("Invalid swi expression"));
newval = md_chars_to_number (buf, INSN_SIZE) & 0xff000000;
newval |= value;
- md_number_to_chars (buf, newval , INSN_SIZE);
+ md_number_to_chars (buf, newval, INSN_SIZE);
}
break;
@@ -5601,8 +7044,8 @@ md_apply_fix3 (fixP, val, seg)
instruction, in a 24 bit, signed field. Thus we need to check
that none of the top 8 bits of the shifted value (top 7 bits of
the unshifted, unsigned value) are set, or that they are all set. */
- if ((value & 0xfe000000UL) != 0
- && ((value & 0xfe000000UL) != 0xfe000000UL))
+ if ((value & ~ ((offsetT) 0x1ffffff)) != 0
+ && ((value & ~ ((offsetT) 0x1ffffff)) != ~ ((offsetT) 0x1ffffff)))
{
#ifdef OBJ_ELF
/* Normally we would be stuck at this point, since we cannot store
@@ -5611,7 +7054,7 @@ md_apply_fix3 (fixP, val, seg)
that the destination of the branch is in the same section as the
branch instruciton itself, then we can compute the relocation for
ourselves and not have to bother the linker with it.
-
+
FIXME: The tests for OBJ_ELF and ! target_oabi are only here
because I have not worked out how to do this for OBJ_COFF or
target_oabi. */
@@ -5623,13 +7066,14 @@ md_apply_fix3 (fixP, val, seg)
/* Get pc relative value to go into the branch. */
value = * val;
- /* Permit a backward branch provided that enough bits are set.
- Allow a forwards branch, provided that enough bits are clear. */
- if ((value & 0xfe000000UL) == 0xfe000000UL
- || (value & 0xfe000000UL) == 0)
+ /* Permit a backward branch provided that enough bits
+ are set. Allow a forwards branch, provided that
+ enough bits are clear. */
+ if ( (value & ~ ((offsetT) 0x1ffffff)) == ~ ((offsetT) 0x1ffffff)
+ || (value & ~ ((offsetT) 0x1ffffff)) == 0)
fixP->fx_done = 1;
}
-
+
if (! fixP->fx_done)
#endif
as_bad_where (fixP->fx_file, fixP->fx_line,
@@ -5638,71 +7082,97 @@ md_apply_fix3 (fixP, val, seg)
value >>= 2;
value += SEXT24 (newval);
-
- if ((value & 0xff000000UL) != 0
- && ((value & 0xff000000UL) != 0xff000000UL))
+
+ if ( (value & ~ ((offsetT) 0xffffff)) != 0
+ && ((value & ~ ((offsetT) 0xffffff)) != ~ ((offsetT) 0xffffff)))
as_bad_where (fixP->fx_file, fixP->fx_line,
_("out of range branch"));
-
+
newval = (value & 0x00ffffff) | (newval & 0xff000000);
md_number_to_chars (buf, newval, INSN_SIZE);
break;
+ case BFD_RELOC_ARM_PCREL_BLX:
+ {
+ offsetT hbit;
+ newval = md_chars_to_number (buf, INSN_SIZE);
- case BFD_RELOC_THUMB_PCREL_BRANCH9: /* conditional branch */
+#ifdef OBJ_ELF
+ if (! target_oabi)
+ value = fixP->fx_offset;
+#endif
+ hbit = (value >> 1) & 1;
+ value = (value >> 2) & 0x00ffffff;
+ value = (value + (newval & 0x00ffffff)) & 0x00ffffff;
+ newval = value | (newval & 0xfe000000) | (hbit << 24);
+ md_number_to_chars (buf, newval, INSN_SIZE);
+ }
+ break;
+
+ case BFD_RELOC_THUMB_PCREL_BRANCH9: /* Conditional branch. */
newval = md_chars_to_number (buf, THUMB_SIZE);
{
- addressT diff = (newval & 0xff) << 1;
- if (diff & 0x100)
- diff |= ~0xff;
-
- value += diff;
- if ((value & ~0xff) && ((value & ~0xff) != ~0xff))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Branch out of range"));
- newval = (newval & 0xff00) | ((value & 0x1ff) >> 1);
+ addressT diff = (newval & 0xff) << 1;
+ if (diff & 0x100)
+ diff |= ~0xff;
+
+ value += diff;
+ if ((value & ~0xff) && ((value & ~0xff) != ~0xff))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Branch out of range"));
+ newval = (newval & 0xff00) | ((value & 0x1ff) >> 1);
}
md_number_to_chars (buf, newval, THUMB_SIZE);
break;
- case BFD_RELOC_THUMB_PCREL_BRANCH12: /* unconditional branch */
+ case BFD_RELOC_THUMB_PCREL_BRANCH12: /* Unconditional branch. */
newval = md_chars_to_number (buf, THUMB_SIZE);
{
- addressT diff = (newval & 0x7ff) << 1;
- if (diff & 0x800)
- diff |= ~0x7ff;
-
- value += diff;
- if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Branch out of range"));
- newval = (newval & 0xf800) | ((value & 0xfff) >> 1);
+ addressT diff = (newval & 0x7ff) << 1;
+ if (diff & 0x800)
+ diff |= ~0x7ff;
+
+ value += diff;
+ if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Branch out of range"));
+ newval = (newval & 0xf800) | ((value & 0xfff) >> 1);
}
md_number_to_chars (buf, newval, THUMB_SIZE);
break;
+ case BFD_RELOC_THUMB_PCREL_BLX:
case BFD_RELOC_THUMB_PCREL_BRANCH23:
{
- offsetT newval2;
- addressT diff;
+ offsetT newval2;
+ addressT diff;
newval = md_chars_to_number (buf, THUMB_SIZE);
- newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE);
- diff = ((newval & 0x7ff) << 12) | ((newval2 & 0x7ff) << 1);
- if (diff & 0x400000)
+ newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE);
+ diff = ((newval & 0x7ff) << 12) | ((newval2 & 0x7ff) << 1);
+ if (diff & 0x400000)
diff |= ~0x3fffff;
#ifdef OBJ_ELF
value = fixP->fx_offset;
#endif
- value += diff;
- if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff))
+ value += diff;
+ if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff))
as_bad_where (fixP->fx_file, fixP->fx_line,
_("Branch with link out of range"));
- newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12);
- newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1);
- md_number_to_chars (buf, newval, THUMB_SIZE);
- md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE);
+ newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12);
+ newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1);
+ if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX)
+ /* Remove bit zero of the adjusted offset. Bit zero can only be
+ set if the upper insn is at a half-word boundary, since the
+ destination address, an ARM instruction, must always be on a
+ word boundary. The semantics of the BLX (1) instruction, however,
+ are that bit zero in the offset must always be zero, and the
+ corresponding bit one in the target address will be set from bit
+ one of the source address. */
+ newval2 &= ~1;
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE);
}
break;
@@ -5711,10 +7181,10 @@ md_apply_fix3 (fixP, val, seg)
md_number_to_chars (buf, value, 1);
#ifdef OBJ_ELF
else if (!target_oabi)
- {
- value = fixP->fx_offset;
- md_number_to_chars (buf, value, 1);
- }
+ {
+ value = fixP->fx_offset;
+ md_number_to_chars (buf, value, 1);
+ }
#endif
break;
@@ -5723,18 +7193,18 @@ md_apply_fix3 (fixP, val, seg)
md_number_to_chars (buf, value, 2);
#ifdef OBJ_ELF
else if (!target_oabi)
- {
- value = fixP->fx_offset;
- md_number_to_chars (buf, value, 2);
- }
+ {
+ value = fixP->fx_offset;
+ md_number_to_chars (buf, value, 2);
+ }
#endif
break;
#ifdef OBJ_ELF
case BFD_RELOC_ARM_GOT32:
case BFD_RELOC_ARM_GOTOFF:
- md_number_to_chars (buf, 0, 4);
- break;
+ md_number_to_chars (buf, 0, 4);
+ break;
#endif
case BFD_RELOC_RVA:
@@ -5743,23 +7213,23 @@ md_apply_fix3 (fixP, val, seg)
md_number_to_chars (buf, value, 4);
#ifdef OBJ_ELF
else if (!target_oabi)
- {
- value = fixP->fx_offset;
- md_number_to_chars (buf, value, 4);
- }
+ {
+ value = fixP->fx_offset;
+ md_number_to_chars (buf, value, 4);
+ }
#endif
break;
#ifdef OBJ_ELF
case BFD_RELOC_ARM_PLT32:
- /* It appears the instruction is fully prepared at this point. */
+ /* It appears the instruction is fully prepared at this point. */
break;
#endif
case BFD_RELOC_ARM_GOTPC:
md_number_to_chars (buf, value, 4);
break;
-
+
case BFD_RELOC_ARM_CP_OFF_IMM:
sign = value >= 0;
if (value < -1023 || value > 1023 || (value & 3))
@@ -5768,17 +7238,18 @@ md_apply_fix3 (fixP, val, seg)
if (value < 0)
value = -value;
newval = md_chars_to_number (buf, INSN_SIZE) & 0xff7fff00;
- newval |= (value >> 2) | (sign ? INDEX_UP : 0);
- md_number_to_chars (buf, newval , INSN_SIZE);
+ newval |= (value >> 2) | (sign ? INDEX_UP : 0);
+ md_number_to_chars (buf, newval, INSN_SIZE);
break;
case BFD_RELOC_ARM_THUMB_OFFSET:
newval = md_chars_to_number (buf, THUMB_SIZE);
- /* Exactly what ranges, and where the offset is inserted depends on
- the type of instruction, we can establish this from the top 4 bits */
+ /* Exactly what ranges, and where the offset is inserted depends
+ on the type of instruction, we can establish this from the
+ top 4 bits. */
switch (newval >> 12)
{
- case 4: /* PC load */
+ case 4: /* PC load. */
/* Thumb PC loads are somewhat odd, bit 1 of the PC is
forced to zero for these loads, so we will need to round
up the offset if the instruction address is not word
@@ -5788,42 +7259,43 @@ md_apply_fix3 (fixP, val, seg)
if ((fixP->fx_frag->fr_address + fixP->fx_where + value) & 3)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("Invalid offset, target not word aligned (0x%08X)"),
- (unsigned int)(fixP->fx_frag->fr_address + fixP->fx_where + value));
+ (unsigned int) (fixP->fx_frag->fr_address
+ + fixP->fx_where + value));
if ((value + 2) & ~0x3fe)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset, value too big (0x%08X)"), value);
+ _("Invalid offset, value too big (0x%08lX)"), value);
- /* Round up, since pc will be rounded down. */
+ /* Round up, since pc will be rounded down. */
newval |= (value + 2) >> 2;
break;
- case 9: /* SP load/store */
+ case 9: /* SP load/store. */
if (value & ~0x3fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset, value too big (0x%08X)"), value);
+ _("Invalid offset, value too big (0x%08lX)"), value);
newval |= value >> 2;
break;
- case 6: /* Word load/store */
+ case 6: /* Word load/store. */
if (value & ~0x7c)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset, value too big (0x%08X)"), value);
- newval |= value << 4; /* 6 - 2 */
+ _("Invalid offset, value too big (0x%08lX)"), value);
+ newval |= value << 4; /* 6 - 2. */
break;
- case 7: /* Byte load/store */
+ case 7: /* Byte load/store. */
if (value & ~0x1f)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset, value too big (0x%08X)"), value);
+ _("Invalid offset, value too big (0x%08lX)"), value);
newval |= value << 6;
break;
- case 8: /* Halfword load/store */
+ case 8: /* Halfword load/store. */
if (value & ~0x3e)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset, value too big (0x%08X)"), value);
- newval |= value << 5; /* 6 - 1 */
+ _("Invalid offset, value too big (0x%08lX)"), value);
+ newval |= value << 5; /* 6 - 1. */
break;
default:
@@ -5838,89 +7310,91 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_ARM_THUMB_ADD:
/* This is a complicated relocation, since we use it for all of
the following immediate relocations:
- 3bit ADD/SUB
- 8bit ADD/SUB
- 9bit ADD/SUB SP word-aligned
- 10bit ADD PC/SP word-aligned
+
+ 3bit ADD/SUB
+ 8bit ADD/SUB
+ 9bit ADD/SUB SP word-aligned
+ 10bit ADD PC/SP word-aligned
The type of instruction being processed is encoded in the
instruction field:
- 0x8000 SUB
- 0x00F0 Rd
- 0x000F Rs
+
+ 0x8000 SUB
+ 0x00F0 Rd
+ 0x000F Rs
*/
newval = md_chars_to_number (buf, THUMB_SIZE);
{
- int rd = (newval >> 4) & 0xf;
- int rs = newval & 0xf;
- int subtract = newval & 0x8000;
-
- if (rd == REG_SP)
- {
- if (value & ~0x1fc)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid immediate for stack address calculation"));
- newval = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST;
- newval |= value >> 2;
- }
- else if (rs == REG_PC || rs == REG_SP)
- {
- if (subtract ||
- value & ~0x3fc)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid immediate for address calculation (value = 0x%08lX)"),
+ int rd = (newval >> 4) & 0xf;
+ int rs = newval & 0xf;
+ int subtract = newval & 0x8000;
+
+ if (rd == REG_SP)
+ {
+ if (value & ~0x1fc)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Invalid immediate for stack address calculation"));
+ newval = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST;
+ newval |= value >> 2;
+ }
+ else if (rs == REG_PC || rs == REG_SP)
+ {
+ if (subtract ||
+ value & ~0x3fc)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Invalid immediate for address calculation (value = 0x%08lX)"),
(unsigned long) value);
- newval = (rs == REG_PC ? T_OPCODE_ADD_PC : T_OPCODE_ADD_SP);
- newval |= rd << 8;
- newval |= value >> 2;
- }
- else if (rs == rd)
- {
- if (value & ~0xff)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid 8bit immediate"));
- newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8;
- newval |= (rd << 8) | value;
- }
- else
- {
- if (value & ~0x7)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid 3bit immediate"));
- newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3;
- newval |= rd | (rs << 3) | (value << 6);
- }
+ newval = (rs == REG_PC ? T_OPCODE_ADD_PC : T_OPCODE_ADD_SP);
+ newval |= rd << 8;
+ newval |= value >> 2;
+ }
+ else if (rs == rd)
+ {
+ if (value & ~0xff)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Invalid 8bit immediate"));
+ newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8;
+ newval |= (rd << 8) | value;
+ }
+ else
+ {
+ if (value & ~0x7)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Invalid 3bit immediate"));
+ newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3;
+ newval |= rd | (rs << 3) | (value << 6);
+ }
}
- md_number_to_chars (buf, newval , THUMB_SIZE);
+ md_number_to_chars (buf, newval, THUMB_SIZE);
break;
case BFD_RELOC_ARM_THUMB_IMM:
newval = md_chars_to_number (buf, THUMB_SIZE);
switch (newval >> 11)
- {
- case 0x04: /* 8bit immediate MOV */
- case 0x05: /* 8bit immediate CMP */
- if (value < 0 || value > 255)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid immediate: %ld is too large"),
+ {
+ case 0x04: /* 8bit immediate MOV. */
+ case 0x05: /* 8bit immediate CMP. */
+ if (value < 0 || value > 255)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Invalid immediate: %ld is too large"),
(long) value);
- newval |= value;
- break;
+ newval |= value;
+ break;
- default:
- abort ();
- }
- md_number_to_chars (buf, newval , THUMB_SIZE);
+ default:
+ abort ();
+ }
+ md_number_to_chars (buf, newval, THUMB_SIZE);
break;
case BFD_RELOC_ARM_THUMB_SHIFT:
- /* 5bit shift value (0..31) */
+ /* 5bit shift value (0..31). */
if (value < 0 || value > 31)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("Illegal Thumb shift value: %ld"), (long) value);
newval = md_chars_to_number (buf, THUMB_SIZE) & 0xf03f;
newval |= value << 6;
- md_number_to_chars (buf, newval , THUMB_SIZE);
+ md_number_to_chars (buf, newval, THUMB_SIZE);
break;
case BFD_RELOC_VTABLE_INHERIT:
@@ -5939,6 +7413,7 @@ md_apply_fix3 (fixP, val, seg)
/* Translate internal representation of relocation info to BFD target
format. */
+
arelent *
tc_gen_reloc (section, fixp)
asection * section ATTRIBUTE_UNUSED;
@@ -5987,10 +7462,12 @@ tc_gen_reloc (section, fixp)
}
case BFD_RELOC_ARM_PCREL_BRANCH:
- case BFD_RELOC_RVA:
+ case BFD_RELOC_ARM_PCREL_BLX:
+ case BFD_RELOC_RVA:
case BFD_RELOC_THUMB_PCREL_BRANCH9:
case BFD_RELOC_THUMB_PCREL_BRANCH12:
case BFD_RELOC_THUMB_PCREL_BRANCH23:
+ case BFD_RELOC_THUMB_PCREL_BLX:
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
code = fixp->fx_r_type;
@@ -5999,7 +7476,7 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_ARM_LITERAL:
case BFD_RELOC_ARM_HWLITERAL:
/* If this is called then the a literal has been referenced across
- a section boundary - possibly due to an implicit dump */
+ a section boundary - possibly due to an implicit dump. */
as_bad_where (fixp->fx_file, fixp->fx_line,
_("Literal referenced across section boundary (Implicit dump?)"));
return NULL;
@@ -6008,8 +7485,8 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_ARM_GOT32:
case BFD_RELOC_ARM_GOTOFF:
case BFD_RELOC_ARM_PLT32:
- code = fixp->fx_r_type;
- break;
+ code = fixp->fx_r_type;
+ break;
#endif
case BFD_RELOC_ARM_IMMEDIATE:
@@ -6020,8 +7497,7 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_ARM_ADRL_IMMEDIATE:
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("ADRL used for a symbol not defined in the same file"),
- fixp->fx_r_type);
+ _("ADRL used for a symbol not defined in the same file"));
return NULL;
case BFD_RELOC_ARM_OFFSET_IMM:
@@ -6033,6 +7509,7 @@ tc_gen_reloc (section, fixp)
default:
{
char * type;
+
switch (fixp->fx_r_type)
{
case BFD_RELOC_ARM_IMMEDIATE: type = "IMMEDIATE"; break;
@@ -6049,22 +7526,22 @@ tc_gen_reloc (section, fixp)
default: type = _("<unknown>"); break;
}
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("Can not represent %s relocation in this object file format (%d)"),
- type, fixp->fx_pcrel);
+ _("Cannot represent %s relocation in this object file format"),
+ type);
return NULL;
}
}
#ifdef OBJ_ELF
- if (code == BFD_RELOC_32_PCREL
- && GOT_symbol
- && fixp->fx_addsy == GOT_symbol)
- {
- code = BFD_RELOC_ARM_GOTPC;
- reloc->addend = fixp->fx_offset = reloc->address;
- }
+ if (code == BFD_RELOC_32_PCREL
+ && GOT_symbol
+ && fixp->fx_addsy == GOT_symbol)
+ {
+ code = BFD_RELOC_ARM_GOTPC;
+ reloc->addend = fixp->fx_offset = reloc->address;
+ }
#endif
-
+
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
if (reloc->howto == NULL)
@@ -6075,10 +7552,10 @@ tc_gen_reloc (section, fixp)
return NULL;
}
- /* HACK: Since arm ELF uses Rel instead of Rela, encode the
- vtable entry to be used in the relocation's section offset. */
- if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
- reloc->address = fixp->fx_offset;
+ /* HACK: Since arm ELF uses Rel instead of Rela, encode the
+ vtable entry to be used in the relocation's section offset. */
+ if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ reloc->address = fixp->fx_offset;
return reloc;
}
@@ -6096,7 +7573,7 @@ static void
output_inst PARAMS ((void))
{
char * to = NULL;
-
+
if (inst.error)
{
as_bad (inst.error);
@@ -6104,7 +7581,7 @@ output_inst PARAMS ((void))
}
to = frag_more (inst.size);
-
+
if (thumb_mode && (inst.size > THUMB_SIZE))
{
assert (inst.size == (2 * THUMB_SIZE));
@@ -6125,7 +7602,9 @@ output_inst PARAMS ((void))
inst.size, & inst.reloc.exp, inst.reloc.pc_rel,
inst.reloc.type);
- return;
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (inst.size);
+#endif
}
void
@@ -6138,9 +7617,11 @@ md_assemble (str)
char * start;
/* Align the instruction.
- This may not be the right thing to do but ... */
- /* arm_align (2, 0); */
- listing_prev_line (); /* Defined in listing.h */
+ This may not be the right thing to do but ... */
+#if 0
+ arm_align (2, 0);
+#endif
+ listing_prev_line (); /* Defined in listing.h. */
/* Align the previous label if needed. */
if (last_label_seen != NULL)
@@ -6154,13 +7635,13 @@ md_assemble (str)
inst.reloc.type = BFD_RELOC_NONE;
skip_whitespace (str);
-
+
/* Scan up to the end of the op-code, which must end in white space or
end of string. */
for (start = p = str; *p != '\0'; p++)
if (*p == ' ')
break;
-
+
if (p == str)
{
as_bad (_("No operator -- statement `%s'\n"), str);
@@ -6175,19 +7656,19 @@ md_assemble (str)
*p = '\0';
opcode = (CONST struct thumb_opcode *) hash_find (arm_tops_hsh, str);
*p = c;
-
+
if (opcode)
{
/* Check that this instruction is supported for this CPU. */
if (thumb_mode == 1 && (opcode->variants & cpu_variant) == 0)
- {
- as_bad (_("selected processor does not support this opcode"));
- return;
- }
+ {
+ as_bad (_("selected processor does not support this opcode"));
+ return;
+ }
inst.instruction = opcode->value;
inst.size = opcode->size;
- (*opcode->parms)(p);
+ (*opcode->parms) (p);
output_inst ();
return;
}
@@ -6198,18 +7679,20 @@ md_assemble (str)
unsigned long cond_code;
inst.size = INSN_SIZE;
- /* p now points to the end of the opcode, probably white space, but we
+ /* P now points to the end of the opcode, probably white space, but we
have to break the opcode up in case it contains condionals and flags;
keep trying with progressively smaller basic instructions until one
matches, or we run out of opcode. */
q = (p - str > LONGEST_INST) ? str + LONGEST_INST : p;
+
for (; q != str; q--)
{
c = *q;
*q = '\0';
+
opcode = (CONST struct asm_opcode *) hash_find (arm_ops_hsh, str);
*q = c;
-
+
if (opcode && opcode->template)
{
unsigned long flag_bits = 0;
@@ -6224,24 +7707,25 @@ md_assemble (str)
{
if (opcode->comp_suffix)
{
- if (*opcode->comp_suffix != '\0')
- as_bad (_("Opcode `%s' must have suffix from list: <%s>"),
- str, opcode->comp_suffix);
- else
- /* Not a conditional instruction. */
- (*opcode->parms)(q, 0);
+ if (*opcode->comp_suffix != '\0')
+ as_bad (_("Opcode `%s' must have suffix from list: <%s>"),
+ str, opcode->comp_suffix);
+ else
+ /* Not a conditional instruction. */
+ (*opcode->parms) (q, 0);
}
else
{
- /* A conditional instruction with default condition. */
+ /* A conditional instruction with default condition. */
inst.instruction |= COND_ALWAYS;
- (*opcode->parms)(q, 0);
+ (*opcode->parms) (q, 0);
}
output_inst ();
return;
}
- /* Not just a simple opcode. Check if extra is a conditional. */
+ /* Not just a simple opcode. Check if extra is a
+ conditional. */
r = q;
if (p - r >= 2)
{
@@ -6266,23 +7750,22 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
else
cond_code = COND_ALWAYS;
- /* Apply the conditional, or complain it's not allowed. */
+ /* Apply the conditional, or complain it's not allowed. */
if (opcode->comp_suffix && *opcode->comp_suffix == '\0')
{
- /* Instruction isn't conditional */
- if (cond_code != COND_ALWAYS)
- {
- as_bad (_("Opcode `%s' is unconditional\n"), str);
- return;
- }
+ /* Instruction isn't conditional. */
+ if (cond_code != COND_ALWAYS)
+ {
+ as_bad (_("Opcode `%s' is unconditional\n"), str);
+ return;
+ }
}
else
- /* Instruction is conditional: set the condition into it. */
- inst.instruction |= cond_code;
-
+ /* Instruction is conditional: set the condition into it. */
+ inst.instruction |= cond_code;
- /* If there is a compulsory suffix, it should come here, before
- any optional flags. */
+ /* If there is a compulsory suffix, it should come here
+ before any optional flags. */
if (opcode->comp_suffix && *opcode->comp_suffix != '\0')
{
CONST char *s = opcode->comp_suffix;
@@ -6297,8 +7780,8 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
if (*s == '\0')
{
- as_bad (_("Opcode `%s' must have suffix from <%s>\n"), str,
- opcode->comp_suffix);
+ as_bad (_("Opcode `%s' must have suffix from <%s>\n"),
+ str, opcode->comp_suffix);
return;
}
@@ -6347,26 +7830,31 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
}
/* It wasn't an instruction, but it might be a register alias of the form
- alias .req reg */
+ alias .req reg. */
q = p;
skip_whitespace (q);
c = *p;
*p = '\0';
-
+
if (*q && !strncmp (q, ".req ", 4))
{
int reg;
- char * copy_of_str = str;
+ char * copy_of_str;
char * r;
-
+
+#ifdef IGNORE_OPCODE_CASE
+ str = original_case_string;
+#endif
+ copy_of_str = str;
+
q += 4;
skip_whitespace (q);
for (r = q; *r != '\0'; r++)
if (*r == ' ')
break;
-
+
if (r != q)
{
int regnum;
@@ -6377,7 +7865,7 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
*r = d;
reg = arm_reg_parse (& str);
-
+
if (reg == FAIL)
{
if (regnum != FAIL)
@@ -6389,8 +7877,8 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
{
if (reg != regnum)
as_warn (_("ignoring redefinition of register alias '%s'"),
- copy_of_str );
-
+ copy_of_str);
+
/* Do not warn about redefinitions to the same alias. */
}
else
@@ -6399,7 +7887,7 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
}
else
as_warn (_("ignoring incomplete .req pseuso op"));
-
+
*p = c;
return;
}
@@ -6408,38 +7896,39 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
as_bad (_("bad instruction `%s'"), start);
}
-/*
- * md_parse_option
- * Invocation line includes a switch not recognized by the base assembler.
- * See if it's a processor-specific option. These are:
- * Cpu variants, the arm part is optional:
- * -m[arm]1 Currently not supported.
- * -m[arm]2, -m[arm]250 Arm 2 and Arm 250 processor
- * -m[arm]3 Arm 3 processor
- * -m[arm]6[xx], Arm 6 processors
- * -m[arm]7[xx][t][[d]m] Arm 7 processors
- * -m[arm]8[10] Arm 8 processors
- * -m[arm]9[20][tdmi] Arm 9 processors
- * -mstrongarm[110[0]] StrongARM processors
- * -m[arm]v[2345[t]] Arm architectures
- * -mall All (except the ARM1)
- * FP variants:
- * -mfpa10, -mfpa11 FPA10 and 11 co-processor instructions
- * -mfpe-old (No float load/store multiples)
- * -mno-fpu Disable all floating point instructions
- * Run-time endian selection:
- * -EB big endian cpu
- * -EL little endian cpu
- * ARM Procedure Calling Standard:
- * -mapcs-32 32 bit APCS
- * -mapcs-26 26 bit APCS
- * -mapcs-float Pass floats in float regs
- * -mapcs-reentrant Position independent code
- * -mthumb-interwork Code supports Arm/Thumb interworking
- * -moabi Old ELF ABI
- */
+/* md_parse_option
+ Invocation line includes a switch not recognized by the base assembler.
+ See if it's a processor-specific option. These are:
+ Cpu variants, the arm part is optional:
+ -m[arm]1 Currently not supported.
+ -m[arm]2, -m[arm]250 Arm 2 and Arm 250 processor
+ -m[arm]3 Arm 3 processor
+ -m[arm]6[xx], Arm 6 processors
+ -m[arm]7[xx][t][[d]m] Arm 7 processors
+ -m[arm]8[10] Arm 8 processors
+ -m[arm]9[20][tdmi] Arm 9 processors
+ -mstrongarm[110[0]] StrongARM processors
+ -mxscale XScale processors
+ -m[arm]v[2345[t[e]]] Arm architectures
+ -mall All (except the ARM1)
+ FP variants:
+ -mfpa10, -mfpa11 FPA10 and 11 co-processor instructions
+ -mfpe-old (No float load/store multiples)
+ -mno-fpu Disable all floating point instructions
+ Run-time endian selection:
+ -EB big endian cpu
+ -EL little endian cpu
+ ARM Procedure Calling Standard:
+ -mapcs-32 32 bit APCS
+ -mapcs-26 26 bit APCS
+ -mapcs-float Pass floats in float regs
+ -mapcs-reentrant Position independent code
+ -mthumb-interwork Code supports Arm/Thumb interworking
+ -matpcs ARM/Thumb Procedure Call Standard
+ -moabi Old ELF ABI */
CONST char * md_shortopts = "m:k";
+
struct option md_longopts[] =
{
#ifdef ARM_BI_ENDIAN
@@ -6454,6 +7943,7 @@ struct option md_longopts[] =
#endif
{NULL, no_argument, NULL, 0}
};
+
size_t md_longopts_size = sizeof (md_longopts);
int
@@ -6494,31 +7984,31 @@ md_parse_option (c, arg)
break;
#ifdef OBJ_ELF
- case 'o':
- if (streq (str, "oabi"))
- target_oabi = true;
- break;
+ case 'o':
+ if (streq (str, "oabi"))
+ target_oabi = true;
+ break;
#endif
-
- case 't':
- /* Limit assembler to generating only Thumb instructions: */
- if (streq (str, "thumb"))
- {
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_THUMB;
- cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_NONE;
- thumb_mode = 1;
- }
- else if (streq (str, "thumb-interwork"))
- {
- if ((cpu_variant & ARM_THUMB) == 0)
+
+ case 't':
+ /* Limit assembler to generating only Thumb instructions: */
+ if (streq (str, "thumb"))
+ {
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_EXT_THUMB;
+ cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_NONE;
+ thumb_mode = 1;
+ }
+ else if (streq (str, "thumb-interwork"))
+ {
+ if ((cpu_variant & ARM_EXT_THUMB) == 0)
cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4T;
#if defined OBJ_COFF || defined OBJ_ELF
- support_interwork = true;
+ support_interwork = true;
#endif
- }
- else
+ }
+ else
goto bad;
- break;
+ break;
default:
if (streq (str, "all"))
@@ -6533,7 +8023,7 @@ md_parse_option (c, arg)
to us, so we must parse them here. */
str += 5;
-
+
if (streq (str, "32"))
{
uses_apcs_26 = false;
@@ -6573,16 +8063,22 @@ md_parse_option (c, arg)
{
/* Reentrant code has been generated. This does affect
linking, since there is no point in linking reentrant/
- position independent code with absolute position code. */
+ position independent code with absolute position code. */
pic_code = true;
return 1;
}
-
+
as_bad (_("Unrecognised APCS switch -m%s"), arg);
return 0;
- }
+ }
+
+ if (! strcmp (str, "atpcs"))
+ {
+ atpcs = true;
+ return 1;
+ }
#endif
- /* Strip off optional "arm" */
+ /* Strip off optional "arm". */
if (! strncmp (str, "arm", 3))
str += 3;
@@ -6627,7 +8123,8 @@ md_parse_option (c, arg)
break;
case '7':
- switch (strtol (str, & str, 10)) /* Eat the processor name */
+ /* Eat the processor name. */
+ switch (strtol (str, & str, 10))
{
case 7:
case 70:
@@ -6640,75 +8137,82 @@ md_parse_option (c, arg)
default:
goto bad;
}
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7;
- for (; *str; str++)
- {
- switch (* str)
- {
- case 't':
- cpu_variant |= (ARM_THUMB | ARM_ARCH_V4);
- break;
-
- case 'm':
- cpu_variant |= ARM_LONGMUL;
- break;
-
- case 'f': /* fe => fp enabled cpu. */
- if (str[1] == 'e')
- ++ str;
- else
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7;
+ for (; *str; str++)
+ {
+ switch (*str)
+ {
+ case 't':
+ cpu_variant |= ARM_ARCH_V4T;
+ break;
+
+ case 'm':
+ cpu_variant |= ARM_EXT_LONGMUL;
+ break;
+
+ case 'f': /* fe => fp enabled cpu. */
+ if (str[1] == 'e')
+ ++ str;
+ else
+ goto bad;
+
+ case 'c': /* Left over from 710c processor name. */
+ case 'd': /* Debug. */
+ case 'i': /* Embedded ICE. */
+ /* Included for completeness in ARM processor naming. */
+ break;
+
+ default:
goto bad;
-
- case 'c': /* Left over from 710c processor name. */
- case 'd': /* Debug */
- case 'i': /* Embedded ICE */
- /* Included for completeness in ARM processor naming. */
- break;
-
- default:
- goto bad;
- }
- }
+ }
+ }
break;
case '8':
if (streq (str, "8") || streq (str, "810"))
cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_8 | ARM_ARCH_V4 | ARM_LONGMUL;
+ | ARM_8 | ARM_ARCH_V4;
else
goto bad;
break;
-
+
case '9':
if (streq (str, "9"))
cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB;
+ | ARM_9 | ARM_ARCH_V4T;
else if (streq (str, "920"))
cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL;
+ | ARM_9 | ARM_ARCH_V4;
else if (streq (str, "920t"))
cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB;
+ | ARM_9 | ARM_ARCH_V4T;
else if (streq (str, "9tdmi"))
cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB;
+ | ARM_9 | ARM_ARCH_V4T;
else
goto bad;
break;
-
case 's':
if (streq (str, "strongarm")
|| streq (str, "strongarm110")
|| streq (str, "strongarm1100"))
cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_8 | ARM_ARCH_V4 | ARM_LONGMUL;
+ | ARM_8 | ARM_ARCH_V4;
else
goto bad;
break;
-
+
+ case 'x':
+ if (streq (str, "xscale"))
+ cpu_variant = ARM_9 | ARM_ARCH_XSCALE;
+ else
+ goto bad;
+ break;
+
case 'v':
- /* Select variant based on architecture rather than processor. */
+ /* Select variant based on architecture rather than
+ processor. */
switch (*++str)
{
case '2':
@@ -6725,26 +8229,26 @@ md_parse_option (c, arg)
break;
}
break;
-
+
case '3':
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7;
-
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7;
+
switch (*++str)
{
- case 'm': cpu_variant |= ARM_LONGMUL; break;
+ case 'm': cpu_variant |= ARM_EXT_LONGMUL; break;
case 0: break;
default:
as_bad (_("Invalid architecture variant -m%s"), arg);
break;
}
break;
-
+
case '4':
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4;
-
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7 | ARM_ARCH_V4;
+
switch (*++str)
{
- case 't': cpu_variant |= ARM_THUMB; break;
+ case 't': cpu_variant |= ARM_EXT_THUMB; break;
case 0: break;
default:
as_bad (_("Invalid architecture variant -m%s"), arg);
@@ -6753,10 +8257,10 @@ md_parse_option (c, arg)
break;
case '5':
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V5;
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_9 | ARM_ARCH_V5;
switch (*++str)
{
- case 't': cpu_variant |= ARM_THUMB; break;
+ case 't': cpu_variant |= ARM_EXT_THUMB; break;
case 'e': cpu_variant |= ARM_EXT_V5E; break;
case 0: break;
default:
@@ -6764,13 +8268,13 @@ md_parse_option (c, arg)
break;
}
break;
-
+
default:
as_bad (_("Invalid architecture variant -m%s"), arg);
break;
}
break;
-
+
default:
bad:
as_bad (_("Invalid processor variant -m%s"), arg);
@@ -6784,12 +8288,12 @@ md_parse_option (c, arg)
pic_code = 1;
break;
#endif
-
+
default:
return 0;
}
- return 1;
+ return 1;
}
void
@@ -6810,9 +8314,10 @@ md_show_usage (fp)
#if defined OBJ_COFF || defined OBJ_ELF
fprintf (fp, _("\
-mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to use\n\
+ -matpcs use ARM/Thumb Procedure Calling Standard\n\
-mapcs-float floating point args are passed in FP regs\n\
-mapcs-reentrant the code is position independent/reentrant\n"));
- #endif
+#endif
#ifdef OBJ_ELF
fprintf (fp, _("\
-moabi support the old ELF ABI\n"));
@@ -6840,8 +8345,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc)
int pc_rel;
int reloc;
{
- fixS * new_fix;
- arm_fix_data * arm_data;
+ fixS * new_fix;
+ arm_fix_data * arm_data;
switch (exp->X_op)
{
@@ -6858,7 +8363,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc)
break;
}
- /* Mark whether the fix is to a THUMB instruction, or an ARM instruction */
+ /* Mark whether the fix is to a THUMB instruction, or an ARM
+ instruction. */
arm_data = (arm_fix_data *) obstack_alloc (& notes, sizeof (arm_fix_data));
new_fix->tc_fix_data = (PTR) arm_data;
arm_data->thumb_mode = thumb_mode;
@@ -6866,8 +8372,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc)
return;
}
-
/* This fix_new is called by cons via TC_CONS_FIX_NEW. */
+
void
cons_fix_new_arm (frag, where, size, exp)
fragS * frag;
@@ -6877,10 +8383,10 @@ cons_fix_new_arm (frag, where, size, exp)
{
bfd_reloc_code_real_type type;
int pcrel = 0;
-
+
/* Pick a reloc.
FIXME: @@ Should look at CPU word size. */
- switch (size)
+ switch (size)
{
case 1:
type = BFD_RELOC_8;
@@ -6896,20 +8402,22 @@ cons_fix_new_arm (frag, where, size, exp)
type = BFD_RELOC_64;
break;
}
-
+
fix_new_exp (frag, where, (int) size, exp, pcrel, type);
}
/* A good place to do this, although this was probably not intended
for this kind of use. We need to dump the literal pool before
references are made to a null symbol pointer. */
+
void
arm_cleanup ()
{
if (current_poolP == NULL)
return;
-
- subseg_set (text_section, 0); /* Put it at the end of text section. */
+
+ /* Put it at the end of text section. */
+ subseg_set (text_section, 0);
s_ltorg (0);
listing_prev_line ();
}
@@ -6925,14 +8433,45 @@ arm_frob_label (sym)
symbolS * sym;
{
last_label_seen = sym;
-
+
ARM_SET_THUMB (sym, thumb_mode);
-
+
#if defined OBJ_COFF || defined OBJ_ELF
ARM_SET_INTERWORK (sym, support_interwork);
#endif
-
- if (label_is_thumb_function_name)
+
+ /* 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
@@ -6940,7 +8479,7 @@ arm_frob_label (sym)
correctly. */
THUMB_SET_FUNC (sym, 1);
-
+
label_is_thumb_function_name = false;
}
}
@@ -6957,12 +8496,12 @@ arm_adjust_symtab ()
for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
{
if (ARM_IS_THUMB (sym))
- {
+ {
if (THUMB_IS_FUNC (sym))
{
/* Mark the symbol as a Thumb function. */
if ( S_GET_STORAGE_CLASS (sym) == C_STAT
- || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */
+ || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */
S_SET_STORAGE_CLASS (sym, C_THUMBSTATFUNC);
else if (S_GET_STORAGE_CLASS (sym) == C_EXT)
@@ -6972,38 +8511,39 @@ arm_adjust_symtab ()
S_GET_NAME (sym), S_GET_STORAGE_CLASS (sym));
}
else switch (S_GET_STORAGE_CLASS (sym))
- {
- case C_EXT:
- S_SET_STORAGE_CLASS (sym, C_THUMBEXT);
- break;
- case C_STAT:
- S_SET_STORAGE_CLASS (sym, C_THUMBSTAT);
- break;
- case C_LABEL:
- S_SET_STORAGE_CLASS (sym, C_THUMBLABEL);
- break;
- default: /* do nothing */
- break;
- }
- }
+ {
+ case C_EXT:
+ S_SET_STORAGE_CLASS (sym, C_THUMBEXT);
+ break;
+ case C_STAT:
+ S_SET_STORAGE_CLASS (sym, C_THUMBSTAT);
+ break;
+ case C_LABEL:
+ S_SET_STORAGE_CLASS (sym, C_THUMBLABEL);
+ break;
+ default:
+ /* Do nothing. */
+ break;
+ }
+ }
if (ARM_IS_INTERWORK (sym))
coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_flags = 0xFF;
}
#endif
#ifdef OBJ_ELF
- symbolS * sym;
- char bind;
+ symbolS * sym;
+ char bind;
for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
{
if (ARM_IS_THUMB (sym))
- {
+ {
elf_symbol_type * elf_sym;
-
+
elf_sym = elf_symbol (symbol_get_bfdsym (sym));
bind = ELF_ST_BIND (elf_sym);
-
+
/* If it's a .thumb_func, declare it as so,
otherwise tag label as .code 16. */
if (THUMB_IS_FUNC (sym))
@@ -7012,8 +8552,8 @@ arm_adjust_symtab ()
else
elf_sym->internal_elf_sym.st_info =
ELF_ST_INFO (bind, STT_ARM_16BIT);
- }
- }
+ }
+ }
#endif
}
@@ -7027,7 +8567,7 @@ arm_data_in_code ()
*input_line_pointer = 0;
return 1;
}
-
+
return 0;
}
@@ -7052,7 +8592,7 @@ arm_validate_fix (fixP)
the THUMB_FUNC attribute, then we must be calling a function which has
the (interfacearm) attribute. We look for the Thumb entry point to that
function and change the branch to refer to that function instead. */
- if ( fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23
+ if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23
&& fixP->fx_addsy != NULL
&& S_IS_DEFINED (fixP->fx_addsy)
&& ! THUMB_IS_FUNC (fixP->fx_addsy))
@@ -7064,6 +8604,22 @@ arm_validate_fix (fixP)
return false;
}
+#ifdef OBJ_COFF
+/* This is a little hack to help the gas/arm/adrl.s test. It prevents
+ local labels from being added to the output symbol table when they
+ are used with the ADRL pseudo op. The ADRL relocation should always
+ be resolved before the binbary is emitted, so it is safe to say that
+ it is adjustable. */
+
+boolean
+arm_fix_adjustable (fixP)
+ fixS * fixP;
+{
+ if (fixP->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE)
+ return 1;
+ return 0;
+}
+#endif
#ifdef OBJ_ELF
/* Relocations against Thumb function names must be left unadjusted,
so that the linker can use this information to correctly set the
@@ -7077,26 +8633,26 @@ arm_validate_fix (fixP)
than a function) and then later jumping to that address. Such
addresses also ought to have their bottom bit set (assuming that
they reside in Thumb code), but at the moment they will not. */
-
+
boolean
arm_fix_adjustable (fixP)
fixS * fixP;
{
if (fixP->fx_addsy == NULL)
return 1;
-
- /* Prevent all adjustments to global symbols. */
+
+ /* Prevent all adjustments to global symbols. */
if (S_IS_EXTERN (fixP->fx_addsy))
return 0;
-
+
if (S_IS_WEAK (fixP->fx_addsy))
return 0;
if (THUMB_IS_FUNC (fixP->fx_addsy)
&& fixP->fx_subsy == NULL)
return 0;
-
- /* We need the symbol name for the VTABLE entries */
+
+ /* We need the symbol name for the VTABLE entries. */
if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
@@ -7108,24 +8664,28 @@ const char *
elf32_arm_target_format ()
{
if (target_big_endian)
- if (target_oabi)
- return "elf32-bigarm-oabi";
- else
- return "elf32-bigarm";
+ {
+ if (target_oabi)
+ return "elf32-bigarm-oabi";
+ else
+ return "elf32-bigarm";
+ }
else
- if (target_oabi)
- return "elf32-littlearm-oabi";
- else
- return "elf32-littlearm";
+ {
+ if (target_oabi)
+ return "elf32-littlearm-oabi";
+ else
+ return "elf32-littlearm";
+ }
}
void
armelf_frob_symbol (symp, puntp)
symbolS * symp;
- int * puntp;
+ int * puntp;
{
elf_frob_symbol (symp, puntp);
-}
+}
int
arm_force_relocation (fixp)
@@ -7134,17 +8694,19 @@ arm_force_relocation (fixp)
if ( fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY
|| fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH
- || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23)
+ || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BLX
+ || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX
+ || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23)
return 1;
-
+
return 0;
}
static bfd_reloc_code_real_type
arm_parse_reloc ()
{
- char id[16];
- char * ip;
+ char id [16];
+ char * ip;
unsigned int i;
static struct
{
@@ -7154,28 +8716,27 @@ arm_parse_reloc ()
}
reloc_map[] =
{
-#define MAP(str,reloc) { str, sizeof (str)-1, reloc }
+#define MAP(str,reloc) { str, sizeof (str) - 1, reloc }
MAP ("(got)", BFD_RELOC_ARM_GOT32),
MAP ("(gotoff)", BFD_RELOC_ARM_GOTOFF),
- /* ScottB: Jan 30, 1998 */
- /* Added support for parsing "var(PLT)" branch instructions */
- /* generated by GCC for PLT relocs */
+ /* ScottB: Jan 30, 1998 - Added support for parsing "var(PLT)"
+ branch instructions generated by GCC for PLT relocs. */
MAP ("(plt)", BFD_RELOC_ARM_PLT32),
{ NULL, 0, BFD_RELOC_UNUSED }
-#undef MAP
+#undef MAP
};
for (i = 0, ip = input_line_pointer;
i < sizeof (id) && (isalnum (*ip) || ispunct (*ip));
i++, ip++)
id[i] = tolower (*ip);
-
+
for (i = 0; reloc_map[i].str; i++)
if (strncmp (id, reloc_map[i].str, reloc_map[i].len) == 0)
break;
-
+
input_line_pointer += reloc_map[i].len;
-
+
return reloc_map[i].reloc;
}
@@ -7202,35 +8763,135 @@ s_arm_elf_cons (nbytes)
do
{
bfd_reloc_code_real_type reloc;
-
+
expression (& exp);
if (exp.X_op == O_symbol
- && * input_line_pointer == '('
- && (reloc = arm_parse_reloc()) != BFD_RELOC_UNUSED)
- {
- reloc_howto_type * howto = bfd_reloc_type_lookup (stdoutput, reloc);
- int size = bfd_get_reloc_size (howto);
-
- if (size > nbytes)
- as_bad ("%s relocations do not fit in %d bytes",
+ && * input_line_pointer == '('
+ && (reloc = arm_parse_reloc ()) != BFD_RELOC_UNUSED)
+ {
+ reloc_howto_type *howto = bfd_reloc_type_lookup (stdoutput, reloc);
+ int size = bfd_get_reloc_size (howto);
+
+ if (size > nbytes)
+ as_bad ("%s relocations do not fit in %d bytes",
howto->name, nbytes);
- else
- {
- register char * p = frag_more ((int) nbytes);
- int offset = nbytes - size;
-
- fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size,
- & exp, 0, reloc);
- }
- }
+ else
+ {
+ register char *p = frag_more ((int) nbytes);
+ int offset = nbytes - size;
+
+ fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size,
+ &exp, 0, reloc);
+ }
+ }
else
- emit_expr (& exp, (unsigned int) nbytes);
+ emit_expr (&exp, (unsigned int) nbytes);
}
while (*input_line_pointer++ == ',');
- input_line_pointer--; /* Put terminator back into stream. */
+ /* Put terminator back into stream. */
+ input_line_pointer --;
demand_empty_rest_of_line ();
}
#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. */
+
+void
+arm_frag_align_code (n, max)
+ int n;
+ int max;
+{
+ char * p;
+
+ /* We assume that there will never be a requirment
+ 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."));
+
+ p = frag_var (rs_align_code,
+ MAX_MEM_FOR_RS_ALIGN_CODE,
+ 1,
+ (relax_substateT) max,
+ (symbolS *) NULL,
+ (offsetT) n,
+ (char *) NULL);
+ *p = 0;
+
+}
+
+/* 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/gnu/usr.bin/binutils/gas/config/tc-arm.h b/gnu/usr.bin/binutils/gas/config/tc-arm.h
index c5ab8870512..8de5704efae 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-arm.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-arm.h
@@ -1,5 +1,5 @@
/* This file is tc-arm.h
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -68,12 +68,12 @@
#if defined OBJ_COFF || defined OBJ_ELF
# define ARM_BI_ENDIAN
-
+
# define TC_VALIDATE_FIX(fixP, segType, Label) \
if (arm_validate_fix (fixP)) add_symbolP = fixP->fx_addsy
extern boolean arm_validate_fix PARAMS ((struct fix *));
#endif
-
+
#ifdef OBJ_COFF
# if defined TE_PE
# define TC_FORCE_RELOCATION(x) ((x)->fx_r_type == BFD_RELOC_RVA)
@@ -90,7 +90,7 @@
#ifdef OBJ_ELF
# define TARGET_FORMAT elf32_arm_target_format()
extern const char * elf32_arm_target_format PARAMS ((void));
-
+
# define TC_FORCE_RELOCATION(fixp) arm_force_relocation (fixp)
extern int arm_force_relocation PARAMS ((struct fix *));
#endif
@@ -116,10 +116,14 @@
#define TC_FIX_TYPE PTR
#define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL)
-#ifdef OBJ_ELF
+#if defined OBJ_ELF || defined OBJ_COFF
#include "write.h" /* For definition of fixS */
#define obj_fix_adjustable(fixP) arm_fix_adjustable (fixP)
boolean arm_fix_adjustable PARAMS ((fixS *));
+
+/* This arranges for gas/write.c to not apply a relocation if
+ obj_fix_adjustable() says it is not adjustable. */
+#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
#else
#define obj_fix_adjustable(fixP) 0
#endif
@@ -143,7 +147,6 @@ boolean arm_fix_adjustable PARAMS ((fixS *));
#define ARM_SET_INTERWORK(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_INTERWORK) : ARM_RESET_FLAG (s, ARM_FLAG_INTERWORK))
#define THUMB_SET_FUNC(s,t) ((t) ? ARM_SET_FLAG (s, THUMB_FLAG_FUNC) : ARM_RESET_FLAG (s, THUMB_FLAG_FUNC))
-
#define TC_START_LABEL(C,STR) \
(c == ':' || (c == '/' && arm_data_in_code ()))
int arm_data_in_code PARAMS ((void));
@@ -194,18 +197,40 @@ void armelf_frob_symbol PARAMS ((symbolS *, int *));
extern void cons_fix_new_arm PARAMS ((fragS *, int, int, expressionS *));
/* Don't allow symbols to be discarded on GOT related relocs,
- nor on globals. */
+ nor on globals. */
#define tc_fix_adjustable(x) (\
((x)->fx_r_type == BFD_RELOC_ARM_PLT32 \
|| (x)->fx_r_type == BFD_RELOC_ARM_GOT32 \
|| (x)->fx_r_type == BFD_RELOC_ARM_GOTOFF \
|| S_IS_EXTERN ((x)->fx_addsy) \
|| S_IS_WEAK ((x)->fx_addsy)) ? 0 : 1)
-
+
#ifdef OBJ_ELF
#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
#else
#define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
#endif
-
-/* end of tc-arm.h */
+
+#ifdef OBJ_ELF
+#define DWARF2_LINE_MIN_INSN_LENGTH 2
+#endif
+
+#define MAX_MEM_FOR_RS_ALIGN_CODE 31
+
+/* For frags in code sections we need to record whether they contain
+ ARM code or THUMB code. This is that if they have to be aligned,
+ they can contain the correct type of no-op instruction. */
+#define TC_FRAG_TYPE int
+#define TC_FRAG_INIT(fragp) arm_init_frag (fragp)
+extern void arm_init_frag PARAMS ((struct frag *));
+
+#define HANDLE_ALIGN(fragp) arm_handle_align (fragp)
+extern void arm_handle_align PARAMS ((struct frag *));
+
+#define md_do_align(N, FILL, LEN, MAX, LABEL) \
+ if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg)) \
+ { \
+ arm_frag_align_code (N, MAX); \
+ goto LABEL; \
+ }
+extern void arm_frag_align_code PARAMS ((int, int));
diff --git a/gnu/usr.bin/binutils/gas/config/tc-generic.h b/gnu/usr.bin/binutils/gas/config/tc-generic.h
index 72df0203165..f3b676ba011 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-generic.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-generic.h
@@ -1,6 +1,6 @@
/* This file is tc-generic.h
- Copyright (C) 1987, 91, 92, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1987, 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/gnu/usr.bin/binutils/gas/config/tc-h8300.c b/gnu/usr.bin/binutils/gas/config/tc-h8300.c
index 736d6b91294..eaf250071c9 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-h8300.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-h8300.c
@@ -1,5 +1,6 @@
/* tc-h8300.c -- Assemble code for the Hitachi H8/300
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,11 +19,7 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-
-/*
- Written By Steve Chamberlain
- sac@cygnus.com
- */
+/* Written By Steve Chamberlain <sac@cygnus.com>. */
#include <stdio.h>
#include "as.h"
@@ -33,11 +30,9 @@
#include "opcode/h8300.h"
#include <ctype.h>
-const char comment_chars[] =
-{';', 0};
-const char line_separator_chars[] =
-{0};
+const char comment_chars[] = ";";
const char line_comment_chars[] = "#";
+const char line_separator_chars[] = "";
/* This table describes all the machine specific pseudo-ops the assembler
has to support. The fields are:
@@ -55,7 +50,6 @@ int Smode;
#define DSYMMODE (Hmode ? L_24 : L_16)
int bsize = L_8; /* default branch displacement */
-
void
h8300hmode ()
{
@@ -69,6 +63,7 @@ h8300smode ()
Smode = 1;
Hmode = 1;
}
+
void
sbranch (size)
int size;
@@ -76,14 +71,14 @@ sbranch (size)
bsize = size;
}
-static void pint ()
+static void
+pint ()
{
cons (Hmode ? 4 : 2);
}
const pseudo_typeS md_pseudo_table[] =
{
-
{"h8300h", h8300hmode, 0},
{"h8300s", h8300smode, 0},
{"sbranch", sbranch, L_8},
@@ -112,12 +107,9 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
-/*
- This function is called once, at assembler startup time. This should
- set up all the tables, etc that the MD part of the assembler needs
- */
-
-
+/* This function is called once, at assembler startup time. This
+ should set up all the tables, etc. that the MD part of the assembler
+ needs. */
void
md_begin ()
{
@@ -131,8 +123,7 @@ md_begin ()
for (opcode = h8_opcodes; opcode->name; opcode++)
{
/* Strip off any . part when inserting the opcode and only enter
- unique codes into the hash table
- */
+ unique codes into the hash table. */
char *src = opcode->name;
unsigned int len = strlen (src);
char *dst = malloc (len + 1);
@@ -158,12 +149,12 @@ md_begin ()
}
opcode->idx = idx;
-
- /* Find the number of operands */
+ /* Find the number of operands. */
opcode->noperands = 0;
while (opcode->args.nib[opcode->noperands] != E)
opcode->noperands++;
- /* Find the length of the opcode in bytes */
+
+ /* Find the length of the opcode in bytes. */
opcode->length = 0;
while (opcode->data.nib[opcode->length * 2] != E)
opcode->length++;
@@ -172,17 +163,16 @@ md_begin ()
linkrelax = 1;
}
-
struct h8_exp
{
char *e_beg;
char *e_end;
expressionS e_exp;
};
+
int dispreg;
int opsize; /* Set when a register size is seen */
-
struct h8_op
{
op_type mode;
@@ -201,8 +191,9 @@ struct h8_op
ccr
*/
-/* try and parse a reg name, returns number of chars consumed */
-int
+/* Try to parse a reg name. Return the number of chars consumed. */
+
+static int
parse_reg (src, mode, reg, direction)
char *src;
op_type *mode;
@@ -213,10 +204,10 @@ parse_reg (src, mode, reg, direction)
char *end;
int len;
- /* Cribbed from get_symbol_end(). */
+ /* Cribbed from get_symbol_end. */
if (!is_name_beginner (*src) || *src == '\001')
return 0;
- end = src+1;
+ end = src + 1;
while (is_part_of_name (*end) || *end == '\001')
end++;
len = end - src;
@@ -291,10 +282,10 @@ parse_reg (src, mode, reg, direction)
return 0;
}
-char *
+static char *
parse_exp (s, op)
char *s;
- expressionS * op;
+ expressionS *op;
{
char *save = input_line_pointer;
char *new;
@@ -322,7 +313,7 @@ skip_colonthing (ptr, exp, mode)
{
ptr++;
/* ff fill any 8 bit quantity */
- /* exp->X_add_number -= 0x100;*/
+ /* exp->X_add_number -= 0x100; */
*mode |= L_8;
}
else
@@ -353,12 +344,12 @@ skip_colonthing (ptr, exp, mode)
@(exp[:16], Rn) Register indirect with displacement
@Rn+
@-Rn
- @aa:8 absolute 8 bit
- @aa:16 absolute 16 bit
+ @aa:8 absolute 8 bit
+ @aa:16 absolute 16 bit
@aa absolute 16 bit
#xx[:size] immediate data
- @(exp:[8], pc) pc rel
+ @(exp:[8], pc) pc rel
@@aa[:8] memory indirect
*/
@@ -374,7 +365,7 @@ colonmod24 (op, src)
if (!mode)
{
- /* Choose a default mode */
+ /* Choose a default mode. */
if (op->exp.X_add_number < -32768
|| op->exp.X_add_number > 32767)
{
@@ -394,7 +385,6 @@ colonmod24 (op, src)
}
-
static void
get_operand (ptr, op, dst, direction)
char **ptr;
@@ -411,8 +401,8 @@ get_operand (ptr, op, dst, direction)
/* Gross. Gross. ldm and stm have a format not easily handled
by get_operand. We deal with it explicitly here. */
- if (src[0] == 'e' && src[1] == 'r' && isdigit(src[2])
- && src[3] == '-' && src[4] == 'e' && src[5] == 'r' && isdigit(src[6]))
+ if (src[0] == 'e' && src[1] == 'r' && isdigit (src[2])
+ && src[3] == '-' && src[4] == 'e' && src[5] == 'r' && isdigit (src[6]))
{
int low, high;
@@ -463,29 +453,24 @@ get_operand (ptr, op, dst, direction)
op->mode = MEMIND;
return;
-
}
-
if (*src == '-')
{
src++;
len = parse_reg (src, &mode, &num, direction);
if (len == 0)
{
- /* Oops, not a reg after all, must be ordinary exp */
+ /* Oops, not a reg after all, must be ordinary exp. */
src--;
- /* must be a symbol */
+ /* Must be a symbol. */
op->mode = ABS | PSIZE | direction;
*ptr = skip_colonthing (parse_exp (src, &op->exp),
&op->exp, &op->mode);
return;
-
-
}
-
if ((mode & SIZE) != PSIZE)
as_bad (_("Wrong size pointer register for architecture."));
op->mode = RDDEC;
@@ -495,11 +480,10 @@ get_operand (ptr, op, dst, direction)
}
if (*src == '(')
{
- /* Disp */
+ /* Disp. */
src++;
- /* Start off assuming a 16 bit offset */
-
+ /* Start off assuming a 16 bit offset. */
src = parse_exp (src, &op->exp);
@@ -578,7 +562,6 @@ get_operand (ptr, op, dst, direction)
}
}
-
if (*src == '#')
{
src++;
@@ -625,9 +608,7 @@ get_operand (ptr, op, dst, direction)
}
}
-
-static
-char *
+static char *
get_operands (noperands, op_end, operand)
unsigned int noperands;
char *op_end;
@@ -654,8 +635,8 @@ get_operands (noperands, op_end, operand)
{
operand[1].mode = 0;
}
-
break;
+
case 2:
ptr++;
get_operand (&ptr, operand + 0, 0, SRC);
@@ -668,16 +649,13 @@ get_operands (noperands, op_end, operand)
abort ();
}
-
return ptr;
}
/* Passed a pointer to a list of opcodes which use different
addressing modes, return the opcode which matches the opcodes
- provided
- */
-static
-struct h8_opcode *
+ provided. */
+static struct h8_opcode *
get_specific (opcode, operands, size)
struct h8_opcode *opcode;
struct h8_op *operands;
@@ -733,7 +711,7 @@ get_specific (opcode, operands, size)
opsize = op & SIZE;
- /* The size of the reg is v important */
+ /* The size of the reg is v important. */
if ((op & SIZE) != (x & SIZE))
found = 0;
}
@@ -741,7 +719,7 @@ get_specific (opcode, operands, size)
{
operands[i].mode &= ~ABS;
operands[i].mode |= ABSJMP;
- /* But it may not be 24 bits long */
+ /* But it may not be 24 bits long. */
if (!Hmode)
{
operands[i].mode &= ~SIZE;
@@ -750,11 +728,11 @@ get_specific (opcode, operands, size)
}
else if ((op & (KBIT | DBIT)) && (x & IMM))
{
- /* This is ok if the immediate value is sensible */
+ /* This is ok if the immediate value is sensible. */
}
else if (op & PCREL)
{
- /* The size of the displacement is important */
+ /* The size of the displacement is important. */
if ((op & SIZE) != (x & SIZE))
found = 0;
}
@@ -768,10 +746,10 @@ get_specific (opcode, operands, size)
x |= L_32;
}
/* Promote an L8 to L_16 if it makes us match. */
- if (op & ABS && op & L_8 && op & DISP)
+ if (op & ABS && op & L_8 && op & DISP)
{
if (x & L_16)
- found= 1;
+ found = 1;
}
else if ((x & SIZE) != 0
&& ((op & SIZE) != (x & SIZE)))
@@ -784,7 +762,7 @@ get_specific (opcode, operands, size)
else if ((op & MODE) != (x & MODE))
{
found = 0;
- }
+ }
}
}
}
@@ -803,29 +781,28 @@ check_operand (operand, width, string)
if (operand->exp.X_add_symbol == 0
&& operand->exp.X_op_symbol == 0)
{
+ /* No symbol involved, let's look at offset, it's dangerous if
+ any of the high bits are not 0 or ff's, find out by oring or
+ anding with the width and seeing if the answer is 0 or all
+ fs. */
- /* No symbol involved, let's look at offset, it's dangerous if any of
- the high bits are not 0 or ff's, find out by oring or anding with
- the width and seeing if the answer is 0 or all fs*/
-
if ((operand->exp.X_add_number & ~width) != 0 &&
(operand->exp.X_add_number | width) != (~0))
{
- if (width == 255
+ if (width == 255
&& (operand->exp.X_add_number & 0xff00) == 0xff00)
{
/* Just ignore this one - which happens when trying to
fit a 16 bit address truncated into an 8 bit address
of something like bset. */
}
- else
+ else
{
as_warn (_("operand %s0x%lx out of range."), string,
(unsigned long) operand->exp.X_add_number);
}
}
}
-
}
/* RELAXMODE has one of 3 values:
@@ -848,7 +825,6 @@ do_a_fix_imm (offset, operand, relaxmode)
int size;
int where;
-
char *t = operand->mode & IMM ? "#" : "@";
if (operand->exp.X_add_symbol == 0)
@@ -881,20 +857,23 @@ do_a_fix_imm (offset, operand, relaxmode)
break;
case L_32:
- /* This should be done with bfd */
+ /* This should be done with bfd. */
bytes[0] = operand->exp.X_add_number >> 24;
bytes[1] = operand->exp.X_add_number >> 16;
bytes[2] = operand->exp.X_add_number >> 8;
bytes[3] = operand->exp.X_add_number >> 0;
+ if (relaxmode != 0)
+ {
+ idx = (relaxmode == 2) ? R_MOV24B1 : R_MOVL1;
+ fix_new_exp (frag_now, offset, 4, &operand->exp, 0, idx);
+ }
break;
}
-
}
else
{
switch (operand->mode & SIZE)
{
-
case L_24:
case L_32:
size = 4;
@@ -907,7 +886,7 @@ do_a_fix_imm (offset, operand, relaxmode)
idx = R_RELLONG;
break;
default:
- as_bad(_("Can't work out size of operand.\n"));
+ as_bad (_("Can't work out size of operand.\n"));
case L_16:
size = 2;
where = 0;
@@ -915,19 +894,15 @@ do_a_fix_imm (offset, operand, relaxmode)
idx = R_MOV16B1;
else
idx = R_RELWORD;
- operand->exp.X_add_number = (short)operand->exp.X_add_number;
+ operand->exp.X_add_number =
+ ((operand->exp.X_add_number & 0xffff) ^ 0x8000) - 0x8000;
break;
case L_8:
size = 1;
where = 0;
idx = R_RELBYTE;
- /* This used to use a cast to char, but that fails if char is an
- unsigned type. We can't use `signed char', as that isn't valid
- K&R C. */
- if (operand->exp.X_add_number & 0x80)
- operand->exp.X_add_number |= ((offsetT) -1 << 8);
- else
- operand->exp.X_add_number &= 0xff;
+ operand->exp.X_add_number =
+ ((operand->exp.X_add_number & 0xff) ^ 0x80) - 0x80;
}
fix_new_exp (frag_now,
@@ -937,11 +912,9 @@ do_a_fix_imm (offset, operand, relaxmode)
0,
idx);
}
-
}
-/* Now we know what sort of opcodes it is, lets build the bytes -
- */
+/* Now we know what sort of opcodes it is, let's build the bytes. */
static void
build_bytes (this_try, operand)
struct h8_opcode *this_try;
@@ -977,7 +950,6 @@ build_bytes (this_try, operand)
}
else
{
-
if (c & (REG | IND | INC | DEC))
{
nib = operand[d].reg;
@@ -986,7 +958,7 @@ build_bytes (this_try, operand)
{
nib = dispreg;
}
- else if (c & ABS )
+ else if (c & ABS)
{
operand[d].mode = c;
absat = nibble_count / 2;
@@ -1036,7 +1008,7 @@ build_bytes (this_try, operand)
as_bad (_("Need #1 or #2 here"));
break;
}
- /* stop it making a fix */
+ /* Stop it making a fix. */
operand[0].mode = 0;
}
@@ -1052,7 +1024,12 @@ build_bytes (this_try, operand)
if (c & MACREG)
{
- nib = 2 + operand[d].reg;
+ if (operand[0].mode == MACREG)
+ /* stmac has mac[hl] as the first operand. */
+ nib = 2 + operand[0].reg;
+ else
+ /* ldmac has mac[hl] as the second operand. */
+ nib = 2 + operand[1].reg;
}
}
nibble_count++;
@@ -1083,7 +1060,7 @@ build_bytes (this_try, operand)
if (strcmp (this_try->name, "mov.b") == 0)
movb = 1;
- /* output any fixes */
+ /* Output any fixes. */
for (i = 0; i < 2; i++)
{
int x = operand[i].mode;
@@ -1114,13 +1091,8 @@ build_bytes (this_try, operand)
}
operand[i].exp.X_add_number -= 1;
- /* This used to use a cast to char, but that fails if char is an
- unsigned type. We can't use `signed char', as that isn't valid
- K&R C. */
- if (operand[i].exp.X_add_number & 0x80)
- operand[i].exp.X_add_number |= ((offsetT) -1 << 8);
- else
- operand[i].exp.X_add_number &= 0xff;
+ operand[i].exp.X_add_number =
+ ((operand[i].exp.X_add_number & 0xff) ^ 0x80) - 0x80;
fix_new_exp (frag_now,
output - frag_now->fr_literal + where,
@@ -1131,7 +1103,6 @@ build_bytes (this_try, operand)
}
else if (x & MEMIND)
{
-
check_operand (operand + i, 0xff, "@@");
fix_new_exp (frag_now,
output - frag_now->fr_literal + 1,
@@ -1142,7 +1113,7 @@ build_bytes (this_try, operand)
}
else if (x & ABSJMP)
{
- /* This jmp may be a jump or a branch */
+ /* This jmp may be a jump or a branch. */
check_operand (operand + i, Hmode ? 0xffffff : 0xffff, "@");
if (operand[i].exp.X_add_number & 1)
@@ -1151,7 +1122,8 @@ build_bytes (this_try, operand)
(unsigned long) operand->exp.X_add_number);
}
if (!Hmode)
- operand[i].exp.X_add_number = (short) operand[i].exp.X_add_number;
+ operand[i].exp.X_add_number =
+ ((operand[i].exp.X_add_number & 0xffff) ^ 0x8000) - 0x8000;
fix_new_exp (frag_now,
output - frag_now->fr_literal,
4,
@@ -1160,27 +1132,23 @@ build_bytes (this_try, operand)
R_JMPL1);
}
}
-
}
-/*
- try and give an intelligent error message for common and simple to
- detect errors
- */
-
+/* Try to give an intelligent error message for common and simple to
+ detect errors. */
static void
clever_message (opcode, operand)
struct h8_opcode *opcode;
struct h8_op *operand;
{
- /* Find out if there was more than one possible opccode */
+ /* Find out if there was more than one possible opcode. */
if ((opcode + 1)->idx != opcode->idx)
{
unsigned int argn;
- /* Only one opcode of this flavour, try and guess which operand
- didn't match */
+ /* Only one opcode of this flavour, try to guess which operand
+ didn't match. */
for (argn = 0; argn < opcode->noperands; argn++)
{
switch (opcode->args.nib[argn])
@@ -1195,7 +1163,6 @@ clever_message (opcode, operand)
break;
case RS8:
-
if (operand[argn].mode != RS8)
{
as_bad (_("source operand must be 8 bit register"));
@@ -1218,7 +1185,6 @@ clever_message (opcode, operand)
}
break;
-
case ABS16SRC:
if (operand[argn].mode != ABS16SRC)
{
@@ -1233,13 +1199,9 @@ clever_message (opcode, operand)
as_bad (_("invalid operands"));
}
-/* This is the guts of the machine-dependent assembler. STR points to a
- machine dependent instruction. This funciton is supposed to emit
- the frags/bytes it assembles to.
- */
-
-
-
+/* This is the guts of the machine-dependent assembler. STR points to
+ a machine dependent instruction. This function is supposed to emit
+ the frags/bytes it assembles. */
void
md_assemble (str)
char *str;
@@ -1254,11 +1216,11 @@ md_assemble (str)
char c;
int size;
- /* Drop leading whitespace */
+ /* Drop leading whitespace. */
while (*str == ' ')
str++;
- /* find the op code end */
+ /* Find the op code end. */
for (op_start = op_end = str;
*op_end != 0 && *op_end != ' ';
op_end++)
@@ -1272,8 +1234,6 @@ md_assemble (str)
}
}
- ;
-
if (op_end == op_start)
{
as_bad (_("can't find opcode "));
@@ -1291,7 +1251,7 @@ md_assemble (str)
return;
}
- /* We use to set input_line_pointer to the result of get_operands,
+ /* We used to set input_line_pointer to the result of get_operands,
but that is wrong. Our caller assumes we don't change it. */
(void) get_operands (opcode->noperands, op_end, operand);
@@ -1320,7 +1280,7 @@ md_assemble (str)
if (opcode == 0)
{
- /* Couldn't find an opcode which matched the operands */
+ /* Couldn't find an opcode which matched the operands. */
char *where = frag_more (2);
where[0] = 0x0;
@@ -1338,12 +1298,11 @@ md_assemble (str)
}
build_bytes (opcode, operand);
-
}
void
tc_crawl_symbol_chain (headers)
- object_headers * headers ATTRIBUTE_UNUSED;
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
@@ -1357,7 +1316,7 @@ md_undefined_symbol (name)
void
tc_headers_hook (headers)
- object_headers * headers ATTRIBUTE_UNUSED;
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_headers_hook \n"));
}
@@ -1366,10 +1325,11 @@ tc_headers_hook (headers)
/* Equal to MAX_PRECISION in atof-ieee.c */
#define MAX_LITTLENUMS 6
-/* Turn a string in input_line_pointer into a floating point constant of type
- type, and store the appropriate bytes in *litP. The number of LITTLENUMS
- emitted is stored in *sizeP . An error message is returned, or NULL on OK.
- */
+/* Turn a string in input_line_pointer into a floating point constant
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
+ returned, or NULL on OK. */
+
char *
md_atof (type, litP, sizeP)
char type;
@@ -1429,7 +1389,8 @@ CONST char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -1462,13 +1423,13 @@ md_convert_frag (headers, seg, fragP)
abort ();
}
-valueT
+valueT
md_section_align (seg, size)
segT seg;
valueT size;
{
- return ((size + (1 << section_alignment[(int) seg]) - 1) & (-1 << section_alignment[(int) seg]));
-
+ return ((size + (1 << section_alignment[(int) seg]) - 1)
+ & (-1 << section_alignment[(int) seg]));
}
void
@@ -1507,8 +1468,7 @@ md_estimate_size_before_relax (fragP, segment_type)
abort ();
}
-/* Put number into target byte order */
-
+/* Put number into target byte order. */
void
md_number_to_chars (ptr, use, nbytes)
char *ptr;
@@ -1517,6 +1477,7 @@ md_number_to_chars (ptr, use, nbytes)
{
number_to_chars_bigendian (ptr, use, nbytes);
}
+
long
md_pcrel_from (fixP)
fixS *fixP ATTRIBUTE_UNUSED;
@@ -1524,7 +1485,6 @@ md_pcrel_from (fixP)
abort ();
}
-
void
tc_reloc_mangle (fix_ptr, intr, base)
fixS *fix_ptr;
@@ -1537,7 +1497,7 @@ tc_reloc_mangle (fix_ptr, intr, base)
symbol_ptr = fix_ptr->fx_addsy;
/* If this relocation is attached to a symbol then it's ok
- to output it */
+ to output it. */
if (fix_ptr->fx_r_type == TC_CONS_RELOC)
{
/* cons likes to create reloc32's whatever the size of the reloc..
@@ -1555,9 +1515,7 @@ tc_reloc_mangle (fix_ptr, intr, base)
break;
default:
abort ();
-
}
-
}
else
{
@@ -1588,8 +1546,4 @@ tc_reloc_mangle (fix_ptr, intr, base)
}
else
intr->r_symndx = -1;
-
-
}
-
-/* end of tc-h8300.c */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-h8300.h b/gnu/usr.bin/binutils/gas/config/tc-h8300.h
index 2a2a7040f3c..06530a49f14 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-h8300.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-h8300.h
@@ -1,5 +1,6 @@
/* This file is tc-h8300.h
- Copyright (C) 1987-1992, 93, 94, 95, 96, 97, 1998
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,7 +20,6 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-
#define TC_H8300
#define TARGET_BYTES_BIG_ENDIAN 1
@@ -31,7 +31,7 @@ struct internal_reloc;
#define WORKING_DOT_WORD
/* This macro translates between an internal fix and an coff reloc type */
-#define TC_COFF_FIX2RTYPE(fixP) abort();
+#define TC_COFF_FIX2RTYPE(fixP) abort ();
#define BFD_ARCH bfd_arch_h8300
#define COFF_MAGIC ( Smode ? 0x8302 : Hmode ? 0x8301 : 0x8300)
@@ -54,5 +54,3 @@ extern int Hmode;
extern int Smode;
#define md_operand(x)
-
-/* end of tc-h8300.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-h8500.c b/gnu/usr.bin/binutils/gas/config/tc-h8500.c
index 9dec3e2e6a2..a13c94268ed 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-h8500.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-h8500.c
@@ -1,5 +1,6 @@
/* tc-h8500.c -- Assemble code for the Hitachi H8/500
- Copyright (C) 1993, 94, 95, 1998 Free Software Foundation.
+ Copyright 1993, 1994, 1995, 1998, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,10 +19,7 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*
- Written By Steve Chamberlain
- sac@cygnus.com
- */
+/* Written By Steve Chamberlain <sac@cygnus.com>. */
#include <stdio.h>
#include "as.h"
@@ -88,13 +86,37 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define WORD_F 32767
#define WORD_B 32768
-relax_typeS md_relax_table[C (END, 0)];
+relax_typeS md_relax_table[C (END, 0)] = {
+ { 0, 0, 0, 0 },
+ { 0, 0, 0, 0 },
+ { 0, 0, 0, 0 },
+ { 0, 0, 0, 0 },
+
+ /* BRANCH */
+ { 0, 0, 0, 0 },
+ { BYTE_F, BYTE_B, 2, C (BRANCH, WORD_DISP) },
+ { WORD_F, WORD_B, 3, 0 },
+ { 0, 0, 3, 0 },
+
+ /* SCB_F */
+ { 0, 0, 0, 0 },
+ { BYTE_F, BYTE_B, 3, C (SCB_F, WORD_DISP) },
+ { WORD_F, WORD_B, 8, 0 },
+ { 0, 0, 8, 0 },
+
+ /* SCB_TST */
+ { 0, 0, 0, 0 },
+ { BYTE_F, BYTE_B, 3, C (SCB_TST, WORD_DISP) },
+ { WORD_F, WORD_B, 10, 0 },
+ { 0, 0, 10, 0 }
+
+};
static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
/*
This function is called once, at assembler startup time. This should
- set up all the tables, etc that the MD part of the assembler needs
+ set up all the tables, etc. that the MD part of the assembler needs
*/
void
@@ -103,7 +125,6 @@ md_begin ()
h8500_opcode_info *opcode;
char prev_buffer[100];
int idx = 0;
- register relax_typeS *table;
opcode_hash_control = hash_new ();
prev_buffer[0] = 0;
@@ -117,40 +138,6 @@ md_begin ()
idx++;
}
}
-
- /* Initialize the relax table. We use a local variable to avoid
- warnings about modifying a supposedly const data structure. */
- table = (relax_typeS *) md_relax_table;
- table[C (BRANCH, BYTE_DISP)].rlx_forward = BYTE_F;
- table[C (BRANCH, BYTE_DISP)].rlx_backward = BYTE_B;
- table[C (BRANCH, BYTE_DISP)].rlx_length = 2;
- table[C (BRANCH, BYTE_DISP)].rlx_more = C (BRANCH, WORD_DISP);
-
- table[C (BRANCH, WORD_DISP)].rlx_forward = WORD_F;
- table[C (BRANCH, WORD_DISP)].rlx_backward = WORD_B;
- table[C (BRANCH, WORD_DISP)].rlx_length = 3;
- table[C (BRANCH, WORD_DISP)].rlx_more = 0;
-
- table[C (SCB_F, BYTE_DISP)].rlx_forward = BYTE_F;
- table[C (SCB_F, BYTE_DISP)].rlx_backward = BYTE_B;
- table[C (SCB_F, BYTE_DISP)].rlx_length = 3;
- table[C (SCB_F, BYTE_DISP)].rlx_more = C (SCB_F, WORD_DISP);
-
- table[C (SCB_F, WORD_DISP)].rlx_forward = WORD_F;
- table[C (SCB_F, WORD_DISP)].rlx_backward = WORD_B;
- table[C (SCB_F, WORD_DISP)].rlx_length = 8;
- table[C (SCB_F, WORD_DISP)].rlx_more = 0;
-
- table[C (SCB_TST, BYTE_DISP)].rlx_forward = BYTE_F;
- table[C (SCB_TST, BYTE_DISP)].rlx_backward = BYTE_B;
- table[C (SCB_TST, BYTE_DISP)].rlx_length = 3;
- table[C (SCB_TST, BYTE_DISP)].rlx_more = C (SCB_TST, WORD_DISP);
-
- table[C (SCB_TST, WORD_DISP)].rlx_forward = WORD_F;
- table[C (SCB_TST, WORD_DISP)].rlx_backward = WORD_B;
- table[C (SCB_TST, WORD_DISP)].rlx_length = 10;
- table[C (SCB_TST, WORD_DISP)].rlx_more = 0;
-
}
static int rn; /* register number used by RN */
@@ -180,7 +167,8 @@ typedef struct
h8500_operand_info;
-/* try and parse a reg name, returns number of chars consumed */
+/* Try to parse a reg name. Return the number of chars consumed. */
+
static int
parse_reg (src, mode, reg)
char *src;
@@ -193,7 +181,7 @@ parse_reg (src, mode, reg)
/* Cribbed from get_symbol_end(). */
if (!is_name_beginner (*src) || *src == '\001')
return 0;
- end = src+1;
+ end = src + 1;
while (is_part_of_name (*end) || *end == '\001')
end++;
len = end - src;
@@ -258,8 +246,7 @@ parse_reg (src, mode, reg)
return 0;
}
-static
-char *
+static char *
parse_exp (s, op, page)
char *s;
expressionS *op;
@@ -305,7 +292,6 @@ typedef enum
exp_signed, exp_unsigned, exp_sandu
} sign_type;
-
static char *
skip_colonthing (sign, ptr, exp, def, size8, size16, size24)
sign_type sign;
@@ -498,7 +484,7 @@ get_operand (ptr, op, ispage)
/* Disp */
src++;
- src = skip_colonthing (exp_signed, src,
+ src = skip_colonthing (exp_signed, src,
op, RNIND_D16, RNIND_D8, RNIND_D16, 0);
if (*src != ',')
@@ -573,8 +559,7 @@ get_operand (ptr, op, ispage)
}
}
-static
-char *
+static char *
get_operands (info, args, operand)
h8500_opcode_info *info;
char *args;
@@ -613,13 +598,11 @@ get_operands (info, args, operand)
/* Passed a pointer to a list of opcodes which use different
addressing modes, return the opcode which matches the opcodes
- provided
- */
+ provided. */
int pcrel8; /* Set when we've seen a pcrel operand */
-static
-h8500_opcode_info *
+static h8500_opcode_info *
get_specific (opcode, operands)
h8500_opcode_info *opcode;
h8500_operand_info *operands;
@@ -875,8 +858,7 @@ check (operand, low, high)
return operand->X_add_number;
}
-static
-void
+static void
insert (output, index, exp, reloc, pcrel)
char *output;
int index;
@@ -898,8 +880,8 @@ build_relaxable_instruction (opcode, operand)
h8500_operand_info *operand;
{
/* All relaxable instructions start life as two bytes but can become
- three bytes long if a lonely branch and up to 9 bytes if long scb
- */
+ three bytes long if a lonely branch and up to 9 bytes if long
+ scb. */
char *p;
int len;
int type;
@@ -933,8 +915,8 @@ build_relaxable_instruction (opcode, operand)
}
}
-/* Now we know what sort of opcodes it is, lets build the bytes -
- */
+/* Now we know what sort of opcodes it is, let's build the bytes. */
+
static void
build_bytes (opcode, operand)
h8500_opcode_info *opcode;
@@ -969,7 +951,6 @@ build_bytes (opcode, operand)
break;
case RD:
case RDIND:
-
output[index] |= rd;
break;
case RS:
@@ -983,37 +964,32 @@ build_bytes (opcode, operand)
case FPIND_D8:
insert (output, index, &displacement, R_H8500_IMM8, 0);
break;
-
case IMM16:
{
int p;
- switch (immediate_inpage) {
- case 'p':
- p = R_H8500_HIGH16;
- break;
- case 'h':
- p = R_H8500_HIGH16;
- break;
- default:
- p = R_H8500_IMM16;
- break;
- }
-
- insert (output, index, &immediate,p, 0);
+
+ switch (immediate_inpage)
+ {
+ case 'p':
+ p = R_H8500_HIGH16;
+ break;
+ case 'h':
+ p = R_H8500_HIGH16;
+ break;
+ default:
+ p = R_H8500_IMM16;
+ break;
+ }
+ insert (output, index, &immediate, p, 0);
}
-
index++;
break;
case RLIST:
case IMM8:
if (immediate_inpage)
- {
- insert (output, index, &immediate, R_H8500_HIGH8, 0);
- }
+ insert (output, index, &immediate, R_H8500_HIGH8, 0);
else
- {
- insert (output, index, &immediate, R_H8500_IMM8, 0);
- }
+ insert (output, index, &immediate, R_H8500_IMM8, 0);
break;
case PCREL16:
insert (output, index, &displacement, R_H8500_PCREL16, 1);
@@ -1026,19 +1002,12 @@ build_bytes (opcode, operand)
output[index] |= check (&immediate, 0, 15);
break;
case CR:
-
output[index] |= cr;
if (cr == 0)
- {
- output[0] |= 0x8;
- }
+ output[0] |= 0x8;
else
- {
- output[0] &= ~0x8;
- }
-
+ output[0] &= ~0x8;
break;
-
case CRB:
output[index] |= crb;
output[0] &= ~0x8;
@@ -1080,14 +1049,13 @@ build_bytes (opcode, operand)
}
}
-/* This is the guts of the machine-dependent assembler. STR points to a
- machine dependent instruction. This funciton is supposed to emit
- the frags/bytes it assembles to.
- */
+/* This is the guts of the machine-dependent assembler. STR points to
+ a machine dependent instruction. This function is supposed to emit
+ the frags/bytes it assembles to. */
void
-DEFUN (md_assemble, (str),
- char *str)
+md_assemble (str)
+ char *str;
{
char *op_start;
char *op_end;
@@ -1098,14 +1066,13 @@ DEFUN (md_assemble, (str),
int nlen = 0;
- /* Drop leading whitespace */
+ /* Drop leading whitespace. */
while (*str == ' ')
str++;
- /* find the op code end */
+ /* Find the op code end. */
for (op_start = op_end = str;
- *op_end &&
- !is_end_of_line[*op_end] && *op_end != ' ';
+ !is_end_of_line[(unsigned char) *op_end] && *op_end != ' ';
op_end++)
{
if ( /**op_end != '.'
@@ -1118,9 +1085,7 @@ DEFUN (md_assemble, (str),
name[nlen] = 0;
if (op_end == op_start)
- {
- as_bad (_("can't find opcode "));
- }
+ as_bad (_("can't find opcode "));
opcode = (h8500_opcode_info *) hash_find (opcode_hash_control, name);
@@ -1147,38 +1112,38 @@ DEFUN (md_assemble, (str),
}
build_bytes (opcode, operand);
-
}
void
-DEFUN (tc_crawl_symbol_chain, (headers),
- object_headers * headers)
+tc_crawl_symbol_chain (headers)
+ object_headers *headers;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
symbolS *
-DEFUN (md_undefined_symbol, (name),
- char *name)
+md_undefined_symbol (name)
+ char *name;
{
return 0;
}
void
-DEFUN (tc_headers_hook, (headers),
- object_headers * headers)
+tc_headers_hook (headers)
+ object_headers *headers;
{
printf (_("call to tc_headers_hook \n"));
}
-/* Various routines to kill one day */
-/* Equal to MAX_PRECISION in atof-ieee.c */
+/* Various routines to kill one day. */
+/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-/* Turn a string in input_line_pointer into a floating point constant of type
- type, and store the appropriate bytes in *litP. The number of LITTLENUMS
- emitted is stored in *sizeP . An error message is returned, or NULL on OK.
- */
+/* Turn a string in input_line_pointer into a floating point constant
+ of type type, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
+ returned, or NULL on OK. */
+
char *
md_atof (type, litP, sizeP)
char type;
@@ -1238,7 +1203,7 @@ CONST char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -1261,8 +1226,7 @@ tc_aout_fix_to_chars ()
abort ();
}
-static
-void
+static void
wordify_scb (buffer, disp_size, inst_size)
char *buffer;
int *disp_size;
@@ -1322,14 +1286,14 @@ wordify_scb (buffer, disp_size, inst_size)
*buffer++ = 0x04; /* cmp #0xff:8, rn */
*buffer++ = 0xff;
*buffer++ = 0x70 | rn;
- *buffer++ = 0x36; /* bne ... */
+ *buffer++ = 0x36; /* bne ... */
*buffer++ = 0;
*buffer++ = 0;
}
-/*
-called after relaxing, change the frags so they know how big they are
-*/
+/* Called after relaxing, change the frags so they know how big they
+ are. */
+
void
md_convert_frag (headers, seg, fragP)
object_headers *headers;
@@ -1353,9 +1317,9 @@ md_convert_frag (headers, seg, fragP)
inst_size = 2;
break;
- /* Branches to a known 16 bit displacement */
+ /* Branches to a known 16 bit displacement. */
- /* Turn on the 16bit bit */
+ /* Turn on the 16bit bit. */
case C (BRANCH, WORD_DISP):
case C (SCB_F, WORD_DISP):
case C (SCB_TST, WORD_DISP):
@@ -1365,8 +1329,8 @@ md_convert_frag (headers, seg, fragP)
case C (BRANCH, UNDEF_WORD_DISP):
case C (SCB_F, UNDEF_WORD_DISP):
case C (SCB_TST, UNDEF_WORD_DISP):
- /* This tried to be relaxed, but didn't manage it, it now needs a
- fix */
+ /* This tried to be relaxed, but didn't manage it, it now needs
+ a fix. */
wordify_scb (buffer, &disp_size, &inst_size);
/* Make a reloc */
@@ -1379,7 +1343,6 @@ md_convert_frag (headers, seg, fragP)
R_H8500_PCREL16);
fragP->fr_fix += disp_size + inst_size;
- fragP->fr_var = 0;
return;
break;
default:
@@ -1395,7 +1358,6 @@ md_convert_frag (headers, seg, fragP)
md_number_to_chars (buffer + inst_size, disp, disp_size);
fragP->fr_fix += disp_size + inst_size;
- fragP->fr_var = 0;
}
}
@@ -1404,7 +1366,7 @@ md_section_align (seg, size)
segT seg ;
valueT size;
{
- return ((size + (1 << section_alignment[(int) seg]) - 1)
+ return ((size + (1 << section_alignment[(int) seg]) - 1)
& (-1 << section_alignment[(int) seg]));
}
@@ -1467,35 +1429,50 @@ md_estimate_size_before_relax (fragP, segment_type)
register fragS *fragP;
register segT segment_type;
{
- int what = GET_WHAT (fragP->fr_subtype);
+ int what;
switch (fragP->fr_subtype)
{
default:
abort ();
+
case C (BRANCH, UNDEF_BYTE_DISP):
case C (SCB_F, UNDEF_BYTE_DISP):
case C (SCB_TST, UNDEF_BYTE_DISP):
+ what = GET_WHAT (fragP->fr_subtype);
/* used to be a branch to somewhere which was unknown */
if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
{
/* Got a symbol and it's defined in this segment, become byte
- sized - maybe it will fix up */
+ sized - maybe it will fix up. */
fragP->fr_subtype = C (what, BYTE_DISP);
- fragP->fr_var = md_relax_table[C (what, BYTE_DISP)].rlx_length;
}
else
{
- /* Its got a segment, but its not ours, so it will always be long */
+ /* Its got a segment, but its not ours, so it will always be
+ long. */
fragP->fr_subtype = C (what, UNDEF_WORD_DISP);
- fragP->fr_var = md_relax_table[C (what, WORD_DISP)].rlx_length;
- return md_relax_table[C (what, WORD_DISP)].rlx_length;
}
+ break;
+
+ case C (BRANCH, BYTE_DISP):
+ case C (BRANCH, WORD_DISP):
+ case C (BRANCH, UNDEF_WORD_DISP):
+ case C (SCB_F, BYTE_DISP):
+ case C (SCB_F, WORD_DISP):
+ case C (SCB_F, UNDEF_WORD_DISP):
+ case C (SCB_TST, BYTE_DISP):
+ case C (SCB_TST, WORD_DISP):
+ case C (SCB_TST, UNDEF_WORD_DISP):
+ /* When relaxing a section for the second time, we don't need to
+ do anything besides return the current size. */
+ break;
}
- return fragP->fr_var;
+
+ return md_relax_table[fragP->fr_subtype].rlx_length;
}
-/* Put number into target byte order */
+/* Put number into target byte order. */
void
md_number_to_chars (ptr, use, nbytes)
@@ -1513,7 +1490,6 @@ md_pcrel_from (fixP)
return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address;
}
-/*ARGSUSED*/
void
tc_coff_symbol_emit_hook (ignore)
symbolS *ignore;
@@ -1588,8 +1564,10 @@ tc_reloc_mangle (fix_ptr, intr, base)
dot = segment_info[S_GET_SEGMENT (symbol_ptr)].dot;
if (dot)
{
- /* intr->r_offset -=
- segment_info[S_GET_SEGMENT(symbol_ptr)].scnhdr.s_paddr;*/
+#if 0
+ intr->r_offset -=
+ segment_info[S_GET_SEGMENT (symbol_ptr)].scnhdr.s_paddr;
+#endif
intr->r_offset += S_GET_VALUE (symbol_ptr);
intr->r_symndx = dot->sy_number;
}
@@ -1606,8 +1584,6 @@ tc_reloc_mangle (fix_ptr, intr, base)
}
-
-
int
start_label (ptr)
char *ptr;
@@ -1621,13 +1597,9 @@ start_label (ptr)
return 1;
}
-
int
tc_coff_sizemachdep (frag)
fragS *frag;
{
return md_relax_table[frag->fr_subtype].rlx_length;
}
-
-/* end of tc-h8500.c */
-
diff --git a/gnu/usr.bin/binutils/gas/config/tc-h8500.h b/gnu/usr.bin/binutils/gas/config/tc-h8500.h
index 2a53ec35ce2..9f7b6276c0e 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-h8500.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-h8500.h
@@ -1,5 +1,5 @@
/* This file is tc-h8500.h
- Copyright (C) 1993, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,7 +18,6 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-
#define TC_H8500
#define TARGET_BYTES_BIG_ENDIAN 1
@@ -53,5 +52,3 @@ extern void tc_reloc_mangle
extern struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
-
-/* end of tc-h8500.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-hppa.c b/gnu/usr.bin/binutils/gas/config/tc-hppa.c
index 7e95a4ad6d0..fe877cbd650 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-hppa.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-hppa.c
@@ -1,5 +1,5 @@
/* tc-hppa.c -- Assemble for the PA
- Copyright (C) 1989, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,7 +19,6 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-
/* HP PA-RISC support was contributed by the Center for Software Science
at the University of Utah. */
@@ -30,7 +29,6 @@
#include "subsegs.h"
#include "bfd/libhppa.h"
-#include "bfd/libbfd.h"
/* Be careful, this file includes data *declarations*. */
#include "opcode/hppa.h"
@@ -44,19 +42,19 @@ error only one of OBJ_ELF and OBJ_SOM can be defined
then we want to use the assembler support for compact line numbers. */
#ifdef OBJ_ELF
#include "dwarf2dbg.h"
-struct dwarf2_line_info debug_line;
-#endif
/* A "convient" place to put object file dependencies which do
not need to be seen outside of tc-hppa.c. */
-#ifdef OBJ_ELF
+
/* Object file formats specify relocation types. */
-typedef elf_hppa_reloc_type reloc_type;
+typedef enum elf_hppa_reloc_type reloc_type;
/* Object file formats specify BFD symbol types. */
typedef elf_symbol_type obj_symbol_type;
+#define symbol_arg_reloc_info(sym)\
+ (((obj_symbol_type *) symbol_get_bfdsym (sym))->tc_data.hppa_arg_reloc)
-#ifdef BFD64
+#if TARGET_ARCH_SIZE == 64
/* How to generate a relocation. */
#define hppa_gen_reloc_type _bfd_elf64_hppa_gen_reloc_type
#else
@@ -69,7 +67,7 @@ typedef elf_symbol_type obj_symbol_type;
#define obj_copyright obj_elf_version
#define UNWIND_SECTION_NAME ".PARISC.unwind"
-#endif
+#endif /* OBJ_ELF */
#ifdef OBJ_SOM
/* Names of various debugging spaces/subspaces. */
@@ -90,12 +88,13 @@ typedef int reloc_type;
/* Object file formats specify BFD symbol types. */
typedef som_symbol_type obj_symbol_type;
+#define symbol_arg_reloc_info(sym)\
+ (((obj_symbol_type *) symbol_get_bfdsym (sym))->tc_data.ap.hppa_arg_reloc)
/* This apparently isn't in older versions of hpux reloc.h. */
#ifndef R_DLT_REL
#define R_DLT_REL 0x78
#endif
-#endif
#ifndef R_N0SEL
#define R_N0SEL 0xd8
@@ -104,6 +103,13 @@ typedef som_symbol_type obj_symbol_type;
#ifndef R_N1SEL
#define R_N1SEL 0xd9
#endif
+#endif /* OBJ_SOM */
+
+#if TARGET_ARCH_SIZE == 64
+#define DEFAULT_LEVEL 25
+#else
+#define DEFAULT_LEVEL 10
+#endif
/* Various structures and types used internally in tc-hppa.c. */
@@ -133,6 +139,31 @@ struct unwind_desc
unsigned int frame_size:27;
};
+/* We can't rely on compilers placing bitfields in any particular
+ place, so use these macros when dumping unwind descriptors to
+ object files. */
+#define UNWIND_LOW32(U) \
+ (((U)->cannot_unwind << 31) \
+ | ((U)->millicode << 30) \
+ | ((U)->millicode_save_rest << 29) \
+ | ((U)->region_desc << 27) \
+ | ((U)->save_sr << 25) \
+ | ((U)->entry_fr << 21) \
+ | ((U)->entry_gr << 16) \
+ | ((U)->args_stored << 15) \
+ | ((U)->call_fr << 10) \
+ | ((U)->call_gr << 5) \
+ | ((U)->save_sp << 4) \
+ | ((U)->save_rp << 3) \
+ | ((U)->save_rp_in_frame << 2) \
+ | ((U)->extn_ptr_defined << 1) \
+ | ((U)->cleanup_defined << 0))
+
+#define UNWIND_HIGH32(U) \
+ (((U)->hpe_interrupt_marker << 31) \
+ | ((U)->hpux_interrupt_marker << 30) \
+ | ((U)->frame_size << 0))
+
struct unwind_table
{
/* Starting and ending offsets of the region described by
@@ -219,7 +250,7 @@ struct pa_it
/* Holds any argument relocation bits associated with this
instruction. (instruction should be some sort of call). */
- long arg_reloc;
+ unsigned int arg_reloc;
/* The format specification for this instruction. */
int format;
@@ -230,7 +261,6 @@ struct pa_it
/* PA-89 floating point registers are arranged like this:
-
+--------------+--------------+
| 0 or 16L | 16 or 16R |
+--------------+--------------+
@@ -247,23 +277,7 @@ struct pa_it
| 14 or 30L | 30 or 30R |
+--------------+--------------+
| 15 or 31L | 31 or 31R |
- +--------------+--------------+
-
-
- The following is a version of pa_parse_number that
- handles the L/R notation and returns the correct
- value to put into the instruction register field.
- The correct value to put into the instruction is
- encoded in the structure 'pa_11_fp_reg_struct'. */
-
-struct pa_11_fp_reg_struct
- {
- /* The register number. */
- char number_part;
-
- /* L/R selector. */
- char l_r_select;
- };
+ +--------------+--------------+ */
/* Additional information needed to build argument relocation stubs. */
struct call_desc
@@ -438,7 +452,7 @@ struct hppa_fix_struct
int fx_r_format;
/* Argument relocation bits. */
- long fx_arg_reloc;
+ unsigned int fx_arg_reloc;
/* The segment this fixup appears in. */
segT segment;
@@ -474,15 +488,18 @@ struct selector_entry
static void pa_check_current_space_and_subspace PARAMS ((void));
#endif
+#if !(defined (OBJ_ELF) && defined (TE_LINUX))
+static void pa_text PARAMS ((int));
+static void pa_data PARAMS ((int));
+static void pa_comm PARAMS ((int));
+#endif
static fp_operand_format pa_parse_fp_format PARAMS ((char **s));
static void pa_cons PARAMS ((int));
-static void pa_data PARAMS ((int));
static void pa_float_cons PARAMS ((int));
static void pa_fill PARAMS ((int));
static void pa_lcomm PARAMS ((int));
static void pa_lsym PARAMS ((int));
static void pa_stringer PARAMS ((int));
-static void pa_text PARAMS ((int));
static void pa_version PARAMS ((int));
static int pa_parse_fp_cmp_cond PARAMS ((char **));
static int get_expression PARAMS ((char *));
@@ -504,8 +521,6 @@ static void pa_try PARAMS ((int));
static void pa_call PARAMS ((int));
static void pa_call_args PARAMS ((struct call_desc *));
static void pa_callinfo PARAMS ((int));
-static void pa_code PARAMS ((int));
-static void pa_comm PARAMS ((int));
static void pa_copyright PARAMS ((int));
static void pa_end PARAMS ((int));
static void pa_enter PARAMS ((int));
@@ -523,11 +538,11 @@ static void pa_proc PARAMS ((int));
static void pa_procend PARAMS ((int));
static void pa_param PARAMS ((int));
static void pa_undefine_label PARAMS ((void));
-static int need_pa11_opcode PARAMS ((struct pa_it *,
- struct pa_11_fp_reg_struct *));
-static int pa_parse_number PARAMS ((char **, struct pa_11_fp_reg_struct *));
+static int need_pa11_opcode PARAMS ((void));
+static int pa_parse_number PARAMS ((char **, int));
static label_symbol_struct *pa_get_label PARAMS ((void));
#ifdef OBJ_SOM
+static int log2 PARAMS ((int));
static void pa_compiler PARAMS ((int));
static void pa_align PARAMS ((int));
static void pa_space PARAMS ((int));
@@ -559,16 +574,15 @@ static void pa_spaces_begin PARAMS ((void));
#endif
static void pa_ip PARAMS ((char *));
static void fix_new_hppa PARAMS ((fragS *, int, int, symbolS *,
- long, expressionS *, int,
+ offsetT, expressionS *, int,
bfd_reloc_code_real_type,
enum hppa_reloc_field_selector_type_alt,
- int, long, int *));
+ int, unsigned int, int));
static int is_end_of_statement PARAMS ((void));
static int reg_name_search PARAMS ((char *));
static int pa_chk_field_selector PARAMS ((char **));
static int is_same_frag PARAMS ((fragS *, fragS *));
static void process_exit PARAMS ((void));
-static int log2 PARAMS ((int));
static unsigned int pa_stringer_aux PARAMS ((char *));
static fp_operand_format pa_parse_fp_cnv_format PARAMS ((char **s));
static int pa_parse_ftest_gfx_completer PARAMS ((char **));
@@ -576,6 +590,8 @@ static int pa_parse_ftest_gfx_completer PARAMS ((char **));
#ifdef OBJ_ELF
static void hppa_elf_mark_end_of_function PARAMS ((void));
static void pa_build_unwind_subspace PARAMS ((struct call_info *));
+static void pa_vtable_entry PARAMS ((int));
+static void pa_vtable_inherit PARAMS ((int));
#endif
/* File and gloally scoped variable declarations. */
@@ -604,10 +620,6 @@ static struct call_desc last_call_desc;
/* handle of the OPCODE hash table */
static struct hash_control *op_hash = NULL;
-/* 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[] = ";";
-
/* Table of pseudo ops for the PA. FIXME -- how many of these
are now redundant with the overall GAS and the object file
dependent tables? */
@@ -628,25 +640,33 @@ const pseudo_typeS md_pseudo_table[] =
{"byte", pa_cons, 1},
{"call", pa_call, 0},
{"callinfo", pa_callinfo, 0},
- {"code", pa_code, 0},
+#if defined (OBJ_ELF) && defined (TE_LINUX)
+ {"code", obj_elf_text, 0},
+#else
+ {"code", pa_text, 0},
{"comm", pa_comm, 0},
+#endif
#ifdef OBJ_SOM
{"compiler", pa_compiler, 0},
#endif
{"copyright", pa_copyright, 0},
+#if !(defined (OBJ_ELF) && defined (TE_LINUX))
{"data", pa_data, 0},
+#endif
{"double", pa_float_cons, 'd'},
{"dword", pa_cons, 8},
{"end", pa_end, 0},
{"end_brtab", pa_brtab, 0},
+#if !(defined (OBJ_ELF) && defined (TE_LINUX))
{"end_try", pa_try, 0},
+#endif
{"enter", pa_enter, 0},
{"entry", pa_entry, 0},
{"equ", pa_equ, 0},
{"exit", pa_exit, 0},
{"export", pa_export, 0},
#ifdef OBJ_ELF
- { "file", dwarf2_directive_file },
+ {"file", dwarf2_directive_file, 0 },
#endif
{"fill", pa_fill, 0},
{"float", pa_float_cons, 'f'},
@@ -658,7 +678,7 @@ const pseudo_typeS md_pseudo_table[] =
{"leave", pa_leave, 0},
{"level", pa_level, 0},
#ifdef OBJ_ELF
- { "loc", dwarf2_directive_loc },
+ {"loc", dwarf2_directive_loc, 0 },
#endif
{"long", pa_cons, 4},
{"lsym", pa_lsym, 0},
@@ -684,8 +704,14 @@ const pseudo_typeS md_pseudo_table[] =
#ifdef OBJ_SOM
{"subspa", pa_subspace, 0},
#endif
+#if !(defined (OBJ_ELF) && defined (TE_LINUX))
{"text", pa_text, 0},
+#endif
{"version", pa_version, 0},
+#ifdef OBJ_ELF
+ {"vtable_entry", pa_vtable_entry, 0},
+ {"vtable_inherit", pa_vtable_inherit, 0},
+#endif
{"word", pa_cons, 4},
{NULL, 0, 0}
};
@@ -698,9 +724,13 @@ const pseudo_typeS md_pseudo_table[] =
first line of the input file. This is because the compiler outputs
#NO_APP at the beginning of its output.
- Also note that C style comments will always work. */
+ Also note that C style comments will always work. */
const char line_comment_chars[] = "#";
+/* 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 characters which act as line separators. */
const char line_separator_chars[] = "!";
@@ -731,7 +761,7 @@ static int within_entry_exit;
/* Nonzero if the assembler is currently within a procedure definition. */
static int within_procedure;
-/* Handle on strucutre which keep track of the last symbol
+/* Handle on structure which keep track of the last symbol
seen in each subspace. */
static label_symbol_struct *label_symbols_rootp = NULL;
@@ -744,6 +774,15 @@ static int hppa_field_selector;
strict syntax checking should be enabled for that instruction. */
static int strict = 0;
+/* pa_parse_number returns values in `pa_number'. Mostly
+ pa_parse_number is used to return a register number, with floating
+ point registers being numbered from FP_REG_BASE upwards.
+ The bit specified with FP_REG_RSEL is set if the floating point
+ register has a `r' suffix. */
+#define FP_REG_BASE 64
+#define FP_REG_RSEL 128
+static int pa_number;
+
#ifdef OBJ_SOM
/* A dummy bfd symbol so that all relocations have symbols of some kind. */
static symbolS *dummy_symbol;
@@ -776,206 +815,206 @@ static int print_errors = 1;
Almost every control register has a synonym; they are not listed
here for brevity.
- The table is sorted. Suitable for searching by a binary search. */
+ The table is sorted. Suitable for searching by a binary search. */
static const struct pd_reg pre_defined_registers[] =
{
- {"%arg0", 26},
- {"%arg1", 25},
- {"%arg2", 24},
- {"%arg3", 23},
- {"%cr0", 0},
- {"%cr10", 10},
- {"%cr11", 11},
- {"%cr12", 12},
- {"%cr13", 13},
- {"%cr14", 14},
- {"%cr15", 15},
- {"%cr16", 16},
- {"%cr17", 17},
- {"%cr18", 18},
- {"%cr19", 19},
- {"%cr20", 20},
- {"%cr21", 21},
- {"%cr22", 22},
- {"%cr23", 23},
- {"%cr24", 24},
- {"%cr25", 25},
- {"%cr26", 26},
- {"%cr27", 27},
- {"%cr28", 28},
- {"%cr29", 29},
- {"%cr30", 30},
- {"%cr31", 31},
- {"%cr8", 8},
- {"%cr9", 9},
- {"%dp", 27},
- {"%eiem", 15},
- {"%eirr", 23},
- {"%fr0", 0},
- {"%fr0l", 0},
- {"%fr0r", 0},
- {"%fr1", 1},
- {"%fr10", 10},
- {"%fr10l", 10},
- {"%fr10r", 10},
- {"%fr11", 11},
- {"%fr11l", 11},
- {"%fr11r", 11},
- {"%fr12", 12},
- {"%fr12l", 12},
- {"%fr12r", 12},
- {"%fr13", 13},
- {"%fr13l", 13},
- {"%fr13r", 13},
- {"%fr14", 14},
- {"%fr14l", 14},
- {"%fr14r", 14},
- {"%fr15", 15},
- {"%fr15l", 15},
- {"%fr15r", 15},
- {"%fr16", 16},
- {"%fr16l", 16},
- {"%fr16r", 16},
- {"%fr17", 17},
- {"%fr17l", 17},
- {"%fr17r", 17},
- {"%fr18", 18},
- {"%fr18l", 18},
- {"%fr18r", 18},
- {"%fr19", 19},
- {"%fr19l", 19},
- {"%fr19r", 19},
- {"%fr1l", 1},
- {"%fr1r", 1},
- {"%fr2", 2},
- {"%fr20", 20},
- {"%fr20l", 20},
- {"%fr20r", 20},
- {"%fr21", 21},
- {"%fr21l", 21},
- {"%fr21r", 21},
- {"%fr22", 22},
- {"%fr22l", 22},
- {"%fr22r", 22},
- {"%fr23", 23},
- {"%fr23l", 23},
- {"%fr23r", 23},
- {"%fr24", 24},
- {"%fr24l", 24},
- {"%fr24r", 24},
- {"%fr25", 25},
- {"%fr25l", 25},
- {"%fr25r", 25},
- {"%fr26", 26},
- {"%fr26l", 26},
- {"%fr26r", 26},
- {"%fr27", 27},
- {"%fr27l", 27},
- {"%fr27r", 27},
- {"%fr28", 28},
- {"%fr28l", 28},
- {"%fr28r", 28},
- {"%fr29", 29},
- {"%fr29l", 29},
- {"%fr29r", 29},
- {"%fr2l", 2},
- {"%fr2r", 2},
- {"%fr3", 3},
- {"%fr30", 30},
- {"%fr30l", 30},
- {"%fr30r", 30},
- {"%fr31", 31},
- {"%fr31l", 31},
- {"%fr31r", 31},
- {"%fr3l", 3},
- {"%fr3r", 3},
- {"%fr4", 4},
- {"%fr4l", 4},
- {"%fr4r", 4},
- {"%fr5", 5},
- {"%fr5l", 5},
- {"%fr5r", 5},
- {"%fr6", 6},
- {"%fr6l", 6},
- {"%fr6r", 6},
- {"%fr7", 7},
- {"%fr7l", 7},
- {"%fr7r", 7},
- {"%fr8", 8},
- {"%fr8l", 8},
- {"%fr8r", 8},
- {"%fr9", 9},
- {"%fr9l", 9},
- {"%fr9r", 9},
- {"%hta", 25},
- {"%iir", 19},
- {"%ior", 21},
- {"%ipsw", 22},
- {"%isr", 20},
- {"%itmr", 16},
- {"%iva", 14},
- {"%pcoq", 18},
- {"%pcsq", 17},
- {"%pidr1", 8},
- {"%pidr2", 9},
+ {"%arg0", 26},
+ {"%arg1", 25},
+ {"%arg2", 24},
+ {"%arg3", 23},
+ {"%cr0", 0},
+ {"%cr10", 10},
+ {"%cr11", 11},
+ {"%cr12", 12},
+ {"%cr13", 13},
+ {"%cr14", 14},
+ {"%cr15", 15},
+ {"%cr16", 16},
+ {"%cr17", 17},
+ {"%cr18", 18},
+ {"%cr19", 19},
+ {"%cr20", 20},
+ {"%cr21", 21},
+ {"%cr22", 22},
+ {"%cr23", 23},
+ {"%cr24", 24},
+ {"%cr25", 25},
+ {"%cr26", 26},
+ {"%cr27", 27},
+ {"%cr28", 28},
+ {"%cr29", 29},
+ {"%cr30", 30},
+ {"%cr31", 31},
+ {"%cr8", 8},
+ {"%cr9", 9},
+ {"%dp", 27},
+ {"%eiem", 15},
+ {"%eirr", 23},
+ {"%fr0", 0 + FP_REG_BASE},
+ {"%fr0l", 0 + FP_REG_BASE},
+ {"%fr0r", 0 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr1", 1 + FP_REG_BASE},
+ {"%fr10", 10 + FP_REG_BASE},
+ {"%fr10l", 10 + FP_REG_BASE},
+ {"%fr10r", 10 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr11", 11 + FP_REG_BASE},
+ {"%fr11l", 11 + FP_REG_BASE},
+ {"%fr11r", 11 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr12", 12 + FP_REG_BASE},
+ {"%fr12l", 12 + FP_REG_BASE},
+ {"%fr12r", 12 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr13", 13 + FP_REG_BASE},
+ {"%fr13l", 13 + FP_REG_BASE},
+ {"%fr13r", 13 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr14", 14 + FP_REG_BASE},
+ {"%fr14l", 14 + FP_REG_BASE},
+ {"%fr14r", 14 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr15", 15 + FP_REG_BASE},
+ {"%fr15l", 15 + FP_REG_BASE},
+ {"%fr15r", 15 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr16", 16 + FP_REG_BASE},
+ {"%fr16l", 16 + FP_REG_BASE},
+ {"%fr16r", 16 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr17", 17 + FP_REG_BASE},
+ {"%fr17l", 17 + FP_REG_BASE},
+ {"%fr17r", 17 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr18", 18 + FP_REG_BASE},
+ {"%fr18l", 18 + FP_REG_BASE},
+ {"%fr18r", 18 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr19", 19 + FP_REG_BASE},
+ {"%fr19l", 19 + FP_REG_BASE},
+ {"%fr19r", 19 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr1l", 1 + FP_REG_BASE},
+ {"%fr1r", 1 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr2", 2 + FP_REG_BASE},
+ {"%fr20", 20 + FP_REG_BASE},
+ {"%fr20l", 20 + FP_REG_BASE},
+ {"%fr20r", 20 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr21", 21 + FP_REG_BASE},
+ {"%fr21l", 21 + FP_REG_BASE},
+ {"%fr21r", 21 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr22", 22 + FP_REG_BASE},
+ {"%fr22l", 22 + FP_REG_BASE},
+ {"%fr22r", 22 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr23", 23 + FP_REG_BASE},
+ {"%fr23l", 23 + FP_REG_BASE},
+ {"%fr23r", 23 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr24", 24 + FP_REG_BASE},
+ {"%fr24l", 24 + FP_REG_BASE},
+ {"%fr24r", 24 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr25", 25 + FP_REG_BASE},
+ {"%fr25l", 25 + FP_REG_BASE},
+ {"%fr25r", 25 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr26", 26 + FP_REG_BASE},
+ {"%fr26l", 26 + FP_REG_BASE},
+ {"%fr26r", 26 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr27", 27 + FP_REG_BASE},
+ {"%fr27l", 27 + FP_REG_BASE},
+ {"%fr27r", 27 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr28", 28 + FP_REG_BASE},
+ {"%fr28l", 28 + FP_REG_BASE},
+ {"%fr28r", 28 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr29", 29 + FP_REG_BASE},
+ {"%fr29l", 29 + FP_REG_BASE},
+ {"%fr29r", 29 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr2l", 2 + FP_REG_BASE},
+ {"%fr2r", 2 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr3", 3 + FP_REG_BASE},
+ {"%fr30", 30 + FP_REG_BASE},
+ {"%fr30l", 30 + FP_REG_BASE},
+ {"%fr30r", 30 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr31", 31 + FP_REG_BASE},
+ {"%fr31l", 31 + FP_REG_BASE},
+ {"%fr31r", 31 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr3l", 3 + FP_REG_BASE},
+ {"%fr3r", 3 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr4", 4 + FP_REG_BASE},
+ {"%fr4l", 4 + FP_REG_BASE},
+ {"%fr4r", 4 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr5", 5 + FP_REG_BASE},
+ {"%fr5l", 5 + FP_REG_BASE},
+ {"%fr5r", 5 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr6", 6 + FP_REG_BASE},
+ {"%fr6l", 6 + FP_REG_BASE},
+ {"%fr6r", 6 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr7", 7 + FP_REG_BASE},
+ {"%fr7l", 7 + FP_REG_BASE},
+ {"%fr7r", 7 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr8", 8 + FP_REG_BASE},
+ {"%fr8l", 8 + FP_REG_BASE},
+ {"%fr8r", 8 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fr9", 9 + FP_REG_BASE},
+ {"%fr9l", 9 + FP_REG_BASE},
+ {"%fr9r", 9 + FP_REG_BASE + FP_REG_RSEL},
+ {"%hta", 25},
+ {"%iir", 19},
+ {"%ior", 21},
+ {"%ipsw", 22},
+ {"%isr", 20},
+ {"%itmr", 16},
+ {"%iva", 14},
+ {"%pcoq", 18},
+ {"%pcsq", 17},
+ {"%pidr1", 8},
+ {"%pidr2", 9},
{"%pidr3", 12},
{"%pidr4", 13},
- {"%ppda", 24},
- {"%r0", 0},
- {"%r1", 1},
- {"%r10", 10},
- {"%r11", 11},
- {"%r12", 12},
- {"%r13", 13},
- {"%r14", 14},
- {"%r15", 15},
- {"%r16", 16},
- {"%r17", 17},
- {"%r18", 18},
- {"%r19", 19},
- {"%r2", 2},
- {"%r20", 20},
- {"%r21", 21},
- {"%r22", 22},
- {"%r23", 23},
- {"%r24", 24},
- {"%r25", 25},
- {"%r26", 26},
- {"%r27", 27},
- {"%r28", 28},
- {"%r29", 29},
- {"%r3", 3},
- {"%r30", 30},
- {"%r31", 31},
- {"%r4", 4},
- {"%r5", 5},
- {"%r6", 6},
- {"%r7", 7},
- {"%r8", 8},
- {"%r9", 9},
- {"%rctr", 0},
- {"%ret0", 28},
- {"%ret1", 29},
- {"%rp", 2},
- {"%sar", 11},
- {"%sp", 30},
- {"%sr0", 0},
- {"%sr1", 1},
- {"%sr2", 2},
- {"%sr3", 3},
- {"%sr4", 4},
- {"%sr5", 5},
- {"%sr6", 6},
- {"%sr7", 7},
- {"%tr0", 24},
- {"%tr1", 25},
- {"%tr2", 26},
- {"%tr3", 27},
- {"%tr4", 28},
- {"%tr5", 29},
- {"%tr6", 30},
- {"%tr7", 31}
+ {"%ppda", 24},
+ {"%r0", 0},
+ {"%r1", 1},
+ {"%r10", 10},
+ {"%r11", 11},
+ {"%r12", 12},
+ {"%r13", 13},
+ {"%r14", 14},
+ {"%r15", 15},
+ {"%r16", 16},
+ {"%r17", 17},
+ {"%r18", 18},
+ {"%r19", 19},
+ {"%r2", 2},
+ {"%r20", 20},
+ {"%r21", 21},
+ {"%r22", 22},
+ {"%r23", 23},
+ {"%r24", 24},
+ {"%r25", 25},
+ {"%r26", 26},
+ {"%r27", 27},
+ {"%r28", 28},
+ {"%r29", 29},
+ {"%r3", 3},
+ {"%r30", 30},
+ {"%r31", 31},
+ {"%r4", 4},
+ {"%r5", 5},
+ {"%r6", 6},
+ {"%r7", 7},
+ {"%r8", 8},
+ {"%r9", 9},
+ {"%rctr", 0},
+ {"%ret0", 28},
+ {"%ret1", 29},
+ {"%rp", 2},
+ {"%sar", 11},
+ {"%sp", 30},
+ {"%sr0", 0},
+ {"%sr1", 1},
+ {"%sr2", 2},
+ {"%sr3", 3},
+ {"%sr4", 4},
+ {"%sr5", 5},
+ {"%sr6", 6},
+ {"%sr7", 7},
+ {"%tr0", 24},
+ {"%tr1", 25},
+ {"%tr2", 26},
+ {"%tr3", 27},
+ {"%tr4", 28},
+ {"%tr5", 29},
+ {"%tr6", 30},
+ {"%tr7", 31}
};
/* This table is sorted by order of the length of the string. This is
@@ -1114,6 +1153,20 @@ static struct default_space_dict pa_def_spaces[] =
} \
}
+/* Simple alignment checking for FIELD againt ALIGN (a power of two).
+ IGNORE is used to suppress the error message. */
+
+#define CHECK_ALIGN(FIELD, ALIGN, IGNORE) \
+ { \
+ if ((FIELD) & ((ALIGN) - 1)) \
+ { \
+ if (! IGNORE) \
+ as_bad (_("Field not properly aligned [%d] (%d)."), (ALIGN), \
+ (int) (FIELD));\
+ break; \
+ } \
+ }
+
#define is_DP_relative(exp) \
((exp).X_op == O_subtract \
&& strcmp (S_GET_NAME ((exp).X_op_symbol), "$global$") == 0)
@@ -1235,7 +1288,6 @@ pa_undefine_label ()
}
}
-
/* An HPPA-specific version of fix_new. This is required because the HPPA
code needs to keep track of some extra stuff. Each call to fix_new_hppa
results in the creation of an instance of an hppa_fix_struct. An
@@ -1250,14 +1302,14 @@ fix_new_hppa (frag, where, size, add_symbol, offset, exp, pcrel,
int where;
int size;
symbolS *add_symbol;
- long offset;
+ offsetT offset;
expressionS *exp;
int pcrel;
bfd_reloc_code_real_type r_type;
enum hppa_reloc_field_selector_type_alt r_field;
int r_format;
- long arg_reloc;
- int* unwind_bits;
+ unsigned int arg_reloc;
+ int unwind_bits ATTRIBUTE_UNUSED;
{
fixS *new_fix;
@@ -1276,14 +1328,15 @@ fix_new_hppa (frag, where, size, add_symbol, offset, exp, pcrel,
hppa_fix->segment = now_seg;
#ifdef OBJ_SOM
if (r_type == R_ENTRY || r_type == R_EXIT)
- new_fix->fx_offset = *unwind_bits;
+ new_fix->fx_offset = unwind_bits;
#endif
/* foo-$global$ is used to access non-automatic storage. $global$
is really just a marker and has served its purpose, so eliminate
- it now so as not to confuse write.c. */
+ it now so as not to confuse write.c. Ditto for $PIC_pcrel$0. */
if (new_fix->fx_subsy
- && !strcmp (S_GET_NAME (new_fix->fx_subsy), "$global$"))
+ && (strcmp (S_GET_NAME (new_fix->fx_subsy), "$global$") == 0
+ || strcmp (S_GET_NAME (new_fix->fx_subsy), "$PIC_pcrel$0") == 0))
new_fix->fx_subsy = NULL;
}
@@ -1319,11 +1372,14 @@ cons_fix_new_hppa (frag, where, size, exp)
rel_type = R_HPPA;
if (hppa_field_selector != e_psel && hppa_field_selector != e_fsel)
- as_warn (_("Invalid field selector. Assuming F%%."));
+ {
+ as_warn (_("Invalid field selector. Assuming F%%."));
+ hppa_field_selector = e_fsel;
+ }
fix_new_hppa (frag, where, size,
(symbolS *) NULL, (offsetT) 0, exp, 0, rel_type,
- hppa_field_selector, size * 8, 0, NULL);
+ hppa_field_selector, size * 8, 0, 0);
/* Reset field selector to its default state. */
hppa_field_selector = 0;
@@ -1343,7 +1399,7 @@ md_begin ()
call_info_root = NULL;
/* Set the default machine type. */
- if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, 10))
+ if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, DEFAULT_LEVEL))
as_warn (_("could not set architecture and machine"));
/* Folding of text and data segments fails miserably on the PA.
@@ -1395,7 +1451,7 @@ md_begin ()
#ifdef OBJ_SOM
dummy_symbol = symbol_find_or_make ("L$dummy");
S_SET_SEGMENT (dummy_symbol, text_section);
- /* Force the symbol to be converted to a real symbol. */
+ /* Force the symbol to be converted to a real symbol. */
(void) symbol_get_bfdsym (dummy_symbol);
#endif
}
@@ -1433,12 +1489,14 @@ md_assemble (str)
information when the label appears after the proc/procend. */
if (within_entry_exit)
{
- char *where = frag_more (0);
+ char *where;
+ unsigned int u;
+ where = frag_more (0);
+ u = UNWIND_LOW32 (&last_call_info->ci_unwind.descriptor);
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
NULL, (offsetT) 0, NULL,
- 0, R_HPPA_ENTRY, e_fsel, 0, 0,
- (int *)&last_call_info->ci_unwind.descriptor);
+ 0, R_HPPA_ENTRY, e_fsel, 0, 0, u);
}
#endif
}
@@ -1455,7 +1513,7 @@ md_assemble (str)
/* Get somewhere to put the assembled instrution. */
to = frag_more (4);
- /* Output the opcode. */
+ /* Output the opcode. */
md_number_to_chars (to, the_insn.opcode, 4);
/* If necessary output more stuff. */
@@ -1463,23 +1521,10 @@ md_assemble (str)
fix_new_hppa (frag_now, (to - frag_now->fr_literal), 4, NULL,
(offsetT) 0, &the_insn.exp, the_insn.pcrel,
the_insn.reloc, the_insn.field_selector,
- the_insn.format, the_insn.arg_reloc, NULL);
+ the_insn.format, the_insn.arg_reloc, 0);
#ifdef OBJ_ELF
- if (debug_type == DEBUG_DWARF2)
- {
- bfd_vma addr;
-
- /* First update the notion of the current source line. */
- dwarf2_where (&debug_line);
-
- /* We want the offset of the start of this instruction within the
- the current frag. */
- addr = frag_now->fr_address + frag_now_fix () - 4;
-
- /* And record the information. */
- dwarf2_gen_line_info (addr, &debug_line);
- }
+ dwarf2_emit_insn (4);
#endif
}
@@ -1614,10 +1659,9 @@ pa_ip (str)
/* Handle a 5 bit register or control register field at 10. */
case 'b':
case '^':
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 0))
break;
- num = pa_parse_number (&s, 0);
+ num = pa_number;
CHECK_FIELD (num, 31, 0, 0);
INSERT_FIELD_AND_CONTINUE (opcode, num, 21);
@@ -1642,28 +1686,25 @@ pa_ip (str)
/* Handle a 5 bit register field at 15. */
case 'x':
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 0))
break;
- num = pa_parse_number (&s, 0);
+ num = pa_number;
CHECK_FIELD (num, 31, 0, 0);
INSERT_FIELD_AND_CONTINUE (opcode, num, 16);
/* Handle a 5 bit register field at 31. */
case 't':
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 0))
break;
- num = pa_parse_number (&s, 0);
+ num = pa_number;
CHECK_FIELD (num, 31, 0, 0);
INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
/* Handle a 5 bit register field at 10 and 15. */
case 'a':
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 0))
break;
- num = pa_parse_number (&s, 0);
+ num = pa_number;
CHECK_FIELD (num, 31, 0, 0);
opcode |= num << 16;
INSERT_FIELD_AND_CONTINUE (opcode, num, 21);
@@ -1686,7 +1727,7 @@ pa_ip (str)
/* When in strict mode, we want to just reject this
match instead of giving an out of range error. */
CHECK_FIELD (num, 15, -16, strict);
- low_sign_unext (num, 5, &num);
+ num = low_sign_unext (num, 5);
INSERT_FIELD_AND_CONTINUE (opcode, num, 16);
/* Handle a 5 bit immediate at 31. */
@@ -1697,8 +1738,8 @@ pa_ip (str)
s = expr_end;
/* When in strict mode, we want to just reject this
match instead of giving an out of range error. */
- CHECK_FIELD (num, 15, -16, strict)
- low_sign_unext (num, 5, &num);
+ CHECK_FIELD (num, 15, -16, strict);
+ num = low_sign_unext (num, 5);
INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
/* Handle an unsigned 5 bit immediate at 31. */
@@ -1707,8 +1748,8 @@ pa_ip (str)
if (strict && the_insn.exp.X_op != O_constant)
break;
s = expr_end;
- CHECK_FIELD (num, 31, 0, 0);
- INSERT_FIELD_AND_CONTINUE (opcode, num, strict);
+ CHECK_FIELD (num, 31, 0, strict);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
/* Handle an unsigned 5 bit immediate at 15. */
case 'R':
@@ -1730,22 +1771,20 @@ pa_ip (str)
/* Handle a 2 bit space identifier at 17. */
case 's':
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 0))
break;
- num = pa_parse_number (&s, 0);
+ num = pa_number;
CHECK_FIELD (num, 3, 0, 1);
INSERT_FIELD_AND_CONTINUE (opcode, num, 14);
/* Handle a 3 bit space identifier at 18. */
case 'S':
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 0))
break;
- num = pa_parse_number (&s, 0);
+ num = pa_number;
CHECK_FIELD (num, 7, 0, 1);
- dis_assemble_3 (num, &num);
- INSERT_FIELD_AND_CONTINUE (opcode, num, 13);
+ opcode |= re_assemble_3 (num);
+ continue;
/* Handle all completers. */
case 'c':
@@ -1849,10 +1888,10 @@ pa_ip (str)
}
else if (*args == 'e')
{
- /* Gross! Hide these values in the immediate field
- of the instruction, then pull them out later. */
- opcode |= m << 8;
- opcode |= a << 9;
+ /* Stash the ma/mb flag temporarily in the
+ instruction. We will use (and remove it)
+ later when handling 'J', 'K', '<' & '>'. */
+ opcode |= a;
continue;
}
}
@@ -1925,7 +1964,7 @@ pa_ip (str)
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 10);
- /* Handle load ordering completer. */
+ /* Handle load ordering completer. */
case 'o':
if (strncmp(s, ",o", 2) != 0)
break;
@@ -2385,7 +2424,7 @@ pa_ip (str)
}
else
{
- /* Negated condition requires an opcode change. */
+ /* Negated condition requires an opcode change. */
opcode |= (cmpltr & 8) << 24;
}
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr & 7, 13);
@@ -2406,7 +2445,7 @@ pa_ip (str)
}
else
{
- /* Negated condition requires an opcode change. */
+ /* Negated condition requires an opcode change. */
opcode |= 1 << 27;
}
}
@@ -2559,7 +2598,7 @@ pa_ip (str)
}
else
{
- /* Negated condition requires an opcode change. */
+ /* Negated condition requires an opcode change. */
opcode |= 1 << 27;
}
}
@@ -2571,11 +2610,11 @@ pa_ip (str)
cmpltr = pa_parse_cmpb_64_cmpltr (&s);
if (cmpltr >= 0)
{
- /* Negated condition requires an opcode change. */
+ /* Negated condition requires an opcode change. */
opcode |= (cmpltr & 8) << 26;
}
else
- /* Not a 64 bit cond. Give 32 bit a chance. */
+ /* Not a 64 bit cond. Give 32 bit a chance. */
break;
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr & 7, 13);
@@ -2584,7 +2623,7 @@ pa_ip (str)
case 'Q':
cmpltr = pa_parse_cmpib_64_cmpltr (&s);
if (cmpltr < 0)
- /* Not a 64 bit cond. Give 32 bit a chance. */
+ /* Not a 64 bit cond. Give 32 bit a chance. */
break;
INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
@@ -2608,7 +2647,6 @@ pa_ip (str)
}
else if (*s == '*')
break;
- name = s;
name = s;
while (*s != ',' && *s != ' ' && *s != '\t')
@@ -2616,7 +2654,6 @@ pa_ip (str)
c = *s;
*s = 0x00;
-
if (strcmp (name, "=") == 0)
cmpltr = 1;
else if (strcmp (name, "<") == 0)
@@ -2677,7 +2714,6 @@ pa_ip (str)
}
else if (*s == '*')
break;
- name = s;
name = s;
while (*s != ',' && *s != ' ' && *s != '\t')
@@ -2897,7 +2933,7 @@ pa_ip (str)
{
num = evaluate_absolute (&the_insn);
CHECK_FIELD (num, 1023, -1024, 0);
- low_sign_unext (num, 11, &num);
+ num = low_sign_unext (num, 11);
INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
}
else
@@ -2919,26 +2955,22 @@ pa_ip (str)
s = expr_end;
if (the_insn.exp.X_op == O_constant)
{
- int a, m;
+ int mb;
- /* XXX the completer stored away tibits of information
+ /* XXX the completer stored away tidbits of information
for us to extract. We need a cleaner way to do this.
Now that we have lots of letters again, it would be
good to rethink this. */
- m = (opcode & (1 << 8)) != 0;
- a = (opcode & (1 << 9)) != 0;
- opcode &= ~ (3 << 8);
+ mb = opcode & 1;
+ opcode -= mb;
num = evaluate_absolute (&the_insn);
- if ((a == 1 && num >= 0) || (a == 0 && num < 0))
+ if (mb != (num < 0))
break;
CHECK_FIELD (num, 8191, -8192, 0);
- low_sign_unext (num, 14, &num);
+ num = low_sign_unext (num, 14);
INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
}
- else
- {
- break;
- }
+ break;
/* Handle a 14 bit immediate at 31. */
case 'K':
@@ -2947,33 +2979,64 @@ pa_ip (str)
s = expr_end;
if (the_insn.exp.X_op == O_constant)
{
- int a, m;
+ int mb;
- /* XXX the completer stored away tibits of information
- for us to extract. We need a cleaner way to do this.
- Now that we have lots of letters again, it would be
- good to rethink this. */
- m = (opcode & (1 << 8)) != 0;
- a = (opcode & (1 << 9)) != 0;
- opcode &= ~ (3 << 8);
+ mb = opcode & 1;
+ opcode -= mb;
num = evaluate_absolute (&the_insn);
- if ((a == 1 && num < 0) || (a == 0 && num > 0))
+ if (mb == (num < 0))
break;
if (num % 4)
break;
CHECK_FIELD (num, 8191, -8192, 0);
- if (num < 0)
- opcode |= 1;
- num &= 0x1fff;
- num >>= 2;
- INSERT_FIELD_AND_CONTINUE (opcode, num, 3);
+ num = low_sign_unext (num, 14);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
}
- else
+ break;
+
+ /* Handle a 16 bit immediate at 31. */
+ case '<':
+ the_insn.field_selector = pa_chk_field_selector (&s);
+ get_expression (s);
+ s = expr_end;
+ if (the_insn.exp.X_op == O_constant)
{
- break;
+ int mb;
+
+ mb = opcode & 1;
+ opcode -= mb;
+ num = evaluate_absolute (&the_insn);
+ if (mb != (num < 0))
+ break;
+ CHECK_FIELD (num, 32767, -32768, 0);
+ num = re_assemble_16 (num);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
}
+ break;
- /* Handle 14 bit immediated, shifted left three times. */
+ /* Handle a 16 bit immediate at 31. */
+ case '>':
+ the_insn.field_selector = pa_chk_field_selector (&s);
+ get_expression (s);
+ s = expr_end;
+ if (the_insn.exp.X_op == O_constant)
+ {
+ int mb;
+
+ mb = opcode & 1;
+ opcode -= mb;
+ num = evaluate_absolute (&the_insn);
+ if (mb == (num < 0))
+ break;
+ if (num % 4)
+ break;
+ CHECK_FIELD (num, 32767, -32768, 0);
+ num = re_assemble_16 (num);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
+ }
+ break;
+
+ /* Handle 14 bit immediate, shifted left three times. */
case '#':
the_insn.field_selector = pa_chk_field_selector (&s);
get_expression (s);
@@ -3041,7 +3104,7 @@ pa_ip (str)
{
num = evaluate_absolute (&the_insn);
CHECK_FIELD (num, 8191, -8192, 0);
- low_sign_unext (num, 14, &num);
+ num = low_sign_unext (num, 14);
INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
}
else
@@ -3065,8 +3128,8 @@ pa_ip (str)
{
num = evaluate_absolute (&the_insn);
CHECK_FIELD (num >> 11, 1048575, -1048576, 0);
- dis_assemble_21 (num, &num);
- INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
+ opcode |= re_assemble_21 (num);
+ continue;
}
else
{
@@ -3080,26 +3143,104 @@ pa_ip (str)
continue;
}
+ /* Handle a 16 bit immediate at 31 (PA 2.0 wide mode only). */
+ case 'l':
+ the_insn.field_selector = pa_chk_field_selector (&s);
+ get_expression (s);
+ s = expr_end;
+ if (the_insn.exp.X_op == O_constant)
+ {
+ num = evaluate_absolute (&the_insn);
+ CHECK_FIELD (num, 32767, -32768, 0);
+ opcode |= re_assemble_16 (num);
+ continue;
+ }
+ else
+ {
+ /* ??? Is this valid for wide mode? */
+ if (is_DP_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_GOTOFF;
+ else if (is_PC_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_PCREL_CALL;
+ else
+ the_insn.reloc = R_HPPA;
+ the_insn.format = 14;
+ continue;
+ }
+
+ /* Handle a word-aligned 16-bit imm. at 31 (PA2.0 wide). */
+ case 'y':
+ the_insn.field_selector = pa_chk_field_selector (&s);
+ get_expression (s);
+ s = expr_end;
+ if (the_insn.exp.X_op == O_constant)
+ {
+ num = evaluate_absolute (&the_insn);
+ CHECK_FIELD (num, 32767, -32768, 0);
+ CHECK_ALIGN (num, 4, 0);
+ opcode |= re_assemble_16 (num);
+ continue;
+ }
+ else
+ {
+ /* ??? Is this valid for wide mode? */
+ if (is_DP_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_GOTOFF;
+ else if (is_PC_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_PCREL_CALL;
+ else
+ the_insn.reloc = R_HPPA;
+ the_insn.format = 14;
+ continue;
+ }
+
+ /* Handle a dword-aligned 16-bit imm. at 31 (PA2.0 wide). */
+ case '&':
+ the_insn.field_selector = pa_chk_field_selector (&s);
+ get_expression (s);
+ s = expr_end;
+ if (the_insn.exp.X_op == O_constant)
+ {
+ num = evaluate_absolute (&the_insn);
+ CHECK_FIELD (num, 32767, -32768, 0);
+ CHECK_ALIGN (num, 8, 0);
+ opcode |= re_assemble_16 (num);
+ continue;
+ }
+ else
+ {
+ /* ??? Is this valid for wide mode? */
+ if (is_DP_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_GOTOFF;
+ else if (is_PC_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_PCREL_CALL;
+ else
+ the_insn.reloc = R_HPPA;
+ the_insn.format = 14;
+ continue;
+ }
+
/* Handle a 12 bit branch displacement. */
case 'w':
the_insn.field_selector = pa_chk_field_selector (&s);
get_expression (s);
s = expr_end;
the_insn.pcrel = 1;
- if (!strcmp (S_GET_NAME (the_insn.exp.X_add_symbol), "L$0\001"))
+ if (!the_insn.exp.X_add_symbol
+ || !strcmp (S_GET_NAME (the_insn.exp.X_add_symbol),
+ "L$0\001"))
{
- unsigned int w1, w, result;
-
num = evaluate_absolute (&the_insn);
if (num % 4)
{
as_bad (_("Branch to unaligned address"));
break;
}
- CHECK_FIELD (num, 8199, -8184, 0);
- sign_unext ((num - 8) >> 2, 12, &result);
- dis_assemble_12 (result, &w1, &w);
- INSERT_FIELD_AND_CONTINUE (opcode, ((w1 << 2) | w), 0);
+ if (the_insn.exp.X_add_symbol)
+ num -= 8;
+ CHECK_FIELD (num, 8191, -8192, 0);
+ opcode |= re_assemble_12 (num >> 2);
+ continue;
}
else
{
@@ -3121,23 +3262,17 @@ pa_ip (str)
|| !strcmp (S_GET_NAME (the_insn.exp.X_add_symbol),
"L$0\001"))
{
- unsigned int w2, w1, w, result;
-
num = evaluate_absolute (&the_insn);
if (num % 4)
{
as_bad (_("Branch to unaligned address"));
break;
}
- CHECK_FIELD (num, 262143, -262144, 0);
-
if (the_insn.exp.X_add_symbol)
num -= 8;
-
- sign_unext (num >> 2, 17, &result);
- dis_assemble_17 (result, &w1, &w2, &w);
- INSERT_FIELD_AND_CONTINUE (opcode,
- ((w2 << 2) | (w1 << 16) | w), 0);
+ CHECK_FIELD (num, 262143, -262144, 0);
+ opcode |= re_assemble_17 (num >> 2);
+ continue;
}
else
{
@@ -3158,25 +3293,16 @@ pa_ip (str)
|| !strcmp (S_GET_NAME (the_insn.exp.X_add_symbol),
"L$0\001"))
{
- unsigned int w3, w2, w1, w, result;
-
num = evaluate_absolute (&the_insn);
if (num % 4)
{
as_bad (_("Branch to unaligned address"));
break;
}
- CHECK_FIELD (num, 8388607, -8388608, 0);
-
if (the_insn.exp.X_add_symbol)
num -= 8;
-
- sign_unext (num >> 2, 22, &result);
- dis_assemble_22 (result, &w3, &w1, &w2, &w);
- INSERT_FIELD_AND_CONTINUE (opcode,
- ((w3 << 21) | (w2 << 2)
- | (w1 << 16) | w),
- 0);
+ CHECK_FIELD (num, 8388607, -8388608, 0);
+ opcode |= re_assemble_22 (num >> 2);
}
else
{
@@ -3197,23 +3323,17 @@ pa_ip (str)
|| !strcmp (S_GET_NAME (the_insn.exp.X_add_symbol),
"L$0\001"))
{
- unsigned int w2, w1, w, result;
-
num = evaluate_absolute (&the_insn);
if (num % 4)
{
as_bad (_("Branch to unaligned address"));
break;
}
- CHECK_FIELD (num, 262143, -262144, 0);
-
if (the_insn.exp.X_add_symbol)
num -= 8;
-
- sign_unext (num >> 2, 17, &result);
- dis_assemble_17 (result, &w1, &w2, &w);
- INSERT_FIELD_AND_CONTINUE (opcode,
- ((w2 << 2) | (w1 << 16) | w), 0);
+ CHECK_FIELD (num, 262143, -262144, 0);
+ opcode |= re_assemble_17 (num >> 2);
+ continue;
}
else
{
@@ -3350,8 +3470,6 @@ pa_ip (str)
num = pa_get_absolute_expression (&the_insn, &s);
if (strict && the_insn.exp.X_op != O_constant)
break;
- if (the_insn.exp.X_op != O_constant)
- break;
s = expr_end;
CHECK_FIELD (num, 31, 0, strict);
INSERT_FIELD_AND_CONTINUE (opcode, num, 21);
@@ -3380,7 +3498,7 @@ pa_ip (str)
if (strict && the_insn.exp.X_op != O_constant)
break;
s = expr_end;
- CHECK_FIELD (num, 671108864, 0, strict);
+ CHECK_FIELD (num, 67108863, 0, strict);
INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
/* Handle a 3 bit SFU identifier at 25. */
@@ -3575,49 +3693,43 @@ pa_ip (str)
{
/* Float target register. */
case 't':
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 3))
break;
- num = pa_parse_number (&s, 0);
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
CHECK_FIELD (num, 31, 0, 0);
INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
/* Float target register with L/R selection. */
case 'T':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
- opcode |= result.number_part;
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
+ opcode |= num;
/* 0x30 opcodes are FP arithmetic operation opcodes
and need to be turned into 0x38 opcodes. This
is not necessary for loads/stores. */
- if (need_pa11_opcode (&the_insn, &result)
+ if (need_pa11_opcode ()
&& ((opcode & 0xfc000000) == 0x30000000))
opcode |= 1 << 27;
- INSERT_FIELD_AND_CONTINUE (opcode, result.l_r_select & 1, 6);
+ opcode |= (pa_number & FP_REG_RSEL ? 1 << 6 : 0);
+ continue;
}
/* Float operand 1. */
case 'a':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
- opcode |= result.number_part << 21;
- if (need_pa11_opcode (&the_insn, &result))
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
+ opcode |= num << 21;
+ if (need_pa11_opcode ())
{
- opcode |= (result.l_r_select & 1) << 7;
+ opcode |= (pa_number & FP_REG_RSEL ? 1 << 7 : 0);
opcode |= 1 << 27;
}
continue;
@@ -3627,32 +3739,26 @@ pa_ip (str)
case 'X':
case 'A':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
- opcode |= result.number_part << 21;
- opcode |= (result.l_r_select & 1) << 7;
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
+ opcode |= num << 21;
+ opcode |= (pa_number & FP_REG_RSEL ? 1 << 7 : 0);
continue;
}
/* Float operand 2. */
case 'b':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
- opcode |= (result.number_part & 0x1f) << 16;
- if (need_pa11_opcode (&the_insn, &result))
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
+ opcode |= num << 16;
+ if (need_pa11_opcode ())
{
- opcode |= (result.l_r_select & 1) << 12;
+ opcode |= (pa_number & FP_REG_RSEL ? 1 << 12 : 0);
opcode |= 1 << 27;
}
continue;
@@ -3661,166 +3767,152 @@ pa_ip (str)
/* Float operand 2 with L/R selection. */
case 'B':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
- opcode |= (result.number_part & 0x1f) << 16;
- opcode |= (result.l_r_select & 1) << 12;
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
+ opcode |= num << 16;
+ opcode |= (pa_number & FP_REG_RSEL ? 1 << 12 : 0);
continue;
}
/* Float operand 3 for fmpyfadd, fmpynfadd. */
case 'C':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
- opcode |= (result.number_part & 0x1c) << 11;
- opcode |= (result.number_part & 0x3) << 9;
- opcode |= (result.l_r_select & 1) << 8;
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
+ opcode |= (num & 0x1c) << 11;
+ opcode |= (num & 0x03) << 9;
+ opcode |= (pa_number & FP_REG_RSEL ? 1 << 8 : 0);
continue;
}
/* Float mult operand 1 for fmpyadd, fmpysub */
case 'i':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
if (the_insn.fpof1 == SGL)
{
- if (result.number_part < 16)
+ if (num < 16)
{
as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
break;
}
-
- result.number_part &= 0xF;
- result.number_part |= (result.l_r_select & 1) << 4;
+ num &= 0xF;
+ num |= (pa_number & FP_REG_RSEL ? 1 << 4 : 0);
}
- INSERT_FIELD_AND_CONTINUE (opcode, result.number_part, 21);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 21);
}
/* Float mult operand 2 for fmpyadd, fmpysub */
case 'j':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
if (the_insn.fpof1 == SGL)
{
- if (result.number_part < 16)
+ if (num < 16)
{
- as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
- break;
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
+ break;
}
- result.number_part &= 0xF;
- result.number_part |= (result.l_r_select & 1) << 4;
+ num &= 0xF;
+ num |= (pa_number & FP_REG_RSEL ? 1 << 4 : 0);
}
- INSERT_FIELD_AND_CONTINUE (opcode, result.number_part, 16);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 16);
}
/* Float mult target for fmpyadd, fmpysub */
case 'k':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
if (the_insn.fpof1 == SGL)
{
- if (result.number_part < 16)
+ if (num < 16)
{
- as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
- break;
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
+ break;
}
- result.number_part &= 0xF;
- result.number_part |= (result.l_r_select & 1) << 4;
+ num &= 0xF;
+ num |= (pa_number & FP_REG_RSEL ? 1 << 4 : 0);
}
- INSERT_FIELD_AND_CONTINUE (opcode, result.number_part, 0);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
}
/* Float add operand 1 for fmpyadd, fmpysub */
case 'l':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
if (the_insn.fpof1 == SGL)
{
- if (result.number_part < 16)
+ if (num < 16)
{
- as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
- break;
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
+ break;
}
- result.number_part &= 0xF;
- result.number_part |= (result.l_r_select & 1) << 4;
+ num &= 0xF;
+ num |= (pa_number & FP_REG_RSEL ? 1 << 4 : 0);
}
- INSERT_FIELD_AND_CONTINUE (opcode, result.number_part, 6);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 6);
}
/* Float add target for fmpyadd, fmpysub */
case 'm':
{
- struct pa_11_fp_reg_struct result;
-
- /* This should be more strict. Small steps. */
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
if (the_insn.fpof1 == SGL)
{
- if (result.number_part < 16)
+ if (num < 16)
{
- as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
- break;
+ as_bad (_("Invalid register for single precision fmpyadd or fmpysub"));
+ break;
}
- result.number_part &= 0xF;
- result.number_part |= (result.l_r_select & 1) << 4;
+ num &= 0xF;
+ num |= (pa_number & FP_REG_RSEL ? 1 << 4 : 0);
}
- INSERT_FIELD_AND_CONTINUE (opcode, result.number_part, 11);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 11);
}
/* Handle L/R register halves like 'x'. */
+ case 'E':
case 'e':
{
- struct pa_11_fp_reg_struct result;
-
- if (strict && *s != '%')
+ if (!pa_parse_number (&s, 1))
break;
- pa_parse_number (&s, &result);
- CHECK_FIELD (result.number_part, 31, 0, 0);
- opcode |= (result.number_part & 0x1f) << 16;
- if (need_pa11_opcode (&the_insn, &result))
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
+ opcode |= num << 16;
+ if (need_pa11_opcode ())
{
- opcode |= (result.l_r_select & 1) << 1;
+ opcode |= (pa_number & FP_REG_RSEL ? 1 << 1 : 0);
}
continue;
}
+
+ /* Float target register (PA 2.0 wide). */
+ case 'x':
+ if (!pa_parse_number (&s, 3))
+ break;
+ num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+ CHECK_FIELD (num, 31, 0, 0);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 16);
+
default:
abort ();
}
@@ -3936,16 +4028,17 @@ tc_gen_reloc (section, fixp)
{
arelent *reloc;
struct hppa_fix_struct *hppa_fixp;
- bfd_reloc_code_real_type code;
static arelent *no_relocs = NULL;
arelent **relocs;
- bfd_reloc_code_real_type **codes;
+ reloc_type **codes;
+ reloc_type code;
int n_relocs;
int i;
hppa_fixp = (struct hppa_fix_struct *) fixp->tc_fix_data;
if (fixp->fx_addsy == 0)
return &no_relocs;
+
assert (hppa_fixp != 0);
assert (section != 0);
@@ -3953,7 +4046,7 @@ tc_gen_reloc (section, fixp)
reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
- codes = (bfd_reloc_code_real_type **) hppa_gen_reloc_type (stdoutput,
+ codes = hppa_gen_reloc_type (stdoutput,
fixp->fx_r_type,
hppa_fixp->fx_r_format,
hppa_fixp->fx_r_field,
@@ -3961,7 +4054,10 @@ tc_gen_reloc (section, fixp)
symbol_get_bfdsym (fixp->fx_addsy));
if (codes == NULL)
- abort ();
+ {
+ as_bad (_("Cannot handle fixup at %s:%d"), fixp->fx_file, fixp->fx_line);
+ abort ();
+ }
for (n_relocs = 0; codes[n_relocs]; n_relocs++)
;
@@ -3981,14 +4077,6 @@ tc_gen_reloc (section, fixp)
code = *codes[0];
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
- *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
- reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
- reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
- reloc->addend = 0; /* default */
-
- assert (reloc->howto && code == reloc->howto->type);
-
/* Now, do any processing that is dependent on the relocation type. */
switch (code)
{
@@ -4000,9 +4088,8 @@ tc_gen_reloc (section, fixp)
case R_PARISC_PLABEL14R:
/* For plabel relocations, the addend of the
relocation should be either 0 (no static link) or 2
- (static link required).
-
- FIXME: We always assume no static link!
+ (static link required). This adjustment is done in
+ bfd/elf32-hppa.c:elf32_hppa_relocate_section.
We also slam a zero addend into the DLT relative relocs;
it doesn't make a lot of sense to use any addend since
@@ -4010,19 +4097,37 @@ tc_gen_reloc (section, fixp)
reloc->addend = 0;
break;
- case R_PARISC_PCREL21L:
+#ifdef ELF_ARG_RELOC
case R_PARISC_PCREL17R:
case R_PARISC_PCREL17F:
case R_PARISC_PCREL17C:
- case R_PARISC_PCREL14R:
- case R_PARISC_PCREL14F:
- /* The constant is stored in the instruction. */
- reloc->addend = HPPA_R_ADDEND (hppa_fixp->fx_arg_reloc, 0);
+ case R_PARISC_DIR17R:
+ case R_PARISC_DIR17F:
+ case R_PARISC_PCREL21L:
+ case R_PARISC_DIR21L:
+ reloc->addend = HPPA_R_ADDEND (hppa_fixp->fx_arg_reloc,
+ fixp->fx_offset);
break;
+#endif
+
+ case R_PARISC_DIR32:
+ /* Facilitate hand-crafted unwind info. */
+ if (strcmp (section->name, UNWIND_SECTION_NAME) == 0)
+ code = R_PARISC_SEGREL32;
+ /* Fall thru */
+
default:
reloc->addend = fixp->fx_offset;
break;
}
+
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+ reloc->howto = bfd_reloc_type_lookup (stdoutput,
+ (bfd_reloc_code_real_type) code);
+ reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
+
+ assert (reloc->howto && (unsigned int) code == reloc->howto->type);
break;
}
#else /* OBJ_SOM */
@@ -4034,7 +4139,9 @@ tc_gen_reloc (section, fixp)
relocs[i]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
*relocs[i]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
- relocs[i]->howto = bfd_reloc_type_lookup (stdoutput, code);
+ relocs[i]->howto =
+ bfd_reloc_type_lookup (stdoutput,
+ (bfd_reloc_code_real_type) code);
relocs[i]->address = fixp->fx_frag->fr_address + fixp->fx_where;
switch (code)
@@ -4045,25 +4152,35 @@ tc_gen_reloc (section, fixp)
relocs now and break out of the loop. */
assert (i == 1);
relocs[0]->sym_ptr_ptr = (asymbol **) &(bfd_abs_symbol);
- relocs[0]->howto = bfd_reloc_type_lookup (stdoutput, *codes[0]);
+ relocs[0]->howto =
+ bfd_reloc_type_lookup (stdoutput,
+ (bfd_reloc_code_real_type) *codes[0]);
relocs[0]->address = fixp->fx_frag->fr_address + fixp->fx_where;
relocs[0]->addend = 0;
relocs[1]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
*relocs[1]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
- relocs[1]->howto = bfd_reloc_type_lookup (stdoutput, *codes[1]);
+ relocs[1]->howto =
+ bfd_reloc_type_lookup (stdoutput,
+ (bfd_reloc_code_real_type) *codes[1]);
relocs[1]->address = fixp->fx_frag->fr_address + fixp->fx_where;
relocs[1]->addend = 0;
relocs[2]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
*relocs[2]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy);
- relocs[2]->howto = bfd_reloc_type_lookup (stdoutput, *codes[2]);
+ relocs[2]->howto =
+ bfd_reloc_type_lookup (stdoutput,
+ (bfd_reloc_code_real_type) *codes[2]);
relocs[2]->address = fixp->fx_frag->fr_address + fixp->fx_where;
relocs[2]->addend = 0;
relocs[3]->sym_ptr_ptr = (asymbol **) &(bfd_abs_symbol);
- relocs[3]->howto = bfd_reloc_type_lookup (stdoutput, *codes[3]);
+ relocs[3]->howto =
+ bfd_reloc_type_lookup (stdoutput,
+ (bfd_reloc_code_real_type) *codes[3]);
relocs[3]->address = fixp->fx_frag->fr_address + fixp->fx_where;
relocs[3]->addend = 0;
relocs[4]->sym_ptr_ptr = (asymbol **) &(bfd_abs_symbol);
- relocs[4]->howto = bfd_reloc_type_lookup (stdoutput, *codes[4]);
+ relocs[4]->howto =
+ bfd_reloc_type_lookup (stdoutput,
+ (bfd_reloc_code_real_type) *codes[4]);
relocs[4]->address = fixp->fx_frag->fr_address + fixp->fx_where;
relocs[4]->addend = 0;
goto done;
@@ -4129,8 +4246,8 @@ tc_gen_reloc (section, fixp)
void
md_convert_frag (abfd, sec, fragP)
- register bfd *abfd;
- register asection *sec;
+ register bfd *abfd ATTRIBUTE_UNUSED;
+ register asection *sec ATTRIBUTE_UNUSED;
register fragS *fragP;
{
unsigned int address;
@@ -4158,7 +4275,7 @@ md_convert_frag (abfd, sec, fragP)
}
}
-/* Round up a section size to the appropriate boundary. */
+/* Round up a section size to the appropriate boundary. */
valueT
md_section_align (segment, size)
@@ -4175,7 +4292,7 @@ md_section_align (segment, size)
int
md_estimate_size_before_relax (fragP, segment)
register fragS *fragP;
- asection *segment;
+ asection *segment ATTRIBUTE_UNUSED;
{
int size;
@@ -4187,35 +4304,85 @@ md_estimate_size_before_relax (fragP, segment)
return size;
}
-CONST char *md_shortopts = "";
+#ifdef OBJ_ELF
+# ifdef WARN_COMMENTS
+const char *md_shortopts = "Vc";
+# else
+const char *md_shortopts = "V";
+# endif
+#else
+# ifdef WARN_COMMENTS
+const char *md_shortopts = "c";
+# else
+const char *md_shortopts = "";
+# endif
+#endif
+
struct option md_longopts[] = {
+#ifdef WARN_COMMENTS
+ {"warn-comment", no_argument, NULL, 'c'},
+#endif
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
- int c;
- char *arg;
+ int c ATTRIBUTE_UNUSED;
+ char *arg ATTRIBUTE_UNUSED;
{
- return 0;
+ switch (c)
+ {
+ default:
+ return 0;
+
+#ifdef OBJ_ELF
+ case 'V':
+ print_version_id ();
+ break;
+#endif
+#ifdef WARN_COMMENTS
+ case 'c':
+ warn_comment = 1;
+ break;
+#endif
+ }
+
+ return 1;
}
void
md_show_usage (stream)
- FILE *stream;
+ FILE *stream ATTRIBUTE_UNUSED;
{
+#ifdef OBJ_ELF
+ fprintf (stream, _("\
+ -Q ignored\n"));
+#endif
+#ifdef WARN_COMMENTS
+ fprintf (stream, _("\
+ -c print a warning if a comment is found\n"));
+#endif
}
/* We have no need to default values of symbols. */
symbolS *
md_undefined_symbol (name)
- char *name;
+ char *name ATTRIBUTE_UNUSED;
{
return 0;
}
+#if defined (OBJ_SOM) || defined (ELF_ARG_RELOC)
+#define nonzero_dibits(x) \
+ ((x) | (((x) & 0x55555555) << 1) | (((x) & 0xAAAAAAAA) >> 1))
+#define arg_reloc_stub_needed(CALLER, CALLEE) \
+ (((CALLER) ^ (CALLEE)) & nonzero_dibits (CALLER) & nonzero_dibits (CALLEE))
+#else
+#define arg_reloc_stub_needed(CALLER, CALLEE) 0
+#endif
+
/* Apply a fixup to an instruction. */
int
@@ -4223,12 +4390,11 @@ md_apply_fix (fixP, valp)
fixS *fixP;
valueT *valp;
{
- char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
+ unsigned char *buf;
struct hppa_fix_struct *hppa_fixP;
- long new_val, result = 0;
- unsigned int w1, w2, w, resulti;
+ offsetT new_val;
+ int insn, val, fmt;
- hppa_fixP = (struct hppa_fix_struct *) fixP->tc_fix_data;
/* SOM uses R_HPPA_ENTRY and R_HPPA_EXIT relocations which can
never be "applied" (they are just markers). Likewise for
R_HPPA_BEGIN_BRTAB and R_HPPA_END_BRTAB. */
@@ -4249,183 +4415,191 @@ md_apply_fix (fixP, valp)
return 1;
}
#endif
+#ifdef OBJ_ELF
+ if (fixP->fx_r_type == (int) R_PARISC_GNU_VTENTRY
+ || fixP->fx_r_type == (int) R_PARISC_GNU_VTINHERIT)
+ return 1;
+#endif
/* There should have been an HPPA specific fixup associated
with the GAS fixup. */
- if (hppa_fixP)
+ hppa_fixP = (struct hppa_fix_struct *) fixP->tc_fix_data;
+ if (hppa_fixP == NULL)
{
- unsigned long buf_wd = bfd_get_32 (stdoutput, buf);
- int fmt = bfd_hppa_insn2fmt (buf_wd);
-
- /* If there is a symbol associated with this fixup, then it's something
- which will need a SOM relocation (except for some PC-relative relocs).
- In such cases we should treat the "val" or "addend" as zero since it
- will be added in as needed from fx_offset in tc_gen_reloc. */
- if ((fixP->fx_addsy != NULL
- || fixP->fx_r_type == R_HPPA_NONE)
+ printf (_("no hppa_fixup entry for fixup type 0x%x at %s:%d"),
+ fixP->fx_r_type, fixP->fx_file, fixP->fx_line);
+ return 0;
+ }
+
+ buf = fixP->fx_frag->fr_literal + fixP->fx_where;
+ insn = bfd_get_32 (stdoutput, buf);
+ fmt = bfd_hppa_insn2fmt (stdoutput, insn);
+
+ /* If there is a symbol associated with this fixup, then it's something
+ which will need a SOM relocation (except for some PC-relative relocs).
+ In such cases we should treat the "val" or "addend" as zero since it
+ will be added in as needed from fx_offset in tc_gen_reloc. */
+ if ((fixP->fx_addsy != NULL
+ || fixP->fx_r_type == (int) R_HPPA_NONE)
#ifdef OBJ_SOM
- && fmt != 32
+ && fmt != 32
#endif
- )
- new_val = ((fmt == 12 || fmt == 17 || fmt == 22) ? 8 : 0);
+ )
+ new_val = ((fmt == 12 || fmt == 17 || fmt == 22) ? 8 : 0);
#ifdef OBJ_SOM
- /* These field selectors imply that we do not want an addend. */
- else if (hppa_fixP->fx_r_field == e_psel
- || hppa_fixP->fx_r_field == e_rpsel
- || hppa_fixP->fx_r_field == e_lpsel
- || hppa_fixP->fx_r_field == e_tsel
- || hppa_fixP->fx_r_field == e_rtsel
- || hppa_fixP->fx_r_field == e_ltsel)
- new_val = ((fmt == 12 || fmt == 17 || fmt == 22) ? 8 : 0);
- /* This is truely disgusting. The machine independent code blindly
- adds in the value of the symbol being relocated against. Damn! */
- else if (fmt == 32
- && fixP->fx_addsy != NULL
- && S_GET_SEGMENT (fixP->fx_addsy) != bfd_com_section_ptr)
- new_val = hppa_field_adjust (*valp - S_GET_VALUE (fixP->fx_addsy),
- 0, hppa_fixP->fx_r_field);
+ /* These field selectors imply that we do not want an addend. */
+ else if (hppa_fixP->fx_r_field == e_psel
+ || hppa_fixP->fx_r_field == e_rpsel
+ || hppa_fixP->fx_r_field == e_lpsel
+ || hppa_fixP->fx_r_field == e_tsel
+ || hppa_fixP->fx_r_field == e_rtsel
+ || hppa_fixP->fx_r_field == e_ltsel)
+ new_val = ((fmt == 12 || fmt == 17 || fmt == 22) ? 8 : 0);
+ /* This is truly disgusting. The machine independent code blindly
+ adds in the value of the symbol being relocated against. Damn! */
+ else if (fmt == 32
+ && fixP->fx_addsy != NULL
+ && S_GET_SEGMENT (fixP->fx_addsy) != bfd_com_section_ptr)
+ new_val = hppa_field_adjust (*valp - S_GET_VALUE (fixP->fx_addsy),
+ 0, hppa_fixP->fx_r_field);
+#endif
+ else
+ new_val = hppa_field_adjust (*valp, 0, hppa_fixP->fx_r_field);
+
+ /* Handle pc-relative exceptions from above. */
+ if ((fmt == 12 || fmt == 17 || fmt == 22)
+ && fixP->fx_addsy
+ && fixP->fx_pcrel
+ && !arg_reloc_stub_needed (symbol_arg_reloc_info (fixP->fx_addsy),
+ hppa_fixP->fx_arg_reloc)
+#ifdef OBJ_ELF
+ && (*valp - 8 + 8192 < 16384
+ || (fmt == 17 && *valp - 8 + 262144 < 524288)
+ || (fmt == 22 && *valp - 8 + 8388608 < 16777216))
#endif
- else
- new_val = hppa_field_adjust (*valp, 0, hppa_fixP->fx_r_field);
-
- /* Handle pc-relative exceptions from above. */
-#define arg_reloc_stub_needed(CALLER, CALLEE) \
- ((CALLEE) && (CALLER) && ((CALLEE) != (CALLER)))
- if ((fmt == 12 || fmt == 17 || fmt == 22)
- && fixP->fx_addsy
- && fixP->fx_pcrel
#ifdef OBJ_SOM
- && !arg_reloc_stub_needed ((long) ((obj_symbol_type *)
- symbol_get_bfdsym (fixP->fx_addsy))->tc_data.ap.hppa_arg_reloc,
- hppa_fixP->fx_arg_reloc)
+ && (*valp - 8 + 262144 < 524288
+ || (fmt == 22 && *valp - 8 + 8388608 < 16777216))
#endif
- && (((int)(*valp) > -262144 && (int)(*valp) < 262143) && fmt != 22)
- && S_GET_SEGMENT (fixP->fx_addsy) == hppa_fixP->segment
- && !(fixP->fx_subsy
- && S_GET_SEGMENT (fixP->fx_subsy) != hppa_fixP->segment))
-
- new_val = hppa_field_adjust (*valp, 0, hppa_fixP->fx_r_field);
-#undef arg_reloc_stub_needed
-
- switch (fmt)
- {
- /* Handle all opcodes with the 'j' operand type. */
- case 14:
- CHECK_FIELD (new_val, 8191, -8192, 0);
-
- /* Mask off 14 bits to be changed. */
- bfd_put_32 (stdoutput,
- bfd_get_32 (stdoutput, buf) & 0xffffc000,
- buf);
- low_sign_unext (new_val, 14, &resulti);
- result = resulti;
- break;
+ && !S_IS_EXTERNAL (fixP->fx_addsy)
+ && !S_IS_WEAK (fixP->fx_addsy)
+ && S_GET_SEGMENT (fixP->fx_addsy) == hppa_fixP->segment
+ && !(fixP->fx_subsy
+ && S_GET_SEGMENT (fixP->fx_subsy) != hppa_fixP->segment))
+ {
+ new_val = hppa_field_adjust (*valp, 0, hppa_fixP->fx_r_field);
+ }
- /* Handle all opcodes with the 'k' operand type. */
- case 21:
- CHECK_FIELD (new_val, 2097152, 0, 0);
+ switch (fmt)
+ {
+ case 10:
+ CHECK_FIELD (new_val, 8191, -8192, 0);
+ val = new_val;
- /* Mask off 21 bits to be changed. */
- bfd_put_32 (stdoutput,
- bfd_get_32 (stdoutput, buf) & 0xffe00000,
- buf);
- dis_assemble_21 (new_val, &resulti);
- result = resulti;
- break;
+ insn = (insn & ~ 0x3ff1) | (((val & 0x1ff8) << 1)
+ | ((val & 0x2000) >> 13));
+ break;
+ case -11:
+ CHECK_FIELD (new_val, 8191, -8192, 0);
+ val = new_val;
- /* Handle all the opcodes with the 'i' operand type. */
- case 11:
- CHECK_FIELD (new_val, 1023, -1023, 0);
+ insn = (insn & ~ 0x3ff9) | (((val & 0x1ffc) << 1)
+ | ((val & 0x2000) >> 13));
+ break;
+ /* Handle all opcodes with the 'j' operand type. */
+ case 14:
+ CHECK_FIELD (new_val, 8191, -8192, 0);
+ val = new_val;
- /* Mask off 11 bits to be changed. */
- bfd_put_32 (stdoutput,
- bfd_get_32 (stdoutput, buf) & 0xffff800,
- buf);
- low_sign_unext (new_val, 11, &resulti);
- result = resulti;
- break;
+ insn = ((insn & ~ 0x3fff) | low_sign_unext (val, 14));
+ break;
- /* Handle all the opcodes with the 'w' operand type. */
- case 12:
- CHECK_FIELD (new_val, 8199, -8184, 0);
+ /* Handle all opcodes with the 'k' operand type. */
+ case 21:
+ CHECK_FIELD (new_val, 1048575, -1048576, 0);
+ val = new_val;
- /* Mask off 11 bits to be changed. */
- sign_unext ((new_val - 8) >> 2, 12, &resulti);
- bfd_put_32 (stdoutput,
- bfd_get_32 (stdoutput, buf) & 0xffffe002,
- buf);
+ insn = (insn & ~ 0x1fffff) | re_assemble_21 (val);
+ break;
- dis_assemble_12 (resulti, &w1, &w);
- result = ((w1 << 2) | w);
- break;
+ /* Handle all the opcodes with the 'i' operand type. */
+ case 11:
+ CHECK_FIELD (new_val, 1023, -1024, 0);
+ val = new_val;
- /* Handle some of the opcodes with the 'W' operand type. */
- case 17:
- {
- int distance = *valp;
-
- CHECK_FIELD (new_val, 262143, -262144, 0);
-
- /* If this is an absolute branch (ie no link) with an out of
- range target, then we want to complain. */
- if (fixP->fx_r_type == R_HPPA_PCREL_CALL
- && (distance > 262143 || distance < -262144)
- && (bfd_get_32 (stdoutput, buf) & 0xffe00000) == 0xe8000000)
- CHECK_FIELD (distance, 262143, -262144, 0);
-
- /* Mask off 17 bits to be changed. */
- bfd_put_32 (stdoutput,
- bfd_get_32 (stdoutput, buf) & 0xffe0e002,
- buf);
- sign_unext ((new_val - 8) >> 2, 17, &resulti);
- dis_assemble_17 (resulti, &w1, &w2, &w);
- result = ((w2 << 2) | (w1 << 16) | w);
- break;
- }
+ insn = (insn & ~ 0x7ff) | low_sign_unext (val, 11);
+ break;
- case 22:
- {
- int distance = *valp, w3;
-
- CHECK_FIELD (new_val, 8388607, -8388608, 0);
-
- /* If this is an absolute branch (ie no link) with an out of
- range target, then we want to complain. */
- if (fixP->fx_r_type == R_HPPA_PCREL_CALL
- && (distance > 8388607 || distance < -8388608)
- && (bfd_get_32 (stdoutput, buf) & 0xffe00000) == 0xe8000000)
- CHECK_FIELD (distance, 8388607, -8388608, 0);
-
- /* Mask off 22 bits to be changed. */
- bfd_put_32 (stdoutput,
- bfd_get_32 (stdoutput, buf) & 0xfc00e002,
- buf);
- sign_unext ((new_val - 8) >> 2, 22, &resulti);
- dis_assemble_22 (resulti, &w3, &w1, &w2, &w);
- result = ((w3 << 21) | (w2 << 2) | (w1 << 16) | w);
- break;
- }
+ /* Handle all the opcodes with the 'w' operand type. */
+ case 12:
+ CHECK_FIELD (new_val - 8, 8191, -8192, 0);
+ val = new_val - 8;
- case 32:
- result = 0;
- bfd_put_32 (stdoutput, new_val, buf);
- break;
+ insn = (insn & ~ 0x1ffd) | re_assemble_12 (val >> 2);
+ break;
- default:
- as_bad (_("Unknown relocation encountered in md_apply_fix."));
- return 0;
- }
+ /* Handle some of the opcodes with the 'W' operand type. */
+ case 17:
+ {
+ offsetT distance = *valp;
- /* Insert the relocation. */
- bfd_put_32 (stdoutput, bfd_get_32 (stdoutput, buf) | result, buf);
- return 1;
- }
- else
- {
- printf (_("no hppa_fixup entry for this fixup (fixP = 0x%x, type = 0x%x)\n"),
- (unsigned int) fixP, fixP->fx_r_type);
+ /* If this is an absolute branch (ie no link) with an out of
+ range target, then we want to complain. */
+ if (fixP->fx_r_type == (int) R_HPPA_PCREL_CALL
+ && (insn & 0xffe00000) == 0xe8000000)
+ CHECK_FIELD (distance - 8, 262143, -262144, 0);
+
+ CHECK_FIELD (new_val - 8, 262143, -262144, 0);
+ val = new_val - 8;
+
+ insn = (insn & ~ 0x1f1ffd) | re_assemble_17 (val >> 2);
+ break;
+ }
+
+ case 22:
+ {
+ offsetT distance = *valp;
+
+ /* If this is an absolute branch (ie no link) with an out of
+ range target, then we want to complain. */
+ if (fixP->fx_r_type == (int) R_HPPA_PCREL_CALL
+ && (insn & 0xffe00000) == 0xe8000000)
+ CHECK_FIELD (distance - 8, 8388607, -8388608, 0);
+
+ CHECK_FIELD (new_val - 8, 8388607, -8388608, 0);
+ val = new_val - 8;
+
+ insn = (insn & ~ 0x3ff1ffd) | re_assemble_22 (val >> 2);
+ break;
+ }
+
+ case -10:
+ val = new_val;
+ insn = (insn & ~ 0xfff1) | re_assemble_16 (val & -8);
+ break;
+
+ case -16:
+ val = new_val;
+ insn = (insn & ~ 0xfff9) | re_assemble_16 (val & -4);
+ break;
+
+ case 16:
+ val = new_val;
+ insn = (insn & ~ 0xffff) | re_assemble_16 (val);
+ break;
+
+ case 32:
+ insn = new_val;
+ break;
+
+ default:
+ as_bad (_("Unknown relocation encountered in md_apply_fix."));
return 0;
}
+
+ /* Insert the relocation. */
+ bfd_put_32 (stdoutput, insn, buf);
+ return 1;
}
/* Exactly what point is a PC-relative offset relative TO?
@@ -4453,19 +4627,21 @@ is_end_of_statement ()
the most common will be a hex or decimal constant, but it could be
a pre-defined register (Yuk!), or an absolute symbol.
- Return a number or -1 for failure.
+ Return 1 on success or 0 on failure. If STRICT, then a missing
+ register prefix will cause a failure. The number itself is
+ returned in `pa_number'.
- When parsing PA-89 FP register numbers RESULT will be
- the address of a structure to return information about
- L/R half of FP registers, store results there as appropriate.
+ IS_FLOAT indicates that a PA-89 FP register number should be
+ parsed; A `l' or `r' suffix is checked for if but 2 of IS_FLOAT is
+ not set.
pa_parse_number can not handle negative constants and will fail
horribly if it is passed such a constant. */
static int
-pa_parse_number (s, result)
+pa_parse_number (s, is_float)
char **s;
- struct pa_11_fp_reg_struct *result;
+ int is_float;
{
int num;
char *name;
@@ -4473,23 +4649,18 @@ pa_parse_number (s, result)
symbolS *sym;
int status;
char *p = *s;
+ boolean have_prefix;
/* Skip whitespace before the number. */
while (*p == ' ' || *p == '\t')
p = p + 1;
- /* Store info in RESULT if requested by caller. */
- if (result)
- {
- result->number_part = -1;
- result->l_r_select = -1;
- }
- num = -1;
-
- if (isdigit (*p))
+ pa_number = -1;
+ have_prefix = 0;
+ num = 0;
+ if (!strict && isdigit (*p))
{
/* Looks like a number. */
- num = 0;
if (*p == '0' && (*(p + 1) == 'x' || *(p + 1) == 'X'))
{
@@ -4517,35 +4688,36 @@ pa_parse_number (s, result)
}
}
- /* Store info in RESULT if requested by the caller. */
- if (result)
- {
- result->number_part = num;
+ pa_number = num;
- if (IS_R_SELECT (p))
- {
- result->l_r_select = 1;
- ++p;
- }
- else if (IS_L_SELECT (p))
+ /* Check for a `l' or `r' suffix. */
+ if (is_float)
+ {
+ pa_number += FP_REG_BASE;
+ if (! (is_float & 2))
{
- result->l_r_select = 0;
- ++p;
+ if (IS_R_SELECT (p))
+ {
+ pa_number += FP_REG_RSEL;
+ ++p;
+ }
+ else if (IS_L_SELECT (p))
+ {
+ ++p;
+ }
}
- else
- result->l_r_select = 0;
}
}
else if (*p == '%')
{
/* The number might be a predefined register. */
- num = 0;
+ have_prefix = 1;
name = p;
p++;
c = *p;
/* Tege hack: Special case for general registers as the general
code makes a binary search with case translation, and is VERY
- slow. */
+ slow. */
if (c == 'r')
{
p++;
@@ -4595,23 +4767,12 @@ pa_parse_number (s, result)
*p = c;
}
- /* Store info in RESULT if requested by caller. */
- if (result)
- {
- result->number_part = num;
- if (IS_R_SELECT (p - 1))
- result->l_r_select = 1;
- else if (IS_L_SELECT (p - 1))
- result->l_r_select = 0;
- else
- result->l_r_select = 0;
- }
+ pa_number = num;
}
else
{
/* And finally, it could be a symbol in the absolute section which
- is effectively a constant. */
- num = 0;
+ is effectively a constant, or a register alias symbol. */
name = p;
c = *p;
while (is_part_of_name (c))
@@ -4622,16 +4783,23 @@ pa_parse_number (s, result)
*p = 0;
if ((sym = symbol_find (name)) != NULL)
{
- if (S_GET_SEGMENT (sym) == &bfd_abs_section)
+ if (S_GET_SEGMENT (sym) == reg_section)
+ {
+ num = S_GET_VALUE (sym);
+ /* Well, we don't really have one, but we do have a
+ register, so... */
+ have_prefix = true;
+ }
+ else if (S_GET_SEGMENT (sym) == &bfd_abs_section)
num = S_GET_VALUE (sym);
- else
+ else if (!strict)
{
if (print_errors)
as_bad (_("Non-absolute symbol: '%s'."), name);
num = -1;
}
}
- else
+ else if (!strict)
{
/* There is where we'd come for an undefined symbol
or for an empty string. For an empty string we
@@ -4648,24 +4816,18 @@ pa_parse_number (s, result)
}
*p = c;
- /* Store info in RESULT if requested by caller. */
- if (result)
- {
- result->number_part = num;
- if (IS_R_SELECT (p - 1))
- result->l_r_select = 1;
- else if (IS_L_SELECT (p - 1))
- result->l_r_select = 0;
- else
- result->l_r_select = 0;
- }
+ pa_number = num;
}
- *s = p;
- return num;
+ if (!strict || have_prefix)
+ {
+ *s = p;
+ return 1;
+ }
+ return 0;
}
-#define REG_NAME_CNT (sizeof(pre_defined_registers) / sizeof(struct pd_reg))
+#define REG_NAME_CNT (sizeof (pre_defined_registers) / sizeof (struct pd_reg))
/* Given NAME, find the register number associated with that name, return
the integer value associated with the given name or -1 on failure. */
@@ -4696,16 +4858,14 @@ reg_name_search (name)
return -1;
}
-
/* Return nonzero if the given INSN and L/R information will require
a new PA-1.1 opcode. */
static int
-need_pa11_opcode (insn, result)
- struct pa_it *insn;
- struct pa_11_fp_reg_struct *result;
+need_pa11_opcode ()
{
- if (result->l_r_select == 1 && !(insn->fpof1 == DBL && insn->fpof2 == DBL))
+ if ((pa_number & FP_REG_RSEL) != 0
+ && !(the_insn.fpof1 == DBL && the_insn.fpof2 == DBL))
{
/* If this instruction is specific to a particular architecture,
then set a new architecture. */
@@ -5001,7 +5161,7 @@ get_expression (str)
return 0;
}
-/* Mark (via expr_end) the end of an absolute expression. FIXME. */
+/* Mark (via expr_end) the end of an absolute expression. FIXME. */
static int
pa_get_absolute_expression (insn, strp)
struct pa_it *insn;
@@ -5017,7 +5177,7 @@ pa_get_absolute_expression (insn, strp)
The PA assembly syntax is ambigious in a variety of ways. Consider
this string "4 %r5" Is that the number 4 followed by the register
- r5, or is that 4 MOD 5?
+ r5, or is that 4 MOD r5?
If we get a modulo expresion When looking for an absolute, we try
again cutting off the input string at the first whitespace character. */
@@ -5066,70 +5226,14 @@ static int
evaluate_absolute (insn)
struct pa_it *insn;
{
- int value;
+ offsetT value;
expressionS exp;
int field_selector = insn->field_selector;
exp = insn->exp;
value = exp.X_add_number;
- switch (field_selector)
- {
- /* No change. */
- case e_fsel:
- break;
-
- /* If bit 21 is on then add 0x800 and arithmetic shift right 11 bits. */
- case e_lssel:
- if (value & 0x00000400)
- value += 0x800;
- value = (value & 0xfffff800) >> 11;
- break;
-
- /* Sign extend from bit 21. */
- case e_rssel:
- if (value & 0x00000400)
- value |= 0xfffff800;
- else
- value &= 0x7ff;
- break;
-
- /* Arithmetic shift right 11 bits. */
- case e_lsel:
- value = (value & 0xfffff800) >> 11;
- break;
-
- /* Set bits 0-20 to zero. */
- case e_rsel:
- value = value & 0x7ff;
- break;
-
- /* Add 0x800 and arithmetic shift right 11 bits. */
- case e_ldsel:
- value += 0x800;
- value = (value & 0xfffff800) >> 11;
- break;
-
- /* Set bitgs 0-21 to one. */
- case e_rdsel:
- value |= 0xfffff800;
- break;
-
-#define RSEL_ROUND(c) (((c) + 0x1000) & ~0x1fff)
- case e_rrsel:
- value = (RSEL_ROUND (value) & 0x7ff) + (value - RSEL_ROUND (value));
- break;
-
- case e_lrsel:
- value = (RSEL_ROUND (value) >> 11) & 0x1fffff;
- break;
-#undef RSEL_ROUND
-
- default:
- BAD_CASE (field_selector);
- break;
- }
- return value;
+ return hppa_field_adjust (0, value, field_selector);
}
/* Given an argument location specification return the associated
@@ -5239,7 +5343,6 @@ pa_parse_nonneg_cmpsub_cmpltr (s, isbranch)
c = **s;
**s = 0x00;
-
if (strcmp (name, "=") == 0)
{
cmpltr = 1;
@@ -5286,7 +5389,6 @@ pa_parse_nonneg_cmpsub_cmpltr (s, isbranch)
if (nullify)
*s = save_s;
-
return cmpltr;
}
@@ -5317,7 +5419,6 @@ pa_parse_neg_cmpsub_cmpltr (s, isbranch)
c = **s;
**s = 0x00;
-
if (strcasecmp (name, "tr") == 0)
{
cmpltr = 0;
@@ -5368,11 +5469,9 @@ pa_parse_neg_cmpsub_cmpltr (s, isbranch)
if (nullify)
*s = save_s;
-
return cmpltr;
}
-
/* Parse a 64 bit compare and branch completer returning the number (for
encoding in instrutions) of the given completer.
@@ -5386,7 +5485,6 @@ pa_parse_cmpb_64_cmpltr (s)
int cmpltr;
char *name = *s + 1;
char c;
- char *save_s = *s;
cmpltr = -1;
if (**s == ',')
@@ -5468,7 +5566,6 @@ pa_parse_cmpb_64_cmpltr (s)
**s = c;
}
-
return cmpltr;
}
@@ -5482,7 +5579,6 @@ pa_parse_cmpib_64_cmpltr (s)
int cmpltr;
char *name = *s + 1;
char c;
- char *save_s = *s;
cmpltr = -1;
if (**s == ',')
@@ -5532,7 +5628,6 @@ pa_parse_cmpib_64_cmpltr (s)
**s = c;
}
-
return cmpltr;
}
@@ -5793,6 +5888,7 @@ pa_parse_addb_64_cmpltr (s)
alignment of the subspace if necessary. */
static void
pa_align (bytes)
+ int bytes;
{
/* We must have a valid space and subspace. */
pa_check_current_space_and_subspace ();
@@ -5811,7 +5907,7 @@ pa_align (bytes)
static void
pa_block (z)
- int z;
+ int z ATTRIBUTE_UNUSED;
{
char *p;
long int temp_fill;
@@ -5849,7 +5945,7 @@ pa_block (z)
static void
pa_brtab (begin)
- int begin;
+ int begin ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
@@ -5860,7 +5956,7 @@ pa_brtab (begin)
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
NULL, (offsetT) 0, NULL,
0, begin ? R_HPPA_BEGIN_BRTAB : R_HPPA_END_BRTAB,
- e_fsel, 0, 0, NULL);
+ e_fsel, 0, 0, 0);
#endif
demand_empty_rest_of_line ();
@@ -5870,7 +5966,7 @@ pa_brtab (begin)
static void
pa_try (begin)
- int begin;
+ int begin ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
expressionS exp;
@@ -5885,7 +5981,7 @@ pa_try (begin)
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
NULL, (offsetT) 0, begin ? NULL : &exp,
0, begin ? R_HPPA_BEGIN_TRY : R_HPPA_END_TRY,
- e_fsel, 0, 0, NULL);
+ e_fsel, 0, 0, 0);
#endif
demand_empty_rest_of_line ();
@@ -5897,7 +5993,7 @@ pa_try (begin)
static void
pa_call (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -5986,21 +6082,18 @@ static void
pa_build_unwind_subspace (call_info)
struct call_info *call_info;
{
- char *unwind;
asection *seg, *save_seg;
- asymbol *sym;
- subsegT subseg, save_subseg;
- int i, reloc;
- char c, *p;
+ subsegT save_subseg;
+ unsigned int unwind;
+ int reloc;
+ char *p;
- if (now_seg != text_section)
+ if ((bfd_get_section_flags (stdoutput, now_seg)
+ & (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
+ != (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
return;
- if (bfd_get_arch_info (stdoutput)->bits_per_address == 32)
- reloc = R_PARISC_DIR32;
- else
- reloc = R_PARISC_SEGREL32;
-
+ reloc = R_PARISC_SEGREL32;
save_seg = now_seg;
save_subseg = now_subseg;
/* Get into the right seg/subseg. This may involve creating
@@ -6018,20 +6111,16 @@ pa_build_unwind_subspace (call_info)
subseg_set (seg, 0);
-
/* Get some space to hold relocation information for the unwind
descriptor. */
- p = frag_more (4);
- md_number_to_chars (p, 0, 4);
+ p = frag_more (16);
/* Relocation info. for start offset of the function. */
+ md_number_to_chars (p, 0, 4);
fix_new_hppa (frag_now, p - frag_now->fr_literal, 4,
call_info->start_symbol, (offsetT) 0,
(expressionS *) NULL, 0, reloc,
- e_fsel, 32, 0, NULL);
-
- p = frag_more (4);
- md_number_to_chars (p, 0, 4);
+ e_fsel, 32, 0, 0);
/* Relocation info. for end offset of the function.
@@ -6040,21 +6129,18 @@ pa_build_unwind_subspace (call_info)
symbol into the symbol table. It (should) end up giving the same
value as call_info->start_symbol + function size once the linker is
finished with its work. */
-
- fix_new_hppa (frag_now, p - frag_now->fr_literal, 4,
+ md_number_to_chars (p + 4, 0, 4);
+ fix_new_hppa (frag_now, p + 4 - frag_now->fr_literal, 4,
call_info->end_symbol, (offsetT) 0,
(expressionS *) NULL, 0, reloc,
- e_fsel, 32, 0, NULL);
+ e_fsel, 32, 0, 0);
- /* Dump it. */
- unwind = (char *) &call_info->ci_unwind;
- for (i = 8; i < sizeof (struct unwind_table); i++)
- {
- c = *(unwind + i);
- {
- FRAG_APPEND_1_CHAR (c);
- }
- }
+ /* Dump the descriptor. */
+ unwind = UNWIND_LOW32 (&call_info->ci_unwind.descriptor);
+ md_number_to_chars (p + 8, unwind, 4);
+
+ unwind = UNWIND_HIGH32 (&call_info->ci_unwind.descriptor);
+ md_number_to_chars (p + 12, unwind, 4);
/* Return back to the original segment/subsegment. */
subseg_set (save_seg, save_subseg);
@@ -6067,7 +6153,7 @@ pa_build_unwind_subspace (call_info)
static void
pa_callinfo (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
char *name, c, *p;
int temp;
@@ -6206,21 +6292,37 @@ pa_callinfo (unused)
demand_empty_rest_of_line ();
}
-/* Switch into the code subspace. */
-
+#if !(defined (OBJ_ELF) && defined (TE_LINUX))
+/* Switch to the text space. Like s_text, but delete our
+ label when finished. */
static void
-pa_code (unused)
- int unused;
+pa_text (unused)
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
current_space = is_defined_space ("$TEXT$");
current_subspace
= pa_subsegment_to_subspace (current_space->sd_seg, 0);
#endif
+
s_text (0);
pa_undefine_label ();
}
+/* Switch to the data space. As usual delete our label. */
+static void
+pa_data (unused)
+ int unused ATTRIBUTE_UNUSED;
+{
+#ifdef OBJ_SOM
+ current_space = is_defined_space ("$PRIVATE$");
+ current_subspace
+ = pa_subsegment_to_subspace (current_space->sd_seg, 0);
+#endif
+ s_data (0);
+ pa_undefine_label ();
+}
+
/* This is different than the standard GAS s_comm(). On HP9000/800 machines,
the .comm pseudo-op has the following symtax:
@@ -6243,7 +6345,7 @@ pa_code (unused)
static void
pa_comm (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
unsigned int size;
symbolS *symbol;
@@ -6270,12 +6372,13 @@ pa_comm (unused)
}
demand_empty_rest_of_line ();
}
+#endif /* !(defined (OBJ_ELF) && defined (TE_LINUX)) */
/* Process a .END pseudo-op. */
static void
pa_end (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
demand_empty_rest_of_line ();
}
@@ -6283,7 +6386,7 @@ pa_end (unused)
/* Process a .ENTER pseudo-op. This is not supported. */
static void
pa_enter (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -6298,7 +6401,7 @@ pa_enter (unused)
procesure. */
static void
pa_entry (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -6327,16 +6430,39 @@ pa_entry (unused)
denote the entry and exit points. */
if (last_call_info->start_symbol != NULL)
{
- char *where = frag_more (0);
+ char *where;
+ unsigned int u;
+ where = frag_more (0);
+ u = UNWIND_LOW32 (&last_call_info->ci_unwind.descriptor);
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
NULL, (offsetT) 0, NULL,
- 0, R_HPPA_ENTRY, e_fsel, 0, 0,
- (int *) &last_call_info->ci_unwind.descriptor);
+ 0, R_HPPA_ENTRY, e_fsel, 0, 0, u);
}
#endif
}
+/* Silly nonsense for pa_equ. The only half-sensible use for this is
+ being able to subtract two register symbols that specify a range of
+ registers, to get the size of the range. */
+static int fudge_reg_expressions;
+
+int
+hppa_force_reg_syms_absolute (resultP, op, rightP)
+ expressionS *resultP;
+ operatorT op ATTRIBUTE_UNUSED;
+ expressionS *rightP;
+{
+ if (fudge_reg_expressions
+ && rightP->X_op == O_register
+ && resultP->X_op == O_register)
+ {
+ rightP->X_op = O_constant;
+ resultP->X_op = O_constant;
+ }
+ return 0; /* Continue normal expr handling. */
+}
+
/* Handle a .EQU pseudo-op. */
static void
@@ -6350,10 +6476,32 @@ pa_equ (reg)
{
symbol = label_symbol->lss_label;
if (reg)
- S_SET_VALUE (symbol, pa_parse_number (&input_line_pointer, 0));
+ {
+ strict = 1;
+ if (!pa_parse_number (&input_line_pointer, 0))
+ as_bad (_(".REG expression must be a register"));
+ S_SET_VALUE (symbol, pa_number);
+ S_SET_SEGMENT (symbol, reg_section);
+ }
else
- S_SET_VALUE (symbol, (unsigned int) get_absolute_expression ());
- S_SET_SEGMENT (symbol, bfd_abs_section_ptr);
+ {
+ expressionS exp;
+ segT seg;
+
+ fudge_reg_expressions = 1;
+ seg = expression (&exp);
+ fudge_reg_expressions = 0;
+ if (exp.X_op != O_constant
+ && exp.X_op != O_register)
+ {
+ if (exp.X_op != O_absent)
+ as_bad (_("bad or irreducible absolute expression; zero assumed"));
+ exp.X_add_number = 0;
+ seg = absolute_section;
+ }
+ S_SET_VALUE (symbol, (unsigned int) exp.X_add_number);
+ S_SET_SEGMENT (symbol, seg);
+ }
}
else
{
@@ -6397,7 +6545,7 @@ process_exit ()
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
NULL, (offsetT) 0,
NULL, 0, R_HPPA_EXIT, e_fsel, 0, 0,
- (int *) &last_call_info->ci_unwind.descriptor + 1);
+ UNWIND_HIGH32 (&last_call_info->ci_unwind.descriptor));
#endif
}
@@ -6405,7 +6553,7 @@ process_exit ()
static void
pa_exit (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -6438,7 +6586,7 @@ pa_exit (unused)
static void
pa_export (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
char *name, c, *p;
symbolS *symbol;
@@ -6455,8 +6603,13 @@ pa_export (unused)
}
else
{
- /* OK. Set the external bits and process argument relocations. */
+ /* OK. Set the external bits and process argument relocations.
+ For the HP, weak and global are not mutually exclusive.
+ S_SET_EXTERNAL will not set BSF_GLOBAL if WEAK is set.
+ Call S_SET_EXTERNAL to get the other processing. Manually
+ set BSF_GLOBAL when we get back. */
S_SET_EXTERNAL (symbol);
+ symbol_get_bfdsym (symbol)->flags |= BSF_GLOBAL;
p = input_line_pointer;
*p = c;
if (!is_end_of_statement ())
@@ -6479,13 +6632,13 @@ pa_type_args (symbolP, is_export)
char *name, c, *p;
unsigned int temp, arg_reloc;
pa_symbol_type type = SYMBOL_TYPE_UNKNOWN;
- obj_symbol_type *symbol = (obj_symbol_type *) symbol_get_bfdsym (symbolP);
+ asymbol *bfdsym = symbol_get_bfdsym (symbolP);
if (strncasecmp (input_line_pointer, "absolute", 8) == 0)
{
input_line_pointer += 8;
- symbol_get_bfdsym (symbolP)->flags &= ~BSF_FUNCTION;
+ bfdsym->flags &= ~BSF_FUNCTION;
S_SET_SEGMENT (symbolP, bfd_abs_section_ptr);
type = SYMBOL_TYPE_ABSOLUTE;
}
@@ -6504,50 +6657,58 @@ pa_type_args (symbolP, is_export)
as_tsktsk (_("Using ENTRY rather than CODE in export directive for %s"),
S_GET_NAME (symbolP));
- symbol_get_bfdsym (symbolP)->flags |= BSF_FUNCTION;
+ bfdsym->flags |= BSF_FUNCTION;
type = SYMBOL_TYPE_ENTRY;
}
else
{
- symbol_get_bfdsym (symbolP)->flags &= ~BSF_FUNCTION;
+ bfdsym->flags &= ~BSF_FUNCTION;
type = SYMBOL_TYPE_CODE;
}
}
else if (strncasecmp (input_line_pointer, "data", 4) == 0)
{
input_line_pointer += 4;
- symbol_get_bfdsym (symbolP)->flags &= ~BSF_FUNCTION;
- symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
+ bfdsym->flags &= ~BSF_FUNCTION;
+ bfdsym->flags |= BSF_OBJECT;
type = SYMBOL_TYPE_DATA;
}
else if ((strncasecmp (input_line_pointer, "entry", 5) == 0))
{
input_line_pointer += 5;
- symbol_get_bfdsym (symbolP)->flags |= BSF_FUNCTION;
+ bfdsym->flags |= BSF_FUNCTION;
type = SYMBOL_TYPE_ENTRY;
}
else if (strncasecmp (input_line_pointer, "millicode", 9) == 0)
{
input_line_pointer += 9;
- symbol_get_bfdsym (symbolP)->flags |= BSF_FUNCTION;
+ bfdsym->flags |= BSF_FUNCTION;
+#ifdef OBJ_ELF
+ {
+ elf_symbol_type *elfsym = (elf_symbol_type *) bfdsym;
+ elfsym->internal_elf_sym.st_info =
+ ELF_ST_INFO (ELF_ST_BIND (elfsym->internal_elf_sym.st_info),
+ STT_PARISC_MILLI);
+ }
+#endif
type = SYMBOL_TYPE_MILLICODE;
}
else if (strncasecmp (input_line_pointer, "plabel", 6) == 0)
{
input_line_pointer += 6;
- symbol_get_bfdsym (symbolP)->flags &= ~BSF_FUNCTION;
+ bfdsym->flags &= ~BSF_FUNCTION;
type = SYMBOL_TYPE_PLABEL;
}
else if (strncasecmp (input_line_pointer, "pri_prog", 8) == 0)
{
input_line_pointer += 8;
- symbol_get_bfdsym (symbolP)->flags |= BSF_FUNCTION;
+ bfdsym->flags |= BSF_FUNCTION;
type = SYMBOL_TYPE_PRI_PROG;
}
else if (strncasecmp (input_line_pointer, "sec_prog", 8) == 0)
{
input_line_pointer += 8;
- symbol_get_bfdsym (symbolP)->flags |= BSF_FUNCTION;
+ bfdsym->flags |= BSF_FUNCTION;
type = SYMBOL_TYPE_SEC_PROG;
}
@@ -6555,7 +6716,7 @@ pa_type_args (symbolP, is_export)
than BFD understands. This is how we get this information
to the SOM BFD backend. */
#ifdef obj_set_symbol_type
- obj_set_symbol_type (symbol_get_bfdsym (symbolP), (int) type);
+ obj_set_symbol_type (bfdsym, (int) type);
#endif
/* Now that the type of the exported symbol has been handled,
@@ -6576,8 +6737,8 @@ pa_type_args (symbolP, is_export)
name = input_line_pointer;
c = get_symbol_end ();
arg_reloc = pa_align_arg_reloc (temp, pa_build_arg_reloc (name));
-#ifdef OBJ_SOM
- symbol->tc_data.ap.hppa_arg_reloc |= arg_reloc;
+#if defined (OBJ_SOM) || defined (ELF_ARG_RELOC)
+ symbol_arg_reloc_info (symbolP) |= arg_reloc;
#endif
*input_line_pointer = c;
}
@@ -6590,8 +6751,8 @@ pa_type_args (symbolP, is_export)
name = input_line_pointer;
c = get_symbol_end ();
arg_reloc = pa_build_arg_reloc (name);
-#ifdef OBJ_SOM
- symbol->tc_data.ap.hppa_arg_reloc |= arg_reloc;
+#if defined (OBJ_SOM) || defined (ELF_ARG_RELOC)
+ symbol_arg_reloc_info (symbolP) |= arg_reloc;
#endif
*input_line_pointer = c;
}
@@ -6603,7 +6764,7 @@ pa_type_args (symbolP, is_export)
input_line_pointer++;
temp = atoi (input_line_pointer);
#ifdef OBJ_SOM
- symbol->tc_data.ap.hppa_priv_level = temp;
+ ((obj_symbol_type *) bfdsym)->tc_data.ap.hppa_priv_level = temp;
#endif
c = get_symbol_end ();
*input_line_pointer = c;
@@ -6625,7 +6786,7 @@ pa_type_args (symbolP, is_export)
static void
pa_import (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
char *name, c, *p;
symbolS *symbol;
@@ -6677,7 +6838,7 @@ pa_import (unused)
static void
pa_label (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
char *name, c, *p;
@@ -6707,7 +6868,7 @@ pa_label (unused)
static void
pa_leave (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -6722,7 +6883,7 @@ pa_leave (unused)
static void
pa_level (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
char *level;
@@ -6763,7 +6924,7 @@ pa_level (unused)
static void
pa_origin (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -6779,7 +6940,7 @@ pa_origin (unused)
static void
pa_param (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
char *name, c, *p;
symbolS *symbol;
@@ -6810,11 +6971,11 @@ pa_param (unused)
}
/* Handle a .PROC pseudo-op. It is used to mark the beginning
- of a procedure from a syntatical point of view. */
+ of a procedure from a syntactical point of view. */
static void
pa_proc (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
struct call_info *call_info;
@@ -6884,7 +7045,7 @@ pa_proc (unused)
static void
pa_procend (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
@@ -6915,12 +7076,14 @@ pa_procend (unused)
information when the label appears after the proc/procend. */
if (within_entry_exit)
{
- char *where = frag_more (0);
+ char *where;
+ unsigned int u;
+ where = frag_more (0);
+ u = UNWIND_LOW32 (&last_call_info->ci_unwind.descriptor);
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
NULL, (offsetT) 0, NULL,
- 0, R_HPPA_ENTRY, e_fsel, 0, 0,
- (int *) &last_call_info->ci_unwind.descriptor);
+ 0, R_HPPA_ENTRY, e_fsel, 0, 0, u);
}
#endif
}
@@ -6951,6 +7114,7 @@ pa_procend (unused)
pa_undefine_label ();
}
+#ifdef OBJ_SOM
/* If VALUE is an exact power of two between zero and 2^31, then
return log2 (VALUE). Else return -1. */
@@ -6969,8 +7133,6 @@ log2 (value)
return shift;
}
-
-#ifdef OBJ_SOM
/* Check to make sure we have a valid space and subspace. */
static void
@@ -6994,7 +7156,7 @@ pa_parse_space_stmt (space_name, create_flag)
{
char *name, *ptemp, c;
char loadable, defined, private, sort;
- int spnum, temp;
+ int spnum;
asection *seg = NULL;
sd_chain_struct *space;
@@ -7028,10 +7190,11 @@ pa_parse_space_stmt (space_name, create_flag)
/* First see if the space was specified as a number rather than
as a name. According to the PA assembly manual the rest of
the line should be ignored. */
- temp = pa_parse_number (&ptemp, 0);
- if (temp >= 0)
+ strict = 0;
+ pa_parse_number (&ptemp, 0);
+ if (pa_number >= 0)
{
- spnum = temp;
+ spnum = pa_number;
input_line_pointer = ptemp;
}
else
@@ -7110,10 +7273,9 @@ pa_parse_space_stmt (space_name, create_flag)
static void
pa_space (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
char *name, c, *space_name, *save_s;
- int temp;
sd_chain_struct *sd_chain;
if (within_procedure)
@@ -7191,9 +7353,11 @@ pa_space (unused)
/* It could be a space specified by number. */
print_errors = 0;
save_s = input_line_pointer;
- if ((temp = pa_parse_number (&input_line_pointer, 0)) >= 0)
+ strict = 0;
+ pa_parse_number (&input_line_pointer, 0);
+ if (pa_number >= 0)
{
- if ((sd_chain = pa_find_space_by_number (temp)))
+ if ((sd_chain = pa_find_space_by_number (pa_number)))
{
current_space = sd_chain;
@@ -7229,7 +7393,7 @@ pa_space (unused)
static void
pa_spnum (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
char *name;
char c;
@@ -7478,7 +7642,6 @@ pa_subspace (create_new)
SUBSPACE_DEFINED (current_subspace) = 1;
}
-
/* Create default space and subspace dictionaries. */
static void
@@ -7521,7 +7684,6 @@ pa_spaces_begin ()
/* Create the new section. */
segment = subseg_new (name, subsegment);
-
/* For SOM we want to replace the standard .text, .data, and .bss
sections with our own. We also want to set BFD flags for
all the built-in subspaces. */
@@ -7544,7 +7706,6 @@ pa_spaces_begin ()
| SEC_RELOC
| SEC_HAS_CONTENTS));
-
}
else if (!strcmp (pa_def_subspaces[i].name, "$BSS$"))
{
@@ -7606,8 +7767,6 @@ pa_spaces_begin ()
}
}
-
-
/* Create a new space NAME, with the appropriate flags as defined
by the given parameters. */
@@ -7972,11 +8131,6 @@ pa_stringer_aux (s)
{
unsigned int c = *s & CHAR_MASK;
-#ifdef OBJ_SOM
- /* We must have a valid space and subspace. */
- pa_check_current_space_and_subspace ();
-#endif
-
switch (c)
{
case '\"':
@@ -7999,9 +8153,14 @@ pa_stringer (append_zero)
int i;
/* Preprocess the string to handle PA-specific escape sequences.
- For example, \xDD where DD is a hexidecimal number should be
+ For example, \xDD where DD is a hexadecimal number should be
changed to \OOO where OOO is an octal number. */
+#ifdef OBJ_SOM
+ /* We must have a valid space and subspace. */
+ pa_check_current_space_and_subspace ();
+#endif
+
/* Skip the opening quote. */
s = input_line_pointer + 1;
@@ -8020,7 +8179,7 @@ pa_stringer (append_zero)
char dg;
char *s_start = s;
- /* Get pas the 'x'. */
+ /* Get past the 'x'. */
s++;
for (num_digit = 0, number = 0, dg = *s;
num_digit < 2
@@ -8069,7 +8228,7 @@ pa_stringer (append_zero)
static void
pa_version (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
obj_version (0);
pa_undefine_label ();
@@ -8081,7 +8240,7 @@ pa_version (unused)
static void
pa_compiler (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
obj_som_compiler (0);
pa_undefine_label ();
@@ -8093,7 +8252,7 @@ pa_compiler (unused)
static void
pa_copyright (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
obj_copyright (0);
pa_undefine_label ();
@@ -8110,21 +8269,6 @@ pa_cons (nbytes)
pa_undefine_label ();
}
-/* Switch to the data space. As usual delete our label. */
-
-static void
-pa_data (unused)
- int unused;
-{
-#ifdef OBJ_SOM
- current_space = is_defined_space ("$PRIVATE$");
- current_subspace
- = pa_subsegment_to_subspace (current_space->sd_seg, 0);
-#endif
- s_data (0);
- pa_undefine_label ();
-}
-
/* Like float_cons, but we need to undefine our label. */
static void
@@ -8139,7 +8283,7 @@ pa_float_cons (float_type)
static void
pa_fill (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -8169,7 +8313,7 @@ pa_lcomm (needs_align)
static void
pa_lsym (unused)
- int unused;
+ int unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_SOM
/* We must have a valid space and subspace. */
@@ -8180,22 +8324,6 @@ pa_lsym (unused)
pa_undefine_label ();
}
-/* Switch to the text space. Like s_text, but delete our
- label when finished. */
-static void
-pa_text (unused)
- int unused;
-{
-#ifdef OBJ_SOM
- current_space = is_defined_space ("$TEXT$");
- current_subspace
- = pa_subsegment_to_subspace (current_space->sd_seg, 0);
-#endif
-
- s_text (0);
- pa_undefine_label ();
-}
-
/* On the PA relocations which involve function symbols must not be
adjusted. This so that the linker can know when/how to create argument
relocation stubs for indirect calls and calls to static functions.
@@ -8233,6 +8361,17 @@ hppa_fix_adjustable (fixp)
/* Reject reductions of symbols in 32bit relocs. */
if (fixp->fx_r_type == R_HPPA && hppa_fix->fx_r_format == 32)
return 0;
+#endif
+
+#ifdef OBJ_ELF
+ if (fixp->fx_r_type == (int) R_PARISC_GNU_VTINHERIT
+ || fixp->fx_r_type == (int) R_PARISC_GNU_VTENTRY)
+ return 0;
+#endif
+
+ if (fixp->fx_addsy && (S_IS_EXTERNAL (fixp->fx_addsy)
+ || S_IS_WEAK (fixp->fx_addsy)))
+ return 0;
/* Reject reductions of symbols in sym1-sym2 expressions when
the fixup will occur in a CODE subspace.
@@ -8250,12 +8389,39 @@ hppa_fix_adjustable (fixp)
}
/* We can't adjust any relocs that use LR% and RR% field selectors.
- That confuses the HP linker. */
+
+ If a symbol is reduced to a section symbol, the assembler will
+ adjust the addend unless the symbol happens to reside right at
+ the start of the section. Additionally, the linker has no choice
+ but to manipulate the addends when coalescing input sections for
+ "ld -r". Since an LR% field selector is defined to round the
+ addend, we can't change the addend without risking that a LR% and
+ it's corresponding (possible multiple) RR% field will no longer
+ sum to the right value.
+
+ eg. Suppose we have
+ . ldil LR%foo+0,%r21
+ . ldw RR%foo+0(%r21),%r26
+ . ldw RR%foo+4(%r21),%r25
+
+ If foo is at address 4092 (decimal) in section `sect', then after
+ reducing to the section symbol we get
+ . LR%sect+4092 == (L%sect)+0
+ . RR%sect+4092 == (R%sect)+4092
+ . RR%sect+4096 == (R%sect)-4096
+ and the last address loses because rounding the addend to 8k
+ mutiples takes us up to 8192 with an offset of -4096.
+
+ In cases where the LR% expression is identical to the RR% one we
+ will never have a problem, but is so happens that gcc rounds
+ addends involved in LR% field selectors to work around a HP
+ linker bug. ie. We often have addresses like the last case
+ above where the LR% expression is offset from the RR% one. */
+
if (hppa_fix->fx_r_field == e_lrsel
|| hppa_fix->fx_r_field == e_rrsel
|| hppa_fix->fx_r_field == e_nlrsel)
return 0;
-#endif
/* Reject reductions of symbols in DLT relative relocs,
relocations with plabels. */
@@ -8267,18 +8433,15 @@ hppa_fix_adjustable (fixp)
|| hppa_fix->fx_r_field == e_lpsel)
return 0;
- if (fixp->fx_addsy && S_IS_EXTERNAL (fixp->fx_addsy))
- return 0;
-
/* Reject absolute calls (jumps). */
if (hppa_fix->fx_r_type == R_HPPA_ABS_CALL)
return 0;
/* Reject reductions of function symbols. */
- if (fixp->fx_addsy == 0 || ! S_IS_FUNCTION (fixp->fx_addsy))
- return 1;
+ if (fixp->fx_addsy != 0 && S_IS_FUNCTION (fixp->fx_addsy))
+ return 0;
- return 0;
+ return 1;
}
/* Return nonzero if the fixup in FIXP will require a relocation,
@@ -8287,46 +8450,61 @@ hppa_fix_adjustable (fixp)
int
hppa_force_relocation (fixp)
- fixS *fixp;
+ struct fix *fixp;
{
struct hppa_fix_struct *hppa_fixp;
- int distance;
hppa_fixp = (struct hppa_fix_struct *) fixp->tc_fix_data;
#ifdef OBJ_SOM
- if (fixp->fx_r_type == R_HPPA_ENTRY || fixp->fx_r_type == R_HPPA_EXIT
- || fixp->fx_r_type == R_HPPA_BEGIN_BRTAB
- || fixp->fx_r_type == R_HPPA_END_BRTAB
- || fixp->fx_r_type == R_HPPA_BEGIN_TRY
- || fixp->fx_r_type == R_HPPA_END_TRY
+ if (fixp->fx_r_type == (int) R_HPPA_ENTRY
+ || fixp->fx_r_type == (int) R_HPPA_EXIT
+ || fixp->fx_r_type == (int) R_HPPA_BEGIN_BRTAB
+ || fixp->fx_r_type == (int) R_HPPA_END_BRTAB
+ || fixp->fx_r_type == (int) R_HPPA_BEGIN_TRY
+ || fixp->fx_r_type == (int) R_HPPA_END_TRY
|| (fixp->fx_addsy != NULL && fixp->fx_subsy != NULL
&& (hppa_fixp->segment->flags & SEC_CODE) != 0))
return 1;
#endif
+#ifdef OBJ_ELF
+ if (fixp->fx_r_type == (int) R_PARISC_GNU_VTINHERIT
+ || fixp->fx_r_type == (int) R_PARISC_GNU_VTENTRY)
+ return 1;
+#endif
-#define arg_reloc_stub_needed(CALLER, CALLEE) \
- ((CALLEE) && (CALLER) && ((CALLEE) != (CALLER)))
+ assert (fixp->fx_addsy != NULL);
+
+ /* Ensure we emit a relocation for global symbols so that dynamic
+ linking works. */
+ if (S_IS_EXTERNAL (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy))
+ return 1;
-#ifdef OBJ_SOM
/* It is necessary to force PC-relative calls/jumps to have a relocation
entry if they're going to need either a argument relocation or long
- call stub. FIXME. Can't we need the same for absolute calls? */
- if (fixp->fx_pcrel && fixp->fx_addsy
- && (arg_reloc_stub_needed ((long) ((obj_symbol_type *)
- symbol_get_bfdsym (fixp->fx_addsy))->tc_data.ap.hppa_arg_reloc,
- hppa_fixp->fx_arg_reloc)))
+ call stub. */
+ if (fixp->fx_pcrel
+ && arg_reloc_stub_needed (symbol_arg_reloc_info (fixp->fx_addsy),
+ hppa_fixp->fx_arg_reloc))
return 1;
+
+ /* Now check to see if we're going to need a long-branch stub. */
+ if (fixp->fx_r_type == (int) R_HPPA_PCREL_CALL)
+ {
+ valueT distance;
+
+ distance = (fixp->fx_offset + S_GET_VALUE (fixp->fx_addsy)
+ - md_pcrel_from (fixp) - 8);
+ if (distance + 8388608 >= 16777216
+ || (hppa_fixp->fx_r_format == 17 && distance + 262144 >= 524288)
+#ifdef OBJ_ELF
+ || (hppa_fixp->fx_r_format == 12 && distance + 8192 >= 16384)
#endif
- distance = (fixp->fx_offset + S_GET_VALUE (fixp->fx_addsy)
- - md_pcrel_from (fixp));
- /* Now check and see if we're going to need a long-branch stub. */
- if (fixp->fx_r_type == R_HPPA_PCREL_CALL
- && (distance > 262143 || distance < -262144))
- return 1;
+ )
+ return 1;
+ }
- if (fixp->fx_r_type == R_HPPA_ABS_CALL)
+ if (fixp->fx_r_type == (int) R_HPPA_ABS_CALL)
return 1;
-#undef arg_reloc_stub_needed
/* No need (yet) to force another relocations to be emitted. */
return 0;
@@ -8342,10 +8520,18 @@ hppa_elf_mark_end_of_function ()
{
/* ELF does not have EXIT relocations. All we do is create a
temporary symbol marking the end of the function. */
- char *name = (char *)
- xmalloc (strlen ("L$\001end_") +
- strlen (S_GET_NAME (last_call_info->start_symbol)) + 1);
+ char *name;
+
+ if (last_call_info == NULL || last_call_info->start_symbol == NULL)
+ {
+ /* We have already warned about a missing label,
+ or other problems. */
+ return;
+ }
+ name = (char *) xmalloc (strlen ("L$\001end_")
+ + strlen (S_GET_NAME (last_call_info->start_symbol))
+ + 1);
if (name)
{
symbolS *symbolP;
@@ -8410,12 +8596,48 @@ elf_hppa_final_processing ()
- S_GET_VALUE (call_info_pointer->start_symbol) + 4;
}
}
-#endif
-#ifdef OBJ_ELF
-pa_end_of_source ()
+static void
+pa_vtable_entry (ignore)
+ int ignore ATTRIBUTE_UNUSED;
{
- if (debug_type == DEBUG_DWARF2)
- dwarf2_finish ();
+ struct fix *new_fix;
+
+ new_fix = obj_elf_vtable_entry (0);
+
+ if (new_fix)
+ {
+ struct hppa_fix_struct *hppa_fix = (struct hppa_fix_struct *)
+ obstack_alloc (&notes, sizeof (struct hppa_fix_struct));
+ hppa_fix->fx_r_type = R_HPPA;
+ hppa_fix->fx_r_field = e_fsel;
+ hppa_fix->fx_r_format = 32;
+ hppa_fix->fx_arg_reloc = 0;
+ hppa_fix->segment = now_seg;
+ new_fix->tc_fix_data = (void *) hppa_fix;
+ new_fix->fx_r_type = (int) R_PARISC_GNU_VTENTRY;
+ }
+}
+
+static void
+pa_vtable_inherit (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ struct fix *new_fix;
+
+ new_fix = obj_elf_vtable_inherit (0);
+
+ if (new_fix)
+ {
+ struct hppa_fix_struct *hppa_fix = (struct hppa_fix_struct *)
+ obstack_alloc (&notes, sizeof (struct hppa_fix_struct));
+ hppa_fix->fx_r_type = R_HPPA;
+ hppa_fix->fx_r_field = e_fsel;
+ hppa_fix->fx_r_format = 32;
+ hppa_fix->fx_arg_reloc = 0;
+ hppa_fix->segment = now_seg;
+ new_fix->tc_fix_data = (void *) hppa_fix;
+ new_fix->fx_r_type = (int) R_PARISC_GNU_VTINHERIT;
+ }
}
#endif
diff --git a/gnu/usr.bin/binutils/gas/config/tc-hppa.h b/gnu/usr.bin/binutils/gas/config/tc-hppa.h
index 266c8caac65..bd0fe4cb508 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-hppa.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-hppa.h
@@ -1,5 +1,5 @@
/* tc-hppa.h -- Header file for the PA
- Copyright (C) 1989, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,7 +19,6 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-
/* HP PA-RISC support was contributed by the Center for Software Science
at the University of Utah. */
@@ -28,7 +27,7 @@
(please PARAMize them!) not exporting structures and data items which
are used solely within tc-hppa.c, etc.
- Also refrain from adding any more object file dependent code, there is
+ Also refrain from adding any more object file dependent code, there is
already far too much object file format dependent code in this file.
In theory this file should contain only exported functions, structures
and data declarations common to all PA assemblers. */
@@ -46,23 +45,38 @@
#define WORKING_DOT_WORD
-/* FIXME. The lack of a place to put things which are both target cpu
- and target format dependent makes hacks like this necessary. */
#ifdef OBJ_ELF
-#ifdef BFD64
+#if TARGET_ARCH_SIZE == 64
#include "bfd/elf64-hppa.h"
-#define TARGET_FORMAT "elf64-hppa"
+#ifdef TE_LINUX
+#define TARGET_FORMAT "elf64-hppa-linux"
#else
+#define TARGET_FORMAT "elf64-hppa"
+#endif
+#else /* TARGET_ARCH_SIZE == 32 */
#include "bfd/elf32-hppa.h"
+#ifdef TE_LINUX
+#define TARGET_FORMAT "elf32-hppa-linux"
+#else
#define TARGET_FORMAT "elf32-hppa"
#endif
#endif
+#endif
#ifdef OBJ_SOM
#include "bfd/som.h"
#define TARGET_FORMAT "som"
#endif
+#ifdef TE_LINUX
+/* Define to compile in an extra assembler option, -c, which enables a
+ warning (once per file) when a comment is encountered.
+ The hppa comment char is a `;' which tends to occur in random C asm
+ statements. A semicolon is a line separator for most assemblers.
+ It's hard to find these lurking semicolons. Thus... */
+#define WARN_COMMENTS 1
+#endif
+
/* FIXME. Why oh why aren't these defined somewhere globally? */
#ifndef FALSE
#define FALSE (0)
@@ -71,18 +85,12 @@
#define ASEC_NULL (asection *)0
-/* Labels are not required to have a colon for a suffix. */
-#define LABELS_WITHOUT_COLONS 1
-
-/* FIXME. This should be static and declared in tc-hppa.c, but
- pa_define_label gets used outside of tc-hppa.c via tc_frob_label.
- Should also be PARAMized, but symbolS isn't available here. */
-extern void pa_define_label ();
+/* pa_define_label gets used outside of tc-hppa.c via tc_frob_label. */
+extern void pa_define_label PARAMS ((symbolS *));
-/* FIXME. Types not available here, so they can't be PARAMized. */
-extern void parse_cons_expression_hppa ();
-extern void cons_fix_new_hppa ();
-extern int hppa_force_relocation ();
+extern void parse_cons_expression_hppa PARAMS ((expressionS *));
+extern void cons_fix_new_hppa PARAMS ((fragS *, int, int, expressionS *));
+extern int hppa_force_relocation PARAMS ((struct fix *));
/* This gets called before writing the object file to make sure
things like entry/exit and proc/procend pairs match. */
@@ -98,13 +106,6 @@ extern void pa_check_eof PARAMS ((void));
#define RELOC_EXPANSION_POSSIBLE
#define MAX_RELOC_EXPANSION 6
-/* FIXME. More things which are both HPPA and ELF specific. There is
- nowhere to put such things. */
-#ifdef OBJ_ELF
-#define elf_tc_final_processing elf_hppa_final_processing
-void elf_hppa_final_processing PARAMS ((void));
-#endif
-
/* The PA needs to parse field selectors in .byte, etc. */
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) \
@@ -122,6 +123,7 @@ void elf_hppa_final_processing PARAMS ((void));
it will always follow a comma. */
#define TC_EOL_IN_INSN(PTR) (*(PTR) == '!' && (PTR)[-1] == ',')
+int hppa_fix_adjustable PARAMS((struct fix *));
#define tc_fix_adjustable hppa_fix_adjustable
/* Because of the strange PA calling conventions, it is sometimes
@@ -141,7 +143,7 @@ void elf_hppa_final_processing PARAMS ((void));
/* We need to be able to make relocations involving the difference of
two symbols. This includes the difference of two symbols when
- one of them is undefined (this comes up in PIC code generation).
+ one of them is undefined (this comes up in PIC code generation).
We don't define DIFF_EXPR_OK because it does the wrong thing if
the add symbol is undefined and the sub symbol is a symbol in
@@ -151,20 +153,45 @@ void elf_hppa_final_processing PARAMS ((void));
#endif
#ifdef OBJ_ELF
+/* It's OK to subtract two symbols in the same section without
+ emitting a relocation. */
+#define TC_FORCE_RELOCATION_SECTION(FIXP, SEC) 0
+
+/* Handle .type psuedo. Given a type string of `millicode', set the
+ internal elf symbol type to STT_PARISC_MILLI, and return
+ BSF_FUNCTION for the BFD symbol type. */
+#define md_elf_symbol_type(name, sym, elf) \
+ ((strcmp ((name), "millicode") == 0 \
+ || strcmp ((name), "STT_PARISC_MILLI") == 0) \
+ ? (((elf)->internal_elf_sym.st_info = ELF_ST_INFO \
+ (ELF_ST_BIND ((elf)->internal_elf_sym.st_info), STT_PARISC_MILLI)\
+ ), BSF_FUNCTION) \
+ : -1)
+
#define tc_frob_symbol(sym,punt) \
{ \
if ((S_GET_SEGMENT (sym) == &bfd_und_section && ! symbol_used_p (sym)) \
|| (S_GET_SEGMENT (sym) == &bfd_abs_section \
&& ! S_IS_EXTERNAL (sym)) \
- || strcmp (S_GET_NAME (sym), "$global$") == 0) \
+ || strcmp (S_GET_NAME (sym), "$global$") == 0 \
+ || strcmp (S_GET_NAME (sym), "$PIC_pcrel$0") == 0) \
punt = 1; \
}
-#endif
+
+#define elf_tc_final_processing elf_hppa_final_processing
+void elf_hppa_final_processing PARAMS ((void));
+
+#define DWARF2_LINE_MIN_INSN_LENGTH 4
+#endif /* OBJ_ELF */
#define md_operand(x)
-#ifdef OBJ_ELF
-#define md_end() pa_end_of_source ()
-#endif
+
+/* Allow register expressions to be treated as absolute expressions.
+ A silly fudge required for backwards compatibility. */
+#define md_optimize_expr hppa_force_reg_syms_absolute
+
+int hppa_force_reg_syms_absolute
+ PARAMS ((expressionS *, operatorT, expressionS *));
#define TC_FIX_TYPE PTR
#define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL)
diff --git a/gnu/usr.bin/binutils/gas/config/tc-i386.c b/gnu/usr.bin/binutils/gas/config/tc-i386.c
index 17b1f79a9bc..c23541382b4 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-i386.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-i386.c
@@ -1,6 +1,7 @@
/* i386.c -- Assemble code for the Intel 80386
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,17 +20,17 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*
- Intel 80386 machine specific gas.
- Written by Eliot Dresselhaus (eliot@mgm.mit.edu).
- Bugs & suggestions are completely welcome. This is free software.
- Please help us make it better.
- */
+/* Intel 80386 machine specific gas.
+ Written by Eliot Dresselhaus (eliot@mgm.mit.edu).
+ x86_64 support by Jan Hubicka (jh@suse.cz)
+ Bugs & suggestions are completely welcome. This is free software.
+ Please help us make it better. */
#include <ctype.h>
#include "as.h"
#include "subsegs.h"
+#include "dwarf2dbg.h"
#include "opcode/i386.h"
#ifndef REGISTER_WARNINGS
@@ -52,23 +53,35 @@
#define false 0
static unsigned int mode_from_disp_size PARAMS ((unsigned int));
-static int fits_in_signed_byte PARAMS ((long));
-static int fits_in_unsigned_byte PARAMS ((long));
-static int fits_in_unsigned_word PARAMS ((long));
-static int fits_in_signed_word PARAMS ((long));
-static int smallest_imm_type PARAMS ((long));
+static int fits_in_signed_byte PARAMS ((offsetT));
+static int fits_in_unsigned_byte PARAMS ((offsetT));
+static int fits_in_unsigned_word PARAMS ((offsetT));
+static int fits_in_signed_word PARAMS ((offsetT));
+static int fits_in_unsigned_long PARAMS ((offsetT));
+static int fits_in_signed_long PARAMS ((offsetT));
+static int smallest_imm_type PARAMS ((offsetT));
+static offsetT offset_in_range PARAMS ((offsetT, int));
static int add_prefix PARAMS ((unsigned int));
-static void set_16bit_code_flag PARAMS ((int));
-static void set_16bit_gcc_code_flag PARAMS((int));
+static void set_code_flag PARAMS ((int));
+static void set_16bit_gcc_code_flag PARAMS ((int));
static void set_intel_syntax PARAMS ((int));
+static void set_cpu_arch PARAMS ((int));
#ifdef BFD_ASSEMBLER
static bfd_reloc_code_real_type reloc
- PARAMS ((int, int, bfd_reloc_code_real_type));
+ PARAMS ((int, int, int, bfd_reloc_code_real_type));
+#define RELOC_ENUM enum bfd_reloc_code_real
+#else
+#define RELOC_ENUM int
+#endif
+
+#ifndef DEFAULT_ARCH
+#define DEFAULT_ARCH "i386"
#endif
+static char *default_arch = DEFAULT_ARCH;
/* 'md_assemble ()' gathers together information and puts it into a
- i386_insn. */
+ i386_insn. */
union i386_op
{
@@ -79,19 +92,19 @@ union i386_op
struct _i386_insn
{
- /* TM holds the template for the insn were currently assembling. */
+ /* TM holds the template for the insn were currently assembling. */
template tm;
/* SUFFIX holds the instruction mnemonic suffix if given.
(e.g. 'l' for 'movl') */
char suffix;
- /* OPERANDS gives the number of given operands. */
+ /* OPERANDS gives the number of given operands. */
unsigned int operands;
/* REG_OPERANDS, DISP_OPERANDS, MEM_OPERANDS, IMM_OPERANDS give the number
of given register, displacement, memory operands and immediate
- operands. */
+ operands. */
unsigned int reg_operands, disp_operands, mem_operands, imm_operands;
/* TYPES [i] is the type (see above #defines) which tells us how to
@@ -102,12 +115,12 @@ struct _i386_insn
operand. */
union i386_op op[MAX_OPERANDS];
+ /* Flags for operands. */
+ unsigned int flags[MAX_OPERANDS];
+#define Operand_PCrel 1
+
/* Relocation type for operand */
-#ifdef BFD_ASSEMBLER
- enum bfd_reloc_code_real disp_reloc[MAX_OPERANDS];
-#else
- int disp_reloc[MAX_OPERANDS];
-#endif
+ RELOC_ENUM reloc[MAX_OPERANDS];
/* BASE_REG, INDEX_REG, and LOG2_SCALE_FACTOR are used to encode
the base index byte below. */
@@ -116,8 +129,8 @@ struct _i386_insn
unsigned int log2_scale_factor;
/* SEG gives the seg_entries of this insn. They are zero unless
- explicit segment overrides are given. */
- const seg_entry *seg[2]; /* segments for memory operands (if given) */
+ explicit segment overrides are given. */
+ const seg_entry *seg[2];
/* PREFIX holds all the given prefix opcodes (usually null).
PREFIXES is the number of prefix opcodes. */
@@ -128,6 +141,7 @@ struct _i386_insn
addressing modes of this insn are encoded. */
modrm_byte rm;
+ rex_byte rex;
sib_byte sib;
};
@@ -142,8 +156,8 @@ const char extra_symbol_chars[] = "*%-(";
#endif
/* This array holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful */
-#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (TE_LINUX) && !defined(TE_FreeBSD))
+ pre-processor is disabled, these aren't very useful. */
+#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX) && !defined(TE_FreeBSD))
/* Putting '/' here makes it impossible to use the divide operator.
However, we need it for compatibility with SVR4 systems. */
const char comment_chars[] = "#/";
@@ -155,36 +169,37 @@ const char comment_chars[] = "#";
/* This array holds the chars that only start a comment at the beginning of
a line. If the line seems to have the form '# 123 filename'
- .line and .file directives will appear in the pre-processed output */
-/* Note that input_file.c hand checks for '#' at the beginning of the
+ .line and .file directives will appear in the pre-processed output.
+ Note that input_file.c hand checks for '#' at the beginning of the
first line of the input file. This is because the compiler outputs
- #NO_APP at the beginning of its output. */
-/* Also note that comments started like this one will always work if
+ #NO_APP at the beginning of its output.
+ Also note that comments started like this one will always work if
'/' isn't otherwise defined. */
-#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (TE_LINUX) && !defined(TE_FreeBSD))
+#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX) && !defined(TE_FreeBSD))
const char line_comment_chars[] = "";
#else
const char line_comment_chars[] = "/";
#endif
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
-/* Chars that can be used to separate mant from exp in floating point nums */
+/* Chars that can be used to separate mant from exp in floating point
+ nums. */
const char EXP_CHARS[] = "eE";
-/* Chars that mean this number is a floating point constant */
-/* As in 0f12.456 */
-/* or 0d1.2345e12 */
+/* Chars that mean this number is a floating point constant
+ As in 0f12.456
+ or 0d1.2345e12. */
const char FLT_CHARS[] = "fFdDxX";
-/* tables for lexical analysis */
+/* Tables for lexical analysis. */
static char mnemonic_chars[256];
static char register_chars[256];
static char operand_chars[256];
static char identifier_chars[256];
static char digit_chars[256];
-/* lexical macros */
+/* Lexical macros. */
#define is_mnemonic_char(x) (mnemonic_chars[(unsigned char) x])
#define is_operand_char(x) (operand_chars[(unsigned char) x])
#define is_register_char(x) (register_chars[(unsigned char) x])
@@ -192,54 +207,88 @@ static char digit_chars[256];
#define is_identifier_char(x) (identifier_chars[(unsigned char) x])
#define is_digit_char(x) (digit_chars[(unsigned char) x])
-/* put here all non-digit non-letter charcters that may occur in an operand */
+/* All non-digit non-letter charcters that may occur in an operand. */
static char operand_special_chars[] = "%$-+(,)*._~/<>|&^!:[@]";
/* md_assemble() always leaves the strings it's passed unaltered. To
effect this we maintain a stack of saved characters that we've smashed
with '\0's (indicating end of strings for various sub-fields of the
- assembler instruction). */
+ assembler instruction). */
static char save_stack[32];
-static char *save_stack_p; /* stack pointer */
+static char *save_stack_p;
#define END_STRING_AND_SAVE(s) \
do { *save_stack_p++ = *(s); *(s) = '\0'; } while (0)
#define RESTORE_END_STRING(s) \
do { *(s) = *--save_stack_p; } while (0)
-/* The instruction we're assembling. */
+/* The instruction we're assembling. */
static i386_insn i;
/* Possible templates for current insn. */
static const templates *current_templates;
-/* Per instruction expressionS buffers: 2 displacements & 2 immediate max. */
+/* Per instruction expressionS buffers: 2 displacements & 2 immediate max. */
static expressionS disp_expressions[2], im_expressions[2];
-static int this_operand; /* current operand we are working on */
+/* Current operand we are working on. */
+static int this_operand;
+
+/* We support four different modes. FLAG_CODE variable is used to distinguish
+ these. */
+
+enum flag_code {
+ CODE_32BIT,
+ CODE_16BIT,
+ CODE_64BIT };
+#define NUM_FLAG_CODE ((int) CODE_64BIT + 1)
+
+static enum flag_code flag_code;
+static int use_rela_relocations = 0;
-static int flag_do_long_jump; /* FIXME what does this do? */
+/* The names used to print error messages. */
+static const char *flag_code_names[] =
+ {
+ "32",
+ "16",
+ "64"
+ };
+
+/* 1 for intel syntax,
+ 0 if att syntax. */
+static int intel_syntax = 0;
+
+/* 1 if register prefix % not required. */
+static int allow_naked_reg = 0;
+
+/* Used in 16 bit gcc mode to add an l suffix to call, ret, enter,
+ leave, push, and pop instructions so that gcc has the same stack
+ frame as in 32 bit mode. */
+static char stackop_size = '\0';
-static int flag_16bit_code; /* 1 if we're writing 16-bit code, 0 if 32-bit */
+/* Non-zero to quieten some warnings. */
+static int quiet_warnings = 0;
-static int intel_syntax = 0; /* 1 for intel syntax, 0 if att syntax */
+/* CPU name. */
+static const char *cpu_arch_name = NULL;
-static int allow_naked_reg = 0; /* 1 if register prefix % not required */
+/* CPU feature flags. */
+static unsigned int cpu_arch_flags = CpuUnknownFlags|CpuNo64;
-static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l
- suffix to call, ret, enter, leave, push,
- and pop instructions so that gcc has the
- same stack frame as in 32 bit mode. */
+/* If set, conditional jumps are not automatically promoted to handle
+ larger than a byte offset. */
+static unsigned int no_cond_jump_promotion = 0;
/* Interface to relax_segment.
- There are 2 relax states for 386 jump insns: one for conditional &
- one for unconditional jumps. This is because these two types of
- jumps add different sizes to frags when we're figuring out what
- sort of jump to choose to reach a given label. */
-
-/* types */
-#define COND_JUMP 1 /* conditional jump */
-#define UNCOND_JUMP 2 /* unconditional jump */
-/* sizes */
+ There are 3 major relax states for 386 jump insns because the
+ different types of jumps add different sizes to frags when we're
+ figuring out what sort of jump to choose to reach a given label. */
+
+/* Types. */
+#define UNCOND_JUMP 0
+#define COND_JUMP 1
+#define COND_JUMP86 2
+
+/* Sizes. */
#define CODE16 1
#define SMALL 0
#define SMALL16 (SMALL|CODE16)
@@ -254,10 +303,12 @@ static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l
#endif
#endif
-#define ENCODE_RELAX_STATE(type,size) \
- ((relax_substateT)((type<<2) | (size)))
-#define SIZE_FROM_RELAX_STATE(s) \
- ( (((s) & 0x3) == BIG ? 4 : (((s) & 0x3) == BIG16 ? 2 : 1)) )
+#define ENCODE_RELAX_STATE(type, size) \
+ ((relax_substateT) (((type) << 2) | (size)))
+#define TYPE_FROM_RELAX_STATE(s) \
+ ((s) >> 2)
+#define DISP_SIZE_FROM_RELAX_STATE(s) \
+ ((((s) & 3) == BIG ? 4 : (((s) & 3) == BIG16 ? 2 : 1)))
/* This table is used by relax_frag to promote short jumps to long
ones where necessary. SMALL (short) jumps may be promoted to BIG
@@ -272,43 +323,65 @@ const relax_typeS md_relax_table[] =
/* The fields are:
1) most positive reach of this state,
2) most negative reach of this state,
- 3) how many bytes this mode will add to the size of the current frag
- 4) which index into the table to try if we can't fit into this one.
- */
- {1, 1, 0, 0},
- {1, 1, 0, 0},
- {1, 1, 0, 0},
- {1, 1, 0, 0},
-
- {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, BIG)},
- {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, BIG16)},
- /* dword conditionals adds 4 bytes to frag:
- 1 extra opcode byte, 3 extra displacement bytes. */
+ 3) how many bytes this mode will have in the variable part of the frag
+ 4) which index into the table to try if we can't fit into this one. */
+
+ /* UNCOND_JUMP states. */
+ {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG)},
+ {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16)},
+ /* dword jmp adds 4 bytes to frag:
+ 0 extra opcode bytes, 4 displacement bytes. */
{0, 0, 4, 0},
- /* word conditionals add 2 bytes to frag:
- 1 extra opcode byte, 1 extra displacement byte. */
+ /* word jmp adds 2 byte2 to frag:
+ 0 extra opcode bytes, 2 displacement bytes. */
{0, 0, 2, 0},
- {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG)},
- {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16)},
- /* dword jmp adds 3 bytes to frag:
- 0 extra opcode bytes, 3 extra displacement bytes. */
+ /* COND_JUMP states. */
+ {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP, BIG)},
+ {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP, BIG16)},
+ /* dword conditionals adds 5 bytes to frag:
+ 1 extra opcode byte, 4 displacement bytes. */
+ {0, 0, 5, 0},
+ /* word conditionals add 3 bytes to frag:
+ 1 extra opcode byte, 2 displacement bytes. */
{0, 0, 3, 0},
- /* word jmp adds 1 byte to frag:
- 0 extra opcode bytes, 1 extra displacement byte. */
- {0, 0, 1, 0}
+ /* COND_JUMP86 states. */
+ {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP86, BIG)},
+ {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP86, BIG16)},
+ /* dword conditionals adds 5 bytes to frag:
+ 1 extra opcode byte, 4 displacement bytes. */
+ {0, 0, 5, 0},
+ /* word conditionals add 4 bytes to frag:
+ 1 displacement byte and a 3 byte long branch insn. */
+ {0, 0, 4, 0}
};
+static const arch_entry cpu_arch[] = {
+ {"i8086", Cpu086 },
+ {"i186", Cpu086|Cpu186 },
+ {"i286", Cpu086|Cpu186|Cpu286 },
+ {"i386", Cpu086|Cpu186|Cpu286|Cpu386 },
+ {"i486", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486 },
+ {"i586", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuMMX },
+ {"i686", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuSSE },
+ {"pentium", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuMMX },
+ {"pentiumpro",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuSSE },
+ {"pentium4", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX|CpuSSE|CpuSSE2 },
+ {"k6", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX|Cpu3dnow },
+ {"athlon", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuMMX|Cpu3dnow },
+ {"sledgehammer",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuSledgehammer|CpuMMX|Cpu3dnow|CpuSSE|CpuSSE2 },
+ {NULL, 0 }
+};
void
i386_align_code (fragP, count)
fragS *fragP;
int count;
{
- /* Various efficient no-op patterns for aligning code labels. */
- /* Note: Don't try to assemble the instructions in the comments. */
- /* 0L and 0w are not legal */
+ /* Various efficient no-op patterns for aligning code labels.
+ Note: Don't try to assemble the instructions in the comments.
+ 0L and 0w are not legal. */
static const char f32_1[] =
{0x90}; /* nop */
static const char f32_2[] =
@@ -373,18 +446,24 @@ i386_align_code (fragP, count)
f32_15, f32_15, f32_15, f32_15, f32_15, f32_15, f32_15
};
+ /* ??? We can't use these fillers for x86_64, since they often kills the
+ upper halves. Solve later. */
+ if (flag_code == CODE_64BIT)
+ count = 1;
+
if (count > 0 && count <= 15)
{
- if (flag_16bit_code)
+ if (flag_code == CODE_16BIT)
{
- memcpy(fragP->fr_literal + fragP->fr_fix,
- f16_patt[count - 1], count);
- if (count > 8) /* adjust jump offset */
+ memcpy (fragP->fr_literal + fragP->fr_fix,
+ f16_patt[count - 1], count);
+ if (count > 8)
+ /* Adjust jump offset. */
fragP->fr_literal[fragP->fr_fix + 1] = count - 2;
}
else
- memcpy(fragP->fr_literal + fragP->fr_fix,
- f32_patt[count - 1], count);
+ memcpy (fragP->fr_literal + fragP->fr_fix,
+ f32_patt[count - 1], count);
fragP->fr_var = count;
}
}
@@ -399,65 +478,125 @@ static const reg_entry *parse_register PARAMS ((char *reg_string,
static void s_bss PARAMS ((int));
#endif
-symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
+symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_". */
static INLINE unsigned int
mode_from_disp_size (t)
unsigned int t;
{
- return (t & Disp8) ? 1 : (t & (Disp16|Disp32)) ? 2 : 0;
+ return (t & Disp8) ? 1 : (t & (Disp16 | Disp32 | Disp32S)) ? 2 : 0;
}
static INLINE int
fits_in_signed_byte (num)
- long num;
+ offsetT num;
{
return (num >= -128) && (num <= 127);
-} /* fits_in_signed_byte() */
+}
static INLINE int
fits_in_unsigned_byte (num)
- long num;
+ offsetT num;
{
return (num & 0xff) == num;
-} /* fits_in_unsigned_byte() */
+}
static INLINE int
fits_in_unsigned_word (num)
- long num;
+ offsetT num;
{
return (num & 0xffff) == num;
-} /* fits_in_unsigned_word() */
+}
static INLINE int
fits_in_signed_word (num)
- long num;
+ offsetT num;
{
return (-32768 <= num) && (num <= 32767);
-} /* fits_in_signed_word() */
+}
+static INLINE int
+fits_in_signed_long (num)
+ offsetT num ATTRIBUTE_UNUSED;
+{
+#ifndef BFD64
+ return 1;
+#else
+ return (!(((offsetT) -1 << 31) & num)
+ || (((offsetT) -1 << 31) & num) == ((offsetT) -1 << 31));
+#endif
+} /* fits_in_signed_long() */
+static INLINE int
+fits_in_unsigned_long (num)
+ offsetT num ATTRIBUTE_UNUSED;
+{
+#ifndef BFD64
+ return 1;
+#else
+ return (num & (((offsetT) 2 << 31) - 1)) == num;
+#endif
+} /* fits_in_unsigned_long() */
static int
smallest_imm_type (num)
- long num;
+ offsetT num;
{
-#if 0
- /* This code is disabled because all the Imm1 forms in the opcode table
- are slower on the i486, and they're the versions with the implicitly
- specified single-position displacement, which has another syntax if
- you really want to use that form. If you really prefer to have the
- one-byte-shorter Imm1 form despite these problems, re-enable this
- code. */
- if (num == 1)
- return Imm1 | Imm8 | Imm8S | Imm16 | Imm32;
-#endif
+ if (cpu_arch_flags != (Cpu086 | Cpu186 | Cpu286 | Cpu386 | Cpu486 | CpuNo64)
+ && !(cpu_arch_flags & (CpuUnknown)))
+ {
+ /* This code is disabled on the 486 because all the Imm1 forms
+ in the opcode table are slower on the i486. They're the
+ versions with the implicitly specified single-position
+ displacement, which has another syntax if you really want to
+ use that form. */
+ if (num == 1)
+ return Imm1 | Imm8 | Imm8S | Imm16 | Imm32 | Imm32S | Imm64;
+ }
return (fits_in_signed_byte (num)
- ? (Imm8S | Imm8 | Imm16 | Imm32)
+ ? (Imm8S | Imm8 | Imm16 | Imm32 | Imm32S | Imm64)
: fits_in_unsigned_byte (num)
- ? (Imm8 | Imm16 | Imm32)
+ ? (Imm8 | Imm16 | Imm32 | Imm32S | Imm64)
: (fits_in_signed_word (num) || fits_in_unsigned_word (num))
- ? (Imm16 | Imm32)
- : (Imm32));
-} /* smallest_imm_type() */
+ ? (Imm16 | Imm32 | Imm32S | Imm64)
+ : fits_in_signed_long (num)
+ ? (Imm32 | Imm32S | Imm64)
+ : fits_in_unsigned_long (num)
+ ? (Imm32 | Imm64)
+ : Imm64);
+}
+
+static offsetT
+offset_in_range (val, size)
+ offsetT val;
+ int size;
+{
+ addressT mask;
+
+ switch (size)
+ {
+ case 1: mask = ((addressT) 1 << 8) - 1; break;
+ case 2: mask = ((addressT) 1 << 16) - 1; break;
+ case 4: mask = ((addressT) 2 << 31) - 1; break;
+#ifdef BFD64
+ case 8: mask = ((addressT) 2 << 63) - 1; break;
+#endif
+ default: abort ();
+ }
+
+ /* If BFD64, sign extend val. */
+ if (!use_rela_relocations)
+ if ((val & ~(((addressT) 2 << 31) - 1)) == 0)
+ val = (val ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31);
+
+ if ((val & ~mask) != 0 && (val & ~mask) != ~mask)
+ {
+ char buf1[40], buf2[40];
+
+ sprint_value (buf1, val);
+ sprint_value (buf2, val & mask);
+ as_warn (_("%s shortened to %s"), buf1, buf2);
+ }
+ return val & mask;
+}
/* Returns 0 if attempting to add a prefix where one from the same
class already exists, 1 if non rep/repne added, 2 if rep/repne
@@ -469,40 +608,43 @@ add_prefix (prefix)
int ret = 1;
int q;
- switch (prefix)
- {
- default:
- abort ();
-
- case CS_PREFIX_OPCODE:
- case DS_PREFIX_OPCODE:
- case ES_PREFIX_OPCODE:
- case FS_PREFIX_OPCODE:
- case GS_PREFIX_OPCODE:
- case SS_PREFIX_OPCODE:
- q = SEG_PREFIX;
- break;
-
- case REPNE_PREFIX_OPCODE:
- case REPE_PREFIX_OPCODE:
- ret = 2;
- /* fall thru */
- case LOCK_PREFIX_OPCODE:
- q = LOCKREP_PREFIX;
- break;
-
- case FWAIT_OPCODE:
- q = WAIT_PREFIX;
- break;
-
- case ADDR_PREFIX_OPCODE:
- q = ADDR_PREFIX;
- break;
-
- case DATA_PREFIX_OPCODE:
- q = DATA_PREFIX;
- break;
- }
+ if (prefix >= 0x40 && prefix < 0x50 && flag_code == CODE_64BIT)
+ q = REX_PREFIX;
+ else
+ switch (prefix)
+ {
+ default:
+ abort ();
+
+ case CS_PREFIX_OPCODE:
+ case DS_PREFIX_OPCODE:
+ case ES_PREFIX_OPCODE:
+ case FS_PREFIX_OPCODE:
+ case GS_PREFIX_OPCODE:
+ case SS_PREFIX_OPCODE:
+ q = SEG_PREFIX;
+ break;
+
+ case REPNE_PREFIX_OPCODE:
+ case REPE_PREFIX_OPCODE:
+ ret = 2;
+ /* fall thru */
+ case LOCK_PREFIX_OPCODE:
+ q = LOCKREP_PREFIX;
+ break;
+
+ case FWAIT_OPCODE:
+ q = WAIT_PREFIX;
+ break;
+
+ case ADDR_PREFIX_OPCODE:
+ q = ADDR_PREFIX;
+ break;
+
+ case DATA_PREFIX_OPCODE:
+ q = DATA_PREFIX;
+ break;
+ }
if (i.prefix[q])
{
@@ -516,19 +658,31 @@ add_prefix (prefix)
}
static void
-set_16bit_code_flag (new_16bit_code_flag)
- int new_16bit_code_flag;
+set_code_flag (value)
+ int value;
{
- flag_16bit_code = new_16bit_code_flag;
+ flag_code = value;
+ cpu_arch_flags &= ~(Cpu64 | CpuNo64);
+ cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64);
+ if (value == CODE_64BIT && !(cpu_arch_flags & CpuSledgehammer))
+ {
+ as_bad (_("64bit mode not supported on this CPU."));
+ }
+ if (value == CODE_32BIT && !(cpu_arch_flags & Cpu386))
+ {
+ as_bad (_("32bit mode not supported on this CPU."));
+ }
stackop_size = '\0';
}
static void
-set_16bit_gcc_code_flag (new_16bit_code_flag)
- int new_16bit_code_flag;
+set_16bit_gcc_code_flag (new_code_flag)
+ int new_code_flag;
{
- flag_16bit_code = new_16bit_code_flag;
- stackop_size = new_16bit_code_flag ? 'l' : '\0';
+ flag_code = new_code_flag;
+ cpu_arch_flags &= ~(Cpu64 | CpuNo64);
+ cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64);
+ stackop_size = 'l';
}
static void
@@ -544,9 +698,9 @@ set_intel_syntax (syntax_flag)
char *string = input_line_pointer;
int e = get_symbol_end ();
- if (strcmp(string, "prefix") == 0)
+ if (strcmp (string, "prefix") == 0)
ask_naked_reg = 1;
- else if (strcmp(string, "noprefix") == 0)
+ else if (strcmp (string, "noprefix") == 0)
ask_naked_reg = -1;
else
as_bad (_("bad argument to syntax directive."));
@@ -562,59 +716,128 @@ set_intel_syntax (syntax_flag)
allow_naked_reg = (intel_syntax
&& (bfd_get_symbol_leading_char (stdoutput) != '\0'));
#else
- allow_naked_reg = 0; /* conservative default */
+ /* Conservative default. */
+ allow_naked_reg = 0;
#endif
}
else
allow_naked_reg = (ask_naked_reg < 0);
}
+static void
+set_cpu_arch (dummy)
+ int dummy ATTRIBUTE_UNUSED;
+{
+ SKIP_WHITESPACE ();
+
+ if (! is_end_of_line[(unsigned char) *input_line_pointer])
+ {
+ char *string = input_line_pointer;
+ int e = get_symbol_end ();
+ int i;
+
+ for (i = 0; cpu_arch[i].name; i++)
+ {
+ if (strcmp (string, cpu_arch[i].name) == 0)
+ {
+ cpu_arch_name = cpu_arch[i].name;
+ cpu_arch_flags = (cpu_arch[i].flags
+ | (flag_code == CODE_64BIT ? Cpu64 : CpuNo64));
+ break;
+ }
+ }
+ if (!cpu_arch[i].name)
+ as_bad (_("no such architecture: `%s'"), string);
+
+ *input_line_pointer = e;
+ }
+ else
+ as_bad (_("missing cpu architecture"));
+
+ no_cond_jump_promotion = 0;
+ if (*input_line_pointer == ','
+ && ! is_end_of_line[(unsigned char) input_line_pointer[1]])
+ {
+ char *string = ++input_line_pointer;
+ int e = get_symbol_end ();
+
+ if (strcmp (string, "nojumps") == 0)
+ no_cond_jump_promotion = 1;
+ else if (strcmp (string, "jumps") == 0)
+ ;
+ else
+ as_bad (_("no such architecture modifier: `%s'"), string);
+
+ *input_line_pointer = e;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
const pseudo_typeS md_pseudo_table[] =
{
-#ifndef I386COFF
- {"bss", s_bss, 0},
-#endif
#if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO)
{"align", s_align_bytes, 0},
#else
{"align", s_align_ptwo, 0},
#endif
+ {"arch", set_cpu_arch, 0},
+#ifndef I386COFF
+ {"bss", s_bss, 0},
+#endif
{"ffloat", float_cons, 'f'},
{"dfloat", float_cons, 'd'},
{"tfloat", float_cons, 'x'},
{"value", cons, 2},
{"noopt", s_ignore, 0},
{"optim", s_ignore, 0},
- {"code16gcc", set_16bit_gcc_code_flag, 1},
- {"code16", set_16bit_code_flag, 1},
- {"code32", set_16bit_code_flag, 0},
+ {"code16gcc", set_16bit_gcc_code_flag, CODE_16BIT},
+ {"code16", set_code_flag, CODE_16BIT},
+ {"code32", set_code_flag, CODE_32BIT},
+ {"code64", set_code_flag, CODE_64BIT},
{"intel_syntax", set_intel_syntax, 1},
{"att_syntax", set_intel_syntax, 0},
+ {"file", dwarf2_directive_file, 0},
+ {"loc", dwarf2_directive_loc, 0},
{0, 0, 0}
};
-/* for interface with expression () */
+/* For interface with expression (). */
extern char *input_line_pointer;
-/* hash table for instruction mnemonic lookup */
+/* Hash table for instruction mnemonic lookup. */
static struct hash_control *op_hash;
-/* hash table for register lookup */
+
+/* Hash table for register lookup. */
static struct hash_control *reg_hash;
-
+#ifdef BFD_ASSEMBLER
+unsigned long
+i386_mach ()
+{
+ if (!strcmp (default_arch, "x86_64"))
+ return bfd_mach_x86_64;
+ else if (!strcmp (default_arch, "i386"))
+ return bfd_mach_i386_i386;
+ else
+ as_fatal (_("Unknown architecture"));
+}
+#endif
+
void
md_begin ()
{
const char *hash_err;
- /* initialize op_hash hash table */
+ /* Initialize op_hash hash table. */
op_hash = hash_new ();
{
register const template *optab;
register templates *core_optab;
- optab = i386_optab; /* setup for loop */
+ /* Setup for loop. */
+ optab = i386_optab;
core_optab = (templates *) xmalloc (sizeof (templates));
core_optab->start = optab;
@@ -625,14 +848,13 @@ md_begin ()
|| strcmp (optab->name, (optab - 1)->name) != 0)
{
/* different name --> ship out current template list;
- add to hash table; & begin anew */
+ add to hash table; & begin anew. */
core_optab->end = optab;
hash_err = hash_insert (op_hash,
(optab - 1)->name,
(PTR) core_optab);
if (hash_err)
{
- hash_error:
as_fatal (_("Internal Error: Can't hash %s: %s"),
(optab - 1)->name,
hash_err);
@@ -645,7 +867,7 @@ md_begin ()
}
}
- /* initialize reg_hash hash table */
+ /* Initialize reg_hash hash table. */
reg_hash = hash_new ();
{
register const reg_entry *regtab;
@@ -656,11 +878,13 @@ md_begin ()
{
hash_err = hash_insert (reg_hash, regtab->reg_name, (PTR) regtab);
if (hash_err)
- goto hash_error;
+ as_fatal (_("Internal Error: Can't hash %s: %s"),
+ regtab->reg_name,
+ hash_err);
}
}
- /* fill in lexical tables: mnemonic_chars, operand_chars. */
+ /* Fill in lexical tables: mnemonic_chars, operand_chars. */
{
register int c;
register char *p;
@@ -725,10 +949,9 @@ i386_print_statistics (file)
hash_print_statistics (file, "i386 register", reg_hash);
}
-
#ifdef DEBUG386
-/* debugging routines for md_assemble */
+/* Debugging routines for md_assemble. */
static void pi PARAMS ((char *, i386_insn *));
static void pte PARAMS ((template *));
static void pt PARAMS ((unsigned int));
@@ -740,15 +963,20 @@ pi (line, x)
char *line;
i386_insn *x;
{
- register template *p;
- int i;
+ unsigned int i;
fprintf (stdout, "%s: template ", line);
pte (&x->tm);
- fprintf (stdout, " modrm: mode %x reg %x reg/mem %x",
+ fprintf (stdout, " address: base %s index %s scale %x\n",
+ x->base_reg ? x->base_reg->reg_name : "none",
+ x->index_reg ? x->index_reg->reg_name : "none",
+ x->log2_scale_factor);
+ fprintf (stdout, " modrm: mode %x reg %x reg/mem %x\n",
x->rm.mode, x->rm.reg, x->rm.regmem);
- fprintf (stdout, " base %x index %x scale %x\n",
- x->bi.base, x->bi.index, x->bi.scale);
+ fprintf (stdout, " sib: base %x index %x scale %x\n",
+ x->sib.base, x->sib.index, x->sib.scale);
+ fprintf (stdout, " rex: 64bit %x extX %x extY %x extZ %x\n",
+ x->rex.mode64, x->rex.extX, x->rex.extY, x->rex.extZ);
for (i = 0; i < x->operands; i++)
{
fprintf (stdout, " #%d: ", i + 1);
@@ -768,10 +996,9 @@ static void
pte (t)
template *t;
{
- int i;
+ unsigned int i;
fprintf (stdout, " %d operands ", t->operands);
- fprintf (stdout, "opcode %x ",
- t->base_opcode);
+ fprintf (stdout, "opcode %x ", t->base_opcode);
if (t->extension_opcode != None)
fprintf (stdout, "ext %x ", t->extension_opcode);
if (t->opcode_modifier & D)
@@ -829,15 +1056,20 @@ type_names[] =
{ Reg8, "r8" },
{ Reg16, "r16" },
{ Reg32, "r32" },
+ { Reg64, "r64" },
{ Imm8, "i8" },
{ Imm8S, "i8s" },
{ Imm16, "i16" },
{ Imm32, "i32" },
+ { Imm32S, "i32s" },
+ { Imm64, "i64" },
{ Imm1, "i1" },
{ BaseIndex, "BaseIndex" },
{ Disp8, "d8" },
{ Disp16, "d16" },
{ Disp32, "d32" },
+ { Disp32S, "d32s" },
+ { Disp64, "d64" },
{ InOutPortReg, "InOutPortReg" },
{ ShiftCount, "ShiftCount" },
{ Control, "control reg" },
@@ -861,16 +1093,9 @@ pt (t)
{
register struct type_name *ty;
- if (t == Unknown)
- {
- fprintf (stdout, _("Unknown"));
- }
- else
- {
- for (ty = type_names; ty->mask; ty++)
- if (t & ty->mask)
- fprintf (stdout, "%s, ", ty->tname);
- }
+ for (ty = type_names; ty->mask; ty++)
+ if (t & ty->mask)
+ fprintf (stdout, "%s, ", ty->tname);
fflush (stdout);
}
@@ -886,25 +1111,27 @@ tc_i386_force_relocation (fixp)
return 1;
return 0;
#else
- /* For COFF */
+ /* For COFF. */
return fixp->fx_r_type == 7;
#endif
}
#ifdef BFD_ASSEMBLER
-static bfd_reloc_code_real_type reloc
- PARAMS ((int, int, bfd_reloc_code_real_type));
static bfd_reloc_code_real_type
-reloc (size, pcrel, other)
+reloc (size, pcrel, sign, other)
int size;
int pcrel;
+ int sign;
bfd_reloc_code_real_type other;
{
- if (other != NO_RELOC) return other;
+ if (other != NO_RELOC)
+ return other;
if (pcrel)
{
+ if (!sign)
+ as_bad (_("There are no unsigned pc-relative relocations"));
switch (size)
{
case 1: return BFD_RELOC_8_PCREL;
@@ -915,64 +1142,76 @@ reloc (size, pcrel, other)
}
else
{
- switch (size)
- {
- case 1: return BFD_RELOC_8;
- case 2: return BFD_RELOC_16;
- case 4: return BFD_RELOC_32;
- }
- as_bad (_("can not do %d byte relocation"), size);
+ if (sign)
+ switch (size)
+ {
+ case 4: return BFD_RELOC_X86_64_32S;
+ }
+ else
+ switch (size)
+ {
+ case 1: return BFD_RELOC_8;
+ case 2: return BFD_RELOC_16;
+ case 4: return BFD_RELOC_32;
+ case 8: return BFD_RELOC_64;
+ }
+ as_bad (_("can not do %s %d byte relocation"),
+ sign ? "signed" : "unsigned", size);
}
+ abort ();
return BFD_RELOC_NONE;
}
-/*
- * Here we decide which fixups can be adjusted to make them relative to
- * the beginning of the section instead of the symbol. Basically we need
- * to make sure that the dynamic relocations are done correctly, so in
- * some cases we force the original symbol to be used.
- */
+/* Here we decide which fixups can be adjusted to make them relative to
+ the beginning of the section instead of the symbol. Basically we need
+ to make sure that the dynamic relocations are done correctly, so in
+ some cases we force the original symbol to be used. */
+
int
tc_i386_fix_adjustable (fixP)
fixS *fixP;
{
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (TE_PE)
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
/* Prevent all adjustments to global symbols, or else dynamic
linking will not work correctly. */
if (S_IS_EXTERNAL (fixP->fx_addsy)
|| S_IS_WEAK (fixP->fx_addsy))
return 0;
#endif
- /* adjust_reloc_syms doesn't know about the GOT */
+ /* adjust_reloc_syms doesn't know about the GOT. */
if (fixP->fx_r_type == BFD_RELOC_386_GOTOFF
|| fixP->fx_r_type == BFD_RELOC_386_PLT32
|| fixP->fx_r_type == BFD_RELOC_386_GOT32
- || fixP->fx_r_type == BFD_RELOC_RVA
+ || fixP->fx_r_type == BFD_RELOC_X86_64_PLT32
+ || fixP->fx_r_type == BFD_RELOC_X86_64_GOT32
+ || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCREL
|| fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
return 1;
}
#else
-#define reloc(SIZE,PCREL,OTHER) 0
-#define BFD_RELOC_16 0
-#define BFD_RELOC_32 0
-#define BFD_RELOC_16_PCREL 0
-#define BFD_RELOC_32_PCREL 0
-#define BFD_RELOC_386_PLT32 0
-#define BFD_RELOC_386_GOT32 0
-#define BFD_RELOC_386_GOTOFF 0
+#define reloc(SIZE,PCREL,SIGN,OTHER) 0
+#define BFD_RELOC_16 0
+#define BFD_RELOC_32 0
+#define BFD_RELOC_16_PCREL 0
+#define BFD_RELOC_32_PCREL 0
+#define BFD_RELOC_386_PLT32 0
+#define BFD_RELOC_386_GOT32 0
+#define BFD_RELOC_386_GOTOFF 0
+#define BFD_RELOC_X86_64_PLT32 0
+#define BFD_RELOC_X86_64_GOT32 0
+#define BFD_RELOC_X86_64_GOTPCREL 0
#endif
-static int
-intel_float_operand PARAMS ((char *mnemonic));
+static int intel_float_operand PARAMS ((char *mnemonic));
static int
intel_float_operand (mnemonic)
char *mnemonic;
{
- if (mnemonic[0] == 'f' && mnemonic[1] =='i')
+ if (mnemonic[0] == 'f' && mnemonic[1] == 'i')
return 2;
if (mnemonic[0] == 'f')
@@ -989,33 +1228,30 @@ void
md_assemble (line)
char *line;
{
- /* Points to template once we've found it. */
+ /* Points to template once we've found it. */
const template *t;
- /* Count the size of the instruction generated. */
- int insn_size = 0;
-
int j;
char mnemonic[MAX_MNEM_SIZE];
- /* Initialize globals. */
+ /* Initialize globals. */
memset (&i, '\0', sizeof (i));
for (j = 0; j < MAX_OPERANDS; j++)
- i.disp_reloc[j] = NO_RELOC;
+ i.reloc[j] = NO_RELOC;
memset (disp_expressions, '\0', sizeof (disp_expressions));
memset (im_expressions, '\0', sizeof (im_expressions));
- save_stack_p = save_stack; /* reset stack pointer */
+ save_stack_p = save_stack;
/* First parse an instruction mnemonic & call i386_operand for the operands.
We assume that the scrubber has arranged it so that line[0] is the valid
- start of a (possibly prefixed) mnemonic. */
+ start of a (possibly prefixed) mnemonic. */
{
char *l = line;
char *token_start = l;
char *mnem_p;
- /* Non-zero if we found a prefix only acceptable with string insns. */
+ /* Non-zero if we found a prefix only acceptable with string insns. */
const char *expecting_string_instruction = NULL;
while (1)
@@ -1026,7 +1262,7 @@ md_assemble (line)
mnem_p++;
if (mnem_p >= mnemonic + sizeof (mnemonic))
{
- as_bad (_("no such 386 instruction: `%s'"), token_start);
+ as_bad (_("no such instruction: `%s'"), token_start);
return;
}
l++;
@@ -1060,7 +1296,7 @@ md_assemble (line)
Similarly, in 32-bit mode, do not allow addr32 or data32. */
if ((current_templates->start->opcode_modifier & (Size16 | Size32))
&& (((current_templates->start->opcode_modifier & Size32) != 0)
- ^ flag_16bit_code))
+ ^ (flag_code == CODE_16BIT)))
{
as_bad (_("redundant %s prefix"),
current_templates->start->name);
@@ -1072,8 +1308,7 @@ md_assemble (line)
case 0:
return;
case 2:
- expecting_string_instruction =
- current_templates->start->name;
+ expecting_string_instruction = current_templates->start->name;
break;
}
/* Skip past PREFIX_SEPARATOR and reset token_start. */
@@ -1090,31 +1325,57 @@ md_assemble (line)
{
case WORD_MNEM_SUFFIX:
case BYTE_MNEM_SUFFIX:
- case SHORT_MNEM_SUFFIX:
- case LONG_MNEM_SUFFIX:
+ case QWORD_MNEM_SUFFIX:
i.suffix = mnem_p[-1];
mnem_p[-1] = '\0';
current_templates = hash_find (op_hash, mnemonic);
break;
+ case SHORT_MNEM_SUFFIX:
+ case LONG_MNEM_SUFFIX:
+ if (!intel_syntax)
+ {
+ i.suffix = mnem_p[-1];
+ mnem_p[-1] = '\0';
+ current_templates = hash_find (op_hash, mnemonic);
+ }
+ break;
- /* Intel Syntax */
- case DWORD_MNEM_SUFFIX:
+ /* Intel Syntax. */
+ case 'd':
if (intel_syntax)
{
- i.suffix = mnem_p[-1];
+ if (intel_float_operand (mnemonic))
+ i.suffix = SHORT_MNEM_SUFFIX;
+ else
+ i.suffix = LONG_MNEM_SUFFIX;
mnem_p[-1] = '\0';
current_templates = hash_find (op_hash, mnemonic);
- break;
}
+ break;
}
if (!current_templates)
{
- as_bad (_("no such 386 instruction: `%s'"), token_start);
+ as_bad (_("no such instruction: `%s'"), token_start);
return;
}
}
- /* check for rep/repne without a string instruction */
+ /* Check if instruction is supported on specified architecture. */
+ if (cpu_arch_flags != 0)
+ {
+ if ((current_templates->start->cpu_flags & ~(Cpu64 | CpuNo64))
+ & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64)))
+ {
+ as_warn (_("`%s' is not supported on `%s'"),
+ current_templates->start->name, cpu_arch_name);
+ }
+ else if ((Cpu386 & ~cpu_arch_flags) && (flag_code != CODE_16BIT))
+ {
+ as_warn (_("use .code16 to ensure correct addressing mode"));
+ }
+ }
+
+ /* Check for rep/repne without a string instruction. */
if (expecting_string_instruction
&& !(current_templates->start->opcode_modifier & IsString))
{
@@ -1123,20 +1384,18 @@ md_assemble (line)
return;
}
- /* There may be operands to parse. */
+ /* There may be operands to parse. */
if (*l != END_OF_INSN)
{
- /* parse operands */
-
- /* 1 if operand is pending after ','. */
+ /* 1 if operand is pending after ','. */
unsigned int expecting_operand = 0;
- /* Non-zero if operand parens not balanced. */
+ /* Non-zero if operand parens not balanced. */
unsigned int paren_not_balanced;
do
{
- /* skip optional white space before operand */
+ /* Skip optional white space before operand. */
if (is_space_char (*l))
++l;
if (!is_operand_char (*l) && *l != END_OF_INSN)
@@ -1189,7 +1448,7 @@ md_assemble (line)
l++;
}
if (l != token_start)
- { /* yes, we've read in another operand */
+ { /* Yes, we've read in another operand. */
unsigned int operand_ok;
this_operand = i.operands++;
if (i.operands > MAX_OPERANDS)
@@ -1198,15 +1457,17 @@ md_assemble (line)
MAX_OPERANDS);
return;
}
- /* now parse operand adding info to 'i' as we go along */
+ /* Now parse operand adding info to 'i' as we go along. */
END_STRING_AND_SAVE (l);
if (intel_syntax)
- operand_ok = i386_intel_operand (token_start, intel_float_operand (mnemonic));
+ operand_ok =
+ i386_intel_operand (token_start,
+ intel_float_operand (mnemonic));
else
operand_ok = i386_operand (token_start);
- RESTORE_END_STRING (l); /* restore old contents */
+ RESTORE_END_STRING (l);
if (!operand_ok)
return;
}
@@ -1225,17 +1486,18 @@ md_assemble (line)
}
}
- /* now *l must be either ',' or END_OF_INSN */
+ /* Now *l must be either ',' or END_OF_INSN. */
if (*l == ',')
{
if (*++l == END_OF_INSN)
- { /* just skip it, if it's \n complain */
+ {
+ /* Just skip it, if it's \n complain. */
goto expecting_operand_after_comma;
}
expecting_operand = 1;
}
}
- while (*l != END_OF_INSN); /* until we get end of insn */
+ while (*l != END_OF_INSN);
}
}
@@ -1244,7 +1506,7 @@ md_assemble (line)
Next, we find a template that matches the given insn,
making sure the overlap of the given operands types is consistent
- with the template operand types. */
+ with the template operand types. */
#define MATCH(overlap, given, template) \
((overlap & ~JumpAbsolute) \
@@ -1276,6 +1538,7 @@ md_assemble (line)
{
union i386_op temp_op;
unsigned int temp_type;
+ RELOC_ENUM temp_reloc;
int xchg1 = 0;
int xchg2 = 0;
@@ -1295,6 +1558,9 @@ md_assemble (line)
temp_op = i.op[xchg2];
i.op[xchg2] = i.op[xchg1];
i.op[xchg1] = temp_op;
+ temp_reloc = i.reloc[xchg2];
+ i.reloc[xchg2] = i.reloc[xchg1];
+ i.reloc[xchg1] = temp_reloc;
if (i.mem_operands == 2)
{
@@ -1320,45 +1586,131 @@ md_assemble (line)
We can't do this properly yet, ie. excluding InOutPortReg,
but the following works for instructions with immediates.
In any case, we can't set i.suffix yet. */
- for (op = i.operands; --op >= 0; )
+ for (op = i.operands; --op >= 0;)
if (i.types[op] & Reg)
{
if (i.types[op] & Reg8)
guess_suffix = BYTE_MNEM_SUFFIX;
else if (i.types[op] & Reg16)
guess_suffix = WORD_MNEM_SUFFIX;
+ else if (i.types[op] & Reg32)
+ guess_suffix = LONG_MNEM_SUFFIX;
+ else if (i.types[op] & Reg64)
+ guess_suffix = QWORD_MNEM_SUFFIX;
break;
}
}
- else if (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0))
+ else if ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0))
guess_suffix = WORD_MNEM_SUFFIX;
- for (op = i.operands; --op >= 0; )
- if ((i.types[op] & Imm)
- && i.op[op].imms->X_op == O_constant)
+ for (op = i.operands; --op >= 0;)
+ if (i.types[op] & Imm)
{
- /* If a suffix is given, this operand may be shortened. */
- switch (guess_suffix)
+ switch (i.op[op].imms->X_op)
{
- case WORD_MNEM_SUFFIX:
- i.types[op] |= Imm16;
- break;
- case BYTE_MNEM_SUFFIX:
- i.types[op] |= Imm16 | Imm8 | Imm8S;
- break;
+ case O_constant:
+ /* If a suffix is given, this operand may be shortened. */
+ switch (guess_suffix)
+ {
+ case LONG_MNEM_SUFFIX:
+ i.types[op] |= Imm32 | Imm64;
+ break;
+ case WORD_MNEM_SUFFIX:
+ i.types[op] |= Imm16 | Imm32S | Imm32 | Imm64;
+ break;
+ case BYTE_MNEM_SUFFIX:
+ i.types[op] |= Imm16 | Imm8 | Imm8S | Imm32S | Imm32 | Imm64;
+ break;
+ }
+
+ /* If this operand is at most 16 bits, convert it
+ to a signed 16 bit number before trying to see
+ whether it will fit in an even smaller size.
+ This allows a 16-bit operand such as $0xffe0 to
+ be recognised as within Imm8S range. */
+ if ((i.types[op] & Imm16)
+ && (i.op[op].imms->X_add_number & ~(offsetT) 0xffff) == 0)
+ {
+ i.op[op].imms->X_add_number =
+ (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000);
+ }
+ if ((i.types[op] & Imm32)
+ && (i.op[op].imms->X_add_number & ~(((offsetT) 2 << 31) - 1)) == 0)
+ {
+ i.op[op].imms->X_add_number =
+ (i.op[op].imms->X_add_number ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31);
+ }
+ i.types[op] |= smallest_imm_type (i.op[op].imms->X_add_number);
+ /* We must avoid matching of Imm32 templates when 64bit only immediate is available. */
+ if (guess_suffix == QWORD_MNEM_SUFFIX)
+ i.types[op] &= ~Imm32;
+ break;
+ case O_absent:
+ case O_register:
+ abort ();
+ /* Symbols and expressions. */
+ default:
+ /* Convert symbolic operand to proper sizes for matching. */
+ switch (guess_suffix)
+ {
+ case QWORD_MNEM_SUFFIX:
+ i.types[op] = Imm64 | Imm32S;
+ break;
+ case LONG_MNEM_SUFFIX:
+ i.types[op] = Imm32 | Imm64;
+ break;
+ case WORD_MNEM_SUFFIX:
+ i.types[op] = Imm16 | Imm32 | Imm64;
+ break;
+ break;
+ case BYTE_MNEM_SUFFIX:
+ i.types[op] = Imm8 | Imm8S | Imm16 | Imm32S | Imm32;
+ break;
+ break;
+ }
+ break;
}
+ }
+ }
+
+ if (i.disp_operands)
+ {
+ /* Try to use the smallest displacement type too. */
+ int op;
- /* If this operand is at most 16 bits, convert it to a
- signed 16 bit number before trying to see whether it will
- fit in an even smaller size. This allows a 16-bit operand
- such as $0xffe0 to be recognised as within Imm8S range. */
- if ((i.types[op] & Imm16)
- && (i.op[op].imms->X_add_number & ~(offsetT)0xffff) == 0)
+ for (op = i.operands; --op >= 0;)
+ if ((i.types[op] & Disp)
+ && i.op[op].disps->X_op == O_constant)
+ {
+ offsetT disp = i.op[op].disps->X_add_number;
+
+ if (i.types[op] & Disp16)
+ {
+ /* We know this operand is at most 16 bits, so
+ convert to a signed 16 bit number before trying
+ to see whether it will fit in an even smaller
+ size. */
+
+ disp = (((disp & 0xffff) ^ 0x8000) - 0x8000);
+ }
+ else if (i.types[op] & Disp32)
{
- i.op[op].imms->X_add_number =
- (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000);
+ /* 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);
}
- i.types[op] |= smallest_imm_type ((long) i.op[op].imms->X_add_number);
+ if (flag_code == CODE_64BIT)
+ {
+ if (fits_in_signed_long (disp))
+ 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;
}
}
@@ -1374,28 +1726,36 @@ md_assemble (line)
? No_sSuf
: (i.suffix == LONG_MNEM_SUFFIX
? No_lSuf
- : (i.suffix == DWORD_MNEM_SUFFIX
- ? No_dSuf
+ : (i.suffix == QWORD_MNEM_SUFFIX
+ ? No_qSuf
: (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0))))));
for (t = current_templates->start;
t < current_templates->end;
t++)
{
- /* Must have right number of operands. */
+ /* Must have right number of operands. */
if (i.operands != t->operands)
continue;
/* Check the suffix, except for some instructions in intel mode. */
if ((t->opcode_modifier & suffix_check)
&& !(intel_syntax
+ && (t->opcode_modifier & IgnoreSize))
+ && !(intel_syntax
&& t->base_opcode == 0xd9
- && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */
- || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */
+ && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */
+ || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */
continue;
+ /* Do not verify operands when there are none. */
else if (!t->operands)
- break; /* 0 operands always matches */
+ {
+ if (t->cpu_flags & ~cpu_arch_flags)
+ continue;
+ /* We've found a match; break out of loop. */
+ break;
+ }
overlap0 = i.types[0] & t->operand_types[0];
switch (t->operands)
@@ -1414,12 +1774,11 @@ md_assemble (line)
overlap1, i.types[1],
t->operand_types[1]))
{
-
- /* check if other direction is valid ... */
+ /* Check if other direction is valid ... */
if ((t->opcode_modifier & (D|FloatD)) == 0)
continue;
- /* try reversing direction of operands */
+ /* Try reversing direction of operands. */
overlap0 = i.types[0] & t->operand_types[1];
overlap1 = i.types[1] & t->operand_types[0];
if (!MATCH (overlap0, i.types[0], t->operand_types[1])
@@ -1429,16 +1788,15 @@ md_assemble (line)
overlap1, i.types[1],
t->operand_types[0]))
{
- /* does not match either direction */
+ /* Does not match either direction. */
continue;
}
/* found_reverse_match holds which of D or FloatDR
we've found. */
found_reverse_match = t->opcode_modifier & (D|FloatDR);
- break;
}
- /* found a forward 2 operand match here */
- if (t->operands == 3)
+ /* Found a forward 2 operand match here. */
+ else if (t->operands == 3)
{
/* Here we make use of the fact that there are no
reverse match 3 operand instructions, and all 3
@@ -1453,29 +1811,41 @@ md_assemble (line)
continue;
}
- /* found either forward/reverse 2 or 3 operand match here:
- slip through to break */
+ /* Found either forward/reverse 2 or 3 operand match here:
+ slip through to break. */
}
- break; /* we've found a match; break out of loop */
- } /* for (t = ... */
+ if (t->cpu_flags & ~cpu_arch_flags)
+ {
+ found_reverse_match = 0;
+ continue;
+ }
+ /* We've found a match; break out of loop. */
+ break;
+ }
if (t == current_templates->end)
- { /* we found no match */
+ {
+ /* We found no match. */
as_bad (_("suffix or operands invalid for `%s'"),
current_templates->start->name);
return;
}
- if (!intel_syntax
- && (i.types[0] & JumpAbsolute) != (t->operand_types[0] & JumpAbsolute))
+ if (!quiet_warnings)
{
- as_warn (_("indirect %s without `*'"), t->name);
- }
+ if (!intel_syntax
+ && ((i.types[0] & JumpAbsolute)
+ != (t->operand_types[0] & JumpAbsolute)))
+ {
+ as_warn (_("indirect %s without `*'"), t->name);
+ }
- if ((t->opcode_modifier & (IsPrefix|IgnoreSize)) == (IsPrefix|IgnoreSize))
- {
- /* Warn them that a data or address size prefix doesn't affect
- assembly of the next line of code. */
- as_warn (_("stand-alone `%s' prefix"), t->name);
+ if ((t->opcode_modifier & (IsPrefix|IgnoreSize))
+ == (IsPrefix|IgnoreSize))
+ {
+ /* Warn them that a data or address size prefix doesn't
+ affect assembly of the next line of code. */
+ as_warn (_("stand-alone `%s' prefix"), t->name);
+ }
}
/* Copy the template we found. */
@@ -1493,16 +1863,16 @@ md_assemble (line)
}
/* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */
- if (SYSV386_COMPAT
- && intel_syntax
- && (i.tm.base_opcode & 0xfffffde0) == 0xdce0)
- i.tm.base_opcode ^= FloatR;
+ if (SYSV386_COMPAT
+ && intel_syntax
+ && (i.tm.base_opcode & 0xfffffde0) == 0xdce0)
+ i.tm.base_opcode ^= FloatR;
if (i.tm.opcode_modifier & FWait)
if (! add_prefix (FWAIT_OPCODE))
return;
- /* Check string instruction segment overrides */
+ /* Check string instruction segment overrides. */
if ((i.tm.opcode_modifier & IsString) != 0 && i.mem_operands != 0)
{
int mem_op = (i.types[0] & AnyMem) ? 0 : 1;
@@ -1533,31 +1903,47 @@ md_assemble (line)
}
}
+ if (i.reg_operands && flag_code < CODE_64BIT)
+ {
+ int op;
+ for (op = i.operands; --op >= 0;)
+ if ((i.types[op] & Reg)
+ && (i.op[op].regs->reg_flags & (RegRex64|RegRex)))
+ {
+ as_bad (_("Extended register `%%%s' available only in 64bit mode."),
+ i.op[op].regs->reg_name);
+ return;
+ }
+ }
+
/* If matched instruction specifies an explicit instruction mnemonic
suffix, use it. */
- if (i.tm.opcode_modifier & (Size16 | Size32))
+ if (i.tm.opcode_modifier & (Size16 | Size32 | Size64))
{
if (i.tm.opcode_modifier & Size16)
i.suffix = WORD_MNEM_SUFFIX;
+ else if (i.tm.opcode_modifier & Size64)
+ i.suffix = QWORD_MNEM_SUFFIX;
else
i.suffix = LONG_MNEM_SUFFIX;
}
else if (i.reg_operands)
{
/* If there's no instruction mnemonic suffix we try to invent one
- based on register operands. */
+ based on register operands. */
if (!i.suffix)
{
/* We take i.suffix from the last register operand specified,
Destination register type is more significant than source
register type. */
int op;
- for (op = i.operands; --op >= 0; )
+ for (op = i.operands; --op >= 0;)
if ((i.types[op] & Reg)
&& !(i.tm.operand_types[op] & InOutPortReg))
{
i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX :
(i.types[op] & Reg16) ? WORD_MNEM_SUFFIX :
+ (i.types[op] & Reg64) ? QWORD_MNEM_SUFFIX :
LONG_MNEM_SUFFIX);
break;
}
@@ -1565,18 +1951,19 @@ md_assemble (line)
else if (i.suffix == BYTE_MNEM_SUFFIX)
{
int op;
- for (op = i.operands; --op >= 0; )
+ for (op = i.operands; --op >= 0;)
{
/* If this is an eight bit register, it's OK. If it's
the 16 or 32 bit version of an eight bit register,
- we will just use the low portion, and that's OK too. */
+ we will just use the low portion, and that's OK too. */
if (i.types[op] & Reg8)
continue;
- /* movzx and movsx should not generate this warning. */
+ /* movzx and movsx should not generate this warning. */
if (intel_syntax
&& (i.tm.base_opcode == 0xfb7
|| i.tm.base_opcode == 0xfb6
+ || i.tm.base_opcode == 0x63
|| i.tm.base_opcode == 0xfbe
|| i.tm.base_opcode == 0xfbf))
continue;
@@ -1590,16 +1977,27 @@ md_assemble (line)
#endif
)
{
+ /* Prohibit these changes in the 64bit mode, since
+ the lowering is more complicated. */
+ if (flag_code == CODE_64BIT
+ && (i.tm.operand_types[op] & InOutPortReg) == 0)
+ as_bad (_("Incorrect register `%%%s' used with`%c' suffix"),
+ i.op[op].regs->reg_name,
+ i.suffix);
#if REGISTER_WARNINGS
- if ((i.tm.operand_types[op] & InOutPortReg) == 0)
+ if (!quiet_warnings
+ && (i.tm.operand_types[op] & InOutPortReg) == 0)
as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
- (i.op[op].regs - (i.types[op] & Reg16 ? 8 : 16))->reg_name,
+ (i.op[op].regs
+ + (i.types[op] & Reg16
+ ? REGNAM_AL - REGNAM_AX
+ : REGNAM_AL - REGNAM_EAX))->reg_name,
i.op[op].regs->reg_name,
i.suffix);
#endif
continue;
}
- /* Any other register is bad */
+ /* Any other register is bad. */
if (i.types[op] & (Reg | RegMMX | RegXMM
| SReg2 | SReg3
| Control | Debug | Test
@@ -1616,6 +2014,51 @@ md_assemble (line)
else if (i.suffix == LONG_MNEM_SUFFIX)
{
int op;
+
+ for (op = i.operands; --op >= 0;)
+ /* Reject eight bit registers, except where the template
+ requires them. (eg. movzb) */
+ if ((i.types[op] & Reg8) != 0
+ && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0)
+ {
+ as_bad (_("`%%%s' not allowed with `%s%c'"),
+ i.op[op].regs->reg_name,
+ i.tm.name,
+ i.suffix);
+ return;
+ }
+ /* Warn if the e prefix on a general reg is missing. */
+ else if ((!quiet_warnings || flag_code == CODE_64BIT)
+ && (i.types[op] & Reg16) != 0
+ && (i.tm.operand_types[op] & (Reg32|Acc)) != 0)
+ {
+ /* Prohibit these changes in the 64bit mode, since
+ the lowering is more complicated. */
+ if (flag_code == CODE_64BIT)
+ as_bad (_("Incorrect register `%%%s' used with`%c' suffix"),
+ i.op[op].regs->reg_name,
+ i.suffix);
+#if REGISTER_WARNINGS
+ else
+ as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
+ (i.op[op].regs + REGNAM_EAX - REGNAM_AX)->reg_name,
+ i.op[op].regs->reg_name,
+ i.suffix);
+#endif
+ }
+ /* Warn if the r prefix on a general reg is missing. */
+ else if ((i.types[op] & Reg64) != 0
+ && (i.tm.operand_types[op] & (Reg32|Acc)) != 0)
+ {
+ as_bad (_("Incorrect register `%%%s' used with`%c' suffix"),
+ i.op[op].regs->reg_name,
+ i.suffix);
+ }
+ }
+ else if (i.suffix == QWORD_MNEM_SUFFIX)
+ {
+ int op;
+
for (op = i.operands; --op >= 0; )
/* Reject eight bit registers, except where the template
requires them. (eg. movzb) */
@@ -1628,22 +2071,22 @@ md_assemble (line)
i.suffix);
return;
}
-#if REGISTER_WARNINGS
/* Warn if the e prefix on a general reg is missing. */
- else if ((i.types[op] & Reg16) != 0
+ else if (((i.types[op] & Reg16) != 0
+ || (i.types[op] & Reg32) != 0)
&& (i.tm.operand_types[op] & (Reg32|Acc)) != 0)
{
- as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
- (i.op[op].regs + 8)->reg_name,
- i.op[op].regs->reg_name,
- i.suffix);
+ /* Prohibit these changes in the 64bit mode, since
+ the lowering is more complicated. */
+ as_bad (_("Incorrect register `%%%s' used with`%c' suffix"),
+ i.op[op].regs->reg_name,
+ i.suffix);
}
-#endif
}
else if (i.suffix == WORD_MNEM_SUFFIX)
{
int op;
- for (op = i.operands; --op >= 0; )
+ for (op = i.operands; --op >= 0;)
/* Reject eight bit registers, except where the template
requires them. (eg. movzb) */
if ((i.types[op] & Reg8) != 0
@@ -1655,65 +2098,87 @@ md_assemble (line)
i.suffix);
return;
}
-#if REGISTER_WARNINGS
/* Warn if the e prefix on a general reg is present. */
- else if ((i.types[op] & Reg32) != 0
+ else if ((!quiet_warnings || flag_code == CODE_64BIT)
+ && (i.types[op] & Reg32) != 0
&& (i.tm.operand_types[op] & (Reg16|Acc)) != 0)
{
- as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
- (i.op[op].regs - 8)->reg_name,
- i.op[op].regs->reg_name,
- i.suffix);
- }
+ /* Prohibit these changes in the 64bit mode, since
+ the lowering is more complicated. */
+ if (flag_code == CODE_64BIT)
+ as_bad (_("Incorrect register `%%%s' used with`%c' suffix"),
+ i.op[op].regs->reg_name,
+ i.suffix);
+ else
+#if REGISTER_WARNINGS
+ as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
+ (i.op[op].regs + REGNAM_AX - REGNAM_EAX)->reg_name,
+ i.op[op].regs->reg_name,
+ i.suffix);
#endif
+ }
}
+ else if (intel_syntax && (i.tm.opcode_modifier & IgnoreSize))
+ /* Do nothing if the instruction is going to ignore the prefix. */
+ ;
else
- abort();
+ abort ();
}
else if ((i.tm.opcode_modifier & DefaultSize) && !i.suffix)
{
i.suffix = stackop_size;
}
-
/* Make still unresolved immediate matches conform to size of immediate
given in i.suffix. Note: overlap2 cannot be an immediate! */
- if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32))
+ if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32 | Imm32S))
&& overlap0 != Imm8 && overlap0 != Imm8S
- && overlap0 != Imm16 && overlap0 != Imm32)
+ && overlap0 != Imm16 && overlap0 != Imm32S
+ && overlap0 != Imm32 && overlap0 != Imm64)
{
if (i.suffix)
{
overlap0 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) :
- (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : Imm32));
+ (i.suffix == WORD_MNEM_SUFFIX ? Imm16 :
+ (i.suffix == QWORD_MNEM_SUFFIX ? Imm64 | Imm32S : Imm32)));
}
- else if (overlap0 == (Imm16 | Imm32))
+ else if (overlap0 == (Imm16 | Imm32S | Imm32)
+ || overlap0 == (Imm16 | Imm32)
+ || overlap0 == (Imm16 | Imm32S))
{
overlap0 =
- (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32;
+ ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32S;
}
- else
+ if (overlap0 != Imm8 && overlap0 != Imm8S
+ && overlap0 != Imm16 && overlap0 != Imm32S
+ && overlap0 != Imm32 && overlap0 != Imm64)
{
as_bad (_("no instruction mnemonic suffix given; can't determine immediate size"));
return;
}
}
- if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32))
+ if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32))
&& overlap1 != Imm8 && overlap1 != Imm8S
- && overlap1 != Imm16 && overlap1 != Imm32)
+ && overlap1 != Imm16 && overlap1 != Imm32S
+ && overlap1 != Imm32 && overlap1 != Imm64)
{
if (i.suffix)
{
overlap1 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) :
- (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : Imm32));
+ (i.suffix == WORD_MNEM_SUFFIX ? Imm16 :
+ (i.suffix == QWORD_MNEM_SUFFIX ? Imm64 | Imm32S : Imm32)));
}
- else if (overlap1 == (Imm16 | Imm32))
+ else if (overlap1 == (Imm16 | Imm32 | Imm32S)
+ || overlap1 == (Imm16 | Imm32)
+ || overlap1 == (Imm16 | Imm32S))
{
overlap1 =
- (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32;
+ ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32S;
}
- else
+ if (overlap1 != Imm8 && overlap1 != Imm8S
+ && overlap1 != Imm16 && overlap1 != Imm32S
+ && overlap1 != Imm32 && overlap1 != Imm64)
{
- as_bad (_("no instruction mnemonic suffix given; can't determine immediate size"));
+ as_bad (_("no instruction mnemonic suffix given; can't determine immediate size %x %c"),overlap1, i.suffix);
return;
}
}
@@ -1723,7 +2188,7 @@ md_assemble (line)
if (overlap0 & ImplicitRegister)
i.reg_operands--;
if (overlap0 & Imm1)
- i.imm_operands = 0; /* kludge for shift insns */
+ i.imm_operands = 0; /* kludge for shift insns. */
i.types[1] = overlap1;
if (overlap1 & ImplicitRegister)
@@ -1742,7 +2207,7 @@ md_assemble (line)
return;
}
- /* For movzx and movsx, need to check the register type */
+ /* For movzx and movsx, need to check the register type. */
if (intel_syntax
&& (i.tm.base_opcode == 0xfb6 || i.tm.base_opcode == 0xfbe))
if (i.suffix && i.suffix == BYTE_MNEM_SUFFIX)
@@ -1767,8 +2232,8 @@ md_assemble (line)
/* Now select between word & dword operations via the operand
size prefix, except for instructions that will ignore this
prefix anyway. */
- if (((intel_syntax && (i.suffix == DWORD_MNEM_SUFFIX))
- || i.suffix == LONG_MNEM_SUFFIX) == flag_16bit_code
+ if (i.suffix != QWORD_MNEM_SUFFIX
+ && (i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT)
&& !(i.tm.opcode_modifier & IgnoreSize))
{
unsigned int prefix = DATA_PREFIX_OPCODE;
@@ -1778,9 +2243,21 @@ md_assemble (line)
if (! add_prefix (prefix))
return;
}
+
+ /* Set mode64 for an operand. */
+ if (i.suffix == QWORD_MNEM_SUFFIX
+ && !(i.tm.opcode_modifier & NoRex64))
+ {
+ i.rex.mode64 = 1;
+ if (flag_code < CODE_64BIT)
+ {
+ as_bad (_("64bit operations available only in 64bit modes."));
+ return;
+ }
+ }
+
/* Size floating point instruction. */
- if (i.suffix == LONG_MNEM_SUFFIX
- || (intel_syntax && i.suffix == DWORD_MNEM_SUFFIX))
+ if (i.suffix == LONG_MNEM_SUFFIX)
{
if (i.tm.opcode_modifier & FloatMF)
i.tm.base_opcode ^= 4;
@@ -1796,7 +2273,7 @@ md_assemble (line)
expressionS *exp;
- assert(i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS);
+ assert (i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS);
exp = &im_expressions[i.imm_operands++];
i.op[i.operands].imms = exp;
@@ -1806,7 +2283,7 @@ md_assemble (line)
i.tm.extension_opcode = None;
}
- /* For insns with operands there are more diddles to do to the opcode. */
+ /* For insns with operands there are more diddles to do to the opcode. */
if (i.operands)
{
/* Default segment register this instruction will use
@@ -1820,33 +2297,35 @@ md_assemble (line)
if (i.tm.opcode_modifier & regKludge)
{
unsigned int first_reg_op = (i.types[0] & Reg) ? 0 : 1;
- /* Pretend we saw the extra register operand. */
- assert (i.op[first_reg_op+1].regs == 0);
- i.op[first_reg_op+1].regs = i.op[first_reg_op].regs;
- i.types[first_reg_op+1] = i.types[first_reg_op];
+ /* Pretend we saw the extra register operand. */
+ assert (i.op[first_reg_op + 1].regs == 0);
+ i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs;
+ i.types[first_reg_op + 1] = i.types[first_reg_op];
i.reg_operands = 2;
}
if (i.tm.opcode_modifier & ShortForm)
{
- /* The register or float register operand is in operand 0 or 1. */
+ /* The register or float register operand is in operand 0 or 1. */
unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1;
- /* Register goes in low 3 bits of opcode. */
+ /* Register goes in low 3 bits of opcode. */
i.tm.base_opcode |= i.op[op].regs->reg_num;
- if ((i.tm.opcode_modifier & Ugh) != 0)
+ if (i.op[op].regs->reg_flags & RegRex)
+ i.rex.extZ = 1;
+ if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0)
{
/* Warn about some common errors, but press on regardless.
The first case can be generated by gcc (<= 2.8.1). */
if (i.operands == 2)
{
- /* reversed arguments on faddp, fsubp, etc. */
+ /* Reversed arguments on faddp, fsubp, etc. */
as_warn (_("translating to `%s %%%s,%%%s'"), i.tm.name,
i.op[1].regs->reg_name,
i.op[0].regs->reg_name);
}
else
{
- /* extraneous `l' suffix on fp insn */
+ /* Extraneous `l' suffix on fp insn. */
as_warn (_("translating to `%s %%%s'"), i.tm.name,
i.op[0].regs->reg_name);
}
@@ -1857,10 +2336,10 @@ md_assemble (line)
/* The opcode is completed (modulo i.tm.extension_opcode which
must be put into the modrm byte).
Now, we make the modrm & index base bytes based on all the
- info we've collected. */
+ info we've collected. */
/* i.reg_operands MUST be the number of real register operands;
- implicit registers do not count. */
+ implicit registers do not count. */
if (i.reg_operands == 2)
{
unsigned int source, dest;
@@ -1883,15 +2362,23 @@ md_assemble (line)
{
i.rm.reg = i.op[dest].regs->reg_num;
i.rm.regmem = i.op[source].regs->reg_num;
+ if (i.op[dest].regs->reg_flags & RegRex)
+ i.rex.extX = 1;
+ if (i.op[source].regs->reg_flags & RegRex)
+ i.rex.extZ = 1;
}
else
{
i.rm.reg = i.op[source].regs->reg_num;
i.rm.regmem = i.op[dest].regs->reg_num;
+ if (i.op[dest].regs->reg_flags & RegRex)
+ i.rex.extZ = 1;
+ if (i.op[source].regs->reg_flags & RegRex)
+ i.rex.extX = 1;
}
}
else
- { /* if it's not 2 reg operands... */
+ { /* If it's not 2 reg operands... */
if (i.mem_operands)
{
unsigned int fake_zero_displacement = 0;
@@ -1908,65 +2395,104 @@ md_assemble (line)
fake_zero_displacement = 1;
if (! i.index_reg)
{
- /* Operand is just <disp> */
- if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0))
+ /* Operand is just <disp> */
+ if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
{
i.rm.regmem = NO_BASE_REGISTER_16;
i.types[op] &= ~Disp;
i.types[op] |= Disp16;
}
- else
+ else if (flag_code != CODE_64BIT)
{
i.rm.regmem = NO_BASE_REGISTER;
i.types[op] &= ~Disp;
i.types[op] |= Disp32;
}
+ else
+ {
+ /* 64bit mode overwrites the 32bit
+ absolute addressing by RIP relative
+ addressing and absolute addressing
+ is encoded by one of the redundant
+ SIB forms. */
+
+ i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
+ i.sib.base = NO_BASE_REGISTER;
+ i.sib.index = NO_INDEX_REGISTER;
+ i.types[op] &= ~Disp;
+ i.types[op] |= Disp32S;
+ }
}
- else /* ! i.base_reg && i.index_reg */
+ else /* ! i.base_reg && i.index_reg */
{
i.sib.index = i.index_reg->reg_num;
i.sib.base = NO_BASE_REGISTER;
i.sib.scale = i.log2_scale_factor;
i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
i.types[op] &= ~Disp;
- i.types[op] |= Disp32; /* Must be 32 bit */
+ if (flag_code != CODE_64BIT)
+ i.types[op] |= Disp32; /* Must be 32 bit */
+ else
+ i.types[op] |= Disp32S;
+ if (i.index_reg->reg_flags & RegRex)
+ i.rex.extY = 1;
}
}
+ /* RIP addressing for 64bit mode. */
+ else if (i.base_reg->reg_type == BaseIndex)
+ {
+ i.rm.regmem = NO_BASE_REGISTER;
+ i.types[op] &= ~Disp;
+ i.types[op] |= Disp32S;
+ i.flags[op] = Operand_PCrel;
+ }
else if (i.base_reg->reg_type & Reg16)
{
switch (i.base_reg->reg_num)
{
- case 3: /* (%bx) */
+ case 3: /* (%bx) */
if (! i.index_reg)
i.rm.regmem = 7;
- else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */
+ else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */
i.rm.regmem = i.index_reg->reg_num - 6;
break;
- case 5: /* (%bp) */
+ case 5: /* (%bp) */
default_seg = &ss;
if (! i.index_reg)
{
i.rm.regmem = 6;
if ((i.types[op] & Disp) == 0)
{
- /* fake (%bp) into 0(%bp) */
+ /* fake (%bp) into 0(%bp) */
i.types[op] |= Disp8;
fake_zero_displacement = 1;
}
}
- else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */
+ else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */
i.rm.regmem = i.index_reg->reg_num - 6 + 2;
break;
- default: /* (%si) -> 4 or (%di) -> 5 */
+ default: /* (%si) -> 4 or (%di) -> 5 */
i.rm.regmem = i.base_reg->reg_num - 6 + 4;
}
i.rm.mode = mode_from_disp_size (i.types[op]);
}
- else /* i.base_reg and 32 bit mode */
+ else /* i.base_reg and 32/64 bit mode */
{
+ if (flag_code == CODE_64BIT
+ && (i.types[op] & Disp))
+ {
+ if (i.types[op] & Disp8)
+ i.types[op] = Disp8 | Disp32S;
+ else
+ i.types[op] = Disp32S;
+ }
i.rm.regmem = i.base_reg->reg_num;
+ if (i.base_reg->reg_flags & RegRex)
+ i.rex.extZ = 1;
i.sib.base = i.base_reg->reg_num;
- if (i.base_reg->reg_num == EBP_REG_NUM)
+ /* x86-64 ignores REX prefix bit here to avoid
+ decoder complications. */
+ if ((i.base_reg->reg_num & 7) == EBP_REG_NUM)
{
default_seg = &ss;
if (i.disp_operands == 0)
@@ -2000,6 +2526,8 @@ md_assemble (line)
{
i.sib.index = i.index_reg->reg_num;
i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
+ if (i.index_reg->reg_flags & RegRex)
+ i.rex.extY = 1;
}
i.rm.mode = mode_from_disp_size (i.types[op]);
}
@@ -2007,7 +2535,7 @@ md_assemble (line)
if (fake_zero_displacement)
{
/* Fakes a zero displacement assuming that i.types[op]
- holds the correct displacement size. */
+ holds the correct displacement size. */
expressionS *exp;
assert (i.op[op].disps == 0);
@@ -2024,7 +2552,7 @@ md_assemble (line)
operand (if any) based on i.tm.extension_opcode.
Again, we must be careful to make sure that
segment/control/debug/test/MMX registers are coded
- into the i.rm.reg field. */
+ into the i.rm.reg field. */
if (i.reg_operands)
{
unsigned int op =
@@ -2040,11 +2568,19 @@ md_assemble (line)
? 1
: 2));
/* If there is an extension opcode to put here, the
- register number must be put into the regmem field. */
+ register number must be put into the regmem field. */
if (i.tm.extension_opcode != None)
- i.rm.regmem = i.op[op].regs->reg_num;
+ {
+ i.rm.regmem = i.op[op].regs->reg_num;
+ if (i.op[op].regs->reg_flags & RegRex)
+ i.rex.extZ = 1;
+ }
else
- i.rm.reg = i.op[op].regs->reg_num;
+ {
+ i.rm.reg = i.op[op].regs->reg_num;
+ if (i.op[op].regs->reg_flags & RegRex)
+ i.rex.extX = 1;
+ }
/* Now, if no memory operand has set i.rm.mode = 0, 1, 2
we must set it to 3 to indicate this is a register
@@ -2053,19 +2589,22 @@ md_assemble (line)
i.rm.mode = 3;
}
- /* Fill in i.rm.reg field with extension opcode (if any). */
+ /* Fill in i.rm.reg field with extension opcode (if any). */
if (i.tm.extension_opcode != None)
i.rm.reg = i.tm.extension_opcode;
}
}
else if (i.tm.opcode_modifier & (Seg2ShortForm | Seg3ShortForm))
{
- if (i.tm.base_opcode == POP_SEG_SHORT && i.op[0].regs->reg_num == 1)
+ if (i.tm.base_opcode == POP_SEG_SHORT
+ && i.op[0].regs->reg_num == 1)
{
as_bad (_("you can't `pop %%cs'"));
return;
}
i.tm.base_opcode |= (i.op[0].regs->reg_num << 3);
+ if (i.op[0].regs->reg_flags & RegRex)
+ i.rex.extZ = 1;
}
else if ((i.tm.base_opcode & ~(D|W)) == MOV_AX_DISP32)
{
@@ -2090,14 +2629,14 @@ md_assemble (line)
return;
}
}
- else if ((i.tm.opcode_modifier & Ugh) != 0)
+ else if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0)
{
/* UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. */
as_warn (_("translating to `%sp'"), i.tm.name);
}
}
- /* Handle conversion of 'int $3' --> special int3 insn. */
+ /* Handle conversion of 'int $3' --> special int3 insn. */
if (i.tm.base_opcode == INT_OPCODE && i.op[0].imms->X_add_number == 3)
{
i.tm.base_opcode = INT3_OPCODE;
@@ -2114,19 +2653,64 @@ md_assemble (line)
i.op[0].disps->X_op = O_symbol;
}
- /* We are ready to output the insn. */
+ if (i.tm.opcode_modifier & Rex64)
+ i.rex.mode64 = 1;
+
+ /* For 8bit registers we would need an empty rex prefix.
+ Also in the case instruction is already having prefix,
+ we need to convert old registers to new ones. */
+
+ if (((i.types[0] & Reg8) && (i.op[0].regs->reg_flags & RegRex64))
+ || ((i.types[1] & Reg8) && (i.op[1].regs->reg_flags & RegRex64))
+ || ((i.rex.mode64 || i.rex.extX || i.rex.extY || i.rex.extZ || i.rex.empty)
+ && ((i.types[0] & Reg8) || (i.types[1] & Reg8))))
+ {
+ int x;
+ i.rex.empty = 1;
+ for (x = 0; x < 2; x++)
+ {
+ /* Look for 8bit operand that does use old registers. */
+ if (i.types[x] & Reg8
+ && !(i.op[x].regs->reg_flags & RegRex64))
+ {
+ /* In case it is "hi" register, give up. */
+ if (i.op[x].regs->reg_num > 3)
+ as_bad (_("Can't encode registers '%%%s' in the instruction requiring REX prefix.\n"),
+ i.op[x].regs->reg_name);
+
+ /* Otherwise it is equivalent to the extended register.
+ Since the encoding don't change this is merely cosmetical
+ cleanup for debug output. */
+
+ i.op[x].regs = i.op[x].regs + 8;
+ }
+ }
+ }
+
+ if (i.rex.mode64 || i.rex.extX || i.rex.extY || i.rex.extZ || i.rex.empty)
+ add_prefix (0x40
+ | (i.rex.mode64 ? 8 : 0)
+ | (i.rex.extX ? 4 : 0)
+ | (i.rex.extY ? 2 : 0)
+ | (i.rex.extZ ? 1 : 0));
+
+ /* We are ready to output the insn. */
{
register char *p;
- /* Output jumps. */
+ /* Tie dwarf2 debug info to the address at the start of the insn.
+ We can't do this after the insn has been output as the current
+ frag may have been closed off. eg. by frag_var. */
+ dwarf2_emit_insn (0);
+
+ /* Output jumps. */
if (i.tm.opcode_modifier & Jump)
{
- int size;
int code16;
int prefix;
code16 = 0;
- if (flag_16bit_code)
+ if (flag_code == CODE_16BIT)
code16 = CODE16;
prefix = 0;
@@ -2136,10 +2720,18 @@ md_assemble (line)
i.prefixes -= 1;
code16 ^= CODE16;
}
-
- size = 4;
- if (code16)
- size = 2;
+ /* Pentium4 branch hints. */
+ if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */
+ || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */)
+ {
+ prefix++;
+ i.prefixes--;
+ }
+ if (i.prefix[REX_PREFIX])
+ {
+ prefix++;
+ i.prefixes--;
+ }
if (i.prefixes != 0 && !intel_syntax)
as_warn (_("skipping prefixes on this instruction"));
@@ -2149,21 +2741,27 @@ md_assemble (line)
instruction we may generate in md_convert_frag. This is 2
bytes for the opcode and room for the prefix and largest
displacement. */
- frag_grow (prefix + 2 + size);
- insn_size += prefix + 1;
+ frag_grow (prefix + 2 + 4);
/* Prefix and 1 opcode byte go in fr_fix. */
p = frag_more (prefix + 1);
- if (prefix)
+ if (i.prefix[DATA_PREFIX])
*p++ = DATA_PREFIX_OPCODE;
+ if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE
+ || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE)
+ *p++ = i.prefix[SEG_PREFIX];
+ if (i.prefix[REX_PREFIX])
+ *p++ = i.prefix[REX_PREFIX];
*p = i.tm.base_opcode;
/* 1 possible extra opcode + displacement go in var part.
Pass reloc in fr_var. */
frag_var (rs_machine_dependent,
- 1 + size,
- i.disp_reloc[0],
+ 1 + 4,
+ i.reloc[0],
((unsigned char) *p == JUMP_PC_RELATIVE
? ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL) | code16
- : ENCODE_RELAX_STATE (COND_JUMP, SMALL) | code16),
+ : ((cpu_arch_flags & Cpu386) != 0
+ ? ENCODE_RELAX_STATE (COND_JUMP, SMALL) | code16
+ : ENCODE_RELAX_STATE (COND_JUMP86, SMALL) | code16)),
i.op[0].disps->X_add_symbol,
i.op[0].disps->X_add_number,
p);
@@ -2178,22 +2776,27 @@ md_assemble (line)
size = 1;
if (i.prefix[ADDR_PREFIX])
{
- insn_size += 1;
FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE);
i.prefixes -= 1;
}
+ /* Pentium4 branch hints. */
+ if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */
+ || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */)
+ {
+ FRAG_APPEND_1_CHAR (i.prefix[SEG_PREFIX]);
+ i.prefixes--;
+ }
}
else
{
int code16;
code16 = 0;
- if (flag_16bit_code)
+ if (flag_code == CODE_16BIT)
code16 = CODE16;
if (i.prefix[DATA_PREFIX])
{
- insn_size += 1;
FRAG_APPEND_1_CHAR (DATA_PREFIX_OPCODE);
i.prefixes -= 1;
code16 ^= CODE16;
@@ -2204,25 +2807,20 @@ md_assemble (line)
size = 2;
}
+ if (i.prefix[REX_PREFIX])
+ {
+ FRAG_APPEND_1_CHAR (i.prefix[REX_PREFIX]);
+ i.prefixes -= 1;
+ }
+
if (i.prefixes != 0 && !intel_syntax)
as_warn (_("skipping prefixes on this instruction"));
- if (fits_in_unsigned_byte (i.tm.base_opcode))
- {
- insn_size += 1 + size;
- p = frag_more (1 + size);
- }
- else
- {
- /* opcode can be at most two bytes */
- insn_size += 2 + size;
- p = frag_more (2 + size);
- *p++ = (i.tm.base_opcode >> 8) & 0xff;
- }
- *p++ = i.tm.base_opcode & 0xff;
+ p = frag_more (1 + size);
+ *p++ = i.tm.base_opcode;
fix_new_exp (frag_now, p - frag_now->fr_literal, size,
- i.op[0].disps, 1, reloc (size, 1, i.disp_reloc[0]));
+ i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0]));
}
else if (i.tm.opcode_modifier & JumpInterSegment)
{
@@ -2231,7 +2829,7 @@ md_assemble (line)
int code16;
code16 = 0;
- if (flag_16bit_code)
+ if (flag_code == CODE_16BIT)
code16 = CODE16;
prefix = 0;
@@ -2241,6 +2839,11 @@ md_assemble (line)
i.prefixes -= 1;
code16 ^= CODE16;
}
+ if (i.prefix[REX_PREFIX])
+ {
+ prefix++;
+ i.prefixes -= 1;
+ }
size = 4;
if (code16)
@@ -2249,14 +2852,19 @@ md_assemble (line)
if (i.prefixes != 0 && !intel_syntax)
as_warn (_("skipping prefixes on this instruction"));
- insn_size += prefix + 1 + 2 + size; /* 1 opcode; 2 segment; offset */
+ /* 1 opcode; 2 segment; offset */
p = frag_more (prefix + 1 + 2 + size);
- if (prefix)
+
+ if (i.prefix[DATA_PREFIX])
*p++ = DATA_PREFIX_OPCODE;
+
+ if (i.prefix[REX_PREFIX])
+ *p++ = i.prefix[REX_PREFIX];
+
*p++ = i.tm.base_opcode;
if (i.op[1].imms->X_op == O_constant)
{
- long n = (long) i.op[1].imms->X_add_number;
+ offsetT n = i.op[1].imms->X_add_number;
if (size == 2
&& !fits_in_unsigned_word (n)
@@ -2265,11 +2873,11 @@ md_assemble (line)
as_bad (_("16-bit jump out of range"));
return;
}
- md_number_to_chars (p, (valueT) n, size);
+ md_number_to_chars (p, n, size);
}
else
fix_new_exp (frag_now, p - frag_now->fr_literal, size,
- i.op[1].imms, 0, reloc (size, 0, i.disp_reloc[0]));
+ i.op[1].imms, 0, reloc (size, 0, 0, i.reloc[1]));
if (i.op[0].imms->X_op != O_constant)
as_bad (_("can't handle non absolute segment in `%s'"),
i.tm.name);
@@ -2277,58 +2885,42 @@ md_assemble (line)
}
else
{
- /* Output normal instructions here. */
+ /* Output normal instructions here. */
unsigned char *q;
- /* The prefix bytes. */
+ /* All opcodes on i386 have eighter 1 or 2 bytes. We may use third
+ byte for the SSE instructions to specify prefix they require. */
+ if (i.tm.base_opcode & 0xff0000)
+ add_prefix ((i.tm.base_opcode >> 16) & 0xff);
+
+ /* The prefix bytes. */
for (q = i.prefix;
q < i.prefix + sizeof (i.prefix) / sizeof (i.prefix[0]);
q++)
{
if (*q)
{
- insn_size += 1;
p = frag_more (1);
md_number_to_chars (p, (valueT) *q, 1);
}
}
- /* Now the opcode; be careful about word order here! */
+ /* Now the opcode; be careful about word order here! */
if (fits_in_unsigned_byte (i.tm.base_opcode))
{
- insn_size += 1;
FRAG_APPEND_1_CHAR (i.tm.base_opcode);
}
- else if (fits_in_unsigned_word (i.tm.base_opcode))
+ else
{
- insn_size += 2;
p = frag_more (2);
- /* put out high byte first: can't use md_number_to_chars! */
+ /* Put out high byte first: can't use md_number_to_chars! */
*p++ = (i.tm.base_opcode >> 8) & 0xff;
*p = i.tm.base_opcode & 0xff;
}
- else
- { /* opcode is either 3 or 4 bytes */
- if (i.tm.base_opcode & 0xff000000)
- {
- insn_size += 4;
- p = frag_more (4);
- *p++ = (i.tm.base_opcode >> 24) & 0xff;
- }
- else
- {
- insn_size += 3;
- p = frag_more (3);
- }
- *p++ = (i.tm.base_opcode >> 16) & 0xff;
- *p++ = (i.tm.base_opcode >> 8) & 0xff;
- *p = (i.tm.base_opcode) & 0xff;
- }
/* Now the modrm byte and sib byte (if present). */
if (i.tm.opcode_modifier & Modrm)
{
- insn_size += 1;
p = frag_more (1);
md_number_to_chars (p,
(valueT) (i.rm.regmem << 0
@@ -2343,7 +2935,6 @@ md_assemble (line)
&& i.rm.mode != 3
&& !(i.base_reg && (i.base_reg->reg_type & Reg16) != 0))
{
- insn_size += 1;
p = frag_more (1);
md_number_to_chars (p,
(valueT) (i.sib.base << 0
@@ -2363,47 +2954,76 @@ md_assemble (line)
{
if (i.op[n].disps->X_op == O_constant)
{
- int size = 4;
- long val = (long) i.op[n].disps->X_add_number;
+ int size;
+ offsetT val;
- if (i.types[n] & (Disp8 | Disp16))
+ size = 4;
+ if (i.types[n] & (Disp8 | Disp16 | Disp64))
{
- long mask;
-
size = 2;
- mask = ~ (long) 0xffff;
if (i.types[n] & Disp8)
- {
- size = 1;
- mask = ~ (long) 0xff;
- }
-
- if ((val & mask) != 0 && (val & mask) != mask)
- as_warn (_("%ld shortened to %ld"),
- val, val & ~mask);
+ size = 1;
+ if (i.types[n] & Disp64)
+ size = 8;
}
- insn_size += size;
+ val = offset_in_range (i.op[n].disps->X_add_number,
+ size);
p = frag_more (size);
- md_number_to_chars (p, (valueT) val, size);
+ md_number_to_chars (p, val, size);
}
else
{
int size = 4;
+ int sign = 0;
+ int pcrel = (i.flags[n] & Operand_PCrel) != 0;
+
+ /* The PC relative address is computed relative
+ to the instruction boundary, so in case immediate
+ fields follows, we need to adjust the value. */
+ if (pcrel && i.imm_operands)
+ {
+ int imm_size = 4;
+ register unsigned int n1;
+
+ for (n1 = 0; n1 < i.operands; n1++)
+ if (i.types[n1] & Imm)
+ {
+ if (i.types[n1] & (Imm8 | Imm8S | Imm16 | Imm64))
+ {
+ imm_size = 2;
+ if (i.types[n1] & (Imm8 | Imm8S))
+ imm_size = 1;
+ if (i.types[n1] & Imm64)
+ imm_size = 8;
+ }
+ break;
+ }
+ /* We should find the immediate. */
+ if (n1 == i.operands)
+ abort ();
+ i.op[n].disps->X_add_number -= imm_size;
+ }
- if (i.types[n] & Disp16)
- size = 2;
+ if (i.types[n] & Disp32S)
+ sign = 1;
+
+ if (i.types[n] & (Disp16 | Disp64))
+ {
+ size = 2;
+ if (i.types[n] & Disp64)
+ size = 8;
+ }
- insn_size += size;
p = frag_more (size);
fix_new_exp (frag_now, p - frag_now->fr_literal, size,
- i.op[n].disps, 0,
- reloc (size, 0, i.disp_reloc[n]));
+ i.op[n].disps, pcrel,
+ reloc (size, pcrel, sign, i.reloc[n]));
}
}
}
- } /* end displacement output */
+ }
- /* output immediate */
+ /* Output immediate. */
if (i.imm_operands)
{
register unsigned int n;
@@ -2414,48 +3034,47 @@ md_assemble (line)
{
if (i.op[n].imms->X_op == O_constant)
{
- int size = 4;
- long val = (long) i.op[n].imms->X_add_number;
+ int size;
+ offsetT val;
- if (i.types[n] & (Imm8 | Imm8S | Imm16))
+ size = 4;
+ if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64))
{
- long mask;
-
size = 2;
- mask = ~ (long) 0xffff;
if (i.types[n] & (Imm8 | Imm8S))
- {
- size = 1;
- mask = ~ (long) 0xff;
- }
- if ((val & mask) != 0 && (val & mask) != mask)
- as_warn (_("%ld shortened to %ld"),
- val, val & ~mask);
+ size = 1;
+ else if (i.types[n] & Imm64)
+ size = 8;
}
- insn_size += size;
+ val = offset_in_range (i.op[n].imms->X_add_number,
+ size);
p = frag_more (size);
- md_number_to_chars (p, (valueT) val, size);
+ md_number_to_chars (p, val, size);
}
else
- { /* not absolute_section */
- /* Need a 32-bit fixup (don't support 8bit
+ {
+ /* Not absolute_section.
+ Need a 32-bit fixup (don't support 8bit
non-absolute imms). Try to support other
- sizes ... */
-#ifdef BFD_ASSEMBLER
- enum bfd_reloc_code_real reloc_type;
-#else
- int reloc_type;
-#endif
+ sizes ... */
+ RELOC_ENUM reloc_type;
int size = 4;
+ int sign = 0;
- if (i.types[n] & Imm16)
- size = 2;
- else if (i.types[n] & (Imm8 | Imm8S))
- size = 1;
+ if ((i.types[n] & (Imm32S))
+ && i.suffix == QWORD_MNEM_SUFFIX)
+ sign = 1;
+ if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64))
+ {
+ size = 2;
+ if (i.types[n] & (Imm8 | Imm8S))
+ size = 1;
+ if (i.types[n] & Imm64)
+ size = 8;
+ }
- insn_size += size;
p = frag_more (size);
- reloc_type = reloc (size, 0, i.disp_reloc[0]);
+ reloc_type = reloc (size, 0, sign, i.reloc[n]);
#ifdef BFD_ASSEMBLER
if (reloc_type == BFD_RELOC_32
&& GOT_symbol
@@ -2466,6 +3085,9 @@ md_assemble (line)
(i.op[n].imms->X_op_symbol)->X_op)
== O_subtract))))
{
+ /* We don't support dynamic linking on x86-64 yet. */
+ if (flag_code == CODE_64BIT)
+ abort ();
reloc_type = BFD_RELOC_386_GOTPC;
i.op[n].imms->X_add_number += 3;
}
@@ -2475,7 +3097,7 @@ md_assemble (line)
}
}
}
- } /* end immediate output */
+ }
}
#ifdef DEBUG386
@@ -2483,10 +3105,134 @@ md_assemble (line)
{
pi (line, &i);
}
-#endif /* DEBUG386 */
+#endif /* DEBUG386 */
}
}
+#ifndef LEX_AT
+static char *lex_got PARAMS ((RELOC_ENUM *, int *));
+
+/* Parse operands of the form
+ <symbol>@GOTOFF+<nnn>
+ and similar .plt or .got references.
+
+ If we find one, set up the correct relocation in RELOC and copy the
+ input string, minus the `@GOTOFF' into a malloc'd buffer for
+ parsing by the calling routine. Return this buffer, and if ADJUST
+ 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)
+ RELOC_ENUM *reloc;
+ int *adjust;
+{
+ static const char * const mode_name[NUM_FLAG_CODE] = { "32", "16", "64" };
+ static const struct {
+ const char *str;
+ const RELOC_ENUM rel[NUM_FLAG_CODE];
+ } 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 } },
+ { "GOT", { BFD_RELOC_386_GOT32, 0, BFD_RELOC_X86_64_GOT32 } }
+ };
+ char *cp;
+ unsigned int j;
+
+ for (cp = input_line_pointer; *cp != '@'; cp++)
+ if (is_end_of_line[(unsigned char) *cp])
+ return NULL;
+
+ for (j = 0; j < sizeof (gotrel) / sizeof (gotrel[0]); j++)
+ {
+ int len;
+
+ len = strlen (gotrel[j].str);
+ if (strncmp (cp + 1, gotrel[j].str, len) == 0)
+ {
+ if (gotrel[j].rel[(unsigned int) flag_code] != 0)
+ {
+ int first;
+ char *tmpbuf;
+
+ *reloc = gotrel[j].rel[(unsigned int) flag_code];
+
+ if (GOT_symbol == NULL)
+ GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
+
+ /* Replace the relocation token with ' ', so that
+ errors like foo@GOTOFF1 will be detected. */
+ first = cp - input_line_pointer;
+ tmpbuf = xmalloc (strlen (input_line_pointer));
+ memcpy (tmpbuf, input_line_pointer, first);
+ tmpbuf[first] = ' ';
+ strcpy (tmpbuf + first + 1, cp + 1 + len);
+ if (adjust)
+ *adjust = len;
+ return tmpbuf;
+ }
+
+ as_bad (_("@%s reloc is not supported in %s bit mode"),
+ gotrel[j].str, mode_name[(unsigned int) flag_code]);
+ return NULL;
+ }
+ }
+
+ /* Might be a symbol version string. Don't as_bad here. */
+ 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 RELOC_ENUM got_reloc = NO_RELOC;
+
+void
+x86_cons_fix_new (frag, off, len, exp)
+ fragS *frag;
+ unsigned int off;
+ unsigned int len;
+ expressionS *exp;
+{
+ RELOC_ENUM 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)
+ {
+ /* Handle @GOTOFF and the like in an expression. */
+ char *save;
+ char *gotfree_input_line;
+ int adjust;
+
+ save = input_line_pointer;
+ gotfree_input_line = lex_got (&got_reloc, &adjust);
+ if (gotfree_input_line)
+ input_line_pointer = gotfree_input_line;
+
+ expression (exp);
+
+ if (gotfree_input_line)
+ {
+ /* expression () has merrily parsed up to the end of line,
+ or a comma - in the wrong buffer. Transfer how far
+ input_line_pointer has moved to the right buffer. */
+ input_line_pointer = (save
+ + (input_line_pointer - gotfree_input_line)
+ + adjust);
+ free (gotfree_input_line);
+ }
+ }
+ else
+ expression (exp);
+}
+#endif
+
static int i386_immediate PARAMS ((char *));
static int
@@ -2494,8 +3240,11 @@ 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;
+ expressionS *exp;
if (i.imm_operands == MAX_IMMEDIATE_OPERANDS)
{
@@ -2513,70 +3262,26 @@ i386_immediate (imm_start)
input_line_pointer = imm_start;
#ifndef LEX_AT
- {
- /*
- * We can have operands of the form
- * <symbol>@GOTOFF+<nnn>
- * Take the easy way out here and copy everything
- * into a temporary buffer...
- */
- register char *cp;
-
- cp = strchr (input_line_pointer, '@');
- if (cp != NULL)
- {
- char *tmpbuf;
- int len = 0;
- int first;
-
- /* GOT relocations are not supported in 16 bit mode */
- if (flag_16bit_code)
- as_bad (_("GOT relocations not supported in 16 bit mode"));
-
- if (GOT_symbol == NULL)
- GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
-
- if (strncmp (cp + 1, "PLT", 3) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
- len = 3;
- }
- else if (strncmp (cp + 1, "GOTOFF", 6) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
- len = 6;
- }
- else if (strncmp (cp + 1, "GOT", 3) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
- len = 3;
- }
- else
- as_bad (_("bad reloc specifier in expression"));
-
- /* Replace the relocation token with ' ', so that errors like
- foo@GOTOFF1 will be detected. */
- first = cp - input_line_pointer;
- tmpbuf = (char *) alloca (strlen(input_line_pointer));
- memcpy (tmpbuf, input_line_pointer, first);
- tmpbuf[first] = ' ';
- strcpy (tmpbuf + first + 1, cp + 1 + len);
- input_line_pointer = tmpbuf;
- }
- }
+ gotfree_input_line = lex_got (&i.reloc[this_operand], NULL);
+ if (gotfree_input_line)
+ input_line_pointer = gotfree_input_line;
#endif
exp_seg = expression (exp);
SKIP_WHITESPACE ();
if (*input_line_pointer)
- as_bad (_("ignoring junk `%s' after expression"), input_line_pointer);
+ 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)
{
- /* missing or bad expr becomes absolute 0 */
+ /* Missing or bad expr becomes absolute 0. */
as_bad (_("missing or invalid immediate expression `%s' taken as 0"),
imm_start);
exp->X_op = O_constant;
@@ -2584,17 +3289,21 @@ i386_immediate (imm_start)
exp->X_add_symbol = (symbolS *) 0;
exp->X_op_symbol = (symbolS *) 0;
}
-
- if (exp->X_op == O_constant)
+ else if (exp->X_op == O_constant)
{
- i.types[this_operand] |= Imm32; /* Size it properly later. */
+ /* Size it properly later. */
+ i.types[this_operand] |= Imm64;
+ /* If BFD64, sign extend val. */
+ if (!use_rela_relocations)
+ if ((exp->X_add_number & ~(((addressT) 2 << 31) - 1)) == 0)
+ exp->X_add_number = (exp->X_add_number ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31);
}
#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
- else if (
+ else if (1
#ifdef BFD_ASSEMBLER
- OUTPUT_FLAVOR == bfd_target_aout_flavour &&
+ && OUTPUT_FLAVOR == bfd_target_aout_flavour
#endif
- exp_seg != text_section
+ && exp_seg != text_section
&& exp_seg != data_section
&& exp_seg != bss_section
&& exp_seg != undefined_section
@@ -2615,44 +3324,45 @@ i386_immediate (imm_start)
{
/* This is an address. The size of the address will be
determined later, depending on destination register,
- suffix, or the default for the section. We exclude
- Imm8S here so that `push $foo' and other instructions
- with an Imm8S form will use Imm16 or Imm32. */
- i.types[this_operand] |= (Imm8 | Imm16 | Imm32);
+ suffix, or the default for the section. */
+ i.types[this_operand] |= Imm8 | Imm16 | Imm32 | Imm32S | Imm64;
}
return 1;
}
-static int i386_scale PARAMS ((char *));
+static char *i386_scale PARAMS ((char *));
-static int
+static char *
i386_scale (scale)
char *scale;
{
- if (!isdigit (*scale))
- goto bad_scale;
+ offsetT val;
+ char *save = input_line_pointer;
+
+ input_line_pointer = scale;
+ val = get_absolute_expression ();
- switch (*scale)
+ switch (val)
{
- case '0':
- case '1':
+ case 0:
+ case 1:
i.log2_scale_factor = 0;
break;
- case '2':
+ case 2:
i.log2_scale_factor = 1;
break;
- case '4':
+ case 4:
i.log2_scale_factor = 2;
break;
- case '8':
+ case 8:
i.log2_scale_factor = 3;
break;
default:
- bad_scale:
as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"),
scale);
- return 0;
+ input_line_pointer = save;
+ return NULL;
}
if (i.log2_scale_factor != 0 && ! i.index_reg)
{
@@ -2662,7 +3372,9 @@ i386_scale (scale)
i.log2_scale_factor = 0;
#endif
}
- return 1;
+ scale = input_line_pointer;
+ input_line_pointer = save;
+ return scale;
}
static int i386_displacement PARAMS ((char *, char *));
@@ -2675,10 +3387,15 @@ i386_displacement (disp_start, disp_end)
register expressionS *exp;
segT exp_seg = 0;
char *save_input_line_pointer;
+#ifndef LEX_AT
+ char *gotfree_input_line;
+#endif
int bigdisp = Disp32;
- if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0))
+ if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
bigdisp = Disp16;
+ if (flag_code == CODE_64BIT)
+ bigdisp = Disp64;
i.types[this_operand] |= bigdisp;
exp = &disp_expressions[i.disp_operands];
@@ -2727,97 +3444,63 @@ i386_displacement (disp_start, disp_end)
rorl $16,%edx
#NO_APP
- So here we provide the missing zero.
- */
+ So here we provide the missing zero. */
*displacement_string_end = '0';
}
#endif
#ifndef LEX_AT
- {
- /*
- * We can have operands of the form
- * <symbol>@GOTOFF+<nnn>
- * Take the easy way out here and copy everything
- * into a temporary buffer...
- */
- register char *cp;
-
- cp = strchr (input_line_pointer, '@');
- if (cp != NULL)
- {
- char *tmpbuf;
- int len = 0;
- int first;
-
- /* GOT relocations are not supported in 16 bit mode */
- if (flag_16bit_code)
- as_bad (_("GOT relocations not supported in 16 bit mode"));
-
- if (GOT_symbol == NULL)
- GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
-
- if (strncmp (cp + 1, "PLT", 3) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
- len = 3;
- }
- else if (strncmp (cp + 1, "GOTOFF", 6) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
- len = 6;
- }
- else if (strncmp (cp + 1, "GOT", 3) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
- len = 3;
- }
- else
- as_bad (_("bad reloc specifier in expression"));
-
- /* Replace the relocation token with ' ', so that errors like
- foo@GOTOFF1 will be detected. */
- first = cp - input_line_pointer;
- tmpbuf = (char *) alloca (strlen(input_line_pointer));
- memcpy (tmpbuf, input_line_pointer, first);
- tmpbuf[first] = ' ';
- strcpy (tmpbuf + first + 1, cp + 1 + len);
- input_line_pointer = tmpbuf;
- }
- }
+ gotfree_input_line = lex_got (&i.reloc[this_operand], NULL);
+ if (gotfree_input_line)
+ input_line_pointer = gotfree_input_line;
#endif
exp_seg = expression (exp);
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer)
+ as_bad (_("junk `%s' after expression"), input_line_pointer);
+#if GCC_ASM_O_HACK
+ RESTORE_END_STRING (disp_end + 1);
+#endif
+ RESTORE_END_STRING (disp_end);
+ input_line_pointer = save_input_line_pointer;
+#ifndef LEX_AT
+ if (gotfree_input_line)
+ free (gotfree_input_line);
+#endif
+
#ifdef BFD_ASSEMBLER
/* We do this to make sure that the section symbol is in
the symbol table. We will ultimately change the relocation
- to be relative to the beginning of the section */
- if (i.disp_reloc[this_operand] == BFD_RELOC_386_GOTOFF)
+ to be relative to the beginning of the section. */
+ if (i.reloc[this_operand] == BFD_RELOC_386_GOTOFF
+ || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL)
{
- if (S_IS_LOCAL(exp->X_add_symbol)
+ if (exp->X_op != O_symbol)
+ {
+ as_bad (_("bad expression used with @%s"),
+ (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL
+ ? "GOTPCREL"
+ : "GOTOFF"));
+ return 0;
+ }
+
+ if (S_IS_LOCAL (exp->X_add_symbol)
&& S_GET_SEGMENT (exp->X_add_symbol) != undefined_section)
section_symbol (S_GET_SEGMENT (exp->X_add_symbol));
- assert (exp->X_op == O_symbol);
exp->X_op = O_subtract;
exp->X_op_symbol = GOT_symbol;
- i.disp_reloc[this_operand] = BFD_RELOC_32;
+ if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL)
+ i.reloc[this_operand] = BFD_RELOC_32_PCREL;
+ else
+ i.reloc[this_operand] = BFD_RELOC_32;
}
#endif
- SKIP_WHITESPACE ();
- if (*input_line_pointer)
- as_bad (_("ignoring junk `%s' after expression"),
- input_line_pointer);
-#if GCC_ASM_O_HACK
- RESTORE_END_STRING (disp_end + 1);
-#endif
- RESTORE_END_STRING (disp_end);
- input_line_pointer = save_input_line_pointer;
-
if (exp->X_op == O_absent || exp->X_op == O_big)
{
- /* missing or bad expr becomes absolute 0 */
+ /* Missing or bad expr becomes absolute 0. */
as_bad (_("missing or invalid displacement expression `%s' taken as 0"),
disp_start);
exp->X_op = O_constant;
@@ -2826,28 +3509,15 @@ i386_displacement (disp_start, disp_end)
exp->X_op_symbol = (symbolS *) 0;
}
- if (exp->X_op == O_constant)
- {
- if (i.types[this_operand] & Disp16)
- {
- /* We know this operand is at most 16 bits, so convert to a
- signed 16 bit number before trying to see whether it will
- fit in an even smaller size. */
- exp->X_add_number =
- (((exp->X_add_number & 0xffff) ^ 0x8000) - 0x8000);
- }
- if (fits_in_signed_byte (exp->X_add_number))
- i.types[this_operand] |= Disp8;
- }
#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
- else if (
+ if (exp->X_op != O_constant
#ifdef BFD_ASSEMBLER
- OUTPUT_FLAVOR == bfd_target_aout_flavour &&
+ && OUTPUT_FLAVOR == bfd_target_aout_flavour
#endif
- exp_seg != text_section
- && exp_seg != data_section
- && exp_seg != bss_section
- && exp_seg != undefined_section)
+ && exp_seg != text_section
+ && exp_seg != data_section
+ && exp_seg != bss_section
+ && exp_seg != undefined_section)
{
#ifdef BFD_ASSEMBLER
as_bad (_("unimplemented segment %s in operand"), exp_seg->name);
@@ -2857,239 +3527,72 @@ i386_displacement (disp_start, disp_end)
return 0;
}
#endif
+ else if (flag_code == CODE_64BIT)
+ i.types[this_operand] |= Disp32S | Disp32;
return 1;
}
-static int i386_operand_modifier PARAMS ((char **, int));
-
-static int
-i386_operand_modifier (op_string, got_a_float)
- char **op_string;
- int got_a_float;
-{
- if (!strncasecmp (*op_string, "BYTE PTR", 8))
- {
- i.suffix = BYTE_MNEM_SUFFIX;
- *op_string += 8;
- return BYTE_PTR;
-
- }
- else if (!strncasecmp (*op_string, "WORD PTR", 8))
- {
- if (got_a_float == 2) /* "fi..." */
- i.suffix = SHORT_MNEM_SUFFIX;
- else
- i.suffix = WORD_MNEM_SUFFIX;
- *op_string += 8;
- return WORD_PTR;
- }
-
- else if (!strncasecmp (*op_string, "DWORD PTR", 9))
- {
- if (got_a_float == 1) /* "f..." */
- i.suffix = SHORT_MNEM_SUFFIX;
- else
- i.suffix = LONG_MNEM_SUFFIX;
- *op_string += 9;
- return DWORD_PTR;
- }
-
- else if (!strncasecmp (*op_string, "QWORD PTR", 9))
- {
- i.suffix = DWORD_MNEM_SUFFIX;
- *op_string += 9;
- return QWORD_PTR;
- }
-
- else if (!strncasecmp (*op_string, "XWORD PTR", 9))
- {
- i.suffix = LONG_DOUBLE_MNEM_SUFFIX;
- *op_string += 9;
- return XWORD_PTR;
- }
-
- else if (!strncasecmp (*op_string, "SHORT", 5))
- {
- *op_string += 5;
- return SHORT;
- }
-
- else if (!strncasecmp (*op_string, "OFFSET FLAT:", 12))
- {
- *op_string += 12;
- return OFFSET_FLAT;
- }
-
- else if (!strncasecmp (*op_string, "FLAT", 4))
- {
- *op_string += 4;
- return FLAT;
- }
-
- else return NONE_FOUND;
-}
-
-static char * build_displacement_string PARAMS ((int, char *));
-
-static char *
-build_displacement_string (initial_disp, op_string)
- int initial_disp;
- char *op_string;
-{
- char *temp_string = (char *) malloc (strlen (op_string) + 1);
- char *end_of_operand_string;
- char *tc;
- char *temp_disp;
-
- temp_string[0] = '\0';
- tc = end_of_operand_string = strchr (op_string, '[');
- if (initial_disp && !end_of_operand_string)
- {
- strcpy (temp_string, op_string);
- return temp_string;
- }
-
- /* Build the whole displacement string */
- if (initial_disp)
- {
- strncpy (temp_string, op_string, end_of_operand_string - op_string);
- temp_string[end_of_operand_string - op_string] = '\0';
- temp_disp = tc;
- }
- else
- temp_disp = op_string;
-
- while (*temp_disp != '\0')
- {
- char *end_op;
- int add_minus = (*temp_disp == '-');
-
- if (*temp_disp == '+' || *temp_disp == '-' || *temp_disp == '[')
- temp_disp++;
-
- if (is_space_char (*temp_disp))
- temp_disp++;
-
- /* Don't consider registers */
- if ( !((*temp_disp == REGISTER_PREFIX || allow_naked_reg)
- && parse_register (temp_disp, &end_op)) )
- {
- char *string_start = temp_disp;
-
- while (*temp_disp != ']'
- && *temp_disp != '+'
- && *temp_disp != '-'
- && *temp_disp != '*')
- ++temp_disp;
-
- if (add_minus)
- strcat (temp_string, "-");
- else
- strcat (temp_string, "+");
-
- strncat (temp_string, string_start, temp_disp - string_start);
- if (*temp_disp == '+' || *temp_disp == '-')
- --temp_disp;
- }
-
- while (*temp_disp != '\0'
- && *temp_disp != '+'
- && *temp_disp != '-')
- ++temp_disp;
- }
-
- return temp_string;
-}
-
-static int i386_parse_seg PARAMS ((char *));
-
-static int
-i386_parse_seg (op_string)
- char *op_string;
-{
- if (is_space_char (*op_string))
- ++op_string;
-
- /* Should be one of es, cs, ss, ds fs or gs */
- switch (*op_string++)
- {
- case 'e':
- i.seg[i.mem_operands] = &es;
- break;
- case 'c':
- i.seg[i.mem_operands] = &cs;
- break;
- case 's':
- i.seg[i.mem_operands] = &ss;
- break;
- case 'd':
- i.seg[i.mem_operands] = &ds;
- break;
- case 'f':
- i.seg[i.mem_operands] = &fs;
- break;
- case 'g':
- i.seg[i.mem_operands] = &gs;
- break;
- default:
- as_bad (_("bad segment name `%s'"), op_string);
- return 0;
- }
-
- if (*op_string++ != 's')
- {
- as_bad (_("bad segment name `%s'"), op_string);
- return 0;
- }
-
- if (is_space_char (*op_string))
- ++op_string;
-
- if (*op_string != ':')
- {
- as_bad (_("bad segment name `%s'"), op_string);
- return 0;
- }
-
- return 1;
-
-}
-
-static int i386_index_check PARAMS((const char *));
+static int i386_index_check PARAMS ((const char *));
/* Make sure the memory operand we've been dealt is valid.
- Returns 1 on success, 0 on a failure.
-*/
+ Return 1 on success, 0 on a failure. */
+
static int
i386_index_check (operand_string)
const char *operand_string;
{
+ int ok;
#if INFER_ADDR_PREFIX
int fudged = 0;
tryprefix:
#endif
- if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0)
- /* 16 bit mode checks */
- ? ((i.base_reg
- && ((i.base_reg->reg_type & (Reg16|BaseIndex))
- != (Reg16|BaseIndex)))
- || (i.index_reg
- && (((i.index_reg->reg_type & (Reg16|BaseIndex))
- != (Reg16|BaseIndex))
- || ! (i.base_reg
- && i.base_reg->reg_num < 6
- && i.index_reg->reg_num >= 6
- && i.log2_scale_factor == 0))))
- /* 32 bit mode checks */
- : ((i.base_reg
- && (i.base_reg->reg_type & Reg32) == 0)
- || (i.index_reg
- && ((i.index_reg->reg_type & (Reg32|BaseIndex))
- != (Reg32|BaseIndex)))))
+ ok = 1;
+ if (flag_code == CODE_64BIT)
+ {
+ /* 64bit checks. */
+ if ((i.base_reg
+ && ((i.base_reg->reg_type & Reg64) == 0)
+ && (i.base_reg->reg_type != BaseIndex
+ || i.index_reg))
+ || (i.index_reg
+ && ((i.index_reg->reg_type & (Reg64|BaseIndex))
+ != (Reg64|BaseIndex))))
+ ok = 0;
+ }
+ else
+ {
+ if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
+ {
+ /* 16bit checks. */
+ if ((i.base_reg
+ && ((i.base_reg->reg_type & (Reg16|BaseIndex|RegRex))
+ != (Reg16|BaseIndex)))
+ || (i.index_reg
+ && (((i.index_reg->reg_type & (Reg16|BaseIndex))
+ != (Reg16|BaseIndex))
+ || ! (i.base_reg
+ && i.base_reg->reg_num < 6
+ && i.index_reg->reg_num >= 6
+ && i.log2_scale_factor == 0))))
+ ok = 0;
+ }
+ else
+ {
+ /* 32bit checks. */
+ if ((i.base_reg
+ && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32)
+ || (i.index_reg
+ && ((i.index_reg->reg_type & (Reg32|BaseIndex|RegRex))
+ != (Reg32|BaseIndex))))
+ ok = 0;
+ }
+ }
+ if (!ok)
{
#if INFER_ADDR_PREFIX
- if (i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0')
+ if (flag_code != CODE_64BIT
+ && i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0')
{
i.prefix[ADDR_PREFIX] = ADDR_PREFIX_OPCODE;
i.prefixes += 1;
@@ -3097,8 +3600,7 @@ i386_index_check (operand_string)
Disp16 or Disp32 is set.
FIXME. There doesn't seem to be any real need for separate
Disp16 and Disp32 flags. The same goes for Imm16 and Imm32.
- Removing them would probably clean up the code quite a lot.
- */
+ Removing them would probably clean up the code quite a lot. */
if (i.types[this_operand] & (Disp16|Disp32))
i.types[this_operand] ^= (Disp16|Disp32);
fudged = 1;
@@ -3111,260 +3613,14 @@ i386_index_check (operand_string)
#endif
as_bad (_("`%s' is not a valid %s bit base/index expression"),
operand_string,
- flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0) ? "16" : "32");
+ flag_code_names[flag_code]);
return 0;
}
return 1;
}
-static int i386_intel_memory_operand PARAMS ((char *));
-
-static int
-i386_intel_memory_operand (operand_string)
- char *operand_string;
-{
- char *op_string = operand_string;
- char *end_of_operand_string;
-
- if ((i.mem_operands == 1
- && (current_templates->start->opcode_modifier & IsString) == 0)
- || i.mem_operands == 2)
- {
- as_bad (_("too many memory references for `%s'"),
- current_templates->start->name);
- return 0;
- }
-
- /* First check for a segment override. */
- if (*op_string != '[')
- {
- char *end_seg;
-
- end_seg = strchr (op_string, ':');
- if (end_seg)
- {
- if (!i386_parse_seg (op_string))
- return 0;
- op_string = end_seg + 1;
- }
- }
-
- /* Look for displacement preceding open bracket */
- if (*op_string != '[')
- {
- char *temp_string;
-
- if (i.disp_operands)
- return 0;
-
- temp_string = build_displacement_string (true, op_string);
-
- if (!i386_displacement (temp_string, temp_string + strlen (temp_string)))
- {
- free (temp_string);
- return 0;
- }
- free (temp_string);
-
- end_of_operand_string = strchr (op_string, '[');
- if (!end_of_operand_string)
- end_of_operand_string = op_string + strlen (op_string);
-
- if (is_space_char (*end_of_operand_string))
- --end_of_operand_string;
-
- op_string = end_of_operand_string;
- }
-
- if (*op_string == '[')
- {
- ++op_string;
-
- /* Pick off each component and figure out where it belongs */
-
- end_of_operand_string = op_string;
-
- while (*op_string != ']')
- {
- const reg_entry *temp_reg;
- char *end_op;
- char *temp_string;
-
- while (*end_of_operand_string != '+'
- && *end_of_operand_string != '-'
- && *end_of_operand_string != '*'
- && *end_of_operand_string != ']')
- end_of_operand_string++;
-
- temp_string = op_string;
- if (*temp_string == '+')
- {
- ++temp_string;
- if (is_space_char (*temp_string))
- ++temp_string;
- }
-
- if ((*temp_string == REGISTER_PREFIX || allow_naked_reg)
- && (temp_reg = parse_register (temp_string, &end_op)) != NULL)
- {
- if (i.base_reg == NULL)
- i.base_reg = temp_reg;
- else
- i.index_reg = temp_reg;
-
- i.types[this_operand] |= BaseIndex;
- }
- else if (*temp_string == REGISTER_PREFIX)
- {
- as_bad (_("bad register name `%s'"), temp_string);
- return 0;
- }
- else if (is_digit_char (*op_string)
- || *op_string == '+' || *op_string == '-')
- {
- char *temp_str;
-
- if (i.disp_operands != 0)
- return 0;
-
- temp_string = build_displacement_string (false, op_string);
-
- temp_str = temp_string;
- if (*temp_str == '+')
- ++temp_str;
-
- if (!i386_displacement (temp_str, temp_str + strlen (temp_str)))
- {
- free (temp_string);
- return 0;
- }
- free (temp_string);
-
- ++op_string;
- end_of_operand_string = op_string;
- while (*end_of_operand_string != ']'
- && *end_of_operand_string != '+'
- && *end_of_operand_string != '-'
- && *end_of_operand_string != '*')
- ++end_of_operand_string;
- }
- else if (*op_string == '*')
- {
- ++op_string;
-
- if (i.base_reg && !i.index_reg)
- {
- i.index_reg = i.base_reg;
- i.base_reg = 0;
- }
-
- if (!i386_scale (op_string))
- return 0;
- }
- op_string = end_of_operand_string;
- ++end_of_operand_string;
- }
- }
-
- if (i386_index_check (operand_string) == 0)
- return 0;
-
- i.mem_operands++;
- return 1;
-}
-
-static int
-i386_intel_operand (operand_string, got_a_float)
- char *operand_string;
- int got_a_float;
-{
- const reg_entry * r;
- char *end_op;
- char *op_string = operand_string;
-
- int operand_modifier = i386_operand_modifier (&op_string, got_a_float);
- if (is_space_char (*op_string))
- ++op_string;
-
- switch (operand_modifier)
- {
- case BYTE_PTR:
- case WORD_PTR:
- case DWORD_PTR:
- case QWORD_PTR:
- case XWORD_PTR:
- if (!i386_intel_memory_operand (op_string))
- return 0;
- break;
-
- case FLAT:
- case OFFSET_FLAT:
- if (!i386_immediate (op_string))
- return 0;
- break;
-
- case SHORT:
- case NONE_FOUND:
- /* Should be register or immediate */
- if (is_digit_char (*op_string)
- && strchr (op_string, '[') == 0)
- {
- if (!i386_immediate (op_string))
- return 0;
- }
- else if ((*op_string == REGISTER_PREFIX || allow_naked_reg)
- && (r = parse_register (op_string, &end_op)) != NULL)
- {
- /* Check for a segment override by searching for ':' after a
- segment register. */
- op_string = end_op;
- if (is_space_char (*op_string))
- ++op_string;
- if (*op_string == ':' && (r->reg_type & (SReg2 | SReg3)))
- {
- switch (r->reg_num)
- {
- case 0:
- i.seg[i.mem_operands] = &es;
- break;
- case 1:
- i.seg[i.mem_operands] = &cs;
- break;
- case 2:
- i.seg[i.mem_operands] = &ss;
- break;
- case 3:
- i.seg[i.mem_operands] = &ds;
- break;
- case 4:
- i.seg[i.mem_operands] = &fs;
- break;
- case 5:
- i.seg[i.mem_operands] = &gs;
- break;
- }
-
- }
- i.types[this_operand] |= r->reg_type & ~BaseIndex;
- i.op[this_operand].regs = r;
- i.reg_operands++;
- }
- else if (*op_string == REGISTER_PREFIX)
- {
- as_bad (_("bad register name `%s'"), op_string);
- return 0;
- }
- else if (!i386_intel_memory_operand (op_string))
- return 0;
-
- break;
- } /* end switch */
-
- return 1;
-}
-
/* Parse OPERAND_STRING into the i386_insn structure I. Returns non-zero
- on error. */
+ on error. */
static int
i386_operand (operand_string)
@@ -3378,7 +3634,7 @@ i386_operand (operand_string)
++op_string;
/* We check for an absolute prefix (differentiating,
- for example, 'jmp pc_relative_label' from 'jmp *absolute_label'. */
+ for example, 'jmp pc_relative_label' from 'jmp *absolute_label'. */
if (*op_string == ABSOLUTE_PREFIX)
{
++op_string;
@@ -3387,7 +3643,7 @@ i386_operand (operand_string)
i.types[this_operand] |= JumpAbsolute;
}
- /* Check if operand is a register. */
+ /* Check if operand is a register. */
if ((*op_string == REGISTER_PREFIX || allow_naked_reg)
&& (r = parse_register (op_string, &end_op)) != NULL)
{
@@ -3433,7 +3689,7 @@ i386_operand (operand_string)
as_bad (_("bad memory operand `%s'"), op_string);
return 0;
}
- /* Handle case of %es:*foo. */
+ /* Handle case of %es:*foo. */
if (*op_string == ABSOLUTE_PREFIX)
{
++op_string;
@@ -3458,7 +3714,7 @@ i386_operand (operand_string)
return 0;
}
else if (*op_string == IMMEDIATE_PREFIX)
- { /* ... or an immediate */
+ {
++op_string;
if (i.types[this_operand] & JumpAbsolute)
{
@@ -3470,12 +3726,12 @@ i386_operand (operand_string)
}
else if (is_digit_char (*op_string)
|| is_identifier_char (*op_string)
- || *op_string == '(' )
+ || *op_string == '(')
{
- /* This is a memory reference of some sort. */
+ /* This is a memory reference of some sort. */
char *base_string;
- /* Start and end of displacement string expression (if found). */
+ /* Start and end of displacement string expression (if found). */
char *displacement_string_start;
char *displacement_string_end;
@@ -3499,7 +3755,7 @@ i386_operand (operand_string)
if (is_space_char (*base_string))
--base_string;
- /* If we only have a displacement, set-up for it to be parsed later. */
+ /* If we only have a displacement, set-up for it to be parsed later. */
displacement_string_start = op_string;
displacement_string_end = base_string + 1;
@@ -3508,7 +3764,7 @@ i386_operand (operand_string)
char *temp_string;
unsigned int parens_balanced = 1;
/* We've already checked that the number of left & right ()'s are
- equal, so this loop will not be infinite. */
+ equal, so this loop will not be infinite. */
do
{
base_string--;
@@ -3560,7 +3816,7 @@ i386_operand (operand_string)
if (is_space_char (*base_string))
++base_string;
}
- else if (*base_string != ')' )
+ else if (*base_string != ')')
{
as_bad (_("expecting `,' or `)' after index register in `%s'"),
operand_string);
@@ -3573,13 +3829,15 @@ i386_operand (operand_string)
return 0;
}
- /* Check for scale factor. */
- if (isdigit ((unsigned char) *base_string))
+ /* Check for scale factor. */
+ if (*base_string != ')')
{
- if (!i386_scale (base_string))
+ char *end_scale = i386_scale (base_string);
+
+ if (!end_scale)
return 0;
- ++base_string;
+ base_string = end_scale;
if (is_space_char (*base_string))
++base_string;
if (*base_string != ')')
@@ -3637,14 +3895,15 @@ i386_operand (operand_string)
i.mem_operands++;
}
else
- { /* it's not a memory operand; argh! */
+ {
+ /* It's not a memory operand; argh! */
as_bad (_("invalid char %s beginning operand %d `%s'"),
output_invalid (*op_string),
this_operand + 1,
op_string);
return 0;
}
- return 1; /* normal return */
+ return 1; /* Normal return. */
}
/* md_estimate_size_before_relax()
@@ -3670,7 +3929,7 @@ md_estimate_size_before_relax (fragP, segment)
an externally visible symbol, because it may be overridden by a
shared library. */
if (S_GET_SEGMENT (fragP->fr_symbol) != segment
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (TE_PE)
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
|| S_IS_EXTERNAL (fragP->fr_symbol)
|| S_IS_WEAK (fragP->fr_symbol)
#endif
@@ -3679,11 +3938,7 @@ md_estimate_size_before_relax (fragP, segment)
/* Symbol is undefined in this segment, or we need to keep a
reloc so that weak symbols can be overridden. */
int size = (fragP->fr_subtype & CODE16) ? 2 : 4;
-#ifdef BFD_ASSEMBLER
- enum bfd_reloc_code_real reloc_type;
-#else
- int reloc_type;
-#endif
+ RELOC_ENUM reloc_type;
unsigned char *opcode;
int old_fr_fix;
@@ -3697,10 +3952,11 @@ md_estimate_size_before_relax (fragP, segment)
old_fr_fix = fragP->fr_fix;
opcode = (unsigned char *) fragP->fr_opcode;
- switch (opcode[0])
+ switch (TYPE_FROM_RELAX_STATE (fragP->fr_subtype))
{
- case JUMP_PC_RELATIVE: /* make jmp (0xeb) a dword displacement jump */
- opcode[0] = 0xe9; /* dword disp jmp */
+ case UNCOND_JUMP:
+ /* Make jmp (0xeb) a (d)word displacement jump. */
+ opcode[0] = 0xe9;
fragP->fr_fix += size;
fix_new (fragP, old_fr_fix, size,
fragP->fr_symbol,
@@ -3708,35 +3964,72 @@ md_estimate_size_before_relax (fragP, segment)
reloc_type);
break;
- default:
+ case COND_JUMP86:
+ if (no_cond_jump_promotion)
+ goto relax_guess;
+
+ if (size == 2)
+ {
+ /* Negate the condition, and branch past an
+ unconditional jump. */
+ opcode[0] ^= 1;
+ opcode[1] = 3;
+ /* Insert an unconditional jump. */
+ opcode[2] = 0xe9;
+ /* We added two extra opcode bytes, and have a two byte
+ offset. */
+ fragP->fr_fix += 2 + 2;
+ fix_new (fragP, old_fr_fix + 2, 2,
+ fragP->fr_symbol,
+ fragP->fr_offset, 1,
+ reloc_type);
+ break;
+ }
+ /* Fall through. */
+
+ case COND_JUMP:
+ if (no_cond_jump_promotion)
+ goto relax_guess;
+
/* This changes the byte-displacement jump 0x7N
- to the dword-displacement jump 0x0f,0x8N. */
+ to the (d)word-displacement jump 0x0f,0x8N. */
opcode[1] = opcode[0] + 0x10;
opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
- fragP->fr_fix += 1 + size; /* we've added an opcode byte */
+ /* We've added an opcode byte. */
+ fragP->fr_fix += 1 + size;
fix_new (fragP, old_fr_fix + 1, size,
fragP->fr_symbol,
fragP->fr_offset, 1,
reloc_type);
break;
+
+ default:
+ BAD_CASE (fragP->fr_subtype);
+ break;
}
frag_wane (fragP);
return fragP->fr_fix - old_fr_fix;
}
- return 1; /* Guess a short jump. */
+
+ relax_guess:
+ /* Guess size depending on current relax state. Initially the relax
+ state will correspond to a short jump and we return 1, because
+ the variable part of the frag (the branch offset) is one byte
+ long. However, we can relax a section more than once and in that
+ case we must either set fr_subtype back to the unrelaxed state,
+ or return the value for the appropriate branch. */
+ return md_relax_table[fragP->fr_subtype].rlx_length;
}
-/*
- * md_convert_frag();
- *
- * Called after relax() is finished.
- * In: Address of frag.
- * fr_type == rs_machine_dependent.
- * fr_subtype is what the address relaxed to.
- *
- * Out: Any fixSs and constants are set up.
- * Caller will turn frag into a ".space 0".
- */
+/* Called after relax() is finished.
+
+ In: Address of frag.
+ fr_type == rs_machine_dependent.
+ fr_subtype is what the address relaxed to.
+
+ Out: Any fixSs and constants are set up.
+ Caller will turn frag into a ".space 0". */
+
#ifndef BFD_ASSEMBLER
void
md_convert_frag (headers, sec, fragP)
@@ -3753,77 +4046,101 @@ md_convert_frag (abfd, sec, fragP)
{
register unsigned char *opcode;
unsigned char *where_to_put_displacement = NULL;
- unsigned int target_address;
- unsigned int opcode_address;
+ offsetT target_address;
+ offsetT opcode_address;
unsigned int extension = 0;
- int displacement_from_opcode_start;
+ offsetT displacement_from_opcode_start;
opcode = (unsigned char *) fragP->fr_opcode;
- /* Address we want to reach in file space. */
+ /* Address we want to reach in file space. */
target_address = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset;
-#ifdef BFD_ASSEMBLER /* not needed otherwise? */
- target_address += symbol_get_frag (fragP->fr_symbol)->fr_address;
+#ifdef BFD_ASSEMBLER
+ /* Not needed otherwise? */
+ {
+ /* Local symbols which have already been resolved have a NULL frag. */
+ fragS *sym_frag = symbol_get_frag (fragP->fr_symbol);
+ if (sym_frag)
+ target_address += sym_frag->fr_address;
+ }
#endif
- /* Address opcode resides at in file space. */
+ /* Address opcode resides at in file space. */
opcode_address = fragP->fr_address + fragP->fr_fix;
- /* Displacement from opcode start to fill into instruction. */
+ /* Displacement from opcode start to fill into instruction. */
displacement_from_opcode_start = target_address - opcode_address;
- switch (fragP->fr_subtype)
+ if ((fragP->fr_subtype & BIG) == 0)
{
- case ENCODE_RELAX_STATE (COND_JUMP, SMALL):
- case ENCODE_RELAX_STATE (COND_JUMP, SMALL16):
- case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL):
- case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL16):
- /* don't have to change opcode */
- extension = 1; /* 1 opcode + 1 displacement */
+ /* Don't have to change opcode. */
+ extension = 1; /* 1 opcode + 1 displacement */
where_to_put_displacement = &opcode[1];
- break;
+ }
+ else
+ {
+ if (no_cond_jump_promotion
+ && TYPE_FROM_RELAX_STATE (fragP->fr_subtype) != UNCOND_JUMP)
+ as_warn_where (fragP->fr_file, fragP->fr_line, _("long jump required"));
- case ENCODE_RELAX_STATE (COND_JUMP, BIG):
- extension = 5; /* 2 opcode + 4 displacement */
- opcode[1] = opcode[0] + 0x10;
- opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
- where_to_put_displacement = &opcode[2];
- break;
+ switch (fragP->fr_subtype)
+ {
+ case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG):
+ extension = 4; /* 1 opcode + 4 displacement */
+ opcode[0] = 0xe9;
+ where_to_put_displacement = &opcode[1];
+ break;
- case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG):
- extension = 4; /* 1 opcode + 4 displacement */
- opcode[0] = 0xe9;
- where_to_put_displacement = &opcode[1];
- break;
+ case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16):
+ extension = 2; /* 1 opcode + 2 displacement */
+ opcode[0] = 0xe9;
+ where_to_put_displacement = &opcode[1];
+ break;
- case ENCODE_RELAX_STATE (COND_JUMP, BIG16):
- extension = 3; /* 2 opcode + 2 displacement */
- opcode[1] = opcode[0] + 0x10;
- opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
- where_to_put_displacement = &opcode[2];
- break;
+ case ENCODE_RELAX_STATE (COND_JUMP, BIG):
+ case ENCODE_RELAX_STATE (COND_JUMP86, BIG):
+ extension = 5; /* 2 opcode + 4 displacement */
+ opcode[1] = opcode[0] + 0x10;
+ opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
+ where_to_put_displacement = &opcode[2];
+ break;
- case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16):
- extension = 2; /* 1 opcode + 2 displacement */
- opcode[0] = 0xe9;
- where_to_put_displacement = &opcode[1];
- break;
+ case ENCODE_RELAX_STATE (COND_JUMP, BIG16):
+ extension = 3; /* 2 opcode + 2 displacement */
+ opcode[1] = opcode[0] + 0x10;
+ opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
+ where_to_put_displacement = &opcode[2];
+ break;
- default:
- BAD_CASE (fragP->fr_subtype);
- break;
+ case ENCODE_RELAX_STATE (COND_JUMP86, BIG16):
+ extension = 4;
+ opcode[0] ^= 1;
+ opcode[1] = 3;
+ opcode[2] = 0xe9;
+ where_to_put_displacement = &opcode[3];
+ break;
+
+ default:
+ BAD_CASE (fragP->fr_subtype);
+ break;
+ }
}
- /* now put displacement after opcode */
+
+ /* Now put displacement after opcode. */
md_number_to_chars ((char *) where_to_put_displacement,
(valueT) (displacement_from_opcode_start - extension),
- SIZE_FROM_RELAX_STATE (fragP->fr_subtype));
+ DISP_SIZE_FROM_RELAX_STATE (fragP->fr_subtype));
fragP->fr_fix += extension;
}
+/* Size of byte displacement jmp. */
+int md_short_jump_size = 2;
+
+/* Size of dword displacement jmp. */
+int md_long_jump_size = 5;
-int md_short_jump_size = 2; /* size of byte displacement jmp */
-int md_long_jump_size = 5; /* size of dword displacement jmp */
-const int md_reloc_size = 8; /* Size of relocation record */
+/* Size of relocation record. */
+const int md_reloc_size = 8;
void
md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
@@ -3832,10 +4149,11 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
fragS *frag ATTRIBUTE_UNUSED;
symbolS *to_symbol ATTRIBUTE_UNUSED;
{
- long offset;
+ offsetT offset;
offset = to_addr - (from_addr + 2);
- md_number_to_chars (ptr, (valueT) 0xeb, 1); /* opcode for byte-disp jump */
+ /* Opcode for byte-disp jump. */
+ md_number_to_chars (ptr, (valueT) 0xeb, 1);
md_number_to_chars (ptr + 1, (valueT) offset, 1);
}
@@ -3843,25 +4161,14 @@ void
md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
char *ptr;
addressT from_addr, to_addr;
- fragS *frag;
- symbolS *to_symbol;
+ fragS *frag ATTRIBUTE_UNUSED;
+ symbolS *to_symbol ATTRIBUTE_UNUSED;
{
- long offset;
+ offsetT offset;
- if (flag_do_long_jump)
- {
- offset = to_addr - S_GET_VALUE (to_symbol);
- md_number_to_chars (ptr, (valueT) 0xe9, 1);/* opcode for long jmp */
- md_number_to_chars (ptr + 1, (valueT) offset, 4);
- fix_new (frag, (ptr + 1) - frag->fr_literal, 4,
- to_symbol, (offsetT) 0, 0, BFD_RELOC_32);
- }
- else
- {
- offset = to_addr - (from_addr + 5);
- md_number_to_chars (ptr, (valueT) 0xe9, 1);
- md_number_to_chars (ptr + 1, (valueT) offset, 4);
- }
+ offset = to_addr - (from_addr + 5);
+ md_number_to_chars (ptr, (valueT) 0xe9, 1);
+ md_number_to_chars (ptr + 1, (valueT) offset, 4);
}
/* Apply a fixup (fixS) to segment data, once it has been determined
@@ -3873,9 +4180,14 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
int
md_apply_fix3 (fixP, valp, seg)
- fixS *fixP; /* The fix we're to put in. */
- valueT *valp; /* Pointer to the value of the bits. */
- segT seg ATTRIBUTE_UNUSED; /* Segment fix is from. */
+ /* The fix we're to put in. */
+ fixS *fixP;
+
+ /* Pointer to the value of the bits. */
+ valueT *valp;
+
+ /* Segment fix is from. */
+ segT seg ATTRIBUTE_UNUSED;
{
register char *p = fixP->fx_where + fixP->fx_frag->fr_literal;
valueT value = *valp;
@@ -3907,7 +4219,7 @@ md_apply_fix3 (fixP, valp, seg)
if ((fixP->fx_r_type == BFD_RELOC_32_PCREL
|| fixP->fx_r_type == BFD_RELOC_16_PCREL
|| fixP->fx_r_type == BFD_RELOC_8_PCREL)
- && fixP->fx_addsy)
+ && fixP->fx_addsy && !use_rela_relocations)
{
#ifndef OBJ_AOUT
if (OUTPUT_FLAVOR == bfd_target_elf_flavour
@@ -3943,49 +4255,25 @@ md_apply_fix3 (fixP, valp, seg)
address offset for a PC relative symbol. */
if (S_GET_SEGMENT (fixP->fx_addsy) != seg)
value += md_pcrel_from (fixP);
- else if (S_IS_EXTERNAL (fixP->fx_addsy)
- || S_IS_WEAK (fixP->fx_addsy))
- {
- /* We are generating an external relocation for this defined
- symbol. We add the address, because
- bfd_install_relocation will subtract it. VALUE already
- holds the symbol value, because fixup_segment added it
- in. We subtract it out, and then we subtract it out
- again because bfd_install_relocation will add it in
- again. */
- value += md_pcrel_from (fixP);
- value -= 2 * S_GET_VALUE (fixP->fx_addsy);
- }
#endif
}
-#ifdef TE_PE
- else if (fixP->fx_addsy != NULL
- && S_IS_DEFINED (fixP->fx_addsy)
- && (S_IS_EXTERNAL (fixP->fx_addsy)
- || S_IS_WEAK (fixP->fx_addsy)))
- {
- /* We are generating an external relocation for this defined
- symbol. VALUE already holds the symbol value, and
- bfd_install_relocation will add it in again. We don't want
- either addition. */
- value -= 2 * S_GET_VALUE (fixP->fx_addsy);
- }
-#endif
/* Fix a few things - the dynamic linker expects certain values here,
- and we must not dissappoint it. */
+ and we must not dissappoint it. */
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
if (OUTPUT_FLAVOR == bfd_target_elf_flavour
&& fixP->fx_addsy)
- switch (fixP->fx_r_type) {
- case BFD_RELOC_386_PLT32:
- /* Make the jump instruction point to the address of the operand. At
- runtime we merely add the offset to the actual PLT entry. */
- value = 0xfffffffc;
- break;
- case BFD_RELOC_386_GOTPC:
-/*
- * This is tough to explain. We end up with this one if we have
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_386_PLT32:
+ case BFD_RELOC_X86_64_PLT32:
+ /* Make the jump instruction point to the address of the operand. At
+ runtime we merely add the offset to the actual PLT entry. */
+ value = -4;
+ break;
+ case BFD_RELOC_386_GOTPC:
+
+/* This is tough to explain. We end up with this one if we have
* operands that look like "_GLOBAL_OFFSET_TABLE_+[.-.L284]". The goal
* here is to obtain the absolute address of the GOT, and it is strongly
* preferable from a performance point of view to avoid using a runtime
@@ -4020,55 +4308,55 @@ md_apply_fix3 (fixP, valp, seg)
* explicitly mentioned, and I wonder whether it would simplify matters
* to do it this way. Who knows. In earlier versions of the PIC patches,
* the pcrel_adjust field was used to store the correction, but since the
- * expression is not pcrel, I felt it would be confusing to do it this way.
- */
- value -= 1;
- break;
- case BFD_RELOC_386_GOT32:
- value = 0; /* Fully resolved at runtime. No addend. */
- break;
- case BFD_RELOC_386_GOTOFF:
- break;
-
- case BFD_RELOC_VTABLE_INHERIT:
- case BFD_RELOC_VTABLE_ENTRY:
- fixP->fx_done = 0;
- return 1;
+ * expression is not pcrel, I felt it would be confusing to do it this
+ * way. */
+
+ value -= 1;
+ break;
+ case BFD_RELOC_386_GOT32:
+ case BFD_RELOC_X86_64_GOT32:
+ value = 0; /* Fully resolved at runtime. No addend. */
+ break;
+ case BFD_RELOC_386_GOTOFF:
+ case BFD_RELOC_X86_64_GOTPCREL:
+ break;
+
+ case BFD_RELOC_VTABLE_INHERIT:
+ case BFD_RELOC_VTABLE_ENTRY:
+ fixP->fx_done = 0;
+ return 1;
+
+ default:
+ break;
+ }
+#endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */
+ *valp = value;
+#endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */
- default:
- break;
+#ifndef BFD_ASSEMBLER
+ md_number_to_chars (p, value, fixP->fx_size);
+#else
+ /* Are we finished with this relocation now? */
+ if (fixP->fx_addsy == 0 && fixP->fx_pcrel == 0)
+ fixP->fx_done = 1;
+ else if (use_rela_relocations)
+ {
+ fixP->fx_no_overflow = 1;
+ value = 0;
}
-#endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */
- *valp = value;
-#endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */
md_number_to_chars (p, value, fixP->fx_size);
+#endif
return 1;
}
-
-#if 0
-/* This is never used. */
-long /* Knows about the byte order in a word. */
-md_chars_to_number (con, nbytes)
- unsigned char con[]; /* Low order byte 1st. */
- int nbytes; /* Number of bytes in the input. */
-{
- long retval;
- for (retval = 0, con += nbytes - 1; nbytes--; con--)
- {
- retval <<= BITS_PER_CHAR;
- retval |= *con;
- }
- return retval;
-}
-#endif /* 0 */
-
#define MAX_LITTLENUMS 6
-/* Turn the string pointed to by litP into a floating point constant of type
- type, and emit the appropriate bytes. The number of LITTLENUMS emitted
- is stored in *sizeP . An error message is returned, or NULL on OK. */
+/* Turn the string pointed to by litP into a floating point constant
+ of type TYPE, and emit the appropriate bytes. The number of
+ LITTLENUMS emitted is stored in *SIZEP. An error message is
+ returned, or NULL on OK. */
+
char *
md_atof (type, litP, sizeP)
int type;
@@ -4118,8 +4406,6 @@ md_atof (type, litP, sizeP)
char output_invalid_buf[8];
-static char * output_invalid PARAMS ((int));
-
static char *
output_invalid (c)
int c;
@@ -4131,7 +4417,6 @@ output_invalid (c)
return output_invalid_buf;
}
-
/* REG_STRING starts *before* REGISTER_PREFIX. */
static const reg_entry *
@@ -4159,12 +4444,18 @@ parse_register (reg_string, end_op)
s++;
}
+ /* For naked regs, make sure that we are not dealing with an identifier.
+ This prevents confusing an identifier like `eax_var' with register
+ `eax'. */
+ if (allow_naked_reg && identifier_chars[(unsigned char) *s])
+ return (const reg_entry *) NULL;
+
*end_op = s;
r = (const reg_entry *) hash_find (reg_hash, reg_name_given);
/* Handle floating point regs, allowing spaces in the (i) part. */
- if (r == i386_regtab /* %st is first entry of table */)
+ if (r == i386_regtab /* %st is first entry of table */)
{
if (is_space_char (*s))
++s;
@@ -4185,7 +4476,7 @@ parse_register (reg_string, end_op)
return r;
}
}
- /* We have "%st(" then garbage */
+ /* We have "%st(" then garbage. */
return (const reg_entry *) NULL;
}
}
@@ -4194,11 +4485,18 @@ parse_register (reg_string, end_op)
}
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
-CONST char *md_shortopts = "kmVQ:sq";
+const char *md_shortopts = "kVQ:sq";
#else
-CONST char *md_shortopts = "m";
+const char *md_shortopts = "q";
#endif
+
struct option md_longopts[] = {
+#define OPTION_32 (OPTION_MD_BASE + 0)
+ {"32", no_argument, NULL, OPTION_32},
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#define OPTION_64 (OPTION_MD_BASE + 1)
+ {"64", no_argument, NULL, OPTION_64},
+#endif
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
@@ -4210,13 +4508,14 @@ md_parse_option (c, arg)
{
switch (c)
{
- case 'm':
- flag_do_long_jump = 1;
+ case 'q':
+ quiet_warnings = 1;
break;
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- /* -k: Ignore for FreeBSD compatibility. */
- case 'k':
+ /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section
+ should be emitted or not. FIXME: Not implemented. */
+ case 'Q':
break;
/* -V: SVR4 argument to print version ID. */
@@ -4224,9 +4523,8 @@ md_parse_option (c, arg)
print_version_id ();
break;
- /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section
- should be emitted or not. FIXME: Not implemented. */
- case 'Q':
+ /* -k: Ignore for FreeBSD compatibility. */
+ case 'k':
break;
case 's':
@@ -4234,12 +4532,28 @@ md_parse_option (c, arg)
.stab instead of .stab.excl. We always use .stab anyhow. */
break;
- case 'q':
- /* -q: On i386 Solaris, this tells the native assembler does
- fewer checks. */
+ case OPTION_64:
+ {
+ const char **list, **l;
+
+ list = bfd_target_list ();
+ for (l = list; *l != NULL; l++)
+ if (strcmp (*l, "elf64-x86-64") == 0)
+ {
+ default_arch = "x86_64";
+ break;
+ }
+ if (*l == NULL)
+ as_fatal (_("No compiled in support for x86_64"));
+ free (list);
+ }
break;
#endif
+ case OPTION_32:
+ default_arch = "i386";
+ break;
+
default:
return 0;
}
@@ -4250,41 +4564,51 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf (stream, _("\
- -m do long jump\n"));
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
fprintf (stream, _("\
- -V print assembler version number\n\
- -k ignored\n\
- -Qy, -Qn ignored\n\
- -q ignored\n\
- -s ignored\n"));
+ -Q ignored\n\
+ -V print assembler version number\n\
+ -k ignored\n\
+ -q quieten some warnings\n\
+ -s ignored\n"));
+#else
+ fprintf (stream, _("\
+ -q quieten some warnings\n"));
#endif
}
#ifdef BFD_ASSEMBLER
-#if ((defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_COFF)) \
- || (defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_AOUT)) \
- || (defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)))
+#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
+ || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
/* Pick the target format to use. */
-const char *
+const char *
i386_target_format ()
{
+ if (!strcmp (default_arch, "x86_64"))
+ set_code_flag (CODE_64BIT);
+ else if (!strcmp (default_arch, "i386"))
+ set_code_flag (CODE_32BIT);
+ else
+ as_fatal (_("Unknown architecture"));
switch (OUTPUT_FLAVOR)
{
#ifdef OBJ_MAYBE_AOUT
case bfd_target_aout_flavour:
- return AOUT_TARGET_FORMAT;
+ return AOUT_TARGET_FORMAT;
#endif
#ifdef OBJ_MAYBE_COFF
case bfd_target_coff_flavour:
return "coff-i386";
#endif
-#ifdef OBJ_MAYBE_ELF
+#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
case bfd_target_elf_flavour:
- return "elf32-i386";
+ {
+ if (flag_code == CODE_64BIT)
+ use_rela_relocations = 1;
+ return flag_code == CODE_64BIT ? "elf64-x86-64" : "elf32-i386";
+ }
#endif
default:
abort ();
@@ -4292,8 +4616,8 @@ i386_target_format ()
}
}
-#endif /* OBJ_MAYBE_ more than one */
-#endif /* BFD_ASSEMBLER */
+#endif /* OBJ_MAYBE_ more than one */
+#endif /* BFD_ASSEMBLER */
symbolS *
md_undefined_symbol (name)
@@ -4317,6 +4641,7 @@ md_undefined_symbol (name)
}
/* Round up a section size to the appropriate boundary. */
+
valueT
md_section_align (segment, size)
segT segment ATTRIBUTE_UNUSED;
@@ -4368,7 +4693,6 @@ s_bss (ignore)
#endif
-
#ifdef BFD_ASSEMBLER
void
@@ -4377,7 +4701,19 @@ i386_validate_fix (fixp)
{
if (fixp->fx_subsy && fixp->fx_subsy == GOT_symbol)
{
- fixp->fx_r_type = BFD_RELOC_386_GOTOFF;
+ /* GOTOFF relocation are nonsense in 64bit mode. */
+ if (fixp->fx_r_type == BFD_RELOC_32_PCREL)
+ {
+ if (flag_code != CODE_64BIT)
+ abort ();
+ fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL;
+ }
+ else
+ {
+ if (flag_code == CODE_64BIT)
+ abort ();
+ fixp->fx_r_type = BFD_RELOC_386_GOTOFF;
+ }
fixp->fx_subsy = 0;
}
}
@@ -4392,10 +4728,14 @@ tc_gen_reloc (section, fixp)
switch (fixp->fx_r_type)
{
+ case BFD_RELOC_X86_64_PLT32:
+ case BFD_RELOC_X86_64_GOT32:
+ case BFD_RELOC_X86_64_GOTPCREL:
case BFD_RELOC_386_PLT32:
case BFD_RELOC_386_GOT32:
case BFD_RELOC_386_GOTOFF:
case BFD_RELOC_386_GOTPC:
+ case BFD_RELOC_X86_64_32S:
case BFD_RELOC_RVA:
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
@@ -4427,6 +4767,7 @@ tc_gen_reloc (section, fixp)
case 1: code = BFD_RELOC_8; break;
case 2: code = BFD_RELOC_16; break;
case 4: code = BFD_RELOC_32; break;
+ case 8: code = BFD_RELOC_64; break;
}
}
break;
@@ -4435,22 +4776,37 @@ tc_gen_reloc (section, fixp)
if (code == BFD_RELOC_32
&& GOT_symbol
&& fixp->fx_addsy == GOT_symbol)
- code = BFD_RELOC_386_GOTPC;
+ {
+ /* We don't support GOTPC on 64bit targets. */
+ if (flag_code == CODE_64BIT)
+ abort ();
+ code = BFD_RELOC_386_GOTPC;
+ }
rel = (arelent *) xmalloc (sizeof (arelent));
rel->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
*rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
- /* HACK: Since i386 ELF uses Rel instead of Rela, encode the
- vtable entry to be used in the relocation's section offset. */
- if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
- rel->address = fixp->fx_offset;
+ if (!use_rela_relocations)
+ {
+ /* HACK: Since i386 ELF uses Rel instead of Rela, encode the
+ vtable entry to be used in the relocation's section offset. */
+ if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ rel->address = fixp->fx_offset;
- if (fixp->fx_pcrel)
- rel->addend = fixp->fx_addnumber;
+ if (fixp->fx_pcrel)
+ rel->addend = fixp->fx_addnumber;
+ else
+ rel->addend = 0;
+ }
+ /* Use the rela in 64bit mode. */
else
- rel->addend = 0;
+ {
+ rel->addend = fixp->fx_offset;
+ if (fixp->fx_pcrel)
+ rel->addend -= fixp->fx_size;
+ }
rel->howto = bfd_reloc_type_lookup (stdoutput, code);
if (rel->howto == NULL)
@@ -4466,7 +4822,7 @@ tc_gen_reloc (section, fixp)
return rel;
}
-#else /* ! BFD_ASSEMBLER */
+#else /* ! BFD_ASSEMBLER */
#if (defined(OBJ_AOUT) | defined(OBJ_BOUT))
void
@@ -4475,12 +4831,10 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
fixS *fixP;
relax_addressT segment_address_in_file;
{
- /*
- * In: length of relocation (or of address) in chars: 1, 2 or 4.
- * Out: GNU LD relocation length code: 0, 1, or 2.
- */
+ /* In: length of relocation (or of address) in chars: 1, 2 or 4.
+ Out: GNU LD relocation length code: 0, 1, or 2. */
- static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2};
+ static const unsigned char nbytes_r_length[] = { 42, 0, 1, 42, 2 };
long r_symbolnum;
know (fixP->fx_addsy != NULL);
@@ -4502,7 +4856,7 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
| (((fixP->fx_pcrel << 0) & 0x01) & 0x0f));
}
-#endif /* OBJ_AOUT or OBJ_BOUT */
+#endif /* OBJ_AOUT or OBJ_BOUT. */
#if defined (I386COFF)
@@ -4532,8 +4886,956 @@ tc_coff_sizemachdep (frag)
return 0;
}
-#endif /* I386COFF */
+#endif /* I386COFF */
-#endif /* ! BFD_ASSEMBLER */
+#endif /* ! BFD_ASSEMBLER */
-/* end of tc-i386.c */
+/* Parse operands using Intel syntax. This implements a recursive descent
+ parser based on the BNF grammar published in Appendix B of the MASM 6.1
+ Programmer's Guide.
+
+ FIXME: We do not recognize the full operand grammar defined in the MASM
+ documentation. In particular, all the structure/union and
+ high-level macro operands are missing.
+
+ Uppercase words are terminals, lower case words are non-terminals.
+ Objects surrounded by double brackets '[[' ']]' are optional. Vertical
+ bars '|' denote choices. Most grammar productions are implemented in
+ functions called 'intel_<production>'.
+
+ Initial production is 'expr'.
+
+ addOp + | -
+
+ alpha [a-zA-Z]
+
+ byteRegister AL | AH | BL | BH | CL | CH | DL | DH
+
+ constant digits [[ radixOverride ]]
+
+ dataType BYTE | WORD | DWORD | QWORD | XWORD
+
+ digits decdigit
+ | digits decdigit
+ | digits hexdigit
+
+ decdigit [0-9]
+
+ e05 e05 addOp e06
+ | e06
+
+ e06 e06 mulOp e09
+ | e09
+
+ e09 OFFSET e10
+ | e09 PTR e10
+ | e09 : e10
+ | e10
+
+ e10 e10 [ expr ]
+ | e11
+
+ e11 ( expr )
+ | [ expr ]
+ | constant
+ | dataType
+ | id
+ | $
+ | register
+
+ => expr SHORT e05
+ | e05
+
+ gpRegister AX | EAX | BX | EBX | CX | ECX | DX | EDX
+ | BP | EBP | SP | ESP | DI | EDI | SI | ESI
+
+ hexdigit a | b | c | d | e | f
+ | A | B | C | D | E | F
+
+ id alpha
+ | id alpha
+ | id decdigit
+
+ mulOp * | / | MOD
+
+ quote " | '
+
+ register specialRegister
+ | gpRegister
+ | byteRegister
+
+ segmentRegister CS | DS | ES | FS | GS | SS
+
+ specialRegister CR0 | CR2 | CR3
+ | DR0 | DR1 | DR2 | DR3 | DR6 | DR7
+ | TR3 | TR4 | TR5 | TR6 | TR7
+
+ We simplify the grammar in obvious places (e.g., register parsing is
+ done by calling parse_register) and eliminate immediate left recursion
+ to implement a recursive-descent parser.
+
+ expr SHORT e05
+ | e05
+
+ e05 e06 e05'
+
+ e05' addOp e06 e05'
+ | Empty
+
+ e06 e09 e06'
+
+ e06' mulOp e09 e06'
+ | Empty
+
+ e09 OFFSET e10 e09'
+ | e10 e09'
+
+ e09' PTR e10 e09'
+ | : e10 e09'
+ | Empty
+
+ e10 e11 e10'
+
+ e10' [ expr ] e10'
+ | Empty
+
+ e11 ( expr )
+ | [ expr ]
+ | BYTE
+ | WORD
+ | DWORD
+ | QWORD
+ | XWORD
+ | .
+ | $
+ | register
+ | id
+ | constant */
+
+/* Parsing structure for the intel syntax parser. Used to implement the
+ semantic actions for the operand grammar. */
+struct intel_parser_s
+ {
+ char *op_string; /* The string being parsed. */
+ int got_a_float; /* Whether the operand is a float. */
+ int op_modifier; /* Operand modifier. */
+ int is_mem; /* 1 if operand is memory reference. */
+ const reg_entry *reg; /* Last register reference found. */
+ char *disp; /* Displacement string being built. */
+ };
+
+static struct intel_parser_s intel_parser;
+
+/* Token structure for parsing intel syntax. */
+struct intel_token
+ {
+ int code; /* Token code. */
+ const reg_entry *reg; /* Register entry for register tokens. */
+ char *str; /* String representation. */
+ };
+
+static struct intel_token cur_token, prev_token;
+
+/* Token codes for the intel parser. Since T_SHORT is already used
+ by COFF, undefine it first to prevent a warning. */
+#define T_NIL -1
+#define T_CONST 1
+#define T_REG 2
+#define T_BYTE 3
+#define T_WORD 4
+#define T_DWORD 5
+#define T_QWORD 6
+#define T_XWORD 7
+#undef T_SHORT
+#define T_SHORT 8
+#define T_OFFSET 9
+#define T_PTR 10
+#define T_ID 11
+
+/* Prototypes for intel parser functions. */
+static int intel_match_token PARAMS ((int code));
+static void intel_get_token PARAMS ((void));
+static void intel_putback_token PARAMS ((void));
+static int intel_expr PARAMS ((void));
+static int intel_e05 PARAMS ((void));
+static int intel_e05_1 PARAMS ((void));
+static int intel_e06 PARAMS ((void));
+static int intel_e06_1 PARAMS ((void));
+static int intel_e09 PARAMS ((void));
+static int intel_e09_1 PARAMS ((void));
+static int intel_e10 PARAMS ((void));
+static int intel_e10_1 PARAMS ((void));
+static int intel_e11 PARAMS ((void));
+
+static int
+i386_intel_operand (operand_string, got_a_float)
+ char *operand_string;
+ int got_a_float;
+{
+ int ret;
+ char *p;
+
+ /* Initialize token holders. */
+ cur_token.code = prev_token.code = T_NIL;
+ cur_token.reg = prev_token.reg = NULL;
+ cur_token.str = prev_token.str = NULL;
+
+ /* Initialize parser structure. */
+ p = intel_parser.op_string = (char *) malloc (strlen (operand_string) + 1);
+ if (p == NULL)
+ abort ();
+ strcpy (intel_parser.op_string, operand_string);
+ intel_parser.got_a_float = got_a_float;
+ intel_parser.op_modifier = -1;
+ intel_parser.is_mem = 0;
+ intel_parser.reg = NULL;
+ intel_parser.disp = (char *) malloc (strlen (operand_string) + 1);
+ if (intel_parser.disp == NULL)
+ abort ();
+ intel_parser.disp[0] = '\0';
+
+ /* Read the first token and start the parser. */
+ intel_get_token ();
+ ret = intel_expr ();
+
+ if (ret)
+ {
+ /* If we found a memory reference, hand it over to i386_displacement
+ to fill in the rest of the operand fields. */
+ if (intel_parser.is_mem)
+ {
+ if ((i.mem_operands == 1
+ && (current_templates->start->opcode_modifier & IsString) == 0)
+ || i.mem_operands == 2)
+ {
+ as_bad (_("too many memory references for '%s'"),
+ current_templates->start->name);
+ ret = 0;
+ }
+ else
+ {
+ char *s = intel_parser.disp;
+ i.mem_operands++;
+
+ /* Add the displacement expression. */
+ if (*s != '\0')
+ ret = i386_displacement (s, s + strlen (s))
+ && i386_index_check (s);
+ }
+ }
+
+ /* Constant and OFFSET expressions are handled by i386_immediate. */
+ else if (intel_parser.op_modifier == OFFSET_FLAT
+ || intel_parser.reg == NULL)
+ ret = i386_immediate (intel_parser.disp);
+ }
+
+ free (p);
+ free (intel_parser.disp);
+
+ return ret;
+}
+
+/* expr SHORT e05
+ | e05 */
+static int
+intel_expr ()
+{
+ /* expr SHORT e05 */
+ if (cur_token.code == T_SHORT)
+ {
+ intel_parser.op_modifier = SHORT;
+ intel_match_token (T_SHORT);
+
+ return (intel_e05 ());
+ }
+
+ /* expr e05 */
+ else
+ return intel_e05 ();
+}
+
+/* e05 e06 e05'
+
+ e05' addOp e06 e05'
+ | Empty */
+static int
+intel_e05 ()
+{
+ return (intel_e06 () && intel_e05_1 ());
+}
+
+static int
+intel_e05_1 ()
+{
+ /* e05' addOp e06 e05' */
+ if (cur_token.code == '+' || cur_token.code == '-')
+ {
+ strcat (intel_parser.disp, cur_token.str);
+ intel_match_token (cur_token.code);
+
+ return (intel_e06 () && intel_e05_1 ());
+ }
+
+ /* e05' Empty */
+ else
+ return 1;
+}
+
+/* e06 e09 e06'
+
+ e06' mulOp e09 e06'
+ | Empty */
+static int
+intel_e06 ()
+{
+ return (intel_e09 () && intel_e06_1 ());
+}
+
+static int
+intel_e06_1 ()
+{
+ /* e06' mulOp e09 e06' */
+ if (cur_token.code == '*' || cur_token.code == '/')
+ {
+ strcat (intel_parser.disp, cur_token.str);
+ intel_match_token (cur_token.code);
+
+ return (intel_e09 () && intel_e06_1 ());
+ }
+
+ /* e06' Empty */
+ else
+ return 1;
+}
+
+/* e09 OFFSET e10 e09'
+ | e10 e09'
+
+ e09' PTR e10 e09'
+ | : e10 e09'
+ | Empty */
+static int
+intel_e09 ()
+{
+ /* e09 OFFSET e10 e09' */
+ if (cur_token.code == T_OFFSET)
+ {
+ intel_parser.is_mem = 0;
+ intel_parser.op_modifier = OFFSET_FLAT;
+ intel_match_token (T_OFFSET);
+
+ return (intel_e10 () && intel_e09_1 ());
+ }
+
+ /* e09 e10 e09' */
+ else
+ return (intel_e10 () && intel_e09_1 ());
+}
+
+static int
+intel_e09_1 ()
+{
+ /* e09' PTR e10 e09' */
+ if (cur_token.code == T_PTR)
+ {
+ if (prev_token.code == T_BYTE)
+ i.suffix = BYTE_MNEM_SUFFIX;
+
+ else if (prev_token.code == T_WORD)
+ {
+ if (intel_parser.got_a_float == 2) /* "fi..." */
+ i.suffix = SHORT_MNEM_SUFFIX;
+ else
+ i.suffix = WORD_MNEM_SUFFIX;
+ }
+
+ else if (prev_token.code == T_DWORD)
+ {
+ if (intel_parser.got_a_float == 1) /* "f..." */
+ i.suffix = SHORT_MNEM_SUFFIX;
+ else
+ i.suffix = LONG_MNEM_SUFFIX;
+ }
+
+ else if (prev_token.code == T_QWORD)
+ {
+ if (intel_parser.got_a_float == 1) /* "f..." */
+ i.suffix = LONG_MNEM_SUFFIX;
+ else
+ i.suffix = QWORD_MNEM_SUFFIX;
+ }
+
+ else if (prev_token.code == T_XWORD)
+ i.suffix = LONG_DOUBLE_MNEM_SUFFIX;
+
+ else
+ {
+ as_bad (_("Unknown operand modifier `%s'\n"), prev_token.str);
+ return 0;
+ }
+
+ intel_match_token (T_PTR);
+
+ return (intel_e10 () && intel_e09_1 ());
+ }
+
+ /* e09 : e10 e09' */
+ else if (cur_token.code == ':')
+ {
+ /* Mark as a memory operand only if it's not already known to be an
+ offset expression. */
+ if (intel_parser.op_modifier != OFFSET_FLAT)
+ intel_parser.is_mem = 1;
+
+ return (intel_match_token (':') && intel_e10 () && intel_e09_1 ());
+ }
+
+ /* e09' Empty */
+ else
+ return 1;
+}
+
+/* e10 e11 e10'
+
+ e10' [ expr ] e10'
+ | Empty */
+static int
+intel_e10 ()
+{
+ return (intel_e11 () && intel_e10_1 ());
+}
+
+static int
+intel_e10_1 ()
+{
+ /* e10' [ expr ] e10' */
+ if (cur_token.code == '[')
+ {
+ intel_match_token ('[');
+
+ /* Mark as a memory operand only if it's not already known to be an
+ offset expression. If it's an offset expression, we need to keep
+ the brace in. */
+ if (intel_parser.op_modifier != OFFSET_FLAT)
+ intel_parser.is_mem = 1;
+ else
+ strcat (intel_parser.disp, "[");
+
+ /* Add a '+' to the displacement string if necessary. */
+ if (*intel_parser.disp != '\0'
+ && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+')
+ strcat (intel_parser.disp, "+");
+
+ if (intel_expr () && intel_match_token (']'))
+ {
+ /* Preserve brackets when the operand is an offset expression. */
+ if (intel_parser.op_modifier == OFFSET_FLAT)
+ strcat (intel_parser.disp, "]");
+
+ return intel_e10_1 ();
+ }
+ else
+ return 0;
+ }
+
+ /* e10' Empty */
+ else
+ return 1;
+}
+
+/* e11 ( expr )
+ | [ expr ]
+ | BYTE
+ | WORD
+ | DWORD
+ | QWORD
+ | XWORD
+ | $
+ | .
+ | register
+ | id
+ | constant */
+static int
+intel_e11 ()
+{
+ /* e11 ( expr ) */
+ if (cur_token.code == '(')
+ {
+ intel_match_token ('(');
+ strcat (intel_parser.disp, "(");
+
+ if (intel_expr () && intel_match_token (')'))
+ {
+ strcat (intel_parser.disp, ")");
+ return 1;
+ }
+ else
+ return 0;
+ }
+
+ /* e11 [ expr ] */
+ else if (cur_token.code == '[')
+ {
+ intel_match_token ('[');
+
+ /* Mark as a memory operand only if it's not already known to be an
+ offset expression. If it's an offset expression, we need to keep
+ the brace in. */
+ if (intel_parser.op_modifier != OFFSET_FLAT)
+ intel_parser.is_mem = 1;
+ else
+ strcat (intel_parser.disp, "[");
+
+ /* Operands for jump/call inside brackets denote absolute addresses. */
+ if (current_templates->start->opcode_modifier & Jump
+ || current_templates->start->opcode_modifier & JumpDword
+ || current_templates->start->opcode_modifier & JumpByte
+ || current_templates->start->opcode_modifier & JumpInterSegment)
+ i.types[this_operand] |= JumpAbsolute;
+
+ /* Add a '+' to the displacement string if necessary. */
+ if (*intel_parser.disp != '\0'
+ && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+')
+ strcat (intel_parser.disp, "+");
+
+ if (intel_expr () && intel_match_token (']'))
+ {
+ /* Preserve brackets when the operand is an offset expression. */
+ if (intel_parser.op_modifier == OFFSET_FLAT)
+ strcat (intel_parser.disp, "]");
+
+ return 1;
+ }
+ else
+ return 0;
+ }
+
+ /* e11 BYTE
+ | WORD
+ | DWORD
+ | QWORD
+ | XWORD */
+ else if (cur_token.code == T_BYTE
+ || cur_token.code == T_WORD
+ || cur_token.code == T_DWORD
+ || cur_token.code == T_QWORD
+ || cur_token.code == T_XWORD)
+ {
+ intel_match_token (cur_token.code);
+
+ return 1;
+ }
+
+ /* e11 $
+ | . */
+ else if (cur_token.code == '$' || cur_token.code == '.')
+ {
+ strcat (intel_parser.disp, cur_token.str);
+ intel_match_token (cur_token.code);
+
+ /* Mark as a memory operand only if it's not already known to be an
+ offset expression. */
+ if (intel_parser.op_modifier != OFFSET_FLAT)
+ intel_parser.is_mem = 1;
+
+ return 1;
+ }
+
+ /* e11 register */
+ else if (cur_token.code == T_REG)
+ {
+ const reg_entry *reg = intel_parser.reg = cur_token.reg;
+
+ intel_match_token (T_REG);
+
+ /* Check for segment change. */
+ if (cur_token.code == ':')
+ {
+ if (reg->reg_type & (SReg2 | SReg3))
+ {
+ switch (reg->reg_num)
+ {
+ case 0:
+ i.seg[i.mem_operands] = &es;
+ break;
+ case 1:
+ i.seg[i.mem_operands] = &cs;
+ break;
+ case 2:
+ i.seg[i.mem_operands] = &ss;
+ break;
+ case 3:
+ i.seg[i.mem_operands] = &ds;
+ break;
+ case 4:
+ i.seg[i.mem_operands] = &fs;
+ break;
+ case 5:
+ i.seg[i.mem_operands] = &gs;
+ break;
+ }
+ }
+ else
+ {
+ as_bad (_("`%s' is not a valid segment register"), reg->reg_name);
+ return 0;
+ }
+ }
+
+ /* Not a segment register. Check for register scaling. */
+ else if (cur_token.code == '*')
+ {
+ if (!intel_parser.is_mem)
+ {
+ as_bad (_("Register scaling only allowed in memory operands."));
+ return 0;
+ }
+
+ /* What follows must be a valid scale. */
+ if (intel_match_token ('*')
+ && strchr ("01248", *cur_token.str))
+ {
+ i.index_reg = reg;
+ i.types[this_operand] |= BaseIndex;
+
+ /* Set the scale after setting the register (otherwise,
+ i386_scale will complain) */
+ i386_scale (cur_token.str);
+ intel_match_token (T_CONST);
+ }
+ else
+ {
+ as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"),
+ cur_token.str);
+ return 0;
+ }
+ }
+
+ /* No scaling. If this is a memory operand, the register is either a
+ base register (first occurrence) or an index register (second
+ occurrence). */
+ else if (intel_parser.is_mem && !(reg->reg_type & (SReg2 | SReg3)))
+ {
+ if (i.base_reg && i.index_reg)
+ {
+ as_bad (_("Too many register references in memory operand.\n"));
+ return 0;
+ }
+
+ if (i.base_reg == NULL)
+ i.base_reg = reg;
+ else
+ i.index_reg = reg;
+
+ i.types[this_operand] |= BaseIndex;
+ }
+
+ /* Offset modifier. Add the register to the displacement string to be
+ parsed as an immediate expression after we're done. */
+ else if (intel_parser.op_modifier == OFFSET_FLAT)
+ strcat (intel_parser.disp, reg->reg_name);
+
+ /* It's neither base nor index nor offset. */
+ else
+ {
+ i.types[this_operand] |= reg->reg_type & ~BaseIndex;
+ i.op[this_operand].regs = reg;
+ i.reg_operands++;
+ }
+
+ /* Since registers are not part of the displacement string (except
+ when we're parsing offset operands), we may need to remove any
+ preceding '+' from the displacement string. */
+ if (*intel_parser.disp != '\0'
+ && intel_parser.op_modifier != OFFSET_FLAT)
+ {
+ char *s = intel_parser.disp;
+ s += strlen (s) - 1;
+ if (*s == '+')
+ *s = '\0';
+ }
+
+ return 1;
+ }
+
+ /* e11 id */
+ else if (cur_token.code == T_ID)
+ {
+ /* Add the identifier to the displacement string. */
+ strcat (intel_parser.disp, cur_token.str);
+ intel_match_token (T_ID);
+
+ /* The identifier represents a memory reference only if it's not
+ preceded by an offset modifier. */
+ if (intel_parser.op_modifier != OFFSET_FLAT)
+ intel_parser.is_mem = 1;
+
+ return 1;
+ }
+
+ /* e11 constant */
+ else if (cur_token.code == T_CONST
+ || cur_token.code == '-'
+ || cur_token.code == '+')
+ {
+ char *save_str;
+
+ /* Allow constants that start with `+' or `-'. */
+ if (cur_token.code == '-' || cur_token.code == '+')
+ {
+ strcat (intel_parser.disp, cur_token.str);
+ intel_match_token (cur_token.code);
+ if (cur_token.code != T_CONST)
+ {
+ as_bad (_("Syntax error. Expecting a constant. Got `%s'.\n"),
+ cur_token.str);
+ return 0;
+ }
+ }
+
+ save_str = (char *) malloc (strlen (cur_token.str) + 1);
+ if (save_str == NULL)
+ abort ();
+ strcpy (save_str, cur_token.str);
+
+ /* Get the next token to check for register scaling. */
+ intel_match_token (cur_token.code);
+
+ /* Check if this constant is a scaling factor for an index register. */
+ if (cur_token.code == '*')
+ {
+ if (intel_match_token ('*') && cur_token.code == T_REG)
+ {
+ if (!intel_parser.is_mem)
+ {
+ as_bad (_("Register scaling only allowed in memory operands."));
+ return 0;
+ }
+
+ /* The constant is followed by `* reg', so it must be
+ a valid scale. */
+ if (strchr ("01248", *save_str))
+ {
+ i.index_reg = cur_token.reg;
+ i.types[this_operand] |= BaseIndex;
+
+ /* Set the scale after setting the register (otherwise,
+ i386_scale will complain) */
+ i386_scale (save_str);
+ intel_match_token (T_REG);
+
+ /* Since registers are not part of the displacement
+ string, we may need to remove any preceding '+' from
+ the displacement string. */
+ if (*intel_parser.disp != '\0')
+ {
+ char *s = intel_parser.disp;
+ s += strlen (s) - 1;
+ if (*s == '+')
+ *s = '\0';
+ }
+
+ free (save_str);
+
+ return 1;
+ }
+ else
+ return 0;
+ }
+
+ /* The constant was not used for register scaling. Since we have
+ already consumed the token following `*' we now need to put it
+ back in the stream. */
+ else
+ intel_putback_token ();
+ }
+
+ /* Add the constant to the displacement string. */
+ strcat (intel_parser.disp, save_str);
+ free (save_str);
+
+ return 1;
+ }
+
+ as_bad (_("Unrecognized token '%s'"), cur_token.str);
+ return 0;
+}
+
+/* Match the given token against cur_token. If they match, read the next
+ token from the operand string. */
+static int
+intel_match_token (code)
+ int code;
+{
+ if (cur_token.code == code)
+ {
+ intel_get_token ();
+ return 1;
+ }
+ else
+ {
+ as_bad (_("Unexpected token `%s'\n"), cur_token.str);
+ return 0;
+ }
+}
+
+/* Read a new token from intel_parser.op_string and store it in cur_token. */
+static void
+intel_get_token ()
+{
+ char *end_op;
+ const reg_entry *reg;
+ struct intel_token new_token;
+
+ new_token.code = T_NIL;
+ new_token.reg = NULL;
+ new_token.str = NULL;
+
+ /* Free the memory allocated to the previous token and move
+ cur_token to prev_token. */
+ if (prev_token.str)
+ free (prev_token.str);
+
+ prev_token = cur_token;
+
+ /* Skip whitespace. */
+ while (is_space_char (*intel_parser.op_string))
+ intel_parser.op_string++;
+
+ /* Return an empty token if we find nothing else on the line. */
+ if (*intel_parser.op_string == '\0')
+ {
+ cur_token = new_token;
+ return;
+ }
+
+ /* The new token cannot be larger than the remainder of the operand
+ string. */
+ new_token.str = (char *) malloc (strlen (intel_parser.op_string) + 1);
+ if (new_token.str == NULL)
+ abort ();
+ new_token.str[0] = '\0';
+
+ if (strchr ("0123456789", *intel_parser.op_string))
+ {
+ char *p = new_token.str;
+ char *q = intel_parser.op_string;
+ new_token.code = T_CONST;
+
+ /* Allow any kind of identifier char to encompass floating point and
+ hexadecimal numbers. */
+ while (is_identifier_char (*q))
+ *p++ = *q++;
+ *p = '\0';
+
+ /* Recognize special symbol names [0-9][bf]. */
+ if (strlen (intel_parser.op_string) == 2
+ && (intel_parser.op_string[1] == 'b'
+ || intel_parser.op_string[1] == 'f'))
+ new_token.code = T_ID;
+ }
+
+ else if (strchr ("+-/*:[]()", *intel_parser.op_string))
+ {
+ new_token.code = *intel_parser.op_string;
+ new_token.str[0] = *intel_parser.op_string;
+ new_token.str[1] = '\0';
+ }
+
+ else if ((*intel_parser.op_string == REGISTER_PREFIX || allow_naked_reg)
+ && ((reg = parse_register (intel_parser.op_string, &end_op)) != NULL))
+ {
+ new_token.code = T_REG;
+ new_token.reg = reg;
+
+ if (*intel_parser.op_string == REGISTER_PREFIX)
+ {
+ new_token.str[0] = REGISTER_PREFIX;
+ new_token.str[1] = '\0';
+ }
+
+ strcat (new_token.str, reg->reg_name);
+ }
+
+ else if (is_identifier_char (*intel_parser.op_string))
+ {
+ char *p = new_token.str;
+ char *q = intel_parser.op_string;
+
+ /* A '.' or '$' followed by an identifier char is an identifier.
+ Otherwise, it's operator '.' followed by an expression. */
+ if ((*q == '.' || *q == '$') && !is_identifier_char (*(q + 1)))
+ {
+ new_token.code = *q;
+ new_token.str[0] = *q;
+ new_token.str[1] = '\0';
+ }
+ else
+ {
+ while (is_identifier_char (*q) || *q == '@')
+ *p++ = *q++;
+ *p = '\0';
+
+ if (strcasecmp (new_token.str, "BYTE") == 0)
+ new_token.code = T_BYTE;
+
+ else if (strcasecmp (new_token.str, "WORD") == 0)
+ new_token.code = T_WORD;
+
+ else if (strcasecmp (new_token.str, "DWORD") == 0)
+ new_token.code = T_DWORD;
+
+ else if (strcasecmp (new_token.str, "QWORD") == 0)
+ new_token.code = T_QWORD;
+
+ else if (strcasecmp (new_token.str, "XWORD") == 0)
+ new_token.code = T_XWORD;
+
+ else if (strcasecmp (new_token.str, "PTR") == 0)
+ new_token.code = T_PTR;
+
+ else if (strcasecmp (new_token.str, "SHORT") == 0)
+ new_token.code = T_SHORT;
+
+ else if (strcasecmp (new_token.str, "OFFSET") == 0)
+ {
+ new_token.code = T_OFFSET;
+
+ /* ??? This is not mentioned in the MASM grammar but gcc
+ makes use of it with -mintel-syntax. OFFSET may be
+ followed by FLAT: */
+ if (strncasecmp (q, " FLAT:", 6) == 0)
+ strcat (new_token.str, " FLAT:");
+ }
+
+ /* ??? This is not mentioned in the MASM grammar. */
+ else if (strcasecmp (new_token.str, "FLAT") == 0)
+ new_token.code = T_OFFSET;
+
+ else
+ new_token.code = T_ID;
+ }
+ }
+
+ else
+ as_bad (_("Unrecognized token `%s'\n"), intel_parser.op_string);
+
+ intel_parser.op_string += strlen (new_token.str);
+ cur_token = new_token;
+}
+
+/* Put cur_token back into the token stream and make cur_token point to
+ prev_token. */
+static void
+intel_putback_token ()
+{
+ intel_parser.op_string -= strlen (cur_token.str);
+ free (cur_token.str);
+ cur_token = prev_token;
+
+ /* Forget prev_token. */
+ prev_token.code = T_NIL;
+ prev_token.reg = NULL;
+ prev_token.str = NULL;
+}
diff --git a/gnu/usr.bin/binutils/gas/config/tc-i386.h b/gnu/usr.bin/binutils/gas/config/tc-i386.h
index 2bf9a7f89cf..71e0c88be31 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-i386.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-i386.h
@@ -1,6 +1,7 @@
/* tc-i386.h -- Header file for tc-i386.c
- Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation.
+ Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -41,21 +42,25 @@ struct fix;
#define tc_fix_adjustable(X) tc_i386_fix_adjustable(X)
extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
-/* This is the relocation type for direct references to GLOBAL_OFFSET_TABLE.
- * It comes up in complicated expressions such as
- * _GLOBAL_OFFSET_TABLE_+[.-.L284], which cannot be expressed normally with
- * the regular expressions. The fixup specified here when used at runtime
- * implies that we should add the address of the GOT to the specified location,
- * and as a result we have simplified the expression into something we can use.
- */
-#define TC_RELOC_GLOBAL_OFFSET_TABLE BFD_RELOC_386_GOTPC
+#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF) || defined (OBJ_MAYBE_COFF) || defined (OBJ_COFF)) && !defined (TE_PE)
+/* This arranges for gas/write.c to not apply a relocation if
+ tc_fix_adjustable() says it is not adjustable.
+ The "! symbol_used_in_reloc_p" test is there specifically to cover
+ the case of non-global symbols in linkonce sections. It's the
+ generally correct thing to do though; If a reloc is going to be
+ emitted against a symbol then we don't want to adjust the fixup by
+ applying the reloc during assembly. The reloc will be applied by
+ the linker during final link. */
+#define TC_FIX_ADJUSTABLE(fixP) \
+ (! symbol_used_in_reloc_p ((fixP)->fx_addsy) && tc_fix_adjustable (fixP))
+#endif
/* This expression evaluates to false if the relocation is for a local object
for which we still want to do the relocation at runtime. True if we
are willing to perform this relocation while building the .o file.
This is only used for pcrel relocations, so GOTOFF does not need to be
checked here. I am not sure if some of the others are ever used with
- pcrel, but it is easier to be safe than sorry. */
+ pcrel, but it is easier to be safe than sorry. */
#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
((FIX)->fx_r_type != BFD_RELOC_386_PLT32 \
@@ -68,7 +73,12 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
&& ! S_IS_COMMON ((FIX)->fx_addsy))))
#define TARGET_ARCH bfd_arch_i386
+#define TARGET_MACH (i386_mach ())
+extern unsigned long i386_mach PARAMS ((void));
+#ifdef TE_FreeBSD
+#define AOUT_TARGET_FORMAT "a.out-i386-freebsd"
+#endif
#ifdef TE_NetBSD
#define AOUT_TARGET_FORMAT "a.out-i386-netbsd"
#endif
@@ -88,9 +98,8 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
#define AOUT_TARGET_FORMAT "a.out-i386"
#endif
-#if ((defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_COFF)) \
- || (defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_AOUT)) \
- || (defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)))
+#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
+ || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
extern const char *i386_target_format PARAMS ((void));
#define TARGET_FORMAT i386_target_format ()
#else
@@ -134,7 +143,6 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag));
/* Need this for PIC relocations */
#define NEED_FX_R_TYPE
-
#ifdef TE_386BSD
/* The BSDI linker apparently rejects objects with a machine type of
M_386 (100). */
@@ -147,6 +155,15 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag));
#endif /* ! BFD_ASSEMBLER */
+#ifndef LEX_AT
+#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) x86_cons (EXP, NBYTES)
+extern void x86_cons PARAMS ((expressionS *, int));
+
+#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 TC_FORCE_RELOCATION(fixp) tc_i386_force_relocation(fixp)
extern int tc_i386_force_relocation PARAMS ((struct fix *));
@@ -184,13 +201,14 @@ extern const char extra_symbol_chars[];
/* Prefixes will be emitted in the order defined below.
WAIT_PREFIX must be the first prefix since FWAIT is really is an
- instruction, and so must come before any prefixes. */
+ instruction, and so must come before any prefixes. */
#define WAIT_PREFIX 0
#define LOCKREP_PREFIX 1
#define ADDR_PREFIX 2
#define DATA_PREFIX 3
#define SEG_PREFIX 4
-#define MAX_PREFIXES 5 /* max prefixes per opcode */
+#define REX_PREFIX 5 /* must come last. */
+#define MAX_PREFIXES 6 /* max prefixes per opcode */
/* we define the syntax here (modulo base,index,scale syntax) */
#define REGISTER_PREFIX '%'
@@ -217,10 +235,9 @@ extern const char extra_symbol_chars[];
#define BYTE_MNEM_SUFFIX 'b'
#define SHORT_MNEM_SUFFIX 's'
#define LONG_MNEM_SUFFIX 'l'
+#define QWORD_MNEM_SUFFIX 'q'
/* Intel Syntax */
#define LONG_DOUBLE_MNEM_SUFFIX 'x'
-/* Intel Syntax */
-#define DWORD_MNEM_SUFFIX 'd'
/* modrm.mode = REGMEM_FIELD_HAS_REG when a register is in there */
#define REGMEM_FIELD_HAS_REG 0x3/* always = 0x3 */
@@ -239,77 +256,6 @@ extern const char extra_symbol_chars[];
#define OFFSET_FLAT 6
#define FLAT 7
#define NONE_FOUND 8
-/*
- When an operand is read in it is classified by its type. This type includes
- all the possible ways an operand can be used. Thus, '%eax' is both 'register
- # 0' and 'The Accumulator'. In our language this is expressed by OR'ing
- 'Reg32' (any 32 bit register) and 'Acc' (the accumulator).
- Operands are classified so that we can match given operand types with
- the opcode table in opcode/i386.h.
- */
-/* register */
-#define Reg8 0x1 /* 8 bit reg */
-#define Reg16 0x2 /* 16 bit reg */
-#define Reg32 0x4 /* 32 bit reg */
-/* immediate */
-#define Imm8 0x8 /* 8 bit immediate */
-#define Imm8S 0x10 /* 8 bit immediate sign extended */
-#define Imm16 0x20 /* 16 bit immediate */
-#define Imm32 0x40 /* 32 bit immediate */
-#define Imm1 0x80 /* 1 bit immediate */
-/* memory */
-#define BaseIndex 0x100
-/* Disp8,16,32 are used in different ways, depending on the
- instruction. For jumps, they specify the size of the PC relative
- displacement, for baseindex type instructions, they specify the
- size of the offset relative to the base register, and for memory
- offset instructions such as `mov 1234,%al' they specify the size of
- the offset relative to the segment base. */
-#define Disp8 0x200 /* 8 bit displacement */
-#define Disp16 0x400 /* 16 bit displacement */
-#define Disp32 0x800 /* 32 bit displacement */
-/* specials */
-#define InOutPortReg 0x1000 /* register to hold in/out port addr = dx */
-#define ShiftCount 0x2000 /* register to hold shift cound = cl */
-#define Control 0x4000 /* Control register */
-#define Debug 0x8000 /* Debug register */
-#define Test 0x10000 /* Test register */
-#define FloatReg 0x20000 /* Float register */
-#define FloatAcc 0x40000 /* Float stack top %st(0) */
-#define SReg2 0x80000 /* 2 bit segment register */
-#define SReg3 0x100000 /* 3 bit segment register */
-#define Acc 0x200000 /* Accumulator %al or %ax or %eax */
-#define JumpAbsolute 0x400000
-#define RegMMX 0x800000 /* MMX register */
-#define RegXMM 0x1000000 /* XMM registers in PIII */
-#define EsSeg 0x2000000 /* String insn operand with fixed es segment */
-/* InvMem is for instructions with a modrm byte that only allow a
- general register encoding in the i.tm.mode and i.tm.regmem fields,
- eg. control reg moves. They really ought to support a memory form,
- but don't, so we add an InvMem flag to the register operand to
- indicate that it should be encoded in the i.tm.regmem field. */
-#define InvMem 0x4000000
-
-#define Reg (Reg8|Reg16|Reg32) /* gen'l register */
-#define WordReg (Reg16|Reg32)
-#define ImplicitRegister (InOutPortReg|ShiftCount|Acc|FloatAcc)
-#define Imm (Imm8|Imm8S|Imm16|Imm32) /* gen'l immediate */
-#define Disp (Disp8|Disp16|Disp32) /* General displacement */
-#define AnyMem (Disp|BaseIndex|InvMem) /* General memory */
-/* The following aliases are defined because the opcode table
- carefully specifies the allowed memory types for each instruction.
- At the moment we can only tell a memory reference size by the
- instruction suffix, so there's not much point in defining Mem8,
- Mem16, Mem32 and Mem64 opcode modifiers - We might as well just use
- the suffix directly to check memory operands. */
-#define LLongMem AnyMem /* 64 bits (or more) */
-#define LongMem AnyMem /* 32 bit memory ref */
-#define ShortMem AnyMem /* 16 bit memory ref */
-#define WordMem AnyMem /* 16 or 32 bit memory ref */
-#define ByteMem AnyMem /* 8 bit memory ref */
-
-#define SMALLEST_DISP_TYPE(num) \
- (fits_in_signed_byte(num) ? (Disp8|Disp32) : Disp32)
typedef struct
{
@@ -328,7 +274,33 @@ typedef struct
AMD 3DNow! instructions.
If this template has no extension opcode (the usual case) use None */
unsigned int extension_opcode;
-#define None 0xffff /* If no extension_opcode is possible. */
+#define None 0xffff /* If no extension_opcode is possible. */
+
+ /* cpu feature flags */
+ unsigned int cpu_flags;
+#define Cpu086 0x1 /* Any old cpu will do, 0 does the same */
+#define Cpu186 0x2 /* i186 or better required */
+#define Cpu286 0x4 /* i286 or better required */
+#define Cpu386 0x8 /* i386 or better required */
+#define Cpu486 0x10 /* i486 or better required */
+#define Cpu586 0x20 /* i585 or better required */
+#define Cpu686 0x40 /* i686 or better required */
+#define CpuP4 0x80 /* Pentium4 or better required */
+#define CpuK6 0x100 /* AMD K6 or better required*/
+#define CpuAthlon 0x200 /* AMD Athlon or better required*/
+#define CpuSledgehammer 0x400 /* Sledgehammer or better required */
+#define CpuMMX 0x800 /* MMX support required */
+#define CpuSSE 0x1000 /* Streaming SIMD extensions required */
+#define CpuSSE2 0x2000 /* Streaming SIMD extensions 2 required */
+#define Cpu3dnow 0x4000 /* 3dnow! support required */
+#define CpuUnknown 0x8000 /* The CPU is unknown, be on the safe side. */
+
+ /* These flags are set by gas depending on the flag_code. */
+#define Cpu64 0x4000000 /* 64bit support required */
+#define CpuNo64 0x8000000 /* Not supported in the 64bit mode */
+
+ /* The default value for unknown CPUs - enable all features to avoid problems. */
+#define CpuUnknownFlags (Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuSledgehammer|CpuMMX|CpuSSE|CpuSSE2|Cpu3dnow|CpuK6|CpuAthlon)
/* the bits in opcode_modifier are used to generate the final opcode from
the base_opcode. These bits also are used to detect alternate forms of
@@ -344,35 +316,107 @@ typedef struct
#define FloatR 0x8 /* src/dest swap for floats: MUST BE 0x8 */
#define ShortForm 0x10 /* register is in low 3 bits of opcode */
#define FloatMF 0x20 /* FP insn memory format bit, sized by 0x4 */
-#define Jump 0x40 /* special case for jump insns. */
+#define Jump 0x40 /* special case for jump insns. */
#define JumpDword 0x80 /* call and jump */
#define JumpByte 0x100 /* loop and jecxz */
#define JumpInterSegment 0x200 /* special case for intersegment leaps/calls */
#define FloatD 0x400 /* direction for float insns: MUST BE 0x400 */
#define Seg2ShortForm 0x800 /* encoding of load segment reg insns */
-#define Seg3ShortForm 0x1000 /* fs/gs segment register insns. */
+#define Seg3ShortForm 0x1000 /* fs/gs segment register insns. */
#define Size16 0x2000 /* needs size prefix if in 32-bit mode */
#define Size32 0x4000 /* needs size prefix if in 16-bit mode */
-#define IgnoreSize 0x8000 /* instruction ignores operand size prefix */
-#define DefaultSize 0x10000 /* default insn size depends on mode */
-#define No_bSuf 0x20000 /* b suffix on instruction illegal */
-#define No_wSuf 0x40000 /* w suffix on instruction illegal */
-#define No_lSuf 0x80000 /* l suffix on instruction illegal */
-#define No_sSuf 0x100000 /* s suffix on instruction illegal */
-#define No_dSuf 0x200000 /* d suffix on instruction illegal */
-#define No_xSuf 0x400000 /* x suffix on instruction illegal */
-#define FWait 0x800000 /* instruction needs FWAIT */
-#define IsString 0x1000000 /* quick test for string instructions */
-#define regKludge 0x2000000 /* fake an extra reg operand for clr, imul */
-#define IsPrefix 0x4000000 /* opcode is a prefix */
-#define ImmExt 0x8000000 /* instruction has extension in 8 bit imm */
+#define Size64 0x8000 /* needs size prefix if in 16-bit mode */
+#define IgnoreSize 0x10000 /* instruction ignores operand size prefix */
+#define DefaultSize 0x20000 /* default insn size depends on mode */
+#define No_bSuf 0x40000 /* b suffix on instruction illegal */
+#define No_wSuf 0x80000 /* w suffix on instruction illegal */
+#define No_lSuf 0x100000 /* l suffix on instruction illegal */
+#define No_sSuf 0x200000 /* s suffix on instruction illegal */
+#define No_qSuf 0x400000 /* q suffix on instruction illegal */
+#define No_xSuf 0x800000 /* x suffix on instruction illegal */
+#define FWait 0x1000000 /* instruction needs FWAIT */
+#define IsString 0x2000000 /* quick test for string instructions */
+#define regKludge 0x4000000 /* fake an extra reg operand for clr, imul */
+#define IsPrefix 0x8000000 /* opcode is a prefix */
+#define ImmExt 0x10000000 /* instruction has extension in 8 bit imm */
+#define NoRex64 0x20000000 /* instruction don't need Rex64 prefix. */
+#define Rex64 0x40000000 /* instruction require Rex64 prefix. */
#define Ugh 0x80000000 /* deprecated fp insn, gets a warning */
/* operand_types[i] describes the type of operand i. This is made
by OR'ing together all of the possible type masks. (e.g.
'operand_types[i] = Reg|Imm' specifies that operand i can be
- either a register or an immediate operand */
+ either a register or an immediate operand. */
unsigned int operand_types[3];
+
+ /* operand_types[i] bits */
+ /* register */
+#define Reg8 0x1 /* 8 bit reg */
+#define Reg16 0x2 /* 16 bit reg */
+#define Reg32 0x4 /* 32 bit reg */
+#define Reg64 0x8 /* 64 bit reg */
+ /* immediate */
+#define Imm8 0x10 /* 8 bit immediate */
+#define Imm8S 0x20 /* 8 bit immediate sign extended */
+#define Imm16 0x40 /* 16 bit immediate */
+#define Imm32 0x80 /* 32 bit immediate */
+#define Imm32S 0x100 /* 32 bit immediate sign extended */
+#define Imm64 0x200 /* 64 bit immediate */
+#define Imm1 0x400 /* 1 bit immediate */
+ /* memory */
+#define BaseIndex 0x800
+ /* Disp8,16,32 are used in different ways, depending on the
+ instruction. For jumps, they specify the size of the PC relative
+ displacement, for baseindex type instructions, they specify the
+ size of the offset relative to the base register, and for memory
+ offset instructions such as `mov 1234,%al' they specify the size of
+ the offset relative to the segment base. */
+#define Disp8 0x1000 /* 8 bit displacement */
+#define Disp16 0x2000 /* 16 bit displacement */
+#define Disp32 0x4000 /* 32 bit displacement */
+#define Disp32S 0x8000 /* 32 bit signed displacement */
+#define Disp64 0x10000 /* 64 bit displacement */
+ /* specials */
+#define InOutPortReg 0x20000 /* register to hold in/out port addr = dx */
+#define ShiftCount 0x40000 /* register to hold shift cound = cl */
+#define Control 0x80000 /* Control register */
+#define Debug 0x100000 /* Debug register */
+#define Test 0x200000 /* Test register */
+#define FloatReg 0x400000 /* Float register */
+#define FloatAcc 0x800000 /* Float stack top %st(0) */
+#define SReg2 0x1000000 /* 2 bit segment register */
+#define SReg3 0x2000000 /* 3 bit segment register */
+#define Acc 0x4000000 /* Accumulator %al or %ax or %eax */
+#define JumpAbsolute 0x8000000
+#define RegMMX 0x10000000 /* MMX register */
+#define RegXMM 0x20000000 /* XMM registers in PIII */
+#define EsSeg 0x40000000 /* String insn operand with fixed es segment */
+
+ /* InvMem is for instructions with a modrm byte that only allow a
+ general register encoding in the i.tm.mode and i.tm.regmem fields,
+ eg. control reg moves. They really ought to support a memory form,
+ but don't, so we add an InvMem flag to the register operand to
+ indicate that it should be encoded in the i.tm.regmem field. */
+#define InvMem 0x80000000
+
+#define Reg (Reg8|Reg16|Reg32|Reg64) /* gen'l register */
+#define WordReg (Reg16|Reg32|Reg64)
+#define ImplicitRegister (InOutPortReg|ShiftCount|Acc|FloatAcc)
+#define Imm (Imm8|Imm8S|Imm16|Imm32S|Imm32|Imm64) /* gen'l immediate */
+#define EncImm (Imm8|Imm16|Imm32|Imm32S) /* Encodable gen'l immediate */
+#define Disp (Disp8|Disp16|Disp32|Disp32S|Disp64) /* General displacement */
+#define AnyMem (Disp8|Disp16|Disp32|Disp32S|BaseIndex|InvMem) /* General memory */
+ /* The following aliases are defined because the opcode table
+ carefully specifies the allowed memory types for each instruction.
+ At the moment we can only tell a memory reference size by the
+ instruction suffix, so there's not much point in defining Mem8,
+ Mem16, Mem32 and Mem64 opcode modifiers - We might as well just use
+ the suffix directly to check memory operands. */
+#define LLongMem AnyMem /* 64 bits (or more) */
+#define LongMem AnyMem /* 32 bit memory ref */
+#define ShortMem AnyMem /* 16 bit memory ref */
+#define WordMem AnyMem /* 16 or 32 bit memory ref */
+#define ByteMem AnyMem /* 8 bit memory ref */
}
template;
@@ -384,47 +428,70 @@ template;
END.
*/
typedef struct
- {
- const template *start;
- const template *end;
- } templates;
+{
+ const template *start;
+ const template *end;
+}
+templates;
/* these are for register name --> number & type hash lookup */
typedef struct
- {
- char *reg_name;
- unsigned int reg_type;
- unsigned int reg_num;
- }
+{
+ char *reg_name;
+ unsigned int reg_type;
+ unsigned int reg_flags;
+#define RegRex 0x1 /* Extended register. */
+#define RegRex64 0x2 /* Extended 8 bit register. */
+ unsigned int reg_num;
+}
reg_entry;
typedef struct
- {
- char *seg_name;
- unsigned int seg_prefix;
- }
+{
+ char *seg_name;
+ unsigned int seg_prefix;
+}
seg_entry;
-/* 386 operand encoding bytes: see 386 book for details of this. */
+/* 386 operand encoding bytes: see 386 book for details of this. */
typedef struct
- {
- unsigned int regmem; /* codes register or memory operand */
- unsigned int reg; /* codes register operand (or extended opcode) */
- unsigned int mode; /* how to interpret regmem & reg */
- }
+{
+ unsigned int regmem; /* codes register or memory operand */
+ unsigned int reg; /* codes register operand (or extended opcode) */
+ unsigned int mode; /* how to interpret regmem & reg */
+}
modrm_byte;
-/* 386 opcode byte to code indirect addressing. */
+/* x86-64 extension prefix. */
typedef struct
{
- unsigned base;
- unsigned index;
- unsigned scale;
+ unsigned int mode64;
+ unsigned int extX; /* Used to extend modrm reg field. */
+ unsigned int extY; /* Used to extend SIB index field. */
+ unsigned int extZ; /* Used to extend modrm reg/mem, SIB base, modrm base fields. */
+ unsigned int empty; /* Used to old-style byte registers to new style. */
}
+rex_byte;
+
+/* 386 opcode byte to code indirect addressing. */
+typedef struct
+{
+ unsigned base;
+ unsigned index;
+ unsigned scale;
+}
sib_byte;
+/* x86 arch names and features */
+typedef struct
+{
+ const char *name; /* arch name */
+ unsigned int flags; /* cpu feature flags */
+}
+arch_entry;
+
/* The name of the global offset table generated by the compiler. Allow
- this to be overridden if need be. */
+ this to be overridden if need be. */
#ifndef GLOBAL_OFFSET_TABLE_NAME
#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
#endif
@@ -446,13 +513,12 @@ if ((n) && !need_pass_2 \
&& (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1)) \
&& subseg_text_p (now_seg)) \
{ \
- char *p; \
- p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \
- (symbolS *) 0, (offsetT) (n), (char *) 0); \
- *p = 0x90; \
+ frag_align_code ((n), (max)); \
goto around; \
}
+#define MAX_MEM_FOR_RS_ALIGN_CODE 15
+
extern void i386_align_code PARAMS ((fragS *, int));
#define HANDLE_ALIGN(fragP) \
@@ -475,5 +541,3 @@ extern void sco_id PARAMS ((void));
#endif
#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
-
-/* end of tc-i386.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-i860.c b/gnu/usr.bin/binutils/gas/config/tc-i860.c
index 3317282ba42..5a48115d0bb 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-i860.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-i860.c
@@ -1,5 +1,9 @@
-/* tc-i860.c -- Assemble for the I860
- Copyright (C) 1989, 92, 93, 94, 95, 98, 1999 Free Software Foundation, Inc.
+/* tc-i860.c -- Assembler for the Intel i860 architecture.
+ Copyright 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000
+ Free Software Foundation, Inc.
+
+ Brought back from the dead and completely reworked
+ by Jason Eckhardt <jle@cygnus.com>.
This file is part of GAS, the GNU Assembler.
@@ -17,124 +21,117 @@
with GAS; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
#include "as.h"
-
+#include "subsegs.h"
#include "opcode/i860.h"
+#include "elf/i860.h"
-void md_begin ();
-void md_number_to_chars ();
-void md_assemble ();
-char *md_atof ();
-void md_convert_frag ();
-int md_estimate_size_before_relax ();
-void md_number_to_imm ();
-void md_number_to_disp ();
-void md_number_to_field ();
-void md_ri_to_chars ();
-static void i860_ip ();
-/* void emit_machine_reloc(); */
-
-const int md_reloc_size = sizeof (struct relocation_info);
+/* Defined by default since this is primarily a SVR4/860 assembler.
+ However, I'm trying to leave the door open for Intel syntax. Of course,
+ if full support for anything other than SVR4 is done, then we should
+ select this based on a command-line flag. */
+#define SYNTAX_SVR4
-/* void (*md_emit_relocations)() = emit_machine_reloc; */
-
-/* handle of the OPCODE hash table */
+/* The opcode hash table. */
static struct hash_control *op_hash = NULL;
-static void s_dual (), s_enddual ();
-static void s_atmp ();
-
-const pseudo_typeS
- md_pseudo_table[] =
-{
- {"dual", s_dual, 4},
- {"enddual", s_enddual, 4},
- {"atmp", s_atmp, 4},
- {NULL, 0, 0},
-};
+/* These characters always start a comment. */
+const char comment_chars[] = "#!/";
-/* This array holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful */
-const char comment_chars[] = "!/"; /* JF removed '|' from comment_chars */
-
-/* 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. */
+/* These characters start a comment at the beginning of a line. */
const char line_comment_chars[] = "#/";
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
-/* Chars that can be used to separate mant from exp in floating point nums */
+/* Characters that can be used to separate the mantissa from the exponent
+ 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 */
+/* Characters that indicate this number is a floating point constant.
+ As in 0f12.456 or 0d1.2345e12. */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
-/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be
- changed in read.c . Ideally it shouldn't have to know about it at all,
- but nothing is ideal around here.
- */
-int size_reloc_info = sizeof (struct relocation_info);
-
-static unsigned char octal[256];
-#define isoctal(c) octal[c]
-static unsigned char toHex[256];
+/* Register prefix. */
+#ifdef SYNTAX_SVR4
+static const char reg_prefix = '%';
+#else
+static const char reg_prefix = 0;
+#endif
struct i860_it
- {
- char *error;
- unsigned long opcode;
- struct nlist *nlistp;
- expressionS exp;
- int pcrel;
- enum expand_type expand;
- enum highlow_type highlow;
- enum reloc_type reloc;
- } the_insn;
-
-#if __STDC__ == 1
-
-static void print_insn (struct i860_it *insn);
-static int getExpression (char *str);
-
-#else /* not __STDC__ */
+{
+ char *error;
+ unsigned long opcode;
+ expressionS exp;
+ enum expand_type expand;
+ bfd_reloc_code_real_type reloc;
+ int pcrel;
+ valueT fup;
+} the_insn;
-static void print_insn ();
-static int getExpression ();
+static char *expr_end;
-#endif /* not __STDC__ */
+/* Indicates error if a pseudo operation was expanded after a branch. */
+static char last_expand;
+
+/* If true, then warn if any pseudo operations were expanded. */
+static int target_warn_expand = 0;
+
+/* Prototypes. */
+static void i860_process_insn PARAMS ((char *));
+static void s_dual PARAMS ((int));
+static void s_enddual PARAMS ((int));
+static void s_atmp PARAMS ((int));
+static int i860_get_expression PARAMS ((char *));
+static bfd_reloc_code_real_type obtain_reloc_for_imm16
+ PARAMS ((fixS *, long *));
+#ifdef DEBUG_I860
+static void print_insn PARAMS ((struct i860_it *));
+#endif
-static char *expr_end;
-static char last_expand; /* error if expansion after branch */
+const pseudo_typeS md_pseudo_table[] =
+{
+#ifdef OBJ_ELF
+ {"align", s_align_bytes, 0},
+#endif
+ {"dual", s_dual, 0},
+ {"enddual", s_enddual, 0},
+ {"atmp", s_atmp, 0},
+ {NULL, 0, 0},
+};
+/* Dual-instruction mode handling. */
enum dual
{
DUAL_OFF = 0, DUAL_ON, DUAL_DDOT, DUAL_ONDDOT,
};
-static enum dual dual_mode = DUAL_OFF; /* dual-instruction mode */
+static enum dual dual_mode = DUAL_OFF;
+/* Handle ".dual" directive. */
static void
-s_dual () /* floating point instructions have dual set */
+s_dual (ignore)
+ int ignore ATTRIBUTE_UNUSED;
{
dual_mode = DUAL_ON;
}
+/* Handle ".enddual" directive. */
static void
-s_enddual () /* floating point instructions have dual set */
+s_enddual (ignore)
+ int ignore ATTRIBUTE_UNUSED;
{
dual_mode = DUAL_OFF;
}
-static int atmp = 31; /* temporary register for pseudo's */
+/* Temporary register used when expanding assembler pseudo operations. */
+static int atmp = 31;
static void
-s_atmp ()
+s_atmp (ignore)
+ int ignore ATTRIBUTE_UNUSED;
{
register int temp;
if (strncmp (input_line_pointer, "sp", 2) == 0)
@@ -164,20 +161,21 @@ s_atmp ()
}
/* This function is called once, at assembler startup time. It should
- set up all the tables, etc. that the MD part of the assembler will need. */
+ set up all the tables and data structures that the MD part of the
+ assembler will need. */
void
md_begin ()
{
- register char *retval = NULL;
+ const char *retval = NULL;
int lose = 0;
- register unsigned int i = 0;
+ unsigned int i = 0;
op_hash = hash_new ();
- while (i < NUMOPCODES)
+ while (i860_opcodes[i].name != NULL)
{
const char *name = i860_opcodes[i].name;
- retval = hash_insert (op_hash, name, &i860_opcodes[i]);
+ retval = hash_insert (op_hash, name, (PTR)&i860_opcodes[i]);
if (retval != NULL)
{
fprintf (stderr, _("internal error: can't hash `%s': %s\n"),
@@ -188,44 +186,43 @@ md_begin ()
{
if (i860_opcodes[i].match & i860_opcodes[i].lose)
{
- fprintf (stderr, _("internal error: losing opcode: `%s' \"%s\"\n"),
+ fprintf (stderr,
+ _("internal error: losing opcode: `%s' \"%s\"\n"),
i860_opcodes[i].name, i860_opcodes[i].args);
lose = 1;
}
++i;
}
- while (i < NUMOPCODES
- && !strcmp (i860_opcodes[i].name, name));
+ while (i860_opcodes[i].name != NULL
+ && strcmp (i860_opcodes[i].name, name) == 0);
}
if (lose)
- as_fatal (_("Broken assembler. No assembly attempted."));
-
- for (i = '0'; i < '8'; ++i)
- octal[i] = 1;
- for (i = '0'; i <= '9'; ++i)
- toHex[i] = i - '0';
- for (i = 'a'; i <= 'f'; ++i)
- toHex[i] = i + 10 - 'a';
- for (i = 'A'; i <= 'F'; ++i)
- toHex[i] = i + 10 - 'A';
+ as_fatal (_("Defective assembler. No assembly attempted."));
}
+/* This is the core of the machine-dependent assembler. STR points to a
+ machine dependent instruction. This function emits the frags/bytes
+ it assembles to. */
void
md_assemble (str)
char *str;
{
- char *toP;
- int rsd;
- int no_opcodes = 1;
+ char *destp;
+ int num_opcodes = 1;
int i;
struct i860_it pseudo[3];
assert (str);
- i860_ip (str);
- /* check for expandable flag to produce pseudo-instructions */
- if (the_insn.expand != 0 && the_insn.highlow == NO_SPEC)
+ /* Assemble the instruction. */
+ i860_process_insn (str);
+
+ /* Check for expandable flag to produce pseudo-instructions. This
+ is an undesirable feature that should be avoided. */
+ if (the_insn.expand != 0
+ && ! (the_insn.fup & (OP_SEL_HA | OP_SEL_H | OP_SEL_L | OP_SEL_GOT
+ | OP_SEL_GOTOFF | OP_SEL_PLT)))
{
for (i = 0; i < 3; i++)
pseudo[i] = the_insn;
@@ -234,101 +231,109 @@ md_assemble (str)
{
case E_DELAY:
- no_opcodes = 1;
+ num_opcodes = 1;
break;
case E_MOV:
- if (the_insn.exp.X_add_symbol == NULL &&
- the_insn.exp.X_op_symbol == NULL &&
- (the_insn.exp.X_add_number < (1 << 15) &&
- the_insn.exp.X_add_number >= -(1 << 15)))
+ if (the_insn.exp.X_add_symbol == NULL
+ && the_insn.exp.X_op_symbol == NULL
+ && (the_insn.exp.X_add_number < (1 << 15)
+ && the_insn.exp.X_add_number >= -(1 << 15)))
break;
- /* or l%const,r0,ireg_dest */
+
+ /* Emit "or l%const,r0,ireg_dest". */
pseudo[0].opcode = (the_insn.opcode & 0x001f0000) | 0xe4000000;
- pseudo[0].highlow = PAIR;
- /* orh h%const,ireg_dest,ireg_dest */
- pseudo[1].opcode = (the_insn.opcode & 0x03ffffff) | 0xec000000 |
- ((the_insn.opcode & 0x001f0000) << 5);
- pseudo[1].highlow = HIGH;
- no_opcodes = 2;
+ pseudo[0].fup = (OP_IMM_S16 | OP_SEL_L);
+
+ /* Emit "orh h%const,ireg_dest,ireg_dest". */
+ pseudo[1].opcode = (the_insn.opcode & 0x03ffffff) | 0xec000000
+ | ((the_insn.opcode & 0x001f0000) << 5);
+ pseudo[1].fup = (OP_IMM_S16 | OP_SEL_H);
+
+ num_opcodes = 2;
break;
case E_ADDR:
- if (the_insn.exp.X_add_symbol == NULL &&
- the_insn.exp.X_op_symbol == NULL)
+ if (the_insn.exp.X_add_symbol == NULL
+ && the_insn.exp.X_op_symbol == NULL
+ && (the_insn.exp.X_add_number < (1 << 15)
+ && the_insn.exp.X_add_number >= -(1 << 15)))
break;
- /* orh ha%addr_expr,r0,r31 */
+
+ /* Emit "orh ha%addr_expr,r0,r31". */
pseudo[0].opcode = 0xec000000 | (atmp << 16);
- pseudo[0].highlow = HIGHADJ;
- pseudo[0].reloc = LOW0; /* must overwrite */
- /* l%addr_expr(r31),ireg_dest */
- pseudo[1].opcode = (the_insn.opcode & ~0x003e0000) | (atmp << 21);
- pseudo[1].highlow = PAIR;
- no_opcodes = 2;
+ pseudo[0].fup = (OP_IMM_S16 | OP_SEL_HA);
+
+ /* Emit "l%addr_expr(r31),ireg_dest". We pick up the fixup
+ information from the original instruction. */
+ pseudo[1].opcode = (the_insn.opcode & ~0x03e00000) | (atmp << 21);
+ pseudo[1].fup = the_insn.fup | OP_SEL_L;
+
+ num_opcodes = 2;
break;
- case E_U32: /* 2nd version emulates Intel as, not doc. */
- if (the_insn.exp.X_add_symbol == NULL &&
- the_insn.exp.X_op_symbol == NULL &&
- (the_insn.exp.X_add_number < (1 << 16) &&
- the_insn.exp.X_add_number >= 0))
+ case E_U32:
+ if (the_insn.exp.X_add_symbol == NULL
+ && the_insn.exp.X_op_symbol == NULL
+ && (the_insn.exp.X_add_number < (1 << 16)
+ && the_insn.exp.X_add_number >= 0))
break;
- /* $(opcode)h h%const,ireg_src2,ireg_dest
- pseudo[0].opcode = (the_insn.opcode & 0xf3ffffff) | 0x0c000000; */
- /* $(opcode)h h%const,ireg_src2,r31 */
- pseudo[0].opcode = (the_insn.opcode & 0xf3e0ffff) | 0x0c000000 |
- (atmp << 16);
- pseudo[0].highlow = HIGH;
- /* $(opcode) l%const,ireg_dest,ireg_dest
- pseudo[1].opcode = (the_insn.opcode & 0xf01f0000) | 0x04000000 |
- ((the_insn.opcode & 0x001f0000) << 5); */
- /* $(opcode) l%const,r31,ireg_dest */
- pseudo[1].opcode = (the_insn.opcode & 0xf01f0000) | 0x04000000 |
- (atmp << 21);
- pseudo[1].highlow = PAIR;
- no_opcodes = 2;
+
+ /* Emit "$(opcode)h h%const,ireg_src2,r31". */
+ pseudo[0].opcode = (the_insn.opcode & 0xf3e0ffff) | 0x0c000000
+ | (atmp << 16);
+ pseudo[0].fup = (OP_IMM_S16 | OP_SEL_H);
+
+ /* Emit "$(opcode) l%const,r31,ireg_dest". */
+ pseudo[1].opcode = (the_insn.opcode & 0xf01f0000) | 0x04000000
+ | (atmp << 21);
+ pseudo[1].fup = (OP_IMM_S16 | OP_SEL_L);
+
+ num_opcodes = 2;
break;
- case E_AND: /* 2nd version emulates Intel as, not doc. */
- if (the_insn.exp.X_add_symbol == NULL &&
- the_insn.exp.X_op_symbol == NULL &&
- (the_insn.exp.X_add_number < (1 << 16) &&
- the_insn.exp.X_add_number >= 0))
+ case E_AND:
+ if (the_insn.exp.X_add_symbol == NULL
+ && the_insn.exp.X_op_symbol == NULL
+ && (the_insn.exp.X_add_number < (1 << 16)
+ && the_insn.exp.X_add_number >= 0))
break;
- /* andnot h%const,ireg_src2,ireg_dest
- pseudo[0].opcode = (the_insn.opcode & 0x03ffffff) | 0xd4000000; */
- /* andnot h%const,ireg_src2,r31 */
- pseudo[0].opcode = (the_insn.opcode & 0x03e0ffff) | 0xd4000000 |
- (atmp << 16);
- pseudo[0].highlow = HIGH;
+
+ /* Emit "andnot h%const,ireg_src2,r31". */
+ pseudo[0].opcode = (the_insn.opcode & 0x03e0ffff) | 0xd4000000
+ | (atmp << 16);
+ pseudo[0].fup = (OP_IMM_S16 | OP_SEL_H);
pseudo[0].exp.X_add_number = -1 - the_insn.exp.X_add_number;
- /* andnot l%const,ireg_dest,ireg_dest
- pseudo[1].opcode = (the_insn.opcode & 0x001f0000) | 0xd4000000 |
- ((the_insn.opcode & 0x001f0000) << 5); */
- /* andnot l%const,r31,ireg_dest */
- pseudo[1].opcode = (the_insn.opcode & 0x001f0000) | 0xd4000000 |
- (atmp << 21);
- pseudo[1].highlow = PAIR;
+
+ /* Emit "andnot l%const,r31,ireg_dest". */
+ pseudo[1].opcode = (the_insn.opcode & 0x001f0000) | 0xd4000000
+ | (atmp << 21);
+ pseudo[1].fup = (OP_IMM_S16 | OP_SEL_L);
pseudo[1].exp.X_add_number = -1 - the_insn.exp.X_add_number;
- no_opcodes = 2;
+
+ num_opcodes = 2;
break;
case E_S32:
- if (the_insn.exp.X_add_symbol == NULL &&
- the_insn.exp.X_op_symbol == NULL &&
- (the_insn.exp.X_add_number < (1 << 15) &&
- the_insn.exp.X_add_number >= -(1 << 15)))
+ if (the_insn.exp.X_add_symbol == NULL
+ && the_insn.exp.X_op_symbol == NULL
+ && (the_insn.exp.X_add_number < (1 << 15)
+ && the_insn.exp.X_add_number >= -(1 << 15)))
break;
- /* orh h%const,r0,r31 */
+
+ /* Emit "orh h%const,r0,r31". */
pseudo[0].opcode = 0xec000000 | (atmp << 16);
- pseudo[0].highlow = HIGH;
- /* or l%const,r31,r31 */
+ pseudo[0].fup = (OP_IMM_S16 | OP_SEL_H);
+
+ /* Emit "or l%const,r31,r31". */
pseudo[1].opcode = 0xe4000000 | (atmp << 21) | (atmp << 16);
- pseudo[1].highlow = PAIR;
- /* r31,ireg_src2,ireg_dest */
+ pseudo[1].fup = (OP_IMM_S16 | OP_SEL_L);
+
+ /* Emit "r31,ireg_src2,ireg_dest". */
pseudo[2].opcode = (the_insn.opcode & ~0x0400ffff) | (atmp << 11);
- pseudo[2].reloc = NO_RELOC;
- no_opcodes = 3;
+ pseudo[2].fup = OP_IMM_S16;
+
+ num_opcodes = 3;
break;
default:
@@ -336,61 +341,80 @@ md_assemble (str)
}
the_insn = pseudo[0];
- /* check for expanded opcode after branch or in dual */
- if (no_opcodes > 1 && last_expand == 1)
+
+ /* Warn if an opcode is expanded after a delayed branch. */
+ if (num_opcodes > 1 && last_expand == 1)
as_warn (_("Expanded opcode after delayed branch: `%s'"), str);
- if (no_opcodes > 1 && dual_mode != DUAL_OFF)
+
+ /* Warn if an opcode is expanded in dual mode. */
+ if (num_opcodes > 1 && dual_mode != DUAL_OFF)
as_warn (_("Expanded opcode in dual mode: `%s'"), str);
+
+ /* Notify if any expansions happen. */
+ if (target_warn_expand && num_opcodes > 1)
+ as_warn (_("An instruction was expanded (%s)"), str);
}
i = 0;
do
- { /* always produce at least one opcode */
- toP = frag_more (4);
- /* put out the opcode */
- md_number_to_chars (toP, the_insn.opcode, 4);
+ {
+ /* Output the opcode. Note that the i860 always reads instructions
+ as little-endian data. */
+ destp = frag_more (4);
+ number_to_chars_littleendian (destp, the_insn.opcode, 4);
- /* check for expanded opcode after branch or in dual */
+ /* Check for expanded opcode after branch or in dual mode. */
last_expand = the_insn.pcrel;
- /* put out the symbol-dependent stuff */
- if (the_insn.reloc != NO_RELOC)
+ /* Output the symbol-dependent stuff. */
+ if (the_insn.fup != OP_NONE)
{
- fix_new (frag_now, /* which frag */
- (toP - frag_now->fr_literal), /* where */
- 4, /* size */
- &the_insn.exp,
- the_insn.pcrel,
- /* merge bit fields into one argument */
- (int) (((the_insn.highlow & 0x3) << 4) | (the_insn.reloc & 0xf)));
+ fixS *fix;
+ fix = fix_new_exp (frag_now,
+ destp - frag_now->fr_literal,
+ 4,
+ &the_insn.exp,
+ the_insn.pcrel,
+ the_insn.reloc);
+
+ /* Despite the odd name, this is a scratch field. We use
+ it to encode operand type information. */
+ fix->fx_addnumber = the_insn.fup;
}
the_insn = pseudo[++i];
}
- while (--no_opcodes > 0);
+ while (--num_opcodes > 0);
}
+/* Assemble the instruction pointed to by STR. */
static void
-i860_ip (str)
+i860_process_insn (str)
char *str;
{
char *s;
const char *args;
char c;
- unsigned long i;
struct i860_opcode *insn;
- char *argsStart;
+ char *args_start;
unsigned long opcode;
unsigned int mask;
int match = 0;
int comma = 0;
+#if 1 /* For compiler warnings. */
+ args = 0;
+ insn = 0;
+ args_start = 0;
+ opcode = 0;
+#endif
- for (s = str; islower (*s) || *s == '.' || *s == '3'; ++s)
+ for (s = str; islower (*s) || *s == '.' || *s == '3'
+ || *s == '2' || *s == '1'; ++s)
;
+
switch (*s)
{
-
case '\0':
break;
@@ -407,8 +431,9 @@ i860_ip (str)
as_fatal (_("Unknown opcode: `%s'"), str);
}
+ /* Check for dual mode ("d.") opcode prefix. */
if (strncmp (str, "d.", 2) == 0)
- { /* check for d. opcode prefix */
+ {
if (dual_mode == DUAL_ON)
dual_mode = DUAL_ONDDOT;
else
@@ -423,35 +448,34 @@ i860_ip (str)
as_bad (_("Unknown opcode: `%s'"), str);
return;
}
+
if (comma)
- {
- *--s = ',';
- }
- argsStart = s;
+ *--s = ',';
+
+ args_start = s;
for (;;)
{
opcode = insn->match;
memset (&the_insn, '\0', sizeof (the_insn));
- the_insn.reloc = NO_RELOC;
+ the_insn.reloc = BFD_RELOC_NONE;
+ the_insn.pcrel = 0;
+ the_insn.fup = OP_NONE;
- /*
- * Build the opcode, checking as we go to make
- * sure that the operands match
- */
- for (args = insn->args;; ++args)
+ /* Build the opcode, checking as we go that the operands match. */
+ for (args = insn->args; ; ++args)
{
switch (*args)
{
- case '\0': /* end of args */
+ /* End of args. */
+ case '\0':
if (*s == '\0')
- {
- match = 1;
- }
+ match = 1;
break;
+ /* These must match exactly. */
case '+':
- case '(': /* these must match exactly */
+ case '(':
case ')':
case ',':
case ' ':
@@ -459,24 +483,30 @@ i860_ip (str)
continue;
break;
- case '#': /* must be at least one digit */
+ /* Must be at least one digit. */
+ case '#':
if (isdigit (*s++))
{
while (isdigit (*s))
- {
- ++s;
- }
+ ++s;
continue;
}
break;
- case '1': /* next operand must be a register */
+ /* Next operand must be a register. */
+ case '1':
case '2':
case 'd':
+ /* Check for register prefix if necessary. */
+ if (reg_prefix && *s != reg_prefix)
+ goto error;
+ else
+ s++;
+
switch (*s)
{
-
- case 'f': /* frame pointer */
+ /* Frame pointer. */
+ case 'f':
s++;
if (*s++ == 'p')
{
@@ -485,7 +515,8 @@ i860_ip (str)
}
goto error;
- case 's': /* stack pointer */
+ /* Stack pointer. */
+ case 's':
s++;
if (*s++ == 'p')
{
@@ -494,7 +525,8 @@ i860_ip (str)
}
goto error;
- case 'r': /* any register */
+ /* Any register r0..r31. */
+ case 'r':
s++;
if (!isdigit (c = *s++))
{
@@ -503,27 +535,21 @@ i860_ip (str)
if (isdigit (*s))
{
if ((c = 10 * (c - '0') + (*s++ - '0')) >= 32)
- {
- goto error;
- }
+ goto error;
}
else
- {
- c -= '0';
- }
+ c -= '0';
mask = c;
break;
- default: /* not this opcode */
+ /* Not this opcode. */
+ default:
goto error;
}
- /*
- * Got the register, now figure out where
- * it goes in the opcode.
- */
+
+ /* Obtained the register, now place it in the opcode. */
switch (*args)
{
-
case '1':
opcode |= mask << 11;
continue;
@@ -539,9 +565,16 @@ i860_ip (str)
}
break;
- case 'e': /* next operand is a floating point register */
+ /* Next operand is a floating point register. */
+ case 'e':
case 'f':
case 'g':
+ /* Check for register prefix if necessary. */
+ if (reg_prefix && *s != reg_prefix)
+ goto error;
+ else
+ s++;
+
if (*s++ == 'f' && isdigit (*s))
{
mask = *s++;
@@ -554,9 +587,8 @@ i860_ip (str)
}
}
else
- {
- mask -= '0';
- }
+ mask -= '0';
+
switch (*args)
{
@@ -571,19 +603,27 @@ i860_ip (str)
case 'g':
opcode |= mask << 16;
if (dual_mode != DUAL_OFF)
- opcode |= (1 << 9); /* dual mode instruction */
+ opcode |= (1 << 9);
if (dual_mode == DUAL_DDOT)
dual_mode = DUAL_OFF;
if (dual_mode == DUAL_ONDDOT)
dual_mode = DUAL_ON;
- if ((opcode & (1 << 10)) && (mask == ((opcode >> 11) & 0x1f)))
- as_warn (_("Fsr1 equals fdest with Pipelining"));
+ if ((opcode & (1 << 10)) && mask != 0
+ && (mask == ((opcode >> 11) & 0x1f)))
+ as_warn (_("Pipelined instruction: fsrc1 = fdest"));
continue;
}
}
break;
- case 'c': /* next operand must be a control register */
+ /* Next operand must be a control register. */
+ case 'c':
+ /* Check for register prefix if necessary. */
+ if (reg_prefix && *s != reg_prefix)
+ goto error;
+ else
+ s++;
+
if (strncmp (s, "fir", 3) == 0)
{
opcode |= 0x0 << 21;
@@ -622,86 +662,170 @@ i860_ip (str)
}
break;
- case '5': /* 5 bit immediate in src1 */
- memset (&the_insn, '\0', sizeof (the_insn));
- if (!getExpression (s))
+ /* 5-bit immediate in src1. */
+ case '5':
+ if (! i860_get_expression (s))
{
s = expr_end;
- if (the_insn.exp.X_add_number & ~0x1f)
- as_bad (_("5-bit immediate too large"));
- opcode |= (the_insn.exp.X_add_number & 0x1f) << 11;
- memset (&the_insn, '\0', sizeof (the_insn));
- the_insn.reloc = NO_RELOC;
+ the_insn.fup |= OP_IMM_U5;
continue;
}
break;
- case 'l': /* 26 bit immediate, relative branch */
- the_insn.reloc = BRADDR;
+ /* 26-bit immediate, relative branch (lbroff). */
+ case 'l':
the_insn.pcrel = 1;
+ the_insn.fup |= OP_IMM_BR26;
goto immediate;
- case 's': /* 16 bit immediate, split relative branch */
- /* upper 5 bits of offset in dest field */
+ /* 16-bit split immediate, relative branch (sbroff). */
+ case 'r':
the_insn.pcrel = 1;
- the_insn.reloc = SPLIT0;
+ the_insn.fup |= OP_IMM_BR16;
goto immediate;
- case 'S': /* 16 bit immediate, split (st), aligned */
- if (opcode & (1 << 28))
- if (opcode & 0x1)
- the_insn.reloc = SPLIT2;
- else
- the_insn.reloc = SPLIT1;
- else
- the_insn.reloc = SPLIT0;
+ /* 16-bit split immediate. */
+ case 's':
+ the_insn.fup |= OP_IMM_SPLIT16;
+ goto immediate;
+
+ /* 16-bit split immediate, byte aligned (st.b). */
+ case 'S':
+ the_insn.fup |= OP_IMM_SPLIT16;
+ goto immediate;
+
+ /* 16-bit split immediate, half-word aligned (st.s). */
+ case 'T':
+ the_insn.fup |= (OP_IMM_SPLIT16 | OP_ENCODE1 | OP_ALIGN2);
+ goto immediate;
+
+ /* 16-bit split immediate, word aligned (st.l). */
+ case 'U':
+ the_insn.fup |= (OP_IMM_SPLIT16 | OP_ENCODE1 | OP_ALIGN4);
goto immediate;
- case 'I': /* 16 bit immediate, aligned */
- if (opcode & (1 << 28))
- if (opcode & 0x1)
- the_insn.reloc = LOW2;
- else
- the_insn.reloc = LOW1;
+ /* 16-bit immediate. */
+ case 'i':
+ the_insn.fup |= OP_IMM_S16;
+ goto immediate;
+
+ /* 16-bit immediate, byte aligned (ld.b). */
+ case 'I':
+ the_insn.fup |= OP_IMM_S16;
+ goto immediate;
+
+ /* 16-bit immediate, half-word aligned (ld.s). */
+ case 'J':
+ the_insn.fup |= (OP_IMM_S16 | OP_ENCODE1 | OP_ALIGN2);
+ goto immediate;
+
+ /* 16-bit immediate, word aligned (ld.l, {p}fld.l, fst.l). */
+ case 'K':
+ if (insn->name[0] == 'l')
+ the_insn.fup |= (OP_IMM_S16 | OP_ENCODE1 | OP_ALIGN4);
else
- the_insn.reloc = LOW0;
+ the_insn.fup |= (OP_IMM_S16 | OP_ENCODE2 | OP_ALIGN4);
+ goto immediate;
+
+ /* 16-bit immediate, double-word aligned ({p}fld.d, fst.d). */
+ case 'L':
+ the_insn.fup |= (OP_IMM_S16 | OP_ENCODE3 | OP_ALIGN8);
goto immediate;
- case 'i': /* 16 bit immediate */
- the_insn.reloc = LOW0;
+ /* 16-bit immediate, quad-word aligned (fld.q, fst.q). */
+ case 'M':
+ the_insn.fup |= (OP_IMM_S16 | OP_ENCODE3 | OP_ALIGN16);
/*FALLTHROUGH*/
+ /* Handle the immediate for either the Intel syntax or
+ SVR4 syntax. The Intel syntax is "ha%immediate"
+ whereas SVR4 syntax is "[immediate]@ha". */
immediate:
+#ifdef SYNTAX_SVR4
+ if (*s == ' ')
+ s++;
+
+ /* Note that if i860_get_expression() fails, we will still
+ have created U entries in the symbol table for the
+ 'symbols' in the input string. Try not to create U
+ symbols for registers, etc. */
+ if (! i860_get_expression (s))
+ s = expr_end;
+ else
+ goto error;
+
+ if (strncmp (s, "@ha", 3) == 0)
+ {
+ the_insn.fup |= OP_SEL_HA;
+ s += 3;
+ }
+ else if (strncmp (s, "@h", 2) == 0)
+ {
+ the_insn.fup |= OP_SEL_H;
+ s += 2;
+ }
+ else if (strncmp (s, "@l", 2) == 0)
+ {
+ the_insn.fup |= OP_SEL_L;
+ s += 2;
+ }
+ else if (strncmp (s, "@gotoff", 7) == 0
+ || strncmp (s, "@GOTOFF", 7) == 0)
+ {
+ as_bad (_("Assembler does not yet support PIC"));
+ the_insn.fup |= OP_SEL_GOTOFF;
+ s += 7;
+ }
+ else if (strncmp (s, "@got", 4) == 0
+ || strncmp (s, "@GOT", 4) == 0)
+ {
+ as_bad (_("Assembler does not yet support PIC"));
+ the_insn.fup |= OP_SEL_GOT;
+ s += 4;
+ }
+ else if (strncmp (s, "@plt", 4) == 0
+ || strncmp (s, "@PLT", 4) == 0)
+ {
+ as_bad (_("Assembler does not yet support PIC"));
+ the_insn.fup |= OP_SEL_PLT;
+ s += 4;
+ }
+
+ the_insn.expand = insn->expand;
+
+ continue;
+#else /* ! SYNTAX_SVR4 */
if (*s == ' ')
s++;
if (strncmp (s, "ha%", 3) == 0)
{
- the_insn.highlow = HIGHADJ;
+ the_insn.fup |= OP_SEL_HA;
s += 3;
}
else if (strncmp (s, "h%", 2) == 0)
{
- the_insn.highlow = HIGH;
+ the_insn.fup |= OP_SEL_H;
s += 2;
}
else if (strncmp (s, "l%", 2) == 0)
{
- the_insn.highlow = PAIR;
+ the_insn.fup |= OP_SEL_L;
s += 2;
}
the_insn.expand = insn->expand;
- /* Note that if the getExpression() fails, we will still have
- created U entries in the symbol table for the 'symbols'
- in the input string. Try not to create U symbols for
- registers, etc. */
+ /* Note that if i860_get_expression() fails, we will still
+ have created U entries in the symbol table for the
+ 'symbols' in the input string. Try not to create U
+ symbols for registers, etc. */
+ if (! i860_get_expression (s))
+ s = expr_end;
+ else
+ goto error;
- if (!getExpression (s))
- {
- s = expr_end;
- continue;
- }
+ continue;
+#endif /* SYNTAX_SVR4 */
break;
default:
@@ -713,16 +837,16 @@ i860_ip (str)
if (match == 0)
{
/* Args don't match. */
- if (&insn[1] - i860_opcodes < NUMOPCODES
- && !strcmp (insn->name, insn[1].name))
+ if (insn[1].name != NULL
+ && ! strcmp (insn->name, insn[1].name))
{
++insn;
- s = argsStart;
+ s = args_start;
continue;
}
else
{
- as_bad (_("Illegal operands"));
+ as_bad (_("Illegal operands for %s"), insn->name);
return;
}
}
@@ -733,7 +857,7 @@ i860_ip (str)
}
static int
-getExpression (str)
+i860_get_expression (str)
char *str;
{
char *save_in;
@@ -756,17 +880,12 @@ getExpression (str)
return 0;
}
+/* 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. */
-/*
- This is identical to the md_atof in m68k.c. I think this is right,
- but I'm not sure.
-
- Turn a string in input_line_pointer into a floating point constant of type
- type, and store the appropriate bytes in *litP. The number of LITTLENUMS
- emitted is stored in *sizeP . An error message is returned, or NULL on OK.
- */
-
-/* Equal to MAX_PRECISION in atof-ieee.c */
+/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
char *
@@ -783,7 +902,6 @@ md_atof (type, litP, sizeP)
switch (type)
{
-
case 'f':
case 'F':
case 's':
@@ -824,226 +942,60 @@ md_atof (type, litP, sizeP)
return 0;
}
-/*
- * Write out big-endian.
- */
+/* Write out in current endian mode. */
void
md_number_to_chars (buf, val, n)
char *buf;
valueT val;
int n;
{
- number_to_chars_bigendian (buf, val, n);
-}
-
-void
-md_number_to_imm (buf, val, n, fixP)
- char *buf;
- long val;
- int n;
- fixS *fixP;
-{
- enum reloc_type reloc = fixP->fx_r_type & 0xf;
- enum highlow_type highlow = (fixP->fx_r_type >> 4) & 0x3;
-
- assert (buf);
- assert (n == 4); /* always on i860 */
-
- switch (highlow)
- {
-
- case HIGHADJ: /* adjusts the high-order 16-bits */
- if (val & (1 << 15))
- val += (1 << 16);
-
- /*FALLTHROUGH*/
-
- case HIGH: /* selects the high-order 16-bits */
- val >>= 16;
- break;
-
- case PAIR: /* selects the low-order 16-bits */
- val = val & 0xffff;
- break;
-
- default:
- break;
- }
-
- switch (reloc)
- {
-
- case BRADDR: /* br,call,bc,bc.t,bnc,bnc.t w/26-bit immediate */
- if (fixP->fx_pcrel != 1)
- as_bad (_("26-bit branch w/o pc relative set: 0x%08x"), val);
- val >>= 2; /* align pcrel offset, see manual */
-
- if (val >= (1 << 25) || val < -(1 << 25)) /* check for overflow */
- as_bad (_("26-bit branch offset overflow: 0x%08x"), val);
- buf[0] = (buf[0] & 0xfc) | ((val >> 24) & 0x3);
- buf[1] = val >> 16;
- buf[2] = val >> 8;
- buf[3] = val;
- break;
-
- case SPLIT2: /* 16 bit immediate, 4-byte aligned */
- if (val & 0x3)
- as_bad (_("16-bit immediate 4-byte alignment error: 0x%08x"), val);
- val &= ~0x3; /* 4-byte align value */
- /*FALLTHROUGH*/
- case SPLIT1: /* 16 bit immediate, 2-byte aligned */
- if (val & 0x1)
- as_bad (_("16-bit immediate 2-byte alignment error: 0x%08x"), val);
- val &= ~0x1; /* 2-byte align value */
- /*FALLTHROUGH*/
- case SPLIT0: /* st,bla,bte,btne w/16-bit immediate */
- if (fixP->fx_pcrel == 1)
- val >>= 2; /* align pcrel offset, see manual */
- /* check for bounds */
- if (highlow != PAIR && (val >= (1 << 16) || val < -(1 << 15)))
- as_bad (_("16-bit branch offset overflow: 0x%08x"), val);
- buf[1] = (buf[1] & ~0x1f) | ((val >> 11) & 0x1f);
- buf[2] = (buf[2] & ~0x7) | ((val >> 8) & 0x7);
- buf[3] |= val; /* perserve bottom opcode bits */
- break;
-
- case LOW4: /* fld,pfld,pst,flush 16-byte aligned */
- if (val & 0xf)
- as_bad (_("16-bit immediate 16-byte alignment error: 0x%08x"), val);
- val &= ~0xf; /* 16-byte align value */
- /*FALLTHROUGH*/
- case LOW3: /* fld,pfld,pst,flush 8-byte aligned */
- if (val & 0x7)
- as_bad (_("16-bit immediate 8-byte alignment error: 0x%08x"), val);
- val &= ~0x7; /* 8-byte align value */
- /*FALLTHROUGH*/
- case LOW2: /* 16 bit immediate, 4-byte aligned */
- if (val & 0x3)
- as_bad (_("16-bit immediate 4-byte alignment error: 0x%08x"), val);
- val &= ~0x3; /* 4-byte align value */
- /*FALLTHROUGH*/
- case LOW1: /* 16 bit immediate, 2-byte aligned */
- if (val & 0x1)
- as_bad (_("16-bit immediate 2-byte alignment error: 0x%08x"), val);
- val &= ~0x1; /* 2-byte align value */
- /*FALLTHROUGH*/
- case LOW0: /* 16 bit immediate, byte aligned */
- /* check for bounds */
- if (highlow != PAIR && (val >= (1 << 16) || val < -(1 << 15)))
- as_bad (_("16-bit immediate overflow: 0x%08x"), val);
- buf[2] = val >> 8;
- buf[3] |= val; /* perserve bottom opcode bits */
- break;
-
- case NO_RELOC:
- default:
- as_bad (_("bad relocation type: 0x%02x"), reloc);
- break;
- }
+ if (target_big_endian)
+ number_to_chars_bigendian (buf, val, n);
+ else
+ number_to_chars_littleendian (buf, val, n);
}
-/* should never be called for i860 */
+/* This should never be called for i860. */
void
md_number_to_disp (buf, val, n)
- char *buf;
- long val;
+ char *buf ATTRIBUTE_UNUSED;
+ long val ATTRIBUTE_UNUSED;
+ int n ATTRIBUTE_UNUSED;
{
as_fatal (_("md_number_to_disp\n"));
}
-/* should never be called for i860 */
+/* This should never be called for i860. */
void
md_number_to_field (buf, val, fix)
- char *buf;
- long val;
- void *fix;
+ char *buf ATTRIBUTE_UNUSED;
+ long val ATTRIBUTE_UNUSED;
+ void *fix ATTRIBUTE_UNUSED;
{
as_fatal (_("i860_number_to_field\n"));
}
-/* the bit-field entries in the relocation_info struct plays hell
- with the byte-order problems of cross-assembly. So as a hack,
- I added this mach. dependent ri twiddler. Ugly, but it gets
- you there. -KWK */
-/* on i860: first 4 bytes are normal unsigned long address, next three
- bytes are index, most sig. byte first. Byte 7 is broken up with
- bit 7 as pcrel, bit 6 as extern, and the lower six bits as
- relocation type (highlow 5-4). Next 4 bytes are long addend. */
-/* Thanx and a tip of the hat to Michael Bloom, mb@ttidca.tti.com */
-void
-md_ri_to_chars (ri_p, ri)
- struct relocation_info *ri_p, ri;
-{
-#if 0
- unsigned char the_bytes[sizeof (*ri_p)];
-
- /* this is easy */
- md_number_to_chars (the_bytes, ri.r_address, sizeof (ri.r_address));
- /* now the fun stuff */
- the_bytes[4] = (ri.r_index >> 16) & 0x0ff;
- the_bytes[5] = (ri.r_index >> 8) & 0x0ff;
- the_bytes[6] = ri.r_index & 0x0ff;
- the_bytes[7] = ((ri.r_extern << 7) & 0x80) | (0 & 0x60) | (ri.r_type & 0x1F);
- /* Also easy */
- md_number_to_chars (&the_bytes[8], ri.r_addend, sizeof (ri.r_addend));
- /* now put it back where you found it, Junior... */
- memcpy ((char *) ri_p, the_bytes, sizeof (*ri_p));
-#endif
-}
-
-/* should never be called for i860 */
-void
-md_convert_frag (headers, seg, fragP)
- object_headers *headers;
- segT seg;
- register fragS *fragP;
-{
- as_fatal (_("i860_convert_frag\n"));
-}
-
-/* should never be called for i860 */
+/* This should never be called for i860. */
int
md_estimate_size_before_relax (fragP, segtype)
- register fragS *fragP;
- segT segtype;
+ register fragS *fragP ATTRIBUTE_UNUSED;
+ segT segtype ATTRIBUTE_UNUSED;
{
as_fatal (_("i860_estimate_size_before_relax\n"));
}
-/* for debugging only, must match enum reloc_type */
-static char *Reloc[] =
-{
- "NO_RELOC",
- "BRADDR",
- "LOW0",
- "LOW1",
- "LOW2",
- "LOW3",
- "LOW4",
- "SPLIT0",
- "SPLIT1",
- "SPLIT2",
- "RELOC_32",
-};
-static char *Highlow[] =
-{
- "NO_SPEC",
- "PAIR",
- "HIGH",
- "HIGHADJ",
-};
+#ifdef DEBUG_I860
static void
print_insn (insn)
struct i860_it *insn;
{
if (insn->error)
- {
- fprintf (stderr, "ERROR: %s\n");
- }
- fprintf (stderr, "opcode=0x%08x\t", insn->opcode);
- fprintf (stderr, "expand=0x%08x\t", insn->expand);
- fprintf (stderr, "reloc = %s\t", Reloc[insn->reloc]);
- fprintf (stderr, "highlow = %s\n", Highlow[insn->highlow]);
+ fprintf (stderr, "ERROR: %s\n", insn->error);
+
+ fprintf (stderr, "opcode = 0x%08lx\t", insn->opcode);
+ fprintf (stderr, "expand = 0x%x\t", insn->expand);
+ fprintf (stderr, "reloc = %s\t\n",
+ bfd_get_reloc_code_name (insn->reloc));
fprintf (stderr, "exp = {\n");
fprintf (stderr, "\t\tX_add_symbol = %s\n",
insn->exp.X_add_symbol ?
@@ -1053,211 +1005,393 @@ print_insn (insn)
insn->exp.X_op_symbol ?
(S_GET_NAME (insn->exp.X_op_symbol) ?
S_GET_NAME (insn->exp.X_op_symbol) : "???") : "0");
- fprintf (stderr, "\t\tX_add_number = %d\n",
+ fprintf (stderr, "\t\tX_add_number = %lx\n",
insn->exp.X_add_number);
fprintf (stderr, "}\n");
}
+#endif /* DEBUG_I860 */
+
+#ifdef OBJ_ELF
+CONST char *md_shortopts = "VQ:";
+#else
CONST char *md_shortopts = "";
+#endif
+
+#define OPTION_EB (OPTION_MD_BASE + 0)
+#define OPTION_EL (OPTION_MD_BASE + 1)
+#define OPTION_WARN_EXPAND (OPTION_MD_BASE + 2)
+
struct option md_longopts[] = {
- {NULL, no_argument, NULL, 0}
+ { "EB", no_argument, NULL, OPTION_EB },
+ { "EL", no_argument, NULL, OPTION_EL },
+ { "mwarn-expand", no_argument, NULL, OPTION_WARN_EXPAND },
+ { NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
int c;
- char *arg;
+ char *arg ATTRIBUTE_UNUSED;
{
- return 0;
+ switch (c)
+ {
+ case OPTION_EB:
+ target_big_endian = 1;
+ break;
+
+ case OPTION_EL:
+ target_big_endian = 0;
+ break;
+
+ case OPTION_WARN_EXPAND:
+ target_warn_expand = 1;
+ break;
+
+#ifdef OBJ_ELF
+ /* SVR4 argument compatibility (-V): print version ID. */
+ case 'V':
+ print_version_id ();
+ break;
+
+ /* SVR4 argument compatibility (-Qy, -Qn): controls whether
+ a .comment section should be emitted or not (ignored). */
+ case 'Q':
+ break;
+#endif
+
+ default:
+ return 0;
+ }
+
+ return 1;
}
void
md_show_usage (stream)
FILE *stream;
{
+ fprintf (stream, _("\
+ -EL generate code for little endian mode (default)\n\
+ -EB generate code for big endian mode\n\
+ -mwarn-expand warn if pseudo operations are expanded\n"));
+#ifdef OBJ_ELF
+ /* SVR4 compatibility flags. */
+ fprintf (stream, _("\
+ -V print assembler version number\n\
+ -Qy, -Qn ignored\n"));
+#endif
}
+
-#ifdef comment
-/*
- * I860 relocations are completely different, so it needs
- * this machine dependent routine to emit them.
- */
+/* We have no need to default values of symbols. */
+symbolS *
+md_undefined_symbol (name)
+ char *name ATTRIBUTE_UNUSED;
+{
+ return 0;
+}
+
+/* The i860 denotes auto-increment with '++'. */
void
-emit_machine_reloc (fixP, segment_address_in_file)
- register fixS *fixP;
- relax_addressT segment_address_in_file;
+md_operand (exp)
+ expressionS *exp;
{
- struct reloc_info_i860 ri;
- register symbolS *symbolP;
- extern char *next_object_file_charP;
- long add_number;
+ char *s;
- memset ((char *) &ri, '\0', sizeof (ri));
- for (; fixP; fixP = fixP->fx_next)
+ for (s = input_line_pointer; *s; s++)
{
-
- if (fixP->fx_r_type & ~0x3f)
+ if (s[0] == '+' && s[1] == '+')
{
- as_fatal ("fixP->fx_r_type = %d\n", fixP->fx_r_type);
+ input_line_pointer += 2;
+ exp->X_op = O_register;
+ break;
}
- ri.r_pcrel = fixP->fx_pcrel;
- ri.r_type = fixP->fx_r_type;
+ }
+}
- if ((symbolP = fixP->fx_addsy) != NULL)
+/* Round up a section size to the appropriate boundary. */
+valueT
+md_section_align (segment, size)
+ segT segment ATTRIBUTE_UNUSED;
+ valueT size ATTRIBUTE_UNUSED;
+{
+ /* Byte alignment is fine. */
+ return size;
+}
+
+/* On the i860, a PC-relative offset is relative to the address of the
+ of the offset plus its size. */
+long
+md_pcrel_from (fixP)
+ fixS *fixP;
+{
+ return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address;
+}
+
+/* Determine the relocation needed for non PC-relative 16-bit immediates.
+ Also adjust the given immediate as necessary. Finally, check that
+ all constraints (such as alignment) are satisfied. */
+static bfd_reloc_code_real_type
+obtain_reloc_for_imm16 (fix, val)
+ fixS *fix;
+ long *val;
+{
+ valueT fup = fix->fx_addnumber;
+ bfd_reloc_code_real_type reloc;
+
+ if (fix->fx_pcrel)
+ abort ();
+
+ /* Check alignment restrictions. */
+ if ((fup & OP_ALIGN2) && (*val & 0x1))
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("This immediate requires 0 MOD 2 alignment"));
+ else if ((fup & OP_ALIGN4) && (*val & 0x3))
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("This immediate requires 0 MOD 4 alignment"));
+ else if ((fup & OP_ALIGN8) && (*val & 0x7))
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("This immediate requires 0 MOD 8 alignment"));
+ else if ((fup & OP_ALIGN16) && (*val & 0xf))
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("This immediate requires 0 MOD 16 alignment"));
+
+ if (fup & OP_SEL_HA)
+ {
+ *val = (*val >> 16) + (*val & 0x8000 ? 1 : 0);
+ reloc = BFD_RELOC_860_HIGHADJ;
+ }
+ else if (fup & OP_SEL_H)
+ {
+ *val >>= 16;
+ reloc = BFD_RELOC_860_HIGH;
+ }
+ else if (fup & OP_SEL_L)
+ {
+ int num_encode;
+ if (fup & OP_IMM_SPLIT16)
{
- ri.r_address = fixP->fx_frag->fr_address +
- fixP->fx_where - segment_address_in_file;
- if (!S_IS_DEFINED (symbolP))
+ if (fup & OP_ENCODE1)
{
- ri.r_extern = 1;
- ri.r_symbolnum = symbolP->sy_number;
+ num_encode = 1;
+ reloc = BFD_RELOC_860_SPLIT1;
+ }
+ else if (fup & OP_ENCODE2)
+ {
+ num_encode = 2;
+ reloc = BFD_RELOC_860_SPLIT2;
}
else
{
- ri.r_extern = 0;
- ri.r_symbolnum = S_GET_TYPE (symbolP);
+ num_encode = 0;
+ reloc = BFD_RELOC_860_SPLIT0;
+ }
+ }
+ else
+ {
+ if (fup & OP_ENCODE1)
+ {
+ num_encode = 1;
+ reloc = BFD_RELOC_860_LOW1;
}
- if (symbolP && symbol_get_frag (symbolP))
+ else if (fup & OP_ENCODE2)
{
- ri.r_addend = symbol_get_frag (symbolP)->fr_address;
+ num_encode = 2;
+ reloc = BFD_RELOC_860_LOW2;
}
- ri.r_type = fixP->fx_r_type;
- if (fixP->fx_pcrel)
+ else if (fup & OP_ENCODE3)
{
- /* preserve actual offset vs. pc + 4 */
- ri.r_addend -= (ri.r_address + 4);
+ num_encode = 3;
+ reloc = BFD_RELOC_860_LOW3;
}
else
{
- ri.r_addend = fixP->fx_addnumber;
+ num_encode = 0;
+ reloc = BFD_RELOC_860_LOW0;
}
-
- md_ri_to_chars ((char *) &ri, ri);
- append (&next_object_file_charP, (char *) &ri, sizeof (ri));
}
+
+ /* Preserve size encode bits. */
+ *val &= ~((1 << num_encode) - 1);
+ }
+ else
+ {
+ /* No selector. What reloc do we generate (???)? */
+ reloc = BFD_RELOC_32;
}
+
+ return reloc;
}
-#endif /* comment */
+/* Attempt to simplify or eliminate a fixup. To indicate that a fixup
+ has been eliminated, set fix->fx_done. If fix->fx_addsy is non-NULL,
+ we will have to generate a reloc entry. */
+int
+md_apply_fix3 (fix, valuep, seg)
+ fixS *fix;
+ valueT *valuep;
+ segT seg ATTRIBUTE_UNUSED;
+{
-#ifdef OBJ_AOUT
+ char *buf;
+ long val = (long) (*valuep);
+ unsigned long insn;
+ valueT fup;
-/* on i860: first 4 bytes are normal unsigned long address, next three
- bytes are index, most sig. byte first. Byte 7 is broken up with
- bit 7 as pcrel, bit 6 as extern, and the lower six bits as
- relocation type (highlow 5-4). Next 4 bytes are long addend. */
+ buf = fix->fx_frag->fr_literal + fix->fx_where;
-void
-tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
- char *where;
- fixS *fixP;
- relax_addressT segment_address_in_file;
-{
- long r_index;
- long r_extern;
- long r_addend = 0;
- long r_address;
+ /* Recall that earlier we stored the opcode little-endian. */
+ insn = bfd_getl32 (buf);
- know (fixP->fx_addsy);
- know (!(fixP->fx_r_type & ~0x3f));
+ /* We stored a fix-up in this oddly-named scratch field. */
+ fup = fix->fx_addnumber;
- if (!S_IS_DEFINED (fixP->fx_addsy))
+ /* Determine the necessary relocations as well as inserting an
+ immediate into the instruction. */
+ if (fup == OP_IMM_U5)
{
- r_extern = 1;
- r_index = fixP->fx_addsy->sy_number;
+ if (val & ~0x1f)
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("5-bit immediate too large"));
+ if (fix->fx_addsy)
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("5-bit field must be absolute"));
+
+ insn |= (val & 0x1f) << 11;
+ bfd_putl32 (insn, buf);
+ fix->fx_r_type = BFD_RELOC_NONE;
+ fix->fx_done = 1;
}
- else
+ else if (fup & OP_IMM_S16)
{
- r_extern = 0;
- r_index = S_GET_TYPE (fixP->fx_addsy);
+ fix->fx_r_type = obtain_reloc_for_imm16 (fix, &val);
+
+ /* Insert the immediate. */
+ if (fix->fx_addsy)
+ fix->fx_done = 0;
+ else
+ {
+ insn |= val & 0xffff;
+ bfd_putl32 (insn, buf);
+ fix->fx_r_type = BFD_RELOC_NONE;
+ fix->fx_done = 1;
+ }
}
+ else if (fup & OP_IMM_U16)
+ {
+ abort ();
+ }
+ else if (fup & OP_IMM_SPLIT16)
+ {
+ fix->fx_r_type = obtain_reloc_for_imm16 (fix, &val);
- md_number_to_chars (where,
- r_address = fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file,
- 4);
+ /* Insert the immediate. */
+ if (fix->fx_addsy)
+ fix->fx_done = 0;
+ else
+ {
+ insn |= val & 0x7ff;
+ insn |= (val & 0xf800) << 5;
+ bfd_putl32 (insn, buf);
+ fix->fx_r_type = BFD_RELOC_NONE;
+ fix->fx_done = 1;
+ }
+ }
+ else if (fup & OP_IMM_BR16)
+ {
+ if (val & 0x3)
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("A branch offset requires 0 MOD 4 alignment"));
- where[4] = (r_index >> 16) & 0x0ff;
- where[5] = (r_index >> 8) & 0x0ff;
- where[6] = r_index & 0x0ff;
- where[7] = (((fixP->fx_pcrel << 7) & 0x80)
- | ((r_extern << 6) & 0x40)
- | (fixP->fx_r_type & 0x3F));
+ val = val >> 2;
- if (symbol_get_frag (fixP->fx_addsy))
- {
- r_addend = symbol_get_frag (fixP->fx_addsy)->fr_address;
+ /* Insert the immediate. */
+ if (fix->fx_addsy)
+ {
+ fix->fx_done = 0;
+ fix->fx_r_type = BFD_RELOC_860_PC16;
+ }
+ else
+ {
+ insn |= (val & 0x7ff);
+ insn |= ((val & 0xf800) << 5);
+ bfd_putl32 (insn, buf);
+ fix->fx_r_type = BFD_RELOC_NONE;
+ fix->fx_done = 1;
+ }
}
+ else if (fup & OP_IMM_BR26)
+ {
+ if (val & 0x3)
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("A branch offset requires 0 MOD 4 alignment"));
- if (fixP->fx_pcrel)
+ val >>= 2;
+
+ /* Insert the immediate. */
+ if (fix->fx_addsy)
+ {
+ fix->fx_r_type = BFD_RELOC_860_PC26;
+ fix->fx_done = 0;
+ }
+ else
+ {
+ insn |= (val & 0x3ffffff);
+ bfd_putl32 (insn, buf);
+ fix->fx_r_type = BFD_RELOC_NONE;
+ fix->fx_done = 1;
+ }
+ }
+ else if (fup != OP_NONE)
{
- /* preserve actual offset vs. pc + 4 */
- r_addend -= (r_address + 4);
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("Unrecognized fix-up (0x%08x)"), fup);
+ abort ();
}
else
{
- r_addend = fixP->fx_addnumber;
+ /* I believe only fix-ups such as ".long .ep.main-main+0xc8000000"
+ reach here (???). */
+ if (fix->fx_addsy)
+ {
+ fix->fx_r_type = BFD_RELOC_32;
+ fix->fx_done = 0;
+ }
+ else
+ {
+ insn |= (val & 0xffffffff);
+ bfd_putl32 (insn, buf);
+ fix->fx_r_type = BFD_RELOC_NONE;
+ fix->fx_done = 1;
+ }
}
- md_number_to_chars (&where[8], r_addend, 4);
-}
-
-#endif /* OBJ_AOUT */
-
-/* We have no need to default values of symbols. */
-
-/* ARGSUSED */
-symbolS *
-md_undefined_symbol (name)
- char *name;
-{
+ /* Return value ignored. */
return 0;
}
-/* Round up a section size to the appropriate boundary. */
-valueT
-md_section_align (segment, size)
- segT segment;
- valueT size;
+/* Generate a machine dependent reloc from a fixup. */
+arelent*
+tc_gen_reloc (section, fixp)
+ asection *section ATTRIBUTE_UNUSED;
+ fixS *fixp;
{
- return size; /* Byte alignment is fine */
-}
+ arelent *reloc;
-/* Exactly what point is a PC-relative offset relative TO?
- On the i860, they're relative to the address of the offset, plus
- its size. (??? Is this right? FIXME-SOON!) */
-long
-md_pcrel_from (fixP)
- fixS *fixP;
-{
- return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address;
-}
+ reloc = xmalloc (sizeof (*reloc));
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+ reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
+ reloc->addend = fixp->fx_offset;
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
-void
-md_apply_fix (fixP, val)
- fixS *fixP;
- long val;
-{
- char *place = fixP->fx_where + fixP->fx_frag->fr_literal;
-
- /* looks to me like i860 never has bit fixes. Let's see. xoxorich. */
- know (fixP->fx_bit_fixP == NULL);
- if (!fixP->fx_bit_fixP)
+ if (! reloc->howto)
{
- fixP->fx_addnumber = val;
- md_number_to_imm (place, val, fixP->fx_size, fixP);
- }
- else
- {
- md_number_to_field (place, val, fixP->fx_bit_fixP);
+ 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 reloc;
}
-
-/*
- * Local Variables:
- * fill-column: 131
- * comment-column: 0
- * End:
- */
-
-/* end of tc-i860.c */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-i860.h b/gnu/usr.bin/binutils/gas/config/tc-i860.h
index afb21c1b556..c9b67717a10 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-i860.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-i860.h
@@ -1,5 +1,9 @@
-/* tc-i860.h -- Header file for the I860
- Copyright (C) 1991, 92, 95, 1998 Free Software Foundation, Inc.
+/* tc-i860.h -- Header file for the i860.
+ Copyright 1991, 1992, 1995, 1998, 2000
+ Free Software Foundation, Inc.
+
+ Brought back from the dead and completely reworked
+ by Jason Eckhardt <jle@cygnus.com>.
This file is part of GAS, the GNU Assembler.
@@ -17,23 +21,64 @@
with GAS; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#ifndef TC_I860
#define TC_I860 1
-#define TARGET_BYTES_BIG_ENDIAN 1
+#ifndef BFD_ASSEMBLER
+#error i860 support requires BFD_ASSEMBLER
+#endif
-#define WORKING_DOT_WORD
+enum i860_fix_info
+{
+ OP_NONE = 0x00000,
+ OP_IMM_U5 = 0x00001,
+ OP_IMM_S16 = 0x00002,
+ OP_IMM_U16 = 0x00004,
+ OP_IMM_SPLIT16 = 0x00008,
+ OP_IMM_BR26 = 0x00010,
+ OP_IMM_BR16 = 0x00020,
+ OP_ENCODE1 = 0x00040,
+ OP_ENCODE2 = 0x00080,
+ OP_ENCODE3 = 0x00100,
+ OP_SEL_HA = 0x00200,
+ OP_SEL_H = 0x00400,
+ OP_SEL_L = 0x00800,
+ OP_SEL_GOT = 0x01000,
+ OP_SEL_GOTOFF = 0x02000,
+ OP_SEL_PLT = 0x04000,
+ OP_ALIGN2 = 0x08000,
+ OP_ALIGN4 = 0x10000,
+ OP_ALIGN8 = 0x20000,
+ OP_ALIGN16 = 0x40000
+};
+
+/* Set the endianness we are using. Default to little endian. */
+#ifndef TARGET_BYTES_BIG_ENDIAN
+#define TARGET_BYTES_BIG_ENDIAN 0
+#endif
+
+/* Whether or not the target is big endian. */
+extern int target_big_endian;
-#define tc_headers_hook(a) {;} /* not used */
-#define tc_crawl_symbol_chain(a) {;} /* not used */
-#define tc_aout_pre_write_hook(x) {;} /* not used */
+/* BFD target architecture. */
+#define TARGET_ARCH bfd_arch_i860
+
+/* The target BFD format. */
+#ifdef OBJ_ELF
+#define TARGET_FORMAT (target_big_endian ? "elf32-i860" : "elf32-i860-little")
+#else
+#error i860 GAS currently supports only the ELF object format
+#endif
+
+#define WORKING_DOT_WORD
+#define MD_APPLY_FIX3
+#define TC_HANDLES_FX_DONE
+#define DIFF_EXPR_OK
-#define md_operand(x)
+/* Permit temporary numeric labels. */
+#define LOCAL_LABELS_FB 1
+#define LISTING_HEADER "GAS for i860"
-/*
- * Local Variables:
- * comment-column: 0
- * fill-column: 131
- * End:
- */
+#define md_convert_frag(b,s,f) as_fatal (_("i860_convert_frag\n"));
-/* end of tc-i860.h */
+#endif /* TC_I860 */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-i960.c b/gnu/usr.bin/binutils/gas/config/tc-i960.c
index 13cedc175ae..7f14dffa956 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-i960.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-i960.c
@@ -1,5 +1,6 @@
/* tc-i960.c - All the i80960-specific stuff
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS.
@@ -19,7 +20,7 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/* See comment on md_parse_option for 80960-specific invocation options. */
+/* See comment on md_parse_option for 80960-specific invocation options. */
/* There are 4 different lengths of (potentially) symbol-based displacements
in the 80960 instruction set, each of which could require address fix-ups
@@ -178,11 +179,11 @@ const char comment_chars[] = "#";
#NO_APP at the beginning of its output.
*/
-/* Also note that comments started like this one will always work. */
+/* Also note that comments started like this one will always work. */
-const char line_comment_chars[1];
+const char line_comment_chars[] = "";
-const char line_separator_chars[1];
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
@@ -192,7 +193,6 @@ const char EXP_CHARS[] = "eE";
*/
const char FLT_CHARS[] = "fFdDtT";
-
/* Table used by base assembler to relax addresses based on varying length
instructions. The fields are:
1) most positive reach of this state,
@@ -242,13 +242,11 @@ const pseudo_typeS md_pseudo_table[] =
#define adds(e) e.X_add_symbol
#define offs(e) e.X_add_number
-
/* Branch-prediction bits for CTRL/COBR format opcodes */
#define BP_MASK 0x00000002 /* Mask for branch-prediction bit */
#define BP_TAKEN 0x00000000 /* Value to OR in to predict branch */
#define BP_NOT_TAKEN 0x00000002 /* Value to OR in to predict no branch */
-
/* Some instruction opcodes that we need explicitly */
#define BE 0x12000000
#define BG 0x11000000
@@ -268,14 +266,12 @@ const pseudo_typeS md_pseudo_table[] =
#define CALLS 0x66003800
#define RET 0x0a000000
-
-/* These masks are used to build up a set of MEMB mode bits. */
+/* These masks are used to build up a set of MEMB mode bits. */
#define A_BIT 0x0400
#define I_BIT 0x0800
#define MEMB_BIT 0x1000
#define D_BIT 0x2000
-
/* Mask for the only mode bit in a MEMA instruction (if set, abase reg is
used). */
#define MEMA_ABASE 0x2000
@@ -294,7 +290,6 @@ typedef struct
memS;
-
/* The two pieces of info we need to generate a register operand */
struct regop
{
@@ -303,7 +298,6 @@ struct regop
int n; /* Register number or literal value */
};
-
/* Number and assembler mnemonic for all registers that can appear in
operands. */
static const struct
@@ -449,13 +443,11 @@ aregs[] =
{ NULL, 0 }, /* END OF LIST */
};
-
/* Hash tables */
static struct hash_control *op_hash; /* Opcode mnemonics */
static struct hash_control *reg_hash; /* Register name hash table */
static struct hash_control *areg_hash; /* Abase register hash table */
-
/* Architecture for which we are assembling */
#define ARCH_ANY 0 /* Default: no architecture checking done */
#define ARCH_KA 1
@@ -470,7 +462,6 @@ int iclasses_seen; /* OR of instruction classes (I_* constants)
* instructions.
*/
-
/* BRANCH-PREDICTION INSTRUMENTATION
The following supports generation of branch-prediction instrumentation
@@ -592,7 +583,6 @@ md_assemble (textP)
const char *bp_error_msg = _("branch prediction invalid on this opcode");
-
/* Parse instruction into opcode and operands */
memset (args, '\0', sizeof (args));
n_ops = i_scan (textP, args);
@@ -611,8 +601,6 @@ md_assemble (textP)
}
}
-
-
/* Check for branch-prediction suffix on opcode mnemonic, strip it off */
n = strlen (args[0]) - 1;
branch_predict = 0;
@@ -735,9 +723,8 @@ md_chars_to_number (val, n)
return retval;
}
-
#define MAX_LITTLENUMS 6
-#define LNUM_SIZE sizeof(LITTLENUM_TYPE)
+#define LNUM_SIZE sizeof (LITTLENUM_TYPE)
/*****************************************************************************
md_atof: convert ascii to floating point
@@ -808,7 +795,6 @@ md_atof (type, litP, sizeP)
return 0;
}
-
/*****************************************************************************
md_number_to_imm
@@ -822,7 +808,6 @@ md_number_to_imm (buf, val, n)
md_number_to_chars (buf, val, n);
}
-
/*****************************************************************************
md_number_to_disp
@@ -918,7 +903,6 @@ md_number_to_field (instrP, val, bfixP)
A table of all such "Labels" is also generated.
-
-AKA, -AKB, -AKC, -ASA, -ASB, -AMC, -ACA:
Select the 80960 architecture. Instructions or features not
supported by the selected architecture cause fatal errors.
@@ -1264,7 +1248,6 @@ cobr_fmt (arg, opcode, oP)
instr |= (regop.n << 14) | regop.special;
}
-
if (n < 3)
{
emit (instr);
@@ -1293,7 +1276,6 @@ cobr_fmt (arg, opcode, oP)
}
} /* cobr_fmt() */
-
/*****************************************************************************
ctrl_fmt: generate a CTRL-format instruction
@@ -1309,7 +1291,6 @@ ctrl_fmt (targP, opcode, num_ops)
* how often the branch is taken
*/
-
if (num_ops == 0)
{
emit (opcode); /* Output opcode */
@@ -1339,7 +1320,6 @@ ctrl_fmt (targP, opcode, num_ops)
}
-
/*****************************************************************************
emit: output instruction binary
@@ -1359,7 +1339,6 @@ emit (instr)
return toP;
}
-
/*****************************************************************************
get_args: break individual arguments out of comma-separated list
@@ -1439,7 +1418,6 @@ get_args (p, args)
return n;
}
-
/*****************************************************************************
get_cdisp: handle displacement for a COBR or CTRL instruction.
@@ -1529,7 +1507,6 @@ get_cdisp (dispP, ifmtP, instr, numbits, var_frag, callj)
}
}
-
/*****************************************************************************
get_ispec: parse a memory operand for an index specification
@@ -1600,7 +1577,6 @@ get_regnum (regname)
return (rP == NULL) ? -1 : *rP;
}
-
/*****************************************************************************
i_scan: perform lexical scan of ascii assembler instruction.
@@ -1621,7 +1597,7 @@ get_regnum (regname)
*************************************************************************** */
static int
i_scan (iP, args)
- /* Pointer to ascii instruction; MUCKED BY US. */
+ /* Pointer to ascii instruction; MUCKED BY US. */
register char *iP;
/* Output arg: pointers to opcode and operands placed here. MUST
ACCOMMODATE 4 ENTRIES. */
@@ -1652,7 +1628,6 @@ i_scan (iP, args)
return (get_args (iP, args));
} /* i_scan() */
-
/*****************************************************************************
mem_fmt: generate a MEMA- or MEMB-format instruction
@@ -1680,7 +1655,7 @@ mem_fmt (args, oP, callx)
memset (&instr, '\0', sizeof (memS));
instr.opcode = oP->opcode;
- /* Process operands. */
+ /* Process operands. */
for (i = 1; i <= oP->num_ops; i++)
{
opdesc = oP->operand[i - 1];
@@ -1771,7 +1746,6 @@ mem_fmt (args, oP, callx)
}
} /* memfmt() */
-
/*****************************************************************************
mema_to_memb: convert a MEMA-format opcode to a MEMB-format opcode.
@@ -1804,7 +1778,6 @@ mema_to_memb (opcodeP)
md_number_to_chars (opcodeP, opcode, 4);
} /* mema_to_memb() */
-
/*****************************************************************************
parse_expr: parse an expression
@@ -1858,7 +1831,6 @@ parse_expr (textP, expP)
}
}
-
/*****************************************************************************
parse_ldcont:
Parse and replace a 'ldconst' pseudo-instruction with an appropriate
@@ -1885,7 +1857,6 @@ parse_ldconst (arg)
static char buf2[5]; /* Literal for second operand */
expressionS e; /* Parsed expression */
-
arg[3] = NULL; /* So we can tell at the end if it got used or not */
parse_expr (arg[1], &e);
@@ -2020,7 +1991,6 @@ parse_memop (memP, argP, optype)
16 /* MEM16 */
};
-
iprel_flag = mode = 0;
/* Any index present? */
@@ -2208,7 +2178,7 @@ parse_po (po_num)
extern char is_end_of_line[];
- /* Advance input pointer to end of line. */
+ /* Advance input pointer to end of line. */
p = input_line_pointer;
while (!is_end_of_line[(unsigned char) *input_line_pointer])
{
@@ -2358,7 +2328,6 @@ reg_fmt (args, oP)
struct regop regop; /* Description of register operand */
int n_ops; /* Number of operands */
-
instr = oP->opcode;
n_ops = oP->num_ops;
@@ -2425,7 +2394,6 @@ reg_fmt (args, oP)
emit (instr);
}
-
/*****************************************************************************
relax_cobr:
Replace cobr instruction in a code fragment with equivalent branch and
@@ -2512,7 +2480,6 @@ relax_cobr (fragP)
frag_wane (fragP);
}
-
/*****************************************************************************
reloc_callj: Relocate a 'callj' instruction
@@ -2580,7 +2547,6 @@ reloc_callj (fixP)
/* else Symbol is neither a sysproc nor a leafproc */
}
-
/*****************************************************************************
s_leafproc: process .leafproc pseudo-op
@@ -2610,7 +2576,7 @@ s_leafproc (n_ops, args)
return;
} /* Check number of arguments */
- /* Find or create symbol for 'call' entry point. */
+ /* Find or create symbol for 'call' entry point. */
callP = symbol_find_or_make (args[1]);
if (TC_S_IS_CALLNAME (callP))
@@ -2644,7 +2610,6 @@ s_leafproc (n_ops, args)
} /* if only one arg, or the args are the same */
}
-
/*
s_sysproc: process .sysproc pseudo-op
@@ -2670,7 +2635,7 @@ s_sysproc (n_ops, args)
return;
} /* bad arg count */
- /* Parse "entry_num" argument and check it for validity. */
+ /* Parse "entry_num" argument and check it for validity. */
parse_expr (args[2], &exp);
if (exp.X_op != O_constant
|| (offs (exp) < 0)
@@ -2692,7 +2657,6 @@ s_sysproc (n_ops, args)
TC_S_FORCE_TO_SYSPROC (symP);
}
-
/*****************************************************************************
shift_ok:
Determine if a "shlo" instruction can be used to implement a "ldconst".
@@ -2729,7 +2693,6 @@ shift_ok (n)
return shift;
}
-
/* syntax: issue syntax error */
static void
@@ -2738,7 +2701,6 @@ syntax ()
as_bad (_("syntax error"));
} /* syntax() */
-
/* targ_has_sfr:
Return TRUE iff the target architecture supports the specified
@@ -2764,7 +2726,6 @@ targ_has_sfr (n)
}
}
-
/* targ_has_iclass:
Return TRUE iff the target architecture supports the indicated
@@ -2826,9 +2787,8 @@ s_endian (ignore)
demand_empty_rest_of_line ();
}
-/* We have no need to default values of symbols. */
+/* We have no need to default values of symbols. */
-/* ARGSUSED */
symbolS *
md_undefined_symbol (name)
char *name;
@@ -2838,7 +2798,7 @@ md_undefined_symbol (name)
/* Exactly what point is a PC-relative offset relative TO?
On the i960, they're relative to the address of the instruction,
- which we have set up as the address of the fixup too. */
+ which we have set up as the address of the fixup too. */
long
md_pcrel_from (fixP)
fixS *fixP;
@@ -2940,7 +2900,7 @@ tc_bout_fix_to_chars (where, fixP, segment_address_in_file)
ri.r_index = S_GET_TYPE (symbolP);
}
- /* Output the relocation information in machine-dependent form. */
+ /* Output the relocation information in machine-dependent form. */
md_ri_to_chars (where, &ri);
}
@@ -3248,7 +3208,7 @@ i960_validate_fix (fixP, this_segment_type, add_symbolPP)
if (fixP->fx_tcbit && TC_S_IS_CALLNAME (add_symbolP))
{
/* Relocation should be done via the associated 'bal'
- entry point symbol. */
+ entry point symbol. */
if (!TC_S_IS_BALNAME (tc_get_bal_of_call (add_symbolP)))
{
@@ -3273,7 +3233,7 @@ i960_validate_fix (fixP, this_segment_type, add_symbolPP)
displacement and are only to be used for local branches:
flag as error, don't generate relocation. */
as_bad (_("can't use COBR format with external label"));
- fixP->fx_addsy = NULL; /* No relocations please. */
+ fixP->fx_addsy = NULL; /* No relocations please. */
return 1;
}
}
diff --git a/gnu/usr.bin/binutils/gas/config/tc-i960.h b/gnu/usr.bin/binutils/gas/config/tc-i960.h
index 2746edeeb23..8cedab2c39d 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-i960.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-i960.h
@@ -1,5 +1,6 @@
/* tc-i960.h - Basic 80960 instruction formats.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#ifndef TC_I960
#define TC_I960 1
@@ -101,7 +102,7 @@ extern int tc_coff_sizemachdep ();
#define N_CALLNAME ((char)-1)
#define N_BALNAME ((char)-2)
-/* i960 uses a custom relocation record. */
+/* i960 uses a custom relocation record. */
/* let obj-aout.h know */
#define CUSTOM_RELOC_FORMAT 1
@@ -155,6 +156,9 @@ extern int i960_validate_fix PARAMS ((struct fix *, segT, symbolS **));
#ifndef OBJ_ELF
#define tc_fix_adjustable(FIXP) ((FIXP)->fx_bsr == 0)
+/* This arranges for gas/write.c to not apply a relocation if
+ tc_fix_adjustable() says it is not adjustable. */
+#define TC_FIX_ADJUSTABLE(fixP) tc_fix_adjustable (fixP)
#else
#define tc_fix_adjustable(FIXP) \
((FIXP)->fx_bsr == 0 \
@@ -188,5 +192,3 @@ extern const struct relax_type md_relax_table[];
#define TC_INIT_FIX_DATA(F) ((F)->tc_fix_data.bsr = 0)
#endif
-
-/* end of tc-i960.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-m68k.c b/gnu/usr.bin/binutils/gas/config/tc-m68k.c
index b8250ec5de2..0d4cd23d4d6 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-m68k.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-m68k.c
@@ -1,5 +1,6 @@
/* tc-m68k.c -- Assemble for the m68k family
- Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -46,11 +47,11 @@ const char *m68k_comment_chars = "|";
.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. */
+ #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[] = "";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
CONST char EXP_CHARS[] = "eE";
@@ -68,12 +69,13 @@ const int md_reloc_size = 8; /* Size of relocation record */
/* Are we trying to generate PIC code? If so, absolute references
ought to be made into linkage table references or pc-relative
- references. Not implemented. For ELF there are other means
+ references. Not implemented. For ELF there are other means
to denote pic relocations. */
int flag_want_pic;
static int flag_short_refs; /* -l option */
static int flag_long_jumps; /* -S option */
+static int flag_keep_pcrel; /* --pcrel option. */
#ifdef REGISTER_PREFIX_OPTIONAL
int flag_reg_prefix_optional = REGISTER_PREFIX_OPTIONAL;
@@ -132,35 +134,6 @@ static struct label_line *current_label;
/* See flames below */
static struct obstack robyn;
-#define TAB(x,y) (((x)<<2)+(y))
-#define TABTYPE(xy) ((xy) >> 2)
-#define BYTE 0
-#define SHORT 1
-#define LONG 2
-#define SZ_UNDEF 3
-#undef BRANCH
-/* Case `g' except when BCC68000 is applicable. */
-#define ABRANCH 1
-/* Coprocessor branches. */
-#define FBRANCH 2
-/* Mode 7.2 -- program counter indirect with (16-bit) displacement,
- supported on all cpus. Widens to 32-bit absolute. */
-#define PCREL 3
-/* For inserting an extra jmp instruction with long offset on 68000,
- for expanding conditional branches. (Not bsr or bra.) Since the
- 68000 doesn't support 32-bit displacements for conditional
- branches, we fake it by reversing the condition and branching
- around a jmp with an absolute long operand. */
-#define BCC68000 4
-/* For the DBcc "instructions". If the displacement requires 32 bits,
- the branch-around-a-jump game is played here too. */
-#define DBCC 5
-/* Not currently used? */
-#define PCLEA 6
-/* Mode AINDX (apc-relative) using PC, with variable target, might fit
- in 16 or 8 bits. */
-#define PCINDEX 7
-
struct m68k_incant
{
const char *m_operands;
@@ -194,7 +167,7 @@ static const enum m68k_register m68060_control_regs[] = {
0
};
static const enum m68k_register mcf_control_regs[] = {
- CACR, TC, ITT0, ITT1, DTT0, DTT1, VBR, ROMBAR,
+ CACR, TC, ITT0, ITT1, DTT0, DTT1, VBR, ROMBAR,
RAMBAR0, RAMBAR1, MBAR,
0
};
@@ -257,7 +230,7 @@ struct m68k_it
#define arch_coldfire_p(x) (((x) & mcf) != 0)
/* Macros for determining if cpu supports a specific addressing mode */
-#define HAVE_LONG_BRANCH(x) ((x) & (m68020|m68030|m68040|m68060|cpu32))
+#define HAVE_LONG_BRANCH(x) ((x) & (m68020|m68030|m68040|m68060|cpu32|mcf5407))
static struct m68k_it the_ins; /* the instruction being assembled */
@@ -379,64 +352,116 @@ static void md_convert_frag_1 PARAMS ((fragS *));
static int current_architecture;
-struct m68k_cpu {
- unsigned long arch;
- const char *name;
- int alias;
-};
+struct m68k_cpu
+ {
+ unsigned long arch;
+ const char *name;
+ int alias;
+ };
-static const struct m68k_cpu archs[] = {
- { m68000, "68000", 0 },
- { m68010, "68010", 0 },
- { m68020, "68020", 0 },
- { m68030, "68030", 0 },
- { m68040, "68040", 0 },
- { m68060, "68060", 0 },
- { cpu32, "cpu32", 0 },
- { m68881, "68881", 0 },
- { m68851, "68851", 0 },
- { mcf5200, "5200", 0 },
- { mcf5206e, "5206e", 0 },
- { mcf5307, "5307", 0},
- /* Aliases (effectively, so far as gas is concerned) for the above
- cpus. */
- { m68020, "68k", 1 },
- { m68000, "68008", 1 },
- { m68000, "68302", 1 },
- { m68000, "68306", 1 },
- { m68000, "68307", 1 },
- { m68000, "68322", 1 },
- { m68000, "68356", 1 },
- { m68000, "68ec000", 1 },
- { m68000, "68hc000", 1 },
- { m68000, "68hc001", 1 },
- { m68020, "68ec020", 1 },
- { m68030, "68ec030", 1 },
- { m68040, "68ec040", 1 },
- { m68060, "68ec060", 1 },
- { cpu32, "68330", 1 },
- { cpu32, "68331", 1 },
- { cpu32, "68332", 1 },
- { cpu32, "68333", 1 },
- { cpu32, "68334", 1 },
- { cpu32, "68336", 1 },
- { cpu32, "68340", 1 },
- { cpu32, "68341", 1 },
- { cpu32, "68349", 1 },
- { cpu32, "68360", 1 },
- { m68881, "68882", 1 },
- { mcf5200, "5202", 1 },
- { mcf5200, "5204", 1 },
- { mcf5200, "5206", 1 },
-};
+static const struct m68k_cpu archs[] =
+ {
+ { m68000, "68000", 0 },
+ { m68010, "68010", 0 },
+ { m68020, "68020", 0 },
+ { m68030, "68030", 0 },
+ { m68040, "68040", 0 },
+ { m68060, "68060", 0 },
+ { cpu32, "cpu32", 0 },
+ { m68881, "68881", 0 },
+ { m68851, "68851", 0 },
+ { mcf5200, "5200", 0 },
+ { mcf5206e, "5206e", 0 },
+ { mcf5307, "5307", 0},
+ { mcf5407, "5407", 0},
+ /* Aliases (effectively, so far as gas is concerned) for the above
+ cpus. */
+ { m68020, "68k", 1 },
+ { m68000, "68008", 1 },
+ { m68000, "68302", 1 },
+ { m68000, "68306", 1 },
+ { m68000, "68307", 1 },
+ { m68000, "68322", 1 },
+ { m68000, "68356", 1 },
+ { m68000, "68ec000", 1 },
+ { m68000, "68hc000", 1 },
+ { m68000, "68hc001", 1 },
+ { m68020, "68ec020", 1 },
+ { m68030, "68ec030", 1 },
+ { m68040, "68ec040", 1 },
+ { m68060, "68ec060", 1 },
+ { cpu32, "68330", 1 },
+ { cpu32, "68331", 1 },
+ { cpu32, "68332", 1 },
+ { cpu32, "68333", 1 },
+ { cpu32, "68334", 1 },
+ { cpu32, "68336", 1 },
+ { cpu32, "68340", 1 },
+ { cpu32, "68341", 1 },
+ { cpu32, "68349", 1 },
+ { cpu32, "68360", 1 },
+ { m68881, "68882", 1 },
+ { mcf5200, "5202", 1 },
+ { mcf5200, "5204", 1 },
+ { mcf5200, "5206", 1 },
+ };
static const int n_archs = sizeof (archs) / sizeof (archs[0]);
-/* BCC68000 is for patching in an extra jmp instruction for long offsets
- on the 68000. The 68000 doesn't support long branches with branchs */
+/* This is the assembler relaxation table for m68k. m68k is a rich CISC
+ architecture and we have a lot of relaxation modes. */
-/* This table desribes how you change sizes for the various types of variable
- size expressions. This version only supports two kinds. */
+/* Macros used in the relaxation code. */
+#define TAB(x,y) (((x) << 2) + (y))
+#define TABTYPE(x) ((x) >> 2)
+
+/* Relaxation states. */
+#define BYTE 0
+#define SHORT 1
+#define LONG 2
+#define SZ_UNDEF 3
+
+/* Here are all the relaxation modes we support. First we can relax ordinary
+ branches. On 68020 and higher and on CPU32 all branch instructions take
+ three forms, so on these CPUs all branches always remain as such. When we
+ have to expand to the LONG form on a 68000, though, we substitute an
+ absolute jump instead. This is a direct replacement for unconditional
+ branches and a branch over a jump for conditional branches. However, if the
+ user requires PIC and disables this with --pcrel, we can only relax between
+ BYTE and SHORT forms, punting if that isn't enough. This gives us four
+ different relaxation modes for branches: */
+
+#define BRANCHBWL 1 /* branch byte, word, or long */
+#define BRABSJUNC 2 /* absolute jump for LONG, unconditional */
+#define BRABSJCOND 3 /* absolute jump for LONG, conditional */
+#define BRANCHBW 4 /* branch byte or word */
+
+/* We also relax coprocessor branches and DBcc's. All CPUs that support
+ coprocessor branches support them in word and long forms, so we have only
+ one relaxation mode for them. DBcc's are word only on all CPUs. We can
+ relax them to the LONG form with a branch-around sequence. This sequence
+ can use a long branch (if available) or an absolute jump (if acceptable).
+ This gives us two relaxation modes. If long branches are not available and
+ absolute jumps are not acceptable, we don't relax DBcc's. */
+
+#define FBRANCH 5 /* coprocessor branch */
+#define DBCCLBR 6 /* DBcc relaxable with a long branch */
+#define DBCCABSJ 7 /* DBcc relaxable with an absolute jump */
+
+/* That's all for instruction relaxation. However, we also relax PC-relative
+ operands. Specifically, we have three operand relaxation modes. On the
+ 68000 PC-relative operands can only be 16-bit, but on 68020 and higher and
+ on CPU32 they may be 16-bit or 32-bit. For the latter we relax between the
+ two. Also PC+displacement+index operands in their simple form (with a non-
+ suppressed index without memory indirection) are supported on all CPUs, but
+ on the 68000 the displacement can be 8-bit only, whereas on 68020 and higher
+ and on CPU32 we relax it to SHORT and LONG forms as well using the extended
+ form of the PC+displacement+index operand. Finally, some absolute operands
+ can be relaxed down to 16-bit PC-relative. */
+
+#define PCREL1632 8 /* 16-bit or 32-bit PC-relative */
+#define PCINDEX 9 /* PC+displacement+index */
+#define ABSTOPCREL 10 /* absolute relax down to 16-bit PC-relative */
/* Note that calls to frag_var need to specify the maximum expansion
needed; this is currently 10 bytes for DBCC. */
@@ -454,41 +479,55 @@ relax_typeS md_relax_table[] =
{1, 1, 0, 0}, /* that the VAX doesn't either */
{1, 1, 0, 0},
- {(127), (-128), 0, TAB (ABRANCH, SHORT)},
- {(32767), (-32768), 2, TAB (ABRANCH, LONG)},
+ {(127), (-128), 0, TAB (BRANCHBWL, SHORT)},
+ {(32767), (-32768), 2, TAB (BRANCHBWL, LONG)},
{0, 0, 4, 0},
{1, 1, 0, 0},
- {1, 1, 0, 0}, /* FBRANCH doesn't come BYTE */
- {(32767), (-32768), 2, TAB (FBRANCH, LONG)},
+ {(127), (-128), 0, TAB (BRABSJUNC, SHORT)},
+ {(32767), (-32768), 2, TAB (BRABSJUNC, LONG)},
{0, 0, 4, 0},
{1, 1, 0, 0},
- {1, 1, 0, 0}, /* PCREL doesn't come BYTE */
- {(32767), (-32768), 2, TAB (PCREL, LONG)},
+ {(127), (-128), 0, TAB (BRABSJCOND, SHORT)},
+ {(32767), (-32768), 2, TAB (BRABSJCOND, LONG)},
+ {0, 0, 6, 0},
+ {1, 1, 0, 0},
+
+ {(127), (-128), 0, TAB (BRANCHBW, SHORT)},
+ {0, 0, 2, 0},
+ {1, 1, 0, 0},
+ {1, 1, 0, 0},
+
+ {1, 1, 0, 0}, /* FBRANCH doesn't come BYTE */
+ {(32767), (-32768), 2, TAB (FBRANCH, LONG)},
{0, 0, 4, 0},
{1, 1, 0, 0},
- {(127), (-128), 0, TAB (BCC68000, SHORT)},
- {(32767), (-32768), 2, TAB (BCC68000, LONG)},
- {0, 0, 6, 0}, /* jmp long space */
+ {1, 1, 0, 0}, /* DBCC doesn't come BYTE */
+ {(32767), (-32768), 2, TAB (DBCCLBR, LONG)},
+ {0, 0, 10, 0},
{1, 1, 0, 0},
{1, 1, 0, 0}, /* DBCC doesn't come BYTE */
- {(32767), (-32768), 2, TAB (DBCC, LONG)},
- {0, 0, 10, 0}, /* bra/jmp long space */
+ {(32767), (-32768), 2, TAB (DBCCABSJ, LONG)},
+ {0, 0, 10, 0},
{1, 1, 0, 0},
- {1, 1, 0, 0}, /* PCLEA doesn't come BYTE */
- {32767, -32768, 2, TAB (PCLEA, LONG)},
+ {1, 1, 0, 0}, /* PCREL1632 doesn't come BYTE */
+ {32767, -32768, 2, TAB (PCREL1632, LONG)},
{0, 0, 6, 0},
{1, 1, 0, 0},
- /* For, e.g., jmp pcrel indexed. */
{125, -130, 0, TAB (PCINDEX, SHORT)},
{32765, -32770, 2, TAB (PCINDEX, LONG)},
{0, 0, 4, 0},
{1, 1, 0, 0},
+
+ {1, 1, 0, 0}, /* ABSTOPCREL doesn't come BYTE */
+ {(32767), (-32768), 2, TAB (ABSTOPCREL, LONG)},
+ {0, 0, 4, 0},
+ {1, 1, 0, 0},
};
/* These are the machine dependent pseudo-ops. These are included so
@@ -562,7 +601,6 @@ const pseudo_typeS md_pseudo_table[] =
{0, 0, 0}
};
-
/* The mote pseudo ops are put into the opcode table, since they
don't start with a . they look like opcodes to gas.
*/
@@ -609,7 +647,7 @@ CONST pseudo_typeS mote_pseudo_table[] =
extern char *input_line_pointer;
static char mklower_table[256];
-#define mklower(c) (mklower_table[(unsigned char)(c)])
+#define mklower(c) (mklower_table[(unsigned char) (c)])
static char notend_table[256];
static char alt_notend_table[256];
#define notend(s) \
@@ -676,6 +714,19 @@ tc_coff_fix2rtype (fixP)
#ifdef OBJ_ELF
+/* Return zero if the reference to SYMBOL from within the same segment may
+ be relaxed. */
+
+/* On an ELF system, we can't relax an externally visible symbol,
+ because it may be overridden by a shared library. However, if
+ TARGET_OS is "elf", then we presume that we are assembling for an
+ embedded system, in which case we don't have to worry about shared
+ libraries, and we can relax any external sym. */
+
+#define relaxable_symbol(symbol) \
+ (!((S_IS_EXTERNAL (symbol) && strcmp (TARGET_OS, "elf") != 0) \
+ || S_IS_WEAK (symbol)))
+
/* Compute the relocation code for a fixup of SIZE bytes, using pc
relative relocation if PCREL is non-zero. PIC says whether a special
pic relocation was requested. */
@@ -793,9 +844,8 @@ int
tc_m68k_fix_adjustable (fixP)
fixS *fixP;
{
- /* Prevent all adjustments to global symbols. */
- if (S_IS_EXTERNAL (fixP->fx_addsy)
- || S_IS_WEAK (fixP->fx_addsy))
+ /* Prevent all adjustments to global symbols. */
+ if (! relaxable_symbol (fixP->fx_addsy))
return 0;
/* adjust_reloc_syms doesn't know about the GOT */
@@ -828,6 +878,8 @@ tc_m68k_fix_adjustable (fixP)
#define get_reloc_code(SIZE,PCREL,OTHER) NO_RELOC
+#define relaxable_symbol(symbol) 1
+
#endif /* OBJ_ELF */
#ifdef BFD_ASSEMBLER
@@ -840,8 +892,18 @@ tc_gen_reloc (section, fixp)
arelent *reloc;
bfd_reloc_code_real_type code;
+ /* If the tcbit is set, then this was a fixup of a negative value
+ that was never resolved. We do not have a reloc to handle this,
+ so just return. We assume that other code will have detected this
+ situation and produced a helpful error message, so we just tell the
+ user that the reloc cannot be produced. */
if (fixp->fx_tcbit)
- abort ();
+ {
+ if (fixp->fx_addsy)
+ as_bad (_("Unable to produce reloc against symbol '%s'"),
+ S_GET_NAME (fixp->fx_addsy));
+ return NULL;
+ }
if (fixp->fx_r_type != BFD_RELOC_NONE)
{
@@ -920,8 +982,9 @@ tc_gen_reloc (section, fixp)
reloc->addend = fixp->fx_addnumber;
else
reloc->addend = (section->vma
- + (fixp->fx_pcrel_adjust == 64
- ? -1 : fixp->fx_pcrel_adjust)
+ /* Explicit sign extension in case char is
+ unsigned. */
+ + ((fixp->fx_pcrel_adjust & 0xff) ^ 0x80) - 0x80
+ fixp->fx_addnumber
+ md_pcrel_from (fixp));
#endif
@@ -934,27 +997,6 @@ tc_gen_reloc (section, fixp)
#endif /* BFD_ASSEMBLER */
-/* Return zero if the reference to SYMBOL from within the same segment may
- be relaxed. */
-#ifdef OBJ_ELF
-
-/* On an ELF system, we can't relax an externally visible symbol,
- because it may be overridden by a shared library. However, if
- TARGET_OS is "elf", then we presume that we are assembling for an
- embedded system, in which case we don't have to worry about shared
- libraries, and we can relax anything. */
-
-#define relaxable_symbol(symbol) \
- (strcmp (TARGET_OS, "elf") == 0 \
- || (! S_IS_EXTERNAL (symbol) \
- && ! S_IS_WEAK (symbol)))
-
-#else
-
-#define relaxable_symbol(symbol) 1
-
-#endif
-
/* Handle of the OPCODE hash table. NULL means any use before
m68k_ip_begin() will crash. */
static struct hash_control *op_hash;
@@ -983,7 +1025,7 @@ m68k_ip (instring)
instring++; /* skip leading whitespace */
/* Scan up to end of operation-code, which MUST end in end-of-string
- or exactly 1 space. */
+ or exactly 1 space. */
pdot = 0;
for (p = instring; *p != '\0'; p++)
{
@@ -1092,7 +1134,7 @@ m68k_ip (instring)
for (losing = 0;;)
{
/* If we didn't get the right number of ops, or we have no
- common model with this pattern then reject this pattern. */
+ common model with this pattern then reject this pattern. */
ok_arch |= opcode->m_arch;
if (opsfound != opcode->m_opnum
@@ -1755,7 +1797,7 @@ m68k_ip (instring)
&& opP->reg != BC))
{
losing++;
- } /* not a cache specifier. */
+ } /* not a cache specifier. */
break;
case '_':
@@ -1768,7 +1810,7 @@ m68k_ip (instring)
losing++;
/* FIXME: kludge instead of fixing parser:
upper/lower registers are *not* CONTROL
- registers, but ordinary ones. */
+ registers, but ordinary ones. */
if ((opP->reg >= DATA0L && opP->reg <= DATA7L)
|| (opP->reg >= DATA0U && opP->reg <= DATA7U))
opP->mode = DREG;
@@ -1788,7 +1830,7 @@ m68k_ip (instring)
if (!losing)
{
break;
- } /* got it. */
+ } /* got it. */
opcode = opcode->m_next;
@@ -2064,7 +2106,7 @@ m68k_ip (instring)
{
add_frag (adds (&opP->disp),
offs (&opP->disp),
- TAB (PCLEA, SZ_UNDEF));
+ TAB (PCREL1632, SZ_UNDEF));
break;
}
}
@@ -2144,9 +2186,9 @@ m68k_ip (instring)
&& m68k_index_width_default == SIZE_LONG))
nextword |= 0x800;
- if ((opP->index.scale != 1
+ if ((opP->index.scale != 1
&& cpu_of_arch (current_architecture) < m68020)
- || (opP->index.scale == 8
+ || (opP->index.scale == 8
&& arch_coldfire_p (current_architecture)))
{
opP->error =
@@ -2372,15 +2414,13 @@ m68k_ip (instring)
cannot be relaxed. */
&& opP->disp.pic_reloc == pic_none
#endif
- && S_GET_SEGMENT (adds (&opP->disp)) == now_seg
- && relaxable_symbol (adds (&opP->disp))
&& !flag_long_jumps
&& !strchr ("~%&$?", s[0]))
{
tmpreg = 0x3A; /* 7.2 */
add_frag (adds (&opP->disp),
offs (&opP->disp),
- TAB (PCREL, SZ_UNDEF));
+ TAB (ABSTOPCREL, SZ_UNDEF));
break;
}
/* Fall through into long */
@@ -2409,7 +2449,7 @@ m68k_ip (instring)
case FPREG:
default:
as_bad (_("unknown/incorrect operand"));
- /* abort(); */
+ /* abort (); */
}
install_gen_operand (s[1], tmpreg);
break;
@@ -2500,11 +2540,7 @@ m68k_ip (instring)
switch (s[1])
{
case 'B':
- /* The pc_fix argument winds up in fx_pcrel_adjust,
- which is a char, and may therefore be unsigned. We
- want to pass -1, but we pass 64 instead, and convert
- back in md_pcrel_from. */
- add_fix ('B', &opP->disp, 1, 64);
+ add_fix ('B', &opP->disp, 1, -1);
break;
case 'W':
add_fix ('w', &opP->disp, 1, 0);
@@ -2512,9 +2548,9 @@ m68k_ip (instring)
break;
case 'L':
long_branch:
- if (!HAVE_LONG_BRANCH(current_architecture))
+ if (! HAVE_LONG_BRANCH (current_architecture))
as_warn (_("Can't use long branches on 68000/68010/5200"));
- the_ins.opcode[the_ins.numo - 1] |= 0xff;
+ the_ins.opcode[0] |= 0xff;
add_fix ('l', &opP->disp, 1, 0);
addword (0);
addword (0);
@@ -2529,37 +2565,66 @@ m68k_ip (instring)
if (opP->disp.pic_reloc != pic_none)
goto long_branch;
#endif
-
/* This could either be a symbol, or an absolute
- address. No matter, the frag hacking will finger it
- out. Not quite: it can't switch from BRANCH to
- BCC68000 for the case where opnd is absolute (it
- needs to use the 68000 hack since no conditional abs
- jumps). */
- if (( !HAVE_LONG_BRANCH(current_architecture)
- || (0 == adds (&opP->disp)))
- && (the_ins.opcode[0] >= 0x6200)
- && (the_ins.opcode[0] <= 0x6f00))
+ address. If it's an absolute address, turn it into
+ an absolute jump right here and keep it out of the
+ relaxer. */
+ if (adds (&opP->disp) == 0)
+ {
+ if (the_ins.opcode[0] == 0x6000) /* jbra */
+ the_ins.opcode[0] = 0x4EF1;
+ else if (the_ins.opcode[0] == 0x6100) /* jbsr */
+ the_ins.opcode[0] = 0x4EB1;
+ else /* jCC */
+ {
+ the_ins.opcode[0] ^= 0x0100;
+ the_ins.opcode[0] |= 0x0006;
+ addword (0x4EF1);
+ }
+ add_fix ('l', &opP->disp, 0, 0);
+ addword (0);
+ addword (0);
+ break;
+ }
+
+ /* Now we know it's going into the relaxer. Now figure
+ out which mode. We try in this order of preference:
+ long branch, absolute jump, byte/word branches only. */
+ if (HAVE_LONG_BRANCH (current_architecture))
add_frag (adds (&opP->disp), offs (&opP->disp),
- TAB (BCC68000, SZ_UNDEF));
+ TAB (BRANCHBWL, SZ_UNDEF));
+ else if (! flag_keep_pcrel)
+ {
+ if ((the_ins.opcode[0] == 0x6000)
+ || (the_ins.opcode[0] == 0x6100))
+ add_frag (adds (&opP->disp), offs (&opP->disp),
+ TAB (BRABSJUNC, SZ_UNDEF));
+ else
+ add_frag (adds (&opP->disp), offs (&opP->disp),
+ TAB (BRABSJCOND, SZ_UNDEF));
+ }
else
add_frag (adds (&opP->disp), offs (&opP->disp),
- TAB (ABRANCH, SZ_UNDEF));
+ TAB (BRANCHBW, SZ_UNDEF));
break;
case 'w':
if (isvar (&opP->disp))
{
-#if 1
- /* check for DBcc instruction */
- if ((the_ins.opcode[0] & 0xf0f8) == 0x50c8)
+ /* Check for DBcc instructions. We can relax them,
+ but only if we have long branches and/or absolute
+ jumps. */
+ if (((the_ins.opcode[0] & 0xf0f8) == 0x50c8)
+ && (HAVE_LONG_BRANCH (current_architecture)
+ || (! flag_keep_pcrel)))
{
- /* size varies if patch */
- /* needed for long form */
- add_frag (adds (&opP->disp), offs (&opP->disp),
- TAB (DBCC, SZ_UNDEF));
+ if (HAVE_LONG_BRANCH (current_architecture))
+ add_frag (adds (&opP->disp), offs (&opP->disp),
+ TAB (DBCCLBR, SZ_UNDEF));
+ else
+ add_frag (adds (&opP->disp), offs (&opP->disp),
+ TAB (DBCCABSJ, SZ_UNDEF));
break;
}
-#endif
add_fix ('w', &opP->disp, 1, 0);
}
addword (0);
@@ -2570,23 +2635,16 @@ m68k_ip (instring)
addword (0);
break;
case 'c': /* Var size Coprocesssor branches */
- if (subs (&opP->disp))
+ if (subs (&opP->disp) || (adds (&opP->disp) == 0))
{
- add_fix ('l', &opP->disp, 1, 0);
- add_frag ((symbolS *) 0, (offsetT) 0, TAB (FBRANCH, LONG));
- }
- else if (adds (&opP->disp))
- add_frag (adds (&opP->disp), offs (&opP->disp),
- TAB (FBRANCH, SZ_UNDEF));
- else
- {
- /* add_frag ((symbolS *) 0, offs (&opP->disp),
- TAB(FBRANCH,SHORT)); */
the_ins.opcode[the_ins.numo - 1] |= 0x40;
add_fix ('l', &opP->disp, 1, 0);
addword (0);
addword (0);
}
+ else
+ add_frag (adds (&opP->disp), offs (&opP->disp),
+ TAB (FBRANCH, SZ_UNDEF));
break;
default:
abort ();
@@ -2822,7 +2880,7 @@ m68k_ip (instring)
install_operand (s[1], tmpreg);
break;
#ifndef NO_68851
- /* JF: These are out of order, I fear. */
+ /* JF: These are out of order, I fear. */
case 'f':
switch (opP->reg)
{
@@ -2960,7 +3018,7 @@ m68k_ip (instring)
}
/* By the time whe get here (FINALLY) the_ins contains the complete
- instruction, ready to be emitted. . . */
+ instruction, ready to be emitted. . . */
}
static int
@@ -3426,7 +3484,7 @@ static const struct init_entry init_table[] =
{ "za6", ZADDR6 },
{ "za7", ZADDR7 },
- /* Upper and lower data and address registers, used by macw and msacw. */
+ /* Upper and lower data and address registers, used by macw and msacw. */
{ "d0l", DATA0L },
{ "d1l", DATA1L },
{ "d2l", DATA2L },
@@ -3606,6 +3664,21 @@ md_assemble (str)
}
/* There's some frag hacking */
+ {
+ /* Calculate the max frag size. */
+ int wid;
+
+ wid = 2 * the_ins.fragb[0].fragoff;
+ for (n = 1; n < the_ins.nfrag; n++)
+ wid += 2 * (the_ins.numo - the_ins.fragb[n - 1].fragoff);
+ /* frag_var part. */
+ wid += 10;
+ /* Make sure the whole insn fits in one chunk, in particular that
+ the var part is attached, as we access one byte before the
+ variable frag for byte branches. */
+ frag_grow (wid);
+ }
+
for (n = 0, fromP = &the_ins.opcode[0]; n < the_ins.nfrag; n++)
{
int wid;
@@ -3724,7 +3797,7 @@ md_begin ()
{
ins = &m68k_opcodes[i];
/* We *could* ignore insns that don't match our arch here
- but just leaving them out of the hash. */
+ but just leaving them out of the hash. */
slak->m_operands = ins->args;
slak->m_opnum = strlen (slak->m_operands) / 2;
slak->m_arch = ins->arch;
@@ -3901,6 +3974,7 @@ select_control_regs ()
case mcf5200:
case mcf5206e:
case mcf5307:
+ case mcf5407:
control_regs = mcf_control_regs;
break;
default:
@@ -4079,8 +4153,8 @@ m68k_mri_mode_change (on)
#define MAX_LITTLENUMS 6
/* Turn a string in input_line_pointer into a floating point constant
- of type type, and store the appropriate bytes in *litP. The number
- of LITTLENUMS emitted is stored in *sizeP . An error message is
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
char *
@@ -4160,10 +4234,7 @@ md_apply_fix_2 (fixP, val)
buf += fixP->fx_where;
/* end ibm compiler workaround */
- if (val & 0x80000000)
- val |= ~(addressT)0x7fffffff;
- else
- val &= 0x7fffffff;
+ val = ((val & 0xffffffff) ^ 0x80000000) - 0x80000000;
#ifdef OBJ_ELF
if (fixP->fx_addsy)
@@ -4275,7 +4346,6 @@ md_convert_frag_1 (fragP)
register fragS *fragP;
{
long disp;
- long ext = 0;
fixS *fixP;
/* Address in object code of the displacement. */
@@ -4283,7 +4353,7 @@ md_convert_frag_1 (fragP)
/* Address in gas core of the place to store the displacement. */
/* This convinces the native rs6000 compiler to generate the code we
- want. */
+ want. */
register char *buffer_address = fragP->fr_literal;
buffer_address += fragP->fr_fix;
/* end ibm compiler workaround */
@@ -4298,188 +4368,184 @@ md_convert_frag_1 (fragP)
switch (fragP->fr_subtype)
{
- case TAB (BCC68000, BYTE):
- case TAB (ABRANCH, BYTE):
+ case TAB (BRANCHBWL, BYTE):
+ case TAB (BRABSJUNC, BYTE):
+ case TAB (BRABSJCOND, BYTE):
+ case TAB (BRANCHBW, BYTE):
know (issbyte (disp));
if (disp == 0)
as_bad (_("short branch with zero offset: use :w"));
- fragP->fr_opcode[1] = disp;
- ext = 0;
- break;
- case TAB (DBCC, SHORT):
- know (issword (disp));
- ext = 2;
+ fixP = fix_new (fragP, fragP->fr_fix - 1, 1, fragP->fr_symbol,
+ fragP->fr_offset, 1, RELAX_RELOC_PC8);
+ fixP->fx_pcrel_adjust = -1;
break;
- case TAB (BCC68000, SHORT):
- case TAB (ABRANCH, SHORT):
- know (issword (disp));
+ case TAB (BRANCHBWL, SHORT):
+ case TAB (BRABSJUNC, SHORT):
+ case TAB (BRABSJCOND, SHORT):
+ case TAB (BRANCHBW, SHORT):
fragP->fr_opcode[1] = 0x00;
- ext = 2;
+ fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset,
+ 1, RELAX_RELOC_PC16);
+ fragP->fr_fix += 2;
break;
- case TAB (ABRANCH, LONG):
- if (!HAVE_LONG_BRANCH(current_architecture))
+ case TAB (BRANCHBWL, LONG):
+ fragP->fr_opcode[1] = (char) 0xFF;
+ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset,
+ 1, RELAX_RELOC_PC32);
+ fragP->fr_fix += 4;
+ break;
+ case TAB (BRABSJUNC, LONG):
+ if (fragP->fr_opcode[0] == 0x61) /* jbsr */
{
- if (fragP->fr_opcode[0] == 0x61)
- /* BSR */
- {
- fragP->fr_opcode[0] = 0x4E;
- fragP->fr_opcode[1] = (char) 0xB9; /* JBSR with ABSL LONG offset */
-
- fix_new (fragP,
- fragP->fr_fix,
- 4,
- fragP->fr_symbol,
- fragP->fr_offset,
- 0,
- NO_RELOC);
-
- fragP->fr_fix += 4;
- ext = 0;
- }
- /* BRA */
- else if (fragP->fr_opcode[0] == 0x60)
- {
- fragP->fr_opcode[0] = 0x4E;
- fragP->fr_opcode[1] = (char) 0xF9; /* JMP with ABSL LONG offset */
- fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol,
- fragP->fr_offset, 0, NO_RELOC);
- fragP->fr_fix += 4;
- ext = 0;
- }
- else
- {
- /* This should never happen, because if it's a conditional
- branch and we are on a 68000, BCC68000 should have been
- picked instead of ABRANCH. */
- abort ();
- }
+ fragP->fr_opcode[0] = 0x4E;
+ fragP->fr_opcode[1] = (char) 0xB9; /* JSR with ABSL LONG operand */
+ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset,
+ 0, RELAX_RELOC_ABS32);
+ fragP->fr_fix += 4;
+ }
+ else if (fragP->fr_opcode[0] == 0x60) /* jbra */
+ {
+ fragP->fr_opcode[0] = 0x4E;
+ fragP->fr_opcode[1] = (char) 0xF9; /* JMP with ABSL LONG operand */
+ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset,
+ 0, RELAX_RELOC_ABS32);
+ fragP->fr_fix += 4;
}
else
{
- fragP->fr_opcode[1] = (char) 0xff;
- ext = 4;
+ /* This cannot happen, because jbsr and jbra are the only two
+ unconditional branches. */
+ abort ();
}
break;
- case TAB (BCC68000, LONG):
- /* only Bcc 68000 instructions can come here */
- /* change bcc into b!cc/jmp absl long */
+ case TAB (BRABSJCOND, LONG):
+ /* Only Bcc 68000 instructions can come here. */
+ /* Change bcc into b!cc/jmp absl long. */
+
fragP->fr_opcode[0] ^= 0x01; /* invert bcc */
fragP->fr_opcode[1] = 0x6;/* branch offset = 6 */
/* JF: these used to be fr_opcode[2,3], but they may be in a
different frag, in which case refering to them is a no-no.
- Only fr_opcode[0,1] are guaranteed to work. */
+ Only fr_opcode[0,1] are guaranteed to work. */
*buffer_address++ = 0x4e; /* put in jmp long (0x4ef9) */
*buffer_address++ = (char) 0xf9;
fragP->fr_fix += 2; /* account for jmp instruction */
fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol,
- fragP->fr_offset, 0, NO_RELOC);
+ fragP->fr_offset, 0, RELAX_RELOC_ABS32);
+ fragP->fr_fix += 4;
+ break;
+ case TAB (FBRANCH, SHORT):
+ know ((fragP->fr_opcode[1] & 0x40) == 0);
+ fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset,
+ 1, RELAX_RELOC_PC16);
+ fragP->fr_fix += 2;
+ break;
+ case TAB (FBRANCH, LONG):
+ fragP->fr_opcode[1] |= 0x40; /* Turn on LONG bit */
+ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset,
+ 1, RELAX_RELOC_PC32);
fragP->fr_fix += 4;
- ext = 0;
break;
- case TAB (DBCC, LONG):
- /* only DBcc 68000 instructions can come here */
- /* change dbcc into dbcc/jmp absl long */
+ case TAB (DBCCLBR, SHORT):
+ case TAB (DBCCABSJ, SHORT):
+ fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset,
+ 1, RELAX_RELOC_PC16);
+ fragP->fr_fix += 2;
+ break;
+ case TAB (DBCCLBR, LONG):
+ /* only DBcc instructions can come here */
+ /* Change dbcc into dbcc/bral. */
+
/* JF: these used to be fr_opcode[2-7], but that's wrong */
*buffer_address++ = 0x00; /* branch offset = 4 */
*buffer_address++ = 0x04;
*buffer_address++ = 0x60; /* put in bra pc+6 */
*buffer_address++ = 0x06;
- *buffer_address++ = 0x4e; /* put in jmp long (0x4ef9) */
- *buffer_address++ = (char) 0xf9;
+ *buffer_address++ = 0x60; /* Put in bral (0x60ff). */
+ *buffer_address++ = (char) 0xff;
fragP->fr_fix += 6; /* account for bra/jmp instructions */
- fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol,
- fragP->fr_offset, 0, NO_RELOC);
+ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, 1,
+ RELAX_RELOC_PC32);
fragP->fr_fix += 4;
- ext = 0;
break;
- case TAB (FBRANCH, SHORT):
- know ((fragP->fr_opcode[1] & 0x40) == 0);
- ext = 2;
- break;
- case TAB (FBRANCH, LONG):
- fragP->fr_opcode[1] |= 0x40; /* Turn on LONG bit */
- ext = 4;
- break;
- case TAB (PCREL, SHORT):
- ext = 2;
- break;
- case TAB (PCREL, LONG):
- /* The thing to do here is force it to ABSOLUTE LONG, since
- PCREL is really trying to shorten an ABSOLUTE address anyway */
- /* JF FOO This code has not been tested */
- fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset,
- 0, NO_RELOC);
- if ((fragP->fr_opcode[1] & 0x3F) != 0x3A)
- as_bad (_("Internal error (long PC-relative operand) for insn 0x%04x at 0x%lx"),
- (unsigned) fragP->fr_opcode[0],
- (unsigned long) fragP->fr_address);
- fragP->fr_opcode[1] &= ~0x3F;
- fragP->fr_opcode[1] |= 0x39; /* Mode 7.1 */
+ case TAB (DBCCABSJ, LONG):
+ /* only DBcc instructions can come here */
+ /* Change dbcc into dbcc/jmp. */
+
+ /* JF: these used to be fr_opcode[2-7], but that's wrong */
+ *buffer_address++ = 0x00; /* branch offset = 4 */
+ *buffer_address++ = 0x04;
+ *buffer_address++ = 0x60; /* put in bra pc+6 */
+ *buffer_address++ = 0x06;
+ *buffer_address++ = 0x4e; /* Put in jmp long (0x4ef9). */
+ *buffer_address++ = (char) 0xf9;
+
+ fragP->fr_fix += 6; /* account for bra/jmp instructions */
+ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, 0,
+ RELAX_RELOC_ABS32);
fragP->fr_fix += 4;
- ext = 0;
break;
- case TAB (PCLEA, SHORT):
- fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
+ case TAB (PCREL1632, SHORT):
fragP->fr_opcode[1] &= ~0x3F;
fragP->fr_opcode[1] |= 0x3A; /* 072 - mode 7.2 */
- ext = 2;
+ fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol,
+ fragP->fr_offset, 1, RELAX_RELOC_PC16);
+ fragP->fr_fix += 2;
break;
- case TAB (PCLEA, LONG):
- fixP = fix_new (fragP, (int) (fragP->fr_fix) + 2, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- fixP->fx_pcrel_adjust = 2;
+ case TAB (PCREL1632, LONG):
/* Already set to mode 7.3; this indicates: PC indirect with
suppressed index, 32-bit displacement. */
*buffer_address++ = 0x01;
*buffer_address++ = 0x70;
fragP->fr_fix += 2;
- ext = 4;
+ fixP = fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, RELAX_RELOC_PC32);
+ fixP->fx_pcrel_adjust = 2;
+ fragP->fr_fix += 4;
break;
-
case TAB (PCINDEX, BYTE):
- disp += 2;
- if (!issbyte (disp))
- {
- as_bad (_("displacement doesn't fit in one byte"));
- disp = 0;
- }
assert (fragP->fr_fix >= 2);
buffer_address[-2] &= ~1;
- buffer_address[-1] = disp;
- ext = 0;
+ fixP = fix_new (fragP, fragP->fr_fix - 1, 1, fragP->fr_symbol,
+ fragP->fr_offset, 1, RELAX_RELOC_PC8);
+ fixP->fx_pcrel_adjust = 1;
break;
case TAB (PCINDEX, SHORT):
- disp += 2;
- assert (issword (disp));
assert (fragP->fr_fix >= 2);
buffer_address[-2] |= 0x1;
buffer_address[-1] = 0x20;
fixP = fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol,
- fragP->fr_offset, (fragP->fr_opcode[1] & 077) == 073,
- NO_RELOC);
+ fragP->fr_offset, 1, RELAX_RELOC_PC16);
fixP->fx_pcrel_adjust = 2;
- ext = 2;
+ fragP->fr_fix += 2;
break;
case TAB (PCINDEX, LONG):
- disp += 2;
- fixP = fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol,
- fragP->fr_offset, (fragP->fr_opcode[1] & 077) == 073,
- NO_RELOC);
- fixP->fx_pcrel_adjust = 2;
assert (fragP->fr_fix >= 2);
buffer_address[-2] |= 0x1;
buffer_address[-1] = 0x30;
- ext = 4;
+ fixP = fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, RELAX_RELOC_PC32);
+ fixP->fx_pcrel_adjust = 2;
+ fragP->fr_fix += 4;
+ break;
+ case TAB (ABSTOPCREL, SHORT):
+ fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset,
+ 1, RELAX_RELOC_PC16);
+ fragP->fr_fix += 2;
+ break;
+ case TAB (ABSTOPCREL, LONG):
+ /* The thing to do here is force it to ABSOLUTE LONG, since
+ ABSTOPCREL is really trying to shorten an ABSOLUTE address anyway */
+ if ((fragP->fr_opcode[1] & 0x3F) != 0x3A)
+ abort ();
+ fragP->fr_opcode[1] &= ~0x3F;
+ fragP->fr_opcode[1] |= 0x39; /* Mode 7.1 */
+ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset,
+ 0, RELAX_RELOC_ABS32);
+ fragP->fr_fix += 4;
break;
- }
-
- if (ext)
- {
- md_number_to_chars (buffer_address, (long) disp, (int) ext);
- fragP->fr_fix += ext;
}
}
@@ -4515,228 +4581,104 @@ md_estimate_size_before_relax (fragP, segment)
segT segment;
{
int old_fix;
- register char *buffer_address = fragP->fr_fix + fragP->fr_literal;
old_fix = fragP->fr_fix;
- /* handle SZ_UNDEF first, it can be changed to BYTE or SHORT */
+ /* Handle SZ_UNDEF first, it can be changed to BYTE or SHORT. */
switch (fragP->fr_subtype)
{
-
- case TAB (ABRANCH, SZ_UNDEF):
+ case TAB (BRANCHBWL, SZ_UNDEF):
+ case TAB (BRABSJUNC, SZ_UNDEF):
+ case TAB (BRABSJCOND, SZ_UNDEF):
{
- if ((fragP->fr_symbol != NULL) /* Not absolute */
- && S_GET_SEGMENT (fragP->fr_symbol) == segment
+ if (S_GET_SEGMENT (fragP->fr_symbol) == segment
&& relaxable_symbol (fragP->fr_symbol))
{
fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), BYTE);
- break;
- }
- else if ((fragP->fr_symbol != NULL) && flag_short_refs)
- { /* Symbol is undefined and we want short ref */
- fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- fragP->fr_fix += 2;
- frag_wane (fragP);
- break;
- }
- else if ((fragP->fr_symbol == 0) || !HAVE_LONG_BRANCH(current_architecture))
- {
- /* On 68000, or for absolute value, switch to abs long */
- /* FIXME, we should check abs val, pick short or long */
- if (fragP->fr_opcode[0] == 0x61)
- {
- fragP->fr_opcode[0] = 0x4E;
- fragP->fr_opcode[1] = (char) 0xB9; /* JBSR with ABSL LONG offset */
- fix_new (fragP, fragP->fr_fix, 4,
- fragP->fr_symbol, fragP->fr_offset, 0, NO_RELOC);
- fragP->fr_fix += 4;
- frag_wane (fragP);
- }
- else if (fragP->fr_opcode[0] == 0x60)
- {
- fragP->fr_opcode[0] = 0x4E;
- fragP->fr_opcode[1] = (char) 0xF9; /* JMP with ABSL LONG offset */
- fix_new (fragP, fragP->fr_fix, 4,
- fragP->fr_symbol, fragP->fr_offset, 0, NO_RELOC);
- fragP->fr_fix += 4;
- frag_wane (fragP);
- }
- else
- {
- /* This should never happen, because if it's a conditional
- branch and we are on a 68000, BCC68000 should have been
- picked instead of ABRANCH. */
- abort ();
- }
- }
- else
- { /* Symbol is still undefined. Make it simple */
- fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- fragP->fr_fix += 4;
- fragP->fr_opcode[1] = (char) 0xff;
- frag_wane (fragP);
- break;
}
-
- break;
- } /* case TAB(ABRANCH,SZ_UNDEF) */
-
- case TAB (FBRANCH, SZ_UNDEF):
- {
- if ((S_GET_SEGMENT (fragP->fr_symbol) == segment
- && relaxable_symbol (fragP->fr_symbol))
- || flag_short_refs)
+ else if (flag_short_refs)
{
- fragP->fr_subtype = TAB (FBRANCH, SHORT);
- fragP->fr_var += 2;
+ /* Symbol is undefined and we want short ref. */
+ fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), SHORT);
}
else
{
- fix_new (fragP, (int) fragP->fr_fix, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- fragP->fr_fix += 4;
- fragP->fr_opcode[1] |= 0x40; /* Turn on LONG bit */
- frag_wane (fragP);
+ /* Symbol is still undefined. Make it LONG. */
+ fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), LONG);
}
break;
- } /* TAB(FBRANCH,SZ_UNDEF) */
-
- case TAB (PCREL, SZ_UNDEF):
- {
- if ((S_GET_SEGMENT (fragP->fr_symbol) == segment
- && relaxable_symbol (fragP->fr_symbol))
- || flag_short_refs)
- {
- fragP->fr_subtype = TAB (PCREL, SHORT);
- fragP->fr_var += 2;
- }
- else
- {
- fragP->fr_subtype = TAB (PCREL, LONG);
- fragP->fr_var += 4;
- }
- break;
- } /* TAB(PCREL,SZ_UNDEF) */
-
- case TAB (BCC68000, SZ_UNDEF):
- {
- if ((fragP->fr_symbol != NULL)
- && S_GET_SEGMENT (fragP->fr_symbol) == segment
- && relaxable_symbol (fragP->fr_symbol))
- {
- fragP->fr_subtype = TAB (BCC68000, BYTE);
- break;
- }
- /* only Bcc 68000 instructions can come here */
- if ((fragP->fr_symbol != NULL) && flag_short_refs)
- {
- /* the user wants short refs, so emit one */
- fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- fragP->fr_fix += 2;
- }
- else
- {
- /* change bcc into b!cc/jmp absl long */
- fragP->fr_opcode[0] ^= 0x01; /* invert bcc */
- fragP->fr_opcode[1] = 0x06; /* branch offset = 6 */
- /* JF: these were fr_opcode[2,3] */
- buffer_address[0] = 0x4e; /* put in jmp long (0x4ef9) */
- buffer_address[1] = (char) 0xf9;
- fragP->fr_fix += 2; /* account for jmp instruction */
- fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol,
- fragP->fr_offset, 0, NO_RELOC);
- fragP->fr_fix += 4;
- }
- frag_wane (fragP);
- break;
- } /* case TAB(BCC68000,SZ_UNDEF) */
+ }
- case TAB (DBCC, SZ_UNDEF):
+ case TAB (BRANCHBW, SZ_UNDEF):
{
- if (fragP->fr_symbol != NULL
- && S_GET_SEGMENT (fragP->fr_symbol) == segment
+ if (S_GET_SEGMENT (fragP->fr_symbol) == segment
&& relaxable_symbol (fragP->fr_symbol))
{
- fragP->fr_subtype = TAB (DBCC, SHORT);
- fragP->fr_var += 2;
- break;
- }
- /* only DBcc 68000 instructions can come here */
-
- if (fragP->fr_symbol != NULL && flag_short_refs)
- {
- /* the user wants short refs, so emit one */
- fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- fragP->fr_fix += 2;
+ fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), BYTE);
}
else
{
- /* change dbcc into dbcc/jmp absl long */
- /* JF: these used to be fr_opcode[2-4], which is wrong. */
- buffer_address[0] = 0x00; /* branch offset = 4 */
- buffer_address[1] = 0x04;
- buffer_address[2] = 0x60; /* put in bra pc + ... */
- /* JF: these were fr_opcode[5-7] */
- buffer_address[3] = 0x06; /* Plus 6 */
- buffer_address[4] = 0x4e; /* put in jmp long (0x4ef9) */
- buffer_address[5] = (char) 0xf9;
- fragP->fr_fix += 6; /* account for bra/jmp instruction */
- fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol,
- fragP->fr_offset, 0, NO_RELOC);
- fragP->fr_fix += 4;
+ /* Symbol is undefined and we don't have long branches. */
+ fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), SHORT);
}
-
- frag_wane (fragP);
break;
- } /* case TAB(DBCC,SZ_UNDEF) */
+ }
- case TAB (PCLEA, SZ_UNDEF):
+ case TAB (FBRANCH, SZ_UNDEF):
+ case TAB (DBCCLBR, SZ_UNDEF):
+ case TAB (DBCCABSJ, SZ_UNDEF):
+ case TAB (PCREL1632, SZ_UNDEF):
{
- if (((S_GET_SEGMENT (fragP->fr_symbol)) == segment
+ if ((S_GET_SEGMENT (fragP->fr_symbol) == segment
&& relaxable_symbol (fragP->fr_symbol))
- || flag_short_refs
- || cpu_of_arch (current_architecture) < m68020
- || cpu_of_arch (current_architecture) == mcf5200)
+ || flag_short_refs)
{
- fragP->fr_subtype = TAB (PCLEA, SHORT);
- fragP->fr_var += 2;
+ fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), SHORT);
}
else
{
- fragP->fr_subtype = TAB (PCLEA, LONG);
- fragP->fr_var += 6;
+ fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), LONG);
}
break;
- } /* TAB(PCLEA,SZ_UNDEF) */
+ }
case TAB (PCINDEX, SZ_UNDEF):
if ((S_GET_SEGMENT (fragP->fr_symbol) == segment
- && relaxable_symbol (fragP->fr_symbol))
- || cpu_of_arch (current_architecture) < m68020
- || cpu_of_arch (current_architecture) == mcf5200)
+ && relaxable_symbol (fragP->fr_symbol)))
{
fragP->fr_subtype = TAB (PCINDEX, BYTE);
}
else
{
fragP->fr_subtype = TAB (PCINDEX, LONG);
- fragP->fr_var += 4;
}
break;
+ case TAB (ABSTOPCREL, SZ_UNDEF):
+ {
+ if ((S_GET_SEGMENT (fragP->fr_symbol) == segment
+ && relaxable_symbol (fragP->fr_symbol)))
+ {
+ fragP->fr_subtype = TAB (ABSTOPCREL, SHORT);
+ }
+ else
+ {
+ fragP->fr_subtype = TAB (ABSTOPCREL, LONG);
+ }
+ break;
+ }
+
default:
break;
}
- /* now that SZ_UNDEF are taken care of, check others */
+ /* Now that SZ_UNDEF are taken care of, check others. */
switch (fragP->fr_subtype)
{
- case TAB (BCC68000, BYTE):
- case TAB (ABRANCH, BYTE):
+ case TAB (BRANCHBWL, BYTE):
+ case TAB (BRABSJUNC, BYTE):
+ case TAB (BRABSJCOND, BYTE):
+ case TAB (BRANCHBW, BYTE):
/* We can't do a short jump to the next instruction, so in that
case we force word mode. At this point S_GET_VALUE should
return the offset of the symbol within its frag. If the
@@ -4756,13 +4698,13 @@ md_estimate_size_before_relax (fragP, segment)
if (l == stop)
{
fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), SHORT);
- fragP->fr_var += 2;
}
}
break;
default:
break;
}
+ fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length;
return fragP->fr_var + fragP->fr_fix - old_fix;
}
@@ -4776,7 +4718,7 @@ md_estimate_size_before_relax (fragP, segment)
bit 7 as pcrel, bits 6 & 5 as length, bit 4 as pcrel, and the lower
nibble as nuthin. (on Sun 3 at least) */
/* Translate the internal relocation information into target-specific
- format. */
+ format. */
#ifdef comment
void
md_ri_to_chars (the_bytes, ri)
@@ -5058,7 +5000,7 @@ s_even (ignore)
temp = 1; /* JF should be 2? */
temp_fill = get_absolute_expression ();
- if (!need_pass_2) /* Never make frag if expect extra pass. */
+ if (!need_pass_2) /* Never make frag if expect extra pass. */
frag_align (temp, (int) temp_fill, 0);
demand_empty_rest_of_line ();
record_alignment (now_seg, temp);
@@ -5921,7 +5863,7 @@ build_mri_control_operand (qual, cc, leftstart, leftstop, rightstart,
cc = reverse_mri_condition (cc);
truelab = falselab;
}
-
+
if (leftstart != NULL)
{
buf = (char *) xmalloc (20
@@ -5943,7 +5885,7 @@ build_mri_control_operand (qual, cc, leftstart, leftstop, rightstart,
mri_assemble (buf);
free (buf);
}
-
+
buf = (char *) xmalloc (20 + strlen (truelab));
s = buf;
*s++ = 'b';
@@ -6745,6 +6687,7 @@ s_mri_endw (ignore)
*
* -pic Indicates PIC.
* -k Indicates PIC. (Sun 3 only.)
+ * --pcrel Never turn PC-relative branches into absolute jumps.
*
* --bitwise-or
* Permit `|' to be used in expressions.
@@ -6773,9 +6716,11 @@ struct option md_longopts[] = {
{"disp-size-default-16", no_argument, NULL, OPTION_DISP_SIZE_DEFAULT_16},
#define OPTION_DISP_SIZE_DEFAULT_32 (OPTION_MD_BASE + 6)
{"disp-size-default-32", no_argument, NULL, OPTION_DISP_SIZE_DEFAULT_32},
+#define OPTION_PCREL (OPTION_MD_BASE + 7)
+ {"pcrel", no_argument, NULL, OPTION_PCREL},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -6794,6 +6739,11 @@ md_parse_option (c, arg)
flag_long_jumps = 1;
break;
+ case OPTION_PCREL: /* --pcrel means never turn PC-relative
+ branches into absolute jumps. */
+ flag_keep_pcrel = 1;
+ break;
+
case 'A':
if (*arg == 'm')
arg++;
@@ -6934,22 +6884,23 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, _("\
+ fprintf (stream, _("\
680X0 options:\n\
-l use 1 word for refs to undefined symbols [default 2]\n\
--m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060\n\
- | -m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360\n\
- | -mcpu32 | -m5200\n\
+-m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060 |\n\
+-m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360 | -mcpu32 |\n\
+-m5200 | -m5202 | -m5204 | -m5206 | -m5206e | -m5307 | -m5407\n\
specify variant of 680X0 architecture [default 68020]\n\
-m68881 | -m68882 | -mno-68881 | -mno-68882\n\
target has/lacks floating-point coprocessor\n\
[default yes for 68020, 68030, and cpu32]\n"));
- fprintf(stream, _("\
+ fprintf (stream, _("\
-m68851 | -mno-68851\n\
target has/lacks memory-management unit coprocessor\n\
[default yes for 68020 and up]\n\
-pic, -k generate position independent code\n\
-S turn jbsr into jsr\n\
+--pcrel never turn PC-relative branches into absolute jumps\n\
--register-prefix-optional\n\
recognize register names without prefix character\n\
--bitwise-or do not treat `|' as a comment character\n"));
@@ -7052,7 +7003,6 @@ is_label (str)
/* We have no need to default values of symbols. */
-/* ARGSUSED */
symbolS *
md_undefined_symbol (name)
char *name ATTRIBUTE_UNUSED;
@@ -7086,16 +7036,16 @@ md_section_align (segment, size)
/* Exactly what point is a PC-relative offset relative TO?
On the 68k, it is relative to the address of the first extension
word. The difference between the addresses of the offset and the
- first extension word is stored in fx_pcrel_adjust. */
+ first extension word is stored in fx_pcrel_adjust. */
long
md_pcrel_from (fixP)
fixS *fixP;
{
int adjust;
- /* Because fx_pcrel_adjust is a char, and may be unsigned, we store
- -1 as 64. */
- adjust = fixP->fx_pcrel_adjust;
+ /* Because fx_pcrel_adjust is a char, and may be unsigned, we explicitly
+ sign extend the value here. */
+ adjust = ((fixP->fx_pcrel_adjust & 0xff) ^ 0x80) - 0x80;
if (adjust == 64)
adjust = -1;
return fixP->fx_where + fixP->fx_frag->fr_address - adjust;
@@ -7104,7 +7054,6 @@ md_pcrel_from (fixP)
#ifndef BFD_ASSEMBLER
#ifdef OBJ_COFF
-/*ARGSUSED*/
void
tc_coff_symbol_emit_hook (ignore)
symbolS *ignore ATTRIBUTE_UNUSED;
@@ -7139,4 +7088,3 @@ void m68k_elf_final_processing()
elf_elfheader (stdoutput)->e_flags |= EF_CPU32;
}
#endif
-/* end of tc-m68k.c */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-m68k.h b/gnu/usr.bin/binutils/gas/config/tc-m68k.h
index b3daf5e023c..1631e537ecd 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-m68k.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-m68k.h
@@ -1,5 +1,6 @@
/* This file is tc-m68k.h
- Copyright (C) 1987, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -119,7 +120,7 @@ extern const char *m68k_comment_chars;
/* On the Delta, `%' can occur within a label name, but not as the
initial character. */
#define LEX_PCT LEX_NAME
-/* On the Delta, `~' can start a label name, but is converted to '.'. */
+/* On the Delta, `~' can start a label name, but is converted to '.'. */
#define LEX_TILDE LEX_BEGIN_NAME
#define tc_canonicalize_symbol_name(s) ((*(s) == '~' ? *(s) = '.' : '.'), s)
/* On the Delta, dots are not required before pseudo-ops. */
@@ -157,6 +158,12 @@ do \
while (0)
#define NO_RELOC BFD_RELOC_NONE
+#define RELAX_RELOC_ABS8 BFD_RELOC_8
+#define RELAX_RELOC_ABS16 BFD_RELOC_16
+#define RELAX_RELOC_ABS32 BFD_RELOC_32
+#define RELAX_RELOC_PC8 BFD_RELOC_8_PCREL
+#define RELAX_RELOC_PC16 BFD_RELOC_16_PCREL
+#define RELAX_RELOC_PC32 BFD_RELOC_32_PCREL
#ifdef OBJ_ELF
@@ -175,6 +182,13 @@ while (0)
#define tc_fix_adjustable(X) tc_m68k_fix_adjustable(X)
extern int tc_m68k_fix_adjustable PARAMS ((struct fix *));
+
+#ifdef OBJ_ELF
+/* This arranges for gas/write.c to not apply a relocation if
+ tc_fix_adjustable() says it is not adjustable. */
+#define TC_FIX_ADJUSTABLE(fixP) tc_fix_adjustable (fixP)
+#endif
+
#define elf_tc_final_processing m68k_elf_final_processing
extern void m68k_elf_final_processing PARAMS ((void));
#endif
@@ -187,7 +201,13 @@ extern void m68k_elf_final_processing PARAMS ((void));
#define tc_frob_coff_symbol(sym) m68k_frob_symbol (sym)
-#define NO_RELOC 0
+#define NO_RELOC 0
+#define RELAX_RELOC_ABS8 0
+#define RELAX_RELOC_ABS16 0
+#define RELAX_RELOC_ABS32 0
+#define RELAX_RELOC_PC8 0
+#define RELAX_RELOC_PC16 0
+#define RELAX_RELOC_PC32 0
#endif /* ! BFD_ASSEMBLER */
@@ -213,5 +233,3 @@ extern struct relax_type md_relax_table[];
if (aim==0 && this_state== 4) { /* hard encoded from tc-m68k.c */ \
aim=this_type->rlx_forward+1; /* Force relaxation into word mode */ \
}
-
-/* end of tc-m68k.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-m88k.c b/gnu/usr.bin/binutils/gas/config/tc-m88k.c
index f77460a0caf..a5842d11bcd 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-m88k.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-m88k.c
@@ -1,7 +1,8 @@
/* m88k.c -- Assembler for the Motorola 88000
Contributed by Devon Bowen of Buffalo University
and Torbjorn Granlund of the Swedish Institute of Computer Science.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -138,7 +139,6 @@ static char *get_pcr PARAMS ((char *param, struct m88k_insn *insn,
static int calcop PARAMS ((struct m88k_opcode *format,
char *param, struct m88k_insn *insn));
-
extern char *myname;
static struct hash_control *op_hash = NULL;
@@ -149,7 +149,7 @@ int md_seg_align = 7;
another comment */
const char comment_chars[] = ";";
-/* These chars only start a comment at the beginning of a line. */
+/* These chars only start a comment at the beginning of a line. */
const char line_comment_chars[] = "#";
const char line_separator_chars[] = "";
@@ -217,7 +217,7 @@ CONST char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -1177,7 +1177,6 @@ md_estimate_size_before_relax (fragP, segment_type)
doing here?
Ian Taylor, Cygnus Support 13 Jul 1993 */
-
/*
* Risc relocations are completely different, so it needs
* this machine dependent routine to emit them.
@@ -1240,7 +1239,6 @@ emit_relocations (fixP, segment_address_in_file)
/* This routine can be subsumed by s_lcomm in read.c.
Ian Taylor, Cygnus Support 13 Jul 1993 */
-
static void
s_bss ()
{
@@ -1311,7 +1309,7 @@ s_bss ()
as_warn (_("Ignoring attempt to re-define symbol %s."), name);
}
- while (!is_end_of_line[*input_line_pointer])
+ while (!is_end_of_line[(unsigned char) *input_line_pointer])
{
input_line_pointer++;
}
@@ -1430,23 +1428,34 @@ md_pcrel_from (fixp)
/*NOTREACHED*/
}
-/* When we align the .init section, insert the correct NOP pattern. */
+/* Fill in rs_align_code fragments. */
-int
-m88k_do_align (n, fill, max, len)
- int n;
- const char *fill;
- int len;
- int max;
+void
+m88k_handle_align (fragp)
+ fragS *fragp;
{
- if (fill == NULL
- && strcmp (obj_segment_name (now_seg), ".init") == 0)
+ static const unsigned char nop_pattern[] = { 0xf4, 0x00, 0x58, 0x00 };
+
+ int bytes;
+ char *p;
+
+ if (fragp->fr_type != rs_align_code)
+ return;
+
+ bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
+ p = fragp->fr_literal + fragp->fr_fix;
+
+ if (bytes & 3)
{
- static const unsigned char nop_pattern[] = { 0xf4, 0x00, 0x58, 0x00 };
- frag_align_pattern (n, nop_pattern, sizeof (nop_pattern), max);
- return 1;
+ int fix = bytes & 3;
+ memset (p, 0, fix);
+ p += fix;
+ bytes -= fix;
+ fragp->fr_fix += fix;
}
- return 0;
+
+ memcpy (p, nop_pattern, 4);
+ fragp->fr_var = 4;
}
#endif /* M88KCOFF */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-m88k.h b/gnu/usr.bin/binutils/gas/config/tc-m88k.h
index cbd69c84dd6..ee8560584a7 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-m88k.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-m88k.h
@@ -1,7 +1,7 @@
/* m88k.h -- Assembler for the Motorola 88000
Contributed by Devon Bowen of Buffalo University
and Torbjorn Granlund of the Swedish Institute of Computer Science.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 2000
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -100,9 +100,10 @@ struct reloc_info_m88k
#endif
#define SUB_SEGMENT_ALIGN(SEG) max (section_alignment[(int) (SEG)], 4)
-/* We use a special alignment function to insert the correct nop
- pattern in .init. */
-extern int m88k_do_align PARAMS ((int, const char *, int, int));
-#define md_do_align(n,fill,len,max,l) if (m88k_do_align(n,fill,max,len)) goto l
+/* Fill in rs_align_code fragments. */
+extern void m88k_handle_align PARAMS ((fragS *));
+#define HANDLE_ALIGN(frag) m88k_handle_align (frag)
+
+#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4)
#endif /* M88KCOFF */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-mips.c b/gnu/usr.bin/binutils/gas/config/tc-mips.c
index 5e23f3e6722..1148b435a25 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-mips.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-mips.c
@@ -1,5 +1,6 @@
/* tc-mips.c -- assemble code for a MIPS chip.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
Modified for ECOFF and R4000 support by Ian Lance Taylor of Cygnus
@@ -109,6 +110,7 @@ extern int target_big_endian;
static int mips_64;
/* The default target format to use. */
+
const char *
mips_target_format ()
{
@@ -121,9 +123,16 @@ mips_target_format ()
case bfd_target_coff_flavour:
return "pe-mips";
case bfd_target_elf_flavour:
+#ifdef TE_TMIPS
+ /* This is traditional mips */
+ return (target_big_endian
+ ? (mips_64 ? "elf64-tradbigmips" : "elf32-tradbigmips")
+ : (mips_64 ? "elf64-tradlittlemips" : "elf32-tradlittlemips"));
+#else
return (target_big_endian
? (mips_64 ? "elf64-bigmips" : "elf32-bigmips")
: (mips_64 ? "elf64-littlemips" : "elf32-littlemips"));
+#endif
default:
abort ();
return NULL;
@@ -180,10 +189,13 @@ struct mips_set_options
};
/* This is the struct we use to hold the current set of options. Note
- that we must set the isa and mips16 fields to -1 to indicate that
- they have not been initialized. */
+ that we must set the isa field to ISA_UNKNOWN and the mips16 field to
+ -1 to indicate that they have not been initialized. */
-static struct mips_set_options mips_opts = { -1, -1, 0, 0, 0, 0, 0, 0 };
+static struct mips_set_options mips_opts =
+{
+ ISA_UNKNOWN, -1, 0, 0, 0, 0, 0, 0
+};
/* These variables are filled in with the masks of registers used.
The object format code reads them and puts them in the appropriate
@@ -192,45 +204,47 @@ unsigned long mips_gprmask;
unsigned long mips_cprmask[4];
/* MIPS ISA we are using for this output file. */
-static int file_mips_isa;
+static int file_mips_isa = ISA_UNKNOWN;
-/* The CPU type as a number: 2000, 3000, 4000, 4400, etc. */
-static int mips_cpu = -1;
+/* The CPU type we are using for this output file. */
+static int mips_cpu = CPU_UNKNOWN;
-/* The argument of the -mabi= flag. */
-static char* mips_abi_string = 0;
+/* The argument of the -mabi= flag. */
+static char * mips_abi_string = 0;
-/* Wether we should mark the file EABI64 or EABI32. */
+/* Wether we should mark the file EABI64 or EABI32. */
static int mips_eabi64 = 0;
/* If they asked for mips1 or mips2 and a cpu that is
- mips3 or greater, then mark the object file 32BITMODE. */
+ mips3 or greater, then mark the object file 32BITMODE. */
static int mips_32bitmode = 0;
-/* True if -mgp32 was passed. */
+/* True if -mgp32 was passed. */
static int mips_gp32 = 0;
/* Some ISA's have delay slots for instructions which read or write
from a coprocessor (eg. mips1-mips3); some don't (eg mips4).
- Return true if instructions marked INSN_LOAD_COPROC_DELAY,
+ Return true if instructions marked INSN_LOAD_COPROC_DELAY,
INSN_COPROC_MOVE_DELAY, or INSN_WRITE_COND_CODE actually have a
delay slot in this ISA. The uses of this macro assume that any
ISA that has delay slots for one of these, has them for all. They
also assume that ISAs which don't have delays for these insns, don't
- have delays for the INSN_LOAD_MEMORY_DELAY instructions either. */
+ have delays for the INSN_LOAD_MEMORY_DELAY instructions either. */
#define ISA_HAS_COPROC_DELAYS(ISA) ( \
- (ISA) == 1 \
- || (ISA) == 2 \
- || (ISA) == 3 \
+ (ISA) == ISA_MIPS1 \
+ || (ISA) == ISA_MIPS2 \
+ || (ISA) == ISA_MIPS3 \
)
-/* Return true if ISA supports 64 bit gp register instructions. */
+/* Return true if ISA supports 64 bit gp register instructions. */
#define ISA_HAS_64BIT_REGS(ISA) ( \
- (ISA) == 3 \
- || (ISA) == 4 \
+ (ISA) == ISA_MIPS3 \
+ || (ISA) == ISA_MIPS4 \
+ || (ISA) == ISA_MIPS5 \
+ || (ISA) == ISA_MIPS64 \
)
-/* Whether the processor uses hardware interlocks to protect
+/* Whether the processor uses hardware interlocks to protect
reads from the HI and LO registers, and thus does not
require nops to be inserted.
@@ -257,19 +271,19 @@ static int mips_gp32 = 0;
-- Jim Blandy <jimb@cygnus.com> */
-#define hilo_interlocks (mips_cpu == 4010 \
+#define hilo_interlocks (mips_cpu == CPU_R4010 \
)
/* Whether the processor uses hardware interlocks to protect reads
from the GPRs, and thus does not require nops to be inserted. */
#define gpr_interlocks \
- (mips_opts.isa != 1 \
- || mips_cpu == 3900)
+ (mips_opts.isa != ISA_MIPS1 \
+ || mips_cpu == CPU_R3900)
/* As with other "interlocks" this is used by hardware that has FP
(co-processor) interlocks. */
-/* Itbl support may require additional care here. */
-#define cop_interlocks (mips_cpu == 4300 \
+/* Itbl support may require additional care here. */
+#define cop_interlocks (mips_cpu == CPU_R4300 \
)
/* Is this a mfhi or mflo instruction? */
@@ -307,6 +321,14 @@ static int mips_big_got;
instructions. */
static int mips_trap;
+/* 1 if double width floating point constants should not be constructed
+ by a assembling two single width halves into two single width floating
+ point registers which just happen to alias the double width destination
+ register. On some architectures this aliasing can be disabled by a bit
+ in the status register, and the setting of this bit cannot be determined
+ automatically at assemble time. */
+static int mips_disable_float_construction;
+
/* Non-zero if any .set noreorder directives were used. */
static int mips_any_noreorder;
@@ -316,7 +338,7 @@ static int mips_any_noreorder;
static int mips_7000_hilo_fix;
/* The size of the small data section. */
-static int g_switch_value = 8;
+static unsigned int g_switch_value = 8;
/* Whether the -G option was used. */
static int g_switch_seen = 0;
@@ -352,12 +374,12 @@ const char comment_chars[] = "#";
.line and .file directives will appear in the pre-processed output */
/* Note that input_file.c hand checks for '#' at the beginning of the
first line of the input file. This is because the compiler outputs
- #NO_APP at the beginning of its output. */
+ #NO_APP at the beginning of its output. */
/* Also note that C style comments are always supported. */
const char line_comment_chars[] = "#";
-/* This array holds machine specific line separator characters. */
-const char line_separator_chars[] = "";
+/* This array holds machine specific line separator characters. */
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
@@ -448,7 +470,7 @@ static fragS *prev_nop_frag;
static int prev_nop_frag_holds;
/* The number of nop instructions that we know we need in
- prev_nop_frag. */
+ prev_nop_frag. */
static int prev_nop_frag_required;
/* The number of instructions we've seen since prev_nop_frag. */
@@ -463,7 +485,7 @@ static int prev_nop_frag_since;
In order to implement this, we keep track of each unmatched HI
relocation. We then sort them so that they immediately precede the
- corresponding LO relocation. */
+ corresponding LO relocation. */
struct mips_hi_fixup
{
@@ -493,7 +515,7 @@ static const int mips32_to_16_reg_map[] =
/* Map mips16 register numbers to normal MIPS register numbers. */
-static const int mips16_to_32_reg_map[] =
+static const unsigned int mips16_to_32_reg_map[] =
{
16, 17, 2, 3, 4, 5, 6, 7
};
@@ -569,8 +591,8 @@ static const int mips16_to_32_reg_map[] =
| ((warn) ? 1 : 0)))
#define RELAX_OLD(i) (((i) >> 23) & 0x7f)
#define RELAX_NEW(i) (((i) >> 16) & 0x7f)
-#define RELAX_RELOC1(i) ((bfd_vma)(((i) >> 9) & 0x7f) - 64)
-#define RELAX_RELOC2(i) ((bfd_vma)(((i) >> 2) & 0x7f) - 64)
+#define RELAX_RELOC1(i) ((bfd_vma) (((i) >> 9) & 0x7f) - 64)
+#define RELAX_RELOC2(i) ((bfd_vma) (((i) >> 2) & 0x7f) - 64)
#define RELAX_RELOC3(i) (((i) >> 1) & 1)
#define RELAX_WARN(i) ((i) & 1)
@@ -627,7 +649,7 @@ enum mips_regclass { MIPS_GR_REG, MIPS_FP_REG, MIPS16_REG };
static int insn_uses_reg PARAMS ((struct mips_cl_insn *ip,
unsigned int reg, enum mips_regclass class));
-static int reg_needs_delay PARAMS ((int));
+static int reg_needs_delay PARAMS ((unsigned int));
static void mips16_mark_labels PARAMS ((void));
static void append_insn PARAMS ((char *place,
struct mips_cl_insn * ip,
@@ -691,9 +713,24 @@ static void s_mips_stab PARAMS ((int));
static void s_mips_weakext PARAMS ((int));
static void s_file PARAMS ((int));
static int mips16_extended_frag PARAMS ((fragS *, asection *, long));
+static const char *mips_isa_to_str PARAMS ((int));
+static const char *mips_cpu_to_str PARAMS ((int));
+static int validate_mips_insn PARAMS ((const struct mips_opcode *));
+/* Table and functions used to map between CPU/ISA names, and
+ ISA levels, and CPU numbers. */
-static int validate_mips_insn PARAMS ((const struct mips_opcode *));
+struct mips_cpu_info
+{
+ const char *name; /* CPU or ISA name. */
+ int is_isa; /* Is this an ISA? (If 0, a CPU.) */
+ int isa; /* ISA level. */
+ int cpu; /* CPU number (default CPU if ISA). */
+};
+
+static const struct mips_cpu_info *mips_cpu_info_from_name PARAMS ((const char *));
+static const struct mips_cpu_info *mips_cpu_info_from_isa PARAMS ((int));
+static const struct mips_cpu_info *mips_cpu_info_from_cpu PARAMS ((int));
/* Pseudo-op table.
@@ -715,7 +752,7 @@ static int validate_mips_insn PARAMS ((const struct mips_opcode *));
static const pseudo_typeS mips_pseudo_table[] =
{
- /* MIPS specific pseudo-ops. */
+ /* MIPS specific pseudo-ops. */
{"option", s_option, 0},
{"set", s_mipsset, 0},
{"rdata", s_change_sec, 'r'},
@@ -728,7 +765,7 @@ static const pseudo_typeS mips_pseudo_table[] =
{"cpadd", s_cpadd, 0},
{"insn", s_insn, 0},
- /* Relatively generic pseudo-ops that happen to be used on MIPS
+ /* Relatively generic pseudo-ops that happen to be used on MIPS
chips. */
{"asciiz", stringer, 1},
{"bss", s_change_sec, 'b'},
@@ -737,7 +774,7 @@ static const pseudo_typeS mips_pseudo_table[] =
{"dword", s_cons, 3},
{"weakext", s_mips_weakext, 0},
- /* These pseudo-ops are defined in read.c, but must be overridden
+ /* These pseudo-ops are defined in read.c, but must be overridden
here for one reason or another. */
{"align", s_align, 0},
{"byte", s_cons, 0},
@@ -756,12 +793,18 @@ static const pseudo_typeS mips_pseudo_table[] =
{"stabn", s_mips_stab, 'n'},
{"text", s_change_sec, 't'},
{"word", s_cons, 2},
+
+#ifdef MIPS_STABS_ELF
+ { "extern", ecoff_directive_extern, 0},
+#endif
+
{ NULL, NULL, 0 },
};
-static const pseudo_typeS mips_nonecoff_pseudo_table[] = {
- /* These pseudo-ops should be defined by the object file format.
- However, a.out doesn't support them, so we have versions here. */
+static const pseudo_typeS mips_nonecoff_pseudo_table[] =
+{
+ /* These pseudo-ops should be defined by the object file format.
+ However, a.out doesn't support them, so we have versions here. */
{"aent", s_mips_ent, 1},
{"bgnb", s_ignore, 0},
{"end", s_mips_end, 0},
@@ -837,20 +880,50 @@ static boolean mips16_small, mips16_ext;
static segT pdr_seg;
#endif
-/*
- * This function is called once, at assembler startup time. It should
- * set up all the tables, etc. that the MD part of the assembler will need.
- */
+static const char *
+mips_isa_to_str (isa)
+ int isa;
+{
+ const struct mips_cpu_info *ci;
+ static char s[20];
+
+ ci = mips_cpu_info_from_isa (isa);
+ if (ci != NULL)
+ return (ci->name);
+
+ sprintf (s, "ISA#%d", isa);
+ return s;
+}
+
+static const char *
+mips_cpu_to_str (cpu)
+ int cpu;
+{
+ const struct mips_cpu_info *ci;
+ static char s[16];
+
+ ci = mips_cpu_info_from_cpu (cpu);
+ if (ci != NULL)
+ return (ci->name);
+
+ sprintf (s, "CPU#%d", cpu);
+ return s;
+}
+
+/* This function is called once, at assembler startup time. It should
+ set up all the tables, etc. that the MD part of the assembler will need. */
+
void
md_begin ()
{
- boolean ok = false;
register const char *retval = NULL;
- register unsigned int i = 0;
+ int i = 0;
const char *cpu;
char *a = NULL;
int broken = 0;
int mips_isa_from_cpu;
+ int target_cpu_had_mips16 = 0;
+ const struct mips_cpu_info *ci;
/* GP relative stuff not working for PE */
if (strncmp (TARGET_OS, "pe", 2) == 0
@@ -870,179 +943,80 @@ md_begin ()
cpu = a;
}
- if (mips_cpu < 0)
+ if (strncmp (cpu, "mips16", sizeof "mips16" - 1) == 0)
{
- /* Set mips_cpu based on TARGET_CPU, unless TARGET_CPU is
- just the generic 'mips', in which case set mips_cpu based
- on the given ISA, if any. */
-
- if (strcmp (cpu, "mips") == 0)
- {
- if (mips_opts.isa < 0)
- mips_cpu = 3000;
-
- else if (mips_opts.isa == 2)
- mips_cpu = 6000;
-
- else if (mips_opts.isa == 3)
- mips_cpu = 4000;
-
- else if (mips_opts.isa == 4)
- mips_cpu = 8000;
-
- else
- mips_cpu = 3000;
- }
-
- else if (strcmp (cpu, "r3900") == 0
- || strcmp (cpu, "mipstx39") == 0
- )
- mips_cpu = 3900;
-
- else if (strcmp (cpu, "r6000") == 0
- || strcmp (cpu, "mips2") == 0)
- mips_cpu = 6000;
-
- else if (strcmp (cpu, "mips64") == 0
- || strcmp (cpu, "r4000") == 0
- || strcmp (cpu, "mips3") == 0)
- mips_cpu = 4000;
-
- else if (strcmp (cpu, "r4400") == 0)
- mips_cpu = 4400;
-
- else if (strcmp (cpu, "mips64orion") == 0
- || strcmp (cpu, "r4600") == 0)
- mips_cpu = 4600;
-
- else if (strcmp (cpu, "r4650") == 0)
- mips_cpu = 4650;
-
- else if (strcmp (cpu, "mips64vr4300") == 0)
- mips_cpu = 4300;
-
- else if (strcmp (cpu, "mips64vr4111") == 0)
- mips_cpu = 4111;
-
- else if (strcmp (cpu, "mips64vr4100") == 0)
- mips_cpu = 4100;
-
- else if (strcmp (cpu, "r4010") == 0)
- mips_cpu = 4010;
-
-
- else if (strcmp (cpu, "r5000") == 0
- || strcmp (cpu, "mips64vr5000") == 0)
- mips_cpu = 5000;
-
-
-
- else if (strcmp (cpu, "r8000") == 0
- || strcmp (cpu, "mips4") == 0)
- mips_cpu = 8000;
-
- else if (strcmp (cpu, "r10000") == 0)
- mips_cpu = 10000;
-
- else if (strcmp (cpu, "mips16") == 0)
- mips_cpu = 0; /* FIXME */
-
- else
- mips_cpu = 3000;
+ target_cpu_had_mips16 = 1;
+ cpu += sizeof "mips16" - 1;
}
- if (mips_cpu == 3000
- || mips_cpu == 3900)
- mips_isa_from_cpu = 1;
-
- else if (mips_cpu == 6000
- || mips_cpu == 4010)
- mips_isa_from_cpu = 2;
-
- else if (mips_cpu == 4000
- || mips_cpu == 4100
- || mips_cpu == 4111
- || mips_cpu == 4400
- || mips_cpu == 4300
- || mips_cpu == 4600
- || mips_cpu == 4650)
- mips_isa_from_cpu = 3;
-
- else if (mips_cpu == 5000
- || mips_cpu == 8000
- || mips_cpu == 10000)
- mips_isa_from_cpu = 4;
-
- else
- mips_isa_from_cpu = -1;
+ if (mips_opts.mips16 < 0)
+ mips_opts.mips16 = target_cpu_had_mips16;
- if (mips_opts.isa == -1)
+ /* At this point, mips_cpu will either be CPU_UNKNOWN if no CPU was
+ specified on the command line, or some other value if one was.
+ Similarly, mips_opts.isa will be ISA_UNKNOWN if not specified on
+ the command line, or will be set otherwise if one was. */
+ if (mips_cpu != CPU_UNKNOWN && mips_opts.isa != ISA_UNKNOWN)
{
- if (mips_isa_from_cpu != -1)
- mips_opts.isa = mips_isa_from_cpu;
- else
- mips_opts.isa = 1;
+ /* We have it all. There's nothing to do. */
}
-
- if (mips_opts.mips16 < 0)
+ else if (mips_cpu != CPU_UNKNOWN && mips_opts.isa == ISA_UNKNOWN)
{
- if (strncmp (TARGET_CPU, "mips16", sizeof "mips16" - 1) == 0)
- mips_opts.mips16 = 1;
- else
- mips_opts.mips16 = 0;
+ /* We have CPU, we need ISA. */
+ ci = mips_cpu_info_from_cpu (mips_cpu);
+ assert (ci != NULL);
+ mips_opts.isa = ci->isa;
+ }
+ else if (mips_cpu == CPU_UNKNOWN && mips_opts.isa != ISA_UNKNOWN)
+ {
+ /* We have ISA, we need default CPU. */
+ ci = mips_cpu_info_from_isa (mips_opts.isa);
+ assert (ci != NULL);
+ mips_cpu = ci->cpu;
}
+ else
+ {
+ /* We need to set both ISA and CPU from target cpu. */
+ ci = mips_cpu_info_from_name (cpu);
+ if (ci == NULL)
+ ci = mips_cpu_info_from_cpu (CPU_R3000);
+ assert (ci != NULL);
+ mips_opts.isa = ci->isa;
+ mips_cpu = ci->cpu;
+ }
+
+ ci = mips_cpu_info_from_cpu (mips_cpu);
+ assert (ci != NULL);
+ mips_isa_from_cpu = ci->isa;
/* End of TARGET_CPU processing, get rid of malloced memory
- if necessary. */
+ if necessary. */
cpu = NULL;
if (a != NULL)
{
- free (a);
- a = NULL;
+ free (a);
+ a = NULL;
}
- if (mips_opts.isa == 1 && mips_trap)
+ if (mips_opts.isa == ISA_MIPS1 && mips_trap)
as_bad (_("trap exception not supported at ISA 1"));
/* Set the EABI kind based on the ISA before the user gets
to change the ISA with directives. This isn't really
- the best, but then neither is basing the abi on the isa. */
+ the best, but then neither is basing the abi on the isa. */
if (ISA_HAS_64BIT_REGS (mips_opts.isa)
&& mips_abi_string
- && 0 == strcmp (mips_abi_string,"eabi"))
+ && 0 == strcmp (mips_abi_string, "eabi"))
mips_eabi64 = 1;
- if (mips_cpu != 0 && mips_cpu != -1)
- {
- ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, mips_cpu);
-
- /* If they asked for mips1 or mips2 and a cpu that is
- mips3 or greater, then mark the object file 32BITMODE. */
- if (mips_isa_from_cpu != -1
- && ! ISA_HAS_64BIT_REGS (mips_opts.isa)
- && ISA_HAS_64BIT_REGS (mips_isa_from_cpu))
- mips_32bitmode = 1;
- }
- else
- {
- switch (mips_opts.isa)
- {
- case 1:
- ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, 3000);
- break;
- case 2:
- ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, 6000);
- break;
- case 3:
- ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, 4000);
- break;
- case 4:
- ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, 8000);
- break;
- }
- }
+ /* If they asked for mips1 or mips2 and a cpu that is
+ mips3 or greater, then mark the object file 32BITMODE. */
+ if (mips_isa_from_cpu != ISA_UNKNOWN
+ && ! ISA_HAS_64BIT_REGS (mips_opts.isa)
+ && ISA_HAS_64BIT_REGS (mips_isa_from_cpu))
+ mips_32bitmode = 1;
- if (! ok)
+ if (! bfd_set_arch_mach (stdoutput, bfd_arch_mips, mips_cpu))
as_warn (_("Could not set architecture and machine"));
file_mips_isa = mips_opts.isa;
@@ -1176,10 +1150,9 @@ md_begin ()
{
sec = subseg_new (".reginfo", (subsegT) 0);
-
(void) bfd_set_section_flags (stdoutput, sec, flags);
(void) bfd_set_section_alignment (stdoutput, sec, 2);
-
+
#ifdef OBJ_ELF
mips_regmask_frag = frag_more (sizeof (Elf32_External_RegInfo));
#endif
@@ -1259,8 +1232,8 @@ md_assemble (str)
else
{
mips_ip (str, &insn);
- DBG((_("returned from mips_ip(%s) insn_opcode = 0x%x\n"),
- str, insn.insn_opcode));
+ DBG ((_("returned from mips_ip(%s) insn_opcode = 0x%x\n"),
+ str, insn.insn_opcode));
}
if (insn_error)
@@ -1373,7 +1346,7 @@ insn_uses_reg (ip, reg, class)
static int
reg_needs_delay (reg)
- int reg;
+ unsigned int reg;
{
unsigned long prev_pinfo;
@@ -1388,7 +1361,7 @@ reg_needs_delay (reg)
delays delay the use of general register rt for one
instruction on the r3000. The r6000 and r4000 use
interlocks. */
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
know (prev_pinfo & INSN_WRITE_GPR_T);
if (reg == ((prev_insn.insn_opcode >> OP_SH_RT) & OP_MASK_RT))
return 1;
@@ -1411,6 +1384,7 @@ mips16_mark_labels ()
if (mips_opts.mips16)
{
struct insn_label_list *l;
+ valueT val;
for (l = insn_labels; l != NULL; l = l->next)
{
@@ -1418,8 +1392,9 @@ mips16_mark_labels ()
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
S_SET_OTHER (l->label, STO_MIPS16);
#endif
- if ((S_GET_VALUE (l->label) & 1) == 0)
- S_SET_VALUE (l->label, S_GET_VALUE (l->label) + 1);
+ val = S_GET_VALUE (l->label);
+ if ((val & 1) == 0)
+ S_SET_VALUE (l->label, val + 1);
}
}
}
@@ -1492,7 +1467,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
delays delay the use of general register rt for one
instruction on the r3000. The r6000 and r4000 use
interlocks. */
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
know (prev_pinfo & INSN_WRITE_GPR_T);
if (mips_optimize == 0
|| insn_uses_reg (ip,
@@ -1504,8 +1479,8 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
else if (! mips_opts.mips16
&& ISA_HAS_COPROC_DELAYS (mips_opts.isa)
&& (((prev_pinfo & INSN_COPROC_MOVE_DELAY)
- && ! cop_interlocks)
- || (mips_opts.isa == 1
+ && ! cop_interlocks)
+ || (mips_opts.isa == ISA_MIPS1
&& (prev_pinfo & INSN_COPROC_MEMORY_DELAY))))
{
/* A generic coprocessor delay. The previous instruction
@@ -1523,7 +1498,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
than the floating point unit are not distinguished at
all. */
/* Itbl support may require additional care here. FIXME!
- Need to modify this to include knowledge about
+ Need to modify this to include knowledge about
user specified delays! */
if (prev_pinfo & INSN_WRITE_FPR_T)
{
@@ -1551,7 +1526,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
instruction may set the condition codes, and the
current instruction uses them, we must insert two
NOPS. */
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
if (mips_optimize == 0
|| ((prev_pinfo & INSN_WRITE_COND_CODE)
&& (pinfo & INSN_READ_COND_CODE)))
@@ -1570,7 +1545,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
(this means it is a floating point comparison
instruction). If this instruction uses the condition
codes, we need to insert a single NOP. */
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
if (mips_optimize == 0
|| (pinfo & INSN_READ_COND_CODE))
++nops;
@@ -1584,9 +1559,8 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
else if (mips_7000_hilo_fix
&& MF_HILO_INSN (prev_pinfo)
&& insn_uses_reg (ip, ((prev_insn.insn_opcode >> OP_SH_RD)
- & OP_MASK_RD),
- MIPS_GR_REG))
-
+ & OP_MASK_RD),
+ MIPS_GR_REG))
{
nops += 2;
}
@@ -1601,22 +1575,22 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
&& insn_uses_reg (ip, ((prev_prev_insn.insn_opcode >> OP_SH_RD)
& OP_MASK_RD),
MIPS_GR_REG))
-
+
{
nops += 1;
}
-
+
else if (prev_pinfo & INSN_READ_LO)
{
/* The previous instruction reads the LO register; if the
current instruction writes to the LO register, we must
- insert two NOPS. Some newer processors have interlocks.
- Also the tx39's multiply instructions can be exectuted
+ insert two NOPS. Some newer processors have interlocks.
+ Also the tx39's multiply instructions can be exectuted
immediatly after a read from HI/LO (without the delay),
- though the tx39's divide insns still do require the
- delay. */
+ though the tx39's divide insns still do require the
+ delay. */
if (! (hilo_interlocks
- || (mips_cpu == 3900 && (pinfo & INSN_MULT)))
+ || (mips_cpu == CPU_R3900 && (pinfo & INSN_MULT)))
&& (mips_optimize == 0
|| (pinfo & INSN_WRITE_LO)))
nops += 2;
@@ -1625,7 +1599,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
to a write to LO we have a read followed by a write
less than 2 insns away. We assume the target of
a branch might be a write to LO, and insert a nop
- between a read and an immediately following branch. */
+ between a read and an immediately following branch. */
else if (mips_opts.mips16
&& (mips_optimize == 0
|| (pinfo & MIPS16_INSN_BRANCH)))
@@ -1636,9 +1610,9 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
/* The previous instruction reads the HI register; if the
current instruction writes to the HI register, we must
insert a NOP. Some newer processors have interlocks.
- Also the note tx39's multiply above. */
+ Also the note tx39's multiply above. */
if (! (hilo_interlocks
- || (mips_cpu == 3900 && (pinfo & INSN_MULT)))
+ || (mips_cpu == CPU_R3900 && (pinfo & INSN_MULT)))
&& (mips_optimize == 0
|| (pinfo & INSN_WRITE_HI)))
nops += 2;
@@ -1647,7 +1621,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
to a write to HI we have a read followed by a write
less than 2 insns away. We assume the target of
a branch might be a write to HI, and insert a nop
- between a read and an immediately following branch. */
+ between a read and an immediately following branch. */
else if (mips_opts.mips16
&& (mips_optimize == 0
|| (pinfo & MIPS16_INSN_BRANCH)))
@@ -1656,7 +1630,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
/* If the previous instruction was in a noreorder section, then
we don't want to insert the nop after all. */
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
if (prev_insn_unreordered)
nops = 0;
@@ -1677,11 +1651,11 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
|| ((prev_prev_insn.insn_mo->pinfo & INSN_READ_LO)
&& (pinfo & INSN_WRITE_LO)
&& ! (hilo_interlocks
- || (mips_cpu == 3900 && (pinfo & INSN_MULT))))
+ || (mips_cpu == CPU_R3900 && (pinfo & INSN_MULT))))
|| ((prev_prev_insn.insn_mo->pinfo & INSN_READ_HI)
&& (pinfo & INSN_WRITE_HI)
&& ! (hilo_interlocks
- || (mips_cpu == 3900 && (pinfo & INSN_MULT)))))
+ || (mips_cpu == CPU_R3900 && (pinfo & INSN_MULT)))))
prev_prev_nop = 1;
else
prev_prev_nop = 0;
@@ -1698,7 +1672,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
to 0. */
if (nops > 0
&& ! mips_opts.noreorder
- && ip->insn_opcode == (mips_opts.mips16 ? 0x6500 : 0))
+ && ip->insn_opcode == (unsigned) (mips_opts.mips16 ? 0x6500 : 0))
--nops;
/* Now emit the right number of NOP instructions. */
@@ -1731,12 +1705,15 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
for (l = insn_labels; l != NULL; l = l->next)
{
+ valueT val;
+
assert (S_GET_SEGMENT (l->label) == now_seg);
symbol_set_frag (l->label, frag_now);
- S_SET_VALUE (l->label, (valueT) frag_now_fix ());
+ val = (valueT) frag_now_fix ();
/* mips16 text labels are stored as odd. */
if (mips_opts.mips16)
- S_SET_VALUE (l->label, S_GET_VALUE (l->label) + 1);
+ val += 1;
+ S_SET_VALUE (l->label, val);
}
#ifndef NO_ECOFF_DEBUGGING
@@ -1749,7 +1726,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
/* We have a frag holding nops we may be able to remove. If
we don't need any nops, we can decrease the size of
prev_nop_frag by the size of one instruction. If we do
- need some nops, we count them in prev_nops_required. */
+ need some nops, we count them in prev_nops_required. */
if (prev_nop_frag_since == 0)
{
if (nops == 0)
@@ -1850,7 +1827,6 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
| ((address_expr->X_add_number & 0x3fffc) >> 2));
break;
-
case BFD_RELOC_16_PCREL_S2:
goto need_reloc;
@@ -1923,13 +1899,13 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
mips_cprmask[1] |= 1 << ((ip->insn_opcode >> OP_SH_FR) & OP_MASK_FR);
if (pinfo & INSN_COP)
{
- /* We don't keep enough information to sort these cases out.
- The itbl support does keep this information however, although
- we currently don't support itbl fprmats as part of the cop
- instruction. May want to add this support in the future. */
+ /* We don't keep enough information to sort these cases out.
+ The itbl support does keep this information however, although
+ we currently don't support itbl fprmats as part of the cop
+ instruction. May want to add this support in the future. */
}
/* Never set the bit for $0, which is always zero. */
- mips_gprmask &=~ 1 << 0;
+ mips_gprmask &= ~1 << 0;
}
else
{
@@ -1976,7 +1952,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
already know we can not swap. */
|| nops != 0
/* If we don't even know the previous insn, we can not
- swap. */
+ swap. */
|| ! prev_insn_valid
/* If the previous insn is already in a branch delay
slot, then we can not swap. */
@@ -2027,12 +2003,12 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
|| (! mips_opts.mips16
&& ISA_HAS_COPROC_DELAYS (mips_opts.isa)
&& (prev_pinfo
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
& (INSN_LOAD_COPROC_DELAY
| INSN_COPROC_MOVE_DELAY
| INSN_WRITE_COND_CODE)))
|| (! (hilo_interlocks
- || (mips_cpu == 3900 && (pinfo & INSN_MULT)))
+ || (mips_cpu == CPU_R3900 && (pinfo & INSN_MULT)))
&& (prev_pinfo
& (INSN_READ_LO
| INSN_READ_HI)))
@@ -2040,8 +2016,8 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
&& ! gpr_interlocks
&& (prev_pinfo & INSN_LOAD_MEMORY_DELAY))
|| (! mips_opts.mips16
- && mips_opts.isa == 1
- /* Itbl support may require additional care here. */
+ && mips_opts.isa == ISA_MIPS1
+ /* Itbl support may require additional care here. */
&& (prev_pinfo & INSN_COPROC_MEMORY_DELAY))
/* We can not swap with a branch instruction. */
|| (prev_pinfo
@@ -2146,7 +2122,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
can not swap. */
|| (! mips_opts.mips16
&& ISA_HAS_COPROC_DELAYS (mips_opts.isa)
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
&& ((prev_prev_insn.insn_mo->pinfo & INSN_LOAD_COPROC_DELAY)
|| (! gpr_interlocks
&& (prev_prev_insn.insn_mo->pinfo
@@ -2172,8 +2148,8 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
mode, we can not swap. This normally means that the
previous instruction was a 4 byte branch anyhow. */
|| (mips_opts.mips16 && prev_insn_fixp)
- /* If the previous instruction is a sync, sync.l, or
- sync.p, we can not swap. */
+ /* If the previous instruction is a sync, sync.l, or
+ sync.p, we can not swap. */
|| (prev_pinfo & INSN_SYNC))
{
/* We could do even better for unconditional branches to
@@ -2321,7 +2297,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
/* This function forgets that there was any previous instruction or
label. If PRESERVE is non-zero, it remembers enough information to
- know whether nops are needed before a noreorder section. */
+ know whether nops are needed before a noreorder section. */
static void
mips_no_prev_insn (preserve)
@@ -2349,7 +2325,7 @@ mips_no_prev_insn (preserve)
something other than instructions. It inserts any NOPS which might
be needed by the previous instruction, and clears the information
kept for the previous instructions. The INSNS parameter is true if
- instructions are to follow. */
+ instructions are to follow. */
static void
mips_emit_delays (insns)
@@ -2373,14 +2349,14 @@ mips_emit_delays (insns)
| INSN_READ_HI)))
|| (! mips_opts.mips16
&& ! gpr_interlocks
- && (prev_insn.insn_mo->pinfo
+ && (prev_insn.insn_mo->pinfo
& INSN_LOAD_MEMORY_DELAY))
|| (! mips_opts.mips16
- && mips_opts.isa == 1
+ && mips_opts.isa == ISA_MIPS1
&& (prev_insn.insn_mo->pinfo
& INSN_COPROC_MEMORY_DELAY)))
{
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
++nops;
if ((! mips_opts.mips16
&& ISA_HAS_COPROC_DELAYS (mips_opts.isa)
@@ -2402,7 +2378,7 @@ mips_emit_delays (insns)
&& ((prev_prev_insn.insn_mo->pinfo & INSN_READ_HI)
|| (prev_prev_insn.insn_mo->pinfo & INSN_READ_LO))))
{
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
if (! prev_prev_insn_unreordered)
++nops;
}
@@ -2428,19 +2404,22 @@ mips_emit_delays (insns)
if (insns)
{
/* Move on to a new frag, so that it is safe to simply
- decrease the size of prev_nop_frag. */
+ decrease the size of prev_nop_frag. */
frag_wane (frag_now);
frag_new (0);
}
for (l = insn_labels; l != NULL; l = l->next)
{
+ valueT val;
+
assert (S_GET_SEGMENT (l->label) == now_seg);
symbol_set_frag (l->label, frag_now);
- S_SET_VALUE (l->label, (valueT) frag_now_fix ());
+ val = (valueT) frag_now_fix ();
/* mips16 text labels are stored as odd. */
if (mips_opts.mips16)
- S_SET_VALUE (l->label, S_GET_VALUE (l->label) + 1);
+ val += 1;
+ S_SET_VALUE (l->label, val);
}
}
}
@@ -2514,9 +2493,9 @@ macro_build (place, counter, ep, name, fmt, va_alist)
{
if (strcmp (fmt, insn.insn_mo->args) == 0
&& insn.insn_mo->pinfo != INSN_MACRO
- && OPCODE_IS_MEMBER (insn.insn_mo, mips_opts.isa, mips_cpu,
+ && OPCODE_IS_MEMBER (insn.insn_mo, mips_opts.isa, mips_cpu,
mips_gp32)
- && (mips_cpu != 4650 || (insn.insn_mo->pinfo & FP_D) == 0))
+ && (mips_cpu != CPU_R4650 || (insn.insn_mo->pinfo & FP_D) == 0))
break;
++insn.insn_mo;
@@ -2554,6 +2533,15 @@ macro_build (place, counter, ep, name, fmt, va_alist)
insn.insn_opcode |= va_arg (args, int) << 11;
continue;
+ case 'U':
+ {
+ int tmp = va_arg (args, int);
+
+ insn.insn_opcode |= tmp << 16;
+ insn.insn_opcode |= tmp << 11;
+ continue;
+ }
+
case 'V':
case 'S':
insn.insn_opcode |= va_arg (args, int) << 11;
@@ -2574,6 +2562,10 @@ macro_build (place, counter, ep, name, fmt, va_alist)
insn.insn_opcode |= va_arg (args, int) << 6;
continue;
+ case 'J':
+ insn.insn_opcode |= va_arg (args, int) << 6;
+ continue;
+
case 'q':
insn.insn_opcode |= va_arg (args, int) << 6;
continue;
@@ -3070,63 +3062,65 @@ load_register (counter, reg, ep, dbl)
unsigned long hi, lo;
if (hi32.X_add_number == 0xffffffff)
- {
- if ((lo32.X_add_number & 0xffff8000) == 0xffff8000)
- {
- macro_build ((char *) NULL, counter, &lo32, "addiu", "t,r,j",
+ {
+ if ((lo32.X_add_number & 0xffff8000) == 0xffff8000)
+ {
+ macro_build ((char *) NULL, counter, &lo32, "addiu", "t,r,j",
reg, 0, (int) BFD_RELOC_LO16);
- return;
- }
- if (lo32.X_add_number & 0x80000000)
- {
- macro_build ((char *) NULL, counter, &lo32, "lui", "t,u", reg,
- (int) BFD_RELOC_HI16);
+ return;
+ }
+ if (lo32.X_add_number & 0x80000000)
+ {
+ macro_build ((char *) NULL, counter, &lo32, "lui", "t,u", reg,
+ (int) BFD_RELOC_HI16);
if (lo32.X_add_number & 0xffff)
macro_build ((char *) NULL, counter, &lo32, "ori", "t,r,i",
reg, reg, (int) BFD_RELOC_LO16);
- return;
- }
- }
+ return;
+ }
+ }
/* Check for 16bit shifted constant. We know that hi32 is
non-zero, so start the mask on the first bit of the hi32
value. */
shift = 17;
do
- {
- unsigned long himask, lomask;
-
- if (shift < 32)
- {
- himask = 0xffff >> (32 - shift);
- lomask = (0xffff << shift) & 0xffffffff;
- }
- else
- {
- himask = 0xffff << (shift - 32);
- lomask = 0;
- }
- if ((hi32.X_add_number & ~ (offsetT) himask) == 0
- && (lo32.X_add_number & ~ (offsetT) lomask) == 0)
- {
- expressionS tmp;
-
- tmp.X_op = O_constant;
- if (shift < 32)
- tmp.X_add_number = ((hi32.X_add_number << (32 - shift))
- | (lo32.X_add_number >> shift));
- else
- tmp.X_add_number = hi32.X_add_number >> (shift - 32);
- macro_build ((char *) NULL, counter, &tmp, "ori", "t,r,i", reg, 0,
- (int) BFD_RELOC_LO16);
- macro_build ((char *) NULL, counter, NULL,
- (shift >= 32) ? "dsll32" : "dsll",
- "d,w,<", reg, reg,
- (shift >= 32) ? shift - 32 : shift);
- return;
- }
- shift++;
- } while (shift <= (64 - 16));
+ {
+ unsigned long himask, lomask;
+
+ if (shift < 32)
+ {
+ himask = 0xffff >> (32 - shift);
+ lomask = (0xffff << shift) & 0xffffffff;
+ }
+ else
+ {
+ himask = 0xffff << (shift - 32);
+ lomask = 0;
+ }
+ if ((hi32.X_add_number & ~(offsetT) himask) == 0
+ && (lo32.X_add_number & ~(offsetT) lomask) == 0)
+ {
+ expressionS tmp;
+
+ tmp.X_op = O_constant;
+ if (shift < 32)
+ tmp.X_add_number = ((hi32.X_add_number << (32 - shift))
+ | (lo32.X_add_number >> shift));
+ else
+ tmp.X_add_number = hi32.X_add_number >> (shift - 32);
+ macro_build ((char *) NULL, counter, &tmp,
+ "ori", "t,r,i", reg, 0,
+ (int) BFD_RELOC_LO16);
+ macro_build ((char *) NULL, counter, NULL,
+ (shift >= 32) ? "dsll32" : "dsll",
+ "d,w,<", reg, reg,
+ (shift >= 32) ? shift - 32 : shift);
+ return;
+ }
+ shift++;
+ }
+ while (shift <= (64 - 16));
/* Find the bit number of the lowest one bit, and store the
shifted value in hi/lo. */
@@ -3158,38 +3152,38 @@ load_register (counter, reg, ep, dbl)
/* Optimize if the shifted value is a (power of 2) - 1. */
if ((hi == 0 && ((lo + 1) & lo) == 0)
|| (lo == 0xffffffff && ((hi + 1) & hi) == 0))
- {
- shift = COUNT_TOP_ZEROES ((unsigned int) hi32.X_add_number);
+ {
+ shift = COUNT_TOP_ZEROES ((unsigned int) hi32.X_add_number);
if (shift != 0)
- {
+ {
expressionS tmp;
/* This instruction will set the register to be all
ones. */
- tmp.X_op = O_constant;
- tmp.X_add_number = (offsetT) -1;
- macro_build ((char *) NULL, counter, &tmp, "addiu", "t,r,j",
+ tmp.X_op = O_constant;
+ tmp.X_add_number = (offsetT) -1;
+ macro_build ((char *) NULL, counter, &tmp, "addiu", "t,r,j",
reg, 0, (int) BFD_RELOC_LO16);
- if (bit != 0)
- {
- bit += shift;
- macro_build ((char *) NULL, counter, NULL,
- (bit >= 32) ? "dsll32" : "dsll",
- "d,w,<", reg, reg,
- (bit >= 32) ? bit - 32 : bit);
- }
- macro_build ((char *) NULL, counter, NULL,
+ if (bit != 0)
+ {
+ bit += shift;
+ macro_build ((char *) NULL, counter, NULL,
+ (bit >= 32) ? "dsll32" : "dsll",
+ "d,w,<", reg, reg,
+ (bit >= 32) ? bit - 32 : bit);
+ }
+ macro_build ((char *) NULL, counter, NULL,
(shift >= 32) ? "dsrl32" : "dsrl",
- "d,w,<", reg, reg,
+ "d,w,<", reg, reg,
(shift >= 32) ? shift - 32 : shift);
- return;
- }
- }
+ return;
+ }
+ }
/* Sign extend hi32 before calling load_register, because we can
generally get better code when we load a sign extended value. */
if ((hi32.X_add_number & 0x80000000) != 0)
- hi32.X_add_number |= ~ (offsetT) 0xffffffff;
+ hi32.X_add_number |= ~(offsetT) 0xffffffff;
load_register (counter, reg, &hi32, 0);
freg = reg;
}
@@ -3207,13 +3201,13 @@ load_register (counter, reg, ep, dbl)
expressionS mid16;
if ((freg == 0) && (lo32.X_add_number == 0xffffffff))
- {
+ {
macro_build ((char *) NULL, counter, &lo32, "lui", "t,u", reg,
(int) BFD_RELOC_HI16);
- macro_build ((char *) NULL, counter, NULL, "dsrl32", "d,w,<", reg,
- reg, 0);
- return;
- }
+ macro_build ((char *) NULL, counter, NULL, "dsrl32", "d,w,<", reg,
+ reg, 0);
+ return;
+ }
if (freg != 0)
{
@@ -3266,7 +3260,7 @@ load_address (counter, reg, ep)
addiu $reg,$reg,<sym> (BFD_RELOC_LO16)
If we have an addend, we always use the latter form. */
if ((valueT) ep->X_add_number >= MAX_GPREL_OFFSET
- || nopic_need_relax (ep->X_add_symbol, 1))
+ || nopic_need_relax (ep->X_add_symbol, 1))
p = NULL;
else
{
@@ -3443,7 +3437,7 @@ macro (ip)
int tempreg;
int mask;
int icnt = 0;
- int used_at;
+ int used_at = 0;
expressionS expr1;
const char *s;
const char *s2;
@@ -3956,7 +3950,7 @@ macro (ip)
if (mips_trap)
macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", 0, 0);
else
- macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
+ macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
return;
}
@@ -3977,7 +3971,7 @@ macro (ip)
macro_build ((char *) NULL, &icnt, NULL,
dbl ? "ddiv" : "div",
"z,s,t", sreg, treg);
- macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
+ macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
}
expr1.X_add_number = -1;
macro_build ((char *) NULL, &icnt, &expr1,
@@ -4016,7 +4010,7 @@ macro (ip)
that later insns are available for delay slot filling. */
--mips_opts.noreorder;
- macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
+ macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
}
macro_build ((char *) NULL, &icnt, NULL, s, "d", dreg);
break;
@@ -4063,7 +4057,7 @@ macro (ip)
if (mips_trap)
macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", 0, 0);
else
- macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
+ macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
return;
}
if (imm_expr.X_op == O_constant && imm_expr.X_add_number == 1)
@@ -4134,7 +4128,7 @@ macro (ip)
/* We want to close the noreorder block as soon as possible, so
that later insns are available for delay slot filling. */
--mips_opts.noreorder;
- macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
+ macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
}
macro_build ((char *) NULL, &icnt, NULL, s2, "d", dreg);
return;
@@ -4233,9 +4227,13 @@ macro (ip)
}
else if (mips_pic == SVR4_PIC && ! mips_big_got)
{
+ int lw_reloc_type = (int) BFD_RELOC_MIPS_GOT16;
+
/* If this is a reference to an external symbol, and there
is no constant, we want
lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16)
+ or if tempreg is PIC_CALL_REG
+ lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_CALL16)
For a local symbol, we want
lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16)
nop
@@ -4262,9 +4260,11 @@ macro (ip)
expr1.X_add_number = offset_expr.X_add_number;
offset_expr.X_add_number = 0;
frag_grow (32);
+ if (expr1.X_add_number == 0 && tempreg == PIC_CALL_REG)
+ lw_reloc_type = (int) BFD_RELOC_MIPS_CALL16;
macro_build ((char *) NULL, &icnt, &offset_expr,
dbl ? "ld" : "lw",
- "t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT16, GP);
+ "t,o(b)", tempreg, lw_reloc_type, GP);
if (expr1.X_add_number == 0)
{
int off;
@@ -4370,12 +4370,18 @@ macro (ip)
else if (mips_pic == SVR4_PIC)
{
int gpdel;
+ int lui_reloc_type = (int) BFD_RELOC_MIPS_GOT_HI16;
+ int lw_reloc_type = (int) BFD_RELOC_MIPS_GOT_LO16;
/* This is the large GOT case. If this is a reference to an
external symbol, and there is no constant, we want
lui $tempreg,<sym> (BFD_RELOC_MIPS_GOT_HI16)
addu $tempreg,$tempreg,$gp
lw $tempreg,<sym>($tempreg) (BFD_RELOC_MIPS_GOT_LO16)
+ or if tempreg is PIC_CALL_REG
+ lui $tempreg,<sym> (BFD_RELOC_MIPS_CALL_HI16)
+ addu $tempreg,$tempreg,$gp
+ lw $tempreg,<sym>($tempreg) (BFD_RELOC_MIPS_CALL_LO16)
For a local symbol, we want
lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16)
nop
@@ -4414,8 +4420,13 @@ macro (ip)
gpdel = 4;
else
gpdel = 0;
+ if (expr1.X_add_number == 0 && tempreg == PIC_CALL_REG)
+ {
+ lui_reloc_type = (int) BFD_RELOC_MIPS_CALL_HI16;
+ lw_reloc_type = (int) BFD_RELOC_MIPS_CALL_LO16;
+ }
macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u",
- tempreg, (int) BFD_RELOC_MIPS_GOT_HI16);
+ tempreg, lui_reloc_type);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
((bfd_arch_bits_per_address (stdoutput) == 32
|| ! ISA_HAS_64BIT_REGS (mips_opts.isa))
@@ -4423,8 +4434,7 @@ macro (ip)
"d,v,t", tempreg, tempreg, GP);
macro_build ((char *) NULL, &icnt, &offset_expr,
dbl ? "ld" : "lw",
- "t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT_LO16,
- tempreg);
+ "t,o(b)", tempreg, lw_reloc_type, tempreg);
if (expr1.X_add_number == 0)
{
int off;
@@ -4644,7 +4654,7 @@ macro (ip)
{
if (sreg != PIC_CALL_REG)
as_warn (_("MIPS PIC call to register other than $25"));
-
+
macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "jalr",
"d,s", dreg, sreg);
if (mips_cprestore_offset < 0)
@@ -4750,7 +4760,7 @@ macro (ip)
p += 4;
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
- }
+ }
macro_build (p, &icnt, &offset_expr,
((bfd_arch_bits_per_address (stdoutput) == 32
|| ! ISA_HAS_64BIT_REGS (mips_opts.isa))
@@ -4804,22 +4814,22 @@ macro (ip)
goto ld;
case M_LWC0_AB:
s = "lwc0";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto ld;
case M_LWC1_AB:
s = "lwc1";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto ld;
case M_LWC2_AB:
s = "lwc2";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto ld;
case M_LWC3_AB:
s = "lwc3";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto ld;
case M_LWL_AB:
@@ -4831,23 +4841,23 @@ macro (ip)
lr = 1;
goto ld;
case M_LDC1_AB:
- if (mips_cpu == 4650)
+ if (mips_cpu == CPU_R4650)
{
as_bad (_("opcode not supported on this processor"));
return;
}
s = "ldc1";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto ld;
case M_LDC2_AB:
s = "ldc2";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto ld;
case M_LDC3_AB:
s = "ldc3";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto ld;
case M_LDL_AB:
@@ -4889,22 +4899,22 @@ macro (ip)
goto st;
case M_SWC0_AB:
s = "swc0";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto st;
case M_SWC1_AB:
s = "swc1";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto st;
case M_SWC2_AB:
s = "swc2";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto st;
case M_SWC3_AB:
s = "swc3";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto st;
case M_SWL_AB:
@@ -4920,23 +4930,23 @@ macro (ip)
s = "scd";
goto st;
case M_SDC1_AB:
- if (mips_cpu == 4650)
+ if (mips_cpu == CPU_R4650)
{
as_bad (_("opcode not supported on this processor"));
return;
}
s = "sdc1";
coproc = 1;
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
goto st;
case M_SDC2_AB:
s = "sdc2";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto st;
case M_SDC3_AB:
s = "sdc3";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto st;
case M_SDL_AB:
@@ -4948,7 +4958,7 @@ macro (ip)
tempreg = AT;
used_at = 1;
ld_st:
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
if (mask == M_LWC1_AB
|| mask == M_SWC1_AB
|| mask == M_LDC1_AB
@@ -5080,7 +5090,7 @@ macro (ip)
? "lw" : "ld"),
"t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT16, GP);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "");
- p = frag_var (rs_machine_dependent, 4, 0,
+ p = frag_var (rs_machine_dependent, 4, 0,
RELAX_ENCODE (0, 4, -8, 0, 0, 0),
offset_expr.X_add_symbol, (offsetT) 0,
(char *) NULL);
@@ -5305,7 +5315,7 @@ macro (ip)
}
else
abort ();
-
+
/* Now we load the register(s). */
if (ISA_HAS_64BIT_REGS (mips_opts.isa))
macro_build ((char *) NULL, &icnt, &offset_expr, "ld", "t,o(b)",
@@ -5365,7 +5375,7 @@ macro (ip)
s = segment_name (S_GET_SEGMENT (offset_expr.X_add_symbol));
if (strcmp (s, ".lit8") == 0)
{
- if (mips_opts.isa != 1)
+ if (mips_opts.isa != ISA_MIPS1)
{
macro_build ((char *) NULL, &icnt, &offset_expr, "ldc1",
"T,o(b)", treg, (int) BFD_RELOC_MIPS_LITERAL, GP);
@@ -5389,8 +5399,8 @@ macro (ip)
/* FIXME: This won't work for a 64 bit address. */
macro_build_lui ((char *) NULL, &icnt, &offset_expr, AT);
}
-
- if (mips_opts.isa != 1)
+
+ if (mips_opts.isa != ISA_MIPS1)
{
macro_build ((char *) NULL, &icnt, &offset_expr, "ldc1",
"T,o(b)", treg, (int) BFD_RELOC_LO16, AT);
@@ -5408,7 +5418,7 @@ macro (ip)
}
case M_L_DOB:
- if (mips_cpu == 4650)
+ if (mips_cpu == CPU_R4650)
{
as_bad (_("opcode not supported on this processor"));
return;
@@ -5417,7 +5427,7 @@ macro (ip)
to adjust when loading from memory. */
r = BFD_RELOC_LO16;
dob:
- assert (mips_opts.isa == 1);
+ assert (mips_opts.isa == ISA_MIPS1);
macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
target_big_endian ? treg + 1 : treg,
(int) r, breg);
@@ -5449,14 +5459,14 @@ macro (ip)
* But, the resulting address is the same after relocation so why
* generate the extra instruction?
*/
- if (mips_cpu == 4650)
+ if (mips_cpu == CPU_R4650)
{
as_bad (_("opcode not supported on this processor"));
return;
}
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
- if (mips_opts.isa != 1)
+ if (mips_opts.isa != ISA_MIPS1)
{
s = "ldc1";
goto ld;
@@ -5467,13 +5477,13 @@ macro (ip)
goto ldd_std;
case M_S_DAB:
- if (mips_cpu == 4650)
+ if (mips_cpu == CPU_R4650)
{
as_bad (_("opcode not supported on this processor"));
return;
}
- if (mips_opts.isa != 1)
+ if (mips_opts.isa != ISA_MIPS1)
{
s = "sdc1";
goto st;
@@ -5481,7 +5491,7 @@ macro (ip)
s = "swc1";
fmt = "T,o(b)";
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
coproc = 1;
goto ldd_std;
@@ -5517,7 +5527,7 @@ macro (ip)
/* Even on a big endian machine $fn comes before $fn+1. We have
to adjust when loading from memory. We set coproc if we must
load $fn+1 first. */
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
if (! target_big_endian)
coproc = 0;
@@ -5568,7 +5578,7 @@ macro (ip)
used_at = 1;
}
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &offset_expr, s, fmt,
coproc ? treg + 1 : treg,
(int) BFD_RELOC_MIPS_GPREL, tempreg);
@@ -5578,7 +5588,7 @@ macro (ip)
undesired nop. */
hold_mips_optimize = mips_optimize;
mips_optimize = 2;
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &offset_expr, s, fmt,
coproc ? treg : treg + 1,
(int) BFD_RELOC_MIPS_GPREL, tempreg);
@@ -5624,7 +5634,7 @@ macro (ip)
if (p != NULL)
p += 4;
}
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build (p, &icnt, &offset_expr, s, fmt,
coproc ? treg + 1 : treg,
(int) BFD_RELOC_LO16, AT);
@@ -5632,11 +5642,11 @@ macro (ip)
p += 4;
/* FIXME: How do we handle overflow here? */
offset_expr.X_add_number += 4;
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build (p, &icnt, &offset_expr, s, fmt,
coproc ? treg : treg + 1,
(int) BFD_RELOC_LO16, AT);
- }
+ }
else if (mips_pic == SVR4_PIC && ! mips_big_got)
{
int off;
@@ -5677,7 +5687,7 @@ macro (ip)
|| ! ISA_HAS_64BIT_REGS (mips_opts.isa))
? "addu" : "daddu"),
"d,v,t", AT, breg, AT);
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &expr1, s, fmt,
coproc ? treg + 1 : treg,
(int) BFD_RELOC_LO16, AT);
@@ -5687,7 +5697,7 @@ macro (ip)
nop. */
hold_mips_optimize = mips_optimize;
mips_optimize = 2;
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &expr1, s, fmt,
coproc ? treg : treg + 1,
(int) BFD_RELOC_LO16, AT);
@@ -5751,7 +5761,7 @@ macro (ip)
|| ! ISA_HAS_64BIT_REGS (mips_opts.isa))
? "addu" : "daddu"),
"d,v,t", AT, breg, AT);
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &expr1, s, fmt,
coproc ? treg + 1 : treg,
(int) BFD_RELOC_LO16, AT);
@@ -5761,7 +5771,7 @@ macro (ip)
nop. */
hold_mips_optimize = mips_optimize;
mips_optimize = 2;
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &expr1, s, fmt,
coproc ? treg : treg + 1,
(int) BFD_RELOC_LO16, AT);
@@ -5795,7 +5805,7 @@ macro (ip)
"d,v,t", AT, breg, AT);
p += 4;
}
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build (p, &icnt, &expr1, s, fmt,
coproc ? treg + 1 : treg,
(int) BFD_RELOC_LO16, AT);
@@ -5806,7 +5816,7 @@ macro (ip)
nop. */
hold_mips_optimize = mips_optimize;
mips_optimize = 2;
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build (p, &icnt, &expr1, s, fmt,
coproc ? treg : treg + 1,
(int) BFD_RELOC_LO16, AT);
@@ -5838,12 +5848,12 @@ macro (ip)
used_at = 1;
}
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &offset_expr, s, fmt,
coproc ? treg + 1 : treg,
(int) BFD_RELOC_MIPS_GPREL, tempreg);
offset_expr.X_add_number += 4;
- /* Itbl support may require additional care here. */
+ /* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &offset_expr, s, fmt,
coproc ? treg : treg + 1,
(int) BFD_RELOC_MIPS_GPREL, tempreg);
@@ -5862,7 +5872,7 @@ macro (ip)
case M_SD_OB:
s = "sw";
sd_ob:
- assert (bfd_arch_bits_per_address (stdoutput) == 32
+ assert (bfd_arch_bits_per_address (stdoutput) == 32
|| ! ISA_HAS_64BIT_REGS (mips_opts.isa));
macro_build ((char *) NULL, &icnt, &offset_expr, s, "t,o(b)", treg,
(int) BFD_RELOC_LO16, breg);
@@ -5883,10 +5893,10 @@ macro (ip)
What are the side-effects of the cop instruction?
What cache support might we have and what are its effects?
Both coprocessor & memory require delays. how long???
- What registers are read/set/modified?
+ What registers are read/set/modified?
If an itbl is provided to interpret cop instructions,
- this knowledge can be encoded in the itbl spec. */
+ this knowledge can be encoded in the itbl spec. */
case M_COP0:
s = "c0";
@@ -5912,26 +5922,26 @@ macro (ip)
This code builds table entries out of the macros in mip_opcodes.
FIXME: For now we just assemble the expression and pass it's
value along as a 32-bit immediate.
- We may want to have the assembler assemble this value,
+ We may want to have the assembler assemble this value,
so that we gain the assembler's knowledge of delay slots,
symbols, etc.
Would it be more efficient to use mask (id) here? */
- if (itbl_have_entries
+ if (itbl_have_entries
&& (immed_expr = itbl_assemble (ip->insn_mo->name, "")))
- {
+ {
s = ip->insn_mo->name;
s2 = "cop3";
coproc = ITBL_DECODE_PNUM (immed_expr);;
macro_build ((char *) NULL, &icnt, &immed_expr, s, "C");
return;
- }
+ }
macro2 (ip);
return;
}
if (mips_opts.noat)
as_warn (_("Macro used $at after \".set noat\""));
}
-
+
static void
macro2 (ip)
struct mips_cl_insn *ip;
@@ -5954,17 +5964,17 @@ macro2 (ip)
offsetT maxnum;
bfd_reloc_code_real_type r;
char *p;
-
+
treg = (ip->insn_opcode >> 16) & 0x1f;
dreg = (ip->insn_opcode >> 11) & 0x1f;
sreg = breg = (ip->insn_opcode >> 21) & 0x1f;
mask = ip->insn_mo->mask;
-
+
expr1.X_op = O_constant;
expr1.X_op_symbol = NULL;
expr1.X_add_symbol = NULL;
expr1.X_add_number = 1;
-
+
switch (mask)
{
#endif /* LOSING_COMPILER */
@@ -6021,7 +6031,7 @@ macro2 (ip)
expr1.X_add_number = 8;
macro_build ((char *) NULL, &icnt, &expr1, "beq", "s,t,p", dreg, AT);
macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
- macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
+ macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
}
--mips_opts.noreorder;
macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg);
@@ -6054,7 +6064,7 @@ macro2 (ip)
expr1.X_add_number = 8;
macro_build ((char *) NULL, &icnt, &expr1, "beq", "s,t,p", AT, 0);
macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
- macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
+ macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
}
--mips_opts.noreorder;
break;
@@ -6096,12 +6106,12 @@ macro2 (ip)
break;
case M_S_DOB:
- if (mips_cpu == 4650)
+ if (mips_cpu == CPU_R4650)
{
as_bad (_("opcode not supported on this processor"));
return;
}
- assert (mips_opts.isa == 1);
+ assert (mips_opts.isa == ISA_MIPS1);
/* Even on a big endian machine $fn comes before $fn+1. We have
to adjust when storing to memory. */
macro_build ((char *) NULL, &icnt, &offset_expr, "swc1", "T,o(b)",
@@ -6408,9 +6418,9 @@ macro2 (ip)
macro_build ((char *) NULL, &icnt, NULL, s, "s,t", sreg, AT);
break;
- case M_TRUNCWD:
case M_TRUNCWS:
- assert (mips_opts.isa == 1);
+ case M_TRUNCWD:
+ assert (mips_opts.isa == ISA_MIPS1);
sreg = (ip->insn_opcode >> 11) & 0x1f; /* floating reg */
dreg = (ip->insn_opcode >> 06) & 0x1f; /* floating reg */
@@ -6648,7 +6658,7 @@ macro2 (ip)
default:
/* FIXME: Check if this is one of the itbl macros, since they
- are added dynamically. */
+ are added dynamically. */
as_bad (_("Macro %s not implemented yet"), ip->insn_mo->name);
break;
}
@@ -6707,8 +6717,8 @@ mips16_macro (ip)
"0,x,y", xreg, yreg);
expr1.X_add_number = 2;
macro_build ((char *) NULL, &icnt, &expr1, "bnez", "x,p", yreg);
- macro_build ((char *) NULL, &icnt, NULL, "break", "6", 7);
-
+ macro_build ((char *) NULL, &icnt, NULL, "break", "6", 7);
+
/* FIXME: The normal code checks for of -1 / -0x80000000 here,
since that causes an overflow. We should do that as well,
but I don't see how to do the comparisons without a temporary
@@ -6933,13 +6943,15 @@ validate_mips_insn (opc)
case '<': USE_BITS (OP_MASK_SHAMT, OP_SH_SHAMT); break;
case '>': USE_BITS (OP_MASK_SHAMT, OP_SH_SHAMT); break;
case 'A': break;
- case 'B': USE_BITS (OP_MASK_SYSCALL, OP_SH_SYSCALL); break;
+ case 'B': USE_BITS (OP_MASK_CODE20, OP_SH_CODE20); break;
case 'C': USE_BITS (OP_MASK_COPZ, OP_SH_COPZ); break;
case 'D': USE_BITS (OP_MASK_FD, OP_SH_FD); break;
case 'E': USE_BITS (OP_MASK_RT, OP_SH_RT); break;
case 'F': break;
case 'G': USE_BITS (OP_MASK_RD, OP_SH_RD); break;
+ case 'H': USE_BITS (OP_MASK_SEL, OP_SH_SEL); break;
case 'I': break;
+ case 'J': USE_BITS (OP_MASK_CODE19, OP_SH_CODE19); break;
case 'L': break;
case 'M': USE_BITS (OP_MASK_CCC, OP_SH_CCC); break;
case 'N': USE_BITS (OP_MASK_BCC, OP_SH_BCC); break;
@@ -6970,6 +6982,8 @@ validate_mips_insn (opc)
case 'x': break;
case 'z': break;
case 'P': USE_BITS (OP_MASK_PERFREG, OP_SH_PERFREG); break;
+ case 'U': USE_BITS (OP_MASK_RD, OP_SH_RD);
+ USE_BITS (OP_MASK_RT, OP_SH_RT); break;
default:
as_bad (_("internal: bad mips opcode (unknown operand type `%c'): %s %s"),
c, opc->name, opc->args);
@@ -6997,7 +7011,7 @@ mips_ip (str, ip)
{
char *s;
const char *args;
- char c;
+ char c = 0;
struct mips_opcode *insn;
char *argsStart;
unsigned int regno;
@@ -7022,7 +7036,7 @@ mips_ip (str, ip)
save_c = *s;
*s++ = '\0';
}
-
+
insn = (struct mips_opcode *) hash_find (op_hash, str);
/* If we didn't find the instruction in the opcode table, try again, but
@@ -7030,7 +7044,7 @@ mips_ip (str, ip)
first '.'. */
if (insn == NULL)
{
- /* Restore the character we overwrite above (if any). */
+ /* Restore the character we overwrite above (if any). */
if (save_c)
*(--s) = save_c;
@@ -7065,12 +7079,12 @@ mips_ip (str, ip)
if (OPCODE_IS_MEMBER (insn, mips_opts.isa, mips_cpu, mips_gp32))
ok = true;
- else
+ else
ok = false;
-
+
if (insn->pinfo != INSN_MACRO)
{
- if (mips_cpu == 4650 && (insn->pinfo & FP_D) != 0)
+ if (mips_cpu == CPU_R4650 && (insn->pinfo & FP_D) != 0)
ok = false;
}
@@ -7085,10 +7099,11 @@ mips_ip (str, ip)
else
{
static char buf[100];
- sprintf (buf,
- _("opcode not supported on this processor: %d (MIPS%d)"),
- mips_cpu, mips_opts.isa);
-
+ sprintf (buf,
+ _("opcode not supported on this processor: %s (%s)"),
+ mips_cpu_to_str (mips_cpu),
+ mips_isa_to_str (mips_opts.isa));
+
insn_error = buf;
return;
}
@@ -7132,7 +7147,7 @@ mips_ip (str, ip)
case '(':
/* Handle optional base register.
Either the base register is omitted or
- we must have a left paren. */
+ we must have a left paren. */
/* This is dependent on the next operand specifier
is a base register specification. */
assert (args[1] == 'b' || args[1] == '5'
@@ -7176,7 +7191,6 @@ mips_ip (str, ip)
s = expr_end;
continue;
-
case 'k': /* cache code */
case 'h': /* prefx code */
my_getExpression (&imm_expr, s);
@@ -7224,11 +7238,11 @@ mips_ip (str, ip)
s = expr_end;
continue;
- case 'B': /* syscall code */
+ case 'B': /* 20-bit syscall/break code. */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if ((unsigned) imm_expr.X_add_number > 0xfffff)
- as_warn (_("Illegal syscall code (%ld)"),
+ as_warn (_("Illegal 20-bit code (%ld)"),
(long) imm_expr.X_add_number);
ip->insn_opcode |= imm_expr.X_add_number << 6;
imm_expr.X_op = O_absent;
@@ -7236,32 +7250,43 @@ mips_ip (str, ip)
continue;
case 'C': /* Coprocessor code */
- my_getExpression (&imm_expr, s);
+ my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
- if ((unsigned long) imm_expr.X_add_number >= (1<<25))
+ if ((unsigned long) imm_expr.X_add_number >= (1<<25))
{
- as_warn (_("Coproccesor code > 25 bits (%ld)"),
+ as_warn (_("Coproccesor code > 25 bits (%ld)"),
(long) imm_expr.X_add_number);
- imm_expr.X_add_number &= ((1<<25) - 1);
+ imm_expr.X_add_number &= ((1<<25) - 1);
}
- ip->insn_opcode |= imm_expr.X_add_number;
- imm_expr.X_op = O_absent;
- s = expr_end;
- continue;
+ ip->insn_opcode |= imm_expr.X_add_number;
+ imm_expr.X_op = O_absent;
+ s = expr_end;
+ continue;
+
+ case 'J': /* 19-bit wait code. */
+ my_getExpression (&imm_expr, s);
+ check_absolute_expr (ip, &imm_expr);
+ if ((unsigned) imm_expr.X_add_number > 0x7ffff)
+ as_warn (_("Illegal 19-bit code (%ld)"),
+ (long) imm_expr.X_add_number);
+ ip->insn_opcode |= imm_expr.X_add_number << 6;
+ imm_expr.X_op = O_absent;
+ s = expr_end;
+ continue;
case 'P': /* Performance register */
- my_getExpression (&imm_expr, s);
+ my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
- if (imm_expr.X_add_number != 0 && imm_expr.X_add_number != 1)
+ if (imm_expr.X_add_number != 0 && imm_expr.X_add_number != 1)
{
- as_warn (_("Invalidate performance regster (%ld)"),
+ as_warn (_("Invalidate performance regster (%ld)"),
(long) imm_expr.X_add_number);
- imm_expr.X_add_number &= 1;
+ imm_expr.X_add_number &= 1;
}
- ip->insn_opcode |= (imm_expr.X_add_number << 1);
- imm_expr.X_op = O_absent;
- s = expr_end;
- continue;
+ ip->insn_opcode |= (imm_expr.X_add_number << 1);
+ imm_expr.X_op = O_absent;
+ s = expr_end;
+ continue;
case 'b': /* base register */
case 'd': /* destination register */
@@ -7274,6 +7299,7 @@ mips_ip (str, ip)
case 'G': /* coprocessor destination register */
case 'x': /* ignore register name */
case 'z': /* must be zero register */
+ case 'U': /* destination register (clo/clz). */
s_reset = s;
if (s[0] == '$')
{
@@ -7341,15 +7367,15 @@ mips_ip (str, ip)
/* Get_field advances to the start of
the next field, so we need to back
rack to the end of the last field. */
- if (p)
+ if (p)
s = p - 1;
- else
+ else
s = strchr (s, '\0');
regno = r;
}
else
goto notreg;
- }
+ }
else
goto notreg;
}
@@ -7374,8 +7400,8 @@ mips_ip (str, ip)
if (c == 'z' && regno != 0)
break;
- /* Now that we have assembled one operand, we use the args string
- * to figure out where it goes in the instruction. */
+ /* Now that we have assembled one operand, we use the args string
+ * to figure out where it goes in the instruction. */
switch (c)
{
case 'r':
@@ -7388,6 +7414,10 @@ mips_ip (str, ip)
case 'G':
ip->insn_opcode |= regno << 11;
break;
+ case 'U':
+ ip->insn_opcode |= regno << 11;
+ ip->insn_opcode |= regno << 16;
+ break;
case 'w':
case 't':
case 'E':
@@ -7496,7 +7526,6 @@ mips_ip (str, ip)
continue;
}
-
switch (*args++)
{
case 'V':
@@ -7578,7 +7607,7 @@ mips_ip (str, ip)
length = f64 ? 8 : 4;
}
- assert (length == (f64 ? 8 : 4));
+ assert (length == (unsigned) (f64 ? 8 : 4));
if (*args == 'f'
|| (*args == 'l'
@@ -7595,6 +7624,7 @@ mips_ip (str, ip)
imm_expr.X_add_number = bfd_getb32 (temp);
}
else if (length > 4
+ && ! mips_disable_float_construction
&& ((temp[0] == 0 && temp[1] == 0)
|| (temp[2] == 0 && temp[3] == 0))
&& ((temp[4] == 0 && temp[5] == 0)
@@ -7740,16 +7770,14 @@ mips_ip (str, ip)
{
if ((c == '\0' && imm_expr.X_op != O_constant)
|| ((imm_expr.X_add_number < 0
- || imm_expr.X_add_number >= 0x10000)
- && imm_expr.X_op == O_constant))
+ || imm_expr.X_add_number >= 0x10000)
+ && imm_expr.X_op == O_constant))
{
if (insn + 1 < &mips_opcodes[NUMOPCODES] &&
!strcmp (insn->name, insn[1].name))
break;
- if (imm_expr.X_op != O_constant
- && imm_expr.X_op != O_big)
- insn_error = _("absolute expression required");
- else
+ if (imm_expr.X_op == O_constant
+ || imm_expr.X_op == O_big)
as_bad (_("16 bit expression not in range 0..65535"));
}
}
@@ -7775,8 +7803,8 @@ mips_ip (str, ip)
max = 0x10000;
if ((c == '\0' && imm_expr.X_op != O_constant)
|| ((imm_expr.X_add_number < -0x8000
- || imm_expr.X_add_number >= max)
- && imm_expr.X_op == O_constant)
+ || imm_expr.X_add_number >= max)
+ && imm_expr.X_op == O_constant)
|| (more
&& imm_expr.X_add_number < 0
&& ISA_HAS_64BIT_REGS (mips_opts.isa)
@@ -7785,10 +7813,8 @@ mips_ip (str, ip)
{
if (more)
break;
- if (imm_expr.X_op != O_constant
- && imm_expr.X_op != O_big)
- insn_error = _("absolute expression required");
- else
+ if (imm_expr.X_op == O_constant
+ || imm_expr.X_op == O_big)
as_bad (_("16 bit expression not in range -32768..32767"));
}
}
@@ -7815,8 +7841,8 @@ mips_ip (str, ip)
|| offset_expr.X_add_number < -0x8000)
&& (mips_pic != EMBEDDED_PIC
|| offset_expr.X_op != O_subtract
- || (S_GET_SEGMENT (offset_expr.X_op_symbol)
- != now_seg)))
+ || (S_GET_SEGMENT (offset_expr.X_add_symbol)
+ != S_GET_SEGMENT (offset_expr.X_op_symbol))))
break;
if (c == 'h' || c == 'H')
@@ -7889,7 +7915,29 @@ mips_ip (str, ip)
ip->insn_opcode |= regno << OP_SH_BCC;
else
ip->insn_opcode |= regno << OP_SH_CCC;
- continue;
+ continue;
+
+ case 'H':
+ if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
+ s += 2;
+ if (isdigit ((unsigned char) *s))
+ {
+ c = 0;
+ do
+ {
+ c *= 10;
+ c += *s - '0';
+ ++s;
+ }
+ while (isdigit ((unsigned char) *s));
+ }
+ else
+ c = 8; /* Invalid sel value. */
+
+ if (c > 7)
+ as_bad (_("invalid coprocessor sub-selection value (0-7)"));
+ ip->insn_opcode |= c;
+ continue;
default:
as_bad (_("bad char = '%c'\n"), *args);
@@ -8568,7 +8616,8 @@ mips16_immed (file, line, type, val, warn, small, ext, insn, use_extend,
needext = false;
if (warn && ext && ! needext)
- as_warn_where (file, line, _("extended operand requested but not required"));
+ as_warn_where (file, line,
+ _("extended operand requested but not required"));
if (small && needext)
as_bad_where (file, line, _("invalid unextended operand value"));
@@ -8718,6 +8767,7 @@ my_getExpression (ep, str)
char *str;
{
char *save_in;
+ valueT val;
save_in = input_line_pointer;
input_line_pointer = str;
@@ -8735,13 +8785,13 @@ my_getExpression (ep, str)
&& S_GET_SEGMENT (ep->X_add_symbol) == now_seg
&& symbol_get_frag (ep->X_add_symbol) == frag_now
&& symbol_constant_p (ep->X_add_symbol)
- && S_GET_VALUE (ep->X_add_symbol) == frag_now_fix ())
- S_SET_VALUE (ep->X_add_symbol, S_GET_VALUE (ep->X_add_symbol) + 1);
+ && (val = S_GET_VALUE (ep->X_add_symbol)) == frag_now_fix ())
+ S_SET_VALUE (ep->X_add_symbol, val + 1);
}
/* Turn a string in input_line_pointer into a floating point constant
- of type type, and store the appropriate bytes in *litP. The number
- of LITTLENUMS emitted is stored in *sizeP . An error message is
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
char *
@@ -8792,7 +8842,7 @@ md_atof (type, litP, sizeP)
litP += 2;
}
}
-
+
return NULL;
}
@@ -8810,7 +8860,8 @@ md_number_to_chars (buf, val, n)
CONST char *md_shortopts = "O::g::G:";
-struct option md_longopts[] = {
+struct option md_longopts[] =
+{
#define OPTION_MIPS1 (OPTION_MD_BASE + 1)
{"mips0", no_argument, NULL, OPTION_MIPS1},
{"mips1", no_argument, NULL, OPTION_MIPS1},
@@ -8824,68 +8875,74 @@ struct option md_longopts[] = {
{"mcpu", required_argument, NULL, OPTION_MCPU},
#define OPTION_MEMBEDDED_PIC (OPTION_MD_BASE + 6)
{"membedded-pic", no_argument, NULL, OPTION_MEMBEDDED_PIC},
-#define OPTION_TRAP (OPTION_MD_BASE + 9)
+#define OPTION_TRAP (OPTION_MD_BASE + 7)
{"trap", no_argument, NULL, OPTION_TRAP},
{"no-break", no_argument, NULL, OPTION_TRAP},
-#define OPTION_BREAK (OPTION_MD_BASE + 10)
+#define OPTION_BREAK (OPTION_MD_BASE + 8)
{"break", no_argument, NULL, OPTION_BREAK},
{"no-trap", no_argument, NULL, OPTION_BREAK},
-#define OPTION_EB (OPTION_MD_BASE + 11)
+#define OPTION_EB (OPTION_MD_BASE + 9)
{"EB", no_argument, NULL, OPTION_EB},
-#define OPTION_EL (OPTION_MD_BASE + 12)
+#define OPTION_EL (OPTION_MD_BASE + 10)
{"EL", no_argument, NULL, OPTION_EL},
-#define OPTION_M4650 (OPTION_MD_BASE + 13)
+#define OPTION_M4650 (OPTION_MD_BASE + 11)
{"m4650", no_argument, NULL, OPTION_M4650},
-#define OPTION_NO_M4650 (OPTION_MD_BASE + 14)
+#define OPTION_NO_M4650 (OPTION_MD_BASE + 12)
{"no-m4650", no_argument, NULL, OPTION_NO_M4650},
-#define OPTION_M4010 (OPTION_MD_BASE + 15)
+#define OPTION_M4010 (OPTION_MD_BASE + 13)
{"m4010", no_argument, NULL, OPTION_M4010},
-#define OPTION_NO_M4010 (OPTION_MD_BASE + 16)
+#define OPTION_NO_M4010 (OPTION_MD_BASE + 14)
{"no-m4010", no_argument, NULL, OPTION_NO_M4010},
-#define OPTION_M4100 (OPTION_MD_BASE + 17)
+#define OPTION_M4100 (OPTION_MD_BASE + 15)
{"m4100", no_argument, NULL, OPTION_M4100},
-#define OPTION_NO_M4100 (OPTION_MD_BASE + 18)
+#define OPTION_NO_M4100 (OPTION_MD_BASE + 16)
{"no-m4100", no_argument, NULL, OPTION_NO_M4100},
-#define OPTION_MIPS16 (OPTION_MD_BASE + 22)
+#define OPTION_MIPS16 (OPTION_MD_BASE + 17)
{"mips16", no_argument, NULL, OPTION_MIPS16},
-#define OPTION_NO_MIPS16 (OPTION_MD_BASE + 23)
+#define OPTION_NO_MIPS16 (OPTION_MD_BASE + 18)
{"no-mips16", no_argument, NULL, OPTION_NO_MIPS16},
-#define OPTION_M3900 (OPTION_MD_BASE + 26)
+#define OPTION_M3900 (OPTION_MD_BASE + 19)
{"m3900", no_argument, NULL, OPTION_M3900},
-#define OPTION_NO_M3900 (OPTION_MD_BASE + 27)
+#define OPTION_NO_M3900 (OPTION_MD_BASE + 20)
{"no-m3900", no_argument, NULL, OPTION_NO_M3900},
-
-
-#define OPTION_MABI (OPTION_MD_BASE + 38)
+#define OPTION_MABI (OPTION_MD_BASE + 21)
{"mabi", required_argument, NULL, OPTION_MABI},
-
-#define OPTION_M7000_HILO_FIX (OPTION_MD_BASE + 39)
+#define OPTION_M7000_HILO_FIX (OPTION_MD_BASE + 22)
{"mfix7000", no_argument, NULL, OPTION_M7000_HILO_FIX},
-#define OPTION_NO_M7000_HILO_FIX (OPTION_MD_BASE + 40)
+#define OPTION_NO_M7000_HILO_FIX (OPTION_MD_BASE + 23)
{"no-fix-7000", no_argument, NULL, OPTION_NO_M7000_HILO_FIX},
-
-#define OPTION_CALL_SHARED (OPTION_MD_BASE + 7)
-#define OPTION_NON_SHARED (OPTION_MD_BASE + 8)
-#define OPTION_XGOT (OPTION_MD_BASE + 19)
-#define OPTION_32 (OPTION_MD_BASE + 20)
-#define OPTION_64 (OPTION_MD_BASE + 21)
+#define OPTION_GP32 (OPTION_MD_BASE + 24)
+ {"mgp32", no_argument, NULL, OPTION_GP32},
+#define OPTION_GP64 (OPTION_MD_BASE + 25)
+ {"mgp64", no_argument, NULL, OPTION_GP64},
+#define OPTION_CONSTRUCT_FLOATS (OPTION_MD_BASE + 26)
+ {"construct-floats", no_argument, NULL, OPTION_CONSTRUCT_FLOATS},
+#define OPTION_NO_CONSTRUCT_FLOATS (OPTION_MD_BASE + 27)
+ {"no-construct-floats", no_argument, NULL, OPTION_NO_CONSTRUCT_FLOATS},
+#define OPTION_MIPS32 (OPTION_MD_BASE + 28)
+ {"mips32", no_argument, NULL, OPTION_MIPS32},
+#define OPTION_MIPS5 (OPTION_MD_BASE + 29)
+ {"mips5", no_argument, NULL, OPTION_MIPS5},
+#define OPTION_MIPS64 (OPTION_MD_BASE + 30)
+ {"mips64", no_argument, NULL, OPTION_MIPS64},
#ifdef OBJ_ELF
- {"KPIC", no_argument, NULL, OPTION_CALL_SHARED},
- {"xgot", no_argument, NULL, OPTION_XGOT},
+#define OPTION_ELF_BASE (OPTION_MD_BASE + 35)
+#define OPTION_CALL_SHARED (OPTION_ELF_BASE + 0)
+#define OPTION_NON_SHARED (OPTION_ELF_BASE + 1)
+#define OPTION_XGOT (OPTION_ELF_BASE + 2)
+#define OPTION_32 (OPTION_ELF_BASE + 3)
+#define OPTION_64 (OPTION_ELF_BASE + 4)
+ {"KPIC", no_argument, NULL, OPTION_CALL_SHARED},
{"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
- {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
- {"32", no_argument, NULL, OPTION_32},
- {"64", no_argument, NULL, OPTION_64},
+ {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
+ {"xgot", no_argument, NULL, OPTION_XGOT},
+ {"32", no_argument, NULL, OPTION_32},
+ {"64", no_argument, NULL, OPTION_64},
#endif
-#define OPTION_GP32 (OPTION_MD_BASE + 41)
-#define OPTION_GP64 (OPTION_MD_BASE + 42)
- {"mgp32", no_argument, NULL, OPTION_GP32},
- {"mgp64", no_argument, NULL, OPTION_GP64},
-
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -8894,6 +8951,14 @@ md_parse_option (c, arg)
{
switch (c)
{
+ case OPTION_CONSTRUCT_FLOATS:
+ mips_disable_float_construction = 0;
+ break;
+
+ case OPTION_NO_CONSTRUCT_FLOATS:
+ mips_disable_float_construction = 1;
+ break;
+
case OPTION_TRAP:
mips_trap = 1;
break;
@@ -8930,164 +8995,76 @@ md_parse_option (c, arg)
break;
case OPTION_MIPS1:
- mips_opts.isa = 1;
+ mips_opts.isa = ISA_MIPS1;
break;
case OPTION_MIPS2:
- mips_opts.isa = 2;
+ mips_opts.isa = ISA_MIPS2;
break;
case OPTION_MIPS3:
- mips_opts.isa = 3;
+ mips_opts.isa = ISA_MIPS3;
break;
case OPTION_MIPS4:
- mips_opts.isa = 4;
+ mips_opts.isa = ISA_MIPS4;
+ break;
+
+ case OPTION_MIPS5:
+ mips_opts.isa = ISA_MIPS5;
+ break;
+
+ case OPTION_MIPS32:
+ mips_opts.isa = ISA_MIPS32;
+ break;
+
+ case OPTION_MIPS64:
+ mips_opts.isa = ISA_MIPS64;
break;
case OPTION_MCPU:
{
- char *p;
-
- /* Identify the processor type */
- p = arg;
- if (strcmp (p, "default") == 0
- || strcmp (p, "DEFAULT") == 0)
- mips_cpu = -1;
+ /* Identify the processor type. */
+ if (strcasecmp (arg, "default") == 0)
+ mips_cpu = CPU_UNKNOWN;
else
{
- int sv = 0;
-
- /* We need to cope with the various "vr" prefixes for the 4300
- processor. */
- if (*p == 'v' || *p == 'V')
- {
- sv = 1;
- p++;
- }
-
- if (*p == 'r' || *p == 'R')
- p++;
+ const struct mips_cpu_info *ci;
- mips_cpu = -1;
- switch (*p)
- {
- case '1':
- if (strcmp (p, "10000") == 0
- || strcmp (p, "10k") == 0
- || strcmp (p, "10K") == 0)
- mips_cpu = 10000;
- break;
-
- case '2':
- if (strcmp (p, "2000") == 0
- || strcmp (p, "2k") == 0
- || strcmp (p, "2K") == 0)
- mips_cpu = 2000;
- break;
-
- case '3':
- if (strcmp (p, "3000") == 0
- || strcmp (p, "3k") == 0
- || strcmp (p, "3K") == 0)
- mips_cpu = 3000;
- else if (strcmp (p, "3900") == 0)
- mips_cpu = 3900;
- break;
-
- case '4':
- if (strcmp (p, "4000") == 0
- || strcmp (p, "4k") == 0
- || strcmp (p, "4K") == 0)
- mips_cpu = 4000;
- else if (strcmp (p, "4100") == 0)
- mips_cpu = 4100;
- else if (strcmp (p, "4111") == 0)
- mips_cpu = 4111;
- else if (strcmp (p, "4300") == 0)
- mips_cpu = 4300;
- else if (strcmp (p, "4400") == 0)
- mips_cpu = 4400;
- else if (strcmp (p, "4600") == 0)
- mips_cpu = 4600;
- else if (strcmp (p, "4650") == 0)
- mips_cpu = 4650;
- else if (strcmp (p, "4010") == 0)
- mips_cpu = 4010;
- break;
-
- case '5':
- if (strcmp (p, "5000") == 0
- || strcmp (p, "5k") == 0
- || strcmp (p, "5K") == 0)
- mips_cpu = 5000;
- break;
-
- case '6':
- if (strcmp (p, "6000") == 0
- || strcmp (p, "6k") == 0
- || strcmp (p, "6K") == 0)
- mips_cpu = 6000;
- break;
-
- case '8':
- if (strcmp (p, "8000") == 0
- || strcmp (p, "8k") == 0
- || strcmp (p, "8K") == 0)
- mips_cpu = 8000;
- break;
-
- case 'o':
- if (strcmp (p, "orion") == 0)
- mips_cpu = 4600;
- break;
- }
-
- if (sv
- && (mips_cpu != 4300
- && mips_cpu != 4100
- && mips_cpu != 4111
- && mips_cpu != 5000))
- {
- as_bad (_("ignoring invalid leading 'v' in -mcpu=%s switch"), arg);
- return 0;
- }
-
- if (mips_cpu == -1)
- {
- as_bad (_("invalid architecture -mcpu=%s"), arg);
- return 0;
- }
+ ci = mips_cpu_info_from_name (arg);
+ if (ci == NULL || ci->is_isa)
+ as_bad (_("invalid architecture -mcpu=%s"), arg);
+ else
+ mips_cpu = ci->cpu;
}
}
break;
case OPTION_M4650:
- mips_cpu = 4650;
+ mips_cpu = CPU_R4650;
break;
case OPTION_NO_M4650:
break;
case OPTION_M4010:
- mips_cpu = 4010;
+ mips_cpu = CPU_R4010;
break;
case OPTION_NO_M4010:
break;
case OPTION_M4100:
- mips_cpu = 4100;
+ mips_cpu = CPU_VR4100;
break;
case OPTION_NO_M4100:
break;
-
case OPTION_M3900:
- mips_cpu = 3900;
+ mips_cpu = CPU_R3900;
break;
-
+
case OPTION_NO_M3900:
break;
@@ -9111,6 +9088,7 @@ md_parse_option (c, arg)
g_switch_value = 0x7fffffff;
break;
+#ifdef OBJ_ELF
/* When generating ELF code, we permit -KPIC and -call_shared to
select SVR4_PIC, and -non_shared to select no PIC. This is
intended to be compatible with Irix 5. */
@@ -9144,6 +9122,7 @@ md_parse_option (c, arg)
case OPTION_XGOT:
mips_big_got = 1;
break;
+#endif /* OBJ_ELF */
case 'G':
if (! USE_GLOBAL_POINTER_OPT)
@@ -9161,6 +9140,7 @@ md_parse_option (c, arg)
g_switch_seen = 1;
break;
+#ifdef OBJ_ELF
/* The -32 and -64 options tell the assembler to output the 32
bit or the 64 bit MIPS ELF format. */
case OPTION_32:
@@ -9174,7 +9154,9 @@ md_parse_option (c, arg)
list = bfd_target_list ();
for (l = list; *l != NULL; l++)
if (strcmp (*l, "elf64-bigmips") == 0
- || strcmp (*l, "elf64-littlemips") == 0)
+ || strcmp (*l, "elf64-littlemips") == 0
+ || strcmp (*l, "elf64-tradbigmips") == 0
+ || strcmp (*l, "elf64-tradlittlemips") == 0)
break;
if (*l == NULL)
as_fatal (_("No compiled in support for 64 bit object file format"));
@@ -9182,6 +9164,7 @@ md_parse_option (c, arg)
mips_64 = 1;
}
break;
+#endif /* OBJ_ELF */
case OPTION_GP32:
mips_gp32 = 1;
@@ -9190,27 +9173,31 @@ md_parse_option (c, arg)
/* We deliberately don't allow "-gp32" to set the MIPS_32BITMODE
flag in object files because to do so would make it
impossible to link with libraries compiled without "-gp32".
- This is unnecessarily restrictive.
+ This is unnecessarily restrictive.
We could solve this problem by adding "-gp32" multilibs to
gcc, but to set this flag before gcc is built with such
- multilibs will break too many systems. */
+ multilibs will break too many systems. */
-/* mips_32bitmode = 1; */
+#if 0
+ mips_32bitmode = 1;
+#endif
break;
case OPTION_GP64:
mips_gp32 = 0;
mips_64 = 1;
-/* mips_32bitmode = 0; */
+#if 0
+ mips_32bitmode = 0;
+#endif
break;
case OPTION_MABI:
- if (strcmp (arg,"32") == 0
- || strcmp (arg,"n32") == 0
- || strcmp (arg,"64") == 0
- || strcmp (arg,"o64") == 0
- || strcmp (arg,"eabi") == 0)
+ if (strcmp (arg, "32") == 0
+ || strcmp (arg, "n32") == 0
+ || strcmp (arg, "64") == 0
+ || strcmp (arg, "o64") == 0
+ || strcmp (arg, "eabi") == 0)
mips_abi_string = arg;
break;
@@ -9229,7 +9216,6 @@ md_parse_option (c, arg)
return 1;
}
-
static void
show (stream, string, col_p, first_p)
FILE *stream;
@@ -9260,14 +9246,13 @@ show (stream, string, col_p, first_p)
*first_p = 0;
}
-
void
md_show_usage (stream)
FILE *stream;
{
int column, first;
- fprintf(stream, _("\
+ fprintf (stream, _("\
MIPS options:\n\
-membedded-pic generate embedded position independent code\n\
-EB generate big endian output\n\
@@ -9275,11 +9260,14 @@ MIPS options:\n\
-g, -g2 do not remove uneeded NOPs or swap branches\n\
-G NUM allow referencing objects up to NUM bytes\n\
implicitly with the gp register [default 8]\n"));
- fprintf(stream, _("\
+ fprintf (stream, _("\
-mips1 generate MIPS ISA I instructions\n\
-mips2 generate MIPS ISA II instructions\n\
-mips3 generate MIPS ISA III instructions\n\
-mips4 generate MIPS ISA IV instructions\n\
+-mips5 generate MIPS ISA V instructions\n\
+-mips32 generate MIPS32 ISA instructions\n\
+-mips64 generate MIPS64 ISA instructions\n\
-mcpu=CPU generate code for CPU, where CPU is one of:\n"));
first = 1;
@@ -9299,6 +9287,9 @@ MIPS options:\n\
show (stream, "6000", &column, &first);
show (stream, "8000", &column, &first);
show (stream, "10000", &column, &first);
+ show (stream, "12000", &column, &first);
+ show (stream, "mips32-4k", &column, &first);
+ show (stream, "sb-1", &column, &first);
fputc ('\n', stream);
fprintf (stream, _("\
@@ -9314,16 +9305,17 @@ MIPS options:\n\
show (stream, "4650", &column, &first);
fputc ('\n', stream);
- fprintf(stream, _("\
+ fprintf (stream, _("\
-mips16 generate mips16 instructions\n\
-no-mips16 do not generate mips16 instructions\n"));
- fprintf(stream, _("\
+ fprintf (stream, _("\
-O0 remove unneeded NOPs, do not swap branches\n\
-O remove unneeded NOPs and swap branches\n\
+--[no-]construct-floats [dis]allow floating point values to be constructed\n\
--trap, --no-break trap exception on div by 0 and mult overflow\n\
--break, --no-trap break exception on div by 0 and mult overflow\n"));
#ifdef OBJ_ELF
- fprintf(stream, _("\
+ fprintf (stream, _("\
-KPIC, -call_shared generate SVR4 position independent code\n\
-non_shared do not generate position independent code\n\
-xgot assume a 32 bit GOT\n\
@@ -9337,7 +9329,7 @@ mips_init_after_args ()
{
/* initialize opcodes */
bfd_mips_num_opcodes = bfd_mips_num_builtin_opcodes;
- mips_opcodes = (struct mips_opcode*) mips_builtin_opcodes;
+ mips_opcodes = (struct mips_opcode *) mips_builtin_opcodes;
}
long
@@ -9506,7 +9498,6 @@ mips_frob_file ()
relocations, in case the linker has to relax a call. We also need
to keep relocations for switch table entries. */
-/*ARGSUSED*/
int
mips_force_relocation (fixp)
fixS *fixp;
@@ -9530,7 +9521,8 @@ md_apply_fix (fixP, valueP)
valueT *valueP;
{
unsigned char *buf;
- long insn, value;
+ long insn;
+ valueT value;
assert (fixP->fx_size == 4
|| fixP->fx_r_type == BFD_RELOC_16
@@ -9545,27 +9537,28 @@ md_apply_fix (fixP, valueP)
#ifdef OBJ_ELF
if (fixP->fx_addsy != NULL && OUTPUT_FLAVOR == bfd_target_elf_flavour)
{
- if (S_GET_OTHER (fixP->fx_addsy) == STO_MIPS16
- || S_IS_WEAK (fixP->fx_addsy)
- || (symbol_used_in_reloc_p (fixP->fx_addsy)
- && (((bfd_get_section_flags (stdoutput,
- S_GET_SEGMENT (fixP->fx_addsy))
- & SEC_LINK_ONCE) != 0)
- || !strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)),
- ".gnu.linkonce",
- sizeof (".gnu.linkonce") - 1))))
+ if (S_GET_OTHER (fixP->fx_addsy) == STO_MIPS16
+ || S_IS_WEAK (fixP->fx_addsy)
+ || (symbol_used_in_reloc_p (fixP->fx_addsy)
+ && (((bfd_get_section_flags (stdoutput,
+ S_GET_SEGMENT (fixP->fx_addsy))
+ & SEC_LINK_ONCE) != 0)
+ || !strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)),
+ ".gnu.linkonce",
+ sizeof (".gnu.linkonce") - 1))))
- {
- value -= S_GET_VALUE (fixP->fx_addsy);
- if (value != 0 && ! fixP->fx_pcrel)
- {
- /* In this case, the bfd_install_relocation routine will
- incorrectly add the symbol value back in. We just want
- the addend to appear in the object file.
- FIXME: If this makes VALUE zero, we're toast. */
- value -= S_GET_VALUE (fixP->fx_addsy);
- }
- }
+ {
+ valueT symval = S_GET_VALUE (fixP->fx_addsy);
+ value -= symval;
+ if (value != 0 && ! fixP->fx_pcrel)
+ {
+ /* In this case, the bfd_install_relocation routine will
+ incorrectly add the symbol value back in. We just want
+ the addend to appear in the object file.
+ FIXME: If this makes VALUE zero, we're toast. */
+ value -= symval;
+ }
+ }
/* This code was generated using trial and error and so is
fragile and not trustworthy. If you change it, you should
@@ -9621,7 +9614,7 @@ md_apply_fix (fixP, valueP)
case BFD_RELOC_PCREL_HI16_S:
/* The addend for this is tricky if it is internal, so we just
do everything here rather than in bfd_install_relocation. */
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
+ if (OUTPUT_FLAVOR == bfd_target_elf_flavour
&& !fixP->fx_done
&& value != 0)
break;
@@ -9646,7 +9639,7 @@ md_apply_fix (fixP, valueP)
case BFD_RELOC_PCREL_LO16:
/* The addend for this is tricky if it is internal, so we just
do everything here rather than in bfd_install_relocation. */
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
+ if (OUTPUT_FLAVOR == bfd_target_elf_flavour
&& !fixP->fx_done
&& value != 0)
break;
@@ -9715,7 +9708,7 @@ md_apply_fix (fixP, valueP)
up deleting a LO16 reloc. See the 'o' case in mips_ip. */
if (fixP->fx_done)
{
- if (value < -0x8000 || value > 0x7fff)
+ if (value + 0x8000 > 0xffff)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("relocation overflow"));
buf = (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where;
@@ -9733,7 +9726,7 @@ md_apply_fix (fixP, valueP)
*/
if ((value & 0x3) != 0)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Branch to odd address (%lx)"), value);
+ _("Branch to odd address (%lx)"), (long) value);
if (!fixP->fx_done && value != 0)
break;
@@ -9742,8 +9735,8 @@ md_apply_fix (fixP, valueP)
a bug somewhere. */
if (!fixP->fx_done)
value -= fixP->fx_frag->fr_address + fixP->fx_where;
-
- value >>= 2;
+
+ value = (offsetT) value >> 2;
/* update old instruction data */
buf = (unsigned char *) (fixP->fx_where + fixP->fx_frag->fr_literal);
@@ -9752,7 +9745,7 @@ md_apply_fix (fixP, valueP)
else
insn = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
- if (value >= -0x8000 && value < 0x8000)
+ if (value + 0x8000 <= 0xffff)
insn |= value & 0xffff;
else
{
@@ -10045,7 +10038,7 @@ s_change_sec (sec)
| SEC_RELOC
| SEC_DATA));
if (strcmp (TARGET_OS, "elf") != 0)
- bfd_set_section_alignment (stdoutput, seg, 4);
+ record_alignment (seg, 4);
}
demand_empty_rest_of_line ();
}
@@ -10067,7 +10060,7 @@ s_change_sec (sec)
SEC_ALLOC | SEC_LOAD | SEC_RELOC
| SEC_DATA);
if (strcmp (TARGET_OS, "elf") != 0)
- bfd_set_section_alignment (stdoutput, seg, 4);
+ record_alignment (seg, 4);
}
demand_empty_rest_of_line ();
break;
@@ -10243,7 +10236,7 @@ s_mipsset (x)
{
/* If we still have pending nops, we can discard them. The
usual nop handling will insert any that are still
- needed. */
+ needed. */
prev_nop_frag->fr_fix -= (prev_nop_frag_holds
* (mips_opts.mips16 ? 2 : 4));
prev_nop_frag = NULL;
@@ -10303,12 +10296,18 @@ s_mipsset (x)
/* Permit the user to change the ISA on the fly. Needless to
say, misuse can cause serious problems. */
isa = atoi (name + 4);
- if (isa == 0)
- mips_opts.isa = file_mips_isa;
- else if (isa < 1 || isa > 4)
- as_bad (_("unknown ISA level"));
- else
- mips_opts.isa = isa;
+ switch (isa)
+ {
+ case 0: mips_opts.isa = file_mips_isa; break;
+ case 1: mips_opts.isa = ISA_MIPS1; break;
+ case 2: mips_opts.isa = ISA_MIPS2; break;
+ case 3: mips_opts.isa = ISA_MIPS3; break;
+ case 5: mips_opts.isa = ISA_MIPS5; break;
+ case 4: mips_opts.isa = ISA_MIPS4; break;
+ case 32: mips_opts.isa = ISA_MIPS32; break;
+ case 64: mips_opts.isa = ISA_MIPS64; break;
+ default: as_bad (_("unknown ISA level")); break;
+ }
}
else if (strcmp (name, "autoextend") == 0)
mips_opts.noautoextend = 0;
@@ -10522,7 +10521,7 @@ s_cpadd (ignore)
? "addu" : "daddu"),
"d,v,t", reg, reg, GP);
- demand_empty_rest_of_line ();
+ demand_empty_rest_of_line ();
}
/* Handle the .insn pseudo-op. This marks instruction labels in
@@ -10589,13 +10588,13 @@ s_mips_weakext (ignore)
ignore_rest_of_line ();
return;
}
-
+
if (*input_line_pointer == ',')
{
++input_line_pointer;
SKIP_WHITESPACE ();
}
-
+
expression (&exp);
if (exp.X_op != O_symbol)
{
@@ -10763,6 +10762,7 @@ mips16_extended_frag (fragp, sec, stretch)
offsetT val;
int mintiny, maxtiny;
segT symsec;
+ fragS *sym_frag;
if (RELAX_MIPS16_USER_SMALL (fragp->fr_subtype))
return 0;
@@ -10796,12 +10796,13 @@ mips16_extended_frag (fragp, sec, stretch)
maxtiny = (1 << (op->nbits - 1)) - 1;
}
+ sym_frag = symbol_get_frag (fragp->fr_symbol);
+
/* We can't always call S_GET_VALUE here, because we don't want to
lock in a particular frag address. */
if (symbol_constant_p (fragp->fr_symbol))
{
- val = (S_GET_VALUE (fragp->fr_symbol)
- + symbol_get_frag (fragp->fr_symbol)->fr_address);
+ val = S_GET_VALUE (fragp->fr_symbol) + sym_frag->fr_address;
symsec = S_GET_SEGMENT (fragp->fr_symbol);
}
else if (symbol_equated_p (fragp->fr_symbol)
@@ -10814,7 +10815,7 @@ mips16_extended_frag (fragp, sec, stretch)
val = (S_GET_VALUE (eqsym)
+ symbol_get_frag (eqsym)->fr_address
+ symbol_get_value_expression (fragp->fr_symbol)->X_add_number
- + symbol_get_frag (fragp->fr_symbol)->fr_address);
+ + sym_frag->fr_address);
symsec = S_GET_SEGMENT (eqsym);
}
else
@@ -10837,6 +10838,7 @@ mips16_extended_frag (fragp, sec, stretch)
}
else
{
+ /* Must have been called from md_estimate_size_before_relax. */
if (symsec != sec)
{
fragp->fr_subtype =
@@ -10849,16 +10851,22 @@ mips16_extended_frag (fragp, sec, stretch)
return 1;
}
+ if (fragp != sym_frag && sym_frag->fr_address == 0)
+ /* Assume non-extended on the first relaxation pass.
+ The address we have calculated will be bogus if this is
+ a forward branch to another frag, as the forward frag
+ will have fr_address == 0. */
+ return 0;
}
/* In this case, we know for sure that the symbol fragment is in
- the same section. If the fr_address of the symbol fragment
- is greater then the address of this fragment we want to add
+ the same section. If the relax_marker of the symbol fragment
+ differs from the relax_marker of this fragment, we have not
+ yet adjusted the symbol fragment fr_address. We want to add
in STRETCH in order to get a better estimate of the address.
This particularly matters because of the shift bits. */
if (stretch != 0
- && (symbol_get_frag (fragp->fr_symbol)->fr_address
- >= fragp->fr_address))
+ && sym_frag->relax_marker != fragp->relax_marker)
{
fragS *f;
@@ -10868,9 +10876,7 @@ mips16_extended_frag (fragp, sec, stretch)
This doesn't handle the fr_subtype field, which specifies
a maximum number of bytes to skip when doing an
alignment. */
- for (f = fragp;
- f != NULL && f != symbol_get_frag (fragp->fr_symbol);
- f = f->fr_next)
+ for (f = fragp; f != NULL && f != sym_frag; f = f->fr_next)
{
if (f->fr_type == rs_align || f->fr_type == rs_align_code)
{
@@ -10900,7 +10906,7 @@ mips16_extended_frag (fragp, sec, stretch)
/* If we are currently assuming that this frag should be
extended, then, the current address is two bytes
- higher. */
+ higher. */
if (RELAX_MIPS16_EXTENDED (fragp->fr_subtype))
addr += 2;
@@ -10969,13 +10975,13 @@ mips16_extended_frag (fragp, sec, stretch)
encoded in the subtype information. For the mips16, we have to
decide whether we are using an extended opcode or not. */
-/*ARGSUSED*/
int
md_estimate_size_before_relax (fragp, segtype)
fragS *fragp;
asection *segtype;
{
- int change;
+ int change = 0;
+ boolean linkonce = false;
if (RELAX_MIPS16_P (fragp->fr_subtype))
{
@@ -11018,10 +11024,31 @@ md_estimate_size_before_relax (fragp, segtype)
symsec = S_GET_SEGMENT (sym);
+ /* duplicate the test for LINK_ONCE sections as in adjust_reloc_syms */
+ if (symsec != segtype && ! S_IS_LOCAL (sym))
+ {
+ if ((bfd_get_section_flags (stdoutput, symsec) & SEC_LINK_ONCE)
+ != 0)
+ linkonce = true;
+
+ /* The GNU toolchain uses an extension for ELF: a section
+ beginning with the magic string .gnu.linkonce is a linkonce
+ section. */
+ if (strncmp (segment_name (symsec), ".gnu.linkonce",
+ sizeof ".gnu.linkonce" - 1) == 0)
+ linkonce = true;
+ }
+
/* This must duplicate the test in adjust_reloc_syms. */
change = (symsec != &bfd_und_section
&& symsec != &bfd_abs_section
- && ! bfd_is_com_section (symsec));
+ && ! bfd_is_com_section (symsec)
+ && !linkonce
+#ifdef OBJ_ELF
+ /* A weak symbol is treated as external. */
+ && ! S_IS_WEAK (sym)
+#endif
+ );
}
else
abort ();
@@ -11534,14 +11561,14 @@ mips_elf_final_processing ()
if (mips_pic != NO_PIC)
elf_elfheader (stdoutput)->e_flags |= EF_MIPS_PIC;
- /* Set the MIPS ELF ABI flags. */
+ /* Set the MIPS ELF ABI flags. */
if (mips_abi_string == 0)
;
- else if (strcmp (mips_abi_string,"32") == 0)
+ else if (strcmp (mips_abi_string, "32") == 0)
elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_O32;
- else if (strcmp (mips_abi_string,"o64") == 0)
+ else if (strcmp (mips_abi_string, "o64") == 0)
elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_O64;
- else if (strcmp (mips_abi_string,"eabi") == 0)
+ else if (strcmp (mips_abi_string, "eabi") == 0)
{
if (mips_eabi64)
elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_EABI64;
@@ -11555,51 +11582,52 @@ mips_elf_final_processing ()
#endif /* OBJ_ELF || OBJ_MAYBE_ELF */
-typedef struct proc
- {
- symbolS *isym;
- unsigned long reg_mask;
- unsigned long reg_offset;
- unsigned long fpreg_mask;
- unsigned long fpreg_offset;
- unsigned long frame_offset;
- unsigned long frame_reg;
- unsigned long pc_reg;
- }
-procS;
+typedef struct proc {
+ symbolS *isym;
+ unsigned long reg_mask;
+ unsigned long reg_offset;
+ unsigned long fpreg_mask;
+ unsigned long fpreg_offset;
+ unsigned long frame_offset;
+ unsigned long frame_reg;
+ unsigned long pc_reg;
+} procS;
static procS cur_proc;
static procS *cur_proc_ptr;
static int numprocs;
-/* When we align code in the .text section of mips16, use the correct two
- byte nop pattern of 0x6500 (move $0,$0) */
+/* Fill in an rs_align_code fragment. */
-int
-mips_do_align (n, fill, len, max)
- int n;
- const char *fill;
- int len ATTRIBUTE_UNUSED;
- int max;
+void
+mips_handle_align (fragp)
+ fragS *fragp;
{
- if (fill == NULL
- && subseg_text_p (now_seg)
- && n > 1
- && mips_opts.mips16)
+ if (fragp->fr_type != rs_align_code)
+ return;
+
+ if (mips_opts.mips16)
{
static const unsigned char be_nop[] = { 0x65, 0x00 };
static const unsigned char le_nop[] = { 0x00, 0x65 };
- frag_align (1, 0, 0);
+ int bytes;
+ char *p;
- if (target_big_endian)
- frag_align_pattern (n, be_nop, 2, max);
- else
- frag_align_pattern (n, le_nop, 2, max);
- return 1;
+ bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
+ p = fragp->fr_literal + fragp->fr_fix;
+
+ if (bytes & 1)
+ {
+ *p++ = 0;
+ fragp->fr_fix += 1;
+ }
+
+ memcpy (p, (target_big_endian ? be_nop : le_nop), 2);
+ fragp->fr_var = 2;
}
- return 0;
+ /* For mips32, a nop is a zero, which we trivially get by doing nothing. */
}
static void
@@ -11679,7 +11707,6 @@ s_file (x)
s_app_file (0);
}
-
/* The .end directive. */
static void
@@ -11747,21 +11774,21 @@ s_mips_end (x)
assert (pdr_seg);
subseg_set (pdr_seg, 0);
- /* Write the symbol */
+ /* Write the symbol. */
exp.X_op = O_symbol;
exp.X_add_symbol = p;
exp.X_add_number = 0;
emit_expr (&exp, 4);
- fragp = frag_more (7*4);
+ fragp = frag_more (7 * 4);
- md_number_to_chars (fragp, (valueT) cur_proc_ptr->reg_mask, 4);
- md_number_to_chars (fragp + 4, (valueT) cur_proc_ptr->reg_offset, 4);
- md_number_to_chars (fragp + 8, (valueT) cur_proc_ptr->fpreg_mask, 4);
- md_number_to_chars (fragp +12, (valueT) cur_proc_ptr->fpreg_offset, 4);
- md_number_to_chars (fragp +16, (valueT) cur_proc_ptr->frame_offset, 4);
- md_number_to_chars (fragp +20, (valueT) cur_proc_ptr->frame_reg, 4);
- md_number_to_chars (fragp +24, (valueT) cur_proc_ptr->pc_reg, 4);
+ md_number_to_chars (fragp, (valueT) cur_proc_ptr->reg_mask, 4);
+ md_number_to_chars (fragp + 4, (valueT) cur_proc_ptr->reg_offset, 4);
+ md_number_to_chars (fragp + 8, (valueT) cur_proc_ptr->fpreg_mask, 4);
+ md_number_to_chars (fragp + 12, (valueT) cur_proc_ptr->fpreg_offset, 4);
+ md_number_to_chars (fragp + 16, (valueT) cur_proc_ptr->frame_offset, 4);
+ md_number_to_chars (fragp + 20, (valueT) cur_proc_ptr->frame_reg, 4);
+ md_number_to_chars (fragp + 24, (valueT) cur_proc_ptr->pc_reg, 4);
subseg_set (saved_seg, saved_subseg);
}
@@ -11822,9 +11849,9 @@ s_mips_ent (aent)
}
/* The .frame directive. If the mdebug section is present (IRIX 5 native)
- then ecoff.c (ecoff_directive_frame) is used. For embedded targets,
+ then ecoff.c (ecoff_directive_frame) is used. For embedded targets,
s_mips_frame is used so that we can set the PDR information correctly.
- We can't use the ecoff routines because they make reference to the ecoff
+ We can't use the ecoff routines because they make reference to the ecoff
symbol table (in the mdebug section). */
static void
@@ -11835,7 +11862,7 @@ s_mips_frame (ignore)
long val;
- if (cur_proc_ptr == (procS *) NULL)
+ if (cur_proc_ptr == (procS *) NULL)
{
as_warn (_(".frame outside of .ent"));
demand_empty_rest_of_line ();
@@ -11863,10 +11890,10 @@ s_mips_frame (ignore)
#endif /* MIPS_STABS_ELF */
}
-/* The .fmask and .mask directives. If the mdebug section is present
- (IRIX 5 native) then ecoff.c (ecoff_directive_mask) is used. For
+/* The .fmask and .mask directives. If the mdebug section is present
+ (IRIX 5 native) then ecoff.c (ecoff_directive_mask) is used. For
embedded targets, s_mips_mask is used so that we can set the PDR
- information correctly. We can't use the ecoff routines because they
+ information correctly. We can't use the ecoff routines because they
make reference to the ecoff symbol table (in the mdebug section). */
static void
@@ -11875,7 +11902,7 @@ s_mips_mask (reg_type)
{
#ifdef MIPS_STABS_ELF
long mask, off;
-
+
if (cur_proc_ptr == (procS *) NULL)
{
as_warn (_(".mask/.fmask outside of .ent"));
@@ -11933,3 +11960,202 @@ s_loc (x)
symbolP->sy_segment = now_seg;
}
#endif
+
+/* CPU name/ISA/number mapping table.
+
+ Entries are grouped by type. The first matching CPU or ISA entry
+ gets chosen by CPU or ISA, so it should be the 'canonical' name
+ for that type. Entries after that within the type are sorted
+ alphabetically.
+
+ Case is ignored in comparison, so put the canonical entry in the
+ appropriate case but everything else in lower case to ease eye pain. */
+static const struct mips_cpu_info mips_cpu_info_table[] =
+{
+ /* MIPS1 ISA */
+ { "MIPS1", 1, ISA_MIPS1, CPU_R3000, },
+ { "mips", 1, ISA_MIPS1, CPU_R3000, },
+
+ /* MIPS2 ISA */
+ { "MIPS2", 1, ISA_MIPS2, CPU_R6000, },
+
+ /* MIPS3 ISA */
+ { "MIPS3", 1, ISA_MIPS3, CPU_R4000, },
+
+ /* MIPS4 ISA */
+ { "MIPS4", 1, ISA_MIPS4, CPU_R8000, },
+
+ /* MIPS5 ISA */
+ { "MIPS5", 1, ISA_MIPS5, CPU_MIPS5, },
+ { "Generic-MIPS5", 0, ISA_MIPS5, CPU_MIPS5, },
+
+ /* MIPS32 ISA */
+ { "MIPS32", 1, ISA_MIPS32, CPU_MIPS32, },
+ { "Generic-MIPS32", 0, ISA_MIPS32, CPU_MIPS32, },
+
+#if 1
+ /* XXX for now, MIPS64 -> MIPS3 because of history */
+ { "MIPS64", 1, ISA_MIPS3, CPU_R4000 }, /* XXX! */
+#else
+ /* MIPS64 ISA */
+ { "MIPS64", 1, ISA_MIPS64, CPU_MIPS64 },
+#endif
+ { "mips64isa", 1, ISA_MIPS64, CPU_MIPS64 },
+ { "Generic-MIPS64", 0, ISA_MIPS64, CPU_MIPS64, },
+
+ /* R2000 CPU */
+ { "R2000", 0, ISA_MIPS1, CPU_R2000, },
+ { "2000", 0, ISA_MIPS1, CPU_R2000, },
+ { "2k", 0, ISA_MIPS1, CPU_R2000, },
+ { "r2k", 0, ISA_MIPS1, CPU_R2000, },
+
+ /* R3000 CPU */
+ { "R3000", 0, ISA_MIPS1, CPU_R3000, },
+ { "3000", 0, ISA_MIPS1, CPU_R3000, },
+ { "3k", 0, ISA_MIPS1, CPU_R3000, },
+ { "r3k", 0, ISA_MIPS1, CPU_R3000, },
+
+ /* TX3900 CPU */
+ { "R3900", 0, ISA_MIPS1, CPU_R3900, },
+ { "3900", 0, ISA_MIPS1, CPU_R3900, },
+ { "mipstx39", 0, ISA_MIPS1, CPU_R3900, },
+
+ /* R4000 CPU */
+ { "R4000", 0, ISA_MIPS3, CPU_R4000, },
+ { "4000", 0, ISA_MIPS3, CPU_R4000, },
+ { "4k", 0, ISA_MIPS3, CPU_R4000, }, /* beware */
+ { "r4k", 0, ISA_MIPS3, CPU_R4000, },
+
+ /* R4010 CPU */
+ { "R4010", 0, ISA_MIPS2, CPU_R4010, },
+ { "4010", 0, ISA_MIPS2, CPU_R4010, },
+
+ /* R4400 CPU */
+ { "R4400", 0, ISA_MIPS3, CPU_R4400, },
+ { "4400", 0, ISA_MIPS3, CPU_R4400, },
+
+ /* R4600 CPU */
+ { "R4600", 0, ISA_MIPS3, CPU_R4600, },
+ { "4600", 0, ISA_MIPS3, CPU_R4600, },
+ { "mips64orion", 0, ISA_MIPS3, CPU_R4600, },
+ { "orion", 0, ISA_MIPS3, CPU_R4600, },
+
+ /* R4650 CPU */
+ { "R4650", 0, ISA_MIPS3, CPU_R4650, },
+ { "4650", 0, ISA_MIPS3, CPU_R4650, },
+
+ /* R6000 CPU */
+ { "R6000", 0, ISA_MIPS2, CPU_R6000, },
+ { "6000", 0, ISA_MIPS2, CPU_R6000, },
+ { "6k", 0, ISA_MIPS2, CPU_R6000, },
+ { "r6k", 0, ISA_MIPS2, CPU_R6000, },
+
+ /* R8000 CPU */
+ { "R8000", 0, ISA_MIPS4, CPU_R8000, },
+ { "8000", 0, ISA_MIPS4, CPU_R8000, },
+ { "8k", 0, ISA_MIPS4, CPU_R8000, },
+ { "r8k", 0, ISA_MIPS4, CPU_R8000, },
+
+ /* R10000 CPU */
+ { "R10000", 0, ISA_MIPS4, CPU_R10000, },
+ { "10000", 0, ISA_MIPS4, CPU_R10000, },
+ { "10k", 0, ISA_MIPS4, CPU_R10000, },
+ { "r10k", 0, ISA_MIPS4, CPU_R10000, },
+
+ /* R12000 CPU */
+ { "R12000", 0, ISA_MIPS4, CPU_R12000, },
+ { "12000", 0, ISA_MIPS4, CPU_R12000, },
+ { "12k", 0, ISA_MIPS4, CPU_R12000, },
+ { "r12k", 0, ISA_MIPS4, CPU_R12000, },
+
+ /* VR4100 CPU */
+ { "VR4100", 0, ISA_MIPS3, CPU_VR4100, },
+ { "4100", 0, ISA_MIPS3, CPU_VR4100, },
+ { "mips64vr4100", 0, ISA_MIPS3, CPU_VR4100, },
+ { "r4100", 0, ISA_MIPS3, CPU_VR4100, },
+
+ /* VR4111 CPU */
+ { "VR4111", 0, ISA_MIPS3, CPU_R4111, },
+ { "4111", 0, ISA_MIPS3, CPU_R4111, },
+ { "mips64vr4111", 0, ISA_MIPS3, CPU_R4111, },
+ { "r4111", 0, ISA_MIPS3, CPU_R4111, },
+
+ /* VR4300 CPU */
+ { "VR4300", 0, ISA_MIPS3, CPU_R4300, },
+ { "4300", 0, ISA_MIPS3, CPU_R4300, },
+ { "mips64vr4300", 0, ISA_MIPS3, CPU_R4300, },
+ { "r4300", 0, ISA_MIPS3, CPU_R4300, },
+
+ /* VR5000 CPU */
+ { "VR5000", 0, ISA_MIPS4, CPU_R5000, },
+ { "5000", 0, ISA_MIPS4, CPU_R5000, },
+ { "5k", 0, ISA_MIPS4, CPU_R5000, },
+ { "mips64vr5000", 0, ISA_MIPS4, CPU_R5000, },
+ { "r5000", 0, ISA_MIPS4, CPU_R5000, },
+ { "r5200", 0, ISA_MIPS4, CPU_R5000, },
+ { "r5230", 0, ISA_MIPS4, CPU_R5000, },
+ { "r5231", 0, ISA_MIPS4, CPU_R5000, },
+ { "r5261", 0, ISA_MIPS4, CPU_R5000, },
+ { "r5721", 0, ISA_MIPS4, CPU_R5000, },
+ { "r5k", 0, ISA_MIPS4, CPU_R5000, },
+ { "r7000", 0, ISA_MIPS4, CPU_R5000, },
+
+ /* MIPS32 4K CPU */
+ { "MIPS32-4K", 0, ISA_MIPS32, CPU_MIPS32_4K, },
+ { "4kc", 0, ISA_MIPS32, CPU_MIPS32_4K, },
+ { "4km", 0, ISA_MIPS32, CPU_MIPS32_4K, },
+ { "4kp", 0, ISA_MIPS32, CPU_MIPS32_4K, },
+ { "mips32-4kc", 0, ISA_MIPS32, CPU_MIPS32_4K, },
+ { "mips32-4km", 0, ISA_MIPS32, CPU_MIPS32_4K, },
+ { "mips32-4kp", 0, ISA_MIPS32, CPU_MIPS32_4K, },
+
+ /* SiByte SB-1 CPU */
+ { "SB-1", 0, ISA_MIPS64, CPU_SB1, },
+ { "sb-1250", 0, ISA_MIPS64, CPU_SB1, },
+ { "sb1", 0, ISA_MIPS64, CPU_SB1, },
+ { "sb1250", 0, ISA_MIPS64, CPU_SB1, },
+
+ /* End marker. */
+ { NULL, 0, 0, 0, },
+};
+
+static const struct mips_cpu_info *
+mips_cpu_info_from_name (name)
+ const char *name;
+{
+ int i;
+
+ for (i = 0; mips_cpu_info_table[i].name != NULL; i++)
+ if (strcasecmp (name, mips_cpu_info_table[i].name) == 0)
+ return (&mips_cpu_info_table[i]);
+
+ return NULL;
+}
+
+static const struct mips_cpu_info *
+mips_cpu_info_from_isa (isa)
+ int isa;
+{
+ int i;
+
+ for (i = 0; mips_cpu_info_table[i].name != NULL; i++)
+ if (mips_cpu_info_table[i].is_isa
+ && isa == mips_cpu_info_table[i].isa)
+ return (&mips_cpu_info_table[i]);
+
+ return NULL;
+}
+
+static const struct mips_cpu_info *
+mips_cpu_info_from_cpu (cpu)
+ int cpu;
+{
+ int i;
+
+ for (i = 0; mips_cpu_info_table[i].name != NULL; i++)
+ if (!mips_cpu_info_table[i].is_isa
+ && cpu == mips_cpu_info_table[i].cpu)
+ return (&mips_cpu_info_table[i]);
+
+ return NULL;
+}
diff --git a/gnu/usr.bin/binutils/gas/config/tc-mips.h b/gnu/usr.bin/binutils/gas/config/tc-mips.h
index 1008b75ecc1..c10b10a537d 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-mips.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-mips.h
@@ -1,5 +1,6 @@
/* tc-mips.h -- header file for tc-mips.c.
- Copyright (C) 1993, 94, 95, 96, 97, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
Modified for ECOFF support by Ian Lance Taylor of Cygnus Support.
@@ -37,7 +38,6 @@ struct expressionS;
#define TARGET_ARCH bfd_arch_mips
-#define ONLY_STANDARD_ESCAPES
#define WORKING_DOT_WORD 1
#define OLD_FLOAT_READS
#define REPEAT_CONS_EXPRESSIONS
@@ -49,20 +49,22 @@ struct expressionS;
relocation: */
#define MAX_GPREL_OFFSET (0x7FF4)
-#define md_relax_frag(fragp, stretch) mips_relax_frag(fragp, stretch)
+#define md_relax_frag(segment, fragp, stretch) mips_relax_frag(fragp, stretch)
extern int mips_relax_frag PARAMS ((struct frag *, long));
#define md_undefined_symbol(name) (0)
#define md_operand(x)
-extern int mips_do_align PARAMS ((int, const char *, int, int));
-#define md_do_align(n,fill,len,max,l) if (mips_do_align (n,fill,len,max)) goto l
+extern void mips_handle_align PARAMS ((struct frag *));
+#define HANDLE_ALIGN(fragp) mips_handle_align (fragp)
+
+#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. */
+/* Tell assembler that we have an itbl_mips.h header file to include. */
#define HAVE_ITBL_CPU
/* The endianness of the target format may change based on command
diff --git a/gnu/usr.bin/binutils/gas/config/tc-mn10200.c b/gnu/usr.bin/binutils/gas/config/tc-mn10200.c
index 264f7bf001f..dd3f9e54442 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-mn10200.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-mn10200.c
@@ -1,5 +1,6 @@
/* tc-mn10200.c -- Assembler code for the Matsushita 10200
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -21,7 +22,7 @@
#include <stdio.h>
#include <ctype.h>
#include "as.h"
-#include "subsegs.h"
+#include "subsegs.h"
#include "opcode/mn10200.h"
/* Structure to hold information about predefined registers. */
@@ -31,46 +32,47 @@ struct reg_name
int value;
};
-/* Generic assembler global variables which must be defined by all targets. */
+/* Generic assembler global variables which must be defined by all
+ targets. */
-/* Characters which always start a comment. */
+/* Characters which always start a comment. */
const char comment_chars[] = "#";
/* Characters which start a comment at the beginning of a line. */
const char line_comment_chars[] = ";#";
-/* Characters which may be used to separate multiple commands on a
+/* Characters which may be used to separate multiple commands on a
single line. */
const char line_separator_chars[] = ";";
-/* Characters which are used to indicate an exponent in a floating
+/* Characters which are used to indicate an exponent in a floating
point number. */
const char EXP_CHARS[] = "eE";
-/* Characters which mean that a number is a floating point constant,
+/* Characters which mean that a number is a floating point constant,
as in 0d1.0. */
const char FLT_CHARS[] = "dD";
-
const relax_typeS md_relax_table[] = {
- /* bCC relaxing */
+ /* bCC relaxing */
{0x81, -0x7e, 2, 1},
{0x8004, -0x7ffb, 5, 2},
{0x800006, -0x7ffff9, 7, 0},
- /* bCCx relaxing */
+ /* bCCx relaxing */
{0x81, -0x7e, 3, 4},
{0x8004, -0x7ffb, 6, 5},
{0x800006, -0x7ffff9, 8, 0},
- /* jsr relaxing */
+ /* jsr relaxing */
{0x8004, -0x7ffb, 3, 7},
{0x800006, -0x7ffff9, 5, 0},
- /* jmp relaxing */
+ /* jmp relaxing */
{0x81, -0x7e, 2, 9},
{0x8004, -0x7ffb, 3, 10},
{0x800006, -0x7ffff9, 5, 0},
};
-/* local functions */
+
+/* Local functions. */
static void mn10200_insert_operand PARAMS ((unsigned long *, unsigned long *,
const struct mn10200_operand *,
offsetT, char *, unsigned,
@@ -83,8 +85,7 @@ static boolean data_register_name PARAMS ((expressionS *expressionP));
static boolean address_register_name PARAMS ((expressionS *expressionP));
static boolean other_register_name PARAMS ((expressionS *expressionP));
-
-/* fixups */
+/* Fixups. */
#define MAX_INSN_FIXUPS (5)
struct mn10200_fixup
{
@@ -99,7 +100,7 @@ const char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
/* The target specific pseudo-ops which we support. */
const pseudo_typeS md_pseudo_table[] =
@@ -110,7 +111,7 @@ const pseudo_typeS md_pseudo_table[] =
/* Opcode hash table. */
static struct hash_control *mn10200_hash;
-/* This table is sorted. Suitable for searching by a binary search. */
+/* This table is sorted. Suitable for searching by a binary search. */
static const struct reg_name data_registers[] =
{
{ "d0", 0 },
@@ -118,7 +119,8 @@ static const struct reg_name data_registers[] =
{ "d2", 2 },
{ "d3", 3 },
};
-#define DATA_REG_NAME_CNT (sizeof(data_registers) / sizeof(struct reg_name))
+#define DATA_REG_NAME_CNT \
+ (sizeof (data_registers) / sizeof (struct reg_name))
static const struct reg_name address_registers[] =
{
@@ -127,18 +129,20 @@ static const struct reg_name address_registers[] =
{ "a2", 2 },
{ "a3", 3 },
};
-#define ADDRESS_REG_NAME_CNT (sizeof(address_registers) / sizeof(struct reg_name))
+#define ADDRESS_REG_NAME_CNT \
+ (sizeof (address_registers) / sizeof (struct reg_name))
static const struct reg_name other_registers[] =
{
{ "mdr", 0 },
{ "psw", 0 },
};
-#define OTHER_REG_NAME_CNT (sizeof(other_registers) / sizeof(struct reg_name))
+#define OTHER_REG_NAME_CNT \
+ (sizeof (other_registers) / sizeof (struct reg_name))
/* reg_name_search does a binary search of the given register table
to see if "name" is a valid regiter name. Returns the register
- number from the array on success, or -1 on failure. */
+ number from the array on success, or -1 on failure. */
static int
reg_name_search (regs, regcount, name)
@@ -160,14 +164,13 @@ reg_name_search (regs, regcount, name)
high = middle - 1;
else if (cmp > 0)
low = middle + 1;
- else
- return regs[middle].value;
+ else
+ return regs[middle].value;
}
while (low <= high);
return -1;
}
-
/* Summary of register_name().
*
* in: Input_line_pointer points to 1st char of operand.
@@ -178,6 +181,7 @@ reg_name_search (regs, regcount, name)
* Input_line_pointer->(next non-blank) char after operand, or is in
* its original state.
*/
+
static boolean
data_register_name (expressionP)
expressionS *expressionP;
@@ -187,29 +191,34 @@ data_register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
c = get_symbol_end ();
reg_number = reg_name_search (data_registers, DATA_REG_NAME_CNT, name);
- /* look to see if it's in the register table */
- if (reg_number >= 0)
+ /* Look to see if it's in the register table. */
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
return true;
}
else
{
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
+ /* Reset the line as if we had not done anything. */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Reset input_line pointer. */
+ input_line_pointer = start;
return false;
}
}
@@ -224,6 +233,7 @@ data_register_name (expressionP)
* Input_line_pointer->(next non-blank) char after operand, or is in
* its original state.
*/
+
static boolean
address_register_name (expressionP)
expressionS *expressionP;
@@ -233,29 +243,34 @@ address_register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
c = get_symbol_end ();
reg_number = reg_name_search (address_registers, ADDRESS_REG_NAME_CNT, name);
- /* look to see if it's in the register table */
- if (reg_number >= 0)
+ /* Look to see if it's in the register table. */
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
return true;
}
else
{
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
+ /* Reset the line as if we had not done anything. */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Reset input_line pointer. */
+ input_line_pointer = start;
return false;
}
}
@@ -270,6 +285,7 @@ address_register_name (expressionP)
* Input_line_pointer->(next non-blank) char after operand, or is in
* its original state.
*/
+
static boolean
other_register_name (expressionP)
expressionS *expressionP;
@@ -279,40 +295,45 @@ other_register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
c = get_symbol_end ();
reg_number = reg_name_search (other_registers, OTHER_REG_NAME_CNT, name);
- /* look to see if it's in the register table */
- if (reg_number >= 0)
+ /* Look to see if it's in the register table. */
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
return true;
}
else
{
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
+ /* Reset the line as if we had not done anything. */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Reset input_line pointer. */
+ input_line_pointer = start;
return false;
}
}
void
md_show_usage (stream)
- FILE *stream;
+ FILE *stream;
{
- fprintf(stream, _("MN10200 options:\n\
+ fprintf (stream, _("MN10200 options:\n\
none yet\n"));
-}
+}
int
md_parse_option (c, arg)
@@ -324,16 +345,16 @@ md_parse_option (c, arg)
symbolS *
md_undefined_symbol (name)
- char *name;
+ char *name;
{
return 0;
}
char *
md_atof (type, litp, sizep)
- int type;
- char *litp;
- int *sizep;
+ int type;
+ char *litp;
+ int *sizep;
{
int prec;
LITTLENUM_TYPE words[4];
@@ -354,7 +375,7 @@ md_atof (type, litp, sizep)
*sizep = 0;
return _("bad call to md_atof");
}
-
+
t = atof_ieee (input_line_pointer, type, words);
if (t)
input_line_pointer = t;
@@ -370,12 +391,11 @@ md_atof (type, litp, sizep)
return NULL;
}
-
void
md_convert_frag (abfd, sec, fragP)
- bfd *abfd;
- asection *sec;
- fragS *fragP;
+ bfd *abfd;
+ asection *sec;
+ fragS *fragP;
{
static unsigned long label_count = 0;
char buf[40];
@@ -737,7 +757,7 @@ md_begin ()
char *prev_name = "";
register const struct mn10200_opcode *op;
- mn10200_hash = hash_new();
+ mn10200_hash = hash_new ();
/* Insert unique names into hash table. The MN10200 instruction set
has many identical opcode names that have different opcodes based
@@ -747,7 +767,7 @@ md_begin ()
op = mn10200_opcodes;
while (op->name)
{
- if (strcmp (prev_name, op->name))
+ if (strcmp (prev_name, op->name))
{
prev_name = (char *) op->name;
hash_insert (mn10200_hash, op->name, (char *) op);
@@ -762,7 +782,7 @@ md_begin ()
}
void
-md_assemble (str)
+md_assemble (str)
char *str;
{
char *s;
@@ -776,13 +796,13 @@ md_assemble (str)
int match;
/* Get the opcode. */
- for (s = str; *s != '\0' && ! isspace (*s); s++)
+ for (s = str; *s != '\0' && !isspace (*s); s++)
;
if (*s != '\0')
*s++ = '\0';
- /* find the first opcode with the proper name */
- opcode = (struct mn10200_opcode *)hash_find (mn10200_hash, str);
+ /* Find the first opcode with the proper name. */
+ opcode = (struct mn10200_opcode *) hash_find (mn10200_hash, str);
if (opcode == NULL)
{
as_bad (_("Unrecognized opcode: `%s'"), str);
@@ -795,7 +815,7 @@ md_assemble (str)
input_line_pointer = str;
- for(;;)
+ for (;;)
{
const char *errmsg = NULL;
int op_idx;
@@ -833,7 +853,7 @@ md_assemble (str)
if (operand->flags & MN10200_OPERAND_RELAX)
relaxable = 1;
- /* Gather the operand. */
+ /* Gather the operand. */
hold = input_line_pointer;
input_line_pointer = str;
@@ -926,7 +946,7 @@ md_assemble (str)
expression (&ex);
}
- switch (ex.X_op)
+ switch (ex.X_op)
{
case O_illegal:
errmsg = _("illegal operand");
@@ -936,13 +956,13 @@ md_assemble (str)
goto error;
case O_register:
if ((operand->flags
- & (MN10200_OPERAND_DREG | MN10200_OPERAND_AREG)) == 0)
+ & (MN10200_OPERAND_DREG | MN10200_OPERAND_AREG)) == 0)
{
input_line_pointer = hold;
str = hold;
goto error;
}
-
+
if (opcode->format == FMT_2 || opcode->format == FMT_5)
extra_shift = 8;
else if (opcode->format == FMT_3 || opcode->format == FMT_6
@@ -950,7 +970,7 @@ md_assemble (str)
extra_shift = 16;
else
extra_shift = 0;
-
+
mn10200_insert_operand (&insn, &extension, operand,
ex.X_add_number, (char *) NULL,
0, extra_shift);
@@ -963,7 +983,7 @@ md_assemble (str)
then promote it (ie this opcode does not match). */
if (operand->flags
& (MN10200_OPERAND_PROMOTE | MN10200_OPERAND_RELAX)
- && ! check_operand (insn, operand, ex.X_add_number))
+ && !check_operand (insn, operand, ex.X_add_number))
{
input_line_pointer = hold;
str = hold;
@@ -1010,20 +1030,20 @@ keep_going:
error:
if (match == 0)
- {
+ {
next_opcode = opcode + 1;
- if (!strcmp(next_opcode->name, opcode->name))
+ if (!strcmp (next_opcode->name, opcode->name))
{
opcode = next_opcode;
continue;
}
-
+
as_bad ("%s", errmsg);
return;
- }
+ }
break;
}
-
+
while (isspace (*str))
++str;
@@ -1044,14 +1064,14 @@ keep_going:
size = 5;
else
abort ();
-
+
/* Write out the instruction. */
if (relaxable && fc > 0)
{
int type;
- /* bCC */
+ /* bCC */
if (size == 2 && opcode->opcode != 0xfc0000)
{
/* Handle bra specially. Basically treat it like jmp so
@@ -1061,18 +1081,18 @@ keep_going:
It is also important to not treat it like other bCC
instructions since the long forms of bra is different
from other bCC instructions. */
- if (opcode->opcode == 0xea00)
- type = 8;
+ if (opcode->opcode == 0xea00)
+ type = 8;
else
type = 0;
}
- /* jsr */
+ /* jsr */
else if (size == 3 && opcode->opcode == 0xfd0000)
type = 6;
- /* jmp */
+ /* jmp */
else if (size == 3 && opcode->opcode == 0xfc0000)
type = 8;
- /* bCCx */
+ /* bCCx */
else
type = 3;
@@ -1130,25 +1150,27 @@ keep_going:
int offset;
fixS *fixP;
- reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc);
+ reloc_howto = bfd_reloc_type_lookup (stdoutput,
+ fixups[i].reloc);
if (!reloc_howto)
- abort();
-
+ abort ();
+
size = bfd_get_reloc_size (reloc_howto);
if (size < 1 || size > 4)
- abort();
+ abort ();
offset = 4 - size;
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset,
size,
- &fixups[i].exp,
+ &fixups[i].exp,
reloc_howto->pc_relative,
fixups[i].reloc);
- /* PC-relative offsets are from the first byte of the next
- instruction, not from the start of the current instruction. */
+ /* PC-relative offsets are from the first byte of the
+ next instruction, not from the start of the current
+ instruction. */
if (reloc_howto->pc_relative)
fixP->fx_offset += size;
}
@@ -1167,7 +1189,6 @@ keep_going:
/* Is the reloc pc-relative? */
pcrel = (operand->flags & MN10200_OPERAND_PCREL) != 0;
-
/* Choose a proper BFD relocation type. */
if (pcrel)
{
@@ -1192,7 +1213,8 @@ keep_going:
abort ();
}
- /* Convert the size of the reloc into what fix_new_exp wants. */
+ /* Convert the size of the reloc into what fix_new_exp
+ wants. */
reloc_size = reloc_size / 8;
if (reloc_size == 8)
reloc_size = 0;
@@ -1205,8 +1227,9 @@ keep_going:
reloc_size, &fixups[i].exp, pcrel,
((bfd_reloc_code_real_type) reloc));
- /* PC-relative offsets are from the first byte of the next
- instruction, not from the start of the current instruction. */
+ /* PC-relative offsets are from the first byte of the
+ next instruction, not from the start of the current
+ instruction. */
if (pcrel)
fixP->fx_offset += size;
}
@@ -1214,10 +1237,9 @@ keep_going:
}
}
+/* If while processing a fixup, a reloc really needs to be created
+ Then it is done here. */
-/* if while processing a fixup, a reloc really needs to be created */
-/* then it is done here */
-
arelent *
tc_gen_reloc (seg, fixp)
asection *seg;
@@ -1230,8 +1252,8 @@ tc_gen_reloc (seg, fixp)
if (reloc->howto == (reloc_howto_type *) NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("reloc %d not supported by object file format"),
- (int)fixp->fx_r_type);
+ _("reloc %d not supported by object file format"),
+ (int) fixp->fx_r_type);
return NULL;
}
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
@@ -1249,7 +1271,7 @@ tc_gen_reloc (seg, fixp)
reloc->addend = (S_GET_VALUE (fixp->fx_addsy)
- S_GET_VALUE (fixp->fx_subsy) + fixp->fx_offset);
}
- else
+ else
{
reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
@@ -1263,30 +1285,20 @@ md_estimate_size_before_relax (fragp, seg)
fragS *fragp;
asection *seg;
{
- if (fragp->fr_subtype == 0)
- return 2;
- if (fragp->fr_subtype == 3)
- return 3;
- if (fragp->fr_subtype == 6)
- {
- if (!S_IS_DEFINED (fragp->fr_symbol)
- || seg != S_GET_SEGMENT (fragp->fr_symbol))
- {
- fragp->fr_subtype = 7;
- return 5;
- }
- return 3;
- }
- if (fragp->fr_subtype == 8)
- {
- if (!S_IS_DEFINED (fragp->fr_symbol))
- {
- fragp->fr_subtype = 10;
- return 5;
- }
- return 2;
- }
-}
+ if (fragp->fr_subtype == 6
+ && (!S_IS_DEFINED (fragp->fr_symbol)
+ || seg != S_GET_SEGMENT (fragp->fr_symbol)))
+ fragp->fr_subtype = 7;
+ else if (fragp->fr_subtype == 8
+ && (!S_IS_DEFINED (fragp->fr_symbol)
+ || seg != S_GET_SEGMENT (fragp->fr_symbol)))
+ fragp->fr_subtype = 10;
+
+ if (fragp->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0]))
+ abort ();
+
+ return md_relax_table[fragp->fr_subtype].rlx_length;
+}
long
md_pcrel_from (fixp)
@@ -1294,7 +1306,7 @@ md_pcrel_from (fixp)
{
return fixp->fx_frag->fr_address;
#if 0
- if (fixp->fx_addsy != (symbolS *) NULL && ! S_IS_DEFINED (fixp->fx_addsy))
+ if (fixp->fx_addsy != (symbolS *) NULL && !S_IS_DEFINED (fixp->fx_addsy))
{
/* The symbol is undefined. Let the linker figure it out. */
return 0;
@@ -1340,14 +1352,13 @@ mn10200_insert_operand (insnp, extensionp, operand, val, file, line, shift)
min = - (1 << (operand->bits - 1));
}
else
- {
- max = (1 << operand->bits) - 1;
- min = 0;
- }
+ {
+ max = (1 << operand->bits) - 1;
+ min = 0;
+ }
test = val;
-
if (test < (offsetT) min || test > (offsetT) max)
{
const char *err =
@@ -1397,14 +1408,13 @@ check_operand (insn, operand, val)
min = - (1 << (operand->bits - 1));
}
else
- {
- max = (1 << operand->bits) - 1;
- min = 0;
- }
+ {
+ max = (1 << operand->bits) - 1;
+ min = 0;
+ }
test = val;
-
if (test < (offsetT) min || test > (offsetT) max)
return 0;
else
diff --git a/gnu/usr.bin/binutils/gas/config/tc-mn10200.h b/gnu/usr.bin/binutils/gas/config/tc-mn10200.h
index e53e569c098..f8e9d83ed3f 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-mn10200.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-mn10200.h
@@ -1,5 +1,5 @@
/* tc-mn10200.h -- Header file for tc-mn10200.c.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#define TC_MN10200
diff --git a/gnu/usr.bin/binutils/gas/config/tc-mn10300.c b/gnu/usr.bin/binutils/gas/config/tc-mn10300.c
index 3514f9f1970..9f3ee5f911c 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-mn10300.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-mn10300.c
@@ -1,5 +1,6 @@
/* tc-mn10300.c -- Assembler code for the Matsushita 10300
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -21,8 +22,9 @@
#include <stdio.h>
#include <ctype.h>
#include "as.h"
-#include "subsegs.h"
+#include "subsegs.h"
#include "opcode/mn10300.h"
+#include "dwarf2dbg.h"
/* Structure to hold information about predefined registers. */
struct reg_name
@@ -31,54 +33,54 @@ struct reg_name
int value;
};
-/* Generic assembler global variables which must be defined by all targets. */
+/* Generic assembler global variables which must be defined by all
+ targets. */
-/* Characters which always start a comment. */
+/* Characters which always start a comment. */
const char comment_chars[] = "#";
/* Characters which start a comment at the beginning of a line. */
const char line_comment_chars[] = ";#";
-/* Characters which may be used to separate multiple commands on a
+/* Characters which may be used to separate multiple commands on a
single line. */
const char line_separator_chars[] = ";";
-/* Characters which are used to indicate an exponent in a floating
+/* Characters which are used to indicate an exponent in a floating
point number. */
const char EXP_CHARS[] = "eE";
-/* Characters which mean that a number is a floating point constant,
+/* Characters which mean that a number is a floating point constant,
as in 0d1.0. */
const char FLT_CHARS[] = "dD";
-
const relax_typeS md_relax_table[] = {
- /* bCC relaxing */
+ /* bCC relaxing */
{0x7f, -0x80, 2, 1},
{0x7fff, -0x8000, 5, 2},
{0x7fffffff, -0x80000000, 7, 0},
- /* bCC relaxing (uncommon cases) */
+ /* bCC relaxing (uncommon cases) */
{0x7f, -0x80, 3, 4},
{0x7fff, -0x8000, 6, 5},
{0x7fffffff, -0x80000000, 8, 0},
- /* call relaxing */
+ /* call relaxing */
{0x7fff, -0x8000, 5, 7},
{0x7fffffff, -0x80000000, 7, 0},
- /* calls relaxing */
+ /* calls relaxing */
{0x7fff, -0x8000, 4, 9},
{0x7fffffff, -0x80000000, 6, 0},
- /* jmp relaxing */
+ /* jmp relaxing */
{0x7f, -0x80, 2, 11},
{0x7fff, -0x8000, 3, 12},
{0x7fffffff, -0x80000000, 5, 0},
};
-/* local functions */
+/* Local functions. */
static void mn10300_insert_operand PARAMS ((unsigned long *, unsigned long *,
const struct mn10300_operand *,
offsetT, char *, unsigned,
@@ -92,9 +94,12 @@ static boolean address_register_name PARAMS ((expressionS *expressionP));
static boolean other_register_name PARAMS ((expressionS *expressionP));
static void set_arch_mach PARAMS ((int));
+/* Set linkrelax here to avoid fixups in most sections. */
+int linkrelax = 1;
+
static int current_machine;
-/* fixups */
+/* Fixups. */
#define MAX_INSN_FIXUPS (5)
struct mn10300_fixup
{
@@ -113,11 +118,13 @@ const char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
/* The target specific pseudo-ops which we support. */
const pseudo_typeS md_pseudo_table[] =
{
+ { "file", dwarf2_directive_file, 0 },
+ { "loc", dwarf2_directive_loc, 0 },
{ "am30", set_arch_mach, AM30 },
{ "am33", set_arch_mach, AM33 },
{ "mn10300", set_arch_mach, MN103 },
@@ -130,7 +137,7 @@ const pseudo_typeS md_pseudo_table[] =
/* Opcode hash table. */
static struct hash_control *mn10300_hash;
-/* This table is sorted. Suitable for searching by a binary search. */
+/* This table is sorted. Suitable for searching by a binary search. */
static const struct reg_name data_registers[] =
{
{ "d0", 0 },
@@ -138,7 +145,8 @@ static const struct reg_name data_registers[] =
{ "d2", 2 },
{ "d3", 3 },
};
-#define DATA_REG_NAME_CNT (sizeof(data_registers) / sizeof(struct reg_name))
+#define DATA_REG_NAME_CNT \
+ (sizeof (data_registers) / sizeof (struct reg_name))
static const struct reg_name address_registers[] =
{
@@ -147,7 +155,9 @@ static const struct reg_name address_registers[] =
{ "a2", 2 },
{ "a3", 3 },
};
-#define ADDRESS_REG_NAME_CNT (sizeof(address_registers) / sizeof(struct reg_name))
+
+#define ADDRESS_REG_NAME_CNT \
+ (sizeof (address_registers) / sizeof (struct reg_name))
static const struct reg_name r_registers[] =
{
@@ -192,7 +202,9 @@ static const struct reg_name r_registers[] =
{ "r8", 8 },
{ "r9", 9 },
};
-#define R_REG_NAME_CNT (sizeof(r_registers) / sizeof(struct reg_name))
+
+#define R_REG_NAME_CNT \
+ (sizeof (r_registers) / sizeof (struct reg_name))
static const struct reg_name xr_registers[] =
{
@@ -200,6 +212,7 @@ static const struct reg_name xr_registers[] =
{ "mcrl", 3 },
{ "mcvf", 4 },
{ "mdrq", 1 },
+ { "pc", 0 },
{ "sp", 0 },
{ "xr0", 0 },
{ "xr1", 1 },
@@ -218,8 +231,9 @@ static const struct reg_name xr_registers[] =
{ "xr8", 8 },
{ "xr9", 9 },
};
-#define XR_REG_NAME_CNT (sizeof(xr_registers) / sizeof(struct reg_name))
+#define XR_REG_NAME_CNT \
+ (sizeof (xr_registers) / sizeof (struct reg_name))
static const struct reg_name other_registers[] =
{
@@ -227,11 +241,13 @@ static const struct reg_name other_registers[] =
{ "psw", 0 },
{ "sp", 0 },
};
-#define OTHER_REG_NAME_CNT (sizeof(other_registers) / sizeof(struct reg_name))
+
+#define OTHER_REG_NAME_CNT \
+ (sizeof (other_registers) / sizeof (struct reg_name))
/* reg_name_search does a binary search of the given register table
to see if "name" is a valid regiter name. Returns the register
- number from the array on success, or -1 on failure. */
+ number from the array on success, or -1 on failure. */
static int
reg_name_search (regs, regcount, name)
@@ -253,14 +269,13 @@ reg_name_search (regs, regcount, name)
high = middle - 1;
else if (cmp > 0)
low = middle + 1;
- else
- return regs[middle].value;
+ else
+ return regs[middle].value;
}
while (low <= high);
return -1;
}
-
/* Summary of register_name().
*
* in: Input_line_pointer points to 1st char of operand.
@@ -271,6 +286,7 @@ reg_name_search (regs, regcount, name)
* Input_line_pointer->(next non-blank) char after operand, or is in
* its original state.
*/
+
static boolean
r_register_name (expressionP)
expressionS *expressionP;
@@ -280,29 +296,34 @@ r_register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
c = get_symbol_end ();
reg_number = reg_name_search (r_registers, R_REG_NAME_CNT, name);
- /* look to see if it's in the register table */
- if (reg_number >= 0)
+ /* Look to see if it's in the register table. */
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
return true;
}
else
{
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
+ /* Reset the line as if we had not done anything. */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Reset input_line pointer. */
+ input_line_pointer = start;
return false;
}
}
@@ -317,6 +338,7 @@ r_register_name (expressionP)
* Input_line_pointer->(next non-blank) char after operand, or is in
* its original state.
*/
+
static boolean
xr_register_name (expressionP)
expressionS *expressionP;
@@ -326,29 +348,34 @@ xr_register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
c = get_symbol_end ();
reg_number = reg_name_search (xr_registers, XR_REG_NAME_CNT, name);
- /* look to see if it's in the register table */
- if (reg_number >= 0)
+ /* Look to see if it's in the register table. */
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
return true;
}
else
{
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
+ /* Reset the line as if we had not done anything. */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Reset input_line pointer. */
+ input_line_pointer = start;
return false;
}
}
@@ -363,6 +390,7 @@ xr_register_name (expressionP)
* Input_line_pointer->(next non-blank) char after operand, or is in
* its original state.
*/
+
static boolean
data_register_name (expressionP)
expressionS *expressionP;
@@ -372,29 +400,34 @@ data_register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
c = get_symbol_end ();
reg_number = reg_name_search (data_registers, DATA_REG_NAME_CNT, name);
- /* look to see if it's in the register table */
- if (reg_number >= 0)
+ /* Look to see if it's in the register table. */
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
return true;
}
else
{
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
+ /* Reset the line as if we had not done anything. */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Reset input_line pointer. */
+ input_line_pointer = start;
return false;
}
}
@@ -409,6 +442,7 @@ data_register_name (expressionP)
* Input_line_pointer->(next non-blank) char after operand, or is in
* its original state.
*/
+
static boolean
address_register_name (expressionP)
expressionS *expressionP;
@@ -418,29 +452,35 @@ address_register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
c = get_symbol_end ();
reg_number = reg_name_search (address_registers, ADDRESS_REG_NAME_CNT, name);
- /* look to see if it's in the register table */
- if (reg_number >= 0)
+ /* Look to see if it's in the register table. */
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
return true;
}
else
{
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
+ /* Reset the line as if we had not done anything. */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Reset input_line pointer. */
+ input_line_pointer = start;
+
return false;
}
}
@@ -455,6 +495,7 @@ address_register_name (expressionP)
* Input_line_pointer->(next non-blank) char after operand, or is in
* its original state.
*/
+
static boolean
other_register_name (expressionP)
expressionS *expressionP;
@@ -464,61 +505,66 @@ other_register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
c = get_symbol_end ();
reg_number = reg_name_search (other_registers, OTHER_REG_NAME_CNT, name);
- /* look to see if it's in the register table */
- if (reg_number >= 0)
+ /* Look to see if it's in the register table. */
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
return true;
}
else
{
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
+ /* Reset the line as if we had not done anything. */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Reset input_line pointer. */
+ input_line_pointer = start;
return false;
}
}
void
md_show_usage (stream)
- FILE *stream;
+ FILE *stream;
{
- fprintf(stream, _("MN10300 options:\n\
+ fprintf (stream, _("MN10300 options:\n\
none yet\n"));
-}
+}
int
md_parse_option (c, arg)
- int c;
- char *arg;
+ int c ATTRIBUTE_UNUSED;
+ char *arg ATTRIBUTE_UNUSED;
{
return 0;
}
symbolS *
md_undefined_symbol (name)
- char *name;
+ char *name ATTRIBUTE_UNUSED;
{
return 0;
}
char *
md_atof (type, litp, sizep)
- int type;
- char *litp;
- int *sizep;
+ int type;
+ char *litp;
+ int *sizep;
{
int prec;
LITTLENUM_TYPE words[4];
@@ -539,7 +585,7 @@ md_atof (type, litp, sizep)
*sizep = 0;
return "bad call to md_atof";
}
-
+
t = atof_ieee (input_line_pointer, type, words);
if (t)
input_line_pointer = t;
@@ -555,12 +601,11 @@ md_atof (type, litp, sizep)
return NULL;
}
-
void
md_convert_frag (abfd, sec, fragP)
- bfd *abfd;
- asection *sec;
- fragS *fragP;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ fragS *fragP;
{
static unsigned long label_count = 0;
char buf[40];
@@ -617,7 +662,7 @@ md_convert_frag (abfd, sec, fragP)
fragP->fr_literal[offset] = opcode;
/* Create a fixup for the reversed conditional branch. */
- sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++);
+ sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
fix_new (fragP, fragP->fr_fix + 1, 1,
symbol_new (buf, sec, 0, fragP->fr_next),
fragP->fr_offset + 1, 1, BFD_RELOC_8_PCREL);
@@ -674,7 +719,7 @@ md_convert_frag (abfd, sec, fragP)
fragP->fr_literal[offset] = opcode;
/* Create a fixup for the reversed conditional branch. */
- sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++);
+ sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
fix_new (fragP, fragP->fr_fix + 1, 1,
symbol_new (buf, sec, 0, fragP->fr_next),
fragP->fr_offset + 1, 1, BFD_RELOC_8_PCREL);
@@ -720,7 +765,7 @@ md_convert_frag (abfd, sec, fragP)
fragP->fr_literal[offset + 1] = opcode;
/* Create a fixup for the reversed conditional branch. */
- sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++);
+ sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
fix_new (fragP, fragP->fr_fix + 2, 1,
symbol_new (buf, sec, 0, fragP->fr_next),
fragP->fr_offset + 2, 1, BFD_RELOC_8_PCREL);
@@ -756,7 +801,7 @@ md_convert_frag (abfd, sec, fragP)
fragP->fr_literal[offset + 1] = opcode;
/* Create a fixup for the reversed conditional branch. */
- sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++);
+ sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
fix_new (fragP, fragP->fr_fix + 2, 1,
symbol_new (buf, sec, 0, fragP->fr_next),
fragP->fr_offset + 2, 1, BFD_RELOC_8_PCREL);
@@ -858,7 +903,7 @@ md_begin ()
char *prev_name = "";
register const struct mn10300_opcode *op;
- mn10300_hash = hash_new();
+ mn10300_hash = hash_new ();
/* Insert unique names into hash table. The MN10300 instruction set
has many identical opcode names that have different opcodes based
@@ -868,7 +913,7 @@ md_begin ()
op = mn10300_opcodes;
while (op->name)
{
- if (strcmp (prev_name, op->name))
+ if (strcmp (prev_name, op->name))
{
prev_name = (char *) op->name;
hash_insert (mn10300_hash, op->name, (char *) op);
@@ -876,11 +921,6 @@ md_begin ()
op++;
}
- /* This is both a simplification (we don't have to write md_apply_fix)
- and support for future optimizations (branch shortening and similar
- stuff in the linker). */
- linkrelax = 1;
-
/* Set the default machine type. */
if (!bfd_set_arch_mach (stdoutput, bfd_arch_mn10300, MN103))
as_warn (_("could not set architecture and machine"));
@@ -889,7 +929,7 @@ md_begin ()
}
void
-md_assemble (str)
+md_assemble (str)
char *str;
{
char *s;
@@ -903,13 +943,13 @@ md_assemble (str)
int match;
/* Get the opcode. */
- for (s = str; *s != '\0' && ! isspace (*s); s++)
+ for (s = str; *s != '\0' && !isspace (*s); s++)
;
if (*s != '\0')
*s++ = '\0';
- /* find the first opcode with the proper name */
- opcode = (struct mn10300_opcode *)hash_find (mn10300_hash, str);
+ /* Find the first opcode with the proper name. */
+ opcode = (struct mn10300_opcode *) hash_find (mn10300_hash, str);
if (opcode == NULL)
{
as_bad (_("Unrecognized opcode: `%s'"), str);
@@ -922,14 +962,13 @@ md_assemble (str)
input_line_pointer = str;
- for(;;)
+ for (;;)
{
const char *errmsg;
int op_idx;
char *hold;
int extra_shift = 0;
-
errmsg = _("Invalid opcode/operands");
/* Reset the array of register operands. */
@@ -972,7 +1011,7 @@ md_assemble (str)
if (operand->flags & MN10300_OPERAND_RELAX)
relaxable = 1;
- /* Gather the operand. */
+ /* Gather the operand. */
hold = input_line_pointer;
input_line_pointer = str;
@@ -1167,10 +1206,10 @@ md_assemble (str)
/* Eat the '['. */
input_line_pointer++;
-
+
/* We used to reject a null register list here; however,
- we accept it now so the compiler can emit "call" instructions
- for all calls to named functions.
+ we accept it now so the compiler can emit "call"
+ instructions for all calls to named functions.
The linker can then fill in the appropriate bits for the
register list and stack size or change the instruction
@@ -1289,7 +1328,7 @@ md_assemble (str)
expression (&ex);
}
- switch (ex.X_op)
+ switch (ex.X_op)
{
case O_illegal:
errmsg = _("illegal operand");
@@ -1310,7 +1349,7 @@ md_assemble (str)
str = hold;
goto error;
}
-
+
if (opcode->format == FMT_D1 || opcode->format == FMT_S1)
extra_shift = 8;
else if (opcode->format == FMT_D2
@@ -1326,12 +1365,11 @@ md_assemble (str)
extra_shift = 8;
else
extra_shift = 0;
-
+
mn10300_insert_operand (&insn, &extension, operand,
ex.X_add_number, (char *) NULL,
0, extra_shift);
-
/* And note the register number in the register array. */
mn10300_reg_operands[op_idx - 1] = ex.X_add_number;
break;
@@ -1343,7 +1381,7 @@ md_assemble (str)
then promote it (ie this opcode does not match). */
if (operand->flags
& (MN10300_OPERAND_PROMOTE | MN10300_OPERAND_RELAX)
- && ! check_operand (insn, operand, ex.X_add_number))
+ && !check_operand (insn, operand, ex.X_add_number))
{
input_line_pointer = hold;
str = hold;
@@ -1419,20 +1457,20 @@ keep_going:
error:
if (match == 0)
- {
+ {
next_opcode = opcode + 1;
- if (!strcmp(next_opcode->name, opcode->name))
+ if (!strcmp (next_opcode->name, opcode->name))
{
opcode = next_opcode;
continue;
}
-
+
as_bad ("%s", errmsg);
return;
- }
+ }
break;
}
-
+
while (isspace (*str))
++str;
@@ -1479,7 +1517,14 @@ keep_going:
{
int type;
- /* bCC */
+ /* We want to anchor the line info to the previous frag (if
+ there isn't one, create it), so that, when the insn is
+ resized, we still get the right address for the beginning of
+ the region. */
+ f = frag_more (0);
+ dwarf2_emit_insn (0);
+
+ /* bCC */
if (size == 2)
{
/* Handle bra specially. Basically treat it like jmp so
@@ -1494,16 +1539,16 @@ keep_going:
else
type = 0;
}
- /* call */
+ /* call */
else if (size == 5)
- type = 6;
- /* calls */
+ type = 6;
+ /* calls */
else if (size == 4)
type = 8;
- /* jmp */
+ /* jmp */
else if (size == 3 && opcode->opcode == 0xcc0000)
type = 10;
- /* bCC (uncommon cases) */
+ /* bCC (uncommon cases) */
else
type = 3;
@@ -1511,7 +1556,7 @@ keep_going:
fixups[0].exp.X_add_symbol,
fixups[0].exp.X_add_number,
(char *)fixups[0].opindex);
-
+
/* This is pretty hokey. We basically just care about the
opcode, so we have to write out the first word big endian.
@@ -1612,29 +1657,33 @@ keep_going:
else if (opcode->format == FMT_D4)
{
unsigned long temp = ((insn & 0xffff) << 16) | (extension & 0xffff);
+
number_to_chars_bigendian (f, (insn >> 16) & 0xffff, 2);
number_to_chars_littleendian (f + 2, temp, 4);
}
else if (opcode->format == FMT_D5)
{
- unsigned long temp = ((insn & 0xffff) << 16)
- | ((extension >> 8) & 0xffff);
+ unsigned long temp = (((insn & 0xffff) << 16)
+ | ((extension >> 8) & 0xffff));
+
number_to_chars_bigendian (f, (insn >> 16) & 0xffff, 2);
number_to_chars_littleendian (f + 2, temp, 4);
number_to_chars_bigendian (f + 6, extension & 0xff, 1);
}
else if (opcode->format == FMT_D8)
{
- unsigned long temp = ((insn & 0xff) << 16) | (extension & 0xffff);
- number_to_chars_bigendian (f, (insn >> 8) & 0xffffff, 3);
- number_to_chars_bigendian (f + 3, (temp & 0xff), 1);
- number_to_chars_littleendian (f + 4, temp >> 8, 2);
+ unsigned long temp = ((insn & 0xff) << 16) | (extension & 0xffff);
+
+ number_to_chars_bigendian (f, (insn >> 8) & 0xffffff, 3);
+ number_to_chars_bigendian (f + 3, (temp & 0xff), 1);
+ number_to_chars_littleendian (f + 4, temp >> 8, 2);
}
else if (opcode->format == FMT_D9)
{
- unsigned long temp = ((insn & 0xff) << 24) | (extension & 0xffffff);
- number_to_chars_bigendian (f, (insn >> 8) & 0xffffff, 3);
- number_to_chars_littleendian (f + 3, temp, 4);
+ unsigned long temp = ((insn & 0xff) << 24) | (extension & 0xffffff);
+
+ number_to_chars_bigendian (f, (insn >> 8) & 0xffffff, 3);
+ number_to_chars_littleendian (f + 3, temp, 4);
}
/* Create any fixups. */
@@ -1650,15 +1699,16 @@ keep_going:
int offset;
fixS *fixP;
- reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc);
+ reloc_howto = bfd_reloc_type_lookup (stdoutput,
+ fixups[i].reloc);
if (!reloc_howto)
- abort();
-
+ abort ();
+
size = bfd_get_reloc_size (reloc_howto);
if (size < 1 || size > 4)
- abort();
+ abort ();
offset = 4 - size;
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset,
@@ -1684,24 +1734,7 @@ keep_going:
/* Is the reloc pc-relative? */
pcrel = (operand->flags & MN10300_OPERAND_PCREL) != 0;
- /* Gross. This disgusting hack is to make sure we
- get the right offset for the 16/32 bit reloc in
- "call" instructions. Basically they're a pain
- because the reloc isn't at the end of the instruction. */
- if ((size == 5 || size == 7)
- && (((insn >> 24) & 0xff) == 0xcd
- || ((insn >> 24) & 0xff) == 0xdd))
- size -= 2;
-
- /* Similarly for certain bit instructions which don't
- hav their 32bit reloc at the tail of the instruction. */
- if (size == 7
- && (((insn >> 16) & 0xffff) == 0xfe00
- || ((insn >> 16) & 0xffff) == 0xfe01
- || ((insn >> 16) & 0xffff) == 0xfe02))
- size -= 1;
-
- offset = size - reloc_size / 8;
+ offset = size - (reloc_size + operand->shift) / 8;
/* Choose a proper BFD relocation type. */
if (pcrel)
@@ -1744,16 +1777,17 @@ keep_going:
fixP->fx_offset += offset;
}
}
+
+ dwarf2_emit_insn (size);
}
}
+/* If while processing a fixup, a reloc really needs to be created
+ then it is done here. */
-/* if while processing a fixup, a reloc really needs to be created */
-/* then it is done here */
-
arelent *
tc_gen_reloc (seg, fixp)
- asection *seg;
+ asection *seg ATTRIBUTE_UNUSED;
fixS *fixp;
{
arelent *reloc;
@@ -1763,15 +1797,54 @@ tc_gen_reloc (seg, fixp)
if (reloc->howto == (reloc_howto_type *) NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("reloc %d not supported by object file format"),
- (int)fixp->fx_r_type);
+ _("reloc %d not supported by object file format"),
+ (int) fixp->fx_r_type);
return NULL;
}
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
if (fixp->fx_addsy && fixp->fx_subsy)
{
-
+ /* If we got a difference between two symbols, and the
+ subtracted symbol is in the current section, use a
+ PC-relative relocation. If both symbols are in the same
+ section, the difference would have already been simplified
+ to a constant. */
+ if (S_GET_SEGMENT (fixp->fx_subsy) == seg)
+ {
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+ reloc->addend = (reloc->address - S_GET_VALUE (fixp->fx_subsy)
+ + fixp->fx_offset);
+
+ switch (fixp->fx_r_type)
+ {
+ case BFD_RELOC_8:
+ reloc->howto = bfd_reloc_type_lookup (stdoutput,
+ BFD_RELOC_8_PCREL);
+ return reloc;
+
+ case BFD_RELOC_16:
+ reloc->howto = bfd_reloc_type_lookup (stdoutput,
+ BFD_RELOC_16_PCREL);
+ return reloc;
+
+ case BFD_RELOC_24:
+ reloc->howto = bfd_reloc_type_lookup (stdoutput,
+ BFD_RELOC_24_PCREL);
+ return reloc;
+
+ case BFD_RELOC_32:
+ reloc->howto = bfd_reloc_type_lookup (stdoutput,
+ BFD_RELOC_32_PCREL);
+ return reloc;
+
+ default:
+ /* Try to compute the absolute value below. */
+ break;
+ }
+ }
+
if ((S_GET_SEGMENT (fixp->fx_addsy) != S_GET_SEGMENT (fixp->fx_subsy))
|| S_GET_SEGMENT (fixp->fx_addsy) == undefined_section)
{
@@ -1780,13 +1853,13 @@ tc_gen_reloc (seg, fixp)
return NULL;
}
- reloc->sym_ptr_ptr = &bfd_abs_symbol;
+ reloc->sym_ptr_ptr = (asymbol **) &bfd_abs_symbol;
reloc->addend = (S_GET_VALUE (fixp->fx_addsy)
- S_GET_VALUE (fixp->fx_subsy) + fixp->fx_offset);
}
- else
+ else
{
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof( asymbol *));
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc->addend = fixp->fx_offset;
}
@@ -1798,58 +1871,35 @@ md_estimate_size_before_relax (fragp, seg)
fragS *fragp;
asection *seg;
{
- if (fragp->fr_subtype == 0)
- return 2;
- if (fragp->fr_subtype == 3)
- return 3;
- if (fragp->fr_subtype == 6)
- {
- if (!S_IS_DEFINED (fragp->fr_symbol)
- || seg != S_GET_SEGMENT (fragp->fr_symbol))
- {
- fragp->fr_subtype = 7;
- return 7;
- }
- else
- return 5;
- }
- if (fragp->fr_subtype == 8)
- {
- if (!S_IS_DEFINED (fragp->fr_symbol)
- || seg != S_GET_SEGMENT (fragp->fr_symbol))
- {
- fragp->fr_subtype = 9;
- return 6;
- }
- else
- return 4;
- }
- if (fragp->fr_subtype == 10)
- {
- if (!S_IS_DEFINED (fragp->fr_symbol)
- || seg != S_GET_SEGMENT (fragp->fr_symbol))
- {
- fragp->fr_subtype = 12;
- return 5;
- }
- else
- return 2;
- }
-}
+ if (fragp->fr_subtype == 6
+ && (!S_IS_DEFINED (fragp->fr_symbol)
+ || seg != S_GET_SEGMENT (fragp->fr_symbol)))
+ fragp->fr_subtype = 7;
+ else if (fragp->fr_subtype == 8
+ && (!S_IS_DEFINED (fragp->fr_symbol)
+ || seg != S_GET_SEGMENT (fragp->fr_symbol)))
+ fragp->fr_subtype = 9;
+ else if (fragp->fr_subtype == 10
+ && (!S_IS_DEFINED (fragp->fr_symbol)
+ || seg != S_GET_SEGMENT (fragp->fr_symbol)))
+ fragp->fr_subtype = 12;
+
+ if (fragp->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0]))
+ abort ();
+
+ return md_relax_table[fragp->fr_subtype].rlx_length;
+}
long
md_pcrel_from (fixp)
fixS *fixp;
{
- return fixp->fx_frag->fr_address;
-#if 0
- if (fixp->fx_addsy != (symbolS *) NULL && ! S_IS_DEFINED (fixp->fx_addsy))
+ if (fixp->fx_addsy != (symbolS *) NULL && !S_IS_DEFINED (fixp->fx_addsy))
{
/* The symbol is undefined. Let the linker figure it out. */
return 0;
}
return fixp->fx_frag->fr_address + fixp->fx_where;
-#endif
}
int
@@ -1858,12 +1908,128 @@ md_apply_fix3 (fixp, valuep, seg)
valueT *valuep;
segT seg;
{
- /* We shouldn't ever get here because linkrelax is nonzero. */
- abort ();
- fixp->fx_done = 1;
+ char *fixpos = fixp->fx_where + fixp->fx_frag->fr_literal;
+ int size = 0;
+ int value;
+
+ assert (fixp->fx_r_type < BFD_RELOC_UNUSED);
+
+ /* This should never happen. */
+ if (seg->flags & SEC_ALLOC)
+ abort ();
+
+ /* The value we are passed in *valuep includes the symbol values.
+ Since we are using BFD_ASSEMBLER, if we are doing this relocation
+ the code in write.c is going to call bfd_install_relocation, which
+ is also going to use the symbol value. That means that if the
+ reloc is fully resolved we want to use *valuep since
+ bfd_install_relocation is not being used.
+
+ However, if the reloc is not fully resolved we do not want to use
+ *valuep, and must use fx_offset instead. However, if the reloc
+ is PC relative, we do want to use *valuep since it includes the
+ result of md_pcrel_from. */
+ if (fixp->fx_addsy == (symbolS *) NULL || fixp->fx_pcrel)
+ value = *valuep;
+ else
+ value = fixp->fx_offset;
+
+ /* If the fix is relative to a symbol which is not defined, or not
+ in the same segment as the fix, we cannot resolve it here. */
+ if (fixp->fx_addsy != NULL
+ && (! S_IS_DEFINED (fixp->fx_addsy)
+ || (S_GET_SEGMENT (fixp->fx_addsy) != seg)))
+ {
+ fixp->fx_done = 0;
+ return 0;
+ }
+
+ switch (fixp->fx_r_type)
+ {
+ case BFD_RELOC_8:
+ case BFD_RELOC_8_PCREL:
+ size = 1;
+ break;
+
+ case BFD_RELOC_16:
+ case BFD_RELOC_16_PCREL:
+ size = 2;
+ break;
+
+ case BFD_RELOC_32:
+ case BFD_RELOC_32_PCREL:
+ size = 4;
+ break;
+
+ case BFD_RELOC_VTABLE_INHERIT:
+ case BFD_RELOC_VTABLE_ENTRY:
+ fixp->fx_done = 0;
+ return 1;
+
+ case BFD_RELOC_NONE:
+ default:
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Bad relocation fixup type (%d)"), fixp->fx_r_type);
+ }
+
+ md_number_to_chars (fixpos, value, size);
+
+ /* If a symbol remains, pass the fixup, as a reloc, onto the linker. */
+ if (fixp->fx_addsy == NULL)
+ fixp->fx_done = 1;
+
+ return 0;
+}
+
+/* Return nonzero if the fixup in FIXP will require a relocation,
+ even it if appears that the fixup could be completely handled
+ within GAS. */
+
+int
+mn10300_force_relocation (fixp)
+ struct fix *fixp;
+{
+ if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ return 1;
+
+ /* Do not adjust relocations involving symbols in code sections,
+ because it breaks linker relaxations. This could be fixed in the
+ linker, but this fix is simpler, and it pretty much only affects
+ object size a little bit. */
+ if ((S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_CODE)
+ && fixp->fx_subsy
+ && S_GET_SEGMENT (fixp->fx_addsy) == S_GET_SEGMENT (fixp->fx_subsy))
+ return 1;
+
return 0;
}
+/* Return zero if the fixup in fixp should be left alone and not
+ adjusted. */
+
+boolean
+mn10300_fix_adjustable (fixp)
+ struct fix *fixp;
+{
+ /* Prevent all adjustments to global symbols. */
+ if (S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy))
+ return 0;
+
+ if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ return 0;
+
+ /* Do not adjust relocations involving symbols in code sections,
+ because it breaks linker relaxations. This could be fixed in the
+ linker, but this fix is simpler, and it pretty much only affects
+ object size a little bit. */
+ if (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_CODE)
+ return 0;
+
+ return 1;
+}
+
/* Insert an operand value into an instruction. */
static void
@@ -1895,26 +2061,25 @@ mn10300_insert_operand (insnp, extensionp, operand, val, file, line, shift)
min = - (1 << (bits - 1));
}
else
- {
- max = (1 << bits) - 1;
- min = 0;
- }
+ {
+ max = (1 << bits) - 1;
+ min = 0;
+ }
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);
- }
+ {
+ 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);
+ }
}
if ((operand->flags & MN10300_OPERAND_SPLIT) != 0)
@@ -1951,7 +2116,7 @@ mn10300_insert_operand (insnp, extensionp, operand, val, file, line, shift)
static unsigned long
check_operand (insn, operand, val)
- unsigned long insn;
+ unsigned long insn ATTRIBUTE_UNUSED;
const struct mn10300_operand *operand;
offsetT val;
{
@@ -1974,14 +2139,13 @@ check_operand (insn, operand, val)
min = - (1 << (bits - 1));
}
else
- {
- max = (1 << bits) - 1;
- min = 0;
- }
+ {
+ max = (1 << bits) - 1;
+ min = 0;
+ }
test = val;
-
if (test < (offsetT) min || test > (offsetT) max)
return 0;
else
diff --git a/gnu/usr.bin/binutils/gas/config/tc-mn10300.h b/gnu/usr.bin/binutils/gas/config/tc-mn10300.h
index ffcb227b0e0..f14cd242e23 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-mn10300.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-mn10300.h
@@ -1,5 +1,5 @@
/* tc-mn10300.h -- Header file for tc-mn10300.c.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#define TC_MN10300
@@ -31,7 +31,20 @@
#define TARGET_FORMAT "elf32-mn10300"
-#define MD_APPLY_FIX3
+/* For fixup and relocation handling. */
+#define TC_FORCE_RELOCATION(fixp) mn10300_force_relocation (fixp)
+extern int mn10300_force_relocation PARAMS ((struct fix *));
+
+#define TC_HANDLES_FX_DONE
+
+#define obj_fix_adjustable(fixP) mn10300_fix_adjustable (fixP)
+extern boolean mn10300_fix_adjustable PARAMS ((struct fix *));
+
+#define MD_APPLY_FIX3 md_apply_fix3
+
+/* Fixup debug sections since we will never relax them. */
+#define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC)
+
#define md_operand(x)
/* Permit temporary numeric labels. */
@@ -48,3 +61,5 @@
/* We do relaxing in the assembler as well as the linker. */
extern const struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
+
+#define DWARF2_LINE_MIN_INSN_LENGTH 1
diff --git a/gnu/usr.bin/binutils/gas/config/tc-ns32k.c b/gnu/usr.bin/binutils/gas/config/tc-ns32k.c
index 59f14676229..f8f01c6ffd3 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-ns32k.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-ns32k.c
@@ -1,5 +1,6 @@
/* ns32k.c -- Assemble on the National Semiconductor 32k series
- Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,7 +20,7 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*#define SHOW_NUM 1*//* uncomment for debugging */
+/*#define SHOW_NUM 1*//* Uncomment for debugging. */
#include <stdio.h>
#include <ctype.h>
@@ -29,13 +30,13 @@
#include "obstack.h"
-/* Macros */
-#define IIF_ENTRIES 13 /* number of entries in iif */
-#define PRIVATE_SIZE 256 /* size of my garbage memory */
+/* Macros. */
+#define IIF_ENTRIES 13 /* Number of entries in iif. */
+#define PRIVATE_SIZE 256 /* Size of my garbage memory. */
#define MAX_ARGS 4
#define DEFAULT -1 /* addr_mode returns this value when
plain constant or label is
- encountered */
+ encountered. */
#define IIF(ptr,a1,c1,e1,g1,i1,k1,m1,o1,q1,s1,u1) \
iif.iifP[ptr].type= a1; \
@@ -62,7 +63,8 @@
const char comment_chars[] = "#";
const char line_comment_chars[] = LINE_COMMENT_CHARS;
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
+
#if !defined(ABSOLUTE_PREFIX) && !defined(IMMEDIATE_PREFIX)
#define ABSOLUTE_PREFIX '@' /* One or the other MUST be defined */
#endif
@@ -85,29 +87,29 @@ struct addr_mode
};
typedef struct addr_mode addr_modeS;
-
-char *freeptr, *freeptr_static; /* points at some number of free bytes */
+char *freeptr, *freeptr_static; /* Points at some number of free bytes. */
struct hash_control *inst_hash_handle;
-struct ns32k_opcode *desc; /* pointer at description of instruction */
+struct ns32k_opcode *desc; /* Pointer at description of instruction. */
addr_modeS addr_modeP;
const char EXP_CHARS[] = "eE";
-const char FLT_CHARS[] = "fd"; /* we don't want to support lowercase, do we */
+const char FLT_CHARS[] = "fd"; /* We don't want to support lowercase,
+ do we? */
/* UPPERCASE denotes live names when an instruction is built, IIF is
* used as an intermediate form to store the actual parts of the
* instruction. A ns32k machine instruction can be divided into a
* couple of sub PARTs. When an instruction is assembled the
* appropriate PART get an assignment. When an IIF has been completed
- * it is converted to a FRAGment as specified in AS.H */
+ * it is converted to a FRAGment as specified in AS.H. */
-/* internal structs */
+/* Internal structs. */
struct ns32k_option
- {
- char *pattern;
- unsigned long or;
- unsigned long and;
- };
+{
+ char *pattern;
+ unsigned long or;
+ unsigned long and;
+};
typedef struct
{
@@ -129,59 +131,59 @@ typedef struct
struct int_ins_form
{
- int instr_size; /* Max size of instruction in bytes. */
+ int instr_size; /* Max size of instruction in bytes. */
iif_entryT iifP[IIF_ENTRIES + 1];
};
+
struct int_ins_form iif;
expressionS exprP;
char *input_line_pointer;
-/* description of the PARTs in IIF
- *object[n]:
- * 0 total length in bytes of entries in iif
- * 1 opcode
- * 2 index_byte_a
- * 3 index_byte_b
- * 4 disp_a_1
- * 5 disp_a_2
- * 6 disp_b_1
- * 7 disp_b_2
- * 8 imm_a
- * 9 imm_b
- * 10 implied1
- * 11 implied2
- *
- * For every entry there is a datalength in bytes. This is stored in size[n].
- * 0, the objectlength is not explicitly given by the instruction
- * and the operand is undefined. This is a case for relaxation.
- * Reserve 4 bytes for the final object.
- *
- * 1, the entry contains one byte
- * 2, the entry contains two bytes
- * 3, the entry contains three bytes
- * 4, the entry contains four bytes
- * etc
- *
- * Furthermore, every entry has a data type identifier in type[n].
- *
- * 0, the entry is void, ignore it.
- * 1, the entry is a binary number.
- * 2, the entry is a pointer at an expression.
- * Where expression may be as simple as a single '1',
- * and as complicated as foo-bar+12,
- * foo and bar may be undefined but suffixed by :{b|w|d} to
- * control the length of the object.
- *
- * 3, the entry is a pointer at a bignum struct
- *
- *
- * The low-order-byte coresponds to low physical memory.
- * Obviously a FRAGment must be created for each valid disp in PART whose
- * datalength is undefined (to bad) .
- * The case where just the expression is undefined is less severe and is
- * handled by fix. Here the number of bytes in the objectfile is known.
- * With this representation we simplify the assembly and separates the
- * machine dependent/independent parts in a more clean way (said OE)
- */
+
+/* Description of the PARTs in IIF
+ object[n]:
+ 0 total length in bytes of entries in iif
+ 1 opcode
+ 2 index_byte_a
+ 3 index_byte_b
+ 4 disp_a_1
+ 5 disp_a_2
+ 6 disp_b_1
+ 7 disp_b_2
+ 8 imm_a
+ 9 imm_b
+ 10 implied1
+ 11 implied2
+
+ For every entry there is a datalength in bytes. This is stored in size[n].
+ 0, the objectlength is not explicitly given by the instruction
+ and the operand is undefined. This is a case for relaxation.
+ Reserve 4 bytes for the final object.
+
+ 1, the entry contains one byte
+ 2, the entry contains two bytes
+ 3, the entry contains three bytes
+ 4, the entry contains four bytes
+ etc
+
+ Furthermore, every entry has a data type identifier in type[n].
+
+ 0, the entry is void, ignore it.
+ 1, the entry is a binary number.
+ 2, the entry is a pointer at an expression.
+ Where expression may be as simple as a single '1',
+ and as complicated as foo-bar+12,
+ foo and bar may be undefined but suffixed by :{b|w|d} to
+ control the length of the object.
+
+ 3, the entry is a pointer at a bignum struct
+
+ The low-order-byte coresponds to low physical memory.
+ Obviously a FRAGment must be created for each valid disp in PART whose
+ datalength is undefined (to bad) .
+ The case where just the expression is undefined is less severe and is
+ handled by fix. Here the number of bytes in the objectfile is known.
+ With this representation we simplify the assembly and separates the
+ machine dependent/independent parts in a more clean way (said OE). */
struct ns32k_option opt1[] = /* restore, exit */
{
@@ -311,20 +313,20 @@ struct ns32k_option *mmureg = mmureg_032;
const pseudo_typeS md_pseudo_table[] =
-{ /* so far empty */
+{ /* So far empty. */
{0, 0, 0}
};
#define IND(x,y) (((x)<<2)+(y))
-/* those are index's to relax groups in md_relax_table ie it must be
+/* Those are index's to relax groups in md_relax_table ie it must be
multiplied by 4 to point at a group start. Viz IND(x,y) Se function
- relax_segment in write.c for more info */
+ relax_segment in write.c for more info. */
#define BRANCH 1
#define PCREL 2
-/* those are index's to entries in a relax group */
+/* Those are index's to entries in a relax group. */
#define BYTE 0
#define WORD 1
@@ -337,8 +339,7 @@ const pseudo_typeS md_pseudo_table[] =
displacement base-adjust as there are other routines that must
consider this. Also, as we have two various offset-adjusts in the
ns32k (acb versus br/brs/jsr/bcond), two set of limits would have
- had to be used. Now we dont have to think about that. */
-
+ had to be used. Now we dont have to think about that. */
const relax_typeS md_relax_table[] =
{
@@ -354,7 +355,7 @@ const relax_typeS md_relax_table[] =
};
/* Array used to test if mode contains displacements.
- Value is true if mode contains displacement. */
+ Value is true if mode contains displacement. */
char disp_test[] =
{0, 0, 0, 0, 0, 0, 0, 0,
@@ -362,7 +363,7 @@ char disp_test[] =
1, 1, 1, 0, 0, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1};
-/* Array used to calculate max size of displacements */
+/* Array used to calculate max size of displacements. */
char disp_size[] =
{4, 1, 2, 0, 4};
@@ -371,14 +372,14 @@ static void evaluate_expr PARAMS ((expressionS * resultP, char *ptr));
static void md_number_to_disp PARAMS ((char *buf, long val, int n));
static void md_number_to_imm PARAMS ((char *buf, long val, int n));
-/* Parses a general operand into an addressingmode struct
+/* Parse a general operand into an addressingmode struct
- in: pointer at operand in ascii form
- pointer at addr_mode struct for result
- the level of recursion. (always 0 or 1)
+ In: pointer at operand in ascii form
+ pointer at addr_mode struct for result
+ the level of recursion. (always 0 or 1)
+
+ Out: data in addr_mode struct. */
- out: data in addr_mode struct
- */
int
addr_mode (operand, addr_modeP, recursive_level)
char *operand;
@@ -390,6 +391,7 @@ addr_mode (operand, addr_modeP, recursive_level)
register int strl;
register int mode;
int j;
+
mode = DEFAULT; /* default */
addr_modeP->scaled_mode = 0; /* why not */
addr_modeP->scaled_reg = 0; /* if 0, not scaled index */
@@ -402,22 +404,23 @@ addr_mode (operand, addr_modeP, recursive_level)
addr_modeP->disp[0] = NULL;
addr_modeP->disp[1] = NULL;
str = operand;
+
if (str[0] == 0)
- {
- return (0);
- } /* we don't want this */
+ return 0;
+
strl = strlen (str);
+
switch (str[0])
{
- /* the following three case statements controls the mode-chars
- this is the place to ed if you want to change them */
+ /* The following three case statements controls the mode-chars
+ this is the place to ed if you want to change them. */
#ifdef ABSOLUTE_PREFIX
case ABSOLUTE_PREFIX:
if (str[strl - 1] == ']')
break;
addr_modeP->mode = 21; /* absolute */
addr_modeP->disp[0] = str + 1;
- return (-1);
+ return -1;
#endif
#ifdef IMMEDIATE_PREFIX
case IMMEDIATE_PREFIX:
@@ -425,7 +428,7 @@ addr_mode (operand, addr_modeP, recursive_level)
break;
addr_modeP->mode = 20; /* immediate */
addr_modeP->disp[0] = str + 1;
- return (-1);
+ return -1;
#endif
case '.':
if (str[strl - 1] != ']')
@@ -438,11 +441,11 @@ addr_mode (operand, addr_modeP, recursive_level)
{
addr_modeP->mode = 27; /* pc-relativ */
addr_modeP->disp[0] = str + 2;
- return (-1);
+ return -1;
}
default:
as_warn (_("Invalid syntax in PC-relative addressing mode"));
- return (0);
+ return 0;
}
}
break;
@@ -471,13 +474,17 @@ addr_mode (operand, addr_modeP, recursive_level)
str[j] = '\000'; /* null terminate disp[0] */
addr_modeP->disp[1] = str + j + 2;
addr_modeP->mode = 22;
- return (-1);
+ return -1;
}
}
break;
- default:;
+
+ default:
+ ;
}
+
strl = strlen (str);
+
switch (strl)
{
case 2:
@@ -485,21 +492,31 @@ addr_mode (operand, addr_modeP, recursive_level)
{
case 'f':
addr_modeP->float_flag = 1;
+ /* Drop through. */
case 'r':
if (str[1] >= '0' && str[1] < '8')
{
addr_modeP->mode = str[1] - '0';
- return (-1);
+ return -1;
}
+ break;
+ default:
+ break;
}
+ /* Drop through. */
+
case 3:
if (!strncmp (str, "tos", 3))
{
addr_modeP->mode = 23; /* TopOfStack */
- return (-1);
+ return -1;
}
- default:;
+ break;
+
+ default:
+ break;
}
+
if (strl > 4)
{
if (str[strl - 1] == ')')
@@ -507,22 +524,18 @@ addr_mode (operand, addr_modeP, recursive_level)
if (str[strl - 2] == ')')
{
if (!strncmp (&str[strl - 5], "(fp", 3))
- {
- mode = 16; /* Memory Relative */
- }
- if (!strncmp (&str[strl - 5], "(sp", 3))
- {
- mode = 17;
- }
- if (!strncmp (&str[strl - 5], "(sb", 3))
- {
- mode = 18;
- }
+ mode = 16; /* Memory Relative. */
+ else if (!strncmp (&str[strl - 5], "(sp", 3))
+ mode = 17;
+ else if (!strncmp (&str[strl - 5], "(sb", 3))
+ mode = 18;
+
if (mode != DEFAULT)
- { /* memory relative */
+ { /* Memory relative. */
addr_modeP->mode = mode;
- j = strl - 5; /* temp for end of disp[0] */
+ j = strl - 5; /* Temp for end of disp[0]. */
i = 0;
+
do
{
strl -= 1;
@@ -532,18 +545,22 @@ addr_mode (operand, addr_modeP, recursive_level)
i--;
}
while (strl > -1 && i != 0);
+
if (i != 0)
{
as_warn (_("Invalid syntax in Memory Relative addressing mode"));
return (0);
}
+
addr_modeP->disp[1] = str;
addr_modeP->disp[0] = str + strl + 1;
- str[j] = '\000'; /* null terminate disp[0] */
- str[strl] = '\000'; /* null terminate disp[1] */
- return (-1);
+ str[j] = '\000'; /* Null terminate disp[0] . */
+ str[strl] = '\000'; /* Null terminate disp[1]. */
+
+ return -1;
}
}
+
switch (str[strl - 3])
{
case 'r':
@@ -555,35 +572,32 @@ addr_mode (operand, addr_modeP, recursive_level)
addr_modeP->mode = str[strl - 2] - '0' + 8;
addr_modeP->disp[0] = str;
str[strl - 4] = 0;
- return (-1); /* reg rel */
+ return -1; /* reg rel */
}
+ /* Drop through. */
+
default:
if (!strncmp (&str[strl - 4], "(fp", 3))
- {
- mode = 24;
- }
- if (!strncmp (&str[strl - 4], "(sp", 3))
- {
- mode = 25;
- }
- if (!strncmp (&str[strl - 4], "(sb", 3))
- {
- mode = 26;
- }
- if (!strncmp (&str[strl - 4], "(pc", 3))
- {
- mode = 27;
- }
+ mode = 24;
+ else if (!strncmp (&str[strl - 4], "(sp", 3))
+ mode = 25;
+ else if (!strncmp (&str[strl - 4], "(sb", 3))
+ mode = 26;
+ else if (!strncmp (&str[strl - 4], "(pc", 3))
+ mode = 27;
+
if (mode != DEFAULT)
{
addr_modeP->mode = mode;
addr_modeP->disp[0] = str;
str[strl - 4] = '\0';
- return (-1); /* memory space */
+
+ return -1; /* Memory space. */
}
}
}
- /* no trailing ')' do we have a ']' ? */
+
+ /* No trailing ')' do we have a ']' ? */
if (str[strl - 1] == ']')
{
switch (str[strl - 2])
@@ -600,41 +614,44 @@ addr_mode (operand, addr_modeP, recursive_level)
case 'q':
mode = 31;
break;
- default:;
+ default:
as_warn (_("Invalid scaled-indexed mode, use (b,w,d,q)"));
+
if (str[strl - 3] != ':' || str[strl - 6] != '['
|| str[strl - 5] == 'r' || str[strl - 4] < '0'
|| str[strl - 4] > '7')
- {
- as_warn (_("Syntax in scaled-indexed mode, use [Rn:m] where n=[0..7] m={b,w,d,q}"));
- }
- } /* scaled index */
- {
- if (recursive_level > 0)
- {
- as_warn (_("Scaled-indexed addressing mode combined with scaled-index"));
- return (0);
- }
- addr_modeP->am_size += 1; /* scaled index byte */
- j = str[strl - 4] - '0'; /* store temporary */
- str[strl - 6] = '\000'; /* nullterminate for recursive call */
- i = addr_mode (str, addr_modeP, 1);
- if (!i || addr_modeP->mode == 20)
- {
- as_warn (_("Invalid or illegal addressing mode combined with scaled-index"));
- return (0);
- }
- addr_modeP->scaled_mode = addr_modeP->mode; /* store the inferior
- mode */
- addr_modeP->mode = mode;
- addr_modeP->scaled_reg = j + 1;
- return (-1);
- }
+ as_warn (_("Syntax in scaled-indexed mode, use [Rn:m] where n=[0..7] m={b,w,d,q}"));
+ } /* Scaled index. */
+
+ if (recursive_level > 0)
+ {
+ as_warn (_("Scaled-indexed addressing mode combined with scaled-index"));
+ return 0;
+ }
+
+ addr_modeP->am_size += 1; /* scaled index byte */
+ j = str[strl - 4] - '0'; /* store temporary */
+ str[strl - 6] = '\000'; /* nullterminate for recursive call */
+ i = addr_mode (str, addr_modeP, 1);
+
+ if (!i || addr_modeP->mode == 20)
+ {
+ as_warn (_("Invalid or illegal addressing mode combined with scaled-index"));
+ return 0;
+ }
+
+ addr_modeP->scaled_mode = addr_modeP->mode; /* Store the inferior mode. */
+ addr_modeP->mode = mode;
+ addr_modeP->scaled_reg = j + 1;
+
+ return -1;
}
}
- addr_modeP->mode = DEFAULT; /* default to whatever */
+
+ addr_modeP->mode = DEFAULT; /* Default to whatever. */
addr_modeP->disp[0] = str;
- return (-1);
+
+ return -1;
}
/* ptr points at string addr_modeP points at struct with result This
@@ -642,160 +659,171 @@ addr_mode (operand, addr_modeP, recursive_level)
operand. When this is ready it parses the displacements for size
specifying suffixes and determines size of immediate mode via
ns32k-opcode. Also builds index bytes if needed. */
+
int
get_addr_mode (ptr, addr_modeP)
char *ptr;
addr_modeS *addr_modeP;
{
int tmp;
+
addr_mode (ptr, addr_modeP, 0);
+
if (addr_modeP->mode == DEFAULT || addr_modeP->scaled_mode == -1)
{
- /* resolve ambigious operands, this shouldn't be necessary if
+ /* Resolve ambigious operands, this shouldn't be necessary if
one uses standard NSC operand syntax. But the sequent
compiler doesn't!!! This finds a proper addressinging mode
- if it is implicitly stated. See ns32k-opcode.h */
- (void) evaluate_expr (&exprP, ptr); /* this call takes time Sigh! */
+ if it is implicitly stated. See ns32k-opcode.h. */
+ (void) evaluate_expr (&exprP, ptr); /* This call takes time Sigh! */
+
if (addr_modeP->mode == DEFAULT)
{
if (exprP.X_add_symbol || exprP.X_op_symbol)
- {
- addr_modeP->mode = desc->default_model; /* we have a label */
- }
+ addr_modeP->mode = desc->default_model; /* We have a label. */
else
- {
- addr_modeP->mode = desc->default_modec; /* we have a constant */
- }
+ addr_modeP->mode = desc->default_modec; /* We have a constant. */
}
else
{
if (exprP.X_add_symbol || exprP.X_op_symbol)
- {
- addr_modeP->scaled_mode = desc->default_model;
- }
+ addr_modeP->scaled_mode = desc->default_model;
else
- {
- addr_modeP->scaled_mode = desc->default_modec;
- }
+ addr_modeP->scaled_mode = desc->default_modec;
}
- /* must put this mess down in addr_mode to handle the scaled
- case better */
+
+ /* Must put this mess down in addr_mode to handle the scaled
+ case better. */
}
+
/* It appears as the sequent compiler wants an absolute when we have
a label without @. Constants becomes immediates besides the addr
case. Think it does so with local labels too, not optimum, pcrel
is better. When I have time I will make gas check this and
select pcrel when possible Actually that is trivial. */
if (tmp = addr_modeP->scaled_reg)
- { /* build indexbyte */
- tmp--; /* remember regnumber comes incremented for
- flagpurpose */
+ { /* Build indexbyte. */
+ tmp--; /* Remember regnumber comes incremented for
+ flagpurpose. */
tmp |= addr_modeP->scaled_mode << 3;
addr_modeP->index_byte = (char) tmp;
addr_modeP->am_size += 1;
}
+
if (disp_test[addr_modeP->mode])
- { /* there was a displacement, probe for length
- specifying suffix */
- {
- register char c;
- register char suffix;
- register char suffix_sub;
- register int i;
- register char *toP;
- register char *fromP;
-
- addr_modeP->pcrel = 0;
- if (disp_test[addr_modeP->mode])
- { /* there is a displacement */
- if (addr_modeP->mode == 27 || addr_modeP->scaled_mode == 27)
- { /* do we have pcrel. mode */
- addr_modeP->pcrel = 1;
- }
- addr_modeP->im_disp = 1;
- for (i = 0; i < 2; i++)
- {
- suffix_sub = suffix = 0;
- if (toP = addr_modeP->disp[i])
- { /* suffix of expression, the largest size
- rules */
- fromP = toP;
- while (c = *fromP++)
- {
- *toP++ = c;
- if (c == ':')
- {
- switch (*fromP)
- {
- case '\0':
- as_warn (_("Premature end of suffix -- Defaulting to d"));
- suffix = 4;
- continue;
- case 'b':
- suffix_sub = 1;
- break;
- case 'w':
- suffix_sub = 2;
- break;
- case 'd':
- suffix_sub = 4;
- break;
- default:
- as_warn (_("Bad suffix after ':' use {b|w|d} Defaulting to d"));
- suffix = 4;
- }
- fromP++;
- toP--; /* So we write over the ':' */
- if (suffix < suffix_sub)
- suffix = suffix_sub;
- }
- }
- *toP = '\0';/* terminate properly */
- addr_modeP->disp_suffix[i] = suffix;
- addr_modeP->am_size += suffix ? suffix : 4;
- }
- }
- }
- }
+ {
+ register char c;
+ register char suffix;
+ register char suffix_sub;
+ register int i;
+ register char *toP;
+ register char *fromP;
+
+ /* There was a displacement, probe for length specifying suffix. */
+ addr_modeP->pcrel = 0;
+
+ if (disp_test[addr_modeP->mode])
+ {
+ /* There is a displacement. */
+ if (addr_modeP->mode == 27 || addr_modeP->scaled_mode == 27)
+ /* Do we have pcrel. mode. */
+ addr_modeP->pcrel = 1;
+
+ addr_modeP->im_disp = 1;
+
+ for (i = 0; i < 2; i++)
+ {
+ suffix_sub = suffix = 0;
+
+ if (toP = addr_modeP->disp[i])
+ {
+ /* Suffix of expression, the largest size rules. */
+ fromP = toP;
+
+ while (c = *fromP++)
+ {
+ *toP++ = c;
+ if (c == ':')
+ {
+ switch (*fromP)
+ {
+ case '\0':
+ as_warn (_("Premature end of suffix -- Defaulting to d"));
+ suffix = 4;
+ continue;
+ case 'b':
+ suffix_sub = 1;
+ break;
+ case 'w':
+ suffix_sub = 2;
+ break;
+ case 'd':
+ suffix_sub = 4;
+ break;
+ default:
+ as_warn (_("Bad suffix after ':' use {b|w|d} Defaulting to d"));
+ suffix = 4;
+ }
+
+ fromP ++;
+ toP --; /* So we write over the ':' */
+
+ if (suffix < suffix_sub)
+ suffix = suffix_sub;
+ }
+ }
+
+ *toP = '\0'; /* Terminate properly. */
+ addr_modeP->disp_suffix[i] = suffix;
+ addr_modeP->am_size += suffix ? suffix : 4;
+ }
+ }
+ }
}
else
{
if (addr_modeP->mode == 20)
- { /* look in ns32k_opcode for size */
+ {
+ /* Look in ns32k_opcode for size. */
addr_modeP->disp_suffix[0] = addr_modeP->am_size = desc->im_size;
addr_modeP->im_disp = 0;
}
}
+
return addr_modeP->mode;
}
+/* Read an optionlist. */
-/* read an optionlist */
void
optlist (str, optionP, default_map)
- char *str; /* the string to extract options from */
- struct ns32k_option *optionP; /* how to search the string */
- unsigned long *default_map; /* default pattern and output */
+ char *str; /* The string to extract options from. */
+ struct ns32k_option *optionP; /* How to search the string. */
+ unsigned long *default_map; /* Default pattern and output. */
{
register int i, j, k, strlen1, strlen2;
register char *patternP, *strP;
+
strlen1 = strlen (str);
+
if (strlen1 < 1)
- {
- as_fatal (_("Very short instr to option, ie you can't do it on a NULLstr"));
- }
+ as_fatal (_("Very short instr to option, ie you can't do it on a NULLstr"));
+
for (i = 0; optionP[i].pattern != 0; i++)
{
strlen2 = strlen (optionP[i].pattern);
+
for (j = 0; j < strlen1; j++)
{
patternP = optionP[i].pattern;
strP = &str[j];
+
for (k = 0; k < strlen2; k++)
{
if (*(strP++) != *(patternP++))
break;
}
+
if (k == strlen2)
{ /* match */
*default_map |= optionP[i].or;
@@ -805,27 +833,31 @@ optlist (str, optionP, default_map)
}
}
-/* search struct for symbols
+/* Search struct for symbols.
This function is used to get the short integer form of reg names in
the instructions lmr, smr, lpr, spr return true if str is found in
- list */
+ list. */
int
list_search (str, optionP, default_map)
- char *str; /* the string to match */
- struct ns32k_option *optionP; /* list to search */
- unsigned long *default_map; /* default pattern and output */
+ char *str; /* The string to match. */
+ struct ns32k_option *optionP; /* List to search. */
+ unsigned long *default_map; /* Default pattern and output. */
{
register int i;
+
for (i = 0; optionP[i].pattern != 0; i++)
{
if (!strncmp (optionP[i].pattern, str, 20))
- { /* use strncmp to be safe */
+ {
+ /* Use strncmp to be safe. */
*default_map |= optionP[i].or;
*default_map &= optionP[i].and;
+
return -1;
}
}
+
as_warn (_("No such entry in list. (cpu/mmu register)"));
return 0;
}
@@ -847,8 +879,7 @@ evaluate_expr (resultP, ptr)
Operands are parsed in such an order that the opcode is updated from
its most significant bit, that is when the operand need to alter the
opcode.
- Be carefull not to put to objects in the same iif-slot.
- */
+ Be carefull not to put to objects in the same iif-slot. */
void
encode_operand (argc, argv, operandsP, suffixP, im_size, opcode_bit_ptr)
@@ -862,15 +893,18 @@ encode_operand (argc, argv, operandsP, suffixP, im_size, opcode_bit_ptr)
register int i, j;
char d;
int pcrel, tmp, b, loop, pcrel_adjust;
+
for (loop = 0; loop < argc; loop++)
{
- i = operandsP[loop << 1] - '1'; /* what operand are we supposed
- to work on */
+ /* What operand are we supposed to work on. */
+ i = operandsP[loop << 1] - '1';
if (i > 3)
as_fatal (_("Internal consistency error. check ns32k-opcode.h"));
+
pcrel = 0;
pcrel_adjust = 0;
tmp = 0;
+
switch ((d = operandsP[(loop << 1) + 1]))
{
case 'f': /* operand of sfsr turns out to be a nasty
@@ -886,16 +920,17 @@ encode_operand (argc, argv, operandsP, suffixP, im_size, opcode_bit_ptr)
case 'A': /* double-word gen-address-form ie no regs
allowed */
get_addr_mode (argv[i], &addr_modeP);
- if((addr_modeP.mode == 20) &&
- (d == 'I' || d == 'Z' || d == 'A')) {
- as_fatal(d == 'A'? _("Address of immediate operand"):
- _("Invalid immediate write operand."));
- }
+
+ if ((addr_modeP.mode == 20) &&
+ (d == 'I' || d == 'Z' || d == 'A'))
+ as_fatal (d == 'A'? _("Address of immediate operand"):
+ _("Invalid immediate write operand."));
if (opcode_bit_ptr == desc->opcode_size)
b = 4;
else
b = 6;
+
for (j = b; j < (b + 2); j++)
{
if (addr_modeP.disp[j - b])
@@ -915,8 +950,10 @@ encode_operand (argc, argv, operandsP, suffixP, im_size, opcode_bit_ptr)
0);
}
}
+
opcode_bit_ptr -= 5;
iif.iifP[1].object |= ((long) addr_modeP.mode) << opcode_bit_ptr;
+
if (addr_modeP.scaled_reg)
{
j = b / 2;
@@ -924,6 +961,7 @@ encode_operand (argc, argv, operandsP, suffixP, im_size, opcode_bit_ptr)
0, 0, 0, 0, 0, NULL, -1, 0);
}
break;
+
case 'b': /* multiple instruction disp */
freeptr++; /* OVE:this is an useful hack */
sprintf (freeptr, "((%s-1)*%d)\000", argv[i], desc->im_size);
@@ -1025,9 +1063,9 @@ encode_operand (argc, argv, operandsP, suffixP, im_size, opcode_bit_ptr)
out: internal structure of instruction
that has been prepared for direct conversion to fragment(s) and
fixes in a systematical fashion
- Return-value = recursive_level
- */
-/* build iif of one assembly text line */
+ Return-value = recursive_level. */
+/* Build iif of one assembly text line. */
+
int
parse (line, recursive_level)
char *line;
@@ -1037,53 +1075,64 @@ parse (line, recursive_level)
register int i;
int argc, arg_type;
char sqr, sep;
- char suffix[MAX_ARGS], *argv[MAX_ARGS]; /* no more than 4 operands */
+ char suffix[MAX_ARGS], *argv[MAX_ARGS]; /* No more than 4 operands. */
+
if (recursive_level <= 0)
- { /* called from md_assemble */
- for (lineptr = line; (*lineptr) != '\0' && (*lineptr) != ' '; lineptr++);
+ {
+ /* Called from md_assemble. */
+ for (lineptr = line; (*lineptr) != '\0' && (*lineptr) != ' '; lineptr++)
+ continue;
+
c = *lineptr;
*lineptr = '\0';
+
if (!(desc = (struct ns32k_opcode *) hash_find (inst_hash_handle, line)))
- {
- as_fatal (_("No such opcode"));
- }
+ as_fatal (_("No such opcode"));
+
*lineptr = c;
}
else
{
lineptr = line;
}
+
argc = 0;
+
if (*desc->operands)
{
if (*lineptr++ != '\0')
{
sqr = '[';
sep = ',';
+
while (*lineptr != '\0')
{
if (desc->operands[argc << 1])
{
suffix[argc] = 0;
arg_type = desc->operands[(argc << 1) + 1];
+
switch (arg_type)
{
case 'd':
case 'b':
case 'p':
- case 'H': /* the operand is supposed to be a
- displacement */
+ case 'H':
+ /* The operand is supposed to be a displacement. */
/* Hackwarning: do not forget to update the 4
- cases above when editing ns32k-opcode.h */
+ cases above when editing ns32k-opcode.h. */
suffix_separator = ':';
break;
default:
- suffix_separator = '\255'; /* if this char occurs we
- loose */
+ /* If this char occurs we loose. */
+ suffix_separator = '\255';
+ break;
}
+
suffix[argc] = 0; /* 0 when no ':' is encountered */
argv[argc] = freeptr;
*freeptr = '\0';
+
while ((c = *lineptr) != '\0' && c != sep)
{
if (c == sqr)
@@ -1099,8 +1148,10 @@ parse (line, recursive_level)
sep = ',';
}
}
+
if (c == suffix_separator)
- { /* ':' - label/suffix separator */
+ {
+ /* ':' - label/suffix separator. */
switch (lineptr[1])
{
case 'b':
@@ -1120,17 +1171,23 @@ parse (line, recursive_level)
lineptr += 1;
continue;
}
+ break;
}
+
lineptr += 2;
continue;
}
+
*freeptr++ = c;
lineptr++;
}
+
*freeptr++ = '\0';
argc += 1;
+
if (*lineptr == '\0')
continue;
+
lineptr += 1;
}
else
@@ -1140,31 +1197,31 @@ parse (line, recursive_level)
}
}
}
+
if (argc != strlen (desc->operands) / 2)
{
if (strlen (desc->default_args))
- { /* we can apply default, dont goof */
+ {
+ /* We can apply default, don't goof. */
if (parse (desc->default_args, 1) != 1)
- { /* check error in default */
- as_fatal (_("Wrong numbers of operands in default, check ns32k-opcodes.h"));
- }
+ /* Check error in default. */
+ as_fatal (_("Wrong numbers of operands in default, check ns32k-opcodes.h"));
}
else
{
as_fatal (_("Wrong number of operands"));
}
-
}
+
for (i = 0; i < IIF_ENTRIES; i++)
- {
- iif.iifP[i].type = 0; /* mark all entries as void*/
- }
+ /* Mark all entries as void. */
+ iif.iifP[i].type = 0;
- /* build opcode iif-entry */
+ /* Build opcode iif-entry. */
iif.instr_size = desc->opcode_size / 8;
IIF (1, 1, iif.instr_size, desc->opcode_seed, 0, 0, 0, 0, 0, 0, -1, 0);
- /* this call encodes operands to iif format */
+ /* This call encodes operands to iif format. */
if (argc)
{
encode_operand (argc,
@@ -1177,31 +1234,29 @@ parse (line, recursive_level)
return recursive_level;
}
-
/* Convert iif to fragments. From this point we start to dribble with
- * functions in other files than this one.(Except hash.c) So, if it's
- * possible to make an iif for an other CPU, you don't need to know
- * what frags, relax, obstacks, etc is in order to port this
- * assembler. You only need to know if it's possible to reduce your
- * cpu-instruction to iif-format (takes some work) and adopt the other
- * md_? parts according to given instructions Note that iif was
- * invented for the clean ns32k`s architecure.
- */
+ functions in other files than this one.(Except hash.c) So, if it's
+ possible to make an iif for an other CPU, you don't need to know
+ what frags, relax, obstacks, etc is in order to port this
+ assembler. You only need to know if it's possible to reduce your
+ cpu-instruction to iif-format (takes some work) and adopt the other
+ md_? parts according to given instructions Note that iif was
+ invented for the clean ns32k`s architecure. */
/* GAS for the ns32k has a problem. PC relative displacements are
- * relative to the address of the opcode, not the address of the
- * operand. We used to keep track of the offset between the operand
- * and the opcode in pcrel_adjust for each frag and each fix. However,
- * we get into trouble where there are two or more pc-relative
- * operands and the size of the first one can't be determined. Then in
- * the relax phase, the size of the first operand will change and
- * pcrel_adjust will no longer be correct. The current solution is
- * keep a pointer to the frag with the opcode in it and the offset in
- * that frag for each frag and each fix. Then, when needed, we can
- * always figure out how far it is between the opcode and the pcrel
- * object. See also md_pcrel_adjust and md_fix_pcrel_adjust. For
- * objects not part of an instruction, the pointer to the opcode frag
- * is always zero. */
+ relative to the address of the opcode, not the address of the
+ operand. We used to keep track of the offset between the operand
+ and the opcode in pcrel_adjust for each frag and each fix. However,
+ we get into trouble where there are two or more pc-relative
+ operands and the size of the first one can't be determined. Then in
+ the relax phase, the size of the first operand will change and
+ pcrel_adjust will no longer be correct. The current solution is
+ keep a pointer to the frag with the opcode in it and the offset in
+ that frag for each frag and each fix. Then, when needed, we can
+ always figure out how far it is between the opcode and the pcrel
+ object. See also md_pcrel_adjust and md_fix_pcrel_adjust. For
+ objects not part of an instruction, the pointer to the opcode frag
+ is always zero. */
void
convert_iif ()
@@ -1226,26 +1281,30 @@ convert_iif ()
for (i = 0; i < IIF_ENTRIES; i++)
{
if (type = iif.iifP[i].type)
- { /* the object exist, so handle it */
+ {
+ /* The object exist, so handle it. */
switch (size = iif.iifP[i].size)
{
case 42:
- size = 0; /* it's a bitfix that operates on an existing
- object*/
+ size = 0;
+ /* It's a bitfix that operates on an existing object. */
if (iif.iifP[i].bit_fixP->fx_bit_base)
- { /* expand fx_bit_base to point at opcode */
- iif.iifP[i].bit_fixP->fx_bit_base = (long) inst_opcode;
- }
+ /* Expand fx_bit_base to point at opcode. */
+ iif.iifP[i].bit_fixP->fx_bit_base = (long) inst_opcode;
+ /* Fall through. */
+
case 8: /* bignum or doublefloat */
case 1:
case 2:
case 3:
- case 4: /* the final size in objectmemory is known */
+ case 4:
+ /* The final size in objectmemory is known. */
memP = frag_more(size);
j = iif.iifP[i].bit_fixP;
+
switch (type)
{
- case 1: /* the object is pure binary */
+ case 1: /* The object is pure binary. */
if (j || iif.iifP[i].pcrel)
{
fix_new_ns32k (frag_now,
@@ -1260,7 +1319,8 @@ convert_iif ()
inst_frag, inst_offset);
}
else
- { /* good, just put them bytes out */
+ {
+ /* Good, just put them bytes out. */
switch (iif.iifP[i].im_disp)
{
case 0:
@@ -1274,21 +1334,24 @@ convert_iif ()
}
}
break;
+
case 2:
- /* the object is a pointer at an expression, so
+ /* The object is a pointer at an expression, so
unpack it, note that bignums may result from the
- expression */
+ expression. */
evaluate_expr (&exprP, (char *) iif.iifP[i].object);
if (exprP.X_op == O_big || size == 8)
{
if ((k = exprP.X_add_number) > 0)
{
- /* we have a bignum ie a quad. This can only
- happens in a long suffixed instruction */
+ /* We have a bignum ie a quad. This can only
+ happens in a long suffixed instruction. */
if (k * 2 > size)
as_warn (_("Bignum too big for long"));
+
if (k == 3)
memP += 2;
+
for (l = 0; k > 0; k--, l += 2)
{
md_number_to_chars (memP + l,
@@ -1297,7 +1360,8 @@ convert_iif ()
}
}
else
- { /* flonum */
+ {
+ /* flonum. */
LITTLENUM_TYPE words[4];
switch (size)
@@ -1337,7 +1401,7 @@ convert_iif ()
{
/* The expression was undefined due to an
undefined label. Create a fix so we can fix
- the object later. */
+ the object later. */
exprP.X_add_number += iif.iifP[i].object_adjust;
fix_new_ns32k_exp (frag_now,
(long) (memP - frag_now->fr_literal),
@@ -1351,7 +1415,7 @@ convert_iif ()
}
else
{
- /* good, just put them bytes out */
+ /* Good, just put them bytes out. */
switch (iif.iifP[i].im_disp)
{
case 0:
@@ -1369,19 +1433,21 @@ convert_iif ()
as_fatal (_("Internal logic error in iif.iifP[n].type"));
}
break;
+
case 0:
- /* To bad, the object may be undefined as far as its
+ /* Too bad, the object may be undefined as far as its
final nsize in object memory is concerned. The size
of the object in objectmemory is not explicitly
given. If the object is defined its length can be
- determined and a fix can replace the frag. */
+ determined and a fix can replace the frag. */
{
evaluate_expr (&exprP, (char *) iif.iifP[i].object);
+
if ((exprP.X_add_symbol || exprP.X_op_symbol) &&
!iif.iifP[i].pcrel)
{
/* Size is unknown until link time so have to
- allow 4 bytes. */
+ allow 4 bytes. */
size = 4;
memP = frag_more(size);
fix_new_ns32k_exp (frag_now,
@@ -1397,38 +1463,39 @@ convert_iif ()
}
if (exprP.X_add_symbol || exprP.X_op_symbol)
- { /* frag it */
+ {
+ /* Frag it. */
if (exprP.X_op_symbol)
- { /* We cant relax this case */
+ {
+ /* We cant relax this case. */
as_fatal (_("Can't relax difference"));
}
else
{
-
- /* Size is not important. This gets fixed by relax,
- * but we assume 0 in what follows
- */
- memP = frag_more(4); /* Max size */
+ /* Size is not important. This gets fixed by
+ relax, but we assume 0 in what follows. */
+ memP = frag_more(4); /* Max size. */
size = 0;
{
fragS *old_frag = frag_now;
frag_variant (rs_machine_dependent,
- 4, /* Max size */
- 0, /* size */
- IND (BRANCH, UNDEF), /* expecting the worst */
+ 4, /* Max size. */
+ 0, /* Size. */
+ IND (BRANCH, UNDEF), /* Expecting
+ the worst. */
exprP.X_add_symbol,
exprP.X_add_number,
inst_opcode);
- frag_opcode_frag(old_frag) = inst_frag;
- frag_opcode_offset(old_frag) = inst_offset;
- frag_bsr(old_frag) = iif.iifP[i].bsr;
+ frag_opcode_frag (old_frag) = inst_frag;
+ frag_opcode_offset (old_frag) = inst_offset;
+ frag_bsr (old_frag) = iif.iifP[i].bsr;
}
}
}
else
{
- /* This duplicates code in md_number_to_disp */
+ /* This duplicates code in md_number_to_disp. */
if (-64 <= exprP.X_add_number && exprP.X_add_number <= 63)
{
size = 1;
@@ -1442,8 +1509,8 @@ convert_iif ()
}
else
{
- if (-0x20000000<=exprP.X_add_number &&
- exprP.X_add_number<=0x1fffffff)
+ if (-0x20000000 <= exprP.X_add_number
+ && exprP.X_add_number<=0x1fffffff)
{
size = 4;
}
@@ -1454,11 +1521,13 @@ convert_iif ()
}
}
}
- memP = frag_more(size);
+
+ memP = frag_more (size);
md_number_to_disp (memP, exprP.X_add_number, size);
}
}
break;
+
default:
as_fatal (_("Internal logic error in iif.iifP[].type"));
}
@@ -1467,12 +1536,13 @@ convert_iif ()
}
#ifdef BFD_ASSEMBLER
-/* This functionality should really be in the bfd library */
+/* This functionality should really be in the bfd library. */
static bfd_reloc_code_real_type
reloc (int size, int pcrel, int type)
{
int length, index;
- bfd_reloc_code_real_type relocs[] = {
+ bfd_reloc_code_real_type relocs[] =
+ {
BFD_RELOC_NS32K_IMM_8,
BFD_RELOC_NS32K_IMM_16,
BFD_RELOC_NS32K_IMM_32,
@@ -1480,7 +1550,7 @@ reloc (int size, int pcrel, int type)
BFD_RELOC_NS32K_IMM_16_PCREL,
BFD_RELOC_NS32K_IMM_32_PCREL,
- /* ns32k displacements */
+ /* ns32k displacements. */
BFD_RELOC_NS32K_DISP_8,
BFD_RELOC_NS32K_DISP_16,
BFD_RELOC_NS32K_DISP_32,
@@ -1488,14 +1558,15 @@ reloc (int size, int pcrel, int type)
BFD_RELOC_NS32K_DISP_16_PCREL,
BFD_RELOC_NS32K_DISP_32_PCREL,
- /* Normal 2's complement */
+ /* Normal 2's complement. */
BFD_RELOC_8,
BFD_RELOC_16,
BFD_RELOC_32,
BFD_RELOC_8_PCREL,
BFD_RELOC_16_PCREL,
BFD_RELOC_32_PCREL
- };
+ };
+
switch (size)
{
case 1:
@@ -1511,19 +1582,22 @@ reloc (int size, int pcrel, int type)
length = -1;
break;
}
+
index = length + 3 * pcrel + 6 * type;
- if (index >= 0 && index < sizeof(relocs)/sizeof(relocs[0]))
+
+ if (index >= 0 && index < sizeof (relocs) / sizeof (relocs[0]))
return relocs[index];
+
if (pcrel)
as_bad (_("Can not do %d byte pc-relative relocation for storage type %d"),
size, type);
else
as_bad (_("Can not do %d byte relocation for storage type %d"),
size, type);
+
return BFD_RELOC_NONE;
}
-
#endif
void
@@ -1531,39 +1605,40 @@ md_assemble (line)
char *line;
{
freeptr = freeptr_static;
- parse (line, 0); /* explode line to more fix form in iif */
- convert_iif (); /* convert iif to frags, fix's etc */
+ parse (line, 0); /* Explode line to more fix form in iif. */
+ convert_iif (); /* Convert iif to frags, fix's etc. */
#ifdef SHOW_NUM
printf (" \t\t\t%s\n", line);
#endif
}
-
void
md_begin ()
{
- /* build a hashtable of the instructions */
+ /* Build a hashtable of the instructions. */
const struct ns32k_opcode *ptr;
const char *stat;
inst_hash_handle = hash_new ();
+
for (ptr = ns32k_opcodes; ptr < endop; ptr++)
{
if ((stat = hash_insert (inst_hash_handle, ptr->name, (char *) ptr)))
- {
- as_fatal (_("Can't hash %s: %s"), ptr->name, stat); /*fatal*/
- }
+ /* Fatal. */
+ as_fatal (_("Can't hash %s: %s"), ptr->name, stat);
}
- freeptr_static = (char *) malloc (PRIVATE_SIZE); /* some private space
- please! */
+
+ /* Some private space please! */
+ freeptr_static = (char *) malloc (PRIVATE_SIZE);
}
-/* Must be equal to MAX_PRECISON in atof-ieee.c */
+/* Must be equal to MAX_PRECISON in atof-ieee.c. */
#define MAX_LITTLENUMS 6
/* Turn the string pointed to by litP into a floating point constant
- of type type, and emit the appropriate bytes. The number of
- LITTLENUMS emitted is stored in *sizeP . An error message is
+ of type TYPE, and emit the appropriate bytes. The number of
+ LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
+
char *
md_atof (type, litP, sizeP)
char type;
@@ -1588,20 +1663,23 @@ md_atof (type, litP, sizeP)
*sizeP = 0;
return _("Bad call to MD_ATOF()");
}
+
t = atof_ieee (input_line_pointer, type, words);
if (t)
input_line_pointer = t;
*sizeP = prec * sizeof (LITTLENUM_TYPE);
+
for (wordP = words + prec; prec--;)
{
md_number_to_chars (litP, (long) (*--wordP), sizeof (LITTLENUM_TYPE));
litP += sizeof (LITTLENUM_TYPE);
}
+
return 0;
}
-/* Convert number to chars in correct order */
+/* Convert number to chars in correct order. */
void
md_number_to_chars (buf, value, nbytes)
@@ -1612,7 +1690,6 @@ md_number_to_chars (buf, value, nbytes)
number_to_chars_littleendian (buf, value, nbytes);
}
-
/* This is a variant of md_numbers_to_chars. The reason for its'
existence is the fact that ns32k uses Huffman coded
displacements. This implies that the bit order is reversed in
@@ -1624,6 +1701,7 @@ md_number_to_chars (buf, value, nbytes)
11xxxxxx xxxxxxxx xxxxxxxx xxxxxxxx double word
This must be taken care of and we do it here! */
+
static void
md_number_to_disp (buf, val, n)
char *buf;
@@ -1730,9 +1808,8 @@ md_number_to_imm (buf, val, n)
}
}
-
-/* fast bitfiddling support */
-/* mask used to zero bitfield before oring in the true field */
+/* Fast bitfiddling support. */
+/* Mask used to zero bitfield before oring in the true field. */
static unsigned long l_mask[] =
{
@@ -1761,8 +1838,7 @@ static unsigned long r_mask[] =
This routine is written for modification of the first 4 bytes pointed
to by buf, to yield speed.
The ifdef stuff is for selection between a ns32k-dependent routine
- and a general version. (My advice: use the general version!)
- */
+ and a general version. (My advice: use the general version!). */
static void
md_number_to_field (buf, val, field_ptr)
@@ -1782,31 +1858,26 @@ md_number_to_field (buf, val, field_ptr)
{
#ifdef ENDIAN
if (field_ptr->fx_bit_base)
- { /* override buf */
- mem_ptr = (unsigned long *) field_ptr->fx_bit_base;
- }
+ /* Override buf. */
+ mem_ptr = (unsigned long *) field_ptr->fx_bit_base;
else
- {
- mem_ptr = (unsigned long *) buf;
- }
+ mem_ptr = (unsigned long *) buf;
+
mem_ptr = ((unsigned long *)
((char *) mem_ptr + field_ptr->fx_bit_base_adj));
#else
if (field_ptr->fx_bit_base)
- { /* override buf */
- mem_ptr = (char *) field_ptr->fx_bit_base;
- }
+ mem_ptr = (char *) field_ptr->fx_bit_base;
else
- {
- mem_ptr = buf;
- }
+ mem_ptr = buf;
+
mem_ptr += field_ptr->fx_bit_base_adj;
#endif
-#ifdef ENDIAN /* we have a nice ns32k machine with lowbyte
- at low-physical mem */
+#ifdef ENDIAN
+ /* We have a nice ns32k machine with lowbyte at low-physical mem. */
object = *mem_ptr; /* get some bytes */
#else /* OVE Goof! the machine is a m68k or dito */
- /* That takes more byte fiddling */
+ /* That takes more byte fiddling. */
object = 0;
object |= mem_ptr[3] & 0xff;
object <<= 8;
@@ -1840,30 +1911,40 @@ md_number_to_field (buf, val, field_ptr)
}
}
-int md_pcrel_adjust (fragS *fragP)
+int
+md_pcrel_adjust (fragP)
+ fragS *fragP;
{
fragS *opcode_frag;
addressT opcode_address;
unsigned int offset;
- opcode_frag = frag_opcode_frag(fragP);
+
+ opcode_frag = frag_opcode_frag (fragP);
if (opcode_frag == 0)
return 0;
- offset = frag_opcode_offset(fragP);
+
+ offset = frag_opcode_offset (fragP);
opcode_address = offset + opcode_frag->fr_address;
+
return fragP->fr_address + fragP->fr_fix - opcode_address;
}
-int md_fix_pcrel_adjust (fixS *fixP)
+int
+md_fix_pcrel_adjust (fixP)
+ fixS *fixP;
{
fragS *fragP = fixP->fx_frag;
fragS *opcode_frag;
addressT opcode_address;
unsigned int offset;
- opcode_frag = fix_opcode_frag(fixP);
+
+ opcode_frag = fix_opcode_frag (fixP);
if (opcode_frag == 0)
return 0;
- offset = fix_opcode_offset(fixP);
+
+ offset = fix_opcode_offset (fixP);
opcode_address = offset + opcode_frag->fr_address;
+
return fixP->fx_where + fixP->fx_frag->fr_address - opcode_address;
}
@@ -1893,28 +1974,27 @@ md_apply_fix (fixP, val)
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
- if (fix_bit_fixP(fixP))
- { /* Bitfields to fix, sigh */
- md_number_to_field (buf, val, fix_bit_fixP(fixP));
+ if (fix_bit_fixP (fixP))
+ { /* Bitfields to fix, sigh. */
+ md_number_to_field (buf, val, fix_bit_fixP (fixP));
}
else
- switch (fix_im_disp(fixP))
+ switch (fix_im_disp (fixP))
{
-
- case 0: /* Immediate field */
+ case 0: /* Immediate field. */
md_number_to_imm (buf, val, fixP->fx_size);
break;
- case 1: /* Displacement field */
+ case 1: /* Displacement field. */
/* Calculate offset */
{
- md_number_to_disp (buf,
- (fixP->fx_pcrel ? val + md_fix_pcrel_adjust(fixP)
- : val), fixP->fx_size);
+ md_number_to_disp (buf,
+ (fixP->fx_pcrel ? val + md_fix_pcrel_adjust (fixP)
+ : val), fixP->fx_size);
}
break;
- case 2: /* Pointer in a data object */
+ case 2: /* Pointer in a data object. */
md_number_to_chars (buf, val, fixP->fx_size);
break;
}
@@ -1962,18 +2042,19 @@ md_convert_frag (abfd, sec, fragP)
break;
}
- if(ext == 0)
+ if (ext == 0)
return;
know (fragP->fr_symbol);
object_address = fragP->fr_fix + fragP->fr_address;
+
/* The displacement of the address, from current location. */
disp = (S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset) - object_address;
#ifdef BFD_ASSEMBLER
disp += symbol_get_frag (fragP->fr_symbol)->fr_address;
#endif
- disp += md_pcrel_adjust(fragP);
+ disp += md_pcrel_adjust (fragP);
md_number_to_disp (buffer_address, (long) disp, (int) ext);
fragP->fr_fix += ext;
@@ -1981,27 +2062,19 @@ md_convert_frag (abfd, sec, fragP)
/* This function returns the estimated size a variable object will occupy,
one can say that we tries to guess the size of the objects before we
- actually know it */
+ actually know it. */
int
md_estimate_size_before_relax (fragP, segment)
register fragS *fragP;
segT segment;
{
- int old_fix;
- old_fix = fragP->fr_fix;
- switch (fragP->fr_subtype)
+ if (fragP->fr_subtype == IND (BRANCH, UNDEF))
{
- case IND (BRANCH, UNDEF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment)
- {
- /* the symbol has been assigned a value */
- fragP->fr_subtype = IND (BRANCH, BYTE);
- }
- else
+ if (S_GET_SEGMENT (fragP->fr_symbol) != segment)
{
- /* we don't relax symbols defined in an other segment the
- thing to do is to assume the object will occupy 4 bytes */
+ /* We don't relax symbols defined in another segment. The
+ thing to do is to assume the object will occupy 4 bytes. */
fix_new_ns32k (fragP,
(int) (fragP->fr_fix),
4,
@@ -2011,25 +2084,31 @@ md_estimate_size_before_relax (fragP, segment)
1,
0,
frag_bsr(fragP), /*sequent hack */
- frag_opcode_frag(fragP),
- frag_opcode_offset(fragP));
+ frag_opcode_frag (fragP),
+ frag_opcode_offset (fragP));
fragP->fr_fix += 4;
- /* fragP->fr_opcode[1]=0xff; */
+#if 0
+ fragP->fr_opcode[1] = 0xff;
+#endif
frag_wane (fragP);
- break;
+ return 4;
}
- case IND (BRANCH, BYTE):
- fragP->fr_var += 1;
- break;
- default:
- break;
+
+ /* Relaxable case. Set up the initial guess for the variable
+ part of the frag. */
+ fragP->fr_subtype = IND (BRANCH, BYTE);
}
- return fragP->fr_var + fragP->fr_fix - old_fix;
+
+ if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0]))
+ abort ();
+
+ /* Return the size of the variable part of the frag. */
+ return md_relax_table[fragP->fr_subtype].rlx_length;
}
int md_short_jump_size = 3;
int md_long_jump_size = 5;
-const int md_reloc_size = 8; /* Size of relocation record */
+const int md_reloc_size = 8; /* Size of relocation record. */
void
md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
@@ -2060,10 +2139,13 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
}
CONST char *md_shortopts = "m:";
-struct option md_longopts[] = {
+
+struct option md_longopts[] =
+{
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -2101,19 +2183,16 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, _("\
+ fprintf (stream, _("\
NS32K options:\n\
-m32032 | -m32532 select variant of NS32K architecture\n"));
}
-
-/*
- * bit_fix_new()
- *
- * Create a bit_fixS in obstack 'notes'.
- * This struct is used to profile the normal fix. If the bit_fixP is a
- * valid pointer (not NULL) the bit_fix data will be used to format the fix.
- */
+/* Create a bit_fixS in obstack 'notes'.
+ This struct is used to profile the normal fix. If the bit_fixP is a
+ valid pointer (not NULL) the bit_fix data will be used to format
+ the fix. */
+
bit_fixS *
bit_fix_new (size, offset, min, max, add, base_type, base_adj)
char size; /* Length of bitfield */
@@ -2144,10 +2223,10 @@ fix_new_ns32k (frag, where, size, add_symbol, offset, pcrel,
im_disp, bit_fixP, bsr, opcode_frag, opcode_offset)
fragS *frag; /* Which frag? */
int where; /* Where in that frag? */
- int size; /* 1, 2 or 4 usually. */
- symbolS *add_symbol; /* X_add_symbol. */
- long offset; /* X_add_number. */
- int pcrel; /* TRUE if PC-relative relocation. */
+ int size; /* 1, 2 or 4 usually. */
+ symbolS *add_symbol; /* X_add_symbol. */
+ long offset; /* X_add_number. */
+ int pcrel; /* TRUE if PC-relative relocation. */
char im_disp; /* true if the value to write is a
displacement */
bit_fixS *bit_fixP; /* pointer at struct of bit_fix's, ignored if
@@ -2156,32 +2235,31 @@ fix_new_ns32k (frag, where, size, add_symbol, offset, pcrel,
a bsr */
fragS *opcode_frag;
unsigned int opcode_offset;
-
{
fixS *fixP = fix_new (frag, where, size, add_symbol,
offset, pcrel,
#ifdef BFD_ASSEMBLER
- bit_fixP? NO_RELOC: reloc(size, pcrel, im_disp)
+ bit_fixP ? NO_RELOC : reloc (size, pcrel, im_disp)
#else
NO_RELOC
#endif
);
- fix_opcode_frag(fixP) = opcode_frag;
- fix_opcode_offset(fixP) = opcode_offset;
- fix_im_disp(fixP) = im_disp;
- fix_bsr(fixP) = bsr;
- fix_bit_fixP(fixP) = bit_fixP;
-} /* fix_new_ns32k() */
+ fix_opcode_frag (fixP) = opcode_frag;
+ fix_opcode_offset (fixP) = opcode_offset;
+ fix_im_disp (fixP) = im_disp;
+ fix_bsr (fixP) = bsr;
+ fix_bit_fixP (fixP) = bit_fixP;
+}
void
fix_new_ns32k_exp (frag, where, size, exp, pcrel,
im_disp, bit_fixP, bsr, opcode_frag, opcode_offset)
fragS *frag; /* Which frag? */
int where; /* Where in that frag? */
- int size; /* 1, 2 or 4 usually. */
- expressionS *exp; /* Expression. */
- int pcrel; /* TRUE if PC-relative relocation. */
+ int size; /* 1, 2 or 4 usually. */
+ expressionS *exp; /* Expression. */
+ int pcrel; /* TRUE if PC-relative relocation. */
char im_disp; /* true if the value to write is a
displacement */
bit_fixS *bit_fixP; /* pointer at struct of bit_fix's, ignored if
@@ -2193,18 +2271,18 @@ fix_new_ns32k_exp (frag, where, size, exp, pcrel,
{
fixS *fixP = fix_new_exp (frag, where, size, exp, pcrel,
#ifdef BFD_ASSEMBLER
- bit_fixP? NO_RELOC: reloc(size, pcrel, im_disp)
+ bit_fixP ? NO_RELOC : reloc (size, pcrel, im_disp)
#else
NO_RELOC
#endif
);
- fix_opcode_frag(fixP) = opcode_frag;
- fix_opcode_offset(fixP) = opcode_offset;
- fix_im_disp(fixP) = im_disp;
- fix_bsr(fixP) = bsr;
- fix_bit_fixP(fixP) = bit_fixP;
-} /* fix_new_ns32k() */
+ fix_opcode_frag (fixP) = opcode_frag;
+ fix_opcode_offset (fixP) = opcode_offset;
+ fix_im_disp (fixP) = im_disp;
+ fix_bsr (fixP) = bsr;
+ fix_bit_fixP (fixP) = bit_fixP;
+}
/* This is TC_CONS_FIX_NEW, called by emit_expr in read.c. */
@@ -2212,8 +2290,8 @@ void
cons_fix_new_ns32k (frag, where, size, exp)
fragS *frag; /* Which frag? */
int where; /* Where in that frag? */
- int size; /* 1, 2 or 4 usually. */
- expressionS *exp; /* Expression. */
+ int size; /* 1, 2 or 4 usually. */
+ expressionS *exp; /* Expression. */
{
fix_new_ns32k_exp (frag, where, size, exp,
0, 2, 0, 0, 0, 0);
@@ -2229,16 +2307,18 @@ md_undefined_symbol (name)
}
/* Round up a section size to the appropriate boundary. */
+
valueT
md_section_align (segment, size)
segT segment;
valueT size;
{
- return size; /* Byte alignment is fine */
+ return size; /* Byte alignment is fine. */
}
/* Exactly what point is a PC-relative offset relative TO? On the
- ns32k, they're relative to the start of the instruction. */
+ ns32k, they're relative to the start of the instruction. */
+
long
md_pcrel_from (fixP)
fixS *fixP;
@@ -2246,8 +2326,8 @@ md_pcrel_from (fixP)
long res;
res = fixP->fx_where + fixP->fx_frag->fr_address;
#ifdef SEQUENT_COMPATABILITY
- if (frag_bsr(fixP->fx_frag))
- res += 0x12 /* FOO Kludge alert! */
+ if (frag_bsr (fixP->fx_frag))
+ res += 0x12 /* FOO Kludge alert! */
#endif
return res;
}
@@ -2262,7 +2342,7 @@ tc_gen_reloc (section, fixp)
arelent *rel;
bfd_reloc_code_real_type code;
- code = reloc(fixp->fx_size, fixp->fx_pcrel, fix_im_disp(fixp));
+ code = reloc (fixp->fx_size, fixp->fx_pcrel, fix_im_disp (fixp));
rel = (arelent *) xmalloc (sizeof (arelent));
rel->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
@@ -2296,12 +2376,10 @@ cons_fix_new_ns32k (where, fixP, segment_address_in_file)
struct fix *fixP;
relax_addressT segment_address_in_file;
{
- /*
- * In: length of relocation (or of address) in chars: 1, 2 or 4.
- * Out: GNU LD relocation length code: 0, 1, or 2.
- */
+ /* In: Length of relocation (or of address) in chars: 1, 2 or 4.
+ Out: GNU LD relocation length code: 0, 1, or 2. */
- static unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2};
+ static unsigned char nbytes_r_length[] = { 42, 0, 1, 42, 2 };
long r_symbolnum;
know (fixP->fx_addsy != NULL);
@@ -2319,12 +2397,10 @@ cons_fix_new_ns32k (where, fixP, segment_address_in_file)
| (long) (fixP->fx_pcrel << 24)
| (long) (nbytes_r_length[fixP->fx_size] << 25)
| (long) ((!S_IS_DEFINED (fixP->fx_addsy)) << 27)
- | (long) (fix_bsr(fixP) << 28)
- | (long) (fix_im_disp(fixP) << 29)),
+ | (long) (fix_bsr (fixP) << 28)
+ | (long) (fix_im_disp (fixP) << 29)),
4);
}
#endif /* OBJ_AOUT */
#endif /* BFD_ASSMEBLER */
-
-/* end of tc-ns32k.c */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-ns32k.h b/gnu/usr.bin/binutils/gas/config/tc-ns32k.h
index 69c86ecdf5c..258afd0857f 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-ns32k.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-ns32k.h
@@ -1,5 +1,6 @@
/* tc-ns32k.h -- Opcode table for National Semi 32k processor
- Copyright (C) 1987, 92, 93, 94, 95, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1997, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -72,7 +73,6 @@ extern void fix_new_ns32k_exp PARAMS((fragS *frag,
fragS *opcode_frag,
unsigned int opcode_offset));
-
extern void fix_new_ns32k PARAMS ((fragS *frag,
int where,
int size,
@@ -112,7 +112,7 @@ struct { \
frag_opcode_offset (X) = 0; \
frag_bsr (X) = 0; \
} \
- while(0)
+ while (0)
/* Accessor macros for things which may move around */
#define frag_opcode_frag(X) (X)->tc_frag_data.fr_opcode_fragP
@@ -142,14 +142,14 @@ struct \
fix_opcode_offset(X) = 0; \
fix_bsr(X) = 0; \
} \
- while(0)
+ while (0)
#define TC_FIX_DATA_PRINT(FILE, FIXP) \
do \
{ \
- fprintf((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \
+ fprintf ((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \
(unsigned long) fix_opcode_frag (FIXP), \
fix_opcode_offset (FIXP), \
fix_bsr (FIXP)); \
} \
- while(0)
+ while (0)
diff --git a/gnu/usr.bin/binutils/gas/config/tc-ppc.c b/gnu/usr.bin/binutils/gas/config/tc-ppc.c
index 365a535a289..a893209cd51 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-ppc.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-ppc.c
@@ -1,5 +1,5 @@
/* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000)
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#include <stdio.h>
#include <ctype.h>
@@ -29,6 +29,7 @@
#ifdef OBJ_ELF
#include "elf/ppc.h"
+#include "dwarf2dbg.h"
#endif
#ifdef TE_PE
@@ -86,6 +87,7 @@ static void ppc_stabx PARAMS ((int));
static void ppc_rename PARAMS ((int));
static void ppc_toc PARAMS ((int));
static void ppc_xcoff_cons PARAMS ((int));
+static void ppc_machine PARAMS ((int));
static void ppc_vbyte PARAMS ((int));
#endif
@@ -182,9 +184,11 @@ const pseudo_typeS md_pseudo_table[] =
{ "text", ppc_section, 't' },
{ "toc", ppc_toc, 0 },
{ "long", ppc_xcoff_cons, 2 },
+ { "llong", ppc_xcoff_cons, 3 },
{ "word", ppc_xcoff_cons, 1 },
{ "short", ppc_xcoff_cons, 1 },
{ "vbyte", ppc_vbyte, 0 },
+ { "machine", ppc_machine, 0 },
#endif
#ifdef OBJ_ELF
@@ -194,6 +198,8 @@ const pseudo_typeS md_pseudo_table[] =
{ "rdata", ppc_elf_rdata, 0 },
{ "rodata", ppc_elf_rdata, 0 },
{ "lcomm", ppc_elf_lcomm, 0 },
+ { "file", dwarf2_directive_file, 0 },
+ { "loc", dwarf2_directive_loc, 0 },
#endif
#ifdef TE_PE
@@ -236,11 +242,14 @@ struct pd_reg
1. r<reg_num> which has the value <reg_num>.
2. r.<reg_num> which has the value <reg_num>.
-
Each floating point register has predefined names of the form:
1. f<reg_num> which has the value <reg_num>.
2. f.<reg_num> which has the value <reg_num>.
+ Each vector unit register has predefined names of the form:
+ 1. v<reg_num> which has the value <reg_num>.
+ 2. v.<reg_num> which has the value <reg_num>.
+
Each condition register has predefined names of the form:
1. cr<reg_num> which has the value <reg_num>.
2. cr.<reg_num> which has the value <reg_num>.
@@ -260,7 +269,7 @@ struct pd_reg
srr0 has the value 26
srr1 has the value 27
- The table is sorted. Suitable for searching by a binary search. */
+ The table is sorted. Suitable for searching by a binary search. */
static const struct pd_reg pre_defined_registers[] =
{
@@ -289,70 +298,70 @@ static const struct pd_reg pre_defined_registers[] =
{ "dsisr", 18 }, /* Data Storage Interrupt Status Register */
{ "f.0", 0 }, /* Floating point registers */
- { "f.1", 1 },
- { "f.10", 10 },
- { "f.11", 11 },
- { "f.12", 12 },
- { "f.13", 13 },
- { "f.14", 14 },
- { "f.15", 15 },
- { "f.16", 16 },
- { "f.17", 17 },
- { "f.18", 18 },
- { "f.19", 19 },
- { "f.2", 2 },
- { "f.20", 20 },
- { "f.21", 21 },
- { "f.22", 22 },
- { "f.23", 23 },
- { "f.24", 24 },
- { "f.25", 25 },
- { "f.26", 26 },
- { "f.27", 27 },
- { "f.28", 28 },
- { "f.29", 29 },
- { "f.3", 3 },
+ { "f.1", 1 },
+ { "f.10", 10 },
+ { "f.11", 11 },
+ { "f.12", 12 },
+ { "f.13", 13 },
+ { "f.14", 14 },
+ { "f.15", 15 },
+ { "f.16", 16 },
+ { "f.17", 17 },
+ { "f.18", 18 },
+ { "f.19", 19 },
+ { "f.2", 2 },
+ { "f.20", 20 },
+ { "f.21", 21 },
+ { "f.22", 22 },
+ { "f.23", 23 },
+ { "f.24", 24 },
+ { "f.25", 25 },
+ { "f.26", 26 },
+ { "f.27", 27 },
+ { "f.28", 28 },
+ { "f.29", 29 },
+ { "f.3", 3 },
{ "f.30", 30 },
{ "f.31", 31 },
- { "f.4", 4 },
- { "f.5", 5 },
- { "f.6", 6 },
- { "f.7", 7 },
- { "f.8", 8 },
- { "f.9", 9 },
-
- { "f0", 0 },
- { "f1", 1 },
- { "f10", 10 },
- { "f11", 11 },
- { "f12", 12 },
- { "f13", 13 },
- { "f14", 14 },
- { "f15", 15 },
- { "f16", 16 },
- { "f17", 17 },
- { "f18", 18 },
- { "f19", 19 },
- { "f2", 2 },
- { "f20", 20 },
- { "f21", 21 },
- { "f22", 22 },
- { "f23", 23 },
- { "f24", 24 },
- { "f25", 25 },
- { "f26", 26 },
- { "f27", 27 },
- { "f28", 28 },
- { "f29", 29 },
- { "f3", 3 },
+ { "f.4", 4 },
+ { "f.5", 5 },
+ { "f.6", 6 },
+ { "f.7", 7 },
+ { "f.8", 8 },
+ { "f.9", 9 },
+
+ { "f0", 0 },
+ { "f1", 1 },
+ { "f10", 10 },
+ { "f11", 11 },
+ { "f12", 12 },
+ { "f13", 13 },
+ { "f14", 14 },
+ { "f15", 15 },
+ { "f16", 16 },
+ { "f17", 17 },
+ { "f18", 18 },
+ { "f19", 19 },
+ { "f2", 2 },
+ { "f20", 20 },
+ { "f21", 21 },
+ { "f22", 22 },
+ { "f23", 23 },
+ { "f24", 24 },
+ { "f25", 25 },
+ { "f26", 26 },
+ { "f27", 27 },
+ { "f28", 28 },
+ { "f29", 29 },
+ { "f3", 3 },
{ "f30", 30 },
{ "f31", 31 },
- { "f4", 4 },
- { "f5", 5 },
- { "f6", 6 },
- { "f7", 7 },
- { "f8", 8 },
- { "f9", 9 },
+ { "f4", 4 },
+ { "f5", 5 },
+ { "f6", 6 },
+ { "f7", 7 },
+ { "f8", 8 },
+ { "f9", 9 },
{ "fpscr", 0 },
@@ -439,11 +448,77 @@ static const struct pd_reg pre_defined_registers[] =
{ "srr0", 26 }, /* Machine Status Save/Restore Register 0 */
{ "srr1", 27 }, /* Machine Status Save/Restore Register 1 */
+ { "v.0", 0 }, /* Vector registers */
+ { "v.1", 1 },
+ { "v.10", 10 },
+ { "v.11", 11 },
+ { "v.12", 12 },
+ { "v.13", 13 },
+ { "v.14", 14 },
+ { "v.15", 15 },
+ { "v.16", 16 },
+ { "v.17", 17 },
+ { "v.18", 18 },
+ { "v.19", 19 },
+ { "v.2", 2 },
+ { "v.20", 20 },
+ { "v.21", 21 },
+ { "v.22", 22 },
+ { "v.23", 23 },
+ { "v.24", 24 },
+ { "v.25", 25 },
+ { "v.26", 26 },
+ { "v.27", 27 },
+ { "v.28", 28 },
+ { "v.29", 29 },
+ { "v.3", 3 },
+ { "v.30", 30 },
+ { "v.31", 31 },
+ { "v.4", 4 },
+ { "v.5", 5 },
+ { "v.6", 6 },
+ { "v.7", 7 },
+ { "v.8", 8 },
+ { "v.9", 9 },
+
+ { "v0", 0 },
+ { "v1", 1 },
+ { "v10", 10 },
+ { "v11", 11 },
+ { "v12", 12 },
+ { "v13", 13 },
+ { "v14", 14 },
+ { "v15", 15 },
+ { "v16", 16 },
+ { "v17", 17 },
+ { "v18", 18 },
+ { "v19", 19 },
+ { "v2", 2 },
+ { "v20", 20 },
+ { "v21", 21 },
+ { "v22", 22 },
+ { "v23", 23 },
+ { "v24", 24 },
+ { "v25", 25 },
+ { "v26", 26 },
+ { "v27", 27 },
+ { "v28", 28 },
+ { "v29", 29 },
+ { "v3", 3 },
+ { "v30", 30 },
+ { "v31", 31 },
+ { "v4", 4 },
+ { "v5", 5 },
+ { "v6", 6 },
+ { "v7", 7 },
+ { "v8", 8 },
+ { "v9", 9 },
+
{ "xer", 1 },
};
-#define REG_NAME_CNT (sizeof(pre_defined_registers) / sizeof(struct pd_reg))
+#define REG_NAME_CNT (sizeof (pre_defined_registers) / sizeof (struct pd_reg))
/* Given NAME, find the register number associated with that name, return
the integer value associated with the given name or -1 on failure. */
@@ -512,11 +587,11 @@ register_name (expressionP)
reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name);
/* look to see if it's in the register table */
- if (reg_number >= 0)
+ if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
-
+
/* make the rest nice */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
@@ -591,6 +666,9 @@ static int ppc_cpu = 0;
PPC_OPCODE_32 or PPC_OPCODE_64. */
static unsigned long ppc_size = PPC_OPCODE_32;
+/* Whether to target xcoff64 */
+static int ppc_xcoff64 = 0;
+
/* Opcode hash table. */
static struct hash_control *ppc_hash;
@@ -599,7 +677,7 @@ static struct hash_control *ppc_macro_hash;
#ifdef OBJ_ELF
/* What type of shared library support to use */
-static enum { SHLIB_NONE, SHLIB_PIC, SHILB_MRELOCATABLE } shlib = SHLIB_NONE;
+static enum { SHLIB_NONE, SHLIB_PIC, SHLIB_MRELOCATABLE } shlib = SHLIB_NONE;
/* Flags to set in the elf header */
static flagword ppc_flags = 0;
@@ -670,7 +748,7 @@ static segT reldata_section;
static segT rdata_section;
static segT tocdata_section;
-/* The current section and the previous section. See ppc_previous. */
+/* The current section and the previous section. See ppc_previous. */
static segT ppc_previous_section;
static segT ppc_current_section;
@@ -688,7 +766,7 @@ CONST char *md_shortopts = "um:";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -740,6 +818,16 @@ md_parse_option (c, arg)
break;
#endif
+ /* a64 and a32 determine whether to use XCOFF64 or XCOFF32. */
+ case 'a':
+ if (strcmp (arg, "64") == 0)
+ ppc_xcoff64 = 1;
+ else if (strcmp (arg, "32") == 0)
+ ppc_xcoff64 = 0;
+ else
+ return 0;
+ break;
+
case 'm':
/* -mpwrx and -mpwr2 mean to assemble for the IBM POWER/2
(RIOS2). */
@@ -749,7 +837,7 @@ md_parse_option (c, arg)
else if (strcmp (arg, "pwr") == 0)
ppc_cpu = PPC_OPCODE_POWER;
/* -m601 means to assemble for the Motorola PowerPC 601, which includes
- instructions that are holdovers from the Power. */
+ instructions that are holdovers from the Power. */
else if (strcmp (arg, "601") == 0)
ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_601;
/* -mppc, -mppc32, -m603, and -m604 mean to assemble for the
@@ -757,9 +845,12 @@ md_parse_option (c, arg)
else if (strcmp (arg, "ppc") == 0
|| strcmp (arg, "ppc32") == 0
|| strcmp (arg, "403") == 0
+ || strcmp (arg, "405") == 0
|| strcmp (arg, "603") == 0
|| strcmp (arg, "604") == 0)
ppc_cpu = PPC_OPCODE_PPC;
+ else if (strcmp (arg, "7400") == 0)
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
/* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC
620. */
else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)
@@ -791,13 +882,13 @@ md_parse_option (c, arg)
/* -mrelocatable/-mrelocatable-lib -- warn about initializations that require relocation */
else if (strcmp (arg, "relocatable") == 0)
{
- shlib = SHILB_MRELOCATABLE;
+ shlib = SHLIB_MRELOCATABLE;
ppc_flags |= EF_PPC_RELOCATABLE;
}
else if (strcmp (arg, "relocatable-lib") == 0)
{
- shlib = SHILB_MRELOCATABLE;
+ shlib = SHLIB_MRELOCATABLE;
ppc_flags |= EF_PPC_RELOCATABLE_LIB;
}
@@ -869,13 +960,13 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, _("\
+ fprintf (stream, _("\
PowerPC options:\n\
-u ignored\n\
-mpwrx, -mpwr2 generate code for IBM POWER/2 (RIOS2)\n\
-mpwr generate code for IBM POWER (RIOS1)\n\
-m601 generate code for Motorola PowerPC 601\n\
--mppc, -mppc32, -m403, -m603, -m604\n\
+-mppc, -mppc32, -m403, -m405, -m603, -m604\n\
generate code for Motorola PowerPC 603/604\n\
-mppc64, -m620 generate code for Motorola PowerPC 620\n\
-mppc64bridge generate code for PowerPC 64, including bridge insns\n\
@@ -884,7 +975,7 @@ PowerPC options:\n\
-mregnames Allow symbolic names for registers\n\
-mno-regnames Do not allow symbolic names for registers\n"));
#ifdef OBJ_ELF
- fprintf(stream, _("\
+ fprintf (stream, _("\
-mrelocatable support for GCC's -mrelocatble option\n\
-mrelocatable-lib support for GCC's -mrelocatble-lib option\n\
-memb set PPC_EMB bit in ELF flags\n\
@@ -948,6 +1039,37 @@ ppc_arch ()
return bfd_arch_unknown;
}
+unsigned long
+ppc_mach ()
+{
+ return (ppc_size == PPC_OPCODE_64) ? 620 : 0;
+}
+
+int
+ppc_subseg_align()
+{
+ return (ppc_xcoff64) ? 3 : 2;
+}
+
+extern char*
+ppc_target_format()
+{
+#ifdef OBJ_COFF
+#ifdef TE_PE
+ return (target_big_endian ? "pe-powerpc" : "pe-powerpcle");
+#elif TE_POWERMAC
+#else
+ return (ppc_xcoff64 ? "aixcoff64-rs6000" : "aixcoff-rs6000");
+#endif
+#ifdef TE_POWERMAC
+ return "xcoff-powermac";
+#endif
+#endif
+#ifdef OBJ_ELF
+ return (target_big_endian ? "elf32-powerpc" : "elf32-powerpcle");
+#endif
+}
+
/* This function is called when the assembler starts up. It is called
after the options have been parsed and the output file has been
opened. */
@@ -964,7 +1086,7 @@ md_begin ()
ppc_set_cpu ();
#ifdef OBJ_ELF
- /* Set the ELF flags if desired. */
+ /* Set the ELF flags if desired. */
if (ppc_flags && !msolaris)
bfd_set_private_flags (stdoutput, ppc_flags);
#endif
@@ -1042,7 +1164,7 @@ md_begin ()
#ifdef TE_PE
ppc_current_section = text_section;
- ppc_previous_section = 0;
+ ppc_previous_section = 0;
#endif
}
@@ -1147,7 +1269,7 @@ ppc_elf_suffix (str_p, exp_p)
int len;
struct map_bfd *ptr;
-#define MAP(str,reloc) { str, sizeof(str)-1, reloc }
+#define MAP(str,reloc) { str, sizeof (str)-1, reloc }
static struct map_bfd mapping[] = {
MAP ("l", BFD_RELOC_LO16),
@@ -1248,9 +1370,9 @@ ppc_elf_suffix (str_p, exp_p)
return BFD_RELOC_UNUSED;
}
-/* Like normal .long/.short/.word, except support @got, etc. */
+/* Like normal .long/.short/.word, except support @got, etc. */
/* clobbers input_line_pointer, checks */
-/* end-of-line. */
+/* end-of-line. */
static void
ppc_elf_cons (nbytes)
register int nbytes; /* 1=.byte, 2=.word, 4=.long */
@@ -1290,7 +1412,7 @@ ppc_elf_cons (nbytes)
}
while (*input_line_pointer++ == ',');
- input_line_pointer--; /* Put terminator back into stream. */
+ input_line_pointer--; /* Put terminator back into stream. */
demand_empty_rest_of_line ();
}
@@ -1434,7 +1556,7 @@ ppc_elf_validate_fix (fixp, seg)
case SHLIB_PIC:
return;
- case SHILB_MRELOCATABLE:
+ case SHLIB_MRELOCATABLE:
if (fixp->fx_r_type <= BFD_RELOC_UNUSED
&& fixp->fx_r_type != BFD_RELOC_16_GOTOFF
&& fixp->fx_r_type != BFD_RELOC_HI16_GOTOFF
@@ -1476,7 +1598,7 @@ ppc_elf_validate_fix (fixp, seg)
*
* Anything else is an error of one kind or another.
*
- * out:
+ * out:
* return value: success or failure
* toc_kind: kind of toc reference
* input_line_pointer:
@@ -1492,8 +1614,8 @@ ppc_elf_validate_fix (fixp, seg)
*
*/
-enum toc_size_qualifier
-{
+enum toc_size_qualifier
+{
default_toc, /* The toc cell constructed should be the system default size */
data_in_toc, /* This is a direct reference to a toc cell */
must_be_32, /* The toc cell constructed must be 32 bits wide */
@@ -1515,24 +1637,24 @@ parse_toc_entry(toc_kind)
/* skip over the '[' , and whitespace */
++input_line_pointer;
SKIP_WHITESPACE ();
-
+
/* find the spelling of the operand */
toc_spec = input_line_pointer;
c = get_symbol_end ();
- if (strcmp(toc_spec, "toc") == 0)
+ if (strcmp(toc_spec, "toc") == 0)
{
t = default_toc;
}
- else if (strcmp(toc_spec, "tocv") == 0)
+ else if (strcmp(toc_spec, "tocv") == 0)
{
t = data_in_toc;
}
- else if (strcmp(toc_spec, "toc32") == 0)
+ else if (strcmp(toc_spec, "toc32") == 0)
{
t = must_be_32;
}
- else if (strcmp(toc_spec, "toc64") == 0)
+ else if (strcmp(toc_spec, "toc64") == 0)
{
t = must_be_64;
}
@@ -1547,8 +1669,8 @@ parse_toc_entry(toc_kind)
/* now find the ']' */
*input_line_pointer = c; /* put back the delimiting char */
- SKIP_WHITESPACE (); /* leading whitespace could be there. */
- c = *input_line_pointer++; /* input_line_pointer->past char in c. */
+ SKIP_WHITESPACE (); /* leading whitespace could be there. */
+ c = *input_line_pointer++; /* input_line_pointer->past char in c. */
if (c != ']')
{
@@ -1721,13 +1843,13 @@ md_assemble (str)
input_line_pointer = str;
#ifdef TE_PE
- if (*input_line_pointer == '[')
+ if (*input_line_pointer == '[')
{
/* We are expecting something like the second argument here:
lwz r4,[toc].GS.0.static_int(rtoc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
- The argument following the `]' must be a symbol name, and the
+ The argument following the `]' must be a symbol name, and the
register must be the toc register: 'rtoc' or '2'
The effect is to 0 as the displacement field
@@ -1755,7 +1877,7 @@ md_assemble (str)
/* go parse off the [tocXX] part */
valid_toc = parse_toc_entry(&toc_kind);
- if (!valid_toc)
+ if (!valid_toc)
{
/* Note: message has already been issued. */
/* FIXME: what sort of recovery should we do? */
@@ -1781,8 +1903,8 @@ md_assemble (str)
/* FIXME: It's a little confusing what the tocv qualifier can */
/* be used for. At the very least, I've seen three */
/* uses, only one of which I'm sure I can explain. */
- if (ex.X_op == O_symbol)
- {
+ if (ex.X_op == O_symbol)
+ {
assert (ex.X_add_symbol != NULL);
if (symbol_get_bfdsym (ex.X_add_symbol)->section
!= tocdata_section)
@@ -1806,10 +1928,10 @@ md_assemble (str)
as_bad (_("Unimplemented toc64 expression modifier"));
break;
default:
- fprintf(stderr,
+ fprintf (stderr,
_("Unexpected return value [%d] from parse_toc_entry!\n"),
toc_kind);
- abort();
+ abort ();
break;
}
@@ -1858,7 +1980,7 @@ md_assemble (str)
else if (ex.X_op == O_constant)
{
#ifdef OBJ_ELF
- /* Allow @HA, @L, @H on constants. */
+ /* Allow @HA, @L, @H on constants. */
char *orig_str = str;
if ((reloc = ppc_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED)
@@ -1978,6 +2100,10 @@ md_assemble (str)
f = frag_more (4);
md_number_to_chars (f, insn, 4);
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (4);
+#endif
+
/* Create any fixups. At this point we do not use a
bfd_reloc_code_real_type, but instead just use the
BFD_RELOC_UNUSED plus the operand index. This lets us easily
@@ -2003,7 +2129,7 @@ md_assemble (str)
offset = target_big_endian ? (4 - size) : 0;
if (size < 1 || size > 4)
- abort();
+ abort ();
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size,
&fixups[i].exp, reloc_howto->pc_relative,
@@ -2064,7 +2190,7 @@ ppc_macro (str, macro)
if (s == (char *) NULL)
break;
*s++ = '\0';
- }
+ }
if (count != macro->operands)
{
@@ -2111,7 +2237,7 @@ ppc_macro (str, macro)
/* Assemble the constructed instruction. */
md_assemble (complete);
-}
+}
#ifdef OBJ_ELF
/* For ELF, add support for SHF_EXCLUDE and SHT_ORDERED */
@@ -2296,7 +2422,7 @@ ppc_comm (lcomm)
lcomm_name = input_line_pointer;
lcomm_endc = get_symbol_end ();
-
+
lcomm_sym = symbol_find_or_make (lcomm_name);
*input_line_pointer = lcomm_endc;
@@ -2313,9 +2439,9 @@ ppc_comm (lcomm)
ignore_rest_of_line ();
return;
}
-
+
record_alignment (bss_section, align);
-
+
if (! lcomm
|| ! S_IS_DEFINED (lcomm_sym))
{
@@ -2337,7 +2463,7 @@ ppc_comm (lcomm)
subseg_set (bss_section, 1);
frag_align (align, 0, 0);
-
+
symbol_set_frag (def_sym, frag_now);
pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, def_sym,
def_size, (char *) NULL);
@@ -2377,7 +2503,7 @@ ppc_comm (lcomm)
static void
ppc_csect (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char endc;
@@ -2385,7 +2511,7 @@ ppc_csect (ignore)
name = input_line_pointer;
endc = get_symbol_end ();
-
+
sym = symbol_find_or_make (name);
*input_line_pointer = endc;
@@ -2478,16 +2604,16 @@ ppc_change_csect (sym)
symbol_set_frag (sym, frag_now);
S_SET_VALUE (sym, (valueT) frag_now_fix ());
- symbol_get_tc (sym)->align = 2;
+ symbol_get_tc (sym)->align = (ppc_xcoff64) ? 3 : 2;
symbol_get_tc (sym)->output = 1;
symbol_get_tc (sym)->within = sym;
-
+
for (list = *list_ptr;
symbol_get_tc (list)->next != (symbolS *) NULL;
list = symbol_get_tc (list)->next)
;
symbol_get_tc (list)->next = sym;
-
+
symbol_remove (sym, &symbol_rootP, &symbol_lastP);
symbol_append (sym, symbol_get_tc (list)->within, &symbol_rootP,
&symbol_lastP);
@@ -2527,7 +2653,7 @@ ppc_section (type)
static void
ppc_named_section (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *user_name;
const char *real_name;
@@ -2562,7 +2688,7 @@ ppc_named_section (ignore)
static void
ppc_extern (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char endc;
@@ -2581,7 +2707,7 @@ ppc_extern (ignore)
static void
ppc_lglobl (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char endc;
@@ -2604,7 +2730,7 @@ ppc_lglobl (ignore)
static void
ppc_rename (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char endc;
@@ -2640,7 +2766,7 @@ ppc_rename (ignore)
static void
ppc_stabx (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int len;
@@ -2719,9 +2845,29 @@ ppc_stabx (ignore)
symbol_get_tc (sym)->output = 1;
- if (S_GET_STORAGE_CLASS (sym) == C_STSYM)
+ if (S_GET_STORAGE_CLASS (sym) == C_STSYM) {
+
symbol_get_tc (sym)->within = ppc_current_block;
+ /* In this case :
+
+ .bs name
+ .stabx "z",arrays_,133,0
+ .es
+
+ .comm arrays_,13768,3
+
+ resolve_symbol_value will copy the exp's "within" into sym's when the
+ offset is 0. Since this seems to be corner case problem,
+ only do the correction for storage class C_STSYM. A better solution
+ would be to have the tc field updated in ppc_symbol_new_hook. */
+
+ if (exp.X_op == O_symbol)
+ {
+ symbol_get_tc (exp.X_add_symbol)->within = ppc_current_block;
+ }
+ }
+
if (exp.X_op != O_symbol
|| ! S_IS_EXTERNAL (exp.X_add_symbol)
|| S_GET_SEGMENT (exp.X_add_symbol) != bss_section)
@@ -2747,7 +2893,7 @@ ppc_stabx (ignore)
static void
ppc_function (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char endc;
@@ -2838,7 +2984,7 @@ ppc_function (ignore)
static void
ppc_bf (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *sym;
@@ -2866,7 +3012,7 @@ ppc_bf (ignore)
static void
ppc_ef (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *sym;
@@ -2915,7 +3061,7 @@ ppc_biei (ei)
S_SET_STORAGE_CLASS (sym, ei ? C_EINCL : C_BINCL);
symbol_get_tc (sym)->output = 1;
-
+
for (look = last_biei ? last_biei : symbol_rootP;
(look != (symbolS *) NULL
&& (S_GET_STORAGE_CLASS (look) == C_FILE
@@ -2939,7 +3085,7 @@ ppc_biei (ei)
static void
ppc_bs (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char endc;
@@ -2975,7 +3121,7 @@ ppc_bs (ignore)
static void
ppc_es (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *sym;
@@ -3000,7 +3146,7 @@ ppc_es (ignore)
static void
ppc_bb (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *sym;
@@ -3027,7 +3173,7 @@ ppc_bb (ignore)
static void
ppc_eb (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *sym;
@@ -3052,7 +3198,7 @@ ppc_eb (ignore)
static void
ppc_bc (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int len;
@@ -3075,7 +3221,7 @@ ppc_bc (ignore)
static void
ppc_ec (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *sym;
@@ -3095,7 +3241,7 @@ ppc_ec (ignore)
static void
ppc_toc (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (ppc_toc_csect != (symbolS *) NULL)
subseg_set (data_section, symbol_get_tc (ppc_toc_csect)->subseg);
@@ -3104,7 +3250,7 @@ ppc_toc (ignore)
subsegT subseg;
symbolS *sym;
symbolS *list;
-
+
subseg = ppc_data_subsegment;
++ppc_data_subsegment;
@@ -3120,7 +3266,7 @@ ppc_toc (ignore)
symbol_get_tc (sym)->within = sym;
ppc_toc_csect = sym;
-
+
for (list = ppc_data_csects;
symbol_get_tc (list)->next != (symbolS *) NULL;
list = symbol_get_tc (list)->next)
@@ -3150,8 +3296,16 @@ ppc_xcoff_cons (log_size)
}
static void
+ppc_machine(dummy)
+ int dummy ATTRIBUTE_UNUSED;
+{
+ discard_rest_of_line();
+ /* What does aix use this for? */
+}
+
+static void
ppc_vbyte (dummy)
- int dummy;
+ int dummy ATTRIBUTE_UNUSED;
{
expressionS exp;
int byte_count;
@@ -3269,7 +3423,7 @@ ppc_tc (ignore)
else
{
++input_line_pointer;
- cons (4);
+ cons ((ppc_size == PPC_OPCODE_64) ? 8 : 4);
}
}
@@ -3293,11 +3447,11 @@ ppc_set_current_section (new)
*/
static void
ppc_previous(ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *tmp;
- if (ppc_previous_section == NULL)
+ if (ppc_previous_section == NULL)
{
as_warn(_("No previous section to return to. Directive ignored."));
return;
@@ -3326,16 +3480,16 @@ ppc_previous(ignore)
*/
static void
ppc_pdata(ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
- if (pdata_section == 0)
+ if (pdata_section == 0)
{
pdata_section = subseg_new (".pdata", 0);
-
+
bfd_set_section_flags (stdoutput, pdata_section,
(SEC_ALLOC | SEC_LOAD | SEC_RELOC
| SEC_READONLY | SEC_DATA ));
-
+
bfd_set_section_alignment (stdoutput, pdata_section, 2);
}
else
@@ -3361,9 +3515,9 @@ ppc_pdata(ignore)
*/
static void
ppc_ydata(ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
- if (ydata_section == 0)
+ if (ydata_section == 0)
{
ydata_section = subseg_new (".ydata", 0);
bfd_set_section_flags (stdoutput, ydata_section,
@@ -3398,14 +3552,14 @@ ppc_ydata(ignore)
*/
static void
ppc_reldata(ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (reldata_section == 0)
{
reldata_section = subseg_new (".reldata", 0);
bfd_set_section_flags (stdoutput, reldata_section,
- ( SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ ( SEC_ALLOC | SEC_LOAD | SEC_RELOC
| SEC_DATA ));
bfd_set_section_alignment (stdoutput, reldata_section, 2);
@@ -3429,7 +3583,7 @@ ppc_reldata(ignore)
*/
static void
ppc_rdata(ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (rdata_section == 0)
{
@@ -3448,7 +3602,7 @@ ppc_rdata(ignore)
}
/* pseudo-op: .ualong
- behaviour: much like .int, with the exception that no alignment is
+ behaviour: much like .int, with the exception that no alignment is
performed.
FIXME: test the alignment statement
errors: None
@@ -3456,7 +3610,7 @@ ppc_rdata(ignore)
*/
static void
ppc_ualong(ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
/* try for long */
cons ( 4 );
@@ -3471,7 +3625,7 @@ ppc_ualong(ignore)
*/
static void
ppc_znop(ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
unsigned long insn;
const struct powerpc_opcode *opcode;
@@ -3519,10 +3673,10 @@ ppc_znop(ignore)
}
-/* pseudo-op:
- behaviour:
- errors:
- warnings:
+/* pseudo-op:
+ behaviour:
+ errors:
+ warnings:
*/
static void
ppc_pe_comm(lcomm)
@@ -3622,7 +3776,7 @@ ppc_pe_comm(lcomm)
* additions/changes for the moto-pas assembler support. There are three
* categories:
*
- * FIXME: I just noticed this. This doesn't work at all really. It it
+ * FIXME: I just noticed this. This doesn't work at all really. It it
* setting bits that bfd probably neither understands or uses. The
* correct approach (?) will have to incorporate extra fields attached
* to the section to hold the system specific stuff. (krk)
@@ -3655,7 +3809,7 @@ ppc_pe_comm(lcomm)
void
ppc_pe_section (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
/* Strip out the section name */
char *section_name;
@@ -3721,7 +3875,7 @@ ppc_pe_section (ignore)
as_bad (_("Unsupported section attribute -- 'a'"));
break;
case 'c': /* code section */
- flags |= SEC_CODE;
+ flags |= SEC_CODE;
break;
case 'd': /* section has initialized data */
flags |= SEC_DATA;
@@ -3737,7 +3891,7 @@ ppc_pe_section (ignore)
flags |= SEC_HAS_CONTENTS;
break;
case 'n': /* section can be discarded */
- flags &=~ SEC_LOAD;
+ flags &=~ SEC_LOAD;
break;
case 'R': /* Remove section at link time */
flags |= SEC_NEVER_LOAD;
@@ -3817,7 +3971,7 @@ ppc_pe_section (ignore)
static void
ppc_pe_function (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char endc;
@@ -3840,7 +3994,7 @@ ppc_pe_function (ignore)
static void
ppc_pe_tocd (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (tocdata_section == 0)
{
@@ -4245,7 +4399,7 @@ ppc_frob_symbol (sym)
}
a->x_csect.x_smtyp = XTY_LD;
}
-
+
a->x_csect.x_parmhash = 0;
a->x_csect.x_snhash = 0;
if (symbol_get_tc (sym)->class == -1)
@@ -4354,8 +4508,8 @@ ppc_frob_section (sec)
#endif /* OBJ_XCOFF */
/* Turn a string in input_line_pointer into a floating point constant
- of type type, and store the appropriate bytes in *litp. The number
- of LITTLENUMS emitted is stored in *sizep . An error message is
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
char *
@@ -4406,7 +4560,7 @@ md_atof (type, litp, sizep)
litp += 2;
}
}
-
+
return NULL;
}
@@ -4461,7 +4615,6 @@ md_convert_frag (abfd, sec, fragp)
/* We have no need to default values of symbols. */
-/*ARGSUSED*/
symbolS *
md_undefined_symbol (name)
char *name ATTRIBUTE_UNUSED;
@@ -4802,7 +4955,6 @@ md_apply_fix3 (fixp, valuep, seg)
else if ((operand->flags & PPC_OPERAND_PARENS) != 0
&& operand->bits == 16
&& operand->shift == 0
- && operand->insert == NULL
&& fixp->fx_addsy != NULL
&& ppc_is_toc_sym (fixp->fx_addsy))
{
@@ -4849,6 +5001,14 @@ md_apply_fix3 (fixp, valuep, seg)
value, 4);
break;
+ case BFD_RELOC_64:
+ if (fixp->fx_pcrel)
+ fixp->fx_r_type = BFD_RELOC_64_PCREL;
+ /* fall through */
+ case BFD_RELOC_64_PCREL:
+ md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ value, 8);
+ break;
case BFD_RELOC_LO16:
case BFD_RELOC_16:
case BFD_RELOC_GPREL16:
@@ -4934,7 +5094,7 @@ md_apply_fix3 (fixp, valuep, seg)
{
char *where;
unsigned long insn;
-
+
/* Fetch the instruction, insert the fully resolved operand
value, and stuff the instruction back again. */
where = fixp->fx_frag->fr_literal + fixp->fx_where;
@@ -4971,7 +5131,7 @@ md_apply_fix3 (fixp, valuep, seg)
break;
default:
- fprintf(stderr,
+ fprintf (stderr,
_("Gas failure, reloc value %d\n"), fixp->fx_r_type);
fflush(stderr);
abort ();
diff --git a/gnu/usr.bin/binutils/gas/config/tc-ppc.h b/gnu/usr.bin/binutils/gas/config/tc-ppc.h
index 783a215d9ec..c2876bfa35b 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-ppc.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-ppc.h
@@ -1,5 +1,5 @@
/* tc-ppc.h -- Header file for tc-ppc.c.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#define TC_PPC
@@ -47,31 +47,16 @@ struct fix;
/* The target BFD architecture. */
#define TARGET_ARCH (ppc_arch ())
+#define TARGET_MACH (ppc_mach ())
extern enum bfd_architecture ppc_arch PARAMS ((void));
+extern unsigned long ppc_mach PARAMS ((void));
/* Whether or not the target is big endian */
extern int target_big_endian;
/* The target BFD format. */
-#ifdef OBJ_COFF
-#ifdef TE_PE
-#define TARGET_FORMAT (target_big_endian ? "pe-powerpc" : "pe-powerpcle")
-#else
-#define TARGET_FORMAT "aixcoff-rs6000"
-#endif
-#endif
-
-/* PowerMac has a BFD slightly different from AIX's. */
-#ifdef TE_POWERMAC
-#ifdef TARGET_FORMAT
-#undef TARGET_FORMAT
-#endif
-#define TARGET_FORMAT "xcoff-powermac"
-#endif
-
-#ifdef OBJ_ELF
-#define TARGET_FORMAT (target_big_endian ? "elf32-powerpc" : "elf32-powerpcle")
-#endif
+#define TARGET_FORMAT (ppc_target_format ())
+extern char* ppc_target_format ();
/* Permit temporary numeric labels. */
#define LOCAL_LABELS_FB 1
@@ -186,7 +171,8 @@ extern int ppc_frob_symbol PARAMS ((symbolS *));
extern void ppc_adjust_symtab PARAMS ((void));
/* Niclas Andersson <nican@ida.liu.se> says this is needed. */
-#define SUB_SEGMENT_ALIGN(SEG) 2
+extern int ppc_subseg_align PARAMS ((void));
+#define SUB_SEGMENT_ALIGN(SEG) ppc_subseg_align()
/* We also need to copy, in particular, the class of the symbol,
over what obj-coff would otherwise have copied. */
@@ -200,7 +186,6 @@ do { \
symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \
} while (0)
-
#endif /* OBJ_XCOFF */
#ifdef OBJ_ELF
@@ -246,7 +231,7 @@ extern int ppc_section_flags PARAMS ((int, int, int));
#define tc_comment_chars ppc_comment_chars
extern const char *ppc_comment_chars;
-/* Keep relocations relative to the GOT, or non-PC relative. */
+/* Keep relocations relative to the GOT, or non-PC relative. */
#define tc_fix_adjustable(FIX) \
((FIX)->fx_r_type != BFD_RELOC_16_GOTOFF \
&& (FIX)->fx_r_type != BFD_RELOC_LO16_GOTOFF \
@@ -273,6 +258,7 @@ extern const char *ppc_comment_chars;
&& S_IS_DEFINED ((FIX)->fx_addsy) \
&& ! S_IS_COMMON ((FIX)->fx_addsy)))
+#define DWARF2_LINE_MIN_INSN_LENGTH 4
#endif /* OBJ_ELF */
/* call md_apply_fix3 with segment instead of md_apply_fix */
@@ -286,4 +272,3 @@ extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
extern int ppc_parse_name PARAMS ((const char *, struct expressionS *));
#define md_operand(x)
-
diff --git a/gnu/usr.bin/binutils/gas/config/tc-sh.c b/gnu/usr.bin/binutils/gas/config/tc-sh.c
index 4003f5bda2e..5e7b23a4b99 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-sh.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-sh.c
@@ -1,5 +1,6 @@
/* tc-sh.c -- Assemble code for the Hitachi Super-H
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,10 +19,7 @@
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- Written By Steve Chamberlain
- sac@cygnus.com
- */
+/* Written By Steve Chamberlain <sac@cygnus.com> */
#include <stdio.h>
#include "as.h"
@@ -30,11 +28,14 @@
#define DEFINE_TABLE
#include "opcodes/sh-opc.h"
#include <ctype.h>
+#include "struc-symbol.h"
#ifdef OBJ_ELF
#include "elf/sh.h"
#endif
+#include "dwarf2dbg.h"
+
const char comment_chars[] = "!";
const char line_separator_chars[] = ";";
const char line_comment_chars[] = "!#";
@@ -48,13 +49,19 @@ void cons ();
void s_align_bytes ();
static void s_uacons PARAMS ((int));
static sh_opcode_info *find_cooked_opcode PARAMS ((char **));
-static void assemble_ppi PARAMS ((char *, sh_opcode_info *));
+static unsigned int assemble_ppi PARAMS ((char *, sh_opcode_info *));
+
+#ifdef OBJ_ELF
+static void sh_elf_cons PARAMS ((int));
+
+symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
+#endif
int shl = 0;
static void
little (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
shl = 1;
target_big_endian = 0;
@@ -64,13 +71,19 @@ little (ignore)
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
- */
+ Integer arg to pass to the function. */
const pseudo_typeS md_pseudo_table[] =
{
+#ifdef OBJ_ELF
+ {"long", sh_elf_cons, 4},
+ {"int", sh_elf_cons, 4},
+ {"word", sh_elf_cons, 2},
+ {"short", sh_elf_cons, 2},
+#else
{"int", cons, 4},
{"word", cons, 2},
+#endif /* OBJ_ELF */
{"form", listing_psize, 0},
{"little", little, 0},
{"heading", listing_title, 0},
@@ -80,6 +93,14 @@ const pseudo_typeS md_pseudo_table[] =
{"uses", s_uses, 0},
{"uaword", s_uacons, 2},
{"ualong", s_uacons, 4},
+ {"uaquad", s_uacons, 8},
+ {"2byte", s_uacons, 2},
+ {"4byte", s_uacons, 4},
+ {"8byte", s_uacons, 8},
+#ifdef BFD_ASSEMBLER
+ {"file", dwarf2_directive_file, 0 },
+ {"loc", dwarf2_directive_loc, 0 },
+#endif
{0, 0, 0}
};
@@ -101,18 +122,17 @@ static int valid_arch;
const char EXP_CHARS[] = "eE";
-/* Chars that mean this number is a floating point constant */
+/* Chars that mean this number is a floating point constant. */
/* As in 0f12.456 */
/* or 0d1.2345e12 */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define C(a,b) ENCODE_RELAX(a,b)
-#define JREG 14 /* Register used as a temp when relaxing */
#define ENCODE_RELAX(what,length) (((what) << 4) + (length))
#define GET_WHAT(x) ((x>>4))
-/* These are the three types of relaxable instrction */
+/* These are the three types of relaxable instrction. */
#define COND_JUMP 1
#define COND_JUMP_DELAY 2
#define UNCOND_JUMP 3
@@ -122,8 +142,6 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define COND8 1
#define COND12 2
#define COND32 3
-#define UNCOND12 1
-#define UNCOND32 2
#define UNDEF_WORD_DISP 4
#define UNCOND12 1
@@ -159,45 +177,239 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define UNCOND32_M -(1<<30)
#define UNCOND32_LENGTH 14
+#define EMPTY { 0, 0, 0, 0 }
+
const relax_typeS md_relax_table[C (END, 0)] = {
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- { 0 },
+ EMPTY,
/* C (COND_JUMP, COND8) */
{ COND8_F, COND8_M, COND8_LENGTH, C (COND_JUMP, COND12) },
/* C (COND_JUMP, COND12) */
{ COND12_F, COND12_M, COND12_LENGTH, C (COND_JUMP, COND32), },
/* C (COND_JUMP, COND32) */
{ COND32_F, COND32_M, COND32_LENGTH, 0, },
- { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ /* C (COND_JUMP, UNDEF_WORD_DISP) */
+ { 0, 0, COND32_LENGTH, 0, },
+ EMPTY, EMPTY, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- { 0 },
+ EMPTY,
/* C (COND_JUMP_DELAY, COND8) */
{ COND8_F, COND8_M, COND8_LENGTH, C (COND_JUMP_DELAY, COND12) },
/* C (COND_JUMP_DELAY, COND12) */
{ COND12_F, COND12_M, COND12_DELAY_LENGTH, C (COND_JUMP_DELAY, COND32), },
/* C (COND_JUMP_DELAY, COND32) */
{ COND32_F, COND32_M, COND32_LENGTH, 0, },
- { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ /* C (COND_JUMP_DELAY, UNDEF_WORD_DISP) */
+ { 0, 0, COND32_LENGTH, 0, },
+ EMPTY, EMPTY, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- { 0 },
+ EMPTY,
/* C (UNCOND_JUMP, UNCOND12) */
{ UNCOND12_F, UNCOND12_M, UNCOND12_LENGTH, C (UNCOND_JUMP, UNCOND32), },
/* C (UNCOND_JUMP, UNCOND32) */
{ UNCOND32_F, UNCOND32_M, UNCOND32_LENGTH, 0, },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ EMPTY,
+ /* C (UNCOND_JUMP, UNDEF_WORD_DISP) */
+ { 0, 0, UNCOND32_LENGTH, 0, },
+ EMPTY, EMPTY, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
};
+#undef EMPTY
+
static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
-/*
- This function is called once, at assembler startup time. This should
- set up all the tables, etc that the MD part of the assembler needs
- */
+
+#ifdef OBJ_ELF
+/* Parse @got, etc. and return the desired relocation.
+ If we have additional arithmetic expression, then we fill in new_exp_p. */
+static bfd_reloc_code_real_type
+sh_elf_suffix (str_p, exp_p, new_exp_p)
+ char **str_p;
+ expressionS *exp_p, *new_exp_p;
+{
+ struct map_bfd {
+ char *string;
+ int length;
+ bfd_reloc_code_real_type reloc;
+ };
+
+ char ident[20];
+ char *str = *str_p;
+ char *str2;
+ int ch;
+ int len;
+ struct map_bfd *ptr;
+
+#define MAP(str,reloc) { str, sizeof (str)-1, reloc }
+
+ static struct map_bfd mapping[] = {
+ MAP ("got", BFD_RELOC_32_GOT_PCREL),
+ MAP ("plt", BFD_RELOC_32_PLT_PCREL),
+ MAP ("gotoff", BFD_RELOC_32_GOTOFF),
+ { (char *)0, 0, BFD_RELOC_UNUSED }
+ };
+
+ if (*str++ != '@')
+ return BFD_RELOC_UNUSED;
+
+ for (ch = *str, str2 = ident;
+ (str2 < ident + sizeof (ident) - 1
+ && (isalnum (ch) || ch == '@'));
+ ch = *++str)
+ {
+ *str2++ = (islower (ch)) ? ch : tolower (ch);
+ }
+
+ *str2 = '\0';
+ len = str2 - ident;
+
+ ch = ident[0];
+ for (ptr = &mapping[0]; ptr->length > 0; ptr++)
+ if (ch == ptr->string[0]
+ && len == ptr->length
+ && memcmp (ident, ptr->string, ptr->length) == 0)
+ {
+ /* Now check for identifier@suffix+constant */
+ if (*str == '-' || *str == '+')
+ {
+ char *orig_line = input_line_pointer;
+
+ input_line_pointer = str;
+ expression (new_exp_p);
+ if (new_exp_p->X_op == O_constant)
+ {
+ exp_p->X_add_number += new_exp_p->X_add_number;
+ str = input_line_pointer;
+ }
+ if (new_exp_p->X_op == O_subtract)
+ str = input_line_pointer;
+
+ if (&input_line_pointer != str_p)
+ input_line_pointer = orig_line;
+ }
+
+ *str_p = str;
+ return ptr->reloc;
+ }
+
+ return BFD_RELOC_UNUSED;
+}
+
+/* The regular cons() function, that reads constants, doesn't support
+ suffixes such as @GOT, @GOTOFF and @PLT, that generate
+ machine-specific relocation types. So we must define it here. */
+/* Clobbers input_line_pointer, checks end-of-line. */
+static void
+sh_elf_cons (nbytes)
+ register int nbytes; /* 1=.byte, 2=.word, 4=.long */
+{
+ expressionS exp, new_exp;
+ bfd_reloc_code_real_type reloc;
+ const char *name;
+
+ if (is_it_end_of_statement ())
+ {
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ do
+ {
+ expression (&exp);
+ new_exp.X_op = O_absent;
+ new_exp.X_add_symbol = new_exp.X_op_symbol = NULL;
+ /* If the _GLOBAL_OFFSET_TABLE_ symbol hasn't been found yet,
+ use the name of the symbol to tell whether it's the
+ _GLOBAL_OFFSET_TABLE_. If it has, comparing the symbols is
+ sufficient. */
+ if (! GOT_symbol && exp.X_add_symbol)
+ name = S_GET_NAME (exp.X_add_symbol);
+ else
+ name = NULL;
+ /* Check whether this expression involves the
+ _GLOBAL_OFFSET_TABLE_ symbol, by itself or added to a
+ difference of two other symbols. */
+ if (((GOT_symbol && GOT_symbol == exp.X_add_symbol)
+ || (! GOT_symbol && name
+ && strcmp (name, GLOBAL_OFFSET_TABLE_NAME) == 0))
+ && (exp.X_op == O_symbol
+ || (exp.X_op == O_add
+ && ((symbol_get_value_expression (exp.X_op_symbol)->X_op)
+ == O_subtract))))
+ {
+ reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput,
+ BFD_RELOC_32);
+ int size = bfd_get_reloc_size (reloc_howto);
+
+ if (GOT_symbol == NULL)
+ GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
+
+ if (size > nbytes)
+ as_bad (_("%s relocations do not fit in %d bytes\n"),
+ reloc_howto->name, nbytes);
+ else
+ {
+ register char *p = frag_more ((int) nbytes);
+ int offset = nbytes - size;
+
+ fix_new_exp (frag_now, p - frag_now->fr_literal + offset,
+ size, &exp, 0, TC_RELOC_GLOBAL_OFFSET_TABLE);
+ }
+ }
+ /* Check if this symbol involves one of the magic suffixes, such
+ as @GOT, @GOTOFF or @PLT, and determine which relocation type
+ to use. */
+ else if ((exp.X_op == O_symbol || (exp.X_op == O_add && exp.X_op_symbol))
+ && *input_line_pointer == '@'
+ && ((reloc = sh_elf_suffix (&input_line_pointer, &exp, &new_exp))
+ != BFD_RELOC_UNUSED))
+ {
+ reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput,
+ reloc);
+ int size = bfd_get_reloc_size (reloc_howto);
+
+ /* Force a GOT to be generated. */
+ if (GOT_symbol == NULL)
+ GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
+
+ if (size > nbytes)
+ as_bad (_("%s relocations do not fit in %d bytes\n"),
+ reloc_howto->name, nbytes);
+ else
+ {
+ register char *p = frag_more ((int) nbytes);
+ int offset = nbytes - size;
+
+ fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size,
+ &exp, 0, reloc);
+ if (new_exp.X_op != O_absent)
+ fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size,
+ &new_exp, 0, BFD_RELOC_32);
+ }
+ }
+ else
+ emit_expr (&exp, (unsigned int) nbytes);
+ }
+ while (*input_line_pointer++ == ',');
+
+ input_line_pointer--; /* Put terminator back into stream. */
+ if (*input_line_pointer == '#' || *input_line_pointer == '!')
+ {
+ while (! is_end_of_line[(unsigned char) *input_line_pointer++]);
+ }
+ else
+ demand_empty_rest_of_line ();
+}
+#endif /* OBJ_ELF */
+
+
+/* This function is called once, at assembler startup time. This should
+ set up all the tables, etc that the MD part of the assembler needs. */
void
md_begin ()
@@ -219,7 +431,7 @@ md_begin ()
opcode_hash_control = hash_new ();
- /* Insert unique names into hash table */
+ /* Insert unique names into hash table. */
for (opcode = sh_table; opcode->name; opcode++)
{
if (strcmp (prev_name, opcode->name))
@@ -232,7 +444,7 @@ md_begin ()
else
{
/* Make all the opcodes with the same name point to the same
- string */
+ string. */
opcode->name = prev_name;
}
}
@@ -244,32 +456,34 @@ static int reg_x, reg_y;
static int reg_efg;
static int reg_b;
-static expressionS immediate; /* absolute expression */
-
typedef struct
{
sh_arg_type type;
int reg;
+ expressionS immediate;
}
-
sh_operand_info;
#define IDENT_CHAR(c) (isalnum (c) || (c) == '_')
-/* try and parse a reg name, returns number of chars consumed */
+/* Try to parse a reg name. Return the number of chars consumed. */
+
static int
parse_reg (src, mode, reg)
char *src;
int *mode;
int *reg;
{
+ char l0 = tolower (src[0]);
+ char l1 = l0 ? tolower (src[1]) : 0;
+
/* We use ! IDENT_CHAR for the next character after the register name, to
make sure that we won't accidentally recognize a symbol name such as
'sram' or sr_ram as being a reference to the register 'sr'. */
- if (src[0] == 'r')
+ if (l0 == 'r')
{
- if (src[1] == '1')
+ if (l1 == '1')
{
if (src[2] >= '0' && src[2] <= '5'
&& ! IDENT_CHAR ((unsigned char) src[3]))
@@ -279,36 +493,36 @@ parse_reg (src, mode, reg)
return 3;
}
}
- if (src[1] >= '0' && src[1] <= '9'
+ if (l1 >= '0' && l1 <= '9'
&& ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = A_REG_N;
- *reg = (src[1] - '0');
+ *reg = (l1 - '0');
return 2;
}
- if (src[1] >= '0' && src[1] <= '7' && strncmp (&src[2], "_bank", 5) == 0
+ if (l1 >= '0' && l1 <= '7' && strncasecmp (&src[2], "_bank", 5) == 0
&& ! IDENT_CHAR ((unsigned char) src[7]))
{
*mode = A_REG_B;
- *reg = (src[1] - '0');
+ *reg = (l1 - '0');
return 7;
}
- if (src[1] == 'e' && ! IDENT_CHAR ((unsigned char) src[2]))
+ if (l1 == 'e' && ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = A_RE;
return 2;
}
- if (src[1] == 's' && ! IDENT_CHAR ((unsigned char) src[2]))
+ if (l1 == 's' && ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = A_RS;
return 2;
}
}
- if (src[0] == 'a')
+ if (l0 == 'a')
{
- if (src[1] == '0')
+ if (l1 == '0')
{
if (! IDENT_CHAR ((unsigned char) src[2]))
{
@@ -316,14 +530,14 @@ parse_reg (src, mode, reg)
*reg = A_A0_NUM;
return 2;
}
- if (src[2] == 'g' && ! IDENT_CHAR ((unsigned char) src[3]))
+ if (tolower (src[2]) == 'g' && ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = DSP_REG_N;
*reg = A_A0G_NUM;
return 3;
}
}
- if (src[1] == '1')
+ if (l1 == '1')
{
if (! IDENT_CHAR ((unsigned char) src[2]))
{
@@ -331,7 +545,7 @@ parse_reg (src, mode, reg)
*reg = A_A1_NUM;
return 2;
}
- if (src[2] == 'g' && ! IDENT_CHAR ((unsigned char) src[3]))
+ if (tolower (src[2]) == 'g' && ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = DSP_REG_N;
*reg = A_A1G_NUM;
@@ -339,24 +553,24 @@ parse_reg (src, mode, reg)
}
}
- if (src[1] == 'x' && src[2] >= '0' && src[2] <= '1'
+ if (l1 == 'x' && src[2] >= '0' && src[2] <= '1'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_REG_N;
- *reg = 4 + (src[1] - '0');
+ *reg = 4 + (l1 - '0');
return 3;
}
- if (src[1] == 'y' && src[2] >= '0' && src[2] <= '1'
+ if (l1 == 'y' && src[2] >= '0' && src[2] <= '1'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_REG_N;
- *reg = 6 + (src[1] - '0');
+ *reg = 6 + (l1 - '0');
return 3;
}
- if (src[1] == 's' && src[2] >= '0' && src[2] <= '3'
+ if (l1 == 's' && src[2] >= '0' && src[2] <= '3'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
- int n = src[1] - '0';
+ int n = l1 - '0';
*mode = A_REG_N;
*reg = n | ((~n & 2) << 1);
@@ -364,21 +578,21 @@ parse_reg (src, mode, reg)
}
}
- if (src[0] == 'i' && src[1] && ! IDENT_CHAR ((unsigned char) src[3]))
+ if (l0 == 'i' && l1 && ! IDENT_CHAR ((unsigned char) src[3]))
{
- if (src[1] == 's')
+ if (l1 == 's')
{
*mode = A_REG_N;
*reg = 8;
return 2;
}
- if (src[1] == 'x')
+ if (l1 == 'x')
{
*mode = A_REG_N;
*reg = 8;
return 2;
}
- if (src[1] == 'y')
+ if (l1 == 'y')
{
*mode = A_REG_N;
*reg = 9;
@@ -386,123 +600,125 @@ parse_reg (src, mode, reg)
}
}
- if (src[0] == 'x' && src[1] >= '0' && src[1] <= '1'
+ if (l0 == 'x' && l1 >= '0' && l1 <= '1'
&& ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = DSP_REG_N;
- *reg = A_X0_NUM + src[1] - '0';
+ *reg = A_X0_NUM + l1 - '0';
return 2;
}
- if (src[0] == 'y' && src[1] >= '0' && src[1] <= '1'
+ if (l0 == 'y' && l1 >= '0' && l1 <= '1'
&& ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = DSP_REG_N;
- *reg = A_Y0_NUM + src[1] - '0';
+ *reg = A_Y0_NUM + l1 - '0';
return 2;
}
- if (src[0] == 'm' && src[1] >= '0' && src[1] <= '1'
+ if (l0 == 'm' && l1 >= '0' && l1 <= '1'
&& ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = DSP_REG_N;
- *reg = src[1] == '0' ? A_M0_NUM : A_M1_NUM;
+ *reg = l1 == '0' ? A_M0_NUM : A_M1_NUM;
return 2;
}
- if (src[0] == 's'
- && src[1] == 's'
- && src[2] == 'r' && ! IDENT_CHAR ((unsigned char) src[3]))
+ if (l0 == 's'
+ && l1 == 's'
+ && tolower (src[2]) == 'r' && ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_SSR;
return 3;
}
- if (src[0] == 's' && src[1] == 'p' && src[2] == 'c'
+ if (l0 == 's' && l1 == 'p' && tolower (src[2]) == 'c'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_SPC;
return 3;
}
- if (src[0] == 's' && src[1] == 'g' && src[2] == 'r'
+ if (l0 == 's' && l1 == 'g' && tolower (src[2]) == 'r'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_SGR;
return 3;
}
- if (src[0] == 'd' && src[1] == 's' && src[2] == 'r'
+ if (l0 == 'd' && l1 == 's' && tolower (src[2]) == 'r'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_DSR;
return 3;
}
- if (src[0] == 'd' && src[1] == 'b' && src[2] == 'r'
+ if (l0 == 'd' && l1 == 'b' && tolower (src[2]) == 'r'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_DBR;
return 3;
}
- if (src[0] == 's' && src[1] == 'r' && ! IDENT_CHAR ((unsigned char) src[2]))
+ if (l0 == 's' && l1 == 'r' && ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = A_SR;
return 2;
}
- if (src[0] == 's' && src[1] == 'p' && ! IDENT_CHAR ((unsigned char) src[2]))
+ if (l0 == 's' && l1 == 'p' && ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = A_REG_N;
*reg = 15;
return 2;
}
- if (src[0] == 'p' && src[1] == 'r' && ! IDENT_CHAR ((unsigned char) src[2]))
+ if (l0 == 'p' && l1 == 'r' && ! IDENT_CHAR ((unsigned char) src[2]))
{
*mode = A_PR;
return 2;
}
- if (src[0] == 'p' && src[1] == 'c' && ! IDENT_CHAR ((unsigned char) src[2]))
+ if (l0 == 'p' && l1 == 'c' && ! IDENT_CHAR ((unsigned char) src[2]))
{
- *mode = A_DISP_PC;
+ /* Don't use A_DISP_PC here - that would accept stuff like 'mova pc,r0'
+ and use an uninitialized immediate. */
+ *mode = A_PC;
return 2;
}
- if (src[0] == 'g' && src[1] == 'b' && src[2] == 'r'
+ if (l0 == 'g' && l1 == 'b' && tolower (src[2]) == 'r'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_GBR;
return 3;
}
- if (src[0] == 'v' && src[1] == 'b' && src[2] == 'r'
+ if (l0 == 'v' && l1 == 'b' && tolower (src[2]) == 'r'
&& ! IDENT_CHAR ((unsigned char) src[3]))
{
*mode = A_VBR;
return 3;
}
- if (src[0] == 'm' && src[1] == 'a' && src[2] == 'c'
+ if (l0 == 'm' && l1 == 'a' && tolower (src[2]) == 'c'
&& ! IDENT_CHAR ((unsigned char) src[4]))
{
- if (src[3] == 'l')
+ if (tolower (src[3]) == 'l')
{
*mode = A_MACL;
return 4;
}
- if (src[3] == 'h')
+ if (tolower (src[3]) == 'h')
{
*mode = A_MACH;
return 4;
}
}
- if (src[0] == 'm' && src[1] == 'o' && src[2] == 'd'
+ if (l0 == 'm' && l1 == 'o' && tolower (src[2]) == 'd'
&& ! IDENT_CHAR ((unsigned char) src[4]))
{
*mode = A_MOD;
return 3;
}
- if (src[0] == 'f' && src[1] == 'r')
+ if (l0 == 'f' && l1 == 'r')
{
if (src[2] == '1')
{
@@ -522,7 +738,7 @@ parse_reg (src, mode, reg)
return 3;
}
}
- if (src[0] == 'd' && src[1] == 'r')
+ if (l0 == 'd' && l1 == 'r')
{
if (src[2] == '1')
{
@@ -542,7 +758,7 @@ parse_reg (src, mode, reg)
return 3;
}
}
- if (src[0] == 'x' && src[1] == 'd')
+ if (l0 == 'x' && l1 == 'd')
{
if (src[2] == '1')
{
@@ -562,7 +778,7 @@ parse_reg (src, mode, reg)
return 3;
}
}
- if (src[0] == 'f' && src[1] == 'v')
+ if (l0 == 'f' && l1 == 'v')
{
if (src[2] == '1'&& src[3] == '2' && ! IDENT_CHAR ((unsigned char) src[4]))
{
@@ -578,22 +794,25 @@ parse_reg (src, mode, reg)
return 3;
}
}
- if (src[0] == 'f' && src[1] == 'p' && src[2] == 'u' && src[3] == 'l'
+ if (l0 == 'f' && l1 == 'p' && tolower (src[2]) == 'u'
+ && tolower (src[3]) == 'l'
&& ! IDENT_CHAR ((unsigned char) src[4]))
{
*mode = FPUL_N;
return 4;
}
- if (src[0] == 'f' && src[1] == 'p' && src[2] == 's' && src[3] == 'c'
- && src[4] == 'r' && ! IDENT_CHAR ((unsigned char) src[5]))
+ if (l0 == 'f' && l1 == 'p' && tolower (src[2]) == 's'
+ && tolower (src[3]) == 'c'
+ && tolower (src[4]) == 'r' && ! IDENT_CHAR ((unsigned char) src[5]))
{
*mode = FPSCR_N;
return 5;
}
- if (src[0] == 'x' && src[1] == 'm' && src[2] == 't' && src[3] == 'r'
- && src[4] == 'x' && ! IDENT_CHAR ((unsigned char) src[5]))
+ if (l0 == 'x' && l1 == 'm' && tolower (src[2]) == 't'
+ && tolower (src[3]) == 'r'
+ && tolower (src[4]) == 'x' && ! IDENT_CHAR ((unsigned char) src[5]))
{
*mode = XMTRX_M4;
return 5;
@@ -602,7 +821,8 @@ parse_reg (src, mode, reg)
return 0;
}
-static symbolS *dot()
+static symbolS *
+dot ()
{
const char *fake;
@@ -613,29 +833,26 @@ static symbolS *dot()
now_seg,
(valueT) frag_now_fix (),
frag_now);
-
}
-
-static
-char *
-parse_exp (s)
+static char *
+parse_exp (s, op)
char *s;
+ sh_operand_info *op;
{
char *save;
char *new;
save = input_line_pointer;
input_line_pointer = s;
- expression (&immediate);
- if (immediate.X_op == O_absent)
+ expression (&op->immediate);
+ if (op->immediate.X_op == O_absent)
as_bad (_("missing operand"));
new = input_line_pointer;
input_line_pointer = save;
return new;
}
-
/* The many forms of operand:
Rn Register direct
@@ -653,11 +870,9 @@ parse_exp (s)
disp:12
#imm8
pr, gbr, vbr, macl, mach
-
*/
-static
-char *
+static char *
parse_at (src, op)
char *src;
sh_operand_info *op;
@@ -667,7 +882,7 @@ parse_at (src, op)
src++;
if (src[0] == '-')
{
- /* Must be predecrement */
+ /* Must be predecrement. */
src++;
len = parse_reg (src, &mode, &(op->reg));
@@ -710,7 +925,7 @@ parse_at (src, op)
else
{
/* Must be an @(disp,.. thing) */
- src = parse_exp (src);
+ src = parse_exp (src, op);
if (src[0] == ',')
src++;
/* Now can be rn, gbr or pc */
@@ -725,13 +940,14 @@ parse_at (src, op)
{
op->type = A_DISP_GBR;
}
- else if (mode == A_DISP_PC)
+ else if (mode == A_PC)
{
- /* Turn a plain @(4,pc) into @(.+4,pc) */
- if (immediate.X_op == O_constant) {
- immediate.X_add_symbol = dot();
- immediate.X_op = O_symbol;
- }
+ /* Turn a plain @(4,pc) into @(.+4,pc). */
+ if (op->immediate.X_op == O_constant)
+ {
+ op->immediate.X_add_symbol = dot();
+ op->immediate.X_op = O_symbol;
+ }
op->type = A_DISP_PC;
}
else
@@ -795,7 +1011,7 @@ get_operand (ptr, op)
if (src[0] == '#')
{
src++;
- *ptr = parse_exp (src);
+ *ptr = parse_exp (src, op);
op->type = A_IMM;
return;
}
@@ -814,20 +1030,18 @@ get_operand (ptr, op)
}
else
{
- /* Not a reg, the only thing left is a displacement */
- *ptr = parse_exp (src);
+ /* Not a reg, the only thing left is a displacement. */
+ *ptr = parse_exp (src, op);
op->type = A_DISP_PC;
return;
}
}
-static
-char *
+static char *
get_operands (info, args, operand)
sh_opcode_info *info;
char *args;
sh_operand_info *operand;
-
{
char *ptr = args;
if (info->arg[0])
@@ -846,7 +1060,13 @@ get_operands (info, args, operand)
ptr++;
}
get_operand (&ptr, operand + 1);
- if (info->arg[2])
+ /* ??? Hack: psha/pshl have a varying operand number depending on
+ the type of the first operand. We handle this by having the
+ three-operand version first and reducing the number of operands
+ parsed to two if we see that the first operand is an immediate.
+ This works because no insn with three operands has an immediate
+ as first operand. */
+ if (info->arg[2] && operand[0].type != A_IMM)
{
if (*ptr == ',')
{
@@ -876,11 +1096,9 @@ get_operands (info, args, operand)
/* Passed a pointer to a list of opcodes which use different
addressing modes, return the opcode which matches the opcodes
- provided
- */
+ provided. */
-static
-sh_opcode_info *
+static sh_opcode_info *
get_specific (opcode, operands)
sh_opcode_info *opcode;
sh_operand_info *operands;
@@ -888,24 +1106,26 @@ get_specific (opcode, operands)
sh_opcode_info *this_try = opcode;
char *name = opcode->name;
int n = 0;
+
while (opcode->name)
{
this_try = opcode++;
if (this_try->name != name)
{
/* We've looked so far down the table that we've run out of
- opcodes with the same name */
+ opcodes with the same name. */
return 0;
}
- /* look at both operands needed by the opcodes and provided by
+
+ /* Look at both operands needed by the opcodes and provided by
the user - since an arg test will often fail on the same arg
again and again, we'll try and test the last failing arg the
- first on each opcode try */
-
+ first on each opcode try. */
for (n = 0; this_try->arg[n]; n++)
{
sh_operand_info *user = operands + n;
sh_arg_type arg = this_try->arg[n];
+
switch (arg)
{
case A_IMM:
@@ -973,7 +1193,7 @@ get_specific (opcode, operands)
goto fail;
break;
- case A_REG_B:
+ case A_REG_B:
if (user->type != arg)
goto fail;
reg_b = user->reg;
@@ -1144,7 +1364,7 @@ get_specific (opcode, operands)
goto fail;
reg_m = 4;
break;
-
+
default:
printf (_("unhandled %d\n"), arg);
goto fail;
@@ -1154,7 +1374,8 @@ get_specific (opcode, operands)
goto fail;
valid_arch &= this_try->arch;
return this_try;
- fail:;
+ fail:
+ ;
}
return 0;
@@ -1175,24 +1396,25 @@ check (operand, low, high)
return operand->X_add_number;
}
-
static void
-insert (where, how, pcrel)
+insert (where, how, pcrel, op)
char *where;
int how;
int pcrel;
+ sh_operand_info *op;
{
fix_new_exp (frag_now,
where - frag_now->fr_literal,
2,
- &immediate,
+ &op->immediate,
pcrel,
how);
}
static void
-build_relax (opcode)
+build_relax (opcode, op)
sh_opcode_info *opcode;
+ sh_operand_info *op;
{
int high_byte = target_big_endian ? 0 : 1;
char *p;
@@ -1204,8 +1426,8 @@ build_relax (opcode)
md_relax_table[C (what, COND32)].rlx_length,
md_relax_table[C (what, COND8)].rlx_length,
C (what, 0),
- immediate.X_add_symbol,
- immediate.X_add_number,
+ op->immediate.X_add_symbol,
+ op->immediate.X_add_number,
0);
p[high_byte] = (opcode->nibbles[0] << 4) | (opcode->nibbles[1]);
}
@@ -1215,17 +1437,67 @@ build_relax (opcode)
md_relax_table[C (UNCOND_JUMP, UNCOND32)].rlx_length,
md_relax_table[C (UNCOND_JUMP, UNCOND12)].rlx_length,
C (UNCOND_JUMP, 0),
- immediate.X_add_symbol,
- immediate.X_add_number,
+ op->immediate.X_add_symbol,
+ op->immediate.X_add_number,
0);
p[high_byte] = (opcode->nibbles[0] << 4);
}
}
-/* Now we know what sort of opcodes it is, lets build the bytes -
- */
-static void
+/* Insert ldrs & ldre with fancy relocations that relaxation can recognize. */
+
+static char *
+insert_loop_bounds (output, operand)
+ char *output;
+ sh_operand_info *operand;
+{
+ char *name;
+ symbolS *end_sym;
+
+ /* Since the low byte of the opcode will be overwritten by the reloc, we
+ can just stash the high byte into both bytes and ignore endianness. */
+ output[0] = 0x8c;
+ output[1] = 0x8c;
+ insert (output, BFD_RELOC_SH_LOOP_START, 1, operand);
+ insert (output, BFD_RELOC_SH_LOOP_END, 1, operand + 1);
+
+ if (sh_relax)
+ {
+ static int count = 0;
+
+ /* If the last loop insn is a two-byte-insn, it is in danger of being
+ swapped with the insn after it. To prevent this, create a new
+ symbol - complete with SH_LABEL reloc - after the last loop insn.
+ If the last loop insn is four bytes long, the symbol will be
+ right in the middle, but four byte insns are not swapped anyways. */
+ /* A REPEAT takes 6 bytes. The SH has a 32 bit address space.
+ Hence a 9 digit number should be enough to count all REPEATs. */
+ name = alloca (11);
+ sprintf (name, "_R%x", count++ & 0x3fffffff);
+ end_sym = symbol_new (name, undefined_section, 0, &zero_address_frag);
+ /* Make this a local symbol. */
+#ifdef OBJ_COFF
+ SF_SET_LOCAL (end_sym);
+#endif /* OBJ_COFF */
+ symbol_table_insert (end_sym);
+ end_sym->sy_value = operand[1].immediate;
+ end_sym->sy_value.X_add_number += 2;
+ fix_new (frag_now, frag_now_fix (), 2, end_sym, 0, 1, BFD_RELOC_SH_LABEL);
+ }
+
+ output = frag_more (2);
+ output[0] = 0x8e;
+ output[1] = 0x8e;
+ insert (output, BFD_RELOC_SH_LOOP_START, 1, operand);
+ insert (output, BFD_RELOC_SH_LOOP_END, 1, operand + 1);
+
+ return frag_more (2);
+}
+
+/* Now we know what sort of opcodes it is, let's build the bytes. */
+
+static unsigned int
build_Mytes (opcode, operand)
sh_opcode_info *opcode;
sh_operand_info *operand;
@@ -1234,6 +1506,7 @@ build_Mytes (opcode, operand)
int index;
char nbuf[4];
char *output = frag_more (2);
+ unsigned int size = 2;
int low_byte = target_big_endian ? 1 : 0;
nbuf[0] = 0;
nbuf[1] = 0;
@@ -1265,49 +1538,72 @@ build_Mytes (opcode, operand)
case REG_NM:
nbuf[index] = reg_n | (reg_m >> 2);
break;
- case REG_B:
+ case REG_B:
nbuf[index] = reg_b | 0x08;
break;
- case DISP_4:
- insert (output + low_byte, BFD_RELOC_SH_IMM4, 0);
+ case IMM0_4BY4:
+ insert (output + low_byte, BFD_RELOC_SH_IMM4BY4, 0, operand);
+ break;
+ case IMM0_4BY2:
+ insert (output + low_byte, BFD_RELOC_SH_IMM4BY2, 0, operand);
+ break;
+ case IMM0_4:
+ insert (output + low_byte, BFD_RELOC_SH_IMM4, 0, operand);
+ break;
+ case IMM1_4BY4:
+ insert (output + low_byte, BFD_RELOC_SH_IMM4BY4, 0, operand + 1);
+ break;
+ case IMM1_4BY2:
+ insert (output + low_byte, BFD_RELOC_SH_IMM4BY2, 0, operand + 1);
break;
- case IMM_4BY4:
- insert (output + low_byte, BFD_RELOC_SH_IMM4BY4, 0);
+ case IMM1_4:
+ insert (output + low_byte, BFD_RELOC_SH_IMM4, 0, operand + 1);
break;
- case IMM_4BY2:
- insert (output + low_byte, BFD_RELOC_SH_IMM4BY2, 0);
+ case IMM0_8BY4:
+ insert (output + low_byte, BFD_RELOC_SH_IMM8BY4, 0, operand);
break;
- case IMM_4:
- insert (output + low_byte, BFD_RELOC_SH_IMM4, 0);
+ case IMM0_8BY2:
+ insert (output + low_byte, BFD_RELOC_SH_IMM8BY2, 0, operand);
break;
- case IMM_8BY4:
- insert (output + low_byte, BFD_RELOC_SH_IMM8BY4, 0);
+ case IMM0_8:
+ insert (output + low_byte, BFD_RELOC_SH_IMM8, 0, operand);
break;
- case IMM_8BY2:
- insert (output + low_byte, BFD_RELOC_SH_IMM8BY2, 0);
+ case IMM1_8BY4:
+ insert (output + low_byte, BFD_RELOC_SH_IMM8BY4, 0, operand + 1);
break;
- case IMM_8:
- insert (output + low_byte, BFD_RELOC_SH_IMM8, 0);
+ case IMM1_8BY2:
+ insert (output + low_byte, BFD_RELOC_SH_IMM8BY2, 0, operand + 1);
+ break;
+ case IMM1_8:
+ insert (output + low_byte, BFD_RELOC_SH_IMM8, 0, operand + 1);
break;
case PCRELIMM_8BY4:
- insert (output, BFD_RELOC_SH_PCRELIMM8BY4, 1);
+ insert (output, BFD_RELOC_SH_PCRELIMM8BY4, 1, operand);
break;
case PCRELIMM_8BY2:
- insert (output, BFD_RELOC_SH_PCRELIMM8BY2, 1);
+ insert (output, BFD_RELOC_SH_PCRELIMM8BY2, 1, operand);
+ break;
+ case REPEAT:
+ output = insert_loop_bounds (output, operand);
+ nbuf[index] = opcode->nibbles[3];
+ operand += 2;
break;
default:
printf (_("failed for %d\n"), i);
}
}
}
- if (! target_big_endian) {
- output[1] = (nbuf[0] << 4) | (nbuf[1]);
- output[0] = (nbuf[2] << 4) | (nbuf[3]);
- }
- else {
- output[0] = (nbuf[0] << 4) | (nbuf[1]);
- output[1] = (nbuf[2] << 4) | (nbuf[3]);
- }
+ if (!target_big_endian)
+ {
+ output[1] = (nbuf[0] << 4) | (nbuf[1]);
+ output[0] = (nbuf[2] << 4) | (nbuf[3]);
+ }
+ else
+ {
+ output[0] = (nbuf[0] << 4) | (nbuf[1]);
+ output[1] = (nbuf[2] << 4) | (nbuf[3]);
+ }
+ return size;
}
/* Find an opcode at the start of *STR_P in the hash table, and set
@@ -1322,7 +1618,8 @@ find_cooked_opcode (str_p)
unsigned char *op_end;
char name[20];
int nlen = 0;
- /* Drop leading whitespace */
+
+ /* Drop leading whitespace. */
while (*str == ' ')
str++;
@@ -1347,20 +1644,20 @@ find_cooked_opcode (str_p)
name[nlen] = c;
nlen++;
}
+
name[nlen] = 0;
*str_p = op_end;
if (nlen == 0)
- {
- as_bad (_("can't find opcode "));
- }
+ as_bad (_("can't find opcode "));
return (sh_opcode_info *) hash_find (opcode_hash_control, name);
}
/* Assemble a parallel processing insn. */
#define DDT_BASE 0xf000 /* Base value for double data transfer insns */
-static void
+
+static unsigned int
assemble_ppi (op_end, opcode)
char *op_end;
sh_opcode_info *opcode;
@@ -1371,6 +1668,7 @@ assemble_ppi (op_end, opcode)
int field_b = 0;
char *output;
int move_code;
+ unsigned int size;
/* Some insn ignore one or more register fields, e.g. psts machl,a0.
Make sure we encode a defined insn pattern. */
@@ -1386,14 +1684,16 @@ assemble_ppi (op_end, opcode)
opcode = get_specific (opcode, operand);
if (opcode == 0)
{
- /* Couldn't find an opcode which matched the operands */
+ /* Couldn't find an opcode which matched the operands. */
char *where = frag_more (2);
+ size = 2;
where[0] = 0x0;
where[1] = 0x0;
as_bad (_("invalid operands for opcode"));
- return;
+ return size;
}
+
if (opcode->nibbles[0] != PPI)
as_bad (_("insn can't be combined with parallel processing insn"));
@@ -1457,10 +1757,10 @@ assemble_ppi (op_end, opcode)
break;
case PSH:
- if (immediate.X_op != O_constant)
+ if (operand[0].immediate.X_op != O_constant)
as_bad (_("dsp immediate shift value not constant"));
field_b = ((opcode->nibbles[2] << 12)
- | (immediate.X_add_number & 127) << 4
+ | (operand[0].immediate.X_add_number & 127) << 4
| reg_n);
break;
case PPI3:
@@ -1536,6 +1836,7 @@ assemble_ppi (op_end, opcode)
unsigned long ppi_code = (movx | movy | 0xf800) << 16 | field_b;
output = frag_more (4);
+ size = 4;
if (! target_big_endian)
{
output[3] = ppi_code >> 8;
@@ -1549,8 +1850,11 @@ assemble_ppi (op_end, opcode)
move_code |= 0xf800;
}
else
- /* Just a double data transfer. */
- output = frag_more (2);
+ {
+ /* Just a double data transfer. */
+ output = frag_more (2);
+ size = 2;
+ }
if (! target_big_endian)
{
output[1] = move_code >> 8;
@@ -1561,12 +1865,12 @@ assemble_ppi (op_end, opcode)
output[0] = move_code >> 8;
output[1] = move_code;
}
+ return size;
}
/* This is the guts of the machine-dependent assembler. STR points to a
machine dependent instruction. This function is supposed to emit
- the frags/bytes it assembles to.
- */
+ the frags/bytes it assembles to. */
void
md_assemble (str)
@@ -1575,6 +1879,7 @@ md_assemble (str)
unsigned char *op_end;
sh_operand_info operand[3];
sh_opcode_info *opcode;
+ unsigned int size = 0;
opcode = find_cooked_opcode (&str);
op_end = str;
@@ -1597,48 +1902,54 @@ md_assemble (str)
if (opcode->nibbles[0] == PPI)
{
- assemble_ppi (op_end, opcode);
- return;
- }
-
- if (opcode->arg[0] == A_BDISP12
- || opcode->arg[0] == A_BDISP8)
- {
- parse_exp (op_end + 1);
- build_relax (opcode);
+ size = assemble_ppi (op_end, opcode);
}
else
{
- if (opcode->arg[0] == A_END)
+ if (opcode->arg[0] == A_BDISP12
+ || opcode->arg[0] == A_BDISP8)
{
- /* Ignore trailing whitespace. If there is any, it has already
- been compressed to a single space. */
- if (*op_end == ' ')
- op_end++;
+ parse_exp (op_end + 1, &operand[0]);
+ build_relax (opcode, &operand[0]);
}
else
{
- op_end = get_operands (opcode, op_end, operand);
- }
- opcode = get_specific (opcode, operand);
-
- if (opcode == 0)
- {
- /* Couldn't find an opcode which matched the operands */
- char *where = frag_more (2);
+ if (opcode->arg[0] == A_END)
+ {
+ /* Ignore trailing whitespace. If there is any, it has already
+ been compressed to a single space. */
+ if (*op_end == ' ')
+ op_end++;
+ }
+ else
+ {
+ op_end = get_operands (opcode, op_end, operand);
+ }
+ opcode = get_specific (opcode, operand);
- where[0] = 0x0;
- where[1] = 0x0;
- as_bad (_("invalid operands for opcode"));
- return;
- }
+ if (opcode == 0)
+ {
+ /* Couldn't find an opcode which matched the operands. */
+ char *where = frag_more (2);
+ size = 2;
- if (*op_end)
- as_bad (_("excess operands: '%s'"), op_end);
+ where[0] = 0x0;
+ where[1] = 0x0;
+ as_bad (_("invalid operands for opcode"));
+ }
+ else
+ {
+ if (*op_end)
+ as_bad (_("excess operands: '%s'"), op_end);
- build_Mytes (opcode, operand);
+ size = build_Mytes (opcode, operand);
+ }
+ }
}
+#ifdef BFD_ASSEMBLER
+ dwarf2_emit_insn (size);
+#endif
}
/* This routine is called each time a label definition is seen. It
@@ -1658,7 +1969,7 @@ sh_frob_label ()
offset = frag_now_fix ();
if (frag_now != last_label_frag
|| offset != last_label_offset)
- {
+ {
fix_new (frag_now, offset, 2, &abs_symbol, 0, 0, BFD_RELOC_SH_LABEL);
last_label_frag = frag_now;
last_label_offset = offset;
@@ -1682,9 +1993,27 @@ sh_flush_pending_output ()
}
symbolS *
-DEFUN (md_undefined_symbol, (name),
- char *name)
+md_undefined_symbol (name)
+ char *name;
{
+#ifdef OBJ_ELF
+ /* Under ELF we need to default _GLOBAL_OFFSET_TABLE. Otherwise we
+ have no need to default values of symbols. */
+ if (strcmp (name, GLOBAL_OFFSET_TABLE_NAME) == 0)
+ {
+ 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 /* OBJ_ELF */
+
return 0;
}
@@ -1692,15 +2021,15 @@ DEFUN (md_undefined_symbol, (name),
#ifndef BFD_ASSEMBLER
void
-DEFUN (tc_crawl_symbol_chain, (headers),
- object_headers * headers)
+tc_crawl_symbol_chain (headers)
+ object_headers *headers;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
void
-DEFUN (tc_headers_hook, (headers),
- object_headers * headers)
+tc_headers_hook (headers)
+ object_headers *headers;
{
printf (_("call to tc_headers_hook \n"));
}
@@ -1708,14 +2037,15 @@ DEFUN (tc_headers_hook, (headers),
#endif
#endif
-/* Various routines to kill one day */
-/* Equal to MAX_PRECISION in atof-ieee.c */
+/* Various routines to kill one day. */
+/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-/* Turn a string in input_line_pointer into a floating point constant of type
- type, and store the appropriate bytes in *litP. The number of LITTLENUMS
- emitted is stored in *sizeP . An error message is returned, or NULL on OK.
- */
+/* Turn a string in input_line_pointer into a floating point constant
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP . An error message is
+ returned, or NULL on OK. */
+
char *
md_atof (type, litP, sizeP)
int type;
@@ -1764,7 +2094,7 @@ md_atof (type, litP, sizeP)
litP += 2;
}
}
-
+
return NULL;
}
@@ -1775,7 +2105,7 @@ md_atof (type, litP, sizeP)
static void
s_uses (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS ex;
@@ -1797,8 +2127,8 @@ s_uses (ignore)
}
CONST char *md_shortopts = "";
-struct option md_longopts[] = {
-
+struct option md_longopts[] =
+{
#define OPTION_RELAX (OPTION_MD_BASE)
#define OPTION_LITTLE (OPTION_MD_BASE + 1)
#define OPTION_SMALL (OPTION_LITTLE + 1)
@@ -1810,12 +2140,12 @@ struct option md_longopts[] = {
{"dsp", no_argument, NULL, OPTION_DSP},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
int c;
- char *arg;
+ char *arg ATTRIBUTE_UNUSED;
{
switch (c)
{
@@ -1847,7 +2177,7 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, _("\
+ fprintf (stream, _("\
SH options:\n\
-little generate little endian code\n\
-relax alter jump instructions for long displacements\n\
@@ -1877,10 +2207,9 @@ struct sh_count_relocs
symbol. When using BFD_ASSEMBLER, this is called via
bfd_map_over_sections. */
-/*ARGSUSED*/
static void
sh_count_relocs (abfd, sec, data)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
segT sec;
PTR data;
{
@@ -1907,12 +2236,11 @@ sh_count_relocs (abfd, sec, data)
/* Handle the count relocs for a particular section. When using
BFD_ASSEMBLER, this is called via bfd_map_over_sections. */
-/*ARGSUSED*/
static void
sh_frob_section (abfd, sec, ignore)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
segT sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo;
fixS *fix;
@@ -1973,8 +2301,8 @@ sh_frob_section (abfd, sec, ignore)
continue;
}
- /* fscan should also be a fixup to a local symbol in the same
- section. */
+ /* The variable fscan should also be a fixup to a local symbol
+ in the same section. */
sym = fscan->fx_addsy;
if (sym == NULL
|| fscan->fx_subsy != NULL
@@ -2052,7 +2380,7 @@ sh_frob_file ()
void
md_convert_frag (headers, seg, fragP)
#ifdef BFD_ASSEMBLER
- bfd *headers;
+ bfd *headers ATTRIBUTE_UNUSED;
#else
object_headers *headers;
#endif
@@ -2083,68 +2411,30 @@ md_convert_frag (headers, seg, fragP)
case C (UNCOND_JUMP, UNCOND32):
case C (UNCOND_JUMP, UNDEF_WORD_DISP):
if (fragP->fr_symbol == NULL)
- as_bad (_("at 0x%lx, displacement overflows 12-bit field"),
- (unsigned long) fragP->fr_address);
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("displacement overflows 12-bit field"));
else if (S_IS_DEFINED (fragP->fr_symbol))
- as_bad (_("at 0x%lx, displacement to defined symbol %s overflows 12-bit field"),
- (unsigned long) fragP->fr_address,
- S_GET_NAME (fragP->fr_symbol));
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("displacement to defined symbol %s overflows 12-bit field"),
+ S_GET_NAME (fragP->fr_symbol));
else
- as_bad (_("at 0x%lx, displacement to undefined symbol %s overflows 12-bit field"),
- (unsigned long) fragP->fr_address,
- S_GET_NAME (fragP->fr_symbol));
-
-#if 0 /* This code works, but generates poor code and the compiler
- should never produce a sequence that requires it to be used. */
-
- /* A jump wont fit in 12 bits, make code which looks like
- bra foo
- mov.w @(0, PC), r14
- .long disp
- foo: bra @r14
- */
- int t = buffer[0] & 0x10;
-
- buffer[highbyte] = 0xa0; /* branch over move and disp */
- buffer[lowbyte] = 3;
- buffer[highbyte+2] = 0xd0 | JREG; /* Build mov insn */
- buffer[lowbyte+2] = 0x00;
-
- buffer[highbyte+4] = 0; /* space for 32 bit jump disp */
- buffer[lowbyte+4] = 0;
- buffer[highbyte+6] = 0;
- buffer[lowbyte+6] = 0;
-
- buffer[highbyte+8] = 0x40 | JREG; /* Build jmp @JREG */
- buffer[lowbyte+8] = t ? 0xb : 0x2b;
-
- buffer[highbyte+10] = 0x20; /* build nop */
- buffer[lowbyte+10] = 0x0b;
-
- /* Make reloc for the long disp */
- fix_new (fragP,
- fragP->fr_fix + 4,
- 4,
- fragP->fr_symbol,
- fragP->fr_offset,
- 0,
- BFD_RELOC_32);
- fragP->fr_fix += UNCOND32_LENGTH;
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("displacement to undefined symbol %s overflows 12-bit field"),
+ S_GET_NAME (fragP->fr_symbol));
+ /* Stabilize this frag, so we don't trip an assert. */
+ fragP->fr_fix += fragP->fr_var;
fragP->fr_var = 0;
- donerelax = 1;
-#endif
-
break;
case C (COND_JUMP, COND12):
case C (COND_JUMP_DELAY, COND12):
- /* A bcond won't fit, so turn it into a b!cond; bra disp; nop */
+ /* A bcond won't fit, so turn it into a b!cond; bra disp; nop. */
/* I found that a relax failure for gcc.c-torture/execute/930628-1.c
was due to gas incorrectly relaxing an out-of-range conditional
branch with delay slot. It turned:
bf.s L6 (slot mov.l r12,@(44,r0))
into:
-
+
2c: 8f 01 a0 8b bf.s 32 <_main+32> (slot bra L6)
30: 00 09 nop
32: 10 cb mov.l r12,@(44,r0)
@@ -2206,58 +2496,19 @@ md_convert_frag (headers, seg, fragP)
case C (COND_JUMP, UNDEF_WORD_DISP):
case C (COND_JUMP_DELAY, UNDEF_WORD_DISP):
if (fragP->fr_symbol == NULL)
- as_bad (_("at 0x%lx, displacement overflows 8-bit field"),
- (unsigned long) fragP->fr_address);
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("displacement overflows 8-bit field"));
else if (S_IS_DEFINED (fragP->fr_symbol))
- as_bad (_("at 0x%lx, displacement to defined symbol %s overflows 8-bit field "),
- (unsigned long) fragP->fr_address,
- S_GET_NAME (fragP->fr_symbol));
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("displacement to defined symbol %s overflows 8-bit field"),
+ S_GET_NAME (fragP->fr_symbol));
else
- as_bad (_("at 0x%lx, displacement to undefined symbol %s overflows 8-bit field "),
- (unsigned long) fragP->fr_address,
- S_GET_NAME (fragP->fr_symbol));
-
-#if 0 /* This code works, but generates poor code, and the compiler
- should never produce a sequence that requires it to be used. */
-
- /* A bcond won't fit and it won't go into a 12 bit
- displacement either, the code sequence looks like:
- b!cond foop
- mov.w @(n, PC), r14
- jmp @r14
- nop
- .long where
- foop:
- */
-
- buffer[0] ^= 0x2; /* Toggle T/F bit */
-#define JREG 14
- buffer[1] = 5; /* branch over mov, jump, nop and ptr */
- buffer[2] = 0xd0 | JREG; /* Build mov insn */
- buffer[3] = 0x2;
- buffer[4] = 0x40 | JREG; /* Build jmp @JREG */
- buffer[5] = 0x0b;
- buffer[6] = 0x20; /* build nop */
- buffer[7] = 0x0b;
- buffer[8] = 0; /* space for 32 bit jump disp */
- buffer[9] = 0;
- buffer[10] = 0;
- buffer[11] = 0;
- buffer[12] = 0;
- buffer[13] = 0;
- /* Make reloc for the long disp */
- fix_new (fragP,
- fragP->fr_fix + 8,
- 4,
- fragP->fr_symbol,
- fragP->fr_offset,
- 0,
- BFD_RELOC_32);
- fragP->fr_fix += COND32_LENGTH;
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("displacement to undefined symbol %s overflows 8-bit field "),
+ S_GET_NAME (fragP->fr_symbol));
+ /* Stabilize this frag, so we don't trip an assert. */
+ fragP->fr_fix += fragP->fr_var;
fragP->fr_var = 0;
- donerelax = 1;
-#endif
-
break;
default:
@@ -2273,9 +2524,9 @@ md_convert_frag (headers, seg, fragP)
}
valueT
-DEFUN (md_section_align, (seg, size),
- segT seg AND
- valueT size)
+md_section_align (seg, size)
+ segT seg ATTRIBUTE_UNUSED;
+ valueT size;
{
#ifdef BFD_ASSEMBLER
#ifdef OBJ_ELF
@@ -2345,7 +2596,7 @@ sh_cons_align (nbytes)
return;
}
- p = frag_var (rs_align_code, 1, 1, (relax_substateT) 0,
+ p = frag_var (rs_align_test, 1, 1, (relax_substateT) 0,
(symbolS *) NULL, (offsetT) nalign, (char *) NULL);
record_alignment (now_seg, nalign);
@@ -2359,17 +2610,47 @@ void
sh_handle_align (frag)
fragS *frag;
{
+ int bytes = frag->fr_next->fr_address - frag->fr_address - frag->fr_fix;
+
+ if (frag->fr_type == rs_align_code)
+ {
+ static const unsigned char big_nop_pattern[] = { 0x00, 0x09 };
+ static const unsigned char little_nop_pattern[] = { 0x09, 0x00 };
+
+ char *p = frag->fr_literal + frag->fr_fix;
+
+ if (bytes & 1)
+ {
+ *p++ = 0;
+ bytes--;
+ frag->fr_fix += 1;
+ }
+
+ if (target_big_endian)
+ {
+ memcpy (p, big_nop_pattern, sizeof big_nop_pattern);
+ frag->fr_var = sizeof big_nop_pattern;
+ }
+ else
+ {
+ memcpy (p, little_nop_pattern, sizeof little_nop_pattern);
+ frag->fr_var = sizeof little_nop_pattern;
+ }
+ }
+ else if (frag->fr_type == rs_align_test)
+ {
+ if (bytes != 0)
+ as_warn_where (frag->fr_file, frag->fr_line, _("misaligned data"));
+ }
+
if (sh_relax
- && frag->fr_type == rs_align
+ && (frag->fr_type == rs_align
+ || frag->fr_type == rs_align_code)
&& frag->fr_address + frag->fr_fix > 0
&& frag->fr_offset > 1
&& now_seg != bss_section)
fix_new (frag, frag->fr_fix, 2, &abs_symbol, frag->fr_offset, 0,
BFD_RELOC_SH_ALIGN);
-
- if (frag->fr_type == rs_align_code
- && frag->fr_next->fr_address - frag->fr_address - frag->fr_fix != 0)
- as_warn_where (frag->fr_file, frag->fr_line, _("misaligned data"));
}
/* This macro decides whether a particular reloc is an entry in a
@@ -2407,7 +2688,9 @@ sh_force_relocation (fix)
{
if (fix->fx_r_type == BFD_RELOC_VTABLE_INHERIT
- || fix->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ || fix->fx_r_type == BFD_RELOC_VTABLE_ENTRY
+ || fix->fx_r_type == BFD_RELOC_SH_LOOP_START
+ || fix->fx_r_type == BFD_RELOC_SH_LOOP_END)
return 1;
if (! sh_relax)
@@ -2430,7 +2713,21 @@ sh_fix_adjustable (fixP)
if (fixP->fx_addsy == NULL)
return 1;
-
+
+ if (fixP->fx_r_type == BFD_RELOC_SH_PCDISP8BY2
+ || fixP->fx_r_type == BFD_RELOC_SH_PCDISP12BY2
+ || fixP->fx_r_type == BFD_RELOC_SH_PCRELIMM8BY2
+ || fixP->fx_r_type == BFD_RELOC_SH_PCRELIMM8BY4
+ || fixP->fx_r_type == BFD_RELOC_8_PCREL
+ || fixP->fx_r_type == BFD_RELOC_SH_SWITCH16
+ || fixP->fx_r_type == BFD_RELOC_SH_SWITCH32)
+ return 1;
+
+ if (! TC_RELOC_RTSYM_LOC_FIXUP (fixP)
+ || fixP->fx_r_type == BFD_RELOC_32_GOTOFF
+ || fixP->fx_r_type == BFD_RELOC_RVA)
+ 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)
@@ -2439,7 +2736,8 @@ sh_fix_adjustable (fixP)
return 1;
}
-void sh_elf_final_processing()
+void
+sh_elf_final_processing ()
{
int val;
@@ -2491,11 +2789,49 @@ md_apply_fix (fixP, val)
int shift;
#ifdef BFD_ASSEMBLER
- /* adjust_reloc_syms won't convert a reloc against a weak symbol
- into a reloc against a section, but bfd_install_relocation will
- screw up if the symbol is defined, so we have to adjust val here
- to avoid the screw up later. */
- if (fixP->fx_addsy != NULL
+ /* A difference between two symbols, the second of which is in the
+ current section, is transformed in a PC-relative relocation to
+ the other symbol. We have to adjust the relocation type here. */
+ if (fixP->fx_pcrel)
+ {
+ switch (fixP->fx_r_type)
+ {
+ default:
+ break;
+
+ case BFD_RELOC_32:
+ fixP->fx_r_type = BFD_RELOC_32_PCREL;
+ break;
+
+ /* Currently, we only support 32-bit PCREL relocations.
+ We'd need a new reloc type to handle 16_PCREL, and
+ 8_PCREL is already taken for R_SH_SWITCH8, which
+ apparently does something completely different than what
+ we need. FIXME. */
+ case BFD_RELOC_16:
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+
+ case BFD_RELOC_8:
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ }
+
+ /* The function adjust_reloc_syms won't convert a reloc against a weak
+ symbol into a reloc against a section, but bfd_install_relocation
+ will screw up if the symbol is defined, so we have to adjust val here
+ to avoid the screw up later.
+
+ For ordinary relocs, this does not happen for ELF, since for ELF,
+ bfd_install_relocation uses the "special function" field of the
+ howto, and does not execute the code that needs to be undone, as long
+ as the special function does not return bfd_reloc_continue.
+ It can happen for GOT- and PLT-type relocs the way they are
+ described in elf32-sh.c as they use bfd_elf_generic_reloc, but it
+ doesn't matter here since those relocs don't use VAL; see below. */
+ if (OUTPUT_FLAVOR != bfd_target_elf_flavour
+ && fixP->fx_addsy != NULL
&& S_IS_WEAK (fixP->fx_addsy))
val -= S_GET_VALUE (fixP->fx_addsy);
#endif
@@ -2554,7 +2890,7 @@ md_apply_fix (fixP, val)
Note that adding further restrictions may invalidate
reasonable looking assembly code, such as ``and -0x1,r0''. */
max = 0xff;
- min = - 0xff;
+ min = -0xff;
*buf++ = val;
break;
@@ -2594,40 +2930,19 @@ md_apply_fix (fixP, val)
case BFD_RELOC_SH_PCDISP12BY2:
val /= 2;
- if (val < -0x800 || val >= 0x7ff)
+ if (val < -0x800 || val > 0x7ff)
as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
buf[lowbyte] = val & 0xff;
buf[highbyte] |= (val >> 8) & 0xf;
break;
case BFD_RELOC_32:
- if (! target_big_endian)
- {
- *buf++ = val >> 0;
- *buf++ = val >> 8;
- *buf++ = val >> 16;
- *buf++ = val >> 24;
- }
- else
- {
- *buf++ = val >> 24;
- *buf++ = val >> 16;
- *buf++ = val >> 8;
- *buf++ = val >> 0;
- }
+ case BFD_RELOC_32_PCREL:
+ md_number_to_chars (buf, val, 4);
break;
case BFD_RELOC_16:
- if (! target_big_endian)
- {
- *buf++ = val >> 0;
- *buf++ = val >> 8;
- }
- else
- {
- *buf++ = val >> 8;
- *buf++ = val >> 0;
- }
+ md_number_to_chars (buf, val, 2);
break;
case BFD_RELOC_SH_USES:
@@ -2643,6 +2958,9 @@ md_apply_fix (fixP, val)
/* Nothing to do here. */
break;
+ case BFD_RELOC_SH_LOOP_START:
+ case BFD_RELOC_SH_LOOP_END:
+
case BFD_RELOC_VTABLE_INHERIT:
case BFD_RELOC_VTABLE_ENTRY:
fixP->fx_done = 0;
@@ -2652,6 +2970,43 @@ md_apply_fix (fixP, val)
return;
#endif
+#ifdef OBJ_ELF
+ case BFD_RELOC_32_PLT_PCREL:
+ /* Make the jump instruction point to the address of the operand. At
+ runtime we merely add the offset to the actual PLT entry. */
+ *valp = 0xfffffffc;
+ break;
+
+ case BFD_RELOC_SH_GOTPC:
+ /* This is tough to explain. We end up with this one if we have
+ operands that look like "_GLOBAL_OFFSET_TABLE_+[.-.L284]".
+ The goal here is to obtain the absolute address of the GOT,
+ and it is strongly preferable from a performance point of
+ view to avoid using a runtime relocation for this. There are
+ cases where you have something like:
+
+ .long _GLOBAL_OFFSET_TABLE_+[.-.L66]
+
+ and here no correction would be required. Internally in the
+ assembler we treat operands of this form as not being pcrel
+ since the '.' is explicitly mentioned, and I wonder whether
+ it would simplify matters to do it this way. Who knows. In
+ earlier versions of the PIC patches, the pcrel_adjust field
+ was used to store the correction, but since the expression is
+ not pcrel, I felt it would be confusing to do it this way. */
+ *valp -= 1;
+ md_number_to_chars (buf, val, 4);
+ break;
+
+ case BFD_RELOC_32_GOT_PCREL:
+ *valp = 0; /* Fully resolved at runtime. No addend. */
+ md_number_to_chars (buf, 0, 4);
+ break;
+
+ case BFD_RELOC_32_GOTOFF:
+ break;
+#endif
+
default:
abort ();
}
@@ -2682,64 +3037,73 @@ md_estimate_size_before_relax (fragP, segment_type)
register fragS *fragP;
register segT segment_type;
{
+ int what;
+
switch (fragP->fr_subtype)
{
+ default:
+ abort ();
+
case C (UNCOND_JUMP, UNDEF_DISP):
- /* used to be a branch to somewhere which was unknown */
+ /* Used to be a branch to somewhere which was unknown. */
if (!fragP->fr_symbol)
{
fragP->fr_subtype = C (UNCOND_JUMP, UNCOND12);
- fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND12)].rlx_length;
}
else if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
{
fragP->fr_subtype = C (UNCOND_JUMP, UNCOND12);
- fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND12)].rlx_length;
}
else
{
fragP->fr_subtype = C (UNCOND_JUMP, UNDEF_WORD_DISP);
- fragP->fr_var = md_relax_table[C (UNCOND_JUMP, UNCOND32)].rlx_length;
- return md_relax_table[C (UNCOND_JUMP, UNCOND32)].rlx_length;
}
break;
- default:
- abort ();
case C (COND_JUMP, UNDEF_DISP):
case C (COND_JUMP_DELAY, UNDEF_DISP):
- /* used to be a branch to somewhere which was unknown */
+ what = GET_WHAT (fragP->fr_subtype);
+ /* Used to be a branch to somewhere which was unknown. */
if (fragP->fr_symbol
&& S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
{
- int what = GET_WHAT (fragP->fr_subtype);
/* Got a symbol and it's defined in this segment, become byte
- sized - maybe it will fix up */
+ sized - maybe it will fix up. */
fragP->fr_subtype = C (what, COND8);
- fragP->fr_var = md_relax_table[C (what, COND8)].rlx_length;
}
else if (fragP->fr_symbol)
{
- int what = GET_WHAT (fragP->fr_subtype);
- /* Its got a segment, but its not ours, so it will always be long */
+ /* Its got a segment, but its not ours, so it will always be long. */
fragP->fr_subtype = C (what, UNDEF_WORD_DISP);
- fragP->fr_var = md_relax_table[C (what, COND32)].rlx_length;
- return md_relax_table[C (what, COND32)].rlx_length;
}
else
{
- int what = GET_WHAT (fragP->fr_subtype);
- /* We know the abs value */
+ /* We know the abs value. */
fragP->fr_subtype = C (what, COND8);
- fragP->fr_var = md_relax_table[C (what, COND8)].rlx_length;
}
+ break;
+ case C (UNCOND_JUMP, UNCOND12):
+ case C (UNCOND_JUMP, UNCOND32):
+ case C (UNCOND_JUMP, UNDEF_WORD_DISP):
+ case C (COND_JUMP, COND8):
+ case C (COND_JUMP, COND12):
+ case C (COND_JUMP, COND32):
+ case C (COND_JUMP, UNDEF_WORD_DISP):
+ case C (COND_JUMP_DELAY, COND8):
+ case C (COND_JUMP_DELAY, COND12):
+ case C (COND_JUMP_DELAY, COND32):
+ case C (COND_JUMP_DELAY, UNDEF_WORD_DISP):
+ /* When relaxing a section for the second time, we don't need to
+ do anything besides return the current size. */
break;
}
+
+ fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length;
return fragP->fr_var;
}
-/* Put number into target byte order */
+/* Put number into target byte order. */
void
md_number_to_chars (ptr, use, nbytes)
@@ -2771,36 +3135,6 @@ tc_coff_sizemachdep (frag)
#endif /* OBJ_COFF */
-/* When we align the .text section, insert the correct NOP pattern. */
-
-int
-sh_do_align (n, fill, len, max)
- int n;
- const char *fill;
- int len;
- int max;
-{
- if (fill == NULL
- && subseg_text_p (now_seg)
- && n > 1)
- {
- static const unsigned char big_nop_pattern[] = { 0x00, 0x09 };
- static const unsigned char little_nop_pattern[] = { 0x09, 0x00 };
-
- /* First align to a 2 byte boundary, in case there is an odd
- .byte. */
- frag_align (1, 0, 0);
- if (target_big_endian)
- frag_align_pattern (n, big_nop_pattern, sizeof big_nop_pattern, max);
- else
- frag_align_pattern (n, little_nop_pattern, sizeof little_nop_pattern,
- max);
- return 1;
- }
-
- return 0;
-}
-
#ifndef BFD_ASSEMBLER
#ifdef OBJ_COFF
@@ -2959,7 +3293,7 @@ sh_coff_reloc_mangle (seg, fix, intr, paddr)
arelent *
tc_gen_reloc (section, fixp)
- asection *section;
+ asection *section ATTRIBUTE_UNUSED;
fixS *fixp;
{
arelent *rel;
@@ -2993,8 +3327,18 @@ tc_gen_reloc (section, fixp)
else if (r_type == BFD_RELOC_VTABLE_INHERIT
|| r_type == BFD_RELOC_VTABLE_ENTRY)
rel->addend = fixp->fx_offset;
+ else if (r_type == BFD_RELOC_SH_LOOP_START
+ || r_type == BFD_RELOC_SH_LOOP_END)
+ rel->addend = fixp->fx_offset;
+ else if (r_type == BFD_RELOC_SH_LABEL && fixp->fx_pcrel)
+ {
+ rel->addend = 0;
+ rel->address = rel->addend = fixp->fx_offset;
+ }
else if (fixp->fx_pcrel)
rel->addend = fixp->fx_addnumber;
+ else if (r_type == BFD_RELOC_32 || r_type == BFD_RELOC_32_GOTOFF)
+ rel->addend = fixp->fx_addnumber;
else
rel->addend = 0;
diff --git a/gnu/usr.bin/binutils/gas/config/tc-sh.h b/gnu/usr.bin/binutils/gas/config/tc-sh.h
index f5ab8a91829..3c8279bbb1b 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-sh.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-sh.h
@@ -1,5 +1,6 @@
/* This file is tc-sh.h
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -41,6 +42,9 @@ extern int sh_small;
/* Don't try to break words. */
#define WORKING_DOT_WORD
+/* All SH instructions are multiples of 16 bits. */
+#define DWARF2_LINE_MIN_INSN_LENGTH 2
+
/* We require .long, et. al., to be aligned correctly. */
#define md_cons_align(nbytes) sh_cons_align (nbytes)
extern void sh_cons_align PARAMS ((int));
@@ -50,6 +54,8 @@ extern void sh_cons_align PARAMS ((int));
#define HANDLE_ALIGN(frag) sh_handle_align (frag)
extern void sh_handle_align PARAMS ((fragS *));
+#define MAX_MEM_FOR_RS_ALIGN_CODE (1 + 2)
+
/* We need to force out some relocations when relaxing. */
#define TC_FORCE_RELOCATION(fix) sh_force_relocation (fix)
extern int sh_force_relocation ();
@@ -58,6 +64,10 @@ extern int sh_force_relocation ();
#define obj_fix_adjustable(fixP) sh_fix_adjustable(fixP)
struct fix;
extern boolean sh_fix_adjustable PARAMS ((struct fix *));
+
+/* This arranges for gas/write.c to not apply a relocation if
+ obj_fix_adjustable() says it is not adjustable. */
+#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
#endif
#define IGNORE_NONSTANDARD_ESCAPES
@@ -69,11 +79,6 @@ extern boolean sh_fix_adjustable PARAMS ((struct fix *));
extern const struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
-/* We use a special alignment function to insert the correct nop
- pattern. */
-extern int sh_do_align PARAMS ((int, const char *, int, int));
-#define md_do_align(n,fill,len,max,l) if (sh_do_align (n,fill,len,max)) goto l
-
/* We record, for each section, whether we have most recently output a
CODE reloc or a DATA reloc. */
struct sh_segment_info_type
@@ -153,11 +158,49 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *));
/* Whether or not the target is big endian */
extern int target_big_endian;
+#ifdef TE_LINUX
+#define TARGET_FORMAT (shl ? "elf32-sh-linux" : "elf32-shbig-linux")
+#else
#define TARGET_FORMAT (shl ? "elf32-shl" : "elf32-sh")
+#endif
#define elf_tc_final_processing sh_elf_final_processing
extern void sh_elf_final_processing PARAMS ((void));
-#endif /* OBJ_ELF */
+#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
+
+#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
+
+/* This is the relocation type for direct references to
+ GLOBAL_OFFSET_TABLE. It comes up in complicated expressions such
+ as _GLOBAL_OFFSET_TABLE_+[.-.L284], which cannot be expressed
+ normally with the regular expressions. The fixup specified here
+ when used at runtime implies that we should add the address of the
+ GOT to the specified location, and as a result we have simplified
+ the expression into something we can use. */
+#define TC_RELOC_GLOBAL_OFFSET_TABLE BFD_RELOC_SH_GOTPC
+
+/* This expression evaluates to false if the relocation is for a local object
+ for which we still want to do the relocation at runtime. True if we
+ are willing to perform this relocation while building the .o file.
+ This is only used for pcrel relocations, so GOTOFF does not need to be
+ checked here. I am not sure if some of the others are ever used with
+ pcrel, but it is easier to be safe than sorry.
+
+ We can't resolve references to the GOT or the PLT when creating the
+ object file, since these tables are only created by the linker.
+ Also, if the symbol is global, weak, common or not defined, the
+ assembler can't compute the appropriate reloc, since its location
+ can only be determined at link time. */
+
+#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
+ ((FIX)->fx_r_type != BFD_RELOC_32_PLT_PCREL \
+ && (FIX)->fx_r_type != BFD_RELOC_32_GOT_PCREL \
+ && (FIX)->fx_r_type != BFD_RELOC_SH_GOTPC \
+ && ((FIX)->fx_addsy == NULL \
+ || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && S_IS_DEFINED ((FIX)->fx_addsy) \
+ && ! S_IS_COMMON ((FIX)->fx_addsy))))
-/* end of tc-sh.h */
+#endif /* OBJ_ELF */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-sparc.c b/gnu/usr.bin/binutils/gas/config/tc-sparc.c
index 149610e4699..558dc893f00 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-sparc.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-sparc.c
@@ -1,5 +1,7 @@
/* tc-sparc.c -- Assemble for the SPARC
- Copyright (C) 1989, 90-96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify
@@ -15,7 +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. */
+ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <ctype.h>
@@ -27,6 +29,7 @@
#ifdef OBJ_ELF
#include "elf/sparc.h"
+#include "dwarf2dbg.h"
#endif
static struct sparc_arch *lookup_arch PARAMS ((char *));
@@ -91,6 +94,9 @@ static enum sparc_opcode_arch_val warn_after_architecture;
has been used in -64. */
static int no_undeclared_regs;
+/* Non-zero if we should try to relax jumps and calls. */
+static int sparc_relax;
+
/* Non-zero if we are generating PIC code. */
int sparc_pic_code;
@@ -114,7 +120,7 @@ static symbolS *globals[8];
|| SPARC_OPCODE_ARCH_V9_P (max_architecture))
#endif
-/* handle of the OPCODE hash table */
+/* Handle of the OPCODE hash table. */
static struct hash_control *op_hash;
static int log2 PARAMS ((int));
@@ -130,7 +136,7 @@ static void s_register PARAMS ((int));
const pseudo_typeS md_pseudo_table[] =
{
- {"align", s_align_bytes, 0}, /* Defaulting is invalid (0) */
+ {"align", s_align_bytes, 0}, /* Defaulting is invalid (0). */
{"common", s_common, 0},
{"empty", s_empty, 0},
{"global", s_globl, 0},
@@ -147,7 +153,9 @@ const pseudo_typeS md_pseudo_table[] =
{"uaword", s_uacons, 4},
{"uaxword", s_uacons, 8},
#ifdef OBJ_ELF
- /* these are specific to sparc/svr4 */
+ {"file", dwarf2_directive_file, 0},
+ {"loc", dwarf2_directive_loc, 0},
+ /* These are specific to sparc/svr4. */
{"2byte", s_uacons, 2},
{"4byte", s_uacons, 4},
{"8byte", s_uacons, 8},
@@ -156,37 +164,40 @@ const pseudo_typeS md_pseudo_table[] =
{NULL, 0, 0},
};
-const int md_reloc_size = 12; /* Size of relocation record */
+/* Size of relocation record. */
+const int md_reloc_size = 12;
/* This array holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful */
-const char comment_chars[] = "!"; /* JF removed '|' from comment_chars */
+ pre-processor is disabled, these aren't very useful. */
+const char comment_chars[] = "!"; /* JF removed '|' from
+ comment_chars. */
/* This array holds the chars that only start a comment at the beginning of
a line. If the line seems to have the form '# 123 filename'
- .line and .file directives will appear in the pre-processed output */
+ .line and .file directives will appear in the pre-processed output. */
/* Note that input_file.c hand checks for '#' at the beginning of the
first line of the input file. This is because the compiler outputs
- #NO_APP at the beginning of its output. */
+ #NO_APP at the beginning of its output. */
/* Also note that comments started like this one will always
- work if '/' isn't otherwise defined. */
+ work if '/' isn't otherwise defined. */
const char line_comment_chars[] = "#";
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
-/* Chars that can be used to separate mant from exp in floating point nums */
+/* Chars that can be used to separate mant from exp in floating point
+ nums. */
const char EXP_CHARS[] = "eE";
-/* Chars that mean this number is a floating point constant */
-/* As in 0f12.456 */
-/* or 0d1.2345e12 */
+/* Chars that mean this number is a floating point constant.
+ As in 0f12.456
+ or 0d1.2345e12 */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be
changed in read.c. Ideally it shouldn't have to know about it at all,
but nothing is ideal around here. */
-#define isoctal(c) ((unsigned)((c) - '0') < '8')
+#define isoctal(c) ((unsigned) ((c) - '0') < '8')
struct sparc_it
{
@@ -210,7 +221,7 @@ static void output_insn
and file formats. */
enum sparc_arch_types {v6, v7, v8, sparclet, sparclite, sparc86x, v8plus,
- v8plusa, v9, v9a, v9_64};
+ v8plusa, v9, v9a, v9b, v9_64};
static struct sparc_arch {
char *name;
@@ -230,8 +241,10 @@ static struct sparc_arch {
{ "sparc86x", "sparclite", sparc86x, 32, 1 },
{ "v8plus", "v9", v9, 0, 1 },
{ "v8plusa", "v9a", v9, 0, 1 },
+ { "v8plusb", "v9b", v9, 0, 1 },
{ "v9", "v9", v9, 0, 1 },
{ "v9a", "v9a", v9, 0, 1 },
+ { "v9b", "v9b", v9, 0, 1 },
/* This exists to allow configure.in/Makefile.in to pass one
value to specify both the default machine and default word size. */
{ "v9-64", "v9", v9, 64, 0 },
@@ -294,7 +307,8 @@ sparc_target_format ()
return "a.out-sunos-big";
else if (default_arch_type == sparc86x && target_little_endian_data)
return "a.out-sunos-big";
- else return "a.out-sparc-little";
+ else
+ return "a.out-sparc-little";
#else
return "a.out-sunos-big";
#endif
@@ -320,8 +334,7 @@ sparc_target_format ()
abort ();
}
-/*
- * md_parse_option
+/* md_parse_option
* Invocation line includes a switch not recognized by the base assembler.
* See if it's a processor-specific option. These are:
*
@@ -330,16 +343,20 @@ sparc_target_format ()
*
* -Av6, -Av7, -Av8, -Asparclite, -Asparclet
* Standard 32 bit architectures.
- * -Av8plus, -Av8plusa
- * Sparc64 in a 32 bit world.
- * -Av9, -Av9a
+ * -Av9, -Av9a, -Av9b
* Sparc64 in either a 32 or 64 bit world (-32/-64 says which).
* This used to only mean 64 bits, but properly specifying it
* complicated gcc's ASM_SPECs, so now opcode selection is
* specified orthogonally to word size (except when specifying
* the default, but that is an internal implementation detail).
- * -xarch=v8plus, -xarch=v8plusa
- * Same as -Av8plus{,a}, for compatibility with Sun's assembler.
+ * -Av8plus, -Av8plusa, -Av8plusb
+ * Same as -Av9{,a,b}.
+ * -xarch=v8plus, -xarch=v8plusa, -xarch=v8plusb
+ * Same as -Av8plus{,a,b} -32, for compatibility with Sun's
+ * assembler.
+ * -xarch=v9, -xarch=v9a, -xarch=v9b
+ * Same as -Av9{,a,b} -64, for compatibility with Sun's
+ * assembler.
*
* Select the architecture and possibly the file format.
* Instructions or features not supported by the selected
@@ -348,7 +365,7 @@ sparc_target_format ()
* The default is to start at v6, and bump the architecture up
* whenever an instruction is seen at a higher level. In 32 bit
* environments, v9 is not bumped up to, the user must pass
- * -Av8plus{,a}.
+ * -Av8plus{,a,b}.
*
* If -bump is specified, a warning is printing when bumping to
* higher levels.
@@ -415,9 +432,14 @@ struct option md_longopts[] = {
#define OPTION_UNDECLARED_REGS (OPTION_MD_BASE + 13)
{"undeclared-regs", no_argument, NULL, OPTION_UNDECLARED_REGS},
#endif
+#define OPTION_RELAX (OPTION_MD_BASE + 14)
+ {"relax", no_argument, NULL, OPTION_RELAX},
+#define OPTION_NO_RELAX (OPTION_MD_BASE + 15)
+ {"no-relax", no_argument, NULL, OPTION_NO_RELAX},
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -437,15 +459,13 @@ md_parse_option (c, arg)
break;
case OPTION_XARCH:
- /* This is for compatibility with Sun's assembler. */
- if (strcmp (arg, "v8plus") != 0
- && strcmp (arg, "v8plusa") != 0)
- {
- as_bad (_("invalid architecture -xarch=%s"), arg);
- return 0;
- }
-
- /* fall through */
+#ifdef OBJ_ELF
+ if (strncmp (arg, "v9", 2) != 0)
+ md_parse_option (OPTION_32, NULL);
+ else
+ md_parse_option (OPTION_64, NULL);
+#endif
+ /* Fall through. */
case 'A':
{
@@ -456,7 +476,10 @@ md_parse_option (c, arg)
if (sa == NULL
|| ! sa->user_option_p)
{
- as_bad (_("invalid architecture -A%s"), arg);
+ if (c == OPTION_XARCH)
+ as_bad (_("invalid architecture -xarch=%s"), arg);
+ else
+ as_bad (_("invalid architecture -A%s"), arg);
return 0;
}
@@ -547,15 +570,15 @@ md_parse_option (c, arg)
case 'Q':
/* Qy - do emit .comment
- Qn - do not emit .comment */
+ Qn - do not emit .comment. */
break;
case 's':
- /* use .stab instead of .stab.excl */
+ /* Use .stab instead of .stab.excl. */
break;
case 'q':
- /* quick -- native assembler does fewer checks */
+ /* quick -- Native assembler does fewer checks. */
break;
case 'K':
@@ -574,6 +597,14 @@ md_parse_option (c, arg)
break;
#endif
+ case OPTION_RELAX:
+ sparc_relax = 1;
+ break;
+
+ case OPTION_NO_RELAX:
+ sparc_relax = 0;
+ break;
+
default:
return 0;
}
@@ -586,26 +617,49 @@ md_show_usage (stream)
FILE *stream;
{
const struct sparc_arch *arch;
+ int column;
/* We don't get a chance to initialize anything before we're called,
so handle that now. */
if (! default_init_p)
init_default_arch ();
- fprintf(stream, _("SPARC options:\n"));
+ fprintf (stream, _("SPARC options:\n"));
+ column = 0;
for (arch = &sparc_arch_table[0]; arch->name; arch++)
{
+ if (!arch->user_option_p)
+ continue;
if (arch != &sparc_arch_table[0])
fprintf (stream, " | ");
- if (arch->user_option_p)
- fprintf (stream, "-A%s", arch->name);
+ if (column + strlen(arch->name) > 70)
+ {
+ column = 0;
+ fputc ('\n', stream);
+ }
+ column += 5 + 2 + strlen(arch->name);
+ fprintf (stream, "-A%s", arch->name);
}
- fprintf (stream, _("\n-xarch=v8plus | -xarch=v8plusa\n"));
- fprintf (stream, _("\
+ for (arch = &sparc_arch_table[0]; arch->name; arch++)
+ {
+ if (!arch->user_option_p)
+ continue;
+ fprintf (stream, " | ");
+ if (column + strlen(arch->name) > 65)
+ {
+ column = 0;
+ fputc ('\n', stream);
+ }
+ column += 5 + 7 + strlen(arch->name);
+ fprintf (stream, "-xarch=%s", arch->name);
+ }
+ fprintf (stream, _("\n\
specify variant of SPARC architecture\n\
-bump warn when assembler switches architectures\n\
-sparc ignored\n\
---enforce-aligned-data force .long, etc., to be aligned correctly\n"));
+--enforce-aligned-data force .long, etc., to be aligned correctly\n\
+-relax relax jumps and branches (default)\n\
+-no-relax avoid changing any jumps and branches\n"));
#ifdef OBJ_AOUT
fprintf (stream, _("\
-k generate PIC\n"));
@@ -642,7 +696,7 @@ md_show_usage (stream)
#endif
}
-/* native operand size opcode translation */
+/* Native operand size opcode translation. */
struct
{
char *name;
@@ -663,13 +717,13 @@ struct
{NULL, NULL, NULL},
};
-/* sparc64 priviledged registers */
+/* sparc64 priviledged registers. */
struct priv_reg_entry
- {
- char *name;
- int regnum;
- };
+{
+ char *name;
+ int regnum;
+};
struct priv_reg_entry priv_reg_table[] =
{
@@ -690,14 +744,16 @@ struct priv_reg_entry priv_reg_table[] =
{"wstate", 14},
{"fq", 15},
{"ver", 31},
- {"", -1}, /* end marker */
+ {"", -1}, /* End marker. */
};
-/* v9a specific asrs */
+/* v9a specific asrs. */
struct priv_reg_entry v9a_asr_table[] =
{
{"tick_cmpr", 23},
+ {"sys_tick_cmpr", 25},
+ {"sys_tick", 24},
{"softint", 22},
{"set_softint", 20},
{"pic", 17},
@@ -705,7 +761,7 @@ struct priv_reg_entry v9a_asr_table[] =
{"gsr", 19},
{"dcr", 18},
{"clear_softint", 21},
- {"", -1}, /* end marker */
+ {"", -1}, /* End marker. */
};
static int
@@ -720,7 +776,8 @@ cmp_reg_entry (parg, qarg)
}
/* This function is called once, at assembler startup time. It should
- set up all the tables, etc. that the MD part of the assembler will need. */
+ set up all the tables, etc. that the MD part of the assembler will
+ need. */
void
md_begin ()
@@ -764,15 +821,16 @@ md_begin ()
for (i = 0; native_op_table[i].name; i++)
{
const struct sparc_opcode *insn;
- char *name = sparc_arch_size == 32 ? native_op_table[i].name32 :
- native_op_table[i].name64;
- insn = (struct sparc_opcode *)hash_find (op_hash, name);
+ char *name = ((sparc_arch_size == 32)
+ ? native_op_table[i].name32
+ : native_op_table[i].name64);
+ insn = (struct sparc_opcode *) hash_find (op_hash, name);
if (insn == NULL)
- {
- as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"),
- name, native_op_table[i].name);
- lose = 1;
- }
+ {
+ as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"),
+ name, native_op_table[i].name);
+ lose = 1;
+ }
else
{
retval = hash_insert (op_hash, native_op_table[i].name, (PTR) insn);
@@ -821,31 +879,28 @@ md_begin ()
void
sparc_md_end ()
{
+ unsigned long mach = bfd_mach_sparc;
+
if (sparc_arch_size == 64)
- {
- if (current_architecture == SPARC_OPCODE_ARCH_V9A)
- bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v9a);
- else
- bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v9);
- }
+ switch (current_architecture)
+ {
+ case SPARC_OPCODE_ARCH_V9A: mach = bfd_mach_sparc_v9a; break;
+ case SPARC_OPCODE_ARCH_V9B: mach = bfd_mach_sparc_v9b; break;
+ default: mach = bfd_mach_sparc_v9; break;
+ }
else
- {
- if (current_architecture == SPARC_OPCODE_ARCH_V9)
- bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v8plus);
- else if (current_architecture == SPARC_OPCODE_ARCH_V9A)
- bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v8plusa);
- else if (current_architecture == SPARC_OPCODE_ARCH_SPARCLET)
- bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_sparclet);
- else if (default_arch_type == sparc86x && target_little_endian_data)
- bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_sparclite_le);
- else
- {
- /* The sparclite is treated like a normal sparc. Perhaps it shouldn't
- be but for now it is (since that's the way it's always been
- treated). */
- bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc);
- }
- }
+ switch (current_architecture)
+ {
+ case SPARC_OPCODE_ARCH_SPARCLET: mach = bfd_mach_sparc_sparclet; break;
+ case SPARC_OPCODE_ARCH_V9: mach = bfd_mach_sparc_v8plus; break;
+ case SPARC_OPCODE_ARCH_V9A: mach = bfd_mach_sparc_v8plusa; break;
+ case SPARC_OPCODE_ARCH_V9B: mach = bfd_mach_sparc_v8plusb; break;
+ /* The sparclite is treated like a normal sparc. Perhaps it shouldn't
+ be but for now it is (since that's the way it's always been
+ treated). */
+ default: break;
+ }
+ bfd_set_arch_mach (stdoutput, bfd_arch_sparc, mach);
}
/* Return non-zero if VAL is in the range -(MAX+1) to MAX. */
@@ -860,7 +915,7 @@ in_signed_range (val, max)
0xffffffff is always considered -1 on sparc32. */
if (sparc_arch_size == 32)
{
- bfd_signed_vma sign = (bfd_signed_vma)1 << 31;
+ bfd_signed_vma sign = (bfd_signed_vma) 1 << 31;
val = ((val & 0xffffffff) ^ sign) - sign;
}
if (val > max)
@@ -950,6 +1005,7 @@ static const struct sparc_opcode *last_insn;
static unsigned long last_opcode;
/* Handle the set and setuw synthetic instructions. */
+
static void
synthetize_setuw (insn)
const struct sparc_opcode *insn;
@@ -961,18 +1017,18 @@ synthetize_setuw (insn)
{
if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
{
- if (sizeof(offsetT) > 4
+ if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < 0
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff))
as_warn (_("set: number not in 0..4294967295 range"));
}
else
{
- if (sizeof(offsetT) > 4
+ if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < -(offsetT) 0x80000000
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff))
as_warn (_("set: number not in -2147483648..4294967295 range"));
- the_insn.exp.X_add_number = (int)the_insn.exp.X_add_number;
+ the_insn.exp.X_add_number = (int) the_insn.exp.X_add_number;
}
}
@@ -983,10 +1039,10 @@ synthetize_setuw (insn)
{
the_insn.opcode = (SETHI_INSN | RD (rd)
| ((the_insn.exp.X_add_number >> 10)
- & (the_insn.exp.X_op == O_constant ? 0x3fffff : 0)));
+ & (the_insn.exp.X_op == O_constant
+ ? 0x3fffff : 0)));
the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_HI22
- : BFD_RELOC_NONE);
+ ? BFD_RELOC_HI22 : BFD_RELOC_NONE);
output_insn (insn, &the_insn);
need_hi22_p = 1;
}
@@ -999,16 +1055,16 @@ synthetize_setuw (insn)
the_insn.opcode = (OR_INSN | (need_hi22_p ? RS1 (rd) : 0)
| RD (rd) | IMMED
| (the_insn.exp.X_add_number
- & (the_insn.exp.X_op != O_constant ? 0 :
- need_hi22_p ? 0x3ff : 0x1fff)));
+ & (the_insn.exp.X_op != O_constant
+ ? 0 : need_hi22_p ? 0x3ff : 0x1fff)));
the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_LO10
- : BFD_RELOC_NONE);
+ ? BFD_RELOC_LO10 : BFD_RELOC_NONE);
output_insn (insn, &the_insn);
}
}
-
+
/* Handle the setsw synthetic instruction. */
+
static void
synthetize_setsw (insn)
const struct sparc_opcode *insn;
@@ -1028,13 +1084,13 @@ synthetize_setsw (insn)
return;
}
- if (sizeof(offsetT) > 4
+ if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < -(offsetT) 0x80000000
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff))
as_warn (_("setsw: number not in -2147483648..4294967295 range"));
- low32 = the_insn.exp.X_add_number;
-
+ low32 = the_insn.exp.X_add_number;
+
if (low32 >= 0)
{
synthetize_setuw (insn);
@@ -1042,7 +1098,7 @@ synthetize_setsw (insn)
}
opc = OR_INSN;
-
+
the_insn.reloc = BFD_RELOC_NONE;
/* See if operand is absolute and small; skip sethi if so. */
if (low32 < -(1 << 12))
@@ -1060,6 +1116,7 @@ synthetize_setsw (insn)
}
/* Handle the setsw synthetic instruction. */
+
static void
synthetize_setx (insn)
const struct sparc_opcode *insn;
@@ -1070,7 +1127,7 @@ synthetize_setx (insn)
int upper_dstreg;
int need_hh22_p = 0, need_hm10_p = 0, need_hi22_p = 0, need_lo10_p = 0;
int need_xor10_p = 0;
-
+
#define SIGNEXT32(x) ((((x) & 0xffffffff) ^ 0x80000000) - 0x80000000)
lower32 = SIGNEXT32 (the_insn.exp.X_add_number);
upper32 = SIGNEXT32 (BSR (the_insn.exp.X_add_number, 32));
@@ -1098,7 +1155,8 @@ synthetize_setx (insn)
return;
}
need_hh22_p = need_hm10_p = need_hi22_p = need_lo10_p = 1;
- lower32 = 0; upper32 = 0;
+ lower32 = 0;
+ upper32 = 0;
}
else
{
@@ -1106,18 +1164,18 @@ synthetize_setx (insn)
Otherwise fixup_segment will complain about not being able to
write an 8 byte number in a 4 byte field. */
the_insn.exp.X_add_number = 0;
-
+
/* Only need hh22 if `or' insn can't handle constant. */
if (upper32 < -(1 << 12) || upper32 >= (1 << 12))
need_hh22_p = 1;
-
+
/* Does bottom part (after sethi) have bits? */
if ((need_hh22_p && (upper32 & 0x3ff) != 0)
/* No hh22, but does upper32 still have bits we can't set
from lower32? */
|| (! need_hh22_p && upper32 != 0 && upper32 != -1))
need_hm10_p = 1;
-
+
/* If the lower half is all zero, we build the upper half directly
into the dst reg. */
if (lower32 != 0
@@ -1131,7 +1189,7 @@ synthetize_setx (insn)
|| (lower32 < 0 && upper32 != -1)
|| (lower32 >= 0 && upper32 == -1))
need_hi22_p = 1;
-
+
if (need_hi22_p && upper32 == -1)
need_xor10_p = 1;
@@ -1147,7 +1205,7 @@ synthetize_setx (insn)
/* Output directly to dst reg if lower 32 bits are all zero. */
upper_dstreg = dstreg;
}
-
+
if (!upper_dstreg && dstreg)
as_warn (_("setx: illegal temporary register g0"));
@@ -1159,12 +1217,12 @@ synthetize_setx (insn)
? BFD_RELOC_SPARC_HH22 : BFD_RELOC_NONE);
output_insn (insn, &the_insn);
}
-
+
if (need_hi22_p)
{
the_insn.opcode = (SETHI_INSN | RD (dstreg)
| (((need_xor10_p ? ~lower32 : lower32)
- >> 10) & 0x3fffff));
+ >> 10) & 0x3fffff));
the_insn.reloc = (the_insn.exp.X_op != O_constant
? BFD_RELOC_SPARC_LM22 : BFD_RELOC_NONE);
output_insn (insn, &the_insn);
@@ -1181,7 +1239,7 @@ synthetize_setx (insn)
? BFD_RELOC_SPARC_HM10 : BFD_RELOC_NONE);
output_insn (insn, &the_insn);
}
-
+
if (need_lo10_p)
{
/* FIXME: One nice optimization to do here is to OR the low part
@@ -1195,7 +1253,7 @@ synthetize_setx (insn)
? BFD_RELOC_LO10 : BFD_RELOC_NONE);
output_insn (insn, &the_insn);
}
-
+
/* If we needed to build the upper part, shift it into place. */
if (need_hh22_p || need_hm10_p)
{
@@ -1204,7 +1262,7 @@ synthetize_setx (insn)
the_insn.reloc = BFD_RELOC_NONE;
output_insn (insn, &the_insn);
}
-
+
/* To get -1 in upper32, we do sethi %hi(~x), r; xor r, -0x400 | x, r. */
if (need_xor10_p)
{
@@ -1268,14 +1326,14 @@ md_assemble (str)
switch (special_case)
{
case SPECIAL_CASE_NONE:
- /* normal insn */
+ /* Normal insn. */
output_insn (insn, &the_insn);
break;
case SPECIAL_CASE_SETSW:
synthetize_setsw (insn);
break;
-
+
case SPECIAL_CASE_SET:
synthetize_setuw (insn);
break;
@@ -1283,24 +1341,24 @@ md_assemble (str)
case SPECIAL_CASE_SETX:
synthetize_setx (insn);
break;
-
+
case SPECIAL_CASE_FDIV:
{
int rd = (the_insn.opcode >> 25) & 0x1f;
-
+
output_insn (insn, &the_insn);
-
+
/* According to information leaked from Sun, the "fdiv" instructions
on early SPARC machines would produce incorrect results sometimes.
The workaround is to add an fmovs of the destination register to
itself just after the instruction. This was true on machines
- with Weitek 1165 float chips, such as the Sun-4/260 and /280. */
+ with Weitek 1165 float chips, such as the Sun-4/260 and /280. */
assert (the_insn.reloc == BFD_RELOC_NONE);
the_insn.opcode = FMOVS_INSN | rd | RD (rd);
output_insn (insn, &the_insn);
return;
}
-
+
default:
as_fatal (_("failed special case insn sanity check"));
}
@@ -1341,8 +1399,7 @@ sparc_ip (str, pinsn)
case ',':
comma = 1;
-
- /*FALLTHROUGH */
+ /* Fall through. */
case ' ':
*s++ = '\0';
@@ -1371,10 +1428,8 @@ sparc_ip (str, pinsn)
the_insn.reloc = BFD_RELOC_NONE;
v9_arg_p = 0;
- /*
- * Build the opcode, checking as we go to make
- * sure that the operands match
- */
+ /* Build the opcode, checking as we go to make sure that the
+ operands match. */
for (args = insn->args;; ++args)
{
switch (*args)
@@ -1397,10 +1452,12 @@ sparc_ip (str, pinsn)
goto error;
}
kmask |= mask;
- while (*s == ' ') { ++s; continue; }
+ while (*s == ' ')
+ ++s;
if (*s == '|' || *s == '+')
++s;
- while (*s == ' ') { ++s; continue; }
+ while (*s == ' ')
+ ++s;
}
}
else
@@ -1421,6 +1478,24 @@ sparc_ip (str, pinsn)
continue;
}
+ case '3':
+ {
+ int smask = 0;
+
+ if (! parse_const_expr_arg (&s, &smask))
+ {
+ error_message = _(": invalid siam mode expression");
+ goto error;
+ }
+ if (smask < 0 || smask > 7)
+ {
+ error_message = _(": invalid siam mode number");
+ goto error;
+ }
+ opcode |= smask;
+ continue;
+ }
+
case '*':
{
int fcn = 0;
@@ -1457,7 +1532,7 @@ sparc_ip (str, pinsn)
if (*s == '%')
{
struct priv_reg_entry *p = priv_reg_table;
- unsigned int len = 9999999; /* init to make gcc happy */
+ unsigned int len = 9999999; /* Init to make gcc happy. */
s += 1;
while (p->name[0] > s[0])
@@ -1489,11 +1564,11 @@ sparc_ip (str, pinsn)
case '_':
case '/':
- /* Parse a v9a ancillary state register. */
+ /* Parse a v9a/v9b ancillary state register. */
if (*s == '%')
{
struct priv_reg_entry *p = v9a_asr_table;
- unsigned int len = 9999999; /* init to make gcc happy */
+ unsigned int len = 9999999; /* Init to make gcc happy. */
s += 1;
while (p->name[0] > s[0])
@@ -1507,14 +1582,22 @@ sparc_ip (str, pinsn)
}
if (p->name[0] != s[0])
{
- error_message = _(": unrecognizable v9a ancillary state register");
+ error_message = _(": unrecognizable v9a or v9b ancillary state register");
goto error;
}
if (*args == '/' && (p->regnum == 20 || p->regnum == 21))
{
error_message = _(": rd on write only ancillary state register");
goto error;
- }
+ }
+ if (p->regnum >= 24
+ && (insn->architecture
+ & SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A)))
+ {
+ /* %sys_tick and %sys_tick_cmpr are v9bnotv9a */
+ error_message = _(": unrecognizable v9a ancillary state register");
+ goto error;
+ }
if (*args == '/')
opcode |= (p->regnum << 14);
else
@@ -1524,7 +1607,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = _(": unrecognizable v9a ancillary state register");
+ error_message = _(": unrecognizable v9a or v9b ancillary state register");
goto error;
}
@@ -1569,7 +1652,7 @@ sparc_ip (str, pinsn)
error_message = _(": expecting %asrN");
goto error;
}
- } /* if %asr */
+ } /* if %asr */
break;
case 'I':
@@ -1714,7 +1797,7 @@ sparc_ip (str, pinsn)
}
break;
- case '\0': /* end of args */
+ case '\0': /* End of args. */
if (*s == '\0')
{
match = 1;
@@ -1733,7 +1816,7 @@ sparc_ip (str, pinsn)
}
break;
- case '[': /* these must match exactly */
+ case '[': /* These must match exactly. */
case ']':
case ',':
case ' ':
@@ -1741,7 +1824,7 @@ sparc_ip (str, pinsn)
continue;
break;
- case '#': /* must be at least one digit */
+ case '#': /* Must be at least one digit. */
if (isdigit ((unsigned char) *s++))
{
while (isdigit ((unsigned char) *s))
@@ -1752,7 +1835,7 @@ sparc_ip (str, pinsn)
}
break;
- case 'C': /* coprocessor state register */
+ case 'C': /* Coprocessor state register. */
if (strncmp (s, "%csr", 4) == 0)
{
s += 4;
@@ -1760,7 +1843,7 @@ sparc_ip (str, pinsn)
}
break;
- case 'b': /* next operand is a coprocessor register */
+ case 'b': /* Next operand is a coprocessor register. */
case 'c':
case 'D':
if (*s++ == '%' && *s++ == 'c' && isdigit ((unsigned char) *s))
@@ -1893,7 +1976,7 @@ sparc_ip (str, pinsn)
}
if ((mask & ~1) == 2 && sparc_arch_size == 64
- && no_undeclared_regs && ! globals [mask])
+ && no_undeclared_regs && ! globals[mask])
as_bad (_("detected global register use not covered by .register pseudo-op"));
/* Got the register, now figure out where
@@ -1987,7 +2070,7 @@ sparc_ip (str, pinsn)
else
{
break;
- } /* if not an 'f' register. */
+ } /* if not an 'f' register. */
switch (*args)
{
@@ -1997,7 +2080,6 @@ sparc_ip (str, pinsn)
opcode |= RS1 (mask);
continue;
-
case 'f':
case 'B':
case 'R':
@@ -2009,11 +2091,11 @@ sparc_ip (str, pinsn)
case 'J':
opcode |= RD (mask);
continue;
- } /* pack it in. */
+ } /* Pack it in. */
know (0);
break;
- } /* float arg */
+ } /* float arg */
case 'F':
if (strncmp (s, "%fsr", 4) == 0)
@@ -2023,26 +2105,26 @@ sparc_ip (str, pinsn)
}
break;
- case '0': /* 64 bit immediate (set, setsw, setx insn) */
- the_insn.reloc = BFD_RELOC_NONE; /* reloc handled elsewhere */
+ case '0': /* 64 bit immediate (set, setsw, setx insn) */
+ the_insn.reloc = BFD_RELOC_NONE; /* reloc handled elsewhere */
goto immediate;
- case 'l': /* 22 bit PC relative immediate */
+ case 'l': /* 22 bit PC relative immediate */
the_insn.reloc = BFD_RELOC_SPARC_WDISP22;
the_insn.pcrel = 1;
goto immediate;
- case 'L': /* 30 bit immediate */
+ case 'L': /* 30 bit immediate */
the_insn.reloc = BFD_RELOC_32_PCREL_S2;
the_insn.pcrel = 1;
goto immediate;
case 'h':
- case 'n': /* 22 bit immediate */
+ case 'n': /* 22 bit immediate */
the_insn.reloc = BFD_RELOC_SPARC22;
goto immediate;
- case 'i': /* 13 bit immediate */
+ case 'i': /* 13 bit immediate */
the_insn.reloc = BFD_RELOC_SPARC13;
/* fallthrough */
@@ -2086,16 +2168,16 @@ sparc_ip (str, pinsn)
{ "l44", 3, BFD_RELOC_SPARC_L44, 1, 0 },
{ "uhi", 3, BFD_RELOC_SPARC_HH22, 1, 0 },
{ "ulo", 3, BFD_RELOC_SPARC_HM10, 1, 0 },
- { NULL }
+ { NULL, 0, 0, 0, 0 }
};
const struct ops *o;
-
+
for (o = ops; o->name; o++)
if (strncmp (s + 1, o->name, o->len) == 0)
break;
if (o->name == NULL)
break;
-
+
if (s[o->len + 1] != '(')
{
as_bad (_("Illegal operands: %%%s requires arguments in ()"), o->name);
@@ -2137,7 +2219,7 @@ sparc_ip (str, pinsn)
as_bad (_("Illegal operands: %%%s requires arguments in ()"), op_arg);
return special_case;
}
-
+
*s1 = '\0';
(void) get_expression (s);
*s1 = ')';
@@ -2152,10 +2234,11 @@ sparc_ip (str, pinsn)
*s1 = '0';
s = s1;
op_exp = the_insn.exp;
- memset (&the_insn.exp, 0, sizeof(the_insn.exp));
+ memset (&the_insn.exp, 0, sizeof (the_insn.exp));
}
- for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++) ;
+ for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++)
+ ;
if (s1 != s && isdigit ((unsigned char) s1[-1]))
{
@@ -2210,7 +2293,7 @@ sparc_ip (str, pinsn)
case BFD_RELOC_SPARC_HH22:
val = BSR (val, 32);
- /* intentional fallthrough */
+ /* Fall through. */
case BFD_RELOC_SPARC_LM22:
case BFD_RELOC_HI22:
@@ -2219,7 +2302,7 @@ sparc_ip (str, pinsn)
case BFD_RELOC_SPARC_HM10:
val = BSR (val, 32);
- /* intentional fallthrough */
+ /* Fall through. */
case BFD_RELOC_LO10:
val &= 0x3ff;
@@ -2240,7 +2323,7 @@ sparc_ip (str, pinsn)
break;
case BFD_RELOC_SPARC_HIX22:
- val = ~ val;
+ val = ~val;
val = (val >> 10) & 0x3fffff;
break;
@@ -2335,7 +2418,7 @@ sparc_ip (str, pinsn)
}
opcode |= ASI (asi);
continue;
- } /* alternate space */
+ } /* Alternate space. */
case 'p':
if (strncmp (s, "%psr", 4) == 0)
@@ -2345,7 +2428,7 @@ sparc_ip (str, pinsn)
}
break;
- case 'q': /* floating point queue */
+ case 'q': /* Floating point queue. */
if (strncmp (s, "%fq", 3) == 0)
{
s += 3;
@@ -2353,7 +2436,7 @@ sparc_ip (str, pinsn)
}
break;
- case 'Q': /* coprocessor queue */
+ case 'Q': /* Coprocessor queue. */
if (strncmp (s, "%cq", 3) == 0)
{
s += 3;
@@ -2459,16 +2542,16 @@ sparc_ip (str, pinsn)
default:
as_fatal (_("failed sanity check."));
- } /* switch on arg code */
+ } /* switch on arg code. */
/* Break out of for() loop. */
break;
- } /* for each arg that we expect */
+ } /* For each arg that we expect. */
error:
if (match == 0)
{
- /* Args don't match. */
+ /* Args don't match. */
if (&insn[1] - sparc_opcodes < sparc_num_opcodes
&& (insn->name == insn[1].name
|| !strcmp (insn->name, insn[1].name)))
@@ -2485,20 +2568,25 @@ sparc_ip (str, pinsn)
}
else
{
- /* We have a match. Now see if the architecture is ok. */
+ /* We have a match. Now see if the architecture is OK. */
int needed_arch_mask = insn->architecture;
if (v9_arg_p)
{
- needed_arch_mask &= ~ ((1 << SPARC_OPCODE_ARCH_V9)
- | (1 << SPARC_OPCODE_ARCH_V9A));
- needed_arch_mask |= (1 << SPARC_OPCODE_ARCH_V9);
+ needed_arch_mask &=
+ ~(SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9) - 1);
+ if (! needed_arch_mask)
+ needed_arch_mask =
+ SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9);
}
- if (needed_arch_mask & SPARC_OPCODE_SUPPORTED (current_architecture))
- ; /* ok */
+ if (needed_arch_mask
+ & SPARC_OPCODE_SUPPORTED (current_architecture))
+ /* OK. */
+ ;
/* Can we bump up the architecture? */
- else if (needed_arch_mask & SPARC_OPCODE_SUPPORTED (max_architecture))
+ else if (needed_arch_mask
+ & SPARC_OPCODE_SUPPORTED (max_architecture))
{
enum sparc_opcode_arch_val needed_architecture =
sparc_ffs (SPARC_OPCODE_SUPPORTED (max_architecture)
@@ -2523,12 +2611,12 @@ sparc_ip (str, pinsn)
happen but what about tomorrow? */
else
{
- int arch,printed_one_p = 0;
+ int arch, printed_one_p = 0;
char *p;
char required_archs[SPARC_OPCODE_ARCH_MAX * 16];
/* Create a list of the architectures that support the insn. */
- needed_arch_mask &= ~ SPARC_OPCODE_SUPPORTED (max_architecture);
+ needed_arch_mask &= ~SPARC_OPCODE_SUPPORTED (max_architecture);
p = required_archs;
arch = sparc_ffs (needed_arch_mask);
while ((1 << arch) <= needed_arch_mask)
@@ -2550,10 +2638,10 @@ sparc_ip (str, pinsn)
sparc_opcode_archs[max_architecture].name);
return special_case;
}
- } /* if no match */
+ } /* If no match. */
break;
- } /* forever looking for a match */
+ } /* Forever looking for a match. */
the_insn.opcode = opcode;
return special_case;
@@ -2659,18 +2747,18 @@ output_insn (insn, the_insn)
{
char *toP = frag_more (4);
- /* put out the opcode */
+ /* Put out the opcode. */
if (INSN_BIG_ENDIAN)
number_to_chars_bigendian (toP, (valueT) the_insn->opcode, 4);
else
number_to_chars_littleendian (toP, (valueT) the_insn->opcode, 4);
- /* put out the symbol-dependent stuff */
+ /* Put out the symbol-dependent stuff. */
if (the_insn->reloc != BFD_RELOC_NONE)
{
- fixS *fixP = fix_new_exp (frag_now, /* which frag */
- (toP - frag_now->fr_literal), /* where */
- 4, /* size */
+ fixS *fixP = fix_new_exp (frag_now, /* Which frag. */
+ (toP - frag_now->fr_literal), /* Where. */
+ 4, /* Size. */
&the_insn->exp,
the_insn->pcrel,
the_insn->reloc);
@@ -2685,18 +2773,21 @@ output_insn (insn, the_insn)
last_insn = insn;
last_opcode = the_insn->opcode;
+
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (4);
+#endif
}
-/*
- This is identical to the md_atof in m68k.c. I think this is right,
- but I'm not sure.
+/* This is identical to the md_atof in m68k.c. I think this is right,
+ but I'm not sure.
- Turn a string in input_line_pointer into a floating point constant of type
- type, and store the appropriate bytes in *litP. The number of LITTLENUMS
- emitted is stored in *sizeP . An error message is returned, or NULL on OK.
- */
+ Turn a string in input_line_pointer into a floating point constant
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
+ returned, or NULL on OK. */
-/* Equal to MAX_PRECISION in atof-ieee.c */
+/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
char *
@@ -2705,7 +2796,7 @@ md_atof (type, litP, sizeP)
char *litP;
int *sizeP;
{
- int i,prec;
+ int i, prec;
LITTLENUM_TYPE words[MAX_LITTLENUMS];
char *t;
@@ -2749,7 +2840,8 @@ md_atof (type, litP, sizeP)
{
for (i = 0; i < prec; i++)
{
- md_number_to_chars (litP, (valueT) words[i], sizeof (LITTLENUM_TYPE));
+ md_number_to_chars (litP, (valueT) words[i],
+ sizeof (LITTLENUM_TYPE));
litP += sizeof (LITTLENUM_TYPE);
}
}
@@ -2757,11 +2849,12 @@ md_atof (type, litP, sizeP)
{
for (i = prec - 1; i >= 0; i--)
{
- md_number_to_chars (litP, (valueT) words[i], sizeof (LITTLENUM_TYPE));
+ md_number_to_chars (litP, (valueT) words[i],
+ sizeof (LITTLENUM_TYPE));
litP += sizeof (LITTLENUM_TYPE);
}
}
-
+
return 0;
}
@@ -2778,14 +2871,15 @@ md_number_to_chars (buf, val, n)
number_to_chars_bigendian (buf, val, n);
else if (target_little_endian_data
&& ((n == 4 || n == 2) && ~now_seg->flags & SEC_ALLOC))
- /* Output debug words, which are not in allocated sections, as big endian */
+ /* Output debug words, which are not in allocated sections, as big
+ endian. */
number_to_chars_bigendian (buf, val, n);
else if (target_little_endian_data || ! target_big_endian)
number_to_chars_littleendian (buf, val, n);
}
/* Apply a fixS to the frags, now that we know the value it ought to
- hold. */
+ hold. */
int
md_apply_fix3 (fixP, value, segment)
@@ -2801,7 +2895,7 @@ md_apply_fix3 (fixP, value, segment)
assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
- fixP->fx_addnumber = val; /* Remember value for emit_reloc */
+ fixP->fx_addnumber = val; /* Remember value for emit_reloc. */
#ifdef OBJ_ELF
/* FIXME: SPARC ELF relocations don't use an addend in the data
@@ -2877,20 +2971,23 @@ md_apply_fix3 (fixP, value, segment)
/* If this is a data relocation, just output VAL. */
- if (fixP->fx_r_type == BFD_RELOC_16)
+ if (fixP->fx_r_type == BFD_RELOC_16
+ || fixP->fx_r_type == BFD_RELOC_SPARC_UA16)
{
md_number_to_chars (buf, val, 2);
}
else if (fixP->fx_r_type == BFD_RELOC_32
+ || fixP->fx_r_type == BFD_RELOC_SPARC_UA32
|| fixP->fx_r_type == BFD_RELOC_SPARC_REV32)
{
md_number_to_chars (buf, val, 4);
}
- else if (fixP->fx_r_type == BFD_RELOC_64)
+ else if (fixP->fx_r_type == BFD_RELOC_64
+ || fixP->fx_r_type == BFD_RELOC_SPARC_UA64)
{
md_number_to_chars (buf, val, 8);
}
- else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
{
fixP->fx_done = 0;
@@ -2904,7 +3001,7 @@ md_apply_fix3 (fixP, value, segment)
insn = bfd_getb32 ((unsigned char *) buf);
else
insn = bfd_getl32 ((unsigned char *) buf);
-
+
switch (fixP->fx_r_type)
{
case BFD_RELOC_32_PCREL_S2:
@@ -2915,7 +3012,91 @@ md_apply_fix3 (fixP, value, segment)
|| fixP->fx_addsy == NULL
|| symbol_section_p (fixP->fx_addsy))
++val;
+
insn |= val & 0x3fffffff;
+
+ /* See if we have a delay slot. */
+ if (sparc_relax && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix)
+ {
+#define G0 0
+#define O7 15
+#define XCC (2 << 20)
+#define COND(x) (((x)&0xf)<<25)
+#define CONDA COND(0x8)
+#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC)
+#define INSN_BA (F2(0,2) | CONDA)
+#define INSN_OR F3(2, 0x2, 0)
+#define INSN_NOP F2(0,4)
+
+ long delay;
+
+ /* If the instruction is a call with either:
+ restore
+ arithmetic instruction with rd == %o7
+ where rs1 != %o7 and rs2 if it is register != %o7
+ then we can optimize if the call destination is near
+ by changing the call into a branch always. */
+ if (INSN_BIG_ENDIAN)
+ delay = bfd_getb32 ((unsigned char *) buf + 4);
+ else
+ delay = bfd_getl32 ((unsigned char *) buf + 4);
+ if ((insn & OP (~0)) != OP (1) || (delay & OP (~0)) != OP (2))
+ break;
+ if ((delay & OP3 (~0)) != OP3 (0x3d) /* Restore. */
+ && ((delay & OP3 (0x28)) != 0 /* Arithmetic. */
+ || ((delay & RD (~0)) != RD (O7))))
+ break;
+ if ((delay & RS1 (~0)) == RS1 (O7)
+ || ((delay & F3I (~0)) == 0
+ && (delay & RS2 (~0)) == RS2 (O7)))
+ break;
+ /* Ensure the branch will fit into simm22. */
+ if ((val & 0x3fe00000)
+ && (val & 0x3fe00000) != 0x3fe00000)
+ break;
+ /* Check if the arch is v9 and branch will fit
+ into simm19. */
+ if (((val & 0x3c0000) == 0
+ || (val & 0x3c0000) == 0x3c0000)
+ && (sparc_arch_size == 64
+ || current_architecture >= SPARC_OPCODE_ARCH_V9))
+ /* ba,pt %xcc */
+ insn = INSN_BPA | (val & 0x7ffff);
+ else
+ /* ba */
+ insn = INSN_BA | (val & 0x3fffff);
+ if (fixP->fx_where >= 4
+ && ((delay & (0xffffffff ^ RS1 (~0)))
+ == (INSN_OR | RD (O7) | RS2 (G0))))
+ {
+ long setter;
+ int reg;
+
+ if (INSN_BIG_ENDIAN)
+ setter = bfd_getb32 ((unsigned char *) buf - 4);
+ else
+ setter = bfd_getl32 ((unsigned char *) buf - 4);
+ if ((setter & (0xffffffff ^ RD (~0)))
+ != (INSN_OR | RS1 (O7) | RS2 (G0)))
+ break;
+ /* The sequence was
+ or %o7, %g0, %rN
+ call foo
+ or %rN, %g0, %o7
+
+ If call foo was replaced with ba, replace
+ or %rN, %g0, %o7 with nop. */
+ reg = (delay & RS1 (~0)) >> 14;
+ if (reg != ((setter & RD (~0)) >> 25)
+ || reg == G0 || reg == O7)
+ break;
+
+ if (INSN_BIG_ENDIAN)
+ bfd_putb32 (INSN_NOP, (unsigned char *) buf + 4);
+ else
+ bfd_putl32 (INSN_NOP, (unsigned char *) buf + 4);
+ }
+ }
break;
case BFD_RELOC_SPARC_11:
@@ -2954,7 +3135,7 @@ md_apply_fix3 (fixP, value, segment)
break;
case BFD_RELOC_SPARC_WDISP16:
- /* FIXME: simplify */
+ /* FIXME: simplify. */
if (((val > 0) && (val & ~0x3fffc))
|| ((val < 0) && (~(val - 1) & ~0x3fffc)))
as_bad_where (fixP->fx_file, fixP->fx_line,
@@ -2965,7 +3146,7 @@ md_apply_fix3 (fixP, value, segment)
break;
case BFD_RELOC_SPARC_WDISP19:
- /* FIXME: simplify */
+ /* FIXME: simplify. */
if (((val > 0) && (val & ~0x1ffffc))
|| ((val < 0) && (~(val - 1) & ~0x1ffffc)))
as_bad_where (fixP->fx_file, fixP->fx_line,
@@ -2977,7 +3158,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_HH22:
val = BSR (val, 32);
- /* intentional fallthrough */
+ /* Fall through. */
case BFD_RELOC_SPARC_LM22:
case BFD_RELOC_HI22:
@@ -3001,7 +3182,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_HM10:
val = BSR (val, 32);
- /* intentional fallthrough */
+ /* Fall through. */
case BFD_RELOC_LO10:
if (!fixP->fx_addsy)
@@ -3018,7 +3199,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_OLO10:
val &= 0x3ff;
val += fixP->tc_fix_data;
- /* intentional fallthrough */
+ /* Fall through. */
case BFD_RELOC_SPARC13:
if (! in_signed_range (val, 0x1fff))
@@ -3029,7 +3210,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_WDISP22:
val = (val >> 2) + 1;
- /* FALLTHROUGH */
+ /* Fall through. */
case BFD_RELOC_SPARC_BASE22:
insn |= val & 0x3fffff;
break;
@@ -3056,7 +3237,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_HIX22:
if (!fixP->fx_addsy)
{
- val ^= ~ (offsetT) 0;
+ val ^= ~(offsetT) 0;
insn |= (val >> 10) & 0x3fffff;
}
break;
@@ -3089,6 +3270,7 @@ md_apply_fix3 (fixP, value, segment)
/* Translate internal representation of relocation info to BFD target
format. */
+
arelent **
tc_gen_reloc (section, fixp)
asection *section;
@@ -3137,6 +3319,9 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_SPARC_LOX10:
case BFD_RELOC_SPARC_REV32:
case BFD_RELOC_SPARC_OLO10:
+ case BFD_RELOC_SPARC_UA16:
+ case BFD_RELOC_SPARC_UA32:
+ case BFD_RELOC_SPARC_UA64:
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
code = fixp->fx_r_type;
@@ -3190,7 +3375,7 @@ tc_gen_reloc (section, fixp)
break;
}
}
-#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */
+#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */
if (code == BFD_RELOC_SPARC_OLO10)
reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10);
@@ -3224,7 +3409,7 @@ tc_gen_reloc (section, fixp)
else
reloc->addend = fixp->fx_offset - reloc->address;
-#else /* elf or coff */
+#else /* elf or coff */
if (reloc->howto->pc_relative == 0
|| code == BFD_RELOC_SPARC_PC10
@@ -3246,7 +3431,8 @@ tc_gen_reloc (section, fixp)
relocs[2] = NULL;
reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
- *reloc->sym_ptr_ptr = symbol_get_bfdsym (section_symbol (absolute_section));
+ *reloc->sym_ptr_ptr
+ = symbol_get_bfdsym (section_symbol (absolute_section));
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_SPARC13);
reloc->addend = fixp->tc_fix_data;
@@ -3255,20 +3441,20 @@ tc_gen_reloc (section, fixp)
return relocs;
}
-/* We have no need to default values of symbols. */
+/* We have no need to default values of symbols. */
-/* ARGSUSED */
symbolS *
md_undefined_symbol (name)
- char *name;
+ char *name ATTRIBUTE_UNUSED;
{
return 0;
-} /* md_undefined_symbol() */
+}
+
+/* Round up a section size to the appropriate boundary. */
-/* Round up a section size to the appropriate boundary. */
valueT
md_section_align (segment, size)
- segT segment;
+ segT segment ATTRIBUTE_UNUSED;
valueT size;
{
#ifndef OBJ_ELF
@@ -3277,7 +3463,8 @@ md_section_align (segment, size)
valueT align = ((valueT) 1
<< (valueT) bfd_get_section_alignment (stdoutput, segment));
valueT newsize;
- /* turn alignment value into a mask */
+
+ /* Turn alignment value into a mask. */
align--;
newsize = (size + align) & ~align;
return newsize;
@@ -3289,8 +3476,8 @@ md_section_align (segment, size)
/* Exactly what point is a PC-relative offset relative TO?
On the sparc, they're relative to the address of the offset, plus
its size. This gets us to the following instruction.
- (??? Is this right? FIXME-SOON) */
-long
+ (??? Is this right? FIXME-SOON) */
+long
md_pcrel_from (fixP)
fixS *fixP;
{
@@ -3322,9 +3509,7 @@ log2 (value)
return (value == 1) ? shift : -1;
}
-/*
- * sort of like s_lcomm
- */
+/* Sort of like s_lcomm. */
#ifndef OBJ_ELF
static int max_alignment = 15;
@@ -3332,7 +3517,7 @@ static int max_alignment = 15;
static void
s_reserve (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char *p;
@@ -3362,7 +3547,7 @@ s_reserve (ignore)
as_bad (_("BSS length (%d.) <0! Ignored."), size);
ignore_rest_of_line ();
return;
- } /* bad length */
+ } /* Bad length. */
*p = 0;
symbolP = symbol_find_or_make (name);
@@ -3441,18 +3626,20 @@ s_reserve (ignore)
segT current_seg = now_seg;
subsegT current_subseg = now_subseg;
- subseg_set (bss_section, 1); /* switch to bss */
+ /* Switch to bss. */
+ subseg_set (bss_section, 1);
if (align)
- frag_align (align, 0, 0); /* do alignment */
+ /* Do alignment. */
+ frag_align (align, 0, 0);
- /* detach from old frag */
- if (S_GET_SEGMENT(symbolP) == bss_section)
+ /* Detach from old frag. */
+ if (S_GET_SEGMENT (symbolP) == bss_section)
symbol_get_frag (symbolP)->fr_symbol = NULL;
symbol_set_frag (symbolP, frag_now);
- pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP,
- (offsetT) size, (char *)0);
+ pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
+ (offsetT) size, (char *) 0);
*pfrag = 0;
S_SET_SEGMENT (symbolP, bss_section);
@@ -3466,16 +3653,16 @@ s_reserve (ignore)
}
else
{
- as_warn("Ignoring attempt to re-define symbol %s",
- S_GET_NAME (symbolP));
- } /* if not redefining */
+ as_warn ("Ignoring attempt to re-define symbol %s",
+ S_GET_NAME (symbolP));
+ } /* if not redefining. */
demand_empty_rest_of_line ();
}
static void
s_common (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char c;
@@ -3485,7 +3672,7 @@ s_common (ignore)
name = input_line_pointer;
c = get_symbol_end ();
- /* just after name is now '\0' */
+ /* Just after name is now '\0'. */
p = input_line_pointer;
*p = c;
SKIP_WHITESPACE ();
@@ -3495,7 +3682,10 @@ s_common (ignore)
ignore_rest_of_line ();
return;
}
- input_line_pointer++; /* skip ',' */
+
+ /* Skip ','. */
+ input_line_pointer++;
+
if ((temp = get_absolute_expression ()) < 0)
{
as_bad (_(".COMMon length (%d.) <0! Ignored."), temp);
@@ -3594,7 +3784,7 @@ s_common (ignore)
subseg_set (old_sec, old_subsec);
}
else
-#endif /* OBJ_ELF */
+#endif /* OBJ_ELF */
{
allocate_common:
S_SET_VALUE (symbolP, (valueT) size);
@@ -3653,7 +3843,7 @@ s_common (ignore)
static void
s_empty (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
/* The easy way to implement is to just forget about the last
instruction. */
@@ -3662,7 +3852,7 @@ s_empty (ignore)
static void
s_seg (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (strncmp (input_line_pointer, "\"text\"", 6) == 0)
@@ -3688,8 +3878,8 @@ s_seg (ignore)
input_line_pointer += 5;
/* We only support 2 segments -- text and data -- for now, so
things in the "bss segment" will have to go into data for now.
- You can still allocate SEG_BSS stuff with .lcomm or .reserve. */
- subseg_set (data_section, 255); /* FIXME-SOMEDAY */
+ You can still allocate SEG_BSS stuff with .lcomm or .reserve. */
+ subseg_set (data_section, 255); /* FIXME-SOMEDAY. */
return;
}
as_bad (_("Unknown segment type"));
@@ -3705,7 +3895,7 @@ s_data1 ()
static void
s_proc (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
while (!is_end_of_line[(unsigned char) *input_line_pointer])
{
@@ -3738,7 +3928,7 @@ s_uacons (bytes)
static void
s_ncons (bytes)
- int bytes;
+ int bytes ATTRIBUTE_UNUSED;
{
cons (sparc_arch_size == 32 ? 4 : 8);
}
@@ -3747,13 +3937,13 @@ s_ncons (bytes)
/* Handle the SPARC ELF .register pseudo-op. This sets the binding of a
global register.
The syntax is:
-
+
.register %g[2367],{#scratch|symbolname|#ignore}
- */
+*/
static void
s_register (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char c;
int reg;
@@ -3776,7 +3966,7 @@ s_register (ignore)
c = get_symbol_end ();
if (strcmp (regname, "scratch") && strcmp (regname, "ignore"))
as_bad (_("register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}"));
- if (regname [0] == 'i')
+ if (regname[0] == 'i')
regname = NULL;
else
regname = "";
@@ -3788,17 +3978,17 @@ s_register (ignore)
}
if (sparc_arch_size == 64)
{
- if (globals [reg])
+ if (globals[reg])
{
- if ((regname && globals [reg] != (symbolS *)1
- && strcmp (S_GET_NAME (globals [reg]), regname))
- || ((regname != NULL) ^ (globals [reg] != (symbolS *)1)))
+ if ((regname && globals[reg] != (symbolS *) 1
+ && strcmp (S_GET_NAME (globals[reg]), regname))
+ || ((regname != NULL) ^ (globals[reg] != (symbolS *) 1)))
as_bad (_("redefinition of global register"));
}
else
{
if (regname == NULL)
- globals [reg] = (symbolS *)1;
+ globals[reg] = (symbolS *) 1;
else
{
if (*regname)
@@ -3807,26 +3997,26 @@ s_register (ignore)
as_bad (_("Register symbol %s already defined."),
regname);
}
- globals [reg] = symbol_make (regname);
- flags = symbol_get_bfdsym (globals [reg])->flags;
+ globals[reg] = symbol_make (regname);
+ flags = symbol_get_bfdsym (globals[reg])->flags;
if (! *regname)
flags = flags & ~(BSF_GLOBAL|BSF_LOCAL|BSF_WEAK);
if (! (flags & (BSF_GLOBAL|BSF_LOCAL|BSF_WEAK)))
flags |= BSF_GLOBAL;
- symbol_get_bfdsym (globals [reg])->flags = flags;
- S_SET_VALUE (globals [reg], (valueT)reg);
- S_SET_ALIGN (globals [reg], reg);
- S_SET_SIZE (globals [reg], 0);
+ symbol_get_bfdsym (globals[reg])->flags = flags;
+ S_SET_VALUE (globals[reg], (valueT) reg);
+ S_SET_ALIGN (globals[reg], reg);
+ S_SET_SIZE (globals[reg], 0);
/* Although we actually want undefined_section here,
we have to use absolute_section, because otherwise
generic as code will make it a COM section.
We fix this up in sparc_adjust_symtab. */
- S_SET_SEGMENT (globals [reg], absolute_section);
- S_SET_OTHER (globals [reg], 0);
- elf_symbol (symbol_get_bfdsym (globals [reg]))
+ S_SET_SEGMENT (globals[reg], absolute_section);
+ S_SET_OTHER (globals[reg], 0);
+ elf_symbol (symbol_get_bfdsym (globals[reg]))
->internal_elf_sym.st_info =
ELF_ST_INFO(STB_GLOBAL, STT_REGISTER);
- elf_symbol (symbol_get_bfdsym (globals [reg]))
+ elf_symbol (symbol_get_bfdsym (globals[reg]))
->internal_elf_sym.st_shndx = SHN_UNDEF;
}
}
@@ -3839,12 +4029,12 @@ s_register (ignore)
/* Adjust the symbol table. We set undefined sections for STT_REGISTER
symbols which need it. */
-
+
void
sparc_adjust_symtab ()
{
symbolS *sym;
-
+
for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
{
if (ELF_ST_TYPE (elf_symbol (symbol_get_bfdsym (sym))
@@ -3882,12 +4072,9 @@ sparc_cons_align (nbytes)
if (! enforce_aligned_data)
return;
+ /* Don't align if this is an unaligned pseudo-op. */
if (sparc_no_align_cons)
- {
- /* This is an unaligned pseudo-op. */
- sparc_no_align_cons = 0;
- return;
- }
+ return;
nalign = log2 (nbytes);
if (nalign == 0)
@@ -3902,51 +4089,65 @@ sparc_cons_align (nbytes)
return;
}
- p = frag_var (rs_align_code, 1, 1, (relax_substateT) 0,
+ p = frag_var (rs_align_test, 1, 1, (relax_substateT) 0,
(symbolS *) NULL, (offsetT) nalign, (char *) NULL);
record_alignment (now_seg, nalign);
}
-/* This is where we do the unexpected alignment check.
- This is called from HANDLE_ALIGN in tc-sparc.h. */
+/* This is called from HANDLE_ALIGN in tc-sparc.h. */
void
sparc_handle_align (fragp)
fragS *fragp;
{
- if (fragp->fr_type == rs_align_code && !fragp->fr_subtype
- && fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix != 0)
- as_bad_where (fragp->fr_file, fragp->fr_line, _("misaligned data"));
- if (fragp->fr_type == rs_align_code && fragp->fr_subtype == 1024)
- {
- int count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
-
- if (count >= 4
- && !(count & 3)
- && count <= 1024
- && !((long)(fragp->fr_literal + fragp->fr_fix) & 3))
- {
- unsigned *p = (unsigned *)(fragp->fr_literal + fragp->fr_fix);
- int i;
-
- for (i = 0; i < count; i += 4, p++)
- if (INSN_BIG_ENDIAN)
- number_to_chars_bigendian ((char *)p, 0x01000000, 4); /* emit nops */
- else
- number_to_chars_littleendian ((char *)p, 0x10000000, 4);
-
- if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8)
- {
- char *waddr = &fragp->fr_literal[fragp->fr_fix];
- unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */
- if (INSN_BIG_ENDIAN)
- number_to_chars_bigendian (waddr, wval, 4);
- else
- number_to_chars_littleendian (waddr, wval, 4);
- }
- fragp->fr_var = count;
- }
+ int count, fix;
+ char *p;
+
+ count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
+
+ switch (fragp->fr_type)
+ {
+ case rs_align_test:
+ if (count != 0)
+ as_bad_where (fragp->fr_file, fragp->fr_line, _("misaligned data"));
+ break;
+
+ case rs_align_code:
+ p = fragp->fr_literal + fragp->fr_fix;
+ fix = 0;
+
+ if (count & 3)
+ {
+ fix = count & 3;
+ memset (p, 0, fix);
+ p += fix;
+ count -= fix;
+ }
+
+ if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8)
+ {
+ unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */
+ if (INSN_BIG_ENDIAN)
+ number_to_chars_bigendian (p, wval, 4);
+ else
+ number_to_chars_littleendian (p, wval, 4);
+ p += 4;
+ count -= 4;
+ fix += 4;
+ }
+
+ if (INSN_BIG_ENDIAN)
+ number_to_chars_bigendian (p, 0x01000000, 4);
+ else
+ number_to_chars_littleendian (p, 0x01000000, 4);
+
+ fragp->fr_fix += fix;
+ fragp->fr_var = 4;
+ break;
+
+ default:
+ break;
}
}
@@ -3976,6 +4177,8 @@ sparc_elf_final_processing ()
elf_elfheader (stdoutput)->e_flags |= EF_SPARC_32PLUS;
if (current_architecture == SPARC_OPCODE_ARCH_V9A)
elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1;
+ else if (current_architecture == SPARC_OPCODE_ARCH_V9B)
+ elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1|EF_SPARC_SUN_US3;
}
#endif
@@ -3996,22 +4199,35 @@ cons_fix_new_sparc (frag, where, nbytes, exp)
(nbytes == 2 ? BFD_RELOC_16 :
(nbytes == 4 ? BFD_RELOC_32 : BFD_RELOC_64)));
- if (target_little_endian_data && nbytes == 4
- && now_seg->flags & SEC_ALLOC)
+ if (target_little_endian_data
+ && nbytes == 4
+ && now_seg->flags & SEC_ALLOC)
r = BFD_RELOC_SPARC_REV32;
+
+ if (sparc_no_align_cons)
+ {
+ switch (nbytes)
+ {
+ case 2: r = BFD_RELOC_SPARC_UA16; break;
+ case 4: r = BFD_RELOC_SPARC_UA32; break;
+ case 8: r = BFD_RELOC_SPARC_UA64; break;
+ default: abort ();
+ }
+ sparc_no_align_cons = 0;
+ }
+
fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
}
#ifdef OBJ_ELF
int
elf32_sparc_force_relocation (fixp)
- struct fix *fixp;
+ struct fix *fixp;
{
if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 1;
-
+
return 0;
}
#endif
-
diff --git a/gnu/usr.bin/binutils/gas/config/tc-sparc.h b/gnu/usr.bin/binutils/gas/config/tc-sparc.h
index 91fda224b40..ce19f5d74b1 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-sparc.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-sparc.h
@@ -1,5 +1,6 @@
/* tc-sparc.h - Macros and type defines for the sparc.
- Copyright (C) 1989, 90-96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -50,31 +51,24 @@ extern const char *sparc_target_format PARAMS ((void));
#define WORKING_DOT_WORD
-#define md_convert_frag(b,s,f) {as_fatal (_("sparc convert_frag\n"));}
+#define md_convert_frag(b,s,f) \
+ as_fatal (_("sparc convert_frag\n"))
#define md_estimate_size_before_relax(f,s) \
- (as_fatal(_("estimate_size_before_relax called")),1)
+ (as_fatal(_("estimate_size_before_relax called")), 1)
#define LISTING_HEADER "SPARC GAS "
extern int sparc_pic_code;
-#define md_do_align(n, fill, len, max, around) \
-if ((n) && (n) <= 10 && !need_pass_2 && !(fill) \
- && subseg_text_p (now_seg)) \
- { \
- char *p; \
- p = frag_var (rs_align_code, 1 << n, 1, (relax_substateT) 1024, \
- (symbolS *) 0, (offsetT) (n), (char *) 0); \
- *p = 0x00; \
- goto around; \
- }
-
/* We require .word, et. al., to be aligned correctly. */
#define md_cons_align(nbytes) sparc_cons_align (nbytes)
extern void sparc_cons_align PARAMS ((int));
+
#define HANDLE_ALIGN(fragp) sparc_handle_align (fragp)
extern void sparc_handle_align PARAMS ((struct frag *));
+#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 4)
+
#if defined (OBJ_ELF) || defined (OBJ_AOUT)
/* This expression evaluates to false if the relocation is for a local
@@ -186,14 +180,16 @@ extern void cons_fix_new_sparc
{ \
(X)->tc_fix_data = 0; \
} \
- while(0)
+ while (0)
#define TC_FIX_DATA_PRINT(FILE, FIXP) \
do \
{ \
- fprintf((FILE), "addend2=%ld\n", \
+ fprintf ((FILE), "addend2=%ld\n", \
(unsigned long) (FIXP)->tc_fix_data); \
} \
- while(0)
+ while (0)
+
+#define DWARF2_LINE_MIN_INSN_LENGTH 4
/* end of tc-sparc.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-tahoe.c b/gnu/usr.bin/binutils/gas/config/tc-tahoe.c
index 26a75242c12..f4f781a5d5d 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-tahoe.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-tahoe.c
@@ -1,45 +1,61 @@
-/* tc-tahoe.c
- Not part of GAS yet. */
+/* This file is tc-tahoe.c
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 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. */
#include "as.h"
#include "obstack.h"
-/* this bit glommed from tahoe-inst.h */
+/* This bit glommed from tahoe-inst.h. */
typedef unsigned char byte;
typedef byte tahoe_opcodeT;
-/*
- * This is part of tahoe-ins-parse.c & friends.
- * We want to parse a tahoe instruction text into a tree defined here.
- */
+/* This is part of tahoe-ins-parse.c & friends.
+ We want to parse a tahoe instruction text into a tree defined here. */
#define TIT_MAX_OPERANDS (4) /* maximum number of operands in one
single tahoe instruction */
struct top /* tahoe instruction operand */
-{
- int top_ndx; /* -1, or index register. eg 7=[R7] */
- int top_reg; /* -1, or register number. eg 7 = R7 or (R7) */
- byte top_mode; /* Addressing mode byte. This byte, defines
- which of the 11 modes opcode is. */
+ {
+ int top_ndx; /* -1, or index register. eg 7=[R7] */
+ int top_reg; /* -1, or register number. eg 7 = R7 or (R7) */
+ byte top_mode; /* Addressing mode byte. This byte, defines
+ which of the 11 modes opcode is. */
- char top_access; /* Access type wanted for this opperand
+ char top_access; /* Access type wanted for this opperand
'b'branch ' 'no-instruction 'amrvw' */
- char top_width; /* Operand width expected, one of "bwlq?-:!" */
+ char top_width; /* Operand width expected, one of "bwlq?-:!" */
- char *top_error; /* Say if operand is inappropriate */
+ char * top_error; /* Say if operand is inappropriate */
- segT seg_of_operand; /* segment as returned by expression()*/
+ segT seg_of_operand; /* segment as returned by expression()*/
- expressionS exp_of_operand; /* The expression as parsed by expression()*/
+ expressionS exp_of_operand; /* The expression as parsed by expression()*/
- byte top_dispsize; /* Number of bytes in the displacement if we
+ byte top_dispsize; /* Number of bytes in the displacement if we
can figure it out */
-};
+ };
/* The addressing modes for an operand. These numbers are the acutal values
- for certain modes, so be carefull if you screw with them. */
+ for certain modes, so be carefull if you screw with them. */
#define TAHOE_DIRECT_REG (0x50)
#define TAHOE_REG_DEFERRED (0x60)
@@ -58,32 +74,32 @@ struct top /* tahoe instruction operand */
#define TAHOE_AUTO_DEC (0x7E)
#define TAHOE_AUTO_INC (0x8E)
#define TAHOE_AUTO_INC_DEFERRED (0x9E)
-/* INDEXED_REG is decided by the existance or lack of a [reg] */
+/* INDEXED_REG is decided by the existance or lack of a [reg]. */
/* These are encoded into top_width when top_access=='b'
- and it's a psuedo op.*/
+ and it's a psuedo op. */
#define TAHOE_WIDTH_ALWAYS_JUMP '-'
#define TAHOE_WIDTH_CONDITIONAL_JUMP '?'
#define TAHOE_WIDTH_BIG_REV_JUMP '!'
#define TAHOE_WIDTH_BIG_NON_REV_JUMP ':'
/* The hex code for certain tahoe commands and modes.
- This is just for readability. */
+ This is just for readability. */
#define TAHOE_JMP (0x71)
#define TAHOE_PC_REL_LONG (0xEF)
#define TAHOE_BRB (0x11)
#define TAHOE_BRW (0x13)
/* These, when 'ored' with, or added to, a register number,
- set up the number for the displacement mode. */
+ set up the number for the displacement mode. */
#define TAHOE_PC_OR_BYTE (0xA0)
#define TAHOE_PC_OR_WORD (0xC0)
#define TAHOE_PC_OR_LONG (0xE0)
-struct tit /* get it out of the sewer, it stands for
- tahoe instruction tree (Geeze!) */
+struct tit /* Get it out of the sewer, it stands for
+ tahoe instruction tree (Geeze!). */
{
- tahoe_opcodeT tit_opcode; /* The opcode. */
- byte tit_operands; /* How many operands are here. */
+ tahoe_opcodeT tit_opcode; /* The opcode. */
+ byte tit_operands; /* How many operands are here. */
struct top tit_operand[TIT_MAX_OPERANDS]; /* Operands */
char *tit_error; /* "" or fatal error text */
};
@@ -100,10 +116,10 @@ struct tit /* get it out of the sewer, it stands for
long omagic = OMAGIC;
/* These chars start a comment anywhere in a source file (except inside
- another comment or a quoted string. */
+ another comment or a quoted string. */
const char comment_chars[] = "#;";
-/* These chars only start a comment at the beginning of a line. */
+/* These chars only start a comment at the beginning of a line. */
const char line_comment_chars[] = "#";
/* Chars that can be used to separate mant from exp in floating point nums */
@@ -113,7 +129,7 @@ const char EXP_CHARS[] = "eE";
as in 0f123.456
or 0d1.234E-12 (see exp chars above)
Note: The Tahoe port doesn't support floating point constants. This is
- consistant with 'as' If it's needed, I can always add it later. */
+ consistant with 'as' If it's needed, I can always add it later. */
const char FLT_CHARS[] = "df";
/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be
@@ -122,11 +138,11 @@ const char FLT_CHARS[] = "df";
(The tahoe has plenty of room, so the change currently isn't needed.)
*/
-static struct tit t; /* A tahoe instruction after decoding. */
+static struct tit t; /* A tahoe instruction after decoding. */
void float_cons ();
/* A table of pseudo ops (sans .), the function called, and an integer op
- that the function is called with. */
+ that the function is called with. */
const pseudo_typeS md_pseudo_table[] =
{
@@ -164,7 +180,6 @@ States for Tahoe address relaxing.
Always, 1 byte opcode, then displacement/absolute.
If word or longword, change opcode to brw or jmp.
-
2. TAHOE_WIDTH_CONDITIONAL_JUMP (?)
J<cond> where <cond> is a simple flag test.
Format: "b?"
@@ -220,7 +235,7 @@ pc_rel_disp? That sort of thing.) */
to them. (WF + length(word))
The first letter is Byte, Word.
- 2nd letter is Forward, Backward. */
+ 2nd letter is Forward, Backward. */
#define BF (1+ 127)
#define BB (1+-128)
#define WF (2+ 32767)
@@ -228,10 +243,10 @@ pc_rel_disp? That sort of thing.) */
/* Dont need LF, LB because they always reach. [They are coded as 0.] */
#define C(a,b) ENCODE_RELAX(a,b)
-/* This macro has no side-effects. */
+/* This macro has no side-effects. */
#define ENCODE_RELAX(what,length) (((what) << 2) + (length))
-#define RELAX_STATE(what) ((what) >> 2)
-#define RELAX_LENGTH(length) ((length) && 3)
+#define RELAX_STATE(s) ((s) >> 2)
+#define RELAX_LENGTH(s) ((s) & 3)
#define STATE_ALWAYS_BRANCH (1)
#define STATE_CONDITIONAL_BRANCH (2)
@@ -246,7 +261,7 @@ pc_rel_disp? That sort of thing.) */
/* This is the table used by gas to figure out relaxing modes. The fields are
forward_branch reach, backward_branch reach, number of bytes it would take,
- where the next biggest branch is. */
+ where the next biggest branch is. */
const relax_typeS md_relax_table[] =
{
{
@@ -277,7 +292,7 @@ const relax_typeS md_relax_table[] =
}, /* unused 1,3 */
/* Reversible Conditional Branch. If the branch won't reach, reverse
it, and jump over a brw or a jmp that will reach. The relax part is the
- actual address. */
+ actual address. */
{
BF, BB, 1, C (2, 1)
}, /* b<cond> B`foo 2,0 */
@@ -291,7 +306,7 @@ const relax_typeS md_relax_table[] =
1, 1, 0, 0
}, /* unused 2,3 */
/* Another type of reversable branch. But this only has a word
- displacement. */
+ displacement. */
{
1, 1, 0, 0
}, /* unused 3,0 */
@@ -308,7 +323,7 @@ const relax_typeS md_relax_table[] =
displacement. If I can't reach, branch over a byte branch, to a
jump that will reach. The jumped branch jumps over the reaching
branch, to continue with the flow of the program. It's like playing
- leap frog. */
+ leap frog. */
{
1, 1, 0, 0
}, /* unused 4,0 */
@@ -323,7 +338,7 @@ const relax_typeS md_relax_table[] =
}, /* unused 4,3 */
/* Normal displacement mode, no jumping or anything like that.
The relax points to one byte before the address, thats why all
- the numbers are up by one. */
+ the numbers are up by one. */
{
BF + 1, BB + 1, 2, C (5, 1)
}, /* B^"foo" 5,0 */
@@ -349,13 +364,13 @@ const relax_typeS md_relax_table[] =
md_begin() will crash. */
static struct hash_control *op_hash;
-/* Init function. Build the hash table. */
+/* Init function. Build the hash table. */
void
md_begin ()
{
struct tot *tP;
char *errorval = 0;
- int synthetic_too = 1; /* If 0, just use real opcodes. */
+ int synthetic_too = 1; /* If 0, just use real opcodes. */
op_hash = hash_new ();
@@ -374,7 +389,7 @@ CONST char *md_shortopts = "ad:STt:V";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -418,7 +433,7 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, _("\
+ fprintf (stream, _("\
Tahoe options:\n\
-a ignored\n\
-d LENGTH ignored\n\
@@ -431,22 +446,22 @@ Tahoe options:\n\
/* The functions in this section take numbers in the machine format, and
munges them into Tahoe byte order.
- They exist primarily for cross assembly purpose. */
-void /* Knows about order of bytes in address. */
+ They exist primarily for cross assembly purpose. */
+void /* Knows about order of bytes in address. */
md_number_to_chars (con, value, nbytes)
- char con[]; /* Return 'nbytes' of chars here. */
- valueT value; /* The value of the bits. */
- int nbytes; /* Number of bytes in the output. */
+ char con[]; /* Return 'nbytes' of chars here. */
+ valueT value; /* The value of the bits. */
+ int nbytes; /* Number of bytes in the output. */
{
number_to_chars_bigendian (con, value, nbytes);
}
#ifdef comment
-void /* Knows about order of bytes in address. */
+void /* Knows about order of bytes in address. */
md_number_to_imm (con, value, nbytes)
- char con[]; /* Return 'nbytes' of chars here. */
- long int value; /* The value of the bits. */
- int nbytes; /* Number of bytes in the output. */
+ char con[]; /* Return 'nbytes' of chars here. */
+ long int value; /* The value of the bits. */
+ int nbytes; /* Number of bytes in the output. */
{
md_number_to_chars (con, value, nbytes);
}
@@ -462,20 +477,20 @@ tc_apply_fix (fixP, val)
know (0);
}
-void /* Knows about order of bytes in address. */
+void /* Knows about order of bytes in address. */
md_number_to_disp (con, value, nbytes)
- char con[]; /* Return 'nbytes' of chars here. */
- long int value; /* The value of the bits. */
- int nbytes; /* Number of bytes in the output. */
+ char con[]; /* Return 'nbytes' of chars here. */
+ long int value; /* The value of the bits. */
+ int nbytes; /* Number of bytes in the output. */
{
md_number_to_chars (con, value, nbytes);
}
-void /* Knows about order of bytes in address. */
+void /* Knows about order of bytes in address. */
md_number_to_field (con, value, nbytes)
- char con[]; /* Return 'nbytes' of chars here. */
- long int value; /* The value of the bits. */
- int nbytes; /* Number of bytes in the output. */
+ char con[]; /* Return 'nbytes' of chars here. */
+ long int value; /* The value of the bits. */
+ int nbytes; /* Number of bytes in the output. */
{
md_number_to_chars (con, value, nbytes);
}
@@ -486,7 +501,7 @@ md_number_to_field (con, value, nbytes)
next three bytes are symbolnum, in kind of 3 byte big endian (least sig. byte last).
The last byte is broken up with bit 7 as pcrel,
bits 6 & 5 as length,
- bit 4 as extern and the last nibble as 'undefined'. */
+ bit 4 as extern and the last nibble as 'undefined'. */
#if comment
void
@@ -495,7 +510,7 @@ md_ri_to_chars (ri_p, ri)
{
byte the_bytes[sizeof (struct relocation_info)];
/* The reason I can't just encode these directly into ri_p is that
- ri_p may point to ri. */
+ ri_p may point to ri. */
/* This is easy */
md_number_to_chars (the_bytes, ri.r_address, sizeof (ri.r_address));
@@ -518,9 +533,9 @@ md_ri_to_chars (ri_p, ri)
next three bytes are symbolnum, in kind of 3 byte big endian (least sig. byte last).
The last byte is broken up with bit 7 as pcrel,
bits 6 & 5 as length,
- bit 4 as extern and the last nibble as 'undefined'. */
+ bit 4 as extern and the last nibble as 'undefined'. */
-void
+void
tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
char *where;
fixS *fixP;
@@ -554,7 +569,7 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
/* Relocate byte stuff */
-/* This is for broken word. */
+/* This is for broken word. */
const int md_short_jump_size = 3;
void
@@ -589,136 +604,113 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
md_number_to_chars (ptr, offset, 4);
}
-/*
- * md_estimate_size_before_relax()
- *
- * Called just before relax().
- * Any symbol that is now undefined will not become defined, so we assumed
- * that it will be resolved by the linker.
- * Return the correct fr_subtype in the frag, for relax()
- * Return the initial "guess for fr_var" to caller. (How big I think this
- * will be.)
- * The guess for fr_var is ACTUALLY the growth beyond fr_fix.
- * Whatever we do to grow fr_fix or fr_var contributes to our returned value.
- * Although it may not be explicit in the frag, pretend fr_var starts with a
- * 0 value.
- */
+/* md_estimate_size_before_relax(), called just before relax().
+ Any symbol that is now undefined will not become defined.
+ Return the correct fr_subtype in the frag and the growth beyond
+ fr_fix. */
int
md_estimate_size_before_relax (fragP, segment_type)
register fragS *fragP;
- segT segment_type; /* N_DATA or N_TEXT. */
+ segT segment_type; /* N_DATA or N_TEXT. */
{
- register char *p;
- register int old_fr_fix;
- /* int pc_rel; FIXME: remove this */
-
- old_fr_fix = fragP->fr_fix;
- switch (fragP->fr_subtype)
+ if (RELAX_LENGTH (fragP->fr_subtype) == STATE_UNDF)
{
- case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
- {
- /* The symbol was in the same segment as the opcode, and it's
- a real pc_rel case so it's a relaxable case. */
- fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE);
- }
- else
+ if (S_GET_SEGMENT (fragP->fr_symbol) != segment)
{
- /* This case is still undefined, so asume it's a long word for the
- linker to fix. */
- p = fragP->fr_literal + old_fr_fix;
- *p |= TAHOE_PC_OR_LONG;
- /* We now know how big it will be, one long word. */
- fragP->fr_fix += 1 + 4;
- fix_new (fragP, old_fr_fix + 1, fragP->fr_symbol,
- fragP->fr_offset, FX_PCREL32, NULL);
- frag_wane (fragP);
- }
- break;
+ /* Non-relaxable cases. */
+ char *p;
+ int old_fr_fix;
- case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
- {
- fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE);
- }
- else
- {
+ old_fr_fix = fragP->fr_fix;
p = fragP->fr_literal + old_fr_fix;
- *fragP->fr_opcode ^= 0x10; /* Reverse sense of branch. */
- *p++ = 6;
- *p++ = TAHOE_JMP;
- *p++ = TAHOE_PC_REL_LONG;
- fragP->fr_fix += 1 + 1 + 1 + 4;
- fix_new (fragP, old_fr_fix + 3, fragP->fr_symbol,
- fragP->fr_offset, FX_PCREL32, NULL);
+ switch (RELAX_STATE (fragP->fr_subtype))
+ {
+ case STATE_PC_RELATIVE:
+ *p |= TAHOE_PC_OR_LONG;
+ /* We now know how big it will be, one long word. */
+ fragP->fr_fix += 1 + 4;
+ fix_new (fragP, old_fr_fix + 1, fragP->fr_symbol,
+ fragP->fr_offset, FX_PCREL32, NULL);
+ break;
+
+ case STATE_CONDITIONAL_BRANCH:
+ *fragP->fr_opcode ^= 0x10; /* Reverse sense of branch. */
+ *p++ = 6;
+ *p++ = TAHOE_JMP;
+ *p++ = TAHOE_PC_REL_LONG;
+ fragP->fr_fix += 1 + 1 + 1 + 4;
+ fix_new (fragP, old_fr_fix + 3, fragP->fr_symbol,
+ fragP->fr_offset, FX_PCREL32, NULL);
+ break;
+
+ case STATE_BIG_REV_BRANCH:
+ *fragP->fr_opcode ^= 0x10; /* Reverse sense of branch. */
+ *p++ = 0;
+ *p++ = 6;
+ *p++ = TAHOE_JMP;
+ *p++ = TAHOE_PC_REL_LONG;
+ fragP->fr_fix += 2 + 2 + 4;
+ fix_new (fragP, old_fr_fix + 4, fragP->fr_symbol,
+ fragP->fr_offset, FX_PCREL32, NULL);
+ break;
+
+ case STATE_BIG_NON_REV_BRANCH:
+ *p++ = 2;
+ *p++ = 0;
+ *p++ = TAHOE_BRB;
+ *p++ = 6;
+ *p++ = TAHOE_JMP;
+ *p++ = TAHOE_PC_REL_LONG;
+ fragP->fr_fix += 2 + 2 + 2 + 4;
+ fix_new (fragP, old_fr_fix + 6, fragP->fr_symbol,
+ fragP->fr_offset, FX_PCREL32, NULL);
+ break;
+
+ case STATE_ALWAYS_BRANCH:
+ *fragP->fr_opcode = TAHOE_JMP;
+ *p++ = TAHOE_PC_REL_LONG;
+ fragP->fr_fix += 1 + 4;
+ fix_new (fragP, old_fr_fix + 1, fragP->fr_symbol,
+ fragP->fr_offset, FX_PCREL32, NULL);
+ break;
+
+ default:
+ abort ();
+ }
frag_wane (fragP);
- }
- break;
- case ENCODE_RELAX (STATE_BIG_REV_BRANCH, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
- {
- fragP->fr_subtype =
- ENCODE_RELAX (STATE_BIG_REV_BRANCH, STATE_WORD);
+ /* Return the growth in the fixed part of the frag. */
+ return fragP->fr_fix - old_fr_fix;
}
- else
- {
- p = fragP->fr_literal + old_fr_fix;
- *fragP->fr_opcode ^= 0x10; /* Reverse sense of branch. */
- *p++ = 0;
- *p++ = 6;
- *p++ = TAHOE_JMP;
- *p++ = TAHOE_PC_REL_LONG;
- fragP->fr_fix += 2 + 2 + 4;
- fix_new (fragP, old_fr_fix + 4, fragP->fr_symbol,
- fragP->fr_offset, FX_PCREL32, NULL);
- frag_wane (fragP);
- }
- break;
- case ENCODE_RELAX (STATE_BIG_NON_REV_BRANCH, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
+ /* Relaxable cases. Set up the initial guess for the variable
+ part of the frag. */
+ switch (RELAX_STATE (fragP->fr_subtype))
{
+ case STATE_PC_RELATIVE:
+ fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE);
+ break;
+ case STATE_CONDITIONAL_BRANCH:
+ fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE);
+ break;
+ case STATE_BIG_REV_BRANCH:
+ fragP->fr_subtype = ENCODE_RELAX (STATE_BIG_REV_BRANCH, STATE_WORD);
+ break;
+ case STATE_BIG_NON_REV_BRANCH:
fragP->fr_subtype = ENCODE_RELAX (STATE_BIG_NON_REV_BRANCH, STATE_WORD);
- }
- else
- {
- p = fragP->fr_literal + old_fr_fix;
- *p++ = 2;
- *p++ = 0;
- *p++ = TAHOE_BRB;
- *p++ = 6;
- *p++ = TAHOE_JMP;
- *p++ = TAHOE_PC_REL_LONG;
- fragP->fr_fix += 2 + 2 + 2 + 4;
- fix_new (fragP, old_fr_fix + 6, fragP->fr_symbol,
- fragP->fr_offset, FX_PCREL32, NULL);
- frag_wane (fragP);
- }
- break;
-
- case ENCODE_RELAX (STATE_ALWAYS_BRANCH, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
- {
+ break;
+ case STATE_ALWAYS_BRANCH:
fragP->fr_subtype = ENCODE_RELAX (STATE_ALWAYS_BRANCH, STATE_BYTE);
+ break;
}
- else
- {
- p = fragP->fr_literal + old_fr_fix;
- *fragP->fr_opcode = TAHOE_JMP;
- *p++ = TAHOE_PC_REL_LONG;
- fragP->fr_fix += 1 + 4;
- fix_new (fragP, old_fr_fix + 1, fragP->fr_symbol,
- fragP->fr_offset, FX_PCREL32, NULL);
- frag_wane (fragP);
- }
- break;
-
- default:
- break;
}
- return (fragP->fr_var + fragP->fr_fix - old_fr_fix);
-} /* md_estimate_size_before_relax() */
+
+ if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0]))
+ abort ();
+
+ /* Return the size of the variable part of the frag. */
+ return md_relax_table[fragP->fr_subtype].rlx_length;
+}
/*
* md_convert_frag();
@@ -737,11 +729,10 @@ md_convert_frag (headers, seg, fragP)
segT seg;
register fragS *fragP;
{
- register char *addressP; /* -> _var to change. */
- register char *opcodeP; /* -> opcode char(s) to change. */
- register short int length_code; /* 2=long 1=word 0=byte */
+ register char *addressP; /* -> _var to change. */
+ register char *opcodeP; /* -> opcode char(s) to change. */
register short int extension = 0; /* Size of relaxed address.
- Added to fr_fix: incl. ALL var chars. */
+ Added to fr_fix: incl. ALL var chars. */
register symbolS *symbolP;
register long int where;
register long int address_of_var;
@@ -750,8 +741,6 @@ md_convert_frag (headers, seg, fragP)
/* Where, in file space, does addr point? */
know (fragP->fr_type == rs_machine_dependent);
- length_code = RELAX_LENGTH (fragP->fr_subtype);
- know (length_code >= 0 && length_code < 3);
where = fragP->fr_fix;
addressP = fragP->fr_literal + where;
opcodeP = fragP->fr_opcode;
@@ -764,21 +753,21 @@ md_convert_frag (headers, seg, fragP)
case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE):
/* *addressP holds the registers number, plus 0x10, if it's deferred
mode. To set up the right mode, just OR the size of this displacement */
- /* Byte displacement. */
+ /* Byte displacement. */
*addressP++ |= TAHOE_PC_OR_BYTE;
*addressP = target_address - (address_of_var + 2);
extension = 2;
break;
case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_WORD):
- /* Word displacement. */
+ /* Word displacement. */
*addressP++ |= TAHOE_PC_OR_WORD;
md_number_to_chars (addressP, target_address - (address_of_var + 3), 2);
extension = 3;
break;
case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_LONG):
- /* Long word displacement. */
+ /* Long word displacement. */
*addressP++ |= TAHOE_PC_OR_LONG;
md_number_to_chars (addressP, target_address - (address_of_var + 5), 4);
extension = 5;
@@ -790,7 +779,7 @@ md_convert_frag (headers, seg, fragP)
break;
case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_WORD):
- *opcodeP ^= 0x10; /* Reverse sense of test. */
+ *opcodeP ^= 0x10; /* Reverse sense of test. */
*addressP++ = 3; /* Jump over word branch */
*addressP++ = TAHOE_BRW;
md_number_to_chars (addressP, target_address - (address_of_var + 4), 2);
@@ -798,7 +787,7 @@ md_convert_frag (headers, seg, fragP)
break;
case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_LONG):
- *opcodeP ^= 0x10; /* Reverse sense of test. */
+ *opcodeP ^= 0x10; /* Reverse sense of test. */
*addressP++ = 6;
*addressP++ = TAHOE_JMP;
*addressP++ = TAHOE_PC_REL_LONG;
@@ -863,7 +852,7 @@ md_convert_frag (headers, seg, fragP)
} /* md_convert_frag */
-/* This is the stuff for md_assemble. */
+/* This is the stuff for md_assemble. */
#define FP_REG 13
#define SP_REG 14
#define PC_REG 15
@@ -885,7 +874,7 @@ md_convert_frag (headers, seg, fragP)
*/
int
tahoe_reg_parse (start)
- char **start; /* A pointer to the string to parse. */
+ char **start; /* A pointer to the string to parse. */
{
register char *regpoint = *start;
register int regnum = -1;
@@ -893,16 +882,16 @@ tahoe_reg_parse (start)
switch (*regpoint++)
{
case '%': /* Registers can start with a %,
- R or r, and then a number. */
+ R or r, and then a number. */
case 'R':
case 'r':
if (isdigit (*regpoint))
{
- /* Got the first digit. */
+ /* Got the first digit. */
regnum = *regpoint++ - '0';
if ((regnum == 1) && isdigit (*regpoint))
{
- /* Its a two digit number. */
+ /* Its a two digit number. */
regnum = 10 + (*regpoint++ - '0');
if (regnum > BIGGESTREG)
{ /* Number too big? */
@@ -1011,15 +1000,15 @@ tip_op (optex, topP)
out: ndx, reg, mode, error, dispsize */
{
- int mode = 0; /* This operand's mode. */
- char segfault = *optex; /* To keep the back parsing from freaking. */
- char *point = optex + 1; /* Parsing from front to back. */
- char *end; /* Parsing from back to front. */
+ int mode = 0; /* This operand's mode. */
+ char segfault = *optex; /* To keep the back parsing from freaking. */
+ char *point = optex + 1; /* Parsing from front to back. */
+ char *end; /* Parsing from back to front. */
int reg = -1; /* major register, -1 means absent */
int imreg = -1; /* Major register in immediate mode */
int ndx = -1; /* index register number, -1 means absent */
char dec_inc = ' '; /* Is the SP auto-incremented '+' or
- auto-decremented '-' or neither ' '. */
+ auto-decremented '-' or neither ' '. */
int immediate = 0; /* 1 if '$' immediate mode */
int call_width = 0; /* If the caller casts the displacement */
int abs_width = 0; /* The width of the absolute displacment */
@@ -1030,14 +1019,14 @@ tip_op (optex, topP)
char *tp, *temp, c; /* Temporary holders */
- char access = topP->top_access; /* Save on a deref. */
+ char access = topP->top_access; /* Save on a deref. */
char width = topP->top_width;
int really_none = 0; /* Empty expressions evaluate to 0
but I need to know if it's there or not */
expressionS *expP; /* -> expression values for this operand */
- /* Does this command restrict the displacement size. */
+ /* Does this command restrict the displacement size. */
if (access == 'b')
com_width = (width == 'b' ? 1 :
(width == 'w' ? 2 :
@@ -1095,7 +1084,7 @@ tip_op (optex, topP)
* yank.
*/
- for (end = point; *end != '\0'; end++) /* Move to the end. */
+ for (end = point; *end != '\0'; end++) /* Move to the end. */
;
if (end != point) /* Null string? */
@@ -1104,38 +1093,38 @@ tip_op (optex, topP)
if (end > point && *end == ' ' && end[-1] != '\'')
end--; /* Hop white space */
- /* Is this an index reg. */
+ /* Is this an index reg. */
if ((*end == ']') && (end[-1] != '\''))
{
temp = end;
- /* Find opening brace. */
+ /* Find opening brace. */
for (--end; (*end != '[' && end != point); end--)
;
- /* If I found the opening brace, get the index register number. */
+ /* If I found the opening brace, get the index register number. */
if (*end == '[')
{
- tp = end + 1; /* tp should point to the start of a reg. */
+ tp = end + 1; /* tp should point to the start of a reg. */
ndx = tahoe_reg_parse (&tp);
if (tp != temp)
- { /* Reg. parse error. */
+ { /* Reg. parse error. */
ndx = -1;
}
else
{
- end--; /* Found it, move past brace. */
+ end--; /* Found it, move past brace. */
}
if (ndx == -1)
{
op_bad = _("Couldn't parse the [index] in this operand.");
- end = point; /* Force all the rest of the tests to fail. */
+ end = point; /* Force all the rest of the tests to fail. */
}
}
else
{
op_bad = _("Couldn't find the opening '[' for the index of this operand.");
- end = point; /* Force all the rest of the tests to fail. */
+ end = point; /* Force all the rest of the tests to fail. */
}
}
@@ -1152,30 +1141,30 @@ tip_op (optex, topP)
{
temp = end;
- /* Find opening paren. */
+ /* Find opening paren. */
for (--end; (*end != '(' && end != point); end--)
;
- /* If I found the opening paren, get the register number. */
+ /* If I found the opening paren, get the register number. */
if (*end == '(')
{
tp = end + 1;
reg = tahoe_reg_parse (&tp);
if (tp != temp)
{
- /* Not a register, but could be part of the expression. */
+ /* Not a register, but could be part of the expression. */
reg = -1;
end = temp; /* Rest the pointer back */
}
else
{
- end--; /* Found the reg. move before opening paren. */
+ end--; /* Found the reg. move before opening paren. */
}
}
else
{
op_bad = _("Couldn't find the opening '(' for the deref of this operand.");
- end = point; /* Force all the rest of the tests to fail. */
+ end = point; /* Force all the rest of the tests to fail. */
}
}
@@ -1208,7 +1197,7 @@ tip_op (optex, topP)
if it is there.*/
if (*point != '\0')
{
- /* If there is junk after point, then the it's not immediate reg. */
+ /* If there is junk after point, then the it's not immediate reg. */
point = tp;
imreg = -1;
}
@@ -1224,7 +1213,7 @@ tip_op (optex, topP)
if (*op_bad == '\0')
{
- /* statement has no syntax goofs yet: lets sniff the expression */
+ /* Statement has no syntax goofs yet: let's sniff the expression. */
input_line_pointer = point;
expP = &(topP->exp_of_operand);
topP->seg_of_operand = expression (expP);
@@ -1238,9 +1227,9 @@ tip_op (optex, topP)
really_none = 1;
case O_constant:
/* for SEG_ABSOLUTE, we shouldnt need to set X_op_symbol,
- X_add_symbol to any particular value. */
+ X_add_symbol to any particular value. */
/* But, we will program defensively. Since this situation occurs
- rarely so it costs us little to do so. */
+ rarely so it costs us little to do so. */
expP->X_add_symbol = NULL;
expP->X_op_symbol = NULL;
/* How many bytes are needed to express this abs value? */
@@ -1270,7 +1259,7 @@ tip_op (optex, topP)
case O_big:
/* 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. */
+ by address. */
op_bad = _("Expression is too large for a 32 bits.");
break;
}
@@ -1285,7 +1274,6 @@ tip_op (optex, topP)
/* I'm done, so restore optex */
*optex = segfault;
-
/*
* At this point in the game, we (in theory) have all the components of
* the operand at least parsed. Now it's time to check for syntax/semantic
@@ -1437,7 +1425,7 @@ tip_op (optex, topP)
op_bad = _("You can't index a register in immediate mode.");
if (access == 'a')
op_bad = _("Immediate access can't be used as an address.");
- /* ponder the wisdom of a cast because it doesn't do any good. */
+ /* ponder the wisdom of a cast because it doesn't do any good. */
}
else if (deferred)
{
@@ -1454,7 +1442,7 @@ tip_op (optex, topP)
/*
* At this point, all the errors we can do have be checked for.
- * We can build the 'top'. */
+ * We can build the 'top'. */
topP->top_ndx = ndx;
topP->top_reg = reg;
@@ -1480,26 +1468,26 @@ tip_op (optex, topP)
static void
tip (titP, instring)
- struct tit *titP; /* We build an exploded instruction here. */
- char *instring; /* Text of a vax instruction: we modify. */
+ struct tit *titP; /* We build an exploded instruction here. */
+ char *instring; /* Text of a vax instruction: we modify. */
{
- register struct tot_wot *twP = NULL; /* How to bit-encode this opcode. */
+ register struct tot_wot *twP = NULL; /* How to bit-encode this opcode. */
register char *p; /* 1/skip whitespace.2/scan vot_how */
register char *q; /* */
register unsigned char count; /* counts number of operands seen */
register struct top *operandp;/* scan operands in struct tit */
register char *alloperr = ""; /* error over all operands */
register char c; /* Remember char, (we clobber it
- with '\0' temporarily). */
+ with '\0' temporarily). */
char *save_input_line_pointer;
if (*instring == ' ')
- ++instring; /* Skip leading whitespace. */
+ ++instring; /* Skip leading whitespace. */
for (p = instring; *p && *p != ' '; p++)
; /* MUST end in end-of-string or
- exactly 1 space. */
- /* Scanned up to end of operation-code. */
- /* Operation-code is ended with whitespace. */
+ exactly 1 space. */
+ /* Scanned up to end of operation-code. */
+ /* Operation-code is ended with whitespace. */
if (p == instring)
{
titP->tit_error = _("No operator");
@@ -1516,7 +1504,7 @@ tip (titP, instring)
* We trust instring points to an op-name, with no whitespace.
*/
twP = (struct tot_wot *) hash_find (op_hash, instring);
- *p = c; /* Restore char after op-code. */
+ *p = c; /* Restore char after op-code. */
if (twP == 0)
{
titP->tit_error = _("Unknown operator");
@@ -1526,7 +1514,7 @@ tip (titP, instring)
else
{
/*
- * We found a match! So lets pick up as many operands as the
+ * We found a match! So let's pick up as many operands as the
* instruction wants, and even gripe if there are too many.
* We expect comma to seperate each operand.
* We let instring track the text, while p tracks a part of the
@@ -1565,7 +1553,7 @@ tip (titP, instring)
operandp->top_access = p[0];
operandp->top_width = p[1];
tip_op (instring - 1, operandp);
- *q = c; /* Restore input text. */
+ *q = c; /* Restore input text. */
if (*(operandp->top_error))
{
alloperr = operandp->top_error;
@@ -1576,13 +1564,13 @@ tip (titP, instring)
else
alloperr = _("Not enough operands");
}
- /* Restore the pointer. */
+ /* Restore the pointer. */
input_line_pointer = save_input_line_pointer;
if (!*alloperr)
{
if (*instring == ' ')
- instring++; /* Skip whitespace. */
+ instring++; /* Skip whitespace. */
if (*instring)
alloperr = _("Too many operands");
}
@@ -1590,40 +1578,40 @@ tip (titP, instring)
}
}
- titP->tit_opcode = twP->code; /* The op-code. */
+ titP->tit_opcode = twP->code; /* The op-code. */
titP->tit_operands = count;
} /* tip */
/* md_assemble() emit frags for 1 instruction */
void
md_assemble (instruction_string)
- char *instruction_string; /* A string: assemble 1 instruction. */
+ char *instruction_string; /* A string: assemble 1 instruction. */
{
char *p;
- register struct top *operandP;/* An operand. Scans all operands. */
- /* char c_save; fixme: remove this line *//* What used to live after an expression. */
- /* struct frag *fragP; fixme: remove this line *//* Fragment of code we just made. */
+ register struct top *operandP;/* An operand. Scans all operands. */
+ /* char c_save; fixme: remove this line *//* What used to live after an expression. */
+ /* struct frag *fragP; fixme: remove this line *//* Fragment of code we just made. */
/* register struct top *end_operandP; fixme: remove this line *//* -> slot just after last operand
- Limit of the for (each operand). */
+ Limit of the for (each operand). */
register expressionS *expP; /* -> expression values for this operand */
- /* These refer to an instruction operand expression. */
+ /* These refer to an instruction operand expression. */
segT to_seg; /* Target segment of the address. */
register valueT this_add_number;
- register symbolS *this_add_symbol; /* +ve (minuend) symbol. */
+ register symbolS *this_add_symbol; /* +ve (minuend) symbol. */
- /* tahoe_opcodeT opcode_as_number; fixme: remove this line *//* The opcode as a number. */
- char *opcodeP; /* Where it is in a frag. */
- /* char *opmodeP; fixme: remove this line *//* Where opcode type is, in a frag. */
+ /* tahoe_opcodeT opcode_as_number; fixme: remove this line *//* The opcode as a number. */
+ char *opcodeP; /* Where it is in a frag. */
+ /* char *opmodeP; fixme: remove this line *//* Where opcode type is, in a frag. */
int dispsize; /* From top_dispsize: tahoe_operand_width
(in bytes) */
int is_undefined; /* 1 if operand expression's
- segment not known yet. */
+ segment not known yet. */
int pc_rel; /* Is this operand pc relative? */
- /* Decode the operand. */
+ /* Decode the operand. */
tip (&t, instruction_string);
/*
@@ -1640,11 +1628,11 @@ md_assemble (instruction_string)
else
{
/* We saw no errors in any operands - try to make frag(s) */
- /* Emit op-code. */
- /* Remember where it is, in case we want to modify the op-code later. */
+ /* Emit op-code. */
+ /* Remember where it is, in case we want to modify the op-code later. */
opcodeP = frag_more (1);
*opcodeP = t.tit_opcode;
- /* Now do each operand. */
+ /* Now do each operand. */
for (operandP = t.tit_operand;
operandP < t.tit_operand + t.tit_operands;
operandP++)
@@ -1657,7 +1645,7 @@ md_assemble (instruction_string)
FRAG_APPEND_1_CHAR (0x40 + operandP->top_ndx);
} /* if(top_ndx>=0) */
- /* Here to make main operand frag(s). */
+ /* Here to make main operand frag(s). */
this_add_number = expP->X_add_number;
this_add_symbol = expP->X_add_symbol;
to_seg = operandP->seg_of_operand;
@@ -1675,14 +1663,14 @@ md_assemble (instruction_string)
if (operandP->top_access == 'b')
{
/* Branches must be expressions. A psuedo branch can also jump to
- an absolute address. */
+ an absolute address. */
if (to_seg == now_seg || is_undefined)
{
- /* If is_undefined, then it might BECOME now_seg by relax time. */
+ /* If is_undefined, then it might BECOME now_seg by relax time. */
if (dispsize)
{
/* I know how big the branch is supposed to be (it's a normal
- branch), so I set up the frag, and let GAS do the rest. */
+ branch), so I set up the frag, and let GAS do the rest. */
p = frag_more (dispsize);
fix_new (frag_now, p - frag_now->fr_literal,
this_add_symbol, this_add_number,
@@ -1693,7 +1681,7 @@ md_assemble (instruction_string)
{
/* (to_seg==now_seg || to_seg == SEG_UNKNOWN) && dispsize==0 */
/* If we don't know how big it is, then its a synthetic branch,
- so we set up a simple relax state. */
+ so we set up a simple relax state. */
switch (operandP->top_width)
{
case TAHOE_WIDTH_CONDITIONAL_JUMP:
@@ -1708,13 +1696,13 @@ md_assemble (instruction_string)
break;
case TAHOE_WIDTH_ALWAYS_JUMP:
/* Simple (unconditional) jump. I may have to convert this to
- a word branch, or an absolute jump. */
+ a word branch, or an absolute jump. */
frag_var (rs_machine_dependent, 5, 1,
ENCODE_RELAX (STATE_ALWAYS_BRANCH,
is_undefined ? STATE_UNDF : STATE_BYTE),
this_add_symbol, this_add_number, opcodeP);
break;
- /* The smallest size for the next 2 cases is word. */
+ /* The smallest size for the next 2 cases is word. */
case TAHOE_WIDTH_BIG_REV_JUMP:
frag_var (rs_machine_dependent, 8, 2,
ENCODE_RELAX (STATE_BIG_REV_BRANCH,
@@ -1739,19 +1727,19 @@ md_assemble (instruction_string)
{
/* to_seg != now_seg && to_seg != seg_unknown (still in branch)
In other words, I'm jumping out of my segment so extend the
- branches to jumps, and let GAS fix them. */
+ branches to jumps, and let GAS fix them. */
/* These are "branches" what will always be branches around a jump
to the correct addresss in real life.
If to_seg is SEG_ABSOLUTE, just encode the branch in,
- else let GAS fix the address. */
+ else let GAS fix the address. */
switch (operandP->top_width)
{
/* The theory:
For SEG_ABSOLUTE, then mode is ABSOLUTE_ADDR, jump
to that addresss (not pc_rel).
- For other segs, address is a long word PC rel jump. */
+ For other segs, address is a long word PC rel jump. */
case TAHOE_WIDTH_CONDITIONAL_JUMP:
/* b<cond> */
/* To reverse the condition in a TAHOE branch,
@@ -1835,11 +1823,11 @@ md_assemble (instruction_string)
}
else
{
- /* It ain't a branch operand. */
+ /* It ain't a branch operand. */
switch (operandP->top_mode)
{
/* Auto-foo access, only works for one reg (SP)
- so the only thing needed is the mode. */
+ so the only thing needed is the mode. */
case TAHOE_AUTO_DEC:
case TAHOE_AUTO_INC:
case TAHOE_AUTO_INC_DEFERRED:
@@ -1854,7 +1842,7 @@ md_assemble (instruction_string)
break;
/* An absolute address. It's size is always 5 bytes.
- (mode_type + 4 byte address). */
+ (mode_type + 4 byte address). */
case TAHOE_ABSOLUTE_ADDR:
know ((this_add_symbol == NULL));
p = frag_more (5);
@@ -1863,7 +1851,7 @@ md_assemble (instruction_string)
break;
/* Immediate data. If the size isn't known, then it's an address
- + and offset, which is 4 bytes big. */
+ + and offset, which is 4 bytes big. */
case TAHOE_IMMEDIATE:
if (this_add_symbol != NULL)
{
@@ -1875,7 +1863,7 @@ md_assemble (instruction_string)
}
else
{
- /* It's a integer, and I know it's size. */
+ /* It's a integer, and I know it's size. */
if ((unsigned) this_add_number < 0x40)
{
/* Will it fit in a literal? */
@@ -1906,7 +1894,7 @@ md_assemble (instruction_string)
/* Distance from the PC. If the size isn't known, we have to relax
into it. The difference between this and disp(sp) is that
this offset is pc_rel, and disp(sp) isn't.
- Note the drop through code. */
+ Note the drop through code. */
case TAHOE_DISPLACED_RELATIVE:
case TAHOE_DISP_REL_DEFERRED:
@@ -1915,20 +1903,20 @@ md_assemble (instruction_string)
/* Register, plus a displacement mode. Save the register number,
and weather its deffered or not, and relax the size if it isn't
- known. */
+ known. */
case TAHOE_REG_DISP:
case TAHOE_REG_DISP_DEFERRED:
if (operandP->top_mode == TAHOE_DISP_REL_DEFERRED ||
operandP->top_mode == TAHOE_REG_DISP_DEFERRED)
operandP->top_reg += 0x10; /* deffered mode is always 0x10 higher
- than it's non-deffered sibling. */
+ than it's non-deffered sibling. */
/* Is this a value out of this segment?
The first part of this conditional is a cludge to make gas
produce the same output as 'as' when there is a lable, in
the current segment, displaceing a register. It's strange,
and no one in their right mind would do it, but it's easy
- to cludge. */
+ to cludge. */
if ((dispsize == 0 && !pc_rel) ||
(to_seg != now_seg && !is_undefined && to_seg != SEG_ABSOLUTE))
dispsize = 4;
@@ -1948,7 +1936,7 @@ md_assemble (instruction_string)
}
else
{
- /* Either this is an abs, or a cast. */
+ /* Either this is an abs, or a cast. */
p = frag_more (dispsize + 1);
switch (dispsize)
{
@@ -1975,10 +1963,8 @@ md_assemble (instruction_string)
} /* if(!need_pass_2 && !goofed) */
} /* tahoe_assemble() */
+/* We have no need to default values of symbols. */
-/* We have no need to default values of symbols. */
-
-/* ARGSUSED */
symbolS *
md_undefined_symbol (name)
char *name;
@@ -1986,7 +1972,7 @@ md_undefined_symbol (name)
return 0;
} /* md_undefined_symbol() */
-/* Round up a section size to the appropriate boundary. */
+/* Round up a section size to the appropriate boundary. */
valueT
md_section_align (segment, size)
segT segment;
@@ -1999,7 +1985,7 @@ md_section_align (segment, size)
On the sparc, they're relative to the address of the offset, plus
its size. This gets us to the following instruction.
(??? Is this right? FIXME-SOON) */
-long
+long
md_pcrel_from (fixP)
fixS *fixP;
{
@@ -2015,7 +2001,7 @@ md_pcrel_from (fixP)
: 0))) + fixP->fx_where + fixP->fx_frag->fr_address);
} /* md_pcrel_from() */
-int
+int
tc_is_pcrel (fixP)
fixS *fixP;
{
@@ -2023,5 +2009,3 @@ tc_is_pcrel (fixP)
know (0);
return (0);
} /* tc_is_pcrel() */
-
-/* end of tc-tahoe.c */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-vax.c b/gnu/usr.bin/binutils/gas/config/tc-vax.c
index f425cccff36..bf6558ced6c 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-vax.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-vax.c
@@ -1,5 +1,5 @@
/* tc-vax.c - vax-specific -
- Copyright (C) 1987, 91, 92, 93, 94, 95, 98, 1999
+ Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -28,11 +28,11 @@
another comment */
const char comment_chars[] = "#";
-/* These chars only start a comment at the beginning of a line. */
-/* Note that for the VAX the are the same as comment_chars above. */
+/* These chars only start a comment at the beginning of a line. */
+/* Note that for the VAX the are the same as comment_chars above. */
const char line_comment_chars[] = "#";
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
@@ -50,13 +50,13 @@ const char FLT_CHARS[] = "dDfFgGhH";
static expressionS exp_of_operand[VIT_MAX_OPERANDS];
static segT seg_of_operand[VIT_MAX_OPERANDS];
-/* A vax instruction after decoding. */
+/* A vax instruction after decoding. */
static struct vit v;
-/* Hold details of big operands. */
+/* Hold details of big operands. */
LITTLENUM_TYPE big_operand_bits[VIT_MAX_OPERANDS][SIZE_OF_LARGE_NUMBER];
FLONUM_TYPE float_operand[VIT_MAX_OPERANDS];
-/* Above is made to point into big_operand_bits by md_begin(). */
+/* Above is made to point into big_operand_bits by md_begin(). */
int flag_hash_long_names; /* -+ */
int flag_one; /* -1 */
@@ -113,8 +113,6 @@ int flag_no_hash_mixed_case; /* -h NUM */
bbcs e3
bbsc e4
bbcc e5
- bbssi e6
- bbcci e7
Always, you complement 0th bit to reverse condition.
Always, 1-byte opcde, longword-address, byte-address, 1-byte-displacement
@@ -173,17 +171,18 @@ int flag_no_hash_mixed_case; /* -h NUM */
/* These displacements are relative to the start address of the
displacement. The first letter is Byte, Word. 2nd letter is
- Forward, Backward. */
+ Forward, Backward. */
#define BF (1+ 127)
#define BB (1+-128)
#define WF (2+ 32767)
#define WB (2+-32768)
/* Dont need LF, LB because they always reach. [They are coded as 0.] */
-
#define C(a,b) ENCODE_RELAX(a,b)
-/* This macro has no side-effects. */
+/* This macro has no side-effects. */
#define ENCODE_RELAX(what,length) (((what) << 2) + (length))
+#define RELAX_STATE(s) ((s) >> 2)
+#define RELAX_LENGTH(s) ((s) & 3)
const relax_typeS md_relax_table[] =
{
@@ -191,25 +190,31 @@ const relax_typeS md_relax_table[] =
{1, 1, 0, 0}, /* unused 0,1 */
{1, 1, 0, 0}, /* unused 0,2 */
{1, 1, 0, 0}, /* unused 0,3 */
+
{BF + 1, BB + 1, 2, C (1, 1)},/* B^"foo" 1,0 */
{WF + 1, WB + 1, 3, C (1, 2)},/* W^"foo" 1,1 */
{0, 0, 5, 0}, /* L^"foo" 1,2 */
{1, 1, 0, 0}, /* unused 1,3 */
+
{BF, BB, 1, C (2, 1)}, /* b<cond> B^"foo" 2,0 */
{WF + 2, WB + 2, 4, C (2, 2)},/* br.+? brw X 2,1 */
{0, 0, 7, 0}, /* br.+? jmp X 2,2 */
{1, 1, 0, 0}, /* unused 2,3 */
+
{BF, BB, 1, C (3, 1)}, /* brb B^foo 3,0 */
{WF, WB, 2, C (3, 2)}, /* brw W^foo 3,1 */
{0, 0, 5, 0}, /* Jmp L^foo 3,2 */
{1, 1, 0, 0}, /* unused 3,3 */
+
{1, 1, 0, 0}, /* unused 4,0 */
{WF, WB, 2, C (4, 2)}, /* acb_ ^Wfoo 4,1 */
{0, 0, 10, 0}, /* acb_,br,jmp L^foo4,2 */
{1, 1, 0, 0}, /* unused 4,3 */
+
{BF, BB, 1, C (5, 1)}, /* Xob___,,foo 5,0 */
{WF + 4, WB + 4, 6, C (5, 2)},/* Xob.+2,brb.+3,brw5,1 */
{0, 0, 9, 0}, /* Xob.+2,brb.+6,jmp5,2 */
+ {1, 1, 0, 0}, /* unused 5,3 */
};
#undef C
@@ -231,7 +236,7 @@ const pseudo_typeS md_pseudo_table[] =
#define STATE_PC_RELATIVE (1)
#define STATE_CONDITIONAL_BRANCH (2)
-#define STATE_ALWAYS_BRANCH (3) /* includes BSB... */
+#define STATE_ALWAYS_BRANCH (3) /* includes BSB... */
#define STATE_COMPLEX_BRANCH (4)
#define STATE_COMPLEX_HOP (5)
@@ -240,7 +245,6 @@ const pseudo_typeS md_pseudo_table[] =
#define STATE_LONG (2)
#define STATE_UNDF (3) /* Symbol undefined in pass1 */
-
#define min(a, b) ((a) < (b) ? (a) : (b))
int flonum_gen2vax PARAMS ((char format_letter, FLONUM_TYPE * f,
@@ -284,7 +288,7 @@ md_number_to_chars (con, value, nbytes)
/* Fix up some data or instructions after we find out the value of a symbol
that they reference. */
-void /* Knows about order of bytes in address. */
+void /* Knows about order of bytes in address. */
md_apply_fix (fixP, value)
fixS *fixP;
long value;
@@ -295,8 +299,8 @@ md_apply_fix (fixP, value)
long
md_chars_to_number (con, nbytes)
- unsigned char con[]; /* Low order byte 1st. */
- int nbytes; /* Number of bytes in the input. */
+ unsigned char con[]; /* Low order byte 1st. */
+ int nbytes; /* Number of bytes in the input. */
{
long retval;
for (retval = 0, con += nbytes - 1; nbytes--; con--)
@@ -311,19 +315,19 @@ md_chars_to_number (con, nbytes)
void
md_assemble (instruction_string)
- char *instruction_string; /* A string: assemble 1 instruction. */
+ char *instruction_string; /* A string: assemble 1 instruction. */
{
- /* Non-zero if operand expression's segment is not known yet. */
+ /* Non-zero if operand expression's segment is not known yet. */
int is_undefined;
int length_code;
char *p;
- /* An operand. Scans all operands. */
+ /* An operand. Scans all operands. */
struct vop *operandP;
char *save_input_line_pointer;
- /* What used to live after an expression. */
+ /* What used to live after an expression. */
char c_save;
- /* 1: instruction_string bad for all passes. */
+ /* 1: instruction_string bad for all passes. */
int goofed;
/* Points to slot just after last operand. */
struct vop *end_operandP;
@@ -331,28 +335,28 @@ md_assemble (instruction_string)
expressionS *expP;
segT *segP;
- /* These refer to an instruction operand expression. */
+ /* These refer to an instruction operand expression. */
/* Target segment of the address. */
segT to_seg;
valueT this_add_number;
- /* Positive (minuend) symbol. */
+ /* Positive (minuend) symbol. */
symbolS *this_add_symbol;
- /* As a number. */
+ /* As a number. */
long opcode_as_number;
- /* Least significant byte 1st. */
+ /* Least significant byte 1st. */
char *opcode_as_chars;
- /* As an array of characters. */
+ /* As an array of characters. */
/* Least significant byte 1st */
char *opcode_low_byteP;
- /* length (bytes) meant by vop_short. */
+ /* length (bytes) meant by vop_short. */
int length;
- /* 0, or 1 if '@' is in addressing mode. */
+ /* 0, or 1 if '@' is in addressing mode. */
int at;
/* From vop_nbytes: vax_operand_width (in bytes) */
int nbytes;
FLONUM_TYPE *floatP;
LITTLENUM_TYPE literal_float[8];
- /* Big enough for any floating point literal. */
+ /* Big enough for any floating point literal. */
vip (&v, instruction_string);
@@ -389,13 +393,13 @@ md_assemble (instruction_string)
}
else
{
- /* statement has no syntax goofs: lets sniff the expression */
- int can_be_short = 0; /* 1 if a bignum can be reduced to a short literal. */
+ /* Statement has no syntax goofs: let's sniff the expression. */
+ int can_be_short = 0; /* 1 if a bignum can be reduced to a short literal. */
input_line_pointer = operandP->vop_expr_begin;
c_save = operandP->vop_expr_end[1];
operandP->vop_expr_end[1] = '\0';
- /* If to_seg == SEG_PASS1, expression() will have set need_pass_2 = 1. */
+ /* If to_seg == SEG_PASS1, expression() will have set need_pass_2 = 1. */
*segP = expression (expP);
switch (expP->X_op)
{
@@ -435,7 +439,7 @@ md_assemble (instruction_string)
break;
case O_big:
- /* Preserve the bits. */
+ /* Preserve the bits. */
if (expP->X_add_number > 0)
{
bignum_copy (generic_bignum, expP->X_add_number,
@@ -498,20 +502,20 @@ md_assemble (instruction_string)
&& operandP->vop_reg == 0xF
&& (operandP->vop_mode & 0xE) == 0x8))
{
- /* Saw a '#'. */
+ /* Saw a '#'. */
if (operandP->vop_short == ' ')
{
- /* We must chose S^ or I^. */
+ /* We must chose S^ or I^. */
if (expP->X_add_number > 0)
{
- /* Bignum: Short literal impossible. */
+ /* Bignum: Short literal impossible. */
operandP->vop_short = 'i';
operandP->vop_mode = 8;
- operandP->vop_reg = 0xF; /* VAX PC. */
+ operandP->vop_reg = 0xF; /* VAX PC. */
}
else
{
- /* Flonum: Try to do it. */
+ /* Flonum: Try to do it. */
if (can_be_short)
{
operandP->vop_short = 's';
@@ -527,17 +531,17 @@ md_assemble (instruction_string)
operandP->vop_reg = 0xF; /* VAX PC */
}
} /* bignum or flonum ? */
- } /* if #, but no S^ or I^ seen. */
- /* No more ' ' case: either 's' or 'i'. */
+ } /* if #, but no S^ or I^ seen. */
+ /* No more ' ' case: either 's' or 'i'. */
if (operandP->vop_short == 's')
{
- /* Wants to be a short literal. */
+ /* Wants to be a short literal. */
if (expP->X_add_number > 0)
{
as_warn (_("Bignum not permitted in short literal. Immediate mode assumed."));
operandP->vop_short = 'i';
operandP->vop_mode = 8;
- operandP->vop_reg = 0xF; /* VAX PC. */
+ operandP->vop_reg = 0xF; /* VAX PC. */
}
else
{
@@ -546,10 +550,10 @@ md_assemble (instruction_string)
as_warn (_("Can't do flonum short literal: immediate mode used."));
operandP->vop_short = 'i';
operandP->vop_mode = 8;
- operandP->vop_reg = 0xF; /* VAX PC. */
+ operandP->vop_reg = 0xF; /* VAX PC. */
}
else
- { /* Encode short literal now. */
+ { /* Encode short literal now. */
int temp = 0;
switch (-expP->X_add_number)
@@ -579,18 +583,18 @@ md_assemble (instruction_string)
} /* flonum or bignum ? */
}
else
- { /* I^# seen: set it up if float. */
+ { /* I^# seen: set it up if float. */
if (expP->X_add_number < 0)
{
memcpy (floatP->low, literal_float, sizeof (literal_float));
}
- } /* if S^# seen. */
+ } /* if S^# seen. */
}
else
{
as_warn (_("A bignum/flonum may not be a displacement: 0x%lx used"),
(expP->X_add_number = 0x80000000L));
- /* Chosen so luser gets the most offset bits to patch later. */
+ /* Chosen so luser gets the most offset bits to patch later. */
}
expP->X_add_number = floatP->low[0]
| ((LITTLENUM_MASK & (floatP->low[1])) << LITTLENUM_NUMBER_OF_BITS);
@@ -623,9 +627,8 @@ md_assemble (instruction_string)
return;
}
-
- /* Emit op-code. */
- /* Remember where it is, in case we want to modify the op-code later. */
+ /* Emit op-code. */
+ /* Remember where it is, in case we want to modify the op-code later. */
opcode_low_byteP = frag_more (v.vit_opcode_nbytes);
memcpy (opcode_low_byteP, v.vit_opcode, v.vit_opcode_nbytes);
opcode_as_number = md_chars_to_number (opcode_as_chars = v.vit_opcode, 4);
@@ -649,7 +652,7 @@ md_assemble (instruction_string)
FRAG_APPEND_1_CHAR (0x40 + operandP->vop_ndx);
} /* if(vop_ndx>=0) */
- /* Here to make main operand frag(s). */
+ /* Here to make main operand frag(s). */
this_add_number = expP->X_add_number;
this_add_symbol = expP->X_add_symbol;
to_seg = *segP;
@@ -664,7 +667,7 @@ md_assemble (instruction_string)
{
if (to_seg == now_seg || is_undefined)
{
- /* If is_undefined, then it might BECOME now_seg. */
+ /* If is_undefined, then it might BECOME now_seg. */
if (nbytes)
{
p = frag_more (nbytes);
@@ -728,7 +731,7 @@ md_assemble (instruction_string)
{
know (!(opcode_as_number & VIT_OPCODE_SYNTHETIC));
p = frag_more (nbytes);
- /* Conventional relocation. */
+ /* Conventional relocation. */
fix_new (frag_now, p - frag_now->fr_literal,
nbytes, &abs_symbol, this_add_number,
1, NO_RELOC);
@@ -744,9 +747,9 @@ md_assemble (instruction_string)
*opcode_low_byteP = opcode_as_chars[0] + VAX_WIDEN_LONG;
know (opcode_as_chars[1] == 0);
p = frag_more (5);
- p[0] = VAX_ABSOLUTE_MODE; /* @#... */
+ p[0] = VAX_ABSOLUTE_MODE; /* @#... */
md_number_to_chars (p + 1, this_add_number, 4);
- /* Now (eg) JMP @#foo or JSB @#foo. */
+ /* Now (eg) JMP @#foo or JSB @#foo. */
}
else
{
@@ -758,7 +761,7 @@ md_assemble (instruction_string)
p[2] = VAX_BRB;
p[3] = 6;
p[4] = VAX_JMP;
- p[5] = VAX_ABSOLUTE_MODE; /* @#... */
+ p[5] = VAX_ABSOLUTE_MODE; /* @#... */
md_number_to_chars (p + 6, this_add_number, 4);
/*
* Now (eg) ACBx 1f
@@ -775,7 +778,7 @@ md_assemble (instruction_string)
p[1] = VAX_BRB;
p[2] = 6;
p[3] = VAX_JMP;
- p[4] = VAX_PC_RELATIVE_MODE + 1; /* @#... */
+ p[4] = VAX_ABSOLUTE_MODE; /* @#... */
md_number_to_chars (p + 5, this_add_number, 4);
/*
* Now (eg) xOBxxx 1f
@@ -791,11 +794,11 @@ md_assemble (instruction_string)
/* b<cond> */
*opcode_low_byteP ^= 1;
/* To reverse the condition in a VAX branch,
- complement the lowest order bit. */
+ complement the lowest order bit. */
p = frag_more (7);
p[0] = 6;
p[1] = VAX_JMP;
- p[2] = VAX_ABSOLUTE_MODE; /* @#... */
+ p[2] = VAX_ABSOLUTE_MODE; /* @#... */
md_number_to_chars (p + 3, this_add_number, 4);
/*
* Now (eg) BLEQ 1f
@@ -810,7 +813,7 @@ md_assemble (instruction_string)
/* to_seg != now_seg && to_seg != SEG_UNKNOWN && to_Seg != SEG_ABSOLUTE */
if (nbytes > 0)
{
- /* Pc-relative. Conventional relocation. */
+ /* Pc-relative. Conventional relocation. */
know (!(opcode_as_number & VIT_OPCODE_SYNTHETIC));
p = frag_more (nbytes);
fix_new (frag_now, p - frag_now->fr_literal,
@@ -833,7 +836,7 @@ md_assemble (instruction_string)
p + 1 - frag_now->fr_literal, 4,
this_add_symbol,
this_add_number, 1, NO_RELOC);
- /* Now eg JMP foo or JSB foo. */
+ /* Now eg JMP foo or JSB foo. */
}
else
{
@@ -882,7 +885,7 @@ md_assemble (instruction_string)
else
{
know (operandP->vop_width == VAX_WIDTH_CONDITIONAL_JUMP);
- *opcode_low_byteP ^= 1; /* Reverse branch condition. */
+ *opcode_low_byteP ^= 1; /* Reverse branch condition. */
p = frag_more (7);
p[0] = 6;
p[1] = VAX_JMP;
@@ -897,8 +900,8 @@ md_assemble (instruction_string)
}
else
{
- know (operandP->vop_access != 'b'); /* So it is ordinary operand. */
- know (operandP->vop_access != ' '); /* ' ' target-independent: elsewhere. */
+ know (operandP->vop_access != 'b'); /* So it is ordinary operand. */
+ know (operandP->vop_access != ' '); /* ' ' target-independent: elsewhere. */
know (operandP->vop_access == 'a'
|| operandP->vop_access == 'm'
|| operandP->vop_access == 'r'
@@ -929,10 +932,10 @@ md_assemble (instruction_string)
if (operandP->vop_reg >= 0 && (operandP->vop_mode < 8
|| (operandP->vop_reg != 0xF && operandP->vop_mode < 10)))
{
- /* One byte operand. */
+ /* One byte operand. */
know (operandP->vop_mode > 3);
FRAG_APPEND_1_CHAR (operandP->vop_mode << 4 | operandP->vop_reg);
- /* All 1-bytes except S^# happen here. */
+ /* All 1-bytes except S^# happen here. */
}
else
{
@@ -954,7 +957,7 @@ md_assemble (instruction_string)
/* At is the only context we need to carry
to other side of relax() process. Must
be in the correct bit position of VAX
- operand spec. byte. */
+ operand spec. byte. */
}
else
{
@@ -972,9 +975,9 @@ md_assemble (instruction_string)
if (this_add_symbol == NULL)
{
know (to_seg == SEG_ABSOLUTE);
- /* Do @#foo: simpler relocation than foo-.(pc) anyway. */
+ /* Do @#foo: simpler relocation than foo-.(pc) anyway. */
p = frag_more (5);
- p[0] = VAX_ABSOLUTE_MODE; /* @#... */
+ p[0] = VAX_ABSOLUTE_MODE; /* @#... */
md_number_to_chars (p + 1, this_add_number, 4);
if (length && length != 4)
{
@@ -1004,7 +1007,7 @@ md_assemble (instruction_string)
if (length == 0)
{
know (operandP->vop_short == ' ');
- length = 4; /* Longest possible. */
+ length = 4; /* Longest possible. */
}
p = frag_more (length + 1);
p[0] = 0xF | ((at + "?\12\14?\16"[length]) << 4);
@@ -1035,7 +1038,7 @@ md_assemble (instruction_string)
}
if (length == 0
&& to_seg == SEG_ABSOLUTE && (expP->X_op != O_big)
- && operandP->vop_mode == 8 /* No '@'. */
+ && operandP->vop_mode == 8 /* No '@'. */
&& this_add_number < 64)
{
operandP->vop_short = 's';
@@ -1046,7 +1049,7 @@ md_assemble (instruction_string)
}
else
{
- /* I^#... */
+ /* I^#... */
know (nbytes);
p = frag_more (nbytes + 1);
know (operandP->vop_reg == 0xF);
@@ -1059,7 +1062,7 @@ md_assemble (instruction_string)
* are to be 0xFF or 0x00. BSD4.2 & RMS
* say use 0x00. OK --- but this
* assembler needs ANOTHER rewrite to
- * cope properly with this bug. */
+ * cope properly with this bug. */
md_number_to_chars (p + 1, this_add_number, min (4, nbytes));
if (nbytes > 4)
{
@@ -1074,7 +1077,7 @@ md_assemble (instruction_string)
* Problem here is to get the bytes
* in the right order. We stored
* our constant as LITTLENUMs, not
- * bytes. */
+ * bytes. */
LITTLENUM_TYPE *lP;
lP = floatP->low;
@@ -1145,127 +1148,112 @@ md_assemble (instruction_string)
} /* for(operandP) */
} /* vax_assemble() */
-/*
- * md_estimate_size_before_relax()
- *
- * Called just before relax().
- * Any symbol that is now undefined will not become defined.
- * Return the correct fr_subtype in the frag.
- * Return the initial "guess for fr_var" to caller.
- * The guess for fr_var is ACTUALLY the growth beyond fr_fix.
- * Whatever we do to grow fr_fix or fr_var contributes to our returned value.
- * Although it may not be explicit in the frag, pretend fr_var starts with a
- * 0 value.
- */
+/* md_estimate_size_before_relax(), called just before relax().
+ Any symbol that is now undefined will not become defined.
+ Return the correct fr_subtype in the frag and the growth beyond
+ fr_fix. */
int
md_estimate_size_before_relax (fragP, segment)
fragS *fragP;
segT segment;
{
- char *p;
- int old_fr_fix;
-
- old_fr_fix = fragP->fr_fix;
- switch (fragP->fr_subtype)
+ if (RELAX_LENGTH (fragP->fr_subtype) == STATE_UNDF)
{
- case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment)
- { /* A relaxable case. */
- fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE);
- }
- else
+ if (S_GET_SEGMENT (fragP->fr_symbol) != segment)
{
- p = fragP->fr_literal + old_fr_fix;
- p[0] |= VAX_PC_RELATIVE_MODE; /* Preserve @ bit. */
- fragP->fr_fix += 1 + 4;
- fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- frag_wane (fragP);
- }
- break;
+ /* Non-relaxable cases. */
+ char *p;
+ int old_fr_fix;
- case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment)
- {
- fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE);
- }
- else
- {
+ old_fr_fix = fragP->fr_fix;
p = fragP->fr_literal + old_fr_fix;
- *fragP->fr_opcode ^= 1; /* Reverse sense of branch. */
- p[0] = 6;
- p[1] = VAX_JMP;
- p[2] = VAX_PC_RELATIVE_MODE; /* ...(PC) */
- fragP->fr_fix += 1 + 1 + 1 + 4;
- fix_new (fragP, old_fr_fix + 3, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- frag_wane (fragP);
- }
- break;
+ switch (RELAX_STATE (fragP->fr_subtype))
+ {
+ case STATE_PC_RELATIVE:
+ p[0] |= VAX_PC_RELATIVE_MODE; /* Preserve @ bit. */
+ fragP->fr_fix += 1 + 4;
+ fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, NO_RELOC);
+ break;
- case ENCODE_RELAX (STATE_COMPLEX_BRANCH, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment)
- {
- fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_BRANCH, STATE_WORD);
- }
- else
- {
- p = fragP->fr_literal + old_fr_fix;
- p[0] = 2;
- p[1] = 0;
- p[2] = VAX_BRB;
- p[3] = 6;
- p[4] = VAX_JMP;
- p[5] = VAX_PC_RELATIVE_MODE; /* ...(pc) */
- fragP->fr_fix += 2 + 2 + 1 + 1 + 4;
- fix_new (fragP, old_fr_fix + 6, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- frag_wane (fragP);
- }
- break;
+ case STATE_CONDITIONAL_BRANCH:
+ *fragP->fr_opcode ^= 1; /* Reverse sense of branch. */
+ p[0] = 6;
+ p[1] = VAX_JMP;
+ p[2] = VAX_PC_RELATIVE_MODE; /* ...(PC) */
+ fragP->fr_fix += 1 + 1 + 1 + 4;
+ fix_new (fragP, old_fr_fix + 3, 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, NO_RELOC);
+ break;
- case ENCODE_RELAX (STATE_COMPLEX_HOP, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment)
- {
- fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_HOP, STATE_BYTE);
- }
- else
- {
- p = fragP->fr_literal + old_fr_fix;
- p[0] = 2;
- p[1] = VAX_BRB;
- p[2] = 6;
- p[3] = VAX_JMP;
- p[4] = VAX_PC_RELATIVE_MODE; /* ...(pc) */
- fragP->fr_fix += 1 + 2 + 1 + 1 + 4;
- fix_new (fragP, old_fr_fix + 5, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
+ case STATE_COMPLEX_BRANCH:
+ p[0] = 2;
+ p[1] = 0;
+ p[2] = VAX_BRB;
+ p[3] = 6;
+ p[4] = VAX_JMP;
+ p[5] = VAX_PC_RELATIVE_MODE; /* ...(pc) */
+ fragP->fr_fix += 2 + 2 + 1 + 1 + 4;
+ fix_new (fragP, old_fr_fix + 6, 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, NO_RELOC);
+ break;
+
+ case STATE_COMPLEX_HOP:
+ p[0] = 2;
+ p[1] = VAX_BRB;
+ p[2] = 6;
+ p[3] = VAX_JMP;
+ p[4] = VAX_PC_RELATIVE_MODE; /* ...(pc) */
+ fragP->fr_fix += 1 + 2 + 1 + 1 + 4;
+ fix_new (fragP, old_fr_fix + 5, 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, NO_RELOC);
+ break;
+
+ case STATE_ALWAYS_BRANCH:
+ *fragP->fr_opcode += VAX_WIDEN_LONG;
+ p[0] = VAX_PC_RELATIVE_MODE; /* ...(PC) */
+ fragP->fr_fix += 1 + 4;
+ fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, NO_RELOC);
+ break;
+
+ default:
+ abort ();
+ }
frag_wane (fragP);
+
+ /* Return the growth in the fixed part of the frag. */
+ return fragP->fr_fix - old_fr_fix;
}
- break;
- case ENCODE_RELAX (STATE_ALWAYS_BRANCH, STATE_UNDF):
- if (S_GET_SEGMENT (fragP->fr_symbol) == segment)
+ /* Relaxable cases. Set up the initial guess for the variable
+ part of the frag. */
+ switch (RELAX_STATE (fragP->fr_subtype))
{
+ case STATE_PC_RELATIVE:
+ fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE);
+ break;
+ case STATE_CONDITIONAL_BRANCH:
+ fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE);
+ break;
+ case STATE_COMPLEX_BRANCH:
+ fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_BRANCH, STATE_WORD);
+ break;
+ case STATE_COMPLEX_HOP:
+ fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_HOP, STATE_BYTE);
+ break;
+ case STATE_ALWAYS_BRANCH:
fragP->fr_subtype = ENCODE_RELAX (STATE_ALWAYS_BRANCH, STATE_BYTE);
+ break;
}
- else
- {
- p = fragP->fr_literal + old_fr_fix;
- *fragP->fr_opcode += VAX_WIDEN_LONG;
- p[0] = VAX_PC_RELATIVE_MODE; /* ...(PC) */
- fragP->fr_fix += 1 + 4;
- fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, NO_RELOC);
- frag_wane (fragP);
- }
- break;
-
- default:
- break;
}
- return (fragP->fr_var + fragP->fr_fix - old_fr_fix);
-} /* md_estimate_size_before_relax() */
+
+ if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0]))
+ abort ();
+
+ /* Return the size of the variable part of the frag. */
+ return md_relax_table[fragP->fr_subtype].rlx_length;
+}
/*
* md_convert_frag();
@@ -1284,11 +1272,10 @@ md_convert_frag (headers, seg, fragP)
segT seg;
fragS *fragP;
{
- char *addressP; /* -> _var to change. */
- char *opcodeP; /* -> opcode char(s) to change. */
- short int length_code; /* 2=long 1=word 0=byte */
- short int extension = 0; /* Size of relaxed address. */
- /* Added to fr_fix: incl. ALL var chars. */
+ char *addressP; /* -> _var to change. */
+ char *opcodeP; /* -> opcode char(s) to change. */
+ short int extension = 0; /* Size of relaxed address. */
+ /* Added to fr_fix: incl. ALL var chars. */
symbolS *symbolP;
long where;
long address_of_var;
@@ -1297,8 +1284,6 @@ md_convert_frag (headers, seg, fragP)
/* Where, in file space, does addr point? */
know (fragP->fr_type == rs_machine_dependent);
- length_code = fragP->fr_subtype & 3; /* depends on ENCODE_RELAX() */
- know (length_code >= 0 && length_code < 3);
where = fragP->fr_fix;
addressP = fragP->fr_literal + where;
opcodeP = fragP->fr_opcode;
@@ -1311,22 +1296,22 @@ md_convert_frag (headers, seg, fragP)
{
case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE):
- know (*addressP == 0 || *addressP == 0x10); /* '@' bit. */
- addressP[0] |= 0xAF; /* Byte displacement. */
+ know (*addressP == 0 || *addressP == 0x10); /* '@' bit. */
+ addressP[0] |= 0xAF; /* Byte displacement. */
addressP[1] = target_address - (address_of_var + 2);
extension = 2;
break;
case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_WORD):
- know (*addressP == 0 || *addressP == 0x10); /* '@' bit. */
- addressP[0] |= 0xCF; /* Word displacement. */
+ know (*addressP == 0 || *addressP == 0x10); /* '@' bit. */
+ addressP[0] |= 0xCF; /* Word displacement. */
md_number_to_chars (addressP + 1, target_address - (address_of_var + 3), 2);
extension = 3;
break;
case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_LONG):
- know (*addressP == 0 || *addressP == 0x10); /* '@' bit. */
- addressP[0] |= 0xEF; /* Long word displacement. */
+ know (*addressP == 0 || *addressP == 0x10); /* '@' bit. */
+ addressP[0] |= 0xEF; /* Long word displacement. */
md_number_to_chars (addressP + 1, target_address - (address_of_var + 5), 4);
extension = 5;
break;
@@ -1337,7 +1322,7 @@ md_convert_frag (headers, seg, fragP)
break;
case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_WORD):
- opcodeP[0] ^= 1; /* Reverse sense of test. */
+ opcodeP[0] ^= 1; /* Reverse sense of test. */
addressP[0] = 3;
addressP[1] = VAX_BRB + VAX_WIDEN_WORD;
md_number_to_chars (addressP + 2, target_address - (address_of_var + 4), 2);
@@ -1345,11 +1330,11 @@ md_convert_frag (headers, seg, fragP)
break;
case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_LONG):
- opcodeP[0] ^= 1; /* Reverse sense of test. */
+ opcodeP[0] ^= 1; /* Reverse sense of test. */
addressP[0] = 6;
addressP[1] = VAX_JMP;
addressP[2] = VAX_PC_RELATIVE_MODE;
- md_number_to_chars (addressP + 3, target_address, 4);
+ md_number_to_chars (addressP + 3, target_address - (address_of_var + 7), 4);
extension = 7;
break;
@@ -1383,7 +1368,7 @@ md_convert_frag (headers, seg, fragP)
addressP[3] = 6;
addressP[4] = VAX_JMP;
addressP[5] = VAX_PC_RELATIVE_MODE;
- md_number_to_chars (addressP + 6, target_address, 4);
+ md_number_to_chars (addressP + 6, target_address - (address_of_var + 10), 4);
extension = 10;
break;
@@ -1407,7 +1392,7 @@ md_convert_frag (headers, seg, fragP)
addressP[2] = 6;
addressP[3] = VAX_JMP;
addressP[4] = VAX_PC_RELATIVE_MODE;
- md_number_to_chars (addressP + 5, target_address, 4);
+ md_number_to_chars (addressP + 5, target_address - (address_of_var + 9), 4);
extension = 9;
break;
@@ -1423,7 +1408,7 @@ md_convert_frag (headers, seg, fragP)
On vax: first 4 bytes are normal unsigned long, next three bytes
are symbolnum, least sig. byte first. Last byte is broken up with
the upper nibble as nuthin, bit 3 as extern, bits 2 & 1 as length, and
- bit 0 as pcrel. */
+ bit 0 as pcrel. */
#ifdef comment
void
md_ri_to_chars (the_bytes, ri)
@@ -1442,7 +1427,7 @@ md_ri_to_chars (the_bytes, ri)
#endif /* comment */
-void
+void
tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
char *where;
fixS *fixP;
@@ -1556,10 +1541,10 @@ static const short int vax_operand_width_size[256] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 8, 0, 4, 8, 16, 0, 0, 0, 4, 0, 0,16, /* ..b.d.fgh...l..o */
- 0, 8, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, /* .q.....w........ */
- 0, 0, 1, 0, 8, 0, 4, 8, 16, 0, 0, 0, 4, 0, 0,16, /* ..b.d.fgh...l..o */
- 0, 8, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, /* .q.....w........ */
+ 0, 0, 1, 0, 8, 0, 4, 8, 16, 0, 0, 0, 4, 0, 0,16, /* ..b.d.fgh...l..o */
+ 0, 8, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, /* .q.....w........ */
+ 0, 0, 1, 0, 8, 0, 4, 8, 16, 0, 0, 0, 4, 0, 0,16, /* ..b.d.fgh...l..o */
+ 0, 8, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, /* .q.....w........ */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1666,8 +1651,6 @@ static const struct vot
{"jbcs", {"rlvbb?", 0x800000e3}},
{"jbsc", {"rlvbb?", 0x800000e4}},
{"jbcc", {"rlvbb?", 0x800000e5}},
- {"jbssi", {"rlvbb?", 0x800000e6}},
- {"jbcci", {"rlvbb?", 0x800000e7}},
{"jlbs", {"rlb?", 0x800000e8}},
{"jlbc", {"rlb?", 0x800000e9}},
@@ -1676,8 +1659,8 @@ static const struct vot
{"jsobgeq", {"mlb:", 0xC00000f4}},
{"jsobgtr", {"mlb:", 0xC00000f5}},
-/* CASEx has no branch addresses in our conception of it. */
-/* You should use ".word ..." statements after the "case ...". */
+/* CASEx has no branch addresses in our conception of it. */
+/* You should use ".word ..." statements after the "case ...". */
{"", {"", 0}} /* empty is end sentinel */
@@ -1696,7 +1679,7 @@ static const struct vot
static const char *
vip_begin (synthetic_too, immediate, indirect, displen)
- int synthetic_too; /* 1 means include jXXX op-codes. */
+ int synthetic_too; /* 1 means include jXXX op-codes. */
const char *immediate, *indirect, *displen;
{
const struct vot *vP; /* scan votstrs */
@@ -1718,7 +1701,6 @@ vip_begin (synthetic_too, immediate, indirect, displen)
return retval;
}
-
/*
* v i p ( )
*
@@ -1745,10 +1727,10 @@ vip_begin (synthetic_too, immediate, indirect, displen)
static void
vip (vitP, instring)
- struct vit *vitP; /* We build an exploded instruction here. */
- char *instring; /* Text of a vax instruction: we modify. */
+ struct vit *vitP; /* We build an exploded instruction here. */
+ char *instring; /* Text of a vax instruction: we modify. */
{
- /* How to bit-encode this opcode. */
+ /* How to bit-encode this opcode. */
struct vot_wot *vwP;
/* 1/skip whitespace.2/scan vot_how */
char *p;
@@ -1759,16 +1741,16 @@ vip (vitP, instring)
struct vop *operandp;
/* error over all operands */
const char *alloperr;
- /* Remember char, (we clobber it with '\0' temporarily). */
+ /* Remember char, (we clobber it with '\0' temporarily). */
char c;
- /* Op-code of this instruction. */
+ /* Op-code of this instruction. */
vax_opcodeT oc;
if (*instring == ' ')
- ++instring; /* Skip leading whitespace. */
- for (p = instring; *p && *p != ' '; p++);; /* MUST end in end-of-string or exactly 1 space. */
- /* Scanned up to end of operation-code. */
- /* Operation-code is ended with whitespace. */
+ ++instring; /* Skip leading whitespace. */
+ for (p = instring; *p && *p != ' '; p++);; /* MUST end in end-of-string or exactly 1 space. */
+ /* Scanned up to end of operation-code. */
+ /* Operation-code is ended with whitespace. */
if (p - instring == 0)
{
vitP->vit_error = _("No operator");
@@ -1785,7 +1767,7 @@ vip (vitP, instring)
* We trust instring points to an op-name, with no whitespace.
*/
vwP = (struct vot_wot *) hash_find (op_hash, instring);
- *p = c; /* Restore char after op-code. */
+ *p = c; /* Restore char after op-code. */
if (vwP == 0)
{
vitP->vit_error = _("Unknown operator");
@@ -1795,7 +1777,7 @@ vip (vitP, instring)
else
{
/*
- * We found a match! So lets pick up as many operands as the
+ * We found a match! So let's pick up as many operands as the
* instruction wants, and even gripe if there are too many.
* We expect comma to seperate each operand.
* We let instring track the text, while p tracks a part of the
@@ -1808,7 +1790,7 @@ vip (vitP, instring)
* we return 32 bits of opcode, including bucky bits, BUT
* an opcode length is either 8 or 16 bits for vit_opcode_nbytes.
*/
- oc = vwP->vot_code; /* The op-code. */
+ oc = vwP->vot_code; /* The op-code. */
vitP->vit_opcode_nbytes = (oc & 0xFF) >= 0xFD ? 2 : 1;
md_number_to_chars (vitP->vit_opcode, oc, 4);
count = 0; /* no operands seen yet */
@@ -1837,7 +1819,7 @@ vip (vitP, instring)
operandp->vop_nbytes = vax_operand_width_size[(unsigned) howp[1]];
operandp->vop_access = howp[0];
vip_op (instring, operandp);
- *q = c; /* Restore input text. */
+ *q = c; /* Restore input text. */
if (operandp->vop_error)
alloperr = _("Bad operand");
instring = q + (c ? 1 : 0); /* next operand (if any) */
@@ -1849,7 +1831,7 @@ vip (vitP, instring)
if (!*alloperr)
{
if (*instring == ' ')
- instring++; /* Skip whitespace. */
+ instring++; /* Skip whitespace. */
if (*instring)
alloperr = _("Too many operands");
}
@@ -1870,7 +1852,7 @@ char answer[100]; /* human types a line of vax assembler here */
char *mybug; /* "" or an internal logic diagnostic */
int mycount; /* number of operands */
struct vop *myvop; /* scan operands from myvit */
-int mysynth; /* 1 means want synthetic opcodes. */
+int mysynth; /* 1 means want synthetic opcodes. */
char my_immediate[200];
char my_indirect[200];
char my_displen[200];
@@ -1949,7 +1931,7 @@ main ()
/* vax_reg_parse.c - convert a VAX register name to a number */
-/* Copyright (C) 1987 Free Software Foundation, Inc. A part of GNU. */
+/* Copyright (C) 1987 Free Software Foundation, Inc. A part of GNU. */
/*
* v a x _ r e g _ p a r s e ( )
@@ -2135,7 +2117,6 @@ vax_reg_parse (c1, c2, c3) /* 3 chars of register name */
* if the other outputs are to be taken seriously.
*/
-
/*
* Because this module is useful for both VMS and UN*X style assemblers
* and because of the variety of UN*X assemblers we must recognise
@@ -2203,7 +2184,7 @@ vip_op_1 (bit, syms)
}
/* Can be called any time. More arguments may appear in future. */
-static void
+static void
vip_op_defaults (immediate, indirect, displen)
const char *immediate;
const char *indirect;
@@ -2282,7 +2263,7 @@ vip_op (optext, vopP)
/* Input fields: vop_access, vop_width.
Output fields: _ndx, _reg, _mode, _short, _warn,
_error _expr_begin, _expr_end, _nbytes.
- vop_nbytes : number of bytes in a datum. */
+ vop_nbytes : number of bytes in a datum. */
struct vop *vopP;
{
/* track operand text forward */
@@ -2305,7 +2286,7 @@ vip_op (optext, vopP)
int ndx = 0;
/* report illegal operand, ""==OK */
/* " " is a FAKE error: means we won */
- /* ANY err that begins with ' ' is a fake. */
+ /* ANY err that begins with ' ' is a fake. */
/* " " is converted to "" before return */
const char *err;
/* warn about weird modes pf address */
@@ -2321,8 +2302,8 @@ vip_op (optext, vopP)
* get the types wrong below, we lose at compile time rather than at
* lint or run time.
*/
- char access_mode; /* vop_access. */
- char width; /* vop_width. */
+ char access_mode; /* vop_access. */
+ char width; /* vop_width. */
access_mode = vopP->vop_access;
width = vopP->vop_width;
@@ -2332,13 +2313,13 @@ vip_op (optext, vopP)
p = optext;
- if (*p == ' ') /* Expect all whitespace reduced to ' '. */
+ if (*p == ' ') /* Expect all whitespace reduced to ' '. */
p++; /* skip over whitespace */
if ((at = INDIRECTP (*p)) != 0)
{ /* 1 if *p=='@'(or '*' for Un*x) */
p++; /* at is determined */
- if (*p == ' ') /* Expect all whitespace reduced to ' '. */
+ if (*p == ' ') /* Expect all whitespace reduced to ' '. */
p++; /* skip over whitespace */
}
@@ -2359,7 +2340,7 @@ vip_op (optext, vopP)
len = ' '; /* len is determined */
}
- if (*p == ' ') /* Expect all whitespace reduced to ' '. */
+ if (*p == ' ') /* Expect all whitespace reduced to ' '. */
p++; /* skip over whitespace */
if ((hash = IMMEDIATEP (*p)) != 0) /* 1 if *p=='#' ('$' for Un*x) */
@@ -2377,7 +2358,7 @@ vip_op (optext, vopP)
;
q--; /* now q points at last char of text */
- if (*q == ' ' && q >= p) /* Expect all whitespace reduced to ' '. */
+ if (*q == ' ' && q >= p) /* Expect all whitespace reduced to ' '. */
q--;
/* reverse over whitespace, but don't */
/* run back over *p */
@@ -2430,7 +2411,7 @@ vip_op (optext, vopP)
* Otherwise, ndx is index register number, and q points before "[...]".
*/
- if (*q == ' ' && q >= p) /* Expect all whitespace reduced to ' '. */
+ if (*q == ' ' && q >= p) /* Expect all whitespace reduced to ' '. */
q--;
/* reverse over whitespace, but don't */
/* run back over *p */
@@ -2527,7 +2508,7 @@ vip_op (optext, vopP)
*/
if (!paren)
{
- if (*q == ' ' && q >= p) /* Expect all whitespace reduced to ' '. */
+ if (*q == ' ' && q >= p) /* Expect all whitespace reduced to ' '. */
q--;
/* reverse over whitespace, but don't */
/* run back over *p */
@@ -2591,7 +2572,7 @@ vip_op (optext, vopP)
err = " ";
}
- /* Since nobody seems to use it: comment this 'feature'(?) out for now. */
+ /* Since nobody seems to use it: comment this 'feature'(?) out for now. */
#ifdef NEVER
/*
* Case of stand-alone operand. e.g. ".long foo"
@@ -2944,7 +2925,7 @@ vip_op (optext, vopP)
*/
-#ifdef TEST /* #Define to use this testbed. */
+#ifdef TEST /* #Define to use this testbed. */
/*
* Follows a test program for this function.
@@ -3120,7 +3101,7 @@ CONST char *md_shortopts = "d:STt:V";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -3150,7 +3131,7 @@ md_parse_option (c, arg)
break;
#ifdef OBJ_VMS
- case '+': /* For g++. Hash any name > 31 chars long. */
+ case '+': /* For g++. Hash any name > 31 chars long. */
flag_hash_long_names = 1;
break;
@@ -3191,7 +3172,7 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, _("\
+ fprintf (stream, _("\
VAX options:\n\
-d LENGTH ignored\n\
-J ignored\n\
@@ -3213,7 +3194,6 @@ VMS options:\n\
/* We have no need to default values of symbols. */
-/* ARGSUSED */
symbolS *
md_undefined_symbol (name)
char *name;
diff --git a/gnu/usr.bin/binutils/gas/config/tc-vax.h b/gnu/usr.bin/binutils/gas/config/tc-vax.h
index b6791f7f583..dbd8be1ad7a 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-vax.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-vax.h
@@ -1,5 +1,6 @@
/* tc-vax.h -- Header file for tc-vax.c.
- Copyright (C) 1987, 91, 92, 93, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1987, 1991, 1992, 1993, 1995, 1996, 1997, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#define TC_VAX 1
@@ -41,5 +42,3 @@ extern const struct relax_type md_relax_table[];
* fill-column: 131
* End:
*/
-
-/* end of tc-vax.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-w65.c b/gnu/usr.bin/binutils/gas/config/tc-w65.c
index e57eb0f152a..24247ae9ad0 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-w65.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-w65.c
@@ -1,5 +1,5 @@
/* tc-w65.c -- Assemble code for the W65816
- Copyright (C) 1995, 1998 Free Software Foundation.
+ Copyright 1995, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,10 +18,7 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*
- Written By Steve Chamberlain
- sac@cygnus.com
- */
+/* Written By Steve Chamberlain <sac@cygnus.com>. */
#include <stdio.h>
#include "as.h"
@@ -37,10 +34,10 @@ const char line_comment_chars[] = "!#";
/* 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
- */
+ Integer arg to pass to the function */
#define OP_BCC 0x90
#define OP_BCS 0xB0
@@ -54,8 +51,8 @@ const char line_comment_chars[] = "!#";
#define OP_BVS 0x70
void s_longa ();
-const pseudo_typeS md_pseudo_table[] =
-{
+
+const pseudo_typeS md_pseudo_table[] = {
{"int", cons, 2},
{"word", cons, 2},
{"longa", s_longa, 0},
@@ -63,32 +60,28 @@ const pseudo_typeS md_pseudo_table[] =
{0, 0, 0}
};
-
void cons ();
void s_align_bytes ();
-
-/*int md_reloc_size; */
+#if 0
+int md_reloc_size;
+#endif
static int relax; /* set if -relax seen */
const char EXP_CHARS[] = "eE";
-/* Chars that mean this number is a floating point constant */
+/* Chars that mean this number is a floating point constant. */
/* As in 0f12.456 */
/* or 0d1.2345e12 */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
-
-
-static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
+/* Opcode mnemonics */
+static struct hash_control *opcode_hash_control;
int M; /* M flag */
int X; /* X flag */
-
-
-
#define C(a,b) ENCODE_RELAX(a,b)
#define ENCODE_RELAX(what,length) (((what) << 2) + (length))
@@ -108,13 +101,29 @@ int X; /* X flag */
#define WORD_F 32767
#define WORD_B 32768
-relax_typeS md_relax_table[C (END, 0)];
+relax_typeS md_relax_table[C (END, 0)] = {
+ { 0, 0, 0, 0 },
+ { 0, 0, 0, 0 },
+ { 0, 0, 0, 0 },
+ { 0, 0, 0, 0 },
+
+ /* COND_BRANCH */
+ { 0, 0, 0, 0 }, /* UNDEF_BYTE_DISP */
+ { BYTE_F, BYTE_B, 2, C (COND_BRANCH, WORD_DISP) }, /* BYTE_DISP */
+ { WORD_F, WORD_B, 5, 0 }, /* WORD_DISP */
+ { 0, 0, 5, 0 }, /* UNDEF_WORD_DISP */
-/*
- This function is called once, at assembler startup time. This should
- set up all the tables, etc that the MD part of the assembler needs
- */
+ /* UNCOND_BRANCH */
+ { 0, 0, 0, 0 }, /* UNDEF_BYTE_DISP */
+ { BYTE_F, BYTE_B, 2, C (UNCOND_BRANCH, WORD_DISP) }, /* BYTE_DISP */
+ { WORD_F, WORD_B, 3, 0 }, /* WORD_DISP */
+ { 0, 0, 3, 0 } /* UNDEF_WORD_DISP */
+
+};
+/* This function is called once, at assembler startup time. This
+ should set up all the tables, etc that the MD part of the assembler
+ needs. */
void
s_longa (xmode)
@@ -136,16 +145,16 @@ s_longa (xmode)
as_bad (_("need on or off."));
demand_empty_rest_of_line ();
}
+
void
md_begin ()
{
- relax_typeS *table;
struct opinfo *opcode;
char *prev_name = "";
opcode_hash_control = hash_new ();
- /* Insert unique names into hash table */
+ /* Insert unique names into hash table. */
for (opcode = optable; opcode->name; opcode++)
{
if (strcmp (prev_name, opcode->name))
@@ -156,42 +165,17 @@ md_begin ()
else
{
/* Make all the opcodes with the same name point to the same
- string */
+ string. */
opcode->name = prev_name;
}
}
-
- /* Initialize the relax table. We use a local variable to avoid
- warnings about modifying a supposedly const data structure. */
- table = (relax_typeS *) md_relax_table;
- table[C (COND_BRANCH, BYTE_DISP)].rlx_forward = BYTE_F;
- table[C (COND_BRANCH, BYTE_DISP)].rlx_backward = BYTE_B;
- table[C (COND_BRANCH, BYTE_DISP)].rlx_length = 2;
- table[C (COND_BRANCH, BYTE_DISP)].rlx_more = C (COND_BRANCH, WORD_DISP);
-
- table[C (COND_BRANCH, WORD_DISP)].rlx_forward = WORD_F;
- table[C (COND_BRANCH, WORD_DISP)].rlx_backward = WORD_B;
- table[C (COND_BRANCH, WORD_DISP)].rlx_length = 5;
- table[C (COND_BRANCH, WORD_DISP)].rlx_more = 0;
-
- table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_forward = BYTE_F;
- table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_backward = BYTE_B;
- table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_length = 2;
- table[C (UNCOND_BRANCH, BYTE_DISP)].rlx_more = C (UNCOND_BRANCH, WORD_DISP);
-
- table[C (UNCOND_BRANCH, WORD_DISP)].rlx_forward = WORD_F;
- table[C (UNCOND_BRANCH, WORD_DISP)].rlx_backward = WORD_B;
- table[C (UNCOND_BRANCH, WORD_DISP)].rlx_length = 3;
- table[C (UNCOND_BRANCH, WORD_DISP)].rlx_more = 0;
-
flag_signed_overflow_ok = 1;
}
static expressionS immediate; /* absolute expression */
static expressionS immediate1; /* absolute expression */
-
static symbolS *
dot ()
{
@@ -210,6 +194,7 @@ dot ()
int expr_size;
int expr_shift;
int tc_cons_reloc;
+
void
w65_expression (dest, bytes)
expressionS *dest;
@@ -241,8 +226,8 @@ w65_expression (dest, bytes)
}
int amode;
-static
-char *
+
+static char *
parse_exp (s, bytes)
char *s;
int bytes;
@@ -260,15 +245,14 @@ parse_exp (s, bytes)
return new;
}
-
-static
-char *
+static char *
get_operands (info, ptr)
struct opinfo *info;
char *ptr;
{
register int override_len = 0;
register int bytes = 0;
+
while (*ptr == ' ')
ptr++;
@@ -429,7 +413,8 @@ get_operands (info, ptr)
bytes = 2;
}
}
- else if (ptr[0] == 's' && ptr[1] == ')' && ptr[2] == ',' && ptr[3] == 'y')
+ else if (ptr[0] == 's' && ptr[1] == ')'
+ && ptr[2] == ',' && ptr[3] == 'y')
{
amode = ADDR_STACK_REL_INDX_IDX;
bytes = 1;
@@ -460,7 +445,6 @@ get_operands (info, ptr)
}
}
-
}
else if (ptr[0] == '[')
{
@@ -476,17 +460,16 @@ get_operands (info, ptr)
}
else
{
- if (info->code == O_jmp)
+ if (info->code == O_jmp)
{
- bytes = 2;
- amode = ADDR_ABS_IND_LONG;
- }
- else
-{
- bytes = 1;
-
- amode = ADDR_DIR_IND_LONG;
- }
+ bytes = 2;
+ amode = ADDR_ABS_IND_LONG;
+ }
+ else
+ {
+ bytes = 1;
+ amode = ADDR_DIR_IND_LONG;
+ }
}
}
}
@@ -576,9 +559,9 @@ get_operands (info, ptr)
{
case 0:
if (amode == ADDR_DIR)
- tc_cons_reloc = R_W65_DP;
+ tc_cons_reloc = R_W65_DP;
else
-tc_cons_reloc = R_W65_ABS8;
+ tc_cons_reloc = R_W65_ABS8;
break;
case 1:
tc_cons_reloc = R_W65_ABS8S8;
@@ -607,11 +590,9 @@ tc_cons_reloc = R_W65_ABS8;
/* Passed a pointer to a list of opcodes which use different
addressing modes, return the opcode which matches the opcodes
- provided
- */
+ provided. */
-static
-struct opinfo *
+static struct opinfo *
get_specific (opcode)
struct opinfo *opcode;
{
@@ -640,12 +621,10 @@ check (operand, low, high)
return operand->X_add_number;
}
+static int log2[] = { 0, 0, 1, 0, 2 };
-static int log2[] =
-{0, 0, 1, 0, 2};
+/* Now we know what sort of opcodes it is, let's build the bytes. */
-/* Now we know what sort of opcodes it is, lets build the bytes -
- */
static void
build_Mytes (opcode)
struct opinfo *opcode;
@@ -662,7 +641,8 @@ build_Mytes (opcode)
else if (opcode->amode == ADDR_PC_REL)
{
int type;
- /* This is a relaxable insn, so we do some special handling */
+
+ /* This is a relaxable insn, so we do some special handling. */
type = opcode->val == OP_BRA ? UNCOND_BRANCH : COND_BRANCH;
output = frag_var (rs_machine_dependent,
md_relax_table[C (type, WORD_DISP)].rlx_length,
@@ -679,21 +659,17 @@ build_Mytes (opcode)
GETINFO (size, type, pcrel);
}
- /* If something special was done in the
- expression modify the reloc type */
+ /* If something special was done in the expression modify the
+ reloc type. */
if (tc_cons_reloc)
- {
- type = tc_cons_reloc;
- }
-
+ type = tc_cons_reloc;
-
- /* 1 byte for the opcode + the bytes for the addrmode */
+ /* 1 byte for the opcode + the bytes for the addrmode. */
output = frag_more (size + 1);
if (opcode->amode == ADDR_BLOCK_MOVE)
{
- /* Two relocs for this one */
+ /* Two relocs for this one. */
fix_new_exp (frag_now,
output + 1 - frag_now->fr_literal,
1,
@@ -724,10 +700,9 @@ build_Mytes (opcode)
output[0] = opcode->val;
}
-/* This is the guts of the machine-dependent assembler. STR points to a
- machine dependent instruction. This function is supposed to emit
- the frags/bytes it assembles to.
- */
+/* This is the guts of the machine-dependent assembler. STR points to
+ a machine dependent instruction. This function is supposed to emit
+ the frags/bytes it assembles to. */
void
md_assemble (str)
@@ -769,8 +744,7 @@ md_assemble (str)
if (opcode == 0)
{
- /* Couldn't find an opcode which matched the operands */
-
+ /* Couldn't find an opcode which matched the operands. */
char *where = frag_more (1);
@@ -783,36 +757,36 @@ md_assemble (str)
build_Mytes (opcode);
}
-
void
-DEFUN (tc_crawl_symbol_chain, (headers),
- object_headers * headers)
+tc_crawl_symbol_chain (headers)
+ object_headers *headers;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
symbolS *
-DEFUN (md_undefined_symbol, (name),
- char *name)
+md_undefined_symbol (name)
+ char *name;
{
return 0;
}
void
-DEFUN (tc_headers_hook, (headers),
- object_headers * headers)
+tc_headers_hook (headers)
+ object_headers *headers;
{
printf (_("call to tc_headers_hook \n"));
}
-/* Various routines to kill one day */
-/* Equal to MAX_PRECISION in atof-ieee.c */
+/* Various routines to kill one day. */
+/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-/* Turn a string in input_line_pointer into a floating point constant of type
- type, and store the appropriate bytes in *litP. The number of LITTLENUMS
- emitted is stored in *sizeP . An error message is returned, or NULL on OK.
- */
+/* Turn a string in input_line_pointer into a floating point constant
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
+ returned, or NULL on OK. */
+
char *
md_atof (type, litP, sizeP)
char type;
@@ -869,10 +843,9 @@ md_atof (type, litP, sizeP)
}
int
-md_parse_option (c,a)
- int c;
- char *a;
-
+md_parse_option (c, a)
+ int c;
+ char *a;
{
return 1;
}
@@ -884,9 +857,9 @@ tc_Nout_fix_to_chars ()
abort ();
}
-/*
-called after relaxing, change the frags so they know how big they are
-*/
+/* Called after relaxing, change the frags so they know how big they
+ are. */
+
void
md_convert_frag (headers, seg, fragP)
object_headers *headers;
@@ -895,7 +868,8 @@ md_convert_frag (headers, seg, fragP)
{
int disp_size = 0;
int inst_size = 0;
- unsigned char *buffer = (unsigned char *) (fragP->fr_fix + fragP->fr_literal);
+ unsigned char *buffer =
+ (unsigned char *) (fragP->fr_fix + fragP->fr_literal);
switch (fragP->fr_subtype)
{
@@ -905,7 +879,7 @@ md_convert_frag (headers, seg, fragP)
inst_size = 1;
break;
- /* cond branches to a known 16 bit displacement */
+ /* Conditional branches to a known 16 bit displacement. */
case C (COND_BRANCH, WORD_DISP):
switch (buffer[0])
{
@@ -931,7 +905,7 @@ md_convert_frag (headers, seg, fragP)
}
break;
case C (UNCOND_BRANCH, WORD_DISP):
- /* Unconditional branches to a known 16 bit displacement */
+ /* Unconditional branches to a known 16 bit displacement. */
switch (buffer[0])
{
@@ -944,7 +918,7 @@ md_convert_frag (headers, seg, fragP)
abort ();
}
break;
- /* got to create a branch over a reloc here */
+ /* Got to create a branch over a reloc here. */
case C (COND_BRANCH, UNDEF_WORD_DISP):
buffer[0] ^= 0x20; /* invert test */
buffer[1] = 3;
@@ -982,8 +956,9 @@ md_convert_frag (headers, seg, fragP)
}
if (inst_size)
{
- /* Get the address of the end of the instruction */
- int next_inst = fragP->fr_fix + fragP->fr_address + disp_size + inst_size;
+ /* Get the address of the end of the instruction. */
+ int next_inst = (fragP->fr_fix + fragP->fr_address
+ + disp_size + inst_size);
int targ_addr = (S_GET_VALUE (fragP->fr_symbol) +
fragP->fr_offset);
int disp = targ_addr - next_inst;
@@ -994,15 +969,13 @@ md_convert_frag (headers, seg, fragP)
}
}
-
valueT
-DEFUN (md_section_align, (seg, size),
- segT seg AND
- valueT size)
+md_section_align (seg, size)
+ segT seg;
+ valueT size;
{
return ((size + (1 << section_alignment[(int) seg]) - 1)
& (-1 << section_alignment[(int) seg]));
-
}
void
@@ -1081,7 +1054,7 @@ md_pcrel_from (fixP)
void
tc_coff_symbol_emit_hook (x)
- symbolS *x;
+ symbolS *x;
{
}
@@ -1161,48 +1134,54 @@ tc_coff_sizemachdep (frag)
return md_relax_table[frag->fr_subtype].rlx_length;
}
+/* Called just before address relaxation, return the length by which a
+ fragment must grow to reach it's destination. */
-
-
-
-/*
-called just before address relaxation, return the length
-by which a fragment must grow to reach it's destination
-*/
int
md_estimate_size_before_relax (fragP, segment_type)
register fragS *fragP;
register segT segment_type;
{
- int what = GET_WHAT (fragP->fr_subtype);
+ int what;
switch (fragP->fr_subtype)
{
default:
abort ();
+
case C (COND_BRANCH, UNDEF_BYTE_DISP):
case C (UNCOND_BRANCH, UNDEF_BYTE_DISP):
- /* used to be a branch to somewhere which was unknown */
+ what = GET_WHAT (fragP->fr_subtype);
+ /* Used to be a branch to somewhere which was unknown. */
if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type)
{
/* Got a symbol and it's defined in this segment, become byte
- sized - maybe it will fix up */
+ sized - maybe it will fix up. */
fragP->fr_subtype = C (what, BYTE_DISP);
- fragP->fr_var = md_relax_table[C (what, BYTE_DISP)].rlx_length;
}
else
{
- /* Its got a segment, but its not ours, so it will always be long */
+ /* Its got a segment, but its not ours, so it will always be
+ long. */
fragP->fr_subtype = C (what, UNDEF_WORD_DISP);
- fragP->fr_var = md_relax_table[C (what, WORD_DISP)].rlx_length;
- return md_relax_table[C (what, WORD_DISP)].rlx_length;
}
+ break;
+
+ case C (COND_BRANCH, BYTE_DISP):
+ case C (COND_BRANCH, WORD_DISP):
+ case C (COND_BRANCH, UNDEF_WORD_DISP):
+ case C (UNCOND_BRANCH, BYTE_DISP):
+ case C (UNCOND_BRANCH, WORD_DISP):
+ case C (UNCOND_BRANCH, UNDEF_WORD_DISP):
+ /* When relaxing a section for the second time, we don't need to
+ do anything besides return the current size. */
+ break;
}
+
+ fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length;
return fragP->fr_var;
}
-
-
CONST char *md_shortopts = "";
struct option md_longopts[] = {
#define OPTION_RELAX (OPTION_MD_BASE)
@@ -1213,7 +1192,6 @@ void
md_show_usage (stream)
FILE *stream;
{
-
}
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
diff --git a/gnu/usr.bin/binutils/gas/config/tc-w65.h b/gnu/usr.bin/binutils/gas/config/tc-w65.h
index 9794ad2eb5c..1b75f805bed 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-w65.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-w65.h
@@ -1,5 +1,5 @@
/* This file is tc-w65.h
- Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,7 +18,6 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-
#define TC_W65
#define TARGET_BYTES_BIG_ENDIAN 0
@@ -57,5 +56,3 @@ int tc_cons_reloc;
extern struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
-
-/* end of tc-w65.h */
diff --git a/gnu/usr.bin/binutils/gas/config/tc-z8k.c b/gnu/usr.bin/binutils/gas/config/tc-z8k.c
index f89b14b3b32..73666ca89ab 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-z8k.c
+++ b/gnu/usr.bin/binutils/gas/config/tc-z8k.c
@@ -1,5 +1,6 @@
/* tc-z8k.c -- Assemble code for the Zilog Z800n
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,10 +19,8 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*
- Written By Steve Chamberlain
- sac@cygnus.com
- */
+/* Written By Steve Chamberlain <sac@cygnus.com>. */
+
#define DEFINE_TABLE
#include <stdio.h>
@@ -31,25 +30,15 @@
#include "bfd.h"
#include <ctype.h>
-const char comment_chars[] =
-{'!', 0};
-const char line_separator_chars[] =
-{';', 0};
-const char line_comment_chars[] =
-{'#', 0};
+const char comment_chars[] = "!";
+const char line_comment_chars[] = "#";
+const char line_separator_chars[] = ";";
extern int machine;
extern int coff_flags;
int segmented_mode;
const int md_reloc_size;
-/* This table describes all the machine specific pseudo-ops the assembler
- has to support. The fields are:
- pseudo-op name without dot
- function to call to execute this pseudo-op
- Integer arg to pass to the function
- */
-
void cons ();
void
@@ -68,8 +57,7 @@ s_unseg ()
coff_flags = F_Z8002;
}
-static
-void
+static void
even ()
{
frag_align (1, 0, 0);
@@ -92,7 +80,6 @@ tohex (c)
void
sval ()
{
-
SKIP_WHITESPACE ();
if (*input_line_pointer == '\'')
{
@@ -112,47 +99,53 @@ sval ()
}
demand_empty_rest_of_line ();
}
-
}
-const pseudo_typeS md_pseudo_table[] =
-{
- {"int", cons, 2},
- {"data.b", cons, 1},
- {"data.w", cons, 2},
- {"data.l", cons, 4},
- {"form", listing_psize, 0},
- {"heading", listing_title, 0},
- {"import", s_ignore, 0},
- {"page", listing_eject, 0},
- {"program", s_ignore, 0},
- {"z8001", s_segm, 0},
- {"z8002", s_unseg, 0},
-
-
- {"segm", s_segm, 0},
- {"unsegm", s_unseg, 0},
- {"unseg", s_unseg, 0},
- {"name", s_app_file, 0},
- {"global", s_globl, 0},
- {"wval", cons, 2},
- {"lval", cons, 4},
- {"bval", cons, 1},
- {"sval", sval, 0},
- {"rsect", obj_coff_section, 0},
- {"sect", obj_coff_section, 0},
- {"block", s_space, 0},
- {"even", even, 0},
- {0, 0, 0}
+
+/* This table describes all the machine specific pseudo-ops the assembler
+ has to support. The fields are:
+ pseudo-op name without dot
+ function to call to execute this pseudo-op
+ Integer arg to pass to the function
+ */
+
+const pseudo_typeS md_pseudo_table[] = {
+ {"int" , cons , 2},
+ {"data.b" , cons , 1},
+ {"data.w" , cons , 2},
+ {"data.l" , cons , 4},
+ {"form" , listing_psize , 0},
+ {"heading", listing_title , 0},
+ {"import" , s_ignore , 0},
+ {"page" , listing_eject , 0},
+ {"program", s_ignore , 0},
+ {"z8001" , s_segm , 0},
+ {"z8002" , s_unseg , 0},
+
+ {"segm" , s_segm , 0},
+ {"unsegm" , s_unseg , 0},
+ {"unseg" , s_unseg , 0},
+ {"name" , s_app_file , 0},
+ {"global" , s_globl , 0},
+ {"wval" , cons , 2},
+ {"lval" , cons , 4},
+ {"bval" , cons , 1},
+ {"sval" , sval , 0},
+ {"rsect" , obj_coff_section, 0},
+ {"sect" , obj_coff_section, 0},
+ {"block" , s_space , 0},
+ {"even" , even , 0},
+ {0 , 0 , 0}
};
const char EXP_CHARS[] = "eE";
-/* Chars that mean this number is a floating point constant */
-/* As in 0f12.456 */
-/* or 0d1.2345e12 */
+/* Chars that mean this number is a floating point constant.
+ As in 0f12.456
+ or 0d1.2345e12 */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
-static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
+/* Opcode mnemonics. */
+static struct hash_control *opcode_hash_control;
void
md_begin ()
@@ -165,9 +158,7 @@ md_begin ()
for (opcode = z8k_table; opcode->name; opcode++)
{
- /* Only enter unique codes into the table */
- char *src = opcode->name;
-
+ /* Only enter unique codes into the table. */
if (strcmp (opcode->name, prev_name))
{
hash_insert (opcode_hash_control, opcode->name, (char *) opcode);
@@ -177,16 +168,16 @@ md_begin ()
prev_name = opcode->name;
}
- /* default to z8002 */
+ /* Default to z8002. */
s_unseg ();
- /* insert the pseudo ops too */
+ /* Insert the pseudo ops, too. */
for (idx = 0; md_pseudo_table[idx].poc_name; idx++)
{
opcode_entry_type *fake_opcode;
fake_opcode = (opcode_entry_type *) malloc (sizeof (opcode_entry_type));
- fake_opcode->name = md_pseudo_table[idx].poc_name,
- fake_opcode->func = (void *) (md_pseudo_table + idx);
+ fake_opcode->name = md_pseudo_table[idx].poc_name;
+ fake_opcode->func = (void *) (md_pseudo_table + idx);
fake_opcode->opcode = 250;
hash_insert (opcode_hash_control, fake_opcode->name, fake_opcode);
}
@@ -194,24 +185,27 @@ md_begin ()
linkrelax = 1;
}
-struct z8k_exp
-{
+struct z8k_exp {
char *e_beg;
char *e_end;
expressionS e_exp;
};
-typedef struct z8k_op
-{
- char regsize; /* 'b','w','r','q' */
- unsigned int reg; /* 0..15 */
+
+typedef struct z8k_op {
+ /* 'b','w','r','q'. */
+ char regsize;
+
+ /* 0 .. 15. */
+ unsigned int reg;
int mode;
- unsigned int x_reg; /* any other register associated with the mode */
- expressionS exp; /* any expression */
-}
+ /* Any other register associated with the mode. */
+ unsigned int x_reg;
-op_type;
+ /* Any expression. */
+ expressionS exp;
+} op_type;
static expressionS *da_operand;
static expressionS *imm_operand;
@@ -223,9 +217,9 @@ int the_flags;
int the_interrupt;
char *
-DEFUN (whatreg, (reg, src),
- int *reg AND
- char *src)
+whatreg (reg, src)
+ int *reg;
+ char *src;
{
if (isdigit (src[1]))
{
@@ -239,28 +233,28 @@ DEFUN (whatreg, (reg, src),
}
}
-/*
- parse operands
+/* Parse operands
- rh0-rh7, rl0-rl7
- r0-r15
- rr0-rr14
- rq0--rq12
- WREG r0,r1,r2,r3,r4,r5,r6,r7,fp,sp
- r0l,r0h,..r7l,r7h
- @WREG
- @WREG+
- @-WREG
- #const
+ rh0-rh7, rl0-rl7
+ r0-r15
+ rr0-rr14
+ rq0--rq12
+ WREG r0,r1,r2,r3,r4,r5,r6,r7,fp,sp
+ r0l,r0h,..r7l,r7h
+ @WREG
+ @WREG+
+ @-WREG
+ #const
+*/
- */
+/* Try to parse a reg name. Return a pointer to the first character
+ in SRC after the reg name. */
-/* try and parse a reg name, returns number of chars consumed */
char *
-DEFUN (parse_reg, (src, mode, reg),
- char *src AND
- int *mode AND
- unsigned int *reg)
+parse_reg (src, mode, reg)
+ char *src;
+ int *mode;
+ unsigned int *reg;
{
char *res = 0;
char regno;
@@ -268,69 +262,68 @@ DEFUN (parse_reg, (src, mode, reg),
if (src[0] == 's' && src[1] == 'p')
{
if (segmented_mode)
- {
- *mode = CLASS_REG_LONG;
- *reg = 14;
- }
+ {
+ *mode = CLASS_REG_LONG;
+ *reg = 14;
+ }
else
- {
- *mode = CLASS_REG_WORD;
- *reg = 15;
- }
+ {
+ *mode = CLASS_REG_WORD;
+ *reg = 15;
+ }
return src + 2;
}
if (src[0] == 'r')
{
if (src[1] == 'r')
- {
- *mode = CLASS_REG_LONG;
- res = whatreg (reg, src + 2);
+ {
+ *mode = CLASS_REG_LONG;
+ res = whatreg (reg, src + 2);
regno = *reg;
if (regno > 14)
- as_warn (_("register rr%d, out of range."),regno);
- }
+ as_warn (_("register rr%d, out of range."), regno);
+ }
else if (src[1] == 'h')
- {
- *mode = CLASS_REG_BYTE;
- res = whatreg (reg, src + 2);
+ {
+ *mode = CLASS_REG_BYTE;
+ res = whatreg (reg, src + 2);
regno = *reg;
if (regno > 7)
- as_warn (_("register rh%d, out of range."),regno);
- }
+ as_warn (_("register rh%d, out of range."), regno);
+ }
else if (src[1] == 'l')
- {
- *mode = CLASS_REG_BYTE;
- res = whatreg (reg, src + 2);
+ {
+ *mode = CLASS_REG_BYTE;
+ res = whatreg (reg, src + 2);
regno = *reg;
if (regno > 7)
- as_warn (_("register rl%d, out of range."),regno);
- *reg += 8;
- }
+ as_warn (_("register rl%d, out of range."), regno);
+ *reg += 8;
+ }
else if (src[1] == 'q')
- {
- *mode = CLASS_REG_QUAD;
- res = whatreg (reg, src + 2);
+ {
+ *mode = CLASS_REG_QUAD;
+ res = whatreg (reg, src + 2);
regno = *reg;
if (regno > 12)
- as_warn (_("register rq%d, out of range."),regno);
- }
+ as_warn (_("register rq%d, out of range."), regno);
+ }
else
- {
- *mode = CLASS_REG_WORD;
- res = whatreg (reg, src + 1);
+ {
+ *mode = CLASS_REG_WORD;
+ res = whatreg (reg, src + 1);
regno = *reg;
if (regno > 15)
- as_warn (_("register r%d, out of range."),regno);
- }
+ as_warn (_("register r%d, out of range."), regno);
+ }
}
return res;
-
}
char *
-DEFUN (parse_exp, (s, op),
- char *s AND
- expressionS * op)
+parse_exp (s, op)
+ char *s;
+ expressionS *op;
{
char *save = input_line_pointer;
char *new;
@@ -356,31 +349,27 @@ DEFUN (parse_exp, (s, op),
exp(r)
r(#exp)
r(r)
-
-
-
*/
-static
-char *
-DEFUN (checkfor, (ptr, what),
- char *ptr AND
- char what)
+static char *
+checkfor (ptr, what)
+ char *ptr;
+ char what;
{
if (*ptr == what)
ptr++;
else
- {
- as_bad (_("expected %c"), what);
- }
+ as_bad (_("expected %c"), what);
+
return ptr;
}
-/* Make sure the mode supplied is the size of a word */
+/* Make sure the mode supplied is the size of a word. */
+
static void
-DEFUN (regword, (mode, string),
- int mode AND
- char *string)
+regword (mode, string)
+ int mode;
+ char *string;
{
int ok;
@@ -391,11 +380,12 @@ DEFUN (regword, (mode, string),
}
}
-/* Make sure the mode supplied is the size of an address */
+/* Make sure the mode supplied is the size of an address. */
+
static void
-DEFUN (regaddr, (mode, string),
- int mode AND
- char *string)
+regaddr (mode, string)
+ int mode;
+ char *string;
{
int ok;
@@ -406,33 +396,30 @@ DEFUN (regaddr, (mode, string),
}
}
-struct ctrl_names
-{
- int value;
- char *name;
+struct ctrl_names {
+ int value;
+ char *name;
};
-struct ctrl_names ctrl_table[] =
-{
- 0x2, "fcw",
- 0X3, "refresh",
- 0x4, "psapseg",
- 0x5, "psapoff",
- 0x5, "psap",
- 0x6, "nspseg",
- 0x7, "nspoff",
- 0x7, "nsp",
- 0, 0
+struct ctrl_names ctrl_table[] = {
+ { 0x2, "fcw" },
+ { 0x3, "refresh" },
+ { 0x4, "psapseg" },
+ { 0x5, "psapoff" },
+ { 0x5, "psap" },
+ { 0x6, "nspseg" },
+ { 0x7, "nspoff" },
+ { 0x7, "nsp" },
+ { 0 , 0 }
};
-
+
static void
-DEFUN (get_ctrl_operand, (ptr, mode, dst),
- char **ptr AND
- struct z8k_op *mode AND
- unsigned int dst)
+get_ctrl_operand (ptr, mode, dst)
+ char **ptr;
+ struct z8k_op *mode;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
- int r;
int i;
while (*src == ' ')
@@ -444,45 +431,43 @@ DEFUN (get_ctrl_operand, (ptr, mode, dst),
int j;
for (j = 0; ctrl_table[i].name[j]; j++)
- {
- if (ctrl_table[i].name[j] != src[j])
- goto fail;
- }
+ {
+ if (ctrl_table[i].name[j] != src[j])
+ goto fail;
+ }
the_ctrl = ctrl_table[i].value;
*ptr = src + j;
return;
- fail:;
+ fail:
+ ;
}
the_ctrl = 0;
return;
}
-struct flag_names
-{
+struct flag_names {
int value;
char *name;
};
-struct flag_names flag_table[] =
-{
- 0x1, "p",
- 0x1, "v",
- 0x2, "s",
- 0x4, "z",
- 0x8, "c",
- 0x0, "+",
- 0, 0
+struct flag_names flag_table[] = {
+ { 0x1, "p" },
+ { 0x1, "v" },
+ { 0x2, "s" },
+ { 0x4, "z" },
+ { 0x8, "c" },
+ { 0x0, "+" },
+ { 0, 0 }
};
static void
-DEFUN (get_flags_operand, (ptr, mode, dst),
- char **ptr AND
- struct z8k_op *mode AND
- unsigned int dst)
+get_flags_operand (ptr, mode, dst)
+ char **ptr;
+ struct z8k_op *mode;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
- int r;
int i;
int j;
@@ -493,50 +478,46 @@ DEFUN (get_flags_operand, (ptr, mode, dst),
the_flags = 0;
for (j = 0; j <= 9; j++)
{
- if (!src[j])
+ if (!src[j])
goto done;
- for (i = 0; flag_table[i].name; i++)
- {
- if (flag_table[i].name[0] == src[j])
- {
- the_flags = the_flags | flag_table[i].value;
- goto match;
- }
- }
+ for (i = 0; flag_table[i].name; i++)
+ {
+ if (flag_table[i].name[0] == src[j])
+ {
+ the_flags = the_flags | flag_table[i].value;
+ goto match;
+ }
+ }
goto done;
match:
- ;
+ ;
}
- done:
+ done:
*ptr = src + j;
return;
}
-
-struct interrupt_names
-{
+struct interrupt_names {
int value;
char *name;
};
-struct interrupt_names intr_table[] =
-{
- 0x1, "nvi",
- 0x2, "vi",
- 0x3, "both",
- 0x3, "all",
- 0, 0
+struct interrupt_names intr_table[] = {
+ { 0x1, "nvi" },
+ { 0x2, "vi" },
+ { 0x3, "both" },
+ { 0x3, "all" },
+ { 0, 0 }
};
static void
-DEFUN (get_interrupt_operand, (ptr, mode, dst),
- char **ptr AND
- struct z8k_op *mode AND
- unsigned int dst)
+get_interrupt_operand (ptr, mode, dst)
+ char **ptr;
+ struct z8k_op *mode;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
- int r;
int i;
while (*src == ' ')
@@ -548,61 +529,59 @@ DEFUN (get_interrupt_operand, (ptr, mode, dst),
int j;
for (j = 0; intr_table[i].name[j]; j++)
- {
- if (intr_table[i].name[j] != src[j])
- goto fail;
- }
+ {
+ if (intr_table[i].name[j] != src[j])
+ goto fail;
+ }
the_interrupt = intr_table[i].value;
*ptr = src + j;
return;
- fail:;
+ fail:
+ ;
}
the_interrupt = 0x0;
return;
}
-struct cc_names
-{
+struct cc_names {
int value;
char *name;
};
-struct cc_names table[] =
-{
- 0x0, "f",
- 0x1, "lt",
- 0x2, "le",
- 0x3, "ule",
- 0x4, "ov",
- 0x4, "pe",
- 0x5, "mi",
- 0x6, "eq",
- 0x6, "z",
- 0x7, "c",
- 0x7, "ult",
- 0x8, "t",
- 0x9, "ge",
- 0xa, "gt",
- 0xb, "ugt",
- 0xc, "nov",
- 0xc, "po",
- 0xd, "pl",
- 0xe, "ne",
- 0xe, "nz",
- 0xf, "nc",
- 0xf, "uge",
- 0, 0
+struct cc_names table[] = {
+ { 0x0, "f" },
+ { 0x1, "lt" },
+ { 0x2, "le" },
+ { 0x3, "ule" },
+ { 0x4, "ov" },
+ { 0x4, "pe" },
+ { 0x5, "mi" },
+ { 0x6, "eq" },
+ { 0x6, "z" },
+ { 0x7, "c" },
+ { 0x7, "ult" },
+ { 0x8, "t" },
+ { 0x9, "ge" },
+ { 0xa, "gt" },
+ { 0xb, "ugt" },
+ { 0xc, "nov" },
+ { 0xc, "po" },
+ { 0xd, "pl" },
+ { 0xe, "ne" },
+ { 0xe, "nz" },
+ { 0xf, "nc" },
+ { 0xf, "uge" },
+ { 0 , 0 }
};
static void
-DEFUN (get_cc_operand, (ptr, mode, dst),
- char **ptr AND
- struct z8k_op *mode AND
- unsigned int dst)
+get_cc_operand (ptr, mode, dst)
+ char **ptr;
+ struct z8k_op *mode;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
- int r;
int i;
while (*src == ' ')
@@ -621,7 +600,8 @@ DEFUN (get_cc_operand, (ptr, mode, dst),
the_cc = table[i].value;
*ptr = src + j;
return;
- fail:;
+ fail:
+ ;
}
the_cc = 0x8;
}
@@ -630,13 +610,10 @@ static void
get_operand (ptr, mode, dst)
char **ptr;
struct z8k_op *mode;
- unsigned int dst;
+ unsigned int dst ATTRIBUTE_UNUSED;
{
char *src = *ptr;
char *end;
- unsigned int num;
- unsigned int len;
- unsigned int size;
mode->mode = 0;
@@ -672,20 +649,18 @@ get_operand (ptr, mode, dst)
end = parse_reg (src, &nw, &nr);
if (end)
{
- /* Got Ra(Rb) */
+ /* Got Ra(Rb). */
src = end;
if (*src != ')')
- {
- as_bad (_("Missing ) in ra(rb)"));
- }
+ as_bad (_("Missing ) in ra(rb)"));
else
- {
- src++;
- }
+ src++;
regaddr (mode->mode, "ra(rb) ra");
-/* regword (mode->mode, "ra(rb) rb");*/
+#if 0
+ regword (mode->mode, "ra(rb) rb");
+#endif
mode->mode = CLASS_BX;
mode->reg = regn;
mode->x_reg = nr;
@@ -693,7 +668,7 @@ get_operand (ptr, mode, dst)
}
else
{
- /* Got Ra(disp) */
+ /* Got Ra(disp). */
if (*src == '#')
src++;
src = parse_exp (src, &(mode->exp));
@@ -712,7 +687,7 @@ get_operand (ptr, mode, dst)
}
else
{
- /* No initial reg */
+ /* No initial reg. */
src = parse_exp (src, &(mode->exp));
if (*src == '(')
{
@@ -727,7 +702,7 @@ get_operand (ptr, mode, dst)
}
else
{
- /* Just an address */
+ /* Just an address. */
mode->mode = CLASS_DA;
mode->reg = 0;
mode->x_reg = 0;
@@ -738,15 +713,15 @@ get_operand (ptr, mode, dst)
*ptr = src;
}
-static
-char *
+static char *
get_operands (opcode, op_end, operand)
opcode_entry_type *opcode;
char *op_end;
op_type *operand;
{
char *ptr = op_end;
-char *savptr;
+ char *savptr;
+
switch (opcode->noperands)
{
case 0:
@@ -757,21 +732,21 @@ char *savptr;
case 1:
ptr++;
if (opcode->arg_info[0] == CLASS_CC)
- {
- get_cc_operand (&ptr, operand + 0, 0);
- }
+ {
+ get_cc_operand (&ptr, operand + 0, 0);
+ }
else if (opcode->arg_info[0] == CLASS_FLAGS)
- {
- get_flags_operand (&ptr, operand + 0, 0);
- }
- else if (opcode->arg_info[0] == (CLASS_IMM +(ARG_IMM2)))
- {
- get_interrupt_operand (&ptr, operand + 0, 0);
- }
+ {
+ get_flags_operand (&ptr, operand + 0, 0);
+ }
+ else if (opcode->arg_info[0] == (CLASS_IMM + (ARG_IMM2)))
+ {
+ get_interrupt_operand (&ptr, operand + 0, 0);
+ }
else
- {
- get_operand (&ptr, operand + 0, 0);
- }
+ {
+ get_operand (&ptr, operand + 0, 0);
+ }
operand[1].mode = 0;
break;
@@ -779,32 +754,32 @@ char *savptr;
ptr++;
savptr = ptr;
if (opcode->arg_info[0] == CLASS_CC)
- {
- get_cc_operand (&ptr, operand + 0, 0);
- }
+ {
+ get_cc_operand (&ptr, operand + 0, 0);
+ }
else if (opcode->arg_info[0] == CLASS_CTRL)
- {
- get_ctrl_operand (&ptr, operand + 0, 0);
- if (the_ctrl == 0)
- {
- ptr = savptr;
- get_operand (&ptr, operand + 0, 0);
- if (ptr == 0)
- return;
- if (*ptr == ',')
- ptr++;
- get_ctrl_operand (&ptr, operand + 1, 1);
- return ptr;
- }
- }
+ {
+ get_ctrl_operand (&ptr, operand + 0, 0);
+ if (the_ctrl == 0)
+ {
+ ptr = savptr;
+ get_operand (&ptr, operand + 0, 0);
+ if (ptr == 0)
+ return NULL;
+ if (*ptr == ',')
+ ptr++;
+ get_ctrl_operand (&ptr, operand + 1, 1);
+ return ptr;
+ }
+ }
else
- {
- get_operand (&ptr, operand + 0, 0);
- }
+ {
+ get_operand (&ptr, operand + 0, 0);
+ }
if (ptr == 0)
- return;
+ return NULL;
if (*ptr == ',')
- ptr++;
+ ptr++;
get_operand (&ptr, operand + 1, 1);
break;
@@ -832,6 +807,7 @@ char *savptr;
ptr++;
get_cc_operand (&ptr, operand + 3, 3);
break;
+
default:
abort ();
}
@@ -840,23 +816,20 @@ char *savptr;
}
/* Passed a pointer to a list of opcodes which use different
- addressing modes, return the opcode which matches the opcodes
- provided
- */
+ addressing modes. Return the opcode which matches the opcodes
+ provided. */
-static
-opcode_entry_type *
-DEFUN (get_specific, (opcode, operands),
- opcode_entry_type * opcode AND
- op_type * operands)
+static opcode_entry_type *
+get_specific (opcode, operands)
+ opcode_entry_type *opcode;
+ op_type *operands;
{
opcode_entry_type *this_try = opcode;
int found = 0;
unsigned int noperands = opcode->noperands;
- unsigned int dispreg;
- unsigned int this_index = opcode->idx;
+ int this_index = opcode->idx;
while (this_index == opcode->idx && !found)
{
@@ -865,33 +838,33 @@ DEFUN (get_specific, (opcode, operands),
this_try = opcode++;
for (i = 0; i < noperands; i++)
{
- int mode = operands[i].mode;
+ unsigned int mode = operands[i].mode;
if ((mode & CLASS_MASK) != (this_try->arg_info[i] & CLASS_MASK))
{
- /* it could be an pc rel operand, if this is a da mode and
- we like disps, then insert it */
+ /* It could be an pc rel operand, if this is a da mode
+ and we like disps, then insert it. */
if (mode == CLASS_DA && this_try->arg_info[i] == CLASS_DISP)
{
- /* This is the case */
+ /* This is the case. */
operands[i].mode = CLASS_DISP;
}
else if (mode == CLASS_BA && this_try->arg_info[i])
{
- /* Can't think of a way to turn what we've been given into
- something that's ok */
+ /* Can't think of a way to turn what we've been
+ given into something that's OK. */
goto fail;
}
else if (this_try->arg_info[i] & CLASS_PR)
{
if (mode == CLASS_REG_LONG && segmented_mode)
{
- /* ok */
+ /* OK. */
}
else if (mode == CLASS_REG_WORD && !segmented_mode)
{
- /* ok */
+ /* OK. */
}
else
goto fail;
@@ -920,7 +893,8 @@ DEFUN (get_specific, (opcode, operands),
}
found = 1;
- fail:;
+ fail:
+ ;
}
if (found)
return this_try;
@@ -928,35 +902,39 @@ DEFUN (get_specific, (opcode, operands),
return 0;
}
+#if 0 /* Not used. */
static void
-DEFUN (check_operand, (operand, width, string),
- struct z8k_op *operand AND
- unsigned int width AND
- char *string)
+check_operand (operand, width, string)
+ struct z8k_op *operand;
+ unsigned int width;
+ char *string;
{
if (operand->exp.X_add_symbol == 0
&& operand->exp.X_op_symbol == 0)
{
- /* No symbol involved, let's look at offset, it's dangerous if any of
- the high bits are not 0 or ff's, find out by oring or anding with
- the width and seeing if the answer is 0 or all fs*/
+ /* No symbol involved, let's look at offset, it's dangerous if
+ any of the high bits are not 0 or ff's, find out by oring or
+ anding with the width and seeing if the answer is 0 or all
+ fs. */
if ((operand->exp.X_add_number & ~width) != 0 &&
(operand->exp.X_add_number | width) != (~0))
{
- as_warn (_("operand %s0x%x out of range."), string, operand->exp.X_add_number);
+ as_warn (_("operand %s0x%x out of range."),
+ string, operand->exp.X_add_number);
}
}
}
+#endif
static char buffer[20];
static void
-DEFUN (newfix, (ptr, type, operand),
- int ptr AND
- int type AND
- expressionS * operand)
+newfix (ptr, type, operand)
+ int ptr;
+ int type;
+ expressionS *operand;
{
if (operand->X_add_symbol
|| operand->X_op_symbol
@@ -972,25 +950,23 @@ DEFUN (newfix, (ptr, type, operand),
}
static char *
-DEFUN (apply_fix, (ptr, type, operand, size),
- char *ptr AND
- int type AND
- expressionS * operand AND
- int size)
+apply_fix (ptr, type, operand, size)
+ char *ptr;
+ int type;
+ expressionS *operand;
+ int size;
{
int n = operand->X_add_number;
- operand->X_add_number = n;
newfix ((ptr - buffer) / 2, type, operand);
-#if 1
switch (size)
{
- case 8: /* 8 nibbles == 32 bits */
+ case 8: /* 8 nibbles == 32 bits. */
*ptr++ = n >> 28;
*ptr++ = n >> 24;
*ptr++ = n >> 20;
*ptr++ = n >> 16;
- case 4: /* 4 niblles == 16 bits */
+ case 4: /* 4 nibbles == 16 bits. */
*ptr++ = n >> 12;
*ptr++ = n >> 8;
case 2:
@@ -999,27 +975,20 @@ DEFUN (apply_fix, (ptr, type, operand, size),
*ptr++ = n >> 0;
break;
}
-#endif
return ptr;
-
}
-/* Now we know what sort of opcodes it is, lets build the bytes -
- */
+/* Now we know what sort of opcodes it is. Let's build the bytes. */
+
#define INSERT(x,y) *x++ = y>>24; *x++ = y>> 16; *x++=y>>8; *x++ =y;
+
static void
build_bytes (this_try, operand)
- opcode_entry_type * this_try;
- struct z8k_op *operand;
+ opcode_entry_type *this_try;
+ struct z8k_op *operand ATTRIBUTE_UNUSED;
{
- unsigned int i;
-
- int length;
- char *output;
char *output_ptr = buffer;
- char part;
int c;
- char high;
int nib;
int nibble;
unsigned int *class_ptr;
@@ -1029,21 +998,20 @@ build_bytes (this_try, operand)
memset (buffer, 20, 0);
class_ptr = this_try->byte_info;
-top:;
- for (nibble = 0; c = *class_ptr++; nibble++)
+ for (nibble = 0; (c = *class_ptr++); nibble++)
{
switch (c & CLASS_MASK)
{
default:
-
abort ();
+
case CLASS_ADDRESS:
- /* Direct address, we don't cope with the SS mode right now */
+ /* Direct address, we don't cope with the SS mode right now. */
if (segmented_mode)
{
- da_operand->X_add_number |= 0x80000000;
+ /* da_operand->X_add_number |= 0x80000000; -- Now set at relocation time. */
output_ptr = apply_fix (output_ptr, R_IMM32, da_operand, 8);
}
else
@@ -1053,23 +1021,23 @@ top:;
da_operand = 0;
break;
case CLASS_DISP8:
- /* pc rel 8 bit */
+ /* pc rel 8 bit */
output_ptr = apply_fix (output_ptr, R_JR, da_operand, 2);
da_operand = 0;
break;
case CLASS_0DISP7:
- /* pc rel 7 bit */
+ /* pc rel 7 bit */
*output_ptr = 0;
output_ptr = apply_fix (output_ptr, R_DISP7, da_operand, 2);
da_operand = 0;
break;
case CLASS_1DISP7:
- /* pc rel 7 bit */
+ /* pc rel 7 bit */
*output_ptr = 0x80;
output_ptr = apply_fix (output_ptr, R_DISP7, da_operand, 2);
- output_ptr[-2] = 0x8;
+ output_ptr[-2] = 0x8;
da_operand = 0;
break;
@@ -1078,57 +1046,59 @@ top:;
if (imm_operand)
{
if (imm_operand->X_add_number == 2)
- {
- *output_ptr |= 2;
- }
+ *output_ptr |= 2;
else if (imm_operand->X_add_number != 1)
- {
- as_bad (_("immediate must be 1 or 2"));
- }
+ as_bad (_("immediate must be 1 or 2"));
}
else
- {
- as_bad (_("immediate 1 or 2 expected"));
- }
+ as_bad (_("immediate 1 or 2 expected"));
output_ptr++;
break;
case CLASS_CC:
*output_ptr++ = the_cc;
break;
- case CLASS_0CCC:
- *output_ptr++ = the_ctrl;
- break;
- case CLASS_1CCC:
- *output_ptr++ = the_ctrl | 0x8;
- break;
- case CLASS_00II:
- *output_ptr++ = (~the_interrupt & 0x3);
- break;
- case CLASS_01II:
- *output_ptr++ = (~the_interrupt & 0x3) | 0x4;
- break;
- case CLASS_FLAGS:
- *output_ptr++ = the_flags;
- break;
+ case CLASS_0CCC:
+ *output_ptr++ = the_ctrl;
+ break;
+ case CLASS_1CCC:
+ *output_ptr++ = the_ctrl | 0x8;
+ break;
+ case CLASS_00II:
+ *output_ptr++ = (~the_interrupt & 0x3);
+ break;
+ case CLASS_01II:
+ *output_ptr++ = (~the_interrupt & 0x3) | 0x4;
+ break;
+ case CLASS_FLAGS:
+ *output_ptr++ = the_flags;
+ break;
case CLASS_BIT:
*output_ptr++ = c & 0xf;
break;
case CLASS_REGN0:
if (reg[c & 0xf] == 0)
- {
- as_bad (_("can't use R0 here"));
- }
+ as_bad (_("can't use R0 here"));
+ /* Fall through. */
case CLASS_REG:
case CLASS_REG_BYTE:
case CLASS_REG_WORD:
case CLASS_REG_LONG:
case CLASS_REG_QUAD:
- /* Insert bit mattern of
- right reg */
+ /* Insert bit mattern of right reg. */
*output_ptr++ = reg[c & 0xf];
break;
case CLASS_DISP:
- output_ptr = apply_fix (output_ptr, R_IMM16, da_operand, 4);
+ switch (c & ARG_MASK)
+ {
+ case ARG_DISP12:
+ output_ptr = apply_fix (output_ptr, R_CALLR, da_operand, 4);
+ break;
+ case ARG_DISP16:
+ output_ptr = apply_fix (output_ptr, R_REL16, da_operand, 4);
+ break;
+ default:
+ output_ptr = apply_fix (output_ptr, R_IMM16, da_operand, 4);
+ }
da_operand = 0;
break;
@@ -1168,8 +1138,7 @@ top:;
}
}
- /* Copy from the nibble buffer into the frag */
-
+ /* Copy from the nibble buffer into the frag. */
{
int length = (output_ptr - buffer) / 2;
char *src = buffer;
@@ -1181,42 +1150,33 @@ top:;
src += 2;
fragp++;
}
-
}
-
}
/* This is the guts of the machine-dependent assembler. STR points to a
- machine dependent instruction. This funciton is supposed to emit
- the frags/bytes it assembles to.
- */
+ machine dependent instruction. This function is supposed to emit
+ the frags/bytes it assembles to. */
void
-DEFUN (md_assemble, (str),
- char *str)
+md_assemble (str)
+ char *str;
{
+ char c;
char *op_start;
char *op_end;
- unsigned int i;
struct z8k_op operand[3];
opcode_entry_type *opcode;
opcode_entry_type *prev_opcode;
- char *dot = 0;
- char c;
-
- /* Drop leading whitespace */
+ /* Drop leading whitespace. */
while (*str == ' ')
str++;
- /* find the op code end */
+ /* Find the op code end. */
for (op_start = op_end = str;
*op_end != 0 && *op_end != ' ';
op_end++)
- {
- }
-
- ;
+ ;
if (op_end == op_start)
{
@@ -1226,9 +1186,7 @@ DEFUN (md_assemble, (str),
*op_end = 0;
- opcode = (opcode_entry_type *) hash_find (opcode_hash_control,
- op_start);
-
+ opcode = (opcode_entry_type *) hash_find (opcode_hash_control, op_start);
if (opcode == NULL)
{
@@ -1238,7 +1196,7 @@ DEFUN (md_assemble, (str),
if (opcode->opcode == 250)
{
- /* was really a pseudo op */
+ /* Was really a pseudo op. */
pseudo_typeS *p;
char oc;
@@ -1246,7 +1204,6 @@ DEFUN (md_assemble, (str),
char *old = input_line_pointer;
*op_end = c;
-
input_line_pointer = op_end;
oc = *old;
@@ -1261,15 +1218,14 @@ DEFUN (md_assemble, (str),
}
else
{
- input_line_pointer = get_operands (opcode, op_end,
- operand);
+ input_line_pointer = get_operands (opcode, op_end, operand);
prev_opcode = opcode;
opcode = get_specific (opcode, operand);
if (opcode == 0)
{
- /* Couldn't find an opcode which matched the operands */
+ /* Couldn't find an opcode which matched the operands. */
char *where = frag_more (2);
where[0] = 0x0;
@@ -1284,34 +1240,35 @@ DEFUN (md_assemble, (str),
}
void
-DEFUN (tc_crawl_symbol_chain, (headers),
- object_headers * headers)
+tc_crawl_symbol_chain (headers)
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
symbolS *
-DEFUN (md_undefined_symbol, (name),
- char *name)
+md_undefined_symbol (name)
+ char *name ATTRIBUTE_UNUSED;
{
return 0;
}
void
-DEFUN (tc_headers_hook, (headers),
- object_headers * headers)
+tc_headers_hook (headers)
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_headers_hook \n"));
}
-/* Various routines to kill one day */
-/* Equal to MAX_PRECISION in atof-ieee.c */
+/* Various routines to kill one day. */
+/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-/* Turn a string in input_line_pointer into a floating point constant of type
- type, and store the appropriate bytes in *litP. The number of LITTLENUMS
- emitted is stored in *sizeP . An error message is returned, or NULL on OK.
- */
+/* Turn a string in input_line_pointer into a floating point constant
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
+ returned, or NULL on OK. */
+
char *
md_atof (type, litP, sizeP)
char type;
@@ -1368,10 +1325,12 @@ md_atof (type, litP, sizeP)
}
CONST char *md_shortopts = "z:";
+
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof(md_longopts);
+
+size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -1403,7 +1362,7 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, _("\
+ fprintf (stream, _("\
Z8K options:\n\
-z8001 generate segmented code\n\
-z8002 generate unsegmented code\n"));
@@ -1418,20 +1377,21 @@ tc_aout_fix_to_chars ()
void
md_convert_frag (headers, seg, fragP)
- object_headers *headers;
- segT seg;
- fragS *fragP;
+ object_headers *headers ATTRIBUTE_UNUSED;
+ segT seg ATTRIBUTE_UNUSED;
+ fragS *fragP ATTRIBUTE_UNUSED;
{
printf (_("call to md_convert_frag \n"));
abort ();
}
valueT
-DEFUN (md_section_align, (seg, size),
- segT seg AND
- valueT size)
+md_section_align (seg, size)
+ segT seg;
+ valueT size;
{
- return ((size + (1 << section_alignment[(int) seg]) - 1) & (-1 << section_alignment[(int) seg]));
+ return ((size + (1 << section_alignment[(int) seg]) - 1)
+ & (-1 << section_alignment[(int) seg]));
}
@@ -1451,13 +1411,19 @@ md_apply_fix (fixP, val)
case R_JR:
*buf++ = val;
- /* if (val != 0) abort();*/
+#if 0
+ if (val != 0)
+ abort ();
+#endif
break;
case R_DISP7:
*buf++ += val;
- /* if (val != 0) abort();*/
+#if 0
+ if (val != 0)
+ abort ();
+#endif
break;
case R_IMM8:
@@ -1488,39 +1454,39 @@ md_apply_fix (fixP, val)
default:
abort ();
-
}
}
int
md_estimate_size_before_relax (fragP, segment_type)
- register fragS *fragP;
- register segT segment_type;
+ register fragS *fragP ATTRIBUTE_UNUSED;
+ register segT segment_type ATTRIBUTE_UNUSED;
{
printf (_("call tomd_estimate_size_before_relax \n"));
abort ();
}
-/* Put number into target byte order */
+/* Put number into target byte order. */
void
-DEFUN (md_number_to_chars, (ptr, use, nbytes),
- char *ptr AND
- valueT use AND
- int nbytes)
+md_number_to_chars (ptr, use, nbytes)
+ char *ptr;
+ valueT use;
+ int nbytes;
{
number_to_chars_bigendian (ptr, use, nbytes);
}
+
long
md_pcrel_from (fixP)
- fixS *fixP;
+ fixS *fixP ATTRIBUTE_UNUSED;
{
abort ();
}
void
tc_coff_symbol_emit_hook (s)
- symbolS *s;
+ symbolS *s ATTRIBUTE_UNUSED;
{
}
@@ -1533,30 +1499,31 @@ tc_reloc_mangle (fix_ptr, intr, base)
{
symbolS *symbol_ptr;
- if (fix_ptr->fx_addsy &&
- fix_ptr->fx_subsy)
+ if (fix_ptr->fx_addsy
+ && fix_ptr->fx_subsy)
{
symbolS *add = fix_ptr->fx_addsy;
symbolS *sub = fix_ptr->fx_subsy;
- if (S_GET_SEGMENT(add) != S_GET_SEGMENT(sub))
+
+ if (S_GET_SEGMENT (add) != S_GET_SEGMENT (sub))
+ as_bad (_("Can't subtract symbols in different sections %s %s"),
+ S_GET_NAME (add), S_GET_NAME (sub));
+ else
{
- as_bad(_("Can't subtract symbols in different sections %s %s"),
- S_GET_NAME(add), S_GET_NAME(sub));
+ int diff = S_GET_VALUE (add) - S_GET_VALUE (sub);
+
+ fix_ptr->fx_addsy = 0;
+ fix_ptr->fx_subsy = 0;
+ fix_ptr->fx_offset += diff;
}
- else {
- int diff = S_GET_VALUE(add) - S_GET_VALUE(sub);
- fix_ptr->fx_addsy = 0;
- fix_ptr->fx_subsy = 0;
- fix_ptr->fx_offset += diff;
- }
}
symbol_ptr = fix_ptr->fx_addsy;
/* If this relocation is attached to a symbol then it's ok
- to output it */
+ to output it. */
if (fix_ptr->fx_r_type == 0)
{
- /* cons likes to create reloc32's whatever the size of the reloc.. */
+ /* cons likes to create reloc32's whatever the size of the reloc. */
switch (fix_ptr->fx_size)
{
case 2:
@@ -1571,12 +1538,9 @@ tc_reloc_mangle (fix_ptr, intr, base)
default:
abort ();
}
-
}
else
- {
- intr->r_type = fix_ptr->fx_r_type;
- }
+ intr->r_type = fix_ptr->fx_r_type;
intr->r_vaddr = fix_ptr->fx_frag->fr_address + fix_ptr->fx_where + base;
intr->r_offset = fix_ptr->fx_offset;
@@ -1586,4 +1550,3 @@ tc_reloc_mangle (fix_ptr, intr, base)
else
intr->r_symndx = -1;
}
-
diff --git a/gnu/usr.bin/binutils/gas/config/tc-z8k.h b/gnu/usr.bin/binutils/gas/config/tc-z8k.h
index d88b656d6ee..d1899e1564f 100644
--- a/gnu/usr.bin/binutils/gas/config/tc-z8k.h
+++ b/gnu/usr.bin/binutils/gas/config/tc-z8k.h
@@ -1,5 +1,7 @@
/* This file is tc-z8k.h
- Copyright (C) 1987-1992, 93, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998,
+ 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,7 +20,6 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-
#define TC_Z8K
#define TARGET_BYTES_BIG_ENDIAN 1
@@ -33,7 +34,7 @@ struct internal_reloc;
#endif
/* This macro translates between an internal fix and an coff reloc type */
-#define TC_COFF_FIX2RTYPE(fixP) abort();
+#define TC_COFF_FIX2RTYPE(fixP) abort ();
#define BFD_ARCH bfd_arch_z8k
#define COFF_MAGIC 0x8000
@@ -50,5 +51,3 @@ extern void tc_reloc_mangle
#define RELOC_32 1234
#define md_operand(x)
-
-/* end of tc-z8k.h */
diff --git a/gnu/usr.bin/binutils/gas/config/te-go32.h b/gnu/usr.bin/binutils/gas/config/te-go32.h
index 085c958631d..c346021153c 100644
--- a/gnu/usr.bin/binutils/gas/config/te-go32.h
+++ b/gnu/usr.bin/binutils/gas/config/te-go32.h
@@ -1,6 +1,4 @@
-/*
- * This file is te-go32.h
- */
+/* This file is te-go32.h */
#define TE_GO32
@@ -9,7 +7,7 @@
#define TARGET_FORMAT "coff-go32"
-/* GAS should treat '.align value' as an alignment of 2**value */
+/* GAS should treat '.align value' as an alignment of 2**value. */
#define USE_ALIGN_PTWO
#define COFF_LONG_SECTION_NAMES
diff --git a/gnu/usr.bin/binutils/gas/config/te-ic960.h b/gnu/usr.bin/binutils/gas/config/te-ic960.h
index 8331fb962ea..b1275abb520 100644
--- a/gnu/usr.bin/binutils/gas/config/te-ic960.h
+++ b/gnu/usr.bin/binutils/gas/config/te-ic960.h
@@ -1,5 +1,6 @@
/* This file is te-ic960.h
- Copyright (C) 1987-1992, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1997, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,10 +19,8 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*
- * This file is te-ic960.h and is intended to define ic960 environment
- * specific differences.
- */
+/* This file is te-ic960.h and is intended to define ic960 environment
+ specific differences. */
#define OBJ_COFF_OMIT_OPTIONAL_HEADER
diff --git a/gnu/usr.bin/binutils/gas/config/te-nbsd.h b/gnu/usr.bin/binutils/gas/config/te-nbsd.h
index cee4600077b..cb8dc092eb5 100644
--- a/gnu/usr.bin/binutils/gas/config/te-nbsd.h
+++ b/gnu/usr.bin/binutils/gas/config/te-nbsd.h
@@ -1,18 +1,19 @@
/* te-nbsd.h -- NetBSD target environment declarations.
- Copyright (C) 1987, 90, 91, 92, 94, 95, 1998 Free Software Foundation, Inc.
-
+ Copyright 1987, 1990, 1991, 1992, 1994, 1998, 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
diff --git a/gnu/usr.bin/binutils/gas/config/te-sparcaout.h b/gnu/usr.bin/binutils/gas/config/te-sparcaout.h
index 63101840fa4..edd37661726 100644
--- a/gnu/usr.bin/binutils/gas/config/te-sparcaout.h
+++ b/gnu/usr.bin/binutils/gas/config/te-sparcaout.h
@@ -1,21 +1,22 @@
/* te-sparcaout.h -- embedded sparc-aout target environment declarations.
- Copyright (C) 1996 Free Software Foundation, Inc.
-
+ Copyright 1996, 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. */
+ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#define TE_SPARCAOUT 1
#include "obj-format.h"
diff --git a/gnu/usr.bin/binutils/gas/config/vms-conf.h b/gnu/usr.bin/binutils/gas/config/vms-conf.h
index 7225cfce1bd..1c17074f57a 100644
--- a/gnu/usr.bin/binutils/gas/config/vms-conf.h
+++ b/gnu/usr.bin/binutils/gas/config/vms-conf.h
@@ -105,7 +105,7 @@
#undef OBJ_MAYBE_VMS
/* Used for some of the COFF configurations, when the COFF code needs
- to select something based on the CPU type before it knows it... */
+ to select something based on the CPU type before it knows it... */
#undef I386COFF
#undef M68KCOFF
#undef M88KCOFF
diff --git a/gnu/usr.bin/binutils/gas/configure b/gnu/usr.bin/binutils/gas/configure
index 8386593cc56..2e201520bf9 100644
--- a/gnu/usr.bin/binutils/gas/configure
+++ b/gnu/usr.bin/binutils/gas/configure
@@ -22,12 +22,16 @@ ac_help="$ac_help
ac_help="$ac_help
--disable-libtool-lock avoid locking (might break parallel builds)"
ac_help="$ac_help
+ --with-pic try to use only PIC/non-PIC objects [default=use both]"
+ac_help="$ac_help
--enable-bfd-assembler use BFD back end for writing object files"
ac_help="$ac_help
targets alternative target configurations besides the primary"
ac_help="$ac_help
--enable-commonbfdlib build shared BFD/opcodes/libiberty library"
ac_help="$ac_help
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
--disable-nls do not use Native Language Support"
ac_help="$ac_help
--with-included-gettext use the GNU gettext library included here"
@@ -51,6 +55,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -165,6 +170,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -335,6 +341,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -500,12 +511,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -543,6 +558,68 @@ else
ac_n= ac_c='\c' ac_t=
fi
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:563: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 568 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:579: \"$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:596: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 601 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
ac_aux_dir=
@@ -592,7 +669,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:596: checking host system type" >&5
+echo "configure:673: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -613,7 +690,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:617: checking target system type" >&5
+echo "configure:694: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -631,7 +708,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:635: checking build system type" >&5
+echo "configure:712: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -653,7 +730,251 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:737: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:767: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:818: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 861 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:897: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:925: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:957: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$ac_t""yes" 1>&6
+ ISC=yes # If later tests want to check for ISC.
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
+else
+ echo "$ac_t""no" 1>&6
+ ISC=
+fi
+
+
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -666,7 +987,7 @@ test "$host_alias" != "$target_alias" &&
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:670: checking for a BSD compatible install" >&5
+echo "configure:991: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -719,7 +1040,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:723: checking whether build environment is sane" >&5
+echo "configure:1044: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -776,7 +1097,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:780: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1101: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -805,7 +1126,7 @@ fi
PACKAGE=gas
-VERSION=2.10.1
+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; }
@@ -822,7 +1143,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:826: checking for working aclocal" >&5
+echo "configure:1147: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -835,7 +1156,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:839: checking for working autoconf" >&5
+echo "configure:1160: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -848,7 +1169,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:852: checking for working automake" >&5
+echo "configure:1173: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -861,7 +1182,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:865: checking for working autoheader" >&5
+echo "configure:1186: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -874,7 +1195,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:878: checking for working makeinfo" >&5
+echo "configure:1199: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -957,258 +1278,6 @@ else
enable_fast_install=yes
fi
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:964: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:994: checking for $ac_word" >&5
-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:1024: 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:1075: 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:1107: 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 1118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- 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:1149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1154: checking whether we are using GNU C" >&5
-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:1163: \"$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:1182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1221,8 +1290,14 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1225: checking for ld used by GCC" >&5
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
+echo "configure:1294: checking for ld used by GCC" >&5
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
case "$ac_prog" in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
@@ -1245,10 +1320,10 @@ echo "configure:1225: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1249: checking for GNU ld" >&5
+echo "configure:1324: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1252: checking for non-GNU ld" >&5
+echo "configure:1327: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1283,7 +1358,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1287: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1362: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1296,10 +1371,23 @@ fi
fi
echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$ac_cv_prog_gnu_ld
+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+echo "configure:1379: checking for $LD option to reload object files" >&5
+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+
+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1303: checking for BSD-compatible nm" >&5
+echo "configure:1391: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1310,18 +1398,20 @@ else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ tmp_nm=$ac_dir/${ac_tool_prefix}nm
+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
+ # Tru64's nm complains that /dev/null is an invalid object file
+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
@@ -1335,7 +1425,7 @@ NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1339: checking whether ln -s works" >&5
+echo "configure:1429: 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
@@ -1355,11 +1445,483 @@ else
echo "$ac_t""no" 1>&6
fi
+echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
+echo "configure:1450: checking how to recognise dependant libraries" >&5
+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case "$host_os" in
+aix4*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin* | mingw* |pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+freebsd* )
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case "$host_cpu" in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20*)
+ # TODO: Does this work for hpux-11 too?
+ lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+
+irix5* | irix6*)
+ case "$host_os" in
+ irix5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case "$LD" in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ case "$host_cpu" in
+ alpha* | i*86 | powerpc* | sparc* | ia64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ else
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case "$host_vendor" in
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1593: 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:1599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1619: 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:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# Only perform the check for file, if the check method requires it
+case "$deplibs_check_method" in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+echo "configure:1662: checking for ${ac_tool_prefix}file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo $ac_n "checking for file""... $ac_c" 1>&6
+echo "configure:1724: checking for file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1795: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1827: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ RANLIB=":"
+fi
+fi
+
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1862: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1894: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ STRIP=":"
+fi
+fi
+
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
@@ -1379,13 +1941,24 @@ fi
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
+test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$lt_target" in
+case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1388 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1961 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1406,19 +1979,27 @@ case "$lt_target" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1410: checking whether the C compiler needs -belf" >&5
+echo "configure:1983: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1415 "configure"
+
+ 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 1996 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -1428,6 +2009,13 @@ else
lt_cv_cc_needs_belf=no
fi
rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
fi
echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
@@ -1491,12 +2079,14 @@ rm -f confcache
# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
# Reload cache, that may have been modified by ltconfig
@@ -1510,7 +2100,7 @@ fi
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -1520,6 +2110,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
exec 5>>./config.log
+
+
+
+
+
+
user_bfd_gas=
# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
if test "${enable_bfd_assembler+set}" = set; then
@@ -1552,6 +2148,29 @@ fi
using_cgen=no
+build_warnings="-W -Wall"
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+
+
# Generate a header file
@@ -1619,10 +2238,14 @@ for this_target in $target $canon_targets ; do
armb*) cpu_type=arm endian=little ;;
armv*l) cpu_type=arm endian=little ;;
armv*b) cpu_type=arm endian=big ;;
+ xscale*) cpu_type=arm endian=little ;;
strongarm*) cpu_type=arm endian=little ;;
thumb*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
- i[456]86) cpu_type=i386 ;;
+ i[3456]86) cpu_type=i386 arch=i386;;
+ x86_64) cpu_type=i386 arch=x86_64;;
+ ia64) cpu_type=ia64 ;;
+ m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
m680[012346]0) cpu_type=m68k ;;
m68008) cpu_type=m68k ;;
m683??) cpu_type=m68k ;;
@@ -1661,6 +2284,7 @@ for this_target in $target $canon_targets ; do
a29k-amd-udi) fmt=coff ;;
a29k-amd-ebmon) fmt=coff ;;
a29k-nyu-sym1) fmt=coff ;;
+ a29k-*-rtems*) fmt=coff ;;
a29k-*-vxworks*) fmt=coff ;;
alpha*-*-*vms*) fmt=evax ;;
@@ -1668,7 +2292,6 @@ for this_target in $target $canon_targets ; do
alpha*-*-osf*) fmt=ecoff ;;
alpha*-*-linuxecoff*) fmt=ecoff ;;
alpha*-*-linux-gnu*) fmt=elf em=linux ;;
- alpha*-*-freebsd*) fmt=elf em=freebsd ;;
alpha*-*-netbsd*) fmt=elf em=nbsd ;;
alpha*-*-openbsd*) fmt=elf em=obsd ;;
@@ -1676,37 +2299,56 @@ for this_target in $target $canon_targets ; do
arm-*-aout) fmt=aout ;;
arm-*-coff | thumb-*-coff) fmt=coff ;;
+ arm-*-rtems | thumb-*-rtems) fmt=elf ;;
arm-*-elf | thumb-*-elf) fmt=elf ;;
arm*-*-conix*) fmt=elf ;;
arm-*-linux*aout*) fmt=aout em=linux ;;
- arm*-*-linux-gnu*) fmt=elf em=linux ;;
- arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
+ arm*-*-linux-gnu* | arm*-*-uclinux*)
+ fmt=elf em=linux ;;
+ arm-*-netbsd*) fmt=aout em=nbsd ;;
arm-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
arm-*-oabi | thumb-*-oabi) fmt=elf ;;
arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
- arm-*-wince) fmt=coff em=wince-pe bfd_gas=yes;;
+ arm-*-wince) fmt=coff em=wince-pe ;;
arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
arm-*-riscix*) fmt=aout em=riscix ;;
+ arm-*-vxworks) fmt=coff ;;
avr-*-*) fmt=elf bfd_gas=yes ;;
+ cris-*-*) fmt=multi bfd_gas=yes ;;
+
d10v-*-*) fmt=elf bfd_gas=yes ;;
d30v-*-*) fmt=elf bfd_gas=yes ;;
fr30-*-*) fmt=elf bfd_gas=yes ;;
+ hppa-*-linux-gnu*) case ${cpu} in
+ hppa*64*)
+ fmt=elf em=hppalinux64;;
+ hppa*)
+ fmt=elf em=linux;;
+ esac ;;
hppa-*-*elf*) fmt=elf em=hppa ;;
- hppa-*-linux-gnu*) fmt=elf em=hppa ;;
hppa-*-lites*) fmt=elf em=hppa ;;
hppa-*-osf*) fmt=som em=hppa ;;
hppa-*-rtems*) fmt=elf em=hppa ;;
+ hppa-*-hpux11*) case ${cpu} in
+ hppa*64*)
+ fmt=elf em=hppa64 ;;
+ hppa*)
+ fmt=som em=hppa ;;
+ esac ;;
hppa-*-hpux*) fmt=som em=hppa ;;
hppa-*-mpeix*) fmt=som em=hppa ;;
hppa-*-bsd*) fmt=som em=hppa ;;
hppa-*-hiux*) fmt=som em=hppa ;;
+ h8300-*-rtems*) fmt=coff ;;
h8300-*-coff) fmt=coff ;;
+ h8500-*-rtems*) fmt=coff ;;
+ h8500-*-coff) fmt=coff ;;
i370-*-elf* | i370-*-linux*) fmt=elf ;;
i386-ibm-aix*) fmt=coff em=i386aix ;;
@@ -1717,15 +2359,15 @@ for this_target in $target $canon_targets ; do
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
- i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
+ i386-*-linux*aout* | i386-*-linux*oldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
+ x86_64-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
i386-*-lynxos*) fmt=coff em=lynx ;;
- i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
+ i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf)
fmt=elf bfd_gas=yes ;;
i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12])
fmt=aout em=386bsd ;;
- i386-*-freebsd*) fmt=elf bfd_gas=yes ;;
i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
fmt=coff ;;
i386-*-sco3.2v5*) fmt=elf
@@ -1739,25 +2381,31 @@ EOF
i386-*-sco3.2*) fmt=coff ;;
i386-*-vsta) fmt=aout ;;
i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
- fmt=coff em=go32;;
- i386-*-rtemscoff*) fmt=coff ;;
+ fmt=coff em=go32 bfd_gas=yes
+ cat >> confdefs.h <<\EOF
+#define STRICTCOFF 1
+EOF
+
+ ;;
i386-*-rtemself*) fmt=elf ;;
- i386-*-rtems*) fmt=elf ;;
+ i386-*-rtems*) fmt=coff ;;
i386-*-gnu*) fmt=elf ;;
i386-*-mach*)
fmt=aout em=mach bfd_gas=yes ;;
i386-*-msdos*) fmt=aout ;;
i386-*-moss*) fmt=elf ;;
- i386-*-pe) fmt=coff em=pe ;;
+ i386-*-pe) fmt=coff em=pe bfd_gas=yes ;;
i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;;
i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
- i386-*-*nt*) fmt=coff em=pe ;;
+ i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;;
i386-*-vxworks*) fmt=aout ;;
+ i386-*-chaos) fmt=elf ;;
+ i860-stardent-sysv4* | i860-stardent-elf*)
+ fmt=elf bfd_gas=yes endian=little
+ echo "configure: warning: GAS support for ${generic_target} is preliminary and a work in progress" 1>&2 ;;
i960-*-bout) fmt=bout ;;
i960-*-coff) fmt=coff em=ic960 ;;
- i960-*-rtemscoff*) fmt=coff em=ic960 ;;
- i960-*-rtemself*) fmt=elf ;;
i960-*-rtems*) fmt=coff em=ic960 ;;
i960-*-nindy*) fmt=bout ;;
i960-*-vxworks4*) fmt=bout ;;
@@ -1766,8 +2414,14 @@ EOF
i960-*-vxworks*) fmt=bout ;;
i960-*-elf*) fmt=elf ;;
+ ia64-*-elf*) fmt=elf ;;
+ ia64-*-linux-gnu*) fmt=elf em=linux ;;
+ ia64-*-hpux*) fmt=elf em=hpux ;;
+
m32r-*-*) fmt=elf bfd_gas=yes ;;
+ m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;;
+
m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
fmt=aout em=sun3 ;;
m68k-motorola-sysv*) fmt=coff em=delta ;;
@@ -1776,10 +2430,7 @@ EOF
m68k-*-sysv4*) # must be before -sysv*
fmt=elf em=svr4 ;;
m68k-*-elf*) fmt=elf ;;
- m68k-*-rtemscoff*) fmt=coff ;;
- m68k-*-rtemself*) fmt=elf ;;
- m68k-*-rtems*) fmt=elf ;;
- m68k-*-coff | m68k-*-sysv*)
+ m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
fmt=coff ;;
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
@@ -1805,15 +2456,23 @@ EOF
mips-*-ultrix*) fmt=ecoff endian=little ;;
mips-*-osf*) fmt=ecoff endian=little ;;
mips-*-ecoff*) fmt=ecoff ;;
- mips-*-ecoff*) fmt=ecoff ;;
mips-*-pe*) fmt=coff endian=little em=pe ;;
mips-*-irix6*) fmt=elf ;;
mips-*-irix5*) fmt=elf ;;
mips-*-irix*) fmt=ecoff ;;
mips-*-lnews*) fmt=ecoff em=lnews ;;
mips-*-riscos*) fmt=ecoff ;;
+ mips-*-linux-gnu*)
+ fmt=elf em=tmips
+ cat >> confdefs.h <<\EOF
+#define MIPS_STABS_ELF 1
+EOF
+
+ ;;
+ mips-*-sysv4*MP* | mips-*-gnu*)
+ fmt=elf em=tmips ;;
mips-*-sysv*) fmt=ecoff ;;
- mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
+ mips-*-elf* | mips-*-rtems* | mips-*-openbsd*)
fmt=elf ;;
mips-*-vxworks*) fmt=elf
cat >> confdefs.h <<\EOF
@@ -1853,12 +2512,12 @@ EOF
ppc-*-netware*) fmt=elf em=ppcnw ;;
ppc-*-vxworks*) fmt=elf ;;
+ sh-*-linux*) fmt=elf em=linux ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
sh-*-rtemself*) fmt=elf ;;
- sh-*-rtemscoff*) fmt=coff ;;
- sh-*-rtems*) fmt=coff ;;
+ sh-*-rtems*) fmt=coff ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
@@ -1894,9 +2553,13 @@ EOF
;;
strongarm-*-coff) fmt=coff ;;
strongarm-*-elf) fmt=elf ;;
+ xscale-*-coff) fmt=coff ;;
+ xscale-*-elf) fmt=elf ;;
tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
+ tic54x-*-* | c54x*-*-*)
+ fmt=coff bfd_gas=yes need_libm=yes;;
tic80-*-*) fmt=coff ;;
v850-*-*) fmt=elf bfd_gas=yes ;;
@@ -1915,6 +2578,7 @@ EOF
*-*-aout | *-*-scout)
fmt=aout ;;
+ *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;;
*-*-nindy*)
fmt=bout ;;
*-*-bsd*)
@@ -1949,11 +2613,13 @@ EOF
arm-*) bfd_gas=yes ;;
# not yet
# i386-aout) bfd_gas=preferred ;;
+ ia64*-*) bfd_gas=yes ;;
mips-*) bfd_gas=yes ;;
ns32k-*) bfd_gas=yes ;;
ppc-*) bfd_gas=yes ;;
sparc-*) bfd_gas=yes ;;
strongarm-*) bfd_gas=yes ;;
+ xscale-*) bfd_gas=yes ;;
*-elf) bfd_gas=yes ;;
*-ecoff) bfd_gas=yes ;;
*-som) bfd_gas=yes ;;
@@ -2016,6 +2682,14 @@ EOF
fi
;;
+ i386)
+ if test $this_target = $target ; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_ARCH "${arch}"
+EOF
+
+ fi
+ ;;
sparc)
if test $this_target = $target ; then
cat >> confdefs.h <<EOF
@@ -2068,6 +2742,9 @@ EOF
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
esac ;;
+ mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
+ # i386-pc-pe-coff != i386-pc-coff.
+ i386-*-pe-coff) ;;
# Uncommenting the next line will turn on support for i386 AOUT
# for the default linux configuration
# i386-*-linux*-elf) emulation="i386elf i386aout" ;;
@@ -2075,6 +2752,10 @@ EOF
i386-*-aout) emulation="i386aout" ;;
i386-*-coff) emulation="i386coff" ;;
i386-*-elf) emulation="i386elf" ;;
+
+ # Always all formats. The first stated emulation becomes the default.
+ cris-*-*aout*) emulation="crisaout criself" ;;
+ cris-*-*) emulation="criself crisaout" ;;
esac
emulations="$emulations $emulation"
@@ -2206,16 +2887,16 @@ emulations=$_gas_uniq_newlist
for em in . $emulations ; do
case $em in
.) continue ;;
- mipsbelf | mipslelf)
+ mipsbelf | mipslelf | mipself)
fmt=elf file=mipself ;;
- mipsbecoff | mipslecoff)
+ mipsbecoff | mipslecoff | mipsecoff)
fmt=ecoff file=mipsecoff ;;
- i386aout)
- fmt=aout file=i386aout ;;
- i386coff)
- fmt=coff file=i386coff ;;
- i386elf)
- fmt=elf file=i386elf ;;
+ *coff)
+ fmt=coff file=$em ;;
+ *aout)
+ fmt=aout file=$em ;;
+ *elf)
+ fmt=elf file=$em ;;
esac
formats="$formats $fmt"
emfiles="$emfiles e-$file.o"
@@ -2393,7 +3074,7 @@ EOF
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2392: checking for $ac_word" >&5
+echo "configure:3074: 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
@@ -2423,7 +3104,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2422: checking for $ac_word" >&5
+echo "configure:3104: 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
@@ -2474,7 +3155,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2473: checking for $ac_word" >&5
+echo "configure:3155: 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
@@ -2506,7 +3187,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2505: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:3187: 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.
@@ -2517,12 +3198,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2516 "configure"
+#line 3198 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3203: \"$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
@@ -2548,12 +3229,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2547: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:3229: 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:2552: checking whether we are using GNU C" >&5
+echo "configure:3234: 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
@@ -2562,7 +3243,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3243: \"$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
@@ -2581,7 +3262,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2580: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:3262: 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
@@ -2618,7 +3299,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2617: checking for $ac_word" >&5
+echo "configure:3299: 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
@@ -2649,7 +3330,7 @@ done
test -n "$YACC" || YACC="yacc"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2648: checking how to run the C preprocessor" >&5
+echo "configure:3330: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2664,13 +3345,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2663 "configure"
+#line 3345 "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:2669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3351: \"$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
:
@@ -2681,13 +3362,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2680 "configure"
+#line 3362 "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:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3368: \"$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
:
@@ -2698,13 +3379,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2697 "configure"
+#line 3379 "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:2703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3385: \"$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
:
@@ -2734,7 +3415,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2733: checking for $ac_word" >&5
+echo "configure:3415: 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
@@ -2767,7 +3448,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex""
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2766: checking for $ac_word" >&5
+echo "configure:3448: 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
@@ -2801,7 +3482,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:2800: checking for yywrap in -l$ac_lib" >&5
+echo "configure:3482: 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
@@ -2809,7 +3490,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2808 "configure"
+#line 3490 "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
@@ -2820,7 +3501,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3501: \"$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
@@ -2843,7 +3524,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2842: checking lex output file root" >&5
+echo "configure:3524: checking lex output file root" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2864,7 +3545,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2863: checking whether yytext is a pointer" >&5
+echo "configure:3545: checking whether yytext is a pointer" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2876,14 +3557,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 2875 "configure"
+#line 3557 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:2882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_prog_lex_yytext_pointer=yes
else
@@ -2906,34 +3587,43 @@ fi
ALL_LINGUAS=
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:2906: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
- echo "$ac_t""yes" 1>&6
- ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3590: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
- ISC=
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2927: checking for ANSI C header files" >&5
+echo "configure:3618: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2932 "configure"
+#line 3623 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2941,7 +3631,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3631: \"$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*
@@ -2958,7 +3648,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2957 "configure"
+#line 3648 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2976,7 +3666,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2975 "configure"
+#line 3666 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2997,7 +3687,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2996 "configure"
+#line 3687 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3008,7 +3698,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3032,12 +3722,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3031: checking for working const" >&5
+echo "configure:3722: 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 3036 "configure"
+#line 3727 "configure"
#include "confdefs.h"
int main() {
@@ -3086,7 +3776,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3107,21 +3797,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3106: checking for inline" >&5
+echo "configure:3797: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 3113 "configure"
+#line 3804 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3147,12 +3837,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3146: checking for off_t" >&5
+echo "configure:3837: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3151 "configure"
+#line 3842 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3180,12 +3870,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3179: checking for size_t" >&5
+echo "configure:3870: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3184 "configure"
+#line 3875 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3215,19 +3905,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3214: checking for working alloca.h" >&5
+echo "configure:3905: 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 3219 "configure"
+#line 3910 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3917: \"$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
@@ -3248,12 +3938,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3247: checking for alloca" >&5
+echo "configure:3938: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3252 "configure"
+#line 3943 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3281,7 +3971,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3313,12 +4003,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3312: checking whether alloca needs Cray hooks" >&5
+echo "configure:4003: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3317 "configure"
+#line 4008 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3343,12 +4033,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3342: checking for $ac_func" >&5
+echo "configure:4033: 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 3347 "configure"
+#line 4038 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3371,7 +4061,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4061: \"$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
@@ -3398,7 +4088,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3397: checking stack direction for C alloca" >&5
+echo "configure:4088: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3406,7 +4096,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3405 "configure"
+#line 4096 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3425,7 +4115,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3450,17 +4140,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3449: checking for $ac_hdr" >&5
+echo "configure:4140: 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 3454 "configure"
+#line 4145 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4150: \"$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*
@@ -3489,12 +4179,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3488: checking for $ac_func" >&5
+echo "configure:4179: 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 3493 "configure"
+#line 4184 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3517,7 +4207,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4207: \"$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
@@ -3542,7 +4232,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3541: checking for working mmap" >&5
+echo "configure:4232: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3550,7 +4240,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3549 "configure"
+#line 4240 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3690,7 +4380,7 @@ main()
}
EOF
-if { (eval echo configure:3689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -3718,17 +4408,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3717: checking for $ac_hdr" >&5
+echo "configure:4408: 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 3722 "configure"
+#line 4413 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4418: \"$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*
@@ -3758,12 +4448,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3757: checking for $ac_func" >&5
+echo "configure:4448: 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 3762 "configure"
+#line 4453 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3786,7 +4476,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+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_func_$ac_func=yes"
else
@@ -3815,12 +4505,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3814: checking for $ac_func" >&5
+echo "configure:4505: 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 3819 "configure"
+#line 4510 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3843,7 +4533,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4533: \"$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
@@ -3877,19 +4567,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3876: checking for LC_MESSAGES" >&5
+echo "configure:4567: 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 3881 "configure"
+#line 4572 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3910,7 +4600,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3909: checking whether NLS is requested" >&5
+echo "configure:4600: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3930,7 +4620,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3929: checking whether included gettext is requested" >&5
+echo "configure:4620: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3949,17 +4639,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3948: checking for libintl.h" >&5
+echo "configure:4639: 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 3953 "configure"
+#line 4644 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4649: \"$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*
@@ -3976,19 +4666,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3975: checking for gettext in libc" >&5
+echo "configure:4666: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3980 "configure"
+#line 4671 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -4004,7 +4694,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:4003: checking for bindtextdomain in -lintl" >&5
+echo "configure:4694: 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
@@ -4012,7 +4702,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4011 "configure"
+#line 4702 "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
@@ -4023,7 +4713,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4713: \"$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
@@ -4039,19 +4729,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:4038: checking for gettext in libintl" >&5
+echo "configure:4729: 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 4043 "configure"
+#line 4734 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -4079,7 +4769,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4078: checking for $ac_word" >&5
+echo "configure:4769: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4113,12 +4803,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4112: checking for $ac_func" >&5
+echo "configure:4803: 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 4117 "configure"
+#line 4808 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4141,7 +4831,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4831: \"$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
@@ -4168,7 +4858,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4167: checking for $ac_word" >&5
+echo "configure:4858: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4204,7 +4894,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4203: checking for $ac_word" >&5
+echo "configure:4894: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4236,7 +4926,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4235 "configure"
+#line 4926 "configure"
#include "confdefs.h"
int main() {
@@ -4244,7 +4934,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4276,7 +4966,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4275: checking for $ac_word" >&5
+echo "configure:4966: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4310,7 +5000,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4309: checking for $ac_word" >&5
+echo "configure:5000: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4346,7 +5036,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4345: checking for $ac_word" >&5
+echo "configure:5036: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4436,7 +5126,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4435: checking for catalogs to be installed" >&5
+echo "configure:5126: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4464,17 +5154,17 @@ echo "configure:4435: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4463: checking for linux/version.h" >&5
+echo "configure:5154: 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 4468 "configure"
+#line 5159 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5164: \"$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*
@@ -4537,7 +5227,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4536: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:5227: 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"
@@ -4559,72 +5249,10 @@ fi
MAINT=$MAINTAINER_MODE_TRUE
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:4559: 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 4564 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:4575: \"$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:4592: 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 4597 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:4604: \"$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
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4623: checking for executable suffix" >&5
+echo "configure:5252: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4634,10 +5262,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -4659,17 +5287,17 @@ for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h e
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4658: checking for $ac_hdr" >&5
+echo "configure:5287: 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 4663 "configure"
+#line 5292 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5297: \"$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*
@@ -4699,7 +5327,7 @@ done
# Put this here so that autoconf's "cross-compiling" message doesn't confuse
# people who are not cross-compiling but are compiling cross-assemblers.
echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
-echo "configure:4698: checking whether compiling a cross-assembler" >&5
+echo "configure:5327: checking whether compiling a cross-assembler" >&5
if test "${host}" = "${target}"; then
cross_gas=no
else
@@ -4714,19 +5342,19 @@ echo "$ac_t""$cross_gas" 1>&6
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:4713: checking for working alloca.h" >&5
+echo "configure:5342: 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 4718 "configure"
+#line 5347 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5354: \"$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
@@ -4747,12 +5375,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4746: checking for alloca" >&5
+echo "configure:5375: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4751 "configure"
+#line 5380 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -4780,7 +5408,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -4812,12 +5440,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4811: checking whether alloca needs Cray hooks" >&5
+echo "configure:5440: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4816 "configure"
+#line 5445 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -4842,12 +5470,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4841: checking for $ac_func" >&5
+echo "configure:5470: 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 4846 "configure"
+#line 5475 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4870,7 +5498,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5498: \"$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
@@ -4897,7 +5525,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4896: checking stack direction for C alloca" >&5
+echo "configure:5525: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4905,7 +5533,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 4904 "configure"
+#line 5533 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -4924,7 +5552,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:4923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -4946,21 +5574,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:4945: checking for inline" >&5
+echo "configure:5574: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 4952 "configure"
+#line 5581 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:4959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -4990,12 +5618,12 @@ esac
for ac_func in unlink remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4989: checking for $ac_func" >&5
+echo "configure:5618: 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 4994 "configure"
+#line 5623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5018,7 +5646,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5646: \"$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
@@ -5047,12 +5675,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5046: checking for $ac_func" >&5
+echo "configure:5675: 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 5051 "configure"
+#line 5680 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5075,7 +5703,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5703: \"$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
@@ -5100,16 +5728,146 @@ fi
done
+# do we need the math library?
+case "${need_libm}" in
+yes)
+ LIBM=
+case "$host" in
+*-*-beos* | *-*-cygwin* | *-*-pw32*)
+ # These system don't have libm
+ ;;
+*-ncr-sysv4.3*)
+ echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6
+echo "configure:5738: checking for _mwvalidcheckl in -lmw" >&5
+ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lmw $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5746 "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 _mwvalidcheckl();
+
+int main() {
+_mwvalidcheckl()
+; return 0; }
+EOF
+if { (eval echo configure:5757: \"$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
+ LIBM="-lmw"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:5778: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5786 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:5793: \"$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
+ LIBM="$LIBM -lm"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ ;;
+*)
+ echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:5816: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5824 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:5831: \"$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
+ LIBM="-lm"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ ;;
+esac
+
+
+ ;;
+esac
+
# Some non-ANSI preprocessors botch requoting inside strings. That's bad
# enough, but on some of those systems, the assert macro relies on requoting
# working properly!
echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
-echo "configure:5103: checking for working assert macro" >&5
+echo "configure:5862: checking for working assert macro" >&5
if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5108 "configure"
+#line 5867 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@@ -5125,7 +5883,7 @@ assert (a == b
; return 0; }
EOF
-if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_assert_ok=yes
else
@@ -5166,12 +5924,12 @@ gas_test_headers="
"
echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
-echo "configure:5165: checking whether declaration is required for strstr" >&5
+echo "configure:5924: checking whether declaration is required for strstr" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5170 "configure"
+#line 5929 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -5182,7 +5940,7 @@ x = (f) strstr;
; return 0; }
EOF
-if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_decl_needed_strstr=no
else
@@ -5203,12 +5961,12 @@ fi
echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
-echo "configure:5202: checking whether declaration is required for malloc" >&5
+echo "configure:5961: checking whether declaration is required for malloc" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5207 "configure"
+#line 5966 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -5219,7 +5977,7 @@ x = (f) malloc;
; return 0; }
EOF
-if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_decl_needed_malloc=no
else
@@ -5240,12 +5998,12 @@ fi
echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
-echo "configure:5239: checking whether declaration is required for free" >&5
+echo "configure:5998: checking whether declaration is required for free" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5244 "configure"
+#line 6003 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -5256,7 +6014,7 @@ x = (f) free;
; return 0; }
EOF
-if { (eval echo configure:5255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_decl_needed_free=no
else
@@ -5277,12 +6035,12 @@ fi
echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
-echo "configure:5276: checking whether declaration is required for sbrk" >&5
+echo "configure:6035: checking whether declaration is required for sbrk" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5281 "configure"
+#line 6040 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -5293,7 +6051,7 @@ x = (f) sbrk;
; return 0; }
EOF
-if { (eval echo configure:5292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_decl_needed_sbrk=no
else
@@ -5314,12 +6072,12 @@ fi
echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
-echo "configure:5313: checking whether declaration is required for environ" >&5
+echo "configure:6072: checking whether declaration is required for environ" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5318 "configure"
+#line 6077 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -5330,7 +6088,7 @@ x = (f) environ;
; return 0; }
EOF
-if { (eval echo configure:5329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_decl_needed_environ=no
else
@@ -5354,12 +6112,12 @@ fi
# for it?
echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
-echo "configure:5353: checking whether declaration is required for errno" >&5
+echo "configure:6112: checking whether declaration is required for errno" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5358 "configure"
+#line 6117 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
@@ -5374,7 +6132,7 @@ x = (f) errno;
; return 0; }
EOF
-if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_decl_needed_errno=no
else
@@ -5544,6 +6302,7 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
+s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -5555,10 +6314,13 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@RANLIB@%$RANLIB%g
+s%@STRIP@%$STRIP%g
s%@LIBTOOL@%$LIBTOOL%g
+s%@WARN_CFLAGS@%$WARN_CFLAGS%g
s%@GDBINIT@%$GDBINIT%g
s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
s%@extra_objects@%$extra_objects%g
@@ -5599,7 +6361,7 @@ s%@l@%$l%g
s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
+s%@LIBM@%$LIBM%g
CEOF
EOF
diff --git a/gnu/usr.bin/binutils/gas/configure.in b/gnu/usr.bin/binutils/gas/configure.in
index fd8a0189bd1..9084ee4ac35 100644
--- a/gnu/usr.bin/binutils/gas/configure.in
+++ b/gnu/usr.bin/binutils/gas/configure.in
@@ -9,8 +9,12 @@ AC_PREREQ(2.13)
AC_INIT(as.h)
AC_CANONICAL_SYSTEM
+AC_ISC_POSIX
-AM_INIT_AUTOMAKE(gas, 2.10.1)
+changequote(,)dnl
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+changequote([,])dnl
+AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
AM_PROG_LIBTOOL
@@ -40,6 +44,27 @@ esac])dnl
using_cgen=no
+build_warnings="-W -Wall"
+AC_ARG_ENABLE(build-warnings,
+[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi])dnl
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+AC_SUBST(WARN_CFLAGS)
+
# Generate a header file
AM_CONFIG_HEADER(config.h:config.in)
@@ -95,11 +120,15 @@ changequote([,])dnl
armb*) cpu_type=arm endian=little ;;
armv*l) cpu_type=arm endian=little ;;
armv*b) cpu_type=arm endian=big ;;
+ xscale*) cpu_type=arm endian=little ;;
strongarm*) cpu_type=arm endian=little ;;
thumb*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
changequote(,)dnl
- i[456]86) cpu_type=i386 ;;
+ i[3456]86) cpu_type=i386 arch=i386;;
+ x86_64) cpu_type=i386 arch=x86_64;;
+ ia64) cpu_type=ia64 ;;
+ m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
m680[012346]0) cpu_type=m68k ;;
changequote([,])dnl
m68008) cpu_type=m68k ;;
@@ -139,6 +168,7 @@ changequote([,])dnl
a29k-amd-udi) fmt=coff ;;
a29k-amd-ebmon) fmt=coff ;;
a29k-nyu-sym1) fmt=coff ;;
+ a29k-*-rtems*) fmt=coff ;;
a29k-*-vxworks*) fmt=coff ;;
alpha*-*-*vms*) fmt=evax ;;
@@ -146,7 +176,6 @@ changequote([,])dnl
alpha*-*-osf*) fmt=ecoff ;;
alpha*-*-linuxecoff*) fmt=ecoff ;;
alpha*-*-linux-gnu*) fmt=elf em=linux ;;
- alpha*-*-freebsd*) fmt=elf em=freebsd ;;
alpha*-*-netbsd*) fmt=elf em=nbsd ;;
alpha*-*-openbsd*) fmt=elf em=obsd ;;
@@ -154,37 +183,56 @@ changequote([,])dnl
arm-*-aout) fmt=aout ;;
arm-*-coff | thumb-*-coff) fmt=coff ;;
+ arm-*-rtems | thumb-*-rtems) fmt=elf ;;
arm-*-elf | thumb-*-elf) fmt=elf ;;
arm*-*-conix*) fmt=elf ;;
arm-*-linux*aout*) fmt=aout em=linux ;;
- arm*-*-linux-gnu*) fmt=elf em=linux ;;
- arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
+ arm*-*-linux-gnu* | arm*-*-uclinux*)
+ fmt=elf em=linux ;;
+ arm-*-netbsd*) fmt=aout em=nbsd ;;
arm-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
arm-*-oabi | thumb-*-oabi) fmt=elf ;;
arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
- arm-*-wince) fmt=coff em=wince-pe bfd_gas=yes;;
+ arm-*-wince) fmt=coff em=wince-pe ;;
arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
arm-*-riscix*) fmt=aout em=riscix ;;
+ arm-*-vxworks) fmt=coff ;;
avr-*-*) fmt=elf bfd_gas=yes ;;
+ cris-*-*) fmt=multi bfd_gas=yes ;;
+
d10v-*-*) fmt=elf bfd_gas=yes ;;
d30v-*-*) fmt=elf bfd_gas=yes ;;
fr30-*-*) fmt=elf bfd_gas=yes ;;
+ hppa-*-linux-gnu*) case ${cpu} in
+ hppa*64*)
+ fmt=elf em=hppalinux64;;
+ hppa*)
+ fmt=elf em=linux;;
+ esac ;;
hppa-*-*elf*) fmt=elf em=hppa ;;
- hppa-*-linux-gnu*) fmt=elf em=hppa ;;
hppa-*-lites*) fmt=elf em=hppa ;;
hppa-*-osf*) fmt=som em=hppa ;;
hppa-*-rtems*) fmt=elf em=hppa ;;
+ hppa-*-hpux11*) case ${cpu} in
+ hppa*64*)
+ fmt=elf em=hppa64 ;;
+ hppa*)
+ fmt=som em=hppa ;;
+ esac ;;
hppa-*-hpux*) fmt=som em=hppa ;;
hppa-*-mpeix*) fmt=som em=hppa ;;
hppa-*-bsd*) fmt=som em=hppa ;;
hppa-*-hiux*) fmt=som em=hppa ;;
+ h8300-*-rtems*) fmt=coff ;;
h8300-*-coff) fmt=coff ;;
+ h8500-*-rtems*) fmt=coff ;;
+ h8500-*-coff) fmt=coff ;;
i370-*-elf* | i370-*-linux*) fmt=elf ;;
i386-ibm-aix*) fmt=coff em=i386aix ;;
@@ -195,17 +243,17 @@ changequote([,])dnl
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
- i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
+ i386-*-linux*aout* | i386-*-linux*oldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
+ x86_64-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
i386-*-lynxos*) fmt=coff em=lynx ;;
- i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
- fmt=elf bfd_gas=yes ;;
changequote(,)dnl
+ i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf)
+ fmt=elf bfd_gas=yes ;;
i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12])
fmt=aout em=386bsd ;;
changequote([,])dnl
- i386-*-freebsd*) fmt=elf bfd_gas=yes ;;
i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
fmt=coff ;;
i386-*-sco3.2v5*) fmt=elf
@@ -217,25 +265,28 @@ changequote([,])dnl
i386-*-sco3.2*) fmt=coff ;;
i386-*-vsta) fmt=aout ;;
i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
- fmt=coff em=go32;;
- i386-*-rtemscoff*) fmt=coff ;;
+ fmt=coff em=go32 bfd_gas=yes
+ AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?])
+ ;;
i386-*-rtemself*) fmt=elf ;;
- i386-*-rtems*) fmt=elf ;;
+ i386-*-rtems*) fmt=coff ;;
i386-*-gnu*) fmt=elf ;;
i386-*-mach*)
fmt=aout em=mach bfd_gas=yes ;;
i386-*-msdos*) fmt=aout ;;
i386-*-moss*) fmt=elf ;;
- i386-*-pe) fmt=coff em=pe ;;
+ i386-*-pe) fmt=coff em=pe bfd_gas=yes ;;
i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;;
i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
- i386-*-*nt*) fmt=coff em=pe ;;
+ i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;;
i386-*-vxworks*) fmt=aout ;;
+ i386-*-chaos) fmt=elf ;;
+ i860-stardent-sysv4* | i860-stardent-elf*)
+ fmt=elf bfd_gas=yes endian=little
+ AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) ;;
i960-*-bout) fmt=bout ;;
i960-*-coff) fmt=coff em=ic960 ;;
- i960-*-rtemscoff*) fmt=coff em=ic960 ;;
- i960-*-rtemself*) fmt=elf ;;
i960-*-rtems*) fmt=coff em=ic960 ;;
i960-*-nindy*) fmt=bout ;;
i960-*-vxworks4*) fmt=bout ;;
@@ -244,8 +295,14 @@ changequote([,])dnl
i960-*-vxworks*) fmt=bout ;;
i960-*-elf*) fmt=elf ;;
+ ia64-*-elf*) fmt=elf ;;
+ ia64-*-linux-gnu*) fmt=elf em=linux ;;
+ ia64-*-hpux*) fmt=elf em=hpux ;;
+
m32r-*-*) fmt=elf bfd_gas=yes ;;
+ m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;;
+
m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
fmt=aout em=sun3 ;;
m68k-motorola-sysv*) fmt=coff em=delta ;;
@@ -254,10 +311,7 @@ changequote([,])dnl
m68k-*-sysv4*) # must be before -sysv*
fmt=elf em=svr4 ;;
m68k-*-elf*) fmt=elf ;;
- m68k-*-rtemscoff*) fmt=coff ;;
- m68k-*-rtemself*) fmt=elf ;;
- m68k-*-rtems*) fmt=elf ;;
- m68k-*-coff | m68k-*-sysv*)
+ m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
fmt=coff ;;
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
@@ -283,15 +337,21 @@ changequote([,])dnl
mips-*-ultrix*) fmt=ecoff endian=little ;;
mips-*-osf*) fmt=ecoff endian=little ;;
mips-*-ecoff*) fmt=ecoff ;;
- mips-*-ecoff*) fmt=ecoff ;;
mips-*-pe*) fmt=coff endian=little em=pe ;;
mips-*-irix6*) fmt=elf ;;
mips-*-irix5*) fmt=elf ;;
mips-*-irix*) fmt=ecoff ;;
mips-*-lnews*) fmt=ecoff em=lnews ;;
mips-*-riscos*) fmt=ecoff ;;
+ mips-*-linux-gnu*)
+ fmt=elf em=tmips
+ AC_DEFINE(MIPS_STABS_ELF, 1,
+ [Use ELF stabs for MIPS, not ECOFF stabs])
+ ;;
+ mips-*-sysv4*MP* | mips-*-gnu*)
+ fmt=elf em=tmips ;;
mips-*-sysv*) fmt=ecoff ;;
- mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
+ mips-*-elf* | mips-*-rtems* | mips-*-openbsd*)
fmt=elf ;;
mips-*-vxworks*) fmt=elf
AC_DEFINE(MIPS_STABS_ELF, 1,
@@ -327,12 +387,12 @@ changequote([,])dnl
ppc-*-netware*) fmt=elf em=ppcnw ;;
ppc-*-vxworks*) fmt=elf ;;
+ sh-*-linux*) fmt=elf em=linux ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
sh-*-rtemself*) fmt=elf ;;
- sh-*-rtemscoff*) fmt=coff ;;
- sh-*-rtems*) fmt=coff ;;
+ sh-*-rtems*) fmt=coff ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
@@ -368,9 +428,13 @@ changequote([,])dnl
;;
strongarm-*-coff) fmt=coff ;;
strongarm-*-elf) fmt=elf ;;
+ xscale-*-coff) fmt=coff ;;
+ xscale-*-elf) fmt=elf ;;
tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
+ tic54x-*-* | c54x*-*-*)
+ fmt=coff bfd_gas=yes need_libm=yes;;
tic80-*-*) fmt=coff ;;
v850-*-*) fmt=elf bfd_gas=yes ;;
@@ -389,6 +453,7 @@ changequote([,])dnl
*-*-aout | *-*-scout)
fmt=aout ;;
+ *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;;
*-*-nindy*)
fmt=bout ;;
*-*-bsd*)
@@ -421,11 +486,13 @@ changequote([,])dnl
arm-*) bfd_gas=yes ;;
# not yet
# i386-aout) bfd_gas=preferred ;;
+ ia64*-*) bfd_gas=yes ;;
mips-*) bfd_gas=yes ;;
ns32k-*) bfd_gas=yes ;;
ppc-*) bfd_gas=yes ;;
sparc-*) bfd_gas=yes ;;
strongarm-*) bfd_gas=yes ;;
+ xscale-*) bfd_gas=yes ;;
*-elf) bfd_gas=yes ;;
*-ecoff) bfd_gas=yes ;;
*-som) bfd_gas=yes ;;
@@ -488,6 +555,11 @@ changequote([,])dnl
fi
;;
+ i386)
+ if test $this_target = $target ; then
+ AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
+ fi
+ ;;
sparc)
if test $this_target = $target ; then
AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
@@ -537,6 +609,9 @@ changequote([,])dnl
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
esac ;;
+ mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
+ # i386-pc-pe-coff != i386-pc-coff.
+ i386-*-pe-coff) ;;
# Uncommenting the next line will turn on support for i386 AOUT
# for the default linux configuration
# i386-*-linux*-elf) emulation="i386elf i386aout" ;;
@@ -544,6 +619,10 @@ changequote([,])dnl
i386-*-aout) emulation="i386aout" ;;
i386-*-coff) emulation="i386coff" ;;
i386-*-elf) emulation="i386elf" ;;
+
+ # Always all formats. The first stated emulation becomes the default.
+ cris-*-*aout*) emulation="crisaout criself" ;;
+ cris-*-*) emulation="criself crisaout" ;;
esac
emulations="$emulations $emulation"
@@ -654,16 +733,16 @@ GAS_UNIQ(emulations)
for em in . $emulations ; do
case $em in
.) continue ;;
- mipsbelf | mipslelf)
+ mipsbelf | mipslelf | mipself)
fmt=elf file=mipself ;;
- mipsbecoff | mipslecoff)
+ mipsbecoff | mipslecoff | mipsecoff)
fmt=ecoff file=mipsecoff ;;
- i386aout)
- fmt=aout file=i386aout ;;
- i386coff)
- fmt=coff file=i386coff ;;
- i386elf)
- fmt=elf file=i386elf ;;
+ *coff)
+ fmt=coff file=$em ;;
+ *aout)
+ fmt=aout file=$em ;;
+ *elf)
+ fmt=elf file=$em ;;
esac
formats="$formats $fmt"
emfiles="$emfiles e-$file.o"
@@ -791,6 +870,14 @@ AC_CHECK_FUNCS(unlink remove, break)
# Some systems don't have sbrk().
AC_CHECK_FUNCS(sbrk)
+# do we need the math library?
+case "${need_libm}" in
+yes)
+ AC_CHECK_LIBM
+ AC_SUBST(LIBM)
+ ;;
+esac
+
# Some non-ANSI preprocessors botch requoting inside strings. That's bad
# enough, but on some of those systems, the assert macro relies on requoting
# working properly!
diff --git a/gnu/usr.bin/binutils/gas/doc/Makefile.in b/gnu/usr.bin/binutils/gas/doc/Makefile.in
index 3c1348cfb3f..c4f63881c6a 100644
--- a/gnu/usr.bin/binutils/gas/doc/Makefile.in
+++ b/gnu/usr.bin/binutils/gas/doc/Makefile.in
@@ -69,9 +69,13 @@ BFDLIB = @BFDLIB@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
GDBINIT = @GDBINIT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -83,6 +87,7 @@ INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LEX = @LEX@
+LIBM = @LIBM@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
@@ -90,14 +95,17 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+STRIP = @STRIP@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
YACC = @YACC@
atof = @atof@
cgen_cpu_prefix = @cgen_cpu_prefix@
@@ -119,6 +127,7 @@ info_TEXINFOS = as.texinfo gasp.texi
CPU_DOCS = \
c-a29k.texi \
+ c-arc.texi \
c-arm.texi \
c-d10v.texi \
c-h8300.texi \
@@ -126,14 +135,17 @@ CPU_DOCS = \
c-hppa.texi \
c-i370.texi \
c-i386.texi \
+ c-i860.texi \
c-i960.texi \
c-m32r.texi \
+ c-m68hc11.texi \
c-m68k.texi \
c-mips.texi \
c-ns32k.texi \
c-pj.texi \
c-sh.texi \
c-sparc.texi \
+ c-tic54x.texi \
c-vax.texi \
c-v850.texi \
c-z8k.texi
diff --git a/gnu/usr.bin/binutils/gas/doc/all.texi b/gnu/usr.bin/binutils/gas/doc/all.texi
index d1058fbacec..719c80a4366 100644
--- a/gnu/usr.bin/binutils/gas/doc/all.texi
+++ b/gnu/usr.bin/binutils/gas/doc/all.texi
@@ -1,4 +1,5 @@
-@c Copyright 1992, 1993, 2000 Free Software Foundation, Inc.
+@c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001
+@c Free Software Foundation, Inc.
@c This file is part of the documentation for the GAS manual
@c Configuration settings for all-inclusive version of manual
@@ -35,14 +36,17 @@
@set HPPA
@set I370
@set I80386
+@set I860
@set I960
@set M32R
+@set M68HC11
@set M680X0
@set MCORE
@set MIPS
@set PJ
@set SH
@set SPARC
+@set C54X
@set V850
@set VAX
@set VXWORKS
diff --git a/gnu/usr.bin/binutils/gas/doc/as.1 b/gnu/usr.bin/binutils/gas/doc/as.1
index 5fc517c7813..0e9d0ce36e3 100644
--- a/gnu/usr.bin/binutils/gas/doc/as.1
+++ b/gnu/usr.bin/binutils/gas/doc/as.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1991, 1992, 1996, 1997, 1998 Free Software Foundation
+.\" Copyright (c) 1991, 1992, 1996, 1997, 1998, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH as 1 "29 March 1996" "cygnus support" "GNU Development Tools"
+.TH as 1 "29 March 1996" "Free Software Foundation" "GNU Development Tools"
.SH NAME
GNU as \- the portable GNU assembler.
@@ -290,19 +290,377 @@ Using as: The GNU Assembler\c
.BR ld "(" 1 ")."
.SH COPYING
-Copyright (c) 1991, 1992 Free Software Foundation, Inc.
+Copyright (c) 1991, 1992, 2000 Free Software Foundation, Inc.
.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+This document is distributed under the terms of the GNU Free
+Documentation License, version 1.1. That license is described in the
+sources for this manual page, but it is not displayed here in order to
+make this manual more consise. Copies of this license can also be
+obtained from: http://www.gnu.org/copyleft/.
+
+\" GNU Free Documentation License
+\" Version 1.1, March 2000
+
+\" Copyright (C) 2000 Free Software Foundation, Inc.
+\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\" Everyone is permitted to copy and distribute verbatim
+\" copies of this license document, but changing it is
+\" not allowed.
+\" .PP
+\" 0. PREAMBLE
+\" .PP
+\" The purpose of this License is to make a manual, textbook, or other
+\" written document "free" in the sense of freedom: to assure everyone
+\" the effective freedom to copy and redistribute it, with or without
+\" modifying it, either commercially or noncommercially. Secondarily,
+\" this License preserves for the author and publisher a way to get
+\" credit for their work, while not being considered responsible for
+\" modifications made by others.
+\" .PP
+\" This License is a kind of "copyleft", which means that derivative
+\" works of the document must themselves be free in the same sense. It
+\" complements the GNU General Public License, which is a copyleft
+\" license designed for free software.
+\" .PP
+\" We have designed this License in order to use it for manuals for free
+\" software, because free software needs free documentation: a free
+\" program should come with manuals providing the same freedoms that the
+\" software does. But this License is not limited to software manuals;
+\" it can be used for any textual work, regardless of subject matter or
+\" whether it is published as a printed book. We recommend this License
+\" principally for works whose purpose is instruction or reference.
+\" .PP
+\" 1. APPLICABILITY AND DEFINITIONS
+\" .PP
+\" This License applies to any manual or other work that contains a
+\" notice placed by the copyright holder saying it can be distributed
+\" under the terms of this License. The "Document", below, refers to any
+\" such manual or work. Any member of the public is a licensee, and is
+\" addressed as "you".
+\" .PP
+\" A "Modified Version" of the Document means any work containing the
+\" Document or a portion of it, either copied verbatim, or with
+\" modifications and/or translated into another language.
+\" .PP
+\" A "Secondary Section" is a named appendix or a front-matter section of
+\" the Document that deals exclusively with the relationship of the
+\" publishers or authors of the Document to the Document's overall subject
+\" (or to related matters) and contains nothing that could fall directly
+\" within that overall subject. (For example, if the Document is in part a
+\" textbook of mathematics, a Secondary Section may not explain any
+\" mathematics.) The relationship could be a matter of historical
+\" connection with the subject or with related matters, or of legal,
+\" commercial, philosophical, ethical or political position regarding
+\" them.
+\" .PP
+\" The "Invariant Sections" are certain Secondary Sections whose titles
+\" are designated, as being those of Invariant Sections, in the notice
+\" that says that the Document is released under this License.
+\" .PP
+\" The "Cover Texts" are certain short passages of text that are listed,
+\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+\" the Document is released under this License.
+\" .PP
+\" A "Transparent" copy of the Document means a machine-readable copy,
+\" represented in a format whose specification is available to the
+\" general public, whose contents can be viewed and edited directly and
+\" straightforwardly with generic text editors or (for images composed of
+\" pixels) generic paint programs or (for drawings) some widely available
+\" drawing editor, and that is suitable for input to text formatters or
+\" for automatic translation to a variety of formats suitable for input
+\" to text formatters. A copy made in an otherwise Transparent file
+\" format whose markup has been designed to thwart or discourage
+\" subsequent modification by readers is not Transparent. A copy that is
+\" not "Transparent" is called "Opaque".
+\" .PP
+\" Examples of suitable formats for Transparent copies include plain
+\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
+\" or XML using a publicly available DTD, and standard-conforming simple
+\" HTML designed for human modification. Opaque formats include
+\" PostScript, PDF, proprietary formats that can be read and edited only
+\" by proprietary word processors, SGML or XML for which the DTD and/or
+\" processing tools are not generally available, and the
+\" machine-generated HTML produced by some word processors for output
+\" purposes only.
+\" .PP
+\" The "Title Page" means, for a printed book, the title page itself,
+\" plus such following pages as are needed to hold, legibly, the material
+\" this License requires to appear in the title page. For works in
+\" formats which do not have any title page as such, "Title Page" means
+\" the text near the most prominent appearance of the work's title,
+\" preceding the beginning of the body of the text.
+\" .PP
+\" 2. VERBATIM COPYING
+\" .PP
+\" You may copy and distribute the Document in any medium, either
+\" commercially or noncommercially, provided that this License, the
+\" copyright notices, and the license notice saying this License applies
+\" to the Document are reproduced in all copies, and that you add no other
+\" conditions whatsoever to those of this License. You may not use
+\" technical measures to obstruct or control the reading or further
+\" copying of the copies you make or distribute. However, you may accept
+\" compensation in exchange for copies. If you distribute a large enough
+\" number of copies you must also follow the conditions in section 3.
+\" .PP
+\" You may also lend copies, under the same conditions stated above, and
+\" you may publicly display copies.
+\" .PP
+\" 3. COPYING IN QUANTITY
+\" .PP
+\" If you publish printed copies of the Document numbering more than 100,
+\" and the Document's license notice requires Cover Texts, you must enclose
+\" the copies in covers that carry, clearly and legibly, all these Cover
+\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+\" the back cover. Both covers must also clearly and legibly identify
+\" you as the publisher of these copies. The front cover must present
+\" the full title with all words of the title equally prominent and
+\" visible. You may add other material on the covers in addition.
+\" Copying with changes limited to the covers, as long as they preserve
+\" the title of the Document and satisfy these conditions, can be treated
+\" as verbatim copying in other respects.
+\" .PP
+\" If the required texts for either cover are too voluminous to fit
+\" legibly, you should put the first ones listed (as many as fit
+\" reasonably) on the actual cover, and continue the rest onto adjacent
+\" pages.
+\" .PP
+\" If you publish or distribute Opaque copies of the Document numbering
+\" more than 100, you must either include a machine-readable Transparent
+\" copy along with each Opaque copy, or state in or with each Opaque copy
+\" a publicly-accessible computer-network location containing a complete
+\" Transparent copy of the Document, free of added material, which the
+\" general network-using public has access to download anonymously at no
+\" charge using public-standard network protocols. If you use the latter
+\" option, you must take reasonably prudent steps, when you begin
+\" distribution of Opaque copies in quantity, to ensure that this
+\" Transparent copy will remain thus accessible at the stated location
+\" until at least one year after the last time you distribute an Opaque
+\" copy (directly or through your agents or retailers) of that edition to
+\" the public.
+\" .PP
+\" It is requested, but not required, that you contact the authors of the
+\" Document well before redistributing any large number of copies, to give
+\" them a chance to provide you with an updated version of the Document.
+\" .PP
+\" 4. MODIFICATIONS
+\" .PP
+\" You may copy and distribute a Modified Version of the Document under
+\" the conditions of sections 2 and 3 above, provided that you release
+\" the Modified Version under precisely this License, with the Modified
+\" Version filling the role of the Document, thus licensing distribution
+\" and modification of the Modified Version to whoever possesses a copy
+\" of it. In addition, you must do these things in the Modified Version:
+\" .PP
+\" A. Use in the Title Page (and on the covers, if any) a title distinct
+\" from that of the Document, and from those of previous versions
+\" (which should, if there were any, be listed in the History section
+\" of the Document). You may use the same title as a previous version
+\" if the original publisher of that version gives permission.
+\" .PP
+\" B. List on the Title Page, as authors, one or more persons or entities
+\" responsible for authorship of the modifications in the Modified
+\" Version, together with at least five of the principal authors of the
+\" Document (all of its principal authors, if it has less than five).
+\" .PP
+\" C. State on the Title page the name of the publisher of the
+\" Modified Version, as the publisher.
+\" .PP
+\" D. Preserve all the copyright notices of the Document.
+\" .PP
+\" E. Add an appropriate copyright notice for your modifications
+\" adjacent to the other copyright notices.
+\" .PP
+\" F. Include, immediately after the copyright notices, a license notice
+\" giving the public permission to use the Modified Version under the
+\" terms of this License, in the form shown in the Addendum below.
+\" Preserve in that license notice the full lists of Invariant Sections
+\" and required Cover Texts given in the Document's license notice.
+\" .PP
+\" H. Include an unaltered copy of this License.
+\" .PP
+\" I. Preserve the section entitled "History", and its title, and add to
+\" it an item stating at least the title, year, new authors, and
+\" publisher of the Modified Version as given on the Title Page. If
+\" there is no section entitled "History" in the Document, create one
+\" stating the title, year, authors, and publisher of the Document as
+\" given on its Title Page, then add an item describing the Modified
+\" Version as stated in the previous sentence.
+\" .PP
+\" J. Preserve the network location, if any, given in the Document for
+\" public access to a Transparent copy of the Document, and likewise
+\" the network locations given in the Document for previous versions
+\" it was based on. These may be placed in the "History" section.
+\" You may omit a network location for a work that was published at
+\" least four years before the Document itself, or if the original
+\" publisher of the version it refers to gives permission.
+\" .PP
+\" K. In any section entitled "Acknowledgements" or "Dedications",
+\" preserve the section's title, and preserve in the section all the
+\" substance and tone of each of the contributor acknowledgements
+\" and/or dedications given therein.
+\" .PP
+\" L. Preserve all the Invariant Sections of the Document,
+\" unaltered in their text and in their titles. Section numbers
+\" or the equivalent are not considered part of the section titles.
+\" .PP
+\" M. Delete any section entitled "Endorsements". Such a section
+\" may not be included in the Modified Version.
+\" .PP
+\" N. Do not retitle any existing section as "Endorsements"
+\" or to conflict in title with any Invariant Section.
+\" .PP
+\" If the Modified Version includes new front-matter sections or
+\" appendices that qualify as Secondary Sections and contain no material
+\" copied from the Document, you may at your option designate some or all
+\" of these sections as invariant. To do this, add their titles to the
+\" list of Invariant Sections in the Modified Version's license notice.
+\" These titles must be distinct from any other section titles.
+\" .PP
+\" You may add a section entitled "Endorsements", provided it contains
+\" nothing but endorsements of your Modified Version by various
+\" parties--for example, statements of peer review or that the text has
+\" been approved by an organization as the authoritative definition of a
+\" standard.
+\" .PP
+\" You may add a passage of up to five words as a Front-Cover Text, and a
+\" passage of up to 25 words as a Back-Cover Text, to the end of the list
+\" of Cover Texts in the Modified Version. Only one passage of
+\" Front-Cover Text and one of Back-Cover Text may be added by (or
+\" through arrangements made by) any one entity. If the Document already
+\" includes a cover text for the same cover, previously added by you or
+\" by arrangement made by the same entity you are acting on behalf of,
+\" you may not add another; but you may replace the old one, on explicit
+\" permission from the previous publisher that added the old one.
+\" .PP
+\" The author(s) and publisher(s) of the Document do not by this License
+\" give permission to use their names for publicity for or to assert or
+\" imply endorsement of any Modified Version.
+\" .PP
+
+\" 5. COMBINING DOCUMENTS
+\" .PP
+\" You may combine the Document with other documents released under this
+\" License, under the terms defined in section 4 above for modified
+\" versions, provided that you include in the combination all of the
+\" Invariant Sections of all of the original documents, unmodified, and
+\" list them all as Invariant Sections of your combined work in its
+\" license notice.
+\" .PP
+\" The combined work need only contain one copy of this License, and
+\" multiple identical Invariant Sections may be replaced with a single
+\" copy. If there are multiple Invariant Sections with the same name but
+\" different contents, make the title of each such section unique by
+\" adding at the end of it, in parentheses, the name of the original
+\" author or publisher of that section if known, or else a unique number.
+\" Make the same adjustment to the section titles in the list of
+\" Invariant Sections in the license notice of the combined work.
+\" .PP
+\" In the combination, you must combine any sections entitled "History"
+\" in the various original documents, forming one section entitled
+\" "History"; likewise combine any sections entitled "Acknowledgements",
+\" and any sections entitled "Dedications". You must delete all sections
+\" entitled "Endorsements."
+\" .PP
+
+\" 6. COLLECTIONS OF DOCUMENTS
+\" .PP
+\" You may make a collection consisting of the Document and other documents
+\" released under this License, and replace the individual copies of this
+\" License in the various documents with a single copy that is included in
+\" the collection, provided that you follow the rules of this License for
+\" verbatim copying of each of the documents in all other respects.
+\" .PP
+\" You may extract a single document from such a collection, and distribute
+\" it individually under this License, provided you insert a copy of this
+\" License into the extracted document, and follow this License in all
+\" other respects regarding verbatim copying of that document.
+\" .PP
+
+\" 7. AGGREGATION WITH INDEPENDENT WORKS
+\" .PP
+\" A compilation of the Document or its derivatives with other separate
+\" and independent documents or works, in or on a volume of a storage or
+\" distribution medium, does not as a whole count as a Modified Version
+\" of the Document, provided no compilation copyright is claimed for the
+\" compilation. Such a compilation is called an "aggregate", and this
+\" License does not apply to the other self-contained works thus compiled
+\" with the Document, on account of their being thus compiled, if they
+\" are not themselves derivative works of the Document.
+\" .PP
+\" If the Cover Text requirement of section 3 is applicable to these
+\" copies of the Document, then if the Document is less than one quarter
+\" of the entire aggregate, the Document's Cover Texts may be placed on
+\" covers that surround only the Document within the aggregate.
+\" Otherwise they must appear on covers around the whole aggregate.
+\" .PP
+
+\" 8. TRANSLATION
+\" .PP
+\" Translation is considered a kind of modification, so you may
+\" distribute translations of the Document under the terms of section 4.
+\" Replacing Invariant Sections with translations requires special
+\" permission from their copyright holders, but you may include
+\" translations of some or all Invariant Sections in addition to the
+\" original versions of these Invariant Sections. You may include a
+\" translation of this License provided that you also include the
+\" original English version of this License. In case of a disagreement
+\" between the translation and the original English version of this
+\" License, the original English version will prevail.
+\" .PP
+
+\" 9. TERMINATION
+\" .PP
+\" You may not copy, modify, sublicense, or distribute the Document except
+\" as expressly provided for under this License. Any other attempt to
+\" copy, modify, sublicense or distribute the Document is void, and will
+\" automatically terminate your rights under this License. However,
+\" parties who have received copies, or rights, from you under this
+\" License will not have their licenses terminated so long as such
+\" parties remain in full compliance.
+\" .PP
+
+\" 10. FUTURE REVISIONS OF THIS LICENSE
+\" .PP
+\" The Free Software Foundation may publish new, revised versions
+\" of the GNU Free Documentation License from time to time. Such new
+\" versions will be similar in spirit to the present version, but may
+\" differ in detail to address new problems or concerns. See
+\" http://www.gnu.org/copyleft/.
+\" .PP
+\" Each version of the License is given a distinguishing version number.
+\" If the Document specifies that a particular numbered version of this
+\" License "or any later version" applies to it, you have the option of
+\" following the terms and conditions either of that specified version or
+\" of any later version that has been published (not as a draft) by the
+\" Free Software Foundation. If the Document does not specify a version
+\" number of this License, you may choose any version ever published (not
+\" as a draft) by the Free Software Foundation.
+\" .PP
+
+\" ADDENDUM: How to use this License for your documents
+\" .PP
+\" To use this License in a document you have written, include a copy of
+\" the License in the document and put the following copyright and
+\" license notices just after the title page:
+\" .PP
+\" Copyright (c) YEAR YOUR NAME.
+\" Permission is granted to copy, distribute and/or
+\" modify this document under the terms of the GNU
+\" Free Documentation License, Version 1.1 or any later
+\" version published by the Free Software Foundation;
+\" with the Invariant Sections being LIST THEIR TITLES,
+\" with the Front-Cover Texts being LIST, and with the
+\" Back-Cover Texts being LIST. A copy of the license
+\" is included in the section entitled "GNU Free
+\" Documentation License".
+\" .PP
+\" If you have no Invariant Sections, write "with no Invariant Sections"
+\" instead of saying which ones are invariant. If you have no
+\" Front-Cover Texts, write "no Front-Cover Texts" instead of
+\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+\" .PP
+\" If your document contains nontrivial examples of program code, we
+\" recommend releasing these examples in parallel under your choice of
+\" free software license, such as the GNU General Public License,
+\" to permit their use in free software.
diff --git a/gnu/usr.bin/binutils/gas/doc/as.texinfo b/gnu/usr.bin/binutils/gas/doc/as.texinfo
index 4ceb10427bf..01b3c500150 100644
--- a/gnu/usr.bin/binutils/gas/doc/as.texinfo
+++ b/gnu/usr.bin/binutils/gas/doc/as.texinfo
@@ -1,5 +1,6 @@
\input texinfo @c -*-Texinfo-*-
-@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+@c 2001
@c Free Software Foundation, Inc.
@c UPDATE!! On future updates--
@c (1) check for new machine-dep cmdline options in
@@ -87,11 +88,14 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the GNU Assembler "@value{AS}".
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
@ignore
Permission is granted to process this file through Tex and print the
@@ -100,13 +104,6 @@ notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
-Permission is granted to copy and distribute modified versions of this manual
-under the conditions for verbatim copying, provided that the entire resulting
-derived work is distributed under the terms of a permission notice identical to
-this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
@end ifinfo
@titlepage
@@ -142,19 +139,15 @@ done.
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
-Permission is granted to copy and distribute modified versions of this manual
-under the conditions for verbatim copying, provided that the entire resulting
-derived work is distributed under the terms of a permission notice identical to
-this one.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
@end titlepage
@ifinfo
@@ -167,6 +160,11 @@ This file is a user guide to the @sc{gnu} assembler @code{@value{AS}} version
This version of the file describes @code{@value{AS}} configured to generate
code for @value{TARGET} architectures.
@end ifclear
+
+This document is distributed under the terms of the GNU Free
+Documentation License. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+
@menu
* Overview:: Overview
* Invoking:: Command-Line Options
@@ -178,6 +176,7 @@ code for @value{TARGET} architectures.
* Machine Dependencies:: Machine Dependent Features
* Reporting Bugs:: Reporting Bugs
* Acknowledgements:: Who Did What
+* GNU Free Documentation License:: GNU Free Documentation License
* Index:: Index
@end menu
@end ifinfo
@@ -205,12 +204,13 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
[ -f ] [ --gstabs ] [ --gdwarf2 ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ]
[ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ]
[ -version ] [ --version ] [ -W ] [ --warn ] [ --fatal-warnings ]
- [ -w ] [ -x ] [ -Z ]
+ [ -w ] [ -x ] [ -Z ] [ --target-help ]
@ifset A29K
@c am29k has no machine-dependent assembler options
@end ifset
@ifset ARC
- [ -mbig-endian | -mlittle-endian ]
+ [ -marc[5|6|7|8] ]
+ [ -EB | -EL ]
@end ifset
@ifset ARM
[ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]60 |
@@ -219,7 +219,7 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
-m[arm]810 | -m[arm]9 | -m[arm]920 | -m[arm]920t | -m[arm]9tdmi |
-mstrongarm | -mstrongarm110 | -mstrongarm1100 ]
[ -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t |
- -m[arm]v5 | -[arm]v5t ]
+ -m[arm]v5 | -[arm]v5t | -[arm]v5te ]
[ -mthumb | -mall ]
[ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ]
[ -EB | -EL ]
@@ -249,6 +249,10 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
-Av8plus | -Av8plusa | -Av9 | -Av9a ]
[ -xarch=v8plus | -xarch=v8plusa ] [ -bump ] [ -32 | -64 ]
@end ifset
+@ifset TIC54X
+ [ -mcpu=54[123589] | -mcpu=54[56]lp ] [ -mfar-mode | -mf ]
+ [ -merrors-to-file <filename> | -me <filename> ]
+@end ifset
@ifset Z8000
@c Z8000 has no machine-dependent assembler options
@end ifset
@@ -257,15 +261,26 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
[ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ]
[ -b ] [ -no-relax ]
@end ifset
+@ifset M32R
+ [ --m32rx | --[no-]warn-explicit-parallel-conflicts | --W[n]p ]
+@end ifset
@ifset M680X0
[ -l ] [ -m68000 | -m68010 | -m68020 | ... ]
@end ifset
@ifset MCORE
[ -jsri2bsr ] [ -sifilter ] [ -relax ]
+ [ -mcpu=[210|340] ]
+@end ifset
+@ifset M68HC11
+ [ -m68hc11 | -m68hc12 ]
+ [ --force-long-branchs ] [ --short-branchs ] [ --strict-direct-mode ]
+ [ --print-insn-syntax ] [ --print-opcodes ] [ --generate-example ]
@end ifset
@ifset MIPS
[ -nocpp ] [ -EL ] [ -EB ] [ -G @var{num} ] [ -mcpu=@var{CPU} ]
- [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -m4650 ] [ -no-m4650 ]
+ [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -mips4 ] [ -mips5 ]
+ [ -mips32 ] [ -mips64 ]
+ [ -m4650 ] [ -no-m4650 ]
[ --trap ] [ --break ]
[ --emulation=@var{name} ]
@end ifset
@@ -325,11 +340,15 @@ may help debugging assembler code, if the debugger can handle it.
@item --gdwarf2
Generate DWARF2 debugging information for each assembler line. This
-may help debugging assembler code, if the debugger can handle it.
+may help debugging assembler code, if the debugger can handle it. Note - this
+option is only supported by some targets, not all of them.
@item --help
Print a summary of the command line options and exit.
+@item --target-help
+Print a summary of all target specific options and exit.
+
@item -I @var{dir}
Add directory @var{dir} to the search list for @code{.include} directives.
@@ -399,17 +418,10 @@ The following options are available when @value{AS} is configured for
an ARC processor.
@table @code
-
-@cindex ARC endianness
-@cindex endianness, ARC
-@cindex big endian output, ARC
-@item -mbig-endian
-Generate ``big endian'' format output.
-
-@cindex little endian output, ARC
-@item -mlittle-endian
-Generate ``little endian'' format output.
-
+@item -marc[5|6|7|8]
+This option selects the core processor variant.
+@item -EB | -EL
+Select either big-endian (-EB) or little-endian (-EL) output.
@end table
@end ifset
@@ -425,7 +437,7 @@ Specify which ARM architecture variant is used by the target.
@item -mthumb | -mall
Enable or disable Thumb only instruction decoding.
@item -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu
-Select which Floating Point architcture is the target.
+Select which Floating Point architecture is the target.
@item -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi
Select which procedure calling convention is in use.
@item -EB | -EL
@@ -486,6 +498,26 @@ error if necessary.
@end table
@end ifset
+@ifset M32R
+The following options are available when @value{AS} is configured for the
+Mitsubishi M32R series.
+
+@table @code
+
+@item --m32rx
+Specify which processor in the M32R family is the target. The default
+is normally the M32R, but this option changes it to the M32RX.
+
+@item --warn-explicit-parallel-conflicts or --Wp
+Produce warning messages when questionable parallel constructs are
+encountered.
+
+@item --no-warn-explicit-parallel-conflicts or --Wnp
+Do not produce warning messages when questionable parallel constructs are
+encountered.
+
+@end table
+@end ifset
@ifset M680X0
The following options are available when @value{AS} is configured for the
@@ -534,6 +566,41 @@ Generate ``little endian'' format output.
@end table
@end ifset
+@ifset M68HC11
+The following options are available when @value{AS} is configured for the
+Motorola 68HC11 or 68HC12 series.
+
+@table @code
+
+@item -m68hc11 | -m68hc12
+Specify what processor is the target. The default is
+defined by the configuration option when building the assembler.
+
+@item --force-long-branchs
+Relative branches are turned into absolute ones. This concerns
+conditional branches, unconditional branches and branches to a
+sub routine.
+
+@item -S | --short-branchs
+Do not turn relative branchs into absolute ones
+when the offset is out of range.
+
+@item --strict-direct-mode
+Do not turn the direct addressing mode into extended addressing mode
+when the instruction does not support direct addressing mode.
+
+@item --print-insn-syntax
+Print the syntax of instruction in case of error.
+
+@item --print-opcodes
+print the list of instructions with syntax and then exit.
+
+@item --generate-example
+print an example of instruction for each possible instruction and then exit.
+This option is only useful for testing @code{@value{AS}}.
+
+@end table
+@end ifset
@ifset SPARC
The following options are available when @code{@value{AS}} is configured
@@ -559,6 +626,22 @@ Warn when the assembler switches to another architecture.
@end table
@end ifset
+@ifset TIC54X
+The following options are available when @value{AS} is configured for the 'c54x
+architecture.
+
+@table @code
+@item -mfar-mode
+Enable extended addressing mode. All addresses and relocations will assume
+extended addressing (usually 23 bits).
+@item -mcpu=@var{CPU_VERSION}
+Sets the CPU version being compiled for.
+@item -merrors-to-file @var{FILENAME}
+Redirect error output to a file, for broken systems which don't support such
+behaviour in the shell.
+@end table
+@end ifset
+
@ifset MIPS
The following options are available when @value{AS} is configured for
a MIPS processor.
@@ -583,10 +666,15 @@ Generate ``little endian'' format output.
@item -mips1
@itemx -mips2
@itemx -mips3
+@itemx -mips4
+@itemx -mips32
Generate code for a particular MIPS Instruction Set Architecture level.
@samp{-mips1} corresponds to the @sc{r2000} and @sc{r3000} processors,
@samp{-mips2} to the @sc{r6000} processor, and @samp{-mips3} to the @sc{r4000}
processor.
+@samp{-mips5}, @samp{-mips32}, and @samp{-mips64} correspond
+to generic @sc{MIPS V}, @sc{MIPS32}, and @sc{MIPS64} ISA
+processors, respectively.
@item -m4650
@itemx -no-m4650
@@ -596,8 +684,9 @@ instructions around accesses to the @samp{HI} and @samp{LO} registers.
@samp{-no-m4650} turns off this option.
@item -mcpu=@var{CPU}
-Generate code for a particular MIPS cpu. This has little effect on the
-assembler, but it is passed by @code{@value{GCC}}.
+Generate code for a particular MIPS cpu. It is exactly equivalent to
+@samp{-m@var{cpu}}, except that there are more value of @var{cpu}
+understood.
@cindex emulation
@item --emulation=@var{name}
@@ -654,11 +743,20 @@ The command line option @samp{-nojsri2bsr} can be used to disable it.
@item -sifilter
@itemx -nosifilter
Enable or disable the silicon filter behaviour. By default this is disabled.
-The default can be overidden by the @samp{-sifilter} command line option.
+The default can be overridden by the @samp{-sifilter} command line option.
@item -relax
Alter jump instructions for long displacements.
+@item -mcpu=[210|340]
+Select the cpu type on the target hardware. This controls which instructions
+can be assembled.
+
+@item -EB
+Assemble for a big endian target.
+
+@item -EL
+Assemble for a little endian target.
@end table
@end ifset
@@ -933,7 +1031,7 @@ information for the debugger.
@node Errors
@section Error and Warning Messages
-@cindex error messsages
+@cindex error messages
@cindex warning messages
@cindex messages from assembler
@code{@value{AS}} may write warnings and error messages to the standard error
@@ -1564,6 +1662,9 @@ is considered a comment and is ignored. The line comment character is
@ifset HPPA
@samp{;} for the HPPA;
@end ifset
+@ifset I80386
+@samp{#} on the i386 and x86-64;
+@end ifset
@ifset I960
@samp{#} on the i960;
@end ifset
@@ -1582,6 +1683,9 @@ is considered a comment and is ignored. The line comment character is
@ifset M680X0
@samp{|} on the 680x0;
@end ifset
+@ifset M68HC11
+@samp{#} on the 68HC11 and 68HC12;
+@end ifset
@ifset VAX
@samp{#} on the Vax;
@end ifset
@@ -1592,7 +1696,7 @@ is considered a comment and is ignored. The line comment character is
@samp{#} on the V850;
@end ifset
see @ref{Machine Dependencies}. @refill
-@c FIXME What about i386, m88k, i860?
+@c FIXME What about m88k, i860?
@ifset GENERIC
On some machines there are two different line comment characters. One
@@ -2297,7 +2401,7 @@ in the data section.
@cindex bss section
@item bss section
This section contains zeroed bytes when your program begins running. It
-is used to hold unitialized variables or common storage. The length of
+is used to hold uninitialized variables or common storage. The length of
each partial program's bss section is important, but because it starts
out containing zeroed bytes there is no need to store explicit zero
bytes in the object file. The bss section was invented to eliminate
@@ -3033,7 +3137,7 @@ Intermediate precedence
@end table
@item
-Lowest Precedence
+Low Precedence
@table @code
@cindex addition, permitted arguments
@@ -3053,6 +3157,41 @@ result has the section of the left argument.
If both arguments are in the same section, the result is absolute.
You may not subtract arguments from different sections.
@c FIXME is there still something useful to say about undefined - undefined ?
+
+@cindex comparison expressions
+@cindex expressions, comparison
+@item ==
+@dfn{Is Equal To}
+@item <>
+@dfn{Is Not Equal To}
+@item <
+@dfn{Is Less Than}
+@itemx >
+@dfn{Is Greater Than}
+@itemx >=
+@dfn{Is Greater Than Or Equal To}
+@itemx <=
+@dfn{Is Less Than Or Equal To}
+
+The comparison operators can be used as infix operators. A true results has a
+value of -1 whereas a false result has a value of 0. Note, these operators
+perform signed comparisons.
+@end table
+
+@item Lowest Precedence
+
+@table @code
+@item &&
+@dfn{Logical And}.
+
+@item ||
+@dfn{Logical Or}.
+
+These two logical operations can be used to combine the results of sub
+expressions. Note, unlike the comparison operators a true result returns a
+value of 1 but a false results does still return 0. Also note that the logical
+or operator has a slightly lower precedence than logical and.
+
@end table
@end enumerate
@@ -3128,11 +3267,19 @@ Some machine configurations provide additional directives.
* Float:: @code{.float @var{flonums}}
* Func:: @code{.func}
* Global:: @code{.global @var{symbol}}, @code{.globl @var{symbol}}
+@ifset ELF
+* Hidden:: @code{.hidden @var{names}}
+@end ifset
+
* hword:: @code{.hword @var{expressions}}
* Ident:: @code{.ident}
* If:: @code{.if @var{absolute expression}}
* Include:: @code{.include "@var{file}"}
* Int:: @code{.int @var{expressions}}
+@ifset ELF
+* Internal:: @code{.internal @var{names}}
+@end ifset
+
* Irp:: @code{.irp @var{symbol},@var{values}}@dots{}
* Irpc:: @code{.irpc @var{symbol},@var{values}}@dots{}
* Lcomm:: @code{.lcomm @var{symbol} , @var{length}}
@@ -3151,14 +3298,26 @@ Some machine configurations provide additional directives.
* Macro:: @code{.macro @var{name} @var{args}}@dots{}
* MRI:: @code{.mri @var{val}}
-
* Nolist:: @code{.nolist}
* Octa:: @code{.octa @var{bignums}}
* Org:: @code{.org @var{new-lc} , @var{fill}}
* P2align:: @code{.p2align @var{abs-expr} , @var{abs-expr}}
+@ifset ELF
+* PopSection:: @code{.popsection}
+* Previous:: @code{.previous}
+@end ifset
+
* Print:: @code{.print @var{string}}
+@ifset ELF
+* Protected:: @code{.protected @var{names}}
+@end ifset
+
* Psize:: @code{.psize @var{lines}, @var{columns}}
* Purgem:: @code{.purgem @var{name}}
+@ifset ELF
+* PushSection:: @code{.pushsection @var{name}}
+@end ifset
+
* Quad:: @code{.quad @var{bignums}}
* Rept:: @code{.rept @var{count}}
* Sbttl:: @code{.sbttl "@var{subheading}"}
@@ -3170,10 +3329,7 @@ Some machine configurations provide additional directives.
* Set:: @code{.set @var{symbol}, @var{expression}}
* Short:: @code{.short @var{expressions}}
* Single:: @code{.single @var{flonums}}
-@ifset COFF
-* Size:: @code{.size}
-@end ifset
-
+* Size:: @code{.size [@var{name} , @var{expression}]}
* Skip:: @code{.skip @var{size} , @var{fill}}
* Sleb128:: @code{.sleb128 @var{expressions}}
* Space:: @code{.space @var{size} , @var{fill}}
@@ -3184,23 +3340,29 @@ Some machine configurations provide additional directives.
* String:: @code{.string "@var{str}"}
* Struct:: @code{.struct @var{expression}}
@ifset ELF
+* SubSection:: @code{.subsection}
* Symver:: @code{.symver @var{name},@var{name2@@nodename}}
@end ifset
+
@ifset COFF
* Tag:: @code{.tag @var{structname}}
@end ifset
* Text:: @code{.text @var{subsection}}
* Title:: @code{.title "@var{heading}"}
+* Type:: @code{.type <@var{int} | @var{name} , @var{type description}>}
+* Uleb128:: @code{.uleb128 @var{expressions}}
@ifset COFF
-* Type:: @code{.type @var{int}}
* Val:: @code{.val @var{addr}}
@end ifset
+
@ifset ELF
-* Visibility:: @code{.internal @var{name}, .hidden @var{name}, .protected @var{name}}
+* Version:: @code{.version "@var{string}"}
+* VTableEntry:: @code{.vtable_entry @var{table}, @var{offset}}
+* VTableInherit:: @code{.vtable_inherit @var{child}, @var{parent}}
+* Weak:: @code{.weak @var{names}}
@end ifset
-* Uleb128:: @code{.uleb128 @var{expressions}}
* Word:: @code{.word @var{expressions}}
* Deprecated:: Deprecated Directives
@end menu
@@ -3658,6 +3820,22 @@ partial programs. You may need the HPPA-only @code{.EXPORT} directive as well.
@xref{HPPA Directives,, HPPA Assembler Directives}.
@end ifset
+@ifset ELF
+@node Hidden
+@section @code{.hidden @var{names}}
+
+@cindex @code{.hidden} directive
+@cindex Visibility
+This one of the ELF visibility directives. The other two are
+@code{.internal} (@pxref{Internal,,@code{.internal}}) and
+@code{.protected} (@pxref{Protected,,@code{.protected}}).
+
+This directive overrides the named symbols default visibility (which is set by
+their binding: local, global or weak). The directive sets the visibility to
+@code{hidden} which means that the symbols are not visible to other components.
+Such symbols are always considered to be @code{protected} as well.
+@end ifset
+
@node hword
@section @code{.hword @var{expressions}}
@@ -3800,6 +3978,23 @@ integers. On the H8/300H and the Hitachi SH, however, @code{.int} emits
@end ifset
@end ifclear
+@ifset ELF
+@node Internal
+@section @code{.internal @var{names}}
+
+@cindex @code{.internal} directive
+@cindex Visibility
+This one of the ELF visibility directives. The other two are
+@code{.hidden} (@pxref{Hidden,,@code{.hidden}}) and
+@code{.protected} (@pxref{Protected,,@code{.protected}}).
+
+This directive overrides the named symbols default visibility (which is set by
+their binding: local, global or weak). The directive sets the visibility to
+@code{internal} which means that the symbols are considered to be @code{hidden}
+(ie not visible to other components), and that some extra, processor specific
+processing must also be performed upon the symbols as well.
+@end ifset
+
@node Irp
@section @code{.irp @var{symbol},@var{values}}@dots{}
@@ -4227,6 +4422,42 @@ filled in with the value 0x368d (the exact placement of the bytes depends upon
the endianness of the processor). If it skips 1 or 3 bytes, the fill value is
undefined.
+@ifset ELF
+@node Previous
+@section @code{.previous}
+
+@cindex @code{.previous} directive
+@cindex Section Stack
+This is one of the ELF section stack manipulation directives. The others are
+@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}),
+@code{.pushsection} (@pxref{PushSection}), and @code{.popsection}
+(@pxref{PopSection}).
+
+This directive swaps the current section (and subsection) with most recently
+referenced section (and subsection) prior to this one. Multiple
+@code{.previous} directives in a row will flip between two sections (and their
+subsections).
+
+In terms of the section stack, this directive swaps the current section with
+the top section on the section stack.
+@end ifset
+
+@ifset ELF
+@node PopSection
+@section @code{.popsection}
+
+@cindex @code{.popsection} directive
+@cindex Section Stack
+This is one of the ELF section stack manipulation directives. The others are
+@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}),
+@code{.pushsection} (@pxref{PushSection}), and @code{.previous}
+(@pxref{Previous}).
+
+This directive replaces the current section (and subsection) with the top
+section (and subsection) on the section stack. This section is popped off the
+stack.
+@end ifset
+
@node Print
@section @code{.print @var{string}}
@@ -4234,6 +4465,23 @@ undefined.
@code{@value{AS}} will print @var{string} on the standard output during
assembly. You must put @var{string} in double quotes.
+@ifset ELF
+@node Protected
+@section @code{.protected @var{names}}
+
+@cindex @code{.protected} directive
+@cindex Visibility
+This one of the ELF visibility directives. The other two are
+@code{.hidden} (@pxref{Hidden}) and @code{.internal} (@pxref{Internal}).
+
+This directive overrides the named symbols default visibility (which is set by
+their binding: local, global or weak). The directive sets the visibility to
+@code{protected} which means that any references to the symbols from within the
+components that defines them must be resolved to the definition in that
+component, even if a definition in another component would normally preempt
+this.
+@end ifset
+
@node Psize
@section @code{.psize @var{lines} , @var{columns}}
@@ -4261,6 +4509,22 @@ those explicitly specified with @code{.eject}.
Undefine the macro @var{name}, so that later uses of the string will not be
expanded. @xref{Macro}.
+@ifset ELF
+@node PushSection
+@section @code{.pushsection @var{name} , @var{subsection}}
+
+@cindex @code{.pushsection} directive
+@cindex Section Stack
+This is one of the ELF section stack manipulation directives. The others are
+@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}),
+@code{.popsection} (@pxref{PopSection}), and @code{.previous}
+(@pxref{Previous}).
+
+This directive is a synonym for @code{.section}. It pushes the current section
+(and subsection) onto the top of the section stack, and then replaces the
+current section and subsection with @code{name} and @code{subsection}.
+@end ifset
+
@node Quad
@section @code{.quad @var{bignums}}
@@ -4338,7 +4602,7 @@ accepts this directive but ignores it.
@end ifset
@node Section
-@section @code{.section @var{name}}
+@section @code{.section @var{name}} (COFF version)
@cindex @code{section} directive
@cindex named section
@@ -4349,9 +4613,9 @@ This directive is only supported for targets that actually support arbitrarily
named sections; on @code{a.out} targets, for example, it is not accepted, even
with a standard @code{a.out} section name.
-@ifset COFF
For COFF targets, the @code{.section} directive is used in one of the following
ways:
+
@smallexample
.section @var{name}[, "@var{flags}"]
.section @var{name}[, @var{subsegment}]
@@ -4382,15 +4646,28 @@ loaded and writable.
If the optional argument to the @code{.section} directive is not quoted, it is
taken as a subsegment number (@pxref{Sub-Sections}).
-@end ifset
+
+@section @code{.section @var{name}} (ELF version)
+
+@cindex @code{section} directive
+@cindex named section
@ifset ELF
+@cindex Section Stack
+This is one of the ELF section stack manipulation directives. The others are
+@code{.subsection} (@pxref{SubSection}), @code{.pushsection}
+(@pxref{PushSection}), @code{.popsection} (@pxref{PopSection}), and
+@code{.previous} (@pxref{Previous}).
+@end ifset
+
For ELF targets, the @code{.section} directive is used like this:
+
@smallexample
-.section @var{name}[, "@var{flags}"[, @@@var{type}]]
+.section @var{name} [, "@var{flags}"[, @@@var{type}]]
@end smallexample
+
The optional @var{flags} argument is a quoted string which may contain any
-combintion of the following characters:
+combination of the following characters:
@table @code
@item a
section is allocatable
@@ -4415,9 +4692,11 @@ executable. The section will contain data.
For ELF targets, the assembler supports another type of @code{.section}
directive for compatibility with the Solaris assembler:
+
@smallexample
.section "@var{name}"[, @var{flags}...]
@end smallexample
+
Note that the section name is quoted. There may be a sequence of comma
separated flags:
@table @code
@@ -4428,7 +4707,11 @@ section is writable
@item #execinstr
section is executable
@end table
-@end ifset
+
+This directive replaces the current section and subsection. The replaced
+section and subsection are pushed onto the section stack. See the contents of
+the gas testsuite directory @code{gas/testsuite/gas/elf} for some examples of
+how this directive and the other section stack directives work.
@node Set
@section @code{.set @var{symbol}, @var{expression}}
@@ -4489,21 +4772,27 @@ numbers in @sc{ieee} format.
@end ifset
@end ifclear
-@ifset COFF
@node Size
-@section @code{.size}
+@section @code{.size} (COFF version)
@cindex @code{size} directive
This directive is generated by compilers to include auxiliary debugging
information in the symbol table. It is only permitted inside
@code{.def}/@code{.endef} pairs.
-@ifset BOUT
+@ifset BOUT
@samp{.size} is only meaningful when generating COFF format output; when
@code{@value{AS}} is generating @code{b.out}, it accepts this directive but
ignores it.
@end ifset
-@end ifset
+
+@section @code{.size @var{name} , @var{expression}} (ELF version)
+@cindex @code{size} directive
+
+This directive is used to set the size associated with a symbol @var{name}.
+The size in bytes is computed from @var{expression} which can make use of label
+arithmetic. This directive is typically used to set the size of function
+symbols.
@node Sleb128
@section @code{.sleb128 @var{expressions}}
@@ -4658,6 +4947,22 @@ use a @code{.section} directive of some sort to change to some other section
before further assembly.
@ifset ELF
+@node SubSection
+@section @code{.subsection @var{name}}
+
+@cindex @code{.subsection} directive
+@cindex Section Stack
+This is one of the ELF section stack manipulation directives. The others are
+@code{.section} (@pxref{Section}), @code{.pushsection} (@pxref{PushSection}),
+@code{.popsection} (@pxref{PopSection}), and @code{.previous}
+(@pxref{Previous}).
+
+This directive replaces the current subsection with @code{name}. The current
+section is not changed. The replaced subsection is put onto the section stack
+in place of the then current top of stack subsection.
+@end ifset
+
+@ifset ELF
@node Symver
@section @code{.symver}
@cindex @code{symver} directive
@@ -4670,12 +4975,12 @@ There are cases where it may make sense to use this in objects to be bound
into an application itself so as to override a versioned symbol from a
shared library.
-For ELF targets, the @code{.symver} directive is used like this:
+For ELF targets, the @code{.symver} directive can be used like this:
@smallexample
.symver @var{name}, @var{name2@@nodename}
@end smallexample
-In this case, the symbol @var{name} must exist and be defined within the file
-being assembled. The @code{.versym} directive effectively creates a symbol
+If the symbol @var{name} is defined within the file
+being assembled, the @code{.symver} directive effectively creates a symbol
alias with the name @var{name2@@nodename}, and in fact the main reason that we
just don't try and create a regular alias is that the @var{@@} character isn't
permitted in symbol names. The @var{name2} part of the name is the actual name
@@ -4688,6 +4993,29 @@ the name of a node specified in the version script supplied to the linker when
building a shared library. If you are attempting to override a versioned
symbol from a shared library, then @var{nodename} should correspond to the
nodename of the symbol you are trying to override.
+
+If the symbol @var{name} is not defined within the file being assembled, all
+references to @var{name} will be changed to @var{name2@@nodename}. If no
+reference to @var{name} is made, @var{name2@@nodename} will be removed from the
+symbol table.
+
+Another usage of the @code{.symver} directive is:
+@smallexample
+.symver @var{name}, @var{name2@@@@nodename}
+@end smallexample
+In this case, the symbol @var{name} must exist and be defined within
+the file being assembled. It is similar to @var{name2@@nodename}. The
+difference is @var{name2@@@@nodename} will also be used to resolve
+references to @var{name2} by the linker.
+
+The third usage of the @code{.symver} directive is:
+@smallexample
+.symver @var{name}, @var{name2@@@@@@nodename}
+@end smallexample
+When @var{name} is not defined within the
+file being assembled, it is treated as @var{name2@@nodename}. When
+@var{name} is defined within the file being assembled, the symbol
+name, @var{name}, will be changed to @var{name2@@@@nodename}.
@end ifset
@ifset COFF
@@ -4729,22 +5057,55 @@ source file name and pagenumber) when generating assembly listings.
This directive affects subsequent pages, as well as the current page if
it appears within ten lines of the top of a page.
-@ifset COFF
@node Type
-@section @code{.type @var{int}}
+@section @code{.type @var{int}} (COFF version)
@cindex COFF symbol type
@cindex symbol type, COFF
@cindex @code{type} directive
This directive, permitted only within @code{.def}/@code{.endef} pairs,
records the integer @var{int} as the type attribute of a symbol table entry.
-@ifset BOUT
+@ifset BOUT
@samp{.type} is associated only with COFF format output; when
@code{@value{AS}} is configured for @code{b.out} output, it accepts this
directive but ignores it.
@end ifset
-@end ifset
+
+@section @code{.type @var{name} , @var{type description}} (ELF version)
+
+@cindex ELF symbol type
+@cindex symbol type, ELF
+@cindex @code{type} directive
+This directive is used to set the type of symbol @var{name} to be either a
+function symbol or an object symbol. There are five different syntaxes
+supported for the @var{type description} field, in order to provide
+compatibility with various other assemblers. The syntaxes supported are:
+
+@smallexample
+ .type <name>,#function
+ .type <name>,#object
+
+ .type <name>,@@function
+ .type <name>,@@object
+
+ .type <name>,%function
+ .type <name>,%object
+
+ .type <name>,"function"
+ .type <name>,"object"
+
+ .type <name> STT_FUNCTION
+ .type <name> STT_OBJECT
+@end smallexample
+
+@node Uleb128
+@section @code{.uleb128 @var{expressions}}
+
+@cindex @code{uleb128} directive
+@var{uleb128} stands for ``unsigned little endian base 128.'' This is a
+compact, variable length representation of numbers used by the DWARF
+symbolic debugging format. @xref{Sleb128,@code{.sleb128}}.
@ifset COFF
@node Val
@@ -4763,46 +5124,40 @@ configured for @code{b.out}, it accepts this directive but ignores it.
@end ifset
@end ifset
-@node Uleb128
-@section @code{.uleb128 @var{expressions}}
-
-@cindex @code{uleb128} directive
-@var{uleb128} stands for ``unsigned little endian base 128.'' This is a
-compact, variable length representation of numbers used by the DWARF
-symbolic debugging format. @xref{Sleb128,@code{.sleb128}}.
-
@ifset ELF
-@node Visibility
-@section @code{.internal}, @code{.hidden}, @code{.protected}
-@cindex @code{internal} directive
-@cindex @code{hidden} directive
-@cindex @code{protected} directive
-@cindex symbol visibility
+@node Version
+@section @code{.version "@var{string}"}
-These directives can be used to set the visibility of a specified symbol. By
-default a symbol's visibility is set by its binding (local, global or weak),
-but these directives can be used to override that.
+@cindex @code{.version}
+This directive creates a @code{.note} section and places into it an ELF
+formatted note of type NT_VERSION. The note's name is set to @code{string}.
+@end ifset
-A visibility of @code{protected} means that any references to the symbol from
-within the component that defines the symbol must be resolved to the definition
-in that component, even if a definition in another component would normally
-preempt this.
+@ifset ELF
+@node VTableEntry
+@section @code{.vtable_entry @var{table}, @var{offset}}
-A visibility of @code{hidden} means that the symbol is not visible to other
-components. Such a symbol is always considered to be protected as well.
+@cindex @code{.vtable_entry}
+This directive finds or creates a symbol @code{table} and creates a
+@code{VTABLE_ENTRY} relocation for it with an addend of @code{offset}.
-A visibility of @code{internal} is the same as a visibility of @code{hidden},
-except that some extra, processor specific processing must also be performed
-upon the symbol.
+@node VTableInherit
+@section @code{.vtable_inherit @var{child}, @var{parent}}
-For ELF targets, the directives are used like this:
+@cindex @code{.vtable_inherit}
+This directive finds the symbol @code{child} and finds or creates the symbol
+@code{parent} and then creates a @code{VTABLE_INHERIT} relocation for the
+parent whose addend is the value of the child symbol. As a special case the
+parent name of @code{0} is treated as refering the @code{*ABS*} section.
+@end ifset
-@smallexample
-.internal @var{name}
-.hidden @var{name}
-.protected @var{name}
-@end smallexample
+@ifset ELF
+@node Weak
+@section @code{.weak @var{names}}
+@cindex @code{.weak}
+This directive sets the weak attribute on the comma separated list of symbol
+@code{names}. If the symbols do not already exist, they will be created.
@end ifset
@node Word
@@ -4842,7 +5197,7 @@ interest to you does 32-bit addressing (or doesn't require it;
@end ifset
In order to assemble compiler output into something that works,
-@code{@value{AS}} occasionlly does strange things to @samp{.word} directives.
+@code{@value{AS}} occasionally does strange things to @samp{.word} directives.
Directives of the form @samp{.word sym1-sym2} are often emitted by
compilers as part of jump tables. Therefore, when @code{@value{AS}} assembles a
directive of the form @samp{.word sym1-sym2}, and the difference between
@@ -4929,14 +5284,23 @@ subject, see the hardware manufacturer's manual.
* ESA/390-Dependent:: IBM ESA/390 Dependent Features
@end ifset
@ifset I80386
-* i386-Dependent:: Intel 80386 Dependent Features
+* i386-Dependent:: Intel 80386 and AMD x86-64 Dependent Features
+@end ifset
+@ifset I860
+* i860-Dependent:: Intel 80860 Dependent Features
@end ifset
@ifset I960
* i960-Dependent:: Intel 80960 Dependent Features
@end ifset
+@ifset M32R
+* M32R-Dependent:: M32R Dependent Features
+@end ifset
@ifset M680X0
* M68K-Dependent:: M680x0 Dependent Features
@end ifset
+@ifset M68HC11
+* M68HC11-Dependent:: M68HC11 and 68HC12 Dependent Features
+@end ifset
@ifset MIPS
* MIPS-Dependent:: MIPS Dependent Features
@end ifset
@@ -4949,6 +5313,9 @@ subject, see the hardware manufacturer's manual.
@ifset SPARC
* Sparc-Dependent:: SPARC Dependent Features
@end ifset
+@ifset TIC54X
+* TIC54X-Dependent:: TI TMS320C54x Dependent Features
+@end ifset
@ifset V850
* V850-Dependent:: V850 Dependent Features
@end ifset
@@ -4972,80 +5339,7 @@ subject, see the hardware manufacturer's manual.
@c in both conditional blocks.
@ifset ARC
-@ifset GENERIC
-@page
-@node ARC-Dependent
-@chapter ARC Dependent Features
-@end ifset
-@ifclear GENERIC
-@node Machine Dependencies
-@chapter ARC Dependent Features
-@end ifclear
-
-@cindex ARC support
-@menu
-* ARC-Opts:: Options
-* ARC-Float:: Floating Point
-* ARC-Directives:: Sparc Machine Directives
-@end menu
-
-@node ARC-Opts
-@section Options
-
-@cindex options for ARC
-@cindex ARC options
-@cindex architectures, ARC
-@cindex ARC architectures
-The ARC chip family includes several successive levels (or other
-variants) of chip, using the same core instruction set, but including
-a few additional instructions at each level.
-
-By default, @code{@value{AS}} assumes the core instruction set (ARC
-base). The @code{.cpu} pseudo-op is intended to be used to select
-the variant.
-
-@table @code
-@cindex @code{-mbig-endian} option (ARC)
-@cindex @code{-mlittle-endian} option (ARC)
-@cindex ARC big-endian output
-@cindex ARC little-endian output
-@cindex big-endian output, ARC
-@cindex little-endian output, ARC
-@item -mbig-endian
-@itemx -mlittle-endian
-Any @sc{arc} configuration of @code{@value{AS}} can select big-endian or
-little-endian output at run time (unlike most other @sc{gnu} development
-tools, which must be configured for one or the other). Use
-@samp{-mbig-endian} to select big-endian output, and @samp{-mlittle-endian}
-for little-endian.
-@end table
-
-@node ARC-Float
-@section Floating Point
-
-@cindex floating point, ARC (@sc{ieee})
-@cindex ARC floating point (@sc{ieee})
-The ARC cpu family currently does not have hardware floating point
-support. Software floating point support is provided by @code{GCC}
-and uses @sc{ieee} floating-point numbers.
-
-@node ARC-Directives
-@section ARC Machine Directives
-
-@cindex ARC machine directives
-@cindex machine directives, ARC
-The ARC version of @code{@value{AS}} supports the following additional
-machine directives:
-
-@table @code
-@item .cpu
-@cindex @code{cpu} directive, SPARC
-This must be followed by the desired cpu.
-The ARC is intended to be customizable, @code{.cpu} is used to
-select the desired variant [though currently there are none].
-
-@end table
-
+@include c-arc.texi
@end ifset
@ifset A29K
@@ -5103,15 +5397,26 @@ family.
@include c-i386.texi
@end ifset
+@ifset I860
+@include c-i860.texi
+@end ifset
+
@ifset I960
@include c-i960.texi
@end ifset
+@ifset M32R
+@include c-m32r.texi
+@end ifset
@ifset M680X0
@include c-m68k.texi
@end ifset
+@ifset M68HC11
+@include c-m68hc11.texi
+@end ifset
+
@ifset MIPS
@include c-mips.texi
@end ifset
@@ -5132,6 +5437,10 @@ family.
@include c-sparc.texi
@end ifset
+@ifset TIC54X
+@include c-tic54x.texi
+@end ifset
+
@ifset Z8000
@include c-z8k.texi
@end ifset
@@ -5212,7 +5521,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
In any event, we also recommend that you send bug reports for @code{@value{AS}}
-to @samp{bug-gnu-utils@@gnu.org}.
+to @samp{bug-binutils@@gnu.org}.
The fundamental principle of reporting bugs usefully is this:
@strong{report all the facts}. If you are not sure whether to state a
@@ -5435,6 +5744,9 @@ Linas Vepstas added GAS support for the ESA/390 "IBM 370" architecture.
Richard Henderson rewrote the Alpha assembler. Klaus Kaempf wrote GAS and BFD
support for openVMS/Alpha.
+Timothy Wall, Michael Hayes, and Greg Smart contributed to the various tic*
+flavors.
+
Several engineers at Cygnus Support have also provided many small bug fixes and
configuration enhancements.
@@ -5443,6 +5755,369 @@ you have contributed significant work and are not mentioned on this list, and
want to be, let us know. Some of the history has been lost; we are not
intentionally leaving anyone out.
+@node GNU Free Documentation License
+@chapter GNU Free Documentation License
+
+ GNU Free Documentation License
+
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+@end smallexample
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
@node Index
@unnumbered Index
diff --git a/gnu/usr.bin/binutils/gas/doc/c-hppa.texi b/gnu/usr.bin/binutils/gas/doc/c-hppa.texi
index 5fa535fd783..0ddda0445c1 100644
--- a/gnu/usr.bin/binutils/gas/doc/c-hppa.texi
+++ b/gnu/usr.bin/binutils/gas/doc/c-hppa.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1998
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@page
diff --git a/gnu/usr.bin/binutils/gas/doc/c-i386.texi b/gnu/usr.bin/binutils/gas/doc/c-i386.texi
index 8a9c85a678e..1527c8d78a1 100644
--- a/gnu/usr.bin/binutils/gas/doc/c-i386.texi
+++ b/gnu/usr.bin/binutils/gas/doc/c-i386.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
@@ -13,6 +14,12 @@
@cindex i386 support
@cindex i80306 support
+@cindex x86-64 support
+
+The i386 version @code{@value{AS}} supports both the original Intel 386
+architecture in both 16 and 32-bit mode as well as AMD x86-64 architecture
+extending the Intel architecture to 64-bits.
+
@menu
* i386-Options:: Options
* i386-Syntax:: AT&T Syntax versus Intel Syntax
@@ -20,10 +27,11 @@
* i386-Regs:: Register Naming
* i386-Prefixes:: Instruction Prefixes
* i386-Memory:: Memory References
-* i386-jumps:: Handling of Jump Instructions
+* i386-Jumps:: Handling of Jump Instructions
* i386-Float:: Floating Point
* i386-SIMD:: Intel's MMX and AMD's 3DNow! SIMD Operations
* i386-16bit:: Writing 16-bit Code
+* i386-Arch:: Specifying an x86 CPU architecture
* i386-Bugs:: AT&T Syntax bugs
* i386-Notes:: Notes
@end menu
@@ -31,17 +39,52 @@
@node i386-Options
@section Options
-@cindex options for i386 (none)
-@cindex i386 options (none)
-The 80386 has no machine dependent options.
+@cindex options for i386
+@cindex options for x86-64
+@cindex i386 options
+@cindex x86-64 options
+
+The i386 version of @code{@value{AS}} has a few machine
+dependent options:
+
+@table @code
+@cindex @samp{--32} option, i386
+@cindex @samp{--32} option, x86-64
+@cindex @samp{--64} option, i386
+@cindex @samp{--64} option, x86-64
+@item --32 | --64
+Select the word size, either 32 bits or 64 bits. Selecting 32-bit
+implies Intel i386 architecture, while 64-bit implies AMD x86-64
+architecture.
+
+These options are only available with the ELF object file format, and
+require that the necessary BFD support has been included (on a 32-bit
+platform you have to add --enable-64-bit-bfd to configure enable 64-bit
+usage and use x86-64 as target platform).
+@end table
@node i386-Syntax
@section AT&T Syntax versus Intel Syntax
+@cindex i386 intel_syntax pseudo op
+@cindex intel_syntax pseudo op, i386
+@cindex i386 att_syntax pseudo op
+@cindex att_syntax pseudo op, i386
@cindex i386 syntax compatibility
@cindex syntax compatibility, i386
-In order to maintain compatibility with the output of @code{@value{GCC}},
-@code{@value{AS}} supports AT&T System V/386 assembler syntax. This is quite
+@cindex x86-64 intel_syntax pseudo op
+@cindex intel_syntax pseudo op, x86-64
+@cindex x86-64 att_syntax pseudo op
+@cindex att_syntax pseudo op, x86-64
+@cindex x86-64 syntax compatibility
+@cindex syntax compatibility, x86-64
+
+@code{@value{AS}} now supports assembly using Intel assembler syntax.
+@code{.intel_syntax} selects Intel mode, and @code{.att_syntax} switches
+back to the usual AT&T mode for compatibility with the output of
+@code{@value{GCC}}. Either of these directives may have an optional
+argument, @code{prefix}, or @code{noprefix} specifying whether registers
+require a @samp{%} prefix. AT&T System V/386 assembler syntax is quite
different from Intel syntax. We mention these differences because
almost all 80386 documents use Intel syntax. Notable differences
between the two syntaxes are:
@@ -53,6 +96,14 @@ between the two syntaxes are:
@cindex jump/call operands, i386
@cindex i386 jump/call operands
@cindex operand delimiters, i386
+
+@cindex immediate operands, x86-64
+@cindex x86-64 immediate operands
+@cindex register operands, x86-64
+@cindex x86-64 register operands
+@cindex jump/call operands, x86-64
+@cindex x86-64 jump/call operands
+@cindex operand delimiters, x86-64
@itemize @bullet
@item
AT&T immediate operands are preceded by @samp{$}; Intel immediate
@@ -63,6 +114,8 @@ operands are prefixed by @samp{*}; they are undelimited in Intel syntax.
@cindex i386 source, destination operands
@cindex source, destination operands; i386
+@cindex x86-64 source, destination operands
+@cindex source, destination operands; x86-64
@item
AT&T and Intel syntax use the opposite order for source and destination
operands. Intel @samp{add eax, 4} is @samp{addl $4, %eax}. The
@@ -74,17 +127,23 @@ reversed order. @ref{i386-Bugs}.
@cindex mnemonic suffixes, i386
@cindex sizes operands, i386
@cindex i386 size suffixes
+@cindex mnemonic suffixes, x86-64
+@cindex sizes operands, x86-64
+@cindex x86-64 size suffixes
@item
In AT&T syntax the size of memory operands is determined from the last
character of the instruction mnemonic. Mnemonic suffixes of @samp{b},
-@samp{w}, and @samp{l} specify byte (8-bit), word (16-bit), and long
-(32-bit) memory references. Intel syntax accomplishes this by prefixing
-memory operands (@emph{not} the instruction mnemonics) with @samp{byte
-ptr}, @samp{word ptr}, and @samp{dword ptr}. Thus, Intel @samp{mov al,
-byte ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T syntax.
+@samp{w}, @samp{l} and @samp{q} specify byte (8-bit), word (16-bit), long
+(32-bit) and quadruple word (64-bit) memory references. Intel syntax accomplishes
+this by prefixing memory operands (@emph{not} the instruction mnemonics) with
+@samp{byte ptr}, @samp{word ptr}, @samp{dword ptr} and @samp{qword ptr}. Thus,
+Intel @samp{mov al, byte ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T
+syntax.
@cindex return instructions, i386
@cindex i386 jump, call, return
+@cindex return instructions, x86-64
+@cindex x86-64 jump, call, return
@item
Immediate form long jumps and calls are
@samp{lcall/ljmp $@var{section}, $@var{offset}} in AT&T syntax; the
@@ -96,6 +155,8 @@ is @samp{lret $@var{stack-adjust}} in AT&T syntax; Intel syntax is
@cindex sections, i386
@cindex i386 sections
+@cindex sections, x86-64
+@cindex x86-64 sections
@item
The AT&T assembler does not provide support for multiple section
programs. Unix style systems expect all programs to be single sections.
@@ -106,17 +167,20 @@ programs. Unix style systems expect all programs to be single sections.
@cindex i386 instruction naming
@cindex instruction naming, i386
+@cindex x86-64 instruction naming
+@cindex instruction naming, x86-64
+
Instruction mnemonics are suffixed with one character modifiers which
-specify the size of operands. The letters @samp{b}, @samp{w}, and
-@samp{l} specify byte, word, and long operands. If no suffix is
-specified by an instruction then @code{@value{AS}} tries to fill in the
-missing suffix based on the destination register operand (the last one
-by convention). Thus, @samp{mov %ax, %bx} is equivalent to @samp{movw
-%ax, %bx}; also, @samp{mov $1, %bx} is equivalent to @samp{movw $1,
-%bx}. Note that this is incompatible with the AT&T Unix assembler which
-assumes that a missing mnemonic suffix implies long operand size. (This
-incompatibility does not affect compiler output since compilers always
-explicitly specify the mnemonic suffix.)
+specify the size of operands. The letters @samp{b}, @samp{w}, @samp{l}
+and @samp{q} specify byte, word, long and quadruple word operands. If
+no suffix is specified by an instruction then @code{@value{AS}} tries to
+fill in the missing suffix based on the destination register operand
+(the last one by convention). Thus, @samp{mov %ax, %bx} is equivalent
+to @samp{movw %ax, %bx}; also, @samp{mov $1, %bx} is equivalent to
+@samp{movw $1, bx}. Note that this is incompatible with the AT&T Unix
+assembler which assumes that a missing mnemonic suffix implies long
+operand size. (This incompatibility does not affect compiler output
+since compilers always explicitly specify the mnemonic suffix.)
Almost all instructions have the same names in AT&T and Intel format.
There are a few exceptions. The sign extend and zero extend
@@ -130,10 +194,14 @@ are tacked on to this base name, the @emph{from} suffix before the
@emph{to} suffix. Thus, @samp{movsbl %al, %edx} is AT&T syntax for
``move sign extend @emph{from} %al @emph{to} %edx.'' Possible suffixes,
thus, are @samp{bl} (from byte to long), @samp{bw} (from byte to word),
-and @samp{wl} (from word to long).
+@samp{wl} (from word to long), @samp{bq} (from byte to quadruple word),
+@samp{wq} (from word to quadruple word), and @samp{lq} (from long to
+quadruple word).
@cindex conversion instructions, i386
@cindex i386 conversion instructions
+@cindex conversion instructions, x86-64
+@cindex x86-64 conversion instructions
The Intel-syntax conversion instructions
@itemize @bullet
@@ -148,14 +216,25 @@ The Intel-syntax conversion instructions
@item
@samp{cdq} --- sign-extend dword in @samp{%eax} to quad in @samp{%edx:%eax},
+
+@item
+@samp{cdqe} --- sign-extend dword in @samp{%eax} to quad in @samp{%rax}
+(x86-64 only),
+
+@item
+@samp{cdo} --- sign-extend quad in @samp{%rax} to octuple in
+@samp{%rdx:%rax} (x86-64 only),
@end itemize
@noindent
-are called @samp{cbtw}, @samp{cwtl}, @samp{cwtd}, and @samp{cltd} in
-AT&T naming. @code{@value{AS}} accepts either naming for these instructions.
+are called @samp{cbtw}, @samp{cwtl}, @samp{cwtd}, @samp{cltd}, @samp{cltq}, and
+@samp{cqto} in AT&T naming. @code{@value{AS}} accepts either naming for these
+instructions.
@cindex jump instructions, i386
@cindex call instructions, i386
+@cindex jump instructions, x86-64
+@cindex call instructions, x86-64
Far call/jump instructions are @samp{lcall} and @samp{ljmp} in
AT&T syntax, but are @samp{call far} and @samp{jump far} in Intel
convention.
@@ -165,6 +244,8 @@ convention.
@cindex i386 registers
@cindex registers, i386
+@cindex x86-64 registers
+@cindex registers, x86-64
Register operands are always prefixed with @samp{%}. The 80386 registers
consist of
@@ -204,6 +285,44 @@ the 2 test registers @samp{%tr6} and @samp{%tr7}.
the 8 floating point register stack @samp{%st} or equivalently
@samp{%st(0)}, @samp{%st(1)}, @samp{%st(2)}, @samp{%st(3)},
@samp{%st(4)}, @samp{%st(5)}, @samp{%st(6)}, and @samp{%st(7)}.
+These registers are overloaded by 8 MMX registers @samp{%mm0},
+@samp{%mm1}, @samp{%mm2}, @samp{%mm3}, @samp{%mm4}, @samp{%mm5},
+@samp{%mm6} and @samp{%mm7}.
+
+@item
+the 8 SSE registers registers @samp{%xmm0}, @samp{%xmm1}, @samp{%xmm2},
+@samp{%xmm3}, @samp{%xmm4}, @samp{%xmm5}, @samp{%xmm6} and @samp{%xmm7}.
+@end itemize
+
+The AMD x86-64 architecture extends the register set by:
+
+@itemize @bullet
+@item
+enhancing the 8 32-bit registers to 64-bit: @samp{%rax} (the
+accumulator), @samp{%rbx}, @samp{%rcx}, @samp{%rdx}, @samp{%rdi},
+@samp{%rsi}, @samp{%rbp} (the frame pointer), @samp{%rsp} (the stack
+pointer)
+
+@item
+the 8 extended registers @samp{%r8}--@samp{%r15}.
+
+@item
+the 8 32-bit low ends of the extended registers: @samp{%r8d}--@samp{%r15d}
+
+@item
+the 8 16-bit low ends of the extended registers: @samp{%r8w}--@samp{%r15w}
+
+@item
+the 8 8-bit low ends of the extended registers: @samp{%r8b}--@samp{%r15b}
+
+@item
+the 4 8-bit registers: @samp{%sil}, @samp{%dil}, @samp{%bpl}, @samp{%spl}.
+
+@item
+the 8 debug registers: @samp{%db8}--@samp{%db15}.
+
+@item
+the 8 SSE registers: @samp{%xmm8}--@samp{%xmm15}.
@end itemize
@node i386-Prefixes
@@ -270,6 +389,20 @@ complete the current instruction. This should never be needed for the
The @samp{rep}, @samp{repe}, and @samp{repne} prefixes are added
to string instructions to make them repeat @samp{%ecx} times (@samp{%cx}
times if the current address size is 16-bits).
+@cindex REX prefixes, i386
+@item
+The @samp{rex} family of prefixes is used by x86-64 to encode
+extensions to i386 instruction set. The @samp{rex} prefix has four
+bits --- an operand size overwrite (@code{64}) used to change operand size
+from 32-bit to 64-bit and X, Y and Z extensions bits used to extend the
+register set.
+
+You may write the @samp{rex} prefixes directly. The @samp{rex64xyz}
+instruction emits @samp{rex} prefix with all the bits set. By omitting
+the @code{64}, @code{x}, @code{y} or @code{z} you may write other
+prefixes as well. Normally, there is no need to write the prefixes
+explicitly, since gas will automatically generate them based on the
+instruction operands.
@end itemize
@node i386-Memory
@@ -277,6 +410,8 @@ times if the current address size is 16-bits).
@cindex i386 memory references
@cindex memory references, i386
+@cindex x86-64 memory references
+@cindex memory references, x86-64
An Intel syntax indirect memory reference of the form
@smallexample
@@ -333,22 +468,42 @@ prefixed with @samp{*}. If no @samp{*} is specified, @code{@value{AS}}
always chooses PC relative addressing for jump/call labels.
Any instruction that has a memory operand, but no register operand,
-@emph{must} specify its size (byte, word, or long) with an instruction
-mnemonic suffix (@samp{b}, @samp{w}, or @samp{l}, respectively).
+@emph{must} specify its size (byte, word, long, or quadruple) with an
+instruction mnemonic suffix (@samp{b}, @samp{w}, @samp{l} or @samp{q},
+respectively).
-@node i386-jumps
+The x86-64 architecture adds an RIP (instruction pointer relative)
+addressing. This addressing mode is specified by using @samp{rip} as a
+base register. Only constant offsets are valid. For example:
+
+@table @asis
+@item AT&T: @samp{1234(%rip)}, Intel: @samp{[rip + 1234]}
+Points to the address 1234 bytes past the end of the current
+instruction.
+
+@item AT&T: @samp{symbol(%rip)}, Intel: @samp{[rip + symbol]}
+Points to the @code{symbol} in RIP relative way, this is shorter than
+the default absolute addressing.
+@end table
+
+Other addressing modes remain unchanged in x86-64 architecture, except
+registers used are 64-bit instead of 32-bit.
+
+@node i386-Jumps
@section Handling of Jump Instructions
@cindex jump optimization, i386
@cindex i386 jump optimization
+@cindex jump optimization, x86-64
+@cindex x86-64 jump optimization
Jump instructions are always optimized to use the smallest possible
displacements. This is accomplished by using byte (8-bit) displacement
jumps whenever the target is sufficiently close. If a byte displacement
-is insufficient a long (32-bit) displacement is used. We do not support
+is insufficient a long displacement is used. We do not support
word (16-bit) displacement jumps in 32-bit mode (i.e. prefixing the jump
instruction with the @samp{data16} instruction prefix), since the 80386
insists upon masking @samp{%eip} to 16 bits after the word displacement
-is added.
+is added. (See also @pxref{i386-Arch})
Note that the @samp{jcxz}, @samp{jecxz}, @samp{loop}, @samp{loopz},
@samp{loope}, @samp{loopnz} and @samp{loopne} instructions only come in byte
@@ -369,6 +524,8 @@ cx_nonzero:
@cindex i386 floating point
@cindex floating point, i386
+@cindex x86-64 floating point
+@cindex floating point, x86-64
All 80387 floating point types except packed BCD are supported.
(BCD support may be added without much difficulty). These data
types are 16-, 32-, and 64- bit integers, and single (32-bit),
@@ -381,6 +538,10 @@ data type. Constructors build these data types into memory.
@cindex @code{single} directive, i386
@cindex @code{double} directive, i386
@cindex @code{tfloat} directive, i386
+@cindex @code{float} directive, x86-64
+@cindex @code{single} directive, x86-64
+@cindex @code{double} directive, x86-64
+@cindex @code{tfloat} directive, x86-64
@itemize @bullet
@item
Floating point constructors are @samp{.float} or @samp{.single},
@@ -394,6 +555,10 @@ top) and @samp{fstpt} (store 80-bit real and pop stack) instructions.
@cindex @code{long} directive, i386
@cindex @code{int} directive, i386
@cindex @code{quad} directive, i386
+@cindex @code{word} directive, x86-64
+@cindex @code{long} directive, x86-64
+@cindex @code{int} directive, x86-64
+@cindex @code{quad} directive, x86-64
@item
Integer constructors are @samp{.word}, @samp{.long} or @samp{.int}, and
@samp{.quad} for the 16-, 32-, and 64-bit integer formats. The
@@ -417,6 +582,9 @@ then stores the result in the 4 byte location @samp{mem})
@cindex MMX, i386
@cindex 3DNow!, i386
@cindex SIMD, i386
+@cindex MMX, x86-64
+@cindex 3DNow!, x86-64
+@cindex SIMD, x86-64
@code{@value{AS}} supports Intel's MMX instruction set (SIMD
instructions for integer data), available on Intel's Pentium MMX
@@ -446,7 +614,10 @@ instructions is reversed from the Intel syntax.
@cindex @code{code16gcc} directive, i386
@cindex @code{code16} directive, i386
@cindex @code{code32} directive, i386
-While @code{@value{AS}} normally writes only ``pure'' 32-bit i386 code,
+@cindex @code{code64} directive, i386
+@cindex @code{code64} directive, x86-64
+While @code{@value{AS}} normally writes only ``pure'' 32-bit i386 code
+or 64-bit x86-64 code depending on the default configuration,
it also supports writing code to run in real mode or in 16-bit protected
mode code segments. To do this, put a @samp{.code16} or
@samp{.code16gcc} directive before the assembly language instructions to
@@ -506,14 +677,64 @@ non-commutative arithmetic floating point operations with two register
operands where the source register is @samp{%st} and the destination
register is @samp{%st(i)}.
+@node i386-Arch
+@section Specifying CPU Architecture
+
+@cindex arch directive, i386
+@cindex i386 arch directive
+@cindex arch directive, x86-64
+@cindex x86-64 arch directive
+
+@code{@value{AS}} may be told to assemble for a particular CPU
+architecture with the @code{.arch @var{cpu_type}} directive. This
+directive enables a warning when gas detects an instruction that is not
+supported on the CPU specified. The choices for @var{cpu_type} are:
+
+@multitable @columnfractions .20 .20 .20 .20
+@item @samp{i8086} @tab @samp{i186} @tab @samp{i286} @tab @samp{i386}
+@item @samp{i486} @tab @samp{i586} @tab @samp{i686} @tab @samp{pentium}
+@item @samp{pentiumpro} @tab @samp{pentium4} @tab @samp{k6} @tab @samp{athlon}
+@item @samp{sledgehammer}
+@end multitable
+
+Apart from the warning, there are only two other effects on
+@code{@value{AS}} operation; Firstly, if you specify a CPU other than
+@samp{i486}, then shift by one instructions such as @samp{sarl $1, %eax}
+will automatically use a two byte opcode sequence. The larger three
+byte opcode sequence is used on the 486 (and when no architecture is
+specified) because it executes faster on the 486. Note that you can
+explicitly request the two byte opcode by writing @samp{sarl %eax}.
+Secondly, if you specify @samp{i8086}, @samp{i186}, or @samp{i286},
+@emph{and} @samp{.code16} or @samp{.code16gcc} then byte offset
+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.
+Unconditional jumps are treated as for @samp{jumps}.
+
+For example
+
+@smallexample
+ .arch i8086,nojumps
+@end smallexample
+
@node i386-Notes
@section Notes
@cindex i386 @code{mul}, @code{imul} instructions
@cindex @code{mul} instruction, i386
@cindex @code{imul} instruction, i386
+@cindex @code{mul} instruction, x86-64
+@cindex @code{imul} instruction, x86-64
There is some trickery concerning the @samp{mul} and @samp{imul}
-instructions that deserves mention. The 16-, 32-, and 64-bit expanding
+instructions that deserves mention. The 16-, 32-, 64- and 128-bit expanding
multiplies (base opcode @samp{0xf6}; extension 4 for @samp{mul} and 5
for @samp{imul}) can be output only in the one operand form. Thus,
@samp{imul %ebx, %eax} does @emph{not} select the expanding multiply;
diff --git a/gnu/usr.bin/binutils/gas/doc/c-i960.texi b/gnu/usr.bin/binutils/gas/doc/c-i960.texi
index 177030ab0be..c39d3c56912 100644
--- a/gnu/usr.bin/binutils/gas/doc/c-i960.texi
+++ b/gnu/usr.bin/binutils/gas/doc/c-i960.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1996
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
diff --git a/gnu/usr.bin/binutils/gas/doc/c-m68k.texi b/gnu/usr.bin/binutils/gas/doc/c-m68k.texi
index 16f857f3a7c..15c9968dfd0 100644
--- a/gnu/usr.bin/binutils/gas/doc/c-m68k.texi
+++ b/gnu/usr.bin/binutils/gas/doc/c-m68k.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
@@ -27,9 +28,12 @@
@cindex options, M680x0
@cindex M680x0 options
The Motorola 680x0 version of @code{@value{AS}} has a few machine
-dependent options.
+dependent options:
+
+@table @samp
@cindex @samp{-l} option, M680x0
+@item -l
You can use the @samp{-l} option to shorten the size of references to undefined
symbols. If you do not use the @samp{-l} option, references to undefined
symbols are wide enough for a full @code{long} (32 bits). (Since
@@ -41,6 +45,7 @@ This may be useful if you want the object file to be as small as possible, and
you know that the relevant symbols are always less than 17 bits away.
@cindex @samp{--register-prefix-optional} option, M680x0
+@item --register-prefix-optional
For some configurations, especially those where the compiler normally
does not prepend an underscore to the names of user variables, the
assembler requires a @samp{%} before any use of a register name. This
@@ -54,6 +59,7 @@ refer to C variables and functions with the same names as register
names.
@cindex @samp{--bitwise-or} option, M680x0
+@item --bitwise-or
Normally the character @samp{|} is treated as a comment character, which
means that it can not be used in expressions. The @samp{--bitwise-or}
option turns @samp{|} into a normal character. In this mode, you must
@@ -62,6 +68,7 @@ at the beginning of a line.
@cindex @samp{--base-size-default-16}
@cindex @samp{--base-size-default-32}
+@item --base-size-default-16 --base-size-default-32
If you use an addressing mode with a base register without specifying
the size, @code{@value{AS}} will normally use the full 32 bit value.
For example, the addressing mode @samp{%a0@@(%d0)} is equivalent to
@@ -73,6 +80,7 @@ default behaviour.
@cindex @samp{--disp-size-default-16}
@cindex @samp{--disp-size-default-32}
+@item --disp-size-default-16 --disp-size-default-32
If you use an addressing mode with a displacement, and the value of the
displacement is not known, @code{@value{AS}} will normally assume that
the value is 32 bits. For example, if the symbol @samp{disp} has not
@@ -84,9 +92,22 @@ to instead assume that the displacement is 16 bits. In this case,
@samp{disp} is a 16 bit value. You may use the
@samp{--disp-size-default-32} option to restore the default behaviour.
+@cindex @samp{--pcrel}
+@item --pcrel
+Always keep branches PC-relative. In the M680x0 architecture all branches
+are defined as PC-relative. However, on some processors they are limited
+to word displacements maximum. When @code{@value{AS}} needs a long branch
+that is not available, it normally emits an absolute jump instead. This
+option disables this substitution. When this option is given and no long
+branches are available, only word branches will be emitted. An error
+message will be generated if a word branch cannot reach its target. This
+option has no effect on 68020 and other processors that have long branches.
+@pxref{M68K-Branch,,Branch Improvement}.
+
@cindex @samp{-m68000} and related options
@cindex architecture options, M680x0
@cindex M680x0 architecture options
+@item -m68000
@code{@value{AS}} can assemble code for several different members of the
Motorola 680x0 family. The default depends upon how @code{@value{AS}}
was configured when it was built; normally, the default is to assemble
@@ -168,6 +189,7 @@ Do not assemble 68851 MMU instructions. This is the default for the
68000, 68010, and the CPU32. The 68040 accepts a somewhat different set
of MMU instructions.
@end table
+@end table
@node M68K-Syntax
@section Syntax
@@ -403,28 +425,39 @@ cases that are more fully described after the table:
@smallexample
Displacement
- +-------------------------------------------------
- | 68020 68000/10
-Pseudo-Op |BYTE WORD LONG LONG non-PC relative
- +-------------------------------------------------
- jbsr |bsrs bsr bsrl jsr jsr
- jra |bras bra bral jmp jmp
-* jXX |bXXs bXX bXXl bNXs;jmpl bNXs;jmp
-* dbXX |dbXX dbXX dbXX; bra; jmpl
-* fjXX |fbXXw fbXXw fbXXl fbNXw;jmp
+ +------------------------------------------------------------
+ | 68020 68000/10, not PC-relative OK
+Pseudo-Op |BYTE WORD LONG ABSOLUTE LONG JUMP **
+ +------------------------------------------------------------
+ jbsr |bsrs bsrw bsrl jsr
+ jra |bras braw bral jmp
+* jXX |bXXs bXXw bXXl bNXs;jmp
+* dbXX | N/A dbXXw dbXX;bras;bral dbXX;bras;jmp
+ fjXX | N/A fbXXw fbXXl N/A
XX: condition
NX: negative of condition XX
@end smallexample
@center @code{*}---see full description below
+@center @code{**}---this expansion mode is disallowed by @samp{--pcrel}
@table @code
@item jbsr
@itemx jra
These are the simplest jump pseudo-operations; they always map to one
particular machine instruction, depending on the displacement to the
-branch target.
+branch target. This instruction will be a byte or word branch is that
+is sufficient. Otherwise, a long branch will be emitted if available.
+If no long branches are available and the @samp{--pcrel} option is not
+given, an absolute long jump will be emitted instead. If no long
+branches are available, the @samp{--pcrel} option is given, and a word
+branch cannot reach the target, an error message is generated.
+
+In addition to standard branch operands, @code{@value{AS}} allows these
+pseudo-operations to have all operands that are allowed for jsr and jmp,
+substituting these instructions if the operand given is not valid for a
+branch instruction.
@item j@var{XX}
Here, @samp{j@var{XX}} stands for an entire family of pseudo-operations,
@@ -435,10 +468,11 @@ list of pseudo-ops in this family is:
jvs jpl jmi jge jlt jgt jle
@end smallexample
-For the cases of non-PC relative displacements and long displacements on
-the 68000 or 68010, @code{@value{AS}} issues a longer code fragment in terms of
-@var{NX}, the opposite condition to @var{XX}. For example, for the
-non-PC relative case:
+Usually, each of these pseudo-operations expands to a single branch
+instruction. However, if a word branch is not sufficient, no long branches
+are available, and the @samp{--pcrel} option is not given, @code{@value{AS}}
+issues a longer code fragment in terms of @var{NX}, the opposite condition
+to @var{XX}. For example, under these conditions:
@smallexample
j@var{XX} foo
@end smallexample
@@ -457,12 +491,24 @@ The full family of pseudo-operations covered here is
dbf dbra dbt
@end smallexample
-Other than for word and byte displacements, when the source reads
+Motorola @samp{db@var{XX}} instructions allow word displacements only. When
+a word displacement is sufficient, each of these pseudo-operations expands
+to the corresponding Motorola instruction. When a word displacement is not
+sufficient and long branches are available, when the source reads
@samp{db@var{XX} foo}, @code{@value{AS}} emits
@smallexample
db@var{XX} oo1
- bra oo2
- oo1:jmpl foo
+ bras oo2
+ oo1:bral foo
+ oo2:
+@end smallexample
+
+If, however, long branches are not available and the @samp{--pcrel} option is
+not given, @code{@value{AS}} emits
+@smallexample
+ db@var{XX} oo1
+ bras oo2
+ oo1:jmp foo
oo2:
@end smallexample
@@ -476,13 +522,9 @@ This family includes
fjugt fjule fjult fjun
@end smallexample
-For branch targets that are not PC relative, @code{@value{AS}} emits
-@smallexample
- fb@var{NX} oof
- jmp foo
- oof:
-@end smallexample
-when it encounters @samp{fj@var{XX} foo}.
+Each of these pseudo-operations always expands to a single Motorola
+coprocessor branch instruction, word or long. All Motorola coprocessor
+branch instructions allow both word and long displacements.
@end table
diff --git a/gnu/usr.bin/binutils/gas/doc/c-mips.texi b/gnu/usr.bin/binutils/gas/doc/c-mips.texi
index 26940deabc5..de5f221caf2 100644
--- a/gnu/usr.bin/binutils/gas/doc/c-mips.texi
+++ b/gnu/usr.bin/binutils/gas/doc/c-mips.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
@@ -13,11 +14,11 @@
@cindex MIPS processor
@sc{gnu} @code{@value{AS}} for @sc{mips} architectures supports several
-different @sc{mips} processors, and MIPS ISA levels I through IV. For
-information about the @sc{mips} instruction set, see @cite{MIPS RISC
-Architecture}, by Kane and Heindrich (Prentice-Hall). For an overview
-of @sc{mips} assembly conventions, see ``Appendix D: Assembly Language
-Programming'' in the same work.
+different @sc{mips} processors, and MIPS ISA levels I through V, MIPS32,
+and MIPS64. For information about the @sc{mips} instruction set, see
+@cite{MIPS RISC Architecture}, by Kane and Heindrich (Prentice-Hall).
+For an overview of @sc{mips} assembly conventions, see ``Appendix D:
+Assembly Language Programming'' in the same work.
@menu
* MIPS Opts:: Assembler options
@@ -60,12 +61,18 @@ to select big-endian output, and @samp{-EL} for little-endian.
@itemx -mips2
@itemx -mips3
@itemx -mips4
+@itemx -mips5
+@itemx -mips32
+@itemx -mips64
Generate code for a particular MIPS Instruction Set Architecture level.
@samp{-mips1} corresponds to the @sc{r2000} and @sc{r3000} processors,
@samp{-mips2} to the @sc{r6000} processor, @samp{-mips3} to the
@sc{r4000} processor, and @samp{-mips4} to the @sc{r8000} and
-@sc{r10000} processors. You can also switch instruction sets during the
-assembly; see @ref{MIPS ISA,, Directives to override the ISA level}.
+@sc{r10000} processors. @samp{-mips5}, @samp{-mips32}, and
+@samp{-mips64} correspond to generic @sc{MIPS V}, @sc{MIPS32}, and
+@sc{MIPS64} ISA processors, respectively. You can also switch
+instruction sets during the assembly; see @ref{MIPS ISA, Directives to
+override the ISA level}.
@item -mgp32
Assume that 32-bit general purpose registers are available. This
@@ -132,9 +139,17 @@ understood. Valid @var{cpu} value are:
4600,
4650,
5000,
+rm5200,
+rm5230,
+rm5231,
+rm5261,
+rm5721,
6000,
+rm7000,
8000,
-10000
+10000,
+mips32-4k,
+sb1
@end quotation
@@ -145,6 +160,21 @@ other assemblers, which use it to turn off C style preprocessing. With
@sc{gnu} @code{@value{AS}}, there is no need for @samp{-nocpp}, because the
@sc{gnu} assembler itself never runs the C preprocessor.
+@item --construct-floats
+@itemx --no-construct-floats
+@cindex --construct-floats
+@cindex --no-construct-floats
+The @code{--no-construct-floats} option disables the construction of
+double width floating point constants by loading the two halves of the
+value into the two single width floating point registers that make up
+the double width register. This feature is useful if the processor
+support the FR bit in its status register, and this bit is known (by
+the programmer) to be set. This bit prevents the aliasing of the double
+width register by the single width registers.
+
+By default @code{--construct-floats} is selected, allowing construction
+of these floating point constants.
+
@item --trap
@itemx --no-break
@c FIXME! (1) reflect these options (next item too) in option summaries;
@@ -215,15 +245,16 @@ assembly language programmers!
@kindex @code{.set mips@var{n}}
@sc{gnu} @code{@value{AS}} supports an additional directive to change
the @sc{mips} Instruction Set Architecture level on the fly: @code{.set
-mips@var{n}}. @var{n} should be a number from 0 to 4. A value from 1
-to 4 makes the assembler accept instructions for the corresponding
-@sc{isa} level, from that point on in the assembly. @code{.set
-mips@var{n}} affects not only which instructions are permitted, but also
-how certain macros are expanded. @code{.set mips0} restores the
-@sc{isa} level to its original level: either the level you selected with
-command line options, or the default for your configuration. You can
-use this feature to permit specific @sc{r4000} instructions while
-assembling in 32 bit mode. Use this directive with care!
+mips@var{n}}. @var{n} should be a number from 0 to 5, or 32 or 64.
+The values 1 to 5, 32, and 64 make the assembler accept instructions
+for the corresponding @sc{isa} level, from that point on in the
+assembly. @code{.set mips@var{n}} affects not only which instructions
+are permitted, but also how certain macros are expanded. @code{.set
+mips0} restores the @sc{isa} level to its original level: either the
+level you selected with command line options, or the default for your
+configuration. You can use this feature to permit specific @sc{r4000}
+instructions while assembling in 32 bit mode. Use this directive with
+care!
The directive @samp{.set mips16} puts the assembler into MIPS 16 mode,
in which it will assemble instructions for the MIPS 16 processor. Use
diff --git a/gnu/usr.bin/binutils/gas/doc/c-sh.texi b/gnu/usr.bin/binutils/gas/doc/c-sh.texi
index e20f5543788..ea444f5586d 100644
--- a/gnu/usr.bin/binutils/gas/doc/c-sh.texi
+++ b/gnu/usr.bin/binutils/gas/doc/c-sh.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@page
diff --git a/gnu/usr.bin/binutils/gas/doc/c-sparc.texi b/gnu/usr.bin/binutils/gas/doc/c-sparc.texi
index ab54eb2d889..624c21e34f6 100644
--- a/gnu/usr.bin/binutils/gas/doc/c-sparc.texi
+++ b/gnu/usr.bin/binutils/gas/doc/c-sparc.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
diff --git a/gnu/usr.bin/binutils/gas/doc/c-vax.texi b/gnu/usr.bin/binutils/gas/doc/c-vax.texi
index b13d7e5a493..b4d5d3ec139 100644
--- a/gnu/usr.bin/binutils/gas/doc/c-vax.texi
+++ b/gnu/usr.bin/binutils/gas/doc/c-vax.texi
@@ -1,4 +1,5 @@
-@c Copyright (C) 1991, 92, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998
+@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@c VAX/VMS description exhanced and corrected by Klaus K"aempf, kkaempf@progis.de
diff --git a/gnu/usr.bin/binutils/gas/doc/internals.texi b/gnu/usr.bin/binutils/gas/doc/internals.texi
index b603fc73cd3..eebb9bbc653 100644
--- a/gnu/usr.bin/binutils/gas/doc/internals.texi
+++ b/gnu/usr.bin/binutils/gas/doc/internals.texi
@@ -1,4 +1,7 @@
\input texinfo
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+@c 2001
+@c Free Software Foundation, Inc.
@setfilename internals.info
@node Top
@top Assembler Internals
@@ -8,8 +11,7 @@
This chapter describes the internals of the assembler. It is incomplete, but
it may help a bit.
-This chapter was last modified on $Date: 2000/09/12 19:11:56 $. It is not updated regularly, and it
-may be out of date.
+This chapter is not updated regularly, and it may be out of date.
@menu
* GAS versions:: GAS versions
@@ -464,7 +466,7 @@ the other fields; see the definition in @file{expr.h} for the possibilities.
An @code{operatorT} value of @code{O_big} indicates either a floating point
number, stored in the global variable @code{generic_floating_point_number}, or
-an integer to large to store in an @code{offsetT} type, stored in the global
+an integer too large to store in an @code{offsetT} type, stored in the global
array @code{generic_bignum}. This rather inflexible approach makes it
impossible to use floating point numbers or large expressions in complex
expressions.
@@ -645,7 +647,7 @@ The variable characters are to be repeated @code{fr_offset} times. If
have this type.
@item rs_leb128
-This state is used to implement the DWARF ``little endian base 128''
+This state is used to implement the DWARF ``little endian base 128''
variable length number format. The @code{fr_symbol} is always an expression
symbol, as constant expressions are emitted directly. The @code{fr_offset}
field is used during relaxation to hold the previous size of the number so
@@ -774,6 +776,12 @@ variable. Normally the default value of @samp{generic} is fine. The
configuration process will create a file named @file{targ-env.h} in the build
directory which includes @file{te-@var{em}.h}.
+There is a special case for COFF. For historical reason, the GNU COFF
+assembler doesn't follow the documented behavior on certain debug symbols for
+the compatibility with other COFF assemblers. A port can define
+@code{STRICTCOFF} in the configure script to make the GNU COFF assembler
+to follow the documented behavior.
+
Porting GAS to a new CPU requires writing the @file{tc-@var{CPU}} files.
Porting GAS to a new object file format requires writing the
@file{obj-@var{fmt}} files. There is sometimes some interaction between these
@@ -884,7 +892,7 @@ pseudo-ops which are specific to the CPU.
If this macro is defined, GAS will call it with a @code{pseudo_typeS} argument.
It should return non-zero if the pseudo-op is a conditional which controls
whether code is assembled, such as @samp{.if}. GAS knows about the normal
-conditional pseudo-ops,and you should normally not have to define this macro.
+conditional pseudo-ops, and you should normally not have to define this macro.
@item comment_chars
@cindex comment_chars
@@ -913,7 +921,7 @@ comment when they appear at the start of a line.
@item line_separator_chars
@cindex line_separator_chars
This is a null terminated @code{const char} array of characters which separate
-lines (semicolon and newline are such characters by default, and need not be
+lines (null and newline are such characters by default, and need not be
listed in this array). Note that line_separator_chars do not separate lines
if found in a comment, such as after a character in line_comment_chars or
comment_chars.
@@ -965,7 +973,7 @@ default value is @code{LEX_NAME | LEX_BEGIN_NAME}.
@item NUMBERS_WITH_SUFFIX
@cindex NUMBERS_WITH_SUFFIX
When this macro is defined to be non-zero, the parser allows the radix of a
-constant to be indicated with a suffix. Valid suffixes are binary (B),
+constant to be indicated with a suffix. Valid suffixes are binary (B),
octal (Q), and hexadecimal (H). Case is not significant.
@item SINGLE_QUOTE_STRINGS
@@ -992,6 +1000,7 @@ If you define this macro, GAS will assume that any text at the start of a line
is a label, even if it does not have a colon.
@item TC_START_LABEL
+@itemx TC_START_LABEL_WITHOUT_COLON
@cindex TC_START_LABEL
You may define this macro to control what GAS considers to be a label. The
default definition is to accept any name followed by a colon character.
@@ -999,7 +1008,7 @@ default definition is to accept any name followed by a colon character.
@item TC_START_LABEL_WITHOUT_COLON
@cindex TC_START_LABEL_WITHOUT_COLON
Same as TC_START_LABEL, but should be used instead of TC_START_LABEL when
-LABELS_WITHOUT_COLONS is defined.
+LABELS_WITHOUT_COLONS is defined.
@item NO_PSEUDO_DOT
@cindex NO_PSEUDO_DOT
@@ -1133,11 +1142,13 @@ relocation entry.
@itemx md_long_jump_size
@itemx md_create_short_jump
@itemx md_create_long_jump
+@itemx TC_CHECK_ADJUSTED_BROKEN_DOT_WORD
@cindex WORKING_DOT_WORD
@cindex md_short_jump_size
@cindex md_long_jump_size
@cindex md_create_short_jump
@cindex md_create_long_jump
+@cindex TC_CHECK_ADJUSTED_BROKEN_DOT_WORD
If @code{WORKING_DOT_WORD} is defined, GAS will not do broken word processing
(@pxref{Broken words}). Otherwise, you should set @code{md_short_jump_size} to
the size of a short jump (a jump that is just long enough to jump around a
@@ -1145,6 +1156,10 @@ number of long jumps) and @code{md_long_jump_size} to the size of a long jump
(a jump that can go anywhere in the function). You should define
@code{md_create_short_jump} to create a short jump around a number of long
jumps, and define @code{md_create_long_jump} to create a long jump.
+If defined, the macro TC_CHECK_ADJUSTED_BROKEN_DOT_WORD will be called for each
+adjusted word just before the word is output. The macro takes two arguments,
+an @code{addressT} with the adjusted word and a pointer to the current
+@code{struct broken_word}.
@item md_estimate_size_before_relax
@cindex md_estimate_size_before_relax
@@ -1154,9 +1169,10 @@ relocations.
@item md_relax_frag
@cindex md_relax_frag
-This macro may be defined to relax a frag. GAS will call this with the frag
-and the change in size of all previous frags; @code{md_relax_frag} should
-return the change in size of the frag. @xref{Relaxation}.
+This macro may be defined to relax a frag. GAS will call this with the
+segment, the frag, and the change in size of all previous frags;
+@code{md_relax_frag} should return the change in size of the frag.
+@xref{Relaxation}.
@item TC_GENERIC_RELAX_TABLE
@cindex TC_GENERIC_RELAX_TABLE
@@ -1177,6 +1193,15 @@ If you define this macro, and the global variable @samp{linkrelax} is set
@samp{.align} directive will cause extra space to be allocated. The linker can
then discard this space when relaxing the section.
+@item TC_LINKRELAX_FIXUP (@var{segT})
+@cindex TC_LINKRELAX_FIXUP
+If defined, this macro allows control over whether fixups for a
+given section will be processed when the @var{linkrelax} variable is
+set. The macro is given the N_TYPE bits for the section in its
+@var{segT} argument. If the macro evaluates to a non-zero value
+then the fixups will be converted into relocs, otherwise they will
+be passed to @var{md_apply_fix3} as normal.
+
@item md_convert_frag
@cindex md_convert_frag
GAS will call this for each rs_machine_dependent fragment.
@@ -1251,7 +1276,7 @@ size.
@cindex md_macro_start
If defined, GAS will call this macro when it starts to include a macro
expansion. @code{macro_nest} indicates the current macro nesting level, which
-includes the one being expanded.
+includes the one being expanded.
@item md_macro_info
@cindex md_macro_info
@@ -1263,7 +1288,7 @@ macro (macro_entry *), which includes expansion of the formal arguments.
@item md_macro_end
@cindex md_macro_end
Complement to md_macro_start. If defined, it is called when finished
-processing an inserted macro expansion, just before decrementing macro_nest.
+processing an inserted macro expansion, just before decrementing macro_nest.
@item DOUBLEBAR_PARALLEL
@cindex DOUBLEBAR_PARALLEL
@@ -1332,6 +1357,13 @@ source line. The default value is 4.
@item LISTING_RHS_WIDTH
The maximum number of characters to print from one line of the input file. The
default value is 100.
+
+@item TC_COFF_SECTION_DEFAULT_ATTRIBUTES
+@cindex TC_COFF_SECTION_DEFAULT_ATTRIBUTES
+The COFF @code{.section} directive will use the value of this macro to set
+a new section's attributes when a directive has no valid flags or when the
+flag is @code{w}. The default value of the macro is @code{SEC_LOAD | SEC_DATA}.
+
@end table
@node Object format backend
@@ -1400,8 +1432,8 @@ generate a @code{.file} symbol if none was generated previously.
@item SEPARATE_STAB_SECTIONS
@cindex SEPARATE_STAB_SECTIONS
-You may define this macro to indicate that stabs should be placed in separate
-sections, as in ELF.
+You may define this macro to a nonzero value to indicate that stabs should be
+placed in separate sections, as in ELF.
@item INIT_STAB_SECTION
@cindex INIT_STAB_SECTION
@@ -1573,6 +1605,16 @@ called to convert the frag to an @code{rs_fill} frag with no variant part.
Sometimes changing addressing modes may also require rewriting the instruction.
It can be accessed via @code{fr_opcode} or @code{fr_fix}.
+If you generate frags separately for the basic insn opcode and any relaxable
+operands, do not call @code{fix_new} thinking you can emit fixups for the
+opcode field from the relaxable frag. It is not garanteed to be the same frag.
+If you need to emit fixups for the opcode field from inspection of the
+relaxable frag, then you need to generate a common frag for both the basic
+opcode and relaxable fields, or you need to provide the frag for the opcode to
+pass to @code{fix_new}. The latter can be done for example by defining
+@code{TC_FRAG_TYPE} to include a pointer to it and defining @code{TC_FRAG_INIT}
+to set the pointer.
+
Sometimes @code{fr_var} is increased instead, and @code{frag_wane} is not
called. I'm not sure, but I think this is to keep @code{fr_fix} referring to
an earlier byte, and @code{fr_subtype} set to @code{rs_machine_dependent} so
diff --git a/gnu/usr.bin/binutils/gas/ecoff.c b/gnu/usr.bin/binutils/gas/ecoff.c
index 436c8c4af56..57ddddc93bf 100644
--- a/gnu/usr.bin/binutils/gas/ecoff.c
+++ b/gnu/usr.bin/binutils/gas/ecoff.c
@@ -1,5 +1,6 @@
/* ECOFF debugging support.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
good deal of it comes directly from mips-tfile.c, by Michael
@@ -161,7 +162,6 @@
tqFar -- 8086 far pointers
tqVol -- volatile
-
The dense number table is used in the front ends, and disappears by
the time the .o is created.
@@ -256,8 +256,6 @@
5) index: pointer to a local symbol or aux. entry.
-
-
For the following program:
#include <stdio.h>
@@ -727,9 +725,9 @@ typedef enum bt {
/* States for whether to hash type or not. */
typedef enum hash_state {
- hash_no = 0, /* don't hash type */
- hash_yes = 1, /* ok to hash type, or use previous hash */
- hash_record = 2 /* ok to record hash, but don't use prev. */
+ hash_no = 0, /* Don't hash type */
+ hash_yes = 1, /* OK to hash type, or use previous hash */
+ hash_record = 2 /* OK to record hash, but don't use prev. */
} hash_state_t;
/* Types of different sized allocation requests. */
@@ -770,7 +768,7 @@ enum aux_type {
can't be represented (assuming there are strings > 4096 bytes). */
/* FIXME: Yes, there can be such strings while emitting C++ class debug
- info. Templates are the offender here, the test case in question
+ info. Templates are the offender here, the test case in question
having a mangled class name of
t7rb_tree4Z4xkeyZt4pair2ZC4xkeyZt7xsocket1Z4UserZt9select1st2Zt4pair\
@@ -799,7 +797,6 @@ typedef struct vlinks {
unsigned long start_index; /* starting index # of page */
} vlinks_t;
-
/* Virtual array header. */
typedef struct varray {
vlinks_t *first; /* first page link */
@@ -825,11 +822,9 @@ typedef struct varray {
OBJECTS_PER_PAGE (type), /* objects_last_page */ \
}
-
-/* Master type for indexes within the symbol table. */
+/* Master type for indexes within the symbol table. */
typedef unsigned long symint_t;
-
/* Linked list support for nested scopes (file, block, structure, etc.). */
typedef struct scope {
struct scope *prev; /* previous scope level */
@@ -838,7 +833,6 @@ typedef struct scope {
st_t type; /* type of the node */
} scope_t;
-
/* For a local symbol we store a gas symbol as well as the debugging
information we generate. The gas symbol will be NULL if this is
only a debugging symbol. */
@@ -855,7 +849,6 @@ typedef struct localsym {
EXTR ecoff_sym; /* ECOFF debugging symbol */
} localsym_t;
-
/* For aux information we keep the type and the data. */
typedef struct ecoff_aux {
enum aux_type type; /* aux type */
@@ -872,7 +865,6 @@ typedef struct ecoff_proc {
/* Number of proc_t structures allocated. */
static unsigned long proc_cnt;
-
/* Forward reference list for tags referenced, but not yet defined. */
typedef struct forward {
struct forward *next; /* next forward reference */
@@ -881,7 +873,6 @@ typedef struct forward {
aux_t *index_ptr; /* pointer to store symbol index */
} forward_t;
-
/* Linked list support for tags. The first tag in the list is always
the current tag for that block. */
typedef struct tag {
@@ -895,7 +886,6 @@ typedef struct tag {
localsym_t *sym; /* file's local symbols */
} tag_t;
-
/* Head of a block's linked list of tags. */
typedef struct thead {
struct thead *prev; /* previous block */
@@ -903,7 +893,6 @@ typedef struct thead {
struct tag *first_tag; /* first tag in block defined */
} thead_t;
-
/* Union containing pointers to each the small structures which are freed up. */
typedef union small_free {
scope_t *f_scope; /* scope structure */
@@ -912,7 +901,6 @@ typedef union small_free {
forward_t *f_forward; /* forward tag reference */
} small_free_t;
-
/* String hash table entry. */
typedef struct shash {
@@ -925,7 +913,6 @@ typedef struct shash {
proc_t *proc_ptr; /* procedure descriptor pointer */
} shash_t;
-
/* Type hash table support. The size of the hash table must fit
within a page with the other extended file descriptor information.
Because unique types which are hashed are fewer in number than
@@ -943,7 +930,6 @@ typedef struct thash {
symint_t indx; /* index within string table */
} thash_t;
-
/* Extended file descriptor that contains all of the support necessary
to add things to each file separately. */
typedef struct efdr {
@@ -967,8 +953,7 @@ typedef struct efdr {
} efdr_t;
/* Pre-initialized extended file structure. */
-static const efdr_t init_file =
-{
+static const efdr_t init_file = {
{ /* FDR structure */
0, /* adr: memory address of beginning of file */
0, /* rss: file name (of source, if known) */
@@ -1015,11 +1000,9 @@ static const efdr_t init_file =
{ 0 }, /* thash_head: type hash table */
};
-
static efdr_t *first_file; /* first file descriptor */
static efdr_t **last_file_ptr = &first_file; /* file descriptor tail */
-
/* Line number information is kept in a list until the assembly is
finished. */
typedef struct lineno_list {
@@ -1060,7 +1043,6 @@ typedef union page {
lineno_list_t lineno [ PAGE_SIZE / sizeof (lineno_list_t) ];
} page_type;
-
/* Structure holding allocation information for small sized structures. */
typedef struct alloc_info {
char *alloc_name; /* name of this allocation type (must be first) */
@@ -1072,7 +1054,6 @@ typedef struct alloc_info {
int total_pages; /* total number of pages allocated */
} alloc_info_t;
-
/* Type information collected together. */
typedef struct type_info {
bt_t basic_type; /* basic type */
@@ -1130,7 +1111,7 @@ static const type_info_t type_info_init = {
/* Global hash table for the tags table and global table for file
descriptors. */
-static varray_t file_desc = INIT_VARRAY (efdr_t);
+static varray_t file_desc = INIT_VARRAY (efdr_t);
static struct hash_control *tag_hash;
@@ -1143,7 +1124,6 @@ static type_info_t void_type_info;
static type_info_t last_func_type_info;
static symbolS *last_func_sym_value;
-
/* Convert COFF basic type to ECOFF basic type. The T_NULL type
really should use bt_Void, but this causes the current ecoff GDB to
issue unsupported type messages, and the Ultrix 4.00 dbx (aka MIPS
@@ -1399,9 +1379,8 @@ static const st_t map_coff_sym_type[] = {
st_Nil, /* 106: C_HIDDEN ??? */
};
-
/* Keep track of different sized allocation requests. */
-static alloc_info_t alloc_counts[ (int)alloc_type_last ];
+static alloc_info_t alloc_counts[(int) alloc_type_last];
/* Record whether we have seen any debugging information. */
int ecoff_debugging_seen = 0;
@@ -1545,8 +1524,8 @@ add_varray_page (vp)
#endif
new_links->datum = allocate_page ();
- alloc_counts[(int)alloc_type_varray].total_alloc++;
- alloc_counts[(int)alloc_type_varray].total_pages++;
+ alloc_counts[(int) alloc_type_varray].total_alloc++;
+ alloc_counts[(int) alloc_type_varray].total_pages++;
new_links->start_index = vp->num_allocated;
vp->objects_last_page = 0;
@@ -1582,11 +1561,11 @@ add_string (vp, hash_tbl, str, ret_hash)
register const char *err;
if (vp->objects_last_page + len >= PAGE_USIZE)
- {
- vp->num_allocated =
- ((vp->num_allocated + PAGE_USIZE - 1) / PAGE_USIZE) * PAGE_USIZE;
- add_varray_page (vp);
- }
+ {
+ vp->num_allocated =
+ ((vp->num_allocated + PAGE_USIZE - 1) / PAGE_USIZE) * PAGE_USIZE;
+ add_varray_page (vp);
+ }
hash_ptr = allocate_shash ();
hash_ptr->indx = vp->num_allocated;
@@ -1636,10 +1615,10 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx)
vp = &cur_file_ptr->symbols;
- if (vp->objects_last_page == vp->objects_per_page)
+ if (vp->objects_last_page == vp->objects_per_page)
add_varray_page (vp);
- psym = &vp->last->datum->sym[ vp->objects_last_page++ ];
+ psym = &vp->last->datum->sym[vp->objects_last_page++];
if (str == (const char *) NULL && sym_value != (symbolS *) NULL)
psym->name = S_GET_NAME (sym_value);
@@ -1705,8 +1684,8 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx)
scope_delta = 1;
/* For every block type except file, struct, union, or
- enumeration blocks, push a level on the tag stack. We omit
- file types, so that tags can span file boundaries. */
+ enumeration blocks, push a level on the tag stack. We omit
+ file types, so that tags can span file boundaries. */
if (type != st_File && storage != sc_Info)
{
ptag_head = allocate_thead ();
@@ -1802,11 +1781,12 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx)
value, depth, sc_str);
if (str_start && str_end_p1 - str_start > 0)
- fprintf (stderr, " st= %-11s name= %.*s\n", st_str, str_end_p1 - str_start, str_start);
+ fprintf (stderr, " st= %-11s name= %.*s\n",
+ st_str, str_end_p1 - str_start, str_start);
else
{
unsigned long len = strlen (st_str);
- fprintf (stderr, " st= %.*s\n", len-1, st_str);
+ fprintf (stderr, " st= %.*s\n", len - 1, st_str);
}
}
#endif
@@ -1839,7 +1819,6 @@ add_aux_sym_symint (aux_word)
return vp->num_allocated++;
}
-
/* Add an auxiliary symbol (passing a file/symbol index combo). */
static symint_t
@@ -1899,9 +1878,8 @@ add_aux_sym_tir (t, state, hash_tbl)
aux.ti.tq4 = (int) t->type_qualifiers[4];
aux.ti.tq5 = (int) t->type_qualifiers[5];
-
/* For anything that adds additional information, we must not hash,
- so check here, and reset our state. */
+ so check here, and reset our state. */
if (state != hash_no
&& (t->type_qualifiers[0] == tq_Array
@@ -1951,11 +1929,11 @@ add_aux_sym_tir (t, state, hash_tbl)
}
}
- /* Everything is set up, add the aux symbol. */
+ /* Everything is set up, add the aux symbol. */
if (vp->objects_last_page == vp->objects_per_page)
add_varray_page (vp);
- aux_ptr = &vp->last->datum->aux[ vp->objects_last_page++ ];
+ aux_ptr = &vp->last->datum->aux[vp->objects_last_page++];
aux_ptr->type = aux_tir;
aux_ptr->data = aux;
@@ -1971,8 +1949,7 @@ add_aux_sym_tir (t, state, hash_tbl)
for an enum bitfield. */
if (t->bitfield)
- (void) add_aux_sym_symint ((symint_t)t->sizes[t->num_sizes-1]);
-
+ (void) add_aux_sym_symint ((symint_t) t->sizes[t->num_sizes - 1]);
/* Add tag information if needed. Structure, union, and enum
references add 2 aux symbols: a [file index, symbol index]
@@ -1983,7 +1960,7 @@ add_aux_sym_tir (t, state, hash_tbl)
|| t->basic_type == bt_Enum)
{
register symint_t file_index = t->tag_ptr->ifd;
- register localsym_t *sym = t->tag_ptr->sym;
+ register localsym_t *sym = t->tag_ptr->sym;
register forward_t *forward_ref = allocate_forward ();
if (sym != (localsym_t *) NULL)
@@ -1999,11 +1976,11 @@ add_aux_sym_tir (t, state, hash_tbl)
(void) add_aux_sym_rndx (ST_RFDESCAPE, indexNil);
forward_ref->index_ptr
- = &vp->last->datum->aux[ vp->objects_last_page - 1];
+ = &vp->last->datum->aux[vp->objects_last_page - 1];
(void) add_aux_sym_symint (file_index);
forward_ref->ifd_ptr
- = &vp->last->datum->aux[ vp->objects_last_page - 1];
+ = &vp->last->datum->aux[vp->objects_last_page - 1];
}
/* Add information about array bounds if they exist. */
@@ -2021,7 +1998,7 @@ add_aux_sym_tir (t, state, hash_tbl)
};
/* NOTE: Mips documentation claims that the bitfield width goes here.
- But it needs to be emitted earlier. */
+ But it needs to be emitted earlier. */
return ret;
}
@@ -2045,16 +2022,16 @@ get_tag (tag, sym, basic_type)
if (hash_ptr != (shash_t *) NULL
&& hash_ptr->tag_ptr != (tag_t *) NULL)
- {
- tag_ptr = hash_ptr->tag_ptr;
- if (sym != (localsym_t *) NULL)
- {
- tag_ptr->basic_type = basic_type;
- tag_ptr->ifd = cur_file_ptr->file_index;
- tag_ptr->sym = sym;
- }
- return tag_ptr;
- }
+ {
+ tag_ptr = hash_ptr->tag_ptr;
+ if (sym != (localsym_t *) NULL)
+ {
+ tag_ptr->basic_type = basic_type;
+ tag_ptr->ifd = cur_file_ptr->file_index;
+ tag_ptr->sym = sym;
+ }
+ return tag_ptr;
+ }
if (hash_ptr == (shash_t *) NULL)
{
@@ -2091,7 +2068,7 @@ get_tag (tag, sym, basic_type)
static void
add_unknown_tag (ptag)
- tag_t *ptag; /* pointer to tag information */
+ tag_t *ptag; /* pointer to tag information */
{
shash_t *hash_ptr = ptag->hash_ptr;
char *name = hash_ptr->string;
@@ -2101,7 +2078,7 @@ add_unknown_tag (ptag)
#ifdef ECOFF_DEBUG
if (debug > 1)
{
- char *agg_type = "{unknown aggregate type}";
+ char *agg_type = "{unknown aggregate type}";
switch (ptag->basic_type)
{
case bt_Struct: agg_type = "struct"; break;
@@ -2213,7 +2190,7 @@ ecoff_get_cur_proc_sym ()
static void
add_file (file_name, indx, fake)
const char *file_name; /* file name */
- int indx;
+ int indx ATTRIBUTE_UNUSED;
int fake;
{
register int first_ch;
@@ -2240,9 +2217,11 @@ add_file (file_name, indx, fake)
this if we see a .file directive with a string, since that
implies that some sort of debugging information is being
provided. */
- if (! symbol_table_frozen && debug_type == DEBUG_NONE)
+ if (! symbol_table_frozen && debug_type == DEBUG_UNSPECIFIED)
debug_type = DEBUG_ECOFF;
}
+ else
+ debug_type = DEBUG_NONE;
#ifndef NO_LISTING
if (listing)
@@ -2294,7 +2273,7 @@ add_file (file_name, indx, fake)
}
}
- /* If this is a new file, create it. */
+ /* If this is a new file, create it. */
if (fil_ptr == (efdr_t *) NULL)
{
if (file_desc.objects_last_page == file_desc.objects_per_page)
@@ -2334,7 +2313,7 @@ add_file (file_name, indx, fake)
last_file_ptr = &fil_ptr->next_file;
/* Add void & int types to the file (void should be first to catch
- errant 0's within the index fields). */
+ errant 0's within the index fields). */
fil_ptr->void_type = add_aux_sym_tir (&void_type_info,
hash_yes,
&cur_file_ptr->thash_head[0]);
@@ -2359,7 +2338,7 @@ ecoff_new_file (name)
/* This is a hand coded assembler file, so automatically turn on
debugging information. */
- if (debug_type == DEBUG_NONE)
+ if (debug_type == DEBUG_UNSPECIFIED)
debug_type = DEBUG_ECOFF;
}
@@ -2368,10 +2347,10 @@ ecoff_new_file (name)
/* Convert storage class to string. */
static char *
-sc_to_string(storage_class)
+sc_to_string (storage_class)
sc_t storage_class;
{
- switch(storage_class)
+ switch (storage_class)
{
case sc_Nil: return "Nil,";
case sc_Text: return "Text,";
@@ -2409,10 +2388,10 @@ sc_to_string(storage_class)
/* Convert symbol type to string. */
static char *
-st_to_string(symbol_type)
+st_to_string (symbol_type)
st_t symbol_type;
{
- switch(symbol_type)
+ switch (symbol_type)
{
case st_Nil: return "Nil,";
case st_Global: return "Global,";
@@ -2447,7 +2426,7 @@ st_to_string(symbol_type)
void
ecoff_directive_begin (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2485,7 +2464,7 @@ ecoff_directive_begin (ignore)
void
ecoff_directive_bend (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2544,7 +2523,7 @@ static int coff_inside_enumeration;
void
ecoff_directive_def (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2590,7 +2569,7 @@ ecoff_directive_def (ignore)
void
ecoff_directive_dim (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int dimens[N_TQ];
int i;
@@ -2640,7 +2619,7 @@ ecoff_directive_dim (ignore)
void
ecoff_directive_scl (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -2665,7 +2644,7 @@ ecoff_directive_scl (ignore)
void
ecoff_directive_size (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int sizes[N_TQ];
int i;
@@ -2715,7 +2694,7 @@ ecoff_directive_size (ignore)
void
ecoff_directive_type (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
tq_t *tq_ptr;
@@ -2734,13 +2713,13 @@ ecoff_directive_type (ignore)
coff_type.basic_type = map_coff_types[coff_type.orig_type];
tq_ptr = &coff_type.type_qualifiers[N_TQ];
- while (val &~ N_BTMASK)
+ while (val & ~N_BTMASK)
{
if (tq_ptr == &coff_type.type_qualifiers[0])
{
/* FIXME: We could handle this by setting the continued bit.
- There would still be a limit: the .type argument can not
- be infinite. */
+ There would still be a limit: the .type argument can not
+ be infinite. */
as_warn (_("The type of %s is too complex; it will be simplified"),
coff_sym_name);
break;
@@ -2764,11 +2743,11 @@ ecoff_directive_type (ignore)
if (tq_shft != &coff_type.type_qualifiers[0] && tq_shft[-1] == tq_Proc)
{
/* If this is a function, ignore it, so that we don't get two
- entries (one from the .ent, and one for the .def that
- precedes it). Save the type information so that the end
- block can properly add it after the begin block index. For
- MIPS knows what reason, we must strip off the function type
- at this point. */
+ entries (one from the .ent, and one for the .def that
+ precedes it). Save the type information so that the end
+ block can properly add it after the begin block index. For
+ MIPS knows what reason, we must strip off the function type
+ at this point. */
coff_is_function = 1;
tq_shft[-1] = tq_Nil;
}
@@ -2784,7 +2763,7 @@ ecoff_directive_type (ignore)
void
ecoff_directive_tag (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -2812,7 +2791,7 @@ ecoff_directive_tag (ignore)
void
ecoff_directive_val (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS exp;
@@ -2847,7 +2826,7 @@ ecoff_directive_val (ignore)
void
ecoff_directive_endef (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
symint_t indx;
@@ -2888,8 +2867,8 @@ ecoff_directive_endef (ignore)
}
/* If this is an array, make sure the same number of dimensions
- and sizes were passed, creating extra sizes for multiply
- dimensioned arrays if not passed. */
+ and sizes were passed, creating extra sizes for multiply
+ dimensioned arrays if not passed. */
coff_type.extra_sizes = 0;
if (diff)
{
@@ -2914,7 +2893,7 @@ ecoff_directive_endef (ignore)
&& coff_type.num_sizes - coff_type.extra_sizes == 1)
{
/* Is this a bitfield? This is indicated by a structure memeber
- having a size field that isn't an array. */
+ having a size field that isn't an array. */
coff_type.bitfield = 1;
}
@@ -2959,7 +2938,7 @@ ecoff_directive_endef (ignore)
break;
/* For the beginning of structs, unions, and enumerations, the
- size info needs to be passed in the value field. */
+ size info needs to be passed in the value field. */
case st_Block:
if (coff_type.num_sizes - coff_type.num_dims - coff_type.extra_sizes
!= 1)
@@ -2974,8 +2953,8 @@ ecoff_directive_endef (ignore)
break;
/* For the end of structs, unions, and enumerations, omit the
- name which is always ".eos". This needs to be done last, so
- that any error reporting above gives the correct name. */
+ name which is always ".eos". This needs to be done last, so
+ that any error reporting above gives the correct name. */
case st_End:
free (name);
name = (char *) NULL;
@@ -2984,10 +2963,10 @@ ecoff_directive_endef (ignore)
break;
/* Members of structures and unions that aren't bitfields, need
- to adjust the value from a byte offset to a bit offset.
- Members of enumerations do not have the value adjusted, and
- can be distinguished by indx == indexNil. For enumerations,
- update the maximum enumeration value. */
+ to adjust the value from a byte offset to a bit offset.
+ Members of enumerations do not have the value adjusted, and
+ can be distinguished by indx == indexNil. For enumerations,
+ update the maximum enumeration value. */
case st_Member:
if (! coff_type.bitfield && ! coff_inside_enumeration)
coff_value *= 8;
@@ -3027,7 +3006,7 @@ ecoff_directive_endef (ignore)
void
ecoff_directive_end (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -3084,7 +3063,7 @@ ecoff_directive_end (ignore)
void
ecoff_directive_ent (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
@@ -3137,7 +3116,7 @@ ecoff_directive_ent (ignore)
void
ecoff_directive_extern (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -3162,7 +3141,7 @@ ecoff_directive_extern (ignore)
void
ecoff_directive_file (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int indx;
char *name;
@@ -3189,7 +3168,7 @@ ecoff_directive_file (ignore)
void
ecoff_directive_fmask (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3218,7 +3197,7 @@ ecoff_directive_fmask (ignore)
void
ecoff_directive_frame (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3245,9 +3224,10 @@ ecoff_directive_frame (ignore)
cur_proc_ptr->pdr.pcreg = tc_get_register (0);
-#if 0 /* Alpha-OSF1 adds "the offset of saved $a0 from $sp", according
- to Sandro. I don't yet know where this value should be stored, if
- anywhere. */
+#if 0
+ /* Alpha-OSF1 adds "the offset of saved $a0 from $sp", according to
+ Sandro. I don't yet know where this value should be stored, if
+ anywhere. */
demand_empty_rest_of_line ();
#else
s_ignore (42);
@@ -3258,7 +3238,7 @@ ecoff_directive_frame (ignore)
void
ecoff_directive_mask (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
@@ -3287,7 +3267,7 @@ ecoff_directive_mask (ignore)
void
ecoff_directive_loc (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
lineno_list_t *list;
symint_t lineno;
@@ -3384,11 +3364,11 @@ ecoff_fix_loc (old_frag, old_frag_offset)
static void
mark_stabs (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (! stabs_seen)
{
- /* Add a dummy @stabs dymbol. */
+ /* Add a dummy @stabs dymbol. */
stabs_seen = 1;
(void) add_ecoff_symbol (stabs_symbol, stNil, scInfo,
(symbolS *) NULL,
@@ -3399,7 +3379,7 @@ mark_stabs (ignore)
/* Parse .weakext directives. */
#ifndef TC_MIPS
-/* For TC_MIPS use the version in tc-mips.c. */
+/* For TC_MIPS use the version in tc-mips.c. */
void
ecoff_directive_weakext (ignore)
int ignore;
@@ -3434,7 +3414,7 @@ ecoff_directive_weakext (ignore)
if (exp.X_op != O_symbol)
{
as_bad (_("bad .weakext directive"));
- ignore_rest_of_line();
+ ignore_rest_of_line ();
return;
}
symbol_set_value_expression (symbolP, &exp);
@@ -3481,7 +3461,7 @@ ecoff_directive_weakext (ignore)
void
ecoff_stab (sec, what, string, type, other, desc)
- segT sec;
+ segT sec ATTRIBUTE_UNUSED;
int what;
const char *string;
int type;
@@ -3640,13 +3620,13 @@ ecoff_frob_symbol (sym)
{
if (S_IS_COMMON (sym)
&& S_GET_VALUE (sym) > 0
- && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput))
+ && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput))
{
static asection scom_section;
static asymbol scom_symbol;
/* We must construct a fake section similar to bfd_com_section
- but with the name .scommon. */
+ but with the name .scommon. */
if (scom_section.name == NULL)
{
scom_section = bfd_com_section;
@@ -3711,7 +3691,7 @@ ecoff_padding_adjust (backend, buf, bufend, offset, bufptrptr)
unsigned long add;
add = align - (offset & (align - 1));
- if (*bufend - (*buf + offset) < add)
+ if ((unsigned long) (*bufend - (*buf + offset)) < add)
(void) ecoff_add_bytes (buf, bufend, *buf + offset, add);
memset (*buf + offset, 0, add);
offset += add;
@@ -3761,7 +3741,7 @@ ecoff_build_lineno (backend, buf, bufend, offset, linecntptr)
embedded PIC code, it will put strings in the .text section
before the first procedure. We cope by inserting a dummy line if
the address of the first procedure is not 0. Hopefully this
- won't screw things up too badly.
+ won't screw things up too badly.
Don't do this for ECOFF assembly source line numbers. They work
without this extra attention. */
@@ -3789,8 +3769,8 @@ ecoff_build_lineno (backend, buf, bufend, offset, linecntptr)
long delta;
/* Get the offset to the memory address of the next line number
- (in words). Do this first, so that we can skip ahead to the
- next useful line number entry. */
+ (in words). Do this first, so that we can skip ahead to the
+ next useful line number entry. */
if (l->next == (lineno_list_t *) NULL)
{
/* We want a count of zero, but it will be decremented
@@ -4030,11 +4010,11 @@ ecoff_build_symbols (backend, buf, bufend, offset)
symint_t indx;
/* The value of a block start symbol is the
- offset from the start of the procedure. For
- other symbols we just use the gas value (but
- we must offset it by the vma of the section,
- just as BFD does, because BFD will not see
- this value). */
+ offset from the start of the procedure. For
+ other symbols we just use the gas value (but
+ we must offset it by the vma of the section,
+ just as BFD does, because BFD will not see
+ this value). */
if (sym_ptr->ecoff_sym.asym.st == (int) st_Block
&& sym_ptr->ecoff_sym.asym.sc == (int) sc_Text)
{
@@ -4066,8 +4046,8 @@ ecoff_build_symbols (backend, buf, bufend, offset)
sym_ptr->ecoff_sym.asym.st = st_StaticProc;
/* Get the type and storage class based on where
- the symbol actually wound up. Traditionally,
- N_LBRAC and N_RBRAC are *not* relocated. */
+ the symbol actually wound up. Traditionally,
+ N_LBRAC and N_RBRAC are *not* relocated. */
indx = sym_ptr->ecoff_sym.asym.index;
if (sym_ptr->ecoff_sym.asym.st == st_Nil
&& sym_ptr->ecoff_sym.asym.sc == sc_Nil
@@ -4105,7 +4085,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
s = symbol_get_obj (as_sym)->ecoff_extern_size;
if (s == 0
- || s > bfd_get_gp_size (stdoutput))
+ || s > (unsigned) bfd_get_gp_size (stdoutput))
sc = sc_Undefined;
else
{
@@ -4120,7 +4100,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
{
if (S_GET_VALUE (as_sym) > 0
&& (S_GET_VALUE (as_sym)
- <= bfd_get_gp_size (stdoutput)))
+ <= (unsigned) bfd_get_gp_size (stdoutput)))
sc = sc_SCommon;
else
sc = sc_Common;
@@ -4143,8 +4123,8 @@ ecoff_build_symbols (backend, buf, bufend, offset)
else
{
/* This must be a user named section.
- This is not possible in ECOFF, but it
- is in ELF. */
+ This is not possible in ECOFF, but it
+ is in ELF. */
sc = sc_Data;
}
@@ -4153,11 +4133,11 @@ ecoff_build_symbols (backend, buf, bufend, offset)
}
/* This is just an external symbol if it is
- outside a procedure and it has a type.
- FIXME: g++ will generate symbols which have
- different names in the debugging information
- than the actual symbol. Should we handle
- them here? */
+ outside a procedure and it has a type.
+ FIXME: g++ will generate symbols which have
+ different names in the debugging information
+ than the actual symbol. Should we handle
+ them here? */
if ((S_IS_EXTERNAL (as_sym)
|| S_IS_WEAK (as_sym)
|| ! S_IS_DEFINED (as_sym))
@@ -4167,14 +4147,14 @@ ecoff_build_symbols (backend, buf, bufend, offset)
local = 0;
/* This is just an external symbol if it is a
- common symbol. */
+ common symbol. */
if (S_IS_COMMON (as_sym))
local = 0;
/* If an st_end symbol has an associated gas
- symbol, then it is a local label created for
- a .bend or .end directive. Stabs line
- numbers will have \001 in the names. */
+ symbol, then it is a local label created for
+ a .bend or .end directive. Stabs line
+ numbers will have \001 in the names. */
if (local
&& sym_ptr->ecoff_sym.asym.st != st_End
&& strchr (sym_ptr->name, '\001') == 0)
@@ -4222,10 +4202,10 @@ ecoff_build_symbols (backend, buf, bufend, offset)
}
/* The value of the symbol marking the end of a
- procedure is the size of the procedure. The
- value of the symbol marking the end of a
- block is the offset from the start of the
- procedure to the block. */
+ procedure is the size of the procedure. The
+ value of the symbol marking the end of a
+ block is the offset from the start of the
+ procedure to the block. */
if (begin_type == st_Proc
|| begin_type == st_StaticProc)
{
@@ -4239,7 +4219,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
- S_GET_VALUE (begin_ptr->as_sym));
/* If the size is odd, this is probably a
- mips16 function; force it to be even. */
+ mips16 function; force it to be even. */
if ((sym_ptr->ecoff_sym.asym.value & 1) != 0)
++sym_ptr->ecoff_sym.asym.value;
@@ -4275,7 +4255,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
if (local)
{
- if (*bufend - sym_out < external_sym_size)
+ if ((bfd_size_type)(*bufend - sym_out) < external_sym_size)
sym_out = ecoff_add_bytes (buf, bufend,
sym_out,
external_sym_size);
@@ -4305,7 +4285,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
sym_ptr->ecoff_sym.ifd = fil_ptr->file_index;
/* Don't try to merge an FDR which has an
- external symbol attached to it. */
+ external symbol attached to it. */
if (S_IS_EXTERNAL (as_sym) || S_IS_WEAK (as_sym))
fil_ptr->fdr.fMerge = 0;
}
@@ -4386,14 +4366,14 @@ ecoff_build_procs (backend, buf, bufend, offset)
if (first)
{
/* This code used to force the adr of the very
- first fdr to be 0. However, the native tools
- don't do that, and I can't remember why it
- used to work that way, so I took it out. */
+ first fdr to be 0. However, the native tools
+ don't do that, and I can't remember why it
+ used to work that way, so I took it out. */
fil_ptr->fdr.adr = adr;
first = 0;
}
proc_ptr->pdr.adr = adr - fil_ptr->fdr.adr;
- if (*bufend - pdr_out < external_pdr_size)
+ if ((bfd_size_type)(*bufend - pdr_out) < external_pdr_size)
pdr_out = ecoff_add_bytes (buf, bufend,
pdr_out,
external_pdr_size);
@@ -4466,7 +4446,8 @@ ecoff_build_aux (backend, buf, bufend, offset)
aux_end = aux_ptr + aux_cnt;
for (; aux_ptr < aux_end; aux_ptr++)
{
- if (*bufend - (char *) aux_out < sizeof (union aux_ext))
+ if ((unsigned long) (*bufend - (char *) aux_out)
+ < sizeof (union aux_ext))
aux_out = ((union aux_ext *)
ecoff_add_bytes (buf, bufend,
(char *) aux_out,
@@ -4551,7 +4532,7 @@ ecoff_build_strings (buf, bufend, offset, vp)
else
str_cnt = vp->objects_per_page;
- if (*bufend - str_out < str_cnt)
+ if ((unsigned long)(*bufend - str_out) < str_cnt)
str_out = ecoff_add_bytes (buf, bufend, str_out, str_cnt);
memcpy (str_out, str_link->datum->byte, str_cnt);
@@ -4642,7 +4623,7 @@ ecoff_build_fdr (backend, buf, bufend, offset)
fil_end = fil_ptr + fil_cnt;
for (; fil_ptr < fil_end; fil_ptr++)
{
- if (*bufend - fdr_out < external_fdr_size)
+ if ((bfd_size_type)(*bufend - fdr_out) < external_fdr_size)
fdr_out = ecoff_add_bytes (buf, bufend, fdr_out,
external_fdr_size);
(*swap_fdr_out) (stdoutput, &fil_ptr->fdr, fdr_out);
@@ -4700,7 +4681,7 @@ ecoff_build_debug (hdr, bufp, backend)
efdr_t *fil_ptr;
int end_warning;
efdr_t *hold_file_ptr;
- proc_t * hold_proc_ptr;
+ proc_t *hold_proc_ptr;
symbolS *sym;
char *buf;
char *bufend;
@@ -4792,7 +4773,7 @@ ecoff_build_debug (hdr, bufp, backend)
space at this point. */
hdr->ipdMax = proc_cnt;
hdr->cbPdOffset = offset;
- if (bufend - (buf + offset) < proc_cnt * external_pdr_size)
+ if ((bfd_size_type)(bufend - (buf + offset)) < proc_cnt * external_pdr_size)
(void) ecoff_add_bytes (&buf, &bufend, buf + offset,
proc_cnt * external_pdr_size);
offset += proc_cnt * external_pdr_size;
@@ -4871,7 +4852,6 @@ allocate_cluster (npages)
return value;
}
-
static page_type *cluster_ptr = NULL;
static unsigned long pages_left = 0;
@@ -4893,7 +4873,7 @@ allocate_page ()
pages_left--;
return cluster_ptr++;
-#else /* MALLOC_CHECK */
+#else /* MALLOC_CHECK */
page_type *ptr;
@@ -4901,7 +4881,7 @@ allocate_page ()
memset (ptr, 0, PAGE_USIZE);
return ptr;
-#endif /* MALLOC_CHECK */
+#endif /* MALLOC_CHECK */
}
/* Allocate scoping information. */
@@ -4914,23 +4894,23 @@ allocate_scope ()
#ifndef MALLOC_CHECK
- ptr = alloc_counts[(int)alloc_type_scope].free_list.f_scope;
+ ptr = alloc_counts[(int) alloc_type_scope].free_list.f_scope;
if (ptr != (scope_t *) NULL)
- alloc_counts[ (int)alloc_type_scope ].free_list.f_scope = ptr->free;
+ alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr->free;
else
{
- register int unallocated = alloc_counts[(int)alloc_type_scope].unallocated;
- register page_type *cur_page = alloc_counts[(int)alloc_type_scope].cur_page;
+ register int unallocated = alloc_counts[(int) alloc_type_scope].unallocated;
+ register page_type *cur_page = alloc_counts[(int) alloc_type_scope].cur_page;
if (unallocated == 0)
{
unallocated = PAGE_SIZE / sizeof (scope_t);
- alloc_counts[(int)alloc_type_scope].cur_page = cur_page = allocate_page ();
- alloc_counts[(int)alloc_type_scope].total_pages++;
+ alloc_counts[(int) alloc_type_scope].cur_page = cur_page = allocate_page ();
+ alloc_counts[(int) alloc_type_scope].total_pages++;
}
ptr = &cur_page->scope[--unallocated];
- alloc_counts[(int)alloc_type_scope].unallocated = unallocated;
+ alloc_counts[(int) alloc_type_scope].unallocated = unallocated;
}
#else
@@ -4939,7 +4919,7 @@ allocate_scope ()
#endif
- alloc_counts[(int)alloc_type_scope].total_alloc++;
+ alloc_counts[(int) alloc_type_scope].total_alloc++;
*ptr = initial_scope;
return ptr;
}
@@ -4950,11 +4930,11 @@ static void
free_scope (ptr)
scope_t *ptr;
{
- alloc_counts[(int)alloc_type_scope].total_free++;
+ alloc_counts[(int) alloc_type_scope].total_free++;
#ifndef MALLOC_CHECK
- ptr->free = alloc_counts[(int)alloc_type_scope].free_list.f_scope;
- alloc_counts[(int)alloc_type_scope].free_list.f_scope = ptr;
+ ptr->free = alloc_counts[(int) alloc_type_scope].free_list.f_scope;
+ alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr;
#else
free ((PTR) ptr);
#endif
@@ -4970,18 +4950,18 @@ allocate_vlinks ()
#ifndef MALLOC_CHECK
- register int unallocated = alloc_counts[(int)alloc_type_vlinks].unallocated;
- register page_type *cur_page = alloc_counts[(int)alloc_type_vlinks].cur_page;
+ register int unallocated = alloc_counts[(int) alloc_type_vlinks].unallocated;
+ register page_type *cur_page = alloc_counts[(int) alloc_type_vlinks].cur_page;
if (unallocated == 0)
{
unallocated = PAGE_SIZE / sizeof (vlinks_t);
- alloc_counts[(int)alloc_type_vlinks].cur_page = cur_page = allocate_page ();
- alloc_counts[(int)alloc_type_vlinks].total_pages++;
+ alloc_counts[(int) alloc_type_vlinks].cur_page = cur_page = allocate_page ();
+ alloc_counts[(int) alloc_type_vlinks].total_pages++;
}
ptr = &cur_page->vlinks[--unallocated];
- alloc_counts[(int)alloc_type_vlinks].unallocated = unallocated;
+ alloc_counts[(int) alloc_type_vlinks].unallocated = unallocated;
#else
@@ -4989,7 +4969,7 @@ allocate_vlinks ()
#endif
- alloc_counts[(int)alloc_type_vlinks].total_alloc++;
+ alloc_counts[(int) alloc_type_vlinks].total_alloc++;
*ptr = initial_vlinks;
return ptr;
}
@@ -5004,18 +4984,18 @@ allocate_shash ()
#ifndef MALLOC_CHECK
- register int unallocated = alloc_counts[(int)alloc_type_shash].unallocated;
- register page_type *cur_page = alloc_counts[(int)alloc_type_shash].cur_page;
+ register int unallocated = alloc_counts[(int) alloc_type_shash].unallocated;
+ register page_type *cur_page = alloc_counts[(int) alloc_type_shash].cur_page;
if (unallocated == 0)
{
unallocated = PAGE_SIZE / sizeof (shash_t);
- alloc_counts[(int)alloc_type_shash].cur_page = cur_page = allocate_page ();
- alloc_counts[(int)alloc_type_shash].total_pages++;
+ alloc_counts[(int) alloc_type_shash].cur_page = cur_page = allocate_page ();
+ alloc_counts[(int) alloc_type_shash].total_pages++;
}
ptr = &cur_page->shash[--unallocated];
- alloc_counts[(int)alloc_type_shash].unallocated = unallocated;
+ alloc_counts[(int) alloc_type_shash].unallocated = unallocated;
#else
@@ -5023,7 +5003,7 @@ allocate_shash ()
#endif
- alloc_counts[(int)alloc_type_shash].total_alloc++;
+ alloc_counts[(int) alloc_type_shash].total_alloc++;
*ptr = initial_shash;
return ptr;
}
@@ -5038,18 +5018,18 @@ allocate_thash ()
#ifndef MALLOC_CHECK
- register int unallocated = alloc_counts[(int)alloc_type_thash].unallocated;
- register page_type *cur_page = alloc_counts[(int)alloc_type_thash].cur_page;
+ register int unallocated = alloc_counts[(int) alloc_type_thash].unallocated;
+ register page_type *cur_page = alloc_counts[(int) alloc_type_thash].cur_page;
if (unallocated == 0)
{
unallocated = PAGE_SIZE / sizeof (thash_t);
- alloc_counts[(int)alloc_type_thash].cur_page = cur_page = allocate_page ();
- alloc_counts[(int)alloc_type_thash].total_pages++;
+ alloc_counts[(int) alloc_type_thash].cur_page = cur_page = allocate_page ();
+ alloc_counts[(int) alloc_type_thash].total_pages++;
}
ptr = &cur_page->thash[--unallocated];
- alloc_counts[(int)alloc_type_thash].unallocated = unallocated;
+ alloc_counts[(int) alloc_type_thash].unallocated = unallocated;
#else
@@ -5057,7 +5037,7 @@ allocate_thash ()
#endif
- alloc_counts[(int)alloc_type_thash].total_alloc++;
+ alloc_counts[(int) alloc_type_thash].total_alloc++;
*ptr = initial_thash;
return ptr;
}
@@ -5072,23 +5052,23 @@ allocate_tag ()
#ifndef MALLOC_CHECK
- ptr = alloc_counts[(int)alloc_type_tag].free_list.f_tag;
+ ptr = alloc_counts[(int) alloc_type_tag].free_list.f_tag;
if (ptr != (tag_t *) NULL)
- alloc_counts[(int)alloc_type_tag].free_list.f_tag = ptr->free;
+ alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr->free;
else
{
- register int unallocated = alloc_counts[(int)alloc_type_tag].unallocated;
- register page_type *cur_page = alloc_counts[(int)alloc_type_tag].cur_page;
+ register int unallocated = alloc_counts[(int) alloc_type_tag].unallocated;
+ register page_type *cur_page = alloc_counts[(int) alloc_type_tag].cur_page;
if (unallocated == 0)
{
unallocated = PAGE_SIZE / sizeof (tag_t);
- alloc_counts[(int)alloc_type_tag].cur_page = cur_page = allocate_page ();
- alloc_counts[(int)alloc_type_tag].total_pages++;
+ alloc_counts[(int) alloc_type_tag].cur_page = cur_page = allocate_page ();
+ alloc_counts[(int) alloc_type_tag].total_pages++;
}
ptr = &cur_page->tag[--unallocated];
- alloc_counts[(int)alloc_type_tag].unallocated = unallocated;
+ alloc_counts[(int) alloc_type_tag].unallocated = unallocated;
}
#else
@@ -5097,7 +5077,7 @@ allocate_tag ()
#endif
- alloc_counts[(int)alloc_type_tag].total_alloc++;
+ alloc_counts[(int) alloc_type_tag].total_alloc++;
*ptr = initial_tag;
return ptr;
}
@@ -5108,11 +5088,11 @@ static void
free_tag (ptr)
tag_t *ptr;
{
- alloc_counts[(int)alloc_type_tag].total_free++;
+ alloc_counts[(int) alloc_type_tag].total_free++;
#ifndef MALLOC_CHECK
- ptr->free = alloc_counts[(int)alloc_type_tag].free_list.f_tag;
- alloc_counts[(int)alloc_type_tag].free_list.f_tag = ptr;
+ ptr->free = alloc_counts[(int) alloc_type_tag].free_list.f_tag;
+ alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr;
#else
free ((PTR_T) ptr);
#endif
@@ -5128,18 +5108,18 @@ allocate_forward ()
#ifndef MALLOC_CHECK
- register int unallocated = alloc_counts[(int)alloc_type_forward].unallocated;
- register page_type *cur_page = alloc_counts[(int)alloc_type_forward].cur_page;
+ register int unallocated = alloc_counts[(int) alloc_type_forward].unallocated;
+ register page_type *cur_page = alloc_counts[(int) alloc_type_forward].cur_page;
if (unallocated == 0)
{
unallocated = PAGE_SIZE / sizeof (forward_t);
- alloc_counts[(int)alloc_type_forward].cur_page = cur_page = allocate_page ();
- alloc_counts[(int)alloc_type_forward].total_pages++;
+ alloc_counts[(int) alloc_type_forward].cur_page = cur_page = allocate_page ();
+ alloc_counts[(int) alloc_type_forward].total_pages++;
}
ptr = &cur_page->forward[--unallocated];
- alloc_counts[(int)alloc_type_forward].unallocated = unallocated;
+ alloc_counts[(int) alloc_type_forward].unallocated = unallocated;
#else
@@ -5147,7 +5127,7 @@ allocate_forward ()
#endif
- alloc_counts[(int)alloc_type_forward].total_alloc++;
+ alloc_counts[(int) alloc_type_forward].total_alloc++;
*ptr = initial_forward;
return ptr;
}
@@ -5162,23 +5142,23 @@ allocate_thead ()
#ifndef MALLOC_CHECK
- ptr = alloc_counts[(int)alloc_type_thead].free_list.f_thead;
+ ptr = alloc_counts[(int) alloc_type_thead].free_list.f_thead;
if (ptr != (thead_t *) NULL)
- alloc_counts[ (int)alloc_type_thead ].free_list.f_thead = ptr->free;
+ alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr->free;
else
{
- register int unallocated = alloc_counts[(int)alloc_type_thead].unallocated;
- register page_type *cur_page = alloc_counts[(int)alloc_type_thead].cur_page;
+ register int unallocated = alloc_counts[(int) alloc_type_thead].unallocated;
+ register page_type *cur_page = alloc_counts[(int) alloc_type_thead].cur_page;
if (unallocated == 0)
{
unallocated = PAGE_SIZE / sizeof (thead_t);
- alloc_counts[(int)alloc_type_thead].cur_page = cur_page = allocate_page ();
- alloc_counts[(int)alloc_type_thead].total_pages++;
+ alloc_counts[(int) alloc_type_thead].cur_page = cur_page = allocate_page ();
+ alloc_counts[(int) alloc_type_thead].total_pages++;
}
ptr = &cur_page->thead[--unallocated];
- alloc_counts[(int)alloc_type_thead].unallocated = unallocated;
+ alloc_counts[(int) alloc_type_thead].unallocated = unallocated;
}
#else
@@ -5187,7 +5167,7 @@ allocate_thead ()
#endif
- alloc_counts[(int)alloc_type_thead].total_alloc++;
+ alloc_counts[(int) alloc_type_thead].total_alloc++;
*ptr = initial_thead;
return ptr;
}
@@ -5198,11 +5178,11 @@ static void
free_thead (ptr)
thead_t *ptr;
{
- alloc_counts[(int)alloc_type_thead].total_free++;
+ alloc_counts[(int) alloc_type_thead].total_free++;
#ifndef MALLOC_CHECK
- ptr->free = (thead_t *) alloc_counts[(int)alloc_type_thead].free_list.f_thead;
- alloc_counts[(int)alloc_type_thead].free_list.f_thead = ptr;
+ ptr->free = (thead_t *) alloc_counts[(int) alloc_type_thead].free_list.f_thead;
+ alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr;
#else
free ((PTR_T) ptr);
#endif
@@ -5216,18 +5196,18 @@ allocate_lineno_list ()
#ifndef MALLOC_CHECK
- register int unallocated = alloc_counts[(int)alloc_type_lineno].unallocated;
- register page_type *cur_page = alloc_counts[(int)alloc_type_lineno].cur_page;
+ register int unallocated = alloc_counts[(int) alloc_type_lineno].unallocated;
+ register page_type *cur_page = alloc_counts[(int) alloc_type_lineno].cur_page;
if (unallocated == 0)
{
unallocated = PAGE_SIZE / sizeof (lineno_list_t);
- alloc_counts[(int)alloc_type_lineno].cur_page = cur_page = allocate_page ();
- alloc_counts[(int)alloc_type_lineno].total_pages++;
+ alloc_counts[(int) alloc_type_lineno].cur_page = cur_page = allocate_page ();
+ alloc_counts[(int) alloc_type_lineno].total_pages++;
}
ptr = &cur_page->lineno[--unallocated];
- alloc_counts[(int)alloc_type_lineno].unallocated = unallocated;
+ alloc_counts[(int) alloc_type_lineno].unallocated = unallocated;
#else
@@ -5235,7 +5215,7 @@ allocate_lineno_list ()
#endif
- alloc_counts[(int)alloc_type_lineno].total_alloc++;
+ alloc_counts[(int) alloc_type_lineno].total_alloc++;
*ptr = initial_lineno_list;
return ptr;
}
@@ -5257,7 +5237,7 @@ ecoff_set_gp_prolog_size (sz)
cur_proc_ptr->pdr.gp_used = 1;
}
-int
+int
ecoff_no_current_file ()
{
return cur_file_ptr == (efdr_t *) NULL;
@@ -5272,7 +5252,7 @@ ecoff_generate_asm_lineno ()
as_where (&filename, &lineno);
- if (current_stabs_filename == (char *)NULL
+ if (current_stabs_filename == (char *) NULL
|| strcmp (current_stabs_filename, filename))
add_file (filename, 0, 1);
@@ -5297,7 +5277,7 @@ ecoff_generate_asm_lineno ()
pl = &noproc_lineno;
while (*pl != (lineno_list_t *) NULL)
- pl = &(*pl)->next;
+ pl = &(*pl)->next;
*pl = list;
}
else
diff --git a/gnu/usr.bin/binutils/gas/ecoff.h b/gnu/usr.bin/binutils/gas/ecoff.h
index 8ac65f82617..f6b96c61a2a 100644
--- a/gnu/usr.bin/binutils/gas/ecoff.h
+++ b/gnu/usr.bin/binutils/gas/ecoff.h
@@ -1,5 +1,6 @@
/* ecoff.h -- header file for ECOFF debugging support
- Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
Put together by Ian Lance Taylor <ian@cygnus.com>.
diff --git a/gnu/usr.bin/binutils/gas/emul.h b/gnu/usr.bin/binutils/gas/emul.h
index 97c46d8b2a5..465f8441c2e 100644
--- a/gnu/usr.bin/binutils/gas/emul.h
+++ b/gnu/usr.bin/binutils/gas/emul.h
@@ -1,3 +1,23 @@
+/* emul.h. File format emulation routines
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#ifndef EMUL_DEFS
#define EMUL_DEFS
diff --git a/gnu/usr.bin/binutils/gas/expr.c b/gnu/usr.bin/binutils/gas/expr.c
index 7cca437493f..3b49ac73d8f 100644
--- a/gnu/usr.bin/binutils/gas/expr.c
+++ b/gnu/usr.bin/binutils/gas/expr.c
@@ -1,5 +1,6 @@
/* expr.c -operands, expressions-
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,14 +18,12 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
-/*
- * This is really a branch office of as-read.c. I split it out to clearly
- * distinguish the world of expressions from the world of statements.
- * (It also gives smaller files to re-compile.)
- * Here, "operand"s are of expressions, not instructions.
- */
+/* This is really a branch office of as-read.c. I split it out to clearly
+ distinguish the world of expressions from the world of statements.
+ (It also gives smaller files to re-compile.)
+ Here, "operand"s are of expressions, not instructions. */
#include <ctype.h>
#include <string.h>
@@ -43,15 +42,14 @@ static void mri_char_constant PARAMS ((expressionS *));
static void current_location PARAMS ((expressionS *));
static void clean_up_expression PARAMS ((expressionS * expressionP));
static segT operand PARAMS ((expressionS *));
-static operatorT operator PARAMS ((void));
+static operatorT operator PARAMS ((int *));
extern const char EXP_CHARS[], FLT_CHARS[];
/* We keep a mapping of expression symbols to file positions, so that
we can provide better error messages. */
-struct expr_symbol_line
-{
+struct expr_symbol_line {
struct expr_symbol_line *next;
symbolS *sym;
char *file;
@@ -210,10 +208,8 @@ expr_build_dot ()
return make_expr_symbol (&e);
}
-/*
- * Build any floating-point literal here.
- * Also build any bignum literal here.
- */
+/* Build any floating-point literal here.
+ Also build any bignum literal here. */
/* Seems atof_machine can backscan through generic_bignum and hit whatever
happens to be loaded before it in memory. And its way too complicated
@@ -221,23 +217,23 @@ expr_build_dot ()
and never write into the early words, thus they'll always be zero.
I hate Dean's floating-point code. Bleh. */
LITTLENUM_TYPE generic_bignum[SIZE_OF_LARGE_NUMBER + 6];
-FLONUM_TYPE generic_floating_point_number =
-{
- &generic_bignum[6], /* low (JF: Was 0) */
- &generic_bignum[SIZE_OF_LARGE_NUMBER + 6 - 1], /* high JF: (added +6) */
- 0, /* leader */
- 0, /* exponent */
- 0 /* sign */
+
+FLONUM_TYPE generic_floating_point_number = {
+ &generic_bignum[6], /* low. (JF: Was 0) */
+ &generic_bignum[SIZE_OF_LARGE_NUMBER + 6 - 1], /* high. JF: (added +6) */
+ 0, /* leader. */
+ 0, /* exponent. */
+ 0 /* sign. */
};
-/* If nonzero, we've been asked to assemble nan, +inf or -inf */
+
+/* If nonzero, we've been asked to assemble nan, +inf or -inf. */
int generic_floating_point_magic;
static void
floating_constant (expressionP)
expressionS *expressionP;
{
- /* input_line_pointer->*/
- /* floating-point constant. */
+ /* input_line_pointer -> floating-point constant. */
int error_code;
error_code = atof_generic (&input_line_pointer, ".", EXP_CHARS,
@@ -255,13 +251,13 @@ floating_constant (expressionP)
}
}
expressionP->X_op = O_big;
- /* input_line_pointer->just after constant, */
- /* which may point to whitespace. */
+ /* input_line_pointer -> just after constant, which may point to
+ whitespace. */
expressionP->X_add_number = -1;
}
-static valueT
-generic_bignum_to_int32 ()
+static valueT
+generic_bignum_to_int32 ()
{
valueT number =
((generic_bignum[1] & LITTLENUM_MASK) << LITTLENUM_NUMBER_OF_BITS)
@@ -271,17 +267,17 @@ generic_bignum_to_int32 ()
}
#ifdef BFD64
-static valueT
-generic_bignum_to_int64 ()
+static valueT
+generic_bignum_to_int64 ()
{
- valueT number =
- ((((((((valueT) generic_bignum[3] & LITTLENUM_MASK)
- << LITTLENUM_NUMBER_OF_BITS)
- | ((valueT) generic_bignum[2] & LITTLENUM_MASK))
- << LITTLENUM_NUMBER_OF_BITS)
- | ((valueT) generic_bignum[1] & LITTLENUM_MASK))
- << LITTLENUM_NUMBER_OF_BITS)
- | ((valueT) generic_bignum[0] & LITTLENUM_MASK));
+ valueT number =
+ ((((((((valueT) generic_bignum[3] & LITTLENUM_MASK)
+ << LITTLENUM_NUMBER_OF_BITS)
+ | ((valueT) generic_bignum[2] & LITTLENUM_MASK))
+ << LITTLENUM_NUMBER_OF_BITS)
+ | ((valueT) generic_bignum[1] & LITTLENUM_MASK))
+ << LITTLENUM_NUMBER_OF_BITS)
+ | ((valueT) generic_bignum[0] & LITTLENUM_MASK));
return number;
}
#endif
@@ -291,19 +287,19 @@ integer_constant (radix, expressionP)
int radix;
expressionS *expressionP;
{
- char *start; /* start of number. */
+ char *start; /* Start of number. */
char *suffix = NULL;
char c;
- valueT number; /* offset or (absolute) value */
- short int digit; /* value of next digit in current radix */
- short int maxdig = 0;/* highest permitted digit value. */
- int too_many_digits = 0; /* if we see >= this number of */
- char *name; /* points to name of symbol */
- symbolS *symbolP; /* points to symbol */
+ valueT number; /* Offset or (absolute) value. */
+ short int digit; /* Value of next digit in current radix. */
+ short int maxdig = 0; /* Highest permitted digit value. */
+ int too_many_digits = 0; /* If we see >= this number of. */
+ char *name; /* Points to name of symbol. */
+ symbolS *symbolP; /* Points to symbol. */
- int small; /* true if fits in 32 bits. */
+ int small; /* True if fits in 32 bits. */
- /* May be bignum, or may fit in 32 bits. */
+ /* May be bignum, or may fit in 32 bits. */
/* Most numbers fit into 32 bits, and we want this case to be fast.
so we pretend it will fit into 32 bits. If, after making up a 32
bit number, we realise that we have scanned more digits than
@@ -316,7 +312,7 @@ integer_constant (radix, expressionP)
32 bits, and change it back to a 32-bit number if it fits. The
number we are looking for is expected to be positive, but if it
fits into 32 bits as an unsigned number, we let it be a 32-bit
- number. The cavalier approach is for speed in ordinary cases. */
+ number. The cavalier approach is for speed in ordinary cases. */
/* This has been extended for 64 bits. We blindly assume that if
you're compiling in 64-bit mode, the target is a 64-bit machine.
This should be cleaned up. */
@@ -389,7 +385,7 @@ integer_constant (radix, expressionP)
break;
case 10:
maxdig = radix = 10;
- too_many_digits = (valuesize + 11) / 4; /* very rough */
+ too_many_digits = (valuesize + 11) / 4; /* Very rough. */
}
#undef valuesize
start = input_line_pointer;
@@ -400,26 +396,26 @@ integer_constant (radix, expressionP)
{
number = number * radix + digit;
}
- /* c contains character after number. */
- /* input_line_pointer->char after c. */
+ /* c contains character after number. */
+ /* input_line_pointer->char after c. */
small = (input_line_pointer - start - 1) < too_many_digits;
- if (radix == 16 && c == '_')
+ if (radix == 16 && c == '_')
{
/* This is literal of the form 0x333_0_12345678_1.
This example is equivalent to 0x00000333000000001234567800000001. */
int num_little_digits = 0;
int i;
- input_line_pointer = start; /*->1st digit. */
+ input_line_pointer = start; /* -> 1st digit. */
know (LITTLENUM_NUMBER_OF_BITS == 16);
- for (c = '_'; c == '_'; num_little_digits+=2)
+ for (c = '_'; c == '_'; num_little_digits += 2)
{
- /* Convert one 64-bit word. */
- int ndigit = 0;
+ /* Convert one 64-bit word. */
+ int ndigit = 0;
number = 0;
for (c = *input_line_pointer++;
(digit = hex_value (c)) < maxdig;
@@ -430,20 +426,23 @@ integer_constant (radix, expressionP)
}
/* Check for 8 digit per word max. */
- if (ndigit > 8)
+ if (ndigit > 8)
as_bad (_("A bignum with underscores may not have more than 8 hex digits in any word."));
- /* Add this chunk to the bignum. Shift things down 2 little digits.*/
+ /* Add this chunk to the bignum.
+ Shift things down 2 little digits. */
know (LITTLENUM_NUMBER_OF_BITS == 16);
- for (i = min (num_little_digits + 1, SIZE_OF_LARGE_NUMBER - 1); i >= 2; i--)
- generic_bignum[i] = generic_bignum[i-2];
+ for (i = min (num_little_digits + 1, SIZE_OF_LARGE_NUMBER - 1);
+ i >= 2;
+ i--)
+ generic_bignum[i] = generic_bignum[i - 2];
- /* Add the new digits as the least significant new ones. */
+ /* Add the new digits as the least significant new ones. */
generic_bignum[0] = number & 0xffffffff;
generic_bignum[1] = number >> 16;
}
- /* Again, c is char after number, input_line_pointer->after c. */
+ /* Again, c is char after number, input_line_pointer->after c. */
if (num_little_digits > SIZE_OF_LARGE_NUMBER - 1)
num_little_digits = SIZE_OF_LARGE_NUMBER - 1;
@@ -454,14 +453,14 @@ integer_constant (radix, expressionP)
as_bad (_("A bignum with underscores must have exactly 4 words."));
/* We might have some leading zeros. These can be trimmed to give
- * us a change to fit this constant into a small number.
- */
- while (generic_bignum[num_little_digits-1] == 0 && num_little_digits > 1)
+ us a change to fit this constant into a small number. */
+ while (generic_bignum[num_little_digits - 1] == 0
+ && num_little_digits > 1)
num_little_digits--;
-
+
if (num_little_digits <= 2)
{
- /* will fit into 32 bits. */
+ /* will fit into 32 bits. */
number = generic_bignum_to_int32 ();
small = 1;
}
@@ -476,16 +475,16 @@ integer_constant (radix, expressionP)
else
{
small = 0;
- number = num_little_digits; /* number of littlenums in the bignum. */
+
+ /* Number of littlenums in the bignum. */
+ number = num_little_digits;
}
}
else if (!small)
{
- /*
- * we saw a lot of digits. manufacture a bignum the hard way.
- */
- LITTLENUM_TYPE *leader; /*->high order littlenum of the bignum. */
- LITTLENUM_TYPE *pointer; /*->littlenum we are frobbing now. */
+ /* We saw a lot of digits. manufacture a bignum the hard way. */
+ LITTLENUM_TYPE *leader; /* -> high order littlenum of the bignum. */
+ LITTLENUM_TYPE *pointer; /* -> littlenum we are frobbing now. */
long carry;
leader = generic_bignum;
@@ -493,15 +492,11 @@ integer_constant (radix, expressionP)
generic_bignum[1] = 0;
generic_bignum[2] = 0;
generic_bignum[3] = 0;
- input_line_pointer = start; /*->1st digit. */
+ input_line_pointer = start; /* -> 1st digit. */
c = *input_line_pointer++;
- for (;
- (carry = hex_value (c)) < maxdig;
- c = *input_line_pointer++)
+ for (; (carry = hex_value (c)) < maxdig; c = *input_line_pointer++)
{
- for (pointer = generic_bignum;
- pointer <= leader;
- pointer++)
+ for (pointer = generic_bignum; pointer <= leader; pointer++)
{
long work;
@@ -513,17 +508,17 @@ integer_constant (radix, expressionP)
{
if (leader < generic_bignum + SIZE_OF_LARGE_NUMBER - 1)
{
- /* room to grow a longer bignum. */
+ /* Room to grow a longer bignum. */
*++leader = carry;
}
}
}
- /* again, c is char after number, */
- /* input_line_pointer->after c. */
+ /* Again, c is char after number. */
+ /* input_line_pointer -> after c. */
know (LITTLENUM_NUMBER_OF_BITS == 16);
if (leader < generic_bignum + 2)
{
- /* will fit into 32 bits. */
+ /* Will fit into 32 bits. */
number = generic_bignum_to_int32 ();
small = 1;
}
@@ -537,39 +532,37 @@ integer_constant (radix, expressionP)
#endif
else
{
- number = leader - generic_bignum + 1; /* number of littlenums in the bignum. */
+ /* Number of littlenums in the bignum. */
+ number = leader - generic_bignum + 1;
}
}
- if ((NUMBERS_WITH_SUFFIX || flag_m68k_mri)
- && suffix != NULL
+ if ((NUMBERS_WITH_SUFFIX || flag_m68k_mri)
+ && suffix != NULL
&& input_line_pointer - 1 == suffix)
c = *input_line_pointer++;
if (small)
{
- /*
- * here with number, in correct radix. c is the next char.
- * note that unlike un*x, we allow "011f" "0x9f" to
- * both mean the same as the (conventional) "9f". this is simply easier
- * than checking for strict canonical form. syntax sux!
- */
+ /* Here with number, in correct radix. c is the next char.
+ Note that unlike un*x, we allow "011f" "0x9f" to both mean
+ the same as the (conventional) "9f".
+ This is simply easier than checking for strict canonical
+ form. Syntax sux! */
if (LOCAL_LABELS_FB && c == 'b')
{
- /*
- * backward ref to local label.
- * because it is backward, expect it to be defined.
- */
+ /* Backward ref to local label.
+ Because it is backward, expect it to be defined. */
/* Construct a local label. */
name = fb_label_name ((int) number, 0);
- /* seen before, or symbol is defined: ok */
+ /* Seen before, or symbol is defined: OK. */
symbolP = symbol_find (name);
if ((symbolP != NULL) && (S_IS_DEFINED (symbolP)))
{
- /* local labels are never absolute. don't waste time
- checking absoluteness. */
+ /* Local labels are never absolute. Don't waste time
+ checking absoluteness. */
know (SEG_NORMAL (S_GET_SEGMENT (symbolP)));
expressionP->X_op = O_symbol;
@@ -577,7 +570,7 @@ integer_constant (radix, expressionP)
}
else
{
- /* either not seen or not defined. */
+ /* Either not seen or not defined. */
/* @@ Should print out the original string instead of
the parsed number. */
as_bad (_("backw. ref to unknown label \"%d:\", 0 assumed."),
@@ -589,19 +582,18 @@ integer_constant (radix, expressionP)
} /* case 'b' */
else if (LOCAL_LABELS_FB && c == 'f')
{
- /*
- * forward reference. expect symbol to be undefined or
- * unknown. undefined: seen it before. unknown: never seen
- * it before.
- * construct a local label name, then an undefined symbol.
- * don't create a xseg frag for it: caller may do that.
- * just return it as never seen before.
- */
+ /* Forward reference. Expect symbol to be undefined or
+ unknown. undefined: seen it before. unknown: never seen
+ it before.
+
+ Construct a local label name, then an undefined symbol.
+ Don't create a xseg frag for it: caller may do that.
+ Just return it as never seen before. */
name = fb_label_name ((int) number, 1);
symbolP = symbol_find_or_make (name);
- /* we have no need to check symbol properties. */
+ /* We have no need to check symbol properties. */
#ifndef many_segments
- /* since "know" puts its arg into a "string", we
+ /* Since "know" puts its arg into a "string", we
can't have newlines in the argument. */
know (S_GET_SEGMENT (symbolP) == undefined_section || S_GET_SEGMENT (symbolP) == text_section || S_GET_SEGMENT (symbolP) == data_section);
#endif
@@ -640,15 +632,15 @@ integer_constant (radix, expressionP)
number |= (-(number >> (TARGET_WORD_SIZE - 1))) << (TARGET_WORD_SIZE - 1);
#endif
expressionP->X_add_number = number;
- input_line_pointer--; /* restore following character. */
- } /* really just a number */
+ input_line_pointer--; /* Restore following character. */
+ } /* Really just a number. */
}
else
{
- /* not a small number */
+ /* Not a small number. */
expressionP->X_op = O_big;
- expressionP->X_add_number = number; /* number of littlenums */
- input_line_pointer--; /*->char following number. */
+ expressionP->X_add_number = number; /* Number of littlenums. */
+ input_line_pointer--; /* -> char following number. */
}
}
@@ -766,24 +758,20 @@ current_location (expressionp)
}
}
-/*
- * Summary of operand().
- *
- * in: Input_line_pointer points to 1st char of operand, which may
- * be a space.
- *
- * out: A expressionS.
- * The operand may have been empty: in this case X_op == O_absent.
- * Input_line_pointer->(next non-blank) char after operand.
- */
+/* In: Input_line_pointer points to 1st char of operand, which may
+ be a space.
+
+ Out: A expressionS.
+ The operand may have been empty: in this case X_op == O_absent.
+ Input_line_pointer->(next non-blank) char after operand. */
static segT
operand (expressionP)
expressionS *expressionP;
{
char c;
- symbolS *symbolP; /* points to symbol */
- char *name; /* points to name of symbol */
+ symbolS *symbolP; /* Points to symbol. */
+ char *name; /* Points to name of symbol. */
segT segment;
/* All integers are regarded as unsigned unless they are negated.
@@ -794,10 +782,13 @@ operand (expressionP)
though it appears negative if valueT is 32 bits. */
expressionP->X_unsigned = 1;
- /* digits, assume it is a bignum. */
+ /* Digits, assume it is a bignum. */
+
+ SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */
+ c = *input_line_pointer++; /* input_line_pointer -> past char in c. */
- SKIP_WHITESPACE (); /* leading whitespace is part of operand. */
- c = *input_line_pointer++; /* input_line_pointer->past char in c. */
+ if (is_end_of_line[(unsigned char) c])
+ goto eol;
switch (c)
{
@@ -812,13 +803,25 @@ operand (expressionP)
case '9':
input_line_pointer--;
- integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri)
- ? 0 : 10,
+ integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri)
+ ? 0 : 10,
expressionP);
break;
+#ifdef LITERAL_PREFIXDOLLAR_HEX
+ case '$':
+ integer_constant (16, expressionP);
+ break;
+#endif
+
+#ifdef LITERAL_PREFIXPERCENT_BIN
+ case '%':
+ integer_constant (2, expressionP);
+ break;
+#endif
+
case '0':
- /* non-decimal radix */
+ /* Non-decimal radix. */
if (NUMBERS_WITH_SUFFIX || flag_m68k_mri)
{
@@ -833,7 +836,7 @@ operand (expressionP)
integer_constant (0, expressionP);
break;
}
- }
+ }
c = *input_line_pointer;
switch (c)
{
@@ -860,7 +863,7 @@ operand (expressionP)
}
else
{
- /* The string was only zero */
+ /* The string was only zero. */
expressionP->X_op = O_constant;
expressionP->X_add_number = 0;
}
@@ -912,8 +915,8 @@ operand (expressionP)
case '6':
case '7':
integer_constant ((flag_m68k_mri || NUMBERS_WITH_SUFFIX)
- ? 0 : 8,
- expressionP);
+ ? 0 : 8,
+ expressionP);
break;
case 'f':
@@ -935,11 +938,11 @@ operand (expressionP)
case 0:
case ERROR_EXPONENT_OVERFLOW:
if (*cp == 'f' || *cp == 'b')
- /* looks like a difference expression */
+ /* Looks like a difference expression. */
goto is_0f_label;
else if (cp == input_line_pointer + 1)
/* No characters has been accepted -- looks like
- end of operand. */
+ end of operand. */
goto is_0f_label;
else
goto is_0f_float;
@@ -958,7 +961,7 @@ operand (expressionP)
break;
is_0f_float:
- /* fall through */
+ /* Fall through. */
;
}
@@ -998,17 +1001,21 @@ operand (expressionP)
#ifndef NEED_INDEX_OPERATOR
case '[':
#endif
- /* didn't begin with digit & not a name */
+ /* Didn't begin with digit & not a name. */
segment = expression (expressionP);
- /* Expression() will pass trailing whitespace */
- if ((c == '(' && *input_line_pointer++ != ')')
- || (c == '[' && *input_line_pointer++ != ']'))
+ /* expression () will pass trailing whitespace. */
+ if ((c == '(' && *input_line_pointer != ')')
+ || (c == '[' && *input_line_pointer != ']'))
{
- as_bad (_("Missing ')' assumed"));
- input_line_pointer--;
+#ifdef RELAX_PAREN_GROUPING
+ if (c != '(')
+#endif
+ as_bad (_("Missing '%c' assumed"), c == '(' ? ')' : ']');
}
+ else
+ input_line_pointer++;
SKIP_WHITESPACE ();
- /* here with input_line_pointer->char after "(...)" */
+ /* Here with input_line_pointer -> char after "(...)". */
return segment;
#ifdef TC_M68K
@@ -1027,9 +1034,9 @@ operand (expressionP)
if (! flag_m68k_mri)
{
/* Warning: to conform to other people's assemblers NO
- ESCAPEMENT is permitted for a single quote. The next
+ ESCAPEMENT is permitted for a single quote. The next
character, parity errors and all, is taken as the value
- of the operand. VERY KINKY. */
+ of the operand. VERY KINKY. */
expressionP->X_op = O_constant;
expressionP->X_add_number = *input_line_pointer++;
break;
@@ -1050,7 +1057,7 @@ operand (expressionP)
/* Fall through. */
#endif
case '~':
- /* ~ is permitted to start a label on the Delta. */
+ /* '~' is permitted to start a label on the Delta. */
if (is_name_beginner (c))
goto isname;
case '!':
@@ -1059,12 +1066,13 @@ operand (expressionP)
operand (expressionP);
if (expressionP->X_op == O_constant)
{
- /* input_line_pointer -> char after operand */
+ /* input_line_pointer -> char after operand. */
if (c == '-')
{
expressionP->X_add_number = - expressionP->X_add_number;
- /* Notice: '-' may overflow: no warning is given. This is
- compatible with other people's assemblers. Sigh. */
+ /* Notice: '-' may overflow: no warning is given.
+ This is compatible with other people's
+ assemblers. Sigh. */
expressionP->X_unsigned = 0;
}
else if (c == '~' || c == '"')
@@ -1092,15 +1100,15 @@ operand (expressionP)
#if defined (DOLLAR_DOT) || defined (TC_M68K)
case '$':
- /* $ is the program counter when in MRI mode, or when DOLLAR_DOT
- is defined. */
+ /* '$' is the program counter when in MRI mode, or when
+ DOLLAR_DOT is defined. */
#ifndef DOLLAR_DOT
if (! flag_m68k_mri)
goto de_fault;
#endif
if (flag_m68k_mri && hex_p (*input_line_pointer))
{
- /* In MRI mode, $ is also used as the prefix for a
+ /* In MRI mode, '$' is also used as the prefix for a
hexadecimal constant. */
integer_constant (16, expressionP);
break;
@@ -1166,11 +1174,10 @@ operand (expressionP)
{
goto isname;
}
+
case ',':
- case '\n':
- case '\0':
eol:
- /* can't imagine any other kind of operand */
+ /* Can't imagine any other kind of operand. */
expressionP->X_op = O_absent;
input_line_pointer--;
break;
@@ -1211,14 +1218,10 @@ operand (expressionP)
#ifdef TC_M68K
de_fault:
#endif
- if (is_end_of_line[(unsigned char) c])
- goto eol;
- if (is_name_beginner (c)) /* here if did not begin with a digit */
+ if (is_name_beginner (c)) /* Here if did not begin with a digit. */
{
- /*
- * Identifier begins here.
- * This is kludged for speed, so code is repeated.
- */
+ /* Identifier begins here.
+ This is kludged for speed, so code is repeated. */
isname:
name = --input_line_pointer;
c = get_symbol_end ();
@@ -1271,7 +1274,7 @@ operand (expressionP)
SKIP_WHITESPACE ();
break;
- }
+ }
#endif
symbolP = symbol_find_or_make (name);
@@ -1301,7 +1304,7 @@ operand (expressionP)
{
/* Let the target try to parse it. Success is indicated by changing
the X_op field to something other than O_absent and pointing
- input_line_pointer passed the expression. If it can't parse the
+ input_line_pointer past the expression. If it can't parse the
expression, X_op and input_line_pointer should be unchanged. */
expressionP->X_op = O_absent;
--input_line_pointer;
@@ -1317,12 +1320,10 @@ operand (expressionP)
break;
}
- /*
- * It is more 'efficient' to clean up the expressionS when they are created.
- * Doing it here saves lines of code.
- */
+ /* It is more 'efficient' to clean up the expressionS when they are
+ created. Doing it here saves lines of code. */
clean_up_expression (expressionP);
- SKIP_WHITESPACE (); /*->1st char after operand. */
+ SKIP_WHITESPACE (); /* -> 1st char after operand. */
know (*input_line_pointer != ' ');
/* The PA port needs this information. */
@@ -1338,19 +1339,18 @@ operand (expressionP)
case O_register:
return reg_section;
}
-} /* operand() */
+}
-/* Internal. Simplify a struct expression for use by expr() */
-
-/*
- * In: address of a expressionS.
- * The X_op field of the expressionS may only take certain values.
- * Elsewise we waste time special-case testing. Sigh. Ditto SEG_ABSENT.
- * Out: expressionS may have been modified:
- * 'foo-foo' symbol references cancelled to 0,
- * which changes X_op from O_subtract to O_constant.
- * Unused fields zeroed to help expr().
- */
+/* Internal. Simplify a struct expression for use by expr (). */
+
+/* In: address of a expressionS.
+ The X_op field of the expressionS may only take certain values.
+ Elsewise we waste time special-case testing. Sigh. Ditto SEG_ABSENT.
+
+ Out: expressionS may have been modified:
+ 'foo-foo' symbol references cancelled to 0, which changes X_op
+ from O_subtract to O_constant.
+ Unused fields zeroed to help expr (). */
static void
clean_up_expression (expressionP)
@@ -1394,35 +1394,32 @@ clean_up_expression (expressionP)
}
}
-/* Expression parser. */
-
-/*
- * We allow an empty expression, and just assume (absolute,0) silently.
- * Unary operators and parenthetical expressions are treated as operands.
- * As usual, Q==quantity==operand, O==operator, X==expression mnemonics.
- *
- * We used to do a aho/ullman shift-reduce parser, but the logic got so
- * warped that I flushed it and wrote a recursive-descent parser instead.
- * Now things are stable, would anybody like to write a fast parser?
- * Most expressions are either register (which does not even reach here)
- * or 1 symbol. Then "symbol+constant" and "symbol-symbol" are common.
- * So I guess it doesn't really matter how inefficient more complex expressions
- * are parsed.
- *
- * After expr(RANK,resultP) input_line_pointer->operator of rank <= RANK.
- * Also, we have consumed any leading or trailing spaces (operand does that)
- * and done all intervening operators.
- *
- * This returns the segment of the result, which will be
- * absolute_section or the segment of a symbol.
- */
+/* Expression parser. */
+
+/* We allow an empty expression, and just assume (absolute,0) silently.
+ Unary operators and parenthetical expressions are treated as operands.
+ As usual, Q==quantity==operand, O==operator, X==expression mnemonics.
+
+ We used to do a aho/ullman shift-reduce parser, but the logic got so
+ warped that I flushed it and wrote a recursive-descent parser instead.
+ Now things are stable, would anybody like to write a fast parser?
+ Most expressions are either register (which does not even reach here)
+ or 1 symbol. Then "symbol+constant" and "symbol-symbol" are common.
+ So I guess it doesn't really matter how inefficient more complex expressions
+ are parsed.
+
+ After expr(RANK,resultP) input_line_pointer->operator of rank <= RANK.
+ Also, we have consumed any leading or trailing spaces (operand does that)
+ and done all intervening operators.
+
+ This returns the segment of the result, which will be
+ absolute_section or the segment of a symbol. */
#undef __
#define __ O_illegal
-static const operatorT op_encoding[256] =
-{ /* maps ASCII->operators */
-
+/* Maps ASCII -> operators. */
+static const operatorT op_encoding[256] = {
__, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
__, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
@@ -1455,28 +1452,25 @@ static const operatorT op_encoding[256] =
__, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __
};
-
-/*
- * Rank Examples
- * 0 operand, (expression)
- * 1 ||
- * 2 &&
- * 3 = <> < <= >= >
- * 4 + -
- * 5 used for * / % in MRI mode
- * 6 & ^ ! |
- * 7 * / % << >>
- * 8 unary - unary ~
- */
-static operator_rankT op_rank[] =
-{
+/* Rank Examples
+ 0 operand, (expression)
+ 1 ||
+ 2 &&
+ 3 = <> < <= >= >
+ 4 + -
+ 5 used for * / % in MRI mode
+ 6 & ^ ! |
+ 7 * / % << >>
+ 8 unary - unary ~
+*/
+static operator_rankT op_rank[] = {
0, /* O_illegal */
0, /* O_absent */
0, /* O_constant */
0, /* O_symbol */
0, /* O_symbol_rva */
0, /* O_register */
- 0, /* O_bit */
+ 0, /* O_big */
9, /* O_uminus */
9, /* O_bit_not */
9, /* O_logical_not */
@@ -1524,8 +1518,8 @@ static operator_rankT op_rank[] =
mode. Also, MRI uses a different bit_not operator, and this fixes
that as well. */
-#define STANDARD_MUL_PRECEDENCE (7)
-#define MRI_MUL_PRECEDENCE (5)
+#define STANDARD_MUL_PRECEDENCE 8
+#define MRI_MUL_PRECEDENCE 6
void
expr_set_precedence ()
@@ -1559,17 +1553,22 @@ expr_begin ()
}
}
-/* Return the encoding for the operator at INPUT_LINE_POINTER.
- Advance INPUT_LINE_POINTER to the last character in the operator
- (i.e., don't change it for a single character operator). */
+/* Return the encoding for the operator at INPUT_LINE_POINTER, and
+ sets NUM_CHARS to the number of characters in the operator.
+ Does not advance INPUT_LINE_POINTER. */
static inline operatorT
-operator ()
+operator (num_chars)
+ int *num_chars;
{
int c;
operatorT ret;
c = *input_line_pointer & 0xff;
+ *num_chars = 1;
+
+ if (is_end_of_line[c])
+ return O_illegal;
switch (c)
{
@@ -1591,14 +1590,14 @@ operator ()
ret = O_le;
break;
}
- ++input_line_pointer;
+ *num_chars = 2;
return ret;
case '=':
if (input_line_pointer[1] != '=')
return op_encoding[c];
- ++input_line_pointer;
+ *num_chars = 2;
return O_eq;
case '>':
@@ -1613,7 +1612,7 @@ operator ()
ret = O_ge;
break;
}
- ++input_line_pointer;
+ *num_chars = 2;
return ret;
case '!':
@@ -1624,52 +1623,54 @@ operator ()
return O_bit_inclusive_or;
return op_encoding[c];
}
- ++input_line_pointer;
+ *num_chars = 2;
return O_bit_exclusive_or;
case '|':
if (input_line_pointer[1] != '|')
return op_encoding[c];
- ++input_line_pointer;
+ *num_chars = 2;
return O_logical_or;
case '&':
if (input_line_pointer[1] != '&')
return op_encoding[c];
- ++input_line_pointer;
+ *num_chars = 2;
return O_logical_and;
}
- /*NOTREACHED*/
+ /* NOTREACHED */
}
/* Parse an expression. */
segT
expr (rankarg, resultP)
- int rankarg; /* Larger # is higher rank. */
- expressionS *resultP; /* Deliver result here. */
+ int rankarg; /* Larger # is higher rank. */
+ expressionS *resultP; /* Deliver result here. */
{
operator_rankT rank = (operator_rankT) rankarg;
segT retval;
expressionS right;
operatorT op_left;
operatorT op_right;
+ int op_chars;
know (rank >= 0);
retval = operand (resultP);
- know (*input_line_pointer != ' '); /* Operand() gobbles spaces. */
+ /* operand () gobbles spaces. */
+ know (*input_line_pointer != ' ');
- op_left = operator ();
+ op_left = operator (&op_chars);
while (op_left != O_illegal && op_rank[(int) op_left] > rank)
{
segT rightseg;
- input_line_pointer++; /*->after 1st character of operator. */
+ input_line_pointer += op_chars; /* -> after operator. */
rightseg = expr (op_rank[(int) op_left], &right);
if (right.X_op == O_absent)
@@ -1709,16 +1710,17 @@ expr (rankarg, resultP)
)
as_bad (_("operation combines symbols in different segments"));
- op_right = operator ();
+ op_right = operator (&op_chars);
- know (op_right == O_illegal || op_rank[(int) op_right] <= op_rank[(int) op_left]);
+ know (op_right == O_illegal
+ || op_rank[(int) op_right] <= op_rank[(int) op_left]);
know ((int) op_left >= (int) O_multiply
&& (int) op_left <= (int) O_logical_or);
- /* input_line_pointer->after right-hand quantity. */
- /* left-hand quantity in resultP */
- /* right-hand quantity in right. */
- /* operator in op_left. */
+ /* input_line_pointer->after right-hand quantity. */
+ /* left-hand quantity in resultP. */
+ /* right-hand quantity in right. */
+ /* operator in op_left. */
if (resultP->X_op == O_big)
{
@@ -1744,6 +1746,14 @@ expr (rankarg, resultP)
}
/* Optimize common cases. */
+#ifdef md_optimize_expr
+ if (md_optimize_expr (resultP, op_left, &right))
+ {
+ /* Skip. */
+ ;
+ }
+ else
+#endif
if (op_left == O_add && right.X_op == O_constant)
{
/* X + constant. */
@@ -1864,7 +1874,7 @@ expr (rankarg, resultP)
}
op_left = op_right;
- } /* While next operator is >= this rank. */
+ } /* While next operator is >= this rank. */
/* The PA port needs this information. */
if (resultP->X_add_symbol)
@@ -1873,21 +1883,18 @@ expr (rankarg, resultP)
return resultP->X_op == O_constant ? absolute_section : retval;
}
-/*
- * get_symbol_end()
- *
- * This lives here because it belongs equally in expr.c & read.c.
- * Expr.c is just a branch office read.c anyway, and putting it
- * here lessens the crowd at read.c.
- *
- * Assume input_line_pointer is at start of symbol name.
- * Advance input_line_pointer past symbol name.
- * Turn that character into a '\0', returning its former value.
- * This allows a string compare (RMS wants symbol names to be strings)
- * of the symbol name.
- * There will always be a char following symbol name, because all good
- * lines end in end-of-line.
- */
+/* This lives here because it belongs equally in expr.c & read.c.
+ expr.c is just a branch office read.c anyway, and putting it
+ here lessens the crowd at read.c.
+
+ Assume input_line_pointer is at start of symbol name.
+ Advance input_line_pointer past symbol name.
+ Turn that character into a '\0', returning its former value.
+ This allows a string compare (RMS wants symbol names to be strings)
+ of the symbol name.
+ There will always be a char following symbol name, because all good
+ lines end in end-of-line. */
+
char
get_symbol_end ()
{
@@ -1907,14 +1914,10 @@ get_symbol_end ()
return (c);
}
-
unsigned int
get_single_number ()
{
expressionS exp;
operand (&exp);
return exp.X_add_number;
-
}
-
-/* end of expr.c */
diff --git a/gnu/usr.bin/binutils/gas/expr.h b/gnu/usr.bin/binutils/gas/expr.h
index 0ed6af603a7..9483cafb418 100644
--- a/gnu/usr.bin/binutils/gas/expr.h
+++ b/gnu/usr.bin/binutils/gas/expr.h
@@ -1,5 +1,6 @@
/* expr.h -> header file for expr.c
- Copyright (C) 1987, 92-98, 1999 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -39,8 +40,7 @@
NOTE: This enumeration must match the op_rank array in expr.c. */
-typedef enum
-{
+typedef enum {
/* An illegal expression. */
O_illegal,
/* A nonexistent expression. */
@@ -111,8 +111,7 @@ typedef enum
O_max
} operatorT;
-typedef struct expressionS
-{
+typedef struct expressionS {
/* The main symbol. */
symbolS *X_add_symbol;
/* The second symbol, if needed. */
@@ -142,16 +141,16 @@ typedef struct expressionS
unsigned short X_md;
} expressionS;
-/* "result" should be type (expressionS *). */
+/* "result" should be type (expressionS *). */
#define expression(result) expr (0, result)
/* If an expression is O_big, look here for its value. These common
- data may be clobbered whenever expr() is called. */
-/* Flonums returned here. Big enough to hold most precise flonum. */
+ data may be clobbered whenever expr() is called. */
+/* Flonums returned here. Big enough to hold most precise flonum. */
extern FLONUM_TYPE generic_floating_point_number;
-/* Bignums returned here. */
+/* Bignums returned here. */
extern LITTLENUM_TYPE generic_bignum[];
-/* Number of littlenums in above. */
+/* Number of littlenums in above. */
#define SIZE_OF_LARGE_NUMBER (20)
typedef char operator_rankT;
@@ -169,5 +168,3 @@ extern symbolS *expr_build_uconstant PARAMS ((offsetT));
extern symbolS *expr_build_unary PARAMS ((operatorT, symbolS *));
extern symbolS *expr_build_binary PARAMS ((operatorT, symbolS *, symbolS *));
extern symbolS *expr_build_dot PARAMS ((void));
-
-/* end of expr.h */
diff --git a/gnu/usr.bin/binutils/gas/flonum-konst.c b/gnu/usr.bin/binutils/gas/flonum-konst.c
index 22bba05974b..04fa1f4cad0 100644
--- a/gnu/usr.bin/binutils/gas/flonum-konst.c
+++ b/gnu/usr.bin/binutils/gas/flonum-konst.c
@@ -1,5 +1,5 @@
/* flonum_const.c - Useful Flonum constants
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 1996
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -23,13 +23,13 @@
#include "flonum.h"
/* JF: I added the last entry to this table, and I'm not
sure if its right or not. Could go either way. I wish
- I really understood this stuff. */
-
+ I really understood this stuff. */
const int table_size_of_flonum_powers_of_ten = 13;
-static const LITTLENUM_TYPE zero[] =
-{1};
+static const LITTLENUM_TYPE zero[] = {
+ 1
+};
/***********************************************************************\
* *
@@ -44,131 +44,149 @@ static const LITTLENUM_TYPE zero[] =
\***********************************************************************/
/* JF: If this equals 6553/(2^16)+39321/(2^32)+... it approaches .1 */
-static const LITTLENUM_TYPE minus_1[] =
-{
+static const LITTLENUM_TYPE minus_1[] = {
39322, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321,
- 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 6553};
-static const LITTLENUM_TYPE plus_1[] =
-{10};
+ 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 6553
+};
+
+static const LITTLENUM_TYPE plus_1[] = {
+ 10
+};
/* JF: If this equals 655/(2^16) + 23592/(2^32) + ... it approaches .01 */
-static const LITTLENUM_TYPE minus_2[] =
-{
+static const LITTLENUM_TYPE minus_2[] = {
10486, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 49807,
- 10485, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 655};
-static const LITTLENUM_TYPE plus_2[] =
-{100};
+ 10485, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 655
+};
+
+static const LITTLENUM_TYPE plus_2[] = {
+ 100
+};
/* This approaches .0001 */
-static const LITTLENUM_TYPE minus_3[] =
-{
+static const LITTLENUM_TYPE minus_3[] = {
52534, 20027, 37329, 65116, 64067, 60397, 14784, 18979, 33659, 19503,
- 2726, 9542, 629, 2202, 40475, 10590, 4299, 47815, 36280, 6};
-static const LITTLENUM_TYPE plus_3[] =
-{10000};
+ 2726, 9542, 629, 2202, 40475, 10590, 4299, 47815, 36280, 6
+};
+
+static const LITTLENUM_TYPE plus_3[] = {
+ 10000
+};
/* JF: this approaches 1e-8 */
-static const LITTLENUM_TYPE minus_4[] =
-{
+static const LITTLENUM_TYPE minus_4[] = {
22517, 49501, 54293, 19424, 60699, 6716, 24348, 22618, 23904, 21327,
- 3919, 44703, 19149, 28803, 48959, 6259, 50273, 62237, 42};
+ 3919, 44703, 19149, 28803, 48959, 6259, 50273, 62237, 42
+};
+
/* This equals 1525 * 2^16 + 57600 */
-static const LITTLENUM_TYPE plus_4[] =
-{57600, 1525};
+static const LITTLENUM_TYPE plus_4[] = {
+ 57600, 1525
+};
/* This approaches 1e-16 */
-static const LITTLENUM_TYPE minus_5[] =
-{
+static const LITTLENUM_TYPE minus_5[] = {
22199, 45957, 17005, 26266, 10526, 16260, 55017, 35680, 40443, 19789,
- 17356, 30195, 55905, 28426, 63010, 44197, 1844};
-static const LITTLENUM_TYPE plus_5[] =
-{28609, 34546, 35};
+ 17356, 30195, 55905, 28426, 63010, 44197, 1844
+};
-static const LITTLENUM_TYPE minus_6[] =
-{
+static const LITTLENUM_TYPE plus_5[] = {
+ 28609, 34546, 35
+};
+
+static const LITTLENUM_TYPE minus_6[] = {
30926, 26518, 13110, 43018, 54982, 48258, 24658, 15209, 63366, 11929,
- 20069, 43857, 60487, 51};
-static const LITTLENUM_TYPE plus_6[] =
-{61313, 34220, 16731, 11629, 1262};
+ 20069, 43857, 60487, 51
+};
-static const LITTLENUM_TYPE minus_7[] =
-{
- 29819, 14733, 21490, 40602, 31315, 65186, 2695};
-static const LITTLENUM_TYPE plus_7[] =
-{
- 7937, 49002, 60772, 28216, 38893, 55975, 63988, 59711, 20227, 24};
+static const LITTLENUM_TYPE plus_6[] = {
+ 61313, 34220, 16731, 11629, 1262
+};
-static const LITTLENUM_TYPE minus_8[] =
-{
+static const LITTLENUM_TYPE minus_7[] = {
+ 29819, 14733, 21490, 40602, 31315, 65186, 2695
+};
+
+static const LITTLENUM_TYPE plus_7[] = {
+ 7937, 49002, 60772, 28216, 38893, 55975, 63988, 59711, 20227, 24
+};
+
+static const LITTLENUM_TYPE minus_8[] = {
27579, 64807, 12543, 794, 13907, 61297, 12013, 64360, 15961, 20566,
- 24178, 15922, 59427, 110};
-static const LITTLENUM_TYPE plus_8[] =
-{
+ 24178, 15922, 59427, 110
+};
+
+static const LITTLENUM_TYPE plus_8[] = {
15873, 11925, 39177, 991, 14589, 3861, 58415, 9076, 62956, 54223,
- 56328, 50180, 45274, 48333, 32537, 42547, 9731, 59679, 590};
+ 56328, 50180, 45274, 48333, 32537, 42547, 9731, 59679, 590
+};
-static const LITTLENUM_TYPE minus_9[] =
-{
+static const LITTLENUM_TYPE minus_9[] = {
11042, 8464, 58971, 63429, 6022, 63485, 5500, 53464, 47545, 50068,
56988, 22819, 49708, 54493, 9920, 47667, 40409, 35764, 10383, 54466,
- 32702, 17493, 32420, 34382, 22750, 20681, 12300};
-static const LITTLENUM_TYPE plus_9[] =
-{
+ 32702, 17493, 32420, 34382, 22750, 20681, 12300
+};
+
+static const LITTLENUM_TYPE plus_9[] = {
20678, 27614, 28272, 53066, 55311, 54677, 29038, 9906, 26288, 44486,
13860, 7445, 54106, 15426, 21518, 25599, 29632, 52309, 61207, 26105,
- 10482, 21948, 51191, 32988, 60892, 62574, 61390, 24540, 21495, 5};
+ 10482, 21948, 51191, 32988, 60892, 62574, 61390, 24540, 21495, 5
+};
-static const LITTLENUM_TYPE minus_10[] =
-{
+static const LITTLENUM_TYPE minus_10[] = {
6214, 48771, 23471, 30163, 31763, 38013, 57001, 11770, 18263, 36366,
20742, 45086, 56969, 53231, 37856, 55814, 38057, 15692, 46761, 8713,
- 6102, 20083, 8269, 11839, 11571, 50963, 15649, 11698, 40675, 2308};
-static const LITTLENUM_TYPE plus_10[] =
-{
+ 6102, 20083, 8269, 11839, 11571, 50963, 15649, 11698, 40675, 2308
+};
+
+static const LITTLENUM_TYPE plus_10[] = {
63839, 36576, 45712, 44516, 37803, 29482, 4966, 30556, 37961, 23310,
27070, 44972, 29507, 48257, 45209, 7494, 17831, 38728, 41577, 29443,
- 36016, 7955, 35339, 35479, 36011, 14553, 49618, 5588, 25396, 28};
+ 36016, 7955, 35339, 35479, 36011, 14553, 49618, 5588, 25396, 28
+};
-static const LITTLENUM_TYPE minus_11[] =
-{
+static const LITTLENUM_TYPE minus_11[] = {
16663, 56882, 61983, 7804, 36555, 32060, 34502, 1000, 14356, 21681,
6605, 34767, 51411, 59048, 53614, 39850, 30079, 6496, 6846, 26841,
- 40778, 19578, 59899, 44085, 54016, 24259, 11232, 21229, 21313, 81};
-static const LITTLENUM_TYPE plus_11[] =
-{
+ 40778, 19578, 59899, 44085, 54016, 24259, 11232, 21229, 21313, 81
+};
+
+static const LITTLENUM_TYPE plus_11[] = {
92, 9054, 62707, 17993, 7821, 56838, 13992, 21321, 29637, 48426,
42982, 38668, 49574, 28820, 18200, 18927, 53979, 16219, 37484, 2516,
- 44642, 14665, 11587, 41926, 13556, 23956, 54320, 6661, 55766, 805};
+ 44642, 14665, 11587, 41926, 13556, 23956, 54320, 6661, 55766, 805
+};
-static const LITTLENUM_TYPE minus_12[] =
-{
+static const LITTLENUM_TYPE minus_12[] = {
33202, 45969, 58804, 56734, 16482, 26007, 44984, 49334, 31007, 32944,
44517, 63329, 47131, 15291, 59465, 2264, 23218, 11829, 59771, 38798,
- 31051, 28748, 23129, 40541, 41562, 35108, 50620, 59014, 51817, 6613};
-static const LITTLENUM_TYPE plus_12[] =
-{
+ 31051, 28748, 23129, 40541, 41562, 35108, 50620, 59014, 51817, 6613
+};
+
+static const LITTLENUM_TYPE plus_12[] = {
10098, 37922, 58070, 7432, 10470, 63465, 23718, 62190, 47420, 7009,
38443, 4587, 45596, 38472, 52129, 52779, 29012, 13559, 48688, 31678,
- 41753, 58662, 10668, 36067, 29906, 56906, 21461, 46556, 59571, 9};
+ 41753, 58662, 10668, 36067, 29906, 56906, 21461, 46556, 59571, 9
+};
-static const LITTLENUM_TYPE minus_13[] =
-{
+static const LITTLENUM_TYPE minus_13[] = {
45309, 27592, 37144, 34637, 34328, 41671, 34620, 24135, 53401, 22112,
21576, 45147, 39310, 44051, 48572, 3676, 46544, 59768, 33350, 2323,
- 49524, 61568, 3903, 36487, 36356, 30903, 14975, 9035, 29715, 667};
-static const LITTLENUM_TYPE plus_13[] =
-{
+ 49524, 61568, 3903, 36487, 36356, 30903, 14975, 9035, 29715, 667
+};
+
+static const LITTLENUM_TYPE plus_13[] = {
18788, 16960, 6318, 45685, 55400, 46230, 35794, 25588, 7253, 55541,
49716, 59760, 63592, 8191, 63765, 58530, 44667, 13294, 10001, 55586,
- 47887, 18738, 9509, 40896, 42506, 52580, 4171, 325, 12329, 98};
+ 47887, 18738, 9509, 40896, 42506, 52580, 4171, 325, 12329, 98
+};
/* Shut up complaints about differing pointer types. They only differ
in the const attribute, but there isn't any easy way to do this
*/
#define X (LITTLENUM_TYPE *)
-const FLONUM_TYPE flonum_negative_powers_of_ten[] =
-{
+const FLONUM_TYPE flonum_negative_powers_of_ten[] = {
{X zero, X zero, X zero, 0, '+'},
{X minus_1, X minus_1 + 19, X minus_1 + 19, -20, '+'},
{X minus_2, X minus_2 + 19, X minus_2 + 19, -20, '+'},
@@ -185,8 +203,7 @@ const FLONUM_TYPE flonum_negative_powers_of_ten[] =
{X minus_13, X minus_13 + 29, X minus_13 + 29, -880, '+'},
};
-const FLONUM_TYPE flonum_positive_powers_of_ten[] =
-{
+const FLONUM_TYPE flonum_positive_powers_of_ten[] = {
{X zero, X zero, X zero, 0, '+'},
{X plus_1, X plus_1 + 0, X plus_1 + 0, 0, '+'},
{X plus_2, X plus_2 + 0, X plus_2 + 0, 0, '+'},
@@ -204,6 +221,8 @@ const FLONUM_TYPE flonum_positive_powers_of_ten[] =
};
#ifdef VMS
-void dummy1 () { }
+void
+dummy1 ()
+{
+}
#endif
-/* end of flonum_const.c */
diff --git a/gnu/usr.bin/binutils/gas/flonum.h b/gnu/usr.bin/binutils/gas/flonum.h
index 6684f496c2c..e50d9bf90f3 100644
--- a/gnu/usr.bin/binutils/gas/flonum.h
+++ b/gnu/usr.bin/binutils/gas/flonum.h
@@ -1,6 +1,6 @@
/* flonum.h - Floating point package
-
- Copyright (C) 1987, 90, 91, 92, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1987, 1990, 1991, 1992, 1994, 1996, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -49,8 +49,7 @@
A sign value of 'P' means we've been asked to assemble +Inf
A sign value of 'N' means we've been asked to assemble -Inf
*/
-struct FLONUM_STRUCT
-{
+struct FLONUM_STRUCT {
LITTLENUM_TYPE *low; /* low order littlenum of a bignum */
LITTLENUM_TYPE *high; /* high order littlenum of a bignum */
LITTLENUM_TYPE *leader; /* -> 1st non-zero littlenum */
@@ -61,7 +60,6 @@ struct FLONUM_STRUCT
typedef struct FLONUM_STRUCT FLONUM_TYPE;
-
/***********************************************************************\
* *
* Since we can (& do) meet with exponents like 10^5000, it *
@@ -74,15 +72,11 @@ typedef struct FLONUM_STRUCT FLONUM_TYPE;
* *
\***********************************************************************/
-
extern const FLONUM_TYPE flonum_positive_powers_of_ten[];
extern const FLONUM_TYPE flonum_negative_powers_of_ten[];
extern const int table_size_of_flonum_powers_of_ten;
-/* Flonum_XXX_powers_of_ten[] table has */
-/* legal indices from 0 to */
-/* + this number inclusive. */
-
-
+/* Flonum_XXX_powers_of_ten[] table has legal indices from 0 to
+ + this number inclusive. */
/***********************************************************************\
* *
@@ -106,5 +100,3 @@ void flonum_multip PARAMS ((const FLONUM_TYPE * a, const FLONUM_TYPE * b,
\***********************************************************************/
#define ERROR_EXPONENT_OVERFLOW (2)
-
-/* end of flonum.h */
diff --git a/gnu/usr.bin/binutils/gas/frags.c b/gnu/usr.bin/binutils/gas/frags.c
index d1846647148..4dc2a7d564b 100644
--- a/gnu/usr.bin/binutils/gas/frags.c
+++ b/gnu/usr.bin/binutils/gas/frags.c
@@ -1,5 +1,6 @@
/* frags.c - manage frags -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -27,6 +28,7 @@ extern fragS zero_address_frag;
extern fragS bss_address_frag;
/* Initialization for frag routines. */
+
void
frag_init ()
{
@@ -37,6 +39,7 @@ frag_init ()
/* Allocate a frag on the specified obstack.
Call this routine from everywhere else, so that all the weird alignment
hackery can be done in just one place. */
+
fragS *
frag_alloc (ob)
struct obstack *ob;
@@ -53,15 +56,12 @@ frag_alloc (ob)
return ptr;
}
-/*
- * frag_grow()
- *
- * Try to augment current frag by nchars chars.
- * If there is no room, close of the current frag with a ".fill 0"
- * and begin a new frag. Unless the new frag has nchars chars available
- * do not return. Do not set up any fields of *now_frag.
- */
-void
+/* Try to augment current frag by nchars chars.
+ If there is no room, close of the current frag with a ".fill 0"
+ and begin a new frag. Unless the new frag has nchars chars available
+ do not return. Do not set up any fields of *now_frag. */
+
+void
frag_grow (nchars)
unsigned int nchars;
{
@@ -74,41 +74,40 @@ frag_grow (nchars)
frag_new (0);
oldc = frchain_now->frch_obstack.chunk_size;
frchain_now->frch_obstack.chunk_size = 2 * nchars + SIZEOF_STRUCT_FRAG;
- while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars)
- {
- frag_wane (frag_now);
- frag_new (0);
- }
+ if (frchain_now->frch_obstack.chunk_size > 0)
+ while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars
+ && (unsigned long) frchain_now->frch_obstack.chunk_size > nchars)
+ {
+ frag_wane (frag_now);
+ frag_new (0);
+ }
frchain_now->frch_obstack.chunk_size = oldc;
}
if (obstack_room (&frchain_now->frch_obstack) < nchars)
as_fatal (_("Can't extend frag %d. chars"), nchars);
}
-/*
- * frag_new()
- *
- * Call this to close off a completed frag, and start up a new (empty)
- * frag, in the same subsegment as the old frag.
- * [frchain_now remains the same but frag_now is updated.]
- * Because this calculates the correct value of fr_fix by
- * looking at the obstack 'frags', it needs to know how many
- * characters at the end of the old frag belong to the maximal
- * variable part; The rest must belong to fr_fix.
- * It doesn't actually set up the old frag's fr_var. You may have
- * set fr_var == 1, but allocated 10 chars to the end of the frag;
- * In this case you pass old_frags_var_max_size == 10.
- * In fact, you may use fr_var for something totally unrelated to the
- * size of the variable part of the frag; None of the generic frag
- * handling code makes use of fr_var.
- *
- * Make a new frag, initialising some components. Link new frag at end
- * of frchain_now.
- */
-void
+/* Call this to close off a completed frag, and start up a new (empty)
+ frag, in the same subsegment as the old frag.
+ [frchain_now remains the same but frag_now is updated.]
+ Because this calculates the correct value of fr_fix by
+ looking at the obstack 'frags', it needs to know how many
+ characters at the end of the old frag belong to the maximal
+ variable part; The rest must belong to fr_fix.
+ It doesn't actually set up the old frag's fr_var. You may have
+ set fr_var == 1, but allocated 10 chars to the end of the frag;
+ In this case you pass old_frags_var_max_size == 10.
+ In fact, you may use fr_var for something totally unrelated to the
+ size of the variable part of the frag; None of the generic frag
+ handling code makes use of fr_var.
+
+ Make a new frag, initialising some components. Link new frag at end
+ of frchain_now. */
+
+void
frag_new (old_frags_var_max_size)
/* Number of chars (already allocated on obstack frags) in
- variable_length part of frag. */
+ variable_length part of frag. */
int old_frags_var_max_size;
{
fragS *former_last_fragP;
@@ -122,7 +121,7 @@ frag_new (old_frags_var_max_size)
assert (frag_now->fr_type != 0);
/* This will align the obstack so the next struct we allocate on it
- will begin at a correct boundary. */
+ will begin at a correct boundary. */
obstack_finish (&frchain_now->frch_obstack);
frchP = frchain_now;
know (frchP);
@@ -136,7 +135,7 @@ frag_new (old_frags_var_max_size)
/* Generally, frag_now->points to an address rounded up to next
alignment. However, characters will add to obstack frags
IMMEDIATELY after the struct frag, even if they are not starting
- at an alignment address. */
+ at an alignment address. */
former_last_fragP->fr_next = frag_now;
frchP->frch_last = frag_now;
@@ -150,17 +149,13 @@ frag_new (old_frags_var_max_size)
assert (frchain_now->frch_last == frag_now);
frag_now->fr_next = NULL;
-} /* frag_new() */
+}
-/*
- * frag_more()
- *
- * Start a new frag unless we have n more chars of room in the current frag.
- * Close off the old frag with a .fill 0.
- *
- * Return the address of the 1st char to write into. Advance
- * frag_now_growth past the new chars.
- */
+/* Start a new frag unless we have n more chars of room in the current frag.
+ Close off the old frag with a .fill 0.
+
+ Return the address of the 1st char to write into. Advance
+ frag_now_growth past the new chars. */
char *
frag_more (nchars)
@@ -184,18 +179,14 @@ frag_more (nchars)
retval = obstack_next_free (&frchain_now->frch_obstack);
obstack_blank_fast (&frchain_now->frch_obstack, nchars);
return (retval);
-} /* frag_more() */
+}
-/*
- * frag_var()
- *
- * Start a new frag unless we have max_chars more chars of room in the current frag.
- * Close off the old frag with a .fill 0.
- *
- * Set up a machine_dependent relaxable frag, then start a new frag.
- * Return the address of the 1st char of the var part of the old frag
- * to write into.
- */
+/* Start a new frag unless we have max_chars more chars of room in the
+ current frag. Close off the old frag with a .fill 0.
+
+ Set up a machine_dependent relaxable frag, then start a new frag.
+ Return the address of the 1st char of the var part of the old frag
+ to write into. */
char *
frag_var (type, max_chars, var, subtype, symbol, offset, opcode)
@@ -231,13 +222,9 @@ frag_var (type, max_chars, var, subtype, symbol, offset, opcode)
return (retval);
}
-/*
- * frag_variant()
- *
- * OVE: This variant of frag_var assumes that space for the tail has been
- * allocated by caller.
- * No call to frag_grow is done.
- */
+/* OVE: This variant of frag_var assumes that space for the tail has been
+ allocated by caller.
+ No call to frag_grow is done. */
char *
frag_variant (type, max_chars, var, subtype, symbol, offset, opcode)
@@ -269,14 +256,11 @@ frag_variant (type, max_chars, var, subtype, symbol, offset, opcode)
as_where (&frag_now->fr_file, &frag_now->fr_line);
frag_new (max_chars);
return (retval);
-} /* frag_variant() */
+}
-/*
- * frag_wane()
- *
- * Reduce the variable end of a frag to a harmless state.
- */
-void
+/* Reduce the variable end of a frag to a harmless state. */
+
+void
frag_wane (fragP)
register fragS *fragP;
{
@@ -292,7 +276,7 @@ frag_wane (fragP)
the maximum number of characters to skip when doing the alignment,
or 0 if there is no maximum. */
-void
+void
frag_align (alignment, fill_character, max)
int alignment;
int fill_character;
@@ -301,9 +285,10 @@ frag_align (alignment, fill_character, max)
if (now_seg == absolute_section)
{
addressT new_off;
+ addressT mask;
- new_off = ((abs_section_offset + alignment - 1)
- &~ ((1 << alignment) - 1));
+ mask = (~(addressT) 0) << alignment;
+ new_off = (abs_section_offset + ~mask) & mask;
if (max == 0 || new_off - abs_section_offset <= (addressT) max)
abs_section_offset = new_off;
}
@@ -324,7 +309,7 @@ frag_align (alignment, fill_character, max)
FILL_PATTERN. MAX is the maximum number of characters to skip when
doing the alignment, or 0 if there is no maximum. */
-void
+void
frag_align_pattern (alignment, fill_pattern, n_fill, max)
int alignment;
const char *fill_pattern;
@@ -338,20 +323,53 @@ frag_align_pattern (alignment, fill_pattern, n_fill, max)
memcpy (p, fill_pattern, n_fill);
}
+/* The NOP_OPCODE is for the alignment fill value. Fill it with a nop
+ instruction so that the disassembler does not choke on it. */
+#ifndef NOP_OPCODE
+#define NOP_OPCODE 0x00
+#endif
+
+/* Use this to restrict the amount of memory allocated for representing
+ the alignment code. Needs to be large enough to hold any fixed sized
+ prologue plus the replicating portion. */
+#ifndef MAX_MEM_FOR_RS_ALIGN_CODE
+ /* Assume that if HANDLE_ALIGN is not defined then no special action
+ is required to code fill, which means that we get just repeat the
+ one NOP_OPCODE byte. */
+# ifndef HANDLE_ALIGN
+# define MAX_MEM_FOR_RS_ALIGN_CODE 1
+# else
+# define MAX_MEM_FOR_RS_ALIGN_CODE ((1 << alignment) - 1)
+# endif
+#endif
+
+void
+frag_align_code (alignment, max)
+ int alignment;
+ int max;
+{
+ char *p;
+
+ p = frag_var (rs_align_code, MAX_MEM_FOR_RS_ALIGN_CODE, 1,
+ (relax_substateT) max, (symbolS *) 0,
+ (offsetT) alignment, (char *) 0);
+ *p = NOP_OPCODE;
+}
+
addressT
frag_now_fix_octets ()
{
if (now_seg == absolute_section)
return abs_section_offset;
- return ((char*) obstack_next_free (&frchain_now->frch_obstack)
- - frag_now->fr_literal);
+ return ((char *) obstack_next_free (&frchain_now->frch_obstack)
+ - frag_now->fr_literal);
}
addressT
frag_now_fix ()
{
- return frag_now_fix_octets() / OCTETS_PER_BYTE;
+ return frag_now_fix_octets () / OCTETS_PER_BYTE;
}
void
@@ -365,5 +383,3 @@ frag_append_1_char (datum)
}
obstack_1grow (&frchain_now->frch_obstack, datum);
}
-
-/* end of frags.c */
diff --git a/gnu/usr.bin/binutils/gas/frags.h b/gnu/usr.bin/binutils/gas/frags.h
index dcd9a2f813a..e4cb0509dbc 100644
--- a/gnu/usr.bin/binutils/gas/frags.h
+++ b/gnu/usr.bin/binutils/gas/frags.h
@@ -1,5 +1,5 @@
/* frags.h - Header file for the frag concept.
- Copyright (C) 1987, 92, 93, 94, 95, 97, 98, 99, 2000
+ Copyright 1987, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -26,37 +26,34 @@
struct obstack;
#endif
-/*
- * A code fragment (frag) is some known number of chars, followed by some
- * unknown number of chars. Typically the unknown number of chars is an
- * instruction address whose size is yet unknown. We always know the greatest
- * possible size the unknown number of chars may become, and reserve that
- * much room at the end of the frag.
- * Once created, frags do not change address during assembly.
- * We chain the frags in (a) forward-linked list(s). The object-file address
- * of the 1st char of a frag is generally not known until after relax().
- * Many things at assembly time describe an address by {object-file-address
- * of a particular frag}+offset.
-
- BUG: it may be smarter to have a single pointer off to various different
- notes for different frag kinds. See how code pans
- */
-
-struct frag
-{
- /* Object file address (as an octet offset). */
+/* A code fragment (frag) is some known number of chars, followed by some
+ unknown number of chars. Typically the unknown number of chars is an
+ instruction address whose size is yet unknown. We always know the greatest
+ possible size the unknown number of chars may become, and reserve that
+ much room at the end of the frag.
+ Once created, frags do not change address during assembly.
+ We chain the frags in (a) forward-linked list(s). The object-file address
+ of the 1st char of a frag is generally not known until after relax().
+ Many things at assembly time describe an address by {object-file-address
+ of a particular frag}+offset.
+
+ BUG: it may be smarter to have a single pointer off to various different
+ notes for different frag kinds. See how code pans. */
+
+struct frag {
+ /* Object file address (as an octet offset). */
addressT fr_address;
- /* Chain forward; ascending address order. Rooted in frch_root. */
+ /* Chain forward; ascending address order. Rooted in frch_root. */
struct frag *fr_next;
- /* (Fixed) number of octets we know we have. May be 0. */
+ /* (Fixed) number of octets we know we have. May be 0. */
offsetT fr_fix;
/* May be used for (Variable) number of octets after above.
The generic frag handling code no longer makes any use of fr_var. */
offsetT fr_var;
- /* For variable-length tail. */
+ /* For variable-length tail. */
symbolS *fr_symbol;
- /* For variable-length tail. */
+ /* For variable-length tail. */
offsetT fr_offset;
/* Points to opcode low addr byte, for relaxation. */
char *fr_opcode;
@@ -65,6 +62,10 @@ struct frag
struct list_info_struct *line;
#endif
+ /* Flipped each relax pass so we can easily determine whether
+ fr_address has been adjusted. */
+ unsigned int relax_marker:1;
+
/* What state is my tail in? */
relax_stateT fr_type;
relax_substateT fr_subtype;
@@ -94,8 +95,8 @@ struct frag
};
#define SIZEOF_STRUCT_FRAG \
-((char *)zero_address_frag.fr_literal-(char *)&zero_address_frag)
-/* We want to say fr_literal[0] above. */
+((char *) zero_address_frag.fr_literal - (char *) &zero_address_frag)
+/* We want to say fr_literal[0] above. */
/* Current frag we are building. This frag is incomplete. It is,
however, included in frchain_now. The fr_fix field is bogus;
@@ -104,31 +105,28 @@ COMMON fragS *frag_now;
extern addressT frag_now_fix PARAMS ((void));
extern addressT frag_now_fix_octets PARAMS ((void));
-/* For foreign-segment symbol fixups. */
+/* For foreign-segment symbol fixups. */
COMMON fragS zero_address_frag;
-/* For local common (N_BSS segment) fixups. */
+/* For local common (N_BSS segment) fixups. */
COMMON fragS bss_address_frag;
#if 0
-/*
- * A macro to speed up appending exactly 1 char
- * to current frag.
- */
-/* JF changed < 1 to <= 1 to avoid a race conditon */
-#define FRAG_APPEND_1_CHAR(datum) \
-{ \
- if (obstack_room( &frags ) <= 1) {\
- frag_wane (frag_now); \
- frag_new (0); \
- } \
- obstack_1grow( &frags, datum ); \
+/* A macro to speed up appending exactly 1 char to current frag. */
+/* JF changed < 1 to <= 1 to avoid a race conditon. */
+#define FRAG_APPEND_1_CHAR(datum) \
+{ \
+ if (obstack_room (&frags) <= 1) \
+ { \
+ frag_wane (frag_now); \
+ frag_new (0); \
+ } \
+ obstack_1grow (&frags, datum); \
}
#else
extern void frag_append_1_char PARAMS ((int));
#define FRAG_APPEND_1_CHAR(X) frag_append_1_char (X)
#endif
-
void frag_init PARAMS ((void));
fragS *frag_alloc PARAMS ((struct obstack *));
void frag_grow PARAMS ((unsigned int nchars));
@@ -138,6 +136,7 @@ void frag_align_pattern PARAMS ((int alignment,
const char *fill_pattern,
int n_fill,
int max));
+void frag_align_code PARAMS ((int alignment, int max));
void frag_new PARAMS ((int old_frags_var_max_size));
void frag_wane PARAMS ((fragS * fragP));
diff --git a/gnu/usr.bin/binutils/gas/gasp.c b/gnu/usr.bin/binutils/gas/gasp.c
index a8f56192aee..ad33a4640b8 100644
--- a/gnu/usr.bin/binutils/gas/gasp.c
+++ b/gnu/usr.bin/binutils/gas/gasp.c
@@ -1,5 +1,5 @@
/* gasp.c - Gnu assembler preprocessor main program.
- Copyright (C) 1994, 95, 96, 97, 98, 99, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
@@ -20,14 +20,12 @@
You should have received a copy of the GNU General Public License
along with GASP; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
/*
-
This program translates the input macros and stuff into a form
suitable for gas to consume.
-
gasp [-sdhau] [-c char] [-o <outfile>] <infile>*
-s copy source to output
@@ -43,10 +41,8 @@ suitable for gas to consume.
Macro arg parameters subsituted by name, don't need the &.
String can start with ' too.
Strings can be surrounded by <..>
- A %<exp> in a string evaluates the expression
+ A %<exp> in a string evaluates the expression
Literal char in a string with !
-
-
*/
#include "config.h"
@@ -83,29 +79,28 @@ extern void as_abort PARAMS ((const char *, int, const char *));
is used by the hash table code used by macro.c. */
int chunksize = 0;
-#define MAX_INCLUDES 30 /* Maximum include depth */
-#define MAX_REASONABLE 1000 /* Maximum number of expansions */
-
-int unreasonable; /* -u on command line */
-int stats; /* -d on command line */
-int print_line_number; /* -p flag on command line */
-int copysource; /* -c flag on command line */
-int warnings; /* Number of WARNINGs generated so far. */
-int errors; /* Number of ERRORs generated so far. */
-int fatals; /* Number of fatal ERRORs generated so far (either 0 or 1). */
-int alternate = 0; /* -a on command line */
-int mri = 0; /* -M on command line */
+#define MAX_INCLUDES 30 /* Maximum include depth. */
+#define MAX_REASONABLE 1000 /* Maximum number of expansions. */
+
+int unreasonable; /* -u on command line. */
+int stats; /* -d on command line. */
+int print_line_number; /* -p flag on command line. */
+int copysource; /* -c flag on command line. */
+int warnings; /* Number of WARNINGs generated so far. */
+int errors; /* Number of ERRORs generated so far. */
+int fatals; /* Number of fatal ERRORs generated so far (either 0 or 1). */
+int alternate = 0; /* -a on command line. */
+int mri = 0; /* -M on command line. */
char comment_char = '!';
-int radix = 10; /* Default radix */
+int radix = 10; /* Default radix. */
-int had_end; /* Seen .END */
+int had_end; /* Seen .END. */
-/* The output stream */
+/* The output stream. */
FILE *outfile;
-/* the attributes of each character are stored as a bit pattern
- chartype, which gives us quick tests. */
-
+/* The attributes of each character are stored as a bit pattern
+ chartype, which gives us quick tests. */
#define FIRSTBIT 1
#define NEXTBIT 2
@@ -121,7 +116,6 @@ FILE *outfile;
#define ISBASE(x) (chartype[(unsigned char)(x)] & BASEBIT)
static char chartype[256];
-
/* Conditional assembly uses the `ifstack'. Each aif pushes another
entry onto the stack, and sets the on flag if it should. The aelse
sets hadelse, and toggles on. An aend pops a level. We limit to
@@ -130,118 +124,101 @@ static char chartype[256];
a bug in the user's macro structure. */
#define IFNESTING 100
-struct
- {
- int on; /* is the level being output */
- int hadelse; /* has an aelse been seen */
- }
-ifstack[IFNESTING];
+struct {
+ int on; /* Is the level being output. */
+ int hadelse; /* Has an aelse been seen. */
+} ifstack[IFNESTING];
+
int ifi;
/* The final and intermediate results of expression evaluation are kept in
exp_t's. Note that a symbol is not an sb, but a pointer into the input
- line. It must be coped somewhere safe before the next line is read in. */
-
-typedef struct
- {
- char *name;
- int len;
- }
-symbol;
+ line. It must be coped somewhere safe before the next line is read in. */
-typedef struct
- {
- int value; /* constant part */
- symbol add_symbol; /* name part */
- symbol sub_symbol; /* name part */
- }
-exp_t;
+typedef struct {
+ char *name;
+ int len;
+} symbol;
+typedef struct {
+ int value; /* Constant part. */
+ symbol add_symbol; /* Name part. */
+ symbol sub_symbol; /* Name part. */
+} exp_t;
/* Hashing is done in a pretty standard way. A hash_table has a
pointer to a vector of pointers to hash_entrys, and the size of the
vector. A hash_entry contains a union of all the info we like to
store in hash table. If there is a hash collision, hash_entries
- with the same hash are kept in a chain. */
-
-/* What the data in a hash_entry means */
-typedef enum
- {
- hash_integer, /* name->integer mapping */
- hash_string, /* name->string mapping */
- hash_macro, /* name is a macro */
- hash_formal /* name is a formal argument */
- } hash_type;
-
-typedef struct hs
- {
- sb key; /* symbol name */
- hash_type type; /* symbol meaning */
- union
- {
- sb s;
- int i;
- struct macro_struct *m;
- struct formal_struct *f;
- } value;
- struct hs *next; /* next hash_entry with same hash key */
- } hash_entry;
-
-typedef struct
- {
- hash_entry **table;
- int size;
- } hash_table;
-
-
-/* how we nest files and expand macros etc.
-
- we keep a stack of of include_stack structs. each include file
- pushes a new level onto the stack. we keep an sb with a pushback
+ with the same hash are kept in a chain. */
+
+/* What the data in a hash_entry means. */
+typedef enum {
+ hash_integer, /* Name->integer mapping. */
+ hash_string, /* Name->string mapping. */
+ hash_macro, /* Name is a macro. */
+ hash_formal /* Name is a formal argument. */
+} hash_type;
+
+typedef struct hs {
+ sb key; /* Symbol name. */
+ hash_type type; /* Symbol meaning. */
+ union {
+ sb s;
+ int i;
+ struct macro_struct *m;
+ struct formal_struct *f;
+ } value;
+ struct hs *next; /* Next hash_entry with same hash key. */
+} hash_entry;
+
+typedef struct {
+ hash_entry **table;
+ int size;
+} hash_table;
+
+/* How we nest files and expand macros etc.
+
+ We keep a stack of of include_stack structs. Each include file
+ pushes a new level onto the stack. We keep an sb with a pushback
too. unget chars are pushed onto the pushback sb, getchars first
checks the pushback sb before reading from the input stream.
- small things are expanded by adding the text of the item onto the
- pushback sb. larger items are grown by pushing a new level and
- allocating the entire pushback buf for the item. each time
- something like a macro is expanded, the stack index is changed. we
+ Small things are expanded by adding the text of the item onto the
+ pushback sb. Larger items are grown by pushing a new level and
+ allocating the entire pushback buf for the item. Each time
+ something like a macro is expanded, the stack index is changed. We
can then perform an exitm by popping all entries off the stack with
- the same stack index. if we're being reasonable, we can detect
- recusive expansion by checking the index is reasonably small.
- */
-
-typedef enum
- {
- include_file, include_repeat, include_while, include_macro
- } include_type;
-
-struct include_stack
- {
- sb pushback; /* current pushback stream */
- int pushback_index; /* next char to read from stream */
- FILE *handle; /* open file */
- sb name; /* name of file */
- int linecount; /* number of lines read so far */
- include_type type;
- int index; /* index of this layer */
- }
-include_stack[MAX_INCLUDES];
+ the same stack index. If we're being reasonable, we can detect
+ recusive expansion by checking the index is reasonably small. */
+
+typedef enum {
+ include_file, include_repeat, include_while, include_macro
+} include_type;
+
+struct include_stack {
+ sb pushback; /* Current pushback stream. */
+ int pushback_index; /* Next char to read from stream. */
+ FILE *handle; /* Open file. */
+ sb name; /* Name of file. */
+ int linecount; /* Number of lines read so far. */
+ include_type type;
+ int index; /* Index of this layer. */
+} include_stack[MAX_INCLUDES];
struct include_stack *sp;
#define isp (sp - include_stack)
-/* Include file list */
+/* Include file list. */
-typedef struct include_path
-{
+typedef struct include_path {
struct include_path *next;
sb path;
-} include_path;
+} include_path;
include_path *paths_head;
include_path *paths_tail;
-
static void quit PARAMS ((void));
static void hash_new_table PARAMS ((int, hash_table *));
static int hash PARAMS ((sb *));
@@ -334,16 +311,36 @@ static void do_define PARAMS ((const char *));
static void show_usage PARAMS ((FILE *, int));
static void show_help PARAMS ((void));
-#define FATAL(x) \
- do { include_print_where_line (stderr); fprintf x ; fatals++; quit(); } while(0)
-#define ERROR(x) \
- do { include_print_where_line (stderr); fprintf x; errors++; } while(0)
-#define WARNING(x) \
- do { include_print_where_line (stderr); fprintf x; warnings++;} while(0)
-
+#define FATAL(x) \
+ do \
+ { \
+ include_print_where_line (stderr); \
+ fprintf x; \
+ fatals++; \
+ quit (); \
+ } \
+ while (0)
+
+#define ERROR(x) \
+ do \
+ { \
+ include_print_where_line (stderr); \
+ fprintf x; \
+ errors++; \
+ } \
+ while (0)
+
+#define WARNING(x) \
+ do \
+ { \
+ include_print_where_line (stderr); \
+ fprintf x; \
+ warnings++; \
+ } \
+ while (0)
+
+/* Exit the program and return the right ERROR code. */
-
-/* exit the program and return the right ERROR code. */
static void
quit ()
{
@@ -353,20 +350,22 @@ quit ()
else
exitcode = 0;
- if (stats)
+ if (stats)
{
int i;
- for (i = 0; i < sb_max_power_two; i++)
+ for (i = 0; i < sb_max_power_two; i++)
{
- fprintf (stderr, "strings size %8d : %d\n", 1<<i, string_count[i]);
+ fprintf (stderr, "strings size %8d : %d\n",
+ 1 << i, string_count[i]);
}
}
exit (exitcode);
}
-/* hash table maintenance. */
+/* Hash table maintenance. */
-/* build a new hash table with size buckets, and fill in the info at ptr. */
+/* Build a new hash table with size buckets
+ and fill in the info at ptr. */
static void
hash_new_table (size, ptr)
@@ -381,7 +380,7 @@ hash_new_table (size, ptr)
ptr->table[i] = 0;
}
-/* calculate and return the hash value of the sb at key. */
+/* Calculate and return the hash value of the sb at key. */
static int
hash (key)
@@ -398,11 +397,10 @@ hash (key)
return k & 0xf0fff;
}
-/* lookup key in hash_table tab, if present, then return it, otherwise
- build a new one and fill it with hash_integer. */
+/* Look up key in hash_table tab. If present, then return it,
+ otherwise build a new one and fill it with hash_integer. */
-static
-hash_entry *
+static hash_entry *
hash_create (tab, key)
hash_table *tab;
sb *key;
@@ -433,11 +431,10 @@ hash_create (tab, key)
}
}
-/* add sb name with key into hash_table tab. if replacing old value
- and again, then ERROR. */
+/* Add sb name with key into hash_table tab.
+ If replacing old value and again, then ERROR. */
-static
-void
+static void
hash_add_to_string_table (tab, key, name, again)
hash_table *tab;
sb *key;
@@ -457,14 +454,13 @@ hash_add_to_string_table (tab, key, name, again)
ptr->type = hash_string;
sb_reset (&ptr->value.s);
-
+
sb_add_sb (&ptr->value.s, name);
}
-/* add integer name to hash_table tab with sb key. */
+/* Add integer name to hash_table tab with sb key. */
-static
-void
+static void
hash_add_to_int_table (tab, key, name)
hash_table *tab;
sb *key;
@@ -474,11 +470,10 @@ hash_add_to_int_table (tab, key, name)
ptr->value.i = name;
}
-/* lookup sb key in hash_table tab. if found return hash_entry result,
- else 0. */
-
-static
-hash_entry *
+/* Look up sb key in hash_table tab.
+ If found, return hash_entry result, else 0. */
+
+static hash_entry *
hash_lookup (tab, key)
hash_table *tab;
sb *key;
@@ -496,7 +491,6 @@ hash_lookup (tab, key)
return 0;
}
-
/* expressions
are handled in a really simple recursive decent way. each bit of
@@ -511,14 +505,12 @@ hash_lookup (tab, key)
+ -
&
| ~
-
*/
+/* Make sure that the exp_t at term is constant.
+ If not the give the op ERROR. */
-/* make sure that the exp_t at term is constant, if not the give the op ERROR. */
-
-static
-void
+static void
checkconst (op, term)
int op;
exp_t *term;
@@ -530,12 +522,10 @@ checkconst (op, term)
}
}
-/* turn the number in string at idx into a number of base,
- fill in ptr and return the index of the first character not in the
- number. */
+/* Turn the number in string at idx into a number of base, fill in
+ ptr, and return the index of the first character not in the number. */
-static
-int
+static int
sb_strtol (idx, string, base, ptr)
int idx;
sb *string;
@@ -615,8 +605,6 @@ level_0 (idx, string, lhs)
return sb_skip_white (idx, string);
}
-
-
static int
level_1 (idx, string, lhs)
int idx;
@@ -695,7 +683,6 @@ level_2 (idx, string, lhs)
return sb_skip_white (idx, string);
}
-
static int
level_3 (idx, string, lhs)
int idx;
@@ -720,7 +707,7 @@ level_3 (idx, string, lhs)
{
ERROR ((stderr, _("can't add two relocatable expressions\n")));
}
- /* change nn+symbol to symbol + nn */
+ /* Change nn+symbol to symbol + nn. */
if (rhs.add_symbol.name)
{
lhs->add_symbol = rhs.add_symbol;
@@ -794,10 +781,9 @@ level_5 (idx, string, lhs)
return sb_skip_white (idx, string);
}
-
-/* parse the expression at offset idx into string, fill up res with
- the result. return the index of the first char past the expression.
- */
+/* Parse the expression at offset idx into string, fill up res with
+ the result. Return the index of the first char past the
+ expression. */
static int
exp_parse (idx, string, res)
@@ -808,9 +794,8 @@ exp_parse (idx, string, res)
return level_5 (sb_skip_white (idx, string), string, res);
}
-
-/* turn the expression at exp into text and glue it onto the end of
- string. */
+/* Turn the expression at exp into text and glue it onto the end of
+ string. */
static void
exp_string (exp, string)
@@ -849,10 +834,9 @@ exp_string (exp, string)
sb_add_char (string, '0');
}
-
-/* parse the expression at offset idx into sb in, return the value in val.
- if the expression is not constant, give ERROR emsg. returns the index
- of the first character past the end of the expression. */
+/* Parse the expression at offset idx into sb in. Return the value in
+ val. If the expression is not constant, give ERROR emsg. Return
+ the index of the first character past the end of the expression. */
static int
exp_get_abs (emsg, idx, in, val)
@@ -869,11 +853,17 @@ exp_get_abs (emsg, idx, in, val)
return idx;
}
+/* Current label parsed from line. */
+sb label;
+
+/* Hash table for all assigned variables. */
+hash_table assign_hash_table;
-sb label; /* current label parsed from line */
-hash_table assign_hash_table; /* hash table for all assigned variables */
-hash_table keyword_hash_table; /* hash table for keyword */
-hash_table vars; /* hash table for eq variables */
+/* Hash table for keyword. */
+hash_table keyword_hash_table;
+
+/* Hash table for eq variables. */
+hash_table vars;
#define in_comment ';'
@@ -886,7 +876,7 @@ strip_comments (out)
int i = 0;
for (i = 0; i < out->len; i++)
{
- if (ISCOMMENTCHAR(s[i]))
+ if (ISCOMMENTCHAR (s[i]))
{
out->len = i;
return;
@@ -895,7 +885,7 @@ strip_comments (out)
}
#endif
-/* push back character ch so that it can be read again. */
+/* Push back character ch so that it can be read again. */
static void
unget (ch)
@@ -911,10 +901,10 @@ unget (ch)
sb_add_char (&sp->pushback, ch);
}
-/* push the sb ptr onto the include stack, with the given name, type and index. */
+/* Push the sb ptr onto the include stack, with the given name, type
+ and index. */
-static
-void
+static void
include_buf (name, ptr, type, index)
sb *name;
sb *ptr;
@@ -935,10 +925,10 @@ include_buf (name, ptr, type, index)
sb_add_sb (&sp->pushback, ptr);
}
+/* Used in ERROR messages, print info on where the include stack is
+ onto file. */
-/* used in ERROR messages, print info on where the include stack is onto file. */
-static
-void
+static void
include_print_where_line (file)
FILE *file;
{
@@ -951,7 +941,8 @@ include_print_where_line (file)
}
}
-/* used in listings, print the line number onto file. */
+/* Used in listings, print the line number onto file. */
+
static void
include_print_line (file)
FILE *file;
@@ -973,8 +964,7 @@ include_print_line (file)
}
}
-
-/* read a line from the top of the include stack into sb in. */
+/* Read a line from the top of the include stack into sb in. */
static int
get_line (in)
@@ -1022,7 +1012,7 @@ get_line (in)
online = 0;
if (ch == '+')
{
- /* continued line */
+ /* Continued line. */
if (copysource)
{
putc (comment_char, outfile);
@@ -1047,7 +1037,7 @@ get_line (in)
return more;
}
-/* find a label from sb in and put it in out. */
+/* Find a label from sb in and put it in out. */
static int
grab_label (in, out)
@@ -1060,9 +1050,9 @@ grab_label (in, out)
{
sb_add_char (out, in->ptr[i]);
i++;
- while ((ISNEXTCHAR (in->ptr[i])
+ while ((ISNEXTCHAR (in->ptr[i])
|| in->ptr[i] == '\\'
- || in->ptr[i] == '&')
+ || in->ptr[i] == '&')
&& i < in->len)
{
sb_add_char (out, in->ptr[i]);
@@ -1072,8 +1062,8 @@ grab_label (in, out)
return i;
}
-/* find all strange base stuff and turn into decimal. also
- find all the other numbers and convert them from the default radix */
+/* Find all strange base stuff and turn into decimal. Also
+ find all the other numbers and convert them from the default radix. */
static void
change_base (idx, in, out)
@@ -1133,7 +1123,7 @@ change_base (idx, in, out)
}
else if (ISFIRSTCHAR (in->ptr[idx]))
{
- /* copy entire names through quickly */
+ /* Copy entire names through quickly. */
sb_add_char (out, in->ptr[idx]);
idx++;
while (idx < in->len && ISNEXTCHAR (in->ptr[idx]))
@@ -1145,13 +1135,13 @@ change_base (idx, in, out)
else if (isdigit ((unsigned char) in->ptr[idx]))
{
int value;
- /* all numbers must start with a digit, let's chew it and
- spit out decimal */
+ /* All numbers must start with a digit, let's chew it and
+ spit out decimal. */
idx = sb_strtol (idx, in, radix, &value);
sprintf (buffer, "%d", value);
sb_add_string (out, buffer);
- /* skip all undigsested letters */
+ /* Skip all undigsested letters. */
while (idx < in->len && ISNEXTCHAR (in->ptr[idx]))
{
sb_add_char (out, in->ptr[idx]);
@@ -1161,7 +1151,7 @@ change_base (idx, in, out)
else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'')
{
char tchar = in->ptr[idx];
- /* copy entire names through quickly */
+ /* Copy entire names through quickly. */
sb_add_char (out, in->ptr[idx]);
idx++;
while (idx < in->len && in->ptr[idx] != tchar)
@@ -1172,7 +1162,7 @@ change_base (idx, in, out)
}
else
{
- /* nothing special, just pass it through */
+ /* Nothing special, just pass it through. */
sb_add_char (out, in->ptr[idx]);
idx++;
}
@@ -1180,7 +1170,8 @@ change_base (idx, in, out)
}
-/* .end */
+/* .end */
+
static void
do_end (in)
sb *in;
@@ -1190,7 +1181,7 @@ do_end (in)
fprintf (outfile, "%s\n", sb_name (in));
}
-/* .assign */
+/* .assign */
static void
do_assign (again, idx, in)
@@ -1198,7 +1189,7 @@ do_assign (again, idx, in)
int idx;
sb *in;
{
- /* stick label in symbol table with following value */
+ /* Stick label in symbol table with following value. */
exp_t e;
sb acc;
@@ -1209,11 +1200,9 @@ do_assign (again, idx, in)
sb_kill (&acc);
}
+/* .radix [b|q|d|h] */
-/* .radix [b|q|d|h] */
-
-static
-void
+static void
do_radix (ptr)
sb *ptr;
{
@@ -1241,8 +1230,7 @@ do_radix (ptr)
}
}
-
-/* Parse off a .b, .w or .l */
+/* Parse off a .b, .w or .l. */
static int
get_opsize (idx, in, size)
@@ -1281,13 +1269,13 @@ get_opsize (idx, in, size)
return idx;
}
-static
-int eol(idx, line)
+static int
+eol (idx, line)
int idx;
sb *line;
{
idx = sb_skip_white (idx, line);
- if (idx < line->len
+ if (idx < line->len
&& ISCOMMENTCHAR(line->ptr[idx]))
return 1;
if (idx >= line->len)
@@ -1295,8 +1283,8 @@ int eol(idx, line)
return 0;
}
-/* .data [.b|.w|.l] <data>*
- or d[bwl] <data>* */
+/* .data [.b|.w|.l] <data>*
+ or d[bwl] <data>* */
static void
do_data (idx, in, size)
@@ -1309,13 +1297,14 @@ do_data (idx, in, size)
sb acc;
sb_new (&acc);
- if (!size)
+ if (!size)
{
idx = get_opsize (idx, in, &opsize);
}
- else {
- opsize = size;
- }
+ else
+ {
+ opsize = size;
+ }
switch (opsize)
{
case 4:
@@ -1329,13 +1318,12 @@ do_data (idx, in, size)
break;
}
-
fprintf (outfile, "%s\t", opname);
- idx = sb_skip_white (idx, in);
+ idx = sb_skip_white (idx, in);
- if (alternate
- && idx < in->len
+ if (alternate
+ && idx < in->len
&& in->ptr[idx] == '"')
{
int i;
@@ -1343,11 +1331,11 @@ do_data (idx, in, size)
for (i = 0; i < acc.len; i++)
{
if (i)
- fprintf(outfile,",");
+ fprintf (outfile, ",");
fprintf (outfile, "%d", acc.ptr[i]);
}
}
- else
+ else
{
while (!eol (idx, in))
{
@@ -1368,7 +1356,7 @@ do_data (idx, in, size)
fprintf (outfile, "\n");
}
-/* .datab [.b|.w|.l] <repeat>,<fill> */
+/* .datab [.b|.w|.l] <repeat>,<fill> */
static void
do_datab (idx, in)
@@ -1388,7 +1376,7 @@ do_datab (idx, in)
fprintf (outfile, ".fill\t%d,%d,%d\n", repeat, opsize, fill);
}
-/* .align <size> */
+/* .align <size> */
static void
do_align (idx, in)
@@ -1415,7 +1403,7 @@ do_align (idx, in)
fprintf (outfile, "\n");
}
-/* .res[.b|.w|.l] <size> */
+/* .res[.b|.w|.l] <size> */
static void
do_res (idx, in, type)
@@ -1427,7 +1415,7 @@ do_res (idx, in, type)
int count = 0;
idx = get_opsize (idx, in, &size);
- while (!eol(idx, in))
+ while (!eol (idx, in))
{
idx = sb_skip_white (idx, in);
if (in->ptr[idx] == ',')
@@ -1441,8 +1429,7 @@ do_res (idx, in, type)
}
}
-
-/* .export */
+/* .export */
static void
do_export (in)
@@ -1451,7 +1438,7 @@ do_export (in)
fprintf (outfile, ".global %s\n", sb_name (in));
}
-/* .print [list] [nolist] */
+/* .print [list] [nolist] */
static void
do_print (idx, in)
@@ -1475,7 +1462,8 @@ do_print (idx, in)
}
}
-/* .head */
+/* .head */
+
static void
do_heading (idx, in)
int idx;
@@ -1488,7 +1476,7 @@ do_heading (idx, in)
sb_kill (&head);
}
-/* .page */
+/* .page */
static void
do_page ()
@@ -1496,7 +1484,8 @@ do_page ()
fprintf (outfile, ".eject\n");
}
-/* .form [lin=<value>] [col=<value>] */
+/* .form [lin=<value>] [col=<value>] */
+
static void
do_form (idx, in)
int idx;
@@ -1527,7 +1516,6 @@ do_form (idx, in)
}
-
/* Fetch string from the input stream,
rules:
'Bxyx<whitespace> -> return 'Bxyza
@@ -1535,6 +1523,7 @@ do_form (idx, in)
"<string>" -> return string
xyx<whitespace> -> return xyz
*/
+
static int
get_any_string (idx, in, out, expand, pretend_quoted)
int idx;
@@ -1548,7 +1537,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
if (idx < in->len)
{
- if (in->len > 2 && in->ptr[idx+1] == '\'' && ISBASE (in->ptr[idx]))
+ if (in->len > 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx]))
{
while (!ISSEP (in->ptr[idx]))
sb_add_char (out, in->ptr[idx++]);
@@ -1559,12 +1548,12 @@ get_any_string (idx, in, out, expand, pretend_quoted)
{
int val;
char buf[20];
- /* Turns the next expression into a string */
+ /* Turns the next expression into a string. */
idx = exp_get_abs (_("% operator needs absolute expression"),
idx + 1,
in,
&val);
- sprintf(buf, "%d", val);
+ sprintf (buf, "%d", val);
sb_add_string (out, buf);
}
else if (in->ptr[idx] == '"'
@@ -1573,35 +1562,36 @@ get_any_string (idx, in, out, expand, pretend_quoted)
{
if (alternate && expand)
{
- /* Keep the quotes */
- sb_add_char (out, '\"');
-
- idx = getstring (idx, in, out);
- sb_add_char (out, '\"');
+ /* Keep the quotes. */
+ sb_add_char (out, '\"');
+
+ idx = getstring (idx, in, out);
+ sb_add_char (out, '\"');
}
- else {
- idx = getstring (idx, in, out);
- }
+ else
+ {
+ idx = getstring (idx, in, out);
+ }
}
- else
+ else
{
- while (idx < in->len
+ while (idx < in->len
&& (in->ptr[idx] == '"'
|| in->ptr[idx] == '\''
- || pretend_quoted
+ || pretend_quoted
|| !ISSEP (in->ptr[idx])))
{
- if (in->ptr[idx] == '"'
+ if (in->ptr[idx] == '"'
|| in->ptr[idx] == '\'')
{
char tchar = in->ptr[idx];
sb_add_char (out, in->ptr[idx++]);
while (idx < in->len
&& in->ptr[idx] != tchar)
- sb_add_char (out, in->ptr[idx++]);
+ sb_add_char (out, in->ptr[idx++]);
if (idx == in->len)
- return idx;
+ return idx;
}
sb_add_char (out, in->ptr[idx++]);
}
@@ -1611,9 +1601,8 @@ get_any_string (idx, in, out, expand, pretend_quoted)
return idx;
}
-
-/* skip along sb in starting at idx, suck off whitespace a ( and more
- whitespace. return the idx of the next char */
+/* Skip along sb in starting at idx, suck off whitespace a ( and more
+ whitespace. Return the idx of the next char. */
static int
skip_openp (idx, in)
@@ -1627,8 +1616,8 @@ skip_openp (idx, in)
return idx;
}
-/* skip along sb in starting at idx, suck off whitespace a ) and more
- whitespace. return the idx of the next char */
+/* Skip along sb in starting at idx, suck off whitespace a ) and more
+ whitespace. Return the idx of the next char. */
static int
skip_closep (idx, in)
@@ -1642,7 +1631,7 @@ skip_closep (idx, in)
return idx;
}
-/* .len */
+/* .len */
static int
dolen (idx, in, out)
@@ -1665,11 +1654,9 @@ dolen (idx, in, out)
return idx;
}
+/* .instr */
-/* .instr */
-
-static
-int
+static int
doinstr (idx, in, out)
int idx;
sb *in;
@@ -1714,7 +1701,6 @@ doinstr (idx, in, out)
return idx;
}
-
static int
dosubstr (idx, in, out)
int idx;
@@ -1734,14 +1720,13 @@ dosubstr (idx, in, out)
idx = exp_get_abs (_("need absolute length.\n"), idx, in, &len);
idx = skip_closep (idx, in);
-
if (len < 0 || pos < 0 ||
pos > string.len
|| pos + len > string.len)
{
sb_add_string (out, " ");
}
- else
+ else
{
sb_add_char (out, '"');
while (len > 0)
@@ -1751,11 +1736,12 @@ dosubstr (idx, in, out)
}
sb_add_char (out, '"');
}
- sb_kill(&string);
+ sb_kill (&string);
return idx;
}
-/* scan line, change tokens in the hash table to their replacements */
+/* Scan line, change tokens in the hash table to their replacements. */
+
static void
process_assigns (idx, in, buf)
int idx;
@@ -1813,7 +1799,7 @@ process_assigns (idx, in, buf)
idx = dosubstr (idx + 7, in, buf);
else if (ISFIRSTCHAR (in->ptr[idx]))
{
- /* may be a simple name subsitution, see if we have a word */
+ /* May be a simple name subsitution, see if we have a word. */
sb acc;
int cur = idx + 1;
while (cur < in->len
@@ -1825,12 +1811,12 @@ process_assigns (idx, in, buf)
ptr = hash_lookup (&assign_hash_table, &acc);
if (ptr)
{
- /* Found a definition for it */
+ /* Found a definition for it. */
sb_add_sb (buf, &ptr->value.s);
}
else
{
- /* No definition, just copy the word */
+ /* No definition, just copy the word. */
sb_add_sb (buf, &acc);
}
sb_kill (&acc);
@@ -1857,8 +1843,7 @@ get_and_process (idx, in, out)
return idx;
}
-static
-void
+static void
process_file ()
{
sb line;
@@ -1870,13 +1855,13 @@ process_file ()
sb_new (&line);
sb_new (&t1);
sb_new (&t2);
- sb_new(&acc);
+ sb_new (&acc);
sb_new (&label_in);
sb_reset (&line);
more = get_line (&line);
while (more)
{
- /* Find any label and pseudo op that we're intested in */
+ /* Find any label and pseudo op that we're intested in. */
int l;
if (line.len == 0)
{
@@ -1893,7 +1878,7 @@ process_file ()
else
{
l = grab_label (&line, &label_in);
- sb_reset (&label);
+ sb_reset (&label);
if (line.ptr[l] == ':')
l++;
@@ -1936,15 +1921,12 @@ process_file ()
if (process_pseudo_op (l, &line, &acc))
{
-
-
}
else if (condass_on ())
{
if (macro_op (l, &line))
{
-
}
else
{
@@ -1955,7 +1937,7 @@ process_file ()
}
else
fprintf (outfile, "\t");
- sb_reset(&t1);
+ sb_reset (&t1);
process_assigns (l, &line, &t1);
sb_reset (&t2);
change_base (0, &t1, &t2);
@@ -1964,13 +1946,14 @@ process_file ()
}
}
}
- else {
- /* Only a label on this line */
- if (label.len && condass_on())
- {
- fprintf (outfile, "%s:\n", sb_name (&label));
- }
- }
+ else
+ {
+ /* Only a label on this line. */
+ if (label.len && condass_on ())
+ {
+ fprintf (outfile, "%s:\n", sb_name (&label));
+ }
+ }
}
if (had_end)
@@ -1983,10 +1966,6 @@ process_file ()
WARNING ((stderr, _("END missing from end of file.\n")));
}
-
-
-
-
static void
free_old_entry (ptr)
hash_entry *ptr;
@@ -1994,11 +1973,11 @@ free_old_entry (ptr)
if (ptr)
{
if (ptr->type == hash_string)
- sb_kill(&ptr->value.s);
+ sb_kill (&ptr->value.s);
}
}
-/* name: .ASSIGNA <value> */
+/* name: .ASSIGNA <value> */
static void
do_assigna (idx, in)
@@ -2026,7 +2005,7 @@ do_assigna (idx, in)
sb_kill (&tmp);
}
-/* name: .ASSIGNC <string> */
+/* name: .ASSIGNC <string> */
static void
do_assignc (idx, in)
@@ -2052,15 +2031,14 @@ do_assignc (idx, in)
sb_kill (&acc);
}
-
-/* name: .REG (reg) */
+/* name: .REG (reg) */
static void
do_reg (idx, in)
int idx;
sb *in;
{
- /* remove reg stuff from inside parens */
+ /* Remove reg stuff from inside parens. */
sb what;
if (!mri)
idx = skip_openp (idx, in);
@@ -2079,7 +2057,6 @@ do_reg (idx, in)
sb_kill (&what);
}
-
static int
condass_lookup_name (inbuf, idx, out, warn)
sb *inbuf;
@@ -2101,14 +2078,13 @@ condass_lookup_name (inbuf, idx, out, warn)
idx++;
ptr = hash_lookup (&vars, &condass_acc);
-
if (!ptr)
{
- if (warn)
+ if (warn)
{
WARNING ((stderr, _("Can't find preprocessor variable %s.\n"), sb_name (&condass_acc)));
}
- else
+ else
{
sb_add_string (out, "0");
}
@@ -2197,11 +2173,12 @@ istrue (idx, in)
{
int cond;
int same;
- /* This is a string comparision */
+ /* This is a string comparision. */
idx = getstring (idx, in, &acc_a);
idx = whatcond (idx, in, &cond);
idx = getstring (idx, in, &acc_b);
- same = acc_a.len == acc_b.len && (strncmp (acc_a.ptr, acc_b.ptr, acc_a.len) == 0);
+ same = acc_a.len == acc_b.len
+ && (strncmp (acc_a.ptr, acc_b.ptr, acc_a.len) == 0);
if (cond != EQ && cond != NE)
{
@@ -2212,7 +2189,7 @@ istrue (idx, in)
res = (cond != EQ) ^ same;
}
else
- /* This is a numeric expression */
+ /* This is a numeric expression. */
{
int vala;
int valb;
@@ -2264,7 +2241,8 @@ istrue (idx, in)
return res;
}
-/* .AIF */
+/* .AIF */
+
static void
do_aif (idx, in)
int idx;
@@ -2275,16 +2253,16 @@ do_aif (idx, in)
FATAL ((stderr, _("AIF nesting unreasonable.\n")));
}
ifi++;
- ifstack[ifi].on = ifstack[ifi-1].on ? istrue (idx, in) : 0;
+ ifstack[ifi].on = ifstack[ifi - 1].on ? istrue (idx, in) : 0;
ifstack[ifi].hadelse = 0;
}
+/* .AELSE */
-/* .AELSE */
static void
do_aelse ()
{
- ifstack[ifi].on = ifstack[ifi-1].on ? !ifstack[ifi].on : 0;
+ ifstack[ifi].on = ifstack[ifi - 1].on ? !ifstack[ifi].on : 0;
if (ifstack[ifi].hadelse)
{
ERROR ((stderr, _("Multiple AELSEs in AIF.\n")));
@@ -2292,8 +2270,8 @@ do_aelse ()
ifstack[ifi].hadelse = 1;
}
+/* .AENDI */
-/* .AENDI */
static void
do_aendi ()
{
@@ -2343,7 +2321,7 @@ do_if (idx, in, cond)
}
ifi++;
- ifstack[ifi].on = ifstack[ifi-1].on ? res: 0;
+ ifstack[ifi].on = ifstack[ifi - 1].on ? res : 0;
ifstack[ifi].hadelse = 0;
}
@@ -2394,7 +2372,7 @@ get_mri_string (idx, in, val, terminator)
return idx;
}
-/* MRI IFC, IFNC. */
+/* MRI IFC, IFNC */
static void
do_ifc (idx, in, ifnc)
@@ -2429,11 +2407,12 @@ do_ifc (idx, in, ifnc)
res ^= ifnc;
ifi++;
- ifstack[ifi].on = ifstack[ifi-1].on ? res : 0;
+ ifstack[ifi].on = ifstack[ifi - 1].on ? res : 0;
ifstack[ifi].hadelse = 0;
}
-/* .ENDR */
+/* .ENDR */
+
static void
do_aendr ()
{
@@ -2443,10 +2422,9 @@ do_aendr ()
ERROR ((stderr, _("ENDR without a REPT.\n")));
}
-/* .AWHILE */
+/* .AWHILE */
-static
-void
+static void
do_awhile (idx, in)
int idx;
sb *in;
@@ -2474,7 +2452,7 @@ do_awhile (idx, in)
.AWHILE exp
foo
.ENDW
- */
+ */
if (doit)
{
@@ -2487,7 +2465,7 @@ do_awhile (idx, in)
sb_add_string (&copy, "\n");
sb_add_sb (&copy, &sub);
sb_add_string (&copy, "\t.AENDW\n");
- /* Push another WHILE */
+ /* Push another WHILE. */
include_buf (&exp, &copy, include_while, index);
sb_kill (&copy);
}
@@ -2495,8 +2473,7 @@ do_awhile (idx, in)
sb_kill (&sub);
}
-
-/* .AENDW */
+/* .AENDW */
static void
do_aendw ()
@@ -2504,10 +2481,9 @@ do_aendw ()
ERROR ((stderr, _("AENDW without a AENDW.\n")));
}
-
/* .EXITM
-
- Pop things off the include stack until the type and index changes */
+
+ Pop things off the include stack until the type and index changes. */
static void
do_exitm ()
@@ -2527,7 +2503,7 @@ do_exitm ()
}
}
-/* .AREPEAT */
+/* .AREPEAT */
static void
do_arepeat (idx, in)
@@ -2535,9 +2511,9 @@ do_arepeat (idx, in)
sb *in;
{
int line = linecount ();
- sb exp; /* buffer with expression in it */
- sb copy; /* expanded repeat block */
- sb sub; /* contents of AREPEAT */
+ sb exp; /* Buffer with expression in it. */
+ sb copy; /* Expanded repeat block. */
+ sb sub; /* Contents of AREPEAT. */
int rc;
int ret;
char buffer[30];
@@ -2565,7 +2541,7 @@ do_arepeat (idx, in)
.AREPEAT 19
foo
.AENDR
- */
+ */
int index = include_next_index ();
sb_add_sb (&copy, &sub);
if (rc > 1)
@@ -2589,7 +2565,7 @@ do_arepeat (idx, in)
sb_kill (&copy);
}
-/* .ENDM */
+/* .ENDM */
static void
do_endm ()
@@ -2619,11 +2595,11 @@ do_irp (idx, in, irpc)
sb_kill (&out);
}
-/* MACRO PROCESSING */
+/* Macro processing. */
+
+/* Parse off LOCAL n1, n2,... Invent a label name for it. */
-/* Parse off LOCAL n1, n2,... Invent a label name for it */
-static
-void
+static void
do_local (idx, line)
int idx ATTRIBUTE_UNUSED;
sb *line ATTRIBUTE_UNUSED;
@@ -2674,7 +2650,7 @@ macro_op (idx, in)
return 1;
}
-/* STRING HANDLING */
+/* String handling. */
static int
getstring (idx, in, acc)
@@ -2685,8 +2661,8 @@ getstring (idx, in, acc)
idx = sb_skip_white (idx, in);
while (idx < in->len
- && (in->ptr[idx] == '"'
- || in->ptr[idx] == '<'
+ && (in->ptr[idx] == '"'
+ || in->ptr[idx] == '<'
|| (in->ptr[idx] == '\'' && alternate)))
{
if (in->ptr[idx] == '<')
@@ -2700,30 +2676,32 @@ getstring (idx, in, acc)
{
if (in->ptr[idx] == '!')
{
- idx++ ;
+ idx++;
+ sb_add_char (acc, in->ptr[idx++]);
+ }
+ else
+ {
+ if (in->ptr[idx] == '>')
+ nest--;
+ if (in->ptr[idx] == '<')
+ nest++;
sb_add_char (acc, in->ptr[idx++]);
}
- else {
- if (in->ptr[idx] == '>')
- nest--;
- if (in->ptr[idx] == '<')
- nest++;
- sb_add_char (acc, in->ptr[idx++]);
- }
}
idx++;
}
- else {
- int code;
- idx++;
- idx = exp_get_abs (_("Character code in string must be absolute expression.\n"),
- idx, in, &code);
- sb_add_char (acc, code);
+ else
+ {
+ int code;
+ idx++;
+ idx = exp_get_abs (_("Character code in string must be absolute expression.\n"),
+ idx, in, &code);
+ sb_add_char (acc, code);
- if (in->ptr[idx] != '>')
- ERROR ((stderr, _("Missing > for character code.\n")));
- idx++;
- }
+ if (in->ptr[idx] != '>')
+ ERROR ((stderr, _("Missing > for character code.\n")));
+ idx++;
+ }
}
else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'')
{
@@ -2733,30 +2711,30 @@ getstring (idx, in, acc)
{
if (alternate && in->ptr[idx] == '!')
{
- idx++ ;
+ idx++;
sb_add_char (acc, in->ptr[idx++]);
}
- else {
- if (in->ptr[idx] == tchar)
- {
- idx++;
- if (idx >= in->len || in->ptr[idx] != tchar)
- break;
- }
- sb_add_char (acc, in->ptr[idx]);
- idx++;
- }
+ else
+ {
+ if (in->ptr[idx] == tchar)
+ {
+ idx++;
+ if (idx >= in->len || in->ptr[idx] != tchar)
+ break;
+ }
+ sb_add_char (acc, in->ptr[idx]);
+ idx++;
+ }
}
}
}
-
+
return idx;
}
-/* .SDATA[C|Z] <string> */
+/* .SDATA[C|Z] <string> */
-static
-void
+static void
do_sdata (idx, in, type)
int idx;
sb *in;
@@ -2803,12 +2781,14 @@ do_sdata (idx, in, type)
fprintf (outfile, "0");
}
idx = sb_skip_comma (idx, in);
- if (idx == pidx) break;
+ if (idx == pidx)
+ break;
}
if (!alternate && in->ptr[idx] != ',' && idx != in->len)
{
fprintf (outfile, "\n");
- ERROR ((stderr, _("illegal character in SDATA line (0x%x).\n"), in->ptr[idx]));
+ ERROR ((stderr, _("illegal character in SDATA line (0x%x).\n"),
+ in->ptr[idx]));
break;
}
idx++;
@@ -2817,7 +2797,7 @@ do_sdata (idx, in, type)
fprintf (outfile, "\n");
}
-/* .SDATAB <count> <string> */
+/* .SDATAB <count> <string> */
static void
do_sdatab (idx, in)
@@ -2933,7 +2913,7 @@ include_pop ()
/* Get the next character from the include stack. If there's anything
in the pushback buffer, take that first. If we're at eof, pop from
- the stack and try again. Keep the linecount up to date. */
+ the stack and try again. Keep the linecount up to date. */
static int
get ()
@@ -2943,7 +2923,7 @@ get ()
if (sp->pushback.len != sp->pushback_index)
{
r = (char) (sp->pushback.ptr[sp->pushback_index++]);
- /* When they've all gone, reset the pointer */
+ /* When they've all gone, reset the pointer. */
if (sp->pushback_index == sp->pushback.len)
{
sp->pushback.len = 0;
@@ -2992,8 +2972,7 @@ include_next_index ()
return ++index;
}
-
-/* Initialize the chartype vector. */
+/* Initialize the chartype vector. */
static void
chartype_init ()
@@ -3019,7 +2998,7 @@ chartype_init ()
|| x == 'h' || x == 'H'
|| x == 'd' || x == 'D')
chartype [x] |= BASEBIT;
-
+
if (x == ' ' || x == '\t')
chartype[x] |= WHITEBIT;
@@ -3028,11 +3007,9 @@ chartype_init ()
}
}
-
-
-/* What to do with all the keywords */
-#define PROCESS 0x1000 /* Run substitution over the line */
-#define LAB 0x2000 /* Spit out the label */
+/* What to do with all the keywords. */
+#define PROCESS 0x1000 /* Run substitution over the line. */
+#define LAB 0x2000 /* Spit out the label. */
#define K_EQU (PROCESS|1)
#define K_ASSIGN (PROCESS|2)
@@ -3089,16 +3066,13 @@ chartype_init ()
#define K_IRP (PROCESS|54)
#define K_IRPC (PROCESS|55)
-
-struct keyword
-{
+struct keyword {
char *name;
int code;
int extra;
};
-static struct keyword kinfo[] =
-{
+static struct keyword kinfo[] = {
{ "EQU", K_EQU, 0 },
{ "ALTERNATE", K_ALTERNATE, 0 },
{ "ASSIGN", K_ASSIGN, 0 },
@@ -3149,8 +3123,7 @@ static struct keyword kinfo[] =
handle them here as well, in case they are used in a recursive
macro to end the recursion. */
-static struct keyword mrikinfo[] =
-{
+static struct keyword mrikinfo[] = {
{ "IFEQ", K_IFEQ, 0 },
{ "IFNE", K_IFNE, 0 },
{ "IFLT", K_IFLT, 0 },
@@ -3170,7 +3143,7 @@ static struct keyword mrikinfo[] =
};
/* Look for a pseudo op on the line. If one's there then call
- its handler. */
+ its handler. */
static int
process_pseudo_op (idx, line, acc)
@@ -3182,7 +3155,7 @@ process_pseudo_op (idx, line, acc)
if (line->ptr[idx] == '.' || alternate || mri)
{
- /* Scan forward and find pseudo name */
+ /* Scan forward and find pseudo name. */
char *in;
hash_entry *ptr;
@@ -3208,13 +3181,15 @@ process_pseudo_op (idx, line, acc)
{
#if 0
/* This one causes lots of pain when trying to preprocess
- ordinary code */
- WARNING ((stderr, _("Unrecognised pseudo op `%s'.\n"), sb_name (acc)));
+ ordinary code. */
+ WARNING ((stderr, _("Unrecognised pseudo op `%s'.\n"),
+ sb_name (acc)));
#endif
return 0;
}
if (ptr->value.i & LAB)
- { /* output the label */
+ {
+ /* Output the label. */
if (label.len)
{
fprintf (outfile, "%s:\t", sb_name (&label));
@@ -3235,13 +3210,13 @@ process_pseudo_op (idx, line, acc)
if (ptr->value.i & PROCESS)
{
- /* Polish the rest of the line before handling the pseudo op */
+ /* Polish the rest of the line before handling the pseudo op. */
#if 0
- strip_comments(line);
+ strip_comments (line);
#endif
sb_reset (acc);
process_assigns (idx, line, acc);
- sb_reset(line);
+ sb_reset (line);
change_base (0, acc, line);
idx = 0;
}
@@ -3427,8 +3402,6 @@ process_pseudo_op (idx, line, acc)
return 0;
}
-
-
/* Add a keyword to the hash table. */
static void
@@ -3450,10 +3423,10 @@ add_keyword (name, code)
hash_add_to_int_table (&keyword_hash_table, &label, code);
sb_kill (&label);
-}
+}
/* Build the keyword hash table - put each keyword in the table twice,
- once upper and once lower case.*/
+ once upper and once lower case. */
static void
process_init ()
@@ -3470,7 +3443,6 @@ process_init ()
}
}
-
static void
do_define (string)
const char *string;
@@ -3480,10 +3452,9 @@ do_define (string)
hash_entry *ptr;
sb_new (&label);
-
while (*string)
{
- if (*string == '=')
+ if (*string == '=')
{
sb value;
sb_new (&value);
@@ -3493,13 +3464,14 @@ do_define (string)
sb_add_char (&value, *string);
string++;
}
- exp_get_abs (_("Invalid expression on command line.\n"), 0, &value, &res);
+ exp_get_abs (_("Invalid expression on command line.\n"),
+ 0, &value, &res);
sb_kill (&value);
break;
}
sb_add_char (&label, *string);
- string ++;
+ string++;
}
ptr = hash_create (&vars, &label);
@@ -3508,6 +3480,7 @@ do_define (string)
ptr->value.i = res;
sb_kill (&label);
}
+
char *program_name;
/* The list of long options. */
@@ -3556,11 +3529,11 @@ Usage: %s \n\
}
/* Display a help message and exit. */
+
static void
show_help ()
{
- printf (_("%s: Gnu Assembler Macro Preprocessor\n"),
- program_name);
+ printf (_("%s: Gnu Assembler Macro Preprocessor\n"), program_name);
show_usage (stdout, 0);
}
@@ -3640,7 +3613,7 @@ main (argc, argv)
break;
case 'h':
show_help ();
- /*NOTREACHED*/
+ /* NOTREACHED */
case 'v':
/* This output is intended to follow the GNU standards document. */
printf (_("GNU assembler pre-processor %s\n"), program_version);
@@ -3649,12 +3622,12 @@ main (argc, argv)
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
exit (0);
- /*NOTREACHED*/
+ /* NOTREACHED */
case 0:
break;
default:
show_usage (stderr, 1);
- /*NOTREACHED*/
+ /* NOTREACHED */
}
}
@@ -3662,24 +3635,26 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
macro_init (alternate, mri, 0, exp_get_abs);
- if (out_name) {
- outfile = fopen (out_name, "w");
- if (!outfile)
- {
- fprintf (stderr, _("%s: Can't open output file `%s'.\n"),
- program_name, out_name);
- exit (1);
- }
- }
- else {
- outfile = stdout;
- }
+ if (out_name)
+ {
+ outfile = fopen (out_name, "w");
+ if (!outfile)
+ {
+ fprintf (stderr, _("%s: Can't open output file `%s'.\n"),
+ program_name, out_name);
+ exit (1);
+ }
+ }
+ else
+ {
+ outfile = stdout;
+ }
chartype_init ();
if (!outfile)
outfile = stdout;
- /* Process all the input files */
+ /* Process all the input files. */
while (optind < argc)
{
diff --git a/gnu/usr.bin/binutils/gas/hash.c b/gnu/usr.bin/binutils/gas/hash.c
index 0f129fb3fa1..ab283966a30 100644
--- a/gnu/usr.bin/binutils/gas/hash.c
+++ b/gnu/usr.bin/binutils/gas/hash.c
@@ -1,5 +1,6 @@
/* hash.c -- gas hash table code
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 1999
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -37,8 +38,7 @@
/* An entry in a hash table. */
-struct hash_entry
-{
+struct hash_entry {
/* Next entry for this hash code. */
struct hash_entry *next;
/* String being hashed. */
@@ -52,8 +52,7 @@ struct hash_entry
/* A hash table. */
-struct hash_control
-{
+struct hash_control {
/* The hash array. */
struct hash_entry **table;
/* The number of slots in the hash table. */
@@ -99,7 +98,7 @@ hash_new ()
ret->deletions = 0;
#endif
- return ret;
+ return ret;
}
/* Delete a hash table, freeing all allocated memory. */
@@ -222,7 +221,7 @@ hash_insert (table, key, value)
++table->insertions;
#endif
- p = obstack_alloc (&table->memory, sizeof *p);
+ p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p));
p->string = key;
p->hash = hash;
p->data = value;
@@ -262,7 +261,7 @@ hash_jam (table, key, value)
++table->insertions;
#endif
- p = obstack_alloc (&table->memory, sizeof *p);
+ p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p));
p->string = key;
p->hash = hash;
p->data = value;
@@ -415,14 +414,23 @@ hash_print_statistics (f, name, table)
/* This test program is left over from the old hash table code. */
-#define TABLES (6) /* number of hash tables to maintain */
- /* (at once) in any testing */
-#define STATBUFSIZE (12) /* we can have 12 statistics */
+/* Number of hash tables to maintain (at once) in any testing. */
+#define TABLES (6)
+
+/* We can have 12 statistics. */
+#define STATBUFSIZE (12)
+
+/* Display statistics here. */
+int statbuf[STATBUFSIZE];
+
+/* Human farts here. */
+char answer[100];
-int statbuf[STATBUFSIZE]; /* display statistics here */
-char answer[100]; /* human farts here */
-char *hashtable[TABLES]; /* we test many hash tables at once */
-char *h; /* points to curent hash_control */
+/* We test many hash tables at once. */
+char *hashtable[TABLES];
+
+/* Points to curent hash_control. */
+char *h;
char **pp;
char *p;
char *name;
@@ -430,8 +438,9 @@ char *value;
int size;
int used;
char command;
-int number; /* number 0:TABLES-1 of current hashed */
- /* symbol table */
+
+/* Number 0:TABLES-1 of current hashed symbol table. */
+int number;
int
main ()
@@ -450,7 +459,7 @@ main ()
gets (answer);
command = answer[0];
if (isupper (command))
- command = tolower (command); /* ecch! */
+ command = tolower (command); /* Ecch! */
switch (command)
{
case '#':
@@ -460,8 +469,8 @@ main ()
case '?':
for (pp = hashtable; pp < hashtable + TABLES; pp++)
{
- printf ("address of hash table #%d control block is %xx\n"
- ,pp - hashtable, *pp);
+ printf ("address of hash table #%d control block is %xx\n",
+ pp - hashtable, *pp);
}
break;
case 'a':
@@ -542,7 +551,7 @@ what (description)
printf (" %s : ", description);
gets (answer);
- /* will one day clean up answer here */
+ /* Will one day clean up answer here. */
retval = malloc (strlen (answer) + 1);
if (!retval)
{
@@ -561,7 +570,6 @@ destroy (string, value)
free (value);
}
-
void
applicatee (string, value)
char *string;
@@ -570,11 +578,12 @@ applicatee (string, value)
printf ("%.20s-%.20s\n", string, value);
}
+/* Determine number: what hash table to use.
+ Also determine h: points to hash_control. */
+
void
-whattable () /* determine number: what hash table to use */
- /* also determine h: points to hash_control */
+whattable ()
{
-
for (;;)
{
printf (" what hash table (%d:%d) ? ", 0, TABLES - 1);
@@ -596,6 +605,4 @@ whattable () /* determine number: what hash table to use */
}
}
-#endif /* #ifdef TEST */
-
-/* end of hash.c */
+#endif /* TEST */
diff --git a/gnu/usr.bin/binutils/gas/hash.h b/gnu/usr.bin/binutils/gas/hash.h
index df59d9fad21..ecab0fa13ca 100644
--- a/gnu/usr.bin/binutils/gas/hash.h
+++ b/gnu/usr.bin/binutils/gas/hash.h
@@ -1,5 +1,5 @@
/* hash.h -- header file for gas hash table routines
- Copyright (C) 1987, 92, 93, 95, 1999 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/gnu/usr.bin/binutils/gas/input-file.c b/gnu/usr.bin/binutils/gas/input-file.c
index 634f6f73930..f001e521035 100644
--- a/gnu/usr.bin/binutils/gas/input-file.c
+++ b/gnu/usr.bin/binutils/gas/input-file.c
@@ -1,5 +1,5 @@
/* input_file.c - Deal with Input Files -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 98, 1999
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -57,35 +57,34 @@ static FILE *f_in;
static char *file_name;
/* Struct for saving the state of this module for file includes. */
-struct saved_file
- {
- FILE *f_in;
- char *file_name;
- int preprocess;
- char *app_save;
- };
+struct saved_file {
+ FILE *f_in;
+ char *file_name;
+ int preprocess;
+ char *app_save;
+};
-/* These hooks accomodate most operating systems. */
+/* These hooks accomodate most operating systems. */
-void
+void
input_file_begin ()
{
f_in = (FILE *) 0;
}
-void
+void
input_file_end ()
{
}
-/* Return BUFFER_SIZE. */
-unsigned int
+/* Return BUFFER_SIZE. */
+unsigned int
input_file_buffer_size ()
{
return (BUFFER_SIZE);
}
-int
+int
input_file_is_open ()
{
return f_in != (FILE *) 0;
@@ -130,7 +129,7 @@ input_file_pop (arg)
void
input_file_open (filename, pre)
- char *filename; /* "" means use stdin. Must not be 0. */
+ char *filename; /* "" means use stdin. Must not be 0. */
int pre;
{
int c;
@@ -138,16 +137,16 @@ input_file_open (filename, pre)
preprocess = pre;
- assert (filename != 0); /* Filename may not be NULL. */
+ assert (filename != 0); /* Filename may not be NULL. */
if (filename[0])
- { /* We have a file name. Suck it and see. */
+ { /* We have a file name. Suck it and see. */
f_in = fopen (filename, "r");
file_name = filename;
}
else
- { /* use stdin for the input file. */
+ { /* use stdin for the input file. */
f_in = stdin;
- file_name = _("{standard input}"); /* For error messages. */
+ file_name = _("{standard input}"); /* For error messages. */
}
if (f_in == (FILE *) 0)
{
@@ -180,7 +179,7 @@ input_file_open (filename, pre)
}
/* Close input file. */
-void
+void
input_file_close ()
{
if (f_in != NULL)
@@ -188,7 +187,7 @@ input_file_close ()
fclose (f_in);
} /* don't close a null file pointer */
f_in = 0;
-} /* input_file_close() */
+}
/* This function is passed to do_scrub_chars. */
@@ -212,9 +211,9 @@ input_file_get (buf, buflen)
char *
input_file_give_next_buffer (where)
- char *where; /* Where to place 1st character of new buffer. */
+ char *where; /* Where to place 1st character of new buffer. */
{
- char *return_value; /* -> Last char of what we read, + 1. */
+ char *return_value; /* -> Last char of what we read, + 1. */
register int size;
if (f_in == (FILE *) 0)
@@ -245,5 +244,3 @@ input_file_give_next_buffer (where)
}
return (return_value);
}
-
-/* end of input-file.c */
diff --git a/gnu/usr.bin/binutils/gas/input-scrub.c b/gnu/usr.bin/binutils/gas/input-scrub.c
index ecbdaef7fda..e9c724004d3 100644
--- a/gnu/usr.bin/binutils/gas/input-scrub.c
+++ b/gnu/usr.bin/binutils/gas/input-scrub.c
@@ -1,5 +1,6 @@
/* input_scrub.c - Break up input buffers into whole numbers of lines.
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#include <errno.h> /* Need this to make errno declaration right */
#include "as.h"
@@ -52,21 +53,22 @@
*/
#define BEFORE_STRING ("\n")
-#define AFTER_STRING ("\0") /* memcpy of 0 chars might choke. */
+#define AFTER_STRING ("\0") /* memcpy of 0 chars might choke. */
#define BEFORE_SIZE (1)
#define AFTER_SIZE (1)
-static char *buffer_start; /*->1st char of full buffer area. */
-static char *partial_where; /*->after last full line in buffer. */
-static int partial_size; /* >=0. Number of chars in partial line in buffer. */
+static char *buffer_start; /*->1st char of full buffer area. */
+static char *partial_where; /*->after last full line in buffer. */
+static int partial_size; /* >=0. Number of chars in partial line in buffer. */
+
+/* Because we need AFTER_STRING just after last full line, it clobbers
+ 1st part of partial line. So we preserve 1st part of partial line
+ here. */
static char save_source[AFTER_SIZE];
-/* Because we need AFTER_STRING just after last */
-/* full line, it clobbers 1st part of partial */
-/* line. So we preserve 1st part of partial */
-/* line here. */
-static unsigned int buffer_length; /* What is the largest size buffer that */
-/* input_file_give_next_buffer() could */
-/* return to us? */
+
+/* What is the largest size buffer that input_file_give_next_buffer()
+ could return to us? */
+static unsigned int buffer_length;
/* The index into an sb structure we are reading from. -1 if none. */
static int sb_index = -1;
@@ -84,54 +86,54 @@ int macro_nest;
but the latest one are saved off in a struct input_save. These files remain
open, so we are limited by the number of open files allowed by the
underlying OS. We may also sequentially read more than one source file in an
- assembly. */
+ assembly. */
/* We must track the physical file and line number for error messages. We also
track a "logical" file and line number corresponding to (C?) compiler
source line numbers. Whenever we open a file we must fill in
- physical_input_file. So if it is NULL we have not opened any files yet. */
+ physical_input_file. So if it is NULL we have not opened any files yet. */
static char *physical_input_file;
static char *logical_input_file;
-typedef unsigned int line_numberT; /* 1-origin line number in a source file. */
-/* A line ends in '\n' or eof. */
+typedef unsigned int line_numberT; /* 1-origin line number in a source file. */
+/* A line ends in '\n' or eof. */
static line_numberT physical_input_line;
static int logical_input_line;
/* Struct used to save the state of the input handler during include files */
-struct input_save
- {
- char *buffer_start;
- char *partial_where;
- int partial_size;
- char save_source[AFTER_SIZE];
- unsigned int buffer_length;
- char *physical_input_file;
- char *logical_input_file;
- line_numberT physical_input_line;
- int logical_input_line;
- int sb_index;
- sb from_sb;
- int from_sb_is_expansion; /* Should we do a conditional check? */
- struct input_save *next_saved_file; /* Chain of input_saves */
- char *input_file_save; /* Saved state of input routines */
- char *saved_position; /* Caller's saved position in buf */
- };
+struct input_save {
+ char * buffer_start;
+ char * partial_where;
+ int partial_size;
+ char save_source[AFTER_SIZE];
+ unsigned int buffer_length;
+ char * physical_input_file;
+ char * logical_input_file;
+ line_numberT physical_input_line;
+ int logical_input_line;
+ int sb_index;
+ sb from_sb;
+ int from_sb_is_expansion; /* Should we do a conditional check? */
+ struct input_save * next_saved_file; /* Chain of input_saves. */
+ char * input_file_save; /* Saved state of input routines. */
+ char * saved_position; /* Caller's saved position in buf. */
+};
static struct input_save *input_scrub_push PARAMS ((char *saved_position));
static char *input_scrub_pop PARAMS ((struct input_save *arg));
static void as_1_char PARAMS ((unsigned int c, FILE * stream));
/* Saved information about the file that .include'd this one. When we hit EOF,
- we automatically pop to that file. */
+ we automatically pop to that file. */
static struct input_save *next_saved_file;
/* Push the state of input reading and scrubbing so that we can #include.
The return value is a 'void *' (fudged for old compilers) to a save
- area, which can be restored by passing it to input_scrub_pop(). */
+ area, which can be restored by passing it to input_scrub_pop(). */
+
static struct input_save *
input_scrub_push (saved_position)
char *saved_position;
@@ -166,7 +168,7 @@ input_scrub_push (saved_position)
memcpy (buffer_start, BEFORE_STRING, (int) BEFORE_SIZE);
return saved;
-} /* input_scrub_push() */
+}
static char *
input_scrub_pop (saved)
@@ -196,12 +198,12 @@ input_scrub_pop (saved)
return saved_position;
}
-
void
input_scrub_begin ()
{
know (strlen (BEFORE_STRING) == BEFORE_SIZE);
- know (strlen (AFTER_STRING) == AFTER_SIZE || (AFTER_STRING[0] == '\0' && AFTER_SIZE == 1));
+ know (strlen (AFTER_STRING) == AFTER_SIZE
+ || (AFTER_STRING[0] == '\0' && AFTER_SIZE == 1));
input_file_begin ();
@@ -210,10 +212,10 @@ input_scrub_begin ()
buffer_start = xmalloc ((BEFORE_SIZE + buffer_length + buffer_length + AFTER_SIZE));
memcpy (buffer_start, BEFORE_STRING, (int) BEFORE_SIZE);
- /* Line number things. */
+ /* Line number things. */
logical_input_line = -1;
logical_input_file = (char *) NULL;
- physical_input_file = NULL; /* No file read yet. */
+ physical_input_file = NULL; /* No file read yet. */
next_saved_file = NULL; /* At EOF, don't pop to any other file */
do_scrub_begin (flag_m68k_mri);
}
@@ -229,9 +231,10 @@ input_scrub_end ()
}
}
-/* Start reading input from a new file. */
+/* Start reading input from a new file.
+ Return start of caller's part of buffer. */
-char * /* Return start of caller's part of buffer. */
+char *
input_scrub_new_file (filename)
char *filename;
{
@@ -243,10 +246,9 @@ input_scrub_new_file (filename)
return (buffer_start + BEFORE_SIZE);
}
-
/* Include a file from the current file. Save our state, cause it to
be restored on EOF, and begin handling a new file. Same result as
- input_scrub_new_file. */
+ input_scrub_new_file. */
char *
input_scrub_include_file (filename, position)
@@ -267,7 +269,7 @@ input_scrub_include_sb (from, position, is_expansion)
int is_expansion;
{
if (macro_nest > max_macro_nest)
- as_fatal (_("buffers nested too deeply"));
+ as_fatal (_("macros nested too deeply"));
++macro_nest;
#ifdef md_macro_start
@@ -305,22 +307,24 @@ char *
input_scrub_next_buffer (bufp)
char **bufp;
{
- register char *limit; /*->just after last char of buffer. */
+ register char *limit; /*->just after last char of buffer. */
if (sb_index >= 0)
{
if (sb_index >= from_sb.len)
{
sb_kill (&from_sb);
- if (from_sb_is_expansion)
- {
- cond_finish_check (macro_nest);
+ if (from_sb_is_expansion
+ )
+ {
+ cond_finish_check (macro_nest);
#ifdef md_macro_end
- /* allow the target to clean up per-macro expansion data */
- md_macro_end ();
+ /* Allow the target to clean up per-macro expansion
+ data. */
+ md_macro_end ();
#endif
- }
- --macro_nest;
+ }
+ --macro_nest;
partial_where = NULL;
if (next_saved_file != NULL)
*bufp = input_scrub_pop (next_saved_file);
@@ -347,7 +351,7 @@ input_scrub_next_buffer (bufp)
+ partial_size);
if (limit)
{
- register char *p; /* Find last newline. */
+ register char *p; /* Find last newline. */
for (p = limit - 1; *p != '\n'; --p)
;
@@ -396,24 +400,21 @@ input_scrub_next_buffer (bufp)
/* Tell the listing we've finished the file. */
LISTING_EOF ();
- /* If we should pop to another file at EOF, do it. */
+ /* If we should pop to another file at EOF, do it. */
if (next_saved_file)
{
*bufp = input_scrub_pop (next_saved_file); /* Pop state */
- /* partial_where is now correct to return, since we popped it. */
+ /* partial_where is now correct to return, since we popped it. */
}
}
return (partial_where);
-} /* input_scrub_next_buffer() */
+}
-/*
- * The remaining part of this file deals with line numbers, error
- * messages and so on.
- */
-
+/* The remaining part of this file deals with line numbers, error
+ messages and so on. Return TRUE if we opened any file. */
int
-seen_at_least_1_file () /* TRUE if we opened any file. */
+seen_at_least_1_file ()
{
return (physical_input_file != NULL);
}
@@ -429,20 +430,17 @@ bump_line_counters ()
}
}
-/*
- * new_logical_line()
- *
- * Tells us what the new logical line number and file are.
- * If the line_number is -1, we don't change the current logical line
- * number. If it is -2, we decrement the logical line number (this is
- * to support the .appfile pseudo-op inserted into the stream by
- * do_scrub_chars).
- * If the fname is NULL, we don't change the current logical file name.
- * Returns nonzero if the filename actually changes.
- */
+/* Tells us what the new logical line number and file are.
+ If the line_number is -1, we don't change the current logical line
+ number. If it is -2, we decrement the logical line number (this is
+ to support the .appfile pseudo-op inserted into the stream by
+ do_scrub_chars).
+ If the fname is NULL, we don't change the current logical file name.
+ Returns nonzero if the filename actually changes. */
+
int
new_logical_line (fname, line_number)
- char *fname; /* DON'T destroy it! We point to it! */
+ char *fname; /* DON'T destroy it! We point to it! */
int line_number;
{
if (line_number >= 0)
@@ -459,16 +457,13 @@ new_logical_line (fname, line_number)
}
else
return 0;
-} /* new_logical_line() */
+}
-/*
- * a s _ w h e r e ()
- *
- * Return the current file name and line number.
- * namep should be char * const *, but there are compilers which screw
- * up declarations like that, and it's easier to avoid it.
- */
-void
+/* Return the current file name and line number.
+ namep should be char * const *, but there are compilers which screw
+ up declarations like that, and it's easier to avoid it. */
+
+void
as_where (namep, linep)
char **namep;
unsigned int *linep;
@@ -492,37 +487,30 @@ as_where (namep, linep)
if (linep != NULL)
*linep = 0;
}
-} /* as_where() */
+}
+/* Output to given stream how much of line we have scanned so far.
+ Assumes we have scanned up to and including input_line_pointer.
+ No free '\n' at end of line. */
-
-
-/*
- * a s _ h o w m u c h ()
- *
- * Output to given stream how much of line we have scanned so far.
- * Assumes we have scanned up to and including input_line_pointer.
- * No free '\n' at end of line.
- */
void
as_howmuch (stream)
- FILE *stream; /* Opened for write please. */
+ FILE *stream; /* Opened for write please. */
{
- register char *p; /* Scan input line. */
- /* register char c; JF unused */
+ register char *p; /* Scan input line. */
for (p = input_line_pointer - 1; *p != '\n'; --p)
{
}
- ++p; /* p->1st char of line. */
+ ++p; /* p->1st char of line. */
for (; p <= input_line_pointer; p++)
{
- /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */
+ /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */
as_1_char ((unsigned char) *p, stream);
}
}
-static void
+static void
as_1_char (c, stream)
unsigned int c;
FILE *stream;
@@ -539,5 +527,3 @@ as_1_char (c, stream)
}
(void) putc (c, stream);
}
-
-/* end of input_scrub.c */
diff --git a/gnu/usr.bin/binutils/gas/listing.c b/gnu/usr.bin/binutils/gas/listing.c
index cecf2450bac..8168ebe6b98 100644
--- a/gnu/usr.bin/binutils/gas/listing.c
+++ b/gnu/usr.bin/binutils/gas/listing.c
@@ -1,5 +1,6 @@
/* listing.c - mainting assembly listings
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,12 +18,10 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+02111-1307, USA. */
/*
- Contributed by Steve Chamberlain
- sac@cygnus.com
-
+ Contributed by Steve Chamberlain <sac@cygnus.com>
A listing page looks like:
@@ -57,7 +56,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
If the counter goes below zero, listing is suppressed.
-
Listings are a maintained by read calling various listing_<foo>
functions. What happens most is that the macro NO_LISTING is not
defined (from the Makefile), then the macro LISTING_NEWLINE expands
@@ -121,56 +119,52 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define LISTING_LHS_CONT_LINES 4
#endif
-/* This structure remembers which .s were used */
-typedef struct file_info_struct
-{
+/* This structure remembers which .s were used. */
+typedef struct file_info_struct {
struct file_info_struct * next;
char * filename;
long pos;
unsigned int linenum;
int at_end;
-}
-file_info_type;
+} file_info_type;
/* This structure rememebrs which line from which file goes into which
- frag */
-struct list_info_struct
-{
- /* Frag which this line of source is nearest to */
- fragS * frag;
+ frag. */
+struct list_info_struct {
+ /* Frag which this line of source is nearest to. */
+ fragS *frag;
- /* The actual line in the source file */
+ /* The actual line in the source file. */
unsigned int line;
/* Pointer to the file info struct for the file which this line
- belongs to */
- file_info_type * file;
+ belongs to. */
+ file_info_type *file;
/* The expanded text of any macro that may have been executing. */
- char * line_contents;
+ char *line_contents;
- /* Next in list */
- struct list_info_struct * next;
+ /* Next in list. */
+ struct list_info_struct *next;
/* Pointer to the file info struct for the high level language
- source line that belongs here */
- file_info_type * hll_file;
- /* High level language source line */
+ source line that belongs here. */
+ file_info_type *hll_file;
+ /* High level language source line. */
unsigned int hll_line;
- /* Pointer to any error message associated with this line */
- char * message;
+ /* Pointer to any error message associated with this line. */
+ char *message;
- enum
- {
- EDICT_NONE,
- EDICT_SBTTL,
- EDICT_TITLE,
- EDICT_NOLIST,
- EDICT_LIST,
- EDICT_NOLIST_NEXT,
- EDICT_EJECT
- } edict;
- char * edict_arg;
+ enum {
+ EDICT_NONE,
+ EDICT_SBTTL,
+ EDICT_TITLE,
+ EDICT_NOLIST,
+ EDICT_LIST,
+ EDICT_NOLIST_NEXT,
+ EDICT_EJECT
+ } edict;
+ char *edict_arg;
/* Nonzero if this line is to be omitted because it contains
debugging information. This can become a flags field if we come
@@ -180,7 +174,6 @@ struct list_info_struct
typedef struct list_info_struct list_info_type;
-
int listing_lhs_width = LISTING_LHS_WIDTH;
int listing_lhs_width_second = LISTING_LHS_WIDTH_SECOND;
int listing_lhs_cont_lines = LISTING_LHS_CONT_LINES;
@@ -198,7 +191,7 @@ static int paper_height = 60;
extern int listing;
/* File to output listings to. */
-static FILE * list_file;
+static FILE *list_file;
/* This static array is used to keep the text of data to be printed
before the start of the line. */
@@ -209,13 +202,13 @@ static FILE * list_file;
* listing_lhs_cont_lines) \
+ 20)
-static char * data_buffer;
+static char *data_buffer;
/* Prototypes. */
static void listing_message PARAMS ((const char *name, const char *message));
-static file_info_type * file_info PARAMS ((const char *file_name));
+static file_info_type *file_info PARAMS ((const char *file_name));
static void new_frag PARAMS ((void));
-static char * buffer_line PARAMS ((file_info_type *file,
+static char *buffer_line PARAMS ((file_info_type *file,
char *line, unsigned int size));
static void listing_page PARAMS ((list_info_type *list));
static unsigned int calc_hex PARAMS ((list_info_type *list));
@@ -229,18 +222,17 @@ static void print_source PARAMS ((file_info_type *current_file,
static int debugging_pseudo PARAMS ((list_info_type *, const char *));
static void listing_listing PARAMS ((char *name));
-
static void
listing_message (name, message)
const char *name;
const char *message;
{
- unsigned int l = strlen (name) + strlen (message) + 1;
- char *n = (char *) xmalloc (l);
- strcpy (n, name);
- strcat (n, message);
if (listing_tail != (list_info_type *) NULL)
{
+ unsigned int l = strlen (name) + strlen (message) + 1;
+ char *n = (char *) xmalloc (l);
+ strcpy (n, name);
+ strcat (n, message);
listing_tail->message = n;
}
}
@@ -263,7 +255,7 @@ static file_info_type *
file_info (file_name)
const char *file_name;
{
- /* Find an entry with this file name */
+ /* Find an entry with this file name. */
file_info_type *p = file_info_head;
while (p != (file_info_type *) NULL)
@@ -273,7 +265,7 @@ file_info (file_name)
p = p->next;
}
- /* Make new entry */
+ /* Make new entry. */
p = (file_info_type *) xmalloc (sizeof (file_info_type));
p->next = file_info_head;
@@ -287,7 +279,6 @@ file_info (file_name)
return p;
}
-
static void
new_frag ()
{
@@ -334,7 +325,8 @@ listing_newline (ps)
as_where (&file, &line);
if (ps == NULL)
{
- if (line == last_line && !(last_file && file && strcmp (file, last_file)))
+ if (line == last_line
+ && !(last_file && file && strcmp (file, last_file)))
return;
new = (list_info_type *) xmalloc (sizeof (list_info_type));
@@ -346,22 +338,22 @@ listing_newline (ps)
same as the one used by input_scrub_new_file(), if that is
not true, then this code will fail].
- If we are reading from stdin, then we need to save each input line
- here (assuming of course that we actually have a line of input to read),
- so that it can be displayed in the listing that is produced at the end
- of the assembly. */
+ If we are reading from stdin, then we need to save each input
+ line here (assuming of course that we actually have a line of
+ input to read), so that it can be displayed in the listing
+ that is produced at the end of the assembly. */
if (strcmp (file, _("{standard input}")) == 0
&& input_line_pointer != NULL)
{
- char * copy;
+ char *copy;
int len;
int seen_quote = 0;
for (copy = input_line_pointer - 1;
- * copy && (seen_quote
- || (! is_end_of_line [(unsigned char) * copy]));
- copy ++)
- if (* copy == '"' && copy[-1] != '\\')
+ *copy && (seen_quote
+ || (! is_end_of_line [(unsigned char) *copy]));
+ copy++)
+ if (*copy == '"' && copy[-1] != '\\')
seen_quote = ! seen_quote;
len = (copy - input_line_pointer) + 2;
@@ -370,21 +362,21 @@ listing_newline (ps)
if (copy != NULL)
{
- char * src = input_line_pointer - 1;
- char * dest = copy;
-
+ char *src = input_line_pointer - 1;
+ char *dest = copy;
+
while (--len)
{
- unsigned char c = * src ++;
+ unsigned char c = *src++;
/* Omit control characters in the listing. */
if (isascii (c) && ! iscntrl (c))
- * dest ++ = c;
+ *dest++ = c;
}
-
+
*dest = 0;
}
-
+
new->line_contents = copy;
}
else
@@ -398,14 +390,14 @@ listing_newline (ps)
last_line = line;
last_file = file;
-
+
new_frag ();
if (listing_tail)
listing_tail->next = new;
else
head = new;
-
+
listing_tail = new;
new->frag = frag_now;
@@ -417,7 +409,7 @@ listing_newline (ps)
new->hll_file = (file_info_type *) NULL;
new->hll_line = 0;
new->debugging = 0;
-
+
new_frag ();
#ifdef OBJ_ELF
@@ -464,15 +456,13 @@ listing_prev_line ()
new_frag ();
}
-/*
- This function returns the next source line from the file supplied,
- truncated to size. It appends a fake line to the end of each input
- file to make
-*/
+/* This function returns the next source line from the file supplied,
+ truncated to size. It appends a fake line to the end of each input
+ file to make. */
static char *
buffer_line (file, line, size)
- file_info_type * file;
+ file_info_type *file;
char *line;
unsigned int size;
{
@@ -481,7 +471,7 @@ buffer_line (file, line, size)
char *p = line;
- /* If we couldn't open the file, return an empty line */
+ /* If we couldn't open the file, return an empty line. */
if (file->at_end)
return "";
@@ -501,15 +491,16 @@ buffer_line (file, line, size)
file->at_end = 1;
return "";
}
-
+
/* Seek to where we were last time this file was open. */
if (file->pos)
- fseek(last_open_file, file->pos, SEEK_SET);
+ fseek (last_open_file, file->pos, SEEK_SET);
}
c = fgetc (last_open_file);
- size -= 1; /* leave room for null */
+ /* Leave room for null. */
+ size -= 1;
while (c != EOF && c != '\n')
{
@@ -532,23 +523,22 @@ buffer_line (file, line, size)
return line;
}
-
static const char *fn;
static unsigned int eject; /* Eject pending */
static unsigned int page; /* Current page number */
-static char *title; /* current title */
-static char *subtitle; /* current subtitle */
-static unsigned int on_page; /* number of lines printed on current page */
-
+static char *title; /* Current title */
+static char *subtitle; /* Current subtitle */
+static unsigned int on_page; /* Number of lines printed on current page */
static void
listing_page (list)
list_info_type *list;
{
/* Grope around, see if we can see a title or subtitle edict coming up
- soon (we look down 10 lines of the page and see if it's there)*/
- if ((eject || (on_page >= (unsigned int) paper_height)) && paper_height != 0)
+ soon. (we look down 10 lines of the page and see if it's there) */
+ if ((eject || (on_page >= (unsigned int) paper_height))
+ && paper_height != 0)
{
unsigned int c = 10;
int had_title = 0;
@@ -572,7 +562,6 @@ listing_page (list)
c--;
}
-
if (page > 1)
{
fprintf (list_file, "\f");
@@ -586,19 +575,18 @@ listing_page (list)
}
}
-
static unsigned int
calc_hex (list)
- list_info_type * list;
+ list_info_type *list;
{
int data_buffer_size;
list_info_type *first = list;
- unsigned int address = ~ (unsigned int) 0;
+ unsigned int address = ~(unsigned int) 0;
fragS *frag;
fragS *frag_ptr;
unsigned int octet_in_frag;
- /* Find first frag which says it belongs to this line */
+ /* Find first frag which says it belongs to this line. */
frag = list->frag;
while (frag && frag->line != list)
frag = frag->fr_next;
@@ -607,15 +595,15 @@ calc_hex (list)
data_buffer_size = 0;
- /* Dump all the frags which belong to this line */
+ /* Dump all the frags which belong to this line. */
while (frag_ptr != (fragS *) NULL && frag_ptr->line == first)
{
- /* Print as many bytes from the fixed part as is sensible */
+ /* Print as many bytes from the fixed part as is sensible. */
octet_in_frag = 0;
while ((offsetT) octet_in_frag < frag_ptr->fr_fix
&& data_buffer_size < MAX_BYTES - 3)
{
- if (address == ~ (unsigned int) 0)
+ if (address == ~(unsigned int) 0)
{
address = frag_ptr->fr_address / OCTETS_PER_BYTE;
}
@@ -626,16 +614,17 @@ calc_hex (list)
data_buffer_size += 2;
octet_in_frag++;
}
+ if (frag_ptr->fr_type == rs_fill)
{
unsigned int var_rep_max = octet_in_frag;
unsigned int var_rep_idx = octet_in_frag;
- /* Print as many bytes from the variable part as is sensible */
+ /* Print as many bytes from the variable part as is sensible. */
while (((offsetT) octet_in_frag
< (frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset))
&& data_buffer_size < MAX_BYTES - 3)
{
- if (address == ~ (unsigned int) 0)
+ if (address == ~(unsigned int) 0)
{
address = frag_ptr->fr_address / OCTETS_PER_BYTE;
}
@@ -662,11 +651,6 @@ calc_hex (list)
return address;
}
-
-
-
-
-
static void
print_lines (list, lineno, string, address)
list_info_type *list;
@@ -681,21 +665,21 @@ print_lines (list, lineno, string, address)
char *src = data_buffer;
int cur;
- /* Print the stuff on the first line */
+ /* Print the stuff on the first line. */
listing_page (list);
nchars = (LISTING_WORD_SIZE * 2 + 1) * listing_lhs_width;
-
- /* Print the hex for the first line */
- if (address == ~ (unsigned int) 0)
+
+ /* Print the hex for the first line. */
+ if (address == ~(unsigned int) 0)
{
fprintf (list_file, "% 4d ", lineno);
for (idx = 0; idx < nchars; idx++)
fprintf (list_file, " ");
fprintf (list_file, "\t%s\n", string ? string : "");
-
- on_page ++;
-
+
+ on_page++;
+
listing_page (0);
return;
@@ -706,62 +690,61 @@ print_lines (list, lineno, string, address)
else
fprintf (list_file, "% 4d %04x ", lineno, address);
- /* And the data to go along with it */
+ /* And the data to go along with it. */
idx = 0;
cur = 0;
while (src[cur] && idx < nchars)
{
int offset;
offset = cur;
- fprintf (list_file, "%c%c", src[offset], src[offset+1]);
+ fprintf (list_file, "%c%c", src[offset], src[offset + 1]);
cur += 2;
octet_in_word++;
-
+
if (octet_in_word == LISTING_WORD_SIZE)
{
fprintf (list_file, " ");
idx++;
octet_in_word = 0;
}
-
+
idx += 2;
}
-
+
for (; idx < nchars; idx++)
fprintf (list_file, " ");
-
+
fprintf (list_file, "\t%s\n", string ? string : "");
on_page++;
listing_page (list);
-
+
if (list->message)
{
fprintf (list_file, "**** %s\n", list->message);
listing_page (list);
on_page++;
}
-
+
for (lines = 0;
lines < (unsigned int) listing_lhs_cont_lines
&& src[cur];
- lines ++)
+ lines++)
{
- nchars = ((LISTING_WORD_SIZE * 2) + 1)
- * listing_lhs_width_second - 1;
+ nchars = ((LISTING_WORD_SIZE * 2) + 1) * listing_lhs_width_second - 1;
idx = 0;
-
- /* Print any more lines of data, but more compactly */
+
+ /* Print any more lines of data, but more compactly. */
fprintf (list_file, "% 4d ", lineno);
-
+
while (src[cur] && idx < nchars)
{
- int offset;
- offset = cur;
- fprintf (list_file, "%c%c", src[offset], src[offset+1]);
+ int offset;
+ offset = cur;
+ fprintf (list_file, "%c%c", src[offset], src[offset + 1]);
cur += 2;
idx += 2;
octet_in_word++;
-
+
if (octet_in_word == LISTING_WORD_SIZE)
{
fprintf (list_file, " ");
@@ -769,14 +752,13 @@ print_lines (list, lineno, string, address)
octet_in_word = 0;
}
}
-
+
fprintf (list_file, "\n");
- on_page ++;
+ on_page++;
listing_page (list);
}
}
-
static void
list_symbol_table ()
{
@@ -841,7 +823,7 @@ list_symbol_table ()
buf, S_GET_NAME (ptr));
}
- on_page ++;
+ on_page++;
listing_page (0);
}
}
@@ -1008,7 +990,6 @@ listing_listing (name)
list = head->next;
-
while (list)
{
unsigned int list_line;
@@ -1027,6 +1008,8 @@ listing_listing (name)
show_listing--;
break;
case EDICT_NOLIST_NEXT:
+ if (show_listing == 0)
+ list_line--;
break;
case EDICT_EJECT:
break;
@@ -1049,7 +1032,8 @@ listing_listing (name)
p = buffer_line (list->file, buffer, width);
}
- if (list->edict == EDICT_LIST)
+ if (list->edict == EDICT_LIST
+ || (list->edict == EDICT_NOLIST_NEXT && show_listing == 0))
{
/* Enable listing for the single line that caused the enable. */
list_line++;
@@ -1094,7 +1078,7 @@ listing_listing (name)
p = buffer_line (list->file, buffer, width);
if (list->file->linenum < list_line)
- address = ~ (unsigned int) 0;
+ address = ~(unsigned int) 0;
else
address = calc_hex (list);
@@ -1110,7 +1094,7 @@ listing_listing (name)
}
}
- if (list->edict == EDICT_NOLIST_NEXT)
+ if (list->edict == EDICT_NOLIST_NEXT && show_listing == 1)
--show_listing;
list = list->next;
@@ -1126,7 +1110,7 @@ listing_print (name)
char *name;
{
int using_stdout;
-
+
title = "";
subtitle = "";
@@ -1175,7 +1159,6 @@ listing_print (name)
}
}
-
void
listing_file (name)
const char *name;
@@ -1235,7 +1218,6 @@ listing_list (on)
}
}
-
void
listing_psize (width_only)
int width_only;
@@ -1324,8 +1306,6 @@ listing_title (depth)
}
}
-
-
void
listing_source_line (line)
unsigned int line;
@@ -1346,12 +1326,9 @@ listing_source_file (file)
listing_tail->hll_file = file_info (file);
}
-
-
#else
-
-/* Dummy functions for when compiled without listing enabled */
+/* Dummy functions for when compiled without listing enabled. */
void
listing_flags (ignore)
@@ -1360,21 +1337,21 @@ listing_flags (ignore)
s_ignore (0);
}
-void
+void
listing_list (on)
int on;
{
s_ignore (0);
}
-void
+void
listing_eject (ignore)
int ignore;
{
s_ignore (0);
}
-void
+void
listing_psize (ignore)
int ignore;
{
@@ -1388,7 +1365,7 @@ listing_nopage (ignore)
s_ignore (0);
}
-void
+void
listing_title (depth)
int depth;
{
@@ -1402,20 +1379,21 @@ listing_file (name)
}
-void
+void
listing_newline (name)
char *name;
{
}
-void
+void
listing_source_line (n)
unsigned int n;
{
}
-void
+
+void
listing_source_file (n)
const char *n;
{
diff --git a/gnu/usr.bin/binutils/gas/listing.h b/gnu/usr.bin/binutils/gas/listing.h
index c0d5c373e55..3301735eb03 100644
--- a/gnu/usr.bin/binutils/gas/listing.h
+++ b/gnu/usr.bin/binutils/gas/listing.h
@@ -1,5 +1,5 @@
/* This file is listing.h
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1997
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/gnu/usr.bin/binutils/gas/m68k-parse.c b/gnu/usr.bin/binutils/gas/m68k-parse.c
index 886e5876647..b4fc79fa027 100644
--- a/gnu/usr.bin/binutils/gas/m68k-parse.c
+++ b/gnu/usr.bin/binutils/gas/m68k-parse.c
@@ -345,7 +345,7 @@ static const short yycheck[] = { 58,
16, 0, 17, 17, 17, 17, 17
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/share/misc/bison.simple"
+#line 3 "/usr/share/bison/bison.simple"
/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
@@ -559,7 +559,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
#endif
#endif
-#line 217 "/usr/share/misc/bison.simple"
+#line 217 "/usr/share/bison/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -1428,7 +1428,7 @@ case 84:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/share/misc/bison.simple"
+#line 543 "/usr/share/bison/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
diff --git a/gnu/usr.bin/binutils/gas/macro.c b/gnu/usr.bin/binutils/gas/macro.c
index 12a757e2238..8512208da55 100644
--- a/gnu/usr.bin/binutils/gas/macro.c
+++ b/gnu/usr.bin/binutils/gas/macro.c
@@ -1,5 +1,6 @@
/* macro.c - macro support for gas and gasp
- Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -19,7 +20,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#include "config.h"
@@ -172,7 +173,7 @@ buffer_and_nest (from, to, ptr, get_line)
while (more)
{
- /* Try and find the first pseudo op on the line */
+ /* Try and find the first pseudo op on the line. */
int i = line_start;
if (! macro_alternate && ! macro_mri)
@@ -180,26 +181,26 @@ buffer_and_nest (from, to, ptr, get_line)
/* With normal syntax we can suck what we want till we get
to the dot. With the alternate, labels have to start in
the first column, since we cant tell what's a label and
- whats a pseudoop */
+ whats a pseudoop. */
- /* Skip leading whitespace */
+ /* Skip leading whitespace. */
while (i < ptr->len && ISWHITE (ptr->ptr[i]))
i++;
- /* Skip over a label */
+ /* Skip over a label. */
while (i < ptr->len
&& (isalnum ((unsigned char) ptr->ptr[i])
|| ptr->ptr[i] == '_'
|| ptr->ptr[i] == '$'))
i++;
- /* And a colon */
+ /* And a colon. */
if (i < ptr->len
&& ptr->ptr[i] == ':')
i++;
}
- /* Skip trailing whitespace */
+ /* Skip trailing whitespace. */
while (i < ptr->len && ISWHITE (ptr->ptr[i]))
i++;
@@ -208,24 +209,26 @@ buffer_and_nest (from, to, ptr, get_line)
|| macro_mri))
{
if (ptr->ptr[i] == '.')
- i++;
+ i++;
if (strncasecmp (ptr->ptr + i, from, from_len) == 0
- && (ptr->len == (i + from_len) || ! isalnum (ptr->ptr[i + from_len])))
+ && (ptr->len == (i + from_len)
+ || ! isalnum (ptr->ptr[i + from_len])))
depth++;
if (strncasecmp (ptr->ptr + i, to, to_len) == 0
- && (ptr->len == (i + to_len) || ! isalnum (ptr->ptr[i + to_len])))
+ && (ptr->len == (i + to_len)
+ || ! isalnum (ptr->ptr[i + to_len])))
{
depth--;
if (depth == 0)
{
- /* Reset the string to not include the ending rune */
+ /* Reset the string to not include the ending rune. */
ptr->len = line_start;
break;
}
}
}
- /* Add a CR to the end and keep running */
+ /* Add a CR to the end and keep running. */
sb_add_char (ptr, '\n');
line_start = ptr->len;
more = get_line (ptr);
@@ -257,7 +260,7 @@ get_token (idx, in, name)
sb_add_char (name, in->ptr[idx++]);
}
}
- /* Ignore trailing & */
+ /* Ignore trailing &. */
if (macro_alternate && idx < in->len && in->ptr[idx] == '&')
idx++;
return idx;
@@ -274,7 +277,7 @@ getstring (idx, in, acc)
idx = sb_skip_white (idx, in);
while (idx < in->len
- && (in->ptr[idx] == '"'
+ && (in->ptr[idx] == '"'
|| (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
|| (in->ptr[idx] == '\'' && macro_alternate)))
{
@@ -287,7 +290,7 @@ getstring (idx, in, acc)
{
if (in->ptr[idx] == '!')
{
- idx++ ;
+ idx++;
sb_add_char (acc, in->ptr[idx++]);
}
else
@@ -304,29 +307,47 @@ getstring (idx, in, acc)
else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'')
{
char tchar = in->ptr[idx];
+ int escaped = 0;
+
idx++;
+
while (idx < in->len)
{
+ if (in->ptr[idx - 1] == '\\')
+ escaped ^= 1;
+ else
+ escaped = 0;
+
if (macro_alternate && in->ptr[idx] == '!')
{
- idx++ ;
- sb_add_char (acc, in->ptr[idx++]);
+ idx ++;
+
+ sb_add_char (acc, in->ptr[idx]);
+
+ idx ++;
+ }
+ else if (escaped && in->ptr[idx] == tchar)
+ {
+ sb_add_char (acc, tchar);
+ idx ++;
}
else
{
if (in->ptr[idx] == tchar)
{
- idx++;
+ idx ++;
+
if (idx >= in->len || in->ptr[idx] != tchar)
break;
}
+
sb_add_char (acc, in->ptr[idx]);
- idx++;
+ idx ++;
}
}
}
}
-
+
return idx;
}
@@ -351,7 +372,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
if (idx < in->len)
{
- if (in->len > 2 && in->ptr[idx+1] == '\'' && ISBASE (in->ptr[idx]))
+ if (in->len > 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx]))
{
while (!ISSEP (in->ptr[idx]))
sb_add_char (out, in->ptr[idx++]);
@@ -362,7 +383,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
{
int val;
char buf[20];
- /* Turns the next expression into a string */
+ /* Turns the next expression into a string. */
idx = (*macro_expr) (_("% operator needs absolute expression"),
idx + 1,
in,
@@ -378,39 +399,39 @@ get_any_string (idx, in, out, expand, pretend_quoted)
&& ! macro_strip_at
&& expand)
{
- /* Keep the quotes */
- sb_add_char (out, '\"');
+ /* Keep the quotes. */
+ sb_add_char (out, '\"');
idx = getstring (idx, in, out);
- sb_add_char (out, '\"');
+ sb_add_char (out, '\"');
}
else
{
idx = getstring (idx, in, out);
}
}
- else
+ else
{
- while (idx < in->len
+ while (idx < in->len
&& (in->ptr[idx] == '"'
|| in->ptr[idx] == '\''
- || pretend_quoted
+ || pretend_quoted
|| (in->ptr[idx] != ' '
&& in->ptr[idx] != '\t'
&& in->ptr[idx] != ','
&& (in->ptr[idx] != '<'
|| (! macro_alternate && ! macro_mri)))))
{
- if (in->ptr[idx] == '"'
+ if (in->ptr[idx] == '"'
|| in->ptr[idx] == '\'')
{
char tchar = in->ptr[idx];
sb_add_char (out, in->ptr[idx++]);
while (idx < in->len
&& in->ptr[idx] != tchar)
- sb_add_char (out, in->ptr[idx++]);
+ sb_add_char (out, in->ptr[idx++]);
if (idx == in->len)
- return idx;
+ return idx;
}
sb_add_char (out, in->ptr[idx++]);
}
@@ -449,15 +470,15 @@ do_formals (macro, idx, in)
idx = sb_skip_white (idx, in);
if (formal->name.len)
{
- /* This is a formal */
+ /* This is a formal. */
if (idx < in->len && in->ptr[idx] == '=')
{
- /* Got a default */
+ /* Got a default. */
idx = get_any_string (idx + 1, in, &formal->def, 1, 0);
}
}
- /* Add to macro's hash table */
+ /* Add to macro's hash table. */
hash_jam (macro->formal_hash, sb_terminate (&formal->name), formal);
formal->index = macro->formal_count;
@@ -490,7 +511,7 @@ do_formals (macro, idx, in)
sb_add_string (&formal->name, name);
- /* Add to macro's hash table */
+ /* Add to macro's hash table. */
hash_jam (macro->formal_hash, name, formal);
formal->index = NARG_INDEX;
@@ -532,14 +553,14 @@ define_macro (idx, in, label, get_line, namep)
sb_add_sb (&name, label);
if (idx < in->len && in->ptr[idx] == '(')
{
- /* It's the label: MACRO (formals,...) sort */
+ /* It's the label: MACRO (formals,...) sort */
idx = do_formals (macro, idx + 1, in);
if (in->ptr[idx] != ')')
return _("missing ) after formals");
}
else
{
- /* It's the label: MACRO formals,... sort */
+ /* It's the label: MACRO formals,... sort */
idx = do_formals (macro, idx, in);
}
}
@@ -550,7 +571,7 @@ define_macro (idx, in, label, get_line, namep)
idx = do_formals (macro, idx, in);
}
- /* and stick it in the macro hash table */
+ /* And stick it in the macro hash table. */
for (idx = 0; idx < name.len; idx++)
if (isupper ((unsigned char) name.ptr[idx]))
name.ptr[idx] = tolower (name.ptr[idx]);
@@ -627,7 +648,7 @@ sub_actual (start, in, t, formal_hash, kind, out, copyifnotthere)
{
sb_add_sb (out, t);
}
- else
+ else
{
sb_add_char (out, '\\');
sb_add_sb (out, t);
@@ -676,14 +697,14 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
src++;
if (in->ptr[src] == comment_char && comment_char != '\0')
{
- /* This is a comment, just drop the rest of the line */
+ /* This is a comment, just drop the rest of the line. */
while (src < in->len
&& in->ptr[src] != '\n')
src++;
}
else if (in->ptr[src] == '(')
{
- /* Sub in till the next ')' literally */
+ /* Sub in till the next ')' literally. */
src++;
while (src < in->len && in->ptr[src] != ')')
{
@@ -696,17 +717,17 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
}
else if (in->ptr[src] == '@')
{
- /* Sub in the macro invocation number */
+ /* Sub in the macro invocation number. */
char buffer[10];
src++;
- sprintf (buffer, "%05d", macro_number);
+ sprintf (buffer, "%d", macro_number);
sb_add_string (out, buffer);
}
else if (in->ptr[src] == '&')
{
/* This is a preprocessor variable name, we don't do them
- here */
+ here. */
sb_add_char (out, '\\');
sb_add_char (out, '&');
src++;
@@ -901,10 +922,10 @@ macro_expand (idx, in, m, out, comment_char)
const char *err;
sb_new (&t);
-
- /* Reset any old value the actuals may have */
+
+ /* Reset any old value the actuals may have. */
for (f = m->formals; f; f = f->next)
- sb_reset (&f->actual);
+ sb_reset (&f->actual);
f = m->formals;
while (f != NULL && f->index < 0)
f = f->next;
@@ -930,13 +951,13 @@ macro_expand (idx, in, m, out, comment_char)
}
}
- /* Peel off the actuals and store them away in the hash tables' actuals */
+ /* Peel off the actuals and store them away in the hash tables' actuals. */
idx = sb_skip_white (idx, in);
while (idx < in->len && in->ptr[idx] != comment_char)
{
int scan;
- /* Look and see if it's a positional or keyword arg */
+ /* Look and see if it's a positional or keyword arg. */
scan = idx;
while (scan < in->len
&& !ISSEP (in->ptr[scan])
@@ -950,19 +971,19 @@ macro_expand (idx, in, m, out, comment_char)
/* It's OK to go from positional to keyword. */
/* This is a keyword arg, fetch the formal name and
- then the actual stuff */
+ then the actual stuff. */
sb_reset (&t);
idx = get_token (idx, in, &t);
if (in->ptr[idx] != '=')
return _("confusion in formal parameters");
- /* Lookup the formal in the macro's list */
+ /* Lookup the formal in the macro's list. */
ptr = (formal_entry *) hash_find (m->formal_hash, sb_terminate (&t));
if (!ptr)
return _("macro formal argument does not exist");
else
{
- /* Insert this value into the right place */
+ /* Insert this value into the right place. */
sb_reset (&ptr->actual);
idx = get_any_string (idx + 1, in, &ptr->actual, 0, 0);
if (ptr->actual.len > 0)
@@ -971,7 +992,7 @@ macro_expand (idx, in, m, out, comment_char)
}
else
{
- /* This is a positional arg */
+ /* This is a positional arg. */
is_positional = 1;
if (is_keyword)
return _("can't mix positional and keyword arguments");
@@ -1118,7 +1139,7 @@ check_macro (line, expand, comment_char, error, info)
sb_kill (&line_sb);
- /* export the macro information if requested */
+ /* Export the macro information if requested. */
if (info)
*info = macro;
@@ -1163,7 +1184,7 @@ expand_irp (irpc, idx, in, out, get_line, comment_char)
sb_new (&sub);
if (! buffer_and_nest (mn, "ENDR", &sub, get_line))
return _("unexpected end of file in irp or irpc");
-
+
sb_new (&f.name);
sb_new (&f.def);
sb_new (&f.actual);
diff --git a/gnu/usr.bin/binutils/gas/macro.h b/gnu/usr.bin/binutils/gas/macro.h
index 9c61acd89a9..beff9a8b50a 100644
--- a/gnu/usr.bin/binutils/gas/macro.h
+++ b/gnu/usr.bin/binutils/gas/macro.h
@@ -1,5 +1,6 @@
/* macro.h - header file for macro support for gas and gasp
- Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -19,7 +20,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#ifndef MACRO_H
@@ -28,41 +29,37 @@
#include "ansidecl.h"
#include "sb.h"
-/* Structures used to store macros.
+/* Structures used to store macros.
Each macro knows its name and included text. It gets built with a
list of formal arguments, and also keeps a hash table which points
into the list to speed up formal search. Each formal knows its
name and its default value. Each time the macro is expanded, the
- formals get the actual values attatched to them. */
+ formals get the actual values attatched to them. */
/* describe the formal arguments to a macro */
-typedef struct formal_struct
- {
- struct formal_struct *next; /* next formal in list */
- sb name; /* name of the formal */
- sb def; /* the default value */
- sb actual; /* the actual argument (changed on each expansion) */
- int index; /* the index of the formal 0..formal_count-1 */
- }
-formal_entry;
+typedef struct formal_struct {
+ struct formal_struct *next; /* next formal in list */
+ sb name; /* name of the formal */
+ sb def; /* the default value */
+ sb actual; /* the actual argument (changed on each expansion) */
+ int index; /* the index of the formal 0..formal_count-1 */
+} formal_entry;
/* Other values found in the index field of a formal_entry. */
#define QUAL_INDEX (-1)
#define NARG_INDEX (-2)
#define LOCAL_INDEX (-3)
-/* describe the macro. */
+/* describe the macro. */
-typedef struct macro_struct
- {
- sb sub; /* substitution text. */
- int formal_count; /* number of formal args. */
- formal_entry *formals; /* pointer to list of formal_structs */
- struct hash_control *formal_hash; /* hash table of formals. */
- }
-macro_entry;
+typedef struct macro_struct {
+ sb sub; /* substitution text. */
+ int formal_count; /* number of formal args. */
+ formal_entry *formals; /* pointer to list of formal_structs */
+ struct hash_control *formal_hash; /* hash table of formals. */
+} macro_entry;
/* Whether any macros have been defined. */
@@ -81,7 +78,7 @@ extern void macro_mri_mode PARAMS ((int));
extern const char *define_macro
PARAMS ((int idx, sb *in, sb *label, int (*get_line) PARAMS ((sb *)),
const char **namep));
-extern int check_macro PARAMS ((const char *, sb *, int, const char **,
+extern int check_macro PARAMS ((const char *, sb *, int, const char **,
macro_entry **));
extern void delete_macro PARAMS ((const char *));
extern const char *expand_irp
diff --git a/gnu/usr.bin/binutils/gas/messages.c b/gnu/usr.bin/binutils/gas/messages.c
index e4b7ad00a11..e85deec3bde 100644
--- a/gnu/usr.bin/binutils/gas/messages.c
+++ b/gnu/usr.bin/binutils/gas/messages.c
@@ -1,5 +1,5 @@
/* messages.c - error reporter -
- Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#include "as.h"
@@ -47,8 +47,7 @@ static void as_show_where PARAMS ((void));
static void as_warn_internal PARAMS ((char *, unsigned int, char *));
static void as_bad_internal PARAMS ((char *, unsigned int, char *));
-/*
- * Despite the rest of the comments in this file, (FIXME-SOON),
+/* Despite the rest of the comments in this file, (FIXME-SOON),
* here is the current scheme for error messages etc:
*
* as_fatal() is used when gas is quite confused and
@@ -105,26 +104,26 @@ identify (file)
fprintf (stderr, _("Assembler messages:\n"));
}
-static int warning_count; /* Count of number of warnings issued */
+/* The number of warnings issued. */
+static int warning_count;
-int
+int
had_warnings ()
{
return (warning_count);
}
/* Nonzero if we've hit a 'bad error', and should not write an obj file,
- and exit with a nonzero error code */
+ and exit with a nonzero error code. */
static int error_count;
-int
+int
had_errors ()
{
return (error_count);
}
-
/* Print the current location to stderr. */
static void
@@ -139,15 +138,11 @@ as_show_where ()
fprintf (stderr, "%s:%u: ", file, line);
}
-/*
- * a s _ p e r r o r
- *
- * Like perror(3), but with more info.
- */
+/* Like perror(3), but with more info. */
-void
+void
as_perror (gripe, filename)
- const char *gripe; /* Unpunctuated error theme. */
+ const char *gripe; /* Unpunctuated error theme. */
const char *filename;
{
const char *errtxt;
@@ -166,18 +161,15 @@ as_perror (gripe, filename)
#endif
}
-/*
- * a s _ t s k t s k ()
- *
- * Send to stderr a string as a warning, and locate warning
- * in input file(s).
- * Please only use this for when we have some recovery action.
- * Please explain in string (which may have '\n's) what recovery was done.
- */
+/* Send to stderr a string as a warning, and locate warning
+ in input file(s).
+ Please only use this for when we have some recovery action.
+ Please explain in string (which may have '\n's) what recovery was
+ done. */
#ifdef USE_STDARG
-void
-as_tsktsk (const char *format,...)
+void
+as_tsktsk (const char *format, ...)
{
va_list args;
@@ -186,9 +178,9 @@ as_tsktsk (const char *format,...)
vfprintf (stderr, format, args);
va_end (args);
(void) putc ('\n', stderr);
-} /* as_tsktsk() */
+}
#else
-void
+void
as_tsktsk (format, va_alist)
const char *format;
va_dcl
@@ -200,7 +192,7 @@ as_tsktsk (format, va_alist)
vfprintf (stderr, format, args);
va_end (args);
(void) putc ('\n', stderr);
-} /* as_tsktsk() */
+}
#endif /* not NO_STDARG */
/* The common portion of as_warn and as_warn_where. */
@@ -227,18 +219,15 @@ as_warn_internal (file, line, buffer)
#endif
}
-/*
- * a s _ w a r n ()
- *
- * Send to stderr a string as a warning, and locate warning
- * in input file(s).
- * Please only use this for when we have some recovery action.
- * Please explain in string (which may have '\n's) what recovery was done.
- */
+/* Send to stderr a string as a warning, and locate warning
+ in input file(s).
+ Please only use this for when we have some recovery action.
+ Please explain in string (which may have '\n's) what recovery was
+ done. */
#ifdef USE_STDARG
-void
-as_warn (const char *format,...)
+void
+as_warn (const char *format, ...)
{
va_list args;
char buffer[2000];
@@ -250,10 +239,9 @@ as_warn (const char *format,...)
va_end (args);
as_warn_internal ((char *) NULL, 0, buffer);
}
-} /* as_warn() */
+}
#else
-/*VARARGS1 */
-void
+void
as_warn (format, va_alist)
const char *format;
va_dcl
@@ -268,16 +256,16 @@ as_warn (format, va_alist)
va_end (args);
as_warn_internal ((char *) NULL, 0, buffer);
}
-} /* as_warn() */
+}
#endif /* not NO_STDARG */
-/* as_warn_where, like as_bad but the file name and line number are
- passed in. Unfortunately, we have to repeat the function in order
- to handle the varargs correctly and portably. */
+/* Like as_bad but the file name and line number are passed in.
+ Unfortunately, we have to repeat the function in order to handle
+ the varargs correctly and portably. */
#ifdef USE_STDARG
-void
-as_warn_where (char *file, unsigned int line, const char *format,...)
+void
+as_warn_where (char *file, unsigned int line, const char *format, ...)
{
va_list args;
char buffer[2000];
@@ -289,10 +277,9 @@ as_warn_where (char *file, unsigned int line, const char *format,...)
va_end (args);
as_warn_internal (file, line, buffer);
}
-} /* as_warn() */
+}
#else
-/*VARARGS1 */
-void
+void
as_warn_where (file, line, format, va_alist)
char *file;
unsigned int line;
@@ -309,7 +296,7 @@ as_warn_where (file, line, format, va_alist)
va_end (args);
as_warn_internal (file, line, buffer);
}
-} /* as_warn() */
+}
#endif /* not NO_STDARG */
/* The common portion of as_bad and as_bad_where. */
@@ -336,18 +323,15 @@ as_bad_internal (file, line, buffer)
#endif
}
-/*
- * a s _ b a d ()
- *
- * Send to stderr a string as a warning, and locate warning in input file(s).
- * Please us when there is no recovery, but we want to continue processing
- * but not produce an object file.
- * Please explain in string (which may have '\n's) what recovery was done.
- */
+/* Send to stderr a string as a warning, and locate warning in input
+ file(s). Please us when there is no recovery, but we want to
+ continue processing but not produce an object file.
+ Please explain in string (which may have '\n's) what recovery was
+ done. */
#ifdef USE_STDARG
-void
-as_bad (const char *format,...)
+void
+as_bad (const char *format, ...)
{
va_list args;
char buffer[2000];
@@ -360,8 +344,7 @@ as_bad (const char *format,...)
}
#else
-/*VARARGS1 */
-void
+void
as_bad (format, va_alist)
const char *format;
va_dcl
@@ -377,13 +360,13 @@ as_bad (format, va_alist)
}
#endif /* not NO_STDARG */
-/* as_bad_where, like as_bad but the file name and line number are
- passed in. Unfortunately, we have to repeat the function in order
- to handle the varargs correctly and portably. */
+/* Like as_bad but the file name and line number are passed in.
+ Unfortunately, we have to repeat the function in order to handle
+ the varargs correctly and portably. */
#ifdef USE_STDARG
-void
-as_bad_where (char *file, unsigned int line, const char *format,...)
+void
+as_bad_where (char *file, unsigned int line, const char *format, ...)
{
va_list args;
char buffer[2000];
@@ -396,8 +379,7 @@ as_bad_where (char *file, unsigned int line, const char *format,...)
}
#else
-/*VARARGS1 */
-void
+void
as_bad_where (file, line, format, va_alist)
char *file;
unsigned int line;
@@ -415,18 +397,14 @@ as_bad_where (file, line, format, va_alist)
}
#endif /* not NO_STDARG */
-/*
- * a s _ f a t a l ()
- *
- * Send to stderr a string as a fatal message, and print location of error in
- * input file(s).
- * Please only use this for when we DON'T have some recovery action.
- * It xexit()s with a warning status.
- */
+/* Send to stderr a string as a fatal message, and print location of
+ error in input file(s).
+ Please only use this for when we DON'T have some recovery action.
+ It xexit()s with a warning status. */
#ifdef USE_STDARG
-void
-as_fatal (const char *format,...)
+void
+as_fatal (const char *format, ...)
{
va_list args;
@@ -436,11 +414,14 @@ as_fatal (const char *format,...)
vfprintf (stderr, format, args);
(void) putc ('\n', stderr);
va_end (args);
+ /* Delete the output file, if it exists. This will prevent make from
+ thinking that a file was created and hence does not need rebuilding. */
+ if (out_file_name != NULL)
+ unlink (out_file_name);
xexit (EXIT_FAILURE);
-} /* as_fatal() */
+}
#else
-/*VARARGS1*/
-void
+void
as_fatal (format, va_alist)
char *format;
va_dcl
@@ -454,13 +435,11 @@ as_fatal (format, va_alist)
(void) putc ('\n', stderr);
va_end (args);
xexit (EXIT_FAILURE);
-} /* as_fatal() */
+}
#endif /* not NO_STDARG */
-/*
- * as_assert: Indicate assertion failure.
- * Arguments: Filename, line number, optional function name.
- */
+/* Indicate assertion failure.
+ Arguments: Filename, line number, optional function name. */
void
as_assert (file, line, fn)
@@ -480,6 +459,7 @@ as_assert (file, line, fn)
/* as_abort: Print a friendly message saying how totally hosed we are,
and exit without producing a core file. */
+
void
as_abort (file, line, fn)
const char *file, *fn;
@@ -537,5 +517,3 @@ sprint_value (buf, val)
#endif
abort ();
}
-
-/* end of messages.c */
diff --git a/gnu/usr.bin/binutils/gas/obj.h b/gnu/usr.bin/binutils/gas/obj.h
index 7fe5551811d..846627a65e3 100644
--- a/gnu/usr.bin/binutils/gas/obj.h
+++ b/gnu/usr.bin/binutils/gas/obj.h
@@ -1,7 +1,7 @@
/* obj.h - defines the object dependent hooks for all object
format backends.
- Copyright (C) 1987, 90, 91, 92, 93, 95, 96, 97, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -50,18 +50,27 @@ struct format_ops {
int flavor;
unsigned dfl_leading_underscore : 1;
unsigned emit_section_symbols : 1;
+ void (*begin) PARAMS ((void));
+ void (*app_file) PARAMS ((const char *));
void (*frob_symbol) PARAMS ((symbolS *, int *));
void (*frob_file) PARAMS ((void));
+ void (*frob_file_before_adjust) PARAMS ((void));
void (*frob_file_after_relocs) PARAMS ((void));
bfd_vma (*s_get_size) PARAMS ((symbolS *));
void (*s_set_size) PARAMS ((symbolS *, bfd_vma));
bfd_vma (*s_get_align) PARAMS ((symbolS *));
void (*s_set_align) PARAMS ((symbolS *, bfd_vma));
int (*s_get_other) PARAMS ((symbolS *));
+ void (*s_set_other) PARAMS ((symbolS *, int));
int (*s_get_desc) PARAMS ((symbolS *));
+ void (*s_set_desc) PARAMS ((symbolS *, int));
+ int (*s_get_type) PARAMS ((symbolS *));
+ void (*s_set_type) PARAMS ((symbolS *, int));
void (*copy_symbol_attributes) PARAMS ((symbolS *, symbolS *));
void (*generate_asm_lineno) PARAMS ((void));
void (*process_stab) PARAMS ((segT, int, const char *, int, int, int));
+ int (*separate_stab_sections) PARAMS ((void));
+ void (*init_stab_section) PARAMS ((segT));
int (*sec_sym_ok_for_reloc) PARAMS ((asection *));
void (*pop_insert) PARAMS ((void));
/* For configurations using ECOFF_DEBUGGING, this callback is used. */
diff --git a/gnu/usr.bin/binutils/gas/output-file.c b/gnu/usr.bin/binutils/gas/output-file.c
index a7df72f2937..bcd49b51012 100644
--- a/gnu/usr.bin/binutils/gas/output-file.c
+++ b/gnu/usr.bin/binutils/gas/output-file.c
@@ -1,5 +1,5 @@
/* output-file.c - Deal with the output file
- Copyright (C) 1987, 90, 91, 93, 92, 94, 95, 96, 1998
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/gnu/usr.bin/binutils/gas/read.c b/gnu/usr.bin/binutils/gas/read.c
index 15228426af1..32050c4f208 100644
--- a/gnu/usr.bin/binutils/gas/read.c
+++ b/gnu/usr.bin/binutils/gas/read.c
@@ -1,6 +1,6 @@
/* read.c - read a source file -
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 2000 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,28 +17,25 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+02111-1307, USA. */
#if 0
-#define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will
- change this a bit. But then, GNU isn't
- spozed to run on your machine anyway.
- (RMS is so shortsighted sometimes.)
- */
+/* If your chars aren't 8 bits, you will change this a bit.
+ 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)
+#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. */
-
+ grow when we do 4361 style flonums. */
#define MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT (16)
/* Routines that read assembler source text to build spagetti in memory.
Another group of these functions is in the expr.c module. */
-/* for isdigit() */
+/* For isdigit (). */
#include <ctype.h>
#include "as.h"
@@ -55,28 +52,22 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Set by the object-format or the target. */
#ifndef TC_IMPLICIT_LCOMM_ALIGNMENT
-#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) \
- do { \
- if ((SIZE) >= 8) \
- (P2VAR) = 3; \
- else if ((SIZE) >= 4) \
- (P2VAR) = 2; \
- else if ((SIZE) >= 2) \
- (P2VAR) = 1; \
- else \
- (P2VAR) = 0; \
- } while (0)
-#endif
-
-/* The NOP_OPCODE is for the alignment fill value.
- * fill it a nop instruction so that the disassembler does not choke
- * on it
- */
-#ifndef NOP_OPCODE
-#define NOP_OPCODE 0x00
+#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) \
+ do \
+ { \
+ if ((SIZE) >= 8) \
+ (P2VAR) = 3; \
+ else if ((SIZE) >= 4) \
+ (P2VAR) = 2; \
+ else if ((SIZE) >= 2) \
+ (P2VAR) = 1; \
+ else \
+ (P2VAR) = 0; \
+ } \
+ while (0)
#endif
-char *input_line_pointer; /*->next char of source file to parse. */
+char *input_line_pointer; /*->next char of source file to parse. */
#if BITS_PER_CHAR != 8
/* The following table is indexed by[(char)] and will break if
@@ -105,6 +96,8 @@ die horribly;
#endif
#ifndef LEX_HASH
+/* The IA-64 assembler uses # as a suffix designating a symbol. We include
+ it in the symbol and strip it out in tc_canonicalize_symbol_name. */
#define LEX_HASH 0
#endif
@@ -118,9 +111,8 @@ die horribly;
#define LEX_TILDE 0
#endif
-/* used by is_... macros. our ctype[] */
-char lex_type[256] =
-{
+/* Used by is_... macros. our ctype[]. */
+char lex_type[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ABCDEFGHIJKLMNO */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ[\]^_ */
0, 0, 0, LEX_HASH, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
@@ -128,7 +120,7 @@ char lex_type[256] =
LEX_AT, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* @ABCDEFGHIJKLMNO */
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, 0, 3, /* PQRSTUVWXYZ[\]^_ */
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* `abcdefghijklmno */
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, LEX_TILDE, 0, /* pqrstuvwxyz{|}~. */
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, LEX_TILDE, 0, /* pqrstuvwxyz{|}~. */
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -139,58 +131,59 @@ char lex_type[256] =
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
};
-
-/*
- * In: a character.
- * Out: 1 if this character ends a line.
- */
-#define Z_ (0)
-char is_end_of_line[256] =
-{
+/* In: a character.
+ Out: 1 if this character ends a line. */
+char is_end_of_line[256] = {
#ifdef CR_EOL
- 99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, 99, Z_, Z_, /* @abcdefghijklmno */
-#else
- 99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, Z_, Z_, Z_, /* @abcdefghijklmno */
-#endif
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
-#ifdef TC_HPPA
- Z_,99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* _!"#$%&'()*+,-./ */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* 0123456789:;<=>? */
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, /* @abcdefghijklmno */
#else
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, Z_, Z_, /* 0123456789:;<=>? */
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* @abcdefghijklmno */
#endif
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
- Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* _!"#$%&'()*+,-./ */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0123456789:;<=>? */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* */
};
-#undef Z_
-/* Functions private to this file. */
+#ifdef IGNORE_OPCODE_CASE
+char original_case_string[128];
+#endif
+
+/* Functions private to this file. */
-static char *buffer; /* 1st char of each buffer of lines is here. */
-static char *buffer_limit; /*->1 + last char in buffer. */
+static char *buffer; /* 1st char of each buffer of lines is here. */
+static char *buffer_limit; /*->1 + last char in buffer. */
-/* TARGET_BYTES_BIG_ENDIAN is required to be defined to either 0 or 1 in the
- tc-<CPU>.h file. See the "Porting GAS" section of the internals manual. */
+/* TARGET_BYTES_BIG_ENDIAN is required to be defined to either 0 or 1
+ in the tc-<CPU>.h file. See the "Porting GAS" section of the
+ internals manual. */
int target_big_endian = TARGET_BYTES_BIG_ENDIAN;
-static char *old_buffer; /* JF a hack */
+static char *old_buffer; /* JF a hack. */
static char *old_input;
static char *old_limit;
-/* Variables for handling include file directory table. */
+/* Variables for handling include file directory table. */
+
+/* Table of pointers to directories to search for .include's. */
+char **include_dirs;
-char **include_dirs; /* Table of pointers to directories to
- search for .include's */
-int include_dir_count; /* How many are in the table */
-int include_dir_maxlen = 1;/* Length of longest in table */
+/* How many are in the table. */
+int include_dir_count;
+
+/* Length of longest in table. */
+int include_dir_maxlen = 1;
#ifndef WORKING_DOT_WORD
struct broken_word *broken_words;
@@ -247,7 +240,6 @@ static void pobegin PARAMS ((void));
static int get_line_sb PARAMS ((sb *));
static void generate_file_debug PARAMS ((void));
-
void
read_begin ()
{
@@ -261,21 +253,20 @@ read_begin ()
obstack_begin (&notes, chunksize);
obstack_begin (&cond_obstack, chunksize);
- /* Use machine dependent syntax */
+ /* Use machine dependent syntax. */
for (p = line_separator_chars; *p; p++)
is_end_of_line[(unsigned char) *p] = 1;
- /* Use more. FIXME-SOMEDAY. */
+ /* Use more. FIXME-SOMEDAY. */
if (flag_mri)
lex_type['?'] = 3;
}
-/* set up pseudo-op tables */
+/* Set up pseudo-op tables. */
static struct hash_control *po_hash;
-static const pseudo_typeS potable[] =
-{
+static const pseudo_typeS potable[] = {
{"abort", s_abort, 0},
{"align", s_align_ptwo, 0},
{"ascii", stringer, 0},
@@ -283,7 +274,7 @@ static const pseudo_typeS potable[] =
{"balign", s_align_bytes, 0},
{"balignw", s_align_bytes, -2},
{"balignl", s_align_bytes, -4},
-/* block */
+/* block */
{"byte", cons, 1},
{"comm", s_comm, 0},
{"common", s_mri_common, 0},
@@ -315,10 +306,10 @@ static const pseudo_typeS potable[] =
#ifdef S_SET_DESC
{"desc", s_desc, 0},
#endif
-/* dim */
+/* dim */
{"double", float_cons, 'd'},
-/* dsect */
- {"eject", listing_eject, 0}, /* Formfeed listing */
+/* dsect */
+ {"eject", listing_eject, 0}, /* Formfeed listing. */
{"else", s_else, 0},
{"elsec", s_else, 0},
{"elseif", s_elseif, (int) O_ne},
@@ -326,13 +317,13 @@ static const pseudo_typeS potable[] =
{"endc", s_endif, 0},
{"endfunc", s_func, 1},
{"endif", s_endif, 0},
-/* endef */
+/* endef */
{"equ", s_set, 0},
{"equiv", s_set, 1},
{"err", s_err, 0},
{"exitm", s_mexit, 0},
-/* extend */
- {"extern", s_ignore, 0}, /* We treat all undef as ext */
+/* extend */
+ {"extern", s_ignore, 0}, /* We treat all undef as ext. */
{"appfile", s_app_file, 1},
{"appline", s_app_line, 0},
{"fail", s_fail, 0},
@@ -365,9 +356,9 @@ static const pseudo_typeS potable[] =
{"irpc", s_irp, 1},
{"irepc", s_irp, 1},
{"lcomm", s_lcomm, 0},
- {"lflags", listing_flags, 0}, /* Listing flags */
+ {"lflags", listing_flags, 0}, /* Listing flags. */
{"linkonce", s_linkonce, 0},
- {"list", listing_list, 1}, /* Turn listing on */
+ {"list", listing_list, 1}, /* Turn listing on. */
{"llen", listing_psize, 1},
{"long", cons, 4},
{"lsym", s_lsym, 0},
@@ -377,7 +368,7 @@ static const pseudo_typeS potable[] =
{".mri", s_mri, 0}, /* Special case so .mri works in MRI mode. */
{"name", s_ignore, 0},
{"noformat", s_ignore, 0},
- {"nolist", listing_list, 0}, /* Turn listing off */
+ {"nolist", listing_list, 0}, /* Turn listing off. */
{"nopage", listing_nopage, 0},
{"octa", cons, 16},
{"offset", s_struct, 0},
@@ -388,19 +379,19 @@ static const pseudo_typeS potable[] =
{"page", listing_eject, 0},
{"plen", listing_psize, 0},
{"print", s_print, 0},
- {"psize", listing_psize, 0}, /* set paper size */
+ {"psize", listing_psize, 0}, /* Set paper size. */
{"purgem", s_purgem, 0},
{"quad", cons, 8},
{"rep", s_rept, 0},
{"rept", s_rept, 0},
{"rva", s_rva, 4},
- {"sbttl", listing_title, 1}, /* Subtitle of listing */
-/* scl */
-/* sect */
+ {"sbttl", listing_title, 1}, /* Subtitle of listing. */
+/* scl */
+/* sect */
{"set", s_set, 0},
{"short", cons, 2},
{"single", float_cons, 'f'},
-/* size */
+/* size */
{"space", s_space, 0},
{"skip", s_space, 0},
{"sleb128", s_leb128, 1},
@@ -410,7 +401,7 @@ static const pseudo_typeS potable[] =
{"stabs", s_stab, 's'},
{"string", stringer, 1},
{"struct", s_struct, 0},
-/* tag */
+/* tag */
{"text", s_text, 0},
/* This is for gcc to use. It's only just been added (2/94), so gcc
@@ -423,19 +414,19 @@ static const pseudo_typeS potable[] =
this one. Match it either way... */
{"this_gcc_requires_the_gnu_assembler", s_ignore, 0},
- {"title", listing_title, 0}, /* Listing title */
+ {"title", listing_title, 0}, /* Listing title. */
{"ttl", listing_title, 0},
-/* type */
+/* type */
{"uleb128", s_leb128, 0},
-/* use */
-/* val */
+/* use */
+/* val */
{"xcom", s_comm, 0},
{"xdef", s_globl, 0},
{"xref", s_ignore, 0},
{"xstabs", s_xstab, 's'},
{"word", cons, 2},
{"zero", s_space, 0},
- {NULL, NULL, 0} /* end sentinel */
+ {NULL, NULL, 0} /* End sentinel. */
};
static int pop_override_ok = 0;
@@ -464,21 +455,21 @@ pop_insert (table)
#define obj_pop_insert() pop_insert(obj_pseudo_table)
#endif
-static void
+static void
pobegin ()
{
po_hash = hash_new ();
- /* Do the target-specific pseudo ops. */
+ /* Do the target-specific pseudo ops. */
pop_table_name = "md";
md_pop_insert ();
- /* Now object specific. Skip any that were in the target table. */
+ /* Now object specific. Skip any that were in the target table. */
pop_table_name = "obj";
pop_override_ok = 1;
obj_pop_insert ();
- /* Now portable ones. Skip any that we've seen already. */
+ /* Now portable ones. Skip any that we've seen already. */
pop_table_name = "standard";
pop_insert (potable);
}
@@ -486,13 +477,12 @@ pobegin ()
#define HANDLE_CONDITIONAL_ASSEMBLY() \
if (ignore_input ()) \
{ \
- while (! is_end_of_line[(unsigned char) *input_line_pointer++]) \
+ while (!is_end_of_line[(unsigned char) *input_line_pointer++]) \
if (input_line_pointer == buffer_limit) \
break; \
continue; \
}
-
/* This function is used when scrubbing the characters between #APP
and #NO_APP. */
@@ -514,20 +504,21 @@ scrub_from_string (buf, buflen)
return copy;
}
-/* read_a_source_file()
- *
- * We read the file, putting things into a web that
- * represents what we have been reading.
- */
-void
+/* We read the file, putting things into a web that represents what we
+ have been reading. */
+void
read_a_source_file (name)
char *name;
{
register char c;
- register char *s; /* string of symbol, '\0' appended */
+ register char *s; /* String of symbol, '\0' appended. */
register int temp;
pseudo_typeS *pop;
+#ifdef WARN_COMMENTS
+ found_comment = 0;
+#endif
+
buffer = input_scrub_new_file (name);
listing_file (name);
@@ -540,26 +531,23 @@ read_a_source_file (name)
generate_file_debug ();
while ((buffer_limit = input_scrub_next_buffer (&input_line_pointer)) != 0)
- { /* We have another line to parse. */
- know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */
+ { /* We have another line to parse. */
+ know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */
contin: /* JF this goto is my fault I admit it.
Someone brave please re-write the whole
input section here? Pleeze??? */
while (input_line_pointer < buffer_limit)
{
- /* We have more of this buffer to parse. */
+ /* We have more of this buffer to parse. */
- /*
- * We now have input_line_pointer->1st char of next line.
- * If input_line_pointer [-1] == '\n' then we just
- * scanned another line: so bump line counters.
- */
+ /* We now have input_line_pointer->1st char of next line.
+ If input_line_pointer [-1] == '\n' then we just
+ scanned another line: so bump line counters. */
if (is_end_of_line[(unsigned char) input_line_pointer[-1]])
{
#ifdef md_start_line_hook
md_start_line_hook ();
#endif
-
if (input_line_pointer[-1] == '\n')
bump_line_counters ();
@@ -610,12 +598,12 @@ read_a_source_file (name)
/* In MRI mode, we need to handle the MACRO
pseudo-op specially: we don't want to put the
symbol in the symbol table. */
- if (! mri_line_macro
+ if (!mri_line_macro
#ifdef TC_START_LABEL_WITHOUT_COLON
- && TC_START_LABEL_WITHOUT_COLON(c,
- input_line_pointer)
+ && TC_START_LABEL_WITHOUT_COLON(c,
+ input_line_pointer)
#endif
- )
+ )
line_label = colon (line_start);
else
line_label = symbol_create (line_start,
@@ -630,28 +618,25 @@ read_a_source_file (name)
}
}
- /*
- * We are at the begining of a line, or similar place.
- * We expect a well-formed assembler statement.
- * A "symbol-name:" is a statement.
- *
- * Depending on what compiler is used, the order of these tests
- * may vary to catch most common case 1st.
- * Each test is independent of all other tests at the (top) level.
- * PLEASE make a compiler that doesn't use this assembler.
- * It is crufty to waste a compiler's time encoding things for this
- * assembler, which then wastes more time decoding it.
- * (And communicating via (linear) files is silly!
- * If you must pass stuff, please pass a tree!)
- */
+ /* We are at the begining of a line, or similar place.
+ We expect a well-formed assembler statement.
+ A "symbol-name:" is a statement.
+
+ Depending on what compiler is used, the order of these tests
+ may vary to catch most common case 1st.
+ Each test is independent of all other tests at the (top) level.
+ PLEASE make a compiler that doesn't use this assembler.
+ It is crufty to waste a compiler's time encoding things for this
+ assembler, which then wastes more time decoding it.
+ (And communicating via (linear) files is silly!
+ If you must pass stuff, please pass a tree!) */
if ((c = *input_line_pointer++) == '\t'
|| c == ' '
|| c == '\f'
|| c == 0)
- {
- c = *input_line_pointer++;
- }
- know (c != ' '); /* No further leading whitespace. */
+ c = *input_line_pointer++;
+
+ know (c != ' '); /* No further leading whitespace. */
#ifndef NO_LISTING
/* If listing is on, and we are expanding a macro, then give
@@ -664,18 +649,18 @@ read_a_source_file (name)
int len;
/* Find the end of the current expanded macro line. */
- for (s = input_line_pointer-1; *s ; ++s)
+ for (s = input_line_pointer - 1; *s; ++s)
if (is_end_of_line[(unsigned char) *s])
break;
/* 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);
+ 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';
+ 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);
@@ -684,37 +669,34 @@ read_a_source_file (name)
listing_newline (NULL);
}
#endif
-
- /*
- * C is the 1st significant character.
- * Input_line_pointer points after that character.
- */
+ /* C is the 1st significant character.
+ Input_line_pointer points after that character. */
if (is_name_beginner (c))
{
- /* want user-defined label or pseudo/opcode */
+ /* Want user-defined label or pseudo/opcode. */
HANDLE_CONDITIONAL_ASSEMBLY ();
s = --input_line_pointer;
- c = get_symbol_end (); /* name's delimiter */
- /*
- * C is character after symbol.
- * That character's place in the input line is now '\0'.
- * S points to the beginning of the symbol.
- * [In case of pseudo-op, s->'.'.]
- * Input_line_pointer->'\0' where c was.
- */
- if (TC_START_LABEL(c, input_line_pointer))
+ c = get_symbol_end (); /* name's delimiter. */
+
+ /* C is character after symbol.
+ That character's place in the input line is now '\0'.
+ S points to the beginning of the symbol.
+ [In case of pseudo-op, s->'.'.]
+ Input_line_pointer->'\0' where c was. */
+ if (TC_START_LABEL (c, input_line_pointer))
{
if (flag_m68k_mri)
{
char *rest = input_line_pointer + 1;
/* In MRI mode, \tsym: set 0 is permitted. */
-
if (*rest == ':')
++rest;
+
if (*rest == ' ' || *rest == '\t')
++rest;
+
if ((strncasecmp (rest, "EQU", 3) == 0
|| strncasecmp (rest, "SET", 3) == 0)
&& (rest[3] == ' ' || rest[3] == '\t'))
@@ -725,18 +707,17 @@ read_a_source_file (name)
}
}
- line_label = colon (s); /* user-defined label */
- *input_line_pointer++ = ':'; /* Put ':' back for error messages' sake. */
- /* Input_line_pointer->after ':'. */
+ line_label = colon (s); /* User-defined label. */
+ /* Put ':' back for error messages' sake. */
+ *input_line_pointer++ = ':';
+ /* Input_line_pointer->after ':'. */
SKIP_WHITESPACE ();
-
-
}
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, input_line_pointer)
#endif
))
{
@@ -744,13 +725,17 @@ read_a_source_file (name)
demand_empty_rest_of_line ();
}
else
- { /* expect pseudo-op or machine instruction */
+ {
+ /* Expect pseudo-op or machine instruction. */
pop = NULL;
-#define IGNORE_OPCODE_CASE
#ifdef IGNORE_OPCODE_CASE
{
char *s2 = s;
+
+ strncpy (original_case_string, s2, sizeof (original_case_string));
+ original_case_string[sizeof (original_case_string) - 1] = 0;
+
while (*s2)
{
if (isupper ((unsigned char) *s2))
@@ -759,7 +744,6 @@ read_a_source_file (name)
}
}
#endif
-
if (NO_PSEUDO_DOT || flag_m68k_mri)
{
/* The MRI assembler and the m88k use pseudo-ops
@@ -770,15 +754,13 @@ read_a_source_file (name)
}
if (pop != NULL
- || (! flag_m68k_mri && *s == '.'))
+ || (!flag_m68k_mri && *s == '.'))
{
- /*
- * PSEUDO - OP.
- *
- * WARNING: c has next char, which may be end-of-line.
- * We lookup the pseudo-op table with s+1 because we
- * already know that the pseudo-op begins with a '.'.
- */
+ /* PSEUDO - OP.
+
+ WARNING: c has next char, which may be end-of-line.
+ We lookup the pseudo-op table with s+1 because we
+ already know that the pseudo-op begins with a '.'. */
if (pop == NULL)
pop = (pseudo_typeS *) hash_find (po_hash, s + 1);
@@ -788,24 +770,25 @@ read_a_source_file (name)
this is. */
if (mri_pending_align
&& (pop == NULL
- || ! ((pop->poc_handler == cons
- && pop->poc_val == 1)
- || (pop->poc_handler == s_space
- && pop->poc_val == 1)
+ || !((pop->poc_handler == cons
+ && pop->poc_val == 1)
+ || (pop->poc_handler == s_space
+ && pop->poc_val == 1)
#ifdef tc_conditional_pseudoop
- || tc_conditional_pseudoop (pop)
+ || tc_conditional_pseudoop (pop)
#endif
- || pop->poc_handler == s_if
- || pop->poc_handler == s_ifdef
- || pop->poc_handler == s_ifc
- || pop->poc_handler == s_ifeqs
- || pop->poc_handler == s_else
- || pop->poc_handler == s_endif
- || pop->poc_handler == s_globl
- || pop->poc_handler == s_ignore)))
+ || pop->poc_handler == s_if
+ || pop->poc_handler == s_ifdef
+ || pop->poc_handler == s_ifc
+ || pop->poc_handler == s_ifeqs
+ || pop->poc_handler == s_else
+ || pop->poc_handler == s_endif
+ || pop->poc_handler == s_globl
+ || pop->poc_handler == s_ignore)))
{
do_align (1, (char *) NULL, 0, 0);
mri_pending_align = 0;
+
if (line_label != NULL)
{
symbol_set_frag (line_label, frag_now);
@@ -813,7 +796,7 @@ read_a_source_file (name)
}
}
- /* Print the error msg now, while we still can */
+ /* Print the error msg now, while we still can. */
if (pop == NULL)
{
as_bad (_("Unknown pseudo-op: `%s'"), s);
@@ -822,18 +805,17 @@ read_a_source_file (name)
continue;
}
- /* Put it back for error messages etc. */
+ /* Put it back for error messages etc. */
*input_line_pointer = c;
/* The following skip of whitespace is compulsory.
A well shaped space is sometimes all that separates
- keyword from operands. */
+ keyword from operands. */
if (c == ' ' || c == '\t')
input_line_pointer++;
- /*
- * Input_line is restored.
- * Input_line_pointer->1st non-blank char
- * after pseudo-operation.
- */
+
+ /* Input_line is restored.
+ Input_line_pointer->1st non-blank char
+ after pseudo-operation. */
(*pop->poc_handler) (pop->poc_val);
/* If that was .end, just get out now. */
@@ -847,8 +829,8 @@ read_a_source_file (name)
int inescape = 0;
#endif
- /* WARNING: c has char, which may be end-of-line. */
- /* Also: input_line_pointer->`\0` where c was. */
+ /* 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
@@ -858,12 +840,12 @@ read_a_source_file (name)
)
{
if (flag_m68k_mri && *input_line_pointer == '\'')
- inquote = ! inquote;
+ inquote = !inquote;
#ifdef QUOTES_IN_INSN
if (inescape)
inescape = 0;
else if (*input_line_pointer == '"')
- inquote = ! inquote;
+ inquote = !inquote;
else if (*input_line_pointer == '\\')
inescape = 1;
#endif
@@ -879,7 +861,7 @@ read_a_source_file (name)
{
sb out;
const char *err;
- macro_entry *macro;
+ macro_entry *macro;
if (check_macro (s, &out, '\0', &err, &macro))
{
@@ -892,7 +874,7 @@ read_a_source_file (name)
buffer_limit =
input_scrub_next_buffer (&input_line_pointer);
#ifdef md_macro_info
- md_macro_info (macro);
+ md_macro_info (macro);
#endif
continue;
}
@@ -909,17 +891,16 @@ read_a_source_file (name)
}
}
- md_assemble (s); /* Assemble 1 instruction. */
+ md_assemble (s); /* Assemble 1 instruction. */
*input_line_pointer++ = c;
/* We resume loop AFTER the end-of-line from
- this instruction. */
- } /* if (*s=='.') */
- } /* if c==':' */
+ this instruction. */
+ }
+ }
continue;
- } /* if (is_name_beginner(c) */
-
+ }
/* Empty statement? */
if (is_end_of_line[(unsigned char) c])
@@ -928,18 +909,19 @@ read_a_source_file (name)
if ((LOCAL_LABELS_DOLLAR || LOCAL_LABELS_FB)
&& isdigit ((unsigned char) c))
{
- /* local label ("4:") */
+ /* local label ("4:") */
char *backup = input_line_pointer;
HANDLE_CONDITIONAL_ASSEMBLY ();
temp = c - '0';
+ /* Read the whole number. */
while (isdigit ((unsigned char) *input_line_pointer))
{
temp = (temp * 10) + *input_line_pointer - '0';
++input_line_pointer;
- } /* read the whole number */
+ }
if (LOCAL_LABELS_DOLLAR
&& *input_line_pointer == '$'
@@ -969,7 +951,7 @@ read_a_source_file (name)
} /* local label ("4:") */
if (c && strchr (line_comment_chars, c))
- { /* Its a comment. Better say APP or NO_APP */
+ { /* Its a comment. Better say APP or NO_APP. */
char *ends;
char *new_buf;
char *new_tmp;
@@ -992,7 +974,7 @@ read_a_source_file (name)
/* The end of the #APP wasn't in this buffer. We
keep reading in buffers until we find the #NO_APP
that goes with this #APP There is one. The specs
- guarentee it. . . */
+ guarentee it... */
tmp_len = buffer_limit - s;
tmp_buf = xmalloc (tmp_len + 1);
memcpy (tmp_buf, s, tmp_len);
@@ -1060,6 +1042,7 @@ read_a_source_file (name)
buffer = new_buf;
input_line_pointer = new_buf;
buffer_limit = new_tmp;
+
continue;
}
@@ -1069,11 +1052,10 @@ read_a_source_file (name)
if (tc_unrecognized_line (c))
continue;
#endif
-
- /* as_warn("Junk character %d.",c); Now done by ignore_rest */
- input_line_pointer--; /* Report unknown char as ignored. */
+ /* as_warn (_("Junk character %d."),c); Now done by ignore_rest. */
+ input_line_pointer--; /* Report unknown char as ignored. */
ignore_rest_of_line ();
- } /* while (input_line_pointer<buffer_limit) */
+ }
#ifdef md_after_pass_hook
md_after_pass_hook ();
@@ -1092,14 +1074,22 @@ read_a_source_file (name)
goto contin;
}
}
- } /* while (more buffers to scan) */
+ }
quit:
#ifdef md_cleanup
- md_cleanup();
+ md_cleanup ();
+#endif
+ /* Close the input file. */
+ input_scrub_close ();
+#ifdef WARN_COMMENTS
+ {
+ if (warn_comment && found_comment)
+ as_warn_where (found_comment_file, found_comment,
+ "first comment found here");
+ }
#endif
- input_scrub_close (); /* Close the input file */
}
/* For most MRI pseudo-ops, the line actually ends at the first
@@ -1114,37 +1104,30 @@ char *
mri_comment_field (stopcp)
char *stopcp;
{
-#ifdef TC_M68K
-
char *s;
+#ifdef TC_M68K
int inquote = 0;
know (flag_m68k_mri);
for (s = input_line_pointer;
- ((! is_end_of_line[(unsigned char) *s] && *s != ' ' && *s != '\t')
+ ((!is_end_of_line[(unsigned char) *s] && *s != ' ' && *s != '\t')
|| inquote);
s++)
{
if (*s == '\'')
- inquote = ! inquote;
+ inquote = !inquote;
}
- *stopcp = *s;
- *s = '\0';
- return s;
-
#else
-
- char *s;
-
- for (s = input_line_pointer; ! is_end_of_line[(unsigned char) *s]; s++)
+ for (s = input_line_pointer;
+ !is_end_of_line[(unsigned char) *s];
+ s++)
;
+#endif
*stopcp = *s;
*s = '\0';
- return s;
-
-#endif
+ return s;
}
/* Skip to the end of an MRI comment field. */
@@ -1158,11 +1141,11 @@ mri_comment_end (stop, stopc)
input_line_pointer = stop;
*stop = stopc;
- while (! is_end_of_line[(unsigned char) *input_line_pointer])
+ while (!is_end_of_line[(unsigned char) *input_line_pointer])
++input_line_pointer;
}
-void
+void
s_abort (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -1175,33 +1158,28 @@ s_abort (ignore)
the maximum number of characters to skip when doing the alignment,
or 0 if there is no maximum. */
-static void
+static void
do_align (n, fill, len, max)
int n;
char *fill;
int len;
int max;
{
- char default_fill;
-
#ifdef md_do_align
md_do_align (n, fill, len, max, just_record_alignment);
#endif
- if (fill == NULL)
- {
- if (subseg_text_p (now_seg))
- default_fill = NOP_OPCODE;
- else
- default_fill = 0;
- fill = &default_fill;
- len = 1;
- }
-
- /* Only make a frag if we HAVE to. . . */
+ /* Only make a frag if we HAVE to... */
if (n != 0 && !need_pass_2)
{
- if (len <= 1)
+ if (fill == NULL)
+ {
+ if (subseg_text_p (now_seg))
+ frag_align_code (n, max);
+ else
+ frag_align (n, 0, max);
+ }
+ else if (len <= 1)
frag_align (n, *fill, max);
else
frag_align_pattern (n, fill, len, max);
@@ -1239,7 +1217,7 @@ s_align (arg, bytes_p)
if (arg < 0)
align = 0;
else
- align = arg; /* Default value from pseudo-op table */
+ align = arg; /* Default value from pseudo-op table. */
}
else
{
@@ -1258,6 +1236,7 @@ s_align (arg, bytes_p)
;
if (align != 1)
as_bad (_("Alignment not a power of 2"));
+
align = i;
}
}
@@ -1294,7 +1273,7 @@ s_align (arg, bytes_p)
}
}
- if (! fill_p)
+ if (!fill_p)
{
if (arg < 0)
as_warn (_("expected fill pattern missing"));
@@ -1307,7 +1286,7 @@ s_align (arg, bytes_p)
if (arg >= 0)
fill_len = 1;
else
- fill_len = - arg;
+ fill_len = -arg;
if (fill_len <= 1)
{
char fill_char;
@@ -1335,7 +1314,7 @@ s_align (arg, bytes_p)
/* Handle the .align pseudo-op on machines where ".align 4" means
align to a 4 byte boundary. */
-void
+void
s_align_bytes (arg)
int arg;
{
@@ -1345,14 +1324,14 @@ s_align_bytes (arg)
/* Handle the .align pseudo-op on machines where ".align 4" means align
to a 2**4 boundary. */
-void
+void
s_align_ptwo (arg)
int arg;
{
s_align (arg, 0);
}
-void
+void
s_comm (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -1369,10 +1348,11 @@ s_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;
SKIP_WHITESPACE ();
+
if (*input_line_pointer != ',')
{
as_bad (_("Expected comma after symbol-name: rest of line ignored."));
@@ -1381,7 +1361,9 @@ s_comm (ignore)
mri_comment_end (stop, stopc);
return;
}
+
input_line_pointer++; /* skip ',' */
+
if ((temp = get_absolute_expression ()) < 0)
{
as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
@@ -1390,10 +1372,12 @@ s_comm (ignore)
mri_comment_end (stop, stopc);
return;
}
+
*p = 0;
symbolP = symbol_find_or_make (name);
*p = c;
- if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
+
+ if (S_IS_DEFINED (symbolP) && !S_IS_COMMON (symbolP))
{
as_bad (_("Ignoring attempt to re-define symbol `%s'."),
S_GET_NAME (symbolP));
@@ -1402,6 +1386,7 @@ s_comm (ignore)
mri_comment_end (stop, stopc);
return;
}
+
if (S_GET_VALUE (symbolP))
{
if (S_GET_VALUE (symbolP) != (valueT) temp)
@@ -1418,7 +1403,7 @@ s_comm (ignore)
#ifdef OBJ_VMS
{
extern int flag_one;
- if ( (!temp) || !flag_one)
+ if (!temp || !flag_one)
S_GET_OTHER(symbolP) = const_flag;
}
#endif /* not OBJ_VMS */
@@ -1446,7 +1431,7 @@ s_mri_common (small)
char *stop = NULL;
char stopc;
- if (! flag_mri)
+ if (!flag_mri)
{
s_comm (0);
return;
@@ -1457,7 +1442,7 @@ s_mri_common (small)
SKIP_WHITESPACE ();
name = input_line_pointer;
- if (! isdigit ((unsigned char) *name))
+ if (!isdigit ((unsigned char) *name))
c = get_symbol_end ();
else
{
@@ -1466,6 +1451,7 @@ s_mri_common (small)
++input_line_pointer;
}
while (isdigit ((unsigned char) *input_line_pointer));
+
c = *input_line_pointer;
*input_line_pointer = '\0';
@@ -1492,7 +1478,7 @@ s_mri_common (small)
align = get_absolute_expression ();
}
- if (S_IS_DEFINED (sym) && ! S_IS_COMMON (sym))
+ if (S_IS_DEFINED (sym) && !S_IS_COMMON (sym))
{
as_bad (_("attempt to re-define symbol `%s'"), S_GET_NAME (sym));
ignore_rest_of_line ();
@@ -1564,21 +1550,21 @@ s_data (ignore)
definition for .file; the APPFILE argument is 1 for .appfile, 0 for
.file. */
-void
+void
s_app_file (appfile)
int appfile;
{
register char *s;
int length;
- /* Some assemblers tolerate immediately following '"' */
+ /* Some assemblers tolerate immediately following '"'. */
if ((s = demand_copy_string (&length)) != 0)
{
/* If this is a fake .appfile, a fake newline was inserted into
the buffer. Passing -2 to new_logical_line tells it to
account for it. */
int may_omit
- = (! new_logical_line (s, appfile ? -2 : -1) && appfile);
+ = (!new_logical_line (s, appfile ? -2 : -1) && appfile);
/* In MRI mode, the preprocessor may have inserted an extraneous
backquote. */
@@ -1588,7 +1574,7 @@ s_app_file (appfile)
++input_line_pointer;
demand_empty_rest_of_line ();
- if (! may_omit)
+ if (!may_omit)
{
#ifdef LISTING
if (listing)
@@ -1618,7 +1604,8 @@ s_app_line (ignore)
if (l < 0)
/* Some of the back ends can't deal with non-positive line numbers.
Besides, it's silly. */
- as_warn (_("Line numbers must be positive; line number %d rejected."), l+1);
+ as_warn (_("Line numbers must be positive; line number %d rejected."),
+ l + 1);
else
{
new_logical_line ((char *) NULL, l);
@@ -1642,7 +1629,7 @@ s_end (ignore)
/* The MRI assembler permits the start symbol to follow .end,
but we don't support that. */
SKIP_WHITESPACE ();
- if (! is_end_of_line[(unsigned char) *input_line_pointer]
+ if (!is_end_of_line[(unsigned char) *input_line_pointer]
&& *input_line_pointer != '*'
&& *input_line_pointer != '!')
as_warn (_("start address not supported"));
@@ -1684,7 +1671,7 @@ s_fail (ignore)
mri_comment_end (stop, stopc);
}
-void
+void
s_fill (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -1762,26 +1749,28 @@ s_fill (ignore)
p = frag_var (rs_space, (int) size, (int) size,
(relax_substateT) 0, rep_sym, (offsetT) 0, (char *) 0);
}
+
memset (p, 0, (unsigned int) size);
+
/* The magic number BSD_FILL_SIZE_CROCK_4 is from BSD 4.2 VAX
- * flavoured AS. The following bizzare behaviour is to be
- * compatible with above. I guess they tried to take up to 8
- * bytes from a 4-byte expression and they forgot to sign
- * extend. Un*x Sux. */
+ flavoured AS. The following bizzare behaviour is to be
+ compatible with above. I guess they tried to take up to 8
+ bytes from a 4-byte expression and they forgot to sign
+ extend. Un*x Sux. */
#define BSD_FILL_SIZE_CROCK_4 (4)
md_number_to_chars (p, (valueT) fill,
(size > BSD_FILL_SIZE_CROCK_4
? BSD_FILL_SIZE_CROCK_4
: (int) size));
/* Note: .fill (),0 emits no frag (since we are asked to .fill 0 bytes)
- * but emits no error message because it seems a legal thing to do.
- * It is a degenerate case of .fill but could be emitted by a compiler.
- */
+ but emits no error message because it seems a legal thing to do.
+ It is a degenerate case of .fill but could be emitted by a
+ compiler. */
}
demand_empty_rest_of_line ();
}
-void
+void
s_globl (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -1835,7 +1824,7 @@ s_irp (irpc)
as_where (&file, &line);
sb_new (&s);
- while (! is_end_of_line[(unsigned char) *input_line_pointer])
+ while (!is_end_of_line[(unsigned char) *input_line_pointer])
sb_add_char (&s, *input_line_pointer++);
sb_new (&out);
@@ -1866,7 +1855,7 @@ s_linkonce (ignore)
type = LINKONCE_DISCARD;
- if (! is_end_of_line[(unsigned char) *input_line_pointer])
+ if (!is_end_of_line[(unsigned char) *input_line_pointer])
{
char *s;
char c;
@@ -1916,7 +1905,7 @@ s_linkonce (ignore)
flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS;
break;
}
- if (! bfd_set_section_flags (stdoutput, now_seg, flags))
+ if (!bfd_set_section_flags (stdoutput, now_seg, flags))
as_bad (_("bfd_set_section_flags: %s"),
bfd_errmsg (bfd_get_error ()));
}
@@ -1928,13 +1917,13 @@ s_linkonce (ignore)
demand_empty_rest_of_line ();
}
-static void
+static void
s_lcomm_internal (needs_align, bytes_p)
/* 1 if this was a ".bss" directive, which may require a 3rd argument
- (alignment); 0 if it was an ".lcomm" (2 args only) */
+ (alignment); 0 if it was an ".lcomm" (2 args only). */
int needs_align;
/* 1 if the alignment value should be interpreted as the byte boundary,
- rather than the power of 2. */
+ rather than the power of 2. */
int bytes_p;
{
register char *name;
@@ -1985,7 +1974,7 @@ s_lcomm_internal (needs_align, bytes_p)
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))
+ if (!bfd_set_section_flags (stdoutput, bss_seg, SEC_ALLOC))
as_warn (_("error setting flags for \".sbss\": %s"),
bfd_errmsg (bfd_get_error ()));
#endif
@@ -1993,33 +1982,38 @@ s_lcomm_internal (needs_align, bytes_p)
}
#endif
- if (!needs_align)
- {
- TC_IMPLICIT_LCOMM_ALIGNMENT (temp, align);
+ if (!needs_align)
+ {
+ TC_IMPLICIT_LCOMM_ALIGNMENT (temp, align);
- /* Still zero unless TC_IMPLICIT_LCOMM_ALIGNMENT set it. */
- if (align)
- record_alignment(bss_seg, align);
- }
+ /* Still zero unless TC_IMPLICIT_LCOMM_ALIGNMENT set it. */
+ if (align)
+ record_alignment (bss_seg, align);
+ }
if (needs_align)
{
align = 0;
SKIP_WHITESPACE ();
+
if (*input_line_pointer != ',')
{
as_bad (_("Expected comma after size"));
ignore_rest_of_line ();
return;
}
+
input_line_pointer++;
SKIP_WHITESPACE ();
+
if (*input_line_pointer == '\n')
{
as_bad (_("Missing alignment"));
return;
}
+
align = get_absolute_expression ();
+
if (bytes_p)
{
/* Convert to a power of 2. */
@@ -2034,6 +2028,7 @@ s_lcomm_internal (needs_align, bytes_p)
align = i;
}
}
+
if (align > max_alignment)
{
align = max_alignment;
@@ -2044,8 +2039,9 @@ s_lcomm_internal (needs_align, bytes_p)
align = 0;
as_warn (_("Alignment negative. 0 assumed."));
}
+
record_alignment (bss_seg, align);
- } /* if needs align */
+ }
else
{
/* Assume some objects may require alignment on some systems. */
@@ -2082,12 +2078,13 @@ s_lcomm_internal (needs_align, bytes_p)
if (align)
frag_align (align, 0, 0);
- /* detach from old frag */
+
+ /* Detach from old frag. */
if (S_GET_SEGMENT (symbolP) == bss_seg)
symbol_get_frag (symbolP)->fr_symbol = NULL;
symbol_set_frag (symbolP, frag_now);
- pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP,
+ pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
(offsetT) temp, (char *) 0);
*pfrag = 0;
@@ -2096,7 +2093,7 @@ s_lcomm_internal (needs_align, bytes_p)
#ifdef OBJ_COFF
/* The symbol may already have been created with a preceding
".globl" directive -- be careful not to step on storage class
- in that case. Otherwise, set it to static. */
+ in that case. Otherwise, set it to static. */
if (S_GET_STORAGE_CLASS (symbolP) != C_EXT)
{
S_SET_STORAGE_CLASS (symbolP, C_STAT);
@@ -2114,7 +2111,7 @@ s_lcomm_internal (needs_align, bytes_p)
subseg_set (current_seg, current_subseg);
demand_empty_rest_of_line ();
-} /* s_lcomm_internal() */
+}
void
s_lcomm (needs_align)
@@ -2123,13 +2120,14 @@ s_lcomm (needs_align)
s_lcomm_internal (needs_align, 0);
}
-void s_lcomm_bytes (needs_align)
+void
+s_lcomm_bytes (needs_align)
int needs_align;
{
s_lcomm_internal (needs_align, 1);
}
-void
+void
s_lsym (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -2139,12 +2137,13 @@ s_lsym (ignore)
expressionS exp;
register symbolS *symbolP;
- /* we permit ANY defined expression: BSD4.2 demands constants */
+ /* We permit ANY defined expression: BSD4.2 demands constants. */
name = input_line_pointer;
c = get_symbol_end ();
p = input_line_pointer;
*p = c;
SKIP_WHITESPACE ();
+
if (*input_line_pointer != ',')
{
*p = 0;
@@ -2153,8 +2152,10 @@ s_lsym (ignore)
ignore_rest_of_line ();
return;
}
+
input_line_pointer++;
expression (&exp);
+
if (exp.X_op != O_constant
&& exp.X_op != O_register)
{
@@ -2162,6 +2163,7 @@ s_lsym (ignore)
ignore_rest_of_line ();
return;
}
+
*p = 0;
symbolP = symbol_find_or_make (name);
@@ -2170,13 +2172,13 @@ s_lsym (ignore)
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. */
+ anyway. xoxorich. */
if (S_GET_SEGMENT (symbolP) == undefined_section
&& S_GET_VALUE (symbolP) == 0)
{
/* The name might be an undefined .global symbol; be sure to
- keep the "external" bit. */
+ keep the "external" bit. */
S_SET_SEGMENT (symbolP,
(exp.X_op == O_constant
? absolute_section
@@ -2187,9 +2189,10 @@ s_lsym (ignore)
{
as_bad (_("Symbol %s already defined"), name);
}
+
*p = c;
demand_empty_rest_of_line ();
-} /* s_lsym() */
+}
/* Read a line into an sb. */
@@ -2211,7 +2214,7 @@ get_line_sb (line)
/* If app.c sets any other characters to LEX_IS_STRINGQUOTE, this
code needs to be changed. */
- if (! flag_m68k_mri)
+ if (!flag_m68k_mri)
quote1 = '"';
else
quote1 = '\0';
@@ -2224,7 +2227,8 @@ get_line_sb (line)
#endif
inquote = '\0';
- while (! is_end_of_line[(unsigned char) *input_line_pointer]
+
+ while (!is_end_of_line[(unsigned char) *input_line_pointer]
|| (inquote != '\0' && *input_line_pointer != '\n'))
{
if (inquote == *input_line_pointer)
@@ -2236,8 +2240,10 @@ get_line_sb (line)
else if (*input_line_pointer == quote2)
inquote = quote2;
}
+
sb_add_char (line, *input_line_pointer++);
}
+
while (input_line_pointer < buffer_limit
&& is_end_of_line[(unsigned char) *input_line_pointer])
{
@@ -2245,6 +2251,7 @@ get_line_sb (line)
bump_line_counters ();
++input_line_pointer;
}
+
return 1;
}
@@ -2265,7 +2272,7 @@ s_macro (ignore)
as_where (&file, &line);
sb_new (&s);
- while (! is_end_of_line[(unsigned char) *input_line_pointer])
+ while (!is_end_of_line[(unsigned char) *input_line_pointer])
sb_add_char (&s, *input_line_pointer++);
sb_new (&label);
@@ -2286,7 +2293,7 @@ s_macro (ignore)
if (((NO_PSEUDO_DOT || flag_m68k_mri)
&& hash_find (po_hash, name) != NULL)
- || (! flag_m68k_mri
+ || (!flag_m68k_mri
&& *name == '.'
&& hash_find (po_hash, name + 1) != NULL))
as_warn (_("attempt to redefine pseudo-op `%s' ignored"),
@@ -2372,14 +2379,22 @@ do_org (segment, exp, fill)
else
{
char *p;
+ symbolS *sym = exp->X_add_symbol;
+ offsetT off = exp->X_add_number * OCTETS_PER_BYTE;
+
+ if (exp->X_op != O_constant && exp->X_op != O_symbol)
+ {
+ /* Handle complex expressions. */
+ sym = make_expr_symbol (exp);
+ off = 0;
+ }
- p = frag_var (rs_org, 1, 1, (relax_substateT) 0, exp->X_add_symbol,
- exp->X_add_number * OCTETS_PER_BYTE, (char *) NULL);
+ p = frag_var (rs_org, 1, 1, (relax_substateT) 0, sym, off, (char *) 0);
*p = fill;
}
}
-void
+void
s_org (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -2426,7 +2441,7 @@ s_org (ignore)
do_org (segment, &exp, temp_fill);
demand_empty_rest_of_line ();
-} /* s_org() */
+}
/* Handle parsing for the MRI SECT/SECTION pseudo-op. This should be
called by the obj-format routine which handles section changing
@@ -2446,9 +2461,9 @@ s_mri_sect (type)
segT seg;
SKIP_WHITESPACE ();
-
+
name = input_line_pointer;
- if (! isdigit ((unsigned char) *name))
+ if (!isdigit ((unsigned char) *name))
c = get_symbol_end ();
else
{
@@ -2457,6 +2472,7 @@ s_mri_sect (type)
++input_line_pointer;
}
while (isdigit ((unsigned char) *input_line_pointer));
+
c = *input_line_pointer;
*input_line_pointer = '\0';
}
@@ -2500,7 +2516,7 @@ s_mri_sect (type)
flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_READONLY | SEC_ROM;
if (flags != SEC_NO_FLAGS)
{
- if (! bfd_set_section_flags (stdoutput, seg, flags))
+ if (!bfd_set_section_flags (stdoutput, seg, flags))
as_warn (_("error setting flags for \"%s\": %s"),
bfd_section_name (stdoutput, seg),
bfd_errmsg (bfd_get_error ()));
@@ -2586,7 +2602,7 @@ s_mri_sect (type)
}
}
- demand_empty_rest_of_line ();
+ demand_empty_rest_of_line ();
#else /* ! TC_I960 */
/* The MRI assembler seems to use different forms of .sect for
@@ -2651,23 +2667,23 @@ s_rept (ignore)
count = get_absolute_expression ();
- do_repeat(count, "REPT", "ENDR");
+ do_repeat (count, "REPT", "ENDR");
}
/* This function provides a generic repeat block implementation. It allows
- different directives to be used as the start/end keys. */
+ different directives to be used as the start/end keys. */
void
do_repeat (count, start, end)
- int count;
- const char *start;
- const char *end;
+ int count;
+ const char *start;
+ const char *end;
{
sb one;
sb many;
sb_new (&one);
- if (! buffer_and_nest (start, end, &one, get_line_sb))
+ if (!buffer_and_nest (start, end, &one, get_line_sb))
{
as_bad (_("%s without %s"), start, end);
return;
@@ -2686,15 +2702,15 @@ do_repeat (count, start, end)
/* Skip to end of current repeat loop; EXTRA indicates how many additional
input buffers to skip. Assumes that conditionals preceding the loop end
- are properly nested.
+ are properly nested.
This function makes it easier to implement a premature "break" out of the
loop. The EXTRA arg accounts for other buffers we might have inserted,
- such as line substitutions. */
+ such as line substitutions. */
void
end_repeat (extra)
- int extra;
+ int extra;
{
cond_exit_macro (macro_nest);
while (extra-- >= 0)
@@ -2705,7 +2721,7 @@ end_repeat (extra)
this is .equiv, and it is an error if the symbol is already
defined. */
-void
+void
s_set (equiv)
int equiv;
{
@@ -2714,11 +2730,9 @@ s_set (equiv)
register char *end_name;
register symbolS *symbolP;
- /*
- * Especial apologies for the random logic:
- * this just grew, and could be parsed much more simply!
- * Dean in haste.
- */
+ /* Especial apologies for the random logic:
+ this just grew, and could be parsed much more simply!
+ Dean in haste. */
name = input_line_pointer;
delim = get_symbol_end ();
end_name = input_line_pointer;
@@ -2739,7 +2753,7 @@ s_set (equiv)
if (name[0] == '.' && name[1] == '\0')
{
- /* Turn '. = mumble' into a .org mumble */
+ /* Turn '. = mumble' into a .org mumble. */
register segT segment;
expressionS exp;
@@ -2762,8 +2776,8 @@ s_set (equiv)
if (listing & LISTING_SYMBOLS)
{
extern struct list_info_struct *listing_tail;
- fragS *dummy_frag = (fragS *) xmalloc (sizeof(fragS));
- memset (dummy_frag, 0, sizeof(fragS));
+ fragS *dummy_frag = (fragS *) xmalloc (sizeof (fragS));
+ memset (dummy_frag, 0, sizeof (fragS));
dummy_frag->fr_type = rs_fill;
dummy_frag->line = listing_tail;
symbolP = symbol_new (name, undefined_section, 0, dummy_frag);
@@ -2771,14 +2785,13 @@ s_set (equiv)
}
else
#endif
- symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
-
+ symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+
#ifdef OBJ_COFF
- /* "set" symbols are local unless otherwise specified. */
+ /* "set" symbols are local unless otherwise specified. */
SF_SET_LOCAL (symbolP);
#endif /* OBJ_COFF */
-
- } /* make a new symbol */
+ }
symbol_table_insert (symbolP);
@@ -2791,9 +2804,9 @@ s_set (equiv)
pseudo_set (symbolP);
demand_empty_rest_of_line ();
-} /* s_set() */
+}
-void
+void
s_space (mult)
int mult;
{
@@ -2897,7 +2910,7 @@ s_space (mult)
bytes = repeat;
if (repeat <= 0)
{
- if (! flag_mri)
+ if (!flag_mri)
as_warn (_(".space repeat count is zero, ignored"));
else if (repeat < 0)
as_warn (_(".space repeat count is negative, ignored"));
@@ -2932,11 +2945,13 @@ s_space (mult)
as_bad (_("space allocation too complex in absolute section"));
subseg_set (text_section, 0);
}
+
if (mri_common_symbol != NULL)
{
as_bad (_("space allocation too complex in common section"));
mri_common_symbol = NULL;
}
+
if (!need_pass_2)
p = frag_var (rs_space, 1, 1, (relax_substateT) 0,
make_expr_symbol (&exp), (offsetT) 0, (char *) 0);
@@ -3073,27 +3088,24 @@ s_text (ignore)
#ifdef OBJ_VMS
const_flag &= ~IN_DEFAULT_SECTION;
#endif
-} /* s_text() */
+}
-
-void
+void
demand_empty_rest_of_line ()
{
SKIP_WHITESPACE ();
if (is_end_of_line[(unsigned char) *input_line_pointer])
- {
- input_line_pointer++;
- }
+ input_line_pointer++;
else
- {
- ignore_rest_of_line ();
- }
- /* Return having already swallowed end-of-line. */
-} /* Return pointing just after end-of-line. */
+ ignore_rest_of_line ();
+
+ /* Return having already swallowed end-of-line. */
+}
void
-ignore_rest_of_line () /* For suspect lines: gives warning. */
+ignore_rest_of_line ()
{
+ /* For suspect lines: gives warning. */
if (!is_end_of_line[(unsigned char) *input_line_pointer])
{
if (isprint ((unsigned char) *input_line_pointer))
@@ -3102,13 +3114,15 @@ ignore_rest_of_line () /* For suspect lines: gives warning. */
else
as_bad (_("Rest of line ignored. First ignored character valued 0x%x."),
*input_line_pointer);
+
while (input_line_pointer < buffer_limit
&& !is_end_of_line[(unsigned char) *input_line_pointer])
- {
- input_line_pointer++;
- }
+ input_line_pointer++;
}
- input_line_pointer++; /* Return pointing just after end-of-line. */
+
+ input_line_pointer++;
+
+ /* Return pointing just after end-of-line. */
know (is_end_of_line[(unsigned char) input_line_pointer[-1]]);
}
@@ -3116,24 +3130,22 @@ void
discard_rest_of_line ()
{
while (input_line_pointer < buffer_limit
- && !is_end_of_line[(unsigned char) *input_line_pointer])
- {
- input_line_pointer++;
- }
- input_line_pointer++; /* Return pointing just after end-of-line. */
+ && !is_end_of_line[(unsigned char) *input_line_pointer])
+ input_line_pointer++;
+
+ input_line_pointer++;
+
+ /* Return pointing just after end-of-line. */
know (is_end_of_line[(unsigned char) input_line_pointer[-1]]);
}
-/*
- * pseudo_set()
- *
- * In: Pointer to a symbol.
- * Input_line_pointer->expression.
- *
- * Out: Input_line_pointer->just after any whitespace after expression.
- * Tried to set symbol to value of expression.
- * Will change symbols type, value, and frag;
- */
+/* In: Pointer to a symbol.
+ Input_line_pointer->expression.
+
+ Out: Input_line_pointer->just after any whitespace after expression.
+ Tried to set symbol to value of expression.
+ Will change symbols type, value, and frag; */
+
void
pseudo_set (symbolP)
symbolS *symbolP;
@@ -3143,7 +3155,7 @@ pseudo_set (symbolP)
int ext;
#endif /* OBJ_AOUT or OBJ_BOUT */
- know (symbolP); /* NULL pointer is logic error. */
+ 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 */
@@ -3190,7 +3202,7 @@ pseudo_set (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);
+ symbol_set_frag (symbolP, &zero_address_frag);
break;
case O_register:
@@ -3231,20 +3243,18 @@ pseudo_set (symbolP)
}
}
-/*
- * cons()
- *
- * CONStruct more frag of .bytes, or .words etc.
- * Should need_pass_2 be 1 then emit no frag(s).
- * This understands EXPRESSIONS.
- *
- * Bug (?)
- *
- * This has a split personality. We use expression() to read the
- * value. We can detect if the value won't fit in a byte or word.
- * But we can't detect if expression() discarded significant digits
- * in the case of a long. Not worth the crocks required to fix it.
- */
+/* cons()
+
+ CONStruct more frag of .bytes, or .words etc.
+ Should need_pass_2 be 1 then emit no frag(s).
+ This understands EXPRESSIONS.
+
+ Bug (?)
+
+ This has a split personality. We use expression() to read the
+ value. We can detect if the value won't fit in a byte or word.
+ But we can't detect if expression() discarded significant digits
+ in the case of a long. Not worth the crocks required to fix it. */
/* Select a parser for cons expressions. */
@@ -3264,7 +3274,7 @@ parse_mri_cons PARAMS ((expressionS *exp, unsigned int nbytes));
#ifndef TC_PARSE_CONS_EXPRESSION
#ifdef BITFIELD_CONS_EXPRESSIONS
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_bitfield_cons (EXP, NBYTES)
-static void
+static void
parse_bitfield_cons PARAMS ((expressionS *exp, unsigned int nbytes));
#endif
#ifdef REPEAT_CONS_EXPRESSIONS
@@ -3279,12 +3289,12 @@ parse_repeat_cons PARAMS ((expressionS *exp, unsigned int nbytes));
#endif
#endif
-/* worker to do .byte etc statements */
-/* clobbers input_line_pointer, checks */
-/* end-of-line. */
-static void
+/* Worker to do .byte etc statements.
+ Clobbers input_line_pointer and checks end-of-line. */
+
+static void
cons_worker (nbytes, rva)
- register int nbytes; /* 1=.byte, 2=.word, 4=.long */
+ register int nbytes; /* 1=.byte, 2=.word, 4=.long. */
int rva;
{
int c;
@@ -3339,7 +3349,7 @@ cons_worker (nbytes, rva)
if (flag_mri && nbytes == 1 && (c & 1) != 0)
mri_pending_align = 1;
- input_line_pointer--; /* Put terminator back into stream. */
+ input_line_pointer--; /* Put terminator back into stream. */
demand_empty_rest_of_line ();
@@ -3347,7 +3357,6 @@ cons_worker (nbytes, rva)
mri_comment_end (stop, stopc);
}
-
void
cons (size)
int size;
@@ -3355,7 +3364,7 @@ cons (size)
cons_worker (size, 0);
}
-void
+void
s_rva (size)
int size;
{
@@ -3473,7 +3482,7 @@ emit_expr (exp, nbytes)
{
unsigned long next;
- next = (((~ (generic_bignum[i] & LITTLENUM_MASK))
+ next = (((~(generic_bignum[i] & LITTLENUM_MASK))
& LITTLENUM_MASK)
+ carry);
generic_bignum[i] = next & LITTLENUM_MASK;
@@ -3538,7 +3547,7 @@ emit_expr (exp, nbytes)
valueT val;
int gencnt;
- if (! exp->X_unsigned && exp->X_add_number < 0)
+ if (!exp->X_unsigned && exp->X_add_number < 0)
extra_digit = (valueT) -1;
val = (valueT) exp->X_add_number;
gencnt = 0;
@@ -3562,7 +3571,7 @@ emit_expr (exp, nbytes)
register valueT unmask;
/* JF << of >= number of bits in the object is undefined. In
- particular SPARC (Sun 4) has problems */
+ particular SPARC (Sun 4) has problems. */
if (nbytes >= sizeof (valueT))
{
mask = 0;
@@ -3573,16 +3582,16 @@ emit_expr (exp, nbytes)
}
else
{
- /* Don't store these bits. */
+ /* Don't store these bits. */
mask = ~(valueT) 0 << (BITS_PER_CHAR * nbytes);
hibit = (valueT) 1 << (nbytes * BITS_PER_CHAR - 1);
}
- unmask = ~mask; /* Do store these bits. */
+ unmask = ~mask; /* Do store these bits. */
#ifdef NEVER
"Do this mod if you want every overflow check to assume SIGNED 2's complement data.";
- mask = ~(unmask >> 1); /* Includes sign bit now. */
+ mask = ~(unmask >> 1); /* Includes sign bit now. */
#endif
get = exp->X_add_number;
@@ -3590,11 +3599,11 @@ emit_expr (exp, nbytes)
if ((get & mask) != 0
&& ((get & mask) != mask
|| (get & hibit) == 0))
- { /* Leading bits contain both 0s & 1s. */
+ { /* Leading bits contain both 0s & 1s. */
as_warn (_("Value 0x%lx truncated to 0x%lx."),
(unsigned long) get, (unsigned long) use);
}
- /* put bytes in right order. */
+ /* Put bytes in right order. */
md_number_to_chars (p, use, (int) nbytes);
}
else if (op == O_big)
@@ -3729,7 +3738,7 @@ emit_expr (exp, nbytes)
To use this function the tc-XXX.h file should define
BITFIELD_CONS_EXPRESSIONS. */
-static void
+static void
parse_bitfield_cons (exp, nbytes)
expressionS *exp;
unsigned int nbytes;
@@ -3740,7 +3749,8 @@ parse_bitfield_cons (exp, nbytes)
(void) expression (exp);
if (*input_line_pointer == ':')
- { /* bitfields */
+ {
+ /* Bitfields. */
long value = 0;
for (;;)
@@ -3751,7 +3761,7 @@ parse_bitfield_cons (exp, nbytes)
{
input_line_pointer = hold;
break;
- } /* next piece is not a bitfield */
+ } /* Next piece is not a bitfield. */
/* In the general case, we can't allow
full expressions with symbol
@@ -3769,14 +3779,14 @@ parse_bitfield_cons (exp, nbytes)
backends. I'm lazy. I'll take any
SEG_ABSOLUTE. I think that means that
you can use a previous .set or
- .equ type symbol. xoxorich. */
+ .equ type symbol. xoxorich. */
if (exp->X_op == O_absent)
{
as_warn (_("using a bit field width of zero"));
exp->X_add_number = 0;
exp->X_op = O_constant;
- } /* implied zero width bitfield */
+ } /* Implied zero width bitfield. */
if (exp->X_op != O_constant)
{
@@ -3785,14 +3795,14 @@ parse_bitfield_cons (exp, nbytes)
*input_line_pointer = ':';
demand_empty_rest_of_line ();
return;
- } /* too complex */
+ } /* Too complex. */
if ((width = exp->X_add_number) > (BITS_PER_CHAR * nbytes))
{
as_warn (_("field width %lu too big to fit in %d bytes: truncated to %d bits"),
width, nbytes, (BITS_PER_CHAR * nbytes));
width = BITS_PER_CHAR * nbytes;
- } /* too big */
+ } /* Too big. */
if (width > bits_available)
{
@@ -3800,9 +3810,10 @@ parse_bitfield_cons (exp, nbytes)
input_line_pointer = hold;
exp->X_add_number = value;
break;
- } /* won't fit */
+ } /* Won't fit. */
- hold = ++input_line_pointer; /* skip ':' */
+ /* Skip ':'. */
+ hold = ++input_line_pointer;
(void) expression (exp);
if (exp->X_op != O_constant)
@@ -3814,7 +3825,7 @@ parse_bitfield_cons (exp, nbytes)
*input_line_pointer = cache;
demand_empty_rest_of_line ();
return;
- } /* too complex */
+ } /* Too complex. */
value |= ((~(-1 << width) & exp->X_add_number)
<< ((BITS_PER_CHAR * nbytes) - bits_available));
@@ -3824,17 +3835,17 @@ parse_bitfield_cons (exp, nbytes)
|| *input_line_pointer != ',')
{
break;
- } /* all the bitfields we're gonna get */
+ } /* All the bitfields we're gonna get. */
hold = ++input_line_pointer;
(void) expression (exp);
- } /* forever loop */
+ }
exp->X_add_number = value;
exp->X_op = O_constant;
exp->X_unsigned = 1;
- } /* if looks like a bitfield */
-} /* parse_bitfield_cons() */
+ }
+}
#endif /* BITFIELD_CONS_EXPRESSIONS */
@@ -3882,16 +3893,18 @@ parse_mri_cons (exp, nbytes)
result = (result << 8) | (*input_line_pointer++);
}
- /* Left justify */
+ /* Left justify. */
while (scan < nbytes)
{
result <<= 8;
scan++;
}
- /* Create correct expression */
+
+ /* Create correct expression. */
exp->X_op = O_constant;
exp->X_add_number = result;
- /* Fake it so that we can read the next char too */
+
+ /* Fake it so that we can read the next char too. */
if (input_line_pointer[0] != '\'' ||
(input_line_pointer[0] == '\'' && input_line_pointer[1] == '\''))
{
@@ -3998,7 +4011,7 @@ hex_float (float_type, bytes)
int d;
/* The MRI assembler accepts arbitrary underscores strewn about
- through the hex constant, so we ignore them as well. */
+ through the hex constant, so we ignore them as well. */
if (*input_line_pointer == '_')
{
++input_line_pointer;
@@ -4037,34 +4050,31 @@ hex_float (float_type, bytes)
return length;
}
-/*
- * float_cons()
- *
- * CONStruct some more frag chars of .floats .ffloats etc.
- * Makes 0 or more new frags.
- * If need_pass_2 == 1, no frags are emitted.
- * This understands only floating literals, not expressions. Sorry.
- *
- * A floating constant is defined by atof_generic(), except it is preceded
- * by 0d 0f 0g or 0h. After observing the STRANGE way my BSD AS does its
- * reading, I decided to be incompatible. This always tries to give you
- * rounded bits to the precision of the pseudo-op. Former AS did premature
- * truncatation, restored noisy bits instead of trailing 0s AND gave you
- * a choice of 2 flavours of noise according to which of 2 floating-point
- * scanners you directed AS to use.
- *
- * In: input_line_pointer->whitespace before, or '0' of flonum.
- *
- */
+/* float_cons()
+
+ CONStruct some more frag chars of .floats .ffloats etc.
+ Makes 0 or more new frags.
+ If need_pass_2 == 1, no frags are emitted.
+ This understands only floating literals, not expressions. Sorry.
+
+ A floating constant is defined by atof_generic(), except it is preceded
+ by 0d 0f 0g or 0h. After observing the STRANGE way my BSD AS does its
+ reading, I decided to be incompatible. This always tries to give you
+ rounded bits to the precision of the pseudo-op. Former AS did premature
+ truncatation, restored noisy bits instead of trailing 0s AND gave you
+ a choice of 2 flavours of noise according to which of 2 floating-point
+ scanners you directed AS to use.
+
+ In: input_line_pointer->whitespace before, or '0' of flonum. */
void
float_cons (float_type)
- /* Clobbers input_line-pointer, checks end-of-line. */
- register int float_type; /* 'f':.ffloat ... 'F':.float ... */
+ /* Clobbers input_line-pointer, checks end-of-line. */
+ register int float_type; /* 'f':.ffloat ... 'F':.float ... */
{
register char *p;
- int length; /* Number of chars in an object. */
- register char *err; /* Error from scanning floating literal. */
+ int length; /* Number of chars in an object. */
+ register char *err; /* Error from scanning floating literal. */
char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT];
if (is_it_end_of_statement ())
@@ -4079,14 +4089,13 @@ float_cons (float_type)
do
{
- /* input_line_pointer->1st char of a flonum (we hope!). */
+ /* input_line_pointer->1st char of a flonum (we hope!). */
SKIP_WHITESPACE ();
/* Skip any 0{letter} that may be present. Don't even check if the
- * letter is legal. Someone may invent a "z" format and this routine
- * has no use for such information. Lusers beware: you get
- * diagnostics if your input is ill-conditioned.
- */
+ letter is legal. Someone may invent a "z" format and this routine
+ has no use for such information. Lusers beware: you get
+ diagnostics if your input is ill-conditioned. */
if (input_line_pointer[0] == '0'
&& isalpha ((unsigned char) input_line_pointer[1]))
input_line_pointer += 2;
@@ -4129,11 +4138,10 @@ float_cons (float_type)
++input_line_pointer;
expression (&count_exp);
+
if (count_exp.X_op != O_constant
|| count_exp.X_add_number <= 0)
- {
- as_warn (_("unresolvable or nonpositive repeat count; using 1"));
- }
+ as_warn (_("unresolvable or nonpositive repeat count; using 1"));
else
count = count_exp.X_add_number;
}
@@ -4149,11 +4157,12 @@ float_cons (float_type)
}
while (*input_line_pointer++ == ',');
- --input_line_pointer; /* Put terminator back into stream. */
+ /* Put terminator back into stream. */
+ --input_line_pointer;
demand_empty_rest_of_line ();
-} /* float_cons() */
+}
-/* Return the size of a LEB128 value */
+/* Return the size of a LEB128 value. */
static inline int
sizeof_sleb128 (value)
@@ -4287,7 +4296,7 @@ output_big_sleb128 (p, bignum, size)
unsigned byte;
/* Strip leading sign extensions off the bignum. */
- while (size > 0 && bignum[size-1] == (LITTLENUM_TYPE)-1)
+ while (size > 0 && bignum[size - 1] == (LITTLENUM_TYPE) -1)
size--;
do
@@ -4307,7 +4316,7 @@ output_big_sleb128 (p, bignum, size)
if (size == 0)
{
if ((val == 0 && (byte & 0x40) == 0)
- || (~(val | ~(((valueT)1 << loaded) - 1)) == 0
+ || (~(val | ~(((valueT) 1 << loaded) - 1)) == 0
&& (byte & 0x40) != 0))
byte |= 0x80;
}
@@ -4334,7 +4343,7 @@ output_big_uleb128 (p, bignum, size)
/* Strip leading zeros off the bignum. */
/* XXX: Is this needed? */
- while (size > 0 && bignum[size-1] == 0)
+ while (size > 0 && bignum[size - 1] == 0)
size--;
do
@@ -4379,11 +4388,12 @@ output_big_leb128 (p, bignum, size, sign)
leb128 value. */
void
-emit_leb128_expr(exp, sign)
+emit_leb128_expr (exp, sign)
expressionS *exp;
int sign;
{
operatorT op = exp->X_op;
+ int nbytes;
if (op == O_absent || op == O_illegal)
{
@@ -4403,6 +4413,17 @@ emit_leb128_expr(exp, sign)
op = O_constant;
}
+ /* 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;
+ if (check_eh_frame (exp, &nbytes))
+ abort ();
+
+ /* Let the backend know that subsequent data may be byte aligned. */
+#ifdef md_cons_align
+ md_cons_align (1);
+#endif
+
if (op == O_constant)
{
/* If we've got a constant, emit the thing directly right now. */
@@ -4428,10 +4449,10 @@ emit_leb128_expr(exp, sign)
}
else
{
- /* Otherwise, we have to create a variable sized fragment and
+ /* Otherwise, we have to create a variable sized fragment and
resolve things later. */
- frag_var (rs_leb128, sizeof_uleb128 (~(valueT)0), 0, sign,
+ frag_var (rs_leb128, sizeof_uleb128 (~(valueT) 0), 0, sign,
make_expr_symbol (exp), 0, (char *) NULL);
}
}
@@ -4444,28 +4465,25 @@ s_leb128 (sign)
{
expressionS exp;
- do {
- expression (&exp);
- emit_leb128_expr (&exp, sign);
- } while (*input_line_pointer++ == ',');
+ do
+ {
+ expression (&exp);
+ emit_leb128_expr (&exp, sign);
+ }
+ while (*input_line_pointer++ == ',');
input_line_pointer--;
demand_empty_rest_of_line ();
}
-/*
- * stringer()
- *
- * We read 0 or more ',' separated, double-quoted strings.
- *
- * Caller should have checked need_pass_2 is FALSE because we don't check it.
- */
-
-
-void
-stringer (append_zero) /* Worker to do .ascii etc statements. */
- /* Checks end-of-line. */
- register int append_zero; /* 0: don't append '\0', else 1 */
+/* We read 0 or more ',' separated, double-quoted strings.
+ Caller should have checked need_pass_2 is FALSE because we don't
+ check it. */
+
+void
+stringer (append_zero) /* Worker to do .ascii etc statements. */
+ /* Checks end-of-line. */
+ register int append_zero; /* 0: don't append '\0', else 1. */
{
register unsigned int c;
char *start;
@@ -4474,22 +4492,19 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
md_flush_pending_output ();
#endif
- /*
- * The following awkward logic is to parse ZERO or more strings,
- * comma separated. Recall a string expression includes spaces
- * before the opening '\"' and spaces after the closing '\"'.
- * We fake a leading ',' if there is (supposed to be)
- * a 1st, expression. We keep demanding expressions for each
- * ','.
- */
+ /* The following awkward logic is to parse ZERO or more strings,
+ comma separated. Recall a string expression includes spaces
+ before the opening '\"' and spaces after the closing '\"'.
+ We fake a leading ',' if there is (supposed to be)
+ a 1st, expression. We keep demanding expressions for each ','. */
if (is_it_end_of_statement ())
{
- c = 0; /* Skip loop. */
- ++input_line_pointer; /* Compensate for end of loop. */
+ c = 0; /* Skip loop. */
+ ++input_line_pointer; /* Compensate for end of loop. */
}
else
{
- c = ','; /* Do loop. */
+ c = ','; /* Do loop. */
}
while (c == ',' || c == '<' || c == '"')
{
@@ -4497,7 +4512,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
switch (*input_line_pointer)
{
case '\"':
- ++input_line_pointer; /*->1st char of string. */
+ ++input_line_pointer; /*->1st char of string. */
start = input_line_pointer;
while (is_a_char (c = next_char_of_string ()))
{
@@ -4554,9 +4569,9 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
/* FIXME-SOMEDAY: I had trouble here on characters with the
high bits set. We'll probably also have trouble with
multibyte chars, wide chars, etc. Also be careful about
- returning values bigger than 1 byte. xoxorich. */
+ returning values bigger than 1 byte. xoxorich. */
-unsigned int
+unsigned int
next_char_of_string ()
{
register unsigned int c;
@@ -4603,7 +4618,7 @@ next_char_of_string ()
case '\\':
case '"':
- break; /* As itself. */
+ break; /* As itself. */
case '0':
case '1':
@@ -4619,10 +4634,13 @@ next_char_of_string ()
long number;
int i;
- for (i = 0, number = 0; isdigit (c) && i < 3; c = *input_line_pointer++, i++)
+ for (i = 0, number = 0;
+ isdigit (c) && i < 3;
+ c = *input_line_pointer++, i++)
{
number = number * 8 + c - '0';
}
+
c = number & 0xff;
}
--input_line_pointer;
@@ -4651,7 +4669,7 @@ next_char_of_string ()
break;
case '\n':
- /* To be compatible with BSD 4.2 as: give the luser a linefeed!! */
+ /* To be compatible with BSD 4.2 as: give the luser a linefeed!! */
as_warn (_("Unterminated string: Newline inserted."));
c = '\n';
bump_line_counters ();
@@ -4665,15 +4683,15 @@ next_char_of_string ()
#endif /* ONLY_STANDARD_ESCAPES */
break;
- } /* switch on escaped char */
+ }
break;
#endif /* ! defined (NO_STRING_ESCAPES) */
default:
break;
- } /* switch on char */
+ }
return (c);
-} /* next_char_of_string() */
+}
static segT
get_segmented_expression (expP)
@@ -4694,7 +4712,7 @@ get_segmented_expression (expP)
return retval;
}
-static segT
+static segT
get_known_segmented_expression (expP)
register expressionS *expP;
{
@@ -4716,7 +4734,7 @@ get_known_segmented_expression (expP)
}
know (retval == absolute_section || SEG_NORMAL (retval));
return (retval);
-} /* get_known_segmented_expression() */
+}
offsetT
get_absolute_expression ()
@@ -4733,21 +4751,18 @@ get_absolute_expression ()
return exp.X_add_number;
}
-char /* return terminator */
+char /* Return terminator. */
get_absolute_expression_and_terminator (val_pointer)
- long *val_pointer; /* return value of expression */
+ long *val_pointer; /* Return value of expression. */
{
/* FIXME: val_pointer should probably be offsetT *. */
*val_pointer = (long) get_absolute_expression ();
return (*input_line_pointer++);
}
-/*
- * demand_copy_C_string()
- *
- * Like demand_copy_string, but return NULL if the string contains any '\0's.
- * Give a warning if that happens.
- */
+/* Like demand_copy_string, but return NULL if the string contains any '\0's.
+ Give a warning if that happens. */
+
char *
demand_copy_C_string (len_pointer)
int *len_pointer;
@@ -4769,15 +4784,13 @@ demand_copy_C_string (len_pointer)
}
}
}
+
return s;
}
-/*
- * demand_copy_string()
- *
- * Demand string, but return a safe (=private) copy of the string.
- * Return NULL if we can't read a string here.
- */
+/* Demand string, but return a safe (=private) copy of the string.
+ Return NULL if we can't read a string here. */
+
char *
demand_copy_string (lenP)
int *lenP;
@@ -4790,7 +4803,7 @@ demand_copy_string (lenP)
SKIP_WHITESPACE ();
if (*input_line_pointer == '\"')
{
- input_line_pointer++; /* Skip opening quote. */
+ input_line_pointer++; /* Skip opening quote. */
while (is_a_char (c = next_char_of_string ()))
{
@@ -4798,7 +4811,7 @@ demand_copy_string (lenP)
len++;
}
/* JF this next line is so demand_copy_C_string will return a
- null terminated string. */
+ null terminated string. */
obstack_1grow (&notes, '\0');
retval = obstack_finish (&notes);
}
@@ -4810,30 +4823,27 @@ demand_copy_string (lenP)
}
*lenP = len;
return (retval);
-} /* demand_copy_string() */
+}
-/*
- * is_it_end_of_statement()
- *
- * In: Input_line_pointer->next character.
- *
- * Do: Skip input_line_pointer over all whitespace.
- *
- * Out: 1 if input_line_pointer->end-of-line.
-*/
-int
+/* In: Input_line_pointer->next character.
+
+ Do: Skip input_line_pointer over all whitespace.
+
+ Out: 1 if input_line_pointer->end-of-line. */
+
+int
is_it_end_of_statement ()
{
SKIP_WHITESPACE ();
return (is_end_of_line[(unsigned char) *input_line_pointer]);
-} /* is_it_end_of_statement() */
+}
-void
+void
equals (sym_name, reassign)
char *sym_name;
int reassign;
{
- register symbolS *symbolP; /* symbol we are working with */
+ register symbolS *symbolP; /* Symbol we are working with. */
char *stop = NULL;
char stopc;
@@ -4849,7 +4859,7 @@ equals (sym_name, reassign)
if (sym_name[0] == '.' && sym_name[1] == '\0')
{
- /* Turn '. = mumble' into a .org mumble */
+ /* Turn '. = mumble' into a .org mumble. */
register segT segment;
expressionS exp;
@@ -4859,26 +4869,40 @@ equals (sym_name, reassign)
}
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
+ if (!reassign
&& S_IS_DEFINED (symbolP)
&& S_GET_SEGMENT (symbolP) != reg_section)
as_bad (_("symbol `%s' 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);
}
if (flag_mri)
- {
- ignore_rest_of_line (); /* check garbage after the expression */
- mri_comment_end (stop, stopc);
- }
-} /* equals() */
+ {
+ /* Check garbage after the expression. */
+ ignore_rest_of_line ();
+ mri_comment_end (stop, stopc);
+ }
+}
-/* .include -- include a file at this point. */
+/* .include -- include a file at this point. */
-/* ARGSUSED */
-void
+void
s_include (arg)
int arg ATTRIBUTE_UNUSED;
{
@@ -4887,7 +4911,7 @@ s_include (arg)
FILE *try;
char *path;
- if (! flag_m68k_mri)
+ if (!flag_m68k_mri)
{
filename = demand_copy_string (&i);
if (filename == NULL)
@@ -4901,7 +4925,7 @@ s_include (arg)
{
SKIP_WHITESPACE ();
i = 0;
- while (! is_end_of_line[(unsigned char) *input_line_pointer]
+ while (!is_end_of_line[(unsigned char) *input_line_pointer]
&& *input_line_pointer != ' '
&& *input_line_pointer != '\t')
{
@@ -4909,13 +4933,16 @@ s_include (arg)
++input_line_pointer;
++i;
}
+
obstack_1grow (&notes, '\0');
filename = obstack_finish (&notes);
- while (! is_end_of_line[(unsigned char) *input_line_pointer])
+ while (!is_end_of_line[(unsigned char) *input_line_pointer])
++input_line_pointer;
}
+
demand_empty_rest_of_line ();
path = xmalloc ((unsigned long) i + include_dir_maxlen + 5 /* slop */ );
+
for (i = 0; i < include_dir_count; i++)
{
strcpy (path, include_dirs[i]);
@@ -4927,15 +4954,16 @@ s_include (arg)
goto gotit;
}
}
+
free (path);
path = filename;
gotit:
- /* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */
+ /* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */
register_dependency (path);
input_scrub_insert_file (path);
-} /* s_include() */
+}
-void
+void
add_include_dir (path)
char *path;
{
@@ -4944,22 +4972,23 @@ add_include_dir (path)
if (include_dir_count == 0)
{
include_dirs = (char **) xmalloc (2 * sizeof (*include_dirs));
- include_dirs[0] = "."; /* Current dir */
+ include_dirs[0] = "."; /* Current dir. */
include_dir_count = 2;
}
else
{
include_dir_count++;
- include_dirs = (char **) realloc (include_dirs,
- include_dir_count * sizeof (*include_dirs));
+ include_dirs =
+ (char **) realloc (include_dirs,
+ include_dir_count * sizeof (*include_dirs));
}
- include_dirs[include_dir_count - 1] = path; /* New one */
+ include_dirs[include_dir_count - 1] = path; /* New one. */
i = strlen (path);
if (i > include_dir_maxlen)
include_dir_maxlen = i;
-} /* add_include_dir() */
+}
/* Output debugging information to denote the source file. */
@@ -4975,22 +5004,11 @@ generate_file_debug ()
void
generate_lineno_debug ()
{
-#ifdef ECOFF_DEBUGGING
- /* ECOFF assemblers automatically generate debugging information.
- FIXME: This should probably be handled elsewhere. */
- if (debug_type == DEBUG_UNSPECIFIED)
- {
- if (ECOFF_DEBUGGING && ecoff_no_current_file ())
- debug_type = DEBUG_ECOFF;
- else
- debug_type = DEBUG_NONE;
- }
-#endif
-
switch (debug_type)
{
case DEBUG_UNSPECIFIED:
case DEBUG_NONE:
+ case DEBUG_DWARF:
break;
case DEBUG_STABS:
stabs_generate_asm_lineno ();
@@ -4998,9 +5016,11 @@ generate_lineno_debug ()
case DEBUG_ECOFF:
ecoff_generate_asm_lineno ();
break;
- case DEBUG_DWARF:
case DEBUG_DWARF2:
- /* FIXME. */
+ /* ??? We could here indicate to dwarf2dbg.c that something
+ has changed. However, since there is additional backend
+ support that is required (calling dwarf2_emit_insn), we
+ let dwarf2dbg.c call as_where on its own. */
break;
}
}
@@ -5045,8 +5065,8 @@ do_s_func (end_p, default_prefix)
}
else /* ! end_p */
{
- char *name,*label;
- char delim1,delim2;
+ char *name, *label;
+ char delim1, delim2;
if (current_name != NULL)
{
@@ -5098,7 +5118,7 @@ do_s_func (end_p, default_prefix)
demand_empty_rest_of_line ();
}
-void
+void
s_ignore (arg)
int arg ATTRIBUTE_UNUSED;
{
@@ -5109,7 +5129,6 @@ s_ignore (arg)
++input_line_pointer;
}
-
void
read_print_statistics (file)
FILE *file;
@@ -5117,8 +5136,8 @@ read_print_statistics (file)
hash_print_statistics (file, "pseudo-op table", po_hash);
}
-/* Inserts the given line into the input stream.
-
+/* Inserts the given line into the input stream.
+
This call avoids macro/conditionals nesting checking, since the contents of
the line are assumed to replace the contents of a line already scanned.
@@ -5128,7 +5147,7 @@ read_print_statistics (file)
void
input_scrub_insert_line (line)
- const char *line;
+ const char *line;
{
sb newline;
sb_new (&newline);
@@ -5139,14 +5158,12 @@ input_scrub_insert_line (line)
}
/* Insert a file into the input stream; the path must resolve to an actual
- file; no include path searching or dependency registering is performed. */
+ file; no include path searching or dependency registering is performed. */
void
input_scrub_insert_file (path)
- char *path;
+ char *path;
{
input_scrub_include_file (path, input_line_pointer);
buffer_limit = input_scrub_next_buffer (&input_line_pointer);
}
-
-/* end of read.c */
diff --git a/gnu/usr.bin/binutils/gas/read.h b/gnu/usr.bin/binutils/gas/read.h
index 571b59b58ab..d19deec5cdc 100644
--- a/gnu/usr.bin/binutils/gas/read.h
+++ b/gnu/usr.bin/binutils/gas/read.h
@@ -1,5 +1,6 @@
/* read.h - of read.c
- Copyright (C) 1986, 90, 92, 93, 94, 95, 96, 1997
+ Copyright 1986, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,24 +16,28 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
-extern char *input_line_pointer;/* -> char we are parsing now. */
+extern char *input_line_pointer; /* -> char we are parsing now. */
-#define PERMIT_WHITESPACE /* Define to make whitespace be allowed in */
-/* many syntactically unnecessary places. */
-/* Normally undefined. For compatibility */
-/* with ancient GNU cc. */
+/* Define to make whitespace be allowed in many syntactically
+ unnecessary places. Normally undefined. For compatibility with
+ ancient GNU cc. */
/* #undef PERMIT_WHITESPACE */
+#define PERMIT_WHITESPACE
#ifdef PERMIT_WHITESPACE
-#define SKIP_WHITESPACE() {if (* input_line_pointer == ' ') ++ input_line_pointer;}
+#define SKIP_WHITESPACE() \
+ { \
+ if (* input_line_pointer == ' ') \
+ ++ input_line_pointer; \
+ }
#else
#define SKIP_WHITESPACE() know(*input_line_pointer != ' ' )
#endif
-
#define LEX_NAME (1) /* may continue a name */
#define LEX_BEGIN_NAME (2) /* may begin a name */
#define LEX_END_NAME (4) /* ends a name */
@@ -47,7 +52,7 @@ extern char *input_line_pointer;/* -> char we are parsing now. */
#ifndef is_a_char
#define CHAR_MASK (0xff)
#define NOT_A_CHAR (CHAR_MASK+1)
-#define is_a_char(c) (((unsigned)(c)) <= CHAR_MASK)
+#define is_a_char(c) (((unsigned) (c)) <= CHAR_MASK)
#endif /* is_a_char() */
extern char lex_type[];
@@ -76,9 +81,11 @@ extern symbolS *line_label;
/* This is used to support MRI common sections. */
extern symbolS *mri_common_symbol;
+/* True if a stabs line debug statement is currently being emitted. */
+extern int outputting_stabs_line_debug;
+
/* Possible arguments to .linkonce. */
-enum linkonce_type
-{
+enum linkonce_type {
LINKONCE_UNSET = 0,
LINKONCE_DISCARD,
LINKONCE_ONE_ONLY,
@@ -86,9 +93,15 @@ enum linkonce_type
LINKONCE_SAME_CONTENTS
};
+#define IGNORE_OPCODE_CASE
+#ifdef IGNORE_OPCODE_CASE
+extern char original_case_string[];
+#endif
+
extern void pop_insert PARAMS ((const pseudo_typeS *));
extern unsigned int get_stab_string_offset
PARAMS ((const char *string, const char *stabstr_secname));
+extern void aout_process_stab PARAMS ((int, const char *, int, int, int));
extern char *demand_copy_C_string PARAMS ((int *len_pointer));
extern char get_absolute_expression_and_terminator
PARAMS ((long *val_pointer));
@@ -121,7 +134,7 @@ extern void end_repeat PARAMS((int));
extern void generate_lineno_debug PARAMS ((void));
-extern void s_abort PARAMS ((int));
+extern void s_abort PARAMS ((int)) ATTRIBUTE_NORETURN;
extern void s_align_bytes PARAMS ((int arg));
extern void s_align_ptwo PARAMS ((int));
extern void s_app_file PARAMS ((int));
@@ -168,5 +181,3 @@ extern void s_text PARAMS ((int));
extern void stringer PARAMS ((int append_zero));
extern void s_xstab PARAMS ((int what));
extern void s_rva PARAMS ((int));
-
-/* end of read.h */
diff --git a/gnu/usr.bin/binutils/gas/sb.h b/gnu/usr.bin/binutils/gas/sb.h
index 7eaed258a3b..dd01e0ddb75 100644
--- a/gnu/usr.bin/binutils/gas/sb.h
+++ b/gnu/usr.bin/binutils/gas/sb.h
@@ -1,5 +1,5 @@
/* sb.h - header file for string buffer manipulation routines
- Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#ifndef SB_H
@@ -54,8 +54,8 @@
/* structure of an sb */
typedef struct sb
{
- char *ptr; /* points to the current block. */
- int len; /* how much is used. */
+ char *ptr; /* points to the current block. */
+ int len; /* how much is used. */
int pot; /* the maximum length is 1<<pot */
struct le *item;
}
diff --git a/gnu/usr.bin/binutils/gas/stabs.c b/gnu/usr.bin/binutils/gas/stabs.c
index 7c13c2f1e09..eed11b31c69 100644
--- a/gnu/usr.bin/binutils/gas/stabs.c
+++ b/gnu/usr.bin/binutils/gas/stabs.c
@@ -1,5 +1,5 @@
/* Generic stabs parsing for gas.
- Copyright (C) 1989, 90, 91, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1989, 1990, 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@ the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+02111-1307, USA. */
#include "as.h"
#include "obstack.h"
@@ -25,10 +25,15 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ecoff.h"
/* We need this, despite the apparent object format dependency, since
- it defines stab types, which all object formats can use now. */
+ it defines stab types, which all object formats can use now. */
#include "aout/stab_gnu.h"
+/* Holds whether the assembler is generating stabs line debugging
+ information or not. Potentially used by md_cleanup function. */
+
+int outputting_stabs_line_debug = 0;
+
static void s_stab_generic PARAMS ((int, char *, char *));
static void generate_asm_file PARAMS ((int, char *));
@@ -112,7 +117,7 @@ get_stab_string_offset (string, stabstr_secname)
}
if (length > 0)
- { /* Ordinary case. */
+ { /* Ordinary case. */
p = frag_more (length + 1);
strcpy (p, string);
@@ -131,9 +136,8 @@ get_stab_string_offset (string, stabstr_secname)
#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) aout_process_stab(W,S,T,O,D)
#endif
-static void aout_process_stab PARAMS ((int, const char *, int, int, int));
-
-static void
+/* Here instead of obj-aout.c because other formats use it too. */
+void
aout_process_stab (what, string, type, other, desc)
int what;
const char *string;
@@ -172,16 +176,16 @@ aout_process_stab (what, string, type, other, desc)
#endif
/* This can handle different kinds of stabs (s,n,d) and different
- kinds of stab sections. */
+ kinds of stab sections. */
-static void
+static void
s_stab_generic (what, stab_secname, stabstr_secname)
int what;
char *stab_secname;
char *stabstr_secname;
{
long longint;
- char *string;
+ char *string, *saved_string_obstack_end;
int type;
int other;
int desc;
@@ -195,12 +199,19 @@ s_stab_generic (what, stab_secname, stabstr_secname)
'd' indicating which type of .stab this is. */
if (what != 's')
- string = "";
+ {
+ string = "";
+ saved_string_obstack_end = 0;
+ }
else
{
int length;
string = demand_copy_C_string (&length);
+ /* FIXME: We should probably find some other temporary storage
+ for string, rather than leaking memory if someone else
+ happens to use the notes obstack. */
+ saved_string_obstack_end = notes.next_free;
SKIP_WHITESPACE ();
if (*input_line_pointer == ',')
input_line_pointer++;
@@ -331,8 +342,9 @@ s_stab_generic (what, stab_secname, stabstr_secname)
stroff = get_stab_string_offset (string, stabstr_secname);
if (what == 's')
{
- /* release the string */
- obstack_free (&notes, string);
+ /* Release the string, if nobody else has used the obstack. */
+ if (saved_string_obstack_end == notes.next_free)
+ obstack_free (&notes, string);
}
/* At least for now, stabs in a special stab section are always
@@ -384,7 +396,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
demand_empty_rest_of_line ();
}
-/* Regular stab directive. */
+/* Regular stab directive. */
void
s_stab (what)
@@ -393,7 +405,7 @@ s_stab (what)
s_stab_generic (what, STAB_SECTION_NAME, STAB_STRING_SECTION_NAME);
}
-/* "Extended stabs", used in Solaris only now. */
+/* "Extended stabs", used in Solaris only now. */
void
s_xstab (what)
@@ -439,9 +451,9 @@ s_xstab (what)
/* Frob invented at RMS' request. Set the n_desc of a symbol. */
-void
+void
s_desc (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char c;
@@ -498,52 +510,62 @@ generate_asm_file (type, file)
static char *last_file;
static int label_count;
char *hold;
- char *buf = xmalloc (2 * strlen (file) + 10);
char sym[30];
+ char *buf;
+ char *tmp = file;
+ char *endp = file + strlen (file);
+ char *bufp = buf;
+
+ if (last_file != NULL
+ && strcmp (last_file, file) == 0)
+ return;
/* Rather than try to do this in some efficient fashion, we just
generate a string and then parse it again. That lets us use the
existing stabs hook, which expect to see a string, rather than
inventing new ones. */
-
hold = input_line_pointer;
- if (last_file == NULL
- || strcmp (last_file, file) != 0)
+ sprintf (sym, "%sF%d", FAKE_LABEL_NAME, label_count);
+ ++label_count;
+
+ /* Allocate enough space for the file name (possibly extended with
+ doubled up backslashes), the symbol name, and the other characters
+ that make up a stabs file directive. */
+ bufp = buf = xmalloc (2 * strlen (file) + strlen (sym) + 12);
+
+ *bufp++ = '"';
+
+ while (tmp < endp)
{
- char *tmp = file;
- char *endp = file + strlen(file);
- char *bufp = buf;
-
- sprintf (sym, "%sF%d", FAKE_LABEL_NAME, label_count);
- ++label_count;
-
- *bufp++ = '"';
- while (tmp < endp)
- {
- char *bslash = strchr (tmp, '\\');
- int len = (bslash ? (bslash - tmp + 1) : strlen (tmp));
- /* double all backslashes, since demand_copy_C_string (used by
- s_stab to extract the part in quotes) will try to replace them as
- escape sequences. backslash may appear in a filespec. */
- strncpy (bufp, tmp, len);
- tmp += len;
- bufp += len;
- if (bslash != NULL)
- *bufp++ = '\\';
- }
- sprintf (bufp, "\",%d,0,0,%s\n", type, sym);
- input_line_pointer = buf;
- s_stab ('s');
- colon (sym);
+ char *bslash = strchr (tmp, '\\');
+ int len = (bslash ? (bslash - tmp + 1) : strlen (tmp));
+
+ /* Double all backslashes, since demand_copy_C_string (used by
+ s_stab to extract the part in quotes) will try to replace them as
+ escape sequences. backslash may appear in a filespec. */
+ strncpy (bufp, tmp, len);
+
+ tmp += len;
+ bufp += len;
- if (last_file != NULL)
- free (last_file);
- last_file = xstrdup (file);
+ if (bslash != NULL)
+ *bufp++ = '\\';
}
- input_line_pointer = hold;
+ sprintf (bufp, "\",%d,0,0,%s\n", type, sym);
+
+ input_line_pointer = buf;
+ s_stab ('s');
+ colon (sym);
+
+ if (last_file != NULL)
+ free (last_file);
+ last_file = xstrdup (file);
+
free (buf);
+
+ input_line_pointer = hold;
}
/* Generate stabs debugging information for the current line. This is
@@ -559,6 +581,10 @@ stabs_generate_asm_lineno ()
char *buf;
char sym[30];
+ /* Let the world know that we are in the middle of generating a
+ piece of stabs line debugging information. */
+ outputting_stabs_line_debug = 1;
+
/* Rather than try to do this in some efficient fashion, we just
generate a string and then parse it again. That lets us use the
existing stabs hook, which expect to see a string, rather than
@@ -589,6 +615,7 @@ stabs_generate_asm_lineno ()
colon (sym);
input_line_pointer = hold;
+ outputting_stabs_line_debug = 0;
}
/* Emit a function stab.
diff --git a/gnu/usr.bin/binutils/gas/struc-symbol.h b/gnu/usr.bin/binutils/gas/struc-symbol.h
index 75735661bf2..6573f2c2a3f 100644
--- a/gnu/usr.bin/binutils/gas/struc-symbol.h
+++ b/gnu/usr.bin/binutils/gas/struc-symbol.h
@@ -1,5 +1,6 @@
/* struct_symbol.h - Internal symbol structure
- Copyright (C) 1987, 92, 93, 94, 95, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -21,6 +22,12 @@
#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. */
@@ -34,13 +41,13 @@ struct symbol
/* 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. */
+ 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. */
+ /* The 24 bit symbol number. Symbol numbers start at 0 and are unsigned. */
long sy_number;
#endif
@@ -69,7 +76,7 @@ struct symbol
are local and would otherwise not be. */
unsigned int sy_used_in_reloc : 1;
- /* Whether the symbol is used as an operand or in an expression.
+ /* Whether the symbol is used as an operand or in an expression.
NOTE: Not all the backends keep this information accurate;
backends which use this bit are responsible for setting it when
a symbol is used in backend routines. */
@@ -88,6 +95,10 @@ struct symbol
#ifdef TC_SYMFIELD_TYPE
TC_SYMFIELD_TYPE sy_tc;
#endif
+
+#ifdef TARGET_SYMBOL_FIELDS
+ TARGET_SYMBOL_FIELDS
+#endif
};
#ifdef BFD_ASSEMBLER
@@ -142,5 +153,3 @@ struct local_symbol
#endif /* BFD_ASSEMBLER */
#endif /* __struc_symbol_h__ */
-
-/* end of struc-symbol.h */
diff --git a/gnu/usr.bin/binutils/gas/subsegs.c b/gnu/usr.bin/binutils/gas/subsegs.c
index b2bf70d1548..611d64c4f53 100644
--- a/gnu/usr.bin/binutils/gas/subsegs.c
+++ b/gnu/usr.bin/binutils/gas/subsegs.c
@@ -1,5 +1,6 @@
/* subsegs.c - subsegments -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,9 +20,7 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*
- * Segments & sub-segments.
- */
+/* Segments & sub-segments. */
#include "as.h"
@@ -37,12 +36,11 @@ static struct obstack frchains;
segment_info_type segment_info[SEG_MAXIMUM_ORDINAL];
#else
-/* Commented in "subsegs.h". */
+/* Commented in "subsegs.h". */
frchainS *data0_frchainP, *bss0_frchainP;
#endif /* MANY_SEGMENTS */
-char const *const seg_name[] =
-{
+char const *const seg_name[] = {
"absolute",
#ifdef MANY_SEGMENTS
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9",
@@ -62,7 +60,7 @@ char const *const seg_name[] =
"transfert vector postload",
"register",
"",
-}; /* Used by error reporters, dumpers etc. */
+}; /* Used by error reporters, dumpers etc. */
#else /* BFD_ASSEMBLER */
/* Gas segment information for bfd_abs_section_ptr and
@@ -103,12 +101,12 @@ subsegs_begin ()
#endif
frchain_root = NULL;
- frchain_now = NULL; /* Warn new_subseg() that we are booting. */
+ frchain_now = NULL; /* Warn new_subseg() that we are booting. */
frag_now = &dummy_frag;
#ifndef BFD_ASSEMBLER
- now_subseg = 42; /* Lie for 1st call to subseg_new. */
+ now_subseg = 42; /* Lie for 1st call to subseg_new. */
#ifdef MANY_SEGMENTS
{
int i;
@@ -275,7 +273,7 @@ subseg_set_rest (seg, subseg)
*/
if (!frcP
|| (frcP->frch_seg > seg
- || frcP->frch_subseg > subseg)) /* Kinky logic only works with 2 segments. */
+ || frcP->frch_subseg > subseg)) /* Kinky logic only works with 2 segments. */
{
/*
* This should be the only code that creates a frchainS.
@@ -307,7 +305,7 @@ subseg_set_rest (seg, subseg)
seginfo->frchainP = newP;
}
#endif
-
+
frcP = newP;
}
/*
@@ -567,8 +565,7 @@ section_symbol (sec)
/* Return whether the specified segment is thought to hold text. */
#ifndef BFD_ASSEMBLER
-const char * const nontext_section_names[] =
-{
+const char * const nontext_section_names[] = {
".eh_frame",
".gcc_except_table",
#ifdef OBJ_COFF
diff --git a/gnu/usr.bin/binutils/gas/subsegs.h b/gnu/usr.bin/binutils/gas/subsegs.h
index 4840d5b5c2b..9a5abb019c1 100644
--- a/gnu/usr.bin/binutils/gas/subsegs.h
+++ b/gnu/usr.bin/binutils/gas/subsegs.h
@@ -1,5 +1,6 @@
/* subsegs.h -> subsegs.c
- Copyright (C) 1987, 92, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -44,7 +45,7 @@ struct frchain /* control building of a frag chain */
struct frag *frch_root; /* 1st struct frag in chain, or NULL */
struct frag *frch_last; /* last struct frag in chain, or NULL */
struct frchain *frch_next; /* next in chain of struct frchain-s */
- segT frch_seg; /* SEG_TEXT or SEG_DATA. */
+ 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. */
@@ -60,12 +61,10 @@ typedef struct frchain frchainS;
extern frchainS *frchain_root;
/* Frchain we are assembling into now. That is, the current segment's
- frag chain, even if it contains no (complete) frags. */
+ frag chain, even if it contains no (complete) frags. */
extern frchainS *frchain_now;
-
-typedef struct segment_info_struct
-{
+typedef struct segment_info_struct {
frchainS *frchainP;
unsigned int hadone : 1;
@@ -103,13 +102,12 @@ typedef struct segment_info_struct
symbolS *sym;
#endif
- union
- {
- /* Current size of section holding stabs strings. */
- unsigned long stab_string_size;
- /* Initial frag for ELF. */
- char *p;
- }
+ union {
+ /* Current size of section holding stabs strings. */
+ unsigned long stab_string_size;
+ /* Initial frag for ELF. */
+ char *p;
+ }
stabu;
#ifdef NEED_LITERAL_POOL
@@ -155,5 +153,3 @@ struct seg_info_trash {
#endif /* ! BFD_ASSEMBLER */
extern void subsegs_print_statistics PARAMS ((FILE *));
-
-/* end of subsegs.h */
diff --git a/gnu/usr.bin/binutils/gas/symbols.c b/gnu/usr.bin/binutils/gas/symbols.c
index b54a2fd9377..a72ba42defc 100644
--- a/gnu/usr.bin/binutils/gas/symbols.c
+++ b/gnu/usr.bin/binutils/gas/symbols.c
@@ -1,5 +1,6 @@
/* symbols.c -symbol table-
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,7 +20,7 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/* #define DEBUG_SYMS / * to debug symbol list maintenance */
+/* #define DEBUG_SYMS / * to debug symbol list maintenance. */
#include <ctype.h>
@@ -44,7 +45,7 @@ static struct hash_control *sy_hash;
/* Table of local symbols. */
static struct hash_control *local_hash;
-/* Below are commented in "symbols.h". */
+/* Below are commented in "symbols.h". */
symbolS *symbol_rootP;
symbolS *symbol_lastP;
symbolS abs_symbol;
@@ -55,6 +56,9 @@ symbolS abs_symbol;
#define debug_verify_symchain(root, last) ((void) 0)
#endif
+#define DOLLAR_LABEL_CHAR '\001'
+#define LOCAL_LABEL_CHAR '\002'
+
struct obstack notes;
static void fb_label_init PARAMS ((void));
@@ -63,12 +67,10 @@ static long fb_label_instance PARAMS ((long));
static void print_binary PARAMS ((FILE *, const char *, expressionS *));
-/* symbol_new()
-
- Return a pointer to a new symbol. Die if we can't make a new
+/* Return a pointer to a new symbol. Die if we can't make a new
symbol. Fill in the symbol's values. Add symbol to end of symbol
chain.
-
+
This function should be called in the general case of creating a
symbol. However, if the output file symbol table has already been
set, and you are certain that this symbol won't be wanted in the
@@ -83,9 +85,7 @@ symbol_new (name, segment, valu, frag)
{
symbolS *symbolP = symbol_create (name, segment, valu, frag);
- /*
- * Link to end of symbol chain.
- */
+ /* Link to end of symbol chain. */
#ifdef BFD_ASSEMBLER
{
extern int symbol_table_frozen;
@@ -108,7 +108,7 @@ save_symbol_name (name)
unsigned int name_length;
char *ret;
- name_length = strlen (name) + 1; /* +1 for \0 */
+ name_length = strlen (name) + 1; /* +1 for \0. */
obstack_grow (&notes, name, name_length);
ret = obstack_finish (&notes);
@@ -135,10 +135,10 @@ save_symbol_name (name)
symbolS *
symbol_create (name, segment, valu, frag)
- const char *name; /* It is copied, the caller can destroy/modify */
- segT segment; /* Segment identifier (SEG_<something>) */
- valueT valu; /* Symbol value */
- fragS *frag; /* Associated fragment */
+ const char *name; /* It is copied, the caller can destroy/modify. */
+ segT segment; /* Segment identifier (SEG_<something>). */
+ valueT valu; /* Symbol value. */
+ fragS *frag; /* Associated fragment. */
{
char *preserved_copy_of_name;
symbolS *symbolP;
@@ -147,7 +147,7 @@ symbol_create (name, segment, valu, frag)
symbolP = (symbolS *) obstack_alloc (&notes, sizeof (symbolS));
- /* symbol must be born in some fixed state. This seems as good as any. */
+ /* symbol must be born in some fixed state. This seems as good as any. */
memset (symbolP, 0, sizeof (symbolS));
#ifdef BFD_ASSEMBLER
@@ -272,22 +272,17 @@ local_symbol_convert (locsym)
#endif /* ! BFD_ASSEMBLER */
+/* We have just seen "<name>:".
+ Creates a struct symbol unless it already exists.
+
+ Gripes if we are redefining a symbol incompatibly (and ignores it). */
-/*
- * colon()
- *
- * We have just seen "<name>:".
- * Creates a struct symbol unless it already exists.
- *
- * Gripes if we are redefining a symbol incompatibly (and ignores it).
- *
- */
symbolS *
-colon (sym_name) /* just seen "x:" - rattle symbols & frags */
- const char *sym_name; /* symbol name, as a cannonical string */
- /* We copy this string: OK to alter later. */
+colon (sym_name) /* Just seen "x:" - rattle symbols & frags. */
+ const char *sym_name; /* Symbol name, as a cannonical string. */
+ /* We copy this string: OK to alter later. */
{
- register symbolS *symbolP; /* symbol we are working with */
+ register symbolS *symbolP; /* Symbol we are working with. */
/* Sun local labels go out of scope whenever a non-local symbol is
defined. */
@@ -327,9 +322,9 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
(offsetT) 0,
NULL);
- /* We want to store the pointer to where to insert the jump table in the
- fr_opcode of the rs_broken_word frag. This requires a little
- hackery. */
+ /* We want to store the pointer to where to insert the jump
+ table in the fr_opcode of the rs_broken_word frag. This
+ requires a little hackery. */
while (frag_tmp
&& (frag_tmp->fr_type != rs_broken_word
|| frag_tmp->fr_opcode))
@@ -349,9 +344,7 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
if (RESOLVE_SYMBOL_REDEFINITION (symbolP))
return symbolP;
#endif
- /*
- * Now check for undefined symbols
- */
+ /* Now check for undefined symbols. */
if (LOCAL_SYMBOL_CHECK (symbolP))
{
#ifdef BFD_ASSEMBLER
@@ -377,27 +370,27 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
{
symbolP->sy_frag = frag_now;
#ifdef OBJ_VMS
- S_SET_OTHER(symbolP, const_flag);
+ S_SET_OTHER (symbolP, const_flag);
#endif
S_SET_VALUE (symbolP, (valueT) frag_now_fix ());
S_SET_SEGMENT (symbolP, now_seg);
#ifdef N_UNDF
know (N_UNDF == 0);
-#endif /* if we have one, it better be zero. */
+#endif /* if we have one, it better be zero. */
}
else
{
- /*
- * There are still several cases to check:
- * A .comm/.lcomm symbol being redefined as
- * initialized data is OK
- * A .comm/.lcomm symbol being redefined with
- * a larger size is also OK
- *
- * This only used to be allowed on VMS gas, but Sun cc
- * on the sparc also depends on it.
- */
+ /* There are still several cases to check:
+
+ A .comm/.lcomm symbol being redefined as initialized
+ data is OK
+
+ A .comm/.lcomm symbol being redefined with a larger
+ size is also OK
+
+ This only used to be allowed on VMS gas, but Sun cc
+ on the sparc also depends on it. */
if (((!S_IS_DEBUG (symbolP)
&& (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP))
@@ -406,17 +399,14 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
&& (now_seg == data_section
|| now_seg == S_GET_SEGMENT (symbolP)))
{
- /*
- * Select which of the 2 cases this is
- */
+ /* Select which of the 2 cases this is. */
if (now_seg != data_section)
{
- /*
- * New .comm for prev .comm symbol.
- * If the new size is larger we just
- * change its value. If the new size
- * is smaller, we ignore this symbol
- */
+ /* New .comm for prev .comm symbol.
+
+ If the new size is larger we just change its
+ value. If the new size is smaller, we ignore
+ this symbol. */
if (S_GET_VALUE (symbolP)
< ((unsigned) frag_now_fix ()))
{
@@ -429,10 +419,10 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
data. */
symbolP->sy_frag = frag_now;
#ifdef OBJ_VMS
- S_SET_OTHER(symbolP, const_flag);
+ S_SET_OTHER (symbolP, const_flag);
#endif
S_SET_VALUE (symbolP, (valueT) frag_now_fix ());
- S_SET_SEGMENT (symbolP, now_seg); /* keep N_EXT bit */
+ S_SET_SEGMENT (symbolP, now_seg); /* Keep N_EXT bit. */
}
}
else
@@ -450,22 +440,22 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
S_GET_OTHER (symbolP),
S_GET_DESC (symbolP));
#endif
- as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."),
+ as_bad (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."),
sym_name,
segment_name (S_GET_SEGMENT (symbolP)),
od_buf,
(long) S_GET_VALUE (symbolP));
}
- } /* if the undefined symbol has no value */
+ } /* if the undefined symbol has no value */
}
else
{
- /* Don't blow up if the definition is the same */
+ /* Don't blow up if the definition is the same. */
if (!(frag_now == symbolP->sy_frag
&& S_GET_VALUE (symbolP) == frag_now_fix ()
&& S_GET_SEGMENT (symbolP) == now_seg))
- as_fatal (_("Symbol %s already defined."), sym_name);
- } /* if this symbol is not yet defined */
+ as_bad (_("Symbol %s already defined."), sym_name);
+ }
}
#ifdef BFD_ASSEMBLER
@@ -485,7 +475,7 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
#endif /* OBJ_VMS */
symbol_table_insert (symbolP);
- } /* if we have seen this symbol before */
+ }
if (mri_common_symbol != NULL)
{
@@ -511,15 +501,9 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
return symbolP;
}
+/* Die if we can't insert the symbol. */
-/*
- * symbol_table_insert()
- *
- * Die if we can't insert the symbol.
- *
- */
-
-void
+void
symbol_table_insert (symbolP)
symbolS *symbolP;
{
@@ -542,15 +526,12 @@ symbol_table_insert (symbolP)
{
as_fatal (_("Inserting \"%s\" into symbol table failed: %s"),
S_GET_NAME (symbolP), error_string);
- } /* on error */
-} /* symbol_table_insert() */
+ } /* on error */
+}
-/*
- * symbol_find_or_make()
- *
- * If a symbol name does not exist, create it as undefined, and insert
- * it into the symbol table. Return a pointer to it.
- */
+/* If a symbol name does not exist, create it as undefined, and insert
+ it into the symbol table. Return a pointer to it. */
+
symbolS *
symbol_find_or_make (name)
const char *name;
@@ -581,7 +562,7 @@ symbol_find_or_make (name)
} /* if symbol wasn't found */
return (symbolP);
-} /* symbol_find_or_make() */
+}
symbolS *
symbol_make (name)
@@ -589,23 +570,19 @@ symbol_make (name)
{
symbolS *symbolP;
- /* Let the machine description default it, e.g. for register names. */
+ /* Let the machine description default it, e.g. for register names. */
symbolP = md_undefined_symbol ((char *) name);
if (!symbolP)
symbolP = symbol_new (name, undefined_section, (valueT) 0, &zero_address_frag);
return (symbolP);
-} /* symbol_make() */
+}
-/*
- * symbol_find()
- *
- * Implement symbol table lookup.
- * In: A symbol's name as a string: '\0' can't be part of a symbol name.
- * Out: NULL if the name was not in the symbol table, else the address
- * of a struct symbol associated with that name.
- */
+/* Implement symbol table lookup.
+ In: A symbol's name as a string: '\0' can't be part of a symbol name.
+ Out: NULL if the name was not in the symbol table, else the address
+ of a struct symbol associated with that name. */
symbolS *
symbol_find (name)
@@ -616,7 +593,7 @@ symbol_find (name)
#else /* STRIP_UNDERSCORE */
return (symbol_find_base (name, 0));
#endif /* STRIP_UNDERSCORE */
-} /* symbol_find() */
+}
symbolS *
symbol_find_base (name, strip_underscore)
@@ -668,16 +645,15 @@ symbol_find_base (name, strip_underscore)
return ((symbolS *) hash_find (sy_hash, name));
}
-/*
- * Once upon a time, symbols were kept in a singly linked list. At
- * least coff needs to be able to rearrange them from time to time, for
- * which a doubly linked list is much more convenient. Loic did these
- * as macros which seemed dangerous to me so they're now functions.
- * xoxorich.
- */
+/* Once upon a time, symbols were kept in a singly linked list. At
+ least coff needs to be able to rearrange them from time to time, for
+ which a doubly linked list is much more convenient. Loic did these
+ as macros which seemed dangerous to me so they're now functions.
+ xoxorich. */
+
+/* Link symbol ADDME after symbol TARGET in the chain. */
-/* Link symbol ADDME after symbol TARGET in the chain. */
-void
+void
symbol_append (addme, target, rootPP, lastPP)
symbolS *addme;
symbolS *target;
@@ -700,7 +676,7 @@ symbol_append (addme, target, rootPP, lastPP)
*rootPP = addme;
*lastPP = addme;
return;
- } /* if the list is empty */
+ } /* if the list is empty */
if (target->sy_next != NULL)
{
@@ -712,7 +688,7 @@ symbol_append (addme, target, rootPP, lastPP)
{
know (*lastPP == target);
*lastPP = addme;
- } /* if we have a next */
+ } /* if we have a next */
addme->sy_next = target->sy_next;
target->sy_next = addme;
@@ -724,8 +700,9 @@ symbol_append (addme, target, rootPP, lastPP)
debug_verify_symchain (symbol_rootP, symbol_lastP);
}
-/* Set the chain pointers of SYMBOL to null. */
-void
+/* Set the chain pointers of SYMBOL to null. */
+
+void
symbol_clear_list_pointers (symbolP)
symbolS *symbolP;
{
@@ -738,8 +715,9 @@ symbol_clear_list_pointers (symbolP)
}
#ifdef SYMBOLS_NEED_BACKPOINTERS
-/* Remove SYMBOLP from the list. */
-void
+/* Remove SYMBOLP from the list. */
+
+void
symbol_remove (symbolP, rootPP, lastPP)
symbolS *symbolP;
symbolS **rootPP;
@@ -751,28 +729,29 @@ symbol_remove (symbolP, rootPP, lastPP)
if (symbolP == *rootPP)
{
*rootPP = symbolP->sy_next;
- } /* if it was the root */
+ } /* if it was the root */
if (symbolP == *lastPP)
{
*lastPP = symbolP->sy_previous;
- } /* if it was the tail */
+ } /* if it was the tail */
if (symbolP->sy_next != NULL)
{
symbolP->sy_next->sy_previous = symbolP->sy_previous;
- } /* if not last */
+ } /* if not last */
if (symbolP->sy_previous != NULL)
{
symbolP->sy_previous->sy_next = symbolP->sy_next;
- } /* if not first */
+ } /* if not first */
debug_verify_symchain (*rootPP, *lastPP);
}
-/* Link symbol ADDME before symbol TARGET in the chain. */
-void
+/* Link symbol ADDME before symbol TARGET in the chain. */
+
+void
symbol_insert (addme, target, rootPP, lastPP)
symbolS *addme;
symbolS *target;
@@ -792,7 +771,7 @@ symbol_insert (addme, target, rootPP, lastPP)
{
know (*rootPP == target);
*rootPP = addme;
- } /* if not first */
+ } /* if not first */
addme->sy_previous = target->sy_previous;
target->sy_previous = addme;
@@ -803,7 +782,7 @@ symbol_insert (addme, target, rootPP, lastPP)
#endif /* SYMBOLS_NEED_BACKPOINTERS */
-void
+void
verify_symbol_chain (rootP, lastP)
symbolS *rootP;
symbolS *lastP;
@@ -862,10 +841,10 @@ resolve_symbol_value (symp, finalize)
struct local_symbol *locsym = (struct local_symbol *) symp;
if (local_symbol_resolved_p (locsym))
- return locsym->lsy_offset / OCTETS_PER_BYTE;
+ return locsym->lsy_offset / bfd_octets_per_byte (stdoutput);
final_val = (local_symbol_get_frag (locsym)->fr_address
- + locsym->lsy_offset) / OCTETS_PER_BYTE;
+ + locsym->lsy_offset) / bfd_octets_per_byte (stdoutput);
if (finalize)
{
@@ -891,7 +870,8 @@ resolve_symbol_value (symp, finalize)
if (symp->sy_resolving)
{
if (finalize)
- as_bad (_("Symbol definition loop encountered at %s"), S_GET_NAME (symp));
+ as_bad (_("Symbol definition loop encountered at %s"),
+ S_GET_NAME (symp));
final_val = 0;
resolved = 1;
}
@@ -1076,7 +1056,8 @@ resolve_symbol_value (symp, finalize)
S_GET_NAME (symp->sy_value.X_op_symbol));
if (seg_left != undefined_section
&& seg_right != undefined_section)
- as_bad_where (file, line, _("invalid section for operation"));
+ as_bad_where (file, line,
+ _("invalid section for operation"));
}
else
{
@@ -1144,7 +1125,7 @@ resolve_symbol_value (symp, finalize)
final_seg = absolute_section;
resolved = (symbol_resolved_p (add_symbol)
&& symbol_resolved_p (op_symbol));
- break;
+ break;
case O_register:
case O_big:
@@ -1180,7 +1161,8 @@ exit_dont_set_value:
symp->sy_resolved = 1;
else if (S_GET_SEGMENT (symp) != expr_section)
{
- as_bad (_("can't resolve value for symbol \"%s\""), S_GET_NAME (symp));
+ as_bad (_("can't resolve value for symbol \"%s\""),
+ S_GET_NAME (symp));
symp->sy_resolved = 1;
}
}
@@ -1228,7 +1210,7 @@ static char *dollar_label_defines;
static unsigned long dollar_label_count;
static unsigned long dollar_label_max;
-int
+int
dollar_label_defined (label)
long label;
{
@@ -1240,9 +1222,9 @@ dollar_label_defined (label)
if (*i == label)
return dollar_label_defines[i - dollar_labels];
- /* if we get here, label isn't defined */
+ /* If we get here, label isn't defined. */
return 0;
-} /* dollar_label_defined() */
+}
static long
dollar_label_instance (label)
@@ -1256,12 +1238,12 @@ dollar_label_instance (label)
if (*i == label)
return (dollar_label_instances[i - dollar_labels]);
- /* If we get here, we haven't seen the label before, therefore its instance
- count is zero. */
+ /* If we get here, we haven't seen the label before.
+ Therefore its instance count is zero. */
return 0;
}
-void
+void
dollar_label_clear ()
{
memset (dollar_label_defines, '\0', (unsigned int) dollar_label_count);
@@ -1269,7 +1251,7 @@ dollar_label_clear ()
#define DOLLAR_LABEL_BUMP_BY 10
-void
+void
define_dollar_label (label)
long label;
{
@@ -1283,7 +1265,7 @@ define_dollar_label (label)
return;
}
- /* if we get to here, we don't have label listed yet. */
+ /* If we get to here, we don't have label listed yet. */
if (dollar_labels == NULL)
{
@@ -1301,7 +1283,7 @@ define_dollar_label (label)
dollar_label_instances = (long *) xrealloc ((char *) dollar_label_instances,
dollar_label_max * sizeof (long));
dollar_label_defines = xrealloc (dollar_label_defines, dollar_label_max);
- } /* if we needed to grow */
+ } /* if we needed to grow */
dollar_labels[dollar_label_count] = label;
dollar_label_instances[dollar_label_count] = 1;
@@ -1309,31 +1291,28 @@ define_dollar_label (label)
++dollar_label_count;
}
-/*
- * dollar_label_name()
- *
- * Caller must copy returned name: we re-use the area for the next name.
- *
- * The mth occurence of label n: is turned into the symbol "Ln^Am"
- * where n is the label number and m is the instance number. "L" makes
- * it a label discarded unless debugging and "^A"('\1') ensures no
- * ordinary symbol SHOULD get the same name as a local label
- * symbol. The first "4:" is "L4^A1" - the m numbers begin at 1.
- *
- * fb labels get the same treatment, except that ^B is used in place of ^A.
- */
-
-char * /* Return local label name. */
+/* Caller must copy returned name: we re-use the area for the next name.
+
+ The mth occurence of label n: is turned into the symbol "Ln^Am"
+ where n is the label number and m is the instance number. "L" makes
+ it a label discarded unless debugging and "^A"('\1') ensures no
+ ordinary symbol SHOULD get the same name as a local label
+ symbol. The first "4:" is "L4^A1" - the m numbers begin at 1.
+
+ fb labels get the same treatment, except that ^B is used in place
+ of ^A. */
+
+char * /* Return local label name. */
dollar_label_name (n, augend)
- register long n; /* we just saw "n$:" : n a number */
- register int augend; /* 0 for current instance, 1 for new instance */
+ register long n; /* we just saw "n$:" : n a number. */
+ register int augend; /* 0 for current instance, 1 for new instance. */
{
long i;
- /* Returned to caller, then copied. used for created names ("4f") */
+ /* Returned to caller, then copied. Used for created names ("4f"). */
static char symbol_name_build[24];
register char *p;
register char *q;
- char symbol_name_temporary[20]; /* build up a number, BACKWARDS */
+ char symbol_name_temporary[20]; /* Build up a number, BACKWARDS. */
know (n >= 0);
know (augend == 0 || augend == 1);
@@ -1343,8 +1322,8 @@ dollar_label_name (n, augend)
#endif
*p++ = 'L';
- /* Next code just does sprintf( {}, "%d", n); */
- /* label number */
+ /* Next code just does sprintf( {}, "%d", n); */
+ /* Label number. */
q = symbol_name_temporary;
for (*q++ = 0, i = n; i; ++q)
{
@@ -1354,9 +1333,9 @@ dollar_label_name (n, augend)
while ((*p = *--q) != '\0')
++p;
- *p++ = 1; /* ^A */
+ *p++ = DOLLAR_LABEL_CHAR; /* ^A */
- /* instance number */
+ /* Instance number. */
q = symbol_name_temporary;
for (*q++ = 0, i = dollar_label_instance (n) + augend; i; ++q)
{
@@ -1365,27 +1344,26 @@ dollar_label_name (n, augend)
}
while ((*p++ = *--q) != '\0');;
- /* The label, as a '\0' ended string, starts at symbol_name_build. */
+ /* The label, as a '\0' ended string, starts at symbol_name_build. */
return symbol_name_build;
}
-/*
- * Sombody else's idea of local labels. They are made by "n:" where n
- * is any decimal digit. Refer to them with
- * "nb" for previous (backward) n:
- * or "nf" for next (forward) n:.
- *
- * We do a little better and let n be any number, not just a single digit, but
- * since the other guy's assembler only does ten, we treat the first ten
- * specially.
- *
- * Like someone else's assembler, we have one set of local label counters for
- * entire assembly, not one set per (sub)segment like in most assemblers. This
- * implies that one can refer to a label in another segment, and indeed some
- * crufty compilers have done just that.
- *
- * Since there could be a LOT of these things, treat them as a sparse array.
- */
+/* Sombody else's idea of local labels. They are made by "n:" where n
+ is any decimal digit. Refer to them with
+ "nb" for previous (backward) n:
+ or "nf" for next (forward) n:.
+
+ We do a little better and let n be any number, not just a single digit, but
+ since the other guy's assembler only does ten, we treat the first ten
+ specially.
+
+ Like someone else's assembler, we have one set of local label counters for
+ entire assembly, not one set per (sub)segment like in most assemblers. This
+ implies that one can refer to a label in another segment, and indeed some
+ crufty compilers have done just that.
+
+ Since there could be a LOT of these things, treat them as a sparse
+ array. */
#define FB_LABEL_SPECIAL (10)
@@ -1395,17 +1373,18 @@ static long *fb_label_instances;
static long fb_label_count;
static long fb_label_max;
-/* this must be more than FB_LABEL_SPECIAL */
+/* This must be more than FB_LABEL_SPECIAL. */
#define FB_LABEL_BUMP_BY (FB_LABEL_SPECIAL + 6)
-static void
+static void
fb_label_init ()
{
memset ((void *) fb_low_counter, '\0', sizeof (fb_low_counter));
-} /* fb_label_init() */
+}
+
+/* Add one to the instance number of this fb label. */
-/* add one to the instance number of this fb label */
-void
+void
fb_label_instance_inc (label)
long label;
{
@@ -1426,11 +1405,11 @@ fb_label_instance_inc (label)
{
++fb_label_instances[i - fb_labels];
return;
- } /* if we find it */
- } /* for each existing label */
+ } /* if we find it */
+ } /* for each existing label */
}
- /* if we get to here, we don't have label listed yet. */
+ /* If we get to here, we don't have label listed yet. */
if (fb_labels == NULL)
{
@@ -1447,14 +1426,14 @@ fb_label_instance_inc (label)
fb_label_max * sizeof (long));
fb_label_instances = (long *) xrealloc ((char *) fb_label_instances,
fb_label_max * sizeof (long));
- } /* if we needed to grow */
+ } /* if we needed to grow */
fb_labels[fb_label_count] = label;
fb_label_instances[fb_label_count] = 1;
++fb_label_count;
}
-static long
+static long
fb_label_instance (label)
long label;
{
@@ -1473,8 +1452,8 @@ fb_label_instance (label)
if (*i == label)
{
return (fb_label_instances[i - fb_labels]);
- } /* if we find it */
- } /* for each existing label */
+ } /* if we find it */
+ } /* for each existing label */
}
/* We didn't find the label, so this must be a reference to the
@@ -1482,38 +1461,39 @@ fb_label_instance (label)
return 0;
}
-/*
- * fb_label_name()
- *
- * Caller must copy returned name: we re-use the area for the next name.
- *
- * The mth occurence of label n: is turned into the symbol "Ln^Bm"
- * where n is the label number and m is the instance number. "L" makes
- * it a label discarded unless debugging and "^B"('\2') ensures no
- * ordinary symbol SHOULD get the same name as a local label
- * symbol. The first "4:" is "L4^B1" - the m numbers begin at 1.
- *
- * dollar labels get the same treatment, except that ^A is used in place of ^B. */
-
-char * /* Return local label name. */
+/* Caller must copy returned name: we re-use the area for the next name.
+
+ The mth occurence of label n: is turned into the symbol "Ln^Bm"
+ where n is the label number and m is the instance number. "L" makes
+ it a label discarded unless debugging and "^B"('\2') ensures no
+ ordinary symbol SHOULD get the same name as a local label
+ symbol. The first "4:" is "L4^B1" - the m numbers begin at 1.
+
+ dollar labels get the same treatment, except that ^A is used in
+ place of ^B. */
+
+char * /* Return local label name. */
fb_label_name (n, augend)
- long n; /* we just saw "n:", "nf" or "nb" : n a number */
- long augend; /* 0 for nb, 1 for n:, nf */
+ long n; /* We just saw "n:", "nf" or "nb" : n a number. */
+ long augend; /* 0 for nb, 1 for n:, nf. */
{
long i;
- /* Returned to caller, then copied. used for created names ("4f") */
+ /* Returned to caller, then copied. Used for created names ("4f"). */
static char symbol_name_build[24];
register char *p;
register char *q;
- char symbol_name_temporary[20]; /* build up a number, BACKWARDS */
+ char symbol_name_temporary[20]; /* Build up a number, BACKWARDS. */
know (n >= 0);
know (augend == 0 || augend == 1);
p = symbol_name_build;
+#ifdef LOCAL_LABEL_PREFIX
+ *p++ = LOCAL_LABEL_PREFIX;
+#endif
*p++ = 'L';
- /* Next code just does sprintf( {}, "%d", n); */
- /* label number */
+ /* Next code just does sprintf( {}, "%d", n); */
+ /* Label number. */
q = symbol_name_temporary;
for (*q++ = 0, i = n; i; ++q)
{
@@ -1523,9 +1503,9 @@ fb_label_name (n, augend)
while ((*p = *--q) != '\0')
++p;
- *p++ = 2; /* ^B */
+ *p++ = LOCAL_LABEL_CHAR; /* ^B */
- /* instance number */
+ /* Instance number. */
q = symbol_name_temporary;
for (*q++ = 0, i = fb_label_instance (n) + augend; i; ++q)
{
@@ -1534,15 +1514,13 @@ fb_label_name (n, augend)
}
while ((*p++ = *--q) != '\0');;
- /* The label, as a '\0' ended string, starts at symbol_name_build. */
+ /* The label, as a '\0' ended string, starts at symbol_name_build. */
return (symbol_name_build);
-} /* fb_label_name() */
+}
-/*
- * decode name that may have been generated by foo_label_name() above. If
- * the name wasn't generated by foo_label_name(), then return it unaltered.
- * This is used for error messages.
- */
+/* Decode name that may have been generated by foo_label_name() above.
+ If the name wasn't generated by foo_label_name(), then return it
+ unaltered. This is used for error messages. */
char *
decode_local_label_name (s)
@@ -1553,17 +1531,23 @@ decode_local_label_name (s)
int label_number;
int instance_number;
char *type;
- const char *message_format = _("\"%d\" (instance number %d of a %s label)");
+ const char *message_format;
+ int index = 0;
- if (s[0] != 'L')
+#ifdef LOCAL_LABEL_PREFIX
+ if (s[index] == LOCAL_LABEL_PREFIX)
+ ++index;
+#endif
+
+ if (s[index] != 'L')
return s;
- for (label_number = 0, p = s + 1; isdigit ((unsigned char) *p); ++p)
+ for (label_number = 0, p = s + index + 1; isdigit ((unsigned char) *p); ++p)
label_number = (10 * label_number) + *p - '0';
- if (*p == 1)
+ if (*p == DOLLAR_LABEL_CHAR)
type = "dollar";
- else if (*p == 2)
+ else if (*p == LOCAL_LABEL_CHAR)
type = "fb";
else
return s;
@@ -1571,6 +1555,7 @@ decode_local_label_name (s)
for (instance_number = 0, p++; isdigit ((unsigned char) *p); ++p)
instance_number = (10 * instance_number) + *p - '0';
+ message_format = _("\"%d\" (instance number %d of a %s label)");
symbol_decode = obstack_alloc (&notes, strlen (message_format) + 30);
sprintf (symbol_decode, message_format, label_number, instance_number, type);
@@ -1678,7 +1663,7 @@ S_IS_EXTERNAL (s)
flags = s->bsym->flags;
- /* sanity check */
+ /* Sanity check. */
if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL))
abort ();
@@ -1735,7 +1720,7 @@ S_IS_LOCAL (s)
flags = s->bsym->flags;
- /* sanity check */
+ /* Sanity check. */
if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL))
abort ();
@@ -1750,8 +1735,8 @@ S_IS_LOCAL (s)
name = S_GET_NAME (s);
return (name != NULL
&& ! S_IS_DEBUG (s)
- && (strchr (name, '\001')
- || strchr (name, '\002')
+ && (strchr (name, DOLLAR_LABEL_CHAR)
+ || strchr (name, LOCAL_LABEL_CHAR)
|| (! flag_keep_locals
&& (bfd_is_local_label (stdoutput, s->bsym)
|| (flag_mri
@@ -1814,7 +1799,7 @@ S_SET_SEGMENT (s, seg)
if (s->bsym->flags & BSF_SECTION_SYM)
{
if (s->bsym->section != seg)
- abort();
+ abort ();
}
else
s->bsym->section = seg;
@@ -1831,8 +1816,19 @@ S_SET_EXTERNAL (s)
/* Let .weak override .global. */
return;
}
+ if (s->bsym->flags & BSF_SECTION_SYM)
+ {
+ char * file;
+ unsigned int line;
+
+ /* Do not reassign section symbols. */
+ as_where (& file, & line);
+ as_warn_where (file, line,
+ _("Section symbols are already global"));
+ return;
+ }
s->bsym->flags |= BSF_GLOBAL;
- s->bsym->flags &= ~(BSF_LOCAL|BSF_WEAK);
+ s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
}
void
@@ -1847,7 +1843,7 @@ S_CLEAR_EXTERNAL (s)
return;
}
s->bsym->flags |= BSF_LOCAL;
- s->bsym->flags &= ~(BSF_GLOBAL|BSF_WEAK);
+ s->bsym->flags &= ~(BSF_GLOBAL | BSF_WEAK);
}
void
@@ -1857,7 +1853,7 @@ S_SET_WEAK (s)
if (LOCAL_SYMBOL_CHECK (s))
s = local_symbol_convert ((struct local_symbol *) s);
s->bsym->flags |= BSF_WEAK;
- s->bsym->flags &= ~(BSF_GLOBAL|BSF_LOCAL);
+ s->bsym->flags &= ~(BSF_GLOBAL | BSF_LOCAL);
}
void
@@ -2125,7 +2121,7 @@ symbol_section_p (s)
#ifdef BFD_ASSEMBLER
return (s->bsym->flags & BSF_SECTION_SYM) != 0;
#else
- /* FIXME */
+ /* FIXME. */
return 0;
#endif
}
@@ -2237,7 +2233,7 @@ void
symbol_begin ()
{
symbol_lastP = NULL;
- symbol_rootP = NULL; /* In case we have 0 symbols (!!) */
+ symbol_rootP = NULL; /* In case we have 0 symbols (!!) */
sy_hash = hash_new ();
#ifdef BFD_ASSEMBLER
local_hash = hash_new ();
@@ -2249,7 +2245,7 @@ symbol_begin ()
abs_symbol.bsym = bfd_abs_section.symbol;
#endif
#else
- /* Can't initialise a union. Sigh. */
+ /* Can't initialise a union. Sigh. */
S_SET_SEGMENT (&abs_symbol, absolute_section);
#endif
abs_symbol.sy_value.X_op = O_constant;
@@ -2258,8 +2254,6 @@ symbol_begin ()
if (LOCAL_LABELS_FB)
fb_label_init ();
}
-
-
int indent_level;
@@ -2361,7 +2355,7 @@ print_symbol_value (sym)
static void
print_binary (file, name, exp)
FILE *file;
- const char * name;
+ const char *name;
expressionS *exp;
{
indent_level++;
@@ -2506,5 +2500,3 @@ symbol_print_statistics (file)
local_symbol_count, local_symbol_conversion_count);
#endif
}
-
-/* end of symbols.c */
diff --git a/gnu/usr.bin/binutils/gas/symbols.h b/gnu/usr.bin/binutils/gas/symbols.h
index f3b73af9660..ad2cde0f2ac 100644
--- a/gnu/usr.bin/binutils/gas/symbols.h
+++ b/gnu/usr.bin/binutils/gas/symbols.h
@@ -1,5 +1,5 @@
/* symbols.h -
- Copyright (C) 1987, 90, 92, 93, 94, 95, 97, 1999
+ Copyright 1987, 1990, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -31,7 +31,7 @@
#include "struc-symbol.h"
#endif
-extern struct obstack notes; /* eg FixS live here. */
+extern struct obstack notes; /* eg FixS live here. */
extern struct obstack cond_obstack; /* this is where we track .ifdef/.endif
(if we do that at all). */
@@ -201,5 +201,3 @@ void symbol_set_obj PARAMS ((symbolS *, OBJ_SYMFIELD_TYPE *));
TC_SYMFIELD_TYPE *symbol_get_tc PARAMS ((symbolS *));
void symbol_set_tc PARAMS ((symbolS *, TC_SYMFIELD_TYPE *));
#endif
-
-/* end of symbols.h */
diff --git a/gnu/usr.bin/binutils/gas/testsuite/ChangeLog b/gnu/usr.bin/binutils/gas/testsuite/ChangeLog
index 01ab8237084..a0c959e7f3c 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/ChangeLog
+++ b/gnu/usr.bin/binutils/gas/testsuite/ChangeLog
@@ -1,7 +1,774 @@
+2001-06-18 Philip Blundell <philb@gnu.org>
+
+ * gas/arm/arm.exp (msr_bad): Deleted.
+ * gas/arm/msr-bad.s: Likewise.
+
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-06-10 H.J. Lu <hjl@gnu.org>
+ * gas/elf/section2.l: Match various white spaces.
+ * gas/elf/section2.e: Support 64bit ELF.
+ * gas/elf/section2.e-mips: Likewise.
+
+ 2001-06-08 Alan Modra <amodra@bigpond.net.au>
+ * gas/elf/elf.exp (run_list_test): Undo $readelf change in 2001-06-07.
+
+ 2001-06-07 H.J. Lu <hjl@gnu.org>
+ * gas/elf/section2.e-mips: New file.
+ * gas/elf/elf.exp (run_list_test): Add suffix.
+ Pass -mips as suffix to run_list_test for mips.
+ * gas/elf/section2.l: Match ".*GAS.*" instead of
+ "GAS LISTING .*".
+ * gas/mips/mips.exp: Set xfail for "lineno" on Linux/mips.
+ * gas/mips/empic.d: Support stabs.
+ * gas/mips/mips16-e.d: Likewise.
+ * gas/mips/mips16-f.d: Likewise.
+ * gas/mips/mipsel16-f.d: Likewise.
+ * gas/mips/telempic.d: Likewise.
+ * gas/mips/tempic.d: Likewise.
+ * gas/mips/tmips16-e.d: Likewise.
+ * gas/mips/tmipsel16-e.d: Likewise.
+
+ 2001-06-06 H.J. Lu <hjl@gnu.org>
+ * gas/mips/elf-rel3.s: New file.
+ * gas/mips/elf-rel3.d: Likewise.
+ * gas/mips/elfel-rel3.s: Likewise.
+ * gas/mips/elfel-rel3.d: Likewise.
+ * gas/mips/mips.exp: Run elf-rel3/elfel-rel3.
+ * gas/elf/elf.exp (run_list_test): New.
+ Run section2 with run_list_test.
+ * gas/elf/section2.e: New file.
+ * gas/elf/section2.l: Likewise.
+ * gas/elf/section2.s: Likewise.
+
+ 2001-06-04 H.J. Lu <hjl@gnu.org>
+ * gas/mips/mips4010.s: Add the missing ".end".
+ * gas/mips/mips4100.s: Likewise.
+ * gas/mips/mips4650.s: Likewise.
+ * gas/mips/sync.s: Likewise.
+
+ 2001-06-02 H.J. Lu <hjl@gnu.org>
+ * gas/sparc/unalign.d: Support Sparc V9.
+
+ 2001-05-25 H.J. Lu <hjl@gnu.org>
+ * gas/mips/e32el-rel2.d: New for little endian mips.
+ * gas/mips/elfel-rel2.d: Likewise.
+ * gas/mips/elfel-rel.d: Likewise.
+ * gas/mips/mipsel16-f.d: Likewise.
+ * gas/mips/telempic.d: Likewise.
+ * gas/mips/tmipsel16-e.d: Likewise.
+ * gas/mips/tempic.d: New for traditional mips.
+ * gas/mips/tmips16-e.d: Likewise.
+ * gas/mips/elf-rel.d: Handle alignment padding.
+ * gas/mips/elf-rel2.d: Likewise.
+ * gas/mips/mips.exp: Support little endian and traditional
+ mips.
+
+ 2001-05-24 H.J. Lu <hjl@gnu.org>
+ * gas/m68k/pcrel.d: Support 64bit BFD.
+ * gas/arm/adrl.d: Support 64bit BFD.
+ * gas/arm/arm7t.d: Likewise.
+ * gas/arm/inst.d: Likewise.
+ * gas/arm/pic.d: Likewise.
+ * gas/arm/xscale.d: Likewise.
+
+ 2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * gas/mips/abs.d: Remove $ before register names, per latest
+ disassembler.
+ * gas/mips/add.d: Ditto.
+ * gas/mips/and.d: Ditto.
+ * gas/mips/beq.d: Ditto.
+ * gas/mips/bge.d: Ditto.
+ * gas/mips/bgeu.d: Ditto.
+ * gas/mips/blt.d: Ditto.
+ * gas/mips/bltu.d: Ditto.
+ * gas/mips/delay.d: Ditto.
+ * gas/mips/div-ilocks.d: Ditto.
+ * gas/mips/div.d: Ditto.
+ * gas/mips/dli.d: Ditto.
+ * gas/mips/elf_e_flags1.d: Ditto.
+ * gas/mips/elf_e_flags2.d: Ditto.
+ * gas/mips/elf_e_flags3.d: Ditto.
+ * gas/mips/elf_e_flags4.d: Ditto.
+ * gas/mips/jal-empic.d: Ditto.
+ * gas/mips/jal-svr4pic.d: Ditto.
+ * gas/mips/jal-xgot.d: Ditto.
+ * gas/mips/jal.d: Ditto.
+ * gas/mips/la-empic.d: Ditto.
+ * gas/mips/la-svr4pic.d: Ditto.
+ * gas/mips/la-xgot.d: Ditto.
+ * gas/mips/la.d: Ditto.
+ * gas/mips/lb-empic.d: Ditto.
+ * gas/mips/lb-svr4pic.d: Ditto.
+ * gas/mips/lb-xgot-ilocks.d: Ditto.
+ * gas/mips/lb-xgot.d: Ditto.
+ * gas/mips/lb.d: Ditto.
+ * gas/mips/ld-empic.d: Ditto.
+ * gas/mips/ld-ilocks-addr32.d: Ditto.
+ * gas/mips/ld-ilocks.d: Ditto.
+ * gas/mips/ld-svr4pic.d: Ditto.
+ * gas/mips/ld-xgot.d: Ditto.
+ * gas/mips/ld.d: Ditto.
+ * gas/mips/li.d: Ditto.
+ * gas/mips/lif-empic.d: Ditto.
+ * gas/mips/lif-svr4pic.d: Ditto.
+ * gas/mips/lif-xgot.d: Ditto.
+ * gas/mips/lifloat.d: Ditto.
+ * gas/mips/mips16.d: Ditto.
+ * gas/mips/mips32.d: Ditto.
+ * gas/mips/mips4.d: Ditto.
+ * gas/mips/mips4010.d: Ditto.
+ * gas/mips/mips4100.d: Ditto.
+ * gas/mips/mips4650.d: Ditto.
+ * gas/mips/mips64.d: Ditto.
+ * gas/mips/mul-ilocks.d: Ditto.
+ * gas/mips/mul.d: Ditto.
+ * gas/mips/nodelay.d: Ditto.
+ * gas/mips/rol.d: Ditto.
+ * gas/mips/sb.d: Ditto.
+ * gas/mips/trap20.d: Ditto.
+ * gas/mips/trunc.d: Ditto.
+ * gas/mips/uld.d: Ditto.
+ * gas/mips/ulh-empic.d: Ditto.
+ * gas/mips/ulh-svr4pic.d: Ditto.
+ * gas/mips/ulh-xgot.d: Ditto.
+ * gas/mips/ulh.d: Ditto.
+ * gas/mips/ulw.d: Ditto.
+ * gas/mips/usd.d: Ditto.
+ * gas/mips/ush.d: Ditto.
+ * gas/mips/usw.d: Ditto.
+
+ 2001-04-05 Hans-Peter Nilsson <hp@axis.com>
+ * lib/gas-defs.exp (run_dump_test): Support using readelf.
+ * config/default.exp: Default READELF and READELFFLAGS.
+
+ 2001-03-30 H.J. Lu <hjl@gnu.org>
+ * gas/i386/relax.d: Dump with -s instead of -drw.
+
+ 2001-03-29 H.J. Lu <hjl@gnu.org>
+ * gas/i386/relax.s: New test for relaxation between sections.
+ * gas/i386/relax.d: New.
+ * gas/i386/i386.exp: Add tests for ELF.
+
+ 2001-03-27 Chris Demetriou <cgd@broadcom.com>
+ * gas/mips/lineno.d: Allow for the possibility that
+ the local labels won't be in the objdump output. Match
+ zeros in addresses using '+' for better compatibility with
+ different targets.
+
+ 2001-03-26 Chris Demetriou <cgd@broadcom.com>
+ * gas/mips/sync.s: Declare 'foo' as a function so that this
+ test will work on properly on ECOFF targets.
+
+ 2001-03-18 H.J. Lu <hjl@gnu.org>
+ * gas/i386/intel.s: Move PIC code to ...
+ * gas/i386/intelpic.s: New. Here.
+ * gas/i386/intel.d: Updated.
+ * gas/i386/intelpic.d: New.
+ * gas/i386/i386.exp: Check PIC code in Intel syntax for ELF
+ targets only.
+
+ 2001-02-17 Chris Demetriou <cgd@broadcom.com>
+ * gas/mips/mips32.d: Remove ELF dependencies. This test
+ wasn't meant to be ELF specific, and doesn't have to be.
+ * gas/mips/mips64.d: Likewise.
+ * gas/mips/mips.exp: Don't attempt the elf_e_flags family of
+ tests if not ELF; they test ELF-specific features.
+
+2001-05-28 Jeff Sturm <jsturm@one-point.com>
+
+ * gas/sparc/unalign.s: New test. Check unaligned relocs.
+ * gas/sparc/unalign.d: New expected test results.
+ * gas/sparc/sparc.exp: Run new test.
+
+2001-05-23 Alan Modra <amodra@one.net.au>
+
+ * gas/elf/ehopt0.d: Tweak for bigendian targets.
+
+2001-05-14 Richard Henderson <rth@redhat.com>
+
+ * gas/elf/ehopt0.s: New.
+ * gas/elf/ehopt0.d: New.
+ * gas/elf/elf.exp: Run it.
+
+2001-05-12 Alan Modra <amodra@one.net.au>
+
+ * gas/i386/sse2.s: Correct cvtps2dq, movdq2q, and movq2dq
+ * gas/i386/sse2.d: Likewise. Fix pmuludq and punpckhqdq too.
+
+ * gas/i386/ssemmx2.d: Correct movq.
+
+2001-05-04 Alan Modra <amodra@one.net.au>
+
+ * gas/i386/katmai.d: Correct pmovmskb and pextrw opcodes.
+ * gas/i386/ssemmx2.d: Likewise. Correct register for pextrw,
+ pinsrw, and pmovmskb.
+ * gas/i386/sse2.d: Correct register for movmskpd.
+
+2001-03-31 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/all/cond.s: Add .if .elseif tree.
+ * gas/all/cond.d: Match above.
+
+2001-03-24 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/i386/ssemmx2.s: Change movntq to movntdq.
+ * gas/i386/ssemmx2.d: Matching change.
+
+2001-03-19 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * gas/vax/quad.exp: Correct expected result.
+
+2001-03-19 Andreas Schwab <schwab@suse.de>
+
+ * gas/m68k/pcrel.s: Force alignment to 8 byte boundary to get
+ consistent output across targets.
+ * gas/m68k/pcrel.d: Adjusted.
+
+2001-03-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * gas/mri/mri.exp: Fix test of m6811/m6812 targets.
+
+2001-03-17 Philip Blundell <philb@gnu.org>
+
+ * gas/vtable/vtable.exp: Don't run tests on AVR.
+ * gas/macros/macros.exp: Mark strings test xfail for AVR.
+
+2001-02-23 H.J. Lu <hjl@gnu.org>
+
+ * gas/ia64/opc-a-err.l: Fix "cmp4.lt.or".
+
+ * gas/ia64/opc-a.pl: Add tests for pseudo-ops for "cmp" and
+ "cmp4".
+ * gas/ia64/opc-a.s: Rebuilt.
+ * gas/ia64/opc-a.d: Likewise.
+
+2001-02-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * gas/mri/mri.exp: Don't execute the M68K specific tests
+ on m6811-elf and m6812-elf targets, still run the generic MRI tests.
+
+2001-02-04 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * gas/m68hc11/malis.s: New test to verify compliance with Motorola
+ Assembly Language Input Standard.
+ * gas/m68hc11/malis.d: New file.
+ * gas/m68hc11/malis-include.s: New file.
+ * gas/m68hc11/all.exp: Add the new test.
+
+2001-01-12 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/i386/i386.exp (gas_64_check): Correct target string.
+ Use gas_64_check rather than target string to decided whether
+ x86_64 checks should run.
+
+ * gas/i386/sse2.s: Add a label to cure objdump "no symbols" error.
+ * gas/i386/ssemmx2.s: Likewise.
+ * gas/i386/sse2.d: Update to suit.
+ * gas/i386/ssemmx2.s: Likewise.
+
+2001-01-11 Peter Targett <peter.targett@arccores.com>
+
+ * gas/arc/alias.*: Removed.
+ * gas/arc/branch.*: Likewise.
+ * gas/arc/insn3.*: Likewise.
+ * gas/arc/math.*: Likewise.
+ * gas/arc/sshift.*: Likewise.
+ * gas/arc/arc.exp: Simplified test process for base case
+ instruction set by adding run_dump_test cases for all base
+ instructions.
+ * gas/arc/adc.s, gas/arc/adc.d: New test cases and dump.
+ * gas/arc/add.s, gas/arc/add.d: Likewise.
+ * gas/arc/and.s, gas/arc/and.d: Likewise.
+ * gas/arc/asl.s, gas/arc/asl.d: Likewise.
+ * gas/arc/asr.s, gas/arc/asr.d: Likewise.
+ * gas/arc/b.s, gas/arc/b.d: Likewise.
+ * gas/arc/bic.s, gas/arc/bic.d: Likewise.
+ * gas/arc/bl.s, gas/arc/bl.d: Likewise.
+ * gas/arc/brk.s, gas/arc/brk.d: Likewise.
+ * gas/arc/extb.s, gas/arc/extb.d: Likewise.
+ * gas/arc/extw.s, gas/arc/extw.d: Likewise.
+ * gas/arc/flag.s, gas/arc/flag.d: Likewise.
+ * gas/arc/j.s, gas/arc/j.d: Likewise.
+ * gas/arc/jl.s, gas/arc/jl.d: Likewise.
+ * gas/arc/ld.s, gas/arc/ld.d: Likewise.
+ * gas/arc/ld2.s, gas/arc/ld2.d: Likewise.
+ * gas/arc/lp.s, gas/arc/lp.d: Likewise.
+ * gas/arc/lsr.s, gas/arc/lsr.d: Likewise.
+ * gas/arc/mov.s, gas/arc/mov.d: Likewise.
+ * gas/arc/nop.s, gas/arc/nop.d: Likewise.
+ * gas/arc/or.s, gas/arc/or.d: Likewise.
+ * gas/arc/rlc.s, gas/arc/rlc.d: Likewise.
+ * gas/arc/ror.s, gas/arc/ror.d: Likewise.
+ * gas/arc/rrc.s, gas/arc/rrc.d: Likewise.
+ * gas/arc/sbc.s, gas/arc/sbc.d: Likewise.
+ * gas/arc/sexb.s, gas/arc/sexb.d: Likewise.
+ * gas/arc/sexw.s, gas/arc/sexw.d: Likewise.
+ * gas/arc/sleep.s, gas/arc/sleep.d: Likewise.
+ * gas/arc/add.s, gas/arc/add.d: Likewise.
+ * gas/arc/st.s, gas/arc/st.d: Likewise.
+ * gas/arc/sub.s, gas/arc/sub.d: Likewise.
+ * gas/arc/swi.s, gas/arc/swi.d: Likewise.
+ * gas/arc/xor.s, gas/arc/xor.d: Likewise.
+ * gas/arc/warn.s: Removed warning test case for setting of flags
+ followed by conditional branch, an arc5 only feature.
+
+ * gas/ieee-fp/x930509a.exp: Skip test if target also arc*-*-*.
+
+ * gas/vtable/vtable.exp: Skip tests if target also arc*-*-*.
+
+2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * gas/m68hc11/opers12.s: Add more tests for index post byte.
+ * gas/m68hc11/opers12.d: Likewise.
+
+2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * gas/m68hc11/all.exp: Add new tests for dwarf2.
+ * gas/m68hc11/lbranch-dwarf2.d: New file, test for dwarf2.
+ * gas/m68hc11/opers12-dwarf2.d: Likewise.
+ * gas/m68hc11/insns-dwarf2.d: Likewise.
+
+2001-01-11 Nick Clifton <nickc@redhat.com>
+
+ * gas/arm/adrl.s: Add global label 'foo'.
+ * gas/arm/adrl.d: Expect to see references to 'foo' in the
+ disassembly. COFF and ELF disassemblys should now be the same.
+
+Wed Jan 10 15:14:54 MET 2001 Jan Hubicka <jh@suse.cz>
+
+ * i386.exp: Add ssemmx2 and sse2 tests.
+ (sse2.d, sse2.s, ssemmx2.d, ssemmx2.s): New tests.
+
+2001-01-09 Nick Clifton <nickc@redhat.com>
+
+ * gas/arm/pic.d: Fix patterns to match new behaviour of
+ disassembler.
+ inst.d: Fix patterns to match new behaviour of disassembler.
+
+2001-01-03 Philip Blundell <pb@futuretv.com>
+
+ * gas/vtable/vtable.exp: Don't run tests on Alpha.
+
+Sat Jan 6 13:34:07 MET 2001 Jan Hubicka <jh@suse.cz>
+
+ * i386.exp: Add tests for presence of 32bit versus 64bit output
+ format; run both 64bit and 32bit tests when format is available;
+ add x86_64 test.
+ * x86_64.s: New file.
+ * x86_64.d: New file.
+
+2001-01-02 Nick Clifton <nickc@redhat.com>
+
+ * gas/arm/arm.exp: Pass -marmv3 to msr-bad test, since the
+ instruction is legal in v5. Also fix expected error message.
+
+2001-01-01 Philip Blundell <philb@gnu.org>
+
+ * gas/arm/adrl.s, gas/arm/pic.s, gas/arm/msr-bad.s: New tests.
+ * gas/arm/arm.exp: Run them.
+ * gas/arm/adrl.d, gas/arm/pic.d: Expected results for above.
+ * gas/arm/arm6.s: Also test uppercase `CPSR' and `SPSR'.
+
+2000-12-22 H.J. Lu <hjl@gnu.org>
+
+ * gas/i386/intel.s: Replace "nop" with ".p2align 4,0".
+ * gas/i386/intel.d: Updated.
+
+2000-12-12 Jim Wilson <wilson@redhat.com>
+
+ * gas/ia64/dv-imply.d, gas/ia64/dv-mutex.d, gas/ia64/dv-safe.d,
+ gas/ia64/dv-srlz.d, gas/ia64/opc-m.d: Update.
+
+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * gas/vtable/vtable.exp: Fix formatting.
+
+ * gas/arm/elsegundo.s: New Test (currently disabled).
+ * gas/arm/elsegundo.d: Expected test results.
+
+2000-12-11 H.J. Lu <hjl@gnu.org>
+
+ * gas/i386/intel.d: Adjusted for the a.out assembler.
+ * gas/i386/intel.s: Likewise.
+
+2000-12-09 Nick Clifton <nickc@redhat.com>
+
+ * gas/m68k/pcrel.d: Update to match latest assembler output.
+
+2000-12-02 Chris Demetriou <cgd@sibyte.com>
+
+ * gas/mips/elf_e_flags.s: Add padding to the end of the
+ file so that objdump output will be consistent.
+ * gas/mips/elf_e_flags1.d, gas/mips/elf_e_flags2.d,
+ gas/mips/elf_e_flags3.d, gas/mips/elf_e_flags4.d: Expect
+ "..." at end of objdump output because of zero bytes at end
+ of section.
+ * gas/mips/elf_e_flags.c: Add note to comment about
+ what's changing in elf_e_flags.s.
+
+ * gas/mips/la.s: Add padding to the end of the file so that
+ objdump output will be consistent.
+ * gas/mips/la-svr4pic.d, gas/mips/la-xgot.d: Expect "..." at
+ end of objdump output because of zero bytes at end of
+ section.
+
+ * gas/mips/sync.s: Add padding to the end of the file so that
+ objdump output will be consistent.
+ * gas/mips/sync.d: Expect "..." at end of objdump output
+ because of zero bytes at end of section.
+
+ * gas/mips/empic.d: Pad sections out to 16 bytes, to avoid
+ alignment issues so tests are useful on multiple targets.
+ * gas/mips/empic.s: Likewise.
+ * gas/mips/mips16-e.d: Likewise.
+ * gas/mips/mips16-e.s: Likewise.
+ * gas/mips/mips16-f.d: Likewise.
+ * gas/mips/mips16-f.s: Likewise.
+
+ * gas/mips/mips32.d: Expect disassembly of madd and maddu
+ to use their correct names. Add tests for break and sdbbp.
+ * gas/mips/mips32.s: Likewise.
+
+ * gas/mips/mips64.s: Add test for assembly of MIPS64
+ extensions.
+ * gas/mips/mips64.d: Likewise.
+ * gas/mips/mips.exp: Test using the new "mips64" test.
+
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ * gas/mips/mips16.d: Expect mips16 nops to be used for padding
+ when mips16 code generation is enabled.
+
+ * gas/mips/empic.d: Adjust for the fact that the difference
+ between two symbols in the same section are not expected to
+ generate a reloc.
+ * gas/mips/empic.s: Likewise. Also, correct typo in comment
+ about expected relocs.
+
+ * gas/mips/mips32.s, gas/mips/mips32.d: New files for MIPS32
+ instruction assembly test.
+ * gas/mips/mips.exp: Add the test mentioned above.
+
+2000-11-30 Diego Novillo <dnovillo@redhat.com>
+
+ * intel.s, intel.d: New test for @GOT references.
+
+2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * gas/sh/err.exp: New, framework for error-testing.
+ * gas/sh/err-1.s: New test.
+
+2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * gas/m68hc11/opers12.s: New test for movw operands.
+ * gas/m68hc11/opers12.d: Likewise.
+
+2000-11-24 Nick Clifton <nickc@redhat.com>
+
+ * arm.exp: Run tests for xscale as well as arm.
+ Run xscale tests.
+
+ * xscale.s: New file: XScale instruction tests.
+ * xscale.d: New file: Expected XScale instruction results.
+
+2000-11-20 H.J. Lu <hjl@gnu.org>
+
+ * gas/i386/intel.d: Add 3 "nop"s for the a.out assembler.
+ * gas/i386/intel.s: Likewise.
+
+2000-11-16 H.J. Lu <hjl@gnu.org>
+
+ * gas/symver/symver0.d: Add 64bit support.
+ * gas/symver/symver1.d: Likewise.
+
+2000-11-16 H.J. Lu <hjl@gnu.org>
+
+ * gas/symver/symver.exp: Don't run symver4 nor symver5.
+
+2000-11-13 H.J. Lu <hjl@gnu.org>
+
+ * gas/symver/symver.exp: New for symver test.
+ * gas/symver/symver0.d: Likewise.
+ * gas/symver/symver0.s: Likewise.
+ * gas/symver/symver1.d: Likewise.
+ * gas/symver/symver1.s: Likewise.
+ * gas/symver/symver2.l: Likewise.
+ * gas/symver/symver2.s: Likewise.
+ * gas/symver/symver3.l: Likewise.
+ * gas/symver/symver3.s: Likewise.
+ * gas/symver/symver4.l: Likewise.
+ * gas/symver/symver4.s: Likewise.
+ * gas/symver/symver5.l: Likewise.
+ * gas/symver/symver5.s: Likewise.
+ * gas/symver/symver6.l: Likewise.
+ * gas/symver/symver6.s: Likewise.
+
+2000-11-11 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * gas/macros/macros.exp: Mark strings test xfail for sh.
+
+2000-10-24 Diego Novillo <dnovillo@cygnus.com>
+
+ * intel.s, intel.d: Add new tests for intel syntax.
+
+2000-10-19 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/elf/section0.s: Ensure section sizes are multiples of 16.
+ * gas/elf/section1.s: Likewise.
+ * gas/elf/section[01].d: Change to suit.
+
+2000-10-18 H.J. Lu <hjl@gnu.org>
+
+ * gas/i386/intel.d: Fix the support for 64bit BFD in the last
+ change.
+
+2000-10-15 Diego Novillo <dnovillo@cygnus.com>
+
+ * intel.s, intel.d: Add new tests for naked registers using intel
+ syntax.
+
+2000-09-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * gas/cris/regprefix-err-1.s, gas/cris/rd-regprefix-1.s,
+ gas/cris/rd-regprefix-1.d, gas/cris/rd-regprefix-1b.d,
+ gas/cris/us-err-1.s, gas/cris/us-err-2.s, gas/cris/us-err-3.s: New.
+ * gas/cris/cris.exp: Loop run_dump_test over files matching rd-*.d.
+
+2000-09-28 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/hppa/parse/parse.exp: Replace "hppa*w-*-*" with "hppa*64*-*-*"
+ * gas/hppa/reloc/reloc.exp: Likewise.
+ * gas/hppa/unsorted/unsorted.exp: Likewise.
+
+ * gas/hppa/reloc/reduce.s: Modify .PARAM so we need an arg reloc.
+
+2000-09-22 Jim Wilson <wilson@cygnus.com>
+
+ * gas/ia64/opc-f.pl: Add missing fcmp and fpcmp tests.
+ * gas/ia64/opc-f.s, gas/ia64/opc-f.d: Regenerate.
+
+ * gas/ia64/dv-raw-err.s: Add new testcases for PR%, 16 - 62.
+ * gas/ia64/dv-waw-err.s: Likewise.
+ * gas/ia64/dv-imply.d: Regenerate.
+ * gas/ia64/dv-mutex.d, gas/ia64/dv-raw-err.l, gas/ia64/dv-safe.d,
+ gas/ia64/dv-srlz.d, gas/ia64/dv-war-err.l, gas/ia64/dv-waw-err.l,
+ gas/ia64/opc-f.d, gas/ia64/opc-i.d, gas/ia64/opc-m.d: Likewise.
+
+2000-09-14 Timothy Wall <twall@cygnus.com>
+
+ * gas/ia64/dv-waw-err.[sl]: Additional tests for parallel
+ comparisons which should and should not produce DVs.
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/vtable/vtable.exp: Re-enable for hppa-elf.
+
+2000-08-29 Timothy Wall <twall@cygnus.com>
+
+ * gas/ia64/dv-mutex.s: Add stop to avoid DV error on cmp.eq.
+ * gas/ia64/dv-mutex.d: Update regexp pattern.
+ * gas/ia64/dv-entry-err.s: Add stop to avoid DV error on cmp.eq.
+ * gas/ia64/dv-imply.s: Add stops to avoid DV errors on cmp.REL.
+ Test still fails due to insn opcode pattern changes.
+
+2000-08-21 H.J. Lu <hjl@gnu.org>
+
+ * gas/all/cofftag.d: Support the strict COFF.
+
+2000-08-16 Jim Wilson <wilson@cygnus.com>
+
+ * gas/ia64/dv-raw-err.s: Add new tests for addl and postinc.
+ * gas/ia64/dv-raw-err.l: Likewise.
+ * gas/ia64/dv-waw-err.l: Update sed pattern.
+ * gas/ia64/opc-f.pl: Delete fpsub, and fpadd comment.
+ * gas/ia64/opc-f.s, gas/ia64/opc-f.d: Regenerate.
+
+2000-08-16 Nick Clifton <nickc@redhat.com>
+
+ * gas/arm/inst.s: Add tests for edge cases of shift based
+ addressing modes.
+
+ * gas/arm/inst.d: Add expected results for new tests.
+
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
+
+ * gas/all/gas.exp: Don't run floating-point tests on CRIS.
+ * gas/ieee-fp/x930509a.exp: Ditto.
+ * gas/macros/macros.exp: Mark strings test xfail for CRIS.
+ * gas/cris/*: New tests for CRIS.
+
+2000-07-19 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/macros/macros.exp (test1): Run it for hppa*-*-linux*.
+ (semi): Likewise.
+ (strings): Don't run for hppa, except for hppa*-*-linux*.
+
+ * gas/hppa/parse/linesepbug.s: Ensure we have whitespace before
+ pseudos.
+
+2000-07-18 Scott Bambrough <scottb@netwinder.org>
+
+ * gas/arm/inst.d: Fix expected results to match current assembler
+ output. Patch from Justin Seger <justin.m.seger@intel.com>.
+
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/vtable/vtable.exp: Disable test for hppa.
+
+ * gas/hppa/reloc/reloc.exp (do_relocation_reduction_tests): Don't
+ run test for any elf target.
+ (applybug): Don't run test for linux.
+ * gas/hppa/unsorted/unsorted.exp (do_common_text): Likewise.
+ * gas/hppa/parse/parse.exp (linesepbug): Remove xfail
+ (labelbug): xfail for hppa-linux.
+
+ * gas/hppa/basic/{coprmem.s, fmemLRbug.s}: Add colons to labels.
+ * gas/hppa/parse/{callinfobug.s, regpopbug.s}: Likewise.
+ * gas/hppa/reloc/{applybug.s, funcrelocbug.s, longcall.s,
+ r_no_reloc.s, reduce3.s}: Likewise.
+ * gas/hppa/unsorted/common.s: Likewise.
+
+2000-07-05 Nick Clifton <nickc@cygnus.com>
+
+ * gas/d30v/inst.d: Fix expected results to match current assembler
+ output.
+ * gas/d30v/bittest.l: Fix expected warning messages to match
+ current assembler output.
+
+2000-06-29 Kazu Hirata <kazu@hxi.com>
+
+ * gas/h8300/h8300.exp (do_h8300s_mac): Change the registers used
+ in ldmac and stmac.
+ * gas/h8300/macs.s: Likewise.
+
+2000-06-27 Nick Clifton <nickc@cygnus.com>
+
+ * gas/d30v/bittest.l: Edit to match new warning messages produced
+ by assembler.
+
+2000-06-19 Timothy Wall <twall@cygnus.com>
+
+ * gas/macros/macros.exp: Avoid tests which are not useful on tic54x.
+ * gas/all/gas.exp: Make adjustments for tic54x target.
+ * gas/ieee-fp/x930509a.exp: Ditto.
+ * gas/tic54x/*: New tests for tic54x. NOTE: load page has been
+ moved into the LMA and is not printed separately by objdump any
+ longer. This still needs to be tested.
+
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * gas/m68k/all.exp: Don't execute tests if the target is m68hc11&12.
+ * gas/m68hc11/all.exp: Specific tests for m68hc11.
+ * gas/m68hc11/all_insns.[ds]: Check m68hc11 instructions.
+ * gas/m68hc11/insns[ds]: Another test.
+ * gas/m68hc11/lbranch.[ds]: Check branch optimization (gas relax).
+ * gas/m68hc11/opers12.[ds]: New files, check m68hc12 operands.
+
+2000-06-17 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/macros/strings.s: Don't start directives in first column
+ (for LABELS_WITHOUT_COLONS targets).
+
+2000-06-14 H.J. Lu <hjl@gnu.org>
+
+ * gas/macros/strings.d: Support a.out and coff.
+
+2000-06-14 Nick Clifton <nickc@cygnus.com>
+
+ * gas/arm/arm6.s: Remove 'mrs r9, cpsr_all' since the cpsr_all
+ flag is no longer legal syntax.
+
+2000-06-09 Nick Clifton <nickc@cygnus.com>
+
+ * gas/macros/macros.exp: Run new test: strings.
+ * gas/macros/strings.s: New test: String expansion inside
+ macros.
+ * gas/macros/strings.d: New test results.
+
+2000-06-04 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/i386/prefix.s: Modify so we have at least one x86 test that
+ checks the line separator.
+
+Sun May 21 10:08:08 2000 Hans-Peter Nilsson <hp@axis.com>
+
+ * gas/elf/elf.exp: Exclude *-*-linux*coff* as non-elf.
+
+2000-05-15 Nick Clifton <nickc@cygnus.com>
+
+ * gas/arm/arch4t.s: Add tests of new fields to msr instruction.
+
+2000-05-11 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * gas/mips/mips.exp: Include *-*-linux* in svr4pic.
+
+ * gas/mips/jal-svr4pic.{s,d} gas/mips/jal-xgot.d: Add a jal to a
+ weak symbol.
+
2000-05-08 Alan Modra <alan@linuxcare.com.au>
* gas/mri/float.d: Fix for srec length change.
+2000-05-02 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/hppa/unsorted/unsorted.exp: Duplicate hppa*-*-*elf*
+ behaviour for hppa*-*-linux* throughout file.
+ * gas/hppa/reloc/reloc.exp: Ditto.
+ (reduce2.s): Disable test for elf targets.
+
+ * gas/hppa/parse/parse.exp (ssbug.s): setup_xfail hppa*-*-linux*.
+
+ * gas/elf/section0.s: Don't start pseudos on first column so
+ targets that define LABELS_WITHOUT_COLONS work.
+ * gas/elf/section1.s: Ditto.
+ * gas/vtable/inherit0.s: Ditto.
+ * gas/vtable/inherit1.s: Ditto.
+ * gas/vtable/entry0.s: Ditto.
+ * gas/vtable/entry1.s: Ditto.
+
+2000-05-01 Nick Clifton <nickc@cygnus.com>
+
+ * gasp/macro.out: Fix label numbers to remove leading zeroes.
+ * gasp/mdouble.out: Fix label numbers to remove leading zeroes.
+
+2000-04-25 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/i386/general.l: Allow for DISP32 pe relocs.
+ * gas/i386/jump.d: Similarly.
+
+Mon Apr 24 16:35:08 2000 Jim Wilson <wilson@cygnus.com>
+
+ * gas/ia64/opc-i.d: Change pmin2.u to pmin2. Change pmax2.u to pmax2.
+ Change MLI to MLX. Switch operands for output matching tbit.z.orcm,
+ tbit.z.andcm, tbit.nz.orcm, tbit.nz.andcm, tnat.z.orcm, tnat.z.andcm,
+ tnat.nz.orcm, tnat.nz.andcm inputs.
+ * gas/ia64/opc-i.pl: Insert padding nops before last dep.
+ * gas/ia64/opc-i.s: Regenerate.
+
+ * gas/ia64/opc-i.s: Regenerate.
+ * gas/ia64/opc-f.pl: Add explicit stop at end.
+
+2000-04-22 Timothy Wall <twall@cygnus.com>
+
+ * gas/ia64/opc-f.d: Disassemble zeroes to verify break.f.
+ * gas/ia64/opc-f.s: Add an explicit stop to make IAS output match.
+
+Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+ Timothy Wall <twall@cygnus.com>
+ Jim Wilson <wilson@cygnus.com>
+
+ * gas/vtable/vtable.exp: Disable for ia64.
+ * gas/ia64: New testsuite directory.
+
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
+
+ * gas/i386/general.s: Check 16-bit immediates, and move call/jump
+ checks to start.
+ * gas/i386/general.l: Likewise.
+
2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
* gas/mn10300/am33_5.s: Check that negative SP offsets are encoded
@@ -228,7 +995,7 @@ Sat Aug 28 00:16:12 1999 Jerry Quinn <jquinn@nortelnetworks.com>
extract3.s, deposit2.s, deposit3.s: New.
* gas/hppa/basic/add.s,addi.s,dcor.s,shladd.s,sub.s,subi.s,unit.s:
- Add new syntax versions of instructions to tests.
+ Add new syntax versions of instructions to tests.
* gas/hppa/basic/add2.s,dcor2.s,perf.s,purge2.s,shladd2.s,sub2.s,
system2.s, unit2.s: New tests.
* hppa/basic/basic.exp: Add new tests.
@@ -2686,4 +3453,3 @@ Tue Mar 30 11:45:27 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
Mon Mar 29 00:00:00 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
* Test suite created.
-
diff --git a/gnu/usr.bin/binutils/gas/testsuite/config/default.exp b/gnu/usr.bin/binutils/gas/testsuite/config/default.exp
index 4134a030306..f162d81a8d2 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/config/default.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/config/default.exp
@@ -43,4 +43,12 @@ if ![info exists OBJCOPYFLAGS] then {
set OBJCOPYFLAGS {}
}
+if ![info exists READELF] then {
+ set READELF [findfile $base_dir/../../binutils/readelf]
+}
+
+if ![info exists READELFFLAGS] then {
+ set READELFFLAGS {}
+}
+
gas_init
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/all/gas.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/all/gas.exp
index 49d94219c14..84118fa0990 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/all/gas.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/all/gas.exp
@@ -11,14 +11,22 @@ gas_test "p2425.s" "" "" "pcrel values in assignment"
# Therefore this test (as it is currently written) is completely bogus
# for any PA target. Do not bother trying to run it and just claim
# it fails.
-if [istarget hppa*-*-*] then {
+#
+# The C54x uses ".space" to allocate bits, and requires absolute expressions;
+# The ".space" directive is taken care of in the C54x-specific tests, so fail
+# here
+#
+if { [istarget hppa*-*-*] || [istarget *c54x*-*-*] } then {
setup_xfail *-*-*
fail "simplifiable double subtraction"
} else {
gas_test "p1480.s" "" "-a>" "simplifiable double subtraction"
}
-gas_test "float.s" "" "" "simple FP constants"
+# No floating point support in assembly code for CRIS.
+if ![istarget cris-*-*] then {
+ gas_test "float.s" "" "" "simple FP constants"
+}
# This test is meaningless for the PA; the difference of two undefined
# symbols is something that is (and must be) supported on the PA.
@@ -79,7 +87,9 @@ proc do_930509a {} {
# This test is meaningless for the PA; the difference of two symbols
# must not be resolved by the assembler.
-if ![istarget hppa*-*-*] then {
+# C54x assembler (for compatibility) does not allow differences between
+# forward references
+if { ![istarget hppa*-*-*] && ![istarget *c54x*-*-*] } then {
# the vax fails because VMS can apparently actually handle this
# case in relocs, so gas doesn't handle it itself.
setup_xfail "vax*-*-vms*"
@@ -88,8 +98,11 @@ if ![istarget hppa*-*-*] then {
do_930509a
}
+# ".struct" and ".align" have different meanings on c54x
+# These directives are done in the c54x-specific tests instead
case $target_triplet in {
{ hppa*-*-* } { }
+ { *c54x*-*-* } { }
default {
run_dump_test struct
run_dump_test align
@@ -100,7 +113,8 @@ case $target_triplet in {
# We omit m88k COFF because it uses weird pseudo-op names.
# We omit the ARM toolchains because they define locals to
# start with '.', which eliminates .eos, .text etc from the output.
-if { ([istarget *-*-coff*] && ![istarget m88*-*-*] && ![istarget *arm*-*-coff] && ![istarget thumb*-*-coff]) \
+# Omit c54x, since .tag and .def mean something different on that target
+if { ([istarget *-*-coff*] && ![istarget m88*-*-*] && ![istarget *arm*-*-coff] && ![istarget thumb*-*-coff] && ![istarget *c54x*-*-coff]) \
||([istarget *-*-pe*] && ![istarget arm*-*-pe*] && ![istarget thumb*-*-pe*]) \
|| [istarget a29k-*-udi*] \
|| [istarget a29k-*-ebmon*] \
@@ -137,7 +151,10 @@ proc test_cond {} {
}
}
-test_cond
+# again, p2align doesn't work on c54x target
+if ![istarget *c54x*-*-*] then {
+ test_cond
+}
# FIXME: this is here cause of a bug in DejaGnu 1.1.1. When it is no longer
# in use, then this can be removed.
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm.exp
index f21c54df310..a2b8fc0f251 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm.exp
@@ -1,7 +1,7 @@
#
# Some ARM tests
#
-if [istarget arm-*-*] then {
+if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then {
run_dump_test "inst"
gas_test "arm3.s" "" $stdoptlist "Arm 3 instructions"
@@ -21,6 +21,14 @@ if [istarget arm-*-*] then {
gas_test "immed.s" "" $stdoptlist "immediate expressions"
gas_test "float.s" "" $stdoptlist "Core floating point instructions"
+
+ run_dump_test "xscale"
+
+ run_dump_test "adrl"
+
+ if {[istarget *-*-elf*] || [istarget *-*-linux*]} then {
+ run_dump_test "pic"
+ }
}
# Not all arm targets are bi-endian, so only run this test on ones
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.s b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.s
index f76bac9e4b6..b162cfceca0 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.s
@@ -187,3 +187,37 @@ bar:
blpl hohum
b _wibble
ble testerfunc
+
+ mov r1, r2, lsl #2
+ mov r1, r2, lsl #0
+ mov r1, r2, lsl #31
+ mov r1, r2, lsl r3
+ mov r1, r2, lsr #2
+ mov r1, r2, lsr #31
+ mov r1, r2, lsr #32
+ mov r1, r2, lsr r3
+ mov r1, r2, asr #2
+ mov r1, r2, asr #31
+ mov r1, r2, asr #32
+ mov r1, r2, asr r3
+ mov r1, r2, ror #2
+ mov r1, r2, ror #31
+ mov r1, r2, ror r3
+ mov r1, r2, rrx
+ mov r1, r2, LSL #2
+ mov r1, r2, LSL #0
+ mov r1, r2, LSL #31
+ mov r1, r2, LSL r3
+ mov r1, r2, LSR #2
+ mov r1, r2, LSR #31
+ mov r1, r2, LSR #32
+ mov r1, r2, LSR r3
+ mov r1, r2, ASR #2
+ mov r1, r2, ASR #31
+ mov r1, r2, ASR #32
+ mov r1, r2, ASR r3
+ mov r1, r2, ROR #2
+ mov r1, r2, ROR #31
+ mov r1, r2, ROR r3
+ mov r1, r2, RRX
+ \ No newline at end of file
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/h8300.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/h8300.exp
index 2b7d41ec0b9..013c55c8b55 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/h8300.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/h8300.exp
@@ -2036,12 +2036,12 @@ proc do_h8300s_mac {} {
# assembled correctly.
while 1 {
expect {
- -re " +\[0-9\]+ 0000 01A0\[^\n\]*\n" { set x [expr $x+1] }
- -re " +\[0-9\]+ 0002 0320\[^\n\]*\n" { set x [expr $x+1] }
- -re " +\[0-9\]+ 0004 0331\[^\n\]*\n" { set x [expr $x+1] }
- -re " +\[0-9\]+ 0006 01606D01\[^\n\]*\n" { set x [expr $x+1] }
- -re " +\[0-9\]+ 000a 0220\[^\n\]*\n" { set x [expr $x+1] }
- -re " +\[0-9\]+ 000c 0231\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 0000 01A0\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 0002 0324\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 0004 0335\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 0006 01606D45\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 000a 0224\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 000c 0235\[^\n\]*\n" { set x [expr $x+1] }
eof { break }
}
}
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/coprmem.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/coprmem.s
index c5d56cf553b..7752505bcf0 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/coprmem.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/coprmem.s
@@ -7,7 +7,7 @@
; immediate fields. We should also check the assorted field
; selectors to make sure they're handled correctly.
;
-copr_indexing_load
+copr_indexing_load:
cldwx,4 %r5(%sr0,%r4),%r26
cldwx,4,s %r5(%sr0,%r4),%r26
@@ -18,7 +18,7 @@ copr_indexing_load
clddx,4,m %r5(%sr0,%r4),%r26
clddx,4,sm %r5(%sr0,%r4),%r26
-copr_indexing_store
+copr_indexing_store:
cstwx,4 %r26,%r5(%sr0,%r4)
cstwx,4,s %r26,%r5(%sr0,%r4)
cstwx,4,m %r26,%r5(%sr0,%r4)
@@ -28,7 +28,7 @@ copr_indexing_store
cstdx,4,m %r26,%r5(%sr0,%r4)
cstdx,4,sm %r26,%r5(%sr0,%r4)
-copr_short_memory
+copr_short_memory:
cldws,4 0(%sr0,%r4),%r26
cldws,4,mb 0(%sr0,%r4),%r26
cldws,4,ma 0(%sr0,%r4),%r26
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/fmemLRbug.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/fmemLRbug.s
index f1330bb628e..20b028df083 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/fmemLRbug.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/basic/fmemLRbug.s
@@ -1,6 +1,6 @@
.code
.export f
-f
+f:
.proc
.callinfo frame=0,no_calls
.entry
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/callinfobug.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/callinfobug.s
index 7768e8749c6..bb6469993c0 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/callinfobug.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/callinfobug.s
@@ -3,5 +3,5 @@
.export divu,millicode
.proc
.callinfo millicode
-divu
+divu:
.procend
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/linesepbug.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/linesepbug.s
index 13f84b77b84..7bc528ead69 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/linesepbug.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/linesepbug.s
@@ -8,5 +8,5 @@
; selectors to make sure they're handled correctly.
foo:
- .WORD 0 !.IMPORT $bar$,DATA
+ .WORD 0! .IMPORT $bar$,DATA
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/parse.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/parse.exp
index 44d674e5332..e9bfede9e13 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/parse.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/parse.exp
@@ -120,7 +120,6 @@ proc do_valid_align_tests {} {
if [istarget hppa*-*-*] then {
# GAS-2.0 does not always parse ! as a line separator when it should.
- setup_xfail hppa*-*-*
gas_test "linesepbug.s" "" "" "line separator bug"
# Make sure GAS accepts syntax for accessing static data.
@@ -188,8 +187,7 @@ if [istarget hppa*-*-*] then {
# Bad things happen in the PA ELF backend (others too?) if a non-default
# section is created...
- setup_xfail hppa*-*-*elf*
- setup_xfail hppa*w-*-*
+ setup_xfail "hppa*-*-*elf*" "hppa*-*-linux*" "hppa*64*-*-*"
gas_test "ssbug.s" "" "" "Check for acceptance of non-default subspaces"
# To be compatable with certain "features" of the HP compiler
@@ -201,6 +199,7 @@ if [istarget hppa*-*-*] then {
gas_test "stdreg.s" "" "" "Test standard predefined registers"
# Make sure GAS will accept a label without a colon.
+ setup_xfail "hppa*-*-linux*"
gas_test "labelbug.s" "" "" "Test label without colon"
# Make sure we grok # line directives.
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/regpopbug.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/regpopbug.s
index 1357d9e14b8..2e3f53f6d24 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/regpopbug.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/parse/regpopbug.s
@@ -1,9 +1,9 @@
.code
-r0 .reg %r0
-shift .reg %sar
-fpreg10 .reg %fr10
-shift2 .reg shift
+r0: .reg %r0
+shift: .reg %sar
+fpreg10: .reg %fr10
+shift2: .reg shift
; Make sure we didn't botch .equ...
-yabba .equ r0 + shift
+yabba: .equ r0 + shift
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/applybug.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/applybug.s
index d4cb7ca51c7..ec365365c4b 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/applybug.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/applybug.s
@@ -4,7 +4,7 @@
.data
.align 4
-tab___2
+tab___2:
.word L$0002
.word L$0003
.word L$0004
@@ -13,7 +13,7 @@ tab___2
.align 4
.EXPORT execute,CODE
.EXPORT execute,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR
-execute
+execute:
.PROC
.CALLINFO FRAME=0,NO_CALLS
.ENTRY
@@ -27,7 +27,7 @@ execute
ldo R'tab___2-$global$(%r1),%r23
addil L'optab-$global$,%r27
ldo R'optab-$global$(%r1),%r20
-L$0009
+L$0009:
sh2add %r21,%r23,%r19
ldh 2(%r19),%r19
ldo 1(%r21),%r21
@@ -35,19 +35,19 @@ L$0009
comib,>= 2,%r21,L$0009
sths,ma %r19,2(%r20)
bv,n %r0(%r2)
-L$0002
+L$0002:
ldi 120,%r19
stbs,ma %r19,1(%r20)
ldhs,ma 2(%r26),%r19
add %r22,%r19,%r19
bv,n %r0(%r19)
-L$0003
+L$0003:
ldi 121,%r19
stbs,ma %r19,1(%r20)
ldhs,ma 2(%r26),%r19
add %r22,%r19,%r19
bv,n %r0(%r19)
-L$0004
+L$0004:
ldi 122,%r19
stb %r19,0(%r20)
bv %r0(%r2)
@@ -58,7 +58,7 @@ L$0004
.IMPORT strcmp,CODE
.align 4
-L$C0000
+L$C0000:
.STRING "xyxyz\x00"
.IMPORT abort,CODE
.IMPORT exit,CODE
@@ -67,7 +67,7 @@ L$C0000
.align 4
.EXPORT main,CODE
.EXPORT main,ENTRY,PRIV_LEV=3,RTNVAL=GR
-main
+main:
.PROC
.CALLINFO FRAME=128,CALLS,SAVE_RP
.ENTRY
@@ -104,7 +104,7 @@ main
.CALL
bl abort,%r2
nop
-L$0011
+L$0011:
.CALL ARGW0=GR
bl exit,%r2
copy %r0,%r26
@@ -113,6 +113,6 @@ L$0011
.PROCEND
.data
-optab .comm 10
-buf .comm 10
-p .comm 10
+optab: .comm 10
+buf: .comm 10
+p: .comm 10
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/funcrelocbug.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/funcrelocbug.s
index fcfe93b6871..2acb013d215 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/funcrelocbug.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/funcrelocbug.s
@@ -2,7 +2,7 @@
.align 4
.EXPORT g,CODE
.EXPORT g,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR
-g
+g:
.PROC
.CALLINFO FRAME=128,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=3
.ENTRY
@@ -26,11 +26,11 @@ g
ldw -36(%r3),%r28
bl,n L$0001,%r0
bl,n L$0003,%r0
-L$0002
+L$0002:
ldw -40(%r3),%r28
bl,n L$0001,%r0
-L$0003
-L$0001
+L$0003:
+L$0001:
ldw -20(%r3),%r2
ldo 64(%r3),%r30
ldwm -64(%r30),%r3
@@ -38,7 +38,7 @@ L$0001
.EXIT
.PROCEND
.align 4
-f2___4
+f2___4:
.PROC
.CALLINFO FRAME=64,NO_CALLS,SAVE_SP,ENTRY_GR=3
.ENTRY
@@ -54,7 +54,7 @@ f2___4
ldi 1,%r19
copy %r19,%r28
bl,n L$0005,%r0
-L$0005
+L$0005:
ldo 64(%r3),%r30
ldwm -64(%r30),%r3
bv,n %r0(%r2)
@@ -64,7 +64,7 @@ L$0005
.data
.align 4
-L$TRAMP0000
+L$TRAMP0000:
ldw 36(%r22),%r21
bb,>=,n %r21,30,.+16
depi 0,31,2,%r21
@@ -81,7 +81,7 @@ L$TRAMP0000
.align 4
.EXPORT f,CODE
.EXPORT f,ENTRY,PRIV_LEV=3,RTNVAL=GR
-f
+f:
.PROC
.CALLINFO FRAME=192,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=3
.ENTRY
@@ -133,8 +133,8 @@ f
.CALL ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO
bl abort,%r2
nop
-L$0006
-L$0004
+L$0006:
+L$0004:
ldw -20(%r3),%r2
ldo 64(%r3),%r30
ldwm -64(%r30),%r3
@@ -146,7 +146,7 @@ L$0004
.align 4
.EXPORT main,CODE
.EXPORT main,ENTRY,PRIV_LEV=3,RTNVAL=GR
-main
+main:
.PROC
.CALLINFO FRAME=128,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=3
.ENTRY
@@ -164,7 +164,7 @@ main
.CALL ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO
bl exit,%r2
nop
-L$0007
+L$0007:
ldw -20(%r3),%r2
ldo 64(%r3),%r30
ldwm -64(%r30),%r3
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/longcall.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/longcall.s
index 699138b88e0..47f508c537c 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/longcall.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/longcall.s
@@ -2,7 +2,7 @@
.align 4
.EXPORT foo,CODE
.EXPORT foo,ENTRY,PRIV_LEV=3,RTNVAL=GR
-foo
+foo:
.PROC
.CALLINFO FRAME=64,CALLS,SAVE_RP
.ENTRY
@@ -19,7 +19,7 @@ foo
.align 4
.EXPORT bar,CODE
.EXPORT bar,ENTRY,PRIV_LEV=3,RTNVAL=GR
-bar
+bar:
.PROC
.CALLINFO FRAME=0,NO_CALLS
.ENTRY
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/r_no_reloc.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/r_no_reloc.s
index 9e5debdad80..9830e738bfb 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/r_no_reloc.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/r_no_reloc.s
@@ -3,17 +3,17 @@
.data
.ALIGN 8
-$L00DATA
+$L00DATA:
.ALIGN 8
.EXPORT s
-s
+s:
.WORD 0x0
.BLOCKZ 786425
.BLOCKZ 7
.code
-L$001.3
-g .PROC
+L$001.3:
+g: .PROC
.CALLINFO FRAME=0,NO_CALLS
.ENTRY
;ldo 120(%r0),%r28 --> to delay slot
@@ -26,10 +26,9 @@ g .PROC
.data
.ALIGN 4
.EXPORT l
-l
+l:
.WORD P'g
.IMPORT common,DATA ; common section, size=0
.IMPORT $global$,DATA
.EXPORT g,ENTRY,PRIV_LEV=3,RTNVAL=GR
.END
-
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce.s
index ad226f8b76a..de5661e04f5 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce.s
@@ -4,7 +4,7 @@
.code
.align 4
- .PARAM foo,RTNVAL=GR
+ .PARAM foo,ARGW0=FR
foo:
.PROC
.CALLINFO FRAME=0,NO_CALLS
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce3.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce3.s
index 666a79614f7..016d12d1586 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce3.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reduce3.s
@@ -1,25 +1,25 @@
.data
.align 8
-blah
+blah:
; .double 0e+00
.word 0 ; = 0x0
.word 0 ; = 0x0
.EXPORT foo,DATA
.align 8
-foo
+foo:
; .double 0e+00
.word 0 ; = 0x0
.word 0 ; = 0x0
.EXPORT yabba,DATA
.align 4
-yabba
+yabba:
.word 1
.code
.align 4
.EXPORT bar,CODE
.EXPORT bar,ENTRY,PRIV_LEV=3,RTNVAL=GR
-bar
+bar:
.PROC
.CALLINFO FRAME=64,NO_CALLS,SAVE_SP,ENTRY_GR=3
.ENTRY
@@ -30,7 +30,7 @@ bar
ldo R'yabba-$global$(%r1),%r19
ldi 2,%r20
stw %r20,0(%r19)
-L$0001
+L$0001:
ldo 64(%r3),%r30
ldwm -64(%r30),%r3
bv,n %r0(%r2)
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reloc.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reloc.exp
index aa81bdd99ea..889e318c7d4 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reloc.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/reloc/reloc.exp
@@ -27,12 +27,14 @@ proc do_ble_relocation_test {} {
if [gas_test_old "blebug.s" "" "Proper relocation for BLE (part 1)"] then {
objdump_start_no_subdir "a.out" "-r"
- if ![istarget hppa*-*-*elf*] then {
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
# At one time both versions of the assembler would incorrectly use
# a PC-relative relocation for a BLE instruction.
while 1 {
expect {
- -re "^0+4\[^\n\]*ABS_CALL\[^\n\]*\n" { set x 1 }
+ -re "^0+\[^\n\]*DIR21L\[^\n\]*\n" { set x 1 }
+ -re "^0+4\[^\n\]*DIR17R\[^\n\]*\n" { set x 1 }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
eof { break }
@@ -43,8 +45,7 @@ proc do_ble_relocation_test {} {
# a PC-relative relocation for a BLE instruction.
while 1 {
expect {
- -re "^0+\[^\n\]*DIR21L\[^\n\]*\n" { set x 1 }
- -re "^0+4\[^\n\]*DIR17R\[^\n\]*\n" { set x 1 }
+ -re "^0+4\[^\n\]*ABS_CALL\[^\n\]*\n" { set x 1 }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
eof { break }
@@ -65,7 +66,8 @@ proc do_relocation_reduction_tests {} {
set testname "reduce.s: Test relocation reductions (part 2)"
set x 0
- if [istarget hppa*w-*-*] then {
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
return;
}
@@ -242,7 +244,7 @@ proc do_selector_scope_test {} {
set testname "selectorbug.s: Test scope of field selector"
set x 0
- if [istarget hppa*w-*-*] then {
+ if [istarget hppa*64*-*-*] then {
return;
}
@@ -252,7 +254,7 @@ proc do_selector_scope_test {} {
# Check to make sure the relocation entry after the plabel is correct.
# If an old field selector was incorrectly "carried" over, then
# this test will fail.
- if [istarget hppa*-*-*elf*] then {
+ if {[istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
while 1 {
expect {
-re "^0+14\[^\n\]*DIR32\[^\n\]*\n"
@@ -324,7 +326,8 @@ proc do_exit_relocation_test {} {
# Elf (osf) does not use ENTRY/EXIT relocations.
# I guess we could look at the unwind subspaces it builds...
# Until then, make sure it still assembles.
- if [istarget hppa*-*-*elf*] then {
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
gas_test_old "exitbug.s" "" "Test for bogus R_EXIT relocation (part 1)"
return;
}
@@ -356,12 +359,9 @@ proc do_cross_space_fixup_test_1 {} {
set testname "fixupbug.s: Test cross space jump/call fixup bug (part 2)"
set x 0
- if [istarget hppa*w-*-*] then {
- return;
- }
-
- # ELF (osf) doesn't really handle extra sections too well...
- if [istarget hppa*-*-*elf*] then {
+ # ELF doesn't really handle extra sections too well...
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
return;
}
@@ -393,12 +393,9 @@ proc do_cross_space_fixup_test_2 {} {
set testname "fixupbug.s: Test cross space jump/call fixup bug (part 3)"
set x 0
- if [istarget hppa*w-*-*] then {
- return;
- }
-
- # ELF (osf) doesn't really handle extra sections too well...
- if [istarget hppa*-*-*elf*] then {
+ # ELF doesn't really handle extra sections too well...
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
return;
}
@@ -431,7 +428,8 @@ proc do_round_mode_test {} {
# Make sure GAS generated correct relocations to switch rounding modes.
# Also make sure (for SOM) that redundant rounding mode relocations
# were eliminated.
- if { [istarget hppa*-*-*elf*] || [istarget hppa*w-*-*] } then {
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
while 1 {
expect {
-re "^0+\[^\n\]*DIR21L\[^\n\]*\n"
@@ -484,7 +482,8 @@ proc do_round_mode_test {} {
objdump_finish
# Did we find what we were looking for? If not, flunk it.
- if {[istarget hppa*-*-*elf*] || [istarget hppa*w-*-*] } then {
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
if [expr $x==8] then { pass $testname } else { fail $testname }
} else {
if [expr $x==3] then { pass $testname } else { fail $testname }
@@ -579,12 +578,9 @@ proc do_pic_relocation_test {} {
set testname "picreloc.s: Test for proper PIC relocation (part 2)"
set x 0
- if [istarget hppa*w-*-*] then {
- return;
- }
-
- # ELF (osf) doesn't really handle extra sections too well...
- if [istarget hppa*-*-*elf*] then {
+ # ELF doesn't really handle extra sections too well...
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
return;
}
@@ -608,11 +604,12 @@ proc do_pic_relocation_test {} {
}
proc do_apply_test {} {
- set testname "applybug.s: Test for proper fixup appliation (part 2)"
+ set testname "applybug.s: Test for proper fixup application (part 2)"
set x 0
- # ELF (osf) doesn't really handle extra sections too well...
- if [istarget hppa*-*-*elf*] then {
+ # ELF doesn't really handle extra sections too well...
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
return;
}
@@ -636,6 +633,7 @@ proc do_apply_test {} {
# Did we find what we were looking for? If not, flunk it.
if [expr $x==3] then { pass $testname } else { fail $testname }
}
+
if [istarget hppa*-*-*] then {
# Make sure we put the right relocation entry on a BLE instruction.
do_ble_relocation_test
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/common.s b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/common.s
index b07fd059b60..54cc7ea77f5 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/common.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/common.s
@@ -5,4 +5,4 @@ text_symbol:
.data
data_symbol:
.long 2
-common_symbol .comm 4
+common_symbol: .comm 4
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/unsorted.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/unsorted.exp
index 5487fd987c6..7db8045de4f 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/unsorted.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/hppa/unsorted/unsorted.exp
@@ -24,7 +24,8 @@ proc do_subspace_align_test {} {
set testname "ss_align.s: Test subspace alignment (part 2)"
set x 0
- if { [istarget hppa*-*-*elf*] || [istarget hppa*w-*-*] } then {
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
return
}
@@ -107,7 +108,8 @@ proc do_align3_test {} {
set testname "align3.s: Test for alignment bug when switching subspaces (part2)"
set x 0
- if { [istarget hppa*-*-*elf*] || [istarget hppa*w-*-*] } then {
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
return
}
@@ -138,8 +140,9 @@ proc do_align4_test {} {
set testname "align4.s: More subspace alignment tests (part2)"
set x 0
- if { [istarget hppa*-*-*elf*] || [istarget hppa*w-*-*] } then {
- return
+ if {[istarget hppa*64*-*-*]
+ || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then {
+ return
}
if [gas_test_old "align4.s" "" "More subspace alignment tests (part1)"] {
@@ -192,6 +195,11 @@ proc do_import_test {} {
}
proc do_common_test {} {
+ # linux has a different .comm syntax
+ if [istarget hppa*-*-linux*] then {
+ return;
+ }
+
set testname "common.s: Test for bug in .comm handling (part2)"
set x 0
@@ -250,6 +258,4 @@ if [istarget hppa*-*-*] then {
# Test for an off-by-2 bug in range check for conditional branches
gas_test_error "brlenbug.s" "" "Check for error(s) in branch length"
-
}
-
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/ieee-fp/x930509a.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/ieee-fp/x930509a.exp
index 8556972776c..4218c8751ad 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/ieee-fp/x930509a.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/ieee-fp/x930509a.exp
@@ -19,6 +19,10 @@ proc dotest {} {
if !$x then { fail "$testname (listing didn't match)" }
}
-if ![istarget vax*-*-*] then {
+# C54x alignment/addressing is different, so the listing looks different
+# float encoding is tested in c54x-specific tests.
+# No floating point support in assembly code for CRIS.
+if { ![istarget vax*-*-*] && ![istarget *c54x*-*-*]
+ && ![istarget cris-*-*] && ![istarget arc*-*-*] } then {
dotest
}
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/all.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/all.exp
index 88ab2a05c01..d5261708be5 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/all.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/all.exp
@@ -1,6 +1,18 @@
#
# Some generic m68k tests
#
+if [istarget "m68hc11-*-*"] then {
+ return
+}
+if [istarget "m68hc12-*-*"] then {
+ return
+}
+if [istarget "m6811-*-*"] then {
+ return
+}
+if [istarget "m6812-*-*"] then {
+ return
+}
if [istarget m68*-*-*] then {
gas_test "t2.s" "" "" "cross-section branch"
if [istarget m68*-motorola-sysv] then {
@@ -36,4 +48,4 @@ if [istarget m68*-*-*] then {
}
if [info exists errorInfo] then {
unset errorInfo
- }
+}
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/macros/macros.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/macros/macros.exp
index a51e4859867..d7eea4a23be 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/macros/macros.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/macros/macros.exp
@@ -1,22 +1,35 @@
# Run some tests of gas macros.
-if ![istarget hppa*-*-*] {
+if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
run_dump_test test1
}
-run_dump_test test2
+if ![istarget *c54x*-*-*] {
+ run_dump_test test2
+}
run_dump_test test3
-run_dump_test irp
+if ![istarget *c54x*-*-*] {
+ run_dump_test irp
+ run_dump_test rept
+}
-run_dump_test rept
gas_test_error "err.s" "" "macro infinite recursion"
case $target_triplet in {
- { hppa*-*-* } { }
+ { hppa*-*-* } { if [istarget *-*-linux*] { run_dump_test semi } }
+ { *c54x*-*-* } { }
default {
run_dump_test semi
}
}
+
+if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
+ # FIXME: Due to macro mishandling of ONLY_STANDARD_ESCAPES.
+ setup_xfail cris-*-*
+ setup_xfail avr-*-*
+ setup_xfail sh*-*-*
+ run_dump_test strings
+}
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/abs.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/abs.d
index c86d5c2b0f5..574af96f49c 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/abs.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/abs.d
@@ -6,10 +6,10 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> bgez \$a0,0+000c <foo\+(0x|)c>
+0+0000 <[^>]*> bgez a0,0+000c <foo\+(0x|)c>
0+0004 <[^>]*> nop
-0+0008 <[^>]*> neg \$a0,\$a0
-0+000c <[^>]*> bgez \$a1,0+0018 <foo\+(0x|)18>
-0+0010 <[^>]*> move \$a0,\$a1
-0+0014 <[^>]*> neg \$a0,\$a1
+0+0008 <[^>]*> neg a0,a0
+0+000c <[^>]*> bgez a1,0+0018 <foo\+(0x|)18>
+0+0010 <[^>]*> move a0,a1
+0+0014 <[^>]*> neg a0,a1
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/add.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/add.d
index 8c21d1dda30..65339b871b0 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/add.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/add.d
@@ -6,15 +6,15 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> addi \$a0,\$a0,0
-0+0004 <[^>]*> addi \$a0,\$a0,1
-0+0008 <[^>]*> li \$at,0x8000
-0+000c <[^>]*> add \$a0,\$a0,\$at
-0+0010 <[^>]*> addi \$a0,\$a0,-32768
-0+0014 <[^>]*> lui \$at,0x1
-0+0018 <[^>]*> add \$a0,\$a0,\$at
-0+001c <[^>]*> lui \$at,0x1
-0+0020 <[^>]*> ori \$at,\$at,0xa5a5
-0+0024 <[^>]*> add \$a0,\$a0,\$at
-0+0028 <[^>]*> addiu \$a0,\$a0,1
+0+0000 <[^>]*> addi a0,a0,0
+0+0004 <[^>]*> addi a0,a0,1
+0+0008 <[^>]*> li at,0x8000
+0+000c <[^>]*> add a0,a0,at
+0+0010 <[^>]*> addi a0,a0,-32768
+0+0014 <[^>]*> lui at,0x1
+0+0018 <[^>]*> add a0,a0,at
+0+001c <[^>]*> lui at,0x1
+0+0020 <[^>]*> ori at,at,0xa5a5
+0+0024 <[^>]*> add a0,a0,at
+0+0028 <[^>]*> addiu a0,a0,1
0+002c <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/and.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/and.d
index 8d617147caa..2fb6e2a8788 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/and.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/and.d
@@ -6,29 +6,29 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> andi \$a0,\$a0,0x0
-0+0004 <[^>]*> andi \$a0,\$a0,0x1
-0+0008 <[^>]*> andi \$a0,\$a0,0x8000
-0+000c <[^>]*> li \$at,-32768
-0+0010 <[^>]*> and \$a0,\$a0,\$at
-0+0014 <[^>]*> lui \$at,0x1
-0+0018 <[^>]*> and \$a0,\$a0,\$at
-0+001c <[^>]*> lui \$at,0x1
-0+0020 <[^>]*> ori \$at,\$at,0xa5a5
-0+0024 <[^>]*> and \$a0,\$a0,\$at
-0+0028 <[^>]*> ori \$a0,\$a1,0x0
-0+002c <[^>]*> nor \$a0,\$a0,\$zero
-0+0030 <[^>]*> ori \$a0,\$a1,0x1
-0+0034 <[^>]*> nor \$a0,\$a0,\$zero
-0+0038 <[^>]*> ori \$a0,\$a1,0x8000
-0+003c <[^>]*> nor \$a0,\$a0,\$zero
-0+0040 <[^>]*> li \$at,-32768
-0+0044 <[^>]*> nor \$a0,\$a1,\$at
-0+0048 <[^>]*> lui \$at,0x1
-0+004c <[^>]*> nor \$a0,\$a1,\$at
-0+0050 <[^>]*> lui \$at,0x1
-0+0054 <[^>]*> ori \$at,\$at,0xa5a5
-0+0058 <[^>]*> nor \$a0,\$a1,\$at
-0+005c <[^>]*> ori \$a0,\$a1,0x0
-0+0060 <[^>]*> xori \$a0,\$a1,0x0
+0+0000 <[^>]*> andi a0,a0,0x0
+0+0004 <[^>]*> andi a0,a0,0x1
+0+0008 <[^>]*> andi a0,a0,0x8000
+0+000c <[^>]*> li at,-32768
+0+0010 <[^>]*> and a0,a0,at
+0+0014 <[^>]*> lui at,0x1
+0+0018 <[^>]*> and a0,a0,at
+0+001c <[^>]*> lui at,0x1
+0+0020 <[^>]*> ori at,at,0xa5a5
+0+0024 <[^>]*> and a0,a0,at
+0+0028 <[^>]*> ori a0,a1,0x0
+0+002c <[^>]*> nor a0,a0,zero
+0+0030 <[^>]*> ori a0,a1,0x1
+0+0034 <[^>]*> nor a0,a0,zero
+0+0038 <[^>]*> ori a0,a1,0x8000
+0+003c <[^>]*> nor a0,a0,zero
+0+0040 <[^>]*> li at,-32768
+0+0044 <[^>]*> nor a0,a1,at
+0+0048 <[^>]*> lui at,0x1
+0+004c <[^>]*> nor a0,a1,at
+0+0050 <[^>]*> lui at,0x1
+0+0054 <[^>]*> ori at,at,0xa5a5
+0+0058 <[^>]*> nor a0,a1,at
+0+005c <[^>]*> ori a0,a1,0x0
+0+0060 <[^>]*> xori a0,a1,0x0
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/beq.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/beq.d
index a1329342f24..2fa90f51785 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/beq.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/beq.d
@@ -6,31 +6,31 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> beq \$a0,\$a1,0+0000 <text_label>
+0+0000 <[^>]*> beq a0,a1,0+0000 <text_label>
0+0004 <[^>]*> nop
-0+0008 <[^>]*> beqz \$a0,0+0000 <text_label>
+0+0008 <[^>]*> beqz a0,0+0000 <text_label>
0+000c <[^>]*> nop
-0+0010 <[^>]*> li \$at,1
-0+0014 <[^>]*> beq \$a0,\$at,0+0000 <text_label>
+0+0010 <[^>]*> li at,1
+0+0014 <[^>]*> beq a0,at,0+0000 <text_label>
0+0018 <[^>]*> nop
-0+001c <[^>]*> li \$at,0x8000
-0+0020 <[^>]*> beq \$a0,\$at,0+0000 <text_label>
+0+001c <[^>]*> li at,0x8000
+0+0020 <[^>]*> beq a0,at,0+0000 <text_label>
0+0024 <[^>]*> nop
-0+0028 <[^>]*> li \$at,-32768
-0+002c <[^>]*> beq \$a0,\$at,0+0000 <text_label>
+0+0028 <[^>]*> li at,-32768
+0+002c <[^>]*> beq a0,at,0+0000 <text_label>
0+0030 <[^>]*> nop
-0+0034 <[^>]*> lui \$at,0x1
-0+0038 <[^>]*> beq \$a0,\$at,0+0000 <text_label>
+0+0034 <[^>]*> lui at,0x1
+0+0038 <[^>]*> beq a0,at,0+0000 <text_label>
0+003c <[^>]*> nop
-0+0040 <[^>]*> lui \$at,0x1
-0+0044 <[^>]*> ori \$at,\$at,0xa5a5
-0+0048 <[^>]*> beq \$a0,\$at,0+0000 <text_label>
+0+0040 <[^>]*> lui at,0x1
+0+0044 <[^>]*> ori at,at,0xa5a5
+0+0048 <[^>]*> beq a0,at,0+0000 <text_label>
0+004c <[^>]*> nop
-0+0050 <[^>]*> bnez \$a0,0+0000 <text_label>
+0+0050 <[^>]*> bnez a0,0+0000 <text_label>
0+0054 <[^>]*> nop
-0+0058 <[^>]*> beqzl \$a0,0+0000 <text_label>
+0+0058 <[^>]*> beqzl a0,0+0000 <text_label>
0+005c <[^>]*> nop
-0+0060 <[^>]*> bnezl \$a0,0+0000 <text_label>
+0+0060 <[^>]*> bnezl a0,0+0000 <text_label>
...
0+20068 <[^>]*> j 0+0000 <text_label>
[ ]*20068: (MIPS_JMP|JMPADDR|R_MIPS_26) .text
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bge.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bge.d
index ee3e27ce8ed..387fd3440b2 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bge.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bge.d
@@ -6,48 +6,48 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> slt \$at,\$a0,\$a1
-0+0004 <[^>]*> beqz \$at,0+0000 <text_label>
+0+0000 <[^>]*> slt at,a0,a1
+0+0004 <[^>]*> beqz at,0+0000 <text_label>
0+0008 <[^>]*> nop
-0+000c <[^>]*> bgez \$a0,0+0000 <text_label>
+0+000c <[^>]*> bgez a0,0+0000 <text_label>
0+0010 <[^>]*> nop
-0+0014 <[^>]*> blez \$a1,0+0000 <text_label>
+0+0014 <[^>]*> blez a1,0+0000 <text_label>
0+0018 <[^>]*> nop
-0+001c <[^>]*> bgez \$a0,0+0000 <text_label>
+0+001c <[^>]*> bgez a0,0+0000 <text_label>
0+0020 <[^>]*> nop
-0+0024 <[^>]*> bgtz \$a0,0+0000 <text_label>
+0+0024 <[^>]*> bgtz a0,0+0000 <text_label>
0+0028 <[^>]*> nop
-0+002c <[^>]*> slti \$at,\$a0,2
-0+0030 <[^>]*> beqz \$at,0+0000 <text_label>
+0+002c <[^>]*> slti at,a0,2
+0+0030 <[^>]*> beqz at,0+0000 <text_label>
0+0034 <[^>]*> nop
-0+0038 <[^>]*> li \$at,0x8000
-0+003c <[^>]*> slt \$at,\$a0,\$at
-0+0040 <[^>]*> beqz \$at,0+0000 <text_label>
+0+0038 <[^>]*> li at,0x8000
+0+003c <[^>]*> slt at,a0,at
+0+0040 <[^>]*> beqz at,0+0000 <text_label>
0+0044 <[^>]*> nop
-0+0048 <[^>]*> slti \$at,\$a0,-32768
-0+004c <[^>]*> beqz \$at,0+0000 <text_label>
+0+0048 <[^>]*> slti at,a0,-32768
+0+004c <[^>]*> beqz at,0+0000 <text_label>
0+0050 <[^>]*> nop
-0+0054 <[^>]*> lui \$at,0x1
-0+0058 <[^>]*> slt \$at,\$a0,\$at
-0+005c <[^>]*> beqz \$at,0+0000 <text_label>
+0+0054 <[^>]*> lui at,0x1
+0+0058 <[^>]*> slt at,a0,at
+0+005c <[^>]*> beqz at,0+0000 <text_label>
0+0060 <[^>]*> nop
-0+0064 <[^>]*> lui \$at,0x1
-0+0068 <[^>]*> ori \$at,\$at,0xa5a5
-0+006c <[^>]*> slt \$at,\$a0,\$at
-0+0070 <[^>]*> beqz \$at,0+0000 <text_label>
+0+0064 <[^>]*> lui at,0x1
+0+0068 <[^>]*> ori at,at,0xa5a5
+0+006c <[^>]*> slt at,a0,at
+0+0070 <[^>]*> beqz at,0+0000 <text_label>
0+0074 <[^>]*> nop
-0+0078 <[^>]*> slt \$at,\$a1,\$a0
-0+007c <[^>]*> bnez \$at,0+0000 <text_label>
+0+0078 <[^>]*> slt at,a1,a0
+0+007c <[^>]*> bnez at,0+0000 <text_label>
0+0080 <[^>]*> nop
-0+0084 <[^>]*> bgtz \$a0,0+0000 <text_label>
+0+0084 <[^>]*> bgtz a0,0+0000 <text_label>
0+0088 <[^>]*> nop
-0+008c <[^>]*> bltz \$a1,0+0000 <text_label>
+0+008c <[^>]*> bltz a1,0+0000 <text_label>
0+0090 <[^>]*> nop
-0+0094 <[^>]*> bgtz \$a0,0+0000 <text_label>
+0+0094 <[^>]*> bgtz a0,0+0000 <text_label>
0+0098 <[^>]*> nop
-0+009c <[^>]*> slt \$at,\$a0,\$a1
-0+00a0 <[^>]*> beqzl \$at,0+0000 <text_label>
+0+009c <[^>]*> slt at,a0,a1
+0+00a0 <[^>]*> beqzl at,0+0000 <text_label>
0+00a4 <[^>]*> nop
-0+00a8 <[^>]*> slt \$at,\$a1,\$a0
-0+00ac <[^>]*> bnezl \$at,0+0000 <text_label>
+0+00a8 <[^>]*> slt at,a1,a0
+0+00ac <[^>]*> bnezl at,0+0000 <text_label>
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bgeu.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bgeu.d
index 93a60401147..8f2bfa7c4c1 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bgeu.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bgeu.d
@@ -6,42 +6,42 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> sltu \$at,\$a0,\$a1
-0+0004 <[^>]*> beqz \$at,0+0000 <text_label>
+0+0000 <[^>]*> sltu at,a0,a1
+0+0004 <[^>]*> beqz at,0+0000 <text_label>
0+0008 <[^>]*> nop
-0+000c <[^>]*> beq \$zero,\$a1,0+0000 <text_label>
+0+000c <[^>]*> beq zero,a1,0+0000 <text_label>
0+0010 <[^>]*> nop
-0+0014 <[^>]*> bnez \$a0,0+0000 <text_label>
+0+0014 <[^>]*> bnez a0,0+0000 <text_label>
0+0018 <[^>]*> nop
-0+001c <[^>]*> sltiu \$at,\$a0,2
-0+0020 <[^>]*> beqz \$at,0+0000 <text_label>
+0+001c <[^>]*> sltiu at,a0,2
+0+0020 <[^>]*> beqz at,0+0000 <text_label>
0+0024 <[^>]*> nop
-0+0028 <[^>]*> li \$at,0x8000
-0+002c <[^>]*> sltu \$at,\$a0,\$at
-0+0030 <[^>]*> beqz \$at,0+0000 <text_label>
+0+0028 <[^>]*> li at,0x8000
+0+002c <[^>]*> sltu at,a0,at
+0+0030 <[^>]*> beqz at,0+0000 <text_label>
0+0034 <[^>]*> nop
-0+0038 <[^>]*> sltiu \$at,\$a0,-32768
-0+003c <[^>]*> beqz \$at,0+0000 <text_label>
+0+0038 <[^>]*> sltiu at,a0,-32768
+0+003c <[^>]*> beqz at,0+0000 <text_label>
0+0040 <[^>]*> nop
-0+0044 <[^>]*> lui \$at,0x1
-0+0048 <[^>]*> sltu \$at,\$a0,\$at
-0+004c <[^>]*> beqz \$at,0+0000 <text_label>
+0+0044 <[^>]*> lui at,0x1
+0+0048 <[^>]*> sltu at,a0,at
+0+004c <[^>]*> beqz at,0+0000 <text_label>
0+0050 <[^>]*> nop
-0+0054 <[^>]*> lui \$at,0x1
-0+0058 <[^>]*> ori \$at,\$at,0xa5a5
-0+005c <[^>]*> sltu \$at,\$a0,\$at
-0+0060 <[^>]*> beqz \$at,0+0000 <text_label>
+0+0054 <[^>]*> lui at,0x1
+0+0058 <[^>]*> ori at,at,0xa5a5
+0+005c <[^>]*> sltu at,a0,at
+0+0060 <[^>]*> beqz at,0+0000 <text_label>
0+0064 <[^>]*> nop
-0+0068 <[^>]*> sltu \$at,\$a1,\$a0
-0+006c <[^>]*> bnez \$at,0+0000 <text_label>
+0+0068 <[^>]*> sltu at,a1,a0
+0+006c <[^>]*> bnez at,0+0000 <text_label>
0+0070 <[^>]*> nop
-0+0074 <[^>]*> bnez \$a0,0+0000 <text_label>
+0+0074 <[^>]*> bnez a0,0+0000 <text_label>
0+0078 <[^>]*> nop
-0+007c <[^>]*> bnez \$a0,0+0000 <text_label>
+0+007c <[^>]*> bnez a0,0+0000 <text_label>
0+0080 <[^>]*> nop
-0+0084 <[^>]*> sltu \$at,\$a0,\$a1
-0+0088 <[^>]*> beqzl \$at,0+0000 <text_label>
+0+0084 <[^>]*> sltu at,a0,a1
+0+0088 <[^>]*> beqzl at,0+0000 <text_label>
0+008c <[^>]*> nop
-0+0090 <[^>]*> sltu \$at,\$a1,\$a0
-0+0094 <[^>]*> bnezl \$at,0+0000 <text_label>
+0+0090 <[^>]*> sltu at,a1,a0
+0+0094 <[^>]*> bnezl at,0+0000 <text_label>
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/blt.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/blt.d
index fc10e23a5a8..3423cdf1ec5 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/blt.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/blt.d
@@ -6,48 +6,48 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> slt \$at,\$a0,\$a1
-0+0004 <[^>]*> bnez \$at,0+0000 <text_label>
+0+0000 <[^>]*> slt at,a0,a1
+0+0004 <[^>]*> bnez at,0+0000 <text_label>
0+0008 <[^>]*> nop
-0+000c <[^>]*> bltz \$a0,0+0000 <text_label>
+0+000c <[^>]*> bltz a0,0+0000 <text_label>
0+0010 <[^>]*> nop
-0+0014 <[^>]*> bgtz \$a1,0+0000 <text_label>
+0+0014 <[^>]*> bgtz a1,0+0000 <text_label>
0+0018 <[^>]*> nop
-0+001c <[^>]*> bltz \$a0,0+0000 <text_label>
+0+001c <[^>]*> bltz a0,0+0000 <text_label>
0+0020 <[^>]*> nop
-0+0024 <[^>]*> blez \$a0,0+0000 <text_label>
+0+0024 <[^>]*> blez a0,0+0000 <text_label>
0+0028 <[^>]*> nop
-0+002c <[^>]*> slti \$at,\$a0,2
-0+0030 <[^>]*> bnez \$at,0+0000 <text_label>
+0+002c <[^>]*> slti at,a0,2
+0+0030 <[^>]*> bnez at,0+0000 <text_label>
0+0034 <[^>]*> nop
-0+0038 <[^>]*> li \$at,0x8000
-0+003c <[^>]*> slt \$at,\$a0,\$at
-0+0040 <[^>]*> bnez \$at,0+0000 <text_label>
+0+0038 <[^>]*> li at,0x8000
+0+003c <[^>]*> slt at,a0,at
+0+0040 <[^>]*> bnez at,0+0000 <text_label>
0+0044 <[^>]*> nop
-0+0048 <[^>]*> slti \$at,\$a0,-32768
-0+004c <[^>]*> bnez \$at,0+0000 <text_label>
+0+0048 <[^>]*> slti at,a0,-32768
+0+004c <[^>]*> bnez at,0+0000 <text_label>
0+0050 <[^>]*> nop
-0+0054 <[^>]*> lui \$at,0x1
-0+0058 <[^>]*> slt \$at,\$a0,\$at
-0+005c <[^>]*> bnez \$at,0+0000 <text_label>
+0+0054 <[^>]*> lui at,0x1
+0+0058 <[^>]*> slt at,a0,at
+0+005c <[^>]*> bnez at,0+0000 <text_label>
0+0060 <[^>]*> nop
-0+0064 <[^>]*> lui \$at,0x1
-0+0068 <[^>]*> ori \$at,\$at,0xa5a5
-0+006c <[^>]*> slt \$at,\$a0,\$at
-0+0070 <[^>]*> bnez \$at,0+0000 <text_label>
+0+0064 <[^>]*> lui at,0x1
+0+0068 <[^>]*> ori at,at,0xa5a5
+0+006c <[^>]*> slt at,a0,at
+0+0070 <[^>]*> bnez at,0+0000 <text_label>
0+0074 <[^>]*> nop
-0+0078 <[^>]*> slt \$at,\$a1,\$a0
-0+007c <[^>]*> beqz \$at,0+0000 <text_label>
+0+0078 <[^>]*> slt at,a1,a0
+0+007c <[^>]*> beqz at,0+0000 <text_label>
0+0080 <[^>]*> nop
-0+0084 <[^>]*> blez \$a0,0+0000 <text_label>
+0+0084 <[^>]*> blez a0,0+0000 <text_label>
0+0088 <[^>]*> nop
-0+008c <[^>]*> bgez \$a1,0+0000 <text_label>
+0+008c <[^>]*> bgez a1,0+0000 <text_label>
0+0090 <[^>]*> nop
-0+0094 <[^>]*> blez \$a0,0+0000 <text_label>
+0+0094 <[^>]*> blez a0,0+0000 <text_label>
0+0098 <[^>]*> nop
-0+009c <[^>]*> slt \$at,\$a0,\$a1
-0+00a0 <[^>]*> bnezl \$at,0+0000 <text_label>
+0+009c <[^>]*> slt at,a0,a1
+0+00a0 <[^>]*> bnezl at,0+0000 <text_label>
0+00a4 <[^>]*> nop
-0+00a8 <[^>]*> slt \$at,\$a1,\$a0
-0+00ac <[^>]*> beqzl \$at,0+0000 <text_label>
+0+00a8 <[^>]*> slt at,a1,a0
+0+00ac <[^>]*> beqzl at,0+0000 <text_label>
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bltu.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bltu.d
index 9c261c638ce..63dcd1794c0 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bltu.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/bltu.d
@@ -6,42 +6,42 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> sltu \$at,\$a0,\$a1
-0+0004 <[^>]*> bnez \$at,0+0000 <text_label>
+0+0000 <[^>]*> sltu at,a0,a1
+0+0004 <[^>]*> bnez at,0+0000 <text_label>
0+0008 <[^>]*> nop
-0+000c <[^>]*> bne \$zero,\$a1,0+0000 <text_label>
+0+000c <[^>]*> bne zero,a1,0+0000 <text_label>
0+0010 <[^>]*> nop
-0+0014 <[^>]*> beqz \$a0,0+0000 <text_label>
+0+0014 <[^>]*> beqz a0,0+0000 <text_label>
0+0018 <[^>]*> nop
-0+001c <[^>]*> sltiu \$at,\$a0,2
-0+0020 <[^>]*> bnez \$at,0+0000 <text_label>
+0+001c <[^>]*> sltiu at,a0,2
+0+0020 <[^>]*> bnez at,0+0000 <text_label>
0+0024 <[^>]*> nop
-0+0028 <[^>]*> li \$at,0x8000
-0+002c <[^>]*> sltu \$at,\$a0,\$at
-0+0030 <[^>]*> bnez \$at,0+0000 <text_label>
+0+0028 <[^>]*> li at,0x8000
+0+002c <[^>]*> sltu at,a0,at
+0+0030 <[^>]*> bnez at,0+0000 <text_label>
0+0034 <[^>]*> nop
-0+0038 <[^>]*> sltiu \$at,\$a0,-32768
-0+003c <[^>]*> bnez \$at,0+0000 <text_label>
+0+0038 <[^>]*> sltiu at,a0,-32768
+0+003c <[^>]*> bnez at,0+0000 <text_label>
0+0040 <[^>]*> nop
-0+0044 <[^>]*> lui \$at,0x1
-0+0048 <[^>]*> sltu \$at,\$a0,\$at
-0+004c <[^>]*> bnez \$at,0+0000 <text_label>
+0+0044 <[^>]*> lui at,0x1
+0+0048 <[^>]*> sltu at,a0,at
+0+004c <[^>]*> bnez at,0+0000 <text_label>
0+0050 <[^>]*> nop
-0+0054 <[^>]*> lui \$at,0x1
-0+0058 <[^>]*> ori \$at,\$at,0xa5a5
-0+005c <[^>]*> sltu \$at,\$a0,\$at
-0+0060 <[^>]*> bnez \$at,0+0000 <text_label>
+0+0054 <[^>]*> lui at,0x1
+0+0058 <[^>]*> ori at,at,0xa5a5
+0+005c <[^>]*> sltu at,a0,at
+0+0060 <[^>]*> bnez at,0+0000 <text_label>
0+0064 <[^>]*> nop
-0+0068 <[^>]*> sltu \$at,\$a1,\$a0
-0+006c <[^>]*> beqz \$at,0+0000 <text_label>
+0+0068 <[^>]*> sltu at,a1,a0
+0+006c <[^>]*> beqz at,0+0000 <text_label>
0+0070 <[^>]*> nop
-0+0074 <[^>]*> beqz \$a0,0+0000 <text_label>
+0+0074 <[^>]*> beqz a0,0+0000 <text_label>
0+0078 <[^>]*> nop
-0+007c <[^>]*> beqz \$a0,0+0000 <text_label>
+0+007c <[^>]*> beqz a0,0+0000 <text_label>
0+0080 <[^>]*> nop
-0+0084 <[^>]*> sltu \$at,\$a0,\$a1
-0+0088 <[^>]*> bnezl \$at,0+0000 <text_label>
+0+0084 <[^>]*> sltu at,a0,a1
+0+0088 <[^>]*> bnezl at,0+0000 <text_label>
0+008c <[^>]*> nop
-0+0090 <[^>]*> sltu \$at,\$a1,\$a0
-0+0094 <[^>]*> beqzl \$at,0+0000 <text_label>
+0+0090 <[^>]*> sltu at,a1,a0
+0+0094 <[^>]*> beqzl at,0+0000 <text_label>
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/div.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/div.d
index fec5bb2c59b..ffd5675233b 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/div.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/div.d
@@ -7,119 +7,119 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> div \$zero,\$a0,\$a1
-0+0004 <[^>]*> bnez \$a1,0+0010 <foo\+0x10>
-0+0008 <[^>]*> div \$zero,\$a0,\$a1
+0+0000 <[^>]*> div zero,a0,a1
+0+0004 <[^>]*> bnez a1,0+0010 <foo\+0x10>
+0+0008 <[^>]*> div zero,a0,a1
0+000c <[^>]*> break (0x0,0x7|0x7)
-0+0010 <[^>]*> li \$at,-1
-0+0014 <[^>]*> bne \$a1,\$at,0+0028 <foo\+0x28>
-0+0018 <[^>]*> lui \$at,0x8000
-0+001c <[^>]*> bne \$a0,\$at,0+0028 <foo\+0x28>
+0+0010 <[^>]*> li at,-1
+0+0014 <[^>]*> bne a1,at,0+0028 <foo\+0x28>
+0+0018 <[^>]*> lui at,0x8000
+0+001c <[^>]*> bne a0,at,0+0028 <foo\+0x28>
0+0020 <[^>]*> nop
0+0024 <[^>]*> break (0x0,0x6|0x6)
-0+0028 <[^>]*> mflo \$a0
+0+0028 <[^>]*> mflo a0
0+002c <[^>]*> nop
-0+0030 <[^>]*> bnez \$a2,0+003c <foo\+0x3c>
-0+0034 <[^>]*> div \$zero,\$a1,\$a2
+0+0030 <[^>]*> bnez a2,0+003c <foo\+0x3c>
+0+0034 <[^>]*> div zero,a1,a2
0+0038 <[^>]*> break (0x0,0x7|0x7)
-0+003c <[^>]*> li \$at,-1
-0+0040 <[^>]*> bne \$a2,\$at,0+0054 <foo\+0x54>
-0+0044 <[^>]*> lui \$at,0x8000
-0+0048 <[^>]*> bne \$a1,\$at,0+0054 <foo\+0x54>
+0+003c <[^>]*> li at,-1
+0+0040 <[^>]*> bne a2,at,0+0054 <foo\+0x54>
+0+0044 <[^>]*> lui at,0x8000
+0+0048 <[^>]*> bne a1,at,0+0054 <foo\+0x54>
0+004c <[^>]*> nop
0+0050 <[^>]*> break (0x0,0x6|0x6)
-0+0054 <[^>]*> mflo \$a0
-0+0058 <[^>]*> move \$a0,\$a0
-0+005c <[^>]*> move \$a0,\$a1
-0+0060 <[^>]*> neg \$a0,\$a0
-0+0064 <[^>]*> neg \$a0,\$a1
-0+0068 <[^>]*> li \$at,2
-0+006c <[^>]*> div \$zero,\$a0,\$at
-0+0070 <[^>]*> mflo \$a0
-0+0074 <[^>]*> li \$at,2
+0+0054 <[^>]*> mflo a0
+0+0058 <[^>]*> move a0,a0
+0+005c <[^>]*> move a0,a1
+0+0060 <[^>]*> neg a0,a0
+0+0064 <[^>]*> neg a0,a1
+0+0068 <[^>]*> li at,2
+0+006c <[^>]*> div zero,a0,at
+0+0070 <[^>]*> mflo a0
+0+0074 <[^>]*> li at,2
0+0078 <[^>]*> nop
-0+007c <[^>]*> div \$zero,\$a1,\$at
-0+0080 <[^>]*> mflo \$a0
-0+0084 <[^>]*> li \$at,0x8000
+0+007c <[^>]*> div zero,a1,at
+0+0080 <[^>]*> mflo a0
+0+0084 <[^>]*> li at,0x8000
0+0088 <[^>]*> nop
-0+008c <[^>]*> div \$zero,\$a0,\$at
-0+0090 <[^>]*> mflo \$a0
-0+0094 <[^>]*> li \$at,0x8000
+0+008c <[^>]*> div zero,a0,at
+0+0090 <[^>]*> mflo a0
+0+0094 <[^>]*> li at,0x8000
0+0098 <[^>]*> nop
-0+009c <[^>]*> div \$zero,\$a1,\$at
-0+00a0 <[^>]*> mflo \$a0
-0+00a4 <[^>]*> li \$at,-32768
+0+009c <[^>]*> div zero,a1,at
+0+00a0 <[^>]*> mflo a0
+0+00a4 <[^>]*> li at,-32768
0+00a8 <[^>]*> nop
-0+00ac <[^>]*> div \$zero,\$a0,\$at
-0+00b0 <[^>]*> mflo \$a0
-0+00b4 <[^>]*> li \$at,-32768
+0+00ac <[^>]*> div zero,a0,at
+0+00b0 <[^>]*> mflo a0
+0+00b4 <[^>]*> li at,-32768
0+00b8 <[^>]*> nop
-0+00bc <[^>]*> div \$zero,\$a1,\$at
-0+00c0 <[^>]*> mflo \$a0
-0+00c4 <[^>]*> lui \$at,0x1
+0+00bc <[^>]*> div zero,a1,at
+0+00c0 <[^>]*> mflo a0
+0+00c4 <[^>]*> lui at,0x1
0+00c8 <[^>]*> nop
-0+00cc <[^>]*> div \$zero,\$a0,\$at
-0+00d0 <[^>]*> mflo \$a0
-0+00d4 <[^>]*> lui \$at,0x1
+0+00cc <[^>]*> div zero,a0,at
+0+00d0 <[^>]*> mflo a0
+0+00d4 <[^>]*> lui at,0x1
0+00d8 <[^>]*> nop
-0+00dc <[^>]*> div \$zero,\$a1,\$at
-0+00e0 <[^>]*> mflo \$a0
-0+00e4 <[^>]*> lui \$at,0x1
-0+00e8 <[^>]*> ori \$at,\$at,0xa5a5
-0+00ec <[^>]*> div \$zero,\$a0,\$at
-0+00f0 <[^>]*> mflo \$a0
-0+00f4 <[^>]*> lui \$at,0x1
-0+00f8 <[^>]*> ori \$at,\$at,0xa5a5
-0+00fc <[^>]*> div \$zero,\$a1,\$at
-0+0100 <[^>]*> mflo \$a0
+0+00dc <[^>]*> div zero,a1,at
+0+00e0 <[^>]*> mflo a0
+0+00e4 <[^>]*> lui at,0x1
+0+00e8 <[^>]*> ori at,at,0xa5a5
+0+00ec <[^>]*> div zero,a0,at
+0+00f0 <[^>]*> mflo a0
+0+00f4 <[^>]*> lui at,0x1
+0+00f8 <[^>]*> ori at,at,0xa5a5
+0+00fc <[^>]*> div zero,a1,at
+0+0100 <[^>]*> mflo a0
...
-0+010c <[^>]*> divu \$zero,\$a0,\$a1
-0+0110 <[^>]*> bnez \$a1,0+011c <foo\+0x11c>
-0+0114 <[^>]*> divu \$zero,\$a0,\$a1
+0+010c <[^>]*> divu zero,a0,a1
+0+0110 <[^>]*> bnez a1,0+011c <foo\+0x11c>
+0+0114 <[^>]*> divu zero,a0,a1
0+0118 <[^>]*> break (0x0,0x7|0x7)
-0+011c <[^>]*> mflo \$a0
+0+011c <[^>]*> mflo a0
0+0120 <[^>]*> nop
-0+0124 <[^>]*> bnez \$a2,0+0130 <foo\+0x130>
-0+0128 <[^>]*> divu \$zero,\$a1,\$a2
+0+0124 <[^>]*> bnez a2,0+0130 <foo\+0x130>
+0+0128 <[^>]*> divu zero,a1,a2
0+012c <[^>]*> break (0x0,0x7|0x7)
-0+0130 <[^>]*> mflo \$a0
-0+0134 <[^>]*> move \$a0,\$a0
-0+0138 <[^>]*> bnez \$a2,0+0144 <foo\+0x144>
-0+013c <[^>]*> div \$zero,\$a1,\$a2
+0+0130 <[^>]*> mflo a0
+0+0134 <[^>]*> move a0,a0
+0+0138 <[^>]*> bnez a2,0+0144 <foo\+0x144>
+0+013c <[^>]*> div zero,a1,a2
0+0140 <[^>]*> break (0x0,0x7|0x7)
-0+0144 <[^>]*> li \$at,-1
-0+0148 <[^>]*> bne \$a2,\$at,0+015c <foo\+0x15c>
-0+014c <[^>]*> lui \$at,0x8000
-0+0150 <[^>]*> bne \$a1,\$at,0+015c <foo\+0x15c>
+0+0144 <[^>]*> li at,-1
+0+0148 <[^>]*> bne a2,at,0+015c <foo\+0x15c>
+0+014c <[^>]*> lui at,0x8000
+0+0150 <[^>]*> bne a1,at,0+015c <foo\+0x15c>
0+0154 <[^>]*> nop
0+0158 <[^>]*> break (0x0,0x6|0x6)
-0+015c <[^>]*> mfhi \$a0
-0+0160 <[^>]*> li \$at,2
+0+015c <[^>]*> mfhi a0
+0+0160 <[^>]*> li at,2
0+0164 <[^>]*> nop
-0+0168 <[^>]*> divu \$zero,\$a1,\$at
-0+016c <[^>]*> mfhi \$a0
+0+0168 <[^>]*> divu zero,a1,at
+0+016c <[^>]*> mfhi a0
0+0170 <[^>]*> nop
-0+0174 <[^>]*> bnez \$a2,0+0180 <foo\+0x180>
-0+0178 <[^>]*> ddiv \$zero,\$a1,\$a2
+0+0174 <[^>]*> bnez a2,0+0180 <foo\+0x180>
+0+0178 <[^>]*> ddiv zero,a1,a2
0+017c <[^>]*> break (0x0,0x7|0x7)
-0+0180 <[^>]*> daddiu \$at,\$zero,-1
-0+0184 <[^>]*> bne \$a2,\$at,0+019c <foo\+0x19c>
-0+0188 <[^>]*> daddiu \$at,\$zero,1
-0+018c <[^>]*> dsll32 \$at,\$at,0x1f
-0+0190 <[^>]*> bne \$a1,\$at,0+019c <foo\+0x19c>
+0+0180 <[^>]*> daddiu at,zero,-1
+0+0184 <[^>]*> bne a2,at,0+019c <foo\+0x19c>
+0+0188 <[^>]*> daddiu at,zero,1
+0+018c <[^>]*> dsll32 at,at,0x1f
+0+0190 <[^>]*> bne a1,at,0+019c <foo\+0x19c>
0+0194 <[^>]*> nop
0+0198 <[^>]*> break (0x0,0x6|0x6)
-0+019c <[^>]*> mflo \$a0
-0+01a0 <[^>]*> li \$at,2
+0+019c <[^>]*> mflo a0
+0+01a0 <[^>]*> li at,2
0+01a4 <[^>]*> nop
-0+01a8 <[^>]*> ddivu \$zero,\$a1,\$at
-0+01ac <[^>]*> mflo \$a0
-0+01b0 <[^>]*> li \$at,0x8000
+0+01a8 <[^>]*> ddivu zero,a1,at
+0+01ac <[^>]*> mflo a0
+0+01b0 <[^>]*> li at,0x8000
0+01b4 <[^>]*> nop
-0+01b8 <[^>]*> ddiv \$zero,\$a1,\$at
-0+01bc <[^>]*> mfhi \$a0
-0+01c0 <[^>]*> li \$at,-32768
+0+01b8 <[^>]*> ddiv zero,a1,at
+0+01bc <[^>]*> mfhi a0
+0+01c0 <[^>]*> li at,-32768
0+01c4 <[^>]*> nop
-0+01c8 <[^>]*> ddivu \$zero,\$a1,\$at
-0+01cc <[^>]*> mfhi \$a0
+0+01c8 <[^>]*> ddivu zero,a1,at
+0+01cc <[^>]*> mfhi a0
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/dli.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/dli.d
index 72b445e2b16..b2df84ff223 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/dli.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/dli.d
@@ -7,109 +7,109 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> li \$a0,0
-0+0004 <[^>]*> li \$a0,1
-0+0008 <[^>]*> li \$a0,-1
-0+000c <[^>]*> li \$a0,0x8000
-0+0010 <[^>]*> li \$a0,-32768
-0+0014 <[^>]*> lui \$a0,0x1
-0+0018 <[^>]*> lui \$a0,0x1
-0+001c <[^>]*> ori \$a0,\$a0,0xa5a5
-0+0020 <[^>]*> li \$a0,0x8000
-0+0024 <[^>]*> dsll \$a0,\$a0,0x10
-0+0028 <[^>]*> ori \$a0,\$a0,0x1234
-0+002c <[^>]*> lui \$a0,0xffff
-0+0030 <[^>]*> dsrl32 \$a0,\$a0,0x0
-0+0034 <[^>]*> lui \$a0,0xffff
-0+0038 <[^>]*> dsrl32 \$a0,\$a0,0x0
-0+003c <[^>]*> li \$a0,-1
-0+0040 <[^>]*> li \$a0,-1
-0+0044 <[^>]*> dsrl \$a0,\$a0,0xc
-0+0048 <[^>]*> lui \$a0,0x8000
-0+004c <[^>]*> ori \$a0,\$a0,0x1234
-0+0050 <[^>]*> li \$a0,-32768
-0+0054 <[^>]*> dsll \$a0,\$a0,0x10
-0+0058 <[^>]*> ori \$a0,\$a0,0x1234
-0+005c <[^>]*> dsll \$a0,\$a0,0x10
-0+0060 <[^>]*> ori \$a0,\$a0,0x5678
-0+0064 <[^>]*> lui \$a0,0x8000
-0+0068 <[^>]*> ori \$a0,\$a0,0x1234
-0+006c <[^>]*> dsll \$a0,\$a0,0x10
-0+0070 <[^>]*> ori \$a0,\$a0,0x5678
-0+0074 <[^>]*> dsll \$a0,\$a0,0x10
-0+0078 <[^>]*> li \$a0,-30875
-0+007c <[^>]*> lui \$a0,0xffff
-0+0080 <[^>]*> ori \$a0,\$a0,0x4321
-0+0084 <[^>]*> li \$a0,-16
-0+0088 <[^>]*> li \$a0,-256
-0+008c <[^>]*> li \$a0,-4096
-0+0090 <[^>]*> lui \$a0,0xffff
-0+0094 <[^>]*> lui \$a0,0xfff0
-0+0098 <[^>]*> lui \$a0,0xff00
-0+009c <[^>]*> lui \$a0,0xf000
-0+00a0 <[^>]*> li \$a0,-1
-0+00a4 <[^>]*> dsll32 \$a0,\$a0,0x0
-0+00a8 <[^>]*> li \$a0,-16
-0+00ac <[^>]*> dsll32 \$a0,\$a0,0x0
-0+00b0 <[^>]*> li \$a0,-256
-0+00b4 <[^>]*> dsll32 \$a0,\$a0,0x0
-0+00b8 <[^>]*> li \$a0,-4096
-0+00bc <[^>]*> dsll32 \$a0,\$a0,0x0
-0+00c0 <[^>]*> li \$a0,0xffff
-0+00c4 <[^>]*> dsll32 \$a0,\$a0,0x10
-0+00c8 <[^>]*> li \$a0,0xfff0
-0+00cc <[^>]*> dsll32 \$a0,\$a0,0x10
-0+00d0 <[^>]*> li \$a0,0xff00
-0+00d4 <[^>]*> dsll32 \$a0,\$a0,0x10
-0+00d8 <[^>]*> li \$a0,0xf000
-0+00dc <[^>]*> dsll32 \$a0,\$a0,0x10
-0+00e0 <[^>]*> li \$a0,-1
-0+00e4 <[^>]*> dsrl \$a0,\$a0,0x4
-0+00e8 <[^>]*> li \$a0,-1
-0+00ec <[^>]*> dsrl \$a0,\$a0,0x8
-0+00f0 <[^>]*> li \$a0,-1
-0+00f4 <[^>]*> dsrl \$a0,\$a0,0xc
-0+00f8 <[^>]*> li \$a0,-1
-0+00fc <[^>]*> dsrl \$a0,\$a0,0x10
-0+0100 <[^>]*> li \$a0,-1
-0+0104 <[^>]*> dsrl \$a0,\$a0,0x14
-0+0108 <[^>]*> li \$a0,-1
-0+010c <[^>]*> dsrl \$a0,\$a0,0x18
-0+0110 <[^>]*> li \$a0,-1
-0+0114 <[^>]*> dsrl \$a0,\$a0,0x1c
-0+0118 <[^>]*> lui \$a0,0xffff
-0+011c <[^>]*> dsrl32 \$a0,\$a0,0x0
-0+0120 <[^>]*> lui \$a0,0xfff
-0+0124 <[^>]*> ori \$a0,\$a0,0xffff
-0+0128 <[^>]*> lui \$a0,0xff
-0+012c <[^>]*> ori \$a0,\$a0,0xffff
-0+0130 <[^>]*> lui \$a0,0xf
-0+0134 <[^>]*> ori \$a0,\$a0,0xffff
-0+0138 <[^>]*> li \$a0,0xffff
-0+013c <[^>]*> li \$a0,4095
-0+0140 <[^>]*> li \$a0,255
-0+0144 <[^>]*> li \$a0,15
-0+0148 <[^>]*> lui \$a0,0x3
-0+014c <[^>]*> ori \$a0,\$a0,0xfffc
-0+0150 <[^>]*> li \$a0,0xffff
-0+0154 <[^>]*> dsll \$a0,\$a0,0x1e
-0+0158 <[^>]*> li \$a0,0xffff
-0+015c <[^>]*> dsll32 \$a0,\$a0,0x2
-0+0160 <[^>]*> li \$a0,0xffff
-0+0164 <[^>]*> dsll32 \$a0,\$a0,0x6
-0+0168 <[^>]*> li \$a0,-1
-0+016c <[^>]*> dsll32 \$a0,\$a0,0x0
-0+0170 <[^>]*> dsrl \$a0,\$a0,0xa
-0+0174 <[^>]*> li \$a0,-1
-0+0178 <[^>]*> dsll \$a0,\$a0,0x1c
-0+017c <[^>]*> dsrl \$a0,\$a0,0xa
-0+0180 <[^>]*> li \$a0,-1
-0+0184 <[^>]*> dsll \$a0,\$a0,0x18
-0+0188 <[^>]*> dsrl \$a0,\$a0,0xa
-0+018c <[^>]*> lui \$a0,0x3f
-0+0190 <[^>]*> ori \$a0,\$a0,0xfc03
-0+0194 <[^>]*> dsll \$a0,\$a0,0x10
-0+0198 <[^>]*> ori \$a0,\$a0,0xffff
-0+019c <[^>]*> dsll \$a0,\$a0,0x10
-0+01a0 <[^>]*> ori \$a0,\$a0,0xc000
+0+0000 <[^>]*> li a0,0
+0+0004 <[^>]*> li a0,1
+0+0008 <[^>]*> li a0,-1
+0+000c <[^>]*> li a0,0x8000
+0+0010 <[^>]*> li a0,-32768
+0+0014 <[^>]*> lui a0,0x1
+0+0018 <[^>]*> lui a0,0x1
+0+001c <[^>]*> ori a0,a0,0xa5a5
+0+0020 <[^>]*> li a0,0x8000
+0+0024 <[^>]*> dsll a0,a0,0x10
+0+0028 <[^>]*> ori a0,a0,0x1234
+0+002c <[^>]*> lui a0,0xffff
+0+0030 <[^>]*> dsrl32 a0,a0,0x0
+0+0034 <[^>]*> lui a0,0xffff
+0+0038 <[^>]*> dsrl32 a0,a0,0x0
+0+003c <[^>]*> li a0,-1
+0+0040 <[^>]*> li a0,-1
+0+0044 <[^>]*> dsrl a0,a0,0xc
+0+0048 <[^>]*> lui a0,0x8000
+0+004c <[^>]*> ori a0,a0,0x1234
+0+0050 <[^>]*> li a0,-32768
+0+0054 <[^>]*> dsll a0,a0,0x10
+0+0058 <[^>]*> ori a0,a0,0x1234
+0+005c <[^>]*> dsll a0,a0,0x10
+0+0060 <[^>]*> ori a0,a0,0x5678
+0+0064 <[^>]*> lui a0,0x8000
+0+0068 <[^>]*> ori a0,a0,0x1234
+0+006c <[^>]*> dsll a0,a0,0x10
+0+0070 <[^>]*> ori a0,a0,0x5678
+0+0074 <[^>]*> dsll a0,a0,0x10
+0+0078 <[^>]*> li a0,-30875
+0+007c <[^>]*> lui a0,0xffff
+0+0080 <[^>]*> ori a0,a0,0x4321
+0+0084 <[^>]*> li a0,-16
+0+0088 <[^>]*> li a0,-256
+0+008c <[^>]*> li a0,-4096
+0+0090 <[^>]*> lui a0,0xffff
+0+0094 <[^>]*> lui a0,0xfff0
+0+0098 <[^>]*> lui a0,0xff00
+0+009c <[^>]*> lui a0,0xf000
+0+00a0 <[^>]*> li a0,-1
+0+00a4 <[^>]*> dsll32 a0,a0,0x0
+0+00a8 <[^>]*> li a0,-16
+0+00ac <[^>]*> dsll32 a0,a0,0x0
+0+00b0 <[^>]*> li a0,-256
+0+00b4 <[^>]*> dsll32 a0,a0,0x0
+0+00b8 <[^>]*> li a0,-4096
+0+00bc <[^>]*> dsll32 a0,a0,0x0
+0+00c0 <[^>]*> li a0,0xffff
+0+00c4 <[^>]*> dsll32 a0,a0,0x10
+0+00c8 <[^>]*> li a0,0xfff0
+0+00cc <[^>]*> dsll32 a0,a0,0x10
+0+00d0 <[^>]*> li a0,0xff00
+0+00d4 <[^>]*> dsll32 a0,a0,0x10
+0+00d8 <[^>]*> li a0,0xf000
+0+00dc <[^>]*> dsll32 a0,a0,0x10
+0+00e0 <[^>]*> li a0,-1
+0+00e4 <[^>]*> dsrl a0,a0,0x4
+0+00e8 <[^>]*> li a0,-1
+0+00ec <[^>]*> dsrl a0,a0,0x8
+0+00f0 <[^>]*> li a0,-1
+0+00f4 <[^>]*> dsrl a0,a0,0xc
+0+00f8 <[^>]*> li a0,-1
+0+00fc <[^>]*> dsrl a0,a0,0x10
+0+0100 <[^>]*> li a0,-1
+0+0104 <[^>]*> dsrl a0,a0,0x14
+0+0108 <[^>]*> li a0,-1
+0+010c <[^>]*> dsrl a0,a0,0x18
+0+0110 <[^>]*> li a0,-1
+0+0114 <[^>]*> dsrl a0,a0,0x1c
+0+0118 <[^>]*> lui a0,0xffff
+0+011c <[^>]*> dsrl32 a0,a0,0x0
+0+0120 <[^>]*> lui a0,0xfff
+0+0124 <[^>]*> ori a0,a0,0xffff
+0+0128 <[^>]*> lui a0,0xff
+0+012c <[^>]*> ori a0,a0,0xffff
+0+0130 <[^>]*> lui a0,0xf
+0+0134 <[^>]*> ori a0,a0,0xffff
+0+0138 <[^>]*> li a0,0xffff
+0+013c <[^>]*> li a0,4095
+0+0140 <[^>]*> li a0,255
+0+0144 <[^>]*> li a0,15
+0+0148 <[^>]*> lui a0,0x3
+0+014c <[^>]*> ori a0,a0,0xfffc
+0+0150 <[^>]*> li a0,0xffff
+0+0154 <[^>]*> dsll a0,a0,0x1e
+0+0158 <[^>]*> li a0,0xffff
+0+015c <[^>]*> dsll32 a0,a0,0x2
+0+0160 <[^>]*> li a0,0xffff
+0+0164 <[^>]*> dsll32 a0,a0,0x6
+0+0168 <[^>]*> li a0,-1
+0+016c <[^>]*> dsll32 a0,a0,0x0
+0+0170 <[^>]*> dsrl a0,a0,0xa
+0+0174 <[^>]*> li a0,-1
+0+0178 <[^>]*> dsll a0,a0,0x1c
+0+017c <[^>]*> dsrl a0,a0,0xa
+0+0180 <[^>]*> li a0,-1
+0+0184 <[^>]*> dsll a0,a0,0x18
+0+0188 <[^>]*> dsrl a0,a0,0xa
+0+018c <[^>]*> lui a0,0x3f
+0+0190 <[^>]*> ori a0,a0,0xfc03
+0+0194 <[^>]*> dsll a0,a0,0x10
+0+0198 <[^>]*> ori a0,a0,0xffff
+0+019c <[^>]*> dsll a0,a0,0x10
+0+01a0 <[^>]*> ori a0,a0,0xc000
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-empic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-empic.d
index c46ccfacc77..55e71500e1c 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-empic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-empic.d
@@ -8,9 +8,9 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> jalr \$t9
+0+0000 <[^>]*> jalr t9
0+0004 <[^>]*> nop
-0+0008 <[^>]*> jalr \$a0,\$t9
+0+0008 <[^>]*> jalr a0,t9
0+000c <[^>]*> nop
0+0010 <[^>]*> bal 0+0000 <text_label>
[ ]*10: PCREL16 .text
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.d
index b15be76248d..44af20a1a88 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.d
@@ -7,33 +7,40 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lui \$gp,0x0
+0+0000 <[^>]*> lui gp,0x0
[ ]*0: R_MIPS_HI16 _gp_disp
-0+0004 <[^>]*> addiu \$gp,\$gp,0
+0+0004 <[^>]*> addiu gp,gp,0
[ ]*4: R_MIPS_LO16 _gp_disp
-0+0008 <[^>]*> addu \$gp,\$gp,\$t9
-0+000c <[^>]*> sw \$gp,0\(\$sp\)
-0+0010 <[^>]*> jalr \$t9
+0+0008 <[^>]*> addu gp,gp,t9
+0+000c <[^>]*> sw gp,0\(sp\)
+0+0010 <[^>]*> jalr t9
0+0014 <[^>]*> nop
-0+0018 <[^>]*> lw \$gp,0\(\$sp\)
-0+001c <[^>]*> jalr \$a0,\$t9
+0+0018 <[^>]*> lw gp,0\(sp\)
+0+001c <[^>]*> jalr a0,t9
0+0020 <[^>]*> nop
-0+0024 <[^>]*> lw \$gp,0\(\$sp\)
+0+0024 <[^>]*> lw gp,0\(sp\)
0+0028 <[^>]*> nop
-0+002c <[^>]*> lw \$t9,0\(\$gp\)
+0+002c <[^>]*> lw t9,0\(gp\)
[ ]*2c: R_MIPS_GOT16 .text
0+0030 <[^>]*> nop
-0+0034 <[^>]*> addiu \$t9,\$t9,0
+0+0034 <[^>]*> addiu t9,t9,0
[ ]*34: R_MIPS_LO16 .text
-0+0038 <[^>]*> jalr \$t9
+0+0038 <[^>]*> jalr t9
0+003c <[^>]*> nop
-0+0040 <[^>]*> lw \$gp,0\(\$sp\)
+0+0040 <[^>]*> lw gp,0\(sp\)
0+0044 <[^>]*> nop
-0+0048 <[^>]*> lw \$t9,0\(\$gp\)
-[ ]*48: R_MIPS_CALL16 external_text_label
+0+0048 <[^>]*> lw t9,0\(gp\)
+[ ]*48: R_MIPS_CALL16 weak_text_label
0+004c <[^>]*> nop
-0+0050 <[^>]*> jalr \$t9
+0+0050 <[^>]*> jalr t9
0+0054 <[^>]*> nop
-0+0058 <[^>]*> lw \$gp,0\(\$sp\)
-0+005c <[^>]*> b 0+0000 <text_label>
+0+0058 <[^>]*> lw gp,0\(sp\)
+0+005c <[^>]*> nop
+0+0060 <[^>]*> lw t9,0\(gp\)
+[ ]*60: R_MIPS_CALL16 external_text_label
+0+0064 <[^>]*> nop
+0+0068 <[^>]*> jalr t9
+0+006c <[^>]*> nop
+0+0070 <[^>]*> lw gp,0\(sp\)
+0+0074 <[^>]*> b 0+0000 <text_label>
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.s b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.s
index 9d89dfa50ff..1174e948174 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-svr4pic.s
@@ -1,5 +1,7 @@
# Source file used to test the jal macro with -KPIC code.
+.weak weak_text_label
+
text_label:
.set noreorder
.cpload $25
@@ -8,13 +10,12 @@ text_label:
jal $25
jal $4,$25
jal text_label
+ jal weak_text_label
jal external_text_label
-
+
# Test j as well
j text_label
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
nop
- nop
- nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-xgot.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-xgot.d
index a26dca38b23..318b50bd6bb 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-xgot.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal-xgot.d
@@ -8,35 +8,44 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lui \$gp,0x0
+0+0000 <[^>]*> lui gp,0x0
[ ]*0: R_MIPS_HI16 _gp_disp
-0+0004 <[^>]*> addiu \$gp,\$gp,0
+0+0004 <[^>]*> addiu gp,gp,0
[ ]*4: R_MIPS_LO16 _gp_disp
-0+0008 <[^>]*> addu \$gp,\$gp,\$t9
-0+000c <[^>]*> sw \$gp,0\(\$sp\)
-0+0010 <[^>]*> jalr \$t9
+0+0008 <[^>]*> addu gp,gp,t9
+0+000c <[^>]*> sw gp,0\(sp\)
+0+0010 <[^>]*> jalr t9
0+0014 <[^>]*> nop
-0+0018 <[^>]*> lw \$gp,0\(\$sp\)
-0+001c <[^>]*> jalr \$a0,\$t9
+0+0018 <[^>]*> lw gp,0\(sp\)
+0+001c <[^>]*> jalr a0,t9
0+0020 <[^>]*> nop
-0+0024 <[^>]*> lw \$gp,0\(\$sp\)
+0+0024 <[^>]*> lw gp,0\(sp\)
0+0028 <[^>]*> nop
-0+002c <[^>]*> lw \$t9,0\(\$gp\)
+0+002c <[^>]*> lw t9,0\(gp\)
[ ]*2c: R_MIPS_GOT16 .text
0+0030 <[^>]*> nop
-0+0034 <[^>]*> addiu \$t9,\$t9,0
+0+0034 <[^>]*> addiu t9,t9,0
[ ]*34: R_MIPS_LO16 .text
-0+0038 <[^>]*> jalr \$t9
+0+0038 <[^>]*> jalr t9
0+003c <[^>]*> nop
-0+0040 <[^>]*> lw \$gp,0\(\$sp\)
-0+0044 <[^>]*> lui \$t9,0x0
-[ ]*44: R_MIPS_CALL_HI16 external_text_label
-0+0048 <[^>]*> addu \$t9,\$t9,\$gp
-0+004c <[^>]*> lw \$t9,0\(\$t9\)
-[ ]*4c: R_MIPS_CALL_LO16 external_text_label
+0+0040 <[^>]*> lw gp,0\(sp\)
+0+0044 <[^>]*> lui t9,0x0
+[ ]*44: R_MIPS_CALL_HI16 weak_text_label
+0+0048 <[^>]*> addu t9,t9,gp
+0+004c <[^>]*> lw t9,0\(t9\)
+[ ]*4c: R_MIPS_CALL_LO16 weak_text_label
0+0050 <[^>]*> nop
-0+0054 <[^>]*> jalr \$t9
+0+0054 <[^>]*> jalr t9
0+0058 <[^>]*> nop
-0+005c <[^>]*> lw \$gp,0\(\$sp\)
-0+0060 <[^>]*> b 0+0000 <text_label>
+0+005c <[^>]*> lw gp,0\(sp\)
+0+0060 <[^>]*> lui t9,0x0
+[ ]*60: R_MIPS_CALL_HI16 external_text_label
+0+0064 <[^>]*> addu t9,t9,gp
+0+0068 <[^>]*> lw t9,0\(t9\)
+[ ]*68: R_MIPS_CALL_LO16 external_text_label
+0+006c <[^>]*> nop
+0+0070 <[^>]*> jalr t9
+0+0074 <[^>]*> nop
+0+0078 <[^>]*> lw gp,0\(sp\)
+0+007c <[^>]*> b 0+0000 <text_label>
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal.d
index b7b586f212a..8b8e155e9c5 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/jal.d
@@ -6,9 +6,9 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> jalr \$t9
+0+0000 <[^>]*> jalr t9
0+0004 <[^>]*> nop
-0+0008 <[^>]*> jalr \$a0,\$t9
+0+0008 <[^>]*> jalr a0,t9
0+000c <[^>]*> nop
0+0010 <[^>]*> jal 0+ <text_label>
[ ]*10: (MIPS_JMP|MIPS_JMP|JMPADDR|R_MIPS_26) .text
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-empic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-empic.d
index af29570d0bd..c6866096f0d 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-empic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-empic.d
@@ -7,99 +7,99 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> li \$a0,0
-0+0004 <[^>]*> li \$a0,1
-0+0008 <[^>]*> li \$a0,0x8000
-0+000c <[^>]*> li \$a0,-32768
-0+0010 <[^>]*> lui \$a0,0x1
-0+0014 <[^>]*> lui \$a0,0x1
-0+0018 <[^>]*> ori \$a0,\$a0,0xa5a5
-0+001c <[^>]*> li \$a0,0
-0+0020 <[^>]*> addu \$a0,\$a0,\$a1
-0+0024 <[^>]*> li \$a0,1
-0+0028 <[^>]*> addu \$a0,\$a0,\$a1
-0+002c <[^>]*> li \$a0,0x8000
-0+0030 <[^>]*> addu \$a0,\$a0,\$a1
-0+0034 <[^>]*> li \$a0,-32768
-0+0038 <[^>]*> addu \$a0,\$a0,\$a1
-0+003c <[^>]*> lui \$a0,0x1
-0+0040 <[^>]*> addu \$a0,\$a0,\$a1
-0+0044 <[^>]*> lui \$a0,0x1
-0+0048 <[^>]*> ori \$a0,\$a0,0xa5a5
-0+004c <[^>]*> addu \$a0,\$a0,\$a1
-0+0050 <[^>]*> addiu \$a0,\$gp,-16384
+0+0000 <[^>]*> li a0,0
+0+0004 <[^>]*> li a0,1
+0+0008 <[^>]*> li a0,0x8000
+0+000c <[^>]*> li a0,-32768
+0+0010 <[^>]*> lui a0,0x1
+0+0014 <[^>]*> lui a0,0x1
+0+0018 <[^>]*> ori a0,a0,0xa5a5
+0+001c <[^>]*> li a0,0
+0+0020 <[^>]*> addu a0,a0,a1
+0+0024 <[^>]*> li a0,1
+0+0028 <[^>]*> addu a0,a0,a1
+0+002c <[^>]*> li a0,0x8000
+0+0030 <[^>]*> addu a0,a0,a1
+0+0034 <[^>]*> li a0,-32768
+0+0038 <[^>]*> addu a0,a0,a1
+0+003c <[^>]*> lui a0,0x1
+0+0040 <[^>]*> addu a0,a0,a1
+0+0044 <[^>]*> lui a0,0x1
+0+0048 <[^>]*> ori a0,a0,0xa5a5
+0+004c <[^>]*> addu a0,a0,a1
+0+0050 <[^>]*> addiu a0,gp,-16384
[ ]*50: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0054 <[^>]*> addiu \$a0,\$gp,0
+0+0054 <[^>]*> addiu a0,gp,0
[ ]*54: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+0058 <[^>]*> addiu \$a0,\$gp,0
+0+0058 <[^>]*> addiu a0,gp,0
[ ]*58: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+005c <[^>]*> addiu \$a0,\$gp,0
+0+005c <[^>]*> addiu a0,gp,0
[ ]*5c: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+0060 <[^>]*> addiu \$a0,\$gp,0
+0+0060 <[^>]*> addiu a0,gp,0
[ ]*60: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0064 <[^>]*> addiu \$a0,\$gp,-16384
+0+0064 <[^>]*> addiu a0,gp,-16384
[ ]*64: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0068 <[^>]*> addiu \$a0,\$gp,-15384
+0+0068 <[^>]*> addiu a0,gp,-15384
[ ]*68: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+006c <[^>]*> addiu \$a0,\$gp,-16383
+0+006c <[^>]*> addiu a0,gp,-16383
[ ]*6c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0070 <[^>]*> addiu \$a0,\$gp,1
+0+0070 <[^>]*> addiu a0,gp,1
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+0074 <[^>]*> addiu \$a0,\$gp,1
+0+0074 <[^>]*> addiu a0,gp,1
[ ]*74: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0078 <[^>]*> addiu \$a0,\$gp,1
+0+0078 <[^>]*> addiu a0,gp,1
[ ]*78: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+007c <[^>]*> addiu \$a0,\$gp,1
+0+007c <[^>]*> addiu a0,gp,1
[ ]*7c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0080 <[^>]*> addiu \$a0,\$gp,-16383
+0+0080 <[^>]*> addiu a0,gp,-16383
[ ]*80: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0084 <[^>]*> addiu \$a0,\$gp,-15383
+0+0084 <[^>]*> addiu a0,gp,-15383
[ ]*84: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0088 <[^>]*> addiu \$a0,\$gp,-16384
+0+0088 <[^>]*> addiu a0,gp,-16384
[ ]*88: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+008c <[^>]*> addu \$a0,\$a0,\$a1
-0+0090 <[^>]*> addiu \$a0,\$gp,0
+0+008c <[^>]*> addu a0,a0,a1
+0+0090 <[^>]*> addiu a0,gp,0
[ ]*90: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+0094 <[^>]*> addu \$a0,\$a0,\$a1
-0+0098 <[^>]*> addiu \$a0,\$gp,0
+0+0094 <[^>]*> addu a0,a0,a1
+0+0098 <[^>]*> addiu a0,gp,0
[ ]*98: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+009c <[^>]*> addu \$a0,\$a0,\$a1
-0+00a0 <[^>]*> addiu \$a0,\$gp,0
+0+009c <[^>]*> addu a0,a0,a1
+0+00a0 <[^>]*> addiu a0,gp,0
[ ]*a0: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00a4 <[^>]*> addu \$a0,\$a0,\$a1
-0+00a8 <[^>]*> addiu \$a0,\$gp,0
+0+00a4 <[^>]*> addu a0,a0,a1
+0+00a8 <[^>]*> addiu a0,gp,0
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00ac <[^>]*> addu \$a0,\$a0,\$a1
-0+00b0 <[^>]*> addiu \$a0,\$gp,-16384
+0+00ac <[^>]*> addu a0,a0,a1
+0+00b0 <[^>]*> addiu a0,gp,-16384
[ ]*b0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00b4 <[^>]*> addu \$a0,\$a0,\$a1
-0+00b8 <[^>]*> addiu \$a0,\$gp,-15384
+0+00b4 <[^>]*> addu a0,a0,a1
+0+00b8 <[^>]*> addiu a0,gp,-15384
[ ]*b8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00bc <[^>]*> addu \$a0,\$a0,\$a1
-0+00c0 <[^>]*> addiu \$a0,\$gp,-16383
+0+00bc <[^>]*> addu a0,a0,a1
+0+00c0 <[^>]*> addiu a0,gp,-16383
[ ]*c0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+00c4 <[^>]*> addu \$a0,\$a0,\$a1
-0+00c8 <[^>]*> addiu \$a0,\$gp,1
+0+00c4 <[^>]*> addu a0,a0,a1
+0+00c8 <[^>]*> addiu a0,gp,1
[ ]*c8: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+00cc <[^>]*> addu \$a0,\$a0,\$a1
-0+00d0 <[^>]*> addiu \$a0,\$gp,1
+0+00cc <[^>]*> addu a0,a0,a1
+0+00d0 <[^>]*> addiu a0,gp,1
[ ]*d0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00d4 <[^>]*> addu \$a0,\$a0,\$a1
-0+00d8 <[^>]*> addiu \$a0,\$gp,1
+0+00d4 <[^>]*> addu a0,a0,a1
+0+00d8 <[^>]*> addiu a0,gp,1
[ ]*d8: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00dc <[^>]*> addu \$a0,\$a0,\$a1
-0+00e0 <[^>]*> addiu \$a0,\$gp,1
+0+00dc <[^>]*> addu a0,a0,a1
+0+00e0 <[^>]*> addiu a0,gp,1
[ ]*e0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00e4 <[^>]*> addu \$a0,\$a0,\$a1
-0+00e8 <[^>]*> addiu \$a0,\$gp,-16383
+0+00e4 <[^>]*> addu a0,a0,a1
+0+00e8 <[^>]*> addiu a0,gp,-16383
[ ]*e8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00ec <[^>]*> addu \$a0,\$a0,\$a1
-0+00f0 <[^>]*> addiu \$a0,\$gp,-15383
+0+00ec <[^>]*> addu a0,a0,a1
+0+00f0 <[^>]*> addiu a0,gp,-15383
[ ]*f0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00f4 <[^>]*> addu \$a0,\$a0,\$a1
-0+00f8 <[^>]*> lui \$a0,0x0
+0+00f4 <[^>]*> addu a0,a0,a1
+0+00f8 <[^>]*> lui a0,0x0
[ ]*f8: RELHI external_text_label
-0+00fc <[^>]*> addiu \$a0,\$a0,252
+0+00fc <[^>]*> addiu a0,a0,252
[ ]*fc: RELLO external_text_label
-0+0100 <[^>]*> li \$a0,248
+0+0100 <[^>]*> li a0,248
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-svr4pic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-svr4pic.d
index f4933e7869f..49fff593469 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-svr4pic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-svr4pic.d
@@ -8,464 +8,465 @@
.*: +file format .*mips.*
Disassembly of section .text:
-[0-9a-f]+ <[^>]*> li \$a0,0
-[0-9a-f]+ <[^>]*> li \$a0,1
-[0-9a-f]+ <[^>]*> li \$a0,0x8000
-[0-9a-f]+ <[^>]*> li \$a0,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> ori \$a0,\$a0,0xa5a5
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,0
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,1
-[0-9a-f]+ <[^>]*> li \$a0,0x8000
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> ori \$a0,\$a0,0xa5a5
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> li a0,0
+[0-9a-f]+ <[^>]*> li a0,1
+[0-9a-f]+ <[^>]*> li a0,0x8000
+[0-9a-f]+ <[^>]*> li a0,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> ori a0,a0,0xa5a5
+[0-9a-f]+ <[^>]*> addiu a0,a1,0
+[0-9a-f]+ <[^>]*> addiu a0,a1,1
+[0-9a-f]+ <[^>]*> li a0,0x8000
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,a1,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> ori a0,a0,0xa5a5
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1000
+[0-9a-f]+ <[^>]*> addiu a0,a0,1000
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1001
+[0-9a-f]+ <[^>]*> addiu a0,a0,1001
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-31768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-31768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-31768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-31768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,1000
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,1000
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-22131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-22131
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1000
+[0-9a-f]+ <[^>]*> addiu a0,a0,1000
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1001
+[0-9a-f]+ <[^>]*> addiu a0,a0,1001
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-31768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-31768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-31768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-31768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,1000
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,1000
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-22131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-22131
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+ ...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-xgot.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-xgot.d
index 8daef022d2d..f3b88ad13d6 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-xgot.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la-xgot.d
@@ -8,608 +8,609 @@
.*: +file format .*mips.*
Disassembly of section .text:
-[0-9a-f]+ <[^>]*> li \$a0,0
-[0-9a-f]+ <[^>]*> li \$a0,1
-[0-9a-f]+ <[^>]*> li \$a0,0x8000
-[0-9a-f]+ <[^>]*> li \$a0,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> ori \$a0,\$a0,0xa5a5
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,0
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,1
-[0-9a-f]+ <[^>]*> li \$a0,0x8000
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> ori \$a0,\$a0,0xa5a5
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> li a0,0
+[0-9a-f]+ <[^>]*> li a0,1
+[0-9a-f]+ <[^>]*> li a0,0x8000
+[0-9a-f]+ <[^>]*> li a0,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> ori a0,a0,0xa5a5
+[0-9a-f]+ <[^>]*> addiu a0,a1,0
+[0-9a-f]+ <[^>]*> addiu a0,a1,1
+[0-9a-f]+ <[^>]*> li a0,0x8000
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,a1,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> ori a0,a0,0xa5a5
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1000
+[0-9a-f]+ <[^>]*> addiu a0,a0,1000
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1001
+[0-9a-f]+ <[^>]*> addiu a0,a0,1001
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-31768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-31768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-31768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-31768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,1000
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,1000
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-22131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-22131
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1000
+[0-9a-f]+ <[^>]*> addiu a0,a0,1000
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1
+[0-9a-f]+ <[^>]*> addiu a0,a0,1
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,1001
+[0-9a-f]+ <[^>]*> addiu a0,a0,1001
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-32768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-31768
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,-31768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-32768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-32768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,-31768
+[0-9a-f]+ <[^>]*> addiu a0,a0,-31768
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,0
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,0
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x1
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,1000
+[0-9a-f]+ <[^>]*> lui at,0x1
+[0-9a-f]+ <[^>]*> addiu at,at,1000
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .data
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
[ ]*[0-9a-f]+: R_MIPS_LO16 .data
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$gp
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$a0\)
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 small_external_common
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-23131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-23131
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lw \$a0,0\(\$gp\)
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
[ ]*[0-9a-f]+: R_MIPS_GOT16 .bss
-[0-9a-f]+ <[^>]*> lui \$at,0x2
-[0-9a-f]+ <[^>]*> addiu \$at,\$at,-22131
+[0-9a-f]+ <[^>]*> lui at,0x2
+[0-9a-f]+ <[^>]*> addiu at,at,-22131
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$at
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
+[0-9a-f]+ <[^>]*> addu a0,a0,at
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+ ...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.d
index 3983179cb71..063e9105aa3 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.d
@@ -7,375 +7,375 @@
.*: +file format .*mips.*
Disassembly of section .text:
-[0-9a-f]+ <[^>]*> li \$a0,0
-[0-9a-f]+ <[^>]*> li \$a0,1
-[0-9a-f]+ <[^>]*> li \$a0,0x8000
-[0-9a-f]+ <[^>]*> li \$a0,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> ori \$a0,\$a0,0xa5a5
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,0
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,1
-[0-9a-f]+ <[^>]*> li \$a0,0x8000
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a1,-32768
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x1
-[0-9a-f]+ <[^>]*> ori \$a0,\$a0,0xa5a5
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> li a0,0
+[0-9a-f]+ <[^>]*> li a0,1
+[0-9a-f]+ <[^>]*> li a0,0x8000
+[0-9a-f]+ <[^>]*> li a0,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> ori a0,a0,0xa5a5
+[0-9a-f]+ <[^>]*> addiu a0,a1,0
+[0-9a-f]+ <[^>]*> addiu a0,a1,1
+[0-9a-f]+ <[^>]*> li a0,0x8000
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,a1,-32768
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x1
+[0-9a-f]+ <[^>]*> ori a0,a0,0xa5a5
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,0
+[0-9a-f]+ <[^>]*> addiu a0,gp,0
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,0
+[0-9a-f]+ <[^>]*> addiu a0,gp,0
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,gp,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,gp,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,gp,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,gp,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,gp,0
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,gp,0
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,[-0-9]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,gp,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,[-0-9]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,gp,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,[-0-9]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,gp,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> addiu \$a0,\$gp,[-0-9]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,gp,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,0x0
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,0
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
-[0-9a-f]+ <[^>]*> lui \$a0,[-0-9x]+
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,[-0-9x]+
[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addiu \$a0,\$a0,[-0-9]+
+[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-[0-9a-f]+ <[^>]*> addu \$a0,\$a0,\$a1
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.s b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.s
index 078c811684f..dd0bff6ae66 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.s
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/la.s
@@ -107,8 +107,5 @@ data_label:
la $4,big_local_common+0x1a5a5($5)
la $4,small_local_common+0x1a5a5($5)
- .ifndef KPIC
-# Round to a 16 byte boundary, for ease in testing multiple targets.
- nop
- nop
- .endif
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .space 8
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-empic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-empic.d
index 9724a32bc6e..e06b9b15455 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-empic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-empic.d
@@ -8,95 +8,95 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lb \$a0,0\(\$zero\)
-0+0004 <[^>]*> lb \$a0,1\(\$zero\)
-0+0008 <[^>]*> lui \$a0,0x1
-0+000c <[^>]*> lb \$a0,-32768\(\$a0\)
-0+0010 <[^>]*> lb \$a0,-32768\(\$zero\)
-0+0014 <[^>]*> lui \$a0,0x1
-0+0018 <[^>]*> lb \$a0,0\(\$a0\)
-0+001c <[^>]*> lui \$a0,0x2
-0+0020 <[^>]*> lb \$a0,-23131\(\$a0\)
-0+0024 <[^>]*> lb \$a0,0\(\$a1\)
-0+0028 <[^>]*> lb \$a0,1\(\$a1\)
-0+002c <[^>]*> lui \$a0,0x1
-0+0030 <[^>]*> addu \$a0,\$a0,\$a1
-0+0034 <[^>]*> lb \$a0,-32768\(\$a0\)
-0+0038 <[^>]*> lb \$a0,-32768\(\$a1\)
-0+003c <[^>]*> lui \$a0,0x1
-0+0040 <[^>]*> addu \$a0,\$a0,\$a1
-0+0044 <[^>]*> lb \$a0,0\(\$a0\)
-0+0048 <[^>]*> lui \$a0,0x2
-0+004c <[^>]*> addu \$a0,\$a0,\$a1
-0+0050 <[^>]*> lb \$a0,-23131\(\$a0\)
-0+0054 <[^>]*> lb \$a0,-16384\(\$gp\)
+0+0000 <[^>]*> lb a0,0\(zero\)
+0+0004 <[^>]*> lb a0,1\(zero\)
+0+0008 <[^>]*> lui a0,0x1
+0+000c <[^>]*> lb a0,-32768\(a0\)
+0+0010 <[^>]*> lb a0,-32768\(zero\)
+0+0014 <[^>]*> lui a0,0x1
+0+0018 <[^>]*> lb a0,0\(a0\)
+0+001c <[^>]*> lui a0,0x2
+0+0020 <[^>]*> lb a0,-23131\(a0\)
+0+0024 <[^>]*> lb a0,0\(a1\)
+0+0028 <[^>]*> lb a0,1\(a1\)
+0+002c <[^>]*> lui a0,0x1
+0+0030 <[^>]*> addu a0,a0,a1
+0+0034 <[^>]*> lb a0,-32768\(a0\)
+0+0038 <[^>]*> lb a0,-32768\(a1\)
+0+003c <[^>]*> lui a0,0x1
+0+0040 <[^>]*> addu a0,a0,a1
+0+0044 <[^>]*> lb a0,0\(a0\)
+0+0048 <[^>]*> lui a0,0x2
+0+004c <[^>]*> addu a0,a0,a1
+0+0050 <[^>]*> lb a0,-23131\(a0\)
+0+0054 <[^>]*> lb a0,-16384\(gp\)
[ ]*54: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0058 <[^>]*> lb \$a0,0\(\$gp\)
+0+0058 <[^>]*> lb a0,0\(gp\)
[ ]*58: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+005c <[^>]*> lb \$a0,0\(\$gp\)
+0+005c <[^>]*> lb a0,0\(gp\)
[ ]*5c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0060 <[^>]*> lb \$a0,0\(\$gp\)
+0+0060 <[^>]*> lb a0,0\(gp\)
[ ]*60: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+0064 <[^>]*> lb \$a0,0\(\$gp\)
+0+0064 <[^>]*> lb a0,0\(gp\)
[ ]*64: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0068 <[^>]*> lb \$a0,-16384\(\$gp\)
+0+0068 <[^>]*> lb a0,-16384\(gp\)
[ ]*68: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+006c <[^>]*> lb \$a0,-15384\(\$gp\)
+0+006c <[^>]*> lb a0,-15384\(gp\)
[ ]*6c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0070 <[^>]*> lb \$a0,-16383\(\$gp\)
+0+0070 <[^>]*> lb a0,-16383\(gp\)
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0074 <[^>]*> lb \$a0,1\(\$gp\)
+0+0074 <[^>]*> lb a0,1\(gp\)
[ ]*74: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+0078 <[^>]*> lb \$a0,1\(\$gp\)
+0+0078 <[^>]*> lb a0,1\(gp\)
[ ]*78: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+007c <[^>]*> lb \$a0,1\(\$gp\)
+0+007c <[^>]*> lb a0,1\(gp\)
[ ]*7c: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+0080 <[^>]*> lb \$a0,1\(\$gp\)
+0+0080 <[^>]*> lb a0,1\(gp\)
[ ]*80: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0084 <[^>]*> lb \$a0,-16383\(\$gp\)
+0+0084 <[^>]*> lb a0,-16383\(gp\)
[ ]*84: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0088 <[^>]*> lb \$a0,-15383\(\$gp\)
+0+0088 <[^>]*> lb a0,-15383\(gp\)
[ ]*88: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+008c <[^>]*> addu \$a0,\$a1,\$gp
-0+0090 <[^>]*> lb \$a0,-16384\(\$a0\)
+0+008c <[^>]*> addu a0,a1,gp
+0+0090 <[^>]*> lb a0,-16384\(a0\)
[ ]*90: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0094 <[^>]*> addu \$a0,\$a1,\$gp
-0+0098 <[^>]*> lb \$a0,0\(\$a0\)
+0+0094 <[^>]*> addu a0,a1,gp
+0+0098 <[^>]*> lb a0,0\(a0\)
[ ]*98: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+009c <[^>]*> addu \$a0,\$a1,\$gp
-0+00a0 <[^>]*> lb \$a0,0\(\$a0\)
+0+009c <[^>]*> addu a0,a1,gp
+0+00a0 <[^>]*> lb a0,0\(a0\)
[ ]*a0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00a4 <[^>]*> addu \$a0,\$a1,\$gp
-0+00a8 <[^>]*> lb \$a0,0\(\$a0\)
+0+00a4 <[^>]*> addu a0,a1,gp
+0+00a8 <[^>]*> lb a0,0\(a0\)
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00ac <[^>]*> addu \$a0,\$a1,\$gp
-0+00b0 <[^>]*> lb \$a0,0\(\$a0\)
+0+00ac <[^>]*> addu a0,a1,gp
+0+00b0 <[^>]*> lb a0,0\(a0\)
[ ]*b0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00b4 <[^>]*> addu \$a0,\$a1,\$gp
-0+00b8 <[^>]*> lb \$a0,-16384\(\$a0\)
+0+00b4 <[^>]*> addu a0,a1,gp
+0+00b8 <[^>]*> lb a0,-16384\(a0\)
[ ]*b8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00bc <[^>]*> addu \$a0,\$a1,\$gp
-0+00c0 <[^>]*> lb \$a0,-15384\(\$a0\)
+0+00bc <[^>]*> addu a0,a1,gp
+0+00c0 <[^>]*> lb a0,-15384\(a0\)
[ ]*c0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00c4 <[^>]*> addu \$a0,\$a1,\$gp
-0+00c8 <[^>]*> lb \$a0,-16383\(\$a0\)
+0+00c4 <[^>]*> addu a0,a1,gp
+0+00c8 <[^>]*> lb a0,-16383\(a0\)
[ ]*c8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+00cc <[^>]*> addu \$a0,\$a1,\$gp
-0+00d0 <[^>]*> lb \$a0,1\(\$a0\)
+0+00cc <[^>]*> addu a0,a1,gp
+0+00d0 <[^>]*> lb a0,1\(a0\)
[ ]*d0: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+00d4 <[^>]*> addu \$a0,\$a1,\$gp
-0+00d8 <[^>]*> lb \$a0,1\(\$a0\)
+0+00d4 <[^>]*> addu a0,a1,gp
+0+00d8 <[^>]*> lb a0,1\(a0\)
[ ]*d8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00dc <[^>]*> addu \$a0,\$a1,\$gp
-0+00e0 <[^>]*> lb \$a0,1\(\$a0\)
+0+00dc <[^>]*> addu a0,a1,gp
+0+00e0 <[^>]*> lb a0,1\(a0\)
[ ]*e0: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00e4 <[^>]*> addu \$a0,\$a1,\$gp
-0+00e8 <[^>]*> lb \$a0,1\(\$a0\)
+0+00e4 <[^>]*> addu a0,a1,gp
+0+00e8 <[^>]*> lb a0,1\(a0\)
[ ]*e8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00ec <[^>]*> addu \$a0,\$a1,\$gp
-0+00f0 <[^>]*> lb \$a0,-16383\(\$a0\)
+0+00ec <[^>]*> addu a0,a1,gp
+0+00f0 <[^>]*> lb a0,-16383\(a0\)
[ ]*f0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00f4 <[^>]*> addu \$a0,\$a1,\$gp
-0+00f8 <[^>]*> lb \$a0,-15383\(\$a0\)
+0+00f4 <[^>]*> addu a0,a1,gp
+0+00f8 <[^>]*> lb a0,-15383\(a0\)
[ ]*f8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
0+00fc <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-svr4pic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-svr4pic.d
index 7d884d60ca5..e3aa88ff7a7 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-svr4pic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-svr4pic.d
@@ -8,175 +8,175 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lb \$a0,0\(\$zero\)
-0+0004 <[^>]*> lb \$a0,1\(\$zero\)
-0+0008 <[^>]*> lui \$a0,0x1
-0+000c <[^>]*> lb \$a0,-32768\(\$a0\)
-0+0010 <[^>]*> lb \$a0,-32768\(\$zero\)
-0+0014 <[^>]*> lui \$a0,0x1
-0+0018 <[^>]*> lb \$a0,0\(\$a0\)
-0+001c <[^>]*> lui \$a0,0x2
-0+0020 <[^>]*> lb \$a0,-23131\(\$a0\)
-0+0024 <[^>]*> lb \$a0,0\(\$a1\)
-0+0028 <[^>]*> lb \$a0,1\(\$a1\)
-0+002c <[^>]*> lui \$a0,0x1
-0+0030 <[^>]*> addu \$a0,\$a0,\$a1
-0+0034 <[^>]*> lb \$a0,-32768\(\$a0\)
-0+0038 <[^>]*> lb \$a0,-32768\(\$a1\)
-0+003c <[^>]*> lui \$a0,0x1
-0+0040 <[^>]*> addu \$a0,\$a0,\$a1
-0+0044 <[^>]*> lb \$a0,0\(\$a0\)
-0+0048 <[^>]*> lui \$a0,0x2
-0+004c <[^>]*> addu \$a0,\$a0,\$a1
-0+0050 <[^>]*> lb \$a0,-23131\(\$a0\)
-0+0054 <[^>]*> lw \$a0,0\(\$gp\)
+0+0000 <[^>]*> lb a0,0\(zero\)
+0+0004 <[^>]*> lb a0,1\(zero\)
+0+0008 <[^>]*> lui a0,0x1
+0+000c <[^>]*> lb a0,-32768\(a0\)
+0+0010 <[^>]*> lb a0,-32768\(zero\)
+0+0014 <[^>]*> lui a0,0x1
+0+0018 <[^>]*> lb a0,0\(a0\)
+0+001c <[^>]*> lui a0,0x2
+0+0020 <[^>]*> lb a0,-23131\(a0\)
+0+0024 <[^>]*> lb a0,0\(a1\)
+0+0028 <[^>]*> lb a0,1\(a1\)
+0+002c <[^>]*> lui a0,0x1
+0+0030 <[^>]*> addu a0,a0,a1
+0+0034 <[^>]*> lb a0,-32768\(a0\)
+0+0038 <[^>]*> lb a0,-32768\(a1\)
+0+003c <[^>]*> lui a0,0x1
+0+0040 <[^>]*> addu a0,a0,a1
+0+0044 <[^>]*> lb a0,0\(a0\)
+0+0048 <[^>]*> lui a0,0x2
+0+004c <[^>]*> addu a0,a0,a1
+0+0050 <[^>]*> lb a0,-23131\(a0\)
+0+0054 <[^>]*> lw a0,0\(gp\)
[ ]*54: R_MIPS_GOT16 .data
0+0058 <[^>]*> nop
-0+005c <[^>]*> addiu \$a0,\$a0,0
+0+005c <[^>]*> addiu a0,a0,0
[ ]*5c: R_MIPS_LO16 .data
-0+0060 <[^>]*> lb \$a0,0\(\$a0\)
-0+0064 <[^>]*> lw \$a0,0\(\$gp\)
+0+0060 <[^>]*> lb a0,0\(a0\)
+0+0064 <[^>]*> lw a0,0\(gp\)
[ ]*64: R_MIPS_GOT16 big_external_data_label
0+0068 <[^>]*> nop
-0+006c <[^>]*> lb \$a0,0\(\$a0\)
-0+0070 <[^>]*> lw \$a0,0\(\$gp\)
+0+006c <[^>]*> lb a0,0\(a0\)
+0+0070 <[^>]*> lw a0,0\(gp\)
[ ]*70: R_MIPS_GOT16 small_external_data_label
0+0074 <[^>]*> nop
-0+0078 <[^>]*> lb \$a0,0\(\$a0\)
-0+007c <[^>]*> lw \$a0,0\(\$gp\)
+0+0078 <[^>]*> lb a0,0\(a0\)
+0+007c <[^>]*> lw a0,0\(gp\)
[ ]*7c: R_MIPS_GOT16 big_external_common
0+0080 <[^>]*> nop
-0+0084 <[^>]*> lb \$a0,0\(\$a0\)
-0+0088 <[^>]*> lw \$a0,0\(\$gp\)
+0+0084 <[^>]*> lb a0,0\(a0\)
+0+0088 <[^>]*> lw a0,0\(gp\)
[ ]*88: R_MIPS_GOT16 small_external_common
0+008c <[^>]*> nop
-0+0090 <[^>]*> lb \$a0,0\(\$a0\)
-0+0094 <[^>]*> lw \$a0,0\(\$gp\)
+0+0090 <[^>]*> lb a0,0\(a0\)
+0+0094 <[^>]*> lw a0,0\(gp\)
[ ]*94: R_MIPS_GOT16 .bss
0+0098 <[^>]*> nop
-0+009c <[^>]*> addiu \$a0,\$a0,0
+0+009c <[^>]*> addiu a0,a0,0
[ ]*9c: R_MIPS_LO16 .bss
-0+00a0 <[^>]*> lb \$a0,0\(\$a0\)
-0+00a4 <[^>]*> lw \$a0,0\(\$gp\)
+0+00a0 <[^>]*> lb a0,0\(a0\)
+0+00a4 <[^>]*> lw a0,0\(gp\)
[ ]*a4: R_MIPS_GOT16 .bss
0+00a8 <[^>]*> nop
-0+00ac <[^>]*> addiu \$a0,\$a0,1000
+0+00ac <[^>]*> addiu a0,a0,1000
[ ]*ac: R_MIPS_LO16 .bss
-0+00b0 <[^>]*> lb \$a0,0\(\$a0\)
-0+00b4 <[^>]*> lw \$a0,0\(\$gp\)
+0+00b0 <[^>]*> lb a0,0\(a0\)
+0+00b4 <[^>]*> lw a0,0\(gp\)
[ ]*b4: R_MIPS_GOT16 .data
0+00b8 <[^>]*> nop
-0+00bc <[^>]*> addiu \$a0,\$a0,0
+0+00bc <[^>]*> addiu a0,a0,0
[ ]*bc: R_MIPS_LO16 .data
-0+00c0 <[^>]*> lb \$a0,1\(\$a0\)
-0+00c4 <[^>]*> lw \$a0,0\(\$gp\)
+0+00c0 <[^>]*> lb a0,1\(a0\)
+0+00c4 <[^>]*> lw a0,0\(gp\)
[ ]*c4: R_MIPS_GOT16 big_external_data_label
0+00c8 <[^>]*> nop
-0+00cc <[^>]*> lb \$a0,1\(\$a0\)
-0+00d0 <[^>]*> lw \$a0,0\(\$gp\)
+0+00cc <[^>]*> lb a0,1\(a0\)
+0+00d0 <[^>]*> lw a0,0\(gp\)
[ ]*d0: R_MIPS_GOT16 small_external_data_label
0+00d4 <[^>]*> nop
-0+00d8 <[^>]*> lb \$a0,1\(\$a0\)
-0+00dc <[^>]*> lw \$a0,0\(\$gp\)
+0+00d8 <[^>]*> lb a0,1\(a0\)
+0+00dc <[^>]*> lw a0,0\(gp\)
[ ]*dc: R_MIPS_GOT16 big_external_common
0+00e0 <[^>]*> nop
-0+00e4 <[^>]*> lb \$a0,1\(\$a0\)
-0+00e8 <[^>]*> lw \$a0,0\(\$gp\)
+0+00e4 <[^>]*> lb a0,1\(a0\)
+0+00e8 <[^>]*> lw a0,0\(gp\)
[ ]*e8: R_MIPS_GOT16 small_external_common
0+00ec <[^>]*> nop
-0+00f0 <[^>]*> lb \$a0,1\(\$a0\)
-0+00f4 <[^>]*> lw \$a0,0\(\$gp\)
+0+00f0 <[^>]*> lb a0,1\(a0\)
+0+00f4 <[^>]*> lw a0,0\(gp\)
[ ]*f4: R_MIPS_GOT16 .bss
0+00f8 <[^>]*> nop
-0+00fc <[^>]*> addiu \$a0,\$a0,0
+0+00fc <[^>]*> addiu a0,a0,0
[ ]*fc: R_MIPS_LO16 .bss
-0+0100 <[^>]*> lb \$a0,1\(\$a0\)
-0+0104 <[^>]*> lw \$a0,0\(\$gp\)
+0+0100 <[^>]*> lb a0,1\(a0\)
+0+0104 <[^>]*> lw a0,0\(gp\)
[ ]*104: R_MIPS_GOT16 .bss
0+0108 <[^>]*> nop
-0+010c <[^>]*> addiu \$a0,\$a0,1000
+0+010c <[^>]*> addiu a0,a0,1000
[ ]*10c: R_MIPS_LO16 .bss
-0+0110 <[^>]*> lb \$a0,1\(\$a0\)
-0+0114 <[^>]*> lw \$a0,0\(\$gp\)
+0+0110 <[^>]*> lb a0,1\(a0\)
+0+0114 <[^>]*> lw a0,0\(gp\)
[ ]*114: R_MIPS_GOT16 .data
0+0118 <[^>]*> nop
-0+011c <[^>]*> addiu \$a0,\$a0,0
+0+011c <[^>]*> addiu a0,a0,0
[ ]*11c: R_MIPS_LO16 .data
-0+0120 <[^>]*> addu \$a0,\$a0,\$a1
-0+0124 <[^>]*> lb \$a0,0\(\$a0\)
-0+0128 <[^>]*> lw \$a0,0\(\$gp\)
+0+0120 <[^>]*> addu a0,a0,a1
+0+0124 <[^>]*> lb a0,0\(a0\)
+0+0128 <[^>]*> lw a0,0\(gp\)
[ ]*128: R_MIPS_GOT16 big_external_data_label
0+012c <[^>]*> nop
-0+0130 <[^>]*> addu \$a0,\$a0,\$a1
-0+0134 <[^>]*> lb \$a0,0\(\$a0\)
-0+0138 <[^>]*> lw \$a0,0\(\$gp\)
+0+0130 <[^>]*> addu a0,a0,a1
+0+0134 <[^>]*> lb a0,0\(a0\)
+0+0138 <[^>]*> lw a0,0\(gp\)
[ ]*138: R_MIPS_GOT16 small_external_data_label
0+013c <[^>]*> nop
-0+0140 <[^>]*> addu \$a0,\$a0,\$a1
-0+0144 <[^>]*> lb \$a0,0\(\$a0\)
-0+0148 <[^>]*> lw \$a0,0\(\$gp\)
+0+0140 <[^>]*> addu a0,a0,a1
+0+0144 <[^>]*> lb a0,0\(a0\)
+0+0148 <[^>]*> lw a0,0\(gp\)
[ ]*148: R_MIPS_GOT16 big_external_common
0+014c <[^>]*> nop
-0+0150 <[^>]*> addu \$a0,\$a0,\$a1
-0+0154 <[^>]*> lb \$a0,0\(\$a0\)
-0+0158 <[^>]*> lw \$a0,0\(\$gp\)
+0+0150 <[^>]*> addu a0,a0,a1
+0+0154 <[^>]*> lb a0,0\(a0\)
+0+0158 <[^>]*> lw a0,0\(gp\)
[ ]*158: R_MIPS_GOT16 small_external_common
0+015c <[^>]*> nop
-0+0160 <[^>]*> addu \$a0,\$a0,\$a1
-0+0164 <[^>]*> lb \$a0,0\(\$a0\)
-0+0168 <[^>]*> lw \$a0,0\(\$gp\)
+0+0160 <[^>]*> addu a0,a0,a1
+0+0164 <[^>]*> lb a0,0\(a0\)
+0+0168 <[^>]*> lw a0,0\(gp\)
[ ]*168: R_MIPS_GOT16 .bss
0+016c <[^>]*> nop
-0+0170 <[^>]*> addiu \$a0,\$a0,0
+0+0170 <[^>]*> addiu a0,a0,0
[ ]*170: R_MIPS_LO16 .bss
-0+0174 <[^>]*> addu \$a0,\$a0,\$a1
-0+0178 <[^>]*> lb \$a0,0\(\$a0\)
-0+017c <[^>]*> lw \$a0,0\(\$gp\)
+0+0174 <[^>]*> addu a0,a0,a1
+0+0178 <[^>]*> lb a0,0\(a0\)
+0+017c <[^>]*> lw a0,0\(gp\)
[ ]*17c: R_MIPS_GOT16 .bss
0+0180 <[^>]*> nop
-0+0184 <[^>]*> addiu \$a0,\$a0,1000
+0+0184 <[^>]*> addiu a0,a0,1000
[ ]*184: R_MIPS_LO16 .bss
-0+0188 <[^>]*> addu \$a0,\$a0,\$a1
-0+018c <[^>]*> lb \$a0,0\(\$a0\)
-0+0190 <[^>]*> lw \$a0,0\(\$gp\)
+0+0188 <[^>]*> addu a0,a0,a1
+0+018c <[^>]*> lb a0,0\(a0\)
+0+0190 <[^>]*> lw a0,0\(gp\)
[ ]*190: R_MIPS_GOT16 .data
0+0194 <[^>]*> nop
-0+0198 <[^>]*> addiu \$a0,\$a0,0
+0+0198 <[^>]*> addiu a0,a0,0
[ ]*198: R_MIPS_LO16 .data
-0+019c <[^>]*> addu \$a0,\$a0,\$a1
-0+01a0 <[^>]*> lb \$a0,1\(\$a0\)
-0+01a4 <[^>]*> lw \$a0,0\(\$gp\)
+0+019c <[^>]*> addu a0,a0,a1
+0+01a0 <[^>]*> lb a0,1\(a0\)
+0+01a4 <[^>]*> lw a0,0\(gp\)
[ ]*1a4: R_MIPS_GOT16 big_external_data_label
0+01a8 <[^>]*> nop
-0+01ac <[^>]*> addu \$a0,\$a0,\$a1
-0+01b0 <[^>]*> lb \$a0,1\(\$a0\)
-0+01b4 <[^>]*> lw \$a0,0\(\$gp\)
+0+01ac <[^>]*> addu a0,a0,a1
+0+01b0 <[^>]*> lb a0,1\(a0\)
+0+01b4 <[^>]*> lw a0,0\(gp\)
[ ]*1b4: R_MIPS_GOT16 small_external_data_label
0+01b8 <[^>]*> nop
-0+01bc <[^>]*> addu \$a0,\$a0,\$a1
-0+01c0 <[^>]*> lb \$a0,1\(\$a0\)
-0+01c4 <[^>]*> lw \$a0,0\(\$gp\)
+0+01bc <[^>]*> addu a0,a0,a1
+0+01c0 <[^>]*> lb a0,1\(a0\)
+0+01c4 <[^>]*> lw a0,0\(gp\)
[ ]*1c4: R_MIPS_GOT16 big_external_common
0+01c8 <[^>]*> nop
-0+01cc <[^>]*> addu \$a0,\$a0,\$a1
-0+01d0 <[^>]*> lb \$a0,1\(\$a0\)
-0+01d4 <[^>]*> lw \$a0,0\(\$gp\)
+0+01cc <[^>]*> addu a0,a0,a1
+0+01d0 <[^>]*> lb a0,1\(a0\)
+0+01d4 <[^>]*> lw a0,0\(gp\)
[ ]*1d4: R_MIPS_GOT16 small_external_common
0+01d8 <[^>]*> nop
-0+01dc <[^>]*> addu \$a0,\$a0,\$a1
-0+01e0 <[^>]*> lb \$a0,1\(\$a0\)
-0+01e4 <[^>]*> lw \$a0,0\(\$gp\)
+0+01dc <[^>]*> addu a0,a0,a1
+0+01e0 <[^>]*> lb a0,1\(a0\)
+0+01e4 <[^>]*> lw a0,0\(gp\)
[ ]*1e4: R_MIPS_GOT16 .bss
0+01e8 <[^>]*> nop
-0+01ec <[^>]*> addiu \$a0,\$a0,0
+0+01ec <[^>]*> addiu a0,a0,0
[ ]*1ec: R_MIPS_LO16 .bss
-0+01f0 <[^>]*> addu \$a0,\$a0,\$a1
-0+01f4 <[^>]*> lb \$a0,1\(\$a0\)
-0+01f8 <[^>]*> lw \$a0,0\(\$gp\)
+0+01f0 <[^>]*> addu a0,a0,a1
+0+01f4 <[^>]*> lb a0,1\(a0\)
+0+01f8 <[^>]*> lw a0,0\(gp\)
[ ]*1f8: R_MIPS_GOT16 .bss
0+01fc <[^>]*> nop
-0+0200 <[^>]*> addiu \$a0,\$a0,1000
+0+0200 <[^>]*> addiu a0,a0,1000
[ ]*200: R_MIPS_LO16 .bss
-0+0204 <[^>]*> addu \$a0,\$a0,\$a1
-0+0208 <[^>]*> lb \$a0,1\(\$a0\)
+0+0204 <[^>]*> addu a0,a0,a1
+0+0208 <[^>]*> lb a0,1\(a0\)
0+020c <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-xgot.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-xgot.d
index b18c67e5970..da84c8fd8e3 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-xgot.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb-xgot.d
@@ -8,235 +8,235 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lb \$a0,0\(\$zero\)
-0+0004 <[^>]*> lb \$a0,1\(\$zero\)
-0+0008 <[^>]*> lui \$a0,0x1
-0+000c <[^>]*> lb \$a0,-32768\(\$a0\)
-0+0010 <[^>]*> lb \$a0,-32768\(\$zero\)
-0+0014 <[^>]*> lui \$a0,0x1
-0+0018 <[^>]*> lb \$a0,0\(\$a0\)
-0+001c <[^>]*> lui \$a0,0x2
-0+0020 <[^>]*> lb \$a0,-23131\(\$a0\)
-0+0024 <[^>]*> lb \$a0,0\(\$a1\)
-0+0028 <[^>]*> lb \$a0,1\(\$a1\)
-0+002c <[^>]*> lui \$a0,0x1
-0+0030 <[^>]*> addu \$a0,\$a0,\$a1
-0+0034 <[^>]*> lb \$a0,-32768\(\$a0\)
-0+0038 <[^>]*> lb \$a0,-32768\(\$a1\)
-0+003c <[^>]*> lui \$a0,0x1
-0+0040 <[^>]*> addu \$a0,\$a0,\$a1
-0+0044 <[^>]*> lb \$a0,0\(\$a0\)
-0+0048 <[^>]*> lui \$a0,0x2
-0+004c <[^>]*> addu \$a0,\$a0,\$a1
-0+0050 <[^>]*> lb \$a0,-23131\(\$a0\)
-0+0054 <[^>]*> lw \$a0,0\(\$gp\)
+0+0000 <[^>]*> lb a0,0\(zero\)
+0+0004 <[^>]*> lb a0,1\(zero\)
+0+0008 <[^>]*> lui a0,0x1
+0+000c <[^>]*> lb a0,-32768\(a0\)
+0+0010 <[^>]*> lb a0,-32768\(zero\)
+0+0014 <[^>]*> lui a0,0x1
+0+0018 <[^>]*> lb a0,0\(a0\)
+0+001c <[^>]*> lui a0,0x2
+0+0020 <[^>]*> lb a0,-23131\(a0\)
+0+0024 <[^>]*> lb a0,0\(a1\)
+0+0028 <[^>]*> lb a0,1\(a1\)
+0+002c <[^>]*> lui a0,0x1
+0+0030 <[^>]*> addu a0,a0,a1
+0+0034 <[^>]*> lb a0,-32768\(a0\)
+0+0038 <[^>]*> lb a0,-32768\(a1\)
+0+003c <[^>]*> lui a0,0x1
+0+0040 <[^>]*> addu a0,a0,a1
+0+0044 <[^>]*> lb a0,0\(a0\)
+0+0048 <[^>]*> lui a0,0x2
+0+004c <[^>]*> addu a0,a0,a1
+0+0050 <[^>]*> lb a0,-23131\(a0\)
+0+0054 <[^>]*> lw a0,0\(gp\)
[ ]*54: R_MIPS_GOT16 .data
0+0058 <[^>]*> nop
-0+005c <[^>]*> addiu \$a0,\$a0,0
+0+005c <[^>]*> addiu a0,a0,0
[ ]*5c: R_MIPS_LO16 .data
0+0060 <[^>]*> nop
-0+0064 <[^>]*> lb \$a0,0\(\$a0\)
-0+0068 <[^>]*> lui \$a0,0x0
+0+0064 <[^>]*> lb a0,0\(a0\)
+0+0068 <[^>]*> lui a0,0x0
[ ]*68: R_MIPS_GOT_HI16 big_external_data_label
-0+006c <[^>]*> addu \$a0,\$a0,\$gp
-0+0070 <[^>]*> lw \$a0,0\(\$a0\)
+0+006c <[^>]*> addu a0,a0,gp
+0+0070 <[^>]*> lw a0,0\(a0\)
[ ]*70: R_MIPS_GOT_LO16 big_external_data_label
0+0074 <[^>]*> nop
-0+0078 <[^>]*> lb \$a0,0\(\$a0\)
-0+007c <[^>]*> lui \$a0,0x0
+0+0078 <[^>]*> lb a0,0\(a0\)
+0+007c <[^>]*> lui a0,0x0
[ ]*7c: R_MIPS_GOT_HI16 small_external_data_label
-0+0080 <[^>]*> addu \$a0,\$a0,\$gp
-0+0084 <[^>]*> lw \$a0,0\(\$a0\)
+0+0080 <[^>]*> addu a0,a0,gp
+0+0084 <[^>]*> lw a0,0\(a0\)
[ ]*84: R_MIPS_GOT_LO16 small_external_data_label
0+0088 <[^>]*> nop
-0+008c <[^>]*> lb \$a0,0\(\$a0\)
-0+0090 <[^>]*> lui \$a0,0x0
+0+008c <[^>]*> lb a0,0\(a0\)
+0+0090 <[^>]*> lui a0,0x0
[ ]*90: R_MIPS_GOT_HI16 big_external_common
-0+0094 <[^>]*> addu \$a0,\$a0,\$gp
-0+0098 <[^>]*> lw \$a0,0\(\$a0\)
+0+0094 <[^>]*> addu a0,a0,gp
+0+0098 <[^>]*> lw a0,0\(a0\)
[ ]*98: R_MIPS_GOT_LO16 big_external_common
0+009c <[^>]*> nop
-0+00a0 <[^>]*> lb \$a0,0\(\$a0\)
-0+00a4 <[^>]*> lui \$a0,0x0
+0+00a0 <[^>]*> lb a0,0\(a0\)
+0+00a4 <[^>]*> lui a0,0x0
[ ]*a4: R_MIPS_GOT_HI16 small_external_common
-0+00a8 <[^>]*> addu \$a0,\$a0,\$gp
-0+00ac <[^>]*> lw \$a0,0\(\$a0\)
+0+00a8 <[^>]*> addu a0,a0,gp
+0+00ac <[^>]*> lw a0,0\(a0\)
[ ]*ac: R_MIPS_GOT_LO16 small_external_common
0+00b0 <[^>]*> nop
-0+00b4 <[^>]*> lb \$a0,0\(\$a0\)
-0+00b8 <[^>]*> lw \$a0,0\(\$gp\)
+0+00b4 <[^>]*> lb a0,0\(a0\)
+0+00b8 <[^>]*> lw a0,0\(gp\)
[ ]*b8: R_MIPS_GOT16 .bss
0+00bc <[^>]*> nop
-0+00c0 <[^>]*> addiu \$a0,\$a0,0
+0+00c0 <[^>]*> addiu a0,a0,0
[ ]*c0: R_MIPS_LO16 .bss
0+00c4 <[^>]*> nop
-0+00c8 <[^>]*> lb \$a0,0\(\$a0\)
-0+00cc <[^>]*> lw \$a0,0\(\$gp\)
+0+00c8 <[^>]*> lb a0,0\(a0\)
+0+00cc <[^>]*> lw a0,0\(gp\)
[ ]*cc: R_MIPS_GOT16 .bss
0+00d0 <[^>]*> nop
-0+00d4 <[^>]*> addiu \$a0,\$a0,1000
+0+00d4 <[^>]*> addiu a0,a0,1000
[ ]*d4: R_MIPS_LO16 .bss
0+00d8 <[^>]*> nop
-0+00dc <[^>]*> lb \$a0,0\(\$a0\)
-0+00e0 <[^>]*> lw \$a0,0\(\$gp\)
+0+00dc <[^>]*> lb a0,0\(a0\)
+0+00e0 <[^>]*> lw a0,0\(gp\)
[ ]*e0: R_MIPS_GOT16 .data
0+00e4 <[^>]*> nop
-0+00e8 <[^>]*> addiu \$a0,\$a0,0
+0+00e8 <[^>]*> addiu a0,a0,0
[ ]*e8: R_MIPS_LO16 .data
0+00ec <[^>]*> nop
-0+00f0 <[^>]*> lb \$a0,1\(\$a0\)
-0+00f4 <[^>]*> lui \$a0,0x0
+0+00f0 <[^>]*> lb a0,1\(a0\)
+0+00f4 <[^>]*> lui a0,0x0
[ ]*f4: R_MIPS_GOT_HI16 big_external_data_label
-0+00f8 <[^>]*> addu \$a0,\$a0,\$gp
-0+00fc <[^>]*> lw \$a0,0\(\$a0\)
+0+00f8 <[^>]*> addu a0,a0,gp
+0+00fc <[^>]*> lw a0,0\(a0\)
[ ]*fc: R_MIPS_GOT_LO16 big_external_data_label
0+0100 <[^>]*> nop
-0+0104 <[^>]*> lb \$a0,1\(\$a0\)
-0+0108 <[^>]*> lui \$a0,0x0
+0+0104 <[^>]*> lb a0,1\(a0\)
+0+0108 <[^>]*> lui a0,0x0
[ ]*108: R_MIPS_GOT_HI16 small_external_data_label
-0+010c <[^>]*> addu \$a0,\$a0,\$gp
-0+0110 <[^>]*> lw \$a0,0\(\$a0\)
+0+010c <[^>]*> addu a0,a0,gp
+0+0110 <[^>]*> lw a0,0\(a0\)
[ ]*110: R_MIPS_GOT_LO16 small_external_data_label
0+0114 <[^>]*> nop
-0+0118 <[^>]*> lb \$a0,1\(\$a0\)
-0+011c <[^>]*> lui \$a0,0x0
+0+0118 <[^>]*> lb a0,1\(a0\)
+0+011c <[^>]*> lui a0,0x0
[ ]*11c: R_MIPS_GOT_HI16 big_external_common
-0+0120 <[^>]*> addu \$a0,\$a0,\$gp
-0+0124 <[^>]*> lw \$a0,0\(\$a0\)
+0+0120 <[^>]*> addu a0,a0,gp
+0+0124 <[^>]*> lw a0,0\(a0\)
[ ]*124: R_MIPS_GOT_LO16 big_external_common
0+0128 <[^>]*> nop
-0+012c <[^>]*> lb \$a0,1\(\$a0\)
-0+0130 <[^>]*> lui \$a0,0x0
+0+012c <[^>]*> lb a0,1\(a0\)
+0+0130 <[^>]*> lui a0,0x0
[ ]*130: R_MIPS_GOT_HI16 small_external_common
-0+0134 <[^>]*> addu \$a0,\$a0,\$gp
-0+0138 <[^>]*> lw \$a0,0\(\$a0\)
+0+0134 <[^>]*> addu a0,a0,gp
+0+0138 <[^>]*> lw a0,0\(a0\)
[ ]*138: R_MIPS_GOT_LO16 small_external_common
0+013c <[^>]*> nop
-0+0140 <[^>]*> lb \$a0,1\(\$a0\)
-0+0144 <[^>]*> lw \$a0,0\(\$gp\)
+0+0140 <[^>]*> lb a0,1\(a0\)
+0+0144 <[^>]*> lw a0,0\(gp\)
[ ]*144: R_MIPS_GOT16 .bss
0+0148 <[^>]*> nop
-0+014c <[^>]*> addiu \$a0,\$a0,0
+0+014c <[^>]*> addiu a0,a0,0
[ ]*14c: R_MIPS_LO16 .bss
0+0150 <[^>]*> nop
-0+0154 <[^>]*> lb \$a0,1\(\$a0\)
-0+0158 <[^>]*> lw \$a0,0\(\$gp\)
+0+0154 <[^>]*> lb a0,1\(a0\)
+0+0158 <[^>]*> lw a0,0\(gp\)
[ ]*158: R_MIPS_GOT16 .bss
0+015c <[^>]*> nop
-0+0160 <[^>]*> addiu \$a0,\$a0,1000
+0+0160 <[^>]*> addiu a0,a0,1000
[ ]*160: R_MIPS_LO16 .bss
0+0164 <[^>]*> nop
-0+0168 <[^>]*> lb \$a0,1\(\$a0\)
-0+016c <[^>]*> lw \$a0,0\(\$gp\)
+0+0168 <[^>]*> lb a0,1\(a0\)
+0+016c <[^>]*> lw a0,0\(gp\)
[ ]*16c: R_MIPS_GOT16 .data
0+0170 <[^>]*> nop
-0+0174 <[^>]*> addiu \$a0,\$a0,0
+0+0174 <[^>]*> addiu a0,a0,0
[ ]*174: R_MIPS_LO16 .data
0+0178 <[^>]*> nop
-0+017c <[^>]*> addu \$a0,\$a0,\$a1
-0+0180 <[^>]*> lb \$a0,0\(\$a0\)
-0+0184 <[^>]*> lui \$a0,0x0
+0+017c <[^>]*> addu a0,a0,a1
+0+0180 <[^>]*> lb a0,0\(a0\)
+0+0184 <[^>]*> lui a0,0x0
[ ]*184: R_MIPS_GOT_HI16 big_external_data_label
-0+0188 <[^>]*> addu \$a0,\$a0,\$gp
-0+018c <[^>]*> lw \$a0,0\(\$a0\)
+0+0188 <[^>]*> addu a0,a0,gp
+0+018c <[^>]*> lw a0,0\(a0\)
[ ]*18c: R_MIPS_GOT_LO16 big_external_data_label
0+0190 <[^>]*> nop
-0+0194 <[^>]*> addu \$a0,\$a0,\$a1
-0+0198 <[^>]*> lb \$a0,0\(\$a0\)
-0+019c <[^>]*> lui \$a0,0x0
+0+0194 <[^>]*> addu a0,a0,a1
+0+0198 <[^>]*> lb a0,0\(a0\)
+0+019c <[^>]*> lui a0,0x0
[ ]*19c: R_MIPS_GOT_HI16 small_external_data_label
-0+01a0 <[^>]*> addu \$a0,\$a0,\$gp
-0+01a4 <[^>]*> lw \$a0,0\(\$a0\)
+0+01a0 <[^>]*> addu a0,a0,gp
+0+01a4 <[^>]*> lw a0,0\(a0\)
[ ]*1a4: R_MIPS_GOT_LO16 small_external_data_label
0+01a8 <[^>]*> nop
-0+01ac <[^>]*> addu \$a0,\$a0,\$a1
-0+01b0 <[^>]*> lb \$a0,0\(\$a0\)
-0+01b4 <[^>]*> lui \$a0,0x0
+0+01ac <[^>]*> addu a0,a0,a1
+0+01b0 <[^>]*> lb a0,0\(a0\)
+0+01b4 <[^>]*> lui a0,0x0
[ ]*1b4: R_MIPS_GOT_HI16 big_external_common
-0+01b8 <[^>]*> addu \$a0,\$a0,\$gp
-0+01bc <[^>]*> lw \$a0,0\(\$a0\)
+0+01b8 <[^>]*> addu a0,a0,gp
+0+01bc <[^>]*> lw a0,0\(a0\)
[ ]*1bc: R_MIPS_GOT_LO16 big_external_common
0+01c0 <[^>]*> nop
-0+01c4 <[^>]*> addu \$a0,\$a0,\$a1
-0+01c8 <[^>]*> lb \$a0,0\(\$a0\)
-0+01cc <[^>]*> lui \$a0,0x0
+0+01c4 <[^>]*> addu a0,a0,a1
+0+01c8 <[^>]*> lb a0,0\(a0\)
+0+01cc <[^>]*> lui a0,0x0
[ ]*1cc: R_MIPS_GOT_HI16 small_external_common
-0+01d0 <[^>]*> addu \$a0,\$a0,\$gp
-0+01d4 <[^>]*> lw \$a0,0\(\$a0\)
+0+01d0 <[^>]*> addu a0,a0,gp
+0+01d4 <[^>]*> lw a0,0\(a0\)
[ ]*1d4: R_MIPS_GOT_LO16 small_external_common
0+01d8 <[^>]*> nop
-0+01dc <[^>]*> addu \$a0,\$a0,\$a1
-0+01e0 <[^>]*> lb \$a0,0\(\$a0\)
-0+01e4 <[^>]*> lw \$a0,0\(\$gp\)
+0+01dc <[^>]*> addu a0,a0,a1
+0+01e0 <[^>]*> lb a0,0\(a0\)
+0+01e4 <[^>]*> lw a0,0\(gp\)
[ ]*1e4: R_MIPS_GOT16 .bss
0+01e8 <[^>]*> nop
-0+01ec <[^>]*> addiu \$a0,\$a0,0
+0+01ec <[^>]*> addiu a0,a0,0
[ ]*1ec: R_MIPS_LO16 .bss
0+01f0 <[^>]*> nop
-0+01f4 <[^>]*> addu \$a0,\$a0,\$a1
-0+01f8 <[^>]*> lb \$a0,0\(\$a0\)
-0+01fc <[^>]*> lw \$a0,0\(\$gp\)
+0+01f4 <[^>]*> addu a0,a0,a1
+0+01f8 <[^>]*> lb a0,0\(a0\)
+0+01fc <[^>]*> lw a0,0\(gp\)
[ ]*1fc: R_MIPS_GOT16 .bss
0+0200 <[^>]*> nop
-0+0204 <[^>]*> addiu \$a0,\$a0,1000
+0+0204 <[^>]*> addiu a0,a0,1000
[ ]*204: R_MIPS_LO16 .bss
0+0208 <[^>]*> nop
-0+020c <[^>]*> addu \$a0,\$a0,\$a1
-0+0210 <[^>]*> lb \$a0,0\(\$a0\)
-0+0214 <[^>]*> lw \$a0,0\(\$gp\)
+0+020c <[^>]*> addu a0,a0,a1
+0+0210 <[^>]*> lb a0,0\(a0\)
+0+0214 <[^>]*> lw a0,0\(gp\)
[ ]*214: R_MIPS_GOT16 .data
0+0218 <[^>]*> nop
-0+021c <[^>]*> addiu \$a0,\$a0,0
+0+021c <[^>]*> addiu a0,a0,0
[ ]*21c: R_MIPS_LO16 .data
0+0220 <[^>]*> nop
-0+0224 <[^>]*> addu \$a0,\$a0,\$a1
-0+0228 <[^>]*> lb \$a0,1\(\$a0\)
-0+022c <[^>]*> lui \$a0,0x0
+0+0224 <[^>]*> addu a0,a0,a1
+0+0228 <[^>]*> lb a0,1\(a0\)
+0+022c <[^>]*> lui a0,0x0
[ ]*22c: R_MIPS_GOT_HI16 big_external_data_label
-0+0230 <[^>]*> addu \$a0,\$a0,\$gp
-0+0234 <[^>]*> lw \$a0,0\(\$a0\)
+0+0230 <[^>]*> addu a0,a0,gp
+0+0234 <[^>]*> lw a0,0\(a0\)
[ ]*234: R_MIPS_GOT_LO16 big_external_data_label
0+0238 <[^>]*> nop
-0+023c <[^>]*> addu \$a0,\$a0,\$a1
-0+0240 <[^>]*> lb \$a0,1\(\$a0\)
-0+0244 <[^>]*> lui \$a0,0x0
+0+023c <[^>]*> addu a0,a0,a1
+0+0240 <[^>]*> lb a0,1\(a0\)
+0+0244 <[^>]*> lui a0,0x0
[ ]*244: R_MIPS_GOT_HI16 small_external_data_label
-0+0248 <[^>]*> addu \$a0,\$a0,\$gp
-0+024c <[^>]*> lw \$a0,0\(\$a0\)
+0+0248 <[^>]*> addu a0,a0,gp
+0+024c <[^>]*> lw a0,0\(a0\)
[ ]*24c: R_MIPS_GOT_LO16 small_external_data_label
0+0250 <[^>]*> nop
-0+0254 <[^>]*> addu \$a0,\$a0,\$a1
-0+0258 <[^>]*> lb \$a0,1\(\$a0\)
-0+025c <[^>]*> lui \$a0,0x0
+0+0254 <[^>]*> addu a0,a0,a1
+0+0258 <[^>]*> lb a0,1\(a0\)
+0+025c <[^>]*> lui a0,0x0
[ ]*25c: R_MIPS_GOT_HI16 big_external_common
-0+0260 <[^>]*> addu \$a0,\$a0,\$gp
-0+0264 <[^>]*> lw \$a0,0\(\$a0\)
+0+0260 <[^>]*> addu a0,a0,gp
+0+0264 <[^>]*> lw a0,0\(a0\)
[ ]*264: R_MIPS_GOT_LO16 big_external_common
0+0268 <[^>]*> nop
-0+026c <[^>]*> addu \$a0,\$a0,\$a1
-0+0270 <[^>]*> lb \$a0,1\(\$a0\)
-0+0274 <[^>]*> lui \$a0,0x0
+0+026c <[^>]*> addu a0,a0,a1
+0+0270 <[^>]*> lb a0,1\(a0\)
+0+0274 <[^>]*> lui a0,0x0
[ ]*274: R_MIPS_GOT_HI16 small_external_common
-0+0278 <[^>]*> addu \$a0,\$a0,\$gp
-0+027c <[^>]*> lw \$a0,0\(\$a0\)
+0+0278 <[^>]*> addu a0,a0,gp
+0+027c <[^>]*> lw a0,0\(a0\)
[ ]*27c: R_MIPS_GOT_LO16 small_external_common
0+0280 <[^>]*> nop
-0+0284 <[^>]*> addu \$a0,\$a0,\$a1
-0+0288 <[^>]*> lb \$a0,1\(\$a0\)
-0+028c <[^>]*> lw \$a0,0\(\$gp\)
+0+0284 <[^>]*> addu a0,a0,a1
+0+0288 <[^>]*> lb a0,1\(a0\)
+0+028c <[^>]*> lw a0,0\(gp\)
[ ]*28c: R_MIPS_GOT16 .bss
0+0290 <[^>]*> nop
-0+0294 <[^>]*> addiu \$a0,\$a0,0
+0+0294 <[^>]*> addiu a0,a0,0
[ ]*294: R_MIPS_LO16 .bss
0+0298 <[^>]*> nop
-0+029c <[^>]*> addu \$a0,\$a0,\$a1
-0+02a0 <[^>]*> lb \$a0,1\(\$a0\)
-0+02a4 <[^>]*> lw \$a0,0\(\$gp\)
+0+029c <[^>]*> addu a0,a0,a1
+0+02a0 <[^>]*> lb a0,1\(a0\)
+0+02a4 <[^>]*> lw a0,0\(gp\)
[ ]*2a4: R_MIPS_GOT16 .bss
0+02a8 <[^>]*> nop
-0+02ac <[^>]*> addiu \$a0,\$a0,1000
+0+02ac <[^>]*> addiu a0,a0,1000
[ ]*2ac: R_MIPS_LO16 .bss
0+02b0 <[^>]*> nop
-0+02b4 <[^>]*> addu \$a0,\$a0,\$a1
-0+02b8 <[^>]*> lb \$a0,1\(\$a0\)
+0+02b4 <[^>]*> addu a0,a0,a1
+0+02b8 <[^>]*> lb a0,1\(a0\)
0+02bc <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb.d
index e45c4c4ca64..9bb9801f5e2 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lb.d
@@ -7,389 +7,389 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lb \$a0,0\(\$zero\)
-0+0004 <[^>]*> lb \$a0,1\(\$zero\)
-0+0008 <[^>]*> lui \$a0,0x1
-0+000c <[^>]*> lb \$a0,-32768\(\$a0\)
-0+0010 <[^>]*> lb \$a0,-32768\(\$zero\)
-0+0014 <[^>]*> lui \$a0,0x1
-0+0018 <[^>]*> lb \$a0,0\(\$a0\)
-0+001c <[^>]*> lui \$a0,0x2
-0+0020 <[^>]*> lb \$a0,-23131\(\$a0\)
-0+0024 <[^>]*> lb \$a0,0\(\$a1\)
-0+0028 <[^>]*> lb \$a0,1\(\$a1\)
-0+002c <[^>]*> lui \$a0,0x1
-0+0030 <[^>]*> addu \$a0,\$a0,\$a1
-0+0034 <[^>]*> lb \$a0,-32768\(\$a0\)
-0+0038 <[^>]*> lb \$a0,-32768\(\$a1\)
-0+003c <[^>]*> lui \$a0,0x1
-0+0040 <[^>]*> addu \$a0,\$a0,\$a1
-0+0044 <[^>]*> lb \$a0,0\(\$a0\)
-0+0048 <[^>]*> lui \$a0,0x2
-0+004c <[^>]*> addu \$a0,\$a0,\$a1
-0+0050 <[^>]*> lb \$a0,-23131\(\$a0\)
-0+0054 <[^>]*> lui \$a0,0x0
+0+0000 <[^>]*> lb a0,0\(zero\)
+0+0004 <[^>]*> lb a0,1\(zero\)
+0+0008 <[^>]*> lui a0,0x1
+0+000c <[^>]*> lb a0,-32768\(a0\)
+0+0010 <[^>]*> lb a0,-32768\(zero\)
+0+0014 <[^>]*> lui a0,0x1
+0+0018 <[^>]*> lb a0,0\(a0\)
+0+001c <[^>]*> lui a0,0x2
+0+0020 <[^>]*> lb a0,-23131\(a0\)
+0+0024 <[^>]*> lb a0,0\(a1\)
+0+0028 <[^>]*> lb a0,1\(a1\)
+0+002c <[^>]*> lui a0,0x1
+0+0030 <[^>]*> addu a0,a0,a1
+0+0034 <[^>]*> lb a0,-32768\(a0\)
+0+0038 <[^>]*> lb a0,-32768\(a1\)
+0+003c <[^>]*> lui a0,0x1
+0+0040 <[^>]*> addu a0,a0,a1
+0+0044 <[^>]*> lb a0,0\(a0\)
+0+0048 <[^>]*> lui a0,0x2
+0+004c <[^>]*> addu a0,a0,a1
+0+0050 <[^>]*> lb a0,-23131\(a0\)
+0+0054 <[^>]*> lui a0,0x0
[ ]*54: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0058 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+0058 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*58: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+005c <[^>]*> lui \$a0,0x0
+0+005c <[^>]*> lui a0,0x0
[ ]*5c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0060 <[^>]*> lb \$a0,0\(\$a0\)
+0+0060 <[^>]*> lb a0,0\(a0\)
[ ]*60: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0064 <[^>]*> lb \$a0,0\(\$gp\)
+0+0064 <[^>]*> lb a0,0\(gp\)
[ ]*64: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0068 <[^>]*> lui \$a0,0x0
+0+0068 <[^>]*> lui a0,0x0
[ ]*68: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+006c <[^>]*> lb \$a0,0\(\$a0\)
+0+006c <[^>]*> lb a0,0\(a0\)
[ ]*6c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0070 <[^>]*> lb \$a0,0\(\$gp\)
+0+0070 <[^>]*> lb a0,0\(gp\)
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0074 <[^>]*> lui \$a0,0x0
+0+0074 <[^>]*> lui a0,0x0
[ ]*74: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0078 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+0078 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*78: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+007c <[^>]*> lb \$a0,-16384\(\$gp\)
+0+007c <[^>]*> lb a0,-16384\(gp\)
[ ]*7c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0080 <[^>]*> lui \$a0,0x0
+0+0080 <[^>]*> lui a0,0x0
[ ]*80: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0084 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+0084 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*84: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0088 <[^>]*> lui \$a0,0x0
+0+0088 <[^>]*> lui a0,0x0
[ ]*88: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+008c <[^>]*> lb \$a0,1\(\$a0\)
+0+008c <[^>]*> lb a0,1\(a0\)
[ ]*8c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0090 <[^>]*> lb \$a0,1\(\$gp\)
+0+0090 <[^>]*> lb a0,1\(gp\)
[ ]*90: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0094 <[^>]*> lui \$a0,0x0
+0+0094 <[^>]*> lui a0,0x0
[ ]*94: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0098 <[^>]*> lb \$a0,1\(\$a0\)
+0+0098 <[^>]*> lb a0,1\(a0\)
[ ]*98: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+009c <[^>]*> lb \$a0,1\(\$gp\)
+0+009c <[^>]*> lb a0,1\(gp\)
[ ]*9c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00a0 <[^>]*> lui \$a0,0x0
+0+00a0 <[^>]*> lui a0,0x0
[ ]*a0: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+00a4 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+00a4 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*a4: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00a8 <[^>]*> lb \$a0,[-0-9]+\(\$gp\)
+0+00a8 <[^>]*> lb a0,[-0-9]+\(gp\)
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00ac <[^>]*> lui \$a0,[-0-9x]+
+0+00ac <[^>]*> lui a0,[-0-9x]+
[ ]*ac: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00b0 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00b0 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*b0: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00b4 <[^>]*> lui \$a0,[-0-9x]+
+0+00b4 <[^>]*> lui a0,[-0-9x]+
[ ]*b4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00b8 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00b8 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*b8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00bc <[^>]*> lui \$a0,[-0-9x]+
+0+00bc <[^>]*> lui a0,[-0-9x]+
[ ]*bc: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+00c0 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00c0 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*c0: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+00c4 <[^>]*> lui \$a0,[-0-9x]+
+0+00c4 <[^>]*> lui a0,[-0-9x]+
[ ]*c4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00c8 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00c8 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*c8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00cc <[^>]*> lui \$a0,[-0-9x]+
+0+00cc <[^>]*> lui a0,[-0-9x]+
[ ]*cc: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+00d0 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00d0 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*d0: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+00d4 <[^>]*> lui \$a0,[-0-9x]+
+0+00d4 <[^>]*> lui a0,[-0-9x]+
[ ]*d4: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+00d8 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00d8 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*d8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00dc <[^>]*> lui \$a0,[-0-9x]+
+0+00dc <[^>]*> lui a0,[-0-9x]+
[ ]*dc: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+00e0 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00e0 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*e0: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+00e4 <[^>]*> lui \$a0,0x0
+0+00e4 <[^>]*> lui a0,0x0
[ ]*e4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00e8 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00e8 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*e8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00ec <[^>]*> lui \$a0,0x0
+0+00ec <[^>]*> lui a0,0x0
[ ]*ec: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00f0 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00f0 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*f0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00f4 <[^>]*> lui \$a0,0x0
+0+00f4 <[^>]*> lui a0,0x0
[ ]*f4: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+00f8 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+00f8 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*f8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+00fc <[^>]*> lui \$a0,0x0
+0+00fc <[^>]*> lui a0,0x0
[ ]*fc: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0100 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0100 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*100: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0104 <[^>]*> lui \$a0,0x0
+0+0104 <[^>]*> lui a0,0x0
[ ]*104: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0108 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0108 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*108: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+010c <[^>]*> lui \$a0,0x0
+0+010c <[^>]*> lui a0,0x0
[ ]*10c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0110 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0110 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*110: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0114 <[^>]*> lui \$a0,0x0
+0+0114 <[^>]*> lui a0,0x0
[ ]*114: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0118 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0118 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*118: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+011c <[^>]*> lui \$a0,[-0-9x]+
+0+011c <[^>]*> lui a0,[-0-9x]+
[ ]*11c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0120 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+0120 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*120: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0124 <[^>]*> lui \$a0,[-0-9x]+
+0+0124 <[^>]*> lui a0,[-0-9x]+
[ ]*124: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0128 <[^>]*> lb \$a0,0\(\$a0\)
+0+0128 <[^>]*> lb a0,0\(a0\)
[ ]*128: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+012c <[^>]*> lui \$a0,[-0-9x]+
+0+012c <[^>]*> lui a0,[-0-9x]+
[ ]*12c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0130 <[^>]*> lb \$a0,0\(\$a0\)
+0+0130 <[^>]*> lb a0,0\(a0\)
[ ]*130: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0134 <[^>]*> lui \$a0,[-0-9x]+
+0+0134 <[^>]*> lui a0,[-0-9x]+
[ ]*134: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0138 <[^>]*> lb \$a0,0\(\$a0\)
+0+0138 <[^>]*> lb a0,0\(a0\)
[ ]*138: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+013c <[^>]*> lui \$a0,[-0-9x]+
+0+013c <[^>]*> lui a0,[-0-9x]+
[ ]*13c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0140 <[^>]*> lb \$a0,0\(\$a0\)
+0+0140 <[^>]*> lb a0,0\(a0\)
[ ]*140: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0144 <[^>]*> lui \$a0,[-0-9x]+
+0+0144 <[^>]*> lui a0,[-0-9x]+
[ ]*144: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0148 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+0148 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*148: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+014c <[^>]*> lui \$a0,[-0-9x]+
+0+014c <[^>]*> lui a0,[-0-9x]+
[ ]*14c: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0150 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0150 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*150: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0154 <[^>]*> lui \$a0,[-0-9x]+
+0+0154 <[^>]*> lui a0,[-0-9x]+
[ ]*154: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0158 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0158 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*158: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+015c <[^>]*> lui \$a0,[-0-9x]+
+0+015c <[^>]*> lui a0,[-0-9x]+
[ ]*15c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0160 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0160 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*160: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0164 <[^>]*> lui \$a0,[-0-9x]+
+0+0164 <[^>]*> lui a0,[-0-9x]+
[ ]*164: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0168 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0168 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*168: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+016c <[^>]*> lui \$a0,[-0-9x]+
+0+016c <[^>]*> lui a0,[-0-9x]+
[ ]*16c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0170 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0170 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*170: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0174 <[^>]*> lui \$a0,[-0-9x]+
+0+0174 <[^>]*> lui a0,[-0-9x]+
[ ]*174: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0178 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0178 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*178: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+017c <[^>]*> lui \$a0,[-0-9x]+
+0+017c <[^>]*> lui a0,[-0-9x]+
[ ]*17c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0180 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0180 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*180: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0184 <[^>]*> lui \$a0,[-0-9x]+
+0+0184 <[^>]*> lui a0,[-0-9x]+
[ ]*184: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0188 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0188 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*188: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+018c <[^>]*> lui \$a0,0x0
+0+018c <[^>]*> lui a0,0x0
[ ]*18c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0190 <[^>]*> addu \$a0,\$a0,\$a1
-0+0194 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+0190 <[^>]*> addu a0,a0,a1
+0+0194 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*194: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0198 <[^>]*> lui \$a0,0x0
+0+0198 <[^>]*> lui a0,0x0
[ ]*198: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+019c <[^>]*> addu \$a0,\$a0,\$a1
-0+01a0 <[^>]*> lb \$a0,0\(\$a0\)
+0+019c <[^>]*> addu a0,a0,a1
+0+01a0 <[^>]*> lb a0,0\(a0\)
[ ]*1a0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01a4 <[^>]*> addu \$a0,\$a1,\$gp
-0+01a8 <[^>]*> lb \$a0,0\(\$a0\)
+0+01a4 <[^>]*> addu a0,a1,gp
+0+01a8 <[^>]*> lb a0,0\(a0\)
[ ]*1a8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+01ac <[^>]*> lui \$a0,0x0
+0+01ac <[^>]*> lui a0,0x0
[ ]*1ac: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01b0 <[^>]*> addu \$a0,\$a0,\$a1
-0+01b4 <[^>]*> lb \$a0,0\(\$a0\)
+0+01b0 <[^>]*> addu a0,a0,a1
+0+01b4 <[^>]*> lb a0,0\(a0\)
[ ]*1b4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01b8 <[^>]*> addu \$a0,\$a1,\$gp
-0+01bc <[^>]*> lb \$a0,0\(\$a0\)
+0+01b8 <[^>]*> addu a0,a1,gp
+0+01bc <[^>]*> lb a0,0\(a0\)
[ ]*1bc: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+01c0 <[^>]*> lui \$a0,0x0
+0+01c0 <[^>]*> lui a0,0x0
[ ]*1c0: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+01c4 <[^>]*> addu \$a0,\$a0,\$a1
-0+01c8 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+01c4 <[^>]*> addu a0,a0,a1
+0+01c8 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*1c8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01cc <[^>]*> addu \$a0,\$a1,\$gp
-0+01d0 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+01cc <[^>]*> addu a0,a1,gp
+0+01d0 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*1d0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+01d4 <[^>]*> lui \$a0,0x0
+0+01d4 <[^>]*> lui a0,0x0
[ ]*1d4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+01d8 <[^>]*> addu \$a0,\$a0,\$a1
-0+01dc <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+01d8 <[^>]*> addu a0,a0,a1
+0+01dc <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*1dc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+01e0 <[^>]*> lui \$a0,0x0
+0+01e0 <[^>]*> lui a0,0x0
[ ]*1e0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+01e4 <[^>]*> addu \$a0,\$a0,\$a1
-0+01e8 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+01e4 <[^>]*> addu a0,a0,a1
+0+01e8 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*1e8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01ec <[^>]*> addu \$a0,\$a1,\$gp
-0+01f0 <[^>]*> lb \$a0,1\(\$a0\)
+0+01ec <[^>]*> addu a0,a1,gp
+0+01f0 <[^>]*> lb a0,1\(a0\)
[ ]*1f0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+01f4 <[^>]*> lui \$a0,0x0
+0+01f4 <[^>]*> lui a0,0x0
[ ]*1f4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01f8 <[^>]*> addu \$a0,\$a0,\$a1
-0+01fc <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+01f8 <[^>]*> addu a0,a0,a1
+0+01fc <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*1fc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0200 <[^>]*> addu \$a0,\$a1,\$gp
-0+0204 <[^>]*> lb \$a0,1\(\$a0\)
+0+0200 <[^>]*> addu a0,a1,gp
+0+0204 <[^>]*> lb a0,1\(a0\)
[ ]*204: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0208 <[^>]*> lui \$a0,0x0
+0+0208 <[^>]*> lui a0,0x0
[ ]*208: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+020c <[^>]*> addu \$a0,\$a0,\$a1
-0+0210 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+020c <[^>]*> addu a0,a0,a1
+0+0210 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*210: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0214 <[^>]*> addu \$a0,\$a1,\$gp
-0+0218 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0214 <[^>]*> addu a0,a1,gp
+0+0218 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*218: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+021c <[^>]*> lui \$a0,[-0-9x]+
+0+021c <[^>]*> lui a0,[-0-9x]+
[ ]*21c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0220 <[^>]*> addu \$a0,\$a0,\$a1
-0+0224 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0220 <[^>]*> addu a0,a0,a1
+0+0224 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*224: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0228 <[^>]*> lui \$a0,[-0-9x]+
+0+0228 <[^>]*> lui a0,[-0-9x]+
[ ]*228: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+022c <[^>]*> addu \$a0,\$a0,\$a1
-0+0230 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+022c <[^>]*> addu a0,a0,a1
+0+0230 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*230: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0234 <[^>]*> lui \$a0,[-0-9x]+
+0+0234 <[^>]*> lui a0,[-0-9x]+
[ ]*234: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0238 <[^>]*> addu \$a0,\$a0,\$a1
-0+023c <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0238 <[^>]*> addu a0,a0,a1
+0+023c <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*23c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0240 <[^>]*> lui \$a0,[-0-9x]+
+0+0240 <[^>]*> lui a0,[-0-9x]+
[ ]*240: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0244 <[^>]*> addu \$a0,\$a0,\$a1
-0+0248 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0244 <[^>]*> addu a0,a0,a1
+0+0248 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*248: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+024c <[^>]*> lui \$a0,[-0-9x]+
+0+024c <[^>]*> lui a0,[-0-9x]+
[ ]*24c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0250 <[^>]*> addu \$a0,\$a0,\$a1
-0+0254 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0250 <[^>]*> addu a0,a0,a1
+0+0254 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*254: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0258 <[^>]*> lui \$a0,[-0-9x]+
+0+0258 <[^>]*> lui a0,[-0-9x]+
[ ]*258: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+025c <[^>]*> addu \$a0,\$a0,\$a1
-0+0260 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+025c <[^>]*> addu a0,a0,a1
+0+0260 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*260: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0264 <[^>]*> lui \$a0,[-0-9x]+
+0+0264 <[^>]*> lui a0,[-0-9x]+
[ ]*264: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0268 <[^>]*> addu \$a0,\$a0,\$a1
-0+026c <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0268 <[^>]*> addu a0,a0,a1
+0+026c <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*26c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0270 <[^>]*> lui \$a0,0x0
+0+0270 <[^>]*> lui a0,0x0
[ ]*270: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0274 <[^>]*> addu \$a0,\$a0,\$a1
-0+0278 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0274 <[^>]*> addu a0,a0,a1
+0+0278 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*278: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+027c <[^>]*> lui \$a0,0x0
+0+027c <[^>]*> lui a0,0x0
[ ]*27c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0280 <[^>]*> addu \$a0,\$a0,\$a1
-0+0284 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0280 <[^>]*> addu a0,a0,a1
+0+0284 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*284: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0288 <[^>]*> lui \$a0,0x0
+0+0288 <[^>]*> lui a0,0x0
[ ]*288: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+028c <[^>]*> addu \$a0,\$a0,\$a1
-0+0290 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+028c <[^>]*> addu a0,a0,a1
+0+0290 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*290: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0294 <[^>]*> lui \$a0,0x0
+0+0294 <[^>]*> lui a0,0x0
[ ]*294: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0298 <[^>]*> addu \$a0,\$a0,\$a1
-0+029c <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0298 <[^>]*> addu a0,a0,a1
+0+029c <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*29c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02a0 <[^>]*> lui \$a0,0x0
+0+02a0 <[^>]*> lui a0,0x0
[ ]*2a0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02a4 <[^>]*> addu \$a0,\$a0,\$a1
-0+02a8 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+02a4 <[^>]*> addu a0,a0,a1
+0+02a8 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*2a8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+02ac <[^>]*> lui \$a0,0x0
+0+02ac <[^>]*> lui a0,0x0
[ ]*2ac: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02b0 <[^>]*> addu \$a0,\$a0,\$a1
-0+02b4 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+02b0 <[^>]*> addu a0,a0,a1
+0+02b4 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*2b4: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02b8 <[^>]*> lui \$a0,0x0
+0+02b8 <[^>]*> lui a0,0x0
[ ]*2b8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+02bc <[^>]*> addu \$a0,\$a0,\$a1
-0+02c0 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+02bc <[^>]*> addu a0,a0,a1
+0+02c0 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*2c0: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+02c4 <[^>]*> lui \$a0,[-0-9x]+
+0+02c4 <[^>]*> lui a0,[-0-9x]+
[ ]*2c4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+02c8 <[^>]*> addu \$a0,\$a0,\$a1
-0+02cc <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+02c8 <[^>]*> addu a0,a0,a1
+0+02cc <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*2cc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+02d0 <[^>]*> lui \$a0,[-0-9x]+
+0+02d0 <[^>]*> lui a0,[-0-9x]+
[ ]*2d0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+02d4 <[^>]*> addu \$a0,\$a0,\$a1
-0+02d8 <[^>]*> lb \$a0,0\(\$a0\)
+0+02d4 <[^>]*> addu a0,a0,a1
+0+02d8 <[^>]*> lb a0,0\(a0\)
[ ]*2d8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+02dc <[^>]*> lui \$a0,[-0-9x]+
+0+02dc <[^>]*> lui a0,[-0-9x]+
[ ]*2dc: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+02e0 <[^>]*> addu \$a0,\$a0,\$a1
-0+02e4 <[^>]*> lb \$a0,0\(\$a0\)
+0+02e0 <[^>]*> addu a0,a0,a1
+0+02e4 <[^>]*> lb a0,0\(a0\)
[ ]*2e4: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+02e8 <[^>]*> lui \$a0,[-0-9x]+
+0+02e8 <[^>]*> lui a0,[-0-9x]+
[ ]*2e8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+02ec <[^>]*> addu \$a0,\$a0,\$a1
-0+02f0 <[^>]*> lb \$a0,0\(\$a0\)
+0+02ec <[^>]*> addu a0,a0,a1
+0+02f0 <[^>]*> lb a0,0\(a0\)
[ ]*2f0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02f4 <[^>]*> lui \$a0,[-0-9x]+
+0+02f4 <[^>]*> lui a0,[-0-9x]+
[ ]*2f4: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02f8 <[^>]*> addu \$a0,\$a0,\$a1
-0+02fc <[^>]*> lb \$a0,0\(\$a0\)
+0+02f8 <[^>]*> addu a0,a0,a1
+0+02fc <[^>]*> lb a0,0\(a0\)
[ ]*2fc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0300 <[^>]*> lui \$a0,[-0-9x]+
+0+0300 <[^>]*> lui a0,[-0-9x]+
[ ]*300: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0304 <[^>]*> addu \$a0,\$a0,\$a1
-0+0308 <[^>]*> lb \$a0,[0-9]+\(\$a0\)
+0+0304 <[^>]*> addu a0,a0,a1
+0+0308 <[^>]*> lb a0,[0-9]+\(a0\)
[ ]*308: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+030c <[^>]*> lui \$a0,[-0-9x]+
+0+030c <[^>]*> lui a0,[-0-9x]+
[ ]*30c: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0310 <[^>]*> addu \$a0,\$a0,\$a1
-0+0314 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0310 <[^>]*> addu a0,a0,a1
+0+0314 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*314: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0318 <[^>]*> lui \$a0,[-0-9x]+
+0+0318 <[^>]*> lui a0,[-0-9x]+
[ ]*318: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+031c <[^>]*> addu \$a0,\$a0,\$a1
-0+0320 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+031c <[^>]*> addu a0,a0,a1
+0+0320 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*320: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0324 <[^>]*> lui \$a0,[-0-9x]+
+0+0324 <[^>]*> lui a0,[-0-9x]+
[ ]*324: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0328 <[^>]*> addu \$a0,\$a0,\$a1
-0+032c <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0328 <[^>]*> addu a0,a0,a1
+0+032c <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*32c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0330 <[^>]*> lui \$a0,[-0-9x]+
+0+0330 <[^>]*> lui a0,[-0-9x]+
[ ]*330: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0334 <[^>]*> addu \$a0,\$a0,\$a1
-0+0338 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0334 <[^>]*> addu a0,a0,a1
+0+0338 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*338: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+033c <[^>]*> lui \$a0,[-0-9x]+
+0+033c <[^>]*> lui a0,[-0-9x]+
[ ]*33c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0340 <[^>]*> addu \$a0,\$a0,\$a1
-0+0344 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0340 <[^>]*> addu a0,a0,a1
+0+0344 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*344: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0348 <[^>]*> lui \$a0,[-0-9x]+
+0+0348 <[^>]*> lui a0,[-0-9x]+
[ ]*348: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+034c <[^>]*> addu \$a0,\$a0,\$a1
-0+0350 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+034c <[^>]*> addu a0,a0,a1
+0+0350 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*350: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0354 <[^>]*> lui \$a0,[-0-9x]+
+0+0354 <[^>]*> lui a0,[-0-9x]+
[ ]*354: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0358 <[^>]*> addu \$a0,\$a0,\$a1
-0+035c <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0358 <[^>]*> addu a0,a0,a1
+0+035c <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*35c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0360 <[^>]*> lui \$a0,[-0-9x]+
+0+0360 <[^>]*> lui a0,[-0-9x]+
[ ]*360: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0364 <[^>]*> addu \$a0,\$a0,\$a1
-0+0368 <[^>]*> lb \$a0,[-0-9]+\(\$a0\)
+0+0364 <[^>]*> addu a0,a0,a1
+0+0368 <[^>]*> lb a0,[-0-9]+\(a0\)
[ ]*368: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+036c <[^>]*> lbu \$a0,0\(\$zero\)
-0+0370 <[^>]*> lh \$a0,0\(\$zero\)
-0+0374 <[^>]*> lhu \$a0,0\(\$zero\)
-0+0378 <[^>]*> lw \$a0,0\(\$zero\)
-0+037c <[^>]*> lwl \$a0,0\(\$zero\)
-0+0380 <[^>]*> lwr \$a0,0\(\$zero\)
-0+0384 <[^>]*> lwc0 \$4,0\(\$zero\)
-0+0388 <[^>]*> lwc1 \$f4,0\(\$zero\)
-0+038c <[^>]*> lwc2 \$4,0\(\$zero\)
-0+0390 <[^>]*> lwc3 \$4,0\(\$zero\)
+0+036c <[^>]*> lbu a0,0\(zero\)
+0+0370 <[^>]*> lh a0,0\(zero\)
+0+0374 <[^>]*> lhu a0,0\(zero\)
+0+0378 <[^>]*> lw a0,0\(zero\)
+0+037c <[^>]*> lwl a0,0\(zero\)
+0+0380 <[^>]*> lwr a0,0\(zero\)
+0+0384 <[^>]*> lwc0 a0,0\(zero\)
+0+0388 <[^>]*> lwc1 \$f4,0\(zero\)
+0+038c <[^>]*> lwc2 a0,0\(zero\)
+0+0390 <[^>]*> lwc3 a0,0\(zero\)
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-empic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-empic.d
index fa961f69f10..17fd99fa356 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-empic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-empic.d
@@ -1,4 +1,5 @@
-#objdump: -dr --prefix-addresses -mmips:3000
+
+ #objdump: -dr --prefix-addresses -mmips:3000
#name: MIPS ld-empic
#as: -mips1 -membedded-pic --defsym EMPIC=1
#source: ld-pic.s
@@ -8,179 +9,179 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lw \$a0,0\(\$zero\)
-0+0004 <[^>]*> lw \$a1,4\(\$zero\)
-0+0008 <[^>]*> lw \$a0,1\(\$zero\)
-0+000c <[^>]*> lw \$a1,5\(\$zero\)
-0+0010 <[^>]*> lui \$at,0x1
-0+0014 <[^>]*> lw \$a0,-32768\(\$at\)
-0+0018 <[^>]*> lw \$a1,-32764\(\$at\)
-0+001c <[^>]*> lw \$a0,-32768\(\$zero\)
-0+0020 <[^>]*> lw \$a1,-32764\(\$zero\)
-0+0024 <[^>]*> lui \$at,0x1
-0+0028 <[^>]*> lw \$a0,0\(\$at\)
-0+002c <[^>]*> lw \$a1,4\(\$at\)
-0+0030 <[^>]*> lui \$at,0x2
-0+0034 <[^>]*> lw \$a0,-23131\(\$at\)
-0+0038 <[^>]*> lw \$a1,-23127\(\$at\)
+0+0000 <[^>]*> lw a0,0\(zero\)
+0+0004 <[^>]*> lw a1,4\(zero\)
+0+0008 <[^>]*> lw a0,1\(zero\)
+0+000c <[^>]*> lw a1,5\(zero\)
+0+0010 <[^>]*> lui at,0x1
+0+0014 <[^>]*> lw a0,-32768\(at\)
+0+0018 <[^>]*> lw a1,-32764\(at\)
+0+001c <[^>]*> lw a0,-32768\(zero\)
+0+0020 <[^>]*> lw a1,-32764\(zero\)
+0+0024 <[^>]*> lui at,0x1
+0+0028 <[^>]*> lw a0,0\(at\)
+0+002c <[^>]*> lw a1,4\(at\)
+0+0030 <[^>]*> lui at,0x2
+0+0034 <[^>]*> lw a0,-23131\(at\)
+0+0038 <[^>]*> lw a1,-23127\(at\)
0+003c <[^>]*> nop
-0+0040 <[^>]*> lw \$a0,0\(\$a1\)
-0+0044 <[^>]*> lw \$a1,4\(\$a1\)
+0+0040 <[^>]*> lw a0,0\(a1\)
+0+0044 <[^>]*> lw a1,4\(a1\)
0+0048 <[^>]*> nop
-0+004c <[^>]*> lw \$a0,1\(\$a1\)
-0+0050 <[^>]*> lw \$a1,5\(\$a1\)
-0+0054 <[^>]*> lui \$at,0x1
-0+0058 <[^>]*> addu \$at,\$a1,\$at
-0+005c <[^>]*> lw \$a0,-32768\(\$at\)
-0+0060 <[^>]*> lw \$a1,-32764\(\$at\)
+0+004c <[^>]*> lw a0,1\(a1\)
+0+0050 <[^>]*> lw a1,5\(a1\)
+0+0054 <[^>]*> lui at,0x1
+0+0058 <[^>]*> addu at,a1,at
+0+005c <[^>]*> lw a0,-32768\(at\)
+0+0060 <[^>]*> lw a1,-32764\(at\)
0+0064 <[^>]*> nop
-0+0068 <[^>]*> lw \$a0,-32768\(\$a1\)
-0+006c <[^>]*> lw \$a1,-32764\(\$a1\)
-0+0070 <[^>]*> lui \$at,0x1
-0+0074 <[^>]*> addu \$at,\$a1,\$at
-0+0078 <[^>]*> lw \$a0,0\(\$at\)
-0+007c <[^>]*> lw \$a1,4\(\$at\)
-0+0080 <[^>]*> lui \$at,0x2
-0+0084 <[^>]*> addu \$at,\$a1,\$at
-0+0088 <[^>]*> lw \$a0,-23131\(\$at\)
-0+008c <[^>]*> lw \$a1,-23127\(\$at\)
-0+0090 <[^>]*> lw \$a0,-16384\(\$gp\)
+0+0068 <[^>]*> lw a0,-32768\(a1\)
+0+006c <[^>]*> lw a1,-32764\(a1\)
+0+0070 <[^>]*> lui at,0x1
+0+0074 <[^>]*> addu at,a1,at
+0+0078 <[^>]*> lw a0,0\(at\)
+0+007c <[^>]*> lw a1,4\(at\)
+0+0080 <[^>]*> lui at,0x2
+0+0084 <[^>]*> addu at,a1,at
+0+0088 <[^>]*> lw a0,-23131\(at\)
+0+008c <[^>]*> lw a1,-23127\(at\)
+0+0090 <[^>]*> lw a0,-16384\(gp\)
[ ]*90: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0094 <[^>]*> lw \$a1,-16380\(\$gp\)
+0+0094 <[^>]*> lw a1,-16380\(gp\)
[ ]*94: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0098 <[^>]*> lw \$a0,0\(\$gp\)
+0+0098 <[^>]*> lw a0,0\(gp\)
[ ]*98: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+009c <[^>]*> lw \$a1,4\(\$gp\)
+0+009c <[^>]*> lw a1,4\(gp\)
[ ]*9c: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+00a0 <[^>]*> lw \$a0,0\(\$gp\)
+0+00a0 <[^>]*> lw a0,0\(gp\)
[ ]*a0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00a4 <[^>]*> lw \$a1,4\(\$gp\)
+0+00a4 <[^>]*> lw a1,4\(gp\)
[ ]*a4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00a8 <[^>]*> lw \$a0,0\(\$gp\)
+0+00a8 <[^>]*> lw a0,0\(gp\)
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00ac <[^>]*> lw \$a1,4\(\$gp\)
+0+00ac <[^>]*> lw a1,4\(gp\)
[ ]*ac: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00b0 <[^>]*> lw \$a0,0\(\$gp\)
+0+00b0 <[^>]*> lw a0,0\(gp\)
[ ]*b0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00b4 <[^>]*> lw \$a1,4\(\$gp\)
+0+00b4 <[^>]*> lw a1,4\(gp\)
[ ]*b4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00b8 <[^>]*> lw \$a0,-16384\(\$gp\)
+0+00b8 <[^>]*> lw a0,-16384\(gp\)
[ ]*b8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00bc <[^>]*> lw \$a1,-16380\(\$gp\)
+0+00bc <[^>]*> lw a1,-16380\(gp\)
[ ]*bc: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00c0 <[^>]*> lw \$a0,-15384\(\$gp\)
+0+00c0 <[^>]*> lw a0,-15384\(gp\)
[ ]*c0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00c4 <[^>]*> lw \$a1,-15380\(\$gp\)
+0+00c4 <[^>]*> lw a1,-15380\(gp\)
[ ]*c4: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00c8 <[^>]*> lw \$a0,-16383\(\$gp\)
+0+00c8 <[^>]*> lw a0,-16383\(gp\)
[ ]*c8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+00cc <[^>]*> lw \$a1,-16379\(\$gp\)
+0+00cc <[^>]*> lw a1,-16379\(gp\)
[ ]*cc: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+00d0 <[^>]*> lw \$a0,1\(\$gp\)
+0+00d0 <[^>]*> lw a0,1\(gp\)
[ ]*d0: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+00d4 <[^>]*> lw \$a1,5\(\$gp\)
+0+00d4 <[^>]*> lw a1,5\(gp\)
[ ]*d4: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+00d8 <[^>]*> lw \$a0,1\(\$gp\)
+0+00d8 <[^>]*> lw a0,1\(gp\)
[ ]*d8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00dc <[^>]*> lw \$a1,5\(\$gp\)
+0+00dc <[^>]*> lw a1,5\(gp\)
[ ]*dc: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00e0 <[^>]*> lw \$a0,1\(\$gp\)
+0+00e0 <[^>]*> lw a0,1\(gp\)
[ ]*e0: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00e4 <[^>]*> lw \$a1,5\(\$gp\)
+0+00e4 <[^>]*> lw a1,5\(gp\)
[ ]*e4: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00e8 <[^>]*> lw \$a0,1\(\$gp\)
+0+00e8 <[^>]*> lw a0,1\(gp\)
[ ]*e8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00ec <[^>]*> lw \$a1,5\(\$gp\)
+0+00ec <[^>]*> lw a1,5\(gp\)
[ ]*ec: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00f0 <[^>]*> lw \$a0,-16383\(\$gp\)
+0+00f0 <[^>]*> lw a0,-16383\(gp\)
[ ]*f0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00f4 <[^>]*> lw \$a1,-16379\(\$gp\)
+0+00f4 <[^>]*> lw a1,-16379\(gp\)
[ ]*f4: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00f8 <[^>]*> lw \$a0,-15383\(\$gp\)
+0+00f8 <[^>]*> lw a0,-15383\(gp\)
[ ]*f8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00fc <[^>]*> lw \$a1,-15379\(\$gp\)
+0+00fc <[^>]*> lw a1,-15379\(gp\)
[ ]*fc: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
0+0100 <[^>]*> nop
-0+0104 <[^>]*> addu \$at,\$a1,\$gp
-0+0108 <[^>]*> lw \$a0,-16384\(\$at\)
+0+0104 <[^>]*> addu at,a1,gp
+0+0108 <[^>]*> lw a0,-16384\(at\)
[ ]*108: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+010c <[^>]*> lw \$a1,-16380\(\$at\)
+0+010c <[^>]*> lw a1,-16380\(at\)
[ ]*10c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
0+0110 <[^>]*> nop
-0+0114 <[^>]*> addu \$at,\$a1,\$gp
-0+0118 <[^>]*> lw \$a0,0\(\$at\)
+0+0114 <[^>]*> addu at,a1,gp
+0+0118 <[^>]*> lw a0,0\(at\)
[ ]*118: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+011c <[^>]*> lw \$a1,4\(\$at\)
+0+011c <[^>]*> lw a1,4\(at\)
[ ]*11c: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
0+0120 <[^>]*> nop
-0+0124 <[^>]*> addu \$at,\$a1,\$gp
-0+0128 <[^>]*> lw \$a0,0\(\$at\)
+0+0124 <[^>]*> addu at,a1,gp
+0+0128 <[^>]*> lw a0,0\(at\)
[ ]*128: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+012c <[^>]*> lw \$a1,4\(\$at\)
+0+012c <[^>]*> lw a1,4\(at\)
[ ]*12c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
0+0130 <[^>]*> nop
-0+0134 <[^>]*> addu \$at,\$a1,\$gp
-0+0138 <[^>]*> lw \$a0,0\(\$at\)
+0+0134 <[^>]*> addu at,a1,gp
+0+0138 <[^>]*> lw a0,0\(at\)
[ ]*138: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+013c <[^>]*> lw \$a1,4\(\$at\)
+0+013c <[^>]*> lw a1,4\(at\)
[ ]*13c: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
0+0140 <[^>]*> nop
-0+0144 <[^>]*> addu \$at,\$a1,\$gp
-0+0148 <[^>]*> lw \$a0,0\(\$at\)
+0+0144 <[^>]*> addu at,a1,gp
+0+0148 <[^>]*> lw a0,0\(at\)
[ ]*148: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+014c <[^>]*> lw \$a1,4\(\$at\)
+0+014c <[^>]*> lw a1,4\(at\)
[ ]*14c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
0+0150 <[^>]*> nop
-0+0154 <[^>]*> addu \$at,\$a1,\$gp
-0+0158 <[^>]*> lw \$a0,-16384\(\$at\)
+0+0154 <[^>]*> addu at,a1,gp
+0+0158 <[^>]*> lw a0,-16384\(at\)
[ ]*158: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+015c <[^>]*> lw \$a1,-16380\(\$at\)
+0+015c <[^>]*> lw a1,-16380\(at\)
[ ]*15c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
0+0160 <[^>]*> nop
-0+0164 <[^>]*> addu \$at,\$a1,\$gp
-0+0168 <[^>]*> lw \$a0,-15384\(\$at\)
+0+0164 <[^>]*> addu at,a1,gp
+0+0168 <[^>]*> lw a0,-15384\(at\)
[ ]*168: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+016c <[^>]*> lw \$a1,-15380\(\$at\)
+0+016c <[^>]*> lw a1,-15380\(at\)
[ ]*16c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
0+0170 <[^>]*> nop
-0+0174 <[^>]*> addu \$at,\$a1,\$gp
-0+0178 <[^>]*> lw \$a0,-16383\(\$at\)
+0+0174 <[^>]*> addu at,a1,gp
+0+0178 <[^>]*> lw a0,-16383\(at\)
[ ]*178: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+017c <[^>]*> lw \$a1,-16379\(\$at\)
+0+017c <[^>]*> lw a1,-16379\(at\)
[ ]*17c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
0+0180 <[^>]*> nop
-0+0184 <[^>]*> addu \$at,\$a1,\$gp
-0+0188 <[^>]*> lw \$a0,1\(\$at\)
+0+0184 <[^>]*> addu at,a1,gp
+0+0188 <[^>]*> lw a0,1\(at\)
[ ]*188: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+018c <[^>]*> lw \$a1,5\(\$at\)
+0+018c <[^>]*> lw a1,5\(at\)
[ ]*18c: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
0+0190 <[^>]*> nop
-0+0194 <[^>]*> addu \$at,\$a1,\$gp
-0+0198 <[^>]*> lw \$a0,1\(\$at\)
+0+0194 <[^>]*> addu at,a1,gp
+0+0198 <[^>]*> lw a0,1\(at\)
[ ]*198: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+019c <[^>]*> lw \$a1,5\(\$at\)
+0+019c <[^>]*> lw a1,5\(at\)
[ ]*19c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
0+01a0 <[^>]*> nop
-0+01a4 <[^>]*> addu \$at,\$a1,\$gp
-0+01a8 <[^>]*> lw \$a0,1\(\$at\)
+0+01a4 <[^>]*> addu at,a1,gp
+0+01a8 <[^>]*> lw a0,1\(at\)
[ ]*1a8: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+01ac <[^>]*> lw \$a1,5\(\$at\)
+0+01ac <[^>]*> lw a1,5\(at\)
[ ]*1ac: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
0+01b0 <[^>]*> nop
-0+01b4 <[^>]*> addu \$at,\$a1,\$gp
-0+01b8 <[^>]*> lw \$a0,1\(\$at\)
+0+01b4 <[^>]*> addu at,a1,gp
+0+01b8 <[^>]*> lw a0,1\(at\)
[ ]*1b8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+01bc <[^>]*> lw \$a1,5\(\$at\)
+0+01bc <[^>]*> lw a1,5\(at\)
[ ]*1bc: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
0+01c0 <[^>]*> nop
-0+01c4 <[^>]*> addu \$at,\$a1,\$gp
-0+01c8 <[^>]*> lw \$a0,-16383\(\$at\)
+0+01c4 <[^>]*> addu at,a1,gp
+0+01c8 <[^>]*> lw a0,-16383\(at\)
[ ]*1c8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+01cc <[^>]*> lw \$a1,-16379\(\$at\)
+0+01cc <[^>]*> lw a1,-16379\(at\)
[ ]*1cc: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
0+01d0 <[^>]*> nop
-0+01d4 <[^>]*> addu \$at,\$a1,\$gp
-0+01d8 <[^>]*> lw \$a0,-15383\(\$at\)
+0+01d4 <[^>]*> addu at,a1,gp
+0+01d8 <[^>]*> lw a0,-15383\(at\)
[ ]*1d8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+01dc <[^>]*> lw \$a1,-15379\(\$at\)
+0+01dc <[^>]*> lw a1,-15379\(at\)
[ ]*1dc: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-svr4pic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-svr4pic.d
index 2043d798f29..31860f41a63 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-svr4pic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-svr4pic.d
@@ -8,218 +8,218 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lw \$a0,0\(\$zero\)
-0+0004 <[^>]*> lw \$a1,4\(\$zero\)
-0+0008 <[^>]*> lw \$a0,1\(\$zero\)
-0+000c <[^>]*> lw \$a1,5\(\$zero\)
-0+0010 <[^>]*> lui \$at,0x1
-0+0014 <[^>]*> lw \$a0,-32768\(\$at\)
-0+0018 <[^>]*> lw \$a1,-32764\(\$at\)
-0+001c <[^>]*> lw \$a0,-32768\(\$zero\)
-0+0020 <[^>]*> lw \$a1,-32764\(\$zero\)
-0+0024 <[^>]*> lui \$at,0x1
-0+0028 <[^>]*> lw \$a0,0\(\$at\)
-0+002c <[^>]*> lw \$a1,4\(\$at\)
-0+0030 <[^>]*> lui \$at,0x2
-0+0034 <[^>]*> lw \$a0,-23131\(\$at\)
-0+0038 <[^>]*> lw \$a1,-23127\(\$at\)
+0+0000 <[^>]*> lw a0,0\(zero\)
+0+0004 <[^>]*> lw a1,4\(zero\)
+0+0008 <[^>]*> lw a0,1\(zero\)
+0+000c <[^>]*> lw a1,5\(zero\)
+0+0010 <[^>]*> lui at,0x1
+0+0014 <[^>]*> lw a0,-32768\(at\)
+0+0018 <[^>]*> lw a1,-32764\(at\)
+0+001c <[^>]*> lw a0,-32768\(zero\)
+0+0020 <[^>]*> lw a1,-32764\(zero\)
+0+0024 <[^>]*> lui at,0x1
+0+0028 <[^>]*> lw a0,0\(at\)
+0+002c <[^>]*> lw a1,4\(at\)
+0+0030 <[^>]*> lui at,0x2
+0+0034 <[^>]*> lw a0,-23131\(at\)
+0+0038 <[^>]*> lw a1,-23127\(at\)
0+003c <[^>]*> nop
-0+0040 <[^>]*> lw \$a0,0\(\$a1\)
-0+0044 <[^>]*> lw \$a1,4\(\$a1\)
+0+0040 <[^>]*> lw a0,0\(a1\)
+0+0044 <[^>]*> lw a1,4\(a1\)
0+0048 <[^>]*> nop
-0+004c <[^>]*> lw \$a0,1\(\$a1\)
-0+0050 <[^>]*> lw \$a1,5\(\$a1\)
-0+0054 <[^>]*> lui \$at,0x1
-0+0058 <[^>]*> addu \$at,\$a1,\$at
-0+005c <[^>]*> lw \$a0,-32768\(\$at\)
-0+0060 <[^>]*> lw \$a1,-32764\(\$at\)
+0+004c <[^>]*> lw a0,1\(a1\)
+0+0050 <[^>]*> lw a1,5\(a1\)
+0+0054 <[^>]*> lui at,0x1
+0+0058 <[^>]*> addu at,a1,at
+0+005c <[^>]*> lw a0,-32768\(at\)
+0+0060 <[^>]*> lw a1,-32764\(at\)
0+0064 <[^>]*> nop
-0+0068 <[^>]*> lw \$a0,-32768\(\$a1\)
-0+006c <[^>]*> lw \$a1,-32764\(\$a1\)
-0+0070 <[^>]*> lui \$at,0x1
-0+0074 <[^>]*> addu \$at,\$a1,\$at
-0+0078 <[^>]*> lw \$a0,0\(\$at\)
-0+007c <[^>]*> lw \$a1,4\(\$at\)
-0+0080 <[^>]*> lui \$at,0x2
-0+0084 <[^>]*> addu \$at,\$a1,\$at
-0+0088 <[^>]*> lw \$a0,-23131\(\$at\)
-0+008c <[^>]*> lw \$a1,-23127\(\$at\)
-0+0090 <[^>]*> lw \$at,0\(\$gp\)
+0+0068 <[^>]*> lw a0,-32768\(a1\)
+0+006c <[^>]*> lw a1,-32764\(a1\)
+0+0070 <[^>]*> lui at,0x1
+0+0074 <[^>]*> addu at,a1,at
+0+0078 <[^>]*> lw a0,0\(at\)
+0+007c <[^>]*> lw a1,4\(at\)
+0+0080 <[^>]*> lui at,0x2
+0+0084 <[^>]*> addu at,a1,at
+0+0088 <[^>]*> lw a0,-23131\(at\)
+0+008c <[^>]*> lw a1,-23127\(at\)
+0+0090 <[^>]*> lw at,0\(gp\)
[ ]*90: R_MIPS_GOT16 .data
0+0094 <[^>]*> nop
-0+0098 <[^>]*> lw \$a0,0\(\$at\)
+0+0098 <[^>]*> lw a0,0\(at\)
[ ]*98: R_MIPS_LO16 .data
-0+009c <[^>]*> lw \$a1,4\(\$at\)
+0+009c <[^>]*> lw a1,4\(at\)
[ ]*9c: R_MIPS_LO16 .data
-0+00a0 <[^>]*> lw \$at,0\(\$gp\)
+0+00a0 <[^>]*> lw at,0\(gp\)
[ ]*a0: R_MIPS_GOT16 big_external_data_label
0+00a4 <[^>]*> nop
-0+00a8 <[^>]*> lw \$a0,0\(\$at\)
-0+00ac <[^>]*> lw \$a1,4\(\$at\)
-0+00b0 <[^>]*> lw \$at,0\(\$gp\)
+0+00a8 <[^>]*> lw a0,0\(at\)
+0+00ac <[^>]*> lw a1,4\(at\)
+0+00b0 <[^>]*> lw at,0\(gp\)
[ ]*b0: R_MIPS_GOT16 small_external_data_label
0+00b4 <[^>]*> nop
-0+00b8 <[^>]*> lw \$a0,0\(\$at\)
-0+00bc <[^>]*> lw \$a1,4\(\$at\)
-0+00c0 <[^>]*> lw \$at,0\(\$gp\)
+0+00b8 <[^>]*> lw a0,0\(at\)
+0+00bc <[^>]*> lw a1,4\(at\)
+0+00c0 <[^>]*> lw at,0\(gp\)
[ ]*c0: R_MIPS_GOT16 big_external_common
0+00c4 <[^>]*> nop
-0+00c8 <[^>]*> lw \$a0,0\(\$at\)
-0+00cc <[^>]*> lw \$a1,4\(\$at\)
-0+00d0 <[^>]*> lw \$at,0\(\$gp\)
+0+00c8 <[^>]*> lw a0,0\(at\)
+0+00cc <[^>]*> lw a1,4\(at\)
+0+00d0 <[^>]*> lw at,0\(gp\)
[ ]*d0: R_MIPS_GOT16 small_external_common
0+00d4 <[^>]*> nop
-0+00d8 <[^>]*> lw \$a0,0\(\$at\)
-0+00dc <[^>]*> lw \$a1,4\(\$at\)
-0+00e0 <[^>]*> lw \$at,0\(\$gp\)
+0+00d8 <[^>]*> lw a0,0\(at\)
+0+00dc <[^>]*> lw a1,4\(at\)
+0+00e0 <[^>]*> lw at,0\(gp\)
[ ]*e0: R_MIPS_GOT16 .bss
0+00e4 <[^>]*> nop
-0+00e8 <[^>]*> lw \$a0,0\(\$at\)
+0+00e8 <[^>]*> lw a0,0\(at\)
[ ]*e8: R_MIPS_LO16 .bss
-0+00ec <[^>]*> lw \$a1,4\(\$at\)
+0+00ec <[^>]*> lw a1,4\(at\)
[ ]*ec: R_MIPS_LO16 .bss
-0+00f0 <[^>]*> lw \$at,0\(\$gp\)
+0+00f0 <[^>]*> lw at,0\(gp\)
[ ]*f0: R_MIPS_GOT16 .bss
0+00f4 <[^>]*> nop
-0+00f8 <[^>]*> lw \$a0,1000\(\$at\)
+0+00f8 <[^>]*> lw a0,1000\(at\)
[ ]*f8: R_MIPS_LO16 .bss
-0+00fc <[^>]*> lw \$a1,1004\(\$at\)
+0+00fc <[^>]*> lw a1,1004\(at\)
[ ]*fc: R_MIPS_LO16 .bss
-0+0100 <[^>]*> lw \$at,0\(\$gp\)
+0+0100 <[^>]*> lw at,0\(gp\)
[ ]*100: R_MIPS_GOT16 .data
0+0104 <[^>]*> nop
-0+0108 <[^>]*> lw \$a0,1\(\$at\)
+0+0108 <[^>]*> lw a0,1\(at\)
[ ]*108: R_MIPS_LO16 .data
-0+010c <[^>]*> lw \$a1,5\(\$at\)
+0+010c <[^>]*> lw a1,5\(at\)
[ ]*10c: R_MIPS_LO16 .data
-0+0110 <[^>]*> lw \$at,0\(\$gp\)
+0+0110 <[^>]*> lw at,0\(gp\)
[ ]*110: R_MIPS_GOT16 big_external_data_label
0+0114 <[^>]*> nop
-0+0118 <[^>]*> lw \$a0,1\(\$at\)
-0+011c <[^>]*> lw \$a1,5\(\$at\)
-0+0120 <[^>]*> lw \$at,0\(\$gp\)
+0+0118 <[^>]*> lw a0,1\(at\)
+0+011c <[^>]*> lw a1,5\(at\)
+0+0120 <[^>]*> lw at,0\(gp\)
[ ]*120: R_MIPS_GOT16 small_external_data_label
0+0124 <[^>]*> nop
-0+0128 <[^>]*> lw \$a0,1\(\$at\)
-0+012c <[^>]*> lw \$a1,5\(\$at\)
-0+0130 <[^>]*> lw \$at,0\(\$gp\)
+0+0128 <[^>]*> lw a0,1\(at\)
+0+012c <[^>]*> lw a1,5\(at\)
+0+0130 <[^>]*> lw at,0\(gp\)
[ ]*130: R_MIPS_GOT16 big_external_common
0+0134 <[^>]*> nop
-0+0138 <[^>]*> lw \$a0,1\(\$at\)
-0+013c <[^>]*> lw \$a1,5\(\$at\)
-0+0140 <[^>]*> lw \$at,0\(\$gp\)
+0+0138 <[^>]*> lw a0,1\(at\)
+0+013c <[^>]*> lw a1,5\(at\)
+0+0140 <[^>]*> lw at,0\(gp\)
[ ]*140: R_MIPS_GOT16 small_external_common
0+0144 <[^>]*> nop
-0+0148 <[^>]*> lw \$a0,1\(\$at\)
-0+014c <[^>]*> lw \$a1,5\(\$at\)
-0+0150 <[^>]*> lw \$at,0\(\$gp\)
+0+0148 <[^>]*> lw a0,1\(at\)
+0+014c <[^>]*> lw a1,5\(at\)
+0+0150 <[^>]*> lw at,0\(gp\)
[ ]*150: R_MIPS_GOT16 .bss
0+0154 <[^>]*> nop
-0+0158 <[^>]*> lw \$a0,1\(\$at\)
+0+0158 <[^>]*> lw a0,1\(at\)
[ ]*158: R_MIPS_LO16 .bss
-0+015c <[^>]*> lw \$a1,5\(\$at\)
+0+015c <[^>]*> lw a1,5\(at\)
[ ]*15c: R_MIPS_LO16 .bss
-0+0160 <[^>]*> lw \$at,0\(\$gp\)
+0+0160 <[^>]*> lw at,0\(gp\)
[ ]*160: R_MIPS_GOT16 .bss
0+0164 <[^>]*> nop
-0+0168 <[^>]*> lw \$a0,1001\(\$at\)
+0+0168 <[^>]*> lw a0,1001\(at\)
[ ]*168: R_MIPS_LO16 .bss
-0+016c <[^>]*> lw \$a1,1005\(\$at\)
+0+016c <[^>]*> lw a1,1005\(at\)
[ ]*16c: R_MIPS_LO16 .bss
-0+0170 <[^>]*> lw \$at,0\(\$gp\)
+0+0170 <[^>]*> lw at,0\(gp\)
[ ]*170: R_MIPS_GOT16 .data
0+0174 <[^>]*> nop
-0+0178 <[^>]*> addu \$at,\$a1,\$at
-0+017c <[^>]*> lw \$a0,0\(\$at\)
+0+0178 <[^>]*> addu at,a1,at
+0+017c <[^>]*> lw a0,0\(at\)
[ ]*17c: R_MIPS_LO16 .data
-0+0180 <[^>]*> lw \$a1,4\(\$at\)
+0+0180 <[^>]*> lw a1,4\(at\)
[ ]*180: R_MIPS_LO16 .data
-0+0184 <[^>]*> lw \$at,0\(\$gp\)
+0+0184 <[^>]*> lw at,0\(gp\)
[ ]*184: R_MIPS_GOT16 big_external_data_label
0+0188 <[^>]*> nop
-0+018c <[^>]*> addu \$at,\$a1,\$at
-0+0190 <[^>]*> lw \$a0,0\(\$at\)
-0+0194 <[^>]*> lw \$a1,4\(\$at\)
-0+0198 <[^>]*> lw \$at,0\(\$gp\)
+0+018c <[^>]*> addu at,a1,at
+0+0190 <[^>]*> lw a0,0\(at\)
+0+0194 <[^>]*> lw a1,4\(at\)
+0+0198 <[^>]*> lw at,0\(gp\)
[ ]*198: R_MIPS_GOT16 small_external_data_label
0+019c <[^>]*> nop
-0+01a0 <[^>]*> addu \$at,\$a1,\$at
-0+01a4 <[^>]*> lw \$a0,0\(\$at\)
-0+01a8 <[^>]*> lw \$a1,4\(\$at\)
-0+01ac <[^>]*> lw \$at,0\(\$gp\)
+0+01a0 <[^>]*> addu at,a1,at
+0+01a4 <[^>]*> lw a0,0\(at\)
+0+01a8 <[^>]*> lw a1,4\(at\)
+0+01ac <[^>]*> lw at,0\(gp\)
[ ]*1ac: R_MIPS_GOT16 big_external_common
0+01b0 <[^>]*> nop
-0+01b4 <[^>]*> addu \$at,\$a1,\$at
-0+01b8 <[^>]*> lw \$a0,0\(\$at\)
-0+01bc <[^>]*> lw \$a1,4\(\$at\)
-0+01c0 <[^>]*> lw \$at,0\(\$gp\)
+0+01b4 <[^>]*> addu at,a1,at
+0+01b8 <[^>]*> lw a0,0\(at\)
+0+01bc <[^>]*> lw a1,4\(at\)
+0+01c0 <[^>]*> lw at,0\(gp\)
[ ]*1c0: R_MIPS_GOT16 small_external_common
0+01c4 <[^>]*> nop
-0+01c8 <[^>]*> addu \$at,\$a1,\$at
-0+01cc <[^>]*> lw \$a0,0\(\$at\)
-0+01d0 <[^>]*> lw \$a1,4\(\$at\)
-0+01d4 <[^>]*> lw \$at,0\(\$gp\)
+0+01c8 <[^>]*> addu at,a1,at
+0+01cc <[^>]*> lw a0,0\(at\)
+0+01d0 <[^>]*> lw a1,4\(at\)
+0+01d4 <[^>]*> lw at,0\(gp\)
[ ]*1d4: R_MIPS_GOT16 .bss
0+01d8 <[^>]*> nop
-0+01dc <[^>]*> addu \$at,\$a1,\$at
-0+01e0 <[^>]*> lw \$a0,0\(\$at\)
+0+01dc <[^>]*> addu at,a1,at
+0+01e0 <[^>]*> lw a0,0\(at\)
[ ]*1e0: R_MIPS_LO16 .bss
-0+01e4 <[^>]*> lw \$a1,4\(\$at\)
+0+01e4 <[^>]*> lw a1,4\(at\)
[ ]*1e4: R_MIPS_LO16 .bss
-0+01e8 <[^>]*> lw \$at,0\(\$gp\)
+0+01e8 <[^>]*> lw at,0\(gp\)
[ ]*1e8: R_MIPS_GOT16 .bss
0+01ec <[^>]*> nop
-0+01f0 <[^>]*> addu \$at,\$a1,\$at
-0+01f4 <[^>]*> lw \$a0,1000\(\$at\)
+0+01f0 <[^>]*> addu at,a1,at
+0+01f4 <[^>]*> lw a0,1000\(at\)
[ ]*1f4: R_MIPS_LO16 .bss
-0+01f8 <[^>]*> lw \$a1,1004\(\$at\)
+0+01f8 <[^>]*> lw a1,1004\(at\)
[ ]*1f8: R_MIPS_LO16 .bss
-0+01fc <[^>]*> lw \$at,0\(\$gp\)
+0+01fc <[^>]*> lw at,0\(gp\)
[ ]*1fc: R_MIPS_GOT16 .data
0+0200 <[^>]*> nop
-0+0204 <[^>]*> addu \$at,\$a1,\$at
-0+0208 <[^>]*> lw \$a0,1\(\$at\)
+0+0204 <[^>]*> addu at,a1,at
+0+0208 <[^>]*> lw a0,1\(at\)
[ ]*208: R_MIPS_LO16 .data
-0+020c <[^>]*> lw \$a1,5\(\$at\)
+0+020c <[^>]*> lw a1,5\(at\)
[ ]*20c: R_MIPS_LO16 .data
-0+0210 <[^>]*> lw \$at,0\(\$gp\)
+0+0210 <[^>]*> lw at,0\(gp\)
[ ]*210: R_MIPS_GOT16 big_external_data_label
0+0214 <[^>]*> nop
-0+0218 <[^>]*> addu \$at,\$a1,\$at
-0+021c <[^>]*> lw \$a0,1\(\$at\)
-0+0220 <[^>]*> lw \$a1,5\(\$at\)
-0+0224 <[^>]*> lw \$at,0\(\$gp\)
+0+0218 <[^>]*> addu at,a1,at
+0+021c <[^>]*> lw a0,1\(at\)
+0+0220 <[^>]*> lw a1,5\(at\)
+0+0224 <[^>]*> lw at,0\(gp\)
[ ]*224: R_MIPS_GOT16 small_external_data_label
0+0228 <[^>]*> nop
-0+022c <[^>]*> addu \$at,\$a1,\$at
-0+0230 <[^>]*> lw \$a0,1\(\$at\)
-0+0234 <[^>]*> lw \$a1,5\(\$at\)
-0+0238 <[^>]*> lw \$at,0\(\$gp\)
+0+022c <[^>]*> addu at,a1,at
+0+0230 <[^>]*> lw a0,1\(at\)
+0+0234 <[^>]*> lw a1,5\(at\)
+0+0238 <[^>]*> lw at,0\(gp\)
[ ]*238: R_MIPS_GOT16 big_external_common
0+023c <[^>]*> nop
-0+0240 <[^>]*> addu \$at,\$a1,\$at
-0+0244 <[^>]*> lw \$a0,1\(\$at\)
-0+0248 <[^>]*> lw \$a1,5\(\$at\)
-0+024c <[^>]*> lw \$at,0\(\$gp\)
+0+0240 <[^>]*> addu at,a1,at
+0+0244 <[^>]*> lw a0,1\(at\)
+0+0248 <[^>]*> lw a1,5\(at\)
+0+024c <[^>]*> lw at,0\(gp\)
[ ]*24c: R_MIPS_GOT16 small_external_common
0+0250 <[^>]*> nop
-0+0254 <[^>]*> addu \$at,\$a1,\$at
-0+0258 <[^>]*> lw \$a0,1\(\$at\)
-0+025c <[^>]*> lw \$a1,5\(\$at\)
-0+0260 <[^>]*> lw \$at,0\(\$gp\)
+0+0254 <[^>]*> addu at,a1,at
+0+0258 <[^>]*> lw a0,1\(at\)
+0+025c <[^>]*> lw a1,5\(at\)
+0+0260 <[^>]*> lw at,0\(gp\)
[ ]*260: R_MIPS_GOT16 .bss
0+0264 <[^>]*> nop
-0+0268 <[^>]*> addu \$at,\$a1,\$at
-0+026c <[^>]*> lw \$a0,1\(\$at\)
+0+0268 <[^>]*> addu at,a1,at
+0+026c <[^>]*> lw a0,1\(at\)
[ ]*26c: R_MIPS_LO16 .bss
-0+0270 <[^>]*> lw \$a1,5\(\$at\)
+0+0270 <[^>]*> lw a1,5\(at\)
[ ]*270: R_MIPS_LO16 .bss
-0+0274 <[^>]*> lw \$at,0\(\$gp\)
+0+0274 <[^>]*> lw at,0\(gp\)
[ ]*274: R_MIPS_GOT16 .bss
0+0278 <[^>]*> nop
-0+027c <[^>]*> addu \$at,\$a1,\$at
-0+0280 <[^>]*> lw \$a0,1001\(\$at\)
+0+027c <[^>]*> addu at,a1,at
+0+0280 <[^>]*> lw a0,1001\(at\)
[ ]*280: R_MIPS_LO16 .bss
-0+0284 <[^>]*> lw \$a1,1005\(\$at\)
+0+0284 <[^>]*> lw a1,1005\(at\)
[ ]*284: R_MIPS_LO16 .bss
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-xgot.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-xgot.d
index 40262cf2446..c864b56b234 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-xgot.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld-xgot.d
@@ -8,266 +8,266 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lw \$a0,0\(\$zero\)
-0+0004 <[^>]*> lw \$a1,4\(\$zero\)
-0+0008 <[^>]*> lw \$a0,1\(\$zero\)
-0+000c <[^>]*> lw \$a1,5\(\$zero\)
-0+0010 <[^>]*> lui \$at,0x1
-0+0014 <[^>]*> lw \$a0,-32768\(\$at\)
-0+0018 <[^>]*> lw \$a1,-32764\(\$at\)
-0+001c <[^>]*> lw \$a0,-32768\(\$zero\)
-0+0020 <[^>]*> lw \$a1,-32764\(\$zero\)
-0+0024 <[^>]*> lui \$at,0x1
-0+0028 <[^>]*> lw \$a0,0\(\$at\)
-0+002c <[^>]*> lw \$a1,4\(\$at\)
-0+0030 <[^>]*> lui \$at,0x2
-0+0034 <[^>]*> lw \$a0,-23131\(\$at\)
-0+0038 <[^>]*> lw \$a1,-23127\(\$at\)
+0+0000 <[^>]*> lw a0,0\(zero\)
+0+0004 <[^>]*> lw a1,4\(zero\)
+0+0008 <[^>]*> lw a0,1\(zero\)
+0+000c <[^>]*> lw a1,5\(zero\)
+0+0010 <[^>]*> lui at,0x1
+0+0014 <[^>]*> lw a0,-32768\(at\)
+0+0018 <[^>]*> lw a1,-32764\(at\)
+0+001c <[^>]*> lw a0,-32768\(zero\)
+0+0020 <[^>]*> lw a1,-32764\(zero\)
+0+0024 <[^>]*> lui at,0x1
+0+0028 <[^>]*> lw a0,0\(at\)
+0+002c <[^>]*> lw a1,4\(at\)
+0+0030 <[^>]*> lui at,0x2
+0+0034 <[^>]*> lw a0,-23131\(at\)
+0+0038 <[^>]*> lw a1,-23127\(at\)
0+003c <[^>]*> nop
-0+0040 <[^>]*> lw \$a0,0\(\$a1\)
-0+0044 <[^>]*> lw \$a1,4\(\$a1\)
+0+0040 <[^>]*> lw a0,0\(a1\)
+0+0044 <[^>]*> lw a1,4\(a1\)
0+0048 <[^>]*> nop
-0+004c <[^>]*> lw \$a0,1\(\$a1\)
-0+0050 <[^>]*> lw \$a1,5\(\$a1\)
-0+0054 <[^>]*> lui \$at,0x1
-0+0058 <[^>]*> addu \$at,\$a1,\$at
-0+005c <[^>]*> lw \$a0,-32768\(\$at\)
-0+0060 <[^>]*> lw \$a1,-32764\(\$at\)
+0+004c <[^>]*> lw a0,1\(a1\)
+0+0050 <[^>]*> lw a1,5\(a1\)
+0+0054 <[^>]*> lui at,0x1
+0+0058 <[^>]*> addu at,a1,at
+0+005c <[^>]*> lw a0,-32768\(at\)
+0+0060 <[^>]*> lw a1,-32764\(at\)
0+0064 <[^>]*> nop
-0+0068 <[^>]*> lw \$a0,-32768\(\$a1\)
-0+006c <[^>]*> lw \$a1,-32764\(\$a1\)
-0+0070 <[^>]*> lui \$at,0x1
-0+0074 <[^>]*> addu \$at,\$a1,\$at
-0+0078 <[^>]*> lw \$a0,0\(\$at\)
-0+007c <[^>]*> lw \$a1,4\(\$at\)
-0+0080 <[^>]*> lui \$at,0x2
-0+0084 <[^>]*> addu \$at,\$a1,\$at
-0+0088 <[^>]*> lw \$a0,-23131\(\$at\)
-0+008c <[^>]*> lw \$a1,-23127\(\$at\)
-0+0090 <[^>]*> lw \$at,0\(\$gp\)
+0+0068 <[^>]*> lw a0,-32768\(a1\)
+0+006c <[^>]*> lw a1,-32764\(a1\)
+0+0070 <[^>]*> lui at,0x1
+0+0074 <[^>]*> addu at,a1,at
+0+0078 <[^>]*> lw a0,0\(at\)
+0+007c <[^>]*> lw a1,4\(at\)
+0+0080 <[^>]*> lui at,0x2
+0+0084 <[^>]*> addu at,a1,at
+0+0088 <[^>]*> lw a0,-23131\(at\)
+0+008c <[^>]*> lw a1,-23127\(at\)
+0+0090 <[^>]*> lw at,0\(gp\)
[ ]*90: R_MIPS_GOT16 .data
0+0094 <[^>]*> nop
-0+0098 <[^>]*> lw \$a0,0\(\$at\)
+0+0098 <[^>]*> lw a0,0\(at\)
[ ]*98: R_MIPS_LO16 .data
-0+009c <[^>]*> lw \$a1,4\(\$at\)
+0+009c <[^>]*> lw a1,4\(at\)
[ ]*9c: R_MIPS_LO16 .data
-0+00a0 <[^>]*> lui \$at,0x0
+0+00a0 <[^>]*> lui at,0x0
[ ]*a0: R_MIPS_GOT_HI16 big_external_data_label
-0+00a4 <[^>]*> addu \$at,\$at,\$gp
-0+00a8 <[^>]*> lw \$at,0\(\$at\)
+0+00a4 <[^>]*> addu at,at,gp
+0+00a8 <[^>]*> lw at,0\(at\)
[ ]*a8: R_MIPS_GOT_LO16 big_external_data_label
0+00ac <[^>]*> nop
-0+00b0 <[^>]*> lw \$a0,0\(\$at\)
-0+00b4 <[^>]*> lw \$a1,4\(\$at\)
-0+00b8 <[^>]*> lui \$at,0x0
+0+00b0 <[^>]*> lw a0,0\(at\)
+0+00b4 <[^>]*> lw a1,4\(at\)
+0+00b8 <[^>]*> lui at,0x0
[ ]*b8: R_MIPS_GOT_HI16 small_external_data_label
-0+00bc <[^>]*> addu \$at,\$at,\$gp
-0+00c0 <[^>]*> lw \$at,0\(\$at\)
+0+00bc <[^>]*> addu at,at,gp
+0+00c0 <[^>]*> lw at,0\(at\)
[ ]*c0: R_MIPS_GOT_LO16 small_external_data_label
0+00c4 <[^>]*> nop
-0+00c8 <[^>]*> lw \$a0,0\(\$at\)
-0+00cc <[^>]*> lw \$a1,4\(\$at\)
-0+00d0 <[^>]*> lui \$at,0x0
+0+00c8 <[^>]*> lw a0,0\(at\)
+0+00cc <[^>]*> lw a1,4\(at\)
+0+00d0 <[^>]*> lui at,0x0
[ ]*d0: R_MIPS_GOT_HI16 big_external_common
-0+00d4 <[^>]*> addu \$at,\$at,\$gp
-0+00d8 <[^>]*> lw \$at,0\(\$at\)
+0+00d4 <[^>]*> addu at,at,gp
+0+00d8 <[^>]*> lw at,0\(at\)
[ ]*d8: R_MIPS_GOT_LO16 big_external_common
0+00dc <[^>]*> nop
-0+00e0 <[^>]*> lw \$a0,0\(\$at\)
-0+00e4 <[^>]*> lw \$a1,4\(\$at\)
-0+00e8 <[^>]*> lui \$at,0x0
+0+00e0 <[^>]*> lw a0,0\(at\)
+0+00e4 <[^>]*> lw a1,4\(at\)
+0+00e8 <[^>]*> lui at,0x0
[ ]*e8: R_MIPS_GOT_HI16 small_external_common
-0+00ec <[^>]*> addu \$at,\$at,\$gp
-0+00f0 <[^>]*> lw \$at,0\(\$at\)
+0+00ec <[^>]*> addu at,at,gp
+0+00f0 <[^>]*> lw at,0\(at\)
[ ]*f0: R_MIPS_GOT_LO16 small_external_common
0+00f4 <[^>]*> nop
-0+00f8 <[^>]*> lw \$a0,0\(\$at\)
-0+00fc <[^>]*> lw \$a1,4\(\$at\)
-0+0100 <[^>]*> lw \$at,0\(\$gp\)
+0+00f8 <[^>]*> lw a0,0\(at\)
+0+00fc <[^>]*> lw a1,4\(at\)
+0+0100 <[^>]*> lw at,0\(gp\)
[ ]*100: R_MIPS_GOT16 .bss
0+0104 <[^>]*> nop
-0+0108 <[^>]*> lw \$a0,0\(\$at\)
+0+0108 <[^>]*> lw a0,0\(at\)
[ ]*108: R_MIPS_LO16 .bss
-0+010c <[^>]*> lw \$a1,4\(\$at\)
+0+010c <[^>]*> lw a1,4\(at\)
[ ]*10c: R_MIPS_LO16 .bss
-0+0110 <[^>]*> lw \$at,0\(\$gp\)
+0+0110 <[^>]*> lw at,0\(gp\)
[ ]*110: R_MIPS_GOT16 .bss
0+0114 <[^>]*> nop
-0+0118 <[^>]*> lw \$a0,1000\(\$at\)
+0+0118 <[^>]*> lw a0,1000\(at\)
[ ]*118: R_MIPS_LO16 .bss
-0+011c <[^>]*> lw \$a1,1004\(\$at\)
+0+011c <[^>]*> lw a1,1004\(at\)
[ ]*11c: R_MIPS_LO16 .bss
-0+0120 <[^>]*> lw \$at,0\(\$gp\)
+0+0120 <[^>]*> lw at,0\(gp\)
[ ]*120: R_MIPS_GOT16 .data
0+0124 <[^>]*> nop
-0+0128 <[^>]*> lw \$a0,1\(\$at\)
+0+0128 <[^>]*> lw a0,1\(at\)
[ ]*128: R_MIPS_LO16 .data
-0+012c <[^>]*> lw \$a1,5\(\$at\)
+0+012c <[^>]*> lw a1,5\(at\)
[ ]*12c: R_MIPS_LO16 .data
-0+0130 <[^>]*> lui \$at,0x0
+0+0130 <[^>]*> lui at,0x0
[ ]*130: R_MIPS_GOT_HI16 big_external_data_label
-0+0134 <[^>]*> addu \$at,\$at,\$gp
-0+0138 <[^>]*> lw \$at,0\(\$at\)
+0+0134 <[^>]*> addu at,at,gp
+0+0138 <[^>]*> lw at,0\(at\)
[ ]*138: R_MIPS_GOT_LO16 big_external_data_label
0+013c <[^>]*> nop
-0+0140 <[^>]*> lw \$a0,1\(\$at\)
-0+0144 <[^>]*> lw \$a1,5\(\$at\)
-0+0148 <[^>]*> lui \$at,0x0
+0+0140 <[^>]*> lw a0,1\(at\)
+0+0144 <[^>]*> lw a1,5\(at\)
+0+0148 <[^>]*> lui at,0x0
[ ]*148: R_MIPS_GOT_HI16 small_external_data_label
-0+014c <[^>]*> addu \$at,\$at,\$gp
-0+0150 <[^>]*> lw \$at,0\(\$at\)
+0+014c <[^>]*> addu at,at,gp
+0+0150 <[^>]*> lw at,0\(at\)
[ ]*150: R_MIPS_GOT_LO16 small_external_data_label
0+0154 <[^>]*> nop
-0+0158 <[^>]*> lw \$a0,1\(\$at\)
-0+015c <[^>]*> lw \$a1,5\(\$at\)
-0+0160 <[^>]*> lui \$at,0x0
+0+0158 <[^>]*> lw a0,1\(at\)
+0+015c <[^>]*> lw a1,5\(at\)
+0+0160 <[^>]*> lui at,0x0
[ ]*160: R_MIPS_GOT_HI16 big_external_common
-0+0164 <[^>]*> addu \$at,\$at,\$gp
-0+0168 <[^>]*> lw \$at,0\(\$at\)
+0+0164 <[^>]*> addu at,at,gp
+0+0168 <[^>]*> lw at,0\(at\)
[ ]*168: R_MIPS_GOT_LO16 big_external_common
0+016c <[^>]*> nop
-0+0170 <[^>]*> lw \$a0,1\(\$at\)
-0+0174 <[^>]*> lw \$a1,5\(\$at\)
-0+0178 <[^>]*> lui \$at,0x0
+0+0170 <[^>]*> lw a0,1\(at\)
+0+0174 <[^>]*> lw a1,5\(at\)
+0+0178 <[^>]*> lui at,0x0
[ ]*178: R_MIPS_GOT_HI16 small_external_common
-0+017c <[^>]*> addu \$at,\$at,\$gp
-0+0180 <[^>]*> lw \$at,0\(\$at\)
+0+017c <[^>]*> addu at,at,gp
+0+0180 <[^>]*> lw at,0\(at\)
[ ]*180: R_MIPS_GOT_LO16 small_external_common
0+0184 <[^>]*> nop
-0+0188 <[^>]*> lw \$a0,1\(\$at\)
-0+018c <[^>]*> lw \$a1,5\(\$at\)
-0+0190 <[^>]*> lw \$at,0\(\$gp\)
+0+0188 <[^>]*> lw a0,1\(at\)
+0+018c <[^>]*> lw a1,5\(at\)
+0+0190 <[^>]*> lw at,0\(gp\)
[ ]*190: R_MIPS_GOT16 .bss
0+0194 <[^>]*> nop
-0+0198 <[^>]*> lw \$a0,1\(\$at\)
+0+0198 <[^>]*> lw a0,1\(at\)
[ ]*198: R_MIPS_LO16 .bss
-0+019c <[^>]*> lw \$a1,5\(\$at\)
+0+019c <[^>]*> lw a1,5\(at\)
[ ]*19c: R_MIPS_LO16 .bss
-0+01a0 <[^>]*> lw \$at,0\(\$gp\)
+0+01a0 <[^>]*> lw at,0\(gp\)
[ ]*1a0: R_MIPS_GOT16 .bss
0+01a4 <[^>]*> nop
-0+01a8 <[^>]*> lw \$a0,1001\(\$at\)
+0+01a8 <[^>]*> lw a0,1001\(at\)
[ ]*1a8: R_MIPS_LO16 .bss
-0+01ac <[^>]*> lw \$a1,1005\(\$at\)
+0+01ac <[^>]*> lw a1,1005\(at\)
[ ]*1ac: R_MIPS_LO16 .bss
-0+01b0 <[^>]*> lw \$at,0\(\$gp\)
+0+01b0 <[^>]*> lw at,0\(gp\)
[ ]*1b0: R_MIPS_GOT16 .data
0+01b4 <[^>]*> nop
-0+01b8 <[^>]*> addu \$at,\$a1,\$at
-0+01bc <[^>]*> lw \$a0,0\(\$at\)
+0+01b8 <[^>]*> addu at,a1,at
+0+01bc <[^>]*> lw a0,0\(at\)
[ ]*1bc: R_MIPS_LO16 .data
-0+01c0 <[^>]*> lw \$a1,4\(\$at\)
+0+01c0 <[^>]*> lw a1,4\(at\)
[ ]*1c0: R_MIPS_LO16 .data
-0+01c4 <[^>]*> lui \$at,0x0
+0+01c4 <[^>]*> lui at,0x0
[ ]*1c4: R_MIPS_GOT_HI16 big_external_data_label
-0+01c8 <[^>]*> addu \$at,\$at,\$gp
-0+01cc <[^>]*> lw \$at,0\(\$at\)
+0+01c8 <[^>]*> addu at,at,gp
+0+01cc <[^>]*> lw at,0\(at\)
[ ]*1cc: R_MIPS_GOT_LO16 big_external_data_label
0+01d0 <[^>]*> nop
-0+01d4 <[^>]*> addu \$at,\$a1,\$at
-0+01d8 <[^>]*> lw \$a0,0\(\$at\)
-0+01dc <[^>]*> lw \$a1,4\(\$at\)
-0+01e0 <[^>]*> lui \$at,0x0
+0+01d4 <[^>]*> addu at,a1,at
+0+01d8 <[^>]*> lw a0,0\(at\)
+0+01dc <[^>]*> lw a1,4\(at\)
+0+01e0 <[^>]*> lui at,0x0
[ ]*1e0: R_MIPS_GOT_HI16 small_external_data_label
-0+01e4 <[^>]*> addu \$at,\$at,\$gp
-0+01e8 <[^>]*> lw \$at,0\(\$at\)
+0+01e4 <[^>]*> addu at,at,gp
+0+01e8 <[^>]*> lw at,0\(at\)
[ ]*1e8: R_MIPS_GOT_LO16 small_external_data_label
0+01ec <[^>]*> nop
-0+01f0 <[^>]*> addu \$at,\$a1,\$at
-0+01f4 <[^>]*> lw \$a0,0\(\$at\)
-0+01f8 <[^>]*> lw \$a1,4\(\$at\)
-0+01fc <[^>]*> lui \$at,0x0
+0+01f0 <[^>]*> addu at,a1,at
+0+01f4 <[^>]*> lw a0,0\(at\)
+0+01f8 <[^>]*> lw a1,4\(at\)
+0+01fc <[^>]*> lui at,0x0
[ ]*1fc: R_MIPS_GOT_HI16 big_external_common
-0+0200 <[^>]*> addu \$at,\$at,\$gp
-0+0204 <[^>]*> lw \$at,0\(\$at\)
+0+0200 <[^>]*> addu at,at,gp
+0+0204 <[^>]*> lw at,0\(at\)
[ ]*204: R_MIPS_GOT_LO16 big_external_common
0+0208 <[^>]*> nop
-0+020c <[^>]*> addu \$at,\$a1,\$at
-0+0210 <[^>]*> lw \$a0,0\(\$at\)
-0+0214 <[^>]*> lw \$a1,4\(\$at\)
-0+0218 <[^>]*> lui \$at,0x0
+0+020c <[^>]*> addu at,a1,at
+0+0210 <[^>]*> lw a0,0\(at\)
+0+0214 <[^>]*> lw a1,4\(at\)
+0+0218 <[^>]*> lui at,0x0
[ ]*218: R_MIPS_GOT_HI16 small_external_common
-0+021c <[^>]*> addu \$at,\$at,\$gp
-0+0220 <[^>]*> lw \$at,0\(\$at\)
+0+021c <[^>]*> addu at,at,gp
+0+0220 <[^>]*> lw at,0\(at\)
[ ]*220: R_MIPS_GOT_LO16 small_external_common
0+0224 <[^>]*> nop
-0+0228 <[^>]*> addu \$at,\$a1,\$at
-0+022c <[^>]*> lw \$a0,0\(\$at\)
-0+0230 <[^>]*> lw \$a1,4\(\$at\)
-0+0234 <[^>]*> lw \$at,0\(\$gp\)
+0+0228 <[^>]*> addu at,a1,at
+0+022c <[^>]*> lw a0,0\(at\)
+0+0230 <[^>]*> lw a1,4\(at\)
+0+0234 <[^>]*> lw at,0\(gp\)
[ ]*234: R_MIPS_GOT16 .bss
0+0238 <[^>]*> nop
-0+023c <[^>]*> addu \$at,\$a1,\$at
-0+0240 <[^>]*> lw \$a0,0\(\$at\)
+0+023c <[^>]*> addu at,a1,at
+0+0240 <[^>]*> lw a0,0\(at\)
[ ]*240: R_MIPS_LO16 .bss
-0+0244 <[^>]*> lw \$a1,4\(\$at\)
+0+0244 <[^>]*> lw a1,4\(at\)
[ ]*244: R_MIPS_LO16 .bss
-0+0248 <[^>]*> lw \$at,0\(\$gp\)
+0+0248 <[^>]*> lw at,0\(gp\)
[ ]*248: R_MIPS_GOT16 .bss
0+024c <[^>]*> nop
-0+0250 <[^>]*> addu \$at,\$a1,\$at
-0+0254 <[^>]*> lw \$a0,1000\(\$at\)
+0+0250 <[^>]*> addu at,a1,at
+0+0254 <[^>]*> lw a0,1000\(at\)
[ ]*254: R_MIPS_LO16 .bss
-0+0258 <[^>]*> lw \$a1,1004\(\$at\)
+0+0258 <[^>]*> lw a1,1004\(at\)
[ ]*258: R_MIPS_LO16 .bss
-0+025c <[^>]*> lw \$at,0\(\$gp\)
+0+025c <[^>]*> lw at,0\(gp\)
[ ]*25c: R_MIPS_GOT16 .data
0+0260 <[^>]*> nop
-0+0264 <[^>]*> addu \$at,\$a1,\$at
-0+0268 <[^>]*> lw \$a0,1\(\$at\)
+0+0264 <[^>]*> addu at,a1,at
+0+0268 <[^>]*> lw a0,1\(at\)
[ ]*268: R_MIPS_LO16 .data
-0+026c <[^>]*> lw \$a1,5\(\$at\)
+0+026c <[^>]*> lw a1,5\(at\)
[ ]*26c: R_MIPS_LO16 .data
-0+0270 <[^>]*> lui \$at,0x0
+0+0270 <[^>]*> lui at,0x0
[ ]*270: R_MIPS_GOT_HI16 big_external_data_label
-0+0274 <[^>]*> addu \$at,\$at,\$gp
-0+0278 <[^>]*> lw \$at,0\(\$at\)
+0+0274 <[^>]*> addu at,at,gp
+0+0278 <[^>]*> lw at,0\(at\)
[ ]*278: R_MIPS_GOT_LO16 big_external_data_label
0+027c <[^>]*> nop
-0+0280 <[^>]*> addu \$at,\$a1,\$at
-0+0284 <[^>]*> lw \$a0,1\(\$at\)
-0+0288 <[^>]*> lw \$a1,5\(\$at\)
-0+028c <[^>]*> lui \$at,0x0
+0+0280 <[^>]*> addu at,a1,at
+0+0284 <[^>]*> lw a0,1\(at\)
+0+0288 <[^>]*> lw a1,5\(at\)
+0+028c <[^>]*> lui at,0x0
[ ]*28c: R_MIPS_GOT_HI16 small_external_data_label
-0+0290 <[^>]*> addu \$at,\$at,\$gp
-0+0294 <[^>]*> lw \$at,0\(\$at\)
+0+0290 <[^>]*> addu at,at,gp
+0+0294 <[^>]*> lw at,0\(at\)
[ ]*294: R_MIPS_GOT_LO16 small_external_data_label
0+0298 <[^>]*> nop
-0+029c <[^>]*> addu \$at,\$a1,\$at
-0+02a0 <[^>]*> lw \$a0,1\(\$at\)
-0+02a4 <[^>]*> lw \$a1,5\(\$at\)
-0+02a8 <[^>]*> lui \$at,0x0
+0+029c <[^>]*> addu at,a1,at
+0+02a0 <[^>]*> lw a0,1\(at\)
+0+02a4 <[^>]*> lw a1,5\(at\)
+0+02a8 <[^>]*> lui at,0x0
[ ]*2a8: R_MIPS_GOT_HI16 big_external_common
-0+02ac <[^>]*> addu \$at,\$at,\$gp
-0+02b0 <[^>]*> lw \$at,0\(\$at\)
+0+02ac <[^>]*> addu at,at,gp
+0+02b0 <[^>]*> lw at,0\(at\)
[ ]*2b0: R_MIPS_GOT_LO16 big_external_common
0+02b4 <[^>]*> nop
-0+02b8 <[^>]*> addu \$at,\$a1,\$at
-0+02bc <[^>]*> lw \$a0,1\(\$at\)
-0+02c0 <[^>]*> lw \$a1,5\(\$at\)
-0+02c4 <[^>]*> lui \$at,0x0
+0+02b8 <[^>]*> addu at,a1,at
+0+02bc <[^>]*> lw a0,1\(at\)
+0+02c0 <[^>]*> lw a1,5\(at\)
+0+02c4 <[^>]*> lui at,0x0
[ ]*2c4: R_MIPS_GOT_HI16 small_external_common
-0+02c8 <[^>]*> addu \$at,\$at,\$gp
-0+02cc <[^>]*> lw \$at,0\(\$at\)
+0+02c8 <[^>]*> addu at,at,gp
+0+02cc <[^>]*> lw at,0\(at\)
[ ]*2cc: R_MIPS_GOT_LO16 small_external_common
0+02d0 <[^>]*> nop
-0+02d4 <[^>]*> addu \$at,\$a1,\$at
-0+02d8 <[^>]*> lw \$a0,1\(\$at\)
-0+02dc <[^>]*> lw \$a1,5\(\$at\)
-0+02e0 <[^>]*> lw \$at,0\(\$gp\)
+0+02d4 <[^>]*> addu at,a1,at
+0+02d8 <[^>]*> lw a0,1\(at\)
+0+02dc <[^>]*> lw a1,5\(at\)
+0+02e0 <[^>]*> lw at,0\(gp\)
[ ]*2e0: R_MIPS_GOT16 .bss
0+02e4 <[^>]*> nop
-0+02e8 <[^>]*> addu \$at,\$a1,\$at
-0+02ec <[^>]*> lw \$a0,1\(\$at\)
+0+02e8 <[^>]*> addu at,a1,at
+0+02ec <[^>]*> lw a0,1\(at\)
[ ]*2ec: R_MIPS_LO16 .bss
-0+02f0 <[^>]*> lw \$a1,5\(\$at\)
+0+02f0 <[^>]*> lw a1,5\(at\)
[ ]*2f0: R_MIPS_LO16 .bss
-0+02f4 <[^>]*> lw \$at,0\(\$gp\)
+0+02f4 <[^>]*> lw at,0\(gp\)
[ ]*2f4: R_MIPS_GOT16 .bss
0+02f8 <[^>]*> nop
-0+02fc <[^>]*> addu \$at,\$a1,\$at
-0+0300 <[^>]*> lw \$a0,1001\(\$at\)
+0+02fc <[^>]*> addu at,a1,at
+0+0300 <[^>]*> lw a0,1001\(at\)
[ ]*300: R_MIPS_LO16 .bss
-0+0304 <[^>]*> lw \$a1,1005\(\$at\)
+0+0304 <[^>]*> lw a1,1005\(at\)
[ ]*304: R_MIPS_LO16 .bss
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld.d
index 5489cf16e3d..2a6acc2e8f2 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ld.d
@@ -7,633 +7,633 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lw \$a0,0\(\$zero\)
-0+0004 <[^>]*> lw \$a1,4\(\$zero\)
-0+0008 <[^>]*> lw \$a0,1\(\$zero\)
-0+000c <[^>]*> lw \$a1,5\(\$zero\)
-0+0010 <[^>]*> lui \$at,0x1
-0+0014 <[^>]*> lw \$a0,-32768\(\$at\)
-0+0018 <[^>]*> lw \$a1,-32764\(\$at\)
-0+001c <[^>]*> lw \$a0,-32768\(\$zero\)
-0+0020 <[^>]*> lw \$a1,-32764\(\$zero\)
-0+0024 <[^>]*> lui \$at,0x1
-0+0028 <[^>]*> lw \$a0,0\(\$at\)
-0+002c <[^>]*> lw \$a1,4\(\$at\)
-0+0030 <[^>]*> lui \$at,0x2
-0+0034 <[^>]*> lw \$a0,-23131\(\$at\)
-0+0038 <[^>]*> lw \$a1,-23127\(\$at\)
+0+0000 <[^>]*> lw a0,0\(zero\)
+0+0004 <[^>]*> lw a1,4\(zero\)
+0+0008 <[^>]*> lw a0,1\(zero\)
+0+000c <[^>]*> lw a1,5\(zero\)
+0+0010 <[^>]*> lui at,0x1
+0+0014 <[^>]*> lw a0,-32768\(at\)
+0+0018 <[^>]*> lw a1,-32764\(at\)
+0+001c <[^>]*> lw a0,-32768\(zero\)
+0+0020 <[^>]*> lw a1,-32764\(zero\)
+0+0024 <[^>]*> lui at,0x1
+0+0028 <[^>]*> lw a0,0\(at\)
+0+002c <[^>]*> lw a1,4\(at\)
+0+0030 <[^>]*> lui at,0x2
+0+0034 <[^>]*> lw a0,-23131\(at\)
+0+0038 <[^>]*> lw a1,-23127\(at\)
0+003c <[^>]*> nop
-0+0040 <[^>]*> lw \$a0,0\(\$a1\)
-0+0044 <[^>]*> lw \$a1,4\(\$a1\)
+0+0040 <[^>]*> lw a0,0\(a1\)
+0+0044 <[^>]*> lw a1,4\(a1\)
0+0048 <[^>]*> nop
-0+004c <[^>]*> lw \$a0,1\(\$a1\)
-0+0050 <[^>]*> lw \$a1,5\(\$a1\)
-0+0054 <[^>]*> lui \$at,0x1
-0+0058 <[^>]*> addu \$at,\$a1,\$at
-0+005c <[^>]*> lw \$a0,-32768\(\$at\)
-0+0060 <[^>]*> lw \$a1,-32764\(\$at\)
+0+004c <[^>]*> lw a0,1\(a1\)
+0+0050 <[^>]*> lw a1,5\(a1\)
+0+0054 <[^>]*> lui at,0x1
+0+0058 <[^>]*> addu at,a1,at
+0+005c <[^>]*> lw a0,-32768\(at\)
+0+0060 <[^>]*> lw a1,-32764\(at\)
0+0064 <[^>]*> nop
-0+0068 <[^>]*> lw \$a0,-32768\(\$a1\)
-0+006c <[^>]*> lw \$a1,-32764\(\$a1\)
-0+0070 <[^>]*> lui \$at,0x1
-0+0074 <[^>]*> addu \$at,\$a1,\$at
-0+0078 <[^>]*> lw \$a0,0\(\$at\)
-0+007c <[^>]*> lw \$a1,4\(\$at\)
-0+0080 <[^>]*> lui \$at,0x2
-0+0084 <[^>]*> addu \$at,\$a1,\$at
-0+0088 <[^>]*> lw \$a0,-23131\(\$at\)
-0+008c <[^>]*> lw \$a1,-23127\(\$at\)
-0+0090 <[^>]*> lui \$at,0x0
+0+0068 <[^>]*> lw a0,-32768\(a1\)
+0+006c <[^>]*> lw a1,-32764\(a1\)
+0+0070 <[^>]*> lui at,0x1
+0+0074 <[^>]*> addu at,a1,at
+0+0078 <[^>]*> lw a0,0\(at\)
+0+007c <[^>]*> lw a1,4\(at\)
+0+0080 <[^>]*> lui at,0x2
+0+0084 <[^>]*> addu at,a1,at
+0+0088 <[^>]*> lw a0,-23131\(at\)
+0+008c <[^>]*> lw a1,-23127\(at\)
+0+0090 <[^>]*> lui at,0x0
[ ]*90: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0094 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0094 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*94: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0098 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0098 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*98: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+009c <[^>]*> lui \$at,0x0
+0+009c <[^>]*> lui at,0x0
[ ]*9c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00a0 <[^>]*> lw \$a0,0\(\$at\)
+0+00a0 <[^>]*> lw a0,0\(at\)
[ ]*a0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00a4 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+00a4 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*a4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00a8 <[^>]*> lw \$a0,0\(\$gp\)
+0+00a8 <[^>]*> lw a0,0\(gp\)
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00ac <[^>]*> lw \$a1,[-0-9]+\(\$gp\)
+0+00ac <[^>]*> lw a1,[-0-9]+\(gp\)
[ ]*ac: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00b0 <[^>]*> lui \$at,0x0
+0+00b0 <[^>]*> lui at,0x0
[ ]*b0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00b4 <[^>]*> lw \$a0,0\(\$at\)
+0+00b4 <[^>]*> lw a0,0\(at\)
[ ]*b4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00b8 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+00b8 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*b8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00bc <[^>]*> lw \$a0,0\(\$gp\)
+0+00bc <[^>]*> lw a0,0\(gp\)
[ ]*bc: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00c0 <[^>]*> lw \$a1,[-0-9]+\(\$gp\)
+0+00c0 <[^>]*> lw a1,[-0-9]+\(gp\)
[ ]*c0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00c4 <[^>]*> lui \$at,0x0
+0+00c4 <[^>]*> lui at,0x0
[ ]*c4: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+00c8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+00c8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*c8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00cc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+00cc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*cc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00d0 <[^>]*> lw \$a0,[-0-9]+\(\$gp\)
+0+00d0 <[^>]*> lw a0,[-0-9]+\(gp\)
[ ]*d0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00d4 <[^>]*> lw \$a1,[-0-9]+\(\$gp\)
+0+00d4 <[^>]*> lw a1,[-0-9]+\(gp\)
[ ]*d4: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00d8 <[^>]*> lui \$at,0x0
+0+00d8 <[^>]*> lui at,0x0
[ ]*d8: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00dc <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+00dc <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*dc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00e0 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+00e0 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*e0: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00e4 <[^>]*> lui \$at,0x0
+0+00e4 <[^>]*> lui at,0x0
[ ]*e4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00e8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+00e8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*e8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00ec <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+00ec <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*ec: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00f0 <[^>]*> lw \$a0,1\(\$gp\)
+0+00f0 <[^>]*> lw a0,1\(gp\)
[ ]*f0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00f4 <[^>]*> lw \$a1,5\(\$gp\)
+0+00f4 <[^>]*> lw a1,5\(gp\)
[ ]*f4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00f8 <[^>]*> lui \$at,0x0
+0+00f8 <[^>]*> lui at,0x0
[ ]*f8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00fc <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+00fc <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*fc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0100 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0100 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*100: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0104 <[^>]*> lw \$a0,1\(\$gp\)
+0+0104 <[^>]*> lw a0,1\(gp\)
[ ]*104: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0108 <[^>]*> lw \$a1,5\(\$gp\)
+0+0108 <[^>]*> lw a1,5\(gp\)
[ ]*108: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+010c <[^>]*> lui \$at,0x0
+0+010c <[^>]*> lui at,0x0
[ ]*10c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0110 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0110 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*110: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0114 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0114 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*114: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0118 <[^>]*> lw \$a0,[-0-9]+\(\$gp\)
+0+0118 <[^>]*> lw a0,[-0-9]+\(gp\)
[ ]*118: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+011c <[^>]*> lw \$a1,[-0-9]+\(\$gp\)
+0+011c <[^>]*> lw a1,[-0-9]+\(gp\)
[ ]*11c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0120 <[^>]*> lui \$at,[-0-9x]+
+0+0120 <[^>]*> lui at,[-0-9x]+
[ ]*120: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0124 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0124 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*124: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0128 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0128 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*128: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+012c <[^>]*> lui \$at,[-0-9x]+
+0+012c <[^>]*> lui at,[-0-9x]+
[ ]*12c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0130 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0130 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*130: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0134 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0134 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*134: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0138 <[^>]*> lui \$at,[-0-9x]+
+0+0138 <[^>]*> lui at,[-0-9x]+
[ ]*138: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+013c <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+013c <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*13c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0140 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0140 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*140: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0144 <[^>]*> lui \$at,[-0-9x]+
+0+0144 <[^>]*> lui at,[-0-9x]+
[ ]*144: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0148 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0148 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*148: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+014c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+014c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*14c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0150 <[^>]*> lui \$at,[-0-9x]+
+0+0150 <[^>]*> lui at,[-0-9x]+
[ ]*150: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0154 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0154 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*154: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0158 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0158 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*158: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+015c <[^>]*> lui \$at,[-0-9x]+
+0+015c <[^>]*> lui at,[-0-9x]+
[ ]*15c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0160 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0160 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*160: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0164 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0164 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*164: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0168 <[^>]*> lui \$at,[-0-9x]+
+0+0168 <[^>]*> lui at,[-0-9x]+
[ ]*168: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+016c <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+016c <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*16c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0170 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0170 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*170: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0174 <[^>]*> lui \$at,0x0
+0+0174 <[^>]*> lui at,0x0
[ ]*174: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0178 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0178 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*178: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+017c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+017c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*17c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0180 <[^>]*> lui \$at,0x0
+0+0180 <[^>]*> lui at,0x0
[ ]*180: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0184 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0184 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*184: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0188 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0188 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*188: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+018c <[^>]*> lui \$at,0x0
+0+018c <[^>]*> lui at,0x0
[ ]*18c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0190 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0190 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*190: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0194 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0194 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*194: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0198 <[^>]*> lui \$at,0x0
+0+0198 <[^>]*> lui at,0x0
[ ]*198: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+019c <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+019c <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*19c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01a0 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+01a0 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*1a0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01a4 <[^>]*> lui \$at,0x0
+0+01a4 <[^>]*> lui at,0x0
[ ]*1a4: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+01a8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+01a8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*1a8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+01ac <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+01ac <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*1ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+01b0 <[^>]*> lui \$at,0x0
+0+01b0 <[^>]*> lui at,0x0
[ ]*1b0: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+01b4 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+01b4 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*1b4: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01b8 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+01b8 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*1b8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01bc <[^>]*> lui \$at,0x0
+0+01bc <[^>]*> lui at,0x0
[ ]*1bc: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+01c0 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+01c0 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*1c0: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+01c4 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+01c4 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*1c4: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+01c8 <[^>]*> lui \$at,[-0-9x]+
+0+01c8 <[^>]*> lui at,[-0-9x]+
[ ]*1c8: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+01cc <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+01cc <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*1cc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+01d0 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+01d0 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*1d0: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+01d4 <[^>]*> lui \$at,[-0-9x]+
+0+01d4 <[^>]*> lui at,[-0-9x]+
[ ]*1d4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+01d8 <[^>]*> lw \$a0,0\(\$at\)
+0+01d8 <[^>]*> lw a0,0\(at\)
[ ]*1d8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01dc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+01dc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*1dc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01e0 <[^>]*> lui \$at,[-0-9x]+
+0+01e0 <[^>]*> lui at,[-0-9x]+
[ ]*1e0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+01e4 <[^>]*> lw \$a0,0\(\$at\)
+0+01e4 <[^>]*> lw a0,0\(at\)
[ ]*1e4: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+01e8 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+01e8 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*1e8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+01ec <[^>]*> lui \$at,[-0-9x]+
+0+01ec <[^>]*> lui at,[-0-9x]+
[ ]*1ec: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01f0 <[^>]*> lw \$a0,0\(\$at\)
+0+01f0 <[^>]*> lw a0,0\(at\)
[ ]*1f0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01f4 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+01f4 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*1f4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01f8 <[^>]*> lui \$at,[-0-9x]+
+0+01f8 <[^>]*> lui at,[-0-9x]+
[ ]*1f8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+01fc <[^>]*> lw \$a0,0\(\$at\)
+0+01fc <[^>]*> lw a0,0\(at\)
[ ]*1fc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0200 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0200 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*200: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0204 <[^>]*> lui \$at,[-0-9x]+
+0+0204 <[^>]*> lui at,[-0-9x]+
[ ]*204: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0208 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0208 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*208: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+020c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+020c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*20c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0210 <[^>]*> lui \$at,[-0-9x]+
+0+0210 <[^>]*> lui at,[-0-9x]+
[ ]*210: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0214 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0214 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*214: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0218 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0218 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*218: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+021c <[^>]*> lui \$at,[-0-9x]+
+0+021c <[^>]*> lui at,[-0-9x]+
[ ]*21c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0220 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0220 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*220: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0224 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0224 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*224: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0228 <[^>]*> lui \$at,[-0-9x]+
+0+0228 <[^>]*> lui at,[-0-9x]+
[ ]*228: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+022c <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+022c <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*22c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0230 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0230 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*230: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0234 <[^>]*> lui \$at,[-0-9x]+
+0+0234 <[^>]*> lui at,[-0-9x]+
[ ]*234: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0238 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0238 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*238: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+023c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+023c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*23c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0240 <[^>]*> lui \$at,[-0-9x]+
+0+0240 <[^>]*> lui at,[-0-9x]+
[ ]*240: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0244 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0244 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*244: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0248 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0248 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*248: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+024c <[^>]*> lui \$at,[-0-9x]+
+0+024c <[^>]*> lui at,[-0-9x]+
[ ]*24c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0250 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0250 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*250: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0254 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0254 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*254: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0258 <[^>]*> lui \$at,[-0-9x]+
+0+0258 <[^>]*> lui at,[-0-9x]+
[ ]*258: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+025c <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+025c <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*25c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0260 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0260 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*260: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0264 <[^>]*> lui \$at,[-0-9x]+
+0+0264 <[^>]*> lui at,[-0-9x]+
[ ]*264: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0268 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0268 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*268: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+026c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+026c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*26c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0270 <[^>]*> lui \$at,0x0
+0+0270 <[^>]*> lui at,0x0
[ ]*270: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0274 <[^>]*> addu \$at,\$a1,\$at
-0+0278 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0274 <[^>]*> addu at,a1,at
+0+0278 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*278: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+027c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+027c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*27c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0280 <[^>]*> lui \$at,0x0
+0+0280 <[^>]*> lui at,0x0
[ ]*280: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0284 <[^>]*> addu \$at,\$a1,\$at
-0+0288 <[^>]*> lw \$a0,0\(\$at\)
+0+0284 <[^>]*> addu at,a1,at
+0+0288 <[^>]*> lw a0,0\(at\)
[ ]*288: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+028c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+028c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*28c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
0+0290 <[^>]*> nop
-0+0294 <[^>]*> addu \$at,\$a1,\$gp
-0+0298 <[^>]*> lw \$a0,0\(\$at\)
+0+0294 <[^>]*> addu at,a1,gp
+0+0298 <[^>]*> lw a0,0\(at\)
[ ]*298: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+029c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+029c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*29c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+02a0 <[^>]*> lui \$at,0x0
+0+02a0 <[^>]*> lui at,0x0
[ ]*2a0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+02a4 <[^>]*> addu \$at,\$a1,\$at
-0+02a8 <[^>]*> lw \$a0,0\(\$at\)
+0+02a4 <[^>]*> addu at,a1,at
+0+02a8 <[^>]*> lw a0,0\(at\)
[ ]*2a8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02ac <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+02ac <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*2ac: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
0+02b0 <[^>]*> nop
-0+02b4 <[^>]*> addu \$at,\$a1,\$gp
-0+02b8 <[^>]*> lw \$a0,0\(\$at\)
+0+02b4 <[^>]*> addu at,a1,gp
+0+02b8 <[^>]*> lw a0,0\(at\)
[ ]*2b8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+02bc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+02bc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*2bc: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+02c0 <[^>]*> lui \$at,0x0
+0+02c0 <[^>]*> lui at,0x0
[ ]*2c0: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02c4 <[^>]*> addu \$at,\$a1,\$at
-0+02c8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+02c4 <[^>]*> addu at,a1,at
+0+02c8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*2c8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02cc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+02cc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*2cc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
0+02d0 <[^>]*> nop
-0+02d4 <[^>]*> addu \$at,\$a1,\$gp
-0+02d8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+02d4 <[^>]*> addu at,a1,gp
+0+02d8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*2d8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+02dc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+02dc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*2dc: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+02e0 <[^>]*> lui \$at,0x0
+0+02e0 <[^>]*> lui at,0x0
[ ]*2e0: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+02e4 <[^>]*> addu \$at,\$a1,\$at
-0+02e8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+02e4 <[^>]*> addu at,a1,at
+0+02e8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*2e8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+02ec <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+02ec <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*2ec: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+02f0 <[^>]*> lui \$at,0x0
+0+02f0 <[^>]*> lui at,0x0
[ ]*2f0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+02f4 <[^>]*> addu \$at,\$a1,\$at
-0+02f8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+02f4 <[^>]*> addu at,a1,at
+0+02f8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*2f8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+02fc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+02fc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*2fc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
0+0300 <[^>]*> nop
-0+0304 <[^>]*> addu \$at,\$a1,\$gp
-0+0308 <[^>]*> lw \$a0,1\(\$at\)
+0+0304 <[^>]*> addu at,a1,gp
+0+0308 <[^>]*> lw a0,1\(at\)
[ ]*308: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+030c <[^>]*> lw \$a1,5\(\$at\)
+0+030c <[^>]*> lw a1,5\(at\)
[ ]*30c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0310 <[^>]*> lui \$at,0x0
+0+0310 <[^>]*> lui at,0x0
[ ]*310: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0314 <[^>]*> addu \$at,\$a1,\$at
-0+0318 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0314 <[^>]*> addu at,a1,at
+0+0318 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*318: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+031c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+031c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*31c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
0+0320 <[^>]*> nop
-0+0324 <[^>]*> addu \$at,\$a1,\$gp
-0+0328 <[^>]*> lw \$a0,1\(\$at\)
+0+0324 <[^>]*> addu at,a1,gp
+0+0328 <[^>]*> lw a0,1\(at\)
[ ]*328: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+032c <[^>]*> lw \$a1,5\(\$at\)
+0+032c <[^>]*> lw a1,5\(at\)
[ ]*32c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0330 <[^>]*> lui \$at,0x0
+0+0330 <[^>]*> lui at,0x0
[ ]*330: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0334 <[^>]*> addu \$at,\$a1,\$at
-0+0338 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0334 <[^>]*> addu at,a1,at
+0+0338 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*338: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+033c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+033c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*33c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
0+0340 <[^>]*> nop
-0+0344 <[^>]*> addu \$at,\$a1,\$gp
-0+0348 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0344 <[^>]*> addu at,a1,gp
+0+0348 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*348: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+034c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+034c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*34c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0350 <[^>]*> lui \$at,[-0-9x]+
+0+0350 <[^>]*> lui at,[-0-9x]+
[ ]*350: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0354 <[^>]*> addu \$at,\$a1,\$at
-0+0358 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0354 <[^>]*> addu at,a1,at
+0+0358 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*358: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+035c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+035c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*35c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0360 <[^>]*> lui \$at,[-0-9x]+
+0+0360 <[^>]*> lui at,[-0-9x]+
[ ]*360: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0364 <[^>]*> addu \$at,\$a1,\$at
-0+0368 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0364 <[^>]*> addu at,a1,at
+0+0368 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*368: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+036c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+036c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*36c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0370 <[^>]*> lui \$at,[-0-9x]+
+0+0370 <[^>]*> lui at,[-0-9x]+
[ ]*370: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0374 <[^>]*> addu \$at,\$a1,\$at
-0+0378 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0374 <[^>]*> addu at,a1,at
+0+0378 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*378: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+037c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+037c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*37c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0380 <[^>]*> lui \$at,[-0-9x]+
+0+0380 <[^>]*> lui at,[-0-9x]+
[ ]*380: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0384 <[^>]*> addu \$at,\$a1,\$at
-0+0388 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0384 <[^>]*> addu at,a1,at
+0+0388 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*388: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+038c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+038c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*38c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0390 <[^>]*> lui \$at,[-0-9x]+
+0+0390 <[^>]*> lui at,[-0-9x]+
[ ]*390: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0394 <[^>]*> addu \$at,\$a1,\$at
-0+0398 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0394 <[^>]*> addu at,a1,at
+0+0398 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*398: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+039c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+039c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*39c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+03a0 <[^>]*> lui \$at,[-0-9x]+
+0+03a0 <[^>]*> lui at,[-0-9x]+
[ ]*3a0: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+03a4 <[^>]*> addu \$at,\$a1,\$at
-0+03a8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+03a4 <[^>]*> addu at,a1,at
+0+03a8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*3a8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+03ac <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+03ac <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*3ac: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+03b0 <[^>]*> lui \$at,[-0-9x]+
+0+03b0 <[^>]*> lui at,[-0-9x]+
[ ]*3b0: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+03b4 <[^>]*> addu \$at,\$a1,\$at
-0+03b8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+03b4 <[^>]*> addu at,a1,at
+0+03b8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*3b8: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+03bc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+03bc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*3bc: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+03c0 <[^>]*> lui \$at,0x0
+0+03c0 <[^>]*> lui at,0x0
[ ]*3c0: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+03c4 <[^>]*> addu \$at,\$a1,\$at
-0+03c8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+03c4 <[^>]*> addu at,a1,at
+0+03c8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*3c8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+03cc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+03cc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*3cc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+03d0 <[^>]*> lui \$at,0x0
+0+03d0 <[^>]*> lui at,0x0
[ ]*3d0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+03d4 <[^>]*> addu \$at,\$a1,\$at
-0+03d8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+03d4 <[^>]*> addu at,a1,at
+0+03d8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*3d8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+03dc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+03dc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*3dc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+03e0 <[^>]*> lui \$at,0x0
+0+03e0 <[^>]*> lui at,0x0
[ ]*3e0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+03e4 <[^>]*> addu \$at,\$a1,\$at
-0+03e8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+03e4 <[^>]*> addu at,a1,at
+0+03e8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*3e8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+03ec <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+03ec <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*3ec: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+03f0 <[^>]*> lui \$at,0x0
+0+03f0 <[^>]*> lui at,0x0
[ ]*3f0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+03f4 <[^>]*> addu \$at,\$a1,\$at
-0+03f8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+03f4 <[^>]*> addu at,a1,at
+0+03f8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*3f8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+03fc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+03fc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*3fc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0400 <[^>]*> lui \$at,0x0
+0+0400 <[^>]*> lui at,0x0
[ ]*400: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0404 <[^>]*> addu \$at,\$a1,\$at
-0+0408 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0404 <[^>]*> addu at,a1,at
+0+0408 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*408: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+040c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+040c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*40c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0410 <[^>]*> lui \$at,0x0
+0+0410 <[^>]*> lui at,0x0
[ ]*410: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0414 <[^>]*> addu \$at,\$a1,\$at
-0+0418 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0414 <[^>]*> addu at,a1,at
+0+0418 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*418: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+041c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+041c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*41c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0420 <[^>]*> lui \$at,0x0
+0+0420 <[^>]*> lui at,0x0
[ ]*420: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0424 <[^>]*> addu \$at,\$a1,\$at
-0+0428 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0424 <[^>]*> addu at,a1,at
+0+0428 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*428: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+042c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+042c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*42c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0430 <[^>]*> lui \$at,[-0-9x]+
+0+0430 <[^>]*> lui at,[-0-9x]+
[ ]*430: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0434 <[^>]*> addu \$at,\$a1,\$at
-0+0438 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0434 <[^>]*> addu at,a1,at
+0+0438 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*438: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+043c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+043c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*43c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0440 <[^>]*> lui \$at,[-0-9x]+
+0+0440 <[^>]*> lui at,[-0-9x]+
[ ]*440: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0444 <[^>]*> addu \$at,\$a1,\$at
-0+0448 <[^>]*> lw \$a0,0\(\$at\)
+0+0444 <[^>]*> addu at,a1,at
+0+0448 <[^>]*> lw a0,0\(at\)
[ ]*448: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+044c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+044c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*44c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0450 <[^>]*> lui \$at,[-0-9x]+
+0+0450 <[^>]*> lui at,[-0-9x]+
[ ]*450: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0454 <[^>]*> addu \$at,\$a1,\$at
-0+0458 <[^>]*> lw \$a0,0\(\$at\)
+0+0454 <[^>]*> addu at,a1,at
+0+0458 <[^>]*> lw a0,0\(at\)
[ ]*458: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+045c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+045c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*45c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0460 <[^>]*> lui \$at,[-0-9x]+
+0+0460 <[^>]*> lui at,[-0-9x]+
[ ]*460: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0464 <[^>]*> addu \$at,\$a1,\$at
-0+0468 <[^>]*> lw \$a0,0\(\$at\)
+0+0464 <[^>]*> addu at,a1,at
+0+0468 <[^>]*> lw a0,0\(at\)
[ ]*468: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+046c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+046c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*46c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0470 <[^>]*> lui \$at,[-0-9x]+
+0+0470 <[^>]*> lui at,[-0-9x]+
[ ]*470: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0474 <[^>]*> addu \$at,\$a1,\$at
-0+0478 <[^>]*> lw \$a0,0\(\$at\)
+0+0474 <[^>]*> addu at,a1,at
+0+0478 <[^>]*> lw a0,0\(at\)
[ ]*478: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+047c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+047c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*47c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0480 <[^>]*> lui \$at,[-0-9x]+
+0+0480 <[^>]*> lui at,[-0-9x]+
[ ]*480: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0484 <[^>]*> addu \$at,\$a1,\$at
-0+0488 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0484 <[^>]*> addu at,a1,at
+0+0488 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*488: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+048c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+048c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*48c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0490 <[^>]*> lui \$at,[-0-9x]+
+0+0490 <[^>]*> lui at,[-0-9x]+
[ ]*490: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0494 <[^>]*> addu \$at,\$a1,\$at
-0+0498 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0494 <[^>]*> addu at,a1,at
+0+0498 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*498: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+049c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+049c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*49c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+04a0 <[^>]*> lui \$at,[-0-9x]+
+0+04a0 <[^>]*> lui at,[-0-9x]+
[ ]*4a0: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+04a4 <[^>]*> addu \$at,\$a1,\$at
-0+04a8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+04a4 <[^>]*> addu at,a1,at
+0+04a8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*4a8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+04ac <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+04ac <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*4ac: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+04b0 <[^>]*> lui \$at,[-0-9x]+
+0+04b0 <[^>]*> lui at,[-0-9x]+
[ ]*4b0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+04b4 <[^>]*> addu \$at,\$a1,\$at
-0+04b8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+04b4 <[^>]*> addu at,a1,at
+0+04b8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*4b8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+04bc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+04bc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*4bc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+04c0 <[^>]*> lui \$at,[-0-9x]+
+0+04c0 <[^>]*> lui at,[-0-9x]+
[ ]*4c0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+04c4 <[^>]*> addu \$at,\$a1,\$at
-0+04c8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+04c4 <[^>]*> addu at,a1,at
+0+04c8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*4c8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+04cc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+04cc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*4cc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+04d0 <[^>]*> lui \$at,[-0-9x]+
+0+04d0 <[^>]*> lui at,[-0-9x]+
[ ]*4d0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+04d4 <[^>]*> addu \$at,\$a1,\$at
-0+04d8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+04d4 <[^>]*> addu at,a1,at
+0+04d8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*4d8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+04dc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+04dc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*4dc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+04e0 <[^>]*> lui \$at,[-0-9x]+
+0+04e0 <[^>]*> lui at,[-0-9x]+
[ ]*4e0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+04e4 <[^>]*> addu \$at,\$a1,\$at
-0+04e8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+04e4 <[^>]*> addu at,a1,at
+0+04e8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*4e8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+04ec <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+04ec <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*4ec: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+04f0 <[^>]*> lui \$at,[-0-9x]+
+0+04f0 <[^>]*> lui at,[-0-9x]+
[ ]*4f0: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+04f4 <[^>]*> addu \$at,\$a1,\$at
-0+04f8 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+04f4 <[^>]*> addu at,a1,at
+0+04f8 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*4f8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+04fc <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+04fc <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*4fc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0500 <[^>]*> lui \$at,[-0-9x]+
+0+0500 <[^>]*> lui at,[-0-9x]+
[ ]*500: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0504 <[^>]*> addu \$at,\$a1,\$at
-0+0508 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0504 <[^>]*> addu at,a1,at
+0+0508 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*508: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+050c <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+050c <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*50c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0510 <[^>]*> lwc1 \$f[45],0\(\$zero\)
-0+0514 <[^>]*> lwc1 \$f[45],4\(\$zero\)
-0+0518 <[^>]*> lwc1 \$f[45],1\(\$zero\)
-0+051c <[^>]*> lwc1 \$f[45],5\(\$zero\)
-0+0520 <[^>]*> lui \$at,0x1
-0+0524 <[^>]*> lwc1 \$f[45],-32768\(\$at\)
-0+0528 <[^>]*> lwc1 \$f[45],-32764\(\$at\)
-0+052c <[^>]*> lwc1 \$f[45],-32768\(\$zero\)
-0+0530 <[^>]*> lwc1 \$f[45],-32764\(\$zero\)
-0+0534 <[^>]*> lwc1 \$f[45],0\(\$a1\)
-0+0538 <[^>]*> lwc1 \$f[45],4\(\$a1\)
-0+053c <[^>]*> lwc1 \$f[45],1\(\$a1\)
-0+0540 <[^>]*> lwc1 \$f[45],5\(\$a1\)
-0+0544 <[^>]*> lui \$at,0x1
-0+0548 <[^>]*> addu \$at,\$a1,\$at
-0+054c <[^>]*> lwc1 \$f[45],-32768\(\$at\)
-0+0550 <[^>]*> lwc1 \$f[45],-32764\(\$at\)
-0+0554 <[^>]*> lwc1 \$f[45],-32768\(\$a1\)
-0+0558 <[^>]*> lwc1 \$f[45],-32764\(\$a1\)
-0+055c <[^>]*> lui \$at,[-0-9x]+
+0+0510 <[^>]*> lwc1 \$f[45],0\(zero\)
+0+0514 <[^>]*> lwc1 \$f[45],4\(zero\)
+0+0518 <[^>]*> lwc1 \$f[45],1\(zero\)
+0+051c <[^>]*> lwc1 \$f[45],5\(zero\)
+0+0520 <[^>]*> lui at,0x1
+0+0524 <[^>]*> lwc1 \$f[45],-32768\(at\)
+0+0528 <[^>]*> lwc1 \$f[45],-32764\(at\)
+0+052c <[^>]*> lwc1 \$f[45],-32768\(zero\)
+0+0530 <[^>]*> lwc1 \$f[45],-32764\(zero\)
+0+0534 <[^>]*> lwc1 \$f[45],0\(a1\)
+0+0538 <[^>]*> lwc1 \$f[45],4\(a1\)
+0+053c <[^>]*> lwc1 \$f[45],1\(a1\)
+0+0540 <[^>]*> lwc1 \$f[45],5\(a1\)
+0+0544 <[^>]*> lui at,0x1
+0+0548 <[^>]*> addu at,a1,at
+0+054c <[^>]*> lwc1 \$f[45],-32768\(at\)
+0+0550 <[^>]*> lwc1 \$f[45],-32764\(at\)
+0+0554 <[^>]*> lwc1 \$f[45],-32768\(a1\)
+0+0558 <[^>]*> lwc1 \$f[45],-32764\(a1\)
+0+055c <[^>]*> lui at,[-0-9x]+
[ ]*55c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0560 <[^>]*> addu \$at,\$a1,\$at
-0+0564 <[^>]*> lwc1 \$f[45],[-0-9]+\(\$at\)
+0+0560 <[^>]*> addu at,a1,at
+0+0564 <[^>]*> lwc1 \$f[45],[-0-9]+\(at\)
[ ]*564: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0568 <[^>]*> lwc1 \$f[45],[-0-9]+\(\$at\)
+0+0568 <[^>]*> lwc1 \$f[45],[-0-9]+\(at\)
[ ]*568: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
0+056c <[^>]*> nop
-0+0570 <[^>]*> swc1 \$f[45],0\(\$zero\)
-0+0574 <[^>]*> swc1 \$f[45],4\(\$zero\)
-0+0578 <[^>]*> swc1 \$f[45],1\(\$zero\)
-0+057c <[^>]*> swc1 \$f[45],5\(\$zero\)
-0+0580 <[^>]*> lui \$at,0x1
-0+0584 <[^>]*> swc1 \$f[45],-32768\(\$at\)
-0+0588 <[^>]*> swc1 \$f[45],-32764\(\$at\)
-0+058c <[^>]*> swc1 \$f[45],-32768\(\$zero\)
-0+0590 <[^>]*> swc1 \$f[45],-32764\(\$zero\)
-0+0594 <[^>]*> swc1 \$f[45],0\(\$a1\)
-0+0598 <[^>]*> swc1 \$f[45],4\(\$a1\)
-0+059c <[^>]*> swc1 \$f[45],1\(\$a1\)
-0+05a0 <[^>]*> swc1 \$f[45],5\(\$a1\)
-0+05a4 <[^>]*> lui \$at,0x1
-0+05a8 <[^>]*> addu \$at,\$a1,\$at
-0+05ac <[^>]*> swc1 \$f[45],-32768\(\$at\)
-0+05b0 <[^>]*> swc1 \$f[45],-32764\(\$at\)
-0+05b4 <[^>]*> swc1 \$f[45],-32768\(\$a1\)
-0+05b8 <[^>]*> swc1 \$f[45],-32764\(\$a1\)
-0+05bc <[^>]*> lui \$at,[-0-9x]+
+0+0570 <[^>]*> swc1 \$f[45],0\(zero\)
+0+0574 <[^>]*> swc1 \$f[45],4\(zero\)
+0+0578 <[^>]*> swc1 \$f[45],1\(zero\)
+0+057c <[^>]*> swc1 \$f[45],5\(zero\)
+0+0580 <[^>]*> lui at,0x1
+0+0584 <[^>]*> swc1 \$f[45],-32768\(at\)
+0+0588 <[^>]*> swc1 \$f[45],-32764\(at\)
+0+058c <[^>]*> swc1 \$f[45],-32768\(zero\)
+0+0590 <[^>]*> swc1 \$f[45],-32764\(zero\)
+0+0594 <[^>]*> swc1 \$f[45],0\(a1\)
+0+0598 <[^>]*> swc1 \$f[45],4\(a1\)
+0+059c <[^>]*> swc1 \$f[45],1\(a1\)
+0+05a0 <[^>]*> swc1 \$f[45],5\(a1\)
+0+05a4 <[^>]*> lui at,0x1
+0+05a8 <[^>]*> addu at,a1,at
+0+05ac <[^>]*> swc1 \$f[45],-32768\(at\)
+0+05b0 <[^>]*> swc1 \$f[45],-32764\(at\)
+0+05b4 <[^>]*> swc1 \$f[45],-32768\(a1\)
+0+05b8 <[^>]*> swc1 \$f[45],-32764\(a1\)
+0+05bc <[^>]*> lui at,[-0-9x]+
[ ]*5bc: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+05c0 <[^>]*> addu \$at,\$a1,\$at
-0+05c4 <[^>]*> swc1 \$f[45],[-0-9]+\(\$at\)
+0+05c0 <[^>]*> addu at,a1,at
+0+05c4 <[^>]*> swc1 \$f[45],[-0-9]+\(at\)
[ ]*5c4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+05c8 <[^>]*> swc1 \$f[45],[-0-9]+\(\$at\)
+0+05c8 <[^>]*> swc1 \$f[45],[-0-9]+\(at\)
[ ]*5c8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+05cc <[^>]*> sw \$a0,0\(\$zero\)
-0+05d0 <[^>]*> sw \$a1,4\(\$zero\)
-0+05d4 <[^>]*> lui \$a0,[-0-9x]+
+0+05cc <[^>]*> sw a0,0\(zero\)
+0+05d0 <[^>]*> sw a1,4\(zero\)
+0+05d4 <[^>]*> lui a0,[-0-9x]+
[ ]*5d4: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+05d8 <[^>]*> daddu \$a0,\$a0,\$a1
-0+05dc <[^>]*> ld \$a0,[-0-9]+\(\$a0\)
+0+05d8 <[^>]*> daddu a0,a0,a1
+0+05dc <[^>]*> ld a0,[-0-9]+\(a0\)
[ ]*5dc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+05e0 <[^>]*> lui \$at,[-0-9x]+
+0+05e0 <[^>]*> lui at,[-0-9x]+
[ ]*5e0: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+05e4 <[^>]*> daddu \$at,\$at,\$a1
-0+05e8 <[^>]*> sd \$a0,[-0-9]+\(\$at\)
+0+05e4 <[^>]*> daddu at,at,a1
+0+05e8 <[^>]*> sd a0,[-0-9]+\(at\)
[ ]*5e8: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
0+05ec <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/li.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/li.d
index 0fe2b21ea13..7c3dfc3121d 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/li.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/li.d
@@ -6,11 +6,11 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> li \$a0,0
-0+0004 <[^>]*> li \$a0,1
-0+0008 <[^>]*> li \$a0,0x8000
-0+000c <[^>]*> li \$a0,-32768
-0+0010 <[^>]*> lui \$a0,0x1
-0+0014 <[^>]*> lui \$a0,0x1
-0+0018 <[^>]*> ori \$a0,\$a0,0xa5a5
+0+0000 <[^>]*> li a0,0
+0+0004 <[^>]*> li a0,1
+0+0008 <[^>]*> li a0,0x8000
+0+000c <[^>]*> li a0,-32768
+0+0010 <[^>]*> lui a0,0x1
+0+0014 <[^>]*> lui a0,0x1
+0+0018 <[^>]*> ori a0,a0,0xa5a5
0+001c <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-empic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-empic.d
index b80dca37787..d6120854eba 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-empic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-empic.d
@@ -8,17 +8,17 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> addiu \$at,\$gp,-16384
+0+0000 <[^>]*> addiu at,gp,-16384
[ ]*0: [A-Z0-9_]*GPREL[A-Z0-9_]* .rdata.*
-0+0004 <[^>]*> lw \$a0,0\(\$at\)
-0+0008 <[^>]*> lw \$a1,4\(\$at\)
-0+000c <[^>]*> lwc1 \$f[45],-16368\(\$gp\)
+0+0004 <[^>]*> lw a0,0\(at\)
+0+0008 <[^>]*> lw a1,4\(at\)
+0+000c <[^>]*> lwc1 f[45],-16368\(gp\)
[ ]*c: [A-Z0-9_]*LITERAL[A-Z0-9_]* .lit8.*
-0+0010 <[^>]*> lwc1 \$f[45],-16364\(\$gp\)
+0+0010 <[^>]*> lwc1 f[45],-16364\(gp\)
[ ]*10: [A-Z0-9_]*LITERAL[A-Z0-9_]* .lit8.*
-0+0014 <[^>]*> lui \$a0,0x3f8f
-0+0018 <[^>]*> ori \$a0,\$a0,0xcd36
-0+001c <[^>]*> lui \$at,0x3f8f
-0+0020 <[^>]*> ori \$at,\$at,0xcd36
-0+0024 <[^>]*> mtc1 \$at,\$f4
+0+0014 <[^>]*> lui a0,0x3f8f
+0+0018 <[^>]*> ori a0,a0,0xcd36
+0+001c <[^>]*> lui at,0x3f8f
+0+0020 <[^>]*> ori at,at,0xcd36
+0+0024 <[^>]*> mtc1 at,f4
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-svr4pic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-svr4pic.d
index db09a7fd54c..048bbd6944d 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-svr4pic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-svr4pic.d
@@ -8,23 +8,23 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lw \$at,0\(\$gp\)
+0+0000 <[^>]*> lw at,0\(gp\)
[ ]*0: R_MIPS_GOT16 .rodata
0+0004 <[^>]*> nop
-0+0008 <[^>]*> lw \$a0,0\(\$at\)
+0+0008 <[^>]*> lw a0,0\(at\)
[ ]*8: R_MIPS_LO16 .rodata
-0+000c <[^>]*> lw \$a1,4\(\$at\)
+0+000c <[^>]*> lw a1,4\(at\)
[ ]*c: R_MIPS_LO16 .rodata
-0+0010 <[^>]*> lw \$at,0\(\$gp\)
+0+0010 <[^>]*> lw at,0\(gp\)
[ ]*10: R_MIPS_GOT16 .rodata
0+0014 <[^>]*> nop
-0+0018 <[^>]*> lwc1 \$f5,8\(\$at\)
+0+0018 <[^>]*> lwc1 \$f5,8\(at\)
[ ]*18: R_MIPS_LO16 .rodata
-0+001c <[^>]*> lwc1 \$f4,12\(\$at\)
+0+001c <[^>]*> lwc1 \$f4,12\(at\)
[ ]*1c: R_MIPS_LO16 .rodata
-0+0020 <[^>]*> lui \$a0,0x3f8f
-0+0024 <[^>]*> ori \$a0,\$a0,0xcd36
-0+0028 <[^>]*> lui \$at,0x3f8f
-0+002c <[^>]*> ori \$at,\$at,0xcd36
-0+0030 <[^>]*> mtc1 \$at,\$f4
+0+0020 <[^>]*> lui a0,0x3f8f
+0+0024 <[^>]*> ori a0,a0,0xcd36
+0+0028 <[^>]*> lui at,0x3f8f
+0+002c <[^>]*> ori at,at,0xcd36
+0+0030 <[^>]*> mtc1 at,\$f4
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-xgot.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-xgot.d
index 7b86e2b2a34..f4d747743b2 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-xgot.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lif-xgot.d
@@ -8,23 +8,23 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lw \$at,0\(\$gp\)
+0+0000 <[^>]*> lw at,0\(gp\)
[ ]*0: R_MIPS_GOT16 .rodata
0+0004 <[^>]*> nop
-0+0008 <[^>]*> lw \$a0,0\(\$at\)
+0+0008 <[^>]*> lw a0,0\(at\)
[ ]*8: R_MIPS_LO16 .rodata
-0+000c <[^>]*> lw \$a1,4\(\$at\)
+0+000c <[^>]*> lw a1,4\(at\)
[ ]*c: R_MIPS_LO16 .rodata
-0+0010 <[^>]*> lw \$at,0\(\$gp\)
+0+0010 <[^>]*> lw at,0\(gp\)
[ ]*10: R_MIPS_GOT16 .rodata
0+0014 <[^>]*> nop
-0+0018 <[^>]*> lwc1 \$f5,8\(\$at\)
+0+0018 <[^>]*> lwc1 \$f5,8\(at\)
[ ]*18: R_MIPS_LO16 .rodata
-0+001c <[^>]*> lwc1 \$f4,12\(\$at\)
+0+001c <[^>]*> lwc1 \$f4,12\(at\)
[ ]*1c: R_MIPS_LO16 .rodata
-0+0020 <[^>]*> lui \$a0,0x3f8f
-0+0024 <[^>]*> ori \$a0,\$a0,0xcd36
-0+0028 <[^>]*> lui \$at,0x3f8f
-0+002c <[^>]*> ori \$at,\$at,0xcd36
-0+0030 <[^>]*> mtc1 \$at,\$f4
+0+0020 <[^>]*> lui a0,0x3f8f
+0+0024 <[^>]*> ori a0,a0,0xcd36
+0+0028 <[^>]*> lui at,0x3f8f
+0+002c <[^>]*> ori at,at,0xcd36
+0+0030 <[^>]*> mtc1 at,\$f4
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lifloat.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lifloat.d
index e71b5548d47..31cda97b2ba 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lifloat.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/lifloat.d
@@ -7,17 +7,17 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lui \$at,0x0
+0+0000 <[^>]*> lui at,0x0
[ ]*0: [A-Z0-9_]*HI[A-Z0-9_]* .ro?data.*
-0+0004 <[^>]*> lw \$a0,[-0-9]+\(\$at\)
+0+0004 <[^>]*> lw a0,[-0-9]+\(at\)
[ ]*4: [A-Z0-9_]*LO[A-Z0-9_]* .ro?data.*
-0+0008 <[^>]*> lw \$a1,[-0-9]+\(\$at\)
+0+0008 <[^>]*> lw a1,[-0-9]+\(at\)
[ ]*8: [A-Z0-9_]*LO[A-Z0-9_]* .ro?data.*
-0+000c <[^>]*> lwc1 \$f[45],[-0-9]+\(\$gp\)
+0+000c <[^>]*> lwc1 \$f[45],[-0-9]+\(gp\)
[ ]*c: [A-Z0-9_]*LITERAL[A-Z0-9_]* .lit8.*
-0+0010 <[^>]*> lwc1 \$f[45],[-0-9]+\(\$gp\)
+0+0010 <[^>]*> lwc1 \$f[45],[-0-9]+\(gp\)
[ ]*10: [A-Z0-9_]*LITERAL[A-Z0-9_]* .lit8.*
-0+0014 <[^>]*> lui \$a0,0x3f8f
-0+0018 <[^>]*> ori \$a0,\$a0,0xcd36
-0+001c <[^>]*> lwc1 \$f4,[-0-9]+\(\$gp\)
+0+0014 <[^>]*> lui a0,0x3f8f
+0+0018 <[^>]*> ori a0,a0,0xcd36
+0+001c <[^>]*> lwc1 \$f4,[-0-9]+\(gp\)
[ ]*1c: [A-Z0-9_]*LITERAL[A-Z0-9_]* .lit4.*
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips.exp
index 6ed1c021fe9..aedaf90e053 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips.exp
@@ -1,18 +1,20 @@
#
# Some generic MIPS tests
#
-if [istarget mips*-*-*] then {
+if { [istarget mips*-*-*] } then {
set no_mips16 0
- set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] ]
+ set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] ]
set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
- set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*]]
+ set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*] ]
set ilocks [istarget mipstx39*-*-*]
set gpr_ilocks [expr [istarget mipstx39*-*-*]]
set addr32 [expr [istarget mipstx39*-*-*]]
-
-
-
+ if { [istarget mips*el-*-*] || [istarget "mips*-*-*linux*"] } then {
+ set tmips "t"
+ } else {
+ set tmips ""
+ }
run_dump_test "abs"
run_dump_test "add"
@@ -86,32 +88,69 @@ if [istarget mips*-*-*] then {
run_dump_test "mips4010"
run_dump_test "mips4650"
run_dump_test "mips4100"
+ # Linux uses ELF stabs, which doesn't support line number.
+ setup_xfail "mips*-*-*linux*"
run_dump_test "lineno"
run_dump_test "sync"
+ run_dump_test "mips32"
+ run_dump_test "mips64"
- # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
- # containing 4650-specific instructions with -m4650 and -mcpu=4650,
- # and verify that they're the same. Specifically, we're checking
- # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
- # instruction does get used. In previous versions of GAS,
- # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
- run_dump_test "elf_e_flags1"
- run_dump_test "elf_e_flags2"
- run_dump_test "elf_e_flags3"
- run_dump_test "elf_e_flags4"
-
if $svr4pic {
- run_dump_test "elf-rel"
+ # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
+ # containing 4650-specific instructions with -m4650 and -mcpu=4650,
+ # and verify that they're the same. Specifically, we're checking
+ # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
+ # instruction does get used. In previous versions of GAS,
+ # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
+ run_dump_test "elf_e_flags1"
+ run_dump_test "elf_e_flags2"
+ run_dump_test "elf_e_flags3"
+ run_dump_test "elf_e_flags4"
+
+ if [istarget mips*el-*-*] {
+ run_dump_test "elfel-rel"
+ } {
+ run_dump_test "elf-rel"
+ }
+
if [istarget mips64*-*-*] {
- run_dump_test "elf-rel2"
+ if [istarget mips*el-*-*] {
+ run_dump_test "elfel-rel2"
+ } {
+ run_dump_test "elf-rel2"
+ }
} {
- run_dump_test "e32-rel2"
- }
- run_dump_test "empic"
+ if [istarget mips*el-*-*] {
+ run_dump_test "e32el-rel2"
+ } {
+ run_dump_test "e32-rel2"
+ }
+ }
+
+ if [istarget mips*el-*-*] {
+ run_dump_test "elfel-rel3"
+ } {
+ run_dump_test "elf-rel3"
+ }
+
+ if [istarget mips*el-*-*] {
+ run_dump_test "${tmips}elempic"
+ } {
+ run_dump_test "${tmips}empic"
+ }
+
if { !$no_mips16 } {
- run_dump_test "mips16-e"
+ if [istarget mips*el-*-*] {
+ run_dump_test "${tmips}mipsel16-e"
+ } {
+ run_dump_test "${tmips}mips16-e"
+ }
setup_xfail "mips*-*-*"
- run_dump_test "mips16-f"
+ if [istarget mips*el-*-*] {
+ run_dump_test "mipsel16-f"
+ } {
+ run_dump_test "mips16-f"
+ }
}
}
}
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips4.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips4.d
index 956de93f3da..874e420c3e4 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips4.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mips4.d
@@ -19,33 +19,33 @@ Disassembly of section .text:
0+0024 <[^>]*> nop
0+0028 <[^>]*> c.f.d \$f4,\$f6
0+002c <[^>]*> c.f.d \$fcc1,\$f4,\$f6
-0+0030 <[^>]*> ldxc1 \$f2,\$a0\(\$a1\)
-0+0034 <[^>]*> lwxc1 \$f2,\$a0\(\$a1\)
+0+0030 <[^>]*> ldxc1 \$f2,a0\(a1\)
+0+0034 <[^>]*> lwxc1 \$f2,a0\(a1\)
0+0038 <[^>]*> madd.d \$f0,\$f2,\$f4,\$f6
0+003c <[^>]*> madd.s \$f0,\$f2,\$f4,\$f6
-0+0040 <[^>]*> movf \$a0,\$a1,\$fcc4
+0+0040 <[^>]*> movf a0,a1,\$fcc4
0+0044 <[^>]*> movf.d \$f4,\$f6,\$fcc0
0+0048 <[^>]*> movf.s \$f4,\$f6,\$fcc0
-0+004c <[^>]*> movn \$a0,\$a2,\$a2
-0+0050 <[^>]*> movn.d \$f4,\$f5,\$a2
-0+0054 <[^>]*> movn.s \$f4,\$f5,\$a2
-0+0058 <[^>]*> movt \$a0,\$a1,\$fcc4
+0+004c <[^>]*> movn a0,a2,a2
+0+0050 <[^>]*> movn.d \$f4,\$f5,a2
+0+0054 <[^>]*> movn.s \$f4,\$f5,a2
+0+0058 <[^>]*> movt a0,a1,\$fcc4
0+005c <[^>]*> movt.d \$f4,\$f6,\$fcc0
0+0060 <[^>]*> movt.s \$f4,\$f6,\$fcc0
-0+0064 <[^>]*> movz \$a0,\$a2,\$a2
-0+0068 <[^>]*> movz.d \$f4,\$f5,\$a2
-0+006c <[^>]*> movz.s \$f4,\$f5,\$a2
+0+0064 <[^>]*> movz a0,a2,a2
+0+0068 <[^>]*> movz.d \$f4,\$f5,a2
+0+006c <[^>]*> movz.s \$f4,\$f5,a2
0+0070 <[^>]*> msub.d \$f0,\$f2,\$f4,\$f6
0+0074 <[^>]*> msub.s \$f0,\$f2,\$f4,\$f6
0+0078 <[^>]*> nmadd.d \$f0,\$f2,\$f4,\$f6
0+007c <[^>]*> nmadd.s \$f0,\$f2,\$f4,\$f6
0+0080 <[^>]*> nmsub.d \$f0,\$f2,\$f4,\$f6
0+0084 <[^>]*> nmsub.s \$f0,\$f2,\$f4,\$f6
-0+0088 <[^>]*> prefx 0x4,\$a0\(\$a1\)
+0+0088 <[^>]*> prefx 0x4,a0\(a1\)
0+008c <[^>]*> recip.d \$f4,\$f6
0+0090 <[^>]*> recip.s \$f4,\$f6
0+0094 <[^>]*> rsqrt.d \$f4,\$f6
0+0098 <[^>]*> rsqrt.s \$f4,\$f6
-0+009c <[^>]*> sdxc1 \$f4,\$a0\(\$a1\)
-0+00a0 <[^>]*> swxc1 \$f4,\$a0\(\$a1\)
+0+009c <[^>]*> sdxc1 \$f4,a0\(a1\)
+0+00a0 <[^>]*> swxc1 \$f4,a0\(a1\)
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul.d
index 92b6265242b..ab25f12c991 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul.d
@@ -7,86 +7,86 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> multu \$a0,\$a1
-0+0004 <[^>]*> mflo \$a0
+0+0000 <[^>]*> multu a0,a1
+0+0004 <[^>]*> mflo a0
...
-0+0010 <[^>]*> multu \$a1,\$a2
-0+0014 <[^>]*> mflo \$a0
-0+0018 <[^>]*> li \$at,0
+0+0010 <[^>]*> multu a1,a2
+0+0014 <[^>]*> mflo a0
+0+0018 <[^>]*> li at,0
0+001c <[^>]*> nop
-0+0020 <[^>]*> mult \$a1,\$at
-0+0024 <[^>]*> mflo \$a0
-0+0028 <[^>]*> li \$at,1
+0+0020 <[^>]*> mult a1,at
+0+0024 <[^>]*> mflo a0
+0+0028 <[^>]*> li at,1
0+002c <[^>]*> nop
-0+0030 <[^>]*> mult \$a1,\$at
-0+0034 <[^>]*> mflo \$a0
-0+0038 <[^>]*> li \$at,0x8000
+0+0030 <[^>]*> mult a1,at
+0+0034 <[^>]*> mflo a0
+0+0038 <[^>]*> li at,0x8000
0+003c <[^>]*> nop
-0+0040 <[^>]*> mult \$a1,\$at
-0+0044 <[^>]*> mflo \$a0
-0+0048 <[^>]*> li \$at,-32768
+0+0040 <[^>]*> mult a1,at
+0+0044 <[^>]*> mflo a0
+0+0048 <[^>]*> li at,-32768
0+004c <[^>]*> nop
-0+0050 <[^>]*> mult \$a1,\$at
-0+0054 <[^>]*> mflo \$a0
-0+0058 <[^>]*> lui \$at,0x1
+0+0050 <[^>]*> mult a1,at
+0+0054 <[^>]*> mflo a0
+0+0058 <[^>]*> lui at,0x1
0+005c <[^>]*> nop
-0+0060 <[^>]*> mult \$a1,\$at
-0+0064 <[^>]*> mflo \$a0
-0+0068 <[^>]*> lui \$at,0x1
-0+006c <[^>]*> ori \$at,\$at,0xa5a5
-0+0070 <[^>]*> mult \$a1,\$at
-0+0074 <[^>]*> mflo \$a0
+0+0060 <[^>]*> mult a1,at
+0+0064 <[^>]*> mflo a0
+0+0068 <[^>]*> lui at,0x1
+0+006c <[^>]*> ori at,at,0xa5a5
+0+0070 <[^>]*> mult a1,at
+0+0074 <[^>]*> mflo a0
...
-0+0080 <[^>]*> mult \$a0,\$a1
-0+0084 <[^>]*> mflo \$a0
-0+0088 <[^>]*> sra \$a0,\$a0,0x1f
-0+008c <[^>]*> mfhi \$at
-0+0090 <[^>]*> beq \$a0,\$at,0+9c <foo\+(0x|)9c>
+0+0080 <[^>]*> mult a0,a1
+0+0084 <[^>]*> mflo a0
+0+0088 <[^>]*> sra a0,a0,0x1f
+0+008c <[^>]*> mfhi at
+0+0090 <[^>]*> beq a0,at,0+9c <foo\+(0x|)9c>
0+0094 <[^>]*> nop
0+0098 <[^>]*> break (0x0,0x6|0x6)
-0+009c <[^>]*> mflo \$a0
+0+009c <[^>]*> mflo a0
...
-0+00a8 <[^>]*> mult \$a1,\$a2
-0+00ac <[^>]*> mflo \$a0
-0+00b0 <[^>]*> sra \$a0,\$a0,0x1f
-0+00b4 <[^>]*> mfhi \$at
-0+00b8 <[^>]*> beq \$a0,\$at,0+c4 <foo\+(0x|)c4>
+0+00a8 <[^>]*> mult a1,a2
+0+00ac <[^>]*> mflo a0
+0+00b0 <[^>]*> sra a0,a0,0x1f
+0+00b4 <[^>]*> mfhi at
+0+00b8 <[^>]*> beq a0,at,0+c4 <foo\+(0x|)c4>
0+00bc <[^>]*> nop
0+00c0 <[^>]*> break (0x0,0x6|0x6)
-0+00c4 <[^>]*> mflo \$a0
+0+00c4 <[^>]*> mflo a0
...
-0+00d0 <[^>]*> multu \$a0,\$a1
-0+00d4 <[^>]*> mfhi \$at
-0+00d8 <[^>]*> mflo \$a0
-0+00dc <[^>]*> beqz \$at,0+e8 <foo\+(0x|)e8>
+0+00d0 <[^>]*> multu a0,a1
+0+00d4 <[^>]*> mfhi at
+0+00d8 <[^>]*> mflo a0
+0+00dc <[^>]*> beqz at,0+e8 <foo\+(0x|)e8>
0+00e0 <[^>]*> nop
0+00e4 <[^>]*> break (0x0,0x6|0x6)
-0+00e8 <[^>]*> multu \$a1,\$a2
-0+00ec <[^>]*> mfhi \$at
-0+00f0 <[^>]*> mflo \$a0
-0+00f4 <[^>]*> beqz \$at,0+100 <foo\+(0x|)100>
+0+00e8 <[^>]*> multu a1,a2
+0+00ec <[^>]*> mfhi at
+0+00f0 <[^>]*> mflo a0
+0+00f4 <[^>]*> beqz at,0+100 <foo\+(0x|)100>
0+00f8 <[^>]*> nop
0+00fc <[^>]*> break (0x0,0x6|0x6)
-0+0100 <[^>]*> dmultu \$a1,\$a2
-0+0104 <[^>]*> mflo \$a0
-0+0108 <[^>]*> li \$at,1
+0+0100 <[^>]*> dmultu a1,a2
+0+0104 <[^>]*> mflo a0
+0+0108 <[^>]*> li at,1
0+010c <[^>]*> nop
-0+0110 <[^>]*> dmult \$a1,\$at
-0+0114 <[^>]*> mflo \$a0
+0+0110 <[^>]*> dmult a1,at
+0+0114 <[^>]*> mflo a0
...
-0+0120 <[^>]*> dmult \$a1,\$a2
-0+0124 <[^>]*> mflo \$a0
-0+0128 <[^>]*> dsra32 \$a0,\$a0,0x1f
-0+012c <[^>]*> mfhi \$at
-0+0130 <[^>]*> beq \$a0,\$at,0+13c <foo\+(0x|)13c>
+0+0120 <[^>]*> dmult a1,a2
+0+0124 <[^>]*> mflo a0
+0+0128 <[^>]*> dsra32 a0,a0,0x1f
+0+012c <[^>]*> mfhi at
+0+0130 <[^>]*> beq a0,at,0+13c <foo\+(0x|)13c>
0+0134 <[^>]*> nop
0+0138 <[^>]*> break (0x0,0x6|0x6)
-0+013c <[^>]*> mflo \$a0
+0+013c <[^>]*> mflo a0
...
-0+0148 <[^>]*> dmultu \$a1,\$a2
-0+014c <[^>]*> mfhi \$at
-0+0150 <[^>]*> mflo \$a0
-0+0154 <[^>]*> beqz \$at,0+160 <foo\+(0x|)160>
+0+0148 <[^>]*> dmultu a1,a2
+0+014c <[^>]*> mfhi at
+0+0150 <[^>]*> mflo a0
+0+0154 <[^>]*> beqz at,0+160 <foo\+(0x|)160>
0+0158 <[^>]*> nop
0+015c <[^>]*> break (0x0,0x6|0x6)
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/rol.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/rol.d
index 14ce1425d46..05addb4f5d2 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/rol.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/rol.d
@@ -7,31 +7,31 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> negu \$at,\$a1
-0+0004 <[^>]*> srlv \$at,\$a0,\$at
-0+0008 <[^>]*> sllv \$a0,\$a0,\$a1
-0+000c <[^>]*> or \$a0,\$a0,\$at
-0+0010 <[^>]*> negu \$at,\$a2
-0+0014 <[^>]*> srlv \$at,\$a1,\$at
-0+0018 <[^>]*> sllv \$a0,\$a1,\$a2
-0+001c <[^>]*> or \$a0,\$a0,\$at
-0+0020 <[^>]*> sll \$at,\$a0,0x1
-0+0024 <[^>]*> srl \$a0,\$a0,0x1f
-0+0028 <[^>]*> or \$a0,\$a0,\$at
-0+002c <[^>]*> sll \$at,\$a1,0x1
-0+0030 <[^>]*> srl \$a0,\$a1,0x1f
-0+0034 <[^>]*> or \$a0,\$a0,\$at
-0+0038 <[^>]*> negu \$at,\$a1
-0+003c <[^>]*> sllv \$at,\$a0,\$at
-0+0040 <[^>]*> srlv \$a0,\$a0,\$a1
-0+0044 <[^>]*> or \$a0,\$a0,\$at
-0+0048 <[^>]*> negu \$at,\$a2
-0+004c <[^>]*> sllv \$at,\$a1,\$at
-0+0050 <[^>]*> srlv \$a0,\$a1,\$a2
-0+0054 <[^>]*> or \$a0,\$a0,\$at
-0+0058 <[^>]*> srl \$at,\$a0,0x1
-0+005c <[^>]*> sll \$a0,\$a0,0x1f
-0+0060 <[^>]*> or \$a0,\$a0,\$at
-0+0064 <[^>]*> srl \$at,\$a1,0x1
-0+0068 <[^>]*> sll \$a0,\$a1,0x1f
-0+006c <[^>]*> or \$a0,\$a0,\$at
+0+0000 <[^>]*> negu at,a1
+0+0004 <[^>]*> srlv at,a0,at
+0+0008 <[^>]*> sllv a0,a0,a1
+0+000c <[^>]*> or a0,a0,at
+0+0010 <[^>]*> negu at,a2
+0+0014 <[^>]*> srlv at,a1,at
+0+0018 <[^>]*> sllv a0,a1,a2
+0+001c <[^>]*> or a0,a0,at
+0+0020 <[^>]*> sll at,a0,0x1
+0+0024 <[^>]*> srl a0,a0,0x1f
+0+0028 <[^>]*> or a0,a0,at
+0+002c <[^>]*> sll at,a1,0x1
+0+0030 <[^>]*> srl a0,a1,0x1f
+0+0034 <[^>]*> or a0,a0,at
+0+0038 <[^>]*> negu at,a1
+0+003c <[^>]*> sllv at,a0,at
+0+0040 <[^>]*> srlv a0,a0,a1
+0+0044 <[^>]*> or a0,a0,at
+0+0048 <[^>]*> negu at,a2
+0+004c <[^>]*> sllv at,a1,at
+0+0050 <[^>]*> srlv a0,a1,a2
+0+0054 <[^>]*> or a0,a0,at
+0+0058 <[^>]*> srl at,a0,0x1
+0+005c <[^>]*> sll a0,a0,0x1f
+0+0060 <[^>]*> or a0,a0,at
+0+0064 <[^>]*> srl at,a1,0x1
+0+0068 <[^>]*> sll a0,a1,0x1f
+0+006c <[^>]*> or a0,a0,at
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/sb.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/sb.d
index 0ef4bc12c2d..85b2ece26b5 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/sb.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/sb.d
@@ -7,390 +7,390 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> sb \$a0,0\(\$zero\)
-0+0004 <[^>]*> sb \$a0,1\(\$zero\)
-0+0008 <[^>]*> lui \$at,0x1
-0+000c <[^>]*> sb \$a0,-32768\(\$at\)
-0+0010 <[^>]*> sb \$a0,-32768\(\$zero\)
-0+0014 <[^>]*> lui \$at,0x1
-0+0018 <[^>]*> sb \$a0,0\(\$at\)
-0+001c <[^>]*> lui \$at,0x2
-0+0020 <[^>]*> sb \$a0,-23131\(\$at\)
-0+0024 <[^>]*> sb \$a0,0\(\$a1\)
-0+0028 <[^>]*> sb \$a0,1\(\$a1\)
-0+002c <[^>]*> lui \$at,0x1
-0+0030 <[^>]*> addu \$at,\$at,\$a1
-0+0034 <[^>]*> sb \$a0,-32768\(\$at\)
-0+0038 <[^>]*> sb \$a0,-32768\(\$a1\)
-0+003c <[^>]*> lui \$at,0x1
-0+0040 <[^>]*> addu \$at,\$at,\$a1
-0+0044 <[^>]*> sb \$a0,0\(\$at\)
-0+0048 <[^>]*> lui \$at,0x2
-0+004c <[^>]*> addu \$at,\$at,\$a1
-0+0050 <[^>]*> sb \$a0,-23131\(\$at\)
-0+0054 <[^>]*> lui \$at,0x0
+0+0000 <[^>]*> sb a0,0\(zero\)
+0+0004 <[^>]*> sb a0,1\(zero\)
+0+0008 <[^>]*> lui at,0x1
+0+000c <[^>]*> sb a0,-32768\(at\)
+0+0010 <[^>]*> sb a0,-32768\(zero\)
+0+0014 <[^>]*> lui at,0x1
+0+0018 <[^>]*> sb a0,0\(at\)
+0+001c <[^>]*> lui at,0x2
+0+0020 <[^>]*> sb a0,-23131\(at\)
+0+0024 <[^>]*> sb a0,0\(a1\)
+0+0028 <[^>]*> sb a0,1\(a1\)
+0+002c <[^>]*> lui at,0x1
+0+0030 <[^>]*> addu at,at,a1
+0+0034 <[^>]*> sb a0,-32768\(at\)
+0+0038 <[^>]*> sb a0,-32768\(a1\)
+0+003c <[^>]*> lui at,0x1
+0+0040 <[^>]*> addu at,at,a1
+0+0044 <[^>]*> sb a0,0\(at\)
+0+0048 <[^>]*> lui at,0x2
+0+004c <[^>]*> addu at,at,a1
+0+0050 <[^>]*> sb a0,-23131\(at\)
+0+0054 <[^>]*> lui at,0x0
[ ]*54: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0058 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0058 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*58: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+005c <[^>]*> lui \$at,0x0
+0+005c <[^>]*> lui at,0x0
[ ]*5c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0060 <[^>]*> sb \$a0,0\(\$at\)
+0+0060 <[^>]*> sb a0,0\(at\)
[ ]*60: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0064 <[^>]*> sb \$a0,0\(\$gp\)
+0+0064 <[^>]*> sb a0,0\(gp\)
[ ]*64: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0068 <[^>]*> lui \$at,0x0
+0+0068 <[^>]*> lui at,0x0
[ ]*68: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+006c <[^>]*> sb \$a0,0\(\$at\)
+0+006c <[^>]*> sb a0,0\(at\)
[ ]*6c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0070 <[^>]*> sb \$a0,0\(\$gp\)
+0+0070 <[^>]*> sb a0,0\(gp\)
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0074 <[^>]*> lui \$at,0x0
+0+0074 <[^>]*> lui at,0x0
[ ]*74: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0078 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0078 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*78: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+007c <[^>]*> sb \$a0,[-0-9]+\(\$gp\)
+0+007c <[^>]*> sb a0,[-0-9]+\(gp\)
[ ]*7c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0080 <[^>]*> lui \$at,0x0
+0+0080 <[^>]*> lui at,0x0
[ ]*80: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0084 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0084 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*84: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0088 <[^>]*> lui \$at,0x0
+0+0088 <[^>]*> lui at,0x0
[ ]*88: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+008c <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+008c <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*8c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0090 <[^>]*> sb \$a0,1\(\$gp\)
+0+0090 <[^>]*> sb a0,1\(gp\)
[ ]*90: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0094 <[^>]*> lui \$at,0x0
+0+0094 <[^>]*> lui at,0x0
[ ]*94: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0098 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0098 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*98: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+009c <[^>]*> sb \$a0,1\(\$gp\)
+0+009c <[^>]*> sb a0,1\(gp\)
[ ]*9c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00a0 <[^>]*> lui \$at,0x0
+0+00a0 <[^>]*> lui at,0x0
[ ]*a0: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+00a4 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00a4 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*a4: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00a8 <[^>]*> sb \$a0,[-0-9]+\(\$gp\)
+0+00a8 <[^>]*> sb a0,[-0-9]+\(gp\)
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00ac <[^>]*> lui \$at,[-0-9x]+
+0+00ac <[^>]*> lui at,[-0-9x]+
[ ]*ac: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00b0 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00b0 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*b0: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00b4 <[^>]*> lui \$at,[-0-9x]+
+0+00b4 <[^>]*> lui at,[-0-9x]+
[ ]*b4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00b8 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00b8 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*b8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00bc <[^>]*> lui \$at,[-0-9x]+
+0+00bc <[^>]*> lui at,[-0-9x]+
[ ]*bc: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+00c0 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00c0 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*c0: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+00c4 <[^>]*> lui \$at,[-0-9x]+
+0+00c4 <[^>]*> lui at,[-0-9x]+
[ ]*c4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00c8 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00c8 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*c8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00cc <[^>]*> lui \$at,[-0-9x]+
+0+00cc <[^>]*> lui at,[-0-9x]+
[ ]*cc: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+00d0 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00d0 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*d0: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+00d4 <[^>]*> lui \$at,[-0-9x]+
+0+00d4 <[^>]*> lui at,[-0-9x]+
[ ]*d4: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+00d8 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00d8 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*d8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00dc <[^>]*> lui \$at,[-0-9x]+
+0+00dc <[^>]*> lui at,[-0-9x]+
[ ]*dc: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+00e0 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00e0 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*e0: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+00e4 <[^>]*> lui \$at,0x0
+0+00e4 <[^>]*> lui at,0x0
[ ]*e4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00e8 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00e8 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*e8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00ec <[^>]*> lui \$at,0x0
+0+00ec <[^>]*> lui at,0x0
[ ]*ec: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00f0 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00f0 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*f0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00f4 <[^>]*> lui \$at,0x0
+0+00f4 <[^>]*> lui at,0x0
[ ]*f4: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+00f8 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+00f8 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*f8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+00fc <[^>]*> lui \$at,0x0
+0+00fc <[^>]*> lui at,0x0
[ ]*fc: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0100 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0100 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*100: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0104 <[^>]*> lui \$at,0x0
+0+0104 <[^>]*> lui at,0x0
[ ]*104: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0108 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0108 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*108: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+010c <[^>]*> lui \$at,0x0
+0+010c <[^>]*> lui at,0x0
[ ]*10c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0110 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0110 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*110: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0114 <[^>]*> lui \$at,0x0
+0+0114 <[^>]*> lui at,0x0
[ ]*114: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0118 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0118 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*118: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+011c <[^>]*> lui \$at,[-0-9x]+
+0+011c <[^>]*> lui at,[-0-9x]+
[ ]*11c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0120 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0120 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*120: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0124 <[^>]*> lui \$at,[-0-9x]+
+0+0124 <[^>]*> lui at,[-0-9x]+
[ ]*124: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0128 <[^>]*> sb \$a0,0\(\$at\)
+0+0128 <[^>]*> sb a0,0\(at\)
[ ]*128: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+012c <[^>]*> lui \$at,[-0-9x]+
+0+012c <[^>]*> lui at,[-0-9x]+
[ ]*12c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0130 <[^>]*> sb \$a0,0\(\$at\)
+0+0130 <[^>]*> sb a0,0\(at\)
[ ]*130: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0134 <[^>]*> lui \$at,[-0-9x]+
+0+0134 <[^>]*> lui at,[-0-9x]+
[ ]*134: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0138 <[^>]*> sb \$a0,0\(\$at\)
+0+0138 <[^>]*> sb a0,0\(at\)
[ ]*138: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+013c <[^>]*> lui \$at,[-0-9x]+
+0+013c <[^>]*> lui at,[-0-9x]+
[ ]*13c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0140 <[^>]*> sb \$a0,0\(\$at\)
+0+0140 <[^>]*> sb a0,0\(at\)
[ ]*140: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0144 <[^>]*> lui \$at,[-0-9x]+
+0+0144 <[^>]*> lui at,[-0-9x]+
[ ]*144: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0148 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0148 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*148: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+014c <[^>]*> lui \$at,[-0-9x]+
+0+014c <[^>]*> lui at,[-0-9x]+
[ ]*14c: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0150 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0150 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*150: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0154 <[^>]*> lui \$at,[-0-9x]+
+0+0154 <[^>]*> lui at,[-0-9x]+
[ ]*154: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0158 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0158 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*158: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+015c <[^>]*> lui \$at,[-0-9x]+
+0+015c <[^>]*> lui at,[-0-9x]+
[ ]*15c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0160 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0160 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*160: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0164 <[^>]*> lui \$at,[-0-9x]+
+0+0164 <[^>]*> lui at,[-0-9x]+
[ ]*164: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0168 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0168 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*168: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+016c <[^>]*> lui \$at,[-0-9x]+
+0+016c <[^>]*> lui at,[-0-9x]+
[ ]*16c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0170 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0170 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*170: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0174 <[^>]*> lui \$at,[-0-9x]+
+0+0174 <[^>]*> lui at,[-0-9x]+
[ ]*174: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0178 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0178 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*178: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+017c <[^>]*> lui \$at,[-0-9x]+
+0+017c <[^>]*> lui at,[-0-9x]+
[ ]*17c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0180 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0180 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*180: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0184 <[^>]*> lui \$at,[-0-9x]+
+0+0184 <[^>]*> lui at,[-0-9x]+
[ ]*184: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0188 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0188 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*188: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+018c <[^>]*> lui \$at,0x0
+0+018c <[^>]*> lui at,0x0
[ ]*18c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0190 <[^>]*> addu \$at,\$at,\$a1
-0+0194 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0190 <[^>]*> addu at,at,a1
+0+0194 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*194: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0198 <[^>]*> lui \$at,0x0
+0+0198 <[^>]*> lui at,0x0
[ ]*198: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+019c <[^>]*> addu \$at,\$at,\$a1
-0+01a0 <[^>]*> sb \$a0,0\(\$at\)
+0+019c <[^>]*> addu at,at,a1
+0+01a0 <[^>]*> sb a0,0\(at\)
[ ]*1a0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01a4 <[^>]*> addu \$at,\$a1,\$gp
-0+01a8 <[^>]*> sb \$a0,0\(\$at\)
+0+01a4 <[^>]*> addu at,a1,gp
+0+01a8 <[^>]*> sb a0,0\(at\)
[ ]*1a8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+01ac <[^>]*> lui \$at,0x0
+0+01ac <[^>]*> lui at,0x0
[ ]*1ac: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01b0 <[^>]*> addu \$at,\$at,\$a1
-0+01b4 <[^>]*> sb \$a0,0\(\$at\)
+0+01b0 <[^>]*> addu at,at,a1
+0+01b4 <[^>]*> sb a0,0\(at\)
[ ]*1b4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01b8 <[^>]*> addu \$at,\$a1,\$gp
-0+01bc <[^>]*> sb \$a0,0\(\$at\)
+0+01b8 <[^>]*> addu at,a1,gp
+0+01bc <[^>]*> sb a0,0\(at\)
[ ]*1bc: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+01c0 <[^>]*> lui \$at,0x0
+0+01c0 <[^>]*> lui at,0x0
[ ]*1c0: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+01c4 <[^>]*> addu \$at,\$at,\$a1
-0+01c8 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+01c4 <[^>]*> addu at,at,a1
+0+01c8 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*1c8: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01cc <[^>]*> addu \$at,\$a1,\$gp
-0+01d0 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+01cc <[^>]*> addu at,a1,gp
+0+01d0 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*1d0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+01d4 <[^>]*> lui \$at,0x0
+0+01d4 <[^>]*> lui at,0x0
[ ]*1d4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+01d8 <[^>]*> addu \$at,\$at,\$a1
-0+01dc <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+01d8 <[^>]*> addu at,at,a1
+0+01dc <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*1dc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+01e0 <[^>]*> lui \$at,0x0
+0+01e0 <[^>]*> lui at,0x0
[ ]*1e0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+01e4 <[^>]*> addu \$at,\$at,\$a1
-0+01e8 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+01e4 <[^>]*> addu at,at,a1
+0+01e8 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*1e8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01ec <[^>]*> addu \$at,\$a1,\$gp
-0+01f0 <[^>]*> sb \$a0,1\(\$at\)
+0+01ec <[^>]*> addu at,a1,gp
+0+01f0 <[^>]*> sb a0,1\(at\)
[ ]*1f0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+01f4 <[^>]*> lui \$at,0x0
+0+01f4 <[^>]*> lui at,0x0
[ ]*1f4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01f8 <[^>]*> addu \$at,\$at,\$a1
-0+01fc <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+01f8 <[^>]*> addu at,at,a1
+0+01fc <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*1fc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0200 <[^>]*> addu \$at,\$a1,\$gp
-0+0204 <[^>]*> sb \$a0,1\(\$at\)
+0+0200 <[^>]*> addu at,a1,gp
+0+0204 <[^>]*> sb a0,1\(at\)
[ ]*204: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0208 <[^>]*> lui \$at,0x0
+0+0208 <[^>]*> lui at,0x0
[ ]*208: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+020c <[^>]*> addu \$at,\$at,\$a1
-0+0210 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+020c <[^>]*> addu at,at,a1
+0+0210 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*210: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0214 <[^>]*> addu \$at,\$a1,\$gp
-0+0218 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0214 <[^>]*> addu at,a1,gp
+0+0218 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*218: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+021c <[^>]*> lui \$at,[-0-9x]+
+0+021c <[^>]*> lui at,[-0-9x]+
[ ]*21c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0220 <[^>]*> addu \$at,\$at,\$a1
-0+0224 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0220 <[^>]*> addu at,at,a1
+0+0224 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*224: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0228 <[^>]*> lui \$at,[-0-9x]+
+0+0228 <[^>]*> lui at,[-0-9x]+
[ ]*228: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+022c <[^>]*> addu \$at,\$at,\$a1
-0+0230 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+022c <[^>]*> addu at,at,a1
+0+0230 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*230: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0234 <[^>]*> lui \$at,[-0-9x]+
+0+0234 <[^>]*> lui at,[-0-9x]+
[ ]*234: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0238 <[^>]*> addu \$at,\$at,\$a1
-0+023c <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0238 <[^>]*> addu at,at,a1
+0+023c <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*23c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0240 <[^>]*> lui \$at,[-0-9x]+
+0+0240 <[^>]*> lui at,[-0-9x]+
[ ]*240: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0244 <[^>]*> addu \$at,\$at,\$a1
-0+0248 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0244 <[^>]*> addu at,at,a1
+0+0248 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*248: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+024c <[^>]*> lui \$at,[-0-9x]+
+0+024c <[^>]*> lui at,[-0-9x]+
[ ]*24c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0250 <[^>]*> addu \$at,\$at,\$a1
-0+0254 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0250 <[^>]*> addu at,at,a1
+0+0254 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*254: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0258 <[^>]*> lui \$at,[-0-9x]+
+0+0258 <[^>]*> lui at,[-0-9x]+
[ ]*258: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+025c <[^>]*> addu \$at,\$at,\$a1
-0+0260 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+025c <[^>]*> addu at,at,a1
+0+0260 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*260: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0264 <[^>]*> lui \$at,[-0-9x]+
+0+0264 <[^>]*> lui at,[-0-9x]+
[ ]*264: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0268 <[^>]*> addu \$at,\$at,\$a1
-0+026c <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0268 <[^>]*> addu at,at,a1
+0+026c <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*26c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0270 <[^>]*> lui \$at,0x0
+0+0270 <[^>]*> lui at,0x0
[ ]*270: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0274 <[^>]*> addu \$at,\$at,\$a1
-0+0278 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0274 <[^>]*> addu at,at,a1
+0+0278 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*278: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+027c <[^>]*> lui \$at,0x0
+0+027c <[^>]*> lui at,0x0
[ ]*27c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0280 <[^>]*> addu \$at,\$at,\$a1
-0+0284 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0280 <[^>]*> addu at,at,a1
+0+0284 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*284: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0288 <[^>]*> lui \$at,0x0
+0+0288 <[^>]*> lui at,0x0
[ ]*288: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+028c <[^>]*> addu \$at,\$at,\$a1
-0+0290 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+028c <[^>]*> addu at,at,a1
+0+0290 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*290: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0294 <[^>]*> lui \$at,0x0
+0+0294 <[^>]*> lui at,0x0
[ ]*294: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0298 <[^>]*> addu \$at,\$at,\$a1
-0+029c <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0298 <[^>]*> addu at,at,a1
+0+029c <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*29c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02a0 <[^>]*> lui \$at,0x0
+0+02a0 <[^>]*> lui at,0x0
[ ]*2a0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02a4 <[^>]*> addu \$at,\$at,\$a1
-0+02a8 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+02a4 <[^>]*> addu at,at,a1
+0+02a8 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*2a8: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+02ac <[^>]*> lui \$at,0x0
+0+02ac <[^>]*> lui at,0x0
[ ]*2ac: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02b0 <[^>]*> addu \$at,\$at,\$a1
-0+02b4 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+02b0 <[^>]*> addu at,at,a1
+0+02b4 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*2b4: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02b8 <[^>]*> lui \$at,0x0
+0+02b8 <[^>]*> lui at,0x0
[ ]*2b8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+02bc <[^>]*> addu \$at,\$at,\$a1
-0+02c0 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+02bc <[^>]*> addu at,at,a1
+0+02c0 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*2c0: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+02c4 <[^>]*> lui \$at,[-0-9x]+
+0+02c4 <[^>]*> lui at,[-0-9x]+
[ ]*2c4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+02c8 <[^>]*> addu \$at,\$at,\$a1
-0+02cc <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+02c8 <[^>]*> addu at,at,a1
+0+02cc <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*2cc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+02d0 <[^>]*> lui \$at,[-0-9x]+
+0+02d0 <[^>]*> lui at,[-0-9x]+
[ ]*2d0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+02d4 <[^>]*> addu \$at,\$at,\$a1
-0+02d8 <[^>]*> sb \$a0,0\(\$at\)
+0+02d4 <[^>]*> addu at,at,a1
+0+02d8 <[^>]*> sb a0,0\(at\)
[ ]*2d8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+02dc <[^>]*> lui \$at,[-0-9x]+
+0+02dc <[^>]*> lui at,[-0-9x]+
[ ]*2dc: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+02e0 <[^>]*> addu \$at,\$at,\$a1
-0+02e4 <[^>]*> sb \$a0,0\(\$at\)
+0+02e0 <[^>]*> addu at,at,a1
+0+02e4 <[^>]*> sb a0,0\(at\)
[ ]*2e4: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+02e8 <[^>]*> lui \$at,[-0-9x]+
+0+02e8 <[^>]*> lui at,[-0-9x]+
[ ]*2e8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+02ec <[^>]*> addu \$at,\$at,\$a1
-0+02f0 <[^>]*> sb \$a0,0\(\$at\)
+0+02ec <[^>]*> addu at,at,a1
+0+02f0 <[^>]*> sb a0,0\(at\)
[ ]*2f0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02f4 <[^>]*> lui \$at,[-0-9x]+
+0+02f4 <[^>]*> lui at,[-0-9x]+
[ ]*2f4: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02f8 <[^>]*> addu \$at,\$at,\$a1
-0+02fc <[^>]*> sb \$a0,0\(\$at\)
+0+02f8 <[^>]*> addu at,at,a1
+0+02fc <[^>]*> sb a0,0\(at\)
[ ]*2fc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0300 <[^>]*> lui \$at,[-0-9x]+
+0+0300 <[^>]*> lui at,[-0-9x]+
[ ]*300: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0304 <[^>]*> addu \$at,\$at,\$a1
-0+0308 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0304 <[^>]*> addu at,at,a1
+0+0308 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*308: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+030c <[^>]*> lui \$at,[-0-9x]+
+0+030c <[^>]*> lui at,[-0-9x]+
[ ]*30c: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0310 <[^>]*> addu \$at,\$at,\$a1
-0+0314 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0310 <[^>]*> addu at,at,a1
+0+0314 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*314: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0318 <[^>]*> lui \$at,[-0-9x]+
+0+0318 <[^>]*> lui at,[-0-9x]+
[ ]*318: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+031c <[^>]*> addu \$at,\$at,\$a1
-0+0320 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+031c <[^>]*> addu at,at,a1
+0+0320 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*320: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0324 <[^>]*> lui \$at,[-0-9x]+
+0+0324 <[^>]*> lui at,[-0-9x]+
[ ]*324: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0328 <[^>]*> addu \$at,\$at,\$a1
-0+032c <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0328 <[^>]*> addu at,at,a1
+0+032c <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*32c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0330 <[^>]*> lui \$at,[-0-9x]+
+0+0330 <[^>]*> lui at,[-0-9x]+
[ ]*330: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0334 <[^>]*> addu \$at,\$at,\$a1
-0+0338 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0334 <[^>]*> addu at,at,a1
+0+0338 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*338: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+033c <[^>]*> lui \$at,[-0-9x]+
+0+033c <[^>]*> lui at,[-0-9x]+
[ ]*33c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0340 <[^>]*> addu \$at,\$at,\$a1
-0+0344 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0340 <[^>]*> addu at,at,a1
+0+0344 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*344: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0348 <[^>]*> lui \$at,[-0-9x]+
+0+0348 <[^>]*> lui at,[-0-9x]+
[ ]*348: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+034c <[^>]*> addu \$at,\$at,\$a1
-0+0350 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+034c <[^>]*> addu at,at,a1
+0+0350 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*350: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0354 <[^>]*> lui \$at,[-0-9x]+
+0+0354 <[^>]*> lui at,[-0-9x]+
[ ]*354: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0358 <[^>]*> addu \$at,\$at,\$a1
-0+035c <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0358 <[^>]*> addu at,at,a1
+0+035c <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*35c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0360 <[^>]*> lui \$at,[-0-9x]+
+0+0360 <[^>]*> lui at,[-0-9x]+
[ ]*360: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0364 <[^>]*> addu \$at,\$at,\$a1
-0+0368 <[^>]*> sb \$a0,[-0-9]+\(\$at\)
+0+0364 <[^>]*> addu at,at,a1
+0+0368 <[^>]*> sb a0,[-0-9]+\(at\)
[ ]*368: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+036c <[^>]*> sw \$a0,0\(\$zero\)
-0+0370 <[^>]*> sw \$a1,4\(\$zero\)
-0+0374 <[^>]*> sh \$a0,0\(\$zero\)
-0+0378 <[^>]*> sw \$a0,0\(\$zero\)
-0+037c <[^>]*> swc0 \$4,0\(\$zero\)
-0+0380 <[^>]*> swc1 \$f4,0\(\$zero\)
-0+0384 <[^>]*> swc2 \$4,0\(\$zero\)
-0+0388 <[^>]*> swc3 \$4,0\(\$zero\)
-0+038c <[^>]*> swc1 \$f4,0\(\$zero\)
-0+0390 <[^>]*> swl \$a0,0\(\$zero\)
-0+0394 <[^>]*> swr \$a0,0\(\$zero\)
+0+036c <[^>]*> sw a0,0\(zero\)
+0+0370 <[^>]*> sw a1,4\(zero\)
+0+0374 <[^>]*> sh a0,0\(zero\)
+0+0378 <[^>]*> sw a0,0\(zero\)
+0+037c <[^>]*> swc0 a0,0\(zero\)
+0+0380 <[^>]*> swc1 \$f4,0\(zero\)
+0+0384 <[^>]*> swc2 a0,0\(zero\)
+0+0388 <[^>]*> swc3 a0,0\(zero\)
+0+038c <[^>]*> swc1 \$f4,0\(zero\)
+0+0390 <[^>]*> swl a0,0\(zero\)
+0+0394 <[^>]*> swr a0,0\(zero\)
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/trunc.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/trunc.d
index 3738ae15c2d..8276e3fbc39 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/trunc.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/trunc.d
@@ -7,23 +7,23 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> cfc1 \$a0,\$31
-0+0004 <[^>]*> cfc1 \$a0,\$31
+0+0000 <[^>]*> cfc1 a0,ra
+0+0004 <[^>]*> cfc1 a0,ra
0+0008 <[^>]*> nop
-0+000c <[^>]*> ori \$at,\$a0,0x3
-0+0010 <[^>]*> xori \$at,\$at,0x2
-0+0014 <[^>]*> ctc1 \$at,\$31
+0+000c <[^>]*> ori at,a0,0x3
+0+0010 <[^>]*> xori at,at,0x2
+0+0014 <[^>]*> ctc1 at,ra
0+0018 <[^>]*> nop
0+001c <[^>]*> cvt.w.d \$f4,\$f6
-0+0020 <[^>]*> ctc1 \$a0,\$31
+0+0020 <[^>]*> ctc1 a0,ra
0+0024 <[^>]*> nop
-0+0028 <[^>]*> cfc1 \$a0,\$31
-0+002c <[^>]*> cfc1 \$a0,\$31
+0+0028 <[^>]*> cfc1 a0,ra
+0+002c <[^>]*> cfc1 a0,ra
0+0030 <[^>]*> nop
-0+0034 <[^>]*> ori \$at,\$a0,0x3
-0+0038 <[^>]*> xori \$at,\$at,0x2
-0+003c <[^>]*> ctc1 \$at,\$31
+0+0034 <[^>]*> ori at,a0,0x3
+0+0038 <[^>]*> xori at,at,0x2
+0+003c <[^>]*> ctc1 at,ra
0+0040 <[^>]*> nop
0+0044 <[^>]*> cvt.w.s \$f4,\$f6
-0+0048 <[^>]*> ctc1 \$a0,\$31
+0+0048 <[^>]*> ctc1 a0,ra
0+004c <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/uld.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/uld.d
index f92e29d565c..06c83dd5746 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/uld.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/uld.d
@@ -7,264 +7,264 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> ldl \$a0,[07]\(\$zero\)
-0+0004 <[^>]*> ldr \$a0,[07]\(\$zero\)
-0+0008 <[^>]*> ldl \$a0,[18]\(\$zero\)
-0+000c <[^>]*> ldr \$a0,[18]\(\$zero\)
-0+0010 <[^>]*> li \$at,0x8000
-0+0014 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0018 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+001c <[^>]*> ldl \$a0,-3276[18]\(\$zero\)
-0+0020 <[^>]*> ldr \$a0,-3276[18]\(\$zero\)
-0+0024 <[^>]*> lui \$at,0x1
-0+0028 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+002c <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0030 <[^>]*> lui \$at,0x1
-0+0034 <[^>]*> ori \$at,\$at,0xa5a5
-0+0038 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+003c <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0040 <[^>]*> ldl \$a0,[07]\(\$a1\)
-0+0044 <[^>]*> ldr \$a0,[07]\(\$a1\)
-0+0048 <[^>]*> ldl \$a0,[18]\(\$a1\)
-0+004c <[^>]*> ldr \$a0,[-0-9]+\(\$a1\)
-0+0050 <[^>]*> lui \$at,[-0-9x]+
+0+0000 <[^>]*> ldl a0,[07]\(zero\)
+0+0004 <[^>]*> ldr a0,[07]\(zero\)
+0+0008 <[^>]*> ldl a0,[18]\(zero\)
+0+000c <[^>]*> ldr a0,[18]\(zero\)
+0+0010 <[^>]*> li at,0x8000
+0+0014 <[^>]*> ldl a0,[07]\(at\)
+0+0018 <[^>]*> ldr a0,[07]\(at\)
+0+001c <[^>]*> ldl a0,-3276[18]\(zero\)
+0+0020 <[^>]*> ldr a0,-3276[18]\(zero\)
+0+0024 <[^>]*> lui at,0x1
+0+0028 <[^>]*> ldl a0,[07]\(at\)
+0+002c <[^>]*> ldr a0,[07]\(at\)
+0+0030 <[^>]*> lui at,0x1
+0+0034 <[^>]*> ori at,at,0xa5a5
+0+0038 <[^>]*> ldl a0,[07]\(at\)
+0+003c <[^>]*> ldr a0,[07]\(at\)
+0+0040 <[^>]*> ldl a0,[07]\(a1\)
+0+0044 <[^>]*> ldr a0,[07]\(a1\)
+0+0048 <[^>]*> ldl a0,[18]\(a1\)
+0+004c <[^>]*> ldr a0,[-0-9]+\(a1\)
+0+0050 <[^>]*> lui at,[-0-9x]+
[ ]*50: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0054 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+0054 <[^>]*> daddiu at,at,[-0-9]+
[ ]*54: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0058 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+005c <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0060 <[^>]*> lui \$at,0x0
+0+0058 <[^>]*> ldl a0,[07]\(at\)
+0+005c <[^>]*> ldr a0,[07]\(at\)
+0+0060 <[^>]*> lui at,0x0
[ ]*60: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0064 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+0064 <[^>]*> daddiu at,at,[-0-9]+
[ ]*64: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0068 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+006c <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0070 <[^>]*> daddiu \$at,\$gp,0
+0+0068 <[^>]*> ldl a0,[07]\(at\)
+0+006c <[^>]*> ldr a0,[07]\(at\)
+0+0070 <[^>]*> daddiu at,gp,0
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0074 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0078 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+007c <[^>]*> lui \$at,0x0
+0+0074 <[^>]*> ldl a0,[07]\(at\)
+0+0078 <[^>]*> ldr a0,[07]\(at\)
+0+007c <[^>]*> lui at,0x0
[ ]*7c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0080 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+0080 <[^>]*> daddiu at,at,[-0-9]+
[ ]*80: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0084 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0088 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+008c <[^>]*> daddiu \$at,\$gp,0
+0+0084 <[^>]*> ldl a0,[07]\(at\)
+0+0088 <[^>]*> ldr a0,[07]\(at\)
+0+008c <[^>]*> daddiu at,gp,0
[ ]*8c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0090 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0094 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0098 <[^>]*> lui \$at,[-0-9x]+
+0+0090 <[^>]*> ldl a0,[07]\(at\)
+0+0094 <[^>]*> ldr a0,[07]\(at\)
+0+0098 <[^>]*> lui at,[-0-9x]+
[ ]*98: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+009c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+009c <[^>]*> daddiu at,at,[-0-9]+
[ ]*9c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00a0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+00a4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+00a8 <[^>]*> daddiu \$at,\$gp,[-0-9]+
+0+00a0 <[^>]*> ldl a0,[07]\(at\)
+0+00a4 <[^>]*> ldr a0,[07]\(at\)
+0+00a8 <[^>]*> daddiu at,gp,[-0-9]+
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00ac <[^>]*> ldl \$a0,[07]\(\$at\)
-0+00b0 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+00b4 <[^>]*> lui \$at,0x0
+0+00ac <[^>]*> ldl a0,[07]\(at\)
+0+00b0 <[^>]*> ldr a0,[07]\(at\)
+0+00b4 <[^>]*> lui at,0x0
[ ]*b4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00b8 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+00b8 <[^>]*> daddiu at,at,[-0-9]+
[ ]*b8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00bc <[^>]*> ldl \$a0,[07]\(\$at\)
-0+00c0 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+00c4 <[^>]*> lui \$at,0x0
+0+00bc <[^>]*> ldl a0,[07]\(at\)
+0+00c0 <[^>]*> ldr a0,[07]\(at\)
+0+00c4 <[^>]*> lui at,0x0
[ ]*c4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00c8 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+00c8 <[^>]*> daddiu at,at,[-0-9]+
[ ]*c8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00cc <[^>]*> ldl \$a0,[07]\(\$at\)
-0+00d0 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+00d4 <[^>]*> daddiu \$at,\$gp,1
+0+00cc <[^>]*> ldl a0,[07]\(at\)
+0+00d0 <[^>]*> ldr a0,[07]\(at\)
+0+00d4 <[^>]*> daddiu at,gp,1
[ ]*d4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00d8 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+00dc <[^>]*> ldr \$a0,[07]\(\$at\)
-0+00e0 <[^>]*> lui \$at,0x0
+0+00d8 <[^>]*> ldl a0,[07]\(at\)
+0+00dc <[^>]*> ldr a0,[07]\(at\)
+0+00e0 <[^>]*> lui at,0x0
[ ]*e0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00e4 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+00e4 <[^>]*> daddiu at,at,[-0-9]+
[ ]*e4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00e8 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+00ec <[^>]*> ldr \$a0,[07]\(\$at\)
-0+00f0 <[^>]*> daddiu \$at,\$gp,1
+0+00e8 <[^>]*> ldl a0,[07]\(at\)
+0+00ec <[^>]*> ldr a0,[07]\(at\)
+0+00f0 <[^>]*> daddiu at,gp,1
[ ]*f0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00f4 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+00f8 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+00fc <[^>]*> lui \$at,0x0
+0+00f4 <[^>]*> ldl a0,[07]\(at\)
+0+00f8 <[^>]*> ldr a0,[07]\(at\)
+0+00fc <[^>]*> lui at,0x0
[ ]*fc: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0100 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+0100 <[^>]*> daddiu at,at,[-0-9]+
[ ]*100: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0104 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0108 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+010c <[^>]*> daddiu \$at,\$gp,[-0-9]+
+0+0104 <[^>]*> ldl a0,[07]\(at\)
+0+0108 <[^>]*> ldr a0,[07]\(at\)
+0+010c <[^>]*> daddiu at,gp,[-0-9]+
[ ]*10c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0110 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0114 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0118 <[^>]*> lui \$at,[-0-9x]+
+0+0110 <[^>]*> ldl a0,[07]\(at\)
+0+0114 <[^>]*> ldr a0,[07]\(at\)
+0+0118 <[^>]*> lui at,[-0-9x]+
[ ]*118: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+011c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+011c <[^>]*> daddiu at,at,[-0-9]+
[ ]*11c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0120 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0124 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0128 <[^>]*> lui \$at,[-0-9x]+
+0+0120 <[^>]*> ldl a0,[07]\(at\)
+0+0124 <[^>]*> ldr a0,[07]\(at\)
+0+0128 <[^>]*> lui at,[-0-9x]+
[ ]*128: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+012c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+012c <[^>]*> daddiu at,at,[-0-9]+
[ ]*12c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0130 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0134 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0138 <[^>]*> lui \$at,[-0-9x]+
+0+0130 <[^>]*> ldl a0,[07]\(at\)
+0+0134 <[^>]*> ldr a0,[07]\(at\)
+0+0138 <[^>]*> lui at,[-0-9x]+
[ ]*138: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+013c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+013c <[^>]*> daddiu at,at,[-0-9]+
[ ]*13c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0140 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0144 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0148 <[^>]*> lui \$at,[-0-9x]+
+0+0140 <[^>]*> ldl a0,[07]\(at\)
+0+0144 <[^>]*> ldr a0,[07]\(at\)
+0+0148 <[^>]*> lui at,[-0-9x]+
[ ]*148: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+014c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+014c <[^>]*> daddiu at,at,[-0-9]+
[ ]*14c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0150 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0154 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0158 <[^>]*> lui \$at,[-0-9x]+
+0+0150 <[^>]*> ldl a0,[07]\(at\)
+0+0154 <[^>]*> ldr a0,[07]\(at\)
+0+0158 <[^>]*> lui at,[-0-9x]+
[ ]*158: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+015c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+015c <[^>]*> daddiu at,at,[-0-9]+
[ ]*15c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0160 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0164 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0168 <[^>]*> lui \$at,[-0-9x]+
+0+0160 <[^>]*> ldl a0,[07]\(at\)
+0+0164 <[^>]*> ldr a0,[07]\(at\)
+0+0168 <[^>]*> lui at,[-0-9x]+
[ ]*168: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+016c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+016c <[^>]*> daddiu at,at,[-0-9]+
[ ]*16c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0170 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0174 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0178 <[^>]*> lui \$at,[-0-9x]+
+0+0170 <[^>]*> ldl a0,[07]\(at\)
+0+0174 <[^>]*> ldr a0,[07]\(at\)
+0+0178 <[^>]*> lui at,[-0-9x]+
[ ]*178: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+017c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+017c <[^>]*> daddiu at,at,[-0-9]+
[ ]*17c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0180 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0184 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0188 <[^>]*> lui \$at,0x0
+0+0180 <[^>]*> ldl a0,[07]\(at\)
+0+0184 <[^>]*> ldr a0,[07]\(at\)
+0+0188 <[^>]*> lui at,0x0
[ ]*188: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+018c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+018c <[^>]*> daddiu at,at,[-0-9]+
[ ]*18c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0190 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0194 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0198 <[^>]*> lui \$at,0x0
+0+0190 <[^>]*> ldl a0,[07]\(at\)
+0+0194 <[^>]*> ldr a0,[07]\(at\)
+0+0198 <[^>]*> lui at,0x0
[ ]*198: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+019c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+019c <[^>]*> daddiu at,at,[-0-9]+
[ ]*19c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01a0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+01a4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+01a8 <[^>]*> lui \$at,0x0
+0+01a0 <[^>]*> ldl a0,[07]\(at\)
+0+01a4 <[^>]*> ldr a0,[07]\(at\)
+0+01a8 <[^>]*> lui at,0x0
[ ]*1a8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+01ac <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01ac <[^>]*> daddiu at,at,[-0-9]+
[ ]*1ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+01b0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+01b4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+01b8 <[^>]*> lui \$at,0x0
+0+01b0 <[^>]*> ldl a0,[07]\(at\)
+0+01b4 <[^>]*> ldr a0,[07]\(at\)
+0+01b8 <[^>]*> lui at,0x0
[ ]*1b8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01bc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01bc <[^>]*> daddiu at,at,[-0-9]+
[ ]*1bc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01c0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+01c4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+01c8 <[^>]*> lui \$at,0x0
+0+01c0 <[^>]*> ldl a0,[07]\(at\)
+0+01c4 <[^>]*> ldr a0,[07]\(at\)
+0+01c8 <[^>]*> lui at,0x0
[ ]*1c8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+01cc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01cc <[^>]*> daddiu at,at,[-0-9]+
[ ]*1cc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+01d0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+01d4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+01d8 <[^>]*> lui \$at,0x0
+0+01d0 <[^>]*> ldl a0,[07]\(at\)
+0+01d4 <[^>]*> ldr a0,[07]\(at\)
+0+01d8 <[^>]*> lui at,0x0
[ ]*1d8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+01dc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01dc <[^>]*> daddiu at,at,[-0-9]+
[ ]*1dc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01e0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+01e4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+01e8 <[^>]*> lui \$at,0x0
+0+01e0 <[^>]*> ldl a0,[07]\(at\)
+0+01e4 <[^>]*> ldr a0,[07]\(at\)
+0+01e8 <[^>]*> lui at,0x0
[ ]*1e8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+01ec <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01ec <[^>]*> daddiu at,at,[-0-9]+
[ ]*1ec: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+01f0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+01f4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+01f8 <[^>]*> lui \$at,[-0-9x]+
+0+01f0 <[^>]*> ldl a0,[07]\(at\)
+0+01f4 <[^>]*> ldr a0,[07]\(at\)
+0+01f8 <[^>]*> lui at,[-0-9x]+
[ ]*1f8: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+01fc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01fc <[^>]*> daddiu at,at,[-0-9]+
[ ]*1fc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0200 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0204 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0208 <[^>]*> lui \$at,[-0-9x]+
+0+0200 <[^>]*> ldl a0,[07]\(at\)
+0+0204 <[^>]*> ldr a0,[07]\(at\)
+0+0208 <[^>]*> lui at,[-0-9x]+
[ ]*208: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+020c <[^>]*> daddiu \$at,\$at,0
+0+020c <[^>]*> daddiu at,at,0
[ ]*20c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0210 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0214 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0218 <[^>]*> lui \$at,[-0-9x]+
+0+0210 <[^>]*> ldl a0,[07]\(at\)
+0+0214 <[^>]*> ldr a0,[07]\(at\)
+0+0218 <[^>]*> lui at,[-0-9x]+
[ ]*218: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+021c <[^>]*> daddiu \$at,\$at,0
+0+021c <[^>]*> daddiu at,at,0
[ ]*21c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0220 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0224 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0228 <[^>]*> lui \$at,[-0-9x]+
+0+0220 <[^>]*> ldl a0,[07]\(at\)
+0+0224 <[^>]*> ldr a0,[07]\(at\)
+0+0228 <[^>]*> lui at,[-0-9x]+
[ ]*228: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+022c <[^>]*> daddiu \$at,\$at,0
+0+022c <[^>]*> daddiu at,at,0
[ ]*22c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0230 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0234 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0238 <[^>]*> lui \$at,[-0-9x]+
+0+0230 <[^>]*> ldl a0,[07]\(at\)
+0+0234 <[^>]*> ldr a0,[07]\(at\)
+0+0238 <[^>]*> lui at,[-0-9x]+
[ ]*238: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+023c <[^>]*> daddiu \$at,\$at,0
+0+023c <[^>]*> daddiu at,at,0
[ ]*23c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0240 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0244 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0248 <[^>]*> lui \$at,[-0-9x]+
+0+0240 <[^>]*> ldl a0,[07]\(at\)
+0+0244 <[^>]*> ldr a0,[07]\(at\)
+0+0248 <[^>]*> lui at,[-0-9x]+
[ ]*248: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+024c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+024c <[^>]*> daddiu at,at,[-0-9]+
[ ]*24c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0250 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0254 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0258 <[^>]*> lui \$at,[-0-9x]+
+0+0250 <[^>]*> ldl a0,[07]\(at\)
+0+0254 <[^>]*> ldr a0,[07]\(at\)
+0+0258 <[^>]*> lui at,[-0-9x]+
[ ]*258: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+025c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+025c <[^>]*> daddiu at,at,[-0-9]+
[ ]*25c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0260 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0264 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0268 <[^>]*> lui \$at,[-0-9x]+
+0+0260 <[^>]*> ldl a0,[07]\(at\)
+0+0264 <[^>]*> ldr a0,[07]\(at\)
+0+0268 <[^>]*> lui at,[-0-9x]+
[ ]*268: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+026c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+026c <[^>]*> daddiu at,at,[-0-9]+
[ ]*26c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0270 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0274 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0278 <[^>]*> lui \$at,[-0-9x]+
+0+0270 <[^>]*> ldl a0,[07]\(at\)
+0+0274 <[^>]*> ldr a0,[07]\(at\)
+0+0278 <[^>]*> lui at,[-0-9x]+
[ ]*278: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+027c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+027c <[^>]*> daddiu at,at,[-0-9]+
[ ]*27c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0280 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0284 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0288 <[^>]*> lui \$at,[-0-9x]+
+0+0280 <[^>]*> ldl a0,[07]\(at\)
+0+0284 <[^>]*> ldr a0,[07]\(at\)
+0+0288 <[^>]*> lui at,[-0-9x]+
[ ]*288: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+028c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+028c <[^>]*> daddiu at,at,[-0-9]+
[ ]*28c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0290 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+0294 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+0298 <[^>]*> lui \$at,[-0-9x]+
+0+0290 <[^>]*> ldl a0,[07]\(at\)
+0+0294 <[^>]*> ldr a0,[07]\(at\)
+0+0298 <[^>]*> lui at,[-0-9x]+
[ ]*298: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+029c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+029c <[^>]*> daddiu at,at,[-0-9]+
[ ]*29c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02a0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+02a4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+02a8 <[^>]*> lui \$at,[-0-9x]+
+0+02a0 <[^>]*> ldl a0,[07]\(at\)
+0+02a4 <[^>]*> ldr a0,[07]\(at\)
+0+02a8 <[^>]*> lui at,[-0-9x]+
[ ]*2a8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02ac <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+02ac <[^>]*> daddiu at,at,[-0-9]+
[ ]*2ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+02b0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+02b4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+02b8 <[^>]*> lui \$at,[-0-9x]+
+0+02b0 <[^>]*> ldl a0,[07]\(at\)
+0+02b4 <[^>]*> ldr a0,[07]\(at\)
+0+02b8 <[^>]*> lui at,[-0-9x]+
[ ]*2b8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02bc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+02bc <[^>]*> daddiu at,at,[-0-9]+
[ ]*2bc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02c0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+02c4 <[^>]*> ldr \$a0,[07]\(\$at\)
-0+02c8 <[^>]*> lui \$at,[-0-9x]+
+0+02c0 <[^>]*> ldl a0,[07]\(at\)
+0+02c4 <[^>]*> ldr a0,[07]\(at\)
+0+02c8 <[^>]*> lui at,[-0-9x]+
[ ]*2c8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+02cc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+02cc <[^>]*> daddiu at,at,[-0-9]+
[ ]*2cc: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+02d0 <[^>]*> ldl \$a0,[07]\(\$at\)
-0+02d4 <[^>]*> ldr \$a0,[07]\(\$at\)
+0+02d0 <[^>]*> ldl a0,[07]\(at\)
+0+02d4 <[^>]*> ldr a0,[07]\(at\)
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-empic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-empic.d
index 945f06b624e..133b32c4ac4 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-empic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-empic.d
@@ -8,84 +8,84 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> addiu \$at,\$gp,-16384
+0+0000 <[^>]*> addiu at,gp,-16384
[ ]*0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0004 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0008 <[^>]*> lbu \$at,[01]\(\$at\)
-0+000c <[^>]*> sll \$a0,\$a0,0x8
-0+0010 <[^>]*> or \$a0,\$a0,\$at
-0+0014 <[^>]*> addiu \$at,\$gp,0
+0+0004 <[^>]*> lb a0,[01]\(at\)
+0+0008 <[^>]*> lbu at,[01]\(at\)
+0+000c <[^>]*> sll a0,a0,0x8
+0+0010 <[^>]*> or a0,a0,at
+0+0014 <[^>]*> addiu at,gp,0
[ ]*14: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+0018 <[^>]*> lbu \$a0,[01]\(\$at\)
-0+001c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0020 <[^>]*> sll \$a0,\$a0,0x8
-0+0024 <[^>]*> or \$a0,\$a0,\$at
-0+0028 <[^>]*> addiu \$at,\$gp,0
+0+0018 <[^>]*> lbu a0,[01]\(at\)
+0+001c <[^>]*> lbu at,[01]\(at\)
+0+0020 <[^>]*> sll a0,a0,0x8
+0+0024 <[^>]*> or a0,a0,at
+0+0028 <[^>]*> addiu at,gp,0
[ ]*28: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+002c <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0030 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0034 <[^>]*> addiu \$at,\$gp,0
+0+002c <[^>]*> lwl a0,[03]\(at\)
+0+0030 <[^>]*> lwr a0,[03]\(at\)
+0+0034 <[^>]*> addiu at,gp,0
[ ]*34: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+0038 <[^>]*> sb \$a0,[01]\(\$at\)
-0+003c <[^>]*> srl \$a0,\$a0,0x8
-0+0040 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0044 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0048 <[^>]*> sll \$a0,\$a0,0x8
-0+004c <[^>]*> or \$a0,\$a0,\$at
-0+0050 <[^>]*> addiu \$at,\$gp,0
+0+0038 <[^>]*> sb a0,[01]\(at\)
+0+003c <[^>]*> srl a0,a0,0x8
+0+0040 <[^>]*> sb a0,[01]\(at\)
+0+0044 <[^>]*> lbu at,[01]\(at\)
+0+0048 <[^>]*> sll a0,a0,0x8
+0+004c <[^>]*> or a0,a0,at
+0+0050 <[^>]*> addiu at,gp,0
[ ]*50: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0054 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0058 <[^>]*> swr \$a0,[03]\(\$at\)
-0+005c <[^>]*> addiu \$at,\$gp,-16384
+0+0054 <[^>]*> swl a0,[03]\(at\)
+0+0058 <[^>]*> swr a0,[03]\(at\)
+0+005c <[^>]*> addiu at,gp,-16384
[ ]*5c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0060 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0064 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0068 <[^>]*> sll \$a0,\$a0,0x8
-0+006c <[^>]*> or \$a0,\$a0,\$at
-0+0070 <[^>]*> addiu \$at,\$gp,-15384
+0+0060 <[^>]*> lb a0,[01]\(at\)
+0+0064 <[^>]*> lbu at,[01]\(at\)
+0+0068 <[^>]*> sll a0,a0,0x8
+0+006c <[^>]*> or a0,a0,at
+0+0070 <[^>]*> addiu at,gp,-15384
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0074 <[^>]*> lbu \$a0,[01]\(\$at\)
-0+0078 <[^>]*> lbu \$at,[01]\(\$at\)
-0+007c <[^>]*> sll \$a0,\$a0,0x8
-0+0080 <[^>]*> or \$a0,\$a0,\$at
-0+0084 <[^>]*> addiu \$at,\$gp,-16383
+0+0074 <[^>]*> lbu a0,[01]\(at\)
+0+0078 <[^>]*> lbu at,[01]\(at\)
+0+007c <[^>]*> sll a0,a0,0x8
+0+0080 <[^>]*> or a0,a0,at
+0+0084 <[^>]*> addiu at,gp,-16383
[ ]*84: [A-Z0-9_]*GPREL[A-Z0-9_]* .sdata.*
-0+0088 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+008c <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0090 <[^>]*> addiu \$at,\$gp,1
+0+0088 <[^>]*> lwl a0,[03]\(at\)
+0+008c <[^>]*> lwr a0,[03]\(at\)
+0+0090 <[^>]*> addiu at,gp,1
[ ]*90: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_data_label
-0+0094 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0098 <[^>]*> srl \$a0,\$a0,0x8
-0+009c <[^>]*> sb \$a0,[01]\(\$at\)
-0+00a0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00a4 <[^>]*> sll \$a0,\$a0,0x8
-0+00a8 <[^>]*> or \$a0,\$a0,\$at
-0+00ac <[^>]*> addiu \$at,\$gp,1
+0+0094 <[^>]*> sb a0,[01]\(at\)
+0+0098 <[^>]*> srl a0,a0,0x8
+0+009c <[^>]*> sb a0,[01]\(at\)
+0+00a0 <[^>]*> lbu at,[01]\(at\)
+0+00a4 <[^>]*> sll a0,a0,0x8
+0+00a8 <[^>]*> or a0,a0,at
+0+00ac <[^>]*> addiu at,gp,1
[ ]*ac: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00b0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+00b4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+00b8 <[^>]*> addiu \$at,\$gp,1
+0+00b0 <[^>]*> swl a0,[03]\(at\)
+0+00b4 <[^>]*> swr a0,[03]\(at\)
+0+00b8 <[^>]*> addiu at,gp,1
[ ]*b8: [A-Z0-9_]*GPREL[A-Z0-9_]* big_external_common
-0+00bc <[^>]*> lb \$a0,[01]\(\$at\)
-0+00c0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00c4 <[^>]*> sll \$a0,\$a0,0x8
-0+00c8 <[^>]*> or \$a0,\$a0,\$at
-0+00cc <[^>]*> addiu \$at,\$gp,1
+0+00bc <[^>]*> lb a0,[01]\(at\)
+0+00c0 <[^>]*> lbu at,[01]\(at\)
+0+00c4 <[^>]*> sll a0,a0,0x8
+0+00c8 <[^>]*> or a0,a0,at
+0+00cc <[^>]*> addiu at,gp,1
[ ]*cc: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00d0 <[^>]*> lbu \$a0,[01]\(\$at\)
-0+00d4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00d8 <[^>]*> sll \$a0,\$a0,0x8
-0+00dc <[^>]*> or \$a0,\$a0,\$at
-0+00e0 <[^>]*> addiu \$at,\$gp,-16383
+0+00d0 <[^>]*> lbu a0,[01]\(at\)
+0+00d4 <[^>]*> lbu at,[01]\(at\)
+0+00d8 <[^>]*> sll a0,a0,0x8
+0+00dc <[^>]*> or a0,a0,at
+0+00e0 <[^>]*> addiu at,gp,-16383
[ ]*e0: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00e4 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+00e8 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+00ec <[^>]*> addiu \$at,\$gp,-15383
+0+00e4 <[^>]*> lwl a0,[03]\(at\)
+0+00e8 <[^>]*> lwr a0,[03]\(at\)
+0+00ec <[^>]*> addiu at,gp,-15383
[ ]*ec: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00f0 <[^>]*> sb \$a0,[01]\(\$at\)
-0+00f4 <[^>]*> srl \$a0,\$a0,0x8
-0+00f8 <[^>]*> sb \$a0,[01]\(\$at\)
-0+00fc <[^>]*> lbu \$at,[01]\(\$at\)
-0+0100 <[^>]*> sll \$a0,\$a0,0x8
-0+0104 <[^>]*> or \$a0,\$a0,\$at
+0+00f0 <[^>]*> sb a0,[01]\(at\)
+0+00f4 <[^>]*> srl a0,a0,0x8
+0+00f8 <[^>]*> sb a0,[01]\(at\)
+0+00fc <[^>]*> lbu at,[01]\(at\)
+0+0100 <[^>]*> sll a0,a0,0x8
+0+0104 <[^>]*> or a0,a0,at
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-svr4pic.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-svr4pic.d
index 86e33bd6bc5..c24e9a63f23 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-svr4pic.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-svr4pic.d
@@ -8,117 +8,117 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lw \$at,0\(\$gp\)
+0+0000 <[^>]*> lw at,0\(gp\)
[ ]*0: R_MIPS_GOT16 .data
0+0004 <[^>]*> nop
-0+0008 <[^>]*> addiu \$at,\$at,0
+0+0008 <[^>]*> addiu at,at,0
[ ]*8: R_MIPS_LO16 .data
-0+000c <[^>]*> lb \$a0,0\(\$at\)
-0+0010 <[^>]*> lbu \$at,1\(\$at\)
-0+0014 <[^>]*> sll \$a0,\$a0,0x8
-0+0018 <[^>]*> or \$a0,\$a0,\$at
-0+001c <[^>]*> lw \$at,0\(\$gp\)
+0+000c <[^>]*> lb a0,0\(at\)
+0+0010 <[^>]*> lbu at,1\(at\)
+0+0014 <[^>]*> sll a0,a0,0x8
+0+0018 <[^>]*> or a0,a0,at
+0+001c <[^>]*> lw at,0\(gp\)
[ ]*1c: R_MIPS_GOT16 big_external_data_label
0+0020 <[^>]*> nop
-0+0024 <[^>]*> lbu \$a0,0\(\$at\)
-0+0028 <[^>]*> lbu \$at,1\(\$at\)
-0+002c <[^>]*> sll \$a0,\$a0,0x8
-0+0030 <[^>]*> or \$a0,\$a0,\$at
-0+0034 <[^>]*> lw \$at,0\(\$gp\)
+0+0024 <[^>]*> lbu a0,0\(at\)
+0+0028 <[^>]*> lbu at,1\(at\)
+0+002c <[^>]*> sll a0,a0,0x8
+0+0030 <[^>]*> or a0,a0,at
+0+0034 <[^>]*> lw at,0\(gp\)
[ ]*34: R_MIPS_GOT16 small_external_data_label
0+0038 <[^>]*> nop
-0+003c <[^>]*> lwl \$a0,0\(\$at\)
-0+0040 <[^>]*> lwr \$a0,3\(\$at\)
-0+0044 <[^>]*> lw \$at,0\(\$gp\)
+0+003c <[^>]*> lwl a0,0\(at\)
+0+0040 <[^>]*> lwr a0,3\(at\)
+0+0044 <[^>]*> lw at,0\(gp\)
[ ]*44: R_MIPS_GOT16 big_external_common
0+0048 <[^>]*> nop
-0+004c <[^>]*> sb \$a0,1\(\$at\)
-0+0050 <[^>]*> srl \$a0,\$a0,0x8
-0+0054 <[^>]*> sb \$a0,0\(\$at\)
-0+0058 <[^>]*> lbu \$at,1\(\$at\)
-0+005c <[^>]*> sll \$a0,\$a0,0x8
-0+0060 <[^>]*> or \$a0,\$a0,\$at
-0+0064 <[^>]*> lw \$at,0\(\$gp\)
+0+004c <[^>]*> sb a0,1\(at\)
+0+0050 <[^>]*> srl a0,a0,0x8
+0+0054 <[^>]*> sb a0,0\(at\)
+0+0058 <[^>]*> lbu at,1\(at\)
+0+005c <[^>]*> sll a0,a0,0x8
+0+0060 <[^>]*> or a0,a0,at
+0+0064 <[^>]*> lw at,0\(gp\)
[ ]*64: R_MIPS_GOT16 small_external_common
0+0068 <[^>]*> nop
-0+006c <[^>]*> swl \$a0,0\(\$at\)
-0+0070 <[^>]*> swr \$a0,3\(\$at\)
-0+0074 <[^>]*> lw \$at,0\(\$gp\)
+0+006c <[^>]*> swl a0,0\(at\)
+0+0070 <[^>]*> swr a0,3\(at\)
+0+0074 <[^>]*> lw at,0\(gp\)
[ ]*74: R_MIPS_GOT16 .bss
0+0078 <[^>]*> nop
-0+007c <[^>]*> addiu \$at,\$at,0
+0+007c <[^>]*> addiu at,at,0
[ ]*7c: R_MIPS_LO16 .bss
-0+0080 <[^>]*> lb \$a0,0\(\$at\)
-0+0084 <[^>]*> lbu \$at,1\(\$at\)
-0+0088 <[^>]*> sll \$a0,\$a0,0x8
-0+008c <[^>]*> or \$a0,\$a0,\$at
-0+0090 <[^>]*> lw \$at,0\(\$gp\)
+0+0080 <[^>]*> lb a0,0\(at\)
+0+0084 <[^>]*> lbu at,1\(at\)
+0+0088 <[^>]*> sll a0,a0,0x8
+0+008c <[^>]*> or a0,a0,at
+0+0090 <[^>]*> lw at,0\(gp\)
[ ]*90: R_MIPS_GOT16 .bss
0+0094 <[^>]*> nop
-0+0098 <[^>]*> addiu \$at,\$at,1000
+0+0098 <[^>]*> addiu at,at,1000
[ ]*98: R_MIPS_LO16 .bss
-0+009c <[^>]*> lbu \$a0,0\(\$at\)
-0+00a0 <[^>]*> lbu \$at,1\(\$at\)
-0+00a4 <[^>]*> sll \$a0,\$a0,0x8
-0+00a8 <[^>]*> or \$a0,\$a0,\$at
-0+00ac <[^>]*> lw \$at,0\(\$gp\)
+0+009c <[^>]*> lbu a0,0\(at\)
+0+00a0 <[^>]*> lbu at,1\(at\)
+0+00a4 <[^>]*> sll a0,a0,0x8
+0+00a8 <[^>]*> or a0,a0,at
+0+00ac <[^>]*> lw at,0\(gp\)
[ ]*ac: R_MIPS_GOT16 .data
0+00b0 <[^>]*> nop
-0+00b4 <[^>]*> addiu \$at,\$at,0
+0+00b4 <[^>]*> addiu at,at,0
[ ]*b4: R_MIPS_LO16 .data
-0+00b8 <[^>]*> addiu \$at,\$at,1
-0+00bc <[^>]*> lwl \$a0,0\(\$at\)
-0+00c0 <[^>]*> lwr \$a0,3\(\$at\)
-0+00c4 <[^>]*> lw \$at,0\(\$gp\)
+0+00b8 <[^>]*> addiu at,at,1
+0+00bc <[^>]*> lwl a0,0\(at\)
+0+00c0 <[^>]*> lwr a0,3\(at\)
+0+00c4 <[^>]*> lw at,0\(gp\)
[ ]*c4: R_MIPS_GOT16 big_external_data_label
0+00c8 <[^>]*> nop
-0+00cc <[^>]*> addiu \$at,\$at,1
-0+00d0 <[^>]*> sb \$a0,1\(\$at\)
-0+00d4 <[^>]*> srl \$a0,\$a0,0x8
-0+00d8 <[^>]*> sb \$a0,0\(\$at\)
-0+00dc <[^>]*> lbu \$at,1\(\$at\)
-0+00e0 <[^>]*> sll \$a0,\$a0,0x8
-0+00e4 <[^>]*> or \$a0,\$a0,\$at
-0+00e8 <[^>]*> lw \$at,0\(\$gp\)
+0+00cc <[^>]*> addiu at,at,1
+0+00d0 <[^>]*> sb a0,1\(at\)
+0+00d4 <[^>]*> srl a0,a0,0x8
+0+00d8 <[^>]*> sb a0,0\(at\)
+0+00dc <[^>]*> lbu at,1\(at\)
+0+00e0 <[^>]*> sll a0,a0,0x8
+0+00e4 <[^>]*> or a0,a0,at
+0+00e8 <[^>]*> lw at,0\(gp\)
[ ]*e8: R_MIPS_GOT16 small_external_data_label
0+00ec <[^>]*> nop
-0+00f0 <[^>]*> addiu \$at,\$at,1
-0+00f4 <[^>]*> swl \$a0,0\(\$at\)
-0+00f8 <[^>]*> swr \$a0,3\(\$at\)
-0+00fc <[^>]*> lw \$at,0\(\$gp\)
+0+00f0 <[^>]*> addiu at,at,1
+0+00f4 <[^>]*> swl a0,0\(at\)
+0+00f8 <[^>]*> swr a0,3\(at\)
+0+00fc <[^>]*> lw at,0\(gp\)
[ ]*fc: R_MIPS_GOT16 big_external_common
0+0100 <[^>]*> nop
-0+0104 <[^>]*> addiu \$at,\$at,1
-0+0108 <[^>]*> lb \$a0,0\(\$at\)
-0+010c <[^>]*> lbu \$at,1\(\$at\)
-0+0110 <[^>]*> sll \$a0,\$a0,0x8
-0+0114 <[^>]*> or \$a0,\$a0,\$at
-0+0118 <[^>]*> lw \$at,0\(\$gp\)
+0+0104 <[^>]*> addiu at,at,1
+0+0108 <[^>]*> lb a0,0\(at\)
+0+010c <[^>]*> lbu at,1\(at\)
+0+0110 <[^>]*> sll a0,a0,0x8
+0+0114 <[^>]*> or a0,a0,at
+0+0118 <[^>]*> lw at,0\(gp\)
[ ]*118: R_MIPS_GOT16 small_external_common
0+011c <[^>]*> nop
-0+0120 <[^>]*> addiu \$at,\$at,1
-0+0124 <[^>]*> lbu \$a0,0\(\$at\)
-0+0128 <[^>]*> lbu \$at,1\(\$at\)
-0+012c <[^>]*> sll \$a0,\$a0,0x8
-0+0130 <[^>]*> or \$a0,\$a0,\$at
-0+0134 <[^>]*> lw \$at,0\(\$gp\)
+0+0120 <[^>]*> addiu at,at,1
+0+0124 <[^>]*> lbu a0,0\(at\)
+0+0128 <[^>]*> lbu at,1\(at\)
+0+012c <[^>]*> sll a0,a0,0x8
+0+0130 <[^>]*> or a0,a0,at
+0+0134 <[^>]*> lw at,0\(gp\)
[ ]*134: R_MIPS_GOT16 .bss
0+0138 <[^>]*> nop
-0+013c <[^>]*> addiu \$at,\$at,0
+0+013c <[^>]*> addiu at,at,0
[ ]*13c: R_MIPS_LO16 .bss
-0+0140 <[^>]*> addiu \$at,\$at,1
-0+0144 <[^>]*> lwl \$a0,0\(\$at\)
-0+0148 <[^>]*> lwr \$a0,3\(\$at\)
-0+014c <[^>]*> lw \$at,0\(\$gp\)
+0+0140 <[^>]*> addiu at,at,1
+0+0144 <[^>]*> lwl a0,0\(at\)
+0+0148 <[^>]*> lwr a0,3\(at\)
+0+014c <[^>]*> lw at,0\(gp\)
[ ]*14c: R_MIPS_GOT16 .bss
0+0150 <[^>]*> nop
-0+0154 <[^>]*> addiu \$at,\$at,1000
+0+0154 <[^>]*> addiu at,at,1000
[ ]*154: R_MIPS_LO16 .bss
-0+0158 <[^>]*> addiu \$at,\$at,1
-0+015c <[^>]*> sb \$a0,1\(\$at\)
-0+0160 <[^>]*> srl \$a0,\$a0,0x8
-0+0164 <[^>]*> sb \$a0,0\(\$at\)
-0+0168 <[^>]*> lbu \$at,1\(\$at\)
-0+016c <[^>]*> sll \$a0,\$a0,0x8
-0+0170 <[^>]*> or \$a0,\$a0,\$at
+0+0158 <[^>]*> addiu at,at,1
+0+015c <[^>]*> sb a0,1\(at\)
+0+0160 <[^>]*> srl a0,a0,0x8
+0+0164 <[^>]*> sb a0,0\(at\)
+0+0168 <[^>]*> lbu at,1\(at\)
+0+016c <[^>]*> sll a0,a0,0x8
+0+0170 <[^>]*> or a0,a0,at
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-xgot.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-xgot.d
index 982f9ce5c7b..96d47ddc79f 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-xgot.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh-xgot.d
@@ -8,147 +8,147 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lw \$at,0\(\$gp\)
+0+0000 <[^>]*> lw at,0\(gp\)
[ ]*0: R_MIPS_GOT16 .data
0+0004 <[^>]*> nop
-0+0008 <[^>]*> addiu \$at,\$at,0
+0+0008 <[^>]*> addiu at,at,0
[ ]*8: R_MIPS_LO16 .data
0+000c <[^>]*> nop
-0+0010 <[^>]*> lb \$a0,0\(\$at\)
-0+0014 <[^>]*> lbu \$at,1\(\$at\)
-0+0018 <[^>]*> sll \$a0,\$a0,0x8
-0+001c <[^>]*> or \$a0,\$a0,\$at
-0+0020 <[^>]*> lui \$at,0x0
+0+0010 <[^>]*> lb a0,0\(at\)
+0+0014 <[^>]*> lbu at,1\(at\)
+0+0018 <[^>]*> sll a0,a0,0x8
+0+001c <[^>]*> or a0,a0,at
+0+0020 <[^>]*> lui at,0x0
[ ]*20: R_MIPS_GOT_HI16 big_external_data_label
-0+0024 <[^>]*> addu \$at,\$at,\$gp
-0+0028 <[^>]*> lw \$at,0\(\$at\)
+0+0024 <[^>]*> addu at,at,gp
+0+0028 <[^>]*> lw at,0\(at\)
[ ]*28: R_MIPS_GOT_LO16 big_external_data_label
0+002c <[^>]*> nop
-0+0030 <[^>]*> lbu \$a0,0\(\$at\)
-0+0034 <[^>]*> lbu \$at,1\(\$at\)
-0+0038 <[^>]*> sll \$a0,\$a0,0x8
-0+003c <[^>]*> or \$a0,\$a0,\$at
-0+0040 <[^>]*> lui \$at,0x0
+0+0030 <[^>]*> lbu a0,0\(at\)
+0+0034 <[^>]*> lbu at,1\(at\)
+0+0038 <[^>]*> sll a0,a0,0x8
+0+003c <[^>]*> or a0,a0,at
+0+0040 <[^>]*> lui at,0x0
[ ]*40: R_MIPS_GOT_HI16 small_external_data_label
-0+0044 <[^>]*> addu \$at,\$at,\$gp
-0+0048 <[^>]*> lw \$at,0\(\$at\)
+0+0044 <[^>]*> addu at,at,gp
+0+0048 <[^>]*> lw at,0\(at\)
[ ]*48: R_MIPS_GOT_LO16 small_external_data_label
0+004c <[^>]*> nop
-0+0050 <[^>]*> lwl \$a0,0\(\$at\)
-0+0054 <[^>]*> lwr \$a0,3\(\$at\)
-0+0058 <[^>]*> lui \$at,0x0
+0+0050 <[^>]*> lwl a0,0\(at\)
+0+0054 <[^>]*> lwr a0,3\(at\)
+0+0058 <[^>]*> lui at,0x0
[ ]*58: R_MIPS_GOT_HI16 big_external_common
-0+005c <[^>]*> addu \$at,\$at,\$gp
-0+0060 <[^>]*> lw \$at,0\(\$at\)
+0+005c <[^>]*> addu at,at,gp
+0+0060 <[^>]*> lw at,0\(at\)
[ ]*60: R_MIPS_GOT_LO16 big_external_common
0+0064 <[^>]*> nop
-0+0068 <[^>]*> sb \$a0,1\(\$at\)
-0+006c <[^>]*> srl \$a0,\$a0,0x8
-0+0070 <[^>]*> sb \$a0,0\(\$at\)
-0+0074 <[^>]*> lbu \$at,1\(\$at\)
-0+0078 <[^>]*> sll \$a0,\$a0,0x8
-0+007c <[^>]*> or \$a0,\$a0,\$at
-0+0080 <[^>]*> lui \$at,0x0
+0+0068 <[^>]*> sb a0,1\(at\)
+0+006c <[^>]*> srl a0,a0,0x8
+0+0070 <[^>]*> sb a0,0\(at\)
+0+0074 <[^>]*> lbu at,1\(at\)
+0+0078 <[^>]*> sll a0,a0,0x8
+0+007c <[^>]*> or a0,a0,at
+0+0080 <[^>]*> lui at,0x0
[ ]*80: R_MIPS_GOT_HI16 small_external_common
-0+0084 <[^>]*> addu \$at,\$at,\$gp
-0+0088 <[^>]*> lw \$at,0\(\$at\)
+0+0084 <[^>]*> addu at,at,gp
+0+0088 <[^>]*> lw at,0\(at\)
[ ]*88: R_MIPS_GOT_LO16 small_external_common
0+008c <[^>]*> nop
-0+0090 <[^>]*> swl \$a0,0\(\$at\)
-0+0094 <[^>]*> swr \$a0,3\(\$at\)
-0+0098 <[^>]*> lw \$at,0\(\$gp\)
+0+0090 <[^>]*> swl a0,0\(at\)
+0+0094 <[^>]*> swr a0,3\(at\)
+0+0098 <[^>]*> lw at,0\(gp\)
[ ]*98: R_MIPS_GOT16 .bss
0+009c <[^>]*> nop
-0+00a0 <[^>]*> addiu \$at,\$at,0
+0+00a0 <[^>]*> addiu at,at,0
[ ]*a0: R_MIPS_LO16 .bss
0+00a4 <[^>]*> nop
-0+00a8 <[^>]*> lb \$a0,0\(\$at\)
-0+00ac <[^>]*> lbu \$at,1\(\$at\)
-0+00b0 <[^>]*> sll \$a0,\$a0,0x8
-0+00b4 <[^>]*> or \$a0,\$a0,\$at
-0+00b8 <[^>]*> lw \$at,0\(\$gp\)
+0+00a8 <[^>]*> lb a0,0\(at\)
+0+00ac <[^>]*> lbu at,1\(at\)
+0+00b0 <[^>]*> sll a0,a0,0x8
+0+00b4 <[^>]*> or a0,a0,at
+0+00b8 <[^>]*> lw at,0\(gp\)
[ ]*b8: R_MIPS_GOT16 .bss
0+00bc <[^>]*> nop
-0+00c0 <[^>]*> addiu \$at,\$at,1000
+0+00c0 <[^>]*> addiu at,at,1000
[ ]*c0: R_MIPS_LO16 .bss
0+00c4 <[^>]*> nop
-0+00c8 <[^>]*> lbu \$a0,0\(\$at\)
-0+00cc <[^>]*> lbu \$at,1\(\$at\)
-0+00d0 <[^>]*> sll \$a0,\$a0,0x8
-0+00d4 <[^>]*> or \$a0,\$a0,\$at
-0+00d8 <[^>]*> lw \$at,0\(\$gp\)
+0+00c8 <[^>]*> lbu a0,0\(at\)
+0+00cc <[^>]*> lbu at,1\(at\)
+0+00d0 <[^>]*> sll a0,a0,0x8
+0+00d4 <[^>]*> or a0,a0,at
+0+00d8 <[^>]*> lw at,0\(gp\)
[ ]*d8: R_MIPS_GOT16 .data
0+00dc <[^>]*> nop
-0+00e0 <[^>]*> addiu \$at,\$at,0
+0+00e0 <[^>]*> addiu at,at,0
[ ]*e0: R_MIPS_LO16 .data
0+00e4 <[^>]*> nop
-0+00e8 <[^>]*> addiu \$at,\$at,1
-0+00ec <[^>]*> lwl \$a0,0\(\$at\)
-0+00f0 <[^>]*> lwr \$a0,3\(\$at\)
-0+00f4 <[^>]*> lui \$at,0x0
+0+00e8 <[^>]*> addiu at,at,1
+0+00ec <[^>]*> lwl a0,0\(at\)
+0+00f0 <[^>]*> lwr a0,3\(at\)
+0+00f4 <[^>]*> lui at,0x0
[ ]*f4: R_MIPS_GOT_HI16 big_external_data_label
-0+00f8 <[^>]*> addu \$at,\$at,\$gp
-0+00fc <[^>]*> lw \$at,0\(\$at\)
+0+00f8 <[^>]*> addu at,at,gp
+0+00fc <[^>]*> lw at,0\(at\)
[ ]*fc: R_MIPS_GOT_LO16 big_external_data_label
0+0100 <[^>]*> nop
-0+0104 <[^>]*> addiu \$at,\$at,1
-0+0108 <[^>]*> sb \$a0,1\(\$at\)
-0+010c <[^>]*> srl \$a0,\$a0,0x8
-0+0110 <[^>]*> sb \$a0,0\(\$at\)
-0+0114 <[^>]*> lbu \$at,1\(\$at\)
-0+0118 <[^>]*> sll \$a0,\$a0,0x8
-0+011c <[^>]*> or \$a0,\$a0,\$at
-0+0120 <[^>]*> lui \$at,0x0
+0+0104 <[^>]*> addiu at,at,1
+0+0108 <[^>]*> sb a0,1\(at\)
+0+010c <[^>]*> srl a0,a0,0x8
+0+0110 <[^>]*> sb a0,0\(at\)
+0+0114 <[^>]*> lbu at,1\(at\)
+0+0118 <[^>]*> sll a0,a0,0x8
+0+011c <[^>]*> or a0,a0,at
+0+0120 <[^>]*> lui at,0x0
[ ]*120: R_MIPS_GOT_HI16 small_external_data_label
-0+0124 <[^>]*> addu \$at,\$at,\$gp
-0+0128 <[^>]*> lw \$at,0\(\$at\)
+0+0124 <[^>]*> addu at,at,gp
+0+0128 <[^>]*> lw at,0\(at\)
[ ]*128: R_MIPS_GOT_LO16 small_external_data_label
0+012c <[^>]*> nop
-0+0130 <[^>]*> addiu \$at,\$at,1
-0+0134 <[^>]*> swl \$a0,0\(\$at\)
-0+0138 <[^>]*> swr \$a0,3\(\$at\)
-0+013c <[^>]*> lui \$at,0x0
+0+0130 <[^>]*> addiu at,at,1
+0+0134 <[^>]*> swl a0,0\(at\)
+0+0138 <[^>]*> swr a0,3\(at\)
+0+013c <[^>]*> lui at,0x0
[ ]*13c: R_MIPS_GOT_HI16 big_external_common
-0+0140 <[^>]*> addu \$at,\$at,\$gp
-0+0144 <[^>]*> lw \$at,0\(\$at\)
+0+0140 <[^>]*> addu at,at,gp
+0+0144 <[^>]*> lw at,0\(at\)
[ ]*144: R_MIPS_GOT_LO16 big_external_common
0+0148 <[^>]*> nop
-0+014c <[^>]*> addiu \$at,\$at,1
-0+0150 <[^>]*> lb \$a0,0\(\$at\)
-0+0154 <[^>]*> lbu \$at,1\(\$at\)
-0+0158 <[^>]*> sll \$a0,\$a0,0x8
-0+015c <[^>]*> or \$a0,\$a0,\$at
-0+0160 <[^>]*> lui \$at,0x0
+0+014c <[^>]*> addiu at,at,1
+0+0150 <[^>]*> lb a0,0\(at\)
+0+0154 <[^>]*> lbu at,1\(at\)
+0+0158 <[^>]*> sll a0,a0,0x8
+0+015c <[^>]*> or a0,a0,at
+0+0160 <[^>]*> lui at,0x0
[ ]*160: R_MIPS_GOT_HI16 small_external_common
-0+0164 <[^>]*> addu \$at,\$at,\$gp
-0+0168 <[^>]*> lw \$at,0\(\$at\)
+0+0164 <[^>]*> addu at,at,gp
+0+0168 <[^>]*> lw at,0\(at\)
[ ]*168: R_MIPS_GOT_LO16 small_external_common
0+016c <[^>]*> nop
-0+0170 <[^>]*> addiu \$at,\$at,1
-0+0174 <[^>]*> lbu \$a0,0\(\$at\)
-0+0178 <[^>]*> lbu \$at,1\(\$at\)
-0+017c <[^>]*> sll \$a0,\$a0,0x8
-0+0180 <[^>]*> or \$a0,\$a0,\$at
-0+0184 <[^>]*> lw \$at,0\(\$gp\)
+0+0170 <[^>]*> addiu at,at,1
+0+0174 <[^>]*> lbu a0,0\(at\)
+0+0178 <[^>]*> lbu at,1\(at\)
+0+017c <[^>]*> sll a0,a0,0x8
+0+0180 <[^>]*> or a0,a0,at
+0+0184 <[^>]*> lw at,0\(gp\)
[ ]*184: R_MIPS_GOT16 .bss
0+0188 <[^>]*> nop
-0+018c <[^>]*> addiu \$at,\$at,0
+0+018c <[^>]*> addiu at,at,0
[ ]*18c: R_MIPS_LO16 .bss
0+0190 <[^>]*> nop
-0+0194 <[^>]*> addiu \$at,\$at,1
-0+0198 <[^>]*> lwl \$a0,0\(\$at\)
-0+019c <[^>]*> lwr \$a0,3\(\$at\)
-0+01a0 <[^>]*> lw \$at,0\(\$gp\)
+0+0194 <[^>]*> addiu at,at,1
+0+0198 <[^>]*> lwl a0,0\(at\)
+0+019c <[^>]*> lwr a0,3\(at\)
+0+01a0 <[^>]*> lw at,0\(gp\)
[ ]*1a0: R_MIPS_GOT16 .bss
0+01a4 <[^>]*> nop
-0+01a8 <[^>]*> addiu \$at,\$at,1000
+0+01a8 <[^>]*> addiu at,at,1000
[ ]*1a8: R_MIPS_LO16 .bss
0+01ac <[^>]*> nop
-0+01b0 <[^>]*> addiu \$at,\$at,1
-0+01b4 <[^>]*> sb \$a0,1\(\$at\)
-0+01b8 <[^>]*> srl \$a0,\$a0,0x8
-0+01bc <[^>]*> sb \$a0,0\(\$at\)
-0+01c0 <[^>]*> lbu \$at,1\(\$at\)
-0+01c4 <[^>]*> sll \$a0,\$a0,0x8
-0+01c8 <[^>]*> or \$a0,\$a0,\$at
+0+01b0 <[^>]*> addiu at,at,1
+0+01b4 <[^>]*> sb a0,1\(at\)
+0+01b8 <[^>]*> srl a0,a0,0x8
+0+01bc <[^>]*> sb a0,0\(at\)
+0+01c0 <[^>]*> lbu at,1\(at\)
+0+01c4 <[^>]*> sll a0,a0,0x8
+0+01c8 <[^>]*> or a0,a0,at
0+01cc <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh.d
index 8d6d4b45020..264885ad551 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulh.d
@@ -7,368 +7,368 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lb \$a0,[01]\(\$zero\)
-0+0004 <[^>]*> lbu \$at,[01]\(\$zero\)
-0+0008 <[^>]*> sll \$a0,\$a0,0x8
-0+000c <[^>]*> or \$a0,\$a0,\$at
-0+0010 <[^>]*> lb \$a0,[12]\(\$zero\)
-0+0014 <[^>]*> lbu \$at,[12]\(\$zero\)
-0+0018 <[^>]*> sll \$a0,\$a0,0x8
-0+001c <[^>]*> or \$a0,\$a0,\$at
-0+0020 <[^>]*> li \$at,0x8000
-0+0024 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0028 <[^>]*> lbu \$at,[01]\(\$at\)
-0+002c <[^>]*> sll \$a0,\$a0,0x8
-0+0030 <[^>]*> or \$a0,\$a0,\$at
-0+0034 <[^>]*> lb \$a0,-3276[78]\(\$zero\)
-0+0038 <[^>]*> lbu \$at,-3276[78]\(\$zero\)
-0+003c <[^>]*> sll \$a0,\$a0,0x8
-0+0040 <[^>]*> or \$a0,\$a0,\$at
-0+0044 <[^>]*> lui \$at,0x1
-0+0048 <[^>]*> lb \$a0,[01]\(\$at\)
-0+004c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0050 <[^>]*> sll \$a0,\$a0,0x8
-0+0054 <[^>]*> or \$a0,\$a0,\$at
-0+0058 <[^>]*> lui \$at,0x1
-0+005c <[^>]*> ori \$at,\$at,0xa5a5
-0+0060 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0064 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0068 <[^>]*> sll \$a0,\$a0,0x8
-0+006c <[^>]*> or \$a0,\$a0,\$at
-0+0070 <[^>]*> lb \$a0,[01]\(\$a1\)
-0+0074 <[^>]*> lbu \$at,[01]\(\$a1\)
-0+0078 <[^>]*> sll \$a0,\$a0,0x8
-0+007c <[^>]*> or \$a0,\$a0,\$at
-0+0080 <[^>]*> lb \$a0,[12]\(\$a1\)
-0+0084 <[^>]*> lbu \$at,[12]\(\$a1\)
-0+0088 <[^>]*> sll \$a0,\$a0,0x8
-0+008c <[^>]*> or \$a0,\$a0,\$at
-0+0090 <[^>]*> lui \$at,[-0-9x]+
+0+0000 <[^>]*> lb a0,[01]\(zero\)
+0+0004 <[^>]*> lbu at,[01]\(zero\)
+0+0008 <[^>]*> sll a0,a0,0x8
+0+000c <[^>]*> or a0,a0,at
+0+0010 <[^>]*> lb a0,[12]\(zero\)
+0+0014 <[^>]*> lbu at,[12]\(zero\)
+0+0018 <[^>]*> sll a0,a0,0x8
+0+001c <[^>]*> or a0,a0,at
+0+0020 <[^>]*> li at,0x8000
+0+0024 <[^>]*> lb a0,[01]\(at\)
+0+0028 <[^>]*> lbu at,[01]\(at\)
+0+002c <[^>]*> sll a0,a0,0x8
+0+0030 <[^>]*> or a0,a0,at
+0+0034 <[^>]*> lb a0,-3276[78]\(zero\)
+0+0038 <[^>]*> lbu at,-3276[78]\(zero\)
+0+003c <[^>]*> sll a0,a0,0x8
+0+0040 <[^>]*> or a0,a0,at
+0+0044 <[^>]*> lui at,0x1
+0+0048 <[^>]*> lb a0,[01]\(at\)
+0+004c <[^>]*> lbu at,[01]\(at\)
+0+0050 <[^>]*> sll a0,a0,0x8
+0+0054 <[^>]*> or a0,a0,at
+0+0058 <[^>]*> lui at,0x1
+0+005c <[^>]*> ori at,at,0xa5a5
+0+0060 <[^>]*> lb a0,[01]\(at\)
+0+0064 <[^>]*> lbu at,[01]\(at\)
+0+0068 <[^>]*> sll a0,a0,0x8
+0+006c <[^>]*> or a0,a0,at
+0+0070 <[^>]*> lb a0,[01]\(a1\)
+0+0074 <[^>]*> lbu at,[01]\(a1\)
+0+0078 <[^>]*> sll a0,a0,0x8
+0+007c <[^>]*> or a0,a0,at
+0+0080 <[^>]*> lb a0,[12]\(a1\)
+0+0084 <[^>]*> lbu at,[12]\(a1\)
+0+0088 <[^>]*> sll a0,a0,0x8
+0+008c <[^>]*> or a0,a0,at
+0+0090 <[^>]*> lui at,[-0-9x]+
[ ]*90: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0094 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0094 <[^>]*> addiu at,at,[-0-9]+
[ ]*94: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0098 <[^>]*> lb \$a0,[01]\(\$at\)
-0+009c <[^>]*> lbu \$at,[01]\(\$at\)
-0+00a0 <[^>]*> sll \$a0,\$a0,0x8
-0+00a4 <[^>]*> or \$a0,\$a0,\$at
-0+00a8 <[^>]*> lui \$at,0x0
+0+0098 <[^>]*> lb a0,[01]\(at\)
+0+009c <[^>]*> lbu at,[01]\(at\)
+0+00a0 <[^>]*> sll a0,a0,0x8
+0+00a4 <[^>]*> or a0,a0,at
+0+00a8 <[^>]*> lui at,0x0
[ ]*a8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00ac <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00ac <[^>]*> addiu at,at,[-0-9]+
[ ]*ac: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00b0 <[^>]*> lb \$a0,[01]\(\$at\)
-0+00b4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00b8 <[^>]*> sll \$a0,\$a0,0x8
-0+00bc <[^>]*> or \$a0,\$a0,\$at
-0+00c0 <[^>]*> addiu \$at,\$gp,0
+0+00b0 <[^>]*> lb a0,[01]\(at\)
+0+00b4 <[^>]*> lbu at,[01]\(at\)
+0+00b8 <[^>]*> sll a0,a0,0x8
+0+00bc <[^>]*> or a0,a0,at
+0+00c0 <[^>]*> addiu at,gp,0
[ ]*c0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00c4 <[^>]*> lb \$a0,[01]\(\$at\)
-0+00c8 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00cc <[^>]*> sll \$a0,\$a0,0x8
-0+00d0 <[^>]*> or \$a0,\$a0,\$at
-0+00d4 <[^>]*> lui \$at,0x0
+0+00c4 <[^>]*> lb a0,[01]\(at\)
+0+00c8 <[^>]*> lbu at,[01]\(at\)
+0+00cc <[^>]*> sll a0,a0,0x8
+0+00d0 <[^>]*> or a0,a0,at
+0+00d4 <[^>]*> lui at,0x0
[ ]*d4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00d8 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00d8 <[^>]*> addiu at,at,[-0-9]+
[ ]*d8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00dc <[^>]*> lb \$a0,[01]\(\$at\)
-0+00e0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00e4 <[^>]*> sll \$a0,\$a0,0x8
-0+00e8 <[^>]*> or \$a0,\$a0,\$at
-0+00ec <[^>]*> addiu \$at,\$gp,0
+0+00dc <[^>]*> lb a0,[01]\(at\)
+0+00e0 <[^>]*> lbu at,[01]\(at\)
+0+00e4 <[^>]*> sll a0,a0,0x8
+0+00e8 <[^>]*> or a0,a0,at
+0+00ec <[^>]*> addiu at,gp,0
[ ]*ec: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00f0 <[^>]*> lb \$a0,[01]\(\$at\)
-0+00f4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00f8 <[^>]*> sll \$a0,\$a0,0x8
-0+00fc <[^>]*> or \$a0,\$a0,\$at
-0+0100 <[^>]*> lui \$at,[-0-9x]+
+0+00f0 <[^>]*> lb a0,[01]\(at\)
+0+00f4 <[^>]*> lbu at,[01]\(at\)
+0+00f8 <[^>]*> sll a0,a0,0x8
+0+00fc <[^>]*> or a0,a0,at
+0+0100 <[^>]*> lui at,[-0-9x]+
[ ]*100: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0104 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0104 <[^>]*> addiu at,at,[-0-9]+
[ ]*104: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0108 <[^>]*> lb \$a0,[01]\(\$at\)
-0+010c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0110 <[^>]*> sll \$a0,\$a0,0x8
-0+0114 <[^>]*> or \$a0,\$a0,\$at
-0+0118 <[^>]*> addiu \$at,\$gp,[-0-9]+
+0+0108 <[^>]*> lb a0,[01]\(at\)
+0+010c <[^>]*> lbu at,[01]\(at\)
+0+0110 <[^>]*> sll a0,a0,0x8
+0+0114 <[^>]*> or a0,a0,at
+0+0118 <[^>]*> addiu at,gp,[-0-9]+
[ ]*118: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+011c <[^>]*> lb \$a0,[01]\(\$at\)
-0+0120 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0124 <[^>]*> sll \$a0,\$a0,0x8
-0+0128 <[^>]*> or \$a0,\$a0,\$at
-0+012c <[^>]*> lui \$at,0x0
+0+011c <[^>]*> lb a0,[01]\(at\)
+0+0120 <[^>]*> lbu at,[01]\(at\)
+0+0124 <[^>]*> sll a0,a0,0x8
+0+0128 <[^>]*> or a0,a0,at
+0+012c <[^>]*> lui at,0x0
[ ]*12c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0130 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0130 <[^>]*> addiu at,at,[-0-9]+
[ ]*130: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0134 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0138 <[^>]*> lbu \$at,[01]\(\$at\)
-0+013c <[^>]*> sll \$a0,\$a0,0x8
-0+0140 <[^>]*> or \$a0,\$a0,\$at
-0+0144 <[^>]*> lui \$at,0x0
+0+0134 <[^>]*> lb a0,[01]\(at\)
+0+0138 <[^>]*> lbu at,[01]\(at\)
+0+013c <[^>]*> sll a0,a0,0x8
+0+0140 <[^>]*> or a0,a0,at
+0+0144 <[^>]*> lui at,0x0
[ ]*144: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0148 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0148 <[^>]*> addiu at,at,[-0-9]+
[ ]*148: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+014c <[^>]*> lb \$a0,[01]\(\$at\)
-0+0150 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0154 <[^>]*> sll \$a0,\$a0,0x8
-0+0158 <[^>]*> or \$a0,\$a0,\$at
-0+015c <[^>]*> addiu \$at,\$gp,1
+0+014c <[^>]*> lb a0,[01]\(at\)
+0+0150 <[^>]*> lbu at,[01]\(at\)
+0+0154 <[^>]*> sll a0,a0,0x8
+0+0158 <[^>]*> or a0,a0,at
+0+015c <[^>]*> addiu at,gp,1
[ ]*15c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0160 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0164 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0168 <[^>]*> sll \$a0,\$a0,0x8
-0+016c <[^>]*> or \$a0,\$a0,\$at
-0+0170 <[^>]*> lui \$at,0x0
+0+0160 <[^>]*> lb a0,[01]\(at\)
+0+0164 <[^>]*> lbu at,[01]\(at\)
+0+0168 <[^>]*> sll a0,a0,0x8
+0+016c <[^>]*> or a0,a0,at
+0+0170 <[^>]*> lui at,0x0
[ ]*170: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0174 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0174 <[^>]*> addiu at,at,[-0-9]+
[ ]*174: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0178 <[^>]*> lb \$a0,[01]\(\$at\)
-0+017c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0180 <[^>]*> sll \$a0,\$a0,0x8
-0+0184 <[^>]*> or \$a0,\$a0,\$at
-0+0188 <[^>]*> addiu \$at,\$gp,1
+0+0178 <[^>]*> lb a0,[01]\(at\)
+0+017c <[^>]*> lbu at,[01]\(at\)
+0+0180 <[^>]*> sll a0,a0,0x8
+0+0184 <[^>]*> or a0,a0,at
+0+0188 <[^>]*> addiu at,gp,1
[ ]*188: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+018c <[^>]*> lb \$a0,[01]\(\$at\)
-0+0190 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0194 <[^>]*> sll \$a0,\$a0,0x8
-0+0198 <[^>]*> or \$a0,\$a0,\$at
-0+019c <[^>]*> lui \$at,0x0
+0+018c <[^>]*> lb a0,[01]\(at\)
+0+0190 <[^>]*> lbu at,[01]\(at\)
+0+0194 <[^>]*> sll a0,a0,0x8
+0+0198 <[^>]*> or a0,a0,at
+0+019c <[^>]*> lui at,0x0
[ ]*19c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+01a0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01a0 <[^>]*> addiu at,at,[-0-9]+
[ ]*1a0: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01a4 <[^>]*> lb \$a0,[01]\(\$at\)
-0+01a8 <[^>]*> lbu \$at,[01]\(\$at\)
-0+01ac <[^>]*> sll \$a0,\$a0,0x8
-0+01b0 <[^>]*> or \$a0,\$a0,\$at
-0+01b4 <[^>]*> addiu \$at,\$gp,[-0-9]+
+0+01a4 <[^>]*> lb a0,[01]\(at\)
+0+01a8 <[^>]*> lbu at,[01]\(at\)
+0+01ac <[^>]*> sll a0,a0,0x8
+0+01b0 <[^>]*> or a0,a0,at
+0+01b4 <[^>]*> addiu at,gp,[-0-9]+
[ ]*1b4: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+01b8 <[^>]*> lb \$a0,[01]\(\$at\)
-0+01bc <[^>]*> lbu \$at,[01]\(\$at\)
-0+01c0 <[^>]*> sll \$a0,\$a0,0x8
-0+01c4 <[^>]*> or \$a0,\$a0,\$at
-0+01c8 <[^>]*> lui \$at,[-0-9x]+
+0+01b8 <[^>]*> lb a0,[01]\(at\)
+0+01bc <[^>]*> lbu at,[01]\(at\)
+0+01c0 <[^>]*> sll a0,a0,0x8
+0+01c4 <[^>]*> or a0,a0,at
+0+01c8 <[^>]*> lui at,[-0-9x]+
[ ]*1c8: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+01cc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01cc <[^>]*> addiu at,at,[-0-9]+
[ ]*1cc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+01d0 <[^>]*> lb \$a0,[01]\(\$at\)
-0+01d4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+01d8 <[^>]*> sll \$a0,\$a0,0x8
-0+01dc <[^>]*> or \$a0,\$a0,\$at
-0+01e0 <[^>]*> lui \$at,[-0-9x]+
+0+01d0 <[^>]*> lb a0,[01]\(at\)
+0+01d4 <[^>]*> lbu at,[01]\(at\)
+0+01d8 <[^>]*> sll a0,a0,0x8
+0+01dc <[^>]*> or a0,a0,at
+0+01e0 <[^>]*> lui at,[-0-9x]+
[ ]*1e0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+01e4 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01e4 <[^>]*> addiu at,at,[-0-9]+
[ ]*1e4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01e8 <[^>]*> lb \$a0,[01]\(\$at\)
-0+01ec <[^>]*> lbu \$at,[01]\(\$at\)
-0+01f0 <[^>]*> sll \$a0,\$a0,0x8
-0+01f4 <[^>]*> or \$a0,\$a0,\$at
-0+01f8 <[^>]*> lui \$at,[-0-9x]+
+0+01e8 <[^>]*> lb a0,[01]\(at\)
+0+01ec <[^>]*> lbu at,[01]\(at\)
+0+01f0 <[^>]*> sll a0,a0,0x8
+0+01f4 <[^>]*> or a0,a0,at
+0+01f8 <[^>]*> lui at,[-0-9x]+
[ ]*1f8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+01fc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01fc <[^>]*> addiu at,at,[-0-9]+
[ ]*1fc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0200 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0204 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0208 <[^>]*> sll \$a0,\$a0,0x8
-0+020c <[^>]*> or \$a0,\$a0,\$at
-0+0210 <[^>]*> lui \$at,[-0-9x]+
+0+0200 <[^>]*> lb a0,[01]\(at\)
+0+0204 <[^>]*> lbu at,[01]\(at\)
+0+0208 <[^>]*> sll a0,a0,0x8
+0+020c <[^>]*> or a0,a0,at
+0+0210 <[^>]*> lui at,[-0-9x]+
[ ]*210: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0214 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0214 <[^>]*> addiu at,at,[-0-9]+
[ ]*214: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0218 <[^>]*> lb \$a0,[01]\(\$at\)
-0+021c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0220 <[^>]*> sll \$a0,\$a0,0x8
-0+0224 <[^>]*> or \$a0,\$a0,\$at
-0+0228 <[^>]*> lui \$at,[-0-9x]+
+0+0218 <[^>]*> lb a0,[01]\(at\)
+0+021c <[^>]*> lbu at,[01]\(at\)
+0+0220 <[^>]*> sll a0,a0,0x8
+0+0224 <[^>]*> or a0,a0,at
+0+0228 <[^>]*> lui at,[-0-9x]+
[ ]*228: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+022c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+022c <[^>]*> addiu at,at,[-0-9]+
[ ]*22c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0230 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0234 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0238 <[^>]*> sll \$a0,\$a0,0x8
-0+023c <[^>]*> or \$a0,\$a0,\$at
-0+0240 <[^>]*> lui \$at,[-0-9x]+
+0+0230 <[^>]*> lb a0,[01]\(at\)
+0+0234 <[^>]*> lbu at,[01]\(at\)
+0+0238 <[^>]*> sll a0,a0,0x8
+0+023c <[^>]*> or a0,a0,at
+0+0240 <[^>]*> lui at,[-0-9x]+
[ ]*240: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0244 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0244 <[^>]*> addiu at,at,[-0-9]+
[ ]*244: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0248 <[^>]*> lb \$a0,[01]\(\$at\)
-0+024c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0250 <[^>]*> sll \$a0,\$a0,0x8
-0+0254 <[^>]*> or \$a0,\$a0,\$at
-0+0258 <[^>]*> lui \$at,[-0-9x]+
+0+0248 <[^>]*> lb a0,[01]\(at\)
+0+024c <[^>]*> lbu at,[01]\(at\)
+0+0250 <[^>]*> sll a0,a0,0x8
+0+0254 <[^>]*> or a0,a0,at
+0+0258 <[^>]*> lui at,[-0-9x]+
[ ]*258: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+025c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+025c <[^>]*> addiu at,at,[-0-9]+
[ ]*25c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0260 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0264 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0268 <[^>]*> sll \$a0,\$a0,0x8
-0+026c <[^>]*> or \$a0,\$a0,\$at
-0+0270 <[^>]*> lui \$at,0x0
+0+0260 <[^>]*> lb a0,[01]\(at\)
+0+0264 <[^>]*> lbu at,[01]\(at\)
+0+0268 <[^>]*> sll a0,a0,0x8
+0+026c <[^>]*> or a0,a0,at
+0+0270 <[^>]*> lui at,0x0
[ ]*270: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0274 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0274 <[^>]*> addiu at,at,[-0-9]+
[ ]*274: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0278 <[^>]*> lb \$a0,[01]\(\$at\)
-0+027c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0280 <[^>]*> sll \$a0,\$a0,0x8
-0+0284 <[^>]*> or \$a0,\$a0,\$at
-0+0288 <[^>]*> lui \$at,0x0
+0+0278 <[^>]*> lb a0,[01]\(at\)
+0+027c <[^>]*> lbu at,[01]\(at\)
+0+0280 <[^>]*> sll a0,a0,0x8
+0+0284 <[^>]*> or a0,a0,at
+0+0288 <[^>]*> lui at,0x0
[ ]*288: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+028c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+028c <[^>]*> addiu at,at,[-0-9]+
[ ]*28c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0290 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0294 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0298 <[^>]*> sll \$a0,\$a0,0x8
-0+029c <[^>]*> or \$a0,\$a0,\$at
-0+02a0 <[^>]*> lui \$at,0x0
+0+0290 <[^>]*> lb a0,[01]\(at\)
+0+0294 <[^>]*> lbu at,[01]\(at\)
+0+0298 <[^>]*> sll a0,a0,0x8
+0+029c <[^>]*> or a0,a0,at
+0+02a0 <[^>]*> lui at,0x0
[ ]*2a0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+02a4 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02a4 <[^>]*> addiu at,at,[-0-9]+
[ ]*2a4: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+02a8 <[^>]*> lb \$a0,[01]\(\$at\)
-0+02ac <[^>]*> lbu \$at,[01]\(\$at\)
-0+02b0 <[^>]*> sll \$a0,\$a0,0x8
-0+02b4 <[^>]*> or \$a0,\$a0,\$at
-0+02b8 <[^>]*> lui \$at,0x0
+0+02a8 <[^>]*> lb a0,[01]\(at\)
+0+02ac <[^>]*> lbu at,[01]\(at\)
+0+02b0 <[^>]*> sll a0,a0,0x8
+0+02b4 <[^>]*> or a0,a0,at
+0+02b8 <[^>]*> lui at,0x0
[ ]*2b8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+02bc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02bc <[^>]*> addiu at,at,[-0-9]+
[ ]*2bc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02c0 <[^>]*> lb \$a0,[01]\(\$at\)
-0+02c4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+02c8 <[^>]*> sll \$a0,\$a0,0x8
-0+02cc <[^>]*> or \$a0,\$a0,\$at
-0+02d0 <[^>]*> lui \$at,0x0
+0+02c0 <[^>]*> lb a0,[01]\(at\)
+0+02c4 <[^>]*> lbu at,[01]\(at\)
+0+02c8 <[^>]*> sll a0,a0,0x8
+0+02cc <[^>]*> or a0,a0,at
+0+02d0 <[^>]*> lui at,0x0
[ ]*2d0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02d4 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02d4 <[^>]*> addiu at,at,[-0-9]+
[ ]*2d4: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+02d8 <[^>]*> lb \$a0,[01]\(\$at\)
-0+02dc <[^>]*> lbu \$at,[01]\(\$at\)
-0+02e0 <[^>]*> sll \$a0,\$a0,0x8
-0+02e4 <[^>]*> or \$a0,\$a0,\$at
-0+02e8 <[^>]*> lui \$at,0x0
+0+02d8 <[^>]*> lb a0,[01]\(at\)
+0+02dc <[^>]*> lbu at,[01]\(at\)
+0+02e0 <[^>]*> sll a0,a0,0x8
+0+02e4 <[^>]*> or a0,a0,at
+0+02e8 <[^>]*> lui at,0x0
[ ]*2e8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02ec <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02ec <[^>]*> addiu at,at,[-0-9]+
[ ]*2ec: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02f0 <[^>]*> lb \$a0,[01]\(\$at\)
-0+02f4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+02f8 <[^>]*> sll \$a0,\$a0,0x8
-0+02fc <[^>]*> or \$a0,\$a0,\$at
-0+0300 <[^>]*> lui \$at,0x0
+0+02f0 <[^>]*> lb a0,[01]\(at\)
+0+02f4 <[^>]*> lbu at,[01]\(at\)
+0+02f8 <[^>]*> sll a0,a0,0x8
+0+02fc <[^>]*> or a0,a0,at
+0+0300 <[^>]*> lui at,0x0
[ ]*300: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0304 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0304 <[^>]*> addiu at,at,[-0-9]+
[ ]*304: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0308 <[^>]*> lb \$a0,[01]\(\$at\)
-0+030c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0310 <[^>]*> sll \$a0,\$a0,0x8
-0+0314 <[^>]*> or \$a0,\$a0,\$at
-0+0318 <[^>]*> lui \$at,[-0-9x]+
+0+0308 <[^>]*> lb a0,[01]\(at\)
+0+030c <[^>]*> lbu at,[01]\(at\)
+0+0310 <[^>]*> sll a0,a0,0x8
+0+0314 <[^>]*> or a0,a0,at
+0+0318 <[^>]*> lui at,[-0-9x]+
[ ]*318: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+031c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+031c <[^>]*> addiu at,at,[-0-9]+
[ ]*31c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0320 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0324 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0328 <[^>]*> sll \$a0,\$a0,0x8
-0+032c <[^>]*> or \$a0,\$a0,\$at
-0+0330 <[^>]*> lui \$at,[-0-9x]+
+0+0320 <[^>]*> lb a0,[01]\(at\)
+0+0324 <[^>]*> lbu at,[01]\(at\)
+0+0328 <[^>]*> sll a0,a0,0x8
+0+032c <[^>]*> or a0,a0,at
+0+0330 <[^>]*> lui at,[-0-9x]+
[ ]*330: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0334 <[^>]*> addiu \$at,\$at,0
+0+0334 <[^>]*> addiu at,at,0
[ ]*334: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0338 <[^>]*> lb \$a0,[01]\(\$at\)
-0+033c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0340 <[^>]*> sll \$a0,\$a0,0x8
-0+0344 <[^>]*> or \$a0,\$a0,\$at
-0+0348 <[^>]*> lui \$at,[-0-9x]+
+0+0338 <[^>]*> lb a0,[01]\(at\)
+0+033c <[^>]*> lbu at,[01]\(at\)
+0+0340 <[^>]*> sll a0,a0,0x8
+0+0344 <[^>]*> or a0,a0,at
+0+0348 <[^>]*> lui at,[-0-9x]+
[ ]*348: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+034c <[^>]*> addiu \$at,\$at,0
+0+034c <[^>]*> addiu at,at,0
[ ]*34c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0350 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0354 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0358 <[^>]*> sll \$a0,\$a0,0x8
-0+035c <[^>]*> or \$a0,\$a0,\$at
-0+0360 <[^>]*> lui \$at,[-0-9x]+
+0+0350 <[^>]*> lb a0,[01]\(at\)
+0+0354 <[^>]*> lbu at,[01]\(at\)
+0+0358 <[^>]*> sll a0,a0,0x8
+0+035c <[^>]*> or a0,a0,at
+0+0360 <[^>]*> lui at,[-0-9x]+
[ ]*360: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0364 <[^>]*> addiu \$at,\$at,0
+0+0364 <[^>]*> addiu at,at,0
[ ]*364: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0368 <[^>]*> lb \$a0,[01]\(\$at\)
-0+036c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0370 <[^>]*> sll \$a0,\$a0,0x8
-0+0374 <[^>]*> or \$a0,\$a0,\$at
-0+0378 <[^>]*> lui \$at,[-0-9x]+
+0+0368 <[^>]*> lb a0,[01]\(at\)
+0+036c <[^>]*> lbu at,[01]\(at\)
+0+0370 <[^>]*> sll a0,a0,0x8
+0+0374 <[^>]*> or a0,a0,at
+0+0378 <[^>]*> lui at,[-0-9x]+
[ ]*378: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+037c <[^>]*> addiu \$at,\$at,0
+0+037c <[^>]*> addiu at,at,0
[ ]*37c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0380 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0384 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0388 <[^>]*> sll \$a0,\$a0,0x8
-0+038c <[^>]*> or \$a0,\$a0,\$at
-0+0390 <[^>]*> lui \$at,[-0-9x]+
+0+0380 <[^>]*> lb a0,[01]\(at\)
+0+0384 <[^>]*> lbu at,[01]\(at\)
+0+0388 <[^>]*> sll a0,a0,0x8
+0+038c <[^>]*> or a0,a0,at
+0+0390 <[^>]*> lui at,[-0-9x]+
[ ]*390: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0394 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0394 <[^>]*> addiu at,at,[-0-9]+
[ ]*394: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0398 <[^>]*> lb \$a0,[01]\(\$at\)
-0+039c <[^>]*> lbu \$at,[01]\(\$at\)
-0+03a0 <[^>]*> sll \$a0,\$a0,0x8
-0+03a4 <[^>]*> or \$a0,\$a0,\$at
-0+03a8 <[^>]*> lui \$at,[-0-9x]+
+0+0398 <[^>]*> lb a0,[01]\(at\)
+0+039c <[^>]*> lbu at,[01]\(at\)
+0+03a0 <[^>]*> sll a0,a0,0x8
+0+03a4 <[^>]*> or a0,a0,at
+0+03a8 <[^>]*> lui at,[-0-9x]+
[ ]*3a8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+03ac <[^>]*> addiu \$at,\$at,[-0-9]+
+0+03ac <[^>]*> addiu at,at,[-0-9]+
[ ]*3ac: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+03b0 <[^>]*> lb \$a0,[01]\(\$at\)
-0+03b4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+03b8 <[^>]*> sll \$a0,\$a0,0x8
-0+03bc <[^>]*> or \$a0,\$a0,\$at
-0+03c0 <[^>]*> lui \$at,[-0-9x]+
+0+03b0 <[^>]*> lb a0,[01]\(at\)
+0+03b4 <[^>]*> lbu at,[01]\(at\)
+0+03b8 <[^>]*> sll a0,a0,0x8
+0+03bc <[^>]*> or a0,a0,at
+0+03c0 <[^>]*> lui at,[-0-9x]+
[ ]*3c0: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+03c4 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+03c4 <[^>]*> addiu at,at,[-0-9]+
[ ]*3c4: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+03c8 <[^>]*> lb \$a0,[01]\(\$at\)
-0+03cc <[^>]*> lbu \$at,[01]\(\$at\)
-0+03d0 <[^>]*> sll \$a0,\$a0,0x8
-0+03d4 <[^>]*> or \$a0,\$a0,\$at
-0+03d8 <[^>]*> lui \$at,[-0-9x]+
+0+03c8 <[^>]*> lb a0,[01]\(at\)
+0+03cc <[^>]*> lbu at,[01]\(at\)
+0+03d0 <[^>]*> sll a0,a0,0x8
+0+03d4 <[^>]*> or a0,a0,at
+0+03d8 <[^>]*> lui at,[-0-9x]+
[ ]*3d8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+03dc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+03dc <[^>]*> addiu at,at,[-0-9]+
[ ]*3dc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+03e0 <[^>]*> lb \$a0,[01]\(\$at\)
-0+03e4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+03e8 <[^>]*> sll \$a0,\$a0,0x8
-0+03ec <[^>]*> or \$a0,\$a0,\$at
-0+03f0 <[^>]*> lui \$at,[-0-9x]+
+0+03e0 <[^>]*> lb a0,[01]\(at\)
+0+03e4 <[^>]*> lbu at,[01]\(at\)
+0+03e8 <[^>]*> sll a0,a0,0x8
+0+03ec <[^>]*> or a0,a0,at
+0+03f0 <[^>]*> lui at,[-0-9x]+
[ ]*3f0: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+03f4 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+03f4 <[^>]*> addiu at,at,[-0-9]+
[ ]*3f4: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+03f8 <[^>]*> lb \$a0,[01]\(\$at\)
-0+03fc <[^>]*> lbu \$at,[01]\(\$at\)
-0+0400 <[^>]*> sll \$a0,\$a0,0x8
-0+0404 <[^>]*> or \$a0,\$a0,\$at
-0+0408 <[^>]*> lui \$at,[-0-9x]+
+0+03f8 <[^>]*> lb a0,[01]\(at\)
+0+03fc <[^>]*> lbu at,[01]\(at\)
+0+0400 <[^>]*> sll a0,a0,0x8
+0+0404 <[^>]*> or a0,a0,at
+0+0408 <[^>]*> lui at,[-0-9x]+
[ ]*408: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+040c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+040c <[^>]*> addiu at,at,[-0-9]+
[ ]*40c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0410 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0414 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0418 <[^>]*> sll \$a0,\$a0,0x8
-0+041c <[^>]*> or \$a0,\$a0,\$at
-0+0420 <[^>]*> lui \$at,[-0-9x]+
+0+0410 <[^>]*> lb a0,[01]\(at\)
+0+0414 <[^>]*> lbu at,[01]\(at\)
+0+0418 <[^>]*> sll a0,a0,0x8
+0+041c <[^>]*> or a0,a0,at
+0+0420 <[^>]*> lui at,[-0-9x]+
[ ]*420: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0424 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0424 <[^>]*> addiu at,at,[-0-9]+
[ ]*424: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0428 <[^>]*> lb \$a0,[01]\(\$at\)
-0+042c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0430 <[^>]*> sll \$a0,\$a0,0x8
-0+0434 <[^>]*> or \$a0,\$a0,\$at
-0+0438 <[^>]*> lui \$at,[-0-9x]+
+0+0428 <[^>]*> lb a0,[01]\(at\)
+0+042c <[^>]*> lbu at,[01]\(at\)
+0+0430 <[^>]*> sll a0,a0,0x8
+0+0434 <[^>]*> or a0,a0,at
+0+0438 <[^>]*> lui at,[-0-9x]+
[ ]*438: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+043c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+043c <[^>]*> addiu at,at,[-0-9]+
[ ]*43c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0440 <[^>]*> lb \$a0,[01]\(\$at\)
-0+0444 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0448 <[^>]*> sll \$a0,\$a0,0x8
-0+044c <[^>]*> or \$a0,\$a0,\$at
-0+0450 <[^>]*> lui \$at,[-0-9x]+
+0+0440 <[^>]*> lb a0,[01]\(at\)
+0+0444 <[^>]*> lbu at,[01]\(at\)
+0+0448 <[^>]*> sll a0,a0,0x8
+0+044c <[^>]*> or a0,a0,at
+0+0450 <[^>]*> lui at,[-0-9x]+
[ ]*450: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0454 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0454 <[^>]*> addiu at,at,[-0-9]+
[ ]*454: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0458 <[^>]*> lb \$a0,[01]\(\$at\)
-0+045c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0460 <[^>]*> sll \$a0,\$a0,0x8
-0+0464 <[^>]*> or \$a0,\$a0,\$at
-0+0468 <[^>]*> lbu \$a0,[01]\(\$zero\)
-0+046c <[^>]*> lbu \$at,[01]\(\$zero\)
-0+0470 <[^>]*> sll \$a0,\$a0,0x8
-0+0474 <[^>]*> or \$a0,\$a0,\$at
+0+0458 <[^>]*> lb a0,[01]\(at\)
+0+045c <[^>]*> lbu at,[01]\(at\)
+0+0460 <[^>]*> sll a0,a0,0x8
+0+0464 <[^>]*> or a0,a0,at
+0+0468 <[^>]*> lbu a0,[01]\(zero\)
+0+046c <[^>]*> lbu at,[01]\(zero\)
+0+0470 <[^>]*> sll a0,a0,0x8
+0+0474 <[^>]*> or a0,a0,at
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulw.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulw.d
index bfbdc94df04..cbd0f775a62 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulw.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ulw.d
@@ -7,264 +7,264 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> lwl \$a0,[03]\(\$zero\)
-0+0004 <[^>]*> lwr \$a0,[03]\(\$zero\)
-0+0008 <[^>]*> lwl \$a0,[14]\(\$zero\)
-0+000c <[^>]*> lwr \$a0,[14]\(\$zero\)
-0+0010 <[^>]*> li \$at,0x8000
-0+0014 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0018 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+001c <[^>]*> lwl \$a0,-3276[58]\(\$zero\)
-0+0020 <[^>]*> lwr \$a0,-3276[58]\(\$zero\)
-0+0024 <[^>]*> lui \$at,0x1
-0+0028 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+002c <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0030 <[^>]*> lui \$at,0x1
-0+0034 <[^>]*> ori \$at,\$at,0xa5a5
-0+0038 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+003c <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0040 <[^>]*> lwl \$a0,[03]\(\$a1\)
-0+0044 <[^>]*> lwr \$a0,[03]\(\$a1\)
-0+0048 <[^>]*> lwl \$a0,[14]\(\$a1\)
-0+004c <[^>]*> lwr \$a0,[-0-9]+\(\$a1\)
-0+0050 <[^>]*> lui \$at,[-0-9x]+
+0+0000 <[^>]*> lwl a0,[03]\(zero\)
+0+0004 <[^>]*> lwr a0,[03]\(zero\)
+0+0008 <[^>]*> lwl a0,[14]\(zero\)
+0+000c <[^>]*> lwr a0,[14]\(zero\)
+0+0010 <[^>]*> li at,0x8000
+0+0014 <[^>]*> lwl a0,[03]\(at\)
+0+0018 <[^>]*> lwr a0,[03]\(at\)
+0+001c <[^>]*> lwl a0,-3276[58]\(zero\)
+0+0020 <[^>]*> lwr a0,-3276[58]\(zero\)
+0+0024 <[^>]*> lui at,0x1
+0+0028 <[^>]*> lwl a0,[03]\(at\)
+0+002c <[^>]*> lwr a0,[03]\(at\)
+0+0030 <[^>]*> lui at,0x1
+0+0034 <[^>]*> ori at,at,0xa5a5
+0+0038 <[^>]*> lwl a0,[03]\(at\)
+0+003c <[^>]*> lwr a0,[03]\(at\)
+0+0040 <[^>]*> lwl a0,[03]\(a1\)
+0+0044 <[^>]*> lwr a0,[03]\(a1\)
+0+0048 <[^>]*> lwl a0,[14]\(a1\)
+0+004c <[^>]*> lwr a0,[-0-9]+\(a1\)
+0+0050 <[^>]*> lui at,[-0-9x]+
[ ]*50: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0054 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0054 <[^>]*> addiu at,at,[-0-9]+
[ ]*54: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0058 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+005c <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0060 <[^>]*> lui \$at,0x0
+0+0058 <[^>]*> lwl a0,[03]\(at\)
+0+005c <[^>]*> lwr a0,[03]\(at\)
+0+0060 <[^>]*> lui at,0x0
[ ]*60: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0064 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0064 <[^>]*> addiu at,at,[-0-9]+
[ ]*64: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0068 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+006c <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0070 <[^>]*> addiu \$at,\$gp,0
+0+0068 <[^>]*> lwl a0,[03]\(at\)
+0+006c <[^>]*> lwr a0,[03]\(at\)
+0+0070 <[^>]*> addiu at,gp,0
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0074 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0078 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+007c <[^>]*> lui \$at,0x0
+0+0074 <[^>]*> lwl a0,[03]\(at\)
+0+0078 <[^>]*> lwr a0,[03]\(at\)
+0+007c <[^>]*> lui at,0x0
[ ]*7c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0080 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0080 <[^>]*> addiu at,at,[-0-9]+
[ ]*80: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0084 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0088 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+008c <[^>]*> addiu \$at,\$gp,0
+0+0084 <[^>]*> lwl a0,[03]\(at\)
+0+0088 <[^>]*> lwr a0,[03]\(at\)
+0+008c <[^>]*> addiu at,gp,0
[ ]*8c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0090 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0094 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0098 <[^>]*> lui \$at,[-0-9x]+
+0+0090 <[^>]*> lwl a0,[03]\(at\)
+0+0094 <[^>]*> lwr a0,[03]\(at\)
+0+0098 <[^>]*> lui at,[-0-9x]+
[ ]*98: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+009c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+009c <[^>]*> addiu at,at,[-0-9]+
[ ]*9c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00a0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+00a4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+00a8 <[^>]*> addiu \$at,\$gp,[-0-9]+
+0+00a0 <[^>]*> lwl a0,[03]\(at\)
+0+00a4 <[^>]*> lwr a0,[03]\(at\)
+0+00a8 <[^>]*> addiu at,gp,[-0-9]+
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00ac <[^>]*> lwl \$a0,[03]\(\$at\)
-0+00b0 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+00b4 <[^>]*> lui \$at,0x0
+0+00ac <[^>]*> lwl a0,[03]\(at\)
+0+00b0 <[^>]*> lwr a0,[03]\(at\)
+0+00b4 <[^>]*> lui at,0x0
[ ]*b4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00b8 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00b8 <[^>]*> addiu at,at,[-0-9]+
[ ]*b8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00bc <[^>]*> lwl \$a0,[03]\(\$at\)
-0+00c0 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+00c4 <[^>]*> lui \$at,0x0
+0+00bc <[^>]*> lwl a0,[03]\(at\)
+0+00c0 <[^>]*> lwr a0,[03]\(at\)
+0+00c4 <[^>]*> lui at,0x0
[ ]*c4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00c8 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00c8 <[^>]*> addiu at,at,[-0-9]+
[ ]*c8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00cc <[^>]*> lwl \$a0,[03]\(\$at\)
-0+00d0 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+00d4 <[^>]*> addiu \$at,\$gp,1
+0+00cc <[^>]*> lwl a0,[03]\(at\)
+0+00d0 <[^>]*> lwr a0,[03]\(at\)
+0+00d4 <[^>]*> addiu at,gp,1
[ ]*d4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00d8 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+00dc <[^>]*> lwr \$a0,[03]\(\$at\)
-0+00e0 <[^>]*> lui \$at,0x0
+0+00d8 <[^>]*> lwl a0,[03]\(at\)
+0+00dc <[^>]*> lwr a0,[03]\(at\)
+0+00e0 <[^>]*> lui at,0x0
[ ]*e0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00e4 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00e4 <[^>]*> addiu at,at,[-0-9]+
[ ]*e4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00e8 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+00ec <[^>]*> lwr \$a0,[03]\(\$at\)
-0+00f0 <[^>]*> addiu \$at,\$gp,1
+0+00e8 <[^>]*> lwl a0,[03]\(at\)
+0+00ec <[^>]*> lwr a0,[03]\(at\)
+0+00f0 <[^>]*> addiu at,gp,1
[ ]*f0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00f4 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+00f8 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+00fc <[^>]*> lui \$at,0x0
+0+00f4 <[^>]*> lwl a0,[03]\(at\)
+0+00f8 <[^>]*> lwr a0,[03]\(at\)
+0+00fc <[^>]*> lui at,0x0
[ ]*fc: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0100 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0100 <[^>]*> addiu at,at,[-0-9]+
[ ]*100: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0104 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0108 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+010c <[^>]*> addiu \$at,\$gp,[-0-9]+
+0+0104 <[^>]*> lwl a0,[03]\(at\)
+0+0108 <[^>]*> lwr a0,[03]\(at\)
+0+010c <[^>]*> addiu at,gp,[-0-9]+
[ ]*10c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0110 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0114 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0118 <[^>]*> lui \$at,[-0-9x]+
+0+0110 <[^>]*> lwl a0,[03]\(at\)
+0+0114 <[^>]*> lwr a0,[03]\(at\)
+0+0118 <[^>]*> lui at,[-0-9x]+
[ ]*118: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+011c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+011c <[^>]*> addiu at,at,[-0-9]+
[ ]*11c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0120 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0124 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0128 <[^>]*> lui \$at,[-0-9x]+
+0+0120 <[^>]*> lwl a0,[03]\(at\)
+0+0124 <[^>]*> lwr a0,[03]\(at\)
+0+0128 <[^>]*> lui at,[-0-9x]+
[ ]*128: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+012c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+012c <[^>]*> addiu at,at,[-0-9]+
[ ]*12c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0130 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0134 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0138 <[^>]*> lui \$at,[-0-9x]+
+0+0130 <[^>]*> lwl a0,[03]\(at\)
+0+0134 <[^>]*> lwr a0,[03]\(at\)
+0+0138 <[^>]*> lui at,[-0-9x]+
[ ]*138: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+013c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+013c <[^>]*> addiu at,at,[-0-9]+
[ ]*13c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0140 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0144 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0148 <[^>]*> lui \$at,[-0-9x]+
+0+0140 <[^>]*> lwl a0,[03]\(at\)
+0+0144 <[^>]*> lwr a0,[03]\(at\)
+0+0148 <[^>]*> lui at,[-0-9x]+
[ ]*148: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+014c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+014c <[^>]*> addiu at,at,[-0-9]+
[ ]*14c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0150 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0154 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0158 <[^>]*> lui \$at,[-0-9x]+
+0+0150 <[^>]*> lwl a0,[03]\(at\)
+0+0154 <[^>]*> lwr a0,[03]\(at\)
+0+0158 <[^>]*> lui at,[-0-9x]+
[ ]*158: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+015c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+015c <[^>]*> addiu at,at,[-0-9]+
[ ]*15c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0160 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0164 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0168 <[^>]*> lui \$at,[-0-9x]+
+0+0160 <[^>]*> lwl a0,[03]\(at\)
+0+0164 <[^>]*> lwr a0,[03]\(at\)
+0+0168 <[^>]*> lui at,[-0-9x]+
[ ]*168: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+016c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+016c <[^>]*> addiu at,at,[-0-9]+
[ ]*16c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0170 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0174 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0178 <[^>]*> lui \$at,[-0-9x]+
+0+0170 <[^>]*> lwl a0,[03]\(at\)
+0+0174 <[^>]*> lwr a0,[03]\(at\)
+0+0178 <[^>]*> lui at,[-0-9x]+
[ ]*178: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+017c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+017c <[^>]*> addiu at,at,[-0-9]+
[ ]*17c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0180 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0184 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0188 <[^>]*> lui \$at,0x0
+0+0180 <[^>]*> lwl a0,[03]\(at\)
+0+0184 <[^>]*> lwr a0,[03]\(at\)
+0+0188 <[^>]*> lui at,0x0
[ ]*188: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+018c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+018c <[^>]*> addiu at,at,[-0-9]+
[ ]*18c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0190 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0194 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0198 <[^>]*> lui \$at,0x0
+0+0190 <[^>]*> lwl a0,[03]\(at\)
+0+0194 <[^>]*> lwr a0,[03]\(at\)
+0+0198 <[^>]*> lui at,0x0
[ ]*198: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+019c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+019c <[^>]*> addiu at,at,[-0-9]+
[ ]*19c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01a0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+01a4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+01a8 <[^>]*> lui \$at,0x0
+0+01a0 <[^>]*> lwl a0,[03]\(at\)
+0+01a4 <[^>]*> lwr a0,[03]\(at\)
+0+01a8 <[^>]*> lui at,0x0
[ ]*1a8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+01ac <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01ac <[^>]*> addiu at,at,[-0-9]+
[ ]*1ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+01b0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+01b4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+01b8 <[^>]*> lui \$at,0x0
+0+01b0 <[^>]*> lwl a0,[03]\(at\)
+0+01b4 <[^>]*> lwr a0,[03]\(at\)
+0+01b8 <[^>]*> lui at,0x0
[ ]*1b8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01bc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01bc <[^>]*> addiu at,at,[-0-9]+
[ ]*1bc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01c0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+01c4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+01c8 <[^>]*> lui \$at,0x0
+0+01c0 <[^>]*> lwl a0,[03]\(at\)
+0+01c4 <[^>]*> lwr a0,[03]\(at\)
+0+01c8 <[^>]*> lui at,0x0
[ ]*1c8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+01cc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01cc <[^>]*> addiu at,at,[-0-9]+
[ ]*1cc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+01d0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+01d4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+01d8 <[^>]*> lui \$at,0x0
+0+01d0 <[^>]*> lwl a0,[03]\(at\)
+0+01d4 <[^>]*> lwr a0,[03]\(at\)
+0+01d8 <[^>]*> lui at,0x0
[ ]*1d8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+01dc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01dc <[^>]*> addiu at,at,[-0-9]+
[ ]*1dc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01e0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+01e4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+01e8 <[^>]*> lui \$at,0x0
+0+01e0 <[^>]*> lwl a0,[03]\(at\)
+0+01e4 <[^>]*> lwr a0,[03]\(at\)
+0+01e8 <[^>]*> lui at,0x0
[ ]*1e8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+01ec <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01ec <[^>]*> addiu at,at,[-0-9]+
[ ]*1ec: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+01f0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+01f4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+01f8 <[^>]*> lui \$at,[-0-9x]+
+0+01f0 <[^>]*> lwl a0,[03]\(at\)
+0+01f4 <[^>]*> lwr a0,[03]\(at\)
+0+01f8 <[^>]*> lui at,[-0-9x]+
[ ]*1f8: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+01fc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01fc <[^>]*> addiu at,at,[-0-9]+
[ ]*1fc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0200 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0204 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0208 <[^>]*> lui \$at,[-0-9x]+
+0+0200 <[^>]*> lwl a0,[03]\(at\)
+0+0204 <[^>]*> lwr a0,[03]\(at\)
+0+0208 <[^>]*> lui at,[-0-9x]+
[ ]*208: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+020c <[^>]*> addiu \$at,\$at,0
+0+020c <[^>]*> addiu at,at,0
[ ]*20c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0210 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0214 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0218 <[^>]*> lui \$at,[-0-9x]+
+0+0210 <[^>]*> lwl a0,[03]\(at\)
+0+0214 <[^>]*> lwr a0,[03]\(at\)
+0+0218 <[^>]*> lui at,[-0-9x]+
[ ]*218: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+021c <[^>]*> addiu \$at,\$at,0
+0+021c <[^>]*> addiu at,at,0
[ ]*21c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0220 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0224 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0228 <[^>]*> lui \$at,[-0-9x]+
+0+0220 <[^>]*> lwl a0,[03]\(at\)
+0+0224 <[^>]*> lwr a0,[03]\(at\)
+0+0228 <[^>]*> lui at,[-0-9x]+
[ ]*228: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+022c <[^>]*> addiu \$at,\$at,0
+0+022c <[^>]*> addiu at,at,0
[ ]*22c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0230 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0234 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0238 <[^>]*> lui \$at,[-0-9x]+
+0+0230 <[^>]*> lwl a0,[03]\(at\)
+0+0234 <[^>]*> lwr a0,[03]\(at\)
+0+0238 <[^>]*> lui at,[-0-9x]+
[ ]*238: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+023c <[^>]*> addiu \$at,\$at,0
+0+023c <[^>]*> addiu at,at,0
[ ]*23c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0240 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0244 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0248 <[^>]*> lui \$at,[-0-9x]+
+0+0240 <[^>]*> lwl a0,[03]\(at\)
+0+0244 <[^>]*> lwr a0,[03]\(at\)
+0+0248 <[^>]*> lui at,[-0-9x]+
[ ]*248: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+024c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+024c <[^>]*> addiu at,at,[-0-9]+
[ ]*24c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0250 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0254 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0258 <[^>]*> lui \$at,[-0-9x]+
+0+0250 <[^>]*> lwl a0,[03]\(at\)
+0+0254 <[^>]*> lwr a0,[03]\(at\)
+0+0258 <[^>]*> lui at,[-0-9x]+
[ ]*258: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+025c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+025c <[^>]*> addiu at,at,[-0-9]+
[ ]*25c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0260 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0264 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0268 <[^>]*> lui \$at,[-0-9x]+
+0+0260 <[^>]*> lwl a0,[03]\(at\)
+0+0264 <[^>]*> lwr a0,[03]\(at\)
+0+0268 <[^>]*> lui at,[-0-9x]+
[ ]*268: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+026c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+026c <[^>]*> addiu at,at,[-0-9]+
[ ]*26c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0270 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0274 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0278 <[^>]*> lui \$at,[-0-9x]+
+0+0270 <[^>]*> lwl a0,[03]\(at\)
+0+0274 <[^>]*> lwr a0,[03]\(at\)
+0+0278 <[^>]*> lui at,[-0-9x]+
[ ]*278: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+027c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+027c <[^>]*> addiu at,at,[-0-9]+
[ ]*27c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0280 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0284 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0288 <[^>]*> lui \$at,[-0-9x]+
+0+0280 <[^>]*> lwl a0,[03]\(at\)
+0+0284 <[^>]*> lwr a0,[03]\(at\)
+0+0288 <[^>]*> lui at,[-0-9x]+
[ ]*288: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+028c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+028c <[^>]*> addiu at,at,[-0-9]+
[ ]*28c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0290 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+0294 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+0298 <[^>]*> lui \$at,[-0-9x]+
+0+0290 <[^>]*> lwl a0,[03]\(at\)
+0+0294 <[^>]*> lwr a0,[03]\(at\)
+0+0298 <[^>]*> lui at,[-0-9x]+
[ ]*298: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+029c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+029c <[^>]*> addiu at,at,[-0-9]+
[ ]*29c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02a0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+02a4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+02a8 <[^>]*> lui \$at,[-0-9x]+
+0+02a0 <[^>]*> lwl a0,[03]\(at\)
+0+02a4 <[^>]*> lwr a0,[03]\(at\)
+0+02a8 <[^>]*> lui at,[-0-9x]+
[ ]*2a8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02ac <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02ac <[^>]*> addiu at,at,[-0-9]+
[ ]*2ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+02b0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+02b4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+02b8 <[^>]*> lui \$at,[-0-9x]+
+0+02b0 <[^>]*> lwl a0,[03]\(at\)
+0+02b4 <[^>]*> lwr a0,[03]\(at\)
+0+02b8 <[^>]*> lui at,[-0-9x]+
[ ]*2b8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02bc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02bc <[^>]*> addiu at,at,[-0-9]+
[ ]*2bc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02c0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+02c4 <[^>]*> lwr \$a0,[03]\(\$at\)
-0+02c8 <[^>]*> lui \$at,[-0-9x]+
+0+02c0 <[^>]*> lwl a0,[03]\(at\)
+0+02c4 <[^>]*> lwr a0,[03]\(at\)
+0+02c8 <[^>]*> lui at,[-0-9x]+
[ ]*2c8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+02cc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02cc <[^>]*> addiu at,at,[-0-9]+
[ ]*2cc: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+02d0 <[^>]*> lwl \$a0,[03]\(\$at\)
-0+02d4 <[^>]*> lwr \$a0,[03]\(\$at\)
+0+02d0 <[^>]*> lwl a0,[03]\(at\)
+0+02d4 <[^>]*> lwr a0,[03]\(at\)
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/usd.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/usd.d
index 63c0b73b63a..7aa701deed6 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/usd.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/usd.d
@@ -7,264 +7,264 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> sdl \$a0,[07]\(\$zero\)
-0+0004 <[^>]*> sdr \$a0,[07]\(\$zero\)
-0+0008 <[^>]*> sdl \$a0,[18]\(\$zero\)
-0+000c <[^>]*> sdr \$a0,[18]\(\$zero\)
-0+0010 <[^>]*> li \$at,0x8000
-0+0014 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0018 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+001c <[^>]*> sdl \$a0,-3276[18]\(\$zero\)
-0+0020 <[^>]*> sdr \$a0,-3276[18]\(\$zero\)
-0+0024 <[^>]*> lui \$at,0x1
-0+0028 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+002c <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0030 <[^>]*> lui \$at,0x1
-0+0034 <[^>]*> ori \$at,\$at,0xa5a5
-0+0038 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+003c <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0040 <[^>]*> sdl \$a0,[07]\(\$a1\)
-0+0044 <[^>]*> sdr \$a0,[07]\(\$a1\)
-0+0048 <[^>]*> sdl \$a0,[18]\(\$a1\)
-0+004c <[^>]*> sdr \$a0,[-0-9]+\(\$a1\)
-0+0050 <[^>]*> lui \$at,[-0-9x]+
+0+0000 <[^>]*> sdl a0,[07]\(zero\)
+0+0004 <[^>]*> sdr a0,[07]\(zero\)
+0+0008 <[^>]*> sdl a0,[18]\(zero\)
+0+000c <[^>]*> sdr a0,[18]\(zero\)
+0+0010 <[^>]*> li at,0x8000
+0+0014 <[^>]*> sdl a0,[07]\(at\)
+0+0018 <[^>]*> sdr a0,[07]\(at\)
+0+001c <[^>]*> sdl a0,-3276[18]\(zero\)
+0+0020 <[^>]*> sdr a0,-3276[18]\(zero\)
+0+0024 <[^>]*> lui at,0x1
+0+0028 <[^>]*> sdl a0,[07]\(at\)
+0+002c <[^>]*> sdr a0,[07]\(at\)
+0+0030 <[^>]*> lui at,0x1
+0+0034 <[^>]*> ori at,at,0xa5a5
+0+0038 <[^>]*> sdl a0,[07]\(at\)
+0+003c <[^>]*> sdr a0,[07]\(at\)
+0+0040 <[^>]*> sdl a0,[07]\(a1\)
+0+0044 <[^>]*> sdr a0,[07]\(a1\)
+0+0048 <[^>]*> sdl a0,[18]\(a1\)
+0+004c <[^>]*> sdr a0,[-0-9]+\(a1\)
+0+0050 <[^>]*> lui at,[-0-9x]+
[ ]*50: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0054 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+0054 <[^>]*> daddiu at,at,[-0-9]+
[ ]*54: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0058 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+005c <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0060 <[^>]*> lui \$at,[-0-9x]+
+0+0058 <[^>]*> sdl a0,[07]\(at\)
+0+005c <[^>]*> sdr a0,[07]\(at\)
+0+0060 <[^>]*> lui at,[-0-9x]+
[ ]*60: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0064 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+0064 <[^>]*> daddiu at,at,[-0-9]+
[ ]*64: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0068 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+006c <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0070 <[^>]*> daddiu \$at,\$gp,0
+0+0068 <[^>]*> sdl a0,[07]\(at\)
+0+006c <[^>]*> sdr a0,[07]\(at\)
+0+0070 <[^>]*> daddiu at,gp,0
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0074 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0078 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+007c <[^>]*> lui \$at,0x0
+0+0074 <[^>]*> sdl a0,[07]\(at\)
+0+0078 <[^>]*> sdr a0,[07]\(at\)
+0+007c <[^>]*> lui at,0x0
[ ]*7c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0080 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+0080 <[^>]*> daddiu at,at,[-0-9]+
[ ]*80: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0084 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0088 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+008c <[^>]*> daddiu \$at,\$gp,0
+0+0084 <[^>]*> sdl a0,[07]\(at\)
+0+0088 <[^>]*> sdr a0,[07]\(at\)
+0+008c <[^>]*> daddiu at,gp,0
[ ]*8c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0090 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0094 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0098 <[^>]*> lui \$at,[-0-9x]+
+0+0090 <[^>]*> sdl a0,[07]\(at\)
+0+0094 <[^>]*> sdr a0,[07]\(at\)
+0+0098 <[^>]*> lui at,[-0-9x]+
[ ]*98: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+009c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+009c <[^>]*> daddiu at,at,[-0-9]+
[ ]*9c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00a0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+00a4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+00a8 <[^>]*> daddiu \$at,\$gp,[-0-9]+
+0+00a0 <[^>]*> sdl a0,[07]\(at\)
+0+00a4 <[^>]*> sdr a0,[07]\(at\)
+0+00a8 <[^>]*> daddiu at,gp,[-0-9]+
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00ac <[^>]*> sdl \$a0,[07]\(\$at\)
-0+00b0 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+00b4 <[^>]*> lui \$at,0x0
+0+00ac <[^>]*> sdl a0,[07]\(at\)
+0+00b0 <[^>]*> sdr a0,[07]\(at\)
+0+00b4 <[^>]*> lui at,0x0
[ ]*b4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00b8 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+00b8 <[^>]*> daddiu at,at,[-0-9]+
[ ]*b8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00bc <[^>]*> sdl \$a0,[07]\(\$at\)
-0+00c0 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+00c4 <[^>]*> lui \$at,0x0
+0+00bc <[^>]*> sdl a0,[07]\(at\)
+0+00c0 <[^>]*> sdr a0,[07]\(at\)
+0+00c4 <[^>]*> lui at,0x0
[ ]*c4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00c8 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+00c8 <[^>]*> daddiu at,at,[-0-9]+
[ ]*c8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00cc <[^>]*> sdl \$a0,[07]\(\$at\)
-0+00d0 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+00d4 <[^>]*> daddiu \$at,\$gp,1
+0+00cc <[^>]*> sdl a0,[07]\(at\)
+0+00d0 <[^>]*> sdr a0,[07]\(at\)
+0+00d4 <[^>]*> daddiu at,gp,1
[ ]*d4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00d8 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+00dc <[^>]*> sdr \$a0,[07]\(\$at\)
-0+00e0 <[^>]*> lui \$at,0x0
+0+00d8 <[^>]*> sdl a0,[07]\(at\)
+0+00dc <[^>]*> sdr a0,[07]\(at\)
+0+00e0 <[^>]*> lui at,0x0
[ ]*e0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00e4 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+00e4 <[^>]*> daddiu at,at,[-0-9]+
[ ]*e4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00e8 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+00ec <[^>]*> sdr \$a0,[07]\(\$at\)
-0+00f0 <[^>]*> daddiu \$at,\$gp,1
+0+00e8 <[^>]*> sdl a0,[07]\(at\)
+0+00ec <[^>]*> sdr a0,[07]\(at\)
+0+00f0 <[^>]*> daddiu at,gp,1
[ ]*f0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00f4 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+00f8 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+00fc <[^>]*> lui \$at,0x0
+0+00f4 <[^>]*> sdl a0,[07]\(at\)
+0+00f8 <[^>]*> sdr a0,[07]\(at\)
+0+00fc <[^>]*> lui at,0x0
[ ]*fc: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0100 <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+0100 <[^>]*> daddiu at,at,[-0-9]+
[ ]*100: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0104 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0108 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+010c <[^>]*> daddiu \$at,\$gp,[-0-9]+
+0+0104 <[^>]*> sdl a0,[07]\(at\)
+0+0108 <[^>]*> sdr a0,[07]\(at\)
+0+010c <[^>]*> daddiu at,gp,[-0-9]+
[ ]*10c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0110 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0114 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0118 <[^>]*> lui \$at,[-0-9x]+
+0+0110 <[^>]*> sdl a0,[07]\(at\)
+0+0114 <[^>]*> sdr a0,[07]\(at\)
+0+0118 <[^>]*> lui at,[-0-9x]+
[ ]*118: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+011c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+011c <[^>]*> daddiu at,at,[-0-9]+
[ ]*11c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0120 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0124 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0128 <[^>]*> lui \$at,[-0-9x]+
+0+0120 <[^>]*> sdl a0,[07]\(at\)
+0+0124 <[^>]*> sdr a0,[07]\(at\)
+0+0128 <[^>]*> lui at,[-0-9x]+
[ ]*128: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+012c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+012c <[^>]*> daddiu at,at,[-0-9]+
[ ]*12c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0130 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0134 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0138 <[^>]*> lui \$at,[-0-9x]+
+0+0130 <[^>]*> sdl a0,[07]\(at\)
+0+0134 <[^>]*> sdr a0,[07]\(at\)
+0+0138 <[^>]*> lui at,[-0-9x]+
[ ]*138: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+013c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+013c <[^>]*> daddiu at,at,[-0-9]+
[ ]*13c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0140 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0144 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0148 <[^>]*> lui \$at,[-0-9x]+
+0+0140 <[^>]*> sdl a0,[07]\(at\)
+0+0144 <[^>]*> sdr a0,[07]\(at\)
+0+0148 <[^>]*> lui at,[-0-9x]+
[ ]*148: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+014c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+014c <[^>]*> daddiu at,at,[-0-9]+
[ ]*14c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0150 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0154 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0158 <[^>]*> lui \$at,[-0-9x]+
+0+0150 <[^>]*> sdl a0,[07]\(at\)
+0+0154 <[^>]*> sdr a0,[07]\(at\)
+0+0158 <[^>]*> lui at,[-0-9x]+
[ ]*158: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+015c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+015c <[^>]*> daddiu at,at,[-0-9]+
[ ]*15c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0160 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0164 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0168 <[^>]*> lui \$at,[-0-9x]+
+0+0160 <[^>]*> sdl a0,[07]\(at\)
+0+0164 <[^>]*> sdr a0,[07]\(at\)
+0+0168 <[^>]*> lui at,[-0-9x]+
[ ]*168: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+016c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+016c <[^>]*> daddiu at,at,[-0-9]+
[ ]*16c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0170 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0174 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0178 <[^>]*> lui \$at,[-0-9x]+
+0+0170 <[^>]*> sdl a0,[07]\(at\)
+0+0174 <[^>]*> sdr a0,[07]\(at\)
+0+0178 <[^>]*> lui at,[-0-9x]+
[ ]*178: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+017c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+017c <[^>]*> daddiu at,at,[-0-9]+
[ ]*17c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0180 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0184 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0188 <[^>]*> lui \$at,0x0
+0+0180 <[^>]*> sdl a0,[07]\(at\)
+0+0184 <[^>]*> sdr a0,[07]\(at\)
+0+0188 <[^>]*> lui at,0x0
[ ]*188: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+018c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+018c <[^>]*> daddiu at,at,[-0-9]+
[ ]*18c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0190 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0194 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0198 <[^>]*> lui \$at,0x0
+0+0190 <[^>]*> sdl a0,[07]\(at\)
+0+0194 <[^>]*> sdr a0,[07]\(at\)
+0+0198 <[^>]*> lui at,0x0
[ ]*198: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+019c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+019c <[^>]*> daddiu at,at,[-0-9]+
[ ]*19c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01a0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+01a4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+01a8 <[^>]*> lui \$at,0x0
+0+01a0 <[^>]*> sdl a0,[07]\(at\)
+0+01a4 <[^>]*> sdr a0,[07]\(at\)
+0+01a8 <[^>]*> lui at,0x0
[ ]*1a8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+01ac <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01ac <[^>]*> daddiu at,at,[-0-9]+
[ ]*1ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+01b0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+01b4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+01b8 <[^>]*> lui \$at,0x0
+0+01b0 <[^>]*> sdl a0,[07]\(at\)
+0+01b4 <[^>]*> sdr a0,[07]\(at\)
+0+01b8 <[^>]*> lui at,0x0
[ ]*1b8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01bc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01bc <[^>]*> daddiu at,at,[-0-9]+
[ ]*1bc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01c0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+01c4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+01c8 <[^>]*> lui \$at,0x0
+0+01c0 <[^>]*> sdl a0,[07]\(at\)
+0+01c4 <[^>]*> sdr a0,[07]\(at\)
+0+01c8 <[^>]*> lui at,0x0
[ ]*1c8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+01cc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01cc <[^>]*> daddiu at,at,[-0-9]+
[ ]*1cc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+01d0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+01d4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+01d8 <[^>]*> lui \$at,0x0
+0+01d0 <[^>]*> sdl a0,[07]\(at\)
+0+01d4 <[^>]*> sdr a0,[07]\(at\)
+0+01d8 <[^>]*> lui at,0x0
[ ]*1d8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+01dc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01dc <[^>]*> daddiu at,at,[-0-9]+
[ ]*1dc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01e0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+01e4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+01e8 <[^>]*> lui \$at,0x0
+0+01e0 <[^>]*> sdl a0,[07]\(at\)
+0+01e4 <[^>]*> sdr a0,[07]\(at\)
+0+01e8 <[^>]*> lui at,0x0
[ ]*1e8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+01ec <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01ec <[^>]*> daddiu at,at,[-0-9]+
[ ]*1ec: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+01f0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+01f4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+01f8 <[^>]*> lui \$at,[-0-9x]+
+0+01f0 <[^>]*> sdl a0,[07]\(at\)
+0+01f4 <[^>]*> sdr a0,[07]\(at\)
+0+01f8 <[^>]*> lui at,[-0-9x]+
[ ]*1f8: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+01fc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+01fc <[^>]*> daddiu at,at,[-0-9]+
[ ]*1fc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0200 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0204 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0208 <[^>]*> lui \$at,[-0-9x]+
+0+0200 <[^>]*> sdl a0,[07]\(at\)
+0+0204 <[^>]*> sdr a0,[07]\(at\)
+0+0208 <[^>]*> lui at,[-0-9x]+
[ ]*208: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+020c <[^>]*> daddiu \$at,\$at,0
+0+020c <[^>]*> daddiu at,at,0
[ ]*20c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0210 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0214 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0218 <[^>]*> lui \$at,[-0-9x]+
+0+0210 <[^>]*> sdl a0,[07]\(at\)
+0+0214 <[^>]*> sdr a0,[07]\(at\)
+0+0218 <[^>]*> lui at,[-0-9x]+
[ ]*218: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+021c <[^>]*> daddiu \$at,\$at,0
+0+021c <[^>]*> daddiu at,at,0
[ ]*21c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0220 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0224 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0228 <[^>]*> lui \$at,[-0-9x]+
+0+0220 <[^>]*> sdl a0,[07]\(at\)
+0+0224 <[^>]*> sdr a0,[07]\(at\)
+0+0228 <[^>]*> lui at,[-0-9x]+
[ ]*228: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+022c <[^>]*> daddiu \$at,\$at,0
+0+022c <[^>]*> daddiu at,at,0
[ ]*22c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0230 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0234 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0238 <[^>]*> lui \$at,[-0-9x]+
+0+0230 <[^>]*> sdl a0,[07]\(at\)
+0+0234 <[^>]*> sdr a0,[07]\(at\)
+0+0238 <[^>]*> lui at,[-0-9x]+
[ ]*238: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+023c <[^>]*> daddiu \$at,\$at,0
+0+023c <[^>]*> daddiu at,at,0
[ ]*23c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0240 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0244 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0248 <[^>]*> lui \$at,[-0-9x]+
+0+0240 <[^>]*> sdl a0,[07]\(at\)
+0+0244 <[^>]*> sdr a0,[07]\(at\)
+0+0248 <[^>]*> lui at,[-0-9x]+
[ ]*248: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+024c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+024c <[^>]*> daddiu at,at,[-0-9]+
[ ]*24c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0250 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0254 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0258 <[^>]*> lui \$at,[-0-9x]+
+0+0250 <[^>]*> sdl a0,[07]\(at\)
+0+0254 <[^>]*> sdr a0,[07]\(at\)
+0+0258 <[^>]*> lui at,[-0-9x]+
[ ]*258: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+025c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+025c <[^>]*> daddiu at,at,[-0-9]+
[ ]*25c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0260 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0264 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0268 <[^>]*> lui \$at,[-0-9x]+
+0+0260 <[^>]*> sdl a0,[07]\(at\)
+0+0264 <[^>]*> sdr a0,[07]\(at\)
+0+0268 <[^>]*> lui at,[-0-9x]+
[ ]*268: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+026c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+026c <[^>]*> daddiu at,at,[-0-9]+
[ ]*26c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0270 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0274 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0278 <[^>]*> lui \$at,[-0-9x]+
+0+0270 <[^>]*> sdl a0,[07]\(at\)
+0+0274 <[^>]*> sdr a0,[07]\(at\)
+0+0278 <[^>]*> lui at,[-0-9x]+
[ ]*278: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+027c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+027c <[^>]*> daddiu at,at,[-0-9]+
[ ]*27c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0280 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0284 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0288 <[^>]*> lui \$at,[-0-9x]+
+0+0280 <[^>]*> sdl a0,[07]\(at\)
+0+0284 <[^>]*> sdr a0,[07]\(at\)
+0+0288 <[^>]*> lui at,[-0-9x]+
[ ]*288: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+028c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+028c <[^>]*> daddiu at,at,[-0-9]+
[ ]*28c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0290 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+0294 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+0298 <[^>]*> lui \$at,[-0-9x]+
+0+0290 <[^>]*> sdl a0,[07]\(at\)
+0+0294 <[^>]*> sdr a0,[07]\(at\)
+0+0298 <[^>]*> lui at,[-0-9x]+
[ ]*298: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+029c <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+029c <[^>]*> daddiu at,at,[-0-9]+
[ ]*29c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02a0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+02a4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+02a8 <[^>]*> lui \$at,[-0-9x]+
+0+02a0 <[^>]*> sdl a0,[07]\(at\)
+0+02a4 <[^>]*> sdr a0,[07]\(at\)
+0+02a8 <[^>]*> lui at,[-0-9x]+
[ ]*2a8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02ac <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+02ac <[^>]*> daddiu at,at,[-0-9]+
[ ]*2ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+02b0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+02b4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+02b8 <[^>]*> lui \$at,[-0-9x]+
+0+02b0 <[^>]*> sdl a0,[07]\(at\)
+0+02b4 <[^>]*> sdr a0,[07]\(at\)
+0+02b8 <[^>]*> lui at,[-0-9x]+
[ ]*2b8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02bc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+02bc <[^>]*> daddiu at,at,[-0-9]+
[ ]*2bc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02c0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+02c4 <[^>]*> sdr \$a0,[07]\(\$at\)
-0+02c8 <[^>]*> lui \$at,[-0-9x]+
+0+02c0 <[^>]*> sdl a0,[07]\(at\)
+0+02c4 <[^>]*> sdr a0,[07]\(at\)
+0+02c8 <[^>]*> lui at,[-0-9x]+
[ ]*2c8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+02cc <[^>]*> daddiu \$at,\$at,[-0-9]+
+0+02cc <[^>]*> daddiu at,at,[-0-9]+
[ ]*2cc: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+02d0 <[^>]*> sdl \$a0,[07]\(\$at\)
-0+02d4 <[^>]*> sdr \$a0,[07]\(\$at\)
+0+02d0 <[^>]*> sdl a0,[07]\(at\)
+0+02d4 <[^>]*> sdr a0,[07]\(at\)
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ush.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ush.d
index c2f0a12eb71..de23e61e9fc 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ush.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/ush.d
@@ -7,449 +7,449 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> sb \$a0,[01]\(\$zero\)
-0+0004 <[^>]*> srl \$at,\$a0,0x8
-0+0008 <[^>]*> sb \$at,[01]\(\$zero\)
-0+000c <[^>]*> sb \$a0,[12]\(\$zero\)
-0+0010 <[^>]*> srl \$at,\$a0,0x8
-0+0014 <[^>]*> sb \$at,[12]\(\$zero\)
-0+0018 <[^>]*> li \$at,0x8000
-0+001c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0020 <[^>]*> srl \$a0,\$a0,0x8
-0+0024 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0028 <[^>]*> lbu \$at,[01]\(\$at\)
-0+002c <[^>]*> sll \$a0,\$a0,0x8
-0+0030 <[^>]*> or \$a0,\$a0,\$at
-0+0034 <[^>]*> sb \$a0,-3276[78]\(\$zero\)
-0+0038 <[^>]*> srl \$at,\$a0,0x8
-0+003c <[^>]*> sb \$at,-3276[78]\(\$zero\)
-0+0040 <[^>]*> lui \$at,0x1
-0+0044 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0048 <[^>]*> srl \$a0,\$a0,0x8
-0+004c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0050 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0054 <[^>]*> sll \$a0,\$a0,0x8
-0+0058 <[^>]*> or \$a0,\$a0,\$at
-0+005c <[^>]*> lui \$at,0x1
-0+0060 <[^>]*> ori \$at,\$at,0xa5a5
-0+0064 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0068 <[^>]*> srl \$a0,\$a0,0x8
-0+006c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0070 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0074 <[^>]*> sll \$a0,\$a0,0x8
-0+0078 <[^>]*> or \$a0,\$a0,\$at
-0+007c <[^>]*> sb \$a0,[01]\(\$a1\)
-0+0080 <[^>]*> srl \$at,\$a0,0x8
-0+0084 <[^>]*> sb \$at,[01]\(\$a1\)
-0+0088 <[^>]*> sb \$a0,[12]\(\$a1\)
-0+008c <[^>]*> srl \$at,\$a0,0x8
-0+0090 <[^>]*> sb \$at,[12]\(\$a1\)
-0+0094 <[^>]*> lui \$at,[-0-9x]+
+0+0000 <[^>]*> sb a0,[01]\(zero\)
+0+0004 <[^>]*> srl at,a0,0x8
+0+0008 <[^>]*> sb at,[01]\(zero\)
+0+000c <[^>]*> sb a0,[12]\(zero\)
+0+0010 <[^>]*> srl at,a0,0x8
+0+0014 <[^>]*> sb at,[12]\(zero\)
+0+0018 <[^>]*> li at,0x8000
+0+001c <[^>]*> sb a0,[01]\(at\)
+0+0020 <[^>]*> srl a0,a0,0x8
+0+0024 <[^>]*> sb a0,[01]\(at\)
+0+0028 <[^>]*> lbu at,[01]\(at\)
+0+002c <[^>]*> sll a0,a0,0x8
+0+0030 <[^>]*> or a0,a0,at
+0+0034 <[^>]*> sb a0,-3276[78]\(zero\)
+0+0038 <[^>]*> srl at,a0,0x8
+0+003c <[^>]*> sb at,-3276[78]\(zero\)
+0+0040 <[^>]*> lui at,0x1
+0+0044 <[^>]*> sb a0,[01]\(at\)
+0+0048 <[^>]*> srl a0,a0,0x8
+0+004c <[^>]*> sb a0,[01]\(at\)
+0+0050 <[^>]*> lbu at,[01]\(at\)
+0+0054 <[^>]*> sll a0,a0,0x8
+0+0058 <[^>]*> or a0,a0,at
+0+005c <[^>]*> lui at,0x1
+0+0060 <[^>]*> ori at,at,0xa5a5
+0+0064 <[^>]*> sb a0,[01]\(at\)
+0+0068 <[^>]*> srl a0,a0,0x8
+0+006c <[^>]*> sb a0,[01]\(at\)
+0+0070 <[^>]*> lbu at,[01]\(at\)
+0+0074 <[^>]*> sll a0,a0,0x8
+0+0078 <[^>]*> or a0,a0,at
+0+007c <[^>]*> sb a0,[01]\(a1\)
+0+0080 <[^>]*> srl at,a0,0x8
+0+0084 <[^>]*> sb at,[01]\(a1\)
+0+0088 <[^>]*> sb a0,[12]\(a1\)
+0+008c <[^>]*> srl at,a0,0x8
+0+0090 <[^>]*> sb at,[12]\(a1\)
+0+0094 <[^>]*> lui at,[-0-9x]+
[ ]*94: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0098 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0098 <[^>]*> addiu at,at,[-0-9]+
[ ]*98: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+009c <[^>]*> sb \$a0,[01]\(\$at\)
-0+00a0 <[^>]*> srl \$a0,\$a0,0x8
-0+00a4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+00a8 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00ac <[^>]*> sll \$a0,\$a0,0x8
-0+00b0 <[^>]*> or \$a0,\$a0,\$at
-0+00b4 <[^>]*> lui \$at,0x0
+0+009c <[^>]*> sb a0,[01]\(at\)
+0+00a0 <[^>]*> srl a0,a0,0x8
+0+00a4 <[^>]*> sb a0,[01]\(at\)
+0+00a8 <[^>]*> lbu at,[01]\(at\)
+0+00ac <[^>]*> sll a0,a0,0x8
+0+00b0 <[^>]*> or a0,a0,at
+0+00b4 <[^>]*> lui at,0x0
[ ]*b4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00b8 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00b8 <[^>]*> addiu at,at,[-0-9]+
[ ]*b8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00bc <[^>]*> sb \$a0,[01]\(\$at\)
-0+00c0 <[^>]*> srl \$a0,\$a0,0x8
-0+00c4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+00c8 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00cc <[^>]*> sll \$a0,\$a0,0x8
-0+00d0 <[^>]*> or \$a0,\$a0,\$at
-0+00d4 <[^>]*> addiu \$at,\$gp,0
+0+00bc <[^>]*> sb a0,[01]\(at\)
+0+00c0 <[^>]*> srl a0,a0,0x8
+0+00c4 <[^>]*> sb a0,[01]\(at\)
+0+00c8 <[^>]*> lbu at,[01]\(at\)
+0+00cc <[^>]*> sll a0,a0,0x8
+0+00d0 <[^>]*> or a0,a0,at
+0+00d4 <[^>]*> addiu at,gp,0
[ ]*d4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00d8 <[^>]*> sb \$a0,[01]\(\$at\)
-0+00dc <[^>]*> srl \$a0,\$a0,0x8
-0+00e0 <[^>]*> sb \$a0,[01]\(\$at\)
-0+00e4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+00e8 <[^>]*> sll \$a0,\$a0,0x8
-0+00ec <[^>]*> or \$a0,\$a0,\$at
-0+00f0 <[^>]*> lui \$at,[-0-9x]+
+0+00d8 <[^>]*> sb a0,[01]\(at\)
+0+00dc <[^>]*> srl a0,a0,0x8
+0+00e0 <[^>]*> sb a0,[01]\(at\)
+0+00e4 <[^>]*> lbu at,[01]\(at\)
+0+00e8 <[^>]*> sll a0,a0,0x8
+0+00ec <[^>]*> or a0,a0,at
+0+00f0 <[^>]*> lui at,[-0-9x]+
[ ]*f0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00f4 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00f4 <[^>]*> addiu at,at,[-0-9]+
[ ]*f4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00f8 <[^>]*> sb \$a0,[01]\(\$at\)
-0+00fc <[^>]*> srl \$a0,\$a0,0x8
-0+0100 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0104 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0108 <[^>]*> sll \$a0,\$a0,0x8
-0+010c <[^>]*> or \$a0,\$a0,\$at
-0+0110 <[^>]*> addiu \$at,\$gp,0
+0+00f8 <[^>]*> sb a0,[01]\(at\)
+0+00fc <[^>]*> srl a0,a0,0x8
+0+0100 <[^>]*> sb a0,[01]\(at\)
+0+0104 <[^>]*> lbu at,[01]\(at\)
+0+0108 <[^>]*> sll a0,a0,0x8
+0+010c <[^>]*> or a0,a0,at
+0+0110 <[^>]*> addiu at,gp,0
[ ]*110: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0114 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0118 <[^>]*> srl \$a0,\$a0,0x8
-0+011c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0120 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0124 <[^>]*> sll \$a0,\$a0,0x8
-0+0128 <[^>]*> or \$a0,\$a0,\$at
-0+012c <[^>]*> lui \$at,[-0-9x]+
+0+0114 <[^>]*> sb a0,[01]\(at\)
+0+0118 <[^>]*> srl a0,a0,0x8
+0+011c <[^>]*> sb a0,[01]\(at\)
+0+0120 <[^>]*> lbu at,[01]\(at\)
+0+0124 <[^>]*> sll a0,a0,0x8
+0+0128 <[^>]*> or a0,a0,at
+0+012c <[^>]*> lui at,[-0-9x]+
[ ]*12c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0130 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0130 <[^>]*> addiu at,at,[-0-9]+
[ ]*130: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0134 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0138 <[^>]*> srl \$a0,\$a0,0x8
-0+013c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0140 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0144 <[^>]*> sll \$a0,\$a0,0x8
-0+0148 <[^>]*> or \$a0,\$a0,\$at
-0+014c <[^>]*> addiu \$at,\$gp,[-0-9]+
+0+0134 <[^>]*> sb a0,[01]\(at\)
+0+0138 <[^>]*> srl a0,a0,0x8
+0+013c <[^>]*> sb a0,[01]\(at\)
+0+0140 <[^>]*> lbu at,[01]\(at\)
+0+0144 <[^>]*> sll a0,a0,0x8
+0+0148 <[^>]*> or a0,a0,at
+0+014c <[^>]*> addiu at,gp,[-0-9]+
[ ]*14c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0150 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0154 <[^>]*> srl \$a0,\$a0,0x8
-0+0158 <[^>]*> sb \$a0,[01]\(\$at\)
-0+015c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0160 <[^>]*> sll \$a0,\$a0,0x8
-0+0164 <[^>]*> or \$a0,\$a0,\$at
-0+0168 <[^>]*> lui \$at,0x0
+0+0150 <[^>]*> sb a0,[01]\(at\)
+0+0154 <[^>]*> srl a0,a0,0x8
+0+0158 <[^>]*> sb a0,[01]\(at\)
+0+015c <[^>]*> lbu at,[01]\(at\)
+0+0160 <[^>]*> sll a0,a0,0x8
+0+0164 <[^>]*> or a0,a0,at
+0+0168 <[^>]*> lui at,0x0
[ ]*168: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+016c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+016c <[^>]*> addiu at,at,[-0-9]+
[ ]*16c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0170 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0174 <[^>]*> srl \$a0,\$a0,0x8
-0+0178 <[^>]*> sb \$a0,[01]\(\$at\)
-0+017c <[^>]*> lbu \$at,[01]\(\$at\)
-0+0180 <[^>]*> sll \$a0,\$a0,0x8
-0+0184 <[^>]*> or \$a0,\$a0,\$at
-0+0188 <[^>]*> lui \$at,0x0
+0+0170 <[^>]*> sb a0,[01]\(at\)
+0+0174 <[^>]*> srl a0,a0,0x8
+0+0178 <[^>]*> sb a0,[01]\(at\)
+0+017c <[^>]*> lbu at,[01]\(at\)
+0+0180 <[^>]*> sll a0,a0,0x8
+0+0184 <[^>]*> or a0,a0,at
+0+0188 <[^>]*> lui at,0x0
[ ]*188: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+018c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+018c <[^>]*> addiu at,at,[-0-9]+
[ ]*18c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0190 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0194 <[^>]*> srl \$a0,\$a0,0x8
-0+0198 <[^>]*> sb \$a0,[01]\(\$at\)
-0+019c <[^>]*> lbu \$at,[01]\(\$at\)
-0+01a0 <[^>]*> sll \$a0,\$a0,0x8
-0+01a4 <[^>]*> or \$a0,\$a0,\$at
-0+01a8 <[^>]*> addiu \$at,\$gp,1
+0+0190 <[^>]*> sb a0,[01]\(at\)
+0+0194 <[^>]*> srl a0,a0,0x8
+0+0198 <[^>]*> sb a0,[01]\(at\)
+0+019c <[^>]*> lbu at,[01]\(at\)
+0+01a0 <[^>]*> sll a0,a0,0x8
+0+01a4 <[^>]*> or a0,a0,at
+0+01a8 <[^>]*> addiu at,gp,1
[ ]*1a8: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+01ac <[^>]*> sb \$a0,[01]\(\$at\)
-0+01b0 <[^>]*> srl \$a0,\$a0,0x8
-0+01b4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+01b8 <[^>]*> lbu \$at,[01]\(\$at\)
-0+01bc <[^>]*> sll \$a0,\$a0,0x8
-0+01c0 <[^>]*> or \$a0,\$a0,\$at
-0+01c4 <[^>]*> lui \$at,0x0
+0+01ac <[^>]*> sb a0,[01]\(at\)
+0+01b0 <[^>]*> srl a0,a0,0x8
+0+01b4 <[^>]*> sb a0,[01]\(at\)
+0+01b8 <[^>]*> lbu at,[01]\(at\)
+0+01bc <[^>]*> sll a0,a0,0x8
+0+01c0 <[^>]*> or a0,a0,at
+0+01c4 <[^>]*> lui at,0x0
[ ]*1c4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01c8 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01c8 <[^>]*> addiu at,at,[-0-9]+
[ ]*1c8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01cc <[^>]*> sb \$a0,[01]\(\$at\)
-0+01d0 <[^>]*> srl \$a0,\$a0,0x8
-0+01d4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+01d8 <[^>]*> lbu \$at,[01]\(\$at\)
-0+01dc <[^>]*> sll \$a0,\$a0,0x8
-0+01e0 <[^>]*> or \$a0,\$a0,\$at
-0+01e4 <[^>]*> addiu \$at,\$gp,1
+0+01cc <[^>]*> sb a0,[01]\(at\)
+0+01d0 <[^>]*> srl a0,a0,0x8
+0+01d4 <[^>]*> sb a0,[01]\(at\)
+0+01d8 <[^>]*> lbu at,[01]\(at\)
+0+01dc <[^>]*> sll a0,a0,0x8
+0+01e0 <[^>]*> or a0,a0,at
+0+01e4 <[^>]*> addiu at,gp,1
[ ]*1e4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+01e8 <[^>]*> sb \$a0,[01]\(\$at\)
-0+01ec <[^>]*> srl \$a0,\$a0,0x8
-0+01f0 <[^>]*> sb \$a0,[01]\(\$at\)
-0+01f4 <[^>]*> lbu \$at,[01]\(\$at\)
-0+01f8 <[^>]*> sll \$a0,\$a0,0x8
-0+01fc <[^>]*> or \$a0,\$a0,\$at
-0+0200 <[^>]*> lui \$at,0x0
+0+01e8 <[^>]*> sb a0,[01]\(at\)
+0+01ec <[^>]*> srl a0,a0,0x8
+0+01f0 <[^>]*> sb a0,[01]\(at\)
+0+01f4 <[^>]*> lbu at,[01]\(at\)
+0+01f8 <[^>]*> sll a0,a0,0x8
+0+01fc <[^>]*> or a0,a0,at
+0+0200 <[^>]*> lui at,0x0
[ ]*200: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0204 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0204 <[^>]*> addiu at,at,[-0-9]+
[ ]*204: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0208 <[^>]*> sb \$a0,[01]\(\$at\)
-0+020c <[^>]*> srl \$a0,\$a0,0x8
-0+0210 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0214 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0218 <[^>]*> sll \$a0,\$a0,0x8
-0+021c <[^>]*> or \$a0,\$a0,\$at
-0+0220 <[^>]*> addiu \$at,\$gp,[-0-9]+
+0+0208 <[^>]*> sb a0,[01]\(at\)
+0+020c <[^>]*> srl a0,a0,0x8
+0+0210 <[^>]*> sb a0,[01]\(at\)
+0+0214 <[^>]*> lbu at,[01]\(at\)
+0+0218 <[^>]*> sll a0,a0,0x8
+0+021c <[^>]*> or a0,a0,at
+0+0220 <[^>]*> addiu at,gp,[-0-9]+
[ ]*220: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0224 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0228 <[^>]*> srl \$a0,\$a0,0x8
-0+022c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0230 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0234 <[^>]*> sll \$a0,\$a0,0x8
-0+0238 <[^>]*> or \$a0,\$a0,\$at
-0+023c <[^>]*> lui \$at,[-0-9x]+
+0+0224 <[^>]*> sb a0,[01]\(at\)
+0+0228 <[^>]*> srl a0,a0,0x8
+0+022c <[^>]*> sb a0,[01]\(at\)
+0+0230 <[^>]*> lbu at,[01]\(at\)
+0+0234 <[^>]*> sll a0,a0,0x8
+0+0238 <[^>]*> or a0,a0,at
+0+023c <[^>]*> lui at,[-0-9x]+
[ ]*23c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0240 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0240 <[^>]*> addiu at,at,[-0-9]+
[ ]*240: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0244 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0248 <[^>]*> srl \$a0,\$a0,0x8
-0+024c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0250 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0254 <[^>]*> sll \$a0,\$a0,0x8
-0+0258 <[^>]*> or \$a0,\$a0,\$at
-0+025c <[^>]*> lui \$at,[-0-9x]+
+0+0244 <[^>]*> sb a0,[01]\(at\)
+0+0248 <[^>]*> srl a0,a0,0x8
+0+024c <[^>]*> sb a0,[01]\(at\)
+0+0250 <[^>]*> lbu at,[01]\(at\)
+0+0254 <[^>]*> sll a0,a0,0x8
+0+0258 <[^>]*> or a0,a0,at
+0+025c <[^>]*> lui at,[-0-9x]+
[ ]*25c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0260 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0260 <[^>]*> addiu at,at,[-0-9]+
[ ]*260: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0264 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0268 <[^>]*> srl \$a0,\$a0,0x8
-0+026c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0270 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0274 <[^>]*> sll \$a0,\$a0,0x8
-0+0278 <[^>]*> or \$a0,\$a0,\$at
-0+027c <[^>]*> lui \$at,[-0-9x]+
+0+0264 <[^>]*> sb a0,[01]\(at\)
+0+0268 <[^>]*> srl a0,a0,0x8
+0+026c <[^>]*> sb a0,[01]\(at\)
+0+0270 <[^>]*> lbu at,[01]\(at\)
+0+0274 <[^>]*> sll a0,a0,0x8
+0+0278 <[^>]*> or a0,a0,at
+0+027c <[^>]*> lui at,[-0-9x]+
[ ]*27c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0280 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0280 <[^>]*> addiu at,at,[-0-9]+
[ ]*280: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0284 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0288 <[^>]*> srl \$a0,\$a0,0x8
-0+028c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0290 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0294 <[^>]*> sll \$a0,\$a0,0x8
-0+0298 <[^>]*> or \$a0,\$a0,\$at
-0+029c <[^>]*> lui \$at,[-0-9x]+
+0+0284 <[^>]*> sb a0,[01]\(at\)
+0+0288 <[^>]*> srl a0,a0,0x8
+0+028c <[^>]*> sb a0,[01]\(at\)
+0+0290 <[^>]*> lbu at,[01]\(at\)
+0+0294 <[^>]*> sll a0,a0,0x8
+0+0298 <[^>]*> or a0,a0,at
+0+029c <[^>]*> lui at,[-0-9x]+
[ ]*29c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+02a0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02a0 <[^>]*> addiu at,at,[-0-9]+
[ ]*2a0: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02a4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+02a8 <[^>]*> srl \$a0,\$a0,0x8
-0+02ac <[^>]*> sb \$a0,[01]\(\$at\)
-0+02b0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+02b4 <[^>]*> sll \$a0,\$a0,0x8
-0+02b8 <[^>]*> or \$a0,\$a0,\$at
-0+02bc <[^>]*> lui \$at,[-0-9x]+
+0+02a4 <[^>]*> sb a0,[01]\(at\)
+0+02a8 <[^>]*> srl a0,a0,0x8
+0+02ac <[^>]*> sb a0,[01]\(at\)
+0+02b0 <[^>]*> lbu at,[01]\(at\)
+0+02b4 <[^>]*> sll a0,a0,0x8
+0+02b8 <[^>]*> or a0,a0,at
+0+02bc <[^>]*> lui at,[-0-9x]+
[ ]*2bc: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02c0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02c0 <[^>]*> addiu at,at,[-0-9]+
[ ]*2c0: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+02c4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+02c8 <[^>]*> srl \$a0,\$a0,0x8
-0+02cc <[^>]*> sb \$a0,[01]\(\$at\)
-0+02d0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+02d4 <[^>]*> sll \$a0,\$a0,0x8
-0+02d8 <[^>]*> or \$a0,\$a0,\$at
-0+02dc <[^>]*> lui \$at,[-0-9x]+
+0+02c4 <[^>]*> sb a0,[01]\(at\)
+0+02c8 <[^>]*> srl a0,a0,0x8
+0+02cc <[^>]*> sb a0,[01]\(at\)
+0+02d0 <[^>]*> lbu at,[01]\(at\)
+0+02d4 <[^>]*> sll a0,a0,0x8
+0+02d8 <[^>]*> or a0,a0,at
+0+02dc <[^>]*> lui at,[-0-9x]+
[ ]*2dc: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02e0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02e0 <[^>]*> addiu at,at,[-0-9]+
[ ]*2e0: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02e4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+02e8 <[^>]*> srl \$a0,\$a0,0x8
-0+02ec <[^>]*> sb \$a0,[01]\(\$at\)
-0+02f0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+02f4 <[^>]*> sll \$a0,\$a0,0x8
-0+02f8 <[^>]*> or \$a0,\$a0,\$at
-0+02fc <[^>]*> lui \$at,[-0-9x]+
+0+02e4 <[^>]*> sb a0,[01]\(at\)
+0+02e8 <[^>]*> srl a0,a0,0x8
+0+02ec <[^>]*> sb a0,[01]\(at\)
+0+02f0 <[^>]*> lbu at,[01]\(at\)
+0+02f4 <[^>]*> sll a0,a0,0x8
+0+02f8 <[^>]*> or a0,a0,at
+0+02fc <[^>]*> lui at,[-0-9x]+
[ ]*2fc: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+0300 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0300 <[^>]*> addiu at,at,[-0-9]+
[ ]*300: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0304 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0308 <[^>]*> srl \$a0,\$a0,0x8
-0+030c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0310 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0314 <[^>]*> sll \$a0,\$a0,0x8
-0+0318 <[^>]*> or \$a0,\$a0,\$at
-0+031c <[^>]*> lui \$at,0x0
+0+0304 <[^>]*> sb a0,[01]\(at\)
+0+0308 <[^>]*> srl a0,a0,0x8
+0+030c <[^>]*> sb a0,[01]\(at\)
+0+0310 <[^>]*> lbu at,[01]\(at\)
+0+0314 <[^>]*> sll a0,a0,0x8
+0+0318 <[^>]*> or a0,a0,at
+0+031c <[^>]*> lui at,0x0
[ ]*31c: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0320 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0320 <[^>]*> addiu at,at,[-0-9]+
[ ]*320: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0324 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0328 <[^>]*> srl \$a0,\$a0,0x8
-0+032c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0330 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0334 <[^>]*> sll \$a0,\$a0,0x8
-0+0338 <[^>]*> or \$a0,\$a0,\$at
-0+033c <[^>]*> lui \$at,0x0
+0+0324 <[^>]*> sb a0,[01]\(at\)
+0+0328 <[^>]*> srl a0,a0,0x8
+0+032c <[^>]*> sb a0,[01]\(at\)
+0+0330 <[^>]*> lbu at,[01]\(at\)
+0+0334 <[^>]*> sll a0,a0,0x8
+0+0338 <[^>]*> or a0,a0,at
+0+033c <[^>]*> lui at,0x0
[ ]*33c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0340 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0340 <[^>]*> addiu at,at,[-0-9]+
[ ]*340: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0344 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0348 <[^>]*> srl \$a0,\$a0,0x8
-0+034c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0350 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0354 <[^>]*> sll \$a0,\$a0,0x8
-0+0358 <[^>]*> or \$a0,\$a0,\$at
-0+035c <[^>]*> lui \$at,0x0
+0+0344 <[^>]*> sb a0,[01]\(at\)
+0+0348 <[^>]*> srl a0,a0,0x8
+0+034c <[^>]*> sb a0,[01]\(at\)
+0+0350 <[^>]*> lbu at,[01]\(at\)
+0+0354 <[^>]*> sll a0,a0,0x8
+0+0358 <[^>]*> or a0,a0,at
+0+035c <[^>]*> lui at,0x0
[ ]*35c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0360 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0360 <[^>]*> addiu at,at,[-0-9]+
[ ]*360: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0364 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0368 <[^>]*> srl \$a0,\$a0,0x8
-0+036c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0370 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0374 <[^>]*> sll \$a0,\$a0,0x8
-0+0378 <[^>]*> or \$a0,\$a0,\$at
-0+037c <[^>]*> lui \$at,0x0
+0+0364 <[^>]*> sb a0,[01]\(at\)
+0+0368 <[^>]*> srl a0,a0,0x8
+0+036c <[^>]*> sb a0,[01]\(at\)
+0+0370 <[^>]*> lbu at,[01]\(at\)
+0+0374 <[^>]*> sll a0,a0,0x8
+0+0378 <[^>]*> or a0,a0,at
+0+037c <[^>]*> lui at,0x0
[ ]*37c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0380 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0380 <[^>]*> addiu at,at,[-0-9]+
[ ]*380: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0384 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0388 <[^>]*> srl \$a0,\$a0,0x8
-0+038c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0390 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0394 <[^>]*> sll \$a0,\$a0,0x8
-0+0398 <[^>]*> or \$a0,\$a0,\$at
-0+039c <[^>]*> lui \$at,0x0
+0+0384 <[^>]*> sb a0,[01]\(at\)
+0+0388 <[^>]*> srl a0,a0,0x8
+0+038c <[^>]*> sb a0,[01]\(at\)
+0+0390 <[^>]*> lbu at,[01]\(at\)
+0+0394 <[^>]*> sll a0,a0,0x8
+0+0398 <[^>]*> or a0,a0,at
+0+039c <[^>]*> lui at,0x0
[ ]*39c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+03a0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+03a0 <[^>]*> addiu at,at,[-0-9]+
[ ]*3a0: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+03a4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+03a8 <[^>]*> srl \$a0,\$a0,0x8
-0+03ac <[^>]*> sb \$a0,[01]\(\$at\)
-0+03b0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+03b4 <[^>]*> sll \$a0,\$a0,0x8
-0+03b8 <[^>]*> or \$a0,\$a0,\$at
-0+03bc <[^>]*> lui \$at,0x0
+0+03a4 <[^>]*> sb a0,[01]\(at\)
+0+03a8 <[^>]*> srl a0,a0,0x8
+0+03ac <[^>]*> sb a0,[01]\(at\)
+0+03b0 <[^>]*> lbu at,[01]\(at\)
+0+03b4 <[^>]*> sll a0,a0,0x8
+0+03b8 <[^>]*> or a0,a0,at
+0+03bc <[^>]*> lui at,0x0
[ ]*3bc: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+03c0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+03c0 <[^>]*> addiu at,at,[-0-9]+
[ ]*3c0: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+03c4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+03c8 <[^>]*> srl \$a0,\$a0,0x8
-0+03cc <[^>]*> sb \$a0,[01]\(\$at\)
-0+03d0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+03d4 <[^>]*> sll \$a0,\$a0,0x8
-0+03d8 <[^>]*> or \$a0,\$a0,\$at
-0+03dc <[^>]*> lui \$at,0x0
+0+03c4 <[^>]*> sb a0,[01]\(at\)
+0+03c8 <[^>]*> srl a0,a0,0x8
+0+03cc <[^>]*> sb a0,[01]\(at\)
+0+03d0 <[^>]*> lbu at,[01]\(at\)
+0+03d4 <[^>]*> sll a0,a0,0x8
+0+03d8 <[^>]*> or a0,a0,at
+0+03dc <[^>]*> lui at,0x0
[ ]*3dc: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+03e0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+03e0 <[^>]*> addiu at,at,[-0-9]+
[ ]*3e0: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+03e4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+03e8 <[^>]*> srl \$a0,\$a0,0x8
-0+03ec <[^>]*> sb \$a0,[01]\(\$at\)
-0+03f0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+03f4 <[^>]*> sll \$a0,\$a0,0x8
-0+03f8 <[^>]*> or \$a0,\$a0,\$at
-0+03fc <[^>]*> lui \$at,[-0-9x]+
+0+03e4 <[^>]*> sb a0,[01]\(at\)
+0+03e8 <[^>]*> srl a0,a0,0x8
+0+03ec <[^>]*> sb a0,[01]\(at\)
+0+03f0 <[^>]*> lbu at,[01]\(at\)
+0+03f4 <[^>]*> sll a0,a0,0x8
+0+03f8 <[^>]*> or a0,a0,at
+0+03fc <[^>]*> lui at,[-0-9x]+
[ ]*3fc: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0400 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0400 <[^>]*> addiu at,at,[-0-9]+
[ ]*400: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0404 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0408 <[^>]*> srl \$a0,\$a0,0x8
-0+040c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0410 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0414 <[^>]*> sll \$a0,\$a0,0x8
-0+0418 <[^>]*> or \$a0,\$a0,\$at
-0+041c <[^>]*> lui \$at,[-0-9x]+
+0+0404 <[^>]*> sb a0,[01]\(at\)
+0+0408 <[^>]*> srl a0,a0,0x8
+0+040c <[^>]*> sb a0,[01]\(at\)
+0+0410 <[^>]*> lbu at,[01]\(at\)
+0+0414 <[^>]*> sll a0,a0,0x8
+0+0418 <[^>]*> or a0,a0,at
+0+041c <[^>]*> lui at,[-0-9x]+
[ ]*41c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0420 <[^>]*> addiu \$at,\$at,0
+0+0420 <[^>]*> addiu at,at,0
[ ]*420: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0424 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0428 <[^>]*> srl \$a0,\$a0,0x8
-0+042c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0430 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0434 <[^>]*> sll \$a0,\$a0,0x8
-0+0438 <[^>]*> or \$a0,\$a0,\$at
-0+043c <[^>]*> lui \$at,[-0-9x]+
+0+0424 <[^>]*> sb a0,[01]\(at\)
+0+0428 <[^>]*> srl a0,a0,0x8
+0+042c <[^>]*> sb a0,[01]\(at\)
+0+0430 <[^>]*> lbu at,[01]\(at\)
+0+0434 <[^>]*> sll a0,a0,0x8
+0+0438 <[^>]*> or a0,a0,at
+0+043c <[^>]*> lui at,[-0-9x]+
[ ]*43c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0440 <[^>]*> addiu \$at,\$at,0
+0+0440 <[^>]*> addiu at,at,0
[ ]*440: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0444 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0448 <[^>]*> srl \$a0,\$a0,0x8
-0+044c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0450 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0454 <[^>]*> sll \$a0,\$a0,0x8
-0+0458 <[^>]*> or \$a0,\$a0,\$at
-0+045c <[^>]*> lui \$at,[-0-9x]+
+0+0444 <[^>]*> sb a0,[01]\(at\)
+0+0448 <[^>]*> srl a0,a0,0x8
+0+044c <[^>]*> sb a0,[01]\(at\)
+0+0450 <[^>]*> lbu at,[01]\(at\)
+0+0454 <[^>]*> sll a0,a0,0x8
+0+0458 <[^>]*> or a0,a0,at
+0+045c <[^>]*> lui at,[-0-9x]+
[ ]*45c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0460 <[^>]*> addiu \$at,\$at,0
+0+0460 <[^>]*> addiu at,at,0
[ ]*460: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0464 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0468 <[^>]*> srl \$a0,\$a0,0x8
-0+046c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0470 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0474 <[^>]*> sll \$a0,\$a0,0x8
-0+0478 <[^>]*> or \$a0,\$a0,\$at
-0+047c <[^>]*> lui \$at,[-0-9x]+
+0+0464 <[^>]*> sb a0,[01]\(at\)
+0+0468 <[^>]*> srl a0,a0,0x8
+0+046c <[^>]*> sb a0,[01]\(at\)
+0+0470 <[^>]*> lbu at,[01]\(at\)
+0+0474 <[^>]*> sll a0,a0,0x8
+0+0478 <[^>]*> or a0,a0,at
+0+047c <[^>]*> lui at,[-0-9x]+
[ ]*47c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0480 <[^>]*> addiu \$at,\$at,0
+0+0480 <[^>]*> addiu at,at,0
[ ]*480: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0484 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0488 <[^>]*> srl \$a0,\$a0,0x8
-0+048c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0490 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0494 <[^>]*> sll \$a0,\$a0,0x8
-0+0498 <[^>]*> or \$a0,\$a0,\$at
-0+049c <[^>]*> lui \$at,[-0-9x]+
+0+0484 <[^>]*> sb a0,[01]\(at\)
+0+0488 <[^>]*> srl a0,a0,0x8
+0+048c <[^>]*> sb a0,[01]\(at\)
+0+0490 <[^>]*> lbu at,[01]\(at\)
+0+0494 <[^>]*> sll a0,a0,0x8
+0+0498 <[^>]*> or a0,a0,at
+0+049c <[^>]*> lui at,[-0-9x]+
[ ]*49c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+04a0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+04a0 <[^>]*> addiu at,at,[-0-9]+
[ ]*4a0: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+04a4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+04a8 <[^>]*> srl \$a0,\$a0,0x8
-0+04ac <[^>]*> sb \$a0,[01]\(\$at\)
-0+04b0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+04b4 <[^>]*> sll \$a0,\$a0,0x8
-0+04b8 <[^>]*> or \$a0,\$a0,\$at
-0+04bc <[^>]*> lui \$at,[-0-9x]+
+0+04a4 <[^>]*> sb a0,[01]\(at\)
+0+04a8 <[^>]*> srl a0,a0,0x8
+0+04ac <[^>]*> sb a0,[01]\(at\)
+0+04b0 <[^>]*> lbu at,[01]\(at\)
+0+04b4 <[^>]*> sll a0,a0,0x8
+0+04b8 <[^>]*> or a0,a0,at
+0+04bc <[^>]*> lui at,[-0-9x]+
[ ]*4bc: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+04c0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+04c0 <[^>]*> addiu at,at,[-0-9]+
[ ]*4c0: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+04c4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+04c8 <[^>]*> srl \$a0,\$a0,0x8
-0+04cc <[^>]*> sb \$a0,[01]\(\$at\)
-0+04d0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+04d4 <[^>]*> sll \$a0,\$a0,0x8
-0+04d8 <[^>]*> or \$a0,\$a0,\$at
-0+04dc <[^>]*> lui \$at,[-0-9x]+
+0+04c4 <[^>]*> sb a0,[01]\(at\)
+0+04c8 <[^>]*> srl a0,a0,0x8
+0+04cc <[^>]*> sb a0,[01]\(at\)
+0+04d0 <[^>]*> lbu at,[01]\(at\)
+0+04d4 <[^>]*> sll a0,a0,0x8
+0+04d8 <[^>]*> or a0,a0,at
+0+04dc <[^>]*> lui at,[-0-9x]+
[ ]*4dc: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+04e0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+04e0 <[^>]*> addiu at,at,[-0-9]+
[ ]*4e0: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+04e4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+04e8 <[^>]*> srl \$a0,\$a0,0x8
-0+04ec <[^>]*> sb \$a0,[01]\(\$at\)
-0+04f0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+04f4 <[^>]*> sll \$a0,\$a0,0x8
-0+04f8 <[^>]*> or \$a0,\$a0,\$at
-0+04fc <[^>]*> lui \$at,[-0-9x]+
+0+04e4 <[^>]*> sb a0,[01]\(at\)
+0+04e8 <[^>]*> srl a0,a0,0x8
+0+04ec <[^>]*> sb a0,[01]\(at\)
+0+04f0 <[^>]*> lbu at,[01]\(at\)
+0+04f4 <[^>]*> sll a0,a0,0x8
+0+04f8 <[^>]*> or a0,a0,at
+0+04fc <[^>]*> lui at,[-0-9x]+
[ ]*4fc: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0500 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0500 <[^>]*> addiu at,at,[-0-9]+
[ ]*500: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0504 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0508 <[^>]*> srl \$a0,\$a0,0x8
-0+050c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0510 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0514 <[^>]*> sll \$a0,\$a0,0x8
-0+0518 <[^>]*> or \$a0,\$a0,\$at
-0+051c <[^>]*> lui \$at,[-0-9x]+
+0+0504 <[^>]*> sb a0,[01]\(at\)
+0+0508 <[^>]*> srl a0,a0,0x8
+0+050c <[^>]*> sb a0,[01]\(at\)
+0+0510 <[^>]*> lbu at,[01]\(at\)
+0+0514 <[^>]*> sll a0,a0,0x8
+0+0518 <[^>]*> or a0,a0,at
+0+051c <[^>]*> lui at,[-0-9x]+
[ ]*51c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+0520 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0520 <[^>]*> addiu at,at,[-0-9]+
[ ]*520: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0524 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0528 <[^>]*> srl \$a0,\$a0,0x8
-0+052c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0530 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0534 <[^>]*> sll \$a0,\$a0,0x8
-0+0538 <[^>]*> or \$a0,\$a0,\$at
-0+053c <[^>]*> lui \$at,[-0-9x]+
+0+0524 <[^>]*> sb a0,[01]\(at\)
+0+0528 <[^>]*> srl a0,a0,0x8
+0+052c <[^>]*> sb a0,[01]\(at\)
+0+0530 <[^>]*> lbu at,[01]\(at\)
+0+0534 <[^>]*> sll a0,a0,0x8
+0+0538 <[^>]*> or a0,a0,at
+0+053c <[^>]*> lui at,[-0-9x]+
[ ]*53c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0540 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0540 <[^>]*> addiu at,at,[-0-9]+
[ ]*540: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0544 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0548 <[^>]*> srl \$a0,\$a0,0x8
-0+054c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0550 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0554 <[^>]*> sll \$a0,\$a0,0x8
-0+0558 <[^>]*> or \$a0,\$a0,\$at
-0+055c <[^>]*> lui \$at,[-0-9x]+
+0+0544 <[^>]*> sb a0,[01]\(at\)
+0+0548 <[^>]*> srl a0,a0,0x8
+0+054c <[^>]*> sb a0,[01]\(at\)
+0+0550 <[^>]*> lbu at,[01]\(at\)
+0+0554 <[^>]*> sll a0,a0,0x8
+0+0558 <[^>]*> or a0,a0,at
+0+055c <[^>]*> lui at,[-0-9x]+
[ ]*55c: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+0560 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0560 <[^>]*> addiu at,at,[-0-9]+
[ ]*560: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0564 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0568 <[^>]*> srl \$a0,\$a0,0x8
-0+056c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0570 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0574 <[^>]*> sll \$a0,\$a0,0x8
-0+0578 <[^>]*> or \$a0,\$a0,\$at
-0+057c <[^>]*> lui \$at,[-0-9x]+
+0+0564 <[^>]*> sb a0,[01]\(at\)
+0+0568 <[^>]*> srl a0,a0,0x8
+0+056c <[^>]*> sb a0,[01]\(at\)
+0+0570 <[^>]*> lbu at,[01]\(at\)
+0+0574 <[^>]*> sll a0,a0,0x8
+0+0578 <[^>]*> or a0,a0,at
+0+057c <[^>]*> lui at,[-0-9x]+
[ ]*57c: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0580 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0580 <[^>]*> addiu at,at,[-0-9]+
[ ]*580: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0584 <[^>]*> sb \$a0,[01]\(\$at\)
-0+0588 <[^>]*> srl \$a0,\$a0,0x8
-0+058c <[^>]*> sb \$a0,[01]\(\$at\)
-0+0590 <[^>]*> lbu \$at,[01]\(\$at\)
-0+0594 <[^>]*> sll \$a0,\$a0,0x8
-0+0598 <[^>]*> or \$a0,\$a0,\$at
-0+059c <[^>]*> lui \$at,[-0-9x]+
+0+0584 <[^>]*> sb a0,[01]\(at\)
+0+0588 <[^>]*> srl a0,a0,0x8
+0+058c <[^>]*> sb a0,[01]\(at\)
+0+0590 <[^>]*> lbu at,[01]\(at\)
+0+0594 <[^>]*> sll a0,a0,0x8
+0+0598 <[^>]*> or a0,a0,at
+0+059c <[^>]*> lui at,[-0-9x]+
[ ]*59c: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+05a0 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+05a0 <[^>]*> addiu at,at,[-0-9]+
[ ]*5a0: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+05a4 <[^>]*> sb \$a0,[01]\(\$at\)
-0+05a8 <[^>]*> srl \$a0,\$a0,0x8
-0+05ac <[^>]*> sb \$a0,[01]\(\$at\)
-0+05b0 <[^>]*> lbu \$at,[01]\(\$at\)
-0+05b4 <[^>]*> sll \$a0,\$a0,0x8
-0+05b8 <[^>]*> or \$a0,\$a0,\$at
+0+05a4 <[^>]*> sb a0,[01]\(at\)
+0+05a8 <[^>]*> srl a0,a0,0x8
+0+05ac <[^>]*> sb a0,[01]\(at\)
+0+05b0 <[^>]*> lbu at,[01]\(at\)
+0+05b4 <[^>]*> sll a0,a0,0x8
+0+05b8 <[^>]*> or a0,a0,at
0+05bc <[^>]*> nop
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/usw.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/usw.d
index 59d28cc22e2..e500792903d 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/usw.d
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/usw.d
@@ -7,264 +7,264 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> swl \$a0,[03]\(\$zero\)
-0+0004 <[^>]*> swr \$a0,[03]\(\$zero\)
-0+0008 <[^>]*> swl \$a0,[14]\(\$zero\)
-0+000c <[^>]*> swr \$a0,[14]\(\$zero\)
-0+0010 <[^>]*> li \$at,0x8000
-0+0014 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0018 <[^>]*> swr \$a0,[03]\(\$at\)
-0+001c <[^>]*> swl \$a0,-3276[58]\(\$zero\)
-0+0020 <[^>]*> swr \$a0,-3276[58]\(\$zero\)
-0+0024 <[^>]*> lui \$at,0x1
-0+0028 <[^>]*> swl \$a0,[03]\(\$at\)
-0+002c <[^>]*> swr \$a0,[03]\(\$at\)
-0+0030 <[^>]*> lui \$at,0x1
-0+0034 <[^>]*> ori \$at,\$at,0xa5a5
-0+0038 <[^>]*> swl \$a0,[03]\(\$at\)
-0+003c <[^>]*> swr \$a0,[03]\(\$at\)
-0+0040 <[^>]*> swl \$a0,[03]\(\$a1\)
-0+0044 <[^>]*> swr \$a0,[03]\(\$a1\)
-0+0048 <[^>]*> swl \$a0,[14]\(\$a1\)
-0+004c <[^>]*> swr \$a0,[-0-9]+\(\$a1\)
-0+0050 <[^>]*> lui \$at,[-0-9x]+
+0+0000 <[^>]*> swl a0,[03]\(zero\)
+0+0004 <[^>]*> swr a0,[03]\(zero\)
+0+0008 <[^>]*> swl a0,[14]\(zero\)
+0+000c <[^>]*> swr a0,[14]\(zero\)
+0+0010 <[^>]*> li at,0x8000
+0+0014 <[^>]*> swl a0,[03]\(at\)
+0+0018 <[^>]*> swr a0,[03]\(at\)
+0+001c <[^>]*> swl a0,-3276[58]\(zero\)
+0+0020 <[^>]*> swr a0,-3276[58]\(zero\)
+0+0024 <[^>]*> lui at,0x1
+0+0028 <[^>]*> swl a0,[03]\(at\)
+0+002c <[^>]*> swr a0,[03]\(at\)
+0+0030 <[^>]*> lui at,0x1
+0+0034 <[^>]*> ori at,at,0xa5a5
+0+0038 <[^>]*> swl a0,[03]\(at\)
+0+003c <[^>]*> swr a0,[03]\(at\)
+0+0040 <[^>]*> swl a0,[03]\(a1\)
+0+0044 <[^>]*> swr a0,[03]\(a1\)
+0+0048 <[^>]*> swl a0,[14]\(a1\)
+0+004c <[^>]*> swr a0,[-0-9]+\(a1\)
+0+0050 <[^>]*> lui at,[-0-9x]+
[ ]*50: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+0054 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0054 <[^>]*> addiu at,at,[-0-9]+
[ ]*54: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0058 <[^>]*> swl \$a0,[03]\(\$at\)
-0+005c <[^>]*> swr \$a0,[03]\(\$at\)
-0+0060 <[^>]*> lui \$at,[-0-9x]+
+0+0058 <[^>]*> swl a0,[03]\(at\)
+0+005c <[^>]*> swr a0,[03]\(at\)
+0+0060 <[^>]*> lui at,[-0-9x]+
[ ]*60: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+0064 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0064 <[^>]*> addiu at,at,[-0-9]+
[ ]*64: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0068 <[^>]*> swl \$a0,[03]\(\$at\)
-0+006c <[^>]*> swr \$a0,[03]\(\$at\)
-0+0070 <[^>]*> addiu \$at,\$gp,0
+0+0068 <[^>]*> swl a0,[03]\(at\)
+0+006c <[^>]*> swr a0,[03]\(at\)
+0+0070 <[^>]*> addiu at,gp,0
[ ]*70: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+0074 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0078 <[^>]*> swr \$a0,[03]\(\$at\)
-0+007c <[^>]*> lui \$at,0x0
+0+0074 <[^>]*> swl a0,[03]\(at\)
+0+0078 <[^>]*> swr a0,[03]\(at\)
+0+007c <[^>]*> lui at,0x0
[ ]*7c: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+0080 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0080 <[^>]*> addiu at,at,[-0-9]+
[ ]*80: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0084 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0088 <[^>]*> swr \$a0,[03]\(\$at\)
-0+008c <[^>]*> addiu \$at,\$gp,0
+0+0084 <[^>]*> swl a0,[03]\(at\)
+0+0088 <[^>]*> swr a0,[03]\(at\)
+0+008c <[^>]*> addiu at,gp,0
[ ]*8c: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+0090 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0094 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0098 <[^>]*> lui \$at,[-0-9x]+
+0+0090 <[^>]*> swl a0,[03]\(at\)
+0+0094 <[^>]*> swr a0,[03]\(at\)
+0+0098 <[^>]*> lui at,[-0-9x]+
[ ]*98: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+009c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+009c <[^>]*> addiu at,at,[-0-9]+
[ ]*9c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+00a0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+00a4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+00a8 <[^>]*> addiu \$at,\$gp,[-0-9]+
+0+00a0 <[^>]*> swl a0,[03]\(at\)
+0+00a4 <[^>]*> swr a0,[03]\(at\)
+0+00a8 <[^>]*> addiu at,gp,[-0-9]+
[ ]*a8: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+00ac <[^>]*> swl \$a0,[03]\(\$at\)
-0+00b0 <[^>]*> swr \$a0,[03]\(\$at\)
-0+00b4 <[^>]*> lui \$at,0x0
+0+00ac <[^>]*> swl a0,[03]\(at\)
+0+00b0 <[^>]*> swr a0,[03]\(at\)
+0+00b4 <[^>]*> lui at,0x0
[ ]*b4: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+00b8 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00b8 <[^>]*> addiu at,at,[-0-9]+
[ ]*b8: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+00bc <[^>]*> swl \$a0,[03]\(\$at\)
-0+00c0 <[^>]*> swr \$a0,[03]\(\$at\)
-0+00c4 <[^>]*> lui \$at,0x0
+0+00bc <[^>]*> swl a0,[03]\(at\)
+0+00c0 <[^>]*> swr a0,[03]\(at\)
+0+00c4 <[^>]*> lui at,0x0
[ ]*c4: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+00c8 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00c8 <[^>]*> addiu at,at,[-0-9]+
[ ]*c8: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+00cc <[^>]*> swl \$a0,[03]\(\$at\)
-0+00d0 <[^>]*> swr \$a0,[03]\(\$at\)
-0+00d4 <[^>]*> addiu \$at,\$gp,1
+0+00cc <[^>]*> swl a0,[03]\(at\)
+0+00d0 <[^>]*> swr a0,[03]\(at\)
+0+00d4 <[^>]*> addiu at,gp,1
[ ]*d4: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_data_label
-0+00d8 <[^>]*> swl \$a0,[03]\(\$at\)
-0+00dc <[^>]*> swr \$a0,[03]\(\$at\)
-0+00e0 <[^>]*> lui \$at,0x0
+0+00d8 <[^>]*> swl a0,[03]\(at\)
+0+00dc <[^>]*> swr a0,[03]\(at\)
+0+00e0 <[^>]*> lui at,0x0
[ ]*e0: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+00e4 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+00e4 <[^>]*> addiu at,at,[-0-9]+
[ ]*e4: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+00e8 <[^>]*> swl \$a0,[03]\(\$at\)
-0+00ec <[^>]*> swr \$a0,[03]\(\$at\)
-0+00f0 <[^>]*> addiu \$at,\$gp,1
+0+00e8 <[^>]*> swl a0,[03]\(at\)
+0+00ec <[^>]*> swr a0,[03]\(at\)
+0+00f0 <[^>]*> addiu at,gp,1
[ ]*f0: [A-Z0-9_]*GPREL[A-Z0-9_]* small_external_common
-0+00f4 <[^>]*> swl \$a0,[03]\(\$at\)
-0+00f8 <[^>]*> swr \$a0,[03]\(\$at\)
-0+00fc <[^>]*> lui \$at,0x0
+0+00f4 <[^>]*> swl a0,[03]\(at\)
+0+00f8 <[^>]*> swr a0,[03]\(at\)
+0+00fc <[^>]*> lui at,0x0
[ ]*fc: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+0100 <[^>]*> addiu \$at,\$at,[-0-9]+
+0+0100 <[^>]*> addiu at,at,[-0-9]+
[ ]*100: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0104 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0108 <[^>]*> swr \$a0,[03]\(\$at\)
-0+010c <[^>]*> addiu \$at,\$gp,[-0-9]+
+0+0104 <[^>]*> swl a0,[03]\(at\)
+0+0108 <[^>]*> swr a0,[03]\(at\)
+0+010c <[^>]*> addiu at,gp,[-0-9]+
[ ]*10c: [A-Z0-9_]*GPREL[A-Z0-9_]* .sbss.*
-0+0110 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0114 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0118 <[^>]*> lui \$at,[-0-9x]+
+0+0110 <[^>]*> swl a0,[03]\(at\)
+0+0114 <[^>]*> swr a0,[03]\(at\)
+0+0118 <[^>]*> lui at,[-0-9x]+
[ ]*118: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+011c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+011c <[^>]*> addiu at,at,[-0-9]+
[ ]*11c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0120 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0124 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0128 <[^>]*> lui \$at,[-0-9x]+
+0+0120 <[^>]*> swl a0,[03]\(at\)
+0+0124 <[^>]*> swr a0,[03]\(at\)
+0+0128 <[^>]*> lui at,[-0-9x]+
[ ]*128: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+012c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+012c <[^>]*> addiu at,at,[-0-9]+
[ ]*12c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0130 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0134 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0138 <[^>]*> lui \$at,[-0-9x]+
+0+0130 <[^>]*> swl a0,[03]\(at\)
+0+0134 <[^>]*> swr a0,[03]\(at\)
+0+0138 <[^>]*> lui at,[-0-9x]+
[ ]*138: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+013c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+013c <[^>]*> addiu at,at,[-0-9]+
[ ]*13c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0140 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0144 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0148 <[^>]*> lui \$at,[-0-9x]+
+0+0140 <[^>]*> swl a0,[03]\(at\)
+0+0144 <[^>]*> swr a0,[03]\(at\)
+0+0148 <[^>]*> lui at,[-0-9x]+
[ ]*148: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+014c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+014c <[^>]*> addiu at,at,[-0-9]+
[ ]*14c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0150 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0154 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0158 <[^>]*> lui \$at,[-0-9x]+
+0+0150 <[^>]*> swl a0,[03]\(at\)
+0+0154 <[^>]*> swr a0,[03]\(at\)
+0+0158 <[^>]*> lui at,[-0-9x]+
[ ]*158: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+015c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+015c <[^>]*> addiu at,at,[-0-9]+
[ ]*15c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0160 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0164 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0168 <[^>]*> lui \$at,[-0-9x]+
+0+0160 <[^>]*> swl a0,[03]\(at\)
+0+0164 <[^>]*> swr a0,[03]\(at\)
+0+0168 <[^>]*> lui at,[-0-9x]+
[ ]*168: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+016c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+016c <[^>]*> addiu at,at,[-0-9]+
[ ]*16c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0170 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0174 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0178 <[^>]*> lui \$at,[-0-9x]+
+0+0170 <[^>]*> swl a0,[03]\(at\)
+0+0174 <[^>]*> swr a0,[03]\(at\)
+0+0178 <[^>]*> lui at,[-0-9x]+
[ ]*178: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+017c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+017c <[^>]*> addiu at,at,[-0-9]+
[ ]*17c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0180 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0184 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0188 <[^>]*> lui \$at,0x0
+0+0180 <[^>]*> swl a0,[03]\(at\)
+0+0184 <[^>]*> swr a0,[03]\(at\)
+0+0188 <[^>]*> lui at,0x0
[ ]*188: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+018c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+018c <[^>]*> addiu at,at,[-0-9]+
[ ]*18c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0190 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0194 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0198 <[^>]*> lui \$at,0x0
+0+0190 <[^>]*> swl a0,[03]\(at\)
+0+0194 <[^>]*> swr a0,[03]\(at\)
+0+0198 <[^>]*> lui at,0x0
[ ]*198: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+019c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+019c <[^>]*> addiu at,at,[-0-9]+
[ ]*19c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+01a0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+01a4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+01a8 <[^>]*> lui \$at,0x0
+0+01a0 <[^>]*> swl a0,[03]\(at\)
+0+01a4 <[^>]*> swr a0,[03]\(at\)
+0+01a8 <[^>]*> lui at,0x0
[ ]*1a8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+01ac <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01ac <[^>]*> addiu at,at,[-0-9]+
[ ]*1ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+01b0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+01b4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+01b8 <[^>]*> lui \$at,0x0
+0+01b0 <[^>]*> swl a0,[03]\(at\)
+0+01b4 <[^>]*> swr a0,[03]\(at\)
+0+01b8 <[^>]*> lui at,0x0
[ ]*1b8: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+01bc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01bc <[^>]*> addiu at,at,[-0-9]+
[ ]*1bc: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+01c0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+01c4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+01c8 <[^>]*> lui \$at,0x0
+0+01c0 <[^>]*> swl a0,[03]\(at\)
+0+01c4 <[^>]*> swr a0,[03]\(at\)
+0+01c8 <[^>]*> lui at,0x0
[ ]*1c8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+01cc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01cc <[^>]*> addiu at,at,[-0-9]+
[ ]*1cc: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+01d0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+01d4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+01d8 <[^>]*> lui \$at,0x0
+0+01d0 <[^>]*> swl a0,[03]\(at\)
+0+01d4 <[^>]*> swr a0,[03]\(at\)
+0+01d8 <[^>]*> lui at,0x0
[ ]*1d8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+01dc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01dc <[^>]*> addiu at,at,[-0-9]+
[ ]*1dc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+01e0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+01e4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+01e8 <[^>]*> lui \$at,0x0
+0+01e0 <[^>]*> swl a0,[03]\(at\)
+0+01e4 <[^>]*> swr a0,[03]\(at\)
+0+01e8 <[^>]*> lui at,0x0
[ ]*1e8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+01ec <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01ec <[^>]*> addiu at,at,[-0-9]+
[ ]*1ec: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+01f0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+01f4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+01f8 <[^>]*> lui \$at,[-0-9x]+
+0+01f0 <[^>]*> swl a0,[03]\(at\)
+0+01f4 <[^>]*> swr a0,[03]\(at\)
+0+01f8 <[^>]*> lui at,[-0-9x]+
[ ]*1f8: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+01fc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+01fc <[^>]*> addiu at,at,[-0-9]+
[ ]*1fc: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0200 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0204 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0208 <[^>]*> lui \$at,[-0-9x]+
+0+0200 <[^>]*> swl a0,[03]\(at\)
+0+0204 <[^>]*> swr a0,[03]\(at\)
+0+0208 <[^>]*> lui at,[-0-9x]+
[ ]*208: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+020c <[^>]*> addiu \$at,\$at,0
+0+020c <[^>]*> addiu at,at,0
[ ]*20c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0210 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0214 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0218 <[^>]*> lui \$at,[-0-9x]+
+0+0210 <[^>]*> swl a0,[03]\(at\)
+0+0214 <[^>]*> swr a0,[03]\(at\)
+0+0218 <[^>]*> lui at,[-0-9x]+
[ ]*218: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+021c <[^>]*> addiu \$at,\$at,0
+0+021c <[^>]*> addiu at,at,0
[ ]*21c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0220 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0224 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0228 <[^>]*> lui \$at,[-0-9x]+
+0+0220 <[^>]*> swl a0,[03]\(at\)
+0+0224 <[^>]*> swr a0,[03]\(at\)
+0+0228 <[^>]*> lui at,[-0-9x]+
[ ]*228: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+022c <[^>]*> addiu \$at,\$at,0
+0+022c <[^>]*> addiu at,at,0
[ ]*22c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+0230 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0234 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0238 <[^>]*> lui \$at,[-0-9x]+
+0+0230 <[^>]*> swl a0,[03]\(at\)
+0+0234 <[^>]*> swr a0,[03]\(at\)
+0+0238 <[^>]*> lui at,[-0-9x]+
[ ]*238: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+023c <[^>]*> addiu \$at,\$at,0
+0+023c <[^>]*> addiu at,at,0
[ ]*23c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+0240 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0244 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0248 <[^>]*> lui \$at,[-0-9x]+
+0+0240 <[^>]*> swl a0,[03]\(at\)
+0+0244 <[^>]*> swr a0,[03]\(at\)
+0+0248 <[^>]*> lui at,[-0-9x]+
[ ]*248: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+024c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+024c <[^>]*> addiu at,at,[-0-9]+
[ ]*24c: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+0250 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0254 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0258 <[^>]*> lui \$at,[-0-9x]+
+0+0250 <[^>]*> swl a0,[03]\(at\)
+0+0254 <[^>]*> swr a0,[03]\(at\)
+0+0258 <[^>]*> lui at,[-0-9x]+
[ ]*258: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+025c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+025c <[^>]*> addiu at,at,[-0-9]+
[ ]*25c: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+0260 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0264 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0268 <[^>]*> lui \$at,[-0-9x]+
+0+0260 <[^>]*> swl a0,[03]\(at\)
+0+0264 <[^>]*> swr a0,[03]\(at\)
+0+0268 <[^>]*> lui at,[-0-9x]+
[ ]*268: [A-Z0-9_]*HI[A-Z0-9_]* .data.*
-0+026c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+026c <[^>]*> addiu at,at,[-0-9]+
[ ]*26c: [A-Z0-9_]*LO[A-Z0-9_]* .data.*
-0+0270 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0274 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0278 <[^>]*> lui \$at,[-0-9x]+
+0+0270 <[^>]*> swl a0,[03]\(at\)
+0+0274 <[^>]*> swr a0,[03]\(at\)
+0+0278 <[^>]*> lui at,[-0-9x]+
[ ]*278: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
-0+027c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+027c <[^>]*> addiu at,at,[-0-9]+
[ ]*27c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
-0+0280 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0284 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0288 <[^>]*> lui \$at,[-0-9x]+
+0+0280 <[^>]*> swl a0,[03]\(at\)
+0+0284 <[^>]*> swr a0,[03]\(at\)
+0+0288 <[^>]*> lui at,[-0-9x]+
[ ]*288: [A-Z0-9_]*HI[A-Z0-9_]* small_external_data_label
-0+028c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+028c <[^>]*> addiu at,at,[-0-9]+
[ ]*28c: [A-Z0-9_]*LO[A-Z0-9_]* small_external_data_label
-0+0290 <[^>]*> swl \$a0,[03]\(\$at\)
-0+0294 <[^>]*> swr \$a0,[03]\(\$at\)
-0+0298 <[^>]*> lui \$at,[-0-9x]+
+0+0290 <[^>]*> swl a0,[03]\(at\)
+0+0294 <[^>]*> swr a0,[03]\(at\)
+0+0298 <[^>]*> lui at,[-0-9x]+
[ ]*298: [A-Z0-9_]*HI[A-Z0-9_]* big_external_common
-0+029c <[^>]*> addiu \$at,\$at,[-0-9]+
+0+029c <[^>]*> addiu at,at,[-0-9]+
[ ]*29c: [A-Z0-9_]*LO[A-Z0-9_]* big_external_common
-0+02a0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+02a4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+02a8 <[^>]*> lui \$at,[-0-9x]+
+0+02a0 <[^>]*> swl a0,[03]\(at\)
+0+02a4 <[^>]*> swr a0,[03]\(at\)
+0+02a8 <[^>]*> lui at,[-0-9x]+
[ ]*2a8: [A-Z0-9_]*HI[A-Z0-9_]* small_external_common
-0+02ac <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02ac <[^>]*> addiu at,at,[-0-9]+
[ ]*2ac: [A-Z0-9_]*LO[A-Z0-9_]* small_external_common
-0+02b0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+02b4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+02b8 <[^>]*> lui \$at,[-0-9x]+
+0+02b0 <[^>]*> swl a0,[03]\(at\)
+0+02b4 <[^>]*> swr a0,[03]\(at\)
+0+02b8 <[^>]*> lui at,[-0-9x]+
[ ]*2b8: [A-Z0-9_]*HI[A-Z0-9_]* .bss.*
-0+02bc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02bc <[^>]*> addiu at,at,[-0-9]+
[ ]*2bc: [A-Z0-9_]*LO[A-Z0-9_]* .bss.*
-0+02c0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+02c4 <[^>]*> swr \$a0,[03]\(\$at\)
-0+02c8 <[^>]*> lui \$at,[-0-9x]+
+0+02c0 <[^>]*> swl a0,[03]\(at\)
+0+02c4 <[^>]*> swr a0,[03]\(at\)
+0+02c8 <[^>]*> lui at,[-0-9x]+
[ ]*2c8: [A-Z0-9_]*HI[A-Z0-9_]* .sbss.*
-0+02cc <[^>]*> addiu \$at,\$at,[-0-9]+
+0+02cc <[^>]*> addiu at,at,[-0-9]+
[ ]*2cc: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
-0+02d0 <[^>]*> swl \$a0,[03]\(\$at\)
-0+02d4 <[^>]*> swr \$a0,[03]\(\$at\)
+0+02d0 <[^>]*> swl a0,[03]\(at\)
+0+02d4 <[^>]*> swr a0,[03]\(at\)
...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mn10300/basic.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/mn10300/basic.exp
index d0f4811cdb2..0d268da6e84 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mn10300/basic.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mn10300/basic.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996 Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mri/mri.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/mri/mri.exp
index f3fcded1e59..48c3bb7c654 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/mri/mri.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mri/mri.exp
@@ -10,19 +10,26 @@ if ![istarget "m68*-*-*"] {
return
}
+# These tests are generic MRI tests: they don't rely on M68K opcodes.
run_dump_test label
run_dump_test equ
-run_dump_test constants
-run_dump_test immconst
run_dump_test float
run_dump_test char
run_dump_test expr
run_dump_test common
run_dump_test comment
gas_test "empty.s" "-M" "" "MRI empty macro"
+run_dump_test semi
+
+if {[istarget "m6811-*-*"] || [istarget "m6812-*-*"]} {
+ return
+}
+
+# Next tests contain 68K opcodes
+run_dump_test constants
+run_dump_test immconst
run_dump_test for
run_dump_test if
run_dump_test repeat
run_dump_test while
-run_dump_test semi
run_dump_test moveml
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/sparc/sparc.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/sparc/sparc.exp
index 17dcaaa3bbd..39bf0f93950 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/sparc/sparc.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/sparc/sparc.exp
@@ -18,6 +18,7 @@ proc gas_64_check { } {
if [istarget sparc*-*-*] {
run_dump_test "synth"
+ run_dump_test "unalign"
if [gas_64_check] {
run_dump_test "asi"
run_dump_test "membar"
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/vax/quad.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/vax/quad.exp
index 34770c5b6cf..46fc9ca52d4 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gas/vax/quad.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/vax/quad.exp
@@ -8,7 +8,7 @@ proc do_quad {} {
expect {
-re "^ +2\[ \t\]+0000+ 7D8F7856\[ \t\]+movq\[^\n\]*\n" { set x1 1 }
-re "^ +2\[ \t\]+3412DDCC\[^\n\]*\n" { set x2 1 }
- -re "^ +2\[ \t\]+BBAA5001\[ \t\]*\r\n" { set x3 1 }
+ -re "^ +2\[ \t\]+BBAA50\[ \t\]*\r\n" { set x3 1 }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
eof { break }
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gasp/macro.out b/gnu/usr.bin/binutils/gas/testsuite/gasp/macro.out
index 0740732c7c2..7604f420442 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/gasp/macro.out
+++ b/gnu/usr.bin/binutils/gas/testsuite/gasp/macro.out
@@ -296,44 +296,44 @@
! .ENDM
!
! RES_STR "ONE",R0
-! MOV.L #str00018,R0
- MOV.L #str00018,R0
-! BRA end_str00018
- BRA end_str00018
+! MOV.L #str18,R0
+ MOV.L #str18,R0
+! BRA end_str18
+ BRA end_str18
! NOP
NOP
-!str00018 .SDATA "ONE"
-str00018: .byte 79,78,69
+!str18 .SDATA "ONE"
+str18: .byte 79,78,69
! .ALIGN 2
.align 2
-!end_str00018
-end_str00018:
+!end_str18
+end_str18:
! RES_STR "TWO",R1
-! MOV.L #str00019,R1
- MOV.L #str00019,R1
-! BRA end_str00019
- BRA end_str00019
+! MOV.L #str19,R1
+ MOV.L #str19,R1
+! BRA end_str19
+ BRA end_str19
! NOP
NOP
-!str00019 .SDATA "TWO"
-str00019: .byte 84,87,79
+!str19 .SDATA "TWO"
+str19: .byte 84,87,79
! .ALIGN 2
.align 2
-!end_str00019
-end_str00019:
+!end_str19
+end_str19:
! RES_STR "THREE",R2
-! MOV.L #str00020,R2
- MOV.L #str00020,R2
-! BRA end_str00020
- BRA end_str00020
+! MOV.L #str20,R2
+ MOV.L #str20,R2
+! BRA end_str20
+ BRA end_str20
! NOP
NOP
-!str00020 .SDATA "THREE"
-str00020: .byte 84,72,82,69,69
+!str20 .SDATA "THREE"
+str20: .byte 84,72,82,69,69
! .ALIGN 2
.align 2
-!end_str00020
-end_str00020:
+!end_str20
+end_str20:
!
!
@@ -341,42 +341,42 @@ end_str00020:
!
! RES_STR STR=donkey Rn=R1
-! MOV.L #str00021,R1
- MOV.L #str00021,R1
-! BRA end_str00021
- BRA end_str00021
+! MOV.L #str21,R1
+ MOV.L #str21,R1
+! BRA end_str21
+ BRA end_str21
! NOP
NOP
-!str00021 .SDATA "donkey"
-str00021: .byte 100,111,110,107,101,121
+!str21 .SDATA "donkey"
+str21: .byte 100,111,110,107,101,121
! .ALIGN 2
.align 2
-!end_str00021
-end_str00021:
+!end_str21
+end_str21:
! RES_STR donkey,R1
-! MOV.L #str00022,R1
- MOV.L #str00022,R1
-! BRA end_str00022
- BRA end_str00022
+! MOV.L #str22,R1
+ MOV.L #str22,R1
+! BRA end_str22
+ BRA end_str22
! NOP
NOP
-!str00022 .SDATA "donkey"
-str00022: .byte 100,111,110,107,101,121
+!str22 .SDATA "donkey"
+str22: .byte 100,111,110,107,101,121
! .ALIGN 2
.align 2
-!end_str00022
-end_str00022:
+!end_str22
+end_str22:
! RES_STR donkey Rn=R1
-! MOV.L #str00023,R1
- MOV.L #str00023,R1
-! BRA end_str00023
- BRA end_str00023
+! MOV.L #str23,R1
+ MOV.L #str23,R1
+! BRA end_str23
+ BRA end_str23
! NOP
NOP
-!str00023 .SDATA "donkey"
-str00023: .byte 100,111,110,107,101,121
+!str23 .SDATA "donkey"
+str23: .byte 100,111,110,107,101,121
! .ALIGN 2
.align 2
-!end_str00023
-end_str00023:
+!end_str23
+end_str23:
! .END
diff --git a/gnu/usr.bin/binutils/gas/testsuite/lib/gas-defs.exp b/gnu/usr.bin/binutils/gas/testsuite/lib/gas-defs.exp
index 9cb117f775f..7f98c854e5a 100644
--- a/gnu/usr.bin/binutils/gas/testsuite/lib/gas-defs.exp
+++ b/gnu/usr.bin/binutils/gas/testsuite/lib/gas-defs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000 Free Software
+# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -242,8 +242,8 @@ proc gas_init { args } {
proc run_dump_test { name } {
global subdir srcdir
- global OBJDUMP NM AS OBJCOPY
- global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS
+ global OBJDUMP NM AS OBJCOPY READELF
+ global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS
global host_triplet
if [string match "*/*" $name] {
@@ -262,6 +262,7 @@ proc run_dump_test { name } {
set opts(objdump) {}
set opts(nm) {}
set opts(objcopy) {}
+ set opts(readelf) {}
set opts(name) {}
set opts(PROG) {}
set opts(source) {}
@@ -290,6 +291,8 @@ proc run_dump_test { name } {
{ set program nm }
objcopy
{ set program objcopy }
+ readelf
+ { set program readelf }
default
{ perror "unrecognized program option $opts(PROG) in $file.d"
unresolved $subdir/$name
@@ -298,7 +301,7 @@ proc run_dump_test { name } {
} else {
# Guess which program to run, by seeing which option was specified.
set program ""
- foreach p {objdump objcopy nm} {
+ foreach p {objdump objcopy nm readelf} {
if {$opts($p) != ""} {
if {$program != ""} {
perror "ambiguous dump program in $file.d"
diff --git a/gnu/usr.bin/binutils/gas/write.c b/gnu/usr.bin/binutils/gas/write.c
index e386ece343b..cfdc9b5e35f 100644
--- a/gnu/usr.bin/binutils/gas/write.c
+++ b/gnu/usr.bin/binutils/gas/write.c
@@ -1,5 +1,6 @@
/* write.c - emit .o file
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,23 +20,18 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/* This thing should be set up to do byteordering correctly. But... */
+/* This thing should be set up to do byteordering correctly. But... */
#include "as.h"
#include "subsegs.h"
#include "obstack.h"
#include "output-file.h"
+#include "dwarf2dbg.h"
/* This looks like a good idea. Let's try turning it on always, for now. */
#undef BFD_FAST_SECTION_FILL
#define BFD_FAST_SECTION_FILL
-/* The NOP_OPCODE is for the alignment fill value. Fill it with a nop
- instruction so that the disassembler does not choke on it. */
-#ifndef NOP_OPCODE
-#define NOP_OPCODE 0x00
-#endif
-
#ifndef TC_ADJUST_RELOC_COUNT
#define TC_ADJUST_RELOC_COUNT(FIXP,COUNT)
#endif
@@ -48,6 +44,14 @@
#define TC_FORCE_RELOCATION_SECTION(FIXP,SEG) TC_FORCE_RELOCATION(FIXP)
#endif
+#ifndef TC_LINKRELAX_FIXUP
+#define TC_LINKRELAX_FIXUP(SEG) 1
+#endif
+
+#ifndef TC_FIX_ADJUSTABLE
+#define TC_FIX_ADJUSTABLE(fix) 1
+#endif
+
#ifndef MD_PCREL_FROM_SECTION
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from(FIXP)
#endif
@@ -77,9 +81,9 @@ 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. */
+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
@@ -87,13 +91,13 @@ static object_headers headers;
#endif
long string_byte_count;
-char *next_object_file_charP; /* Tracks object file bytes. */
+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 */
+#endif /* BFD_ASSEMBLER */
static int n_fixups;
@@ -118,7 +122,8 @@ static fragS *chain_frchains_together_1 PARAMS ((segT, struct frchain *));
#ifdef BFD_ASSEMBLER
static void chain_frchains_together PARAMS ((bfd *, segT, PTR));
static void cvt_frag_to_fill PARAMS ((segT, fragS *));
-static void relax_and_size_seg PARAMS ((bfd *, asection *, PTR));
+static void relax_seg PARAMS ((bfd *, asection *, PTR));
+static void size_seg PARAMS ((bfd *, asection *, PTR));
static void adjust_reloc_syms PARAMS ((bfd *, asection *, PTR));
static void write_relocs PARAMS ((bfd *, asection *, PTR));
static void write_contents PARAMS ((bfd *, asection *, PTR));
@@ -132,26 +137,26 @@ static void cvt_frag_to_fill PARAMS ((object_headers *, segT, fragS *));
static void remove_subsegs PARAMS ((frchainS *, int, fragS **, fragS **));
static void relax_and_size_all_segments PARAMS ((void));
#endif
+#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
+static void set_segment_vma PARAMS ((bfd *, asection *, PTR));
+#endif
+
+/* Create a fixS in obstack 'notes'. */
-/*
- * fix_new()
- *
- * Create a fixS in obstack 'notes'.
- */
static fixS *
fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
r_type)
- fragS *frag; /* Which frag? */
- int where; /* Where in that frag? */
- int size; /* 1, 2, or 4 usually. */
- symbolS *add_symbol; /* X_add_symbol. */
- symbolS *sub_symbol; /* X_op_symbol. */
- offsetT offset; /* X_add_number. */
- int pcrel; /* TRUE if PC-relative relocation. */
+ fragS *frag; /* Which frag? */
+ int where; /* Where in that frag? */
+ int size; /* 1, 2, or 4 usually. */
+ symbolS *add_symbol; /* X_add_symbol. */
+ symbolS *sub_symbol; /* X_op_symbol. */
+ offsetT offset; /* X_add_number. */
+ int pcrel; /* TRUE if PC-relative relocation. */
#ifdef BFD_ASSEMBLER
- bfd_reloc_code_real_type r_type; /* Relocation type */
+ bfd_reloc_code_real_type r_type; /* Relocation type. */
#else
- int r_type; /* Relocation type */
+ int r_type; /* Relocation type. */
#endif
{
fixS *fixP;
@@ -192,7 +197,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
#endif
#ifdef TC_FIX_TYPE
- TC_INIT_FIX_DATA(fixP);
+ TC_INIT_FIX_DATA (fixP);
#endif
as_where (&fixP->fx_file, &fixP->fx_line);
@@ -200,8 +205,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
/* Usually, we want relocs sorted numerically, but while
comparing to older versions of gas that have relocs
reverse sorted, it is convenient to have this compile
- time option. xoxorich. */
-
+ time option. xoxorich. */
{
#ifdef BFD_ASSEMBLER
@@ -218,7 +222,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
fixP->fx_next = *seg_fix_rootP;
*seg_fix_rootP = fixP;
-#else /* REVERSE_SORT_RELOCS */
+#else /* REVERSE_SORT_RELOCS */
fixP->fx_next = NULL;
@@ -228,8 +232,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
*seg_fix_rootP = fixP;
*seg_fix_tailP = fixP;
-#endif /* REVERSE_SORT_RELOCS */
-
+#endif /* REVERSE_SORT_RELOCS */
}
return fixP;
@@ -239,16 +242,16 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
fixS *
fix_new (frag, where, size, add_symbol, offset, pcrel, r_type)
- fragS *frag; /* Which frag? */
- int where; /* Where in that frag? */
- int size; /* 1, 2, or 4 usually. */
- symbolS *add_symbol; /* X_add_symbol. */
- offsetT offset; /* X_add_number. */
- int pcrel; /* TRUE if PC-relative relocation. */
+ fragS *frag; /* Which frag? */
+ int where; /* Where in that frag? */
+ int size; /* 1, 2, or 4 usually. */
+ symbolS *add_symbol; /* X_add_symbol. */
+ offsetT offset; /* X_add_number. */
+ int pcrel; /* TRUE if PC-relative relocation. */
#ifdef BFD_ASSEMBLER
- bfd_reloc_code_real_type r_type; /* Relocation type */
+ bfd_reloc_code_real_type r_type; /* Relocation type. */
#else
- int r_type; /* Relocation type */
+ int r_type; /* Relocation type. */
#endif
{
return fix_new_internal (frag, where, size, add_symbol,
@@ -261,15 +264,15 @@ fix_new (frag, where, size, add_symbol, offset, pcrel, r_type)
fixS *
fix_new_exp (frag, where, size, exp, pcrel, r_type)
- fragS *frag; /* Which frag? */
- int where; /* Where in that frag? */
- int size; /* 1, 2, or 4 usually. */
+ fragS *frag; /* Which frag? */
+ int where; /* Where in that frag? */
+ int size; /* 1, 2, or 4 usually. */
expressionS *exp; /* Expression. */
- int pcrel; /* TRUE if PC-relative relocation. */
+ int pcrel; /* TRUE if PC-relative relocation. */
#ifdef BFD_ASSEMBLER
- bfd_reloc_code_real_type r_type; /* Relocation type */
+ bfd_reloc_code_real_type r_type; /* Relocation type. */
#else
- int r_type; /* Relocation type */
+ int r_type; /* Relocation type. */
#endif
{
symbolS *add = NULL;
@@ -281,15 +284,21 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
case O_absent:
break;
+ case O_register:
+ as_bad (_("register value used as expression"));
+ break;
+
case O_add:
/* This comes up when _GLOBAL_OFFSET_TABLE_+(.-L0) is read, if
the difference expression cannot immediately be reduced. */
{
symbolS *stmp = make_expr_symbol (exp);
+
exp->X_op = O_symbol;
exp->X_op_symbol = 0;
exp->X_add_symbol = stmp;
exp->X_add_number = 0;
+
return fix_new_exp (frag, where, size, exp, pcrel, r_type);
}
@@ -303,7 +312,7 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
#if defined(TC_RVA_RELOC)
r_type = TC_RVA_RELOC;
#else
- as_fatal(_("rva not supported"));
+ as_fatal (_("rva not supported"));
#endif
#endif
break;
@@ -318,7 +327,7 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
/* Fall through. */
case O_symbol:
add = exp->X_add_symbol;
- /* Fall through. */
+ /* Fall through. */
case O_constant:
off = exp->X_add_number;
break;
@@ -328,8 +337,7 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
break;
}
- return fix_new_internal (frag, where, size, add, sub, off,
- pcrel, r_type);
+ return fix_new_internal (frag, where, size, add, sub, off, pcrel, r_type);
}
/* Append a string onto another string, bumping the pointer along. */
@@ -339,7 +347,7 @@ append (charPP, fromP, length)
char *fromP;
unsigned long length;
{
- /* Don't trust memcpy() of 0 chars. */
+ /* Don't trust memcpy() of 0 chars. */
if (length == 0)
return;
@@ -351,15 +359,14 @@ append (charPP, fromP, length)
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
- * least one object format really uses this info.
- */
+/* 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
+ least one object format really uses this info. */
+
void
record_alignment (seg, align)
- /* Segment to which alignment pertains */
+ /* Segment to which alignment pertains. */
segT seg;
/* Alignment, as a power of 2 (e.g., 1 => 2-byte boundary, 2 => 4-byte
boundary, etc.) */
@@ -376,6 +383,19 @@ record_alignment (seg, align)
#endif
}
+int
+get_recorded_alignment (seg)
+ 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. */
@@ -392,7 +412,7 @@ renumber_sections (abfd, sec, countparg)
++*countp;
}
-#endif /* defined (BFD_ASSEMBLER) */
+#endif /* defined (BFD_ASSEMBLER) */
#if defined (BFD_ASSEMBLER) || ! defined (BFD)
@@ -443,8 +463,8 @@ chain_frchains_together (abfd, section, xxx)
subseg_new, so it is possible that seg_info is NULL. */
info = seg_info (section);
if (info != (segment_info_type *) NULL)
- info->frchainP->frch_last
- = chain_frchains_together_1 (section, info->frchainP);
+ info->frchainP->frch_last
+ = chain_frchains_together_1 (section, info->frchainP);
/* Now that we've chained the frags together, we must add new fixups
to the segment, not to the frag chain. */
@@ -466,14 +486,14 @@ remove_subsegs (head, seg, root, last)
*last = chain_frchains_together_1 (seg, head);
}
-#endif /* BFD */
+#endif /* BFD */
#if defined (BFD_ASSEMBLER) || !defined (BFD)
#ifdef BFD_ASSEMBLER
static void
cvt_frag_to_fill (sec, fragP)
- segT sec;
+ segT sec ATTRIBUTE_UNUSED;
fragS *fragP;
#else
static void
@@ -487,6 +507,7 @@ cvt_frag_to_fill (headersP, sec, fragP)
{
case rs_align:
case rs_align_code:
+ case rs_align_test:
case rs_org:
case rs_space:
#ifdef HANDLE_ALIGN
@@ -528,6 +549,10 @@ cvt_frag_to_fill (headersP, sec, fragP)
eh_frame_convert_frag (fragP);
break;
+ case rs_dwarf2dbg:
+ dwarf2dbg_convert_frag (fragP);
+ break;
+
case rs_machine_dependent:
#ifdef BFD_ASSEMBLER
md_convert_frag (stdoutput, sec, fragP);
@@ -539,11 +564,9 @@ cvt_frag_to_fill (headersP, sec, fragP)
|| ((offsetT) (fragP->fr_next->fr_address - fragP->fr_address)
== fragP->fr_fix));
- /*
- * After md_convert_frag, we make the frag into a ".space 0".
- * Md_convert_frag() should set up any fixSs and constants
- * required.
- */
+ /* After md_convert_frag, we make the frag into a ".space 0".
+ md_convert_frag() should set up any fixSs and constants
+ required. */
frag_wane (fragP);
break;
@@ -572,11 +595,25 @@ cvt_frag_to_fill (headersP, sec, fragP)
}
}
-#endif /* defined (BFD_ASSEMBLER) || !defined (BFD) */
+#endif /* defined (BFD_ASSEMBLER) || !defined (BFD) */
#ifdef BFD_ASSEMBLER
static void
-relax_and_size_seg (abfd, sec, xxx)
+relax_seg (abfd, sec, do_code)
+ bfd *abfd;
+ asection *sec;
+ PTR do_code;
+{
+ flagword flags = bfd_get_section_flags (abfd, sec);
+ segment_info_type *seginfo = seg_info (sec);
+
+ if (!(flags & SEC_CODE) == !do_code
+ && seginfo && seginfo->frchainP)
+ relax_segment (seginfo->frchainP->frch_root, sec);
+}
+
+static void
+size_seg (abfd, sec, xxx)
bfd *abfd;
asection *sec;
PTR xxx ATTRIBUTE_UNUSED;
@@ -589,23 +626,23 @@ relax_and_size_seg (abfd, sec, xxx)
subseg_change (sec, 0);
- flags = bfd_get_section_flags (abfd, sec);
-
seginfo = seg_info (sec);
if (seginfo && seginfo->frchainP)
{
- relax_segment (seginfo->frchainP->frch_root, sec);
for (fragp = seginfo->frchainP->frch_root; fragp; fragp = fragp->fr_next)
cvt_frag_to_fill (sec, fragp);
for (fragp = seginfo->frchainP->frch_root;
fragp->fr_next;
fragp = fragp->fr_next)
- /* walk to last elt */;
+ /* Walk to last elt. */
+ ;
size = fragp->fr_address + fragp->fr_fix;
}
else
size = 0;
+ flags = bfd_get_section_flags (abfd, sec);
+
if (size > 0 && ! seginfo->bss)
flags |= SEC_HAS_CONTENTS;
@@ -697,7 +734,8 @@ adjust_reloc_syms (abfd, sec, xxx)
for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next)
if (fixp->fx_done)
- /* ignore it */;
+ /* Ignore it. */
+ ;
else if (fixp->fx_addsy)
{
symbolS *sym;
@@ -716,7 +754,7 @@ adjust_reloc_syms (abfd, sec, xxx)
table. */
if (sym != NULL)
resolve_symbol_value (sym, 1);
-
+
if (fixp->fx_subsy != NULL)
resolve_symbol_value (fixp->fx_subsy, 1);
@@ -740,7 +778,7 @@ adjust_reloc_syms (abfd, sec, xxx)
if (symsec == NULL)
abort ();
-
+
if (bfd_is_abs_section (symsec))
{
/* The fixup_segment routine will not use this symbol in a
@@ -856,7 +894,7 @@ adjust_reloc_syms (abfd, sec, xxx)
We refetch the segment when calling section_symbol, rather
than using symsec, because S_GET_VALUE may wind up changing
- the section when it calls resolve_symbol_value. */
+ the section when it calls resolve_symbol_value. */
fixp->fx_offset += S_GET_VALUE (sym);
fixp->fx_addsy = section_symbol (S_GET_SEGMENT (sym));
symbol_mark_used_in_reloc (fixp->fx_addsy);
@@ -868,7 +906,7 @@ adjust_reloc_syms (abfd, sec, xxx)
done:
;
}
-#if 1/*def RELOC_REQUIRES_SYMBOL*/
+#if 1 /* def RELOC_REQUIRES_SYMBOL */
else
{
/* There was no symbol required by this relocation. However,
@@ -877,7 +915,9 @@ adjust_reloc_syms (abfd, sec, xxx)
a local symbol in the absolute section. */
fixp->fx_addsy = section_symbol (absolute_section);
-/* fixp->fx_addsy->sy_used_in_reloc = 1; */
+#if 0
+ fixp->fx_addsy->sy_used_in_reloc = 1;
+#endif
}
#endif
@@ -891,7 +931,7 @@ write_relocs (abfd, sec, xxx)
PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
- int i;
+ unsigned int i;
unsigned int n;
arelent **relocs;
fixS *fixp;
@@ -911,7 +951,7 @@ write_relocs (abfd, sec, xxx)
#ifndef RELOC_EXPANSION_POSSIBLE
/* Set up reloc information as well. */
relocs = (arelent **) xmalloc (n * sizeof (arelent *));
- memset ((char*)relocs, 0, n * sizeof (arelent*));
+ memset ((char *) relocs, 0, n * sizeof (arelent *));
i = 0;
for (fixp = seginfo->fix_root; fixp != (fixS *) NULL; fixp = fixp->fx_next)
@@ -1000,7 +1040,7 @@ write_relocs (abfd, sec, xxx)
}
/* If this is an undefined symbol which was equated to another
- symbol, then use generate the reloc against the latter symbol
+ symbol, then generate the reloc against the latter symbol
rather than the former. */
sym = fixp->fx_addsy;
while (symbol_equated_p (sym)
@@ -1012,8 +1052,8 @@ write_relocs (abfd, sec, xxx)
for (j = 0; reloc[j]; j++)
{
- relocs[i++] = reloc[j];
- assert(i <= n);
+ relocs[i++] = reloc[j];
+ assert (i <= n);
}
data = fixp->fx_frag->fr_literal + fixp->fx_where;
if (fixp->fx_where + fixp->fx_size
@@ -1021,12 +1061,12 @@ write_relocs (abfd, sec, xxx)
as_bad_where (fixp->fx_file, fixp->fx_line,
_("internal error: fixup not contained within frag"));
for (j = 0; reloc[j]; j++)
- {
+ {
s = bfd_install_relocation (stdoutput, reloc[j],
fixp->fx_frag->fr_literal,
fixp->fx_frag->fr_address,
sec, &err);
- switch (s)
+ switch (s)
{
case bfd_reloc_ok:
break;
@@ -1038,7 +1078,7 @@ write_relocs (abfd, sec, xxx)
as_fatal (_("%s:%u: bad return from bfd_install_relocation"),
fixp->fx_file, fixp->fx_line);
}
- }
+ }
}
n = i;
#endif
@@ -1101,7 +1141,7 @@ write_contents (abfd, sec, xxx)
/* Write out the frags. */
if (seginfo == NULL
- || ! (bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS))
+ || !(bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS))
return;
for (f = seginfo->frchainP->frch_root;
@@ -1134,9 +1174,9 @@ write_contents (abfd, sec, xxx)
if (fill_size && count)
{
char buf[256];
- if (fill_size > sizeof(buf))
+ if (fill_size > sizeof (buf))
{
- /* Do it the old way. Can this ever happen? */
+ /* Do it the old way. Can this ever happen? */
while (count--)
{
x = bfd_set_section_contents (stdoutput, sec,
@@ -1146,7 +1186,8 @@ write_contents (abfd, sec, xxx)
if (x == false)
{
bfd_perror (stdoutput->filename);
- as_perror (_("FATAL: Can't write %s"), stdoutput->filename);
+ as_perror (_("FATAL: Can't write %s"),
+ stdoutput->filename);
exit (EXIT_FAILURE);
}
offset += fill_size;
@@ -1166,16 +1207,16 @@ write_contents (abfd, sec, xxx)
else
{
char *bufp;
- n_per_buf = sizeof(buf)/fill_size;
+ n_per_buf = sizeof (buf) / fill_size;
for (i = n_per_buf, bufp = buf; i; i--, bufp += fill_size)
- memcpy(bufp, fill_literal, fill_size);
+ memcpy (bufp, fill_literal, fill_size);
}
for (; count > 0; count -= n_per_buf)
{
n_per_buf = n_per_buf > count ? count : n_per_buf;
- x = bfd_set_section_contents (stdoutput, sec,
- buf, (file_ptr) offset,
- (bfd_size_type) n_per_buf * fill_size);
+ x = bfd_set_section_contents
+ (stdoutput, sec, buf, (file_ptr) offset,
+ (bfd_size_type) n_per_buf * fill_size);
if (x != true)
as_fatal (_("Cannot write to output file."));
offset += n_per_buf * fill_size;
@@ -1214,7 +1255,7 @@ merge_data_into_text ()
data_fix_root = NULL;
#endif
}
-#endif /* BFD_ASSEMBLER || (! BFD && ! OBJ_AOUT) */
+#endif /* BFD_ASSEMBLER || (! BFD && ! OBJ_AOUT) */
#if !defined (BFD_ASSEMBLER) && !defined (BFD)
static void
@@ -1225,30 +1266,27 @@ relax_and_size_all_segments ()
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.
- */
+ /* 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].
- */
+ /* 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));
+ 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. */
+ 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
@@ -1260,9 +1298,7 @@ relax_and_size_all_segments ()
#endif
for (fragP = data_frag_root; fragP; fragP = fragP->fr_next)
- {
- fragP->fr_address += slide;
- } /* for each data frag */
+ fragP->fr_address += slide;
know (text_last_frag != 0);
text_last_frag->fr_next = data_frag_root;
@@ -1283,21 +1319,19 @@ relax_and_size_all_segments ()
bss_vma = RoundUp (bss_vma, 1 << section_alignment[SEG_BSS]);
bss_address_frag.fr_address = bss_vma;
}
-#else /* ! OBJ_BOUT */
+#else /* ! OBJ_BOUT */
bss_address_frag.fr_address = (H_GET_TEXT_SIZE (&headers) +
H_GET_DATA_SIZE (&headers));
-#endif /* ! OBJ_BOUT */
+#endif /* ! OBJ_BOUT */
- /* Slide all the frags */
+ /* 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;
- } /* for each bss frag */
+ fragP->fr_address += slide;
}
if (bss_last_frag)
@@ -1306,7 +1340,7 @@ relax_and_size_all_segments ()
else
H_SET_BSS_SIZE (&headers, 0);
}
-#endif /* ! BFD_ASSEMBLER && ! BFD */
+#endif /* ! BFD_ASSEMBLER && ! BFD */
#if defined (BFD_ASSEMBLER) || !defined (BFD)
@@ -1348,6 +1382,20 @@ set_symtab ()
}
#endif
+#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
+static void
+set_segment_vma (abfd, sec, xxx)
+ bfd *abfd;
+ asection *sec;
+ PTR xxx ATTRIBUTE_UNUSED;
+{
+ static bfd_vma addr = 0;
+
+ bfd_set_section_vma (abfd, sec, addr);
+ addr += bfd_section_size (abfd, sec);
+}
+#endif /* BFD_ASSEMBLER && OBJ_COFF && !TE_PE */
+
/* Finish the subsegments. After every sub-segment, we fake an
".align ...". This conforms to BSD4.2 brane-damage. We then fake
".fill 0" because that is the kind of frag that requires least
@@ -1369,21 +1417,31 @@ subsegs_finish ()
for (frchainP = frchain_root; frchainP; frchainP = frchainP->frch_next)
{
+ int alignment;
+
subseg_set (frchainP->frch_seg, frchainP->frch_subseg);
/* This now gets called even if we had errors. In that case,
any alignment is meaningless, and, moreover, will look weird
if we are generating a listing. */
- frag_align (had_errors () ? 0 : SUB_SEGMENT_ALIGN (now_seg),
- subseg_text_p (now_seg) ? NOP_OPCODE : 0,
- 0);
+ alignment = had_errors () ? 0 : SUB_SEGMENT_ALIGN (now_seg);
+
+ /* The last subsegment gets an aligment corresponding to the
+ alignment of the section. This allows proper nop-filling
+ at the end of code-bearing sections. */
+ if (!frchainP->frch_next || frchainP->frch_next->frch_seg != now_seg)
+ alignment = get_recorded_alignment (now_seg);
+
+ if (subseg_text_p (now_seg))
+ frag_align_code (alignment, 0);
+ else
+ frag_align (alignment, 0, 0);
/* frag_align will have left a new frag.
Use this last frag for an empty ".fill".
For this segment ...
Create a last frag. Do not leave a "being filled in frag". */
-
frag_wane (frag_now);
frag_now->fr_fix = 0;
know (frag_now->fr_next == NULL);
@@ -1396,7 +1454,7 @@ void
write_object_file ()
{
#if ! defined (BFD_ASSEMBLER) || ! defined (WORKING_DOT_WORD)
- fragS *fragP; /* Track along all frags. */
+ fragS *fragP; /* Track along all frags. */
#endif
/* Do we really want to write it? */
@@ -1425,9 +1483,9 @@ write_object_file ()
#ifdef OBJ_VMS
/* Under VMS we try to be compatible with VAX-11 "C". Thus, we call
a routine to check for the definition of the procedure "_main",
- and if so -- fix it up so that it can be program entry point. */
+ and if so -- fix it up so that it can be program entry point. */
vms_check_for_main ();
-#endif /* OBJ_VMS */
+#endif /* OBJ_VMS */
/* From now on, we don't care about sub-segments. Build one frag chain
for each segment. Linked thru fr_next. */
@@ -1475,33 +1533,39 @@ write_object_file ()
#endif
#ifdef BFD_ASSEMBLER
- bfd_map_over_sections (stdoutput, relax_and_size_seg, (char *) 0);
+ bfd_map_over_sections (stdoutput, relax_seg, (char *) 1);
+ bfd_map_over_sections (stdoutput, relax_seg, (char *) 0);
+ bfd_map_over_sections (stdoutput, size_seg, (char *) 0);
#else
relax_and_size_all_segments ();
-#endif /* BFD_ASSEMBLER */
+#endif /* BFD_ASSEMBLER */
+
+#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
+ /* Now that the segments have their final sizes, run through the
+ sections and set their vma and lma. !BFD gas sets them, and BFD gas
+ should too. Currently, only DJGPP uses this code, but other
+ COFF targets may need to execute this too. */
+ bfd_map_over_sections (stdoutput, set_segment_vma, (char *) 0);
+#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.
- *
- */
+ /* 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);
@@ -1512,12 +1576,10 @@ write_object_file ()
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();
- */
+ /* 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)
@@ -1542,7 +1604,7 @@ write_object_file ()
abort ();
#endif
}
-#endif /* ! BFD_ASSEMBLER */
+#endif /* ! BFD_ASSEMBLER */
#ifndef WORKING_DOT_WORD
{
@@ -1563,8 +1625,8 @@ write_object_file ()
#ifdef BFD_ASSEMBLER
#ifdef TC_CONS_FIX_NEW
TC_CONS_FIX_NEW (lie->frag,
- lie->word_goes_here - lie->frag->fr_literal,
- 2, &exp);
+ lie->word_goes_here - lie->frag->fr_literal,
+ 2, &exp);
#else
fix_new_exp (lie->frag,
lie->word_goes_here - lie->frag->fr_literal,
@@ -1584,9 +1646,9 @@ write_object_file ()
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 */
+#endif /* TC_NS32K */
+#endif /* TC_SPARC|TC_A29K|NEED_FX_R_TYPE */
+#endif /* BFD_ASSEMBLER */
*prevP = lie->next_broken_word;
}
else
@@ -1605,61 +1667,71 @@ write_object_file ()
/* Find out how many broken_words go here. */
n = 0;
- for (untruth = lie; untruth && untruth->dispfrag == fragP; untruth = untruth->next_broken_word)
+ for (untruth = lie;
+ untruth && untruth->dispfrag == fragP;
+ untruth = untruth->next_broken_word)
if (untruth->added == 1)
n++;
table_ptr = lie->dispfrag->fr_opcode;
- table_addr = lie->dispfrag->fr_address + (table_ptr - lie->dispfrag->fr_literal);
+ table_addr = (lie->dispfrag->fr_address
+ + (table_ptr - lie->dispfrag->fr_literal));
/* Create the jump around the long jumps. This is a short
jump from table_ptr+0 to table_ptr+n*long_jump_size. */
from_addr = table_addr;
to_addr = table_addr + md_short_jump_size + n * md_long_jump_size;
- md_create_short_jump (table_ptr, from_addr, to_addr, lie->dispfrag, lie->add);
+ md_create_short_jump (table_ptr, from_addr, to_addr, lie->dispfrag,
+ lie->add);
table_ptr += md_short_jump_size;
table_addr += md_short_jump_size;
- for (m = 0; lie && lie->dispfrag == fragP; m++, lie = lie->next_broken_word)
+ for (m = 0;
+ lie && lie->dispfrag == fragP;
+ m++, lie = lie->next_broken_word)
{
if (lie->added == 2)
continue;
- /* Patch the jump table */
- /* This is the offset from ??? to table_ptr+0 */
+ /* Patch the jump table. */
+ /* This is the offset from ??? to table_ptr+0. */
to_addr = table_addr - S_GET_VALUE (lie->sub);
#ifdef BFD_ASSEMBLER
to_addr -= symbol_get_frag (lie->sub)->fr_address;
#endif
+#ifdef TC_CHECK_ADJUSTED_BROKEN_DOT_WORD
+ TC_CHECK_ADJUSTED_BROKEN_DOT_WORD (to_addr, lie);
+#endif
md_number_to_chars (lie->word_goes_here, to_addr, 2);
- for (untruth = lie->next_broken_word; untruth && untruth->dispfrag == fragP; untruth = untruth->next_broken_word)
+ for (untruth = lie->next_broken_word;
+ untruth && untruth->dispfrag == fragP;
+ untruth = untruth->next_broken_word)
{
if (untruth->use_jump == lie)
md_number_to_chars (untruth->word_goes_here, to_addr, 2);
}
- /* Install the long jump */
- /* this is a long jump from table_ptr+0 to the final target */
+ /* Install the long jump. */
+ /* This is a long jump from table_ptr+0 to the final target. */
from_addr = table_addr;
to_addr = S_GET_VALUE (lie->add) + lie->addnum;
#ifdef BFD_ASSEMBLER
to_addr += symbol_get_frag (lie->add)->fr_address;
#endif
- md_create_long_jump (table_ptr, from_addr, to_addr, lie->dispfrag, lie->add);
+ md_create_long_jump (table_ptr, from_addr, to_addr, lie->dispfrag,
+ lie->add);
table_ptr += md_long_jump_size;
table_addr += md_long_jump_size;
}
}
}
-#endif /* not WORKING_DOT_WORD */
+#endif /* not WORKING_DOT_WORD */
#ifndef BFD_ASSEMBLER
#ifndef OBJ_VMS
- { /* not 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.
- */
+ /* 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);
@@ -1668,11 +1740,11 @@ write_object_file ()
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 */
+ /* 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 */
+ 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);
@@ -1681,11 +1753,10 @@ write_object_file ()
obj_header_append (&next_object_file_charP, &headers);
- know ((next_object_file_charP - the_object_file) == H_GET_HEADER_SIZE (&headers));
+ know ((next_object_file_charP - the_object_file)
+ == H_GET_HEADER_SIZE (&headers));
- /*
- * Emit code.
- */
+ /* Emit code. */
for (fragP = text_frag_root; fragP; fragP = fragP->fr_next)
{
register long count;
@@ -1694,78 +1765,91 @@ write_object_file ()
PROGRESS (1);
know (fragP->fr_type == rs_fill);
- append (&next_object_file_charP, fragP->fr_literal, (unsigned long) fragP->fr_fix);
+ 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);
- } /* for each */
-
- } /* for each code frag. */
-
- know ((next_object_file_charP - the_object_file) == (H_GET_HEADER_SIZE (&headers) + H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers)));
+ append (&next_object_file_charP, fill_literal,
+ (unsigned long) fill_size);
+ }
- /*
- * 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)));
+ 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.
- */
+ 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.
- */
+ 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.
- */
-
+ 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);
- } /* only if we have a string table */
+ obj_emit_strings (&next_object_file_charP);
#ifdef BFD_HEADERS
bfd_seek (stdoutput, 0, 0);
bfd_write (the_object_file, 1, object_file_size, stdoutput);
#else
- /* Write the data to the file */
+ /* Write the data to the file. */
output_file_append (the_object_file, object_file_size, out_file_name);
free (the_object_file);
#endif
- } /* non vms output */
-#else /* OBJ_VMS */
- /*
- * Now do the VMS-dependent part of writing the object file
- */
+ }
+#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 */
+#endif /* OBJ_VMS */
+#else /* BFD_ASSEMBLER */
/* Resolve symbol values. This needs to be done before processing
the relocations. */
@@ -1787,7 +1871,7 @@ write_object_file ()
obj_frob_file_before_adjust ();
#endif
- bfd_map_over_sections (stdoutput, adjust_reloc_syms, (char *)0);
+ bfd_map_over_sections (stdoutput, adjust_reloc_syms, (char *) 0);
/* Set up symbol table, and write it out. */
if (symbol_rootP)
@@ -1811,7 +1895,8 @@ write_object_file ()
name = S_GET_NAME (symp);
if (name)
{
- const char *name2 = decode_local_label_name ((char *)S_GET_NAME (symp));
+ const char *name2 =
+ decode_local_label_name ((char *) S_GET_NAME (symp));
/* They only differ if `name' is a fb or dollar local
label name. */
if (name2 != name && ! S_IS_DEFINED (symp))
@@ -1868,10 +1953,10 @@ write_object_file ()
&& ! symbol_used_in_reloc_p (symp)))
{
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
+
/* After symbol_remove, symbol_next(symp) still returns
the one that came after it in the chain. So we don't
need to do any extra cleanup work here. */
-
continue;
}
@@ -1925,43 +2010,17 @@ write_object_file ()
#endif
bfd_map_over_sections (stdoutput, write_contents, (char *) 0);
-#endif /* BFD_ASSEMBLER */
+#endif /* BFD_ASSEMBLER */
}
-#endif /* ! BFD */
-
-/*
- * relax_segment()
- *
- * Now we have a segment, not a crowd of sub-segments, we can make fr_address
- * values.
- *
- * Relax the frags.
- *
- * After this, all frags in this segment have addresses that are correct
- * within the segment. Since segments live in different file addresses,
- * these frag addresses may not be the same as final object-file addresses.
- */
+#endif /* ! BFD */
#ifdef TC_GENERIC_RELAX_TABLE
-static int is_dnrange PARAMS ((fragS *, fragS *));
-
-/* Subroutines of relax_segment. */
-static int
-is_dnrange (f1, f2)
- fragS *f1;
- fragS *f2;
-{
- for (; f1; f1 = f1->fr_next)
- if (f1->fr_next == f2)
- return 1;
- return 0;
-}
-
/* Relax a fragment by scanning TC_GENERIC_RELAX_TABLE. */
long
-relax_frag (fragP, stretch)
+relax_frag (segment, fragP, stretch)
+ segT segment;
fragS *fragP;
long stretch;
{
@@ -1969,20 +2028,26 @@ relax_frag (fragP, stretch)
const relax_typeS *start_type;
relax_substateT next_state;
relax_substateT this_state;
- long aim, target, growth;
- symbolS *symbolP = fragP->fr_symbol;
- long offset = fragP->fr_offset;
- /* Recompute was_address by undoing "+= stretch" done by relax_segment. */
- unsigned long was_address = fragP->fr_address - stretch;
- unsigned long address = fragP->fr_address;
- const relax_typeS *table = TC_GENERIC_RELAX_TABLE;
-
+ long growth;
+ offsetT aim;
+ addressT target;
+ addressT address;
+ symbolS *symbolP;
+ const relax_typeS *table;
+
+ target = fragP->fr_offset;
+ address = fragP->fr_address;
+ table = TC_GENERIC_RELAX_TABLE;
this_state = fragP->fr_subtype;
start_type = this_type = table + this_state;
- target = offset;
+ symbolP = fragP->fr_symbol;
if (symbolP)
{
+ fragS *sym_frag;
+
+ sym_frag = symbol_get_frag (symbolP);
+
#ifndef DIFF_EXPR_OK
#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
know ((S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE)
@@ -1990,23 +2055,20 @@ relax_frag (fragP, stretch)
|| (S_GET_SEGMENT (symbolP) == SEG_BSS)
|| (S_GET_SEGMENT (symbolP) == SEG_TEXT));
#endif
- know (symbolP->sy_frag);
+ know (sym_frag != NULL);
#endif
know (!(S_GET_SEGMENT (symbolP) == absolute_section)
- || symbolP->sy_frag == &zero_address_frag);
- target += S_GET_VALUE (symbolP) + symbol_get_frag (symbolP)->fr_address;
+ || sym_frag == &zero_address_frag);
+ target += S_GET_VALUE (symbolP) + sym_frag->fr_address;
/* If frag has yet to be reached on this pass,
assume it will move by STRETCH just as we did.
If this is not so, it will be because some frag
- between grows, and that will force another pass.
-
- Beware zero-length frags.
+ between grows, and that will force another pass. */
- There should be a faster way to do this. */
-
- if (symbol_get_frag (symbolP)->fr_address >= was_address
- && is_dnrange (fragP, symbol_get_frag (symbolP)))
+ if (stretch != 0
+ && sym_frag->relax_marker != fragP->relax_marker
+ && S_GET_SEGMENT (symbolP) == segment)
{
target += stretch;
}
@@ -2014,26 +2076,28 @@ relax_frag (fragP, stretch)
aim = target - address - fragP->fr_fix;
#ifdef TC_PCREL_ADJUST
- /* Currently only the ns32k family needs this */
- aim += TC_PCREL_ADJUST(fragP);
-/*#else*/
+ /* 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. */
-/* assert (fragP->fr_targ.ns32k.pcrel_adjust == 0);*/
+#if 0
+ assert (fragP->fr_targ.ns32k.pcrel_adjust == 0);
#endif
-#ifdef md_prepare_relax_scan /* formerly called M68K_AIM_KLUDGE */
+#endif
+#ifdef md_prepare_relax_scan /* formerly called M68K_AIM_KLUDGE */
md_prepare_relax_scan (fragP, address, aim, this_state, this_type);
#endif
if (aim < 0)
{
- /* Look backwards. */
+ /* Look backwards. */
for (next_state = this_type->rlx_more; next_state;)
if (aim >= this_type->rlx_backward)
next_state = 0;
else
{
- /* Grow to next state. */
+ /* Grow to next state. */
this_state = next_state;
this_type = table + this_state;
next_state = this_type->rlx_more;
@@ -2041,13 +2105,13 @@ relax_frag (fragP, stretch)
}
else
{
- /* Look forwards. */
+ /* Look forwards. */
for (next_state = this_type->rlx_more; next_state;)
if (aim <= this_type->rlx_forward)
next_state = 0;
else
{
- /* Grow to next state. */
+ /* Grow to next state. */
this_state = next_state;
this_type = table + this_state;
next_state = this_type->rlx_more;
@@ -2060,14 +2124,14 @@ relax_frag (fragP, stretch)
return growth;
}
-#endif /* defined (TC_GENERIC_RELAX_TABLE) */
+#endif /* defined (TC_GENERIC_RELAX_TABLE) */
/* Relax_align. Advance location counter to next address that has 'alignment'
lowest order bits all 0s, return size of adjustment made. */
static relax_addressT
relax_align (address, alignment)
- register relax_addressT address; /* Address now. */
- register int alignment; /* Alignment (binary). */
+ register relax_addressT address; /* Address now. */
+ register int alignment; /* Alignment (binary). */
{
relax_addressT mask;
relax_addressT new_address;
@@ -2083,6 +2147,16 @@ relax_align (address, alignment)
return (new_address - address);
}
+/* Now we have a segment, not a crowd of sub-segments, we can make
+ fr_address values.
+
+ Relax the frags.
+
+ After this, all frags in this segment have addresses that are correct
+ within the segment. Since segments live in different file addresses,
+ these frag addresses may not be the same as final object-file
+ addresses. */
+
void
relax_segment (segment_frag_root, segment)
struct frag *segment_frag_root;
@@ -2093,7 +2167,7 @@ relax_segment (segment_frag_root, segment)
#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. */
+ /* 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)
@@ -2101,6 +2175,7 @@ relax_segment (segment_frag_root, segment)
address = 0;
for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
{
+ fragP->relax_marker = 0;
fragP->fr_address = address;
address += fragP->fr_fix;
@@ -2112,6 +2187,7 @@ relax_segment (segment_frag_root, segment)
case rs_align:
case rs_align_code:
+ case rs_align_test:
{
addressT offset = relax_align (address, (int) fragP->fr_offset);
@@ -2139,13 +2215,13 @@ relax_segment (segment_frag_root, segment)
break;
#ifndef WORKING_DOT_WORD
- /* Broken words don't concern us yet */
+ /* Broken words don't concern us yet. */
case rs_broken_word:
break;
#endif
case rs_leb128:
- /* Initial guess is always 1; doing otherwise can result in
+ /* Initial guess is always 1; doing otherwise can result in
stable solutions that are larger than the minimum. */
address += fragP->fr_offset = 1;
break;
@@ -2154,26 +2230,31 @@ relax_segment (segment_frag_root, segment)
address += eh_frame_estimate_size_before_relax (fragP);
break;
+ case rs_dwarf2dbg:
+ address += dwarf2dbg_estimate_size_before_relax (fragP);
+ break;
+
default:
BAD_CASE (fragP->fr_type);
break;
- } /* switch(fr_type) */
- } /* for each frag in the segment */
+ }
+ }
/* Do relax(). */
{
- long 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. */
- long stretched; /* Have we stretched on this pass? */
+ long stretch; /* May be any size, 0 or negative. */
+ /* Cumulative number of addresses we have relaxed this pass.
+ We may have relaxed more than one address. */
+ int stretched; /* Have we stretched on this pass? */
/* This is 'cuz stretch may be zero, when, in fact some piece of code
grew, and another shrank. If a branch instruction doesn't fit anymore,
we could be scrod. */
do
{
- stretch = stretched = 0;
+ stretch = 0;
+ stretched = 0;
+
for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
{
long growth = 0;
@@ -2181,6 +2262,7 @@ relax_segment (segment_frag_root, segment)
offsetT offset;
symbolS *symbolP;
+ fragP->relax_marker ^= 1;
was_address = fragP->fr_address;
address = fragP->fr_address += stretch;
symbolP = fragP->fr_symbol;
@@ -2188,7 +2270,7 @@ relax_segment (segment_frag_root, segment)
switch (fragP->fr_type)
{
- case rs_fill: /* .fill never relaxes. */
+ case rs_fill: /* .fill never relaxes. */
growth = 0;
break;
@@ -2253,10 +2335,11 @@ relax_segment (segment_frag_root, segment)
}
break;
- } /* case rs_broken_word */
+ } /* case rs_broken_word */
#endif
case rs_align:
case rs_align_code:
+ case rs_align_test:
{
addressT oldoff, newoff;
@@ -2279,8 +2362,8 @@ relax_segment (segment_frag_root, segment)
case rs_org:
{
- long target = offset;
- long after;
+ addressT target = offset;
+ addressT after;
if (symbolP)
{
@@ -2295,7 +2378,7 @@ relax_segment (segment_frag_root, segment)
#endif
target += (S_GET_VALUE (symbolP)
+ symbol_get_frag (symbolP)->fr_address);
- } /* if we have a symbol */
+ } /* if we have a symbol */
know (fragP->fr_next);
after = fragP->fr_next->fr_address;
@@ -2304,7 +2387,7 @@ relax_segment (segment_frag_root, segment)
{
/* Growth may be negative, but variable part of frag
cannot have fewer than 0 chars. That is, we can't
- .org backwards. */
+ .org backwards. */
as_bad_where (fragP->fr_file, fragP->fr_line,
_("attempt to .org backwards ignored"));
@@ -2317,7 +2400,8 @@ relax_segment (segment_frag_root, segment)
growth = stretch;
}
- growth -= stretch; /* This is an absolute growth factor */
+ /* This is an absolute growth factor */
+ growth -= stretch;
break;
}
@@ -2343,13 +2427,13 @@ relax_segment (segment_frag_root, segment)
case rs_machine_dependent:
#ifdef md_relax_frag
- growth = md_relax_frag (fragP, stretch);
+ growth = md_relax_frag (segment, fragP, stretch);
#else
#ifdef TC_GENERIC_RELAX_TABLE
/* The default way to relax a frag is to look through
TC_GENERIC_RELAX_TABLE. */
- growth = relax_frag (fragP, stretch);
-#endif /* TC_GENERIC_RELAX_TABLE */
+ growth = relax_frag (segment, fragP, stretch);
+#endif /* TC_GENERIC_RELAX_TABLE */
#endif
break;
@@ -2369,6 +2453,10 @@ relax_segment (segment_frag_root, segment)
growth = eh_frame_relax_frag (fragP);
break;
+ case rs_dwarf2dbg:
+ growth = dwarf2dbg_relax_frag (fragP);
+ break;
+
default:
BAD_CASE (fragP->fr_type);
break;
@@ -2376,22 +2464,18 @@ relax_segment (segment_frag_root, segment)
if (growth)
{
stretch += growth;
- stretched++;
+ stretched = 1;
}
- } /* For each frag in the segment. */
+ } /* For each frag in the segment. */
}
- while (stretched); /* Until nothing further to relax. */
- } /* do_relax */
+ while (stretched); /* Until nothing further to relax. */
+ } /* do_relax */
- /*
- * We now have valid fr_address'es for each frag.
- */
+ /* We now have valid fr_address'es for each frag. */
- /*
- * All fr_address's are correct, relative to their own segment.
- * We have made all the fixS we will ever make.
- */
-} /* relax_segment() */
+ /* All fr_address's are correct, relative to their own segment.
+ We have made all the fixS we will ever make. */
+}
#if defined (BFD_ASSEMBLER) || (!defined (BFD) && !defined (OBJ_VMS))
@@ -2413,7 +2497,7 @@ relax_segment (segment_frag_root, segment)
static long
fixup_segment (fixP, this_segment_type)
register fixS *fixP;
- segT this_segment_type; /* N_TYPE bits for segment. */
+ segT this_segment_type; /* N_TYPE bits for segment. */
{
long seg_reloc_count = 0;
symbolS *add_symbolP;
@@ -2433,7 +2517,7 @@ fixup_segment (fixP, this_segment_type)
i960 (the only machine for which we've got a relaxing linker right now),
we might be able to turn callx/callj into bal anyways in cases where we
know the maximum displacement. */
- if (linkrelax)
+ if (linkrelax && TC_LINKRELAX_FIXUP (this_segment_type))
{
for (; fixP; fixP = fixP->fx_next)
seg_reloc_count++;
@@ -2443,13 +2527,11 @@ fixup_segment (fixP, this_segment_type)
for (; fixP; fixP = fixP->fx_next)
{
-
#ifdef DEBUG5
fprintf (stderr, "\nprocessing fixup:\n");
print_fixup (fixP);
#endif
-
fragP = fixP->fx_frag;
know (fragP);
where = fixP->fx_where;
@@ -2489,7 +2571,7 @@ fixup_segment (fixP, this_segment_type)
fixP->fx_addsy = NULL;
}
- /* It's just -sym */
+ /* It's just -sym. */
if (S_GET_SEGMENT (sub_symbolP) == absolute_section)
{
add_number -= S_GET_VALUE (sub_symbolP);
@@ -2512,19 +2594,19 @@ fixup_segment (fixP, this_segment_type)
{
/* Difference of 2 symbols from same segment.
Can't make difference of 2 undefineds: 'value' means
- something different for N_UNDF. */
+ something different for N_UNDF. */
#ifdef TC_I960
/* Makes no sense to use the difference of 2 arbitrary symbols
as the target of a call instruction. */
if (fixP->fx_tcbit)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("callj to difference of 2 symbols"));
-#endif /* TC_I960 */
+#endif /* TC_I960 */
add_number += S_GET_VALUE (add_symbolP) -
S_GET_VALUE (sub_symbolP);
add_symbolP = NULL;
- pcrel = 0; /* No further pcrel processing. */
+ pcrel = 0; /* No further pcrel processing. */
/* Let the target machine make the final determination
as to whether or not a relocation will be needed to
@@ -2538,7 +2620,7 @@ fixup_segment (fixP, this_segment_type)
}
else
{
- /* Different segments in subtraction. */
+ /* Different segments in subtraction. */
know (!(S_IS_EXTERNAL (sub_symbolP)
&& (S_GET_SEGMENT (sub_symbolP) == absolute_section)));
@@ -2547,9 +2629,11 @@ fixup_segment (fixP, this_segment_type)
#ifdef DIFF_EXPR_OK
else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type
-#if 0 /* Do this even if it's already described as pc-relative. For example,
- on the m68k, an operand of "pc@(foo-.-2)" should address "foo" in a
- pc-relative mode. */
+#if 0
+ /* Do this even if it's already described as
+ pc-relative. For example, on the m68k, an
+ operand of "pc@(foo-.-2)" should address
+ "foo" in a pc-relative mode. */
&& pcrel
#endif
)
@@ -2599,23 +2683,22 @@ fixup_segment (fixP, this_segment_type)
if (add_symbol_segment == this_segment_type && pcrel && !plt
&& TC_RELOC_RTSYM_LOC_FIXUP (fixP))
{
- /*
- * This fixup was made when the symbol's segment was
- * SEG_UNKNOWN, but it is now in the local segment.
- * So we know how to do the address without relocation.
- */
+ /* 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. */
+ below a no-op. */
reloc_callj (fixP);
-#endif /* TC_I960 */
+#endif /* TC_I960 */
add_number += S_GET_VALUE (add_symbolP);
add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment_type);
- pcrel = 0; /* Lie. Don't want further pcrel processing. */
+ /* Lie. Don't want further pcrel processing. */
+ pcrel = 0;
/* Let the target machine make the final determination
as to whether or not a relocation will be needed to
@@ -2634,7 +2717,7 @@ fixup_segment (fixP, this_segment_type)
#ifdef TC_I960
/* See comment about reloc_callj() above. */
reloc_callj (fixP);
-#endif /* TC_I960 */
+#endif /* TC_I960 */
add_number += S_GET_VALUE (add_symbolP);
/* Let the target machine make the final determination
@@ -2657,40 +2740,30 @@ fixup_segment (fixP, this_segment_type)
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.
- */
+ 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;
- } /* COBR */
-#endif /* TC_I960 */
+ } /* COBR. */
+#endif /* TC_I960 */
#ifdef OBJ_COFF
#ifdef TE_I386AIX
if (S_IS_COMMON (add_symbolP))
add_number += S_GET_VALUE (add_symbolP);
-#endif /* TE_I386AIX */
-#endif /* OBJ_COFF */
+#endif /* TE_I386AIX */
+#endif /* OBJ_COFF */
++seg_reloc_count;
}
else
{
seg_reloc_count++;
-#if !(defined (TC_V850) && defined (OBJ_ELF))
-#if !(defined (TC_M68K) && defined (OBJ_ELF))
-#if !(defined (TC_ARM) && defined (OBJ_ELF))
-#if !(defined (TC_I960) && defined (OBJ_ELF))
-#if !defined (TC_I386) || !(defined (OBJ_ELF) || defined (OBJ_COFF)) || defined (TE_PE)
- add_number += S_GET_VALUE (add_symbolP);
-#endif
-#endif
-#endif
-#endif
-#endif
+ if (TC_FIX_ADJUSTABLE (fixP))
+ add_number += S_GET_VALUE (add_symbolP);
}
}
}
@@ -2738,7 +2811,7 @@ fixup_segment (fixP, this_segment_type)
valueT mask;
mask = 0;
- mask--; /* set all bits to one */
+ mask--; /* Set all bits to one. */
mask <<= size * 8 - (fixP->fx_signed ? 1 : 0);
if ((add_number & mask) != 0 && (add_number & mask) != mask)
{
@@ -2751,7 +2824,7 @@ fixup_segment (fixP, this_segment_type)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("Value of %s too large for field of %d bytes at %s"),
buf2, size, buf);
- } /* generic error checking */
+ } /* Generic error checking. */
}
#ifdef WARN_SIGNED_OVERFLOW_WORD
/* Warn if a .word value is too large when treated as a signed
@@ -2765,7 +2838,7 @@ fixup_segment (fixP, this_segment_type)
(long) add_number,
(unsigned long) (fragP->fr_address + where));
#endif
- } /* not a bit fix */
+ } /* Not a bit fix. */
#ifdef TC_VALIDATE_FIX
skip: ATTRIBUTE_UNUSED_LABEL
@@ -2775,7 +2848,7 @@ fixup_segment (fixP, this_segment_type)
fprintf (stderr, "result:\n");
print_fixup (fixP);
#endif
- } /* For each fixS in this segment. */
+ } /* For each fixS in this segment. */
TC_ADJUST_RELOC_COUNT (fixP, seg_reloc_count);
return seg_reloc_count;
@@ -2820,7 +2893,7 @@ write_print_statistics (file)
fprintf (file, "fixups: %d\n", n_fixups);
}
-/* for debugging */
+/* For debugging. */
extern int indent_level;
void
@@ -2873,5 +2946,3 @@ print_fixup (fixp)
TC_FIX_DATA_PRINT (stderr, fixp);
#endif
}
-
-/* end of write.c */
diff --git a/gnu/usr.bin/binutils/gas/write.h b/gnu/usr.bin/binutils/gas/write.h
index 186d2ada1b6..5bab7a21214 100644
--- a/gnu/usr.bin/binutils/gas/write.h
+++ b/gnu/usr.bin/binutils/gas/write.h
@@ -1,5 +1,6 @@
/* write.h
- Copyright (C) 1987, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -95,13 +96,13 @@ struct fix
/* Where is the first byte to fix up? */
long fx_where;
- /* NULL or Symbol whose value we add in. */
+ /* NULL or Symbol whose value we add in. */
symbolS *fx_addsy;
- /* NULL or Symbol whose value we subtract. */
+ /* NULL or Symbol whose value we subtract. */
symbolS *fx_subsy;
- /* Absolute number we add in. */
+ /* Absolute number we add in. */
valueT fx_offset;
/* Next fixS in linked list, or NULL. */
@@ -160,13 +161,13 @@ typedef struct fix fixS;
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. */
+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. */
+COMMON fixS **seg_fix_rootP, **seg_fix_tailP; /* -> one of above. */
#endif
extern long string_byte_count;
@@ -177,9 +178,10 @@ extern bit_fixS *bit_fix_new
long max, long add));
extern void append PARAMS ((char **charPP, char *fromP, unsigned long length));
extern void record_alignment PARAMS ((segT seg, int align));
+extern int get_recorded_alignment PARAMS ((segT seg));
extern void subsegs_finish PARAMS ((void));
extern void write_object_file PARAMS ((void));
-extern long relax_frag PARAMS ((fragS *, long));
+extern long relax_frag PARAMS ((segT, fragS *, long));
extern void relax_segment
PARAMS ((struct frag * seg_frag_root, segT seg_type));
@@ -205,4 +207,3 @@ extern fixS *fix_new_exp
extern void write_print_statistics PARAMS ((FILE *));
#endif /* __write_h__ */
-/* end of write.h */
diff --git a/gnu/usr.bin/binutils/gprof/ChangeLog b/gnu/usr.bin/binutils/gprof/ChangeLog
index 8e7f6100dec..3e18cc6dd89 100644
--- a/gnu/usr.bin/binutils/gprof/ChangeLog
+++ b/gnu/usr.bin/binutils/gprof/ChangeLog
@@ -1,8 +1,187 @@
-2000-10-16 Philip Blundell <pb@futuretv.com>
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
+ * gmon_io.c (gmon_io_read, gmon_io_write_vma,
+ gmon_io_write_32, gmon_io_write_8, gmon_io_write): Adjust
+ argument list for K&R C.
+
+ 2001-03-13 David Mosberger <davidm@hpl.hp.com>
+ * hist.c (hist_dimension): Declare as an array of 16 characters.
+ (hist_read_rec): If SAMPLEDEBUG, print each histogram bin count.
+ * basic_blocks.c: Whitespace and formatting changes.
+ * bb_exit_func.c: Ditto.
+ * call_graph.c: Ditto.
+ * call_graph.h: Ditto.
+ * cg_arcs.c: Ditto.
+ * cg_print.c: Ditto.
+ * cg_print.h: Ditto.
+ * corefile.c: Ditto.
+ * corefile.h: Ditto.
+ * gmon_io.c: Ditto.
+ * gmon_io.h: Ditto.
+ * gmon_out.h: Ditto.
+ * gprof.c: Ditto.
+ * hist.c: Ditto.
+ * hist.h: Ditto.
+ * i386.c: Ditto.
+ * search_list.c: Ditto.
+ * search_list.h: Ditto.
+ * source.c: Ditto.
+ * source.h: Ditto.
+ * sym_ids.c: Ditto.
+ * sym_ids.h: Ditto.
+ * symtab.c: Ditto.
+ * symtab.h: Ditto.
+ * tahoe.c: Ditto.
+ * utils.c: Ditto.
+ * vax.c: Ditto.
+ * gmon_out.h (gmon_hist_hdr): Delete.
+ (gmon_cg_arc_record): Delete.
+ * gmon_io.c (put_vma): Declare "static".
+ (get_vma): Ditto.
+ (gmon_io_write): New function.
+ (gmon_io_write_8): Ditto.
+ (gmon_io_write_32): Ditto.
+ (gmon_io_write_vma): Ditto.
+ (gmon_io_read): Ditto.
+ (gmon_io_read_32): Ditto.
+ (gmon_io_read_vma): Ditto.
+ * basic_blocks.c (bb_read_rec): Use gmon_io_read* / gmon_io_write*
+ to read/write data file in a more portable fashion.
+ (bb_write_blocks): Ditto.
+ * call_graph.c (cg_read_rec): Ditto.
+ (cg_write_arcs): Ditto.
+ * hist.c (hist_read_rec): Ditto.
+ (hist_write_hist): Ditto.
+ From Jes Sorensen <jes@linuxcare.com>
+ * gmon_out.h: Use GMON_PTR_SIZE instead of sizeof(char*).
+ * gmon.h: Ditto.
+ * configure.in: Get GMON_PTR_SIZE from existing <sys/gmon_out.h>
+ if it exists.
+ * acconfig.h: New file. Mention and document GMON_PTR_SIZE.
+ * gconfig.h: Regenerate.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+ 2001-02-27 Alan Modra <alan@linuxcare.com.au>
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
+ * configure: Regenerate.
+ * gconfig.in: Regenerate.
+ * Makefile.am: Run "make dep-am"
+ * Makefile.in: Regenerate.
+
+2001-06-10 Philip Blundell <philb@gnu.org>
+
+ * configure.in: Set version to 2.11.1.
+ * configure: Regenerate.
+
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Many files: Update copyright notices.
+
+2001-03-16 Philip Blundell <philb@gnu.org>
- * configure.in: Set version number to 2.10.1.
* configure: Regenerate.
+2001-03-11 Philip Blundell <philb@gnu.org>
+
+ * configure.in: Set version to 2.11.
+
+2001-01-27 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * basic_blocks.c: #include <unistd.h> only if it exists.
+
+2000-11-06 Nick Clifton <nickc@redhat.com>
+
+ * gprof.texi: Add GNU Free Documentation License.
+
+2000-09-07 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
+ * configure: Rebuild.
+
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * aclocal.m4, configure: Rebuilt with new libtool.m4.
+
+2000-09-02 Nick Clifton <nickc@redhat.com>
+
+ * configure.in: Increase version number to 2.10.91.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
+
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
+
+2000-07-26 Nick Clifton <nickc@cygnus.com>
+
+ * bb_exit_func.c: Assign copyright to FSF. Note that David
+ Mosberger-Tang <David.Mosberger@acm.org> continuted this code.
+
+2000-07-24 Nick Clifton <nickc@cygnus.com>
+
+ * basic_blocks.c: Add copyright notice.
+ * basic_blocks.h: Add copyright notice.
+ * call_graph.c: Add copyright notice.
+ * call_graph.h: Add copyright notice.
+ * cg_print.c: Add copyright notice.
+ * cg_print.h: Add copyright notice.
+ * corefile.c: Add copyright notice.
+ * corefile.h: Add copyright notice.
+ * gmon_io.c: Add copyright notice.
+ * gmon_io.h: Add copyright notice.
+ * gmon_out.h: Add copyright notice.
+ * hist.c: Add copyright notice.
+ * hist.h: Add copyright notice.
+ * search_list.c: Add copyright notice.
+ * search_list.h: Add copyright notice.
+ * source.c: Add copyright notice.
+ * source.h: Add copyright notice.
+ * sym_ids.c: Add copyright notice.
+ * sym_ids.h: Add copyright notice.
+ * symtab.c: Add copyright notice.
+ * symtab.h: Add copyright notice.
+
+2000-07-05 Kenneth Block <krblock@computer.org>
+
+ * gprof.c: Add optional style to demangle switch
+ * gprof.texi: Document optional style to demangle switch.
+
+2000-06-05 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS: new
+
+2000-07-01 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
+ (CLEANFILES): Add DEPA.
+ * Makefile.in: Regenerate.
+
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
+ find one.
+ * Makefile.in: Regenerate.
+
+2000-06-20 Alan Modra <alan@linuxcare.com.au>
+
+ * source.c (annotate_source): Correct pointer comparison when
+ checking for backslashes.
+
+2000-06-13 H.J. Lu <hjl@gnu.org>
+
+ * configure: Regenerate.
+
+2000-06-08 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in (VERSION): Update to show this is the CVS mainline.
+
2000-06-07 Philippe De Muyter <phdm@macqel.be>
* source.c: Remove direct inclusion of sys/stat.h.
@@ -16,8 +195,18 @@
* gprof.h (_): Use BFD version.
+2000-05-26 Nick Clifton <nickc@cygnus.com>
+
+ * gprof.c (main): When calling getopt_long indicate that the 'd'
+ switch takes an optional argument, whereas the 'D' switch takes no
+ argument at all.
+
2000-05-26 Alan Modra <alan@linuxcare.com.au>
+ * dep-in.sed: Copy from ../binutils.
+ * Makefile.am: Update dependencies with "make dep-am"
+ * Makefile.in: Regenerate.
+
* gprof.h: Remove most nls defines. They are pulled in by
bfd/sysdep.h. #include "ansidecl.h" not <ansidecl.h>
@@ -52,10 +241,12 @@
[HAVE_SETITIMER]: If they define both HAVE_SETITIMER and
HAVE_SYSCONF, try setitimer and fall back on sysconf.
-2000-05-23 Philip Blundell <pb@futuretv.com>
-
- * configure.in: Set version to 2.10.
- * configure: Regenerate.
+Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure, aclocal.m4: Re-generate.
2000-04-05 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
@@ -1196,7 +1387,7 @@ Tue Jan 31 16:18:18 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-S: annotate source file
-t: set table length (with -S)
- * Makefile (OBJS): added basic_blocks.o call_graph.o gmon_io.o
+ * Makefile.am (OBJS): added basic_blocks.o call_graph.o gmon_io.o
source.o time_hist.o
Fri Jul 1 15:23:50 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
@@ -1347,7 +1538,7 @@ Mon Apr 26 12:37:46 1993 Ian Lance Taylor (ian@cygnus.com)
Tue Apr 13 16:14:03 1993 Per Bothner (bothner@cygnus.com)
- * M Makefile.in: Add -g to CFLAGS.
+ * Makefile.in: Add -g to CFLAGS.
Ads LDFLAGS and use in place of CFLAGS where appropriate.
* configure.in: Make a sysdep.hlink in the same way other
bfd-based directories do.
diff --git a/gnu/usr.bin/binutils/gprof/Makefile.in b/gnu/usr.bin/binutils/gprof/Makefile.in
index 937b8bb8300..98244736edb 100644
--- a/gnu/usr.bin/binutils/gprof/Makefile.in
+++ b/gnu/usr.bin/binutils/gprof/Makefile.in
@@ -67,9 +67,13 @@ AS = @AS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
@@ -86,10 +90,12 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+STRIP = @STRIP@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
@@ -105,6 +111,9 @@ BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
+WARN_CFLAGS = @WARN_CFLAGS@
+AM_CFLAGS = $(WARN_CFLAGS)
+
MKDEP = gcc -MM
INCLUDES = -D_GNU_SOURCE -DDEBUG -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -I$(srcdir)/../intl -I../intl -I. -DLOCALEDIR="\"$(prefix)/share/locale\""
@@ -135,7 +144,7 @@ POTFILES = $(sources) $(noinst_HEADERS)
info_TEXINFOS = gprof.texi
man_MANS = gprof.1
-CLEANFILES = dep.sed DEP DEP1 DEP2
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = gconfig.h
@@ -148,10 +157,13 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-gprof_OBJECTS = basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o \
-cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o \
-search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o \
-sparc.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o
+gprof_OBJECTS = basic_blocks.$(OBJEXT) call_graph.$(OBJEXT) \
+cg_arcs.$(OBJEXT) cg_dfn.$(OBJEXT) cg_print.$(OBJEXT) \
+corefile.$(OBJEXT) gmon_io.$(OBJEXT) gprof.$(OBJEXT) hertz.$(OBJEXT) \
+hist.$(OBJEXT) source.$(OBJEXT) search_list.$(OBJEXT) symtab.$(OBJEXT) \
+sym_ids.$(OBJEXT) utils.$(OBJEXT) i386.$(OBJEXT) alpha.$(OBJEXT) \
+vax.$(OBJEXT) tahoe.$(OBJEXT) sparc.$(OBJEXT) flat_bl.$(OBJEXT) \
+bsd_callg_bl.$(OBJEXT) fsf_callg_bl.$(OBJEXT)
gprof_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -170,7 +182,7 @@ NROFF = nroff
HEADERS = $(noinst_HEADERS)
DIST_COMMON = ./stamp-h.in ChangeLog Makefile.am Makefile.in TODO \
-aclocal.m4 configure configure.in gconfig.in
+acconfig.h acinclude.m4 aclocal.m4 configure configure.in gconfig.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -186,7 +198,7 @@ OBJECTS = $(gprof_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .lo .m .o .ps .s .texi .texinfo .txi
+.SUFFIXES: .S .c .dvi .info .lo .m .o .obj .ps .s .texi .texinfo .txi
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
@@ -194,7 +206,7 @@ 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
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -217,7 +229,7 @@ $(srcdir)/gconfig.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
rm -f $(srcdir)/stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \
else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
@@ -258,6 +270,11 @@ uninstall-binPROGRAMS:
.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 $<
@@ -266,6 +283,7 @@ uninstall-binPROGRAMS:
mostlyclean-compile:
-rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
clean-compile:
@@ -708,8 +726,13 @@ po/POTFILES.in: @MAINT@ Makefile
DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
rm -f DEP1
$(MAKE) MKDEP="$(MKDEP)" DEP1
- sed -f dep.sed < DEP1 > $@
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
+ sed -f dep.sed < DEP1 > DEPA
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
+ if grep ' /' DEPA > /dev/null 2> /dev/null; then \
+ echo 'make DEP failed!'; exit 1; \
+ else \
+ mv -f DEPA $@; \
+ fi
DEP1: $(gprof_SOURCES)
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
@@ -745,88 +768,97 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
basic_blocks.o: basic_blocks.c basic_blocks.h gprof.h \
- $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
- gconfig.h $(INCDIR)/bin-bugs.h source.h search_list.h \
- symtab.h ../bfd/bfd.h corefile.h gmon_io.h gmon.h gmon_out.h \
+ $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h ../bfd/config.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
+ $(INCDIR)/bin-bugs.h source.h search_list.h symtab.h \
+ ../bfd/bfd.h corefile.h gmon_io.h gmon.h gmon_out.h \
$(INCDIR)/libiberty.h sym_ids.h
-call_graph.o: call_graph.c cg_arcs.h gprof.h $(BFDDIR)/sysdep.h \
- ../bfd/config.h $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
+call_graph.o: call_graph.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
+ $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
symtab.h ../bfd/bfd.h source.h search_list.h call_graph.h \
corefile.h gmon_io.h gmon.h gmon_out.h sym_ids.h
cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
- gconfig.h $(INCDIR)/bin-bugs.h call_graph.h symtab.h \
- ../bfd/bfd.h source.h search_list.h cg_arcs.h cg_dfn.h \
- cg_print.h utils.h sym_ids.h
+ $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
+ call_graph.h symtab.h ../bfd/bfd.h source.h search_list.h \
+ cg_arcs.h cg_dfn.h cg_print.h utils.h sym_ids.h
cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
- gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
- source.h search_list.h cg_dfn.h utils.h
+ $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
+ cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
+ cg_dfn.h utils.h
cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- symtab.h ../bfd/bfd.h source.h search_list.h cg_print.h \
- hist.h utils.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
+ $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
+ search_list.h cg_print.h hist.h utils.h
corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
- gconfig.h $(INCDIR)/bin-bugs.h corefile.h ../bfd/bfd.h \
- symtab.h source.h search_list.h
-gmon_io.o: gmon_io.c cg_arcs.h gprof.h $(BFDDIR)/sysdep.h \
- ../bfd/config.h $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
+ corefile.h ../bfd/bfd.h symtab.h source.h search_list.h
+gmon_io.o: gmon_io.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
+ $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
symtab.h ../bfd/bfd.h source.h search_list.h basic_blocks.h \
corefile.h call_graph.h gmon_io.h gmon.h gmon_out.h \
hertz.h hist.h $(INCDIR)/libiberty.h
gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
$(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- basic_blocks.h source.h search_list.h symtab.h ../bfd/bfd.h \
- call_graph.h cg_arcs.h cg_print.h corefile.h gmon_io.h \
- gmon.h hertz.h hist.h sym_ids.h
-hertz.o: hertz.c hertz.h gprof.h $(BFDDIR)/sysdep.h \
- ../bfd/config.h $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
+ $(INCDIR)/bin-bugs.h basic_blocks.h source.h search_list.h \
+ symtab.h ../bfd/bfd.h call_graph.h cg_arcs.h cg_print.h \
+ corefile.h gmon_io.h gmon.h hertz.h hist.h sym_ids.h \
+ $(INCDIR)/demangle.h
+hertz.o: hertz.c hertz.h gprof.h $(INCDIR)/ansidecl.h \
+ $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h
hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
- gconfig.h $(INCDIR)/bin-bugs.h corefile.h ../bfd/bfd.h \
- gmon_io.h gmon.h gmon_out.h hist.h symtab.h source.h \
- search_list.h sym_ids.h utils.h
-source.o: source.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/libiberty.h search_list.h source.h
+ $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
+ corefile.h ../bfd/bfd.h gmon_io.h gmon.h gmon_out.h \
+ hist.h symtab.h source.h search_list.h sym_ids.h utils.h
+source.o: source.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
+ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
+ gconfig.h $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h \
+ search_list.h source.h
search_list.o: search_list.c $(INCDIR)/libiberty.h \
$(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- search_list.h
-symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
- corefile.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
+ $(INCDIR)/bin-bugs.h search_list.h
+symtab.o: symtab.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
+ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
+ gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
+ source.h search_list.h corefile.h
sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- symtab.h ../bfd/bfd.h source.h search_list.h sym_ids.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
+ $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
+ search_list.h sym_ids.h
utils.o: utils.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h
-i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
- corefile.h hist.h
-alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
- corefile.h hist.h
-vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
- corefile.h hist.h
-tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
- corefile.h hist.h
-sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
- $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \
- cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
- corefile.h hist.h
+ $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
+ $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
+ source.h search_list.h
+i386.o: i386.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
+ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
+ gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
+ source.h search_list.h corefile.h hist.h
+alpha.o: alpha.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
+ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
+ gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
+ source.h search_list.h corefile.h hist.h
+vax.o: vax.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
+ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
+ gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
+ source.h search_list.h corefile.h hist.h
+tahoe.o: tahoe.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
+ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
+ gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
+ source.h search_list.h corefile.h hist.h
+sparc.o: sparc.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
+ ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
+ gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
+ source.h search_list.h corefile.h hist.h
flat_bl.o: flat_bl.c
bsd_callg_bl.o: bsd_callg_bl.c
fsf_callg_bl.o: fsf_callg_bl.c
diff --git a/gnu/usr.bin/binutils/gprof/basic_blocks.c b/gnu/usr.bin/binutils/gprof/basic_blocks.c
index 43dd762b01c..8f560b4b2f6 100644
--- a/gnu/usr.bin/binutils/gprof/basic_blocks.c
+++ b/gnu/usr.bin/binutils/gprof/basic_blocks.c
@@ -1,10 +1,27 @@
-/*
- * Basic-block level related code: reading/writing of basic-block info
- * to/from gmon.out; computing and formatting of basic-block related
- * statistics.
- */
+/* basic_blocks.c - Basic-block level related code: reading/writing
+ of basic-block info to/from gmon.out; computing and formatting of
+ basic-block related statistics.
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include <stdio.h>
-#include <unistd.h>
#include "basic_blocks.h"
#include "corefile.h"
#include "gmon_io.h"
@@ -13,27 +30,23 @@
#include "libiberty.h"
#include "source.h"
#include "sym_ids.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
-
-/*
- * Default option values:
- */
+/* Default option values: */
bool bb_annotate_all_lines = FALSE;
unsigned long bb_min_calls = 1;
int bb_table_length = 10;
-/*
- * Variables used to compute annotated source listing stats:
- */
+/* Variables used to compute annotated source listing stats: */
static long num_executable_lines;
static long num_lines_executed;
-/*
- * Helper for sorting. Compares two symbols and returns result
- * such that sorting will be increasing according to filename, line
- * number, and address (in that order).
- */
+/* Helper for sorting. Compares two symbols and returns result
+ such that sorting will be increasing according to filename, line
+ number, and address (in that order). */
static int
DEFUN (cmp_bb, (lp, rp), const void *lp AND const void *rp)
@@ -45,36 +58,25 @@ DEFUN (cmp_bb, (lp, rp), const void *lp AND const void *rp)
if (left->file && right->file)
{
r = strcmp (left->file->name, right->file->name);
+
if (r)
- {
- return r;
- }
+ return r;
if (left->line_num != right->line_num)
- {
- return left->line_num - right->line_num;
- }
+ return left->line_num - right->line_num;
}
if (left->addr < right->addr)
- {
- return -1;
- }
+ return -1;
else if (left->addr > right->addr)
- {
- return 1;
- }
+ return 1;
else
- {
- return 0;
- }
+ return 0;
}
-/*
- * Helper for sorting. Order basic blocks in decreasing number of
- * calls, ties are broken in increasing order of line numbers.
- */
+/* Helper for sorting. Order basic blocks in decreasing number of
+ calls, ties are broken in increasing order of line numbers. */
static int
DEFUN (cmp_ncalls, (lp, rp), const void *lp AND const void *rp)
{
@@ -82,13 +84,9 @@ DEFUN (cmp_ncalls, (lp, rp), const void *lp AND const void *rp)
const Sym *right = *(const Sym **) rp;
if (!left)
- {
- return 1;
- }
+ return 1;
else if (!right)
- {
- return -1;
- }
+ return -1;
if (left->ncalls < right->ncalls)
return 1;
@@ -98,10 +96,7 @@ DEFUN (cmp_ncalls, (lp, rp), const void *lp AND const void *rp)
return left->line_num - right->line_num;
}
-
-/*
- * Skip over variable length string.
- */
+/* Skip over variable length string. */
static void
DEFUN (fskip_string, (fp), FILE * fp)
{
@@ -110,46 +105,39 @@ DEFUN (fskip_string, (fp), FILE * fp)
while ((ch = fgetc (fp)) != EOF)
{
if (ch == '\0')
- {
- break;
- }
+ break;
}
}
+/* Read a basic-block record from file IFP. FILENAME is the name
+ of file IFP and is provided for formatting error-messages only. */
-/*
- * Read a basic-block record from file IFP. FILENAME is the name
- * of file IFP and is provided for formatting error-messages only.
- */
void
DEFUN (bb_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
{
int nblocks, b;
- bfd_vma addr;
- unsigned long ncalls;
+ bfd_vma addr, ncalls;
Sym *sym;
- if (fread (&nblocks, sizeof (nblocks), 1, ifp) != 1)
+ if (gmon_io_read_32 (ifp, &nblocks))
{
- fprintf (stderr, _("%s: %s: unexpected end of file\n"), whoami, filename);
+ fprintf (stderr, _("%s: %s: unexpected end of file\n"),
+ whoami, filename);
done (1);
}
nblocks = bfd_get_32 (core_bfd, (bfd_byte *) & nblocks);
if (gmon_file_version == 0)
- {
- fskip_string (ifp);
- }
+ fskip_string (ifp);
for (b = 0; b < nblocks; ++b)
{
if (gmon_file_version == 0)
{
int line_num;
- /*
- * Version 0 had lots of extra stuff that we don't
- * care about anymore.
- */
+
+ /* Version 0 had lots of extra stuff that we don't
+ care about anymore. */
if ((fread (&ncalls, sizeof (ncalls), 1, ifp) != 1)
|| (fread (&addr, sizeof (addr), 1, ifp) != 1)
|| (fskip_string (ifp), FALSE)
@@ -160,28 +148,17 @@ DEFUN (bb_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
done (1);
}
}
- else
+ else if (gmon_io_read_vma (ifp, &addr)
+ || gmon_io_read_vma (ifp, &ncalls))
{
- if (fread (&addr, sizeof (addr), 1, ifp) != 1
- || fread (&ncalls, sizeof (ncalls), 1, ifp) != 1)
- {
- perror (filename);
- done (1);
- }
+ perror (filename);
+ done (1);
}
- /*
- * Basic-block execution counts are meaningful only if we're
- * profiling at the line-by-line level:
- */
+ /* Basic-block execution counts are meaningful only if we're
+ profiling at the line-by-line level: */
if (line_granularity)
{
-
- /* convert from target to host endianness: */
-
- addr = get_vma (core_bfd, (bfd_byte *) & addr);
- ncalls = bfd_get_32 (core_bfd, (bfd_byte *) &ncalls);
-
sym = sym_lookup (&symtab, addr);
if (sym)
@@ -191,7 +168,7 @@ DEFUN (bb_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
DBG (BBDEBUG,
printf ("[bb_read_rec] 0x%lx->0x%lx (%s:%d) cnt=%lu\n",
(unsigned long) addr, (unsigned long) sym->addr,
- sym->name, sym->line_num, ncalls));
+ sym->name, sym->line_num, (unsigned long) ncalls));
for (i = 0; i < NBBS; i++)
{
@@ -212,7 +189,7 @@ DEFUN (bb_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
{
user_warned = TRUE;
fprintf (stderr,
- _("%s: warning: ignoring basic-block exec counts (use -l or --line)\n"),
+ _("%s: warning: ignoring basic-block exec counts (use -l or --line)\n"),
whoami);
}
}
@@ -220,24 +197,17 @@ DEFUN (bb_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
return;
}
-
-/*
- * Write all basic-blocks with non-zero counts to file OFP. FILENAME
- * is the name of OFP and is provided for producing error-messages
- * only.
- */
+/* Write all basic-blocks with non-zero counts to file OFP. FILENAME
+ is the name of OFP and is provided for producing error-messages
+ only. */
void
DEFUN (bb_write_blocks, (ofp, filename), FILE * ofp AND const char *filename)
{
- const unsigned char tag = GMON_TAG_BB_COUNT;
int nblocks = 0;
- bfd_vma addr;
- unsigned long ncalls;
Sym *sym;
int i;
- /* count how many non-zero blocks with have: */
-
+ /* Count how many non-zero blocks with have: */
for (sym = symtab.base; sym < symtab.limit; ++sym)
{
for (i = 0; i < NBBS && sym->bb_addr[i]; i++)
@@ -245,25 +215,21 @@ DEFUN (bb_write_blocks, (ofp, filename), FILE * ofp AND const char *filename)
nblocks += i;
}
- /* write header: */
- bfd_put_32 (core_bfd, nblocks, (bfd_byte *) & nblocks);
- if (fwrite (&tag, sizeof (tag), 1, ofp) != 1
- || fwrite (&nblocks, sizeof (nblocks), 1, ofp) != 1)
+ /* Write header: */
+ if (gmon_io_write_8 (ofp, GMON_TAG_BB_COUNT)
+ || gmon_io_write_32 (ofp, nblocks))
{
perror (filename);
done (1);
}
- /* write counts: */
+ /* Write counts: */
for (sym = symtab.base; sym < symtab.limit; ++sym)
{
for (i = 0; i < NBBS && sym->bb_addr[i]; i++)
{
- put_vma (core_bfd, sym->bb_addr[i], (bfd_byte *) & addr);
- bfd_put_32 (core_bfd, sym->bb_calls[i], (bfd_byte *) & ncalls);
-
- if (fwrite (&addr, sizeof (addr), 1, ofp) != 1
- || fwrite (&ncalls, sizeof (ncalls), 1, ofp) != 1)
+ if (gmon_io_write_vma (ofp, sym->bb_addr[i])
+ || gmon_io_write_vma (ofp, sym->bb_calls[i]))
{
perror (filename);
done (1);
@@ -272,13 +238,11 @@ DEFUN (bb_write_blocks, (ofp, filename), FILE * ofp AND const char *filename)
}
}
+/* Output basic-block statistics in a format that is easily parseable.
+ Current the format is:
+
+ <filename>:<line-number>: (<function-name>:<bb-addr): <ncalls> */
-/*
- * Output basic-block statistics in a format that is easily parseable.
- * Current the format is:
- *
- * <filename>:<line-number>: (<function-name>:<bb-addr): <ncalls>
- */
void
DEFUN_VOID (print_exec_counts)
{
@@ -286,25 +250,19 @@ DEFUN_VOID (print_exec_counts)
int i, j, len;
if (first_output)
- {
- first_output = FALSE;
- }
+ first_output = FALSE;
else
- {
- printf ("\f\n");
- }
-
- /* sort basic-blocks according to function name and line number: */
+ printf ("\f\n");
+ /* Sort basic-blocks according to function name and line number: */
sorted_bbs = (Sym **) xmalloc (symtab.len * sizeof (sorted_bbs[0]));
len = 0;
+
for (sym = symtab.base; sym < symtab.limit; ++sym)
{
- /*
- * Accept symbol if it's in the INCL_EXEC table
- * or there is no INCL_EXEC table
- * and it does not appear in the EXCL_EXEC table.
- */
+ /* Accept symbol if it's in the INCL_EXEC table
+ or there is no INCL_EXEC table
+ and it does not appear in the EXCL_EXEC table. */
if (sym_lookup (&syms[INCL_EXEC], sym->addr)
|| (syms[INCL_EXEC].len == 0
&& !sym_lookup (&syms[EXCL_EXEC], sym->addr)))
@@ -312,9 +270,10 @@ DEFUN_VOID (print_exec_counts)
sorted_bbs[len++] = sym;
}
}
+
qsort (sorted_bbs, len, sizeof (sorted_bbs[0]), cmp_bb);
- /* output basic-blocks: */
+ /* Output basic-blocks: */
for (i = 0; i < len; ++i)
{
@@ -325,6 +284,7 @@ DEFUN_VOID (print_exec_counts)
sym->file ? sym->file->name : _("<unknown>"), sym->line_num,
sym->name, (unsigned long) sym->addr, sym->ncalls);
}
+
for (j = 0; j < NBBS && sym->bb_addr[j]; j ++)
{
if (sym->bb_calls[j] > 0 || ! ignore_zeros)
@@ -340,17 +300,15 @@ DEFUN_VOID (print_exec_counts)
free (sorted_bbs);
}
-/*
- * Helper for bb_annotated_source: format annotation containing
- * number of line executions. Depends on being called on each
- * line of a file in sequential order.
- *
- * Global variable bb_annotate_all_lines enables execution count
- * compression (counts are supressed if identical to the last one)
- * and prints counts on all executed lines. Otherwise, print
- * all basic-block execution counts exactly once on the line
- * that starts the basic-block.
- */
+/* Helper for bb_annotated_source: format annotation containing
+ number of line executions. Depends on being called on each
+ line of a file in sequential order.
+
+ Global variable bb_annotate_all_lines enables execution count
+ compression (counts are supressed if identical to the last one)
+ and prints counts on all executed lines. Otherwise, print
+ all basic-block execution counts exactly once on the line
+ that starts the basic-block. */
static void
DEFUN (annotate_with_count, (buf, width, line_num, arg),
@@ -363,10 +321,10 @@ DEFUN (annotate_with_count, (buf, width, line_num, arg),
unsigned long last_print = (unsigned long) -1;
b = NULL;
+
if (line_num <= sf->num_lines)
- {
- b = sf->line[line_num - 1];
- }
+ b = sf->line[line_num - 1];
+
if (!b)
{
for (i = 0; i < width; i++)
@@ -390,13 +348,11 @@ DEFUN (annotate_with_count, (buf, width, line_num, arg),
ncalls_set = 0;
/* If this is a function entry point, label the line no matter what.
- * Otherwise, we're in the middle of a function, so check to see
- * if the first basic-block address is larger than the starting
- * address of the line. If so, then this line begins with a
- * a portion of the previous basic-block, so print that prior
- * execution count (if bb_annotate_all_lines is set).
- */
-
+ Otherwise, we're in the middle of a function, so check to see
+ if the first basic-block address is larger than the starting
+ address of the line. If so, then this line begins with a
+ a portion of the previous basic-block, so print that prior
+ execution count (if bb_annotate_all_lines is set). */
if (b->is_func)
{
sprintf (p, "%lu", b->ncalls);
@@ -417,9 +373,8 @@ DEFUN (annotate_with_count, (buf, width, line_num, arg),
}
/* Loop through all of this line's basic-blocks. For each one,
- * update last_count, then compress sequential identical counts
- * (if bb_annotate_all_lines) and print the execution count.
- */
+ update last_count, then compress sequential identical counts
+ (if bb_annotate_all_lines) and print the execution count. */
for (i = 0; i < NBBS && b->bb_addr[i]; i++)
{
@@ -432,9 +387,7 @@ DEFUN (annotate_with_count, (buf, width, line_num, arg),
ncalls += last_count;
if (bb_annotate_all_lines && last_count == last_print)
- {
- continue;
- }
+ continue;
if (p > tmpbuf)
*p++ = ',';
@@ -445,11 +398,10 @@ DEFUN (annotate_with_count, (buf, width, line_num, arg),
}
/* We're done. If nothing has been printed on this line,
- * print the last execution count (bb_annotate_all_lines),
- * which could be from either a previous line (if there were
- * no BBs on this line), or from this line (if all our BB
- * counts were compressed out because they were identical).
- */
+ print the last execution count (bb_annotate_all_lines),
+ which could be from either a previous line (if there were
+ no BBs on this line), or from this line (if all our BB
+ counts were compressed out because they were identical). */
if (bb_annotate_all_lines && p == tmpbuf)
{
@@ -497,11 +449,10 @@ DEFUN (annotate_with_count, (buf, width, line_num, arg),
}
}
-/*
- * Annotate the files named in SOURCE_FILES with basic-block statistics
- * (execution counts). After each source files, a few statistics
- * regarding that source file are printed.
- */
+/* Annotate the files named in SOURCE_FILES with basic-block statistics
+ (execution counts). After each source files, a few statistics
+ regarding that source file are printed. */
+
void
DEFUN_VOID (print_annotated_source)
{
@@ -510,18 +461,14 @@ DEFUN_VOID (print_annotated_source)
int i, table_len;
FILE *ofp;
- /*
- * Find maximum line number for each source file that user is
- * interested in:
- */
+ /* Find maximum line number for each source file that user is
+ interested in: */
for (sym = symtab.base; sym < symtab.limit; ++sym)
{
- /*
- * Accept symbol if it's file is known, its line number is
- * bigger than anything we have seen for that file so far and
- * if it's in the INCL_ANNO table or there is no INCL_ANNO
- * table and it does not appear in the EXCL_ANNO table.
- */
+ /* Accept symbol if it's file is known, its line number is
+ bigger than anything we have seen for that file so far and
+ if it's in the INCL_ANNO table or there is no INCL_ANNO
+ table and it does not appear in the EXCL_ANNO table. */
if (sym->file && sym->line_num > sym->file->num_lines
&& (sym_lookup (&syms[INCL_ANNO], sym->addr)
|| (syms[INCL_ANNO].len == 0
@@ -531,8 +478,7 @@ DEFUN_VOID (print_annotated_source)
}
}
- /* allocate line descriptors: */
-
+ /* Allocate line descriptors: */
for (sf = first_src_file; sf; sf = sf->next)
{
if (sf->num_lines > 0)
@@ -542,8 +488,7 @@ DEFUN_VOID (print_annotated_source)
}
}
- /* count executions per line: */
-
+ /* Count executions per line: */
for (sym = symtab.base; sym < symtab.limit; ++sym)
{
if (sym->file && sym->file->num_lines
@@ -553,19 +498,20 @@ DEFUN_VOID (print_annotated_source)
{
sym->file->ncalls += sym->ncalls;
line_stats = sym->file->line[sym->line_num - 1];
+
if (!line_stats)
{
- /* common case has at most one basic-block per source line: */
+ /* Common case has at most one basic-block per source line: */
sym->file->line[sym->line_num - 1] = sym;
}
else if (!line_stats->addr)
{
- /* sym is the 3rd .. nth basic block for this line: */
+ /* sym is the 3rd .. nth basic block for this line: */
line_stats->ncalls += sym->ncalls;
}
else
{
- /* sym is the second basic block for this line */
+ /* sym is the second basic block for this line. */
new_line = (Sym *) xmalloc (sizeof (*new_line));
*new_line = *line_stats;
new_line->addr = 0;
@@ -575,41 +521,37 @@ DEFUN_VOID (print_annotated_source)
}
}
- /* plod over source files, annotating them: */
-
+ /* Plod over source files, annotating them: */
for (sf = first_src_file; sf; sf = sf->next)
{
if (!sf->num_lines || (ignore_zeros && sf->ncalls == 0))
- {
- continue;
- }
+ continue;
num_executable_lines = num_lines_executed = 0;
+
ofp = annotate_source (sf, 16, annotate_with_count, sf);
if (!ofp)
- {
- continue;
- }
+ continue;
if (bb_table_length > 0)
{
fprintf (ofp, _("\n\nTop %d Lines:\n\n Line Count\n\n"),
bb_table_length);
- /* abuse line arrays---it's not needed anymore: */
+ /* Abuse line arrays---it's not needed anymore: */
qsort (sf->line, sf->num_lines, sizeof (sf->line[0]), cmp_ncalls);
table_len = bb_table_length;
+
if (table_len > sf->num_lines)
- {
- table_len = sf->num_lines;
- }
+ table_len = sf->num_lines;
+
for (i = 0; i < table_len; ++i)
{
sym = sf->line[i];
+
if (!sym || sym->ncalls == 0)
- {
break;
- }
+
fprintf (ofp, "%9d %10lu\n", sym->line_num, sym->ncalls);
}
}
@@ -631,9 +573,8 @@ DEFUN_VOID (print_annotated_source)
num_executable_lines
? (double) sf->ncalls / (double) num_executable_lines
: 0.0);
+
if (ofp != stdout)
- {
- fclose (ofp);
- }
+ fclose (ofp);
}
}
diff --git a/gnu/usr.bin/binutils/gprof/basic_blocks.h b/gnu/usr.bin/binutils/gprof/basic_blocks.h
index 923eca11f73..3e85bc2d6bc 100644
--- a/gnu/usr.bin/binutils/gprof/basic_blocks.h
+++ b/gnu/usr.bin/binutils/gprof/basic_blocks.h
@@ -1,3 +1,22 @@
+/* basic_blocks.h
+ Copyright 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
#ifndef basic_blocks_h
#define basic_blocks_h
@@ -6,18 +25,14 @@
#include "source.h"
#include "symtab.h"
-/*
- * Options:
- */
-extern bool bb_annotate_all_lines; /* force annotation of all lines? */
-extern int bb_table_length; /* length of most-used bb table */
-extern unsigned long bb_min_calls; /* minimum execution count */
-
-extern void bb_read_rec PARAMS ((FILE * ifp, const char *filename));
-extern void bb_write_blocks PARAMS ((FILE * ofp, const char *filename));
-extern void bb_create_syms PARAMS ((void));
-
-extern void print_annotated_source PARAMS ((void));
-extern void print_exec_counts PARAMS ((void));
+/* Options: */
+extern bool bb_annotate_all_lines; /* Force annotation of all lines? */
+extern int bb_table_length; /* Length of most-used bb table. */
+extern unsigned long bb_min_calls; /* Minimum execution count. */
+extern void bb_read_rec PARAMS ((FILE *, const char *));
+extern void bb_write_blocks PARAMS ((FILE *, const char *));
+extern void bb_create_syms PARAMS ((void));
+extern void print_annotated_source PARAMS ((void));
+extern void print_exec_counts PARAMS ((void));
#endif /* basic_blocks_h */
diff --git a/gnu/usr.bin/binutils/gprof/call_graph.c b/gnu/usr.bin/binutils/gprof/call_graph.c
index 6eee251ff08..a09938d103b 100644
--- a/gnu/usr.bin/binutils/gprof/call_graph.c
+++ b/gnu/usr.bin/binutils/gprof/call_graph.c
@@ -1,3 +1,24 @@
+/* call_graph.c - Create call graphs.
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include "cg_arcs.h"
#include "call_graph.h"
#include "corefile.h"
@@ -25,20 +46,17 @@ DEFUN (cg_tally, (from_pc, self_pc, count),
line number in the calling routing, but the child should always
point to a function entry point, so we back up in the symbol
table until we find it.
-
+
For normal profiling, is_func will be set on all symbols, so this
code will do nothing. */
-
while (child >= symtab.base && ! child->is_func)
--child;
if (child < symtab.base)
return;
- /*
- * Keep arc if it is on INCL_ARCS table or if the INCL_ARCS table
- * is empty and it is not in the EXCL_ARCS table.
- */
+ /* Keep arc if it is on INCL_ARCS table or if the INCL_ARCS table
+ is empty and it is not in the EXCL_ARCS table. */
if (sym_id_arc_is_present (&syms[INCL_ARCS], parent, child)
|| (syms[INCL_ARCS].len == 0
&& !sym_id_arc_is_present (&syms[EXCL_ARCS], parent, child)))
@@ -51,47 +69,41 @@ DEFUN (cg_tally, (from_pc, self_pc, count),
}
}
+/* Read a record from file IFP describing an arc in the function
+ call-graph and the count of how many times the arc has been
+ traversed. FILENAME is the name of file IFP and is provided
+ for formatting error-messages only. */
-/*
- * Read a record from file IFP describing an arc in the function
- * call-graph and the count of how many times the arc has been
- * traversed. FILENAME is the name of file IFP and is provided
- * for formatting error-messages only.
- */
void
DEFUN (cg_read_rec, (ifp, filename), FILE * ifp AND CONST char *filename)
{
bfd_vma from_pc, self_pc;
- struct gmon_cg_arc_record arc;
- unsigned long count;
+ unsigned int count;
- if (fread (&arc, sizeof (arc), 1, ifp) != 1)
+ if (gmon_io_read_vma (ifp, &from_pc)
+ || gmon_io_read_vma (ifp, &self_pc)
+ || gmon_io_read_32 (ifp, &count))
{
fprintf (stderr, _("%s: %s: unexpected end of file\n"),
whoami, filename);
done (1);
}
- from_pc = get_vma (core_bfd, (bfd_byte *) arc.from_pc);
- self_pc = get_vma (core_bfd, (bfd_byte *) arc.self_pc);
- count = bfd_get_32 (core_bfd, (bfd_byte *) arc.count);
+
DBG (SAMPLEDEBUG,
printf ("[cg_read_rec] frompc 0x%lx selfpc 0x%lx count %lu\n",
- (unsigned long) from_pc, (unsigned long) self_pc, count));
- /* add this arc: */
+ (unsigned long) from_pc, (unsigned long) self_pc,
+ (unsigned long) count));
+ /* Add this arc: */
cg_tally (from_pc, self_pc, count);
}
+/* Write all the arcs in the call-graph to file OFP. FILENAME is
+ the name of OFP and is provided for formatting error-messages
+ only. */
-/*
- * Write all the arcs in the call-graph to file OFP. FILENAME is
- * the name of OFP and is provided for formatting error-messages
- * only.
- */
void
DEFUN (cg_write_arcs, (ofp, filename), FILE * ofp AND const char *filename)
{
- const unsigned char tag = GMON_TAG_CG_ARC;
- struct gmon_cg_arc_record raw_arc;
Arc *arc;
Sym *sym;
@@ -99,11 +111,10 @@ DEFUN (cg_write_arcs, (ofp, filename), FILE * ofp AND const char *filename)
{
for (arc = sym->cg.children; arc; arc = arc->next_child)
{
- put_vma (core_bfd, arc->parent->addr, (bfd_byte *) raw_arc.from_pc);
- put_vma (core_bfd, arc->child->addr, (bfd_byte *) raw_arc.self_pc);
- bfd_put_32 (core_bfd, arc->count, (bfd_byte *) raw_arc.count);
- if (fwrite (&tag, sizeof (tag), 1, ofp) != 1
- || fwrite (&raw_arc, sizeof (raw_arc), 1, ofp) != 1)
+ if (gmon_io_write_8 (ofp, GMON_TAG_CG_ARC)
+ || gmon_io_write_vma (ofp, arc->parent->addr)
+ || gmon_io_write_vma (ofp, arc->child->addr)
+ || gmon_io_write_32 (ofp, arc->count))
{
perror (filename);
done (1);
diff --git a/gnu/usr.bin/binutils/gprof/call_graph.h b/gnu/usr.bin/binutils/gprof/call_graph.h
index be5139b758f..ffa269df96a 100644
--- a/gnu/usr.bin/binutils/gprof/call_graph.h
+++ b/gnu/usr.bin/binutils/gprof/call_graph.h
@@ -1,3 +1,23 @@
+/* call_graph.h
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
#ifndef call_graph_h
#define call_graph_h
@@ -5,9 +25,8 @@
#include "gprof.h"
#include "symtab.h"
-extern void cg_tally PARAMS ((bfd_vma from_pc, bfd_vma self_pc,
- unsigned long count));
-extern void cg_read_rec PARAMS ((FILE * ifp, const char *filename));
-extern void cg_write_arcs PARAMS ((FILE * ofp, const char *filename));
+extern void cg_tally PARAMS ((bfd_vma, bfd_vma, unsigned long));
+extern void cg_read_rec PARAMS ((FILE *, const char *));
+extern void cg_write_arcs PARAMS ((FILE *, const char *));
#endif /* call_graph_h */
diff --git a/gnu/usr.bin/binutils/gprof/cg_arcs.c b/gnu/usr.bin/binutils/gprof/cg_arcs.c
index 07023170ded..7ea048b0694 100644
--- a/gnu/usr.bin/binutils/gprof/cg_arcs.c
+++ b/gnu/usr.bin/binutils/gprof/cg_arcs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1983 Regents of the University of California.
+ * Copyright (c) 1983, 2001 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@@ -102,7 +102,7 @@ DEFUN (arc_add, (parent, child, count),
if (maxarcs == 0)
maxarcs = 1;
maxarcs *= 2;
-
+
/* Allocate the new array. */
newarcs = (Arc **)xmalloc(sizeof (Arc *) * maxarcs);
diff --git a/gnu/usr.bin/binutils/gprof/cg_print.c b/gnu/usr.bin/binutils/gprof/cg_print.c
index e645bc7f82f..0a80cca85b7 100644
--- a/gnu/usr.bin/binutils/gprof/cg_print.c
+++ b/gnu/usr.bin/binutils/gprof/cg_print.c
@@ -1,12 +1,31 @@
+/* cg_print.c - Print routines for displaying call graphs.
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include "libiberty.h"
#include "cg_arcs.h"
#include "cg_print.h"
#include "hist.h"
#include "utils.h"
-/*
- * Return value of comparison functions used to sort tables:
- */
+/* Return value of comparison functions used to sort tables. */
#define LESSTHAN -1
#define EQUALTO 0
#define GREATERTHAN 1
@@ -14,7 +33,7 @@
static void order_and_dump_functions_by_arcs PARAMS ((Arc **, unsigned long,
int, Arc **,
unsigned long *));
-/* declarations of automatically generated functions to output blurbs: */
+/* Declarations of automatically generated functions to output blurbs. */
extern void bsd_callg_blurb PARAMS ((FILE * fp));
extern void fsf_callg_blurb PARAMS ((FILE * fp));
@@ -25,39 +44,32 @@ static void
DEFUN_VOID (print_header)
{
if (first_output)
- {
- first_output = FALSE;
- }
+ first_output = FALSE;
else
- {
- printf ("\f\n");
- }
+ printf ("\f\n");
+
if (!bsd_style_output)
{
if (print_descriptions)
- {
- printf (_("\t\t Call graph (explanation follows)\n\n"));
- }
+ printf (_("\t\t Call graph (explanation follows)\n\n"));
else
- {
- printf (_("\t\t\tCall graph\n\n"));
- }
+ printf (_("\t\t\tCall graph\n\n"));
}
+
printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
(long) hist_scale * sizeof (UNIT));
+
if (print_time > 0.0)
- {
- printf (_(" for %.2f%% of %.2f seconds\n\n"),
- 100.0 / print_time, print_time / hz);
- }
+ printf (_(" for %.2f%% of %.2f seconds\n\n"),
+ 100.0 / print_time, print_time / hz);
else
{
printf (_(" no time propagated\n\n"));
- /*
- * This doesn't hurt, since all the numerators will be 0.0:
- */
+
+ /* This doesn't hurt, since all the numerators will be 0.0. */
print_time = 1.0;
}
+
if (bsd_style_output)
{
printf ("%6.6s %5.5s %7.7s %11.11s %7.7s/%-7.7s %-8.8s\n",
@@ -75,10 +87,8 @@ DEFUN_VOID (print_header)
}
}
+/* Print a cycle header. */
-/*
- * Print a cycle header.
- */
static void
DEFUN (print_cycle, (cyc), Sym * cyc)
{
@@ -90,22 +100,18 @@ DEFUN (print_cycle, (cyc), Sym * cyc)
: "%-6.6s %5.1f %7.2f %7.2f %7lu", buf,
100 * (cyc->cg.prop.self + cyc->cg.prop.child) / print_time,
cyc->cg.prop.self / hz, cyc->cg.prop.child / hz, cyc->ncalls);
+
if (cyc->cg.self_calls != 0)
- {
- printf ("+%-7lu", cyc->cg.self_calls);
- }
+ printf ("+%-7lu", cyc->cg.self_calls);
else
- {
- printf (" %7.7s", "");
- }
+ printf (" %7.7s", "");
+
printf (_(" <cycle %d as a whole> [%d]\n"), cyc->cg.cyc.num, cyc->cg.index);
}
+/* Compare LEFT and RIGHT membmer. Major comparison key is
+ CG.PROP.SELF+CG.PROP.CHILD, secondary key is NCALLS+CG.SELF_CALLS. */
-/*
- * Compare LEFT and RIGHT membmer. Major comparison key is
- * CG.PROP.SELF+CG.PROP.CHILD, secondary key is NCALLS+CG.SELF_CALLS.
- */
static int
DEFUN (cmp_member, (left, right), Sym * left AND Sym * right)
{
@@ -115,64 +121,56 @@ DEFUN (cmp_member, (left, right), Sym * left AND Sym * right)
unsigned long right_calls = right->ncalls + right->cg.self_calls;
if (left_time > right_time)
- {
- return GREATERTHAN;
- }
+ return GREATERTHAN;
+
if (left_time < right_time)
- {
- return LESSTHAN;
- }
+ return LESSTHAN;
if (left_calls > right_calls)
- {
- return GREATERTHAN;
- }
+ return GREATERTHAN;
+
if (left_calls < right_calls)
- {
- return LESSTHAN;
- }
+ return LESSTHAN;
+
return EQUALTO;
}
+/* Sort members of a cycle. */
-/*
- * Sort members of a cycle.
- */
static void
DEFUN (sort_members, (cyc), Sym * cyc)
{
Sym *todo, *doing, *prev;
- /*
- * Detach cycle members from cyclehead, and insertion sort them
- * back on.
- */
+
+ /* Detach cycle members from cyclehead,
+ and insertion sort them back on. */
todo = cyc->cg.cyc.next;
cyc->cg.cyc.next = 0;
+
for (doing = todo; doing && doing->cg.cyc.next; doing = todo)
{
todo = doing->cg.cyc.next;
+
for (prev = cyc; prev->cg.cyc.next; prev = prev->cg.cyc.next)
{
if (cmp_member (doing, prev->cg.cyc.next) == GREATERTHAN)
- {
- break;
- }
+ break;
}
+
doing->cg.cyc.next = prev->cg.cyc.next;
prev->cg.cyc.next = doing;
}
}
+/* Print the members of a cycle. */
-/*
- * Print the members of a cycle.
- */
static void
DEFUN (print_members, (cyc), Sym * cyc)
{
Sym *member;
sort_members (cyc);
+
for (member = cyc->cg.cyc.next; member; member = member->cg.cyc.next)
{
printf (bsd_style_output
@@ -180,30 +178,26 @@ DEFUN (print_members, (cyc), Sym * cyc)
: "%6.6s %5.5s %7.2f %7.2f %7lu",
"", "", member->cg.prop.self / hz, member->cg.prop.child / hz,
member->ncalls);
+
if (member->cg.self_calls != 0)
- {
- printf ("+%-7lu", member->cg.self_calls);
- }
+ printf ("+%-7lu", member->cg.self_calls);
else
- {
- printf (" %7.7s", "");
- }
+ printf (" %7.7s", "");
+
printf (" ");
print_name (member);
printf ("\n");
}
}
+/* Compare two arcs to/from the same child/parent.
+ - if one arc is a self arc, it's least.
+ - if one arc is within a cycle, it's less than.
+ - if both arcs are within a cycle, compare arc counts.
+ - if neither arc is within a cycle, compare with
+ time + child_time as major key
+ arc count as minor key. */
-/*
- * Compare two arcs to/from the same child/parent.
- * - if one arc is a self arc, it's least.
- * - if one arc is within a cycle, it's less than.
- * - if both arcs are within a cycle, compare arc counts.
- * - if neither arc is within a cycle, compare with
- * time + child_time as major key
- * arc count as minor key
- */
static int
DEFUN (cmp_arc, (left, right), Arc * left AND Arc * right)
{
@@ -228,69 +222,62 @@ DEFUN (cmp_arc, (left, right), Arc * left AND Arc * right)
right->count, right_child->ncalls);
printf ("\n");
);
+
if (left_parent == left_child)
- {
- return LESSTHAN; /* left is a self call */
- }
+ return LESSTHAN; /* Left is a self call. */
+
if (right_parent == right_child)
- {
- return GREATERTHAN; /* right is a self call */
- }
+ return GREATERTHAN; /* Right is a self call. */
if (left_parent->cg.cyc.num != 0 && left_child->cg.cyc.num != 0
&& left_parent->cg.cyc.num == left_child->cg.cyc.num)
{
- /* left is a call within a cycle */
+ /* Left is a call within a cycle. */
if (right_parent->cg.cyc.num != 0 && right_child->cg.cyc.num != 0
&& right_parent->cg.cyc.num == right_child->cg.cyc.num)
{
- /* right is a call within the cycle, too */
+ /* Right is a call within the cycle, too. */
if (left->count < right->count)
- {
- return LESSTHAN;
- }
+ return LESSTHAN;
+
if (left->count > right->count)
- {
- return GREATERTHAN;
- }
+ return GREATERTHAN;
+
return EQUALTO;
}
else
{
- /* right isn't a call within the cycle */
+ /* Right isn't a call within the cycle. */
return LESSTHAN;
}
}
else
{
- /* left isn't a call within a cycle */
+ /* Left isn't a call within a cycle. */
if (right_parent->cg.cyc.num != 0 && right_child->cg.cyc.num != 0
&& right_parent->cg.cyc.num == right_child->cg.cyc.num)
{
- /* right is a call within a cycle */
+ /* Right is a call within a cycle. */
return GREATERTHAN;
}
else
{
- /* neither is a call within a cycle */
+ /* Neither is a call within a cycle. */
left_time = left->time + left->child_time;
right_time = right->time + right->child_time;
+
if (left_time < right_time)
- {
- return LESSTHAN;
- }
+ return LESSTHAN;
+
if (left_time > right_time)
- {
- return GREATERTHAN;
- }
+ return GREATERTHAN;
+
if (left->count < right->count)
- {
- return LESSTHAN;
- }
+ return LESSTHAN;
+
if (left->count > right->count)
- {
- return GREATERTHAN;
- }
+ return GREATERTHAN;
+
return EQUALTO;
}
}
@@ -302,32 +289,30 @@ DEFUN (sort_parents, (child), Sym * child)
{
Arc *arc, *detached, sorted, *prev;
- /*
- * Unlink parents from child, then insertion sort back on to
- * sorted's parents.
- * *arc the arc you have detached and are inserting.
- * *detached the rest of the arcs to be sorted.
- * sorted arc list onto which you insertion sort.
- * *prev arc before the arc you are comparing.
- */
+ /* Unlink parents from child, then insertion sort back on to
+ sorted's parents.
+ *arc the arc you have detached and are inserting.
+ *detached the rest of the arcs to be sorted.
+ sorted arc list onto which you insertion sort.
+ *prev arc before the arc you are comparing. */
sorted.next_parent = 0;
+
for (arc = child->cg.parents; arc; arc = detached)
{
detached = arc->next_parent;
- /* consider *arc as disconnected; insert it into sorted: */
+ /* Consider *arc as disconnected; insert it into sorted. */
for (prev = &sorted; prev->next_parent; prev = prev->next_parent)
{
if (cmp_arc (arc, prev->next_parent) != GREATERTHAN)
- {
- break;
- }
+ break;
}
+
arc->next_parent = prev->next_parent;
prev->next_parent = arc;
}
- /* reattach sorted arcs to child: */
+ /* Reattach sorted arcs to child. */
child->cg.parents = sorted.next_parent;
}
@@ -340,13 +325,10 @@ DEFUN (print_parents, (child), Sym * child)
Sym *cycle_head;
if (child->cg.cyc.head != 0)
- {
- cycle_head = child->cg.cyc.head;
- }
+ cycle_head = child->cg.cyc.head;
else
- {
- cycle_head = child;
- }
+ cycle_head = child;
+
if (!child->cg.parents)
{
printf (bsd_style_output
@@ -355,14 +337,16 @@ DEFUN (print_parents, (child), Sym * child)
"", "", "", "", "", "");
return;
}
+
sort_parents (child);
+
for (arc = child->cg.parents; arc; arc = arc->next_parent)
{
parent = arc->parent;
if (child == parent || (child->cg.cyc.num != 0
&& parent->cg.cyc.num == child->cg.cyc.num))
{
- /* selfcall or call among siblings: */
+ /* Selfcall or call among siblings. */
printf (bsd_style_output
? "%6.6s %5.5s %7.7s %11.11s %7lu %7.7s "
: "%6.6s %5.5s %7.7s %7.7s %7lu %7.7s ",
@@ -373,7 +357,7 @@ DEFUN (print_parents, (child), Sym * child)
}
else
{
- /* regular parent of child: */
+ /* Regular parent of child. */
printf (bsd_style_output
? "%6.6s %5.5s %7.2f %11.2f %7lu/%-7lu "
: "%6.6s %5.5s %7.2f %7.2f %7lu/%-7lu ",
@@ -391,32 +375,31 @@ static void
DEFUN (sort_children, (parent), Sym * parent)
{
Arc *arc, *detached, sorted, *prev;
- /*
- * Unlink children from parent, then insertion sort back on to
- * sorted's children.
- * *arc the arc you have detached and are inserting.
- * *detached the rest of the arcs to be sorted.
- * sorted arc list onto which you insertion sort.
- * *prev arc before the arc you are comparing.
- */
+
+ /* Unlink children from parent, then insertion sort back on to
+ sorted's children.
+ *arc the arc you have detached and are inserting.
+ *detached the rest of the arcs to be sorted.
+ sorted arc list onto which you insertion sort.
+ *prev arc before the arc you are comparing. */
sorted.next_child = 0;
+
for (arc = parent->cg.children; arc; arc = detached)
{
detached = arc->next_child;
- /* consider *arc as disconnected; insert it into sorted: */
+ /* Consider *arc as disconnected; insert it into sorted. */
for (prev = &sorted; prev->next_child; prev = prev->next_child)
{
if (cmp_arc (arc, prev->next_child) != LESSTHAN)
- {
- break;
- }
+ break;
}
+
arc->next_child = prev->next_child;
prev->next_child = arc;
}
- /* reattach sorted children to parent: */
+ /* Reattach sorted children to parent. */
parent->cg.children = sorted.next_child;
}
@@ -429,13 +412,14 @@ DEFUN (print_children, (parent), Sym * parent)
sort_children (parent);
arc = parent->cg.children;
+
for (arc = parent->cg.children; arc; arc = arc->next_child)
{
child = arc->child;
if (child == parent || (child->cg.cyc.num != 0
&& child->cg.cyc.num == parent->cg.cyc.num))
{
- /* self call or call to sibling: */
+ /* Self call or call to sibling. */
printf (bsd_style_output
? "%6.6s %5.5s %7.7s %11.11s %7lu %7.7s "
: "%6.6s %5.5s %7.7s %7.7s %7lu %7.7s ",
@@ -445,7 +429,7 @@ DEFUN (print_children, (parent), Sym * parent)
}
else
{
- /* regular child of parent: */
+ /* Regular child of parent. */
printf (bsd_style_output
? "%6.6s %5.5s %7.2f %11.2f %7lu/%-7lu "
: "%6.6s %5.5s %7.2f %7.2f %7lu/%-7lu ",
@@ -470,30 +454,28 @@ DEFUN (print_line, (np), Sym * np)
: "%-6.6s %5.1f %7.2f %7.2f", buf,
100 * (np->cg.prop.self + np->cg.prop.child) / print_time,
np->cg.prop.self / hz, np->cg.prop.child / hz);
+
if ((np->ncalls + np->cg.self_calls) != 0)
{
printf (" %7lu", np->ncalls);
+
if (np->cg.self_calls != 0)
- {
printf ("+%-7lu ", np->cg.self_calls);
- }
else
- {
printf (" %7.7s ", "");
- }
}
else
{
printf (" %7.7s %7.7s ", "", "");
}
+
print_name (np);
printf ("\n");
}
-/*
- * Print dynamic call graph.
- */
+/* Print dynamic call graph. */
+
void
DEFUN (cg_print, (timesortsym), Sym ** timesortsym)
{
@@ -501,26 +483,24 @@ DEFUN (cg_print, (timesortsym), Sym ** timesortsym)
Sym *parent;
if (print_descriptions && bsd_style_output)
- {
- bsd_callg_blurb (stdout);
- }
+ bsd_callg_blurb (stdout);
print_header ();
for (index = 0; index < symtab.len + num_cycles; ++index)
{
parent = timesortsym[index];
+
if ((ignore_zeros && parent->ncalls == 0
&& parent->cg.self_calls == 0 && parent->cg.prop.self == 0
&& parent->cg.prop.child == 0)
|| !parent->cg.print_flag
|| (line_granularity && ! parent->is_func))
- {
- continue;
- }
+ continue;
+
if (!parent->name && parent->cg.cyc.num != 0)
{
- /* cycle header: */
+ /* Cycle header. */
print_cycle (parent);
print_members (parent);
}
@@ -530,17 +510,20 @@ DEFUN (cg_print, (timesortsym), Sym ** timesortsym)
print_line (parent);
print_children (parent);
}
+
if (bsd_style_output)
printf ("\n");
+
printf ("-----------------------------------------------\n");
+
if (bsd_style_output)
printf ("\n");
}
+
free (timesortsym);
+
if (print_descriptions && !bsd_style_output)
- {
- fsf_callg_blurb (stdout);
- }
+ fsf_callg_blurb (stdout);
}
@@ -563,44 +546,44 @@ DEFUN_VOID (cg_print_index)
Sym **name_sorted_syms, *sym;
const char *filename;
char buf[20];
- int column_width = (output_width - 1) / 3; /* don't write in last col! */
- /*
- * Now, sort regular function name alphabetically to create an
- * index:
- */
+ int column_width = (output_width - 1) / 3; /* Don't write in last col! */
+
+ /* Now, sort regular function name
+ alphabetically to create an index. */
name_sorted_syms = (Sym **) xmalloc ((symtab.len + num_cycles) * sizeof (Sym *));
+
for (index = 0, nnames = 0; index < symtab.len; index++)
{
if (ignore_zeros && symtab.base[index].ncalls == 0
&& symtab.base[index].hist.time == 0)
- {
- continue;
- }
+ continue;
+
name_sorted_syms[nnames++] = &symtab.base[index];
}
+
qsort (name_sorted_syms, nnames, sizeof (Sym *), cmp_name);
+
for (index = 1, todo = nnames; index <= num_cycles; index++)
- {
- name_sorted_syms[todo++] = &cycle_header[index];
- }
+ name_sorted_syms[todo++] = &cycle_header[index];
+
printf ("\f\n");
printf (_("Index by function name\n\n"));
index = (todo + 2) / 3;
+
for (i = 0; i < index; i++)
{
col = 0;
starting_col = 0;
+
for (j = i; j < todo; j += index)
{
sym = name_sorted_syms[j];
+
if (sym->cg.print_flag)
- {
- sprintf (buf, "[%d]", sym->cg.index);
- }
+ sprintf (buf, "[%d]", sym->cg.index);
else
- {
- sprintf (buf, "(%d)", sym->cg.index);
- }
+ sprintf (buf, "(%d)", sym->cg.index);
+
if (j < nnames)
{
if (bsd_style_output)
@@ -610,27 +593,27 @@ DEFUN_VOID (cg_print_index)
else
{
col += strlen (buf);
+
for (; col < starting_col + 5; ++col)
- {
- putchar (' ');
- }
+ putchar (' ');
+
printf (" %s ", buf);
col += print_name_only (sym);
+
if (!line_granularity && sym->is_static && sym->file)
{
filename = sym->file->name;
+
if (!print_path)
{
filename = strrchr (filename, '/');
+
if (filename)
- {
- ++filename;
- }
+ ++filename;
else
- {
- filename = sym->file->name;
- }
+ filename = sym->file->name;
}
+
printf (" (%s)", filename);
col += strlen (filename) + 3;
}
@@ -655,15 +638,19 @@ DEFUN_VOID (cg_print_index)
col += strlen (buf);
}
}
+
starting_col += column_width;
}
+
printf ("\n");
}
+
free (name_sorted_syms);
}
-/* Compare two arcs based on their usage counts. We want to sort
- in descending order. */
+/* Compare two arcs based on their usage counts.
+ We want to sort in descending order. */
+
static int
DEFUN (cmp_arc_count, (left, right), const PTR left AND const PTR right)
{
@@ -678,8 +665,9 @@ DEFUN (cmp_arc_count, (left, right), const PTR left AND const PTR right)
return 0;
}
-/* Compare two funtions based on their usage counts. We want to sort
- in descending order. */
+/* Compare two funtions based on their usage counts.
+ We want to sort in descending order. */
+
static int
DEFUN (cmp_fun_nuses, (left, right), const PTR left AND const PTR right)
{
@@ -726,7 +714,7 @@ DEFUN (cmp_fun_nuses, (left, right), const PTR left AND const PTR right)
Of course, profiling errors, machine limitations (PA long calls), and
poor cutoff values for the placement algorithm may limit the usefullness
of the resulting function order. Improvements would be greatly appreciated.
-
+
Suggestions:
* Place the functions with many callers near the middle of the
@@ -761,7 +749,7 @@ DEFUN (cmp_fun_nuses, (left, right), const PTR left AND const PTR right)
ordering which shares the same arc placement algorithm with
the function ordering code (in fact it is a degenerate case
of function ordering). */
-
+
void
DEFUN_VOID (cg_print_function_ordering)
{
@@ -868,13 +856,13 @@ DEFUN_VOID (cg_print_function_ordering)
Unfortunately, we don't know all these functions
until we're done. So we keep track of all the arcs
to the functions we care about, then prune out those
- which are uninteresting.
+ which are uninteresting.
An interesting variation would be to quit when we found
multi-call site functions which account for some percentage
of the arcs. */
-
arc = sym->cg.children;
+
while (arc)
{
if (arc->parent != arc->child)
@@ -884,6 +872,7 @@ DEFUN_VOID (cg_print_function_ordering)
}
arc = sym->cg.parents;
+
while (arc)
{
if (arc->parent != arc->child)
@@ -895,13 +884,13 @@ DEFUN_VOID (cg_print_function_ordering)
/* Keep track of how many symbols we're going to place. */
scratch_index = index;
- /* A lie, but it makes identifying these functions easier
- later. */
+ /* A lie, but it makes identifying
+ these functions easier later. */
sym->has_been_placed = 1;
}
- /* Now walk through the temporary arcs and copy those we care about
- into the high arcs array. */
+ /* Now walk through the temporary arcs and copy
+ those we care about into the high arcs array. */
for (index = 0; index < scratch_arc_count; index++)
{
Arc *arc = scratch_arcs[index];
@@ -920,22 +909,22 @@ DEFUN_VOID (cg_print_function_ordering)
}
}
- /* Dump the multi-site high usage functions which are not going
- to be ordered by the main ordering algorithm. */
+ /* Dump the multi-site high usage functions which are not
+ going to be ordered by the main ordering algorithm. */
for (index = 0; index < scratch_index; index++)
{
if (scratch_syms[index]->has_been_placed)
printf ("%s\n", scratch_syms[index]->name);
}
- /* Now we can order the multi-site high use functions based on the
- arcs between them. */
+ /* Now we can order the multi-site high use
+ functions based on the arcs between them. */
qsort (high_arcs, high_arc_count, sizeof (Arc *), cmp_arc_count);
order_and_dump_functions_by_arcs (high_arcs, high_arc_count, 1,
unplaced_arcs, &unplaced_arc_count);
- /* Order and dump the high use functions left, these typically
- have only a few call sites. */
+ /* Order and dump the high use functions left,
+ these typically have only a few call sites. */
order_and_dump_functions_by_arcs (arcs, numarcs, 0,
unplaced_arcs, &unplaced_arc_count);
@@ -1003,6 +992,7 @@ order_and_dump_functions_by_arcs (arcs, numarcs, all,
total_arcs = 0;
tmp_arcs = 0;
+
for (index = 0; index < numarcs; index++)
{
Sym *sym1, *sym2;
@@ -1059,10 +1049,10 @@ order_and_dump_functions_by_arcs (arcs, numarcs, all,
prev = prev->prev;
prev_count++;
}
-
+
/* Choose the closest. */
child = next_count < prev_count ? next : prev;
- }
+ }
else if (! child->next && !child->prev)
{
int next_count = 0;
@@ -1145,14 +1135,14 @@ order_and_dump_functions_by_arcs (arcs, numarcs, all,
on where we've got space in the child. */
if (child->prev)
{
- /* parent-prev and child-next */
+ /* parent-prev and child-next. */
parent->prev = child;
child->next = parent;
arcs[index]->has_been_placed = 1;
}
else
{
- /* parent-next and child-prev */
+ /* parent-next and child-prev. */
parent->next = child;
child->prev = parent;
arcs[index]->has_been_placed = 1;
@@ -1191,8 +1181,8 @@ order_and_dump_functions_by_arcs (arcs, numarcs, all,
}
}
- /* If we want to place all the arcs, then output those which weren't
- placed by the main algorithm. */
+ /* If we want to place all the arcs, then output
+ those which weren't placed by the main algorithm. */
if (all)
for (index = 0; index < numarcs; index++)
{
@@ -1212,7 +1202,8 @@ order_and_dump_functions_by_arcs (arcs, numarcs, all,
on profiling information. This uses the function placement
code for the bulk of its work. */
-struct function_map {
+struct function_map
+{
char *function_name;
char *file_name;
};
@@ -1253,8 +1244,8 @@ DEFUN_VOID (cg_print_file_ordering)
{
unsigned int index2;
- /* Don't bother searching if this symbol is the
- same as the previous one. */
+ /* Don't bother searching if this symbol
+ is the same as the previous one. */
if (last && !strcmp (last, symbol_map[index].file_name))
continue;
@@ -1267,10 +1258,10 @@ DEFUN_VOID (cg_print_file_ordering)
break;
}
- /* If we didn't find it in the symbol table, then it must be a .o
- with no text symbols. Output it last. */
+ /* If we didn't find it in the symbol table, then it must
+ be a .o with no text symbols. Output it last. */
if (index2 == symtab.len)
printf ("%s\n", symbol_map[index].file_name);
last = symbol_map[index].file_name;
- }
+ }
}
diff --git a/gnu/usr.bin/binutils/gprof/cg_print.h b/gnu/usr.bin/binutils/gprof/cg_print.h
index 782c4aa04c2..ad9f4240c8a 100644
--- a/gnu/usr.bin/binutils/gprof/cg_print.h
+++ b/gnu/usr.bin/binutils/gprof/cg_print.h
@@ -1,14 +1,34 @@
+/* cg_print.h
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
#ifndef cg_print_h
#define cg_print_h
#include "gprof.h"
#include "symtab.h"
-extern double print_time; /* total of time being printed */
+extern double print_time; /* Total of time being printed. */
-extern void cg_print PARAMS ((Sym ** cg));
-extern void cg_print_index PARAMS ((void));
-extern void cg_print_file_ordering PARAMS ((void));
-extern void cg_print_function_ordering PARAMS ((void));
+extern void cg_print PARAMS ((Sym **));
+extern void cg_print_index PARAMS ((void));
+extern void cg_print_file_ordering PARAMS ((void));
+extern void cg_print_function_ordering PARAMS ((void));
#endif /* cg_print_h */
diff --git a/gnu/usr.bin/binutils/gprof/configure b/gnu/usr.bin/binutils/gprof/configure
index 367150190a8..411ce5838aa 100644
--- a/gnu/usr.bin/binutils/gprof/configure
+++ b/gnu/usr.bin/binutils/gprof/configure
@@ -22,12 +22,16 @@ ac_help="$ac_help
ac_help="$ac_help
--disable-libtool-lock avoid locking (might break parallel builds)"
ac_help="$ac_help
+ --with-pic try to use only PIC/non-PIC objects [default=use both]"
+ac_help="$ac_help
--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_help="$ac_help
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -45,6 +49,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -159,6 +164,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -329,6 +335,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -494,12 +505,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -537,6 +552,68 @@ else
ac_n= ac_c='\c' ac_t=
fi
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:557: 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 562 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:573: \"$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:590: 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 595 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:602: \"$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=
@@ -586,7 +663,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:590: checking host system type" >&5
+echo "configure:667: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -607,7 +684,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:611: checking target system type" >&5
+echo "configure:688: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -625,7 +702,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:629: checking build system type" >&5
+echo "configure:706: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -647,7 +724,251 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:731: 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:761: 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:812: 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:844: 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 855 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:860: \"$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:886: 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:891: 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:900: \"$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:919: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:951: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$ac_t""yes" 1>&6
+ ISC=yes # If later tests want to check for ISC.
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
+else
+ echo "$ac_t""no" 1>&6
+ ISC=
+fi
+
+
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -660,7 +981,7 @@ test "$host_alias" != "$target_alias" &&
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:664: checking for a BSD compatible install" >&5
+echo "configure:985: 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
@@ -713,7 +1034,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:717: checking whether build environment is sane" >&5
+echo "configure:1038: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -770,7 +1091,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:774: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1095: 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
@@ -799,7 +1120,7 @@ fi
PACKAGE=gprof
-VERSION=2.10.1
+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; }
@@ -816,7 +1137,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:820: checking for working aclocal" >&5
+echo "configure:1141: 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.
@@ -829,7 +1150,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:833: checking for working autoconf" >&5
+echo "configure:1154: 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.
@@ -842,7 +1163,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:846: checking for working automake" >&5
+echo "configure:1167: 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.
@@ -855,7 +1176,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:859: checking for working autoheader" >&5
+echo "configure:1180: 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.
@@ -868,7 +1189,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:872: checking for working makeinfo" >&5
+echo "configure:1193: 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.
@@ -951,258 +1272,6 @@ else
enable_fast_install=yes
fi
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:958: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:988: 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:1018: 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:1069: 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:1101: 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 1112 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1117: \"$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:1143: 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:1148: 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:1157: \"$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:1176: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1215,8 +1284,14 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1219: checking for ld used by GCC" >&5
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
+echo "configure:1288: checking for ld used by GCC" >&5
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
case "$ac_prog" in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
@@ -1239,10 +1314,10 @@ echo "configure:1219: 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:1243: checking for GNU ld" >&5
+echo "configure:1318: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1246: checking for non-GNU ld" >&5
+echo "configure:1321: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1277,7 +1352,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1281: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1356: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1290,10 +1365,23 @@ fi
fi
echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$ac_cv_prog_gnu_ld
+
+
+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+echo "configure:1373: checking for $LD option to reload object files" >&5
+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1297: checking for BSD-compatible nm" >&5
+echo "configure:1385: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1304,18 +1392,20 @@ else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ tmp_nm=$ac_dir/${ac_tool_prefix}nm
+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
+ # Tru64's nm complains that /dev/null is an invalid object file
+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
@@ -1329,7 +1419,7 @@ NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1333: checking whether ln -s works" >&5
+echo "configure:1423: 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
@@ -1349,12 +1439,484 @@ else
echo "$ac_t""no" 1>&6
fi
+echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
+echo "configure:1444: checking how to recognise dependant libraries" >&5
+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case "$host_os" in
+aix4*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin* | mingw* |pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+freebsd* )
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case "$host_cpu" in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20*)
+ # TODO: Does this work for hpux-11 too?
+ lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+
+irix5* | irix6*)
+ case "$host_os" in
+ irix5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case "$LD" in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ case "$host_cpu" in
+ alpha* | i*86 | powerpc* | sparc* | ia64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ else
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case "$host_vendor" in
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ esac
+ ;;
esac
+fi
+
+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1587: 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:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1613: 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:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# Only perform the check for file, if the check method requires it
+case "$deplibs_check_method" in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+echo "configure:1656: checking for ${ac_tool_prefix}file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo $ac_n "checking for file""... $ac_c" 1>&6
+echo "configure:1718: checking for file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1789: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1821: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ RANLIB=":"
+fi
+fi
+
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1856: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1888: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ STRIP=":"
+fi
+fi
+
+
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
@@ -1373,13 +1935,24 @@ fi
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
+test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$lt_target" in
+case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1382 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1955 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1400,19 +1973,27 @@ case "$lt_target" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1404: checking whether the C compiler needs -belf" >&5
+echo "configure:1977: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1409 "configure"
+
+ 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 1990 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -1422,6 +2003,13 @@ else
lt_cv_cc_needs_belf=no
fi
rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
fi
echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
@@ -1485,12 +2073,14 @@ rm -f confcache
# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
# Reload cache, that may have been modified by ltconfig
@@ -1504,7 +2094,7 @@ fi
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -1514,6 +2104,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
exec 5>>./config.log
+
+
+
+
+
+
@@ -1521,7 +2117,7 @@ exec 5>>./config.log
# 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:1525: checking for $ac_word" >&5
+echo "configure:2121: 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
@@ -1551,7 +2147,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1555: checking for $ac_word" >&5
+echo "configure:2151: 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
@@ -1602,7 +2198,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1606: checking for $ac_word" >&5
+echo "configure:2202: 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
@@ -1634,7 +2230,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1638: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2234: 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.
@@ -1645,12 +2241,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1649 "configure"
+#line 2245 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2250: \"$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
@@ -1676,12 +2272,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2276: 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:1685: checking whether we are using GNU C" >&5
+echo "configure:2281: 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
@@ -1690,7 +2286,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2290: \"$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
@@ -1709,7 +2305,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1713: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2309: 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
@@ -1752,7 +2348,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1756: checking for a BSD compatible install" >&5
+echo "configure:2352: 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
@@ -1805,36 +2401,15 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1810: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
- echo "$ac_t""yes" 1>&6
- ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
-else
- echo "$ac_t""no" 1>&6
- ISC=
-fi
-
for ac_func in setmode
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1833: checking for $ac_func" >&5
+echo "configure:2408: 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 1838 "configure"
+#line 2413 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1857,7 +2432,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2436: \"$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
@@ -1884,7 +2459,7 @@ done
ALL_LINGUAS=
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1888: checking how to run the C preprocessor" >&5
+echo "configure:2463: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1899,13 +2474,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1903 "configure"
+#line 2478 "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:1909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2484: \"$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
:
@@ -1916,13 +2491,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
+#line 2495 "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:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2501: \"$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
:
@@ -1933,13 +2508,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
+#line 2512 "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:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2518: \"$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
:
@@ -1963,13 +2538,43 @@ else
fi
echo "$ac_t""$CPP" 1>&6
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2545: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1968: checking for ANSI C header files" >&5
+echo "configure:2573: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1973 "configure"
+#line 2578 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1977,7 +2582,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2586: \"$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*
@@ -1994,7 +2599,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1998 "configure"
+#line 2603 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2012,7 +2617,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2016 "configure"
+#line 2621 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2033,7 +2638,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2037 "configure"
+#line 2642 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2044,7 +2649,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2068,18 +2673,18 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2072: checking for working const" >&5
+echo "configure:2677: 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 2077 "configure"
+#line 2682 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@@ -2122,7 +2727,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2143,21 +2748,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2147: checking for inline" >&5
+echo "configure:2752: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2154 "configure"
+#line 2759 "configure"
#include "confdefs.h"
int main() {
-} int $ac_kw foo() {
+} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2183,12 +2788,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2187: checking for off_t" >&5
+echo "configure:2792: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2192 "configure"
+#line 2797 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2216,12 +2821,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2220: checking for size_t" >&5
+echo "configure:2825: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
+#line 2830 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2251,19 +2856,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2255: checking for working alloca.h" >&5
+echo "configure:2860: 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 2260 "configure"
+#line 2865 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
-void *p = alloca(2 * sizeof(int));
+char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2872: \"$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
@@ -2284,12 +2889,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2288: checking for alloca" >&5
+echo "configure:2893: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2293 "configure"
+#line 2898 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2317,7 +2922,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2349,12 +2954,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2353: checking whether alloca needs Cray hooks" >&5
+echo "configure:2958: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2358 "configure"
+#line 2963 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2379,12 +2984,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2383: checking for $ac_func" >&5
+echo "configure:2988: 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 2388 "configure"
+#line 2993 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2407,7 +3012,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3016: \"$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
@@ -2434,7 +3039,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2438: checking stack direction for C alloca" >&5
+echo "configure:3043: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2442,7 +3047,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2446 "configure"
+#line 3051 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2461,7 +3066,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2486,17 +3091,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2490: checking for $ac_hdr" >&5
+echo "configure:3095: 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 2495 "configure"
+#line 3100 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3105: \"$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*
@@ -2525,12 +3130,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2529: checking for $ac_func" >&5
+echo "configure:3134: 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 2534 "configure"
+#line 3139 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2553,7 +3158,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3162: \"$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
@@ -2578,7 +3183,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2582: checking for working mmap" >&5
+echo "configure:3187: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2586,7 +3191,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2590 "configure"
+#line 3195 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2613,15 +3218,12 @@ else
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -2676,7 +3278,7 @@ main()
/*
* First, make a file with some known garbage in it.
*/
- data = (char*)malloc(pagesize);
+ data = malloc(pagesize);
if (!data)
exit(1);
for (i = 0; i < pagesize; ++i)
@@ -2697,7 +3299,7 @@ main()
fd = open("conftestmmap", O_RDWR);
if (fd < 0)
exit(1);
- data2 = (char*)malloc(2 * pagesize);
+ data2 = malloc(2 * pagesize);
if (!data2)
exit(1);
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -2715,7 +3317,7 @@ main()
*/
for (i = 0; i < pagesize; ++i)
*(data2 + i) = *(data2 + i) + 1;
- data3 = (char*)malloc(pagesize);
+ data3 = malloc(pagesize);
if (!data3)
exit(1);
if (read(fd, data3, pagesize) != pagesize)
@@ -2729,7 +3331,7 @@ main()
}
EOF
-if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2757,17 +3359,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2761: checking for $ac_hdr" >&5
+echo "configure:3363: 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 2766 "configure"
+#line 3368 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3373: \"$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*
@@ -2797,12 +3399,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2801: checking for $ac_func" >&5
+echo "configure:3403: 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 2806 "configure"
+#line 3408 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2825,7 +3427,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3431: \"$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
@@ -2854,12 +3456,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2858: checking for $ac_func" >&5
+echo "configure:3460: 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 2863 "configure"
+#line 3465 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2882,7 +3484,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3488: \"$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
@@ -2916,19 +3518,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2920: checking for LC_MESSAGES" >&5
+echo "configure:3522: 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 2925 "configure"
+#line 3527 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -2949,7 +3551,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2953: checking whether NLS is requested" >&5
+echo "configure:3555: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -2969,7 +3571,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2973: checking whether included gettext is requested" >&5
+echo "configure:3575: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -2988,17 +3590,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2992: checking for libintl.h" >&5
+echo "configure:3594: 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 2997 "configure"
+#line 3599 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3604: \"$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*
@@ -3015,19 +3617,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3019: checking for gettext in libc" >&5
+echo "configure:3621: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3024 "configure"
+#line 3626 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3043,7 +3645,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3047: checking for bindtextdomain in -lintl" >&5
+echo "configure:3649: 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
@@ -3051,7 +3653,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3055 "configure"
+#line 3657 "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
@@ -3062,7 +3664,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3668: \"$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
@@ -3078,19 +3680,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3082: checking for gettext in libintl" >&5
+echo "configure:3684: 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 3087 "configure"
+#line 3689 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3118,7 +3720,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3122: checking for $ac_word" >&5
+echo "configure:3724: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3152,12 +3754,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3156: checking for $ac_func" >&5
+echo "configure:3758: 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 3161 "configure"
+#line 3763 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3180,7 +3782,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3786: \"$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
@@ -3207,7 +3809,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3211: checking for $ac_word" >&5
+echo "configure:3813: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3243,7 +3845,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3247: checking for $ac_word" >&5
+echo "configure:3849: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3275,7 +3877,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3279 "configure"
+#line 3881 "configure"
#include "confdefs.h"
int main() {
@@ -3283,7 +3885,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3315,7 +3917,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3319: checking for $ac_word" >&5
+echo "configure:3921: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3349,7 +3951,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3353: checking for $ac_word" >&5
+echo "configure:3955: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3385,7 +3987,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3389: checking for $ac_word" >&5
+echo "configure:3991: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3475,7 +4077,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3479: checking for catalogs to be installed" >&5
+echo "configure:4081: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -3503,17 +4105,17 @@ echo "configure:3479: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:3507: checking for linux/version.h" >&5
+echo "configure:4109: 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 3512 "configure"
+#line 4114 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4119: \"$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*
@@ -3576,7 +4178,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:3580: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4182: 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"
@@ -3598,72 +4200,10 @@ fi
MAINT=$MAINTAINER_MODE_TRUE
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:3603: 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 3608 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:3619: \"$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:3636: 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 3641 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:3648: \"$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
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3667: checking for executable suffix" >&5
+echo "configure:4207: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3673,10 +4213,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -3694,6 +4234,118 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
+for ac_hdr in sys/gmon_out.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4242: 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 4247 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking the size of gmon pointers""... $ac_c" 1>&6
+echo "configure:4280: checking the size of gmon pointers" >&5
+if test "$cross_compiling" = yes; then
+ gmon_ptr_size=4
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4285 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <stdlib.h>
+#if HAVE_SYS_GMON_OUT_H
+#include <sys/gmon_out.h>
+#endif
+main()
+{
+#if HAVE_SYS_GMON_OUT_H
+ struct gmon_cg_arc_record arc;
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(arc.from_pc));
+ exit(0);
+#else
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", (int) sizeof(char *));
+ exit(1);
+#endif
+}
+EOF
+if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ gmon_ptr_size=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ gmon_ptr_size=4
+fi
+rm -fr conftest*
+fi
+
+echo "$ac_t""$gmon_ptr_size" 1>&6
+
+cat >> confdefs.h <<EOF
+#define GMON_PTR_SIZE $gmon_ptr_size
+EOF
+
+
+build_warnings="-W -Wall"
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -3842,6 +4494,7 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
+s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -3853,9 +4506,11 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@RANLIB@%$RANLIB%g
+s%@STRIP@%$STRIP%g
s%@LIBTOOL@%$LIBTOOL%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
@@ -3882,7 +4537,7 @@ s%@l@%$l%g
s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
+s%@WARN_CFLAGS@%$WARN_CFLAGS%g
CEOF
EOF
diff --git a/gnu/usr.bin/binutils/gprof/configure.in b/gnu/usr.bin/binutils/gprof/configure.in
index c3beb91e7e6..7d6ca2cc25a 100644
--- a/gnu/usr.bin/binutils/gprof/configure.in
+++ b/gnu/usr.bin/binutils/gprof/configure.in
@@ -3,8 +3,12 @@ AC_PREREQ(2.13)
AC_INIT(gprof.c)
AC_CANONICAL_SYSTEM
+AC_ISC_POSIX
-AM_INIT_AUTOMAKE(gprof, 2.10.1)
+changequote(,)dnl
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+changequote([,])dnl
+AM_INIT_AUTOMAKE(gprof, ${BFD_VERSION})
AM_PROG_LIBTOOL
@@ -17,7 +21,6 @@ AM_CONFIG_HEADER(gconfig.h:gconfig.in)
AC_PROG_CC
AC_PROG_INSTALL
-AC_ISC_POSIX
AC_CHECK_FUNCS(setmode)
ALL_LINGUAS=
@@ -26,5 +29,53 @@ CY_GNU_GETTEXT
AM_MAINTAINER_MODE
AC_EXEEXT
+AC_CHECK_HEADERS(sys/gmon_out.h)
+
+AC_MSG_CHECKING(the size of gmon pointers)
+AC_TRY_RUN([#include <stdio.h>
+#include <stdlib.h>
+#if HAVE_SYS_GMON_OUT_H
+#include <sys/gmon_out.h>
+#endif
+main()
+{
+#if HAVE_SYS_GMON_OUT_H
+ struct gmon_cg_arc_record arc;
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(arc.from_pc));
+ exit(0);
+#else
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", (int) sizeof(char *));
+ exit(1);
+#endif
+}], gmon_ptr_size=`cat conftestval`, gmon_ptr_size=4, gmon_ptr_size=4)
+AC_MSG_RESULT($gmon_ptr_size)
+
+AC_DEFINE_UNQUOTED(GMON_PTR_SIZE, $gmon_ptr_size)
+
+build_warnings="-W -Wall"
+AC_ARG_ENABLE(build-warnings,
+[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi])dnl
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+AC_SUBST(WARN_CFLAGS)
+
AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
diff --git a/gnu/usr.bin/binutils/gprof/gmon.h b/gnu/usr.bin/binutils/gprof/gmon.h
index 70575993b94..28a54bcbaf2 100644
--- a/gnu/usr.bin/binutils/gprof/gmon.h
+++ b/gnu/usr.bin/binutils/gprof/gmon.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1991 The Regents of the University of California.
+ * Copyright (c) 1991, 2001 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,13 +39,8 @@ struct raw_phdr
{
/* FIXME: Checking a host compiler define means that we can't use
a cross gprof to the alpha. */
-#if defined(__alpha__) || defined(__sparc64__)
- char low_pc[8]; /* base pc address of sample buffer */
- char high_pc[8]; /* max pc address of sampled buffer */
-#else
- char low_pc[4]; /* base pc address of sample buffer */
- char high_pc[4]; /* max pc address of sampled buffer */
-#endif
+ char low_pc[GMON_PTR_SIZE]; /* base pc address of sample buffer */
+ char high_pc[GMON_PTR_SIZE];/* max pc address of sampled buffer */
char ncnt[4]; /* size of sample buffer (plus this header) */
char version[4]; /* version number */
@@ -57,15 +52,8 @@ struct raw_phdr
struct old_raw_phdr
{
- /* FIXME: Checking a host compiler define means that we can't use
- a cross gprof to the alpha. */
-#if defined(__alpha__) || defined(__sparc64__)
- char low_pc[8]; /* base pc address of sample buffer */
- char high_pc[8]; /* max pc address of sampled buffer */
-#else
- char low_pc[4]; /* base pc address of sample buffer */
- char high_pc[4]; /* max pc address of sampled buffer */
-#endif
+ char low_pc[GMON_PTR_SIZE]; /* base pc address of sample buffer */
+ char high_pc[GMON_PTR_SIZE];/* max pc address of sampled buffer */
char ncnt[4]; /* size of sample buffer (plus this header) */
/* FIXME: Checking host compiler defines here means that we can't
@@ -103,7 +91,7 @@ struct old_raw_phdr
* calls $0,(r0)
* calls $0,(r0)
*
- * which is separated by only three bytes, thus HASHFRACTION is
+ * which is separated by only three bytes, thus HASHFRACTION is
* calculated as:
*
* HASHFRACTION = 3 / (2 * 2 - 1) = 1
@@ -134,17 +122,9 @@ struct tostruct
*/
struct raw_arc
{
- /* FIXME: Checking a host compiler define means that we can't use
- a cross gprof to the alpha. */
-#ifdef __alpha__
- char from_pc[8];
- char self_pc[8];
- char count[8];
-#else
- char from_pc[4];
- char self_pc[4];
+ char from_pc[GMON_PTR_SIZE];
+ char self_pc[GMON_PTR_SIZE];
char count[4];
-#endif
};
/*
diff --git a/gnu/usr.bin/binutils/gprof/gmon_io.c b/gnu/usr.bin/binutils/gprof/gmon_io.c
index f2ac524ac6f..cff132cb5aa 100644
--- a/gnu/usr.bin/binutils/gprof/gmon_io.c
+++ b/gnu/usr.bin/binutils/gprof/gmon_io.c
@@ -1,6 +1,24 @@
-/*
- * Input and output from/to gmon.out files.
- */
+/* gmon_io.c - Input and output from/to gmon.out files.
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include "cg_arcs.h"
#include "basic_blocks.h"
#include "bfd.h"
@@ -8,19 +26,122 @@
#include "call_graph.h"
#include "gmon_io.h"
#include "gmon_out.h"
-#include "gmon.h" /* fetch header for old format */
+#include "gmon.h" /* Fetch header for old format. */
#include "gprof.h"
#include "hertz.h"
#include "hist.h"
#include "libiberty.h"
int gmon_input = 0;
-int gmon_file_version = 0; /* 0 == old (non-versioned) file format */
+int gmon_file_version = 0; /* 0 == old (non-versioned) file format. */
+
+int
+DEFUN (gmon_io_read_vma, (ifp, valp), FILE * ifp AND bfd_vma *valp)
+{
+ char buf[8];
+ bfd_vma val;
+
+ switch (GMON_PTR_SIZE)
+ {
+ case 4:
+ if (fread (buf, 1, 4, ifp) != 4)
+ return 1;
+ val = bfd_get_32 (core_bfd, buf);
+ break;
+
+ case 8:
+ if (fread (buf, 1, 8, ifp) != 8)
+ return 1;
+ val = bfd_get_64 (core_bfd, buf);
+ break;
+
+ default:
+ fprintf (stderr, _("%s: GMON_PTR_SIZE has unexpected value of %u\n"),
+ whoami, GMON_PTR_SIZE);
+ done (1);
+ }
+ *valp = val;
+ return 0;
+}
+
+int
+DEFUN (gmon_io_read_32, (ifp, valp), FILE * ifp AND unsigned int *valp)
+{
+ char buf[4];
+
+ if (fread (buf, 1, 4, ifp) != 4)
+ return 1;
+ *valp = bfd_get_32 (core_bfd, buf);
+ return 0;
+}
+
+int
+DEFUN (gmon_io_read, (ifp, buf, n), FILE * ifp AND char *buf AND size_t n)
+{
+ if (fread (buf, 1, n, ifp) != n)
+ return 1;
+ return 0;
+}
+
+int
+DEFUN (gmon_io_write_vma, (ofp, val), FILE * ofp AND bfd_vma val)
+{
+ char buf[8];
+
+ switch (GMON_PTR_SIZE)
+ {
+ case 4:
+ bfd_put_32 (core_bfd, val, buf);
+ if (fwrite (buf, 1, 4, ofp) != 4)
+ return 1;
+ break;
+
+ case 8:
+ bfd_put_64 (core_bfd, val, buf);
+ if (fwrite (buf, 1, 8, ofp) != 8)
+ return 1;
+ break;
+
+ default:
+ fprintf (stderr, _("%s: GMON_PTR_SIZE has unexpected value of %u\n"),
+ whoami, GMON_PTR_SIZE);
+ done (1);
+ }
+ return 0;
+}
+
+int
+DEFUN (gmon_io_write_32, (ofp, val), FILE * ofp AND unsigned int val)
+{
+ char buf[4];
+
+ bfd_put_32 (core_bfd, val, buf);
+ if (fwrite (buf, 1, 4, ofp) != 4)
+ return 1;
+ return 0;
+}
-/*
- * This probably ought to be in libbfd.
- */
-bfd_vma
+int
+DEFUN (gmon_io_write_8, (ofp, val), FILE * ofp AND unsigned char val)
+{
+ char buf[1];
+
+ bfd_put_8 (core_bfd, val, buf);
+ if (fwrite (buf, 1, 1, ofp) != 1)
+ return 1;
+ return 0;
+}
+
+int
+DEFUN (gmon_io_write, (ofp, buf, n), FILE * ofp AND char *buf AND size_t n)
+{
+ if (fwrite (buf, 1, n, ofp) != n)
+ return 1;
+ return 0;
+}
+
+/* get_vma and put_vma are for backwards compatibility only */
+static bfd_vma
DEFUN (get_vma, (abfd, addr), bfd * abfd AND bfd_byte * addr)
{
switch (sizeof (char*))
@@ -36,11 +157,7 @@ DEFUN (get_vma, (abfd, addr), bfd * abfd AND bfd_byte * addr)
}
}
-
-/*
- * This probably ought to be in libbfd.
- */
-void
+static void
DEFUN (put_vma, (abfd, val, addr), bfd * abfd AND bfd_vma val AND bfd_byte * addr)
{
switch (sizeof (char*))
@@ -58,7 +175,6 @@ DEFUN (put_vma, (abfd, val, addr), bfd * abfd AND bfd_vma val AND bfd_byte * add
}
}
-
void
DEFUN (gmon_out_read, (filename), const char *filename)
{
@@ -67,8 +183,7 @@ DEFUN (gmon_out_read, (filename), const char *filename)
unsigned char tag;
int nhist = 0, narcs = 0, nbbs = 0;
- /* open gmon.out file: */
-
+ /* Open gmon.out file. */
if (strcmp (filename, "-") == 0)
{
ifp = stdin;
@@ -79,12 +194,14 @@ DEFUN (gmon_out_read, (filename), const char *filename)
else
{
ifp = fopen (filename, FOPEN_RB);
+
if (!ifp)
{
perror (filename);
done (1);
}
}
+
if (fread (&ghdr, sizeof (struct gmon_hdr), 1, ifp) != 1)
{
fprintf (stderr, _("%s: file too short to be a gmon file\n"),
@@ -92,8 +209,8 @@ DEFUN (gmon_out_read, (filename), const char *filename)
done (1);
}
- if ((file_format == FF_MAGIC) ||
- (file_format == FF_AUTO && !strncmp (&ghdr.cookie[0], GMON_MAGIC, 4)))
+ if ((file_format == FF_MAGIC)
+ || (file_format == FF_AUTO && !strncmp (&ghdr.cookie[0], GMON_MAGIC, 4)))
{
if (file_format == FF_MAGIC && strncmp (&ghdr.cookie[0], GMON_MAGIC, 4))
{
@@ -102,9 +219,9 @@ DEFUN (gmon_out_read, (filename), const char *filename)
done (1);
}
- /* right magic, so it's probably really a new gmon.out file */
-
+ /* Right magic, so it's probably really a new gmon.out file. */
gmon_file_version = bfd_get_32 (core_bfd, (bfd_byte *) ghdr.version);
+
if (gmon_file_version != GMON_VERSION && gmon_file_version != 0)
{
fprintf (stderr,
@@ -113,7 +230,7 @@ DEFUN (gmon_out_read, (filename), const char *filename)
done (1);
}
- /* read in all the records: */
+ /* Read in all the records. */
while (fread (&tag, sizeof (tag), 1, ifp) == 1)
{
switch (tag)
@@ -163,22 +280,19 @@ DEFUN (gmon_out_read, (filename), const char *filename)
UNIT raw_bin_count;
struct hdr tmp;
- /*
- * Information from a gmon.out file is in two parts: an array of
- * sampling hits within pc ranges, and the arcs.
- */
+ /* Information from a gmon.out file is in two parts: an array of
+ sampling hits within pc ranges, and the arcs. */
gmon_input = INPUT_HISTOGRAM | INPUT_CALL_GRAPH;
- /*
- * This fseek() ought to work even on stdin as long as it's
- * not an interactive device (heck, is there anybody who would
- * want to type in a gmon.out at the terminal?).
- */
+ /* This fseek() ought to work even on stdin as long as it's
+ not an interactive device (heck, is there anybody who would
+ want to type in a gmon.out at the terminal?). */
if (fseek (ifp, 0, SEEK_SET) < 0)
{
perror (filename);
done (1);
}
+
if (fread (&raw, 1, sizeof (struct raw_phdr), ifp)
!= sizeof (struct raw_phdr))
{
@@ -186,6 +300,7 @@ DEFUN (gmon_out_read, (filename), const char *filename)
filename);
done (1);
}
+
tmp.low_pc = get_vma (core_bfd, (bfd_byte *) &raw.low_pc[0]);
tmp.high_pc = get_vma (core_bfd, (bfd_byte *) &raw.high_pc[0]);
tmp.ncnt = bfd_get_32 (core_bfd, (bfd_byte *) &raw.ncnt[0]);
@@ -196,8 +311,8 @@ DEFUN (gmon_out_read, (filename), const char *filename)
int profrate;
/* 4.4BSD format header. */
-
profrate = bfd_get_32 (core_bfd, (bfd_byte *) &raw.profrate[0]);
+
if (!s_highpc)
hz = profrate;
else if (hz != profrate)
@@ -212,7 +327,7 @@ DEFUN (gmon_out_read, (filename), const char *filename)
}
else
{
- /* old style BSD format. */
+ /* Old style BSD format. */
if (file_format == FF_BSD44)
{
fprintf (stderr, _("%s: file `%s' has bad magic cookie\n"),
@@ -229,13 +344,14 @@ DEFUN (gmon_out_read, (filename), const char *filename)
header_size = sizeof (struct old_raw_phdr);
}
- if (s_highpc && (tmp.low_pc != h.low_pc ||
- tmp.high_pc != h.high_pc || tmp.ncnt != h.ncnt))
+ if (s_highpc && (tmp.low_pc != h.low_pc
+ || tmp.high_pc != h.high_pc || tmp.ncnt != h.ncnt))
{
fprintf (stderr, _("%s: incompatible with first gmon file\n"),
filename);
done (1);
}
+
h = tmp;
s_lowpc = (bfd_vma) h.low_pc;
s_highpc = (bfd_vma) h.high_pc;
@@ -243,6 +359,7 @@ DEFUN (gmon_out_read, (filename), const char *filename)
highpc = (bfd_vma) h.high_pc / sizeof (UNIT);
samp_bytes = h.ncnt - header_size;
hist_num_bins = samp_bytes / sizeof (UNIT);
+
DBG (SAMPLEDEBUG,
printf ("[gmon_out_read] lowpc 0x%lx highpc 0x%lx ncnt %d\n",
(unsigned long) h.low_pc, (unsigned long) h.high_pc,
@@ -256,22 +373,21 @@ DEFUN (gmon_out_read, (filename), const char *filename)
/* Make sure that we have sensible values. */
if (samp_bytes < 0 || lowpc > highpc)
- {
- fprintf (stderr,
+ {
+ fprintf (stderr,
_("%s: file '%s' does not appear to be in gmon.out format\n"),
whoami, filename);
- done (1);
- }
+ done (1);
+ }
if (hist_num_bins)
- {
- ++nhist;
- }
+ ++nhist;
if (!hist_sample)
{
hist_sample =
(int *) xmalloc (hist_num_bins * sizeof (hist_sample[0]));
+
memset (hist_sample, 0, hist_num_bins * sizeof (hist_sample[0]));
}
@@ -284,34 +400,35 @@ DEFUN (gmon_out_read, (filename), const char *filename)
whoami, --i, hist_num_bins);
done (1);
}
+
hist_sample[i] += bfd_get_16 (core_bfd, (bfd_byte *) raw_bin_count);
}
- /*
- * The rest of the file consists of a bunch of <from,self,count>
- * tuples:
- */
+ /* The rest of the file consists of a bunch of
+ <from,self,count> tuples. */
while (fread (&raw_arc, sizeof (raw_arc), 1, ifp) == 1)
{
++narcs;
from_pc = get_vma (core_bfd, (bfd_byte *) raw_arc.from_pc);
self_pc = get_vma (core_bfd, (bfd_byte *) raw_arc.self_pc);
count = bfd_get_32 (core_bfd, (bfd_byte *) raw_arc.count);
+
DBG (SAMPLEDEBUG,
printf ("[gmon_out_read] frompc 0x%lx selfpc 0x%lx count %lu\n",
(unsigned long) from_pc, (unsigned long) self_pc, count));
- /* add this arc: */
+
+ /* Add this arc. */
cg_tally (from_pc, self_pc, count);
}
+
fclose (ifp);
if (hz == HZ_WRONG)
{
- /*
- * How many ticks per second? If we can't tell, report
- * time in ticks.
- */
+ /* How many ticks per second? If we can't tell, report
+ time in ticks. */
hz = hertz ();
+
if (hz == HZ_WRONG)
{
hz = 1;
@@ -356,33 +473,28 @@ DEFUN (gmon_out_write, (filename), const char *filename)
if (file_format == FF_AUTO || file_format == FF_MAGIC)
{
- /* write gmon header: */
+ /* Write gmon header. */
memcpy (&ghdr.cookie[0], GMON_MAGIC, 4);
bfd_put_32 (core_bfd, GMON_VERSION, (bfd_byte *) ghdr.version);
+
if (fwrite (&ghdr, sizeof (ghdr), 1, ofp) != 1)
{
perror (filename);
done (1);
}
- /* write execution time histogram if we have one: */
+ /* Write execution time histogram if we have one. */
if (gmon_input & INPUT_HISTOGRAM)
- {
- hist_write_hist (ofp, filename);
- }
+ hist_write_hist (ofp, filename);
- /* write call graph arcs if we have any: */
+ /* Write call graph arcs if we have any. */
if (gmon_input & INPUT_CALL_GRAPH)
- {
- cg_write_arcs (ofp, filename);
- }
+ cg_write_arcs (ofp, filename);
- /* write basic-block info if we have it: */
+ /* Write basic-block info if we have it. */
if (gmon_input & INPUT_BB_COUNTS)
- {
- bb_write_blocks (ofp, filename);
- }
+ bb_write_blocks (ofp, filename);
}
else if (file_format == FF_BSD || file_format == FF_BSD44)
{
@@ -401,8 +513,8 @@ DEFUN (gmon_out_write, (filename), const char *filename)
(bfd_byte *) &h.ncnt);
/* Write header. Use new style BSD format is explicitly
- specified, or if the profiling rate is non-standard;
- otherwise, use the old BSD format. */
+ specified, or if the profiling rate is non-standard;
+ otherwise, use the old BSD format. */
if (file_format == FF_BSD44
|| hz != hertz ())
{
@@ -423,8 +535,7 @@ DEFUN (gmon_out_write, (filename), const char *filename)
}
}
- /* dump the samples: */
-
+ /* Dump the samples. */
for (i = 0; i < hist_num_bins; ++i)
{
bfd_put_16 (core_bfd, hist_sample[i], (bfd_byte *) & raw_bin_count[0]);
@@ -435,8 +546,7 @@ DEFUN (gmon_out_write, (filename), const char *filename)
}
}
- /* dump the normalized raw arc information: */
-
+ /* Dump the normalized raw arc information. */
for (sym = symtab.base; sym < symtab.limit; ++sym)
{
for (arc = sym->cg.children; arc; arc = arc->next_child)
@@ -457,6 +567,7 @@ DEFUN (gmon_out_write, (filename), const char *filename)
(unsigned long) arc->child->addr, arc->count));
}
}
+
fclose (ofp);
}
else
diff --git a/gnu/usr.bin/binutils/gprof/gmon_io.h b/gnu/usr.bin/binutils/gprof/gmon_io.h
index 06bca377b48..7936d836efe 100644
--- a/gnu/usr.bin/binutils/gprof/gmon_io.h
+++ b/gnu/usr.bin/binutils/gprof/gmon_io.h
@@ -1,3 +1,23 @@
+/* gmon_io.h
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
#ifndef gmon_io_h
#define gmon_io_h
@@ -22,17 +42,22 @@
#endif
#endif
-#define INPUT_HISTOGRAM (1<<0)
-#define INPUT_CALL_GRAPH (1<<1)
-#define INPUT_BB_COUNTS (1<<2)
+#define INPUT_HISTOGRAM (1 << 0)
+#define INPUT_CALL_GRAPH (1 << 1)
+#define INPUT_BB_COUNTS (1 << 2)
-extern int gmon_input; /* what input did we see? */
-extern int gmon_file_version; /* file version are we dealing with */
+extern int gmon_input; /* What input did we see? */
+extern int gmon_file_version; /* File version are we dealing with. */
-extern bfd_vma get_vma PARAMS ((bfd * abfd, bfd_byte * addr));
-extern void put_vma PARAMS ((bfd * abfd, bfd_vma val, bfd_byte * addr));
+extern int gmon_io_read_vma PARAMS ((FILE *ifp, bfd_vma *valp));
+extern int gmon_io_read_32 PARAMS ((FILE *ifp, unsigned int *valp));
+extern int gmon_io_read PARAMS ((FILE *ifp, char *buf, size_t n));
+extern int gmon_io_write_vma PARAMS ((FILE *ifp, bfd_vma val));
+extern int gmon_io_write_32 PARAMS ((FILE *ifp, unsigned int val));
+extern int gmon_io_write_8 PARAMS ((FILE *ifp, unsigned char val));
+extern int gmon_io_write PARAMS ((FILE *ifp, char *buf, size_t n));
-extern void gmon_out_read PARAMS ((const char *filename));
-extern void gmon_out_write PARAMS ((const char *filename));
+extern void gmon_out_read PARAMS ((const char *));
+extern void gmon_out_write PARAMS ((const char *));
#endif /* gmon_io_h */
diff --git a/gnu/usr.bin/binutils/gprof/gprof.c b/gnu/usr.bin/binutils/gprof/gprof.c
index 0075480ca6e..2ed37a3f9c6 100644
--- a/gnu/usr.bin/binutils/gprof/gprof.c
+++ b/gnu/usr.bin/binutils/gprof/gprof.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1983, 1998 Regents of the University of California.
+ * Copyright (c) 1983, 1998, 2001 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@@ -29,6 +29,7 @@
#include "hist.h"
#include "source.h"
#include "sym_ids.h"
+#include "demangle.h"
const char *whoami;
const char *function_mapping_file;
@@ -104,7 +105,7 @@ static struct option long_options[] =
/* various options to affect output: */
{"all-lines", no_argument, 0, 'x'},
- {"demangle", no_argument, 0, OPTION_DEMANGLE},
+ {"demangle", optional_argument, 0, OPTION_DEMANGLE},
{"no-demangle", no_argument, 0, OPTION_NO_DEMANGLE},
{"directory-path", required_argument, 0, 'I'},
{"display-unused-functions", no_argument, 0, 'z'},
@@ -153,7 +154,7 @@ Usage: %s [-[abcDhilLsTvwxyz]] [-[ACeEfFJnNOpPqQZ][name]] [-I dirs]\n\
[--no-static] [--print-path] [--separate-files]\n\
[--static-call-graph] [--sum] [--table-length=len] [--traditional]\n\
[--version] [--width=n] [--ignore-non-functions]\n\
- [--demangle] [--no-demangle]\n\
+ [--demangle[=STYLE]] [--no-demangle]\n\
[image-file] [profile-file...]\n"),
whoami);
if (status == 0)
@@ -179,7 +180,7 @@ DEFUN (main, (argc, argv), int argc AND char **argv)
xmalloc_set_program_name (whoami);
while ((ch = getopt_long (argc, argv,
- "aA::bBcCdD::e:E:f:F:hiI:J::k:lLm:n::N::O:p::P::q::Q::st:Tvw:xyzZ::",
+ "aA::bBcCd::De:E:f:F:hiI:J::k:lLm:n::N::O:p::P::q::Q::st:Tvw:xyzZ::",
long_options, 0))
!= EOF)
{
@@ -425,6 +426,21 @@ This program is free software. This program has absolutely no warranty.\n"));
break;
case OPTION_DEMANGLE:
demangle = TRUE;
+ if (optarg != NULL)
+ {
+ enum demangling_styles style;
+
+ style = cplus_demangle_name_to_style (optarg);
+ if (style == unknown_demangling)
+ {
+ fprintf (stderr,
+ _("%s: unknown demangling style `%s'\n"),
+ whoami, optarg);
+ xexit (1);
+ }
+
+ cplus_demangle_set_style (style);
+ }
break;
case OPTION_NO_DEMANGLE:
demangle = FALSE;
diff --git a/gnu/usr.bin/binutils/gprof/gprof.texi b/gnu/usr.bin/binutils/gprof/gprof.texi
index 6e1cfd01990..7bd5fb898de 100644
--- a/gnu/usr.bin/binutils/gprof/gprof.texi
+++ b/gnu/usr.bin/binutils/gprof/gprof.texi
@@ -1,5 +1,7 @@
\input texinfo @c -*-texinfo-*-
@setfilename gprof.info
+@c Copyright 1988, 1992, 1993, 1998, 1999, 2000, 2001
+@c Free Software Foundation, Inc.
@settitle GNU gprof
@setchapternewpage odd
@@ -18,9 +20,12 @@ This file documents the gprof profiler of the GNU system.
Copyright (C) 1988, 92, 97, 98, 99, 2000 Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
@ignore
Permission is granted to process this file through Tex and print the
@@ -29,13 +34,6 @@ notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
@end ifinfo
@finalout
@@ -56,24 +54,12 @@ execute programs. @sc{gnu} @code{gprof} was written by Jay Fenlason.
@vskip 0pt plus 1filll
Copyright @copyright{} 1988, 92, 97, 98, 99, 2000 Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-
-@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the same conditions as for modified versions.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
@end titlepage
@@ -86,6 +72,10 @@ can use it to determine which parts of a program are taking most of the
execution time. We assume that you know how to write, compile, and
execute programs. @sc{gnu} @code{gprof} was written by Jay Fenlason.
+This document is distributed under the terms of the GNU Free
+Documentation License. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+
@menu
* Introduction:: What profiling means, and why it is useful.
@@ -99,6 +89,7 @@ execute programs. @sc{gnu} @code{gprof} was written by Jay Fenlason.
* How do I?:: Answers to common questions
* Incompatibilities:: (between @sc{gnu} @code{gprof} and Unix @code{gprof}.)
* Details:: Details of how profiling is done
+* GNU Free Documentation License:: GNU Free Documentation License
@end menu
@end ifinfo
@@ -478,12 +469,14 @@ are annotated. If this option is specified, every line in
a basic-block is annotated by repeating the annotation for the
first line. This behavior is similar to @code{tcov}'s @samp{-a}.
-@item --demangle
+@item --demangle[=@var{style}]
@itemx --no-demangle
These options control whether C++ symbol names should be demangled when
printing output. The default is to demangle symbols. The
-@code{--no-demangle} option may be used to turn off demangling.
-
+@code{--no-demangle} option may be used to turn off demangling. Different
+compilers have different mangling styles. The optional demangling style
+argument can be used to choose an appropriate demangling style for your
+compiler.
@end table
@node Analysis Options,Miscellaneous Options,Output Options,Invoking
@@ -2017,6 +2010,369 @@ Shows symspec-to-symbol pattern matching operation
Tracks operation of @samp{-A} option
@end table
+@node GNU Free Documentation License
+@chapter GNU Free Documentation License
+
+ GNU Free Documentation License
+
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+@end smallexample
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
@contents
@bye
diff --git a/gnu/usr.bin/binutils/gprof/hist.c b/gnu/usr.bin/binutils/gprof/hist.c
index 56ef25a0a3c..ed360cdc8b6 100644
--- a/gnu/usr.bin/binutils/gprof/hist.c
+++ b/gnu/usr.bin/binutils/gprof/hist.c
@@ -1,6 +1,24 @@
-/*
- * Histogram related operations.
- */
+/* hist.c - Histogram related operations.
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include <stdio.h>
#include "libiberty.h"
#include "gprof.h"
@@ -16,25 +34,23 @@
static void scale_and_align_entries PARAMS ((void));
-/* declarations of automatically generated functions to output blurbs: */
+/* Declarations of automatically generated functions to output blurbs. */
extern void flat_blurb PARAMS ((FILE * fp));
-bfd_vma s_lowpc; /* lowest address in .text */
-bfd_vma s_highpc = 0; /* highest address in .text */
-bfd_vma lowpc, highpc; /* same, but expressed in UNITs */
-int hist_num_bins = 0; /* number of histogram samples */
-int *hist_sample = 0; /* histogram samples (shorts in the file!) */
+bfd_vma s_lowpc; /* Lowest address in .text. */
+bfd_vma s_highpc = 0; /* Highest address in .text. */
+bfd_vma lowpc, highpc; /* Same, but expressed in UNITs. */
+int hist_num_bins = 0; /* Number of histogram samples. */
+int *hist_sample = 0; /* Histogram samples (shorts in the file!). */
double hist_scale;
-char hist_dimension[sizeof (((struct gmon_hist_hdr *) 0)->dimen) + 1] =
- "seconds";
+char hist_dimension[16] = "seconds";
char hist_dimension_abbrev = 's';
-static double accum_time; /* accumulated time so far for print_line() */
-static double total_time; /* total time for all routines */
-/*
- * Table of SI prefixes for powers of 10 (used to automatically
- * scale some of the values in the flat profile).
- */
+static double accum_time; /* Accumulated time so far for print_line(). */
+static double total_time; /* Total time for all routines. */
+
+/* Table of SI prefixes for powers of 10 (used to automatically
+ scale some of the values in the flat profile). */
const struct
{
char prefix;
@@ -42,84 +58,46 @@ const struct
}
SItab[] =
{
- {
- 'T', 1e-12
- }
- , /* tera */
- {
- 'G', 1e-09
- }
- , /* giga */
- {
- 'M', 1e-06
- }
- , /* mega */
- {
- 'K', 1e-03
- }
- , /* kilo */
- {
- ' ', 1e-00
- }
- ,
- {
- 'm', 1e+03
- }
- , /* milli */
- {
- 'u', 1e+06
- }
- , /* micro */
- {
- 'n', 1e+09
- }
- , /* nano */
- {
- 'p', 1e+12
- }
- , /* pico */
- {
- 'f', 1e+15
- }
- , /* femto */
- {
- 'a', 1e+18
- }
- , /* ato */
+ { 'T', 1e-12 }, /* tera */
+ { 'G', 1e-09 }, /* giga */
+ { 'M', 1e-06 }, /* mega */
+ { 'K', 1e-03 }, /* kilo */
+ { ' ', 1e-00 },
+ { 'm', 1e+03 }, /* milli */
+ { 'u', 1e+06 }, /* micro */
+ { 'n', 1e+09 }, /* nano */
+ { 'p', 1e+12 }, /* pico */
+ { 'f', 1e+15 }, /* femto */
+ { 'a', 1e+18 } /* ato */
};
-/*
- * Read the histogram from file IFP. FILENAME is the name of IFP and
- * is provided for formatting error messages only.
- */
+
+/* Read the histogram from file IFP. FILENAME is the name of IFP and
+ is provided for formatting error messages only. */
+
void
DEFUN (hist_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
{
- struct gmon_hist_hdr hdr;
bfd_vma n_lowpc, n_highpc;
int i, ncnt, profrate;
UNIT count;
- if (fread (&hdr, sizeof (hdr), 1, ifp) != 1)
+ if (gmon_io_read_vma (ifp, &n_lowpc)
+ || gmon_io_read_vma (ifp, &n_highpc)
+ || gmon_io_read_32 (ifp, &ncnt)
+ || gmon_io_read_32 (ifp, &profrate)
+ || gmon_io_read (ifp, hist_dimension, 15)
+ || gmon_io_read (ifp, &hist_dimension_abbrev, 1))
{
fprintf (stderr, _("%s: %s: unexpected end of file\n"),
whoami, filename);
+
done (1);
}
- n_lowpc = (bfd_vma) get_vma (core_bfd, (bfd_byte *) hdr.low_pc);
- n_highpc = (bfd_vma) get_vma (core_bfd, (bfd_byte *) hdr.high_pc);
- ncnt = bfd_get_32 (core_bfd, (bfd_byte *) hdr.hist_size);
- profrate = bfd_get_32 (core_bfd, (bfd_byte *) hdr.prof_rate);
- strncpy (hist_dimension, hdr.dimen, sizeof (hdr.dimen));
- hist_dimension[sizeof (hdr.dimen)] = '\0';
- hist_dimension_abbrev = hdr.dimen_abbrev;
-
if (!s_highpc)
{
-
- /* this is the first histogram record: */
-
+ /* This is the first histogram record. */
s_lowpc = n_lowpc;
s_highpc = n_highpc;
lowpc = (bfd_vma) n_lowpc / sizeof (UNIT);
@@ -156,39 +134,37 @@ DEFUN (hist_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
if (fread (&count[0], sizeof (count), 1, ifp) != 1)
{
fprintf (stderr,
- _("%s: %s: unexpected EOF after reading %d of %d samples\n"),
+ _("%s: %s: unexpected EOF after reading %d of %d samples\n"),
whoami, filename, i, hist_num_bins);
done (1);
}
hist_sample[i] += bfd_get_16 (core_bfd, (bfd_byte *) & count[0]);
+ DBG (SAMPLEDEBUG,
+ printf ("[hist_read_rec] 0x%lx: %u\n",
+ (unsigned long) (n_lowpc + i * (n_highpc - n_lowpc) / ncnt),
+ hist_sample[i]));
}
}
-/*
- * Write execution histogram to file OFP. FILENAME is the name
- * of OFP and is provided for formatting error-messages only.
- */
+/* Write execution histogram to file OFP. FILENAME is the name
+ of OFP and is provided for formatting error-messages only. */
+
void
DEFUN (hist_write_hist, (ofp, filename), FILE * ofp AND const char *filename)
{
- struct gmon_hist_hdr hdr;
- unsigned char tag;
UNIT count;
int i;
- /* write header: */
+ /* Write header. */
- tag = GMON_TAG_TIME_HIST;
- put_vma (core_bfd, s_lowpc, (bfd_byte *) hdr.low_pc);
- put_vma (core_bfd, s_highpc, (bfd_byte *) hdr.high_pc);
- bfd_put_32 (core_bfd, hist_num_bins, (bfd_byte *) hdr.hist_size);
- bfd_put_32 (core_bfd, hz, (bfd_byte *) hdr.prof_rate);
- strncpy (hdr.dimen, hist_dimension, sizeof (hdr.dimen));
- hdr.dimen_abbrev = hist_dimension_abbrev;
-
- if (fwrite (&tag, sizeof (tag), 1, ofp) != 1
- || fwrite (&hdr, sizeof (hdr), 1, ofp) != 1)
+ if (gmon_io_write_8 (ofp, GMON_TAG_TIME_HIST)
+ || gmon_io_write_vma (ofp, s_lowpc)
+ || gmon_io_write_vma (ofp, s_highpc)
+ || gmon_io_write_32 (ofp, hist_num_bins)
+ || gmon_io_write_32 (ofp, hz)
+ || gmon_io_write (ofp, hist_dimension, 15)
+ || gmon_io_write (ofp, &hist_dimension_abbrev, 1))
{
perror (filename);
done (1);
@@ -197,6 +173,7 @@ DEFUN (hist_write_hist, (ofp, filename), FILE * ofp AND const char *filename)
for (i = 0; i < hist_num_bins; ++i)
{
bfd_put_16 (core_bfd, hist_sample[i], (bfd_byte *) & count[0]);
+
if (fwrite (&count[0], sizeof (count), 1, ofp) != 1)
{
perror (filename);
@@ -206,14 +183,13 @@ DEFUN (hist_write_hist, (ofp, filename), FILE * ofp AND const char *filename)
}
-/*
- * Calculate scaled entry point addresses (to save time in
- * hist_assign_samples), and, on architectures that have procedure
- * entry masks at the start of a function, possibly push the scaled
- * entry points over the procedure entry mask, if it turns out that
- * the entry point is in one bin and the code for a routine is in the
- * next bin.
- */
+/* Calculate scaled entry point addresses (to save time in
+ hist_assign_samples), and, on architectures that have procedure
+ entry masks at the start of a function, possibly push the scaled
+ entry points over the procedure entry mask, if it turns out that
+ the entry point is in one bin and the code for a routine is in the
+ next bin. */
+
static void
scale_and_align_entries ()
{
@@ -225,7 +201,8 @@ scale_and_align_entries ()
{
sym->hist.scaled_addr = sym->addr / sizeof (UNIT);
bin_of_entry = (sym->hist.scaled_addr - lowpc) / hist_scale;
- bin_of_code = (sym->hist.scaled_addr + UNITS_TO_CODE - lowpc) / hist_scale;
+ bin_of_code = ((sym->hist.scaled_addr + UNITS_TO_CODE - lowpc)
+ / hist_scale);
if (bin_of_entry < bin_of_code)
{
DBG (SAMPLEDEBUG,
@@ -239,44 +216,43 @@ scale_and_align_entries ()
}
-/*
- * Assign samples to the symbol to which they belong.
- *
- * Histogram bin I covers some address range [BIN_LOWPC,BIN_HIGH_PC)
- * which may overlap one more symbol address ranges. If a symbol
- * overlaps with the bin's address range by O percent, then O percent
- * of the bin's count is credited to that symbol.
- *
- * There are three cases as to where BIN_LOW_PC and BIN_HIGH_PC can be
- * with respect to the symbol's address range [SYM_LOW_PC,
- * SYM_HIGH_PC) as shown in the following diagram. OVERLAP computes
- * the distance (in UNITs) between the arrows, the fraction of the
- * sample that is to be credited to the symbol which starts at
- * SYM_LOW_PC.
- *
- * sym_low_pc sym_high_pc
- * | |
- * v v
- *
- * +-----------------------------------------------+
- * | |
- * | ->| |<- ->| |<- ->| |<- |
- * | | | | | |
- * +---------+ +---------+ +---------+
- *
- * ^ ^ ^ ^ ^ ^
- * | | | | | |
- * bin_low_pc bin_high_pc bin_low_pc bin_high_pc bin_low_pc bin_high_pc
- *
- * For the VAX we assert that samples will never fall in the first two
- * bytes of any routine, since that is the entry mask, thus we call
- * scale_and_align_entries() to adjust the entry points if the entry
- * mask falls in one bin but the code for the routine doesn't start
- * until the next bin. In conjunction with the alignment of routine
- * addresses, this should allow us to have only one sample for every
- * four bytes of text space and never have any overlap (the two end
- * cases, above).
- */
+/* Assign samples to the symbol to which they belong.
+
+ Histogram bin I covers some address range [BIN_LOWPC,BIN_HIGH_PC)
+ which may overlap one more symbol address ranges. If a symbol
+ overlaps with the bin's address range by O percent, then O percent
+ of the bin's count is credited to that symbol.
+
+ There are three cases as to where BIN_LOW_PC and BIN_HIGH_PC can be
+ with respect to the symbol's address range [SYM_LOW_PC,
+ SYM_HIGH_PC) as shown in the following diagram. OVERLAP computes
+ the distance (in UNITs) between the arrows, the fraction of the
+ sample that is to be credited to the symbol which starts at
+ SYM_LOW_PC.
+
+ sym_low_pc sym_high_pc
+ | |
+ v v
+
+ +-----------------------------------------------+
+ | |
+ | ->| |<- ->| |<- ->| |<- |
+ | | | | | |
+ +---------+ +---------+ +---------+
+
+ ^ ^ ^ ^ ^ ^
+ | | | | | |
+ bin_low_pc bin_high_pc bin_low_pc bin_high_pc bin_low_pc bin_high_pc
+
+ For the VAX we assert that samples will never fall in the first two
+ bytes of any routine, since that is the entry mask, thus we call
+ scale_and_align_entries() to adjust the entry points if the entry
+ mask falls in one bin but the code for the routine doesn't start
+ until the next bin. In conjunction with the alignment of routine
+ addresses, this should allow us to have only one sample for every
+ four bytes of text space and never have any overlap (the two end
+ cases, above). */
+
void
DEFUN_VOID (hist_assign_samples)
{
@@ -287,23 +263,22 @@ DEFUN_VOID (hist_assign_samples)
unsigned int j;
double time, credit;
- /* read samples and assign to symbols: */
+ /* Read samples and assign to symbols. */
hist_scale = highpc - lowpc;
hist_scale /= hist_num_bins;
scale_and_align_entries ();
- /* iterate over all sample bins: */
-
+ /* Iterate over all sample bins. */
for (i = 0, j = 1; i < hist_num_bins; ++i)
{
bin_count = hist_sample[i];
- if (!bin_count)
- {
- continue;
- }
+ if (! bin_count)
+ continue;
+
bin_low_pc = lowpc + (bfd_vma) (hist_scale * i);
bin_high_pc = lowpc + (bfd_vma) (hist_scale * (i + 1));
time = bin_count;
+
DBG (SAMPLEDEBUG,
printf (
"[assign_samples] bin_low_pc=0x%lx, bin_high_pc=0x%lx, bin_count=%d\n",
@@ -312,46 +287,40 @@ DEFUN_VOID (hist_assign_samples)
bin_count));
total_time += time;
- /* credit all symbols that are covered by bin I: */
-
+ /* Credit all symbols that are covered by bin I. */
for (j = j - 1; j < symtab.len; ++j)
{
sym_low_pc = symtab.base[j].hist.scaled_addr;
sym_high_pc = symtab.base[j + 1].hist.scaled_addr;
- /*
- * If high end of bin is below entry address, go for next
- * bin:
- */
+
+ /* If high end of bin is below entry address,
+ go for next bin. */
if (bin_high_pc < sym_low_pc)
- {
- break;
- }
- /*
- * If low end of bin is above high end of symbol, go for
- * next symbol.
- */
+ break;
+
+ /* If low end of bin is above high end of symbol,
+ go for next symbol. */
if (bin_low_pc >= sym_high_pc)
- {
- continue;
- }
+ continue;
+
overlap =
MIN (bin_high_pc, sym_high_pc) - MAX (bin_low_pc, sym_low_pc);
if (overlap > 0)
{
DBG (SAMPLEDEBUG,
printf (
- "[assign_samples] [0x%lx,0x%lx) %s gets %f ticks %ld overlap\n",
- (unsigned long) symtab.base[j].addr,
- (unsigned long) (sizeof (UNIT) * sym_high_pc),
- symtab.base[j].name, overlap * time / hist_scale,
- (long) overlap));
+ "[assign_samples] [0x%lx,0x%lx) %s gets %f ticks %ld overlap\n",
+ (unsigned long) symtab.base[j].addr,
+ (unsigned long) (sizeof (UNIT) * sym_high_pc),
+ symtab.base[j].name, overlap * time / hist_scale,
+ (long) overlap));
+
addr = symtab.base[j].addr;
credit = overlap * time / hist_scale;
- /*
- * Credit symbol if it appears in INCL_FLAT or that
- * table is empty and it does not appear it in
- * EXCL_FLAT.
- */
+
+ /* Credit symbol if it appears in INCL_FLAT or that
+ table is empty and it does not appear it in
+ EXCL_FLAT. */
if (sym_lookup (&syms[INCL_FLAT], addr)
|| (syms[INCL_FLAT].len == 0
&& !sym_lookup (&syms[EXCL_FLAT], addr)))
@@ -365,14 +334,14 @@ DEFUN_VOID (hist_assign_samples)
}
}
}
+
DBG (SAMPLEDEBUG, printf ("[assign_samples] total_time %f\n",
total_time));
}
-/*
- * Print header for flag histogram profile:
- */
+/* Print header for flag histogram profile. */
+
static void
DEFUN (print_header, (prefix), const char prefix)
{
@@ -398,12 +367,14 @@ DEFUN (print_header, (prefix), const char prefix)
if (total_time <= 0.0)
{
printf (_(" no time accumulated\n\n"));
- /* this doesn't hurt since all the numerators will be zero: */
+
+ /* This doesn't hurt since all the numerators will be zero. */
total_time = 1.0;
}
printf ("%5.5s %10.10s %8.8s %8.8s %8.8s %8.8s %-8.8s\n",
- "% ", _("cumulative"), _("self "), "", _("self "), _("total "), "");
+ "% ", _("cumulative"), _("self "), "", _("self "), _("total "),
+ "");
printf ("%5.5s %9.9s %8.8s %8.8s %8.8s %8.8s %-8.8s\n",
_("time"), hist_dimension, hist_dimension, _("calls"), unit, unit,
_("name"));
@@ -414,50 +385,39 @@ static void
DEFUN (print_line, (sym, scale), Sym * sym AND double scale)
{
if (ignore_zeros && sym->ncalls == 0 && sym->hist.time == 0)
- {
- return;
- }
+ return;
accum_time += sym->hist.time;
+
if (bsd_style_output)
- {
- printf ("%5.1f %10.2f %8.2f",
- total_time > 0.0 ? 100 * sym->hist.time / total_time : 0.0,
- accum_time / hz, sym->hist.time / hz);
- }
+ printf ("%5.1f %10.2f %8.2f",
+ total_time > 0.0 ? 100 * sym->hist.time / total_time : 0.0,
+ accum_time / hz, sym->hist.time / hz);
else
- {
- printf ("%6.2f %9.2f %8.2f",
- total_time > 0.0 ? 100 * sym->hist.time / total_time : 0.0,
- accum_time / hz, sym->hist.time / hz);
- }
+ printf ("%6.2f %9.2f %8.2f",
+ total_time > 0.0 ? 100 * sym->hist.time / total_time : 0.0,
+ accum_time / hz, sym->hist.time / hz);
+
if (sym->ncalls != 0)
- {
- printf (" %8lu %8.2f %8.2f ",
- sym->ncalls, scale * sym->hist.time / hz / sym->ncalls,
- scale * (sym->hist.time + sym->cg.child_time) / hz / sym->ncalls);
- }
+ printf (" %8lu %8.2f %8.2f ",
+ sym->ncalls, scale * sym->hist.time / hz / sym->ncalls,
+ scale * (sym->hist.time + sym->cg.child_time) / hz / sym->ncalls);
else
- {
- printf (" %8.8s %8.8s %8.8s ", "", "", "");
- }
+ printf (" %8.8s %8.8s %8.8s ", "", "", "");
+
if (bsd_style_output)
- {
- print_name (sym);
- }
+ print_name (sym);
else
- {
- print_name_only (sym);
- }
+ print_name_only (sym);
+
printf ("\n");
}
-/*
- * Compare LP and RP. The primary comparison key is execution time,
- * the secondary is number of invocation, and the tertiary is the
- * lexicographic order of the function names.
- */
+/* Compare LP and RP. The primary comparison key is execution time,
+ the secondary is number of invocation, and the tertiary is the
+ lexicographic order of the function names. */
+
static int
DEFUN (cmp_time, (lp, rp), const PTR lp AND const PTR rp)
{
@@ -466,31 +426,25 @@ DEFUN (cmp_time, (lp, rp), const PTR lp AND const PTR rp)
double time_diff;
time_diff = right->hist.time - left->hist.time;
+
if (time_diff > 0.0)
- {
- return 1;
- }
+ return 1;
+
if (time_diff < 0.0)
- {
- return -1;
- }
+ return -1;
if (right->ncalls > left->ncalls)
- {
- return 1;
- }
+ return 1;
+
if (right->ncalls < left->ncalls)
- {
- return -1;
- }
+ return -1;
return strcmp (left->name, right->name);
}
-/*
- * Print the flat histogram profile.
- */
+/* Print the flat histogram profile. */
+
void
DEFUN_VOID (hist_print)
{
@@ -501,15 +455,12 @@ DEFUN_VOID (hist_print)
bfd_vma addr;
if (first_output)
- {
- first_output = FALSE;
- }
+ first_output = FALSE;
else
- {
- printf ("\f\n");
- }
+ printf ("\f\n");
accum_time = 0.0;
+
if (bsd_style_output)
{
if (print_descriptions)
@@ -522,36 +473,36 @@ DEFUN_VOID (hist_print)
{
printf (_("Flat profile:\n"));
}
- /*
- * Sort the symbol table by time (call-count and name as secondary
- * and tertiary keys):
- */
+
+ /* Sort the symbol table by time (call-count and name as secondary
+ and tertiary keys). */
time_sorted_syms = (Sym **) xmalloc (symtab.len * sizeof (Sym *));
+
for (index = 0; index < symtab.len; ++index)
- {
- time_sorted_syms[index] = &symtab.base[index];
- }
+ time_sorted_syms[index] = &symtab.base[index];
+
qsort (time_sorted_syms, symtab.len, sizeof (Sym *), cmp_time);
if (bsd_style_output)
{
- log_scale = 5; /* milli-seconds is BSD-default */
+ log_scale = 5; /* Milli-seconds is BSD-default. */
}
else
{
- /*
- * Search for symbol with highest per-call execution time and
- * scale accordingly:
- */
+ /* Search for symbol with highest per-call
+ execution time and scale accordingly. */
log_scale = 0;
top_dog = 0;
top_time = 0.0;
+
for (index = 0; index < symtab.len; ++index)
{
sym = time_sorted_syms[index];
+
if (sym->ncalls != 0)
{
time = (sym->hist.time + sym->cg.child_time) / sym->ncalls;
+
if (time > top_time)
{
top_dog = sym;
@@ -559,9 +510,11 @@ DEFUN_VOID (hist_print)
}
}
}
+
if (top_dog && top_dog->ncalls != 0 && top_time > 0.0)
{
top_time /= hz;
+
while (SItab[log_scale].scale * top_time < 1000.0
&& ((size_t) log_scale
< sizeof (SItab) / sizeof (SItab[0]) - 1))
@@ -571,30 +524,25 @@ DEFUN_VOID (hist_print)
}
}
- /*
- * For now, the dimension is always seconds. In the future, we
- * may also want to support other (pseudo-)dimensions (such as
- * I-cache misses etc.).
- */
+ /* For now, the dimension is always seconds. In the future, we
+ may also want to support other (pseudo-)dimensions (such as
+ I-cache misses etc.). */
print_header (SItab[log_scale].prefix);
+
for (index = 0; index < symtab.len; ++index)
{
addr = time_sorted_syms[index]->addr;
- /*
- * Print symbol if its in INCL_FLAT table or that table
- * is empty and the symbol is not in EXCL_FLAT.
- */
+
+ /* Print symbol if its in INCL_FLAT table or that table
+ is empty and the symbol is not in EXCL_FLAT. */
if (sym_lookup (&syms[INCL_FLAT], addr)
|| (syms[INCL_FLAT].len == 0
&& !sym_lookup (&syms[EXCL_FLAT], addr)))
- {
- print_line (time_sorted_syms[index], SItab[log_scale].scale);
- }
+ print_line (time_sorted_syms[index], SItab[log_scale].scale);
}
+
free (time_sorted_syms);
if (print_descriptions && !bsd_style_output)
- {
- flat_blurb (stdout);
- }
+ flat_blurb (stdout);
}
diff --git a/gnu/usr.bin/binutils/gprof/i386.c b/gnu/usr.bin/binutils/gprof/i386.c
index 760d5516fe8..338a443d991 100644
--- a/gnu/usr.bin/binutils/gprof/i386.c
+++ b/gnu/usr.bin/binutils/gprof/i386.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1983 Regents of the University of California.
+ * Copyright (c) 1983, 2001 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@@ -71,7 +71,7 @@ i386_find_call (parent, p_lowpc, p_highpc)
(unsigned long) (instructp - (unsigned char *) delta)));
/*
* regular pc relative addressing
- * check that this is the address of
+ * check that this is the address of
* a function.
*/
diff --git a/gnu/usr.bin/binutils/gprof/search_list.c b/gnu/usr.bin/binutils/gprof/search_list.c
index ca2928935c0..743fbdac608 100644
--- a/gnu/usr.bin/binutils/gprof/search_list.c
+++ b/gnu/usr.bin/binutils/gprof/search_list.c
@@ -1,3 +1,24 @@
+/* search-list.c
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include "libiberty.h"
#include "gprof.h"
#include "search_list.h"
@@ -16,28 +37,24 @@ DEFUN (search_list_append, (list, paths),
{
beg = colon + 1;
colon = strchr (beg, PATH_SEP_CHAR);
+
if (colon)
- {
- len = colon - beg;
- }
+ len = colon - beg;
else
- {
- len = strlen (beg);
- }
+ len = strlen (beg);
+
new_el = (Search_List_Elem *) xmalloc (sizeof (*new_el) + len);
memcpy (new_el->path, beg, len);
new_el->path[len] = '\0';
- /* append new path at end of list: */
+ /* Append new path at end of list. */
new_el->next = 0;
+
if (list->tail)
- {
- list->tail->next = new_el;
- }
+ list->tail->next = new_el;
else
- {
- list->head = new_el;
- }
+ list->head = new_el;
+
list->tail = new_el;
}
while (colon);
diff --git a/gnu/usr.bin/binutils/gprof/search_list.h b/gnu/usr.bin/binutils/gprof/search_list.h
index 6f5acae934f..56361df3f74 100644
--- a/gnu/usr.bin/binutils/gprof/search_list.h
+++ b/gnu/usr.bin/binutils/gprof/search_list.h
@@ -1,3 +1,23 @@
+/* search-list.h
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
#ifndef search_list_h
#define search_list_h
@@ -23,6 +43,6 @@ typedef struct
}
Search_List;
-extern void search_list_append PARAMS ((Search_List * list, const char *paths));
+extern void search_list_append PARAMS ((Search_List *, const char *));
#endif /* search_list_h */
diff --git a/gnu/usr.bin/binutils/gprof/source.c b/gnu/usr.bin/binutils/gprof/source.c
index 039e8760138..7b9401f60ad 100644
--- a/gnu/usr.bin/binutils/gprof/source.c
+++ b/gnu/usr.bin/binutils/gprof/source.c
@@ -1,21 +1,36 @@
-/*
- * Keeps track of source files.
- */
+/* source.c - Keep track of source files.
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include "gprof.h"
#include "libiberty.h"
#include "filenames.h"
#include "search_list.h"
#include "source.h"
-#define EXT_ANNO "-ann" /* postfix of annotated files */
+#define EXT_ANNO "-ann" /* Postfix of annotated files. */
-/*
- * Default option values:
- */
+/* Default option values. */
bool create_annotation_files = FALSE;
-Search_List src_search_list =
-{0, 0};
+Search_List src_search_list = {0, 0};
Source_File *first_src_file = 0;
@@ -27,20 +42,21 @@ DEFUN (source_file_lookup_path, (path), const char *path)
for (sf = first_src_file; sf; sf = sf->next)
{
if (FILENAME_CMP (path, sf->name) == 0)
- {
- break;
- }
+ break;
}
+
if (!sf)
{
- /* create a new source file descriptor: */
-
+ /* Create a new source file descriptor. */
sf = (Source_File *) xmalloc (sizeof (*sf));
+
memset (sf, 0, sizeof (*sf));
+
sf->name = xstrdup (path);
sf->next = first_src_file;
first_src_file = sf;
}
+
return sf;
}
@@ -50,28 +66,24 @@ DEFUN (source_file_lookup_name, (filename), const char *filename)
{
const char *fname;
Source_File *sf;
- /*
- * The user cannot know exactly how a filename will be stored in
- * the debugging info (e.g., ../include/foo.h
- * vs. /usr/include/foo.h). So we simply compare the filename
- * component of a path only:
- */
+
+ /* The user cannot know exactly how a filename will be stored in
+ the debugging info (e.g., ../include/foo.h
+ vs. /usr/include/foo.h). So we simply compare the filename
+ component of a path only. */
for (sf = first_src_file; sf; sf = sf->next)
{
fname = strrchr (sf->name, '/');
+
if (fname)
- {
- ++fname;
- }
+ ++fname;
else
- {
- fname = sf->name;
- }
+ fname = sf->name;
+
if (FILENAME_CMP (filename, fname) == 0)
- {
- break;
- }
+ break;
}
+
return sf;
}
@@ -91,32 +103,30 @@ DEFUN (annotate_source, (sf, max_width, annote, arg),
FILE *ifp, *ofp;
Search_List_Elem *sle = src_search_list.head;
- /*
- * Open input file. If open fails, walk along search-list until
- * open succeeds or reaching end of list:
- */
+ /* Open input file. If open fails, walk along search-list until
+ open succeeds or reaching end of list. */
strcpy (fname, sf->name);
+
if (IS_ABSOLUTE_PATH (sf->name))
- {
- sle = 0; /* don't use search list for absolute paths */
- }
+ sle = 0; /* Don't use search list for absolute paths. */
+
name_only = 0;
while (TRUE)
{
DBG (SRCDEBUG, printf ("[annotate_source]: looking for %s, trying %s\n",
sf->name, fname));
+
ifp = fopen (fname, FOPEN_RB);
if (ifp)
- {
- break;
- }
+ break;
+
if (!sle && !name_only)
{
name_only = strrchr (sf->name, '/');
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
{
char *bslash = strrchr (sf->name, '\\');
- if (bslash > name_only)
+ if (name_only == NULL || (bslash != NULL && bslash > name_only))
name_only = bslash;
if (name_only == NULL && sf->name[0] != '\0' && sf->name[1] == ':')
name_only = (char *)sf->name + 1;
@@ -124,11 +134,12 @@ DEFUN (annotate_source, (sf, max_width, annote, arg),
#endif
if (name_only)
{
- /* try search-list again, but this time with name only: */
+ /* Try search-list again, but this time with name only. */
++name_only;
sle = src_search_list.head;
}
}
+
if (sle)
{
strcpy (fname, sle->path);
@@ -138,56 +149,48 @@ DEFUN (annotate_source, (sf, max_width, annote, arg),
strcat (fname, ".");
#endif
strcat (fname, "/");
+
if (name_only)
- {
- strcat (fname, name_only);
- }
+ strcat (fname, name_only);
else
- {
- strcat (fname, sf->name);
- }
+ strcat (fname, sf->name);
+
sle = sle->next;
}
else
{
if (errno == ENOENT)
- {
- fprintf (stderr, _("%s: could not locate `%s'\n"),
- whoami, sf->name);
- }
+ fprintf (stderr, _("%s: could not locate `%s'\n"),
+ whoami, sf->name);
else
- {
- perror (sf->name);
- }
+ perror (sf->name);
+
return 0;
}
}
ofp = stdout;
+
if (create_annotation_files)
{
- /* try to create annotated source file: */
+ /* Try to create annotated source file. */
const char *filename;
- /* create annotation files in the current working directory: */
+ /* Create annotation files in the current working directory. */
filename = strrchr (sf->name, '/');
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
{
char *bslash = strrchr (sf->name, '\\');
- if (bslash > filename)
+ if (filename == NULL || (bslash != NULL && bslash > filename))
filename = bslash;
if (filename == NULL && sf->name[0] != '\0' && sf->name[1] == ':')
filename = sf->name + 1;
}
#endif
if (filename)
- {
- ++filename;
- }
+ ++filename;
else
- {
- filename = sf->name;
- }
+ filename = sf->name;
strcpy (fname, filename);
strcat (fname, EXT_ANNO);
@@ -210,6 +213,7 @@ DEFUN (annotate_source, (sf, max_width, annote, arg),
}
#endif
ofp = fopen (fname, "w");
+
if (!ofp)
{
perror (fname);
@@ -217,34 +221,27 @@ DEFUN (annotate_source, (sf, max_width, annote, arg),
}
}
- /*
- * Print file names if output goes to stdout and there are
- * more than one source file:
- */
+ /* Print file names if output goes to stdout
+ and there are more than one source file. */
if (ofp == stdout)
{
if (first_file)
- {
- first_file = FALSE;
- }
+ first_file = FALSE;
else
- {
- fputc ('\n', ofp);
- }
+ fputc ('\n', ofp);
+
if (first_output)
- {
- first_output = FALSE;
- }
+ first_output = FALSE;
else
- {
- fprintf (ofp, "\f\n");
- }
+ fprintf (ofp, "\f\n");
+
fprintf (ofp, _("*** File %s:\n"), sf->name);
}
annotation = xmalloc (max_width + 1);
line_num = 1;
new_line = TRUE;
+
while ((nread = fread (buf, 1, sizeof (buf), ifp)) > 0)
{
for (i = 0; i < nread; ++i)
@@ -256,10 +253,12 @@ DEFUN (annotate_source, (sf, max_width, annote, arg),
++line_num;
new_line = FALSE;
}
+
new_line = (buf[i] == '\n');
fputc (buf[i], ofp);
}
}
+
free (annotation);
return ofp;
}
diff --git a/gnu/usr.bin/binutils/gprof/source.h b/gnu/usr.bin/binutils/gprof/source.h
index b33bad3e0a6..58a4e976a1b 100644
--- a/gnu/usr.bin/binutils/gprof/source.h
+++ b/gnu/usr.bin/binutils/gprof/source.h
@@ -1,3 +1,23 @@
+/* source.h
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
#ifndef source_h
#define source_h
@@ -8,48 +28,37 @@
typedef struct source_file
{
struct source_file *next;
- const char *name; /* name of source file */
- unsigned long ncalls; /* # of "calls" to this file */
- int num_lines; /* # of lines in file */
- int nalloced; /* number of lines allocated */
- void **line; /* usage-dependent per-line data */
+ const char *name; /* Name of source file. */
+ unsigned long ncalls; /* # of "calls" to this file. */
+ int num_lines; /* # of lines in file. */
+ int nalloced; /* Number of lines allocated. */
+ void **line; /* Usage-dependent per-line data. */
}
Source_File;
-/*
- * Options:
- */
-extern bool create_annotation_files; /* create annotated output files? */
+/* Options. */
+extern bool create_annotation_files; /* Create annotated output files? */
-/*
- * List of directories to search for source files:
- */
+/* List of directories to search for source files. */
extern Search_List src_search_list;
-/*
- * Chain of source-file descriptors:
- */
+/* Chain of source-file descriptors. */
extern Source_File *first_src_file;
-/*
- * Returns pointer to source file descriptor for PATH/FILENAME.
- */
-extern Source_File *source_file_lookup_path PARAMS ((const char *path));
-extern Source_File *source_file_lookup_name PARAMS ((const char *filename));
-
-/*
- * Read source file SF output annotated source. The annotation is at
- * MAX_WIDTH characters wide and for each source-line an annotation is
- * obtained by invoking function ANNOTE. ARG is an argument passed to
- * ANNOTE that is left uninterpreted by annotate_source().
- *
- * Returns a pointer to the output file (which maybe stdout) such
- * that summary statistics can be printed. If the returned file
- * is not stdout, it should be closed when done with it.
- */
+/* Returns pointer to source file descriptor for PATH/FILENAME. */
+extern Source_File *source_file_lookup_path PARAMS ((const char *));
+extern Source_File *source_file_lookup_name PARAMS ((const char *));
+
+/* Read source file SF output annotated source. The annotation is at
+ MAX_WIDTH characters wide and for each source-line an annotation is
+ obtained by invoking function ANNOTE. ARG is an argument passed to
+ ANNOTE that is left uninterpreted by annotate_source().
+
+ Returns a pointer to the output file (which maybe stdout) such
+ that summary statistics can be printed. If the returned file
+ is not stdout, it should be closed when done with it. */
extern FILE *annotate_source PARAMS ((Source_File * sf, int max_width,
void (*annote) (char *b, int w, int l,
void *arg),
void *arg));
-
#endif /* source_h */
diff --git a/gnu/usr.bin/binutils/gprof/sym_ids.c b/gnu/usr.bin/binutils/gprof/sym_ids.c
index 1e05914c952..f98ccbfe55c 100644
--- a/gnu/usr.bin/binutils/gprof/sym_ids.c
+++ b/gnu/usr.bin/binutils/gprof/sym_ids.c
@@ -1,3 +1,24 @@
+/* sym_ids.c
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include <ctype.h>
#include "libiberty.h"
@@ -7,14 +28,15 @@
struct sym_id
{
struct sym_id *next;
- char *spec; /* parsing modifies this */
+ char *spec; /* Parsing modifies this. */
Table_Id which_table;
bool has_right;
+
struct match
{
- int prev_index; /* index of prev match */
- Sym *prev_match; /* previous match */
- Sym *first_match; /* chain of all matches */
+ int prev_index; /* Index of prev match. */
+ Sym *prev_match; /* Previous match. */
+ Sym *first_match; /* Chain of all matches. */
Sym sym;
}
left, right;
@@ -35,13 +57,11 @@ const char *table_name[] =
};
#endif /* DEBUG */
-/*
- * This is the table in which we keep all the syms that match
- * the right half of an arc id. It is NOT sorted according
- * to the addresses, because it is accessed only through
- * the left half's CHILDREN pointers (so it's crucial not
- * to reorder this table once pointers into it exist).
- */
+/* This is the table in which we keep all the syms that match
+ the right half of an arc id. It is NOT sorted according
+ to the addresses, because it is accessed only through
+ the left half's CHILDREN pointers (so it's crucial not
+ to reorder this table once pointers into it exist). */
static Sym_Table right_ids;
static Source_File non_existent_file =
@@ -69,17 +89,16 @@ DEFUN (sym_id_add, (spec, which_table),
}
-/*
- * A spec has the syntax FILENAME:(FUNCNAME|LINENUM). As a convenience
- * to the user, a spec without a colon is interpreted as:
- *
- * (i) a FILENAME if it contains a dot
- * (ii) a FUNCNAME if it starts with a non-digit character
- * (iii) a LINENUM if it starts with a digit
- *
- * A FUNCNAME containing a dot can be specified by :FUNCNAME, a
- * FILENAME not containing a dot can be specified by FILENAME:.
- */
+/* A spec has the syntax FILENAME:(FUNCNAME|LINENUM). As a convenience
+ to the user, a spec without a colon is interpreted as:
+
+ (i) a FILENAME if it contains a dot
+ (ii) a FUNCNAME if it starts with a non-digit character
+ (iii) a LINENUM if it starts with a digit
+
+ A FUNCNAME containing a dot can be specified by :FUNCNAME, a
+ FILENAME not containing a dot can be specified by FILENAME. */
+
static void
DEFUN (parse_spec, (spec, sym), char *spec AND Sym * sym)
{
@@ -87,40 +106,38 @@ DEFUN (parse_spec, (spec, sym), char *spec AND Sym * sym)
sym_init (sym);
colon = strrchr (spec, ':');
+
if (colon)
{
*colon = '\0';
+
if (colon > spec)
{
sym->file = source_file_lookup_name (spec);
+
if (!sym->file)
- {
- sym->file = &non_existent_file;
- }
+ sym->file = &non_existent_file;
}
+
spec = colon + 1;
+
if (strlen (spec))
{
if (isdigit ((unsigned char) spec[0]))
- {
- sym->line_num = atoi (spec);
- }
+ sym->line_num = atoi (spec);
else
- {
- sym->name = spec;
- }
+ sym->name = spec;
}
}
else if (strlen (spec))
{
- /* no colon: spec is a filename if it contains a dot: */
+ /* No colon: spec is a filename if it contains a dot. */
if (strchr (spec, '.'))
{
sym->file = source_file_lookup_name (spec);
+
if (!sym->file)
- {
- sym->file = &non_existent_file;
- }
+ sym->file = &non_existent_file;
}
else if (isdigit ((unsigned char) *spec))
{
@@ -134,10 +151,9 @@ DEFUN (parse_spec, (spec, sym), char *spec AND Sym * sym)
}
-/*
- * A symbol id has the syntax SPEC[/SPEC], where SPEC is is defined
- * by parse_spec().
- */
+/* A symbol id has the syntax SPEC[/SPEC], where SPEC is is defined
+ by parse_spec(). */
+
static void
DEFUN (parse_id, (id), struct sym_id *id)
{
@@ -158,44 +174,35 @@ DEFUN (parse_id, (id), struct sym_id *id)
if (debug_level & IDDEBUG)
{
printf ("%s:", id->left.sym.file ? id->left.sym.file->name : "*");
+
if (id->left.sym.name)
- {
- printf ("%s", id->left.sym.name);
- }
+ printf ("%s", id->left.sym.name);
else if (id->left.sym.line_num)
- {
- printf ("%d", id->left.sym.line_num);
- }
+ printf ("%d", id->left.sym.line_num);
else
- {
- printf ("*");
- }
+ printf ("*");
+
if (id->has_right)
{
printf ("/%s:",
id->right.sym.file ? id->right.sym.file->name : "*");
+
if (id->right.sym.name)
- {
- printf ("%s", id->right.sym.name);
- }
+ printf ("%s", id->right.sym.name);
else if (id->right.sym.line_num)
- {
- printf ("%d", id->right.sym.line_num);
- }
+ printf ("%d", id->right.sym.line_num);
else
- {
- printf ("*");
- }
+ printf ("*");
}
+
printf ("\n");
}
#endif
}
-/*
- * Return TRUE iff PATTERN matches SYM.
- */
+/* Return TRUE iff PATTERN matches SYM. */
+
static bool
DEFUN (match, (pattern, sym), Sym * pattern AND Sym * sym)
{
@@ -214,37 +221,36 @@ DEFUN (extend_match, (m, sym, tab, second_pass),
{
if (m->prev_match != sym - 1)
{
- /* discontinuity: add new match to table: */
+ /* Discontinuity: add new match to table. */
if (second_pass)
{
tab->base[tab->len] = *sym;
m->prev_index = tab->len;
- /* link match into match's chain: */
+ /* Link match into match's chain. */
tab->base[tab->len].next = m->first_match;
m->first_match = &tab->base[tab->len];
}
+
++tab->len;
}
- /* extend match to include this symbol: */
+ /* Extend match to include this symbol. */
if (second_pass)
- {
- tab->base[m->prev_index].end_addr = sym->end_addr;
- }
+ tab->base[m->prev_index].end_addr = sym->end_addr;
+
m->prev_match = sym;
}
-/*
- * Go through sym_id list produced by option processing and fill
- * in the various symbol tables indicating what symbols should
- * be displayed or suppressed for the various kinds of outputs.
- *
- * This can potentially produce huge tables and in particulars
- * tons of arcs, but this happens only if the user makes silly
- * requests---you get what you ask for!
- */
+/* Go through sym_id list produced by option processing and fill
+ in the various symbol tables indicating what symbols should
+ be displayed or suppressed for the various kinds of outputs.
+
+ This can potentially produce huge tables and in particulars
+ tons of arcs, but this happens only if the user makes silly
+ requests---you get what you ask for! */
+
void
DEFUN_VOID (sym_id_parse)
{
@@ -252,33 +258,24 @@ DEFUN_VOID (sym_id_parse)
struct sym_id *id;
Sym_Table *tab;
- /*
- * Convert symbol ids into Syms, so we can deal with them more easily:
- */
+ /* Convert symbol ids into Syms, so we can deal with them more easily. */
for (id = id_list; id; id = id->next)
- {
- parse_id (id);
- }
-
- /* first determine size of each table: */
+ parse_id (id);
+ /* First determine size of each table. */
for (sym = symtab.base; sym < symtab.limit; ++sym)
{
for (id = id_list; id; id = id->next)
{
if (match (&id->left.sym, sym))
- {
- extend_match (&id->left, sym, &syms[id->which_table], FALSE);
- }
+ extend_match (&id->left, sym, &syms[id->which_table], FALSE);
+
if (id->has_right && match (&id->right.sym, sym))
- {
- extend_match (&id->right, sym, &right_ids, FALSE);
- }
+ extend_match (&id->right, sym, &right_ids, FALSE);
}
}
- /* create tables of appropriate size and reset lengths: */
-
+ /* Create tables of appropriate size and reset lengths. */
for (tab = syms; tab < &syms[NUM_TABLES]; ++tab)
{
if (tab->len)
@@ -288,6 +285,7 @@ DEFUN_VOID (sym_id_parse)
tab->len = 0;
}
}
+
if (right_ids.len)
{
right_ids.base = (Sym *) xmalloc (right_ids.len * sizeof (Sym));
@@ -295,25 +293,20 @@ DEFUN_VOID (sym_id_parse)
right_ids.len = 0;
}
- /* make a second pass through symtab, creating syms as necessary: */
-
+ /* Make a second pass through symtab, creating syms as necessary. */
for (sym = symtab.base; sym < symtab.limit; ++sym)
{
for (id = id_list; id; id = id->next)
{
if (match (&id->left.sym, sym))
- {
- extend_match (&id->left, sym, &syms[id->which_table], TRUE);
- }
+ extend_match (&id->left, sym, &syms[id->which_table], TRUE);
+
if (id->has_right && match (&id->right.sym, sym))
- {
- extend_match (&id->right, sym, &right_ids, TRUE);
- }
+ extend_match (&id->right, sym, &right_ids, TRUE);
}
}
- /* go through ids creating arcs as needed: */
-
+ /* Go through ids creating arcs as needed. */
for (id = id_list; id; id = id->next)
{
if (id->has_right)
@@ -334,14 +327,14 @@ DEFUN_VOID (sym_id_parse)
(unsigned long) right->addr,
(unsigned long) right->end_addr,
table_name[id->which_table]));
+
arc_add (left, right, (unsigned long) 0);
}
}
}
}
- /* finally, we can sort the tables and we're done: */
-
+ /* Finally, we can sort the tables and we're done. */
for (tab = &syms[0]; tab < &syms[NUM_TABLES]; ++tab)
{
DBG (IDDEBUG, printf ("[sym_id_parse] syms[%s]:\n",
@@ -351,14 +344,12 @@ DEFUN_VOID (sym_id_parse)
}
-/*
- * Symbol tables storing the FROM symbols of arcs do not necessarily
- * have distinct address ranges. For example, somebody might request
- * -k /_mcount to suppress any arcs into _mcount, while at the same
- * time requesting -k a/b. Fortunately, those symbol tables don't get
- * very big (the user has to type them!), so a linear search is probably
- * tolerable.
- */
+/* Symbol tables storing the FROM symbols of arcs do not necessarily
+ have distinct address ranges. For example, somebody might request
+ -k /_mcount to suppress any arcs into _mcount, while at the same
+ time requesting -k a/b. Fortunately, those symbol tables don't get
+ very big (the user has to type them!), so a linear search is probably
+ tolerable. */
bool
DEFUN (sym_id_arc_is_present, (symtab, from, to),
Sym_Table * symtab AND Sym * from AND Sym * to)
@@ -369,9 +360,8 @@ DEFUN (sym_id_arc_is_present, (symtab, from, to),
{
if (from->addr >= sym->addr && from->addr <= sym->end_addr
&& arc_lookup (sym, to))
- {
- return TRUE;
- }
+ return TRUE;
}
+
return FALSE;
}
diff --git a/gnu/usr.bin/binutils/gprof/symtab.c b/gnu/usr.bin/binutils/gprof/symtab.c
index e4fda46533f..6b5a093d067 100644
--- a/gnu/usr.bin/binutils/gprof/symtab.c
+++ b/gnu/usr.bin/binutils/gprof/symtab.c
@@ -1,3 +1,24 @@
+/* symtab.c
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
#include "gprof.h"
#include "cg_arcs.h"
#include "corefile.h"
@@ -6,17 +27,15 @@
Sym_Table symtab;
-/*
- * Initialize a symbol (so it's empty).
- */
+/* Initialize a symbol (so it's empty). */
+
void
DEFUN (sym_init, (sym), Sym * sym)
{
memset (sym, 0, sizeof (*sym));
- /*
- * It is not safe to assume that a binary zero corresponds to
- * a floating-point 0.0, so initialize floats explicitly:
- */
+
+ /* It is not safe to assume that a binary zero corresponds
+ to a floating-point 0.0, so initialize floats explicitly. */
sym->hist.time = 0.0;
sym->cg.child_time = 0.0;
sym->cg.prop.fract = 0.0;
@@ -25,16 +44,15 @@ DEFUN (sym_init, (sym), Sym * sym)
}
-/*
- * Compare the function entry-point of two symbols and return <0, =0,
- * or >0 depending on whether the left value is smaller than, equal
- * to, or greater than the right value. If two symbols are equal
- * but one has is_func set and the other doesn't, we make the
- * non-function symbol one "bigger" so that the function symbol will
- * survive duplicate removal. Finally, if both symbols have the
- * same is_func value, we discriminate against is_static such that
- * the global symbol survives.
- */
+/* Compare the function entry-point of two symbols and return <0, =0,
+ or >0 depending on whether the left value is smaller than, equal
+ to, or greater than the right value. If two symbols are equal
+ but one has is_func set and the other doesn't, we make the
+ non-function symbol one "bigger" so that the function symbol will
+ survive duplicate removal. Finally, if both symbols have the
+ same is_func value, we discriminate against is_static such that
+ the global symbol survives. */
+
static int
DEFUN (cmp_addr, (lp, rp), const PTR lp AND const PTR rp)
{
@@ -42,18 +60,12 @@ DEFUN (cmp_addr, (lp, rp), const PTR lp AND const PTR rp)
Sym *right = (Sym *) rp;
if (left->addr > right->addr)
- {
- return 1;
- }
+ return 1;
else if (left->addr < right->addr)
- {
- return -1;
- }
+ return -1;
if (left->is_func != right->is_func)
- {
- return right->is_func - left->is_func;
- }
+ return right->is_func - left->is_func;
return left->is_static - right->is_static;
}
@@ -66,33 +78,26 @@ DEFUN (symtab_finalize, (tab), Sym_Table * tab)
bfd_vma prev_addr;
if (!tab->len)
- {
- return;
- }
+ return;
- /*
- * Sort symbol table in order of increasing function addresses:
- */
+ /* Sort symbol table in order of increasing function addresses. */
qsort (tab->base, tab->len, sizeof (Sym), cmp_addr);
- /*
- * Remove duplicate entries to speed-up later processing and
- * set end_addr if its not set yet:
- */
+ /* Remove duplicate entries to speed-up later processing and
+ set end_addr if its not set yet. */
prev_addr = tab->base[0].addr + 1;
+
for (src = dst = tab->base; src < tab->limit; ++src)
{
if (src->addr == prev_addr)
{
- /*
- * If same address, favor global symbol over static one,
- * then function over line number. If both symbols are
- * either static or global and either function or line, check
- * whether one has name beginning with underscore while
- * the other doesn't. In such cases, keep sym without
- * underscore. This takes cares of compiler generated
- * symbols (such as __gnu_compiled, __c89_used, etc.).
- */
+ /* If same address, favor global symbol over static one,
+ then function over line number. If both symbols are
+ either static or global and either function or line, check
+ whether one has name beginning with underscore while
+ the other doesn't. In such cases, keep sym without
+ underscore. This takes cares of compiler generated
+ symbols (such as __gnu_compiled, __c89_used, etc.). */
if ((!src->is_static && dst[-1].is_static)
|| ((src->is_static == dst[-1].is_static)
&& ((src->is_func && !dst[-1].is_func)
@@ -109,6 +114,7 @@ DEFUN (symtab_finalize, (tab), Sym_Table * tab)
dst[-1].name, dst[-1].is_static ? 't' : 'T',
dst[-1].is_func ? 'F' : 'f');
printf (" (addr=%lx)\n", (unsigned long) src->addr));
+
dst[-1] = *src;
}
else
@@ -125,11 +131,9 @@ DEFUN (symtab_finalize, (tab), Sym_Table * tab)
else
{
if (dst > tab->base && dst[-1].end_addr == 0)
- {
- dst[-1].end_addr = src->addr - 1;
- }
+ dst[-1].end_addr = src->addr - 1;
- /* retain sym only if it has a non-empty address range: */
+ /* Retain sym only if it has a non-empty address range. */
if (!src->end_addr || src->addr <= src->end_addr)
{
*dst = *src;
@@ -138,10 +142,9 @@ DEFUN (symtab_finalize, (tab), Sym_Table * tab)
}
}
}
+
if (tab->len > 0 && dst[-1].end_addr == 0)
- {
- dst[-1].end_addr = core_text_sect->vma + core_text_sect->_raw_size - 1;
- }
+ dst[-1].end_addr = core_text_sect->vma + core_text_sect->_raw_size - 1;
DBG (AOUTDEBUG | IDDEBUG,
printf ("[symtab_finalize]: removed %d duplicate entries\n",
@@ -154,11 +157,11 @@ DEFUN (symtab_finalize, (tab), Sym_Table * tab)
unsigned int j;
for (j = 0; j < tab->len; ++j)
- {
- printf ("[symtab_finalize] 0x%lx-0x%lx\t%s\n",
- (long) tab->base[j].addr, (long) tab->base[j].end_addr,
- tab->base[j].name);
- }
+ {
+ printf ("[symtab_finalize] 0x%lx-0x%lx\t%s\n",
+ (long) tab->base[j].addr, (long) tab->base[j].end_addr,
+ tab->base[j].name);
+ }
);
}
@@ -178,35 +181,32 @@ DEFUN (dbg_sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address
for (low = 0, high = symtab->len - 1; low != high;)
{
mid = (high + low) >> 1;
+
fprintf (stderr, "[dbg_sym_lookup] low=0x%lx, mid=0x%lx, high=0x%lx\n",
low, mid, high);
fprintf (stderr, "[dbg_sym_lookup] sym[m]=0x%lx sym[m + 1]=0x%lx\n",
(unsigned long) sym[mid].addr,
(unsigned long) sym[mid + 1].addr);
+
if (sym[mid].addr <= address && sym[mid + 1].addr > address)
- {
- return &sym[mid];
- }
+ return &sym[mid];
+
if (sym[mid].addr > address)
- {
- high = mid;
- }
+ high = mid;
else
- {
- low = mid + 1;
- }
+ low = mid + 1;
}
+
fprintf (stderr, "[dbg_sym_lookup] binary search fails???\n");
+
return 0;
}
#endif /* DEBUG */
-/*
- * Look up an address in the symbol-table that is sorted by address.
- * If address does not hit any symbol, 0 is returned.
- */
+/* Look up an address in the symbol-table that is sorted by address.
+ If address does not hit any symbol, 0 is returned. */
Sym *
DEFUN (sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address)
{
@@ -218,23 +218,20 @@ DEFUN (sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address)
#endif /* DEBUG */
if (!symtab->len)
- {
- return 0;
- }
+ return 0;
sym = symtab->base;
for (low = 0, high = symtab->len - 1; low != high;)
{
DBG (LOOKUPDEBUG, ++probes);
mid = (high + low) / 2;
+
if (sym[mid].addr <= address && sym[mid + 1].addr > address)
{
if (address > sym[mid].end_addr)
{
- /*
- * Address falls into gap between sym[mid] and
- * sym[mid + 1]:
- */
+ /* Address falls into gap between
+ sym[mid] and sym[mid + 1]. */
return 0;
}
else
@@ -245,20 +242,18 @@ DEFUN (sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address)
return &sym[mid];
}
}
+
if (sym[mid].addr > address)
- {
- high = mid;
- }
+ high = mid;
else
- {
- low = mid + 1;
- }
+ low = mid + 1;
}
+
if (sym[mid + 1].addr <= address)
{
if (address > sym[mid + 1].end_addr)
{
- /* address is beyond end of sym[mid + 1]: */
+ /* Address is beyond end of sym[mid + 1]. */
return 0;
}
else
@@ -268,5 +263,6 @@ DEFUN (sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address)
return &sym[mid + 1];
}
}
+
return 0;
}
diff --git a/gnu/usr.bin/binutils/gprof/symtab.h b/gnu/usr.bin/binutils/gprof/symtab.h
index a6a450ef1ee..8aa9ee534f2 100644
--- a/gnu/usr.bin/binutils/gprof/symtab.h
+++ b/gnu/usr.bin/binutils/gprof/symtab.h
@@ -1,111 +1,124 @@
+/* symtab.h
+
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
#ifndef symtab_h
#define symtab_h
#include "bfd.h"
#include "gprof.h"
-/*
- * For a profile to be intelligible to a human user, it is necessary
- * to map code-addresses into source-code information. Source-code
- * information can be any combination of: (i) function-name, (ii)
- * source file-name, and (iii) source line number.
- *
- * The symbol table is used to map addresses into source-code
- * information.
- */
+/* For a profile to be intelligible to a human user, it is necessary
+ to map code-addresses into source-code information. Source-code
+ information can be any combination of: (i) function-name, (ii)
+ source file-name, and (iii) source line number.
+
+ The symbol table is used to map addresses into source-code
+ information. */
#include "source.h"
#define NBBS 10
-/*
- * Symbol-entry. For each external in the specified file we gather
- * its address, the number of calls and compute its share of cpu time.
- */
+/* Symbol-entry. For each external in the specified file we gather
+ its address, the number of calls and compute its share of cpu time. */
typedef struct sym
{
- /*
- * Common information:
- *
- * In the symbol-table, fields ADDR and FUNC_NAME are guaranteed
- * to contain valid information. FILE may be 0, if unknown and
- * LINE_NUM maybe 0 if unknown.
- */
- bfd_vma addr; /* address of entry point */
- bfd_vma end_addr; /* end-address */
- const char *name; /* name of function this sym is from */
- Source_File *file; /* source file symbol comes from */
- int line_num; /* source line number */
- unsigned int is_func:1, /* is this a function entry point? */
- is_static:1, /* is this a local (static) symbol? */
- is_bb_head:1, /* is this the head of a basic-blk? */
- mapped:1, /* this symbol was mapped to another name */
- has_been_placed:1; /* have we placed this symbol? */
- unsigned long ncalls; /* how many times executed */
- int nuses; /* how many times this symbol appears in
- a particular context */
- bfd_vma bb_addr[NBBS]; /* address of basic-block start */
- unsigned long bb_calls[NBBS]; /* how many times basic-block was called */
- struct sym *next; /* for building chains of syms */
- struct sym *prev; /* for building chains of syms */
-
- /* profile-specific information: */
-
- /* histogram specific info: */
+ /* Common information:
+
+ In the symbol-table, fields ADDR and FUNC_NAME are guaranteed
+ to contain valid information. FILE may be 0, if unknown and
+ LINE_NUM maybe 0 if unknown. */
+
+ bfd_vma addr; /* Address of entry point. */
+ bfd_vma end_addr; /* End-address. */
+ const char *name; /* Name of function this sym is from. */
+ Source_File *file; /* Source file symbol comes from. */
+ int line_num; /* Source line number. */
+ unsigned int /* Boolean fields: */
+ is_func:1, /* Is this a function entry point? */
+ is_static:1, /* Is this a local (static) symbol? */
+ is_bb_head:1, /* Is this the head of a basic-blk? */
+ mapped:1, /* This symbol was mapped to another name. */
+ has_been_placed:1; /* Have we placed this symbol? */
+ unsigned long ncalls; /* How many times executed */
+ int nuses; /* How many times this symbol appears in
+ a particular context. */
+ bfd_vma bb_addr[NBBS]; /* Address of basic-block start. */
+ unsigned long bb_calls[NBBS];/* How many times basic-block was called. */
+ struct sym *next; /* For building chains of syms. */
+ struct sym *prev; /* For building chains of syms. */
+
+ /* Profile specific information: */
+
+ /* Histogram specific information: */
struct
{
- double time; /* (weighted) ticks in this routine */
- bfd_vma scaled_addr; /* scaled entry point */
+ double time; /* (Weighted) ticks in this routine. */
+ bfd_vma scaled_addr; /* Scaled entry point. */
}
hist;
- /* call-graph specific info: */
+ /* Call-graph specific information: */
struct
{
- unsigned long self_calls; /* how many calls to self */
- double child_time; /* cumulative ticks in children */
- int index; /* index in the graph list */
- int top_order; /* graph call chain top-sort order */
- bool print_flag; /* should this be printed? */
+ unsigned long self_calls; /* How many calls to self. */
+ double child_time; /* Cumulative ticks in children. */
+ int index; /* Index in the graph list. */
+ int top_order; /* Graph call chain top-sort order. */
+ bool print_flag; /* Should this be printed? */
struct
{
- double fract; /* what % of time propagates */
- double self; /* how much self time propagates */
- double child; /* how much child time propagates */
+ double fract; /* What % of time propagates. */
+ double self; /* How much self time propagates. */
+ double child; /* How much child time propagates. */
}
prop;
struct
{
- int num; /* internal number of cycle on */
- struct sym *head; /* head of cycle */
- struct sym *next; /* next member of cycle */
+ int num; /* Internal number of cycle on. */
+ struct sym *head; /* Head of cycle. */
+ struct sym *next; /* Next member of cycle. */
}
cyc;
- struct arc *parents; /* list of caller arcs */
- struct arc *children; /* list of callee arcs */
+ struct arc *parents; /* List of caller arcs. */
+ struct arc *children; /* List of callee arcs. */
}
cg;
}
Sym;
-/*
- * Symbol-tables are always assumed to be sorted in increasing order
- * of addresses:
- */
+/* Symbol-tables are always assumed to be sorted
+ in increasing order of addresses. */
typedef struct
{
- unsigned int len; /* # of symbols in this table */
- Sym *base; /* first element in symbol table */
- Sym *limit; /* limit = base + len */
+ unsigned int len; /* # of symbols in this table. */
+ Sym *base; /* First element in symbol table. */
+ Sym *limit; /* Limit = base + len. */
}
Sym_Table;
-extern Sym_Table symtab; /* the symbol table */
-
-extern void sym_init PARAMS ((Sym * sym));
-extern void symtab_finalize PARAMS ((Sym_Table * symtab));
-extern Sym *sym_lookup PARAMS ((Sym_Table * symtab, bfd_vma address));
+extern Sym_Table symtab; /* The symbol table. */
-extern void find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
+extern void sym_init PARAMS ((Sym *));
+extern void symtab_finalize PARAMS ((Sym_Table *));
+extern Sym *sym_lookup PARAMS ((Sym_Table *, bfd_vma));
+extern void find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
#endif /* symtab_h */
diff --git a/gnu/usr.bin/binutils/gprof/tahoe.c b/gnu/usr.bin/binutils/gprof/tahoe.c
index 5981bc5278b..750c7adc48d 100644
--- a/gnu/usr.bin/binutils/gprof/tahoe.c
+++ b/gnu/usr.bin/binutils/gprof/tahoe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1983 Regents of the University of California.
+ * Copyright (c) 1983, 2001 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@@ -304,7 +304,7 @@ tahoe_find_call (parent, p_lowpc, p_highpc)
case longrel:
/*
* regular pc relative addressing
- * check that this is the address of
+ * check that this is the address of
* a function.
*/
destpc = tahoe_reladdr (instructp + length)
diff --git a/gnu/usr.bin/binutils/gprof/utils.c b/gnu/usr.bin/binutils/gprof/utils.c
index c72c02e01f0..c18f83342ef 100644
--- a/gnu/usr.bin/binutils/gprof/utils.c
+++ b/gnu/usr.bin/binutils/gprof/utils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1983, 1998 Regents of the University of California.
+ * Copyright (c) 1983, 1998, 2001 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@@ -68,7 +68,8 @@ DEFUN (print_name_only, (self), Sym * self)
filename = self->file->name;
}
}
- sprintf (buf, " (%s:%d)", filename, self->line_num);
+ sprintf (buf, " (%s:%d @ %lx)", filename, self->line_num,
+ (unsigned long) self->addr);
printf ("%s", buf);
size += strlen (buf);
}
diff --git a/gnu/usr.bin/binutils/gprof/vax.c b/gnu/usr.bin/binutils/gprof/vax.c
index 58e7de3820b..0d7cc30b694 100644
--- a/gnu/usr.bin/binutils/gprof/vax.c
+++ b/gnu/usr.bin/binutils/gprof/vax.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1983 Regents of the University of California.
+ * Copyright (c) 1983, 2001 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@@ -307,7 +307,7 @@ vax_find_call (parent, p_lowpc, p_highpc)
case longrel:
/*
* regular pc relative addressing
- * check that this is the address of
+ * check that this is the address of
* a function.
*/
destpc = vax_reladdr ((struct modebyte *) (instructp + length))
diff --git a/gnu/usr.bin/binutils/include/COPYING b/gnu/usr.bin/binutils/include/COPYING
index 60549be514a..d60c31a97a5 100644
--- a/gnu/usr.bin/binutils/include/COPYING
+++ b/gnu/usr.bin/binutils/include/COPYING
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
+ Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
diff --git a/gnu/usr.bin/binutils/include/ChangeLog b/gnu/usr.bin/binutils/include/ChangeLog
index a41d5b1793c..10bb1b2a86b 100644
--- a/gnu/usr.bin/binutils/include/ChangeLog
+++ b/gnu/usr.bin/binutils/include/ChangeLog
@@ -1,6 +1,176 @@
-2000-10-23 Philip Blundell <pb@futuretv.com>
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
- * demangle.h, dyn-string.h: Update from trunk version.
+ * Many files: Update copyright notices.
+
+2001-05-28 Philip Blundell <philb@gnu.org>
+
+ From 2001-05-11 Jakub Jelinek <jakub@redhat.com>
+ * elf/ia64.h (ELF_STRING_ia64_unwind_once): Define.
+ (ELF_STRING_ia64_unwind_info_once): Define.
+
+2001-01-11 Peter Targett <peter.targett@arccores.com>
+
+ * dis-asm.h (arc_get_disassembler): Correct declaration.
+
+2001-01-09 Philip Blundell <philb@gnu.org>
+
+ * bin-bugs.h (REPORT_BUGS_TO): Set to `bug-binutils@gnu.org'.
+
+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-19 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * dis-asm.h (struct disassemble_info): New member "section".
+ (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize private_data member.
+ Initialize section member.
+
+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-10 Fred Fish <fnf@be.com>
+
+ * bfdlink.h (struct bfd_link_info): Add new allow_shlib_undefined
+ member to struct for systems where it is normal to have undefined
+ symbols in shared libraries at runtime and the runtime linker
+ takes care of redirecting them.
+
+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-05 Richard Henderson <rth@redhat.com>
+
+ * demangle.h: Change "new_abi" to "v3" everywhere.
+
+2000-11-29 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-10-11 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (splay_tree_predecessor): Declare.
+
+2000-09-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * dis-asm.h: Declare cris_get_disassembler, not print_insn_cris.
+ Fix typo in comment.
+
+2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * alloca-conf.h: New file (copied from libiberty).
+
+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-07-29 Nick Clifton <nickc@cygnus.com>
+
+ * os9k.h: Add copyright notice.
+ Fix formatting.
+
+2000-07-22 Jason Eckhardt <jle@cygnus.com>
+
+ * dis-asm.h (print_insn_i860): Add prototype.
+
+2000-07-20 H.J. Lu <hjl@gnu.org>
+
+ * bfdlink.h (bfd_link_info): Add new_dtags.
+
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
+
+ * dis-asm.h (print_insn_cris): Declare.
+
+2000-07-19 H.J. Lu (hjl@gnu.org)
+
+ * bfdlink.h (bfd_link_info): Add flags and flags_1.
+
+2000-06-05 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS: new
+
+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-18 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * dis-asm.h (print_insn_m68hc12): Define.
+ (print_insn_m68hc11): Likewise.
+
+2000-06-18 Nick Clifton <nickc@redhat.com>
+
+ * os9k.h: Change values of MODSYNC and CRCCON due to bug report
+ from Russ Magee <rmagee@home.com>.
+
+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-26 Eli Zaretskii <eliz@is.elta.co.il>
@@ -8,6 +178,74 @@
(HAVE_DOS_BASED_FILE_SYSTEM, IS_DIR_SEPARATOR)
(IS_ABSOLUTE_PATH, FILENAME_CMP): New macros.
+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-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
+ Rick Gorton <gorton@scrugs.lkg.dec.com>
+
+ * bfdlink.h (struct bfd_link_info): Add emitrelocations flag.
+
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
+
+ * dis-asm.h (print_insn_tic54x): Declare.
+
+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.
+
+Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+
+ * dis-asm.h (print_insn_ia64): Declare.
+
+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-04-04 Alan Modra <alan@linuxcare.com.au>
* bin-bugs.h (REPORT_BUGS_TO): Remove translated part.
@@ -16,6 +254,12 @@
* bin-bugs.h: New file.
+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-27 Denis Chertykov <denisc@overta.ru>
* dis-asm.h (print_insn_avr): Declare.
@@ -56,11 +300,6 @@
* dis-asm.h (print_insn_i370): Declare.
-2000-02-22 Chandra Chavva <cchavva@cygnus.com>
-
- * opcode/d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation
- cannot be combined in parallel with ADD/SUBppp.
-
Tue Feb 22 15:19:54 2000 Andrew Cagney <cagney@b1.cygnus.com>
* remote-sim.h (sim_trace): Document return values.
@@ -90,7 +329,7 @@ Tue Feb 8 17:01:13 2000 Andrew Cagney <cagney@b1.cygnus.com>
* dis-asm.h (struct disassemble_info): Added octets_per_byte
field and initialize it to one (1).
-
+
2000-01-27 Nick Clifton <nickc@redhat.com>
* dis-asm.h: Add prototype for disassembler_usage().
@@ -218,7 +457,7 @@ Tue Sep 14 00:35:02 1999 Marc Espie <espie@cvs.openbsd.org>
(ELF32_MS_REL_INDEX): New macro.
(ELF32_MS_FLAGS): Likewise.
(ELF32_MS_INFO): Likewise.
-
+
1999-06-14 Nick Clifton <nickc@cygnus.com>
* dis-asm.h (arm_toggle_regnames): New prototype.
@@ -258,7 +497,7 @@ Mon Feb 1 21:05:46 1999 Catherine Moore <clm@cygnus.com>
* dis-asm.h (print_insn_i386_att): Declare.
(print_insn_i386_intel): Declare.
-998-12-30 Michael Meissner <meissner@cygnus.com>
+1998-12-30 Michael Meissner <meissner@cygnus.com>
* dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Cast STREAM and
FPRINTF_FUNC to avoid compiler warnings.
@@ -288,8 +527,7 @@ Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
(demangling_styles): add new edg_demangling style
(EDG_DEMANGLING_STYLE_STRING): new macro
(EDG_DEMANGLING): new macro
-
- * demangle.h (DMGL_HP): new macro, for HP/aCC compiler.
+ (DMGL_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.
@@ -302,11 +540,6 @@ Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
(struct dntt_type_svar): add field thread_specific.
(hp_language): add languages modcal and dmpascal.
-Mon Nov 30 15:25:58 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * elf/sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC,
- R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max.
-
Fri Nov 20 13:14:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
* libiberty.h (basename): Add prototype for FreeBSD.
@@ -361,10 +594,6 @@ Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com)
* obstack.h: Update to latest FSF version.
-Tue May 26 20:57:43 1998 Stan Cox <scox@equinox.cygnus.com>
-
- * elf/sparc.h (EF_SPARC_LEDATA, R_SPARC_32LE): Added.
-
Tue Feb 24 13:05:02 1998 Doug Evans <devans@canuck.cygnus.com>
* dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols'
@@ -403,10 +632,6 @@ 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.
@@ -535,14 +760,6 @@ Thu May 15 01:24:16 1997 Mark Alexander <marka@cygnus.com>
* obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun,
obstack_freefun): Eliminate compile warnings in gdb.
-Tue May 13 10:21:14 1997 Nick Clifton <nickc@cygnus.com>
-
- * 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.
-
Tue Apr 22 10:24:34 1997 Fred Fish <fnf@cygnus.com>
* floatformat.h (floatformat_byteorders): Add comments for previous
@@ -891,13 +1108,7 @@ Thu May 18 04:25:50 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
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>
@@ -972,8 +1183,6 @@ Tue Oct 25 11:38:02 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
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)
@@ -1119,10 +1328,6 @@ 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.
@@ -1152,10 +1357,6 @@ 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
@@ -1180,9 +1381,6 @@ 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)
@@ -1461,7 +1659,7 @@ Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com)
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.
+ * bfd.h, ieee.h: ANSIfy enums.
Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com)
diff --git a/gnu/usr.bin/binutils/include/ansidecl.h b/gnu/usr.bin/binutils/include/ansidecl.h
index 10308676f1a..545a62103a9 100644
--- a/gnu/usr.bin/binutils/include/ansidecl.h
+++ b/gnu/usr.bin/binutils/include/ansidecl.h
@@ -1,5 +1,6 @@
/* ANSI and traditional C compatability macros
- Copyright 1991, 1992, 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -160,6 +161,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif /* ANSI C. */
+
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
older preprocessors. Thus we can't define something like this:
@@ -221,4 +223,11 @@ So instead we use the macro below and test it against specific values. */
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
#endif /* ATTRIBUTE_PRINTF */
+/* We use __extension__ in some places to suppress -pedantic warnings
+ about GCC extensions. This feature didn't work properly before
+ gcc 2.8. */
+#if GCC_VERSION < 2008
+#define __extension__
+#endif
+
#endif /* ansidecl.h */
diff --git a/gnu/usr.bin/binutils/include/aout/ChangeLog b/gnu/usr.bin/binutils/include/aout/ChangeLog
index 63f17ec830d..e75a12fa720 100644
--- a/gnu/usr.bin/binutils/include/aout/ChangeLog
+++ b/gnu/usr.bin/binutils/include/aout/ChangeLog
@@ -1,3 +1,16 @@
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Many files: Update copyright notices.
+
+Mon Apr 3 13:29:08 2000 Hans-Peter Nilsson <hp@axis.com>
+
+ * aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef.
+ (RELOC_EXT_BITS_EXTERN_LITTLE): Ditto.
+ (RELOC_EXT_BITS_TYPE_BIG): Ditto.
+ (RELOC_EXT_BITS_TYPE_SH_BIG): Ditto.
+ (RELOC_EXT_BITS_TYPE_LITTLE): Ditto.
+ (RELOC_EXT_BITS_TYPE_SH_LITTLE): Ditto.
+
1999-07-12 Ian Lance Taylor <ian@zembu.com>
* aout64.h (N_SHARED_LIB): Define as 0 if TEXT_START_ADDR is
diff --git a/gnu/usr.bin/binutils/include/aout/aout64.h b/gnu/usr.bin/binutils/include/aout/aout64.h
index bf743c48666..a8a8cd1b3b0 100644
--- a/gnu/usr.bin/binutils/include/aout/aout64.h
+++ b/gnu/usr.bin/binutils/include/aout/aout64.h
@@ -1,4 +1,20 @@
-/* `a.out' object-file definitions, including extensions to 64-bit fields */
+/* `a.out' object-file definitions, including extensions to 64-bit fields
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef __A_OUT_64_H__
#define __A_OUT_64_H__
@@ -388,13 +404,29 @@ struct reloc_ext_external {
bfd_byte r_addend[BYTES_IN_WORD]; /* datum addend */
};
+#ifndef RELOC_EXT_BITS_EXTERN_BIG
#define RELOC_EXT_BITS_EXTERN_BIG ((unsigned int) 0x80)
+#endif
+
+#ifndef RELOC_EXT_BITS_EXTERN_LITTLE
#define RELOC_EXT_BITS_EXTERN_LITTLE ((unsigned int) 0x01)
+#endif
+#ifndef RELOC_EXT_BITS_TYPE_BIG
#define RELOC_EXT_BITS_TYPE_BIG ((unsigned int) 0x1F)
+#endif
+
+#ifndef RELOC_EXT_BITS_TYPE_SH_BIG
#define RELOC_EXT_BITS_TYPE_SH_BIG 0
+#endif
+
+#ifndef RELOC_EXT_BITS_TYPE_LITTLE
#define RELOC_EXT_BITS_TYPE_LITTLE ((unsigned int) 0xF8)
+#endif
+
+#ifndef RELOC_EXT_BITS_TYPE_SH_LITTLE
#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
+#endif
/* Bytes per relocation entry */
#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
diff --git a/gnu/usr.bin/binutils/include/aout/stab.def b/gnu/usr.bin/binutils/include/aout/stab.def
index 9c2d2dd142c..67bde35f10d 100644
--- a/gnu/usr.bin/binutils/include/aout/stab.def
+++ b/gnu/usr.bin/binutils/include/aout/stab.def
@@ -1,5 +1,5 @@
/* Table of DBX symbol codes for the GNU system.
- Copyright (C) 1988, 91, 92, 93, 94, 95, 96, 1998
+ Copyright 1988, 1991, 1992, 1993, 1994, 1996, 1998
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gnu/usr.bin/binutils/include/aout/stab_gnu.h b/gnu/usr.bin/binutils/include/aout/stab_gnu.h
index 7d18e14a263..c62ac6ed467 100644
--- a/gnu/usr.bin/binutils/include/aout/stab_gnu.h
+++ b/gnu/usr.bin/binutils/include/aout/stab_gnu.h
@@ -1,3 +1,20 @@
+/* gnu_stab.h Definitions for GNU extensions to STABS
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef __GNU_STAB__
/* Indicate the GNU stab.h is in use. */
diff --git a/gnu/usr.bin/binutils/include/bfdlink.h b/gnu/usr.bin/binutils/include/bfdlink.h
index bb827a35f04..29eeb661798 100644
--- a/gnu/usr.bin/binutils/include/bfdlink.h
+++ b/gnu/usr.bin/binutils/include/bfdlink.h
@@ -1,5 +1,6 @@
/* bfdlink.h -- header file for BFD link routines
- Copyright 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ 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.
@@ -179,6 +180,8 @@ struct bfd_link_info
const struct bfd_link_callbacks *callbacks;
/* true if BFD should generate a relocateable object file. */
boolean relocateable;
+ /* true if BFD should generate relocation information in the final executable. */
+ boolean emitrelocations;
/* true if BFD should generate a "task linked" object file,
similar to relocatable but also with globals converted to statics. */
boolean task_link;
@@ -199,6 +202,19 @@ struct bfd_link_info
/* true if BFD should generate errors for undefined symbols
even if generating a shared object. */
boolean no_undefined;
+ /* true if BFD should allow undefined symbols in shared objects even
+ when no_undefined is set to disallow undefined symbols. The net
+ result will be that undefined symbols in regular objects will
+ still trigger an error, but undefined symbols in shared objects
+ will be ignored. The implementation of no_undefined makes the
+ assumption that the runtime linker will choke on undefined
+ symbols. However there is at least one system (BeOS) where
+ undefined symbols in shared libraries is normal since the kernel
+ patches them at load time to select which function is most
+ appropriate for the current architecture. I.E. dynamically
+ select an appropriate memset function. Apparently it is also
+ normal for HPPA shared libraries to have undefined symbols. */
+ boolean allow_shlib_undefined;
/* Which symbols to strip. */
enum bfd_link_strip strip;
/* Which local symbols to discard. */
@@ -244,6 +260,15 @@ struct bfd_link_info
/* The function to call when the executable or shared object is
unloaded. */
const char *fini_function;
+
+ /* true if the new ELF dynamic tags are enabled. */
+ boolean new_dtags;
+
+ /* May be used to set DT_FLAGS for ELF. */
+ bfd_vma flags;
+
+ /* May be used to set DT_FLAGS_1 for ELF. */
+ bfd_vma flags_1;
};
/* This structures holds a set of callback functions. These are
diff --git a/gnu/usr.bin/binutils/include/coff/ChangeLog b/gnu/usr.bin/binutils/include/coff/ChangeLog
index 76b52c02365..efde1bf9040 100644
--- a/gnu/usr.bin/binutils/include/coff/ChangeLog
+++ b/gnu/usr.bin/binutils/include/coff/ChangeLog
@@ -1,3 +1,83 @@
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-02-09 David Mosberger <davidm@hpl.hp.com>
+ * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
+ Rename from PEPAOUTHDR.
+
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Many files: Update copyright notices.
+
+2001-02-17 Philip Blundell <philb@gnu.org>
+
+ From 2001-01-23 H.J. Lu <hjl@gnu.org>
+ * pe.h (struct external_PEI_DOS_hdr): New.
+ (struct external_PEI_IMAGE_hdr): New.
+
+2000-12-11 Alan Modra <alan@linuxcare.com.au>
+
+ * ti.h (OCTETS_PER_BYTE_POWER): Change #warning to #error.
+
+2000-12-08 Alan Modra <alan@linuxcare.com.au>
+
+ * ti.h (OCTETS_PER_BYTE_POWER): Change #warn to #warning.
+
+2000-06-30 DJ Delorie <dj@cygnus.com>
+
+ * pe.h: Clarify a comment.
+
+2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
+
+ * rs6k64.h (U802TOC64MAGIC): Change to U803XTOCMAGIC.
+
+2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
+
+ * rs6k64.h: New file.
+
+2000-04-17 Timothy Wall <twall@cygnus.com>
+
+ * ti.h: Load page cleanup.
+ * intental.h: Add load page field.
+
+Mon Apr 17 16:44:01 2000 David Mosberger <davidm@hpl.hp.com>
+
+ * pe.h (PEP64AOUTHDR): New header for PE+.
+ (PEP64AOUTSZ): New macro.
+ (IMAGE_SUBSYSTEM_UNKNOWN): New macro.
+ (IMAGE_SUBSYSTEM_NATIVE): Ditto.
+ (IMAGE_SUBSYSTEM_WINDOWS_GUI): Ditto.
+ (IMAGE_SUBSYSTEM_WINDOWS_CUI): Ditto.
+ (IMAGE_SUBSYSTEM_POSIX_CUI): Ditto.
+ (IMAGE_SUBSYSTEM_WINDOWS_CE_GUI): Ditto.
+ (IMAGE_SUBSYSTEM_EFI_APPLICATION): Ditto.
+ (IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER): Ditto.
+ (IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER): Ditto.
+ * internal.h (PE_DEF_FILE_ALIGNMENT): Define only if not defined
+ already.
+ * ia64.h: New file.
+
+2000-04-13 Alan Modra <alan@linuxcare.com.au>
+
+ * ti.h (ADDR_MASK): Don't use ul suffix on constants.
+ (PG_MASK): Ditto.
+
+2000-04-11 Timothy Wall <twall@cygnus.com>
+
+ * ti.h: Remove load page references until load pages are
+ reimplemented.
+ * tic54x.h: Ditto.
+
+2000-04-07 Timothy Wall <twall@cygnus.com>
+
+ * internal.h: Fix some comments related to TI COFF (instead of tic80).
+ * ti.h: New.
+ * tic54x.h: New.
+
+Wed Apr 5 22:08:41 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): Define.
+
2000-03-15 Kazu Hirata <kazu@hxi.com>
* internal.h: Fix a typo in the comment for R_MOVL2.
@@ -69,7 +149,7 @@ Wed Jun 2 18:08:18 1999 Richard Henderson <rth@cygnus.com>
Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
- * coff/arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M,
+ * arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M,
F_ARM_4, F_ARM_4T, F_APCS26): Changed values to distinguish
F_ARM_2a, F_ARM_3M, F_ARM_4T.
@@ -93,7 +173,7 @@ Sun Dec 6 21:36:37 1998 Mark Elbrecht <snowball3@usa.net>
Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
- * coff/arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26):
+ * arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26):
Changed values to avoid clashing with IMAGE_FILE_* coff header
flag values.
@@ -119,6 +199,10 @@ Tue Dec 2 10:21:40 1997 Nick Clifton <nickc@cygnus.com>
* arm.h (COFFARM): New define.
+Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.h (R_SH_SWITCH8): New.
+
Sat Nov 22 15:10:14 1997 Nick Clifton <nickc@cygnus.com>
* internal.h (C_THUMBEXTFUNC, C_THUMBSTATFUNC): Constants to
@@ -148,6 +232,14 @@ Mon May 26 14:07:55 1997 Ian Lance Taylor <ian@cygnus.com>
* tic80.h (R_PPL16B): Correct value.
+Tue May 13 10:21:14 1997 Nick Clifton <nickc@cygnus.com>
+
+ * 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.
+
Sat May 3 08:24:59 1997 Fred Fish <fnf@cygnus.com>
* internal.h (C_UEXT, C_STATLAB, C_EXTLAB, C_SYSTEM):
@@ -282,8 +374,8 @@ Thu Nov 9 14:08:30 1995 Ian Lance Taylor <ian@cygnus.com>
Tue Nov 7 14:38:45 1995 Kim Knuttila <krk@cygnus.com>
- * coff/powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define.
- * coff/pe.h: Added defines for file level flags
+ * powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define.
+ * pe.h: Added defines for file level flags
Mon Nov 6 17:28:01 1995 Harry Dolan <dolan@ssd.intel.com>
@@ -407,6 +499,15 @@ Tue May 16 15:08:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
* internal.h (NT_subsystem, NT_stack_heap): Now extern.
+Sat May 13 10:14:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * pe.h: New file.
+ * i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT,
+ NT_DEF_RESERVE, NT_DEF_COMMIT): New.
+ * internal.h (internal_filehdr): New fields for PE.
+ (IMAGE_DATA_DIRECTORY): New.
+ (internal_aouthdr): New fields for PE.
+
Tue Feb 14 17:59:37 1995 Ian Lance Taylor <ian@cygnus.com>
* ecoff.h (struct ecoff_fdrtab_entry): Define.
@@ -570,10 +671,10 @@ Wed Oct 13 15:52:34 1993 Ken Raeburn (raeburn@cygnus.com)
Sun Oct 10 17:27:10 1993 Troy Rollo (troy@cbme.unsw.edu.au)
- * coff/internal.h: Added o_sri, o_inlib and o_vid for Apollos
- as well as R_DIR16.
+ * internal.h: Added o_sri, o_inlib and o_vid for Apollos as well
+ as R_DIR16.
- * coff/apollo.h: New file
+ * apollo.h: New file
Mon Oct 11 17:16:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -644,6 +745,10 @@ Thu Aug 12 11:24:42 1993 Ian Lance Taylor (ian@cygnus.com)
* ecoff.h: Moved MIPS reloc definitions from here...
* mips.h: to here.
+Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com)
+
+ * i386.h: Add Lynx magic number.
+
Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com)
* alpha.h: Corrected external symbolic debugging structures to
@@ -686,6 +791,12 @@ Wed Jun 9 15:09:09 1993 Ian Lance Taylor (ian@cygnus.com)
* mips.h (OMAGIC): Define.
+Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ Support for H8/300-H
+ * h8300.h: New magic number.
+ * internal.h: New relocations.
+
Mon Apr 26 18:04:47 1993 Steve Chamberlain (sac@thepub.cygnus.com)
* internal.h, sh.h: Support for SH.
@@ -863,8 +974,8 @@ Thu Feb 6 11:33:32 1992 Steve Chamberlain (sac at rtl.cygnus.com)
Sat Nov 30 20:38:35 1991 Steve Chamberlain (sac at rtl.cygnus.com)
- * ChangeLog, a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h,
- m88k.h, mips.h, rs6000.h: move from above coff-<foo>.h
+ * a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h, m88k.h,
+ mips.h, rs6000.h: Move from above coff-<foo>.h.
Local Variables:
diff --git a/gnu/usr.bin/binutils/include/coff/a29k.h b/gnu/usr.bin/binutils/include/coff/a29k.h
index 8c3a646ca23..b82826747bb 100644
--- a/gnu/usr.bin/binutils/include/coff/a29k.h
+++ b/gnu/usr.bin/binutils/include/coff/a29k.h
@@ -1,6 +1,22 @@
/* COFF spec for AMD 290*0
- Contributed by David Wood @ New York University.
- */
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Contributed by David Wood @ New York University. */
#ifndef AMD
# define AMD
diff --git a/gnu/usr.bin/binutils/include/coff/alpha.h b/gnu/usr.bin/binutils/include/coff/alpha.h
index 076cbcbd980..6cd915d41ca 100644
--- a/gnu/usr.bin/binutils/include/coff/alpha.h
+++ b/gnu/usr.bin/binutils/include/coff/alpha.h
@@ -1,6 +1,22 @@
/* ECOFF support on Alpha machines.
- coff/ecoff.h must be included before this file. */
-
+ coff/ecoff.h must be included before this file.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
/********************** FILE HEADER **********************/
struct external_filehdr {
diff --git a/gnu/usr.bin/binutils/include/coff/apollo.h b/gnu/usr.bin/binutils/include/coff/apollo.h
index d1347f1f532..ff05f740dc9 100644
--- a/gnu/usr.bin/binutils/include/coff/apollo.h
+++ b/gnu/usr.bin/binutils/include/coff/apollo.h
@@ -1,4 +1,20 @@
-/*** coff information for Apollo M68K */
+/* coff information for Apollo M68K
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/arm.h b/gnu/usr.bin/binutils/include/coff/arm.h
index 7ca93299ad8..a0d8883aaf9 100644
--- a/gnu/usr.bin/binutils/include/coff/arm.h
+++ b/gnu/usr.bin/binutils/include/coff/arm.h
@@ -1,5 +1,5 @@
/* ARM COFF support for BFD.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/gnu/usr.bin/binutils/include/coff/ecoff.h b/gnu/usr.bin/binutils/include/coff/ecoff.h
index 9e4202e4757..076fdf5bef5 100644
--- a/gnu/usr.bin/binutils/include/coff/ecoff.h
+++ b/gnu/usr.bin/binutils/include/coff/ecoff.h
@@ -1,9 +1,25 @@
-#ifndef ECOFF_H
-#define ECOFF_H
-
/* Generic ECOFF support.
This does not include symbol information, found in sym.h and
- symconst.h. */
+ symconst.h.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef ECOFF_H
+#define ECOFF_H
/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on
little endian machines. MIPS_MAGIC_BIG is used on big endian
diff --git a/gnu/usr.bin/binutils/include/coff/h8300.h b/gnu/usr.bin/binutils/include/coff/h8300.h
index 9b62394f380..4eadb48cb40 100644
--- a/gnu/usr.bin/binutils/include/coff/h8300.h
+++ b/gnu/usr.bin/binutils/include/coff/h8300.h
@@ -1,4 +1,20 @@
-/*** coff information for Hitachi H8/300 and H8/300-H */
+/* coff information for Hitachi H8/300 and H8/300-H
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/h8500.h b/gnu/usr.bin/binutils/include/coff/h8500.h
index 0305bf2b76b..a5dc1ed343e 100644
--- a/gnu/usr.bin/binutils/include/coff/h8500.h
+++ b/gnu/usr.bin/binutils/include/coff/h8500.h
@@ -1,4 +1,20 @@
-/*** coff information for Hitachi H8/500 */
+/* coff information for Hitachi H8/500
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/i386.h b/gnu/usr.bin/binutils/include/coff/i386.h
index 5ebf4a2e023..407245f3e9d 100644
--- a/gnu/usr.bin/binutils/include/coff/i386.h
+++ b/gnu/usr.bin/binutils/include/coff/i386.h
@@ -1,4 +1,20 @@
-/*** coff information for Intel 386/486. */
+/* coff information for Intel 386/486.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/i860.h b/gnu/usr.bin/binutils/include/coff/i860.h
index 73686e92b7d..08a797b2058 100644
--- a/gnu/usr.bin/binutils/include/coff/i860.h
+++ b/gnu/usr.bin/binutils/include/coff/i860.h
@@ -1,7 +1,20 @@
-/* This file was hacked from i386.h [dolan@ssd.intel.com] */
-
-/*** coff information for Intel 860. */
-
+/* coff information for Intel 860.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/i960.h b/gnu/usr.bin/binutils/include/coff/i960.h
index 0935836c14a..f704170b102 100644
--- a/gnu/usr.bin/binutils/include/coff/i960.h
+++ b/gnu/usr.bin/binutils/include/coff/i960.h
@@ -1,4 +1,20 @@
-/*** coff information for 80960. Origins: Intel corp, natch. */
+/* coff information for 80960. Origins: Intel corp, natch.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* NOTE: Tagentries (cf TAGBITS) are no longer used by the 960 */
diff --git a/gnu/usr.bin/binutils/include/coff/internal.h b/gnu/usr.bin/binutils/include/coff/internal.h
index e89b5287557..38ca3095843 100644
--- a/gnu/usr.bin/binutils/include/coff/internal.h
+++ b/gnu/usr.bin/binutils/include/coff/internal.h
@@ -1,5 +1,21 @@
/* Internal format of COFF object file data structures, for GNU BFD.
- This file is part of BFD, the Binary File Descriptor library. */
+ This file is part of BFD, the Binary File Descriptor library.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef GNU_COFF_INTERNAL_H
#define GNU_COFF_INTERNAL_H 1
@@ -53,7 +69,7 @@ struct internal_filehdr
long f_nsyms; /* number of symtab entries */
unsigned short f_opthdr; /* sizeof(optional hdr) */
unsigned short f_flags; /* flags */
- unsigned short f_target_id; /* (TIc80 specific) */
+ unsigned short f_target_id; /* (TI COFF specific) */
};
@@ -100,7 +116,9 @@ typedef struct _IMAGE_DATA_DIRECTORY
/* Extra stuff in a PE aouthdr */
#define PE_DEF_SECTION_ALIGNMENT 0x1000
-#define PE_DEF_FILE_ALIGNMENT 0x200
+#ifndef PE_DEF_FILE_ALIGNMENT
+# define PE_DEF_FILE_ALIGNMENT 0x200
+#endif
struct internal_extra_pe_aouthdr
{
@@ -222,7 +240,7 @@ struct internal_aouthdr
#define C_WEAKEXT 127 /* weak symbol -- GNU extension */
-/* New storage classes for TIc80 */
+/* New storage classes for TI COFF */
#define C_UEXT 19 /* Tentative external definition */
#define C_STATLAB 20 /* Static load time label */
#define C_EXTLAB 21 /* External load time label */
@@ -301,6 +319,7 @@ struct internal_scnhdr
unsigned long s_nlnno; /* number of line number entries*/
long s_flags; /* flags */
long s_align; /* used on I960 */
+ unsigned char s_page; /* TI COFF load page */
};
/*
diff --git a/gnu/usr.bin/binutils/include/coff/m68k.h b/gnu/usr.bin/binutils/include/coff/m68k.h
index c9147ed01b5..e14d9e3aa24 100644
--- a/gnu/usr.bin/binutils/include/coff/m68k.h
+++ b/gnu/usr.bin/binutils/include/coff/m68k.h
@@ -1,4 +1,20 @@
-/*** coff information for M68K */
+/* coff information for M68K
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef GNU_COFF_M68K_H
#define GNU_COFF_M68K_H 1
diff --git a/gnu/usr.bin/binutils/include/coff/m88k.h b/gnu/usr.bin/binutils/include/coff/m88k.h
index e06eb4165ec..567cda548ec 100644
--- a/gnu/usr.bin/binutils/include/coff/m88k.h
+++ b/gnu/usr.bin/binutils/include/coff/m88k.h
@@ -1,4 +1,20 @@
-/*** coff information for 88k bcs */
+/* coff information for 88k bcs
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
struct external_filehdr {
diff --git a/gnu/usr.bin/binutils/include/coff/mips.h b/gnu/usr.bin/binutils/include/coff/mips.h
index d4665b1f396..a320381a990 100644
--- a/gnu/usr.bin/binutils/include/coff/mips.h
+++ b/gnu/usr.bin/binutils/include/coff/mips.h
@@ -1,5 +1,21 @@
/* ECOFF support on MIPS machines.
- coff/ecoff.h must be included before this file. */
+ coff/ecoff.h must be included before this file.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/pe.h b/gnu/usr.bin/binutils/include/coff/pe.h
index 6932ee87b76..ff3787569be 100644
--- a/gnu/usr.bin/binutils/include/coff/pe.h
+++ b/gnu/usr.bin/binutils/include/coff/pe.h
@@ -1,5 +1,22 @@
-/* PE COFF header information */
+/* pe.h - PE COFF header information
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _PE_H
#define _PE_H
@@ -89,50 +106,101 @@
#define IMAGE_FILE_MACHINE_SH4 0x1a6
#define IMAGE_FILE_MACHINE_THUMB 0x1c2
-/* Magic values that are true for all dos/nt implementations */
+#define IMAGE_SUBSYSTEM_UNKNOWN 0
+#define IMAGE_SUBSYSTEM_NATIVE 1
+#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
+#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
+#define IMAGE_SUBSYSTEM_POSIX_CUI 7
+#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9
+#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
+#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
+#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
+
+/* Magic values that are true for all dos/nt implementations. */
#define DOSMAGIC 0x5a4d
#define NT_SIGNATURE 0x00004550
- /* NT allows long filenames, we want to accommodate this. This may break
- some of the bfd functions */
+/* NT allows long filenames, we want to accommodate this.
+ This may break some of the bfd functions. */
#undef FILNMLEN
-#define FILNMLEN 18 /* # characters in a file name */
+#define FILNMLEN 18 /* # characters in a file name. */
-struct external_PEI_filehdr
+struct external_PEI_DOS_hdr
{
- /* DOS header fields */
- char e_magic[2]; /* Magic number, 0x5a4d */
- char e_cblp[2]; /* Bytes on last page of file, 0x90 */
- char e_cp[2]; /* Pages in file, 0x3 */
- char e_crlc[2]; /* Relocations, 0x0 */
- char e_cparhdr[2]; /* Size of header in paragraphs, 0x4 */
- char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0 */
- char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF */
- char e_ss[2]; /* Initial (relative) SS value, 0x0 */
- char e_sp[2]; /* Initial SP value, 0xb8 */
- char e_csum[2]; /* Checksum, 0x0 */
- char e_ip[2]; /* Initial IP value, 0x0 */
- char e_cs[2]; /* Initial (relative) CS value, 0x0 */
- char e_lfarlc[2]; /* File address of relocation table, 0x40 */
- char e_ovno[2]; /* Overlay number, 0x0 */
- char e_res[4][2]; /* Reserved words, all 0x0 */
- char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0 */
- char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0 */
- char e_res2[10][2]; /* Reserved words, all 0x0 */
- char e_lfanew[4]; /* File address of new exe header, 0x80 */
- char dos_message[16][4]; /* other stuff, always follow DOS header */
- char nt_signature[4]; /* required NT signature, 0x4550 */
-
- /* From standard header */
-
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
+ /* DOS header fields - always at offset zero in the EXE file. */
+ char e_magic[2]; /* Magic number, 0x5a4d. */
+ char e_cblp[2]; /* Bytes on last page of file, 0x90. */
+ char e_cp[2]; /* Pages in file, 0x3. */
+ char e_crlc[2]; /* Relocations, 0x0. */
+ char e_cparhdr[2]; /* Size of header in paragraphs, 0x4. */
+ char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0. */
+ char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF. */
+ char e_ss[2]; /* Initial (relative) SS value, 0x0. */
+ char e_sp[2]; /* Initial SP value, 0xb8. */
+ char e_csum[2]; /* Checksum, 0x0. */
+ char e_ip[2]; /* Initial IP value, 0x0. */
+ char e_cs[2]; /* Initial (relative) CS value, 0x0. */
+ char e_lfarlc[2]; /* File address of relocation table, 0x40. */
+ char e_ovno[2]; /* Overlay number, 0x0. */
+ char e_res[4][2]; /* Reserved words, all 0x0. */
+ char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0. */
+ char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0. */
+ char e_res2[10][2]; /* Reserved words, all 0x0. */
+ char e_lfanew[4]; /* File address of new exe header, usually 0x80. */
+ char dos_message[16][4]; /* Other stuff, always follow DOS header. */
+};
+
+struct external_PEI_IMAGE_hdr
+{
+ char nt_signature[4]; /* required NT signature, 0x4550. */
+
+ /* From standard header. */
+ char f_magic[2]; /* Magic number. */
+ char f_nscns[2]; /* Number of sections. */
+ char f_timdat[4]; /* Time & date stamp. */
+ char f_symptr[4]; /* File pointer to symtab. */
+ char f_nsyms[4]; /* Number of symtab entries. */
+ char f_opthdr[2]; /* Sizeof(optional hdr). */
+ char f_flags[2]; /* Flags. */
+};
+struct external_PEI_filehdr
+{
+ /* DOS header fields - always at offset zero in the EXE file. */
+ char e_magic[2]; /* Magic number, 0x5a4d. */
+ char e_cblp[2]; /* Bytes on last page of file, 0x90. */
+ char e_cp[2]; /* Pages in file, 0x3. */
+ char e_crlc[2]; /* Relocations, 0x0. */
+ char e_cparhdr[2]; /* Size of header in paragraphs, 0x4. */
+ char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0. */
+ char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF. */
+ char e_ss[2]; /* Initial (relative) SS value, 0x0. */
+ char e_sp[2]; /* Initial SP value, 0xb8. */
+ char e_csum[2]; /* Checksum, 0x0. */
+ char e_ip[2]; /* Initial IP value, 0x0. */
+ char e_cs[2]; /* Initial (relative) CS value, 0x0. */
+ char e_lfarlc[2]; /* File address of relocation table, 0x40. */
+ char e_ovno[2]; /* Overlay number, 0x0. */
+ char e_res[4][2]; /* Reserved words, all 0x0. */
+ char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0. */
+ char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0. */
+ char e_res2[10][2]; /* Reserved words, all 0x0. */
+ char e_lfanew[4]; /* File address of new exe header, usually 0x80. */
+ char dos_message[16][4]; /* Other stuff, always follow DOS header. */
+
+ /* Note: additional bytes may be inserted before the signature. Use
+ the e_lfanew field to find the actual location of the NT signature. */
+
+ char nt_signature[4]; /* required NT signature, 0x4550. */
+
+ /* From standard header. */
+ char f_magic[2]; /* Magic number. */
+ char f_nscns[2]; /* Number of sections. */
+ char f_timdat[4]; /* Time & date stamp. */
+ char f_symptr[4]; /* File pointer to symtab. */
+ char f_nsyms[4]; /* Number of symtab entries. */
+ char f_opthdr[2]; /* Sizeof(optional hdr). */
+ char f_flags[2]; /* Flags. */
};
#ifdef COFF_IMAGE_WITH_PE
@@ -146,11 +214,13 @@ struct external_PEI_filehdr
#endif /* COFF_IMAGE_WITH_PE */
+/* 32-bit PE a.out header: */
+
typedef struct
{
AOUTHDR standard;
- /* NT extra fields; see internal.h for descriptions */
+ /* NT extra fields; see internal.h for descriptions. */
char ImageBase[4];
char SectionAlignment[4];
char FileAlignment[4];
@@ -172,17 +242,48 @@ typedef struct
char SizeOfHeapCommit[4];
char LoaderFlags[4];
char NumberOfRvaAndSizes[4];
- /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
- char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars */
-
+ /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
+ char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */
} PEAOUTHDR;
-
-
#undef AOUTSZ
#define AOUTSZ (AOUTHDRSZ + 196)
+/* Like PEAOUTHDR, except that the "standard" member has no BaseOfData
+ (aka data_start) member and that some of the members are 8 instead
+ of just 4 bytes long. */
+typedef struct
+{
+ AOUTHDR standard;
+
+ /* NT extra fields; see internal.h for descriptions. */
+ char ImageBase[8];
+ char SectionAlignment[4];
+ char FileAlignment[4];
+ char MajorOperatingSystemVersion[2];
+ char MinorOperatingSystemVersion[2];
+ char MajorImageVersion[2];
+ char MinorImageVersion[2];
+ char MajorSubsystemVersion[2];
+ char MinorSubsystemVersion[2];
+ char Reserved1[4];
+ char SizeOfImage[4];
+ char SizeOfHeaders[4];
+ char CheckSum[4];
+ char Subsystem[2];
+ char DllCharacteristics[2];
+ char SizeOfStackReserve[8];
+ char SizeOfStackCommit[8];
+ char SizeOfHeapReserve[8];
+ char SizeOfHeapCommit[8];
+ char LoaderFlags[4];
+ char NumberOfRvaAndSizes[4];
+ /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
+ char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */
+} PEPAOUTHDR;
+#define PEPAOUTSZ 240
+
#undef E_FILNMLEN
-#define E_FILNMLEN 18 /* # characters in a file name */
+#define E_FILNMLEN 18 /* # characters in a file name. */
/* Import Tyoes fot ILF format object files.. */
#define IMPORT_CODE 0
diff --git a/gnu/usr.bin/binutils/include/coff/powerpc.h b/gnu/usr.bin/binutils/include/coff/powerpc.h
index 9552cf9f45e..5af9b72ec69 100644
--- a/gnu/usr.bin/binutils/include/coff/powerpc.h
+++ b/gnu/usr.bin/binutils/include/coff/powerpc.h
@@ -1,9 +1,23 @@
/* Basic coff information for the PowerPC
- *
- * Based on coff/rs6000.h, coff/i386.h and others.
- *
- * Initial release: Kim Knuttila (krk@cygnus.com)
- */
+ Based on coff/rs6000.h, coff/i386.h and others.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Initial release: Kim Knuttila (krk@cygnus.com) */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/sh.h b/gnu/usr.bin/binutils/include/coff/sh.h
index f7271f210b8..7ae32fc1499 100644
--- a/gnu/usr.bin/binutils/include/coff/sh.h
+++ b/gnu/usr.bin/binutils/include/coff/sh.h
@@ -1,4 +1,20 @@
-/*** coff information for Hitachi SH */
+/* coff information for Hitachi SH
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
@@ -305,3 +321,6 @@ struct external_reloc {
#define R_SH_LABEL 32 /* label */
/* NB: R_SH_SWITCH8 is 33 */
+
+#define R_SH_LOOP_START 34
+#define R_SH_LOOP_END 35
diff --git a/gnu/usr.bin/binutils/include/coff/sparc.h b/gnu/usr.bin/binutils/include/coff/sparc.h
index 82a24f01e7a..c7102bae6a7 100644
--- a/gnu/usr.bin/binutils/include/coff/sparc.h
+++ b/gnu/usr.bin/binutils/include/coff/sparc.h
@@ -1,4 +1,20 @@
-/*** coff information for Sparc. */
+/* coff information for Sparc.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* 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/gnu/usr.bin/binutils/include/coff/w65.h b/gnu/usr.bin/binutils/include/coff/w65.h
index 3378c2324d2..58ca53119f5 100644
--- a/gnu/usr.bin/binutils/include/coff/w65.h
+++ b/gnu/usr.bin/binutils/include/coff/w65.h
@@ -1,4 +1,20 @@
-/*** coff information for WDC 65816 */
+/* coff information for WDC 65816
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/we32k.h b/gnu/usr.bin/binutils/include/coff/we32k.h
index 553fa35cdad..30f99b415fa 100644
--- a/gnu/usr.bin/binutils/include/coff/we32k.h
+++ b/gnu/usr.bin/binutils/include/coff/we32k.h
@@ -1,4 +1,20 @@
-/*** coff information for we32k */
+/* coff information for we32k
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/coff/z8k.h b/gnu/usr.bin/binutils/include/coff/z8k.h
index 19b846ca2e1..88db5c4d426 100644
--- a/gnu/usr.bin/binutils/include/coff/z8k.h
+++ b/gnu/usr.bin/binutils/include/coff/z8k.h
@@ -1,4 +1,20 @@
-/*** coff information for Zilog Z800N */
+/* coff information for Zilog Z800N
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/********************** FILE HEADER **********************/
diff --git a/gnu/usr.bin/binutils/include/demangle.h b/gnu/usr.bin/binutils/include/demangle.h
index 63fe5e2adf4..e36d9e7d9e2 100644
--- a/gnu/usr.bin/binutils/include/demangle.h
+++ b/gnu/usr.bin/binutils/include/demangle.h
@@ -1,5 +1,6 @@
/* Defs for interface to demanglers.
- Copyright 1992, 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnu/usr.bin/binutils/include/dis-asm.h b/gnu/usr.bin/binutils/include/dis-asm.h
index 6e6c04b53ae..c2e7ae3b5de 100644
--- a/gnu/usr.bin/binutils/include/dis-asm.h
+++ b/gnu/usr.bin/binutils/include/dis-asm.h
@@ -1,4 +1,22 @@
/* Interface between the opcode library and its callers.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, 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.
+
Written by Cygnus Support, 1993.
The opcode library (libopcodes.a) provides instruction decoders for
@@ -56,6 +74,11 @@ typedef struct disassemble_info {
/* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
enum bfd_endian endian;
+ /* Some targets need information about the current section to accurately
+ display insns. If this is NULL, the target disassembler function
+ will have to make its best guess. */
+ asection *section;
+
/* An array of pointers to symbols either at the location being disassembled
or at the start of the function being disassembled. The array is sorted
so that the first symbol is intended to be the one used. The others are
@@ -157,7 +180,10 @@ extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_ia64 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i370 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_m68hc11 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_m68hc12 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
@@ -166,12 +192,13 @@ extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_h8300s PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
-extern disassembler_ftype arc_get_disassembler PARAMS ((int, int));
+extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i860 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*));
@@ -187,11 +214,13 @@ extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
+extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_tic54x PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
@@ -245,13 +274,15 @@ extern int generic_symbol_at_address
/* Call this macro to initialize only the internal variables for the
disassembler. Architecture dependent things such as byte order, or machine
variant are not touched by this macro. This makes things much easier for
- GDB which must initialize these things seperatly. */
+ GDB which must initialize these things separately. */
#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
(INFO).fprintf_func = (fprintf_ftype)(FPRINTF_FUNC), \
(INFO).stream = (PTR)(STREAM), \
+ (INFO).section = NULL, \
(INFO).symbols = NULL, \
(INFO).num_symbols = 0, \
+ (INFO).private_data = NULL, \
(INFO).buffer = NULL, \
(INFO).buffer_vma = 0, \
(INFO).buffer_length = 0, \
diff --git a/gnu/usr.bin/binutils/include/elf/ChangeLog b/gnu/usr.bin/binutils/include/elf/ChangeLog
index ba8bf9f8d0f..bc82c737853 100644
--- a/gnu/usr.bin/binutils/include/elf/ChangeLog
+++ b/gnu/usr.bin/binutils/include/elf/ChangeLog
@@ -1,15 +1,171 @@
-2000-10-14 Philip Blundell <philb@gnu.org>
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
- From 2000-07-19 H.J. Lu <hjl@gnu.org>
+ Merge from mainline.
+ 2001-05-15 Ralf Baechle <ralf@gnu.org>
+ * common.h: Remove definition of EM_MIPS_RS4_BE. The constant was
+ never in active use and is used otherwise by the ABI.
+
+ 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * external.h: Fix typo.
+ * mips.h: Add/Extend many comments with reference to the MIPS ELF64
+ spec v. 2.4, available at e.g.
+ ftp://oss.sgi.com/pub/linux/mips/doc/ABI/ELF64.ps.
+ (EF_MIPS_UCODE): Define.
+ (EF_MIPS_OPTIONS_FIRST): Define.
+ (EF_MIPS_ARCH_ASE): Define.
+ (EF_MIPS_ARCH_ASE_MDMX): Define.
+ (EF_MIPS_ARCH_ASE_M16): Define.
+ (SHF_MIPS_ADDR): Renamed SHF_MIPS_ADDR32.
+ (SHF_MIPS_STRING): Renamed SHF_MIPS_ADDR64.
+ (SHF_MIPS_NODUPES): Define.
+ (ELF64_MIPS_R_SSYM): New MIPS ELF 64 relocation info access macro.
+ (ELF64_MIPS_R_TYPE3): Likewise.
+ (ELF64_MIPS_R_TYPE2): Likewise.
+ (ELF64_MIPS_R_TYPE): Likewise.
+ (OHW_R10KLDL): Define.
+
+ 2001-04-24 Todd Fries <todd@fries.net>
+ * sparc.h: Fix typo.
+
+ 2001-03-23 Nick Clifton <nickc@redhat.com>
+ * mips.h: Remove extraneous whitespace.
+
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Many files: Update copyright notices.
+
+2001-01-11 Peter Targett <peter.targett@arccores.com>
+
+ * arc.h (E_ARC_MACH_ARC5, E_ARC_MACH_ARC6, E_ARC_MACH_ARC7,
+ E_ARC_MACH_ARC8): New definitions for cpu types.
+
+ * common.h (EM_ARC): Change comment.
+
+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * mips.h: Fix formatting.
+
+2000-12-11 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (DT_HP_*): Define relative to OLD_DT_LOOS for hpux
+ compatibility.
+
+2000-10-16 Chris Demetriou <cgd@sibyte.com>
+
+ * mips.h (E_MIPS_ARCH_32): New constant.
+ (E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the
+ former with the latter.
+
+ * mips.h (E_MIPS_ARCH_5, E_MIPS_ARCH_64): New definitions.
+
+ * mips.h (E_MIPS_MACH_SB1): New constant.
+
+2000-11-30 Jan Hubicka <jh@suse.cz>
+
+ * common.h (EM_X86_64): New macro.
+ * x86-64.h: New file.
+
+2000-11-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * common.h (e_machine numbers): Clarify comments to describe how
+ EM_* constants are assigned. Move EM_PJ from official section to
+ ad-hoc section.
+ (EM_CRIS): Correct comment to match official description.
+ (EM_MMIX): Ditto.
+
+2000-11-22 Nick Clifton <nickc@redhat.com>
+
+ * common.h (EM_JAVELIN): New machine number.
+ (EM_FIREPATH): New machine number.
+ (EM_ZSP): New machine number.
+ (EM_MMIX): New machine number.
+ (EM_HUANY): New machine number.
+ (EM_PRISM): New machine number.
+ (SHT_GROUP): New section type.
+ (SHT_SYMTAB_SHNDX): New section type.
+ (SHF_GROUP): New section flag.
+ (SHN_XINDEX): New section index.
+ (GRP_COMDAT): New section group flag.
+
+2000-11-20 H.J. Lu <hjl@gnu.org>
+
+ * common.h (ELFOSABI_MONTEREY): Renamed to ...
+ (ELFOSABI_AIX): This.
+
+2000-11-16 Richard Henderson <rth@redhat.com>
+
+ Update relocations per August psABI docs.
+ * ia64.h (R_IA64_SEGBASE): Remove.
+ (R_IA64_LTV*): Renumber to 0x74 to 0x77.
+ (R_IA64_EPLTMSB, R_IA64_EPLTLSB): Remove.
+ (R_IA64_TPREL14, R_IA64_TPREL64I): New.
+ (R_IA64_DTPMOD*): New.
+ (R_IA64_DTPREL*): New.
+
+2000-09-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h (EF_CRIS_UNDERSCORE): New.
+
+2000-09-27 Alan Modra <alan@linuxcare.com.au>
+
+ * hppa.h (R_PARISC_DIR14F): Add.
+
+2000-09-14 Alexandre Oliva <aoliva@redhat.com>
+
+ * sh.h (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
+ R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Change
+ numbers to the range from 160 to 167.
+ (R_SH_FIRST_INVALID_RELOC): Adjust.
+ (R_SH_FIRST_INVALID_RELOC_2, R_SH_LAST_INVALID_RELOC_2):
+ New relocs to fill in the gap.
+
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
+
+ * mips.h (E_MIPS_MACH_4K): New define.
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ * hppa.h: Fix a comment.
+ (R_PARISC_PCREL12F): Define.
+ (R_PARISC_GNU_VTENTRY): Define.
+ (R_PARISC_GNU_VTINHERIT): Define.
+
+2000-09-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * sh.h (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
+ R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New relocs.
+ (R_SH_FIRST_INVALID_RELOC): Adjust.
+
+2000-08-14 Jim Wilson <wilson@cygnus.com>
+
+ * ia64.h (EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP,
+ EF_IA_64_NOFUNCDESC_CONS_GP, EF_IA_64_ABSOLUTE): Define.
+
+2000-08-07 Nick Clifton <nickc@cygnus.com>
+
+ * ppc.h: Remove spurious CYGNUS LOCAL comments.
+ * v850.h: Likewise.
+
+2000-07-22 Jason Eckhardt <jle@cygnus.com>
+
+ * i860.h: New file.
+ (elf_i860_reloc_type): Defined ELF32 i860 relocations.
+
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
+
+ common.h (EM_CRIS): New machine number.
+ cris.h: New file.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
* common.h (DF_1_NODEFLIB): Renamed from DF_1_NODEPLIB.
- From 2000-07-19 H.J. Lu <hjl@gnu.org>
+2000-07-19 H.J. Lu <hjl@gnu.org>
* common.h (DT_CHECKSUM): Set to 0x6ffffdf8.
(DTF_1_CONFEXP): It is 0x00000002 as suspected.
- From 2000-07-19 H.J. Lu <hjl@gnu.org>
+2000-07-19 H.J. Lu <hjl@gnu.org>
* common.h (DT_FEATURE): Renamed from DT_FEATURE_1.
(DT_CONFIG): New. From Solaris 8.
@@ -23,16 +179,83 @@
(DT_CHECKSUM): Likewise. FIXME. Check the value on Solaris 8.
(DTF_1_CONFEXP): Likewise.
- From 2000-07-18 H.J. Lu <hjl@gnu.org>
+2000-07-18 H.J. Lu <hjl@gnu.org>
* common.h (DT_FLAGS_1): Renamed from DT_1_FLAGS.
+2000-07-12 Alan Modra <alan@linuxcare.com.au>
+
+ * internal.h (struct elf_internal_sym): Update comment for st_other.
+
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
+
+ * hppa.h: Add comments to all the relocs.
+
+2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * avr.h (E_AVR_MACH_AVR5): Define.
+
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * m68hc11.h: New file, definitions for the Motorola 68hc11.
+
+2000-06-06 Alan Modra <alan@linuxcare.com.au>
+
+ * reloc-macros.h (START_RELOC_NUMBERS): Don't define initial dummy
+ -1 valued enum.
+ (RELOC_NUMBER, FAKE_RELOC, EMPTY_RELOC): Append rather than
+ prepend comma.
+ (END_RELOC_NUMBERS): Give macro an arg to define as last enum.
+
+ * alpha.h (R_ALPHA_max): Define via END_RELOC_NUMBERS rather than
+ with EMPTY_RELOC.
+ * arc.h (R_ARC_max): Likewise.
+ * avr.h (R_AVR_max): Likewise.
+ * fr30.h (R_FR30_max): Likewise.
+ * hppa.h (R_PARISC_UNIMPLEMENTED): Likewise.
+ * i960.h (R_960_max): Likewise.
+ * m32r.h (R_M32R_max): Likewise.
+ * m68k.h (R_68K_max): Likewise.
+ * mcore.h (R_MCORE_max): Likewise.
+ * mn10300.h (R_MN10300_MAX): Likewise.
+ * pj.h (R_PJ_max): Likewise.
+ * ppc.h (R_PPC_max): Likewise.
+ * sh.h (R_SH_max): Likewise.
+ * sparc.h (R_SPARC_max): Likewise.
+ * v850.h (R_V850_max): Likewise.
+
+ * arm.h (R_ARM_max): Define via END_RELOC_NUMBERS.
+ * d10v.h (R_D10V_max): Likewise.
+ * d30v.h (R_D30V_max): Likewise.
+ * ia64.h (R_IA64_max): Likewise.
+ * mips.h (R_MIPS_maxext): Likewise.
+ * mn10200.h (R_MN10200_max): Likewise.
+
+ * i386.h (R_386_max): Remove old RELOC_NUMBER definition, and
+ define via END_RELOC_NUMBERS.
+
+2000-06-03 Alan Modra <alan@linuxcare.com.au>
+
+ * reloc-macros.h (START_RELOC_NUMBERS): Fix name clash for
+ !__STDC__ case.
+ (RELOC_NUMBER): Use ansi stringify if ALMOST_STDC defined.
+
+2000-05-22 Richard Henderson <rth@cygnus.com>
+
+ * ia64.h (R_IA64_PCREL60B, R_IA64_PCREL21BI): New.
+ (R_IA64_PCREL22, R_IA64_PCREL64I): New.
+
2000-05-02 H.J. Lu <hjl@gnu.org>
* common.h (ELFOSABI_NONE): Renamed from ELFOSABI_SYSV.
(ELFOSABI_MODESTO): Defined.
(ELFOSABI_OPENBSD): Likewise.
+Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+
+ * ia64.h: New file.
+
2000-04-14 H.J. Lu <hjl@gnu.org>
* common.h (ELFOSABI_TRUE64): Renamed to ELFOSABI_TRU64.
@@ -47,6 +270,26 @@
(ELFOSABI_FREEBSD): Likewise.
(ELFOSABI_TRUE64): Likewise.
+2000-04-07 Nick Clifton <nickc@cygnus.com>
+
+ * arm-oabi.h: Delete.
+ * arm.h: Merge in definitions of old reloc numbers from
+ arm-oabi.h.
+
+2000-04-06 Nick Clifton <nickc@cygnus.com>
+
+ * arm.h (EF_ARM_SYMSARESORTED): Define.
+ (EF_ARM_EABIMASK): Define.
+ (EF_ARM_EABI_VERSION): Define.
+ (EF_ARM_EABI_UNKNOWN): Define.
+ (EF_ARM_EABI_VER1): Define.
+ (PF_ARM_PI): Define.
+ (PF_ARM_ABS): Define.
+
+Wed Apr 5 22:08:59 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): New RELOC_NUMBERs.
+
2000-03-27 Denis Chertykov <denisc@overta.ru>
* avr.h: New file. AVR ELF support for BFD.
@@ -55,8 +298,8 @@
2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
* mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16,
- R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation
- numbers.
+ R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation
+ numbers.
2000-02-23 Linas Vepstas <linas@linas.org>
@@ -85,7 +328,7 @@ Thu Feb 17 00:18:33 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2000-01-27 Thomas de Lellis <tdel@windriver.com>
- * arm.h (STT_ARM_TFUNC): Define in terms of STT_LOPROC.
+ * arm.h (STT_ARM_TFUNC): Define in terms of STT_LOPROC.
(STT_ARM_16BIT): New flag. Denotes a label that was defined in
Thumb block but was does not identify a function.
@@ -112,12 +355,12 @@ Thu Feb 17 00:18:33 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2000-01-10 Egor Duda <deo@logos-m.ru>
- * common.h (NT_WIN32PSTATUS): Define. (cygwin elf core dumps).
+ * common.h (NT_WIN32PSTATUS): Define. (cygwin elf core dumps).
1999-12-28 Nick Clifton <nickc@cygnus.com>
* mips.h (STO_*): Redefine in terms of STV_* values now in
- common.h.
+ common.h.
1999-12-27 Nick Clifton <nickc@cygnus.com>
@@ -175,7 +418,7 @@ Thu Feb 17 00:18:33 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* i960.h (reloc-macros.h): Include using relative dir elf/.
* i386.h (reloc-macros.h): Include using relative dir elf/.
* hppa.h (reloc-macros.h): Include using relative dir elf/.
-
+
1999-12-07 Jim Blandy <jimb@cygnus.com>
* common.h (NT_PRXFPREG): New definition.
@@ -284,9 +527,9 @@ Wed Jun 9 15:16:34 1999 Jeffrey A Law (law@cygnus.com)
* mcore.h (R_MCORE_RELATIVE): Define.
-999-05-05 Catherine Moore <clm@cygnus.com>
+1999-05-05 Catherine Moore <clm@cygnus.com>
- * m68k.h (EF_CPU32): Define.
+ * m68k.h (EF_CPU32): Define.
1999-04-21 Nick Clifton <nickc@cygnus.com>
@@ -333,7 +576,7 @@ Thu Feb 18 18:58:26 1999 Ian Lance Taylor <ian@cygnus.com>
Patch submitted by: Scott Bambrough <scottb@corelcomputer.com>
- * elf/external.h: struct Elf_External_Versym must be packed on
+ * external.h: struct Elf_External_Versym must be packed on
ARM. Code uses sizeof(Elf_External_Versym) and assumes it is
equal to sizeof(char[2]). Reported by Jim Pick <jim@jimpick.com>
@@ -344,10 +587,10 @@ Thu Feb 18 18:58:26 1999 Ian Lance Taylor <ian@cygnus.com>
Mon Feb 1 11:33:56 1999 Catherine Moore <clm@cygnus.com>
- * arm.h: Renumber relocs to conform to standard.
- (EF_NEW_ABI): Define.
- (EF_OLD_ABI): Define.
- * arm-oabi.h: New file.
+ * arm.h: Renumber relocs to conform to standard.
+ (EF_NEW_ABI): Define.
+ (EF_OLD_ABI): Define.
+ * arm-oabi.h: New file.
1999-01-28 Nick Clifton <nickc@cygnus.com>
@@ -378,13 +621,18 @@ Mon Feb 1 11:33:56 1999 Catherine Moore <clm@cygnus.com>
* mips.h: Add R_MIPS_JALR and adjust R_MIPS_max appropriately.
+Mon Nov 30 15:25:58 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC,
+ R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max.
+
Tue Nov 10 15:12:28 1998 Nick Clifton <nickc@cygnus.com>
* common.h (EM_CYGNUS_FR30): Reduce to a 16 bit value.
Tue Nov 10 15:17:28 1998 Catherine Moore <clm@cygnus.com>
- * d10v.h: Add vtable relocs.
+ * d10v.h: Add vtable relocs.
Wed Nov 4 15:56:50 1998 Nick Clifton <nickc@cygnus.com>
@@ -394,9 +642,9 @@ Wed Nov 4 15:56:50 1998 Nick Clifton <nickc@cygnus.com>
Fri Oct 30 11:54:15 1998 Catherine Moore <clm@cygnus.com>
- From Philip Blundell <pb@nexus.co.uk>:
- * arm.h (R_ARM_COPY, et al.): New relocs, used by Linux for PIC.
- (EF_ALIGN8): New flag.
+ From Philip Blundell <pb@nexus.co.uk>:
+ * arm.h (R_ARM_COPY, et al.): New relocs, used by Linux for PIC.
+ (EF_ALIGN8): New flag.
Tue Oct 20 11:19:50 1998 Ian Lance Taylor <ian@cygnus.com>
@@ -404,25 +652,25 @@ Tue Oct 20 11:19:50 1998 Ian Lance Taylor <ian@cygnus.com>
Mon Oct 19 20:24:11 1998 Catherine Moore <clm@cygnus.com>
- * sh.h: Add vtable relocs.
+ * sh.h: Add vtable relocs.
Mon Oct 19 01:44:42 1998 Felix Lee <flee@cygnus.com>
* common.h (NT_PSTATUS, NT_FPREGS, NT_PSINFO,
- NT_LWPSTATUS,NT_LWPSINFO): added.
+ NT_LWPSTATUS,NT_LWPSINFO): added.
* internal.h (Elf_Internal_Note): new structure members.
Fri Oct 16 14:11:25 1998 Catherine Moore <clm@cygnus.com>
- * m32r.h: Add vtable relocs.
+ * m32r.h: Add vtable relocs.
Tue Oct 6 09:22:22 1998 Catherine Moore <clm@cygnus.com>
- * sparc.h: Add vtable relocs.
+ * sparc.h: Add vtable relocs.
Mon Oct 5 09:39:22 1998 Catherine Moore <clm@cygnus.com>
- * v850.h: Add vtable relocs.
+ * v850.h: Add vtable relocs.
Sun Oct 4 21:17:51 1998 Ian Lance Taylor <ian@cygnus.com>
@@ -430,7 +678,7 @@ Sun Oct 4 21:17:51 1998 Ian Lance Taylor <ian@cygnus.com>
Mon Sep 21 12:24:44 1998 Catherine Moore <clm@cygnus.com>
- * i386.h: Change vtable reloc numbers.
+ * i386.h: Change vtable reloc numbers.
Sun Sep 20 00:54:22 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -438,12 +686,12 @@ Sun Sep 20 00:54:22 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
Tue Sep 15 09:56:49 CDT 1998 Catherine Moore <clm@cygnus.com>
- * arm.h: Add vtable relocs.
+ * arm.h: Add vtable relocs.
Mon Aug 31 11:25:27 1998 Catherine Moore <clm@cygnus.com>
- * arm.h: Define STT_ARM_TFUNC. Remove ST_THUMB_xxxx
- definitions.
+ * arm.h: Define STT_ARM_TFUNC. Remove ST_THUMB_xxxx
+ definitions.
Sat Aug 29 22:25:51 1998 Richard Henderson <rth@cygnus.com>
@@ -460,7 +708,7 @@ Sat Aug 29 22:25:51 1998 Richard Henderson <rth@cygnus.com>
Sun Aug 9 20:26:49 CDT 1998 Catherine Moore <clm@cygnus.com>
- * arm.h: Add ST_THUMB definitions.
+ * arm.h: Add ST_THUMB definitions.
Wed Aug 5 15:52:35 1998 Nick Clifton <nickc@cygnus.com>
@@ -476,7 +724,7 @@ Wed Aug 5 15:52:35 1998 Nick Clifton <nickc@cygnus.com>
Fri Jul 31 10:01:40 1998 Catherine Moore <clm@cygnus.com>
- * arm.h: Add R_ARM_THM_PC9 relocation.
+ * arm.h: Add R_ARM_THM_PC9 relocation.
1998-07-30 16:25 Ulrich Drepper <drepper@cygnus.com>
@@ -496,7 +744,7 @@ Fri Jul 24 11:22:06 1998 Jeffrey A Law (law@cygnus.com)
Wed Jul 22 19:29:00 Catherine Moore <clm@cygnus.com>
- * arm.h: Rename relocations.
+ * arm.h: Rename relocations.
1998-07-22 Ulrich Drepper <drepper@cygnus.com>
diff --git a/gnu/usr.bin/binutils/include/elf/common.h b/gnu/usr.bin/binutils/include/elf/common.h
index b2908539bbb..4c50b890c62 100644
--- a/gnu/usr.bin/binutils/include/elf/common.h
+++ b/gnu/usr.bin/binutils/include/elf/common.h
@@ -1,5 +1,6 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -64,21 +65,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELFOSABI_LINUX 3 /* GNU/Linux */
#define ELFOSABI_HURD 4 /* GNU/Hurd */
#define ELFOSABI_SOLARIS 6 /* Solaris */
-#define ELFOSABI_MONTEREY 7 /* Monterey */
+#define ELFOSABI_AIX 7 /* AIX */
#define ELFOSABI_IRIX 8 /* IRIX */
#define ELFOSABI_FREEBSD 9 /* FreeBSD */
#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
#define ELFOSABI_MODESTO 11 /* Novell Modesto */
#define ELFOSABI_OPENBSD 12 /* OpenBSD */
#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-#define ELFOSABI_ARM 97 /* ARM */
+#define ELFOSABI_ARM 97 /* ARM */
#define EI_ABIVERSION 8 /* ABI version */
#define EI_PAD 9 /* Start of padding bytes */
-/* Values for e_type, which identifies the object file type */
+/* Values for e_type, which identifies the object file type. */
#define ET_NONE 0 /* No file type */
#define ET_REL 1 /* Relocatable file */
@@ -90,7 +91,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ET_LOPROC 0xFF00 /* Processor-specific */
#define ET_HIPROC 0xFFFF /* Processor-specific */
-/* Values for e_machine, which identifies the architecture */
+/* Values for e_machine, which identifies the architecture. These numbers
+ are officially assigned by registry@sco.com. See below for a list of
+ ad-hoc numbers used during initial development. */
#define EM_NONE 0 /* No machine */
#define EM_M32 1 /* AT&T WE 32100 */
@@ -98,11 +101,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_386 3 /* Intel 80386 */
#define EM_68K 4 /* Motorola m68k family */
#define EM_88K 5 /* Motorola m88k family */
-#define EM_486 6 /* Intel 80486 */
+#define EM_486 6 /* Intel 80486 *//* Reserved for future use */
#define EM_860 7 /* Intel 80860 */
#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
#define EM_S370 9 /* IBM System/370 */
-#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ /* Depreciated */
#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft)*/ /* Depreciated */
#define EM_PARISC 15 /* HPPA */
@@ -123,7 +125,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_SH 42 /* Hitachi SH */
#define EM_SPARCV9 43 /* SPARC v9 64-bit */
#define EM_TRICORE 44 /* Siemens Tricore embedded processor */
-#define EM_ARC 45 /* Argonaut RISC Core, Argonaut Technologies Inc. */
+#define EM_ARC 45 /* ARC Cores */
#define EM_H8_300 46 /* Hitachi H8/300 */
#define EM_H8_300H 47 /* Hitachi H8/300H */
#define EM_H8S 48 /* Hitachi H8S */
@@ -140,6 +142,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_ME16 59 /* Toyota ME16 processor */
#define EM_ST100 60 /* STMicroelectronics ST100 processor */
#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */
+#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */
#define EM_FX66 66 /* Siemens FX66 microcontroller */
#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
@@ -149,10 +152,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */
#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */
#define EM_SVX 73 /* Silicon Graphics SVx */
-#define EM_ST19 74 /* STMicroelectronics ST19 8-bit microcontroller */
+#define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */
#define EM_VAX 75 /* Digital VAX */
-
-#define EM_PJ 99 /* picoJava */
+#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
+#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */
+#define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */
+#define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */
+#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
+#define EM_HUANY 81 /* Harvard's machine-independent format */
+#define EM_PRISM 82 /* SiTera Prism */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -160,7 +168,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
NOTE: Do not just increment the most recent number by one.
Somebody else somewhere will do exactly the same thing, and you
- will have a collision. Instead, pick a random number. */
+ will have a collision. Instead, pick a random number.
+
+ Normally, each entity or maintainer responsible for a machine with an
+ unofficial e_machine number should eventually ask registry@sco.com for
+ an officially blessed number to be added to the list above. */
+
+#define EM_PJ 99 /* picoJava */
/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_POWERPC 0x9025
@@ -204,12 +218,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* See the above comment before you add a new EM_* value here. */
-/* Values for e_version */
+/* Values for e_version. */
#define EV_NONE 0 /* Invalid ELF version */
#define EV_CURRENT 1 /* Current version */
-/* Values for program header, p_type field */
+/* Values for program header, p_type field. */
#define PT_NULL 0 /* Program header table entry unused */
#define PT_LOAD 1 /* Loadable program segment */
@@ -223,7 +237,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
-/* Program segment permissions, in program header p_flags field */
+/* Program segment permissions, in program header p_flags field. */
#define PF_X (1 << 0) /* Segment is executable */
#define PF_W (1 << 1) /* Segment is writable */
@@ -232,7 +246,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
#define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
-/* Values for section header, sh_type field */
+/* Values for section header, sh_type field. */
#define SHT_NULL 0 /* Section header table entry unused */
#define SHT_PROGBITS 1 /* Program specific (private) data */
@@ -247,12 +261,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHT_SHLIB 10 /* Reserved, unspecified semantics */
#define SHT_DYNSYM 11 /* Dynamic linking symbol table */
-#define SHT_INIT_ARRAY 14 /* Array of pointers to init functions */
-#define SHT_FINI_ARRAY 15 /* Array of pointers to finish functions */
-#define SHT_PREINIT_ARRAY 16 /* Array of pointers to pre-init functions */
+#define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */
+#define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */
+#define SHT_PREINIT_ARRAY 16 /* Array of ptrs to pre-init funcs */
+#define SHT_GROUP 17 /* Section contains a section group */
+#define SHT_SYMTAB_SHNDX 18 /* Indicies for SHN_XINDEX entries */
-#define SHT_LOOS 0x60000000 /* Operating system specific semantics, lo */
-#define SHT_HIOS 0x6fffffff /* Operating system specific semantics, hi */
+#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
+#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
/* The next three section types are defined by Solaris, and are named
SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU*
@@ -271,7 +287,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* #define SHT_HIUSER 0x8FFFFFFF *//* Application-specific semantics */
#define SHT_HIUSER 0xFFFFFFFF /* New value, defined in Oct 4, 1999 Draft */
-/* Values for section header, sh_flags field */
+/* Values for section header, sh_flags field. */
#define SHF_WRITE (1 << 0) /* Writable data during execution */
#define SHF_ALLOC (1 << 1) /* Occupies memory during execution */
@@ -280,13 +296,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */
#define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */
#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */
-#define SHF_OS_NONCONFORMING (1 << 8) /* OS specifci processing required */
+#define SHF_OS_NONCONFORMING (1 << 8) /* OS specific processing required */
+#define SHF_GROUP (1 << 9) /* Member of a section group */
/* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */
#define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
#define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */
-/* Values of note segment descriptor types for core files. */
+/* Values of note segment descriptor types for core files. */
#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */
#define NT_FPREGSET 2 /* Contains copy of fpregset struct */
@@ -295,7 +312,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */
/* note name must be "LINUX". */
-/* Note segments for core files on dir-style procfs systems. */
+/* Note segments for core files on dir-style procfs systems. */
#define NT_PSTATUS 10 /* Has a struct pstatus */
#define NT_FPREGS 12 /* Has a struct fpregset */
@@ -311,7 +328,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* These three macros disassemble and assemble a symbol table st_info field,
which contains the symbol binding and symbol type. The STB_ and STT_
- defines identify the binding and type. */
+ defines identify the binding and type. */
#define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4)
#define ELF_ST_TYPE(val) ((val) & 0xF)
@@ -337,7 +354,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY
-#define STN_UNDEF 0 /* undefined symbol index */
+#define STN_UNDEF 0 /* Undefined symbol index */
#define STB_LOCAL 0 /* Symbol not visible outside obj */
#define STB_GLOBAL 1 /* Symbol visible outside obj */
@@ -359,7 +376,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STT_HIPROC 15 /* Application-specific semantics */
/* Special section indices, which may show up in st_shndx fields, among
- other places. */
+ other places. */
#define SHN_UNDEF 0 /* Undefined section reference */
#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */
@@ -367,9 +384,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHN_HIPROC 0xFF1F /* End range of appl-specific */
#define SHN_LOOS 0xFF20 /* OS specific semantics, lo */
#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */
-#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
-#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
-#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
+#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
+#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
+#define SHN_XINDEX 0xFFFF /* Section index it held elsewhere */
+#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
/* The following constants control how a symbol may be accessed once it has
become part of an executable or shared library. */
@@ -378,9 +396,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STV_INTERNAL 1 /* OS specific version of STV_HIDDEN */
#define STV_HIDDEN 2 /* Can only be seen inside currect component */
#define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */
-
-/* relocation info handling macros */
+/* Relocation info handling macros. */
#define ELF32_R_SYM(i) ((i) >> 8)
#define ELF32_R_TYPE(i) ((i) & 0xff)
@@ -390,7 +407,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 32) + (bfd_vma) (t))
-/* Dynamic section tags */
+/* Dynamic section tags. */
#define DT_NULL 0
#define DT_NEEDED 1
@@ -492,7 +509,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
http://docs.sun.com:80/ab2/coll.45.13/LLM/@Ab2PageView/21165?Ab2Lang=C&Ab2Enc=iso-8859-1
DTF_1_CONFEXP is the same as DTF_1_PARINIT. It is a typo. The value
- defined here is the same as the one in <sys/link.h> on Solaris 8. */
+ defined here is the same as the one in <sys/link.h> on Solaris 8. */
#define DTF_1_CONFEXP 0x00000002
/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */
@@ -563,19 +580,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELF_VER_CHR '@'
/* Possible values for si_boundto. */
+
#define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */
#define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */
#define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */
/* Possible bitmasks for si_flags. */
+
#define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */
#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */
#define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */
-#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy
- loaded */
+#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy loaded */
+
/* Syminfo version values. */
+
#define SYMINFO_NONE 0
#define SYMINFO_CURRENT 1
#define SYMINFO_NUM 2
+/* Section Group Flags. */
+
+#define GRP_COMDAT 0x1 /* A COMDAT group */
+
#endif /* _ELF_COMMON_H */
diff --git a/gnu/usr.bin/binutils/include/elf/dwarf.h b/gnu/usr.bin/binutils/include/elf/dwarf.h
index 1e72cd70db8..f79397253a1 100644
--- a/gnu/usr.bin/binutils/include/elf/dwarf.h
+++ b/gnu/usr.bin/binutils/include/elf/dwarf.h
@@ -3,7 +3,7 @@
Written by Ron Guilmette (rfg@ncd.com)
-Copyright (C) 1992, 1999 Free Software Foundation, Inc.
+Copyright 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gnu/usr.bin/binutils/include/elf/external.h b/gnu/usr.bin/binutils/include/elf/external.h
index 5cab77e5549..38e6596de7d 100644
--- a/gnu/usr.bin/binutils/include/elf/external.h
+++ b/gnu/usr.bin/binutils/include/elf/external.h
@@ -1,5 +1,6 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 95, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2001
+ Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -25,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This file is part of ELF support for BFD, and contains the portions
that describe how ELF is represented externally by the BFD library.
I.E. it describes the in-file representation of ELF. It requires
- the elf-common.h file which contains the portions that are common to
+ the elf/common.h file which contains the portions that are common to
both the internal and external representations. */
/* The 64-bit stuff is kind of random. Perhaps someone will publish a
diff --git a/gnu/usr.bin/binutils/include/elf/hppa.h b/gnu/usr.bin/binutils/include/elf/hppa.h
index 0e45d7451fd..45e0b9f0f0f 100644
--- a/gnu/usr.bin/binutils/include/elf/hppa.h
+++ b/gnu/usr.bin/binutils/include/elf/hppa.h
@@ -1,5 +1,6 @@
/* HPPA ELF support for BFD.
- Copyright (C) 1993, 1994, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -102,173 +103,385 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf/reloc-macros.h"
START_RELOC_NUMBERS (elf_hppa_reloc_type)
- RELOC_NUMBER (R_PARISC_NONE, 0) /* No reloc */
-
- /* These relocation types do simple base + offset relocations. */
-
- RELOC_NUMBER (R_PARISC_DIR32, 1)
- RELOC_NUMBER (R_PARISC_DIR21L, 2)
- RELOC_NUMBER (R_PARISC_DIR17R, 3)
- RELOC_NUMBER (R_PARISC_DIR17F, 4)
- RELOC_NUMBER (R_PARISC_DIR14R, 6)
-
- /* PC-relative relocation types
- Typically used for calls.
- Note PCREL17C and PCREL17F differ only in overflow handling.
- PCREL17C never reports a relocation error.
-
- When supporting argument relocations, function calls must be
- accompanied by parameter relocation information. This information is
- carried in the ten high-order bits of the addend field. The remaining
- 22 bits of of the addend field are sign-extended to form the Addend.
-
- Note the code to build argument relocations depends on the
- addend being zero. A consequence of this limitation is GAS
- can not perform relocation reductions for function symbols. */
-
- RELOC_NUMBER (R_PARISC_PCREL32, 9)
- RELOC_NUMBER (R_PARISC_PCREL21L, 10)
- RELOC_NUMBER (R_PARISC_PCREL17R, 11)
- RELOC_NUMBER (R_PARISC_PCREL17F, 12)
- RELOC_NUMBER (R_PARISC_PCREL17C, 13)
- RELOC_NUMBER (R_PARISC_PCREL14R, 14)
- RELOC_NUMBER (R_PARISC_PCREL14F, 15)
-
- /* DP-relative relocation types. */
- RELOC_NUMBER (R_PARISC_DPREL21L, 18)
- RELOC_NUMBER (R_PARISC_DPREL14WR, 19)
- RELOC_NUMBER (R_PARISC_DPREL14DR, 20)
- RELOC_NUMBER (R_PARISC_DPREL14R, 22)
- RELOC_NUMBER (R_PARISC_DPREL14F, 23)
-
- /* Data linkage table (DLT) relocation types
-
- SOM DLT_REL fixup requests are used to for static data references
- from position-independent code within shared libraries. They are
- similar to the GOT relocation types in some SVR4 implementations. */
-
- RELOC_NUMBER (R_PARISC_DLTREL21L, 26)
- RELOC_NUMBER (R_PARISC_DLTREL14R, 30)
- RELOC_NUMBER (R_PARISC_DLTREL14F, 31)
-
- /* DLT indirect relocation types */
- RELOC_NUMBER (R_PARISC_DLTIND21L, 34)
- RELOC_NUMBER (R_PARISC_DLTIND14R, 38)
- RELOC_NUMBER (R_PARISC_DLTIND14F, 39)
-
- /* Base relative relocation types. Ugh. These imply lots of state */
- RELOC_NUMBER (R_PARISC_SETBASE, 40)
- RELOC_NUMBER (R_PARISC_SECREL32, 41)
- RELOC_NUMBER (R_PARISC_BASEREL21L, 42)
- RELOC_NUMBER (R_PARISC_BASEREL17R, 43)
- RELOC_NUMBER (R_PARISC_BASEREL17F, 44)
- RELOC_NUMBER (R_PARISC_BASEREL14R, 46)
- RELOC_NUMBER (R_PARISC_BASEREL14F, 47)
-
- /* Segment relative relocation types. */
- RELOC_NUMBER (R_PARISC_SEGBASE, 48)
- RELOC_NUMBER (R_PARISC_SEGREL32, 49)
-
- /* Offsets from the PLT. */
- RELOC_NUMBER (R_PARISC_PLTOFF21L, 50)
- RELOC_NUMBER (R_PARISC_PLTOFF14R, 54)
- RELOC_NUMBER (R_PARISC_PLTOFF14F, 55)
-
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR32, 57)
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR21L, 58)
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR14R, 62)
-
- RELOC_NUMBER (R_PARISC_FPTR64, 64)
-
- /* Plabel relocation types. */
- RELOC_NUMBER (R_PARISC_PLABEL32, 65)
- RELOC_NUMBER (R_PARISC_PLABEL21L, 66)
- RELOC_NUMBER (R_PARISC_PLABEL14R, 70)
-
- /* PCREL relocations. */
- RELOC_NUMBER (R_PARISC_PCREL64, 72)
- RELOC_NUMBER (R_PARISC_PCREL22C, 73)
- RELOC_NUMBER (R_PARISC_PCREL22F, 74)
- RELOC_NUMBER (R_PARISC_PCREL14WR, 75)
- RELOC_NUMBER (R_PARISC_PCREL14DR, 76)
- RELOC_NUMBER (R_PARISC_PCREL16F, 77)
- RELOC_NUMBER (R_PARISC_PCREL16WF, 78)
- RELOC_NUMBER (R_PARISC_PCREL16DF, 79)
-
-
- RELOC_NUMBER (R_PARISC_DIR64, 80)
- RELOC_NUMBER (R_PARISC_DIR64WR, 81)
- RELOC_NUMBER (R_PARISC_DIR64DR, 82)
- RELOC_NUMBER (R_PARISC_DIR14WR, 83)
- RELOC_NUMBER (R_PARISC_DIR14DR, 84)
- RELOC_NUMBER (R_PARISC_DIR16F, 85)
- RELOC_NUMBER (R_PARISC_DIR16WF, 86)
- RELOC_NUMBER (R_PARISC_DIR16DF, 87)
-
- RELOC_NUMBER (R_PARISC_GPREL64, 88)
-
- RELOC_NUMBER (R_PARISC_DLTREL14WR, 91)
- RELOC_NUMBER (R_PARISC_DLTREL14DR, 92)
- RELOC_NUMBER (R_PARISC_GPREL16F, 93)
- RELOC_NUMBER (R_PARISC_GPREL16WF, 94)
- RELOC_NUMBER (R_PARISC_GPREL16DF, 95)
-
-
- RELOC_NUMBER (R_PARISC_LTOFF64, 96)
- RELOC_NUMBER (R_PARISC_DLTIND14WR, 99)
- RELOC_NUMBER (R_PARISC_DLTIND14DR, 100)
- RELOC_NUMBER (R_PARISC_LTOFF16F, 101)
- RELOC_NUMBER (R_PARISC_LTOFF16WF, 102)
- RELOC_NUMBER (R_PARISC_LTOFF16DF, 103)
-
- RELOC_NUMBER (R_PARISC_SECREL64, 104)
-
- RELOC_NUMBER (R_PARISC_BASEREL14WR, 107)
- RELOC_NUMBER (R_PARISC_BASEREL14DR, 108)
-
- RELOC_NUMBER (R_PARISC_SEGREL64, 112)
-
- RELOC_NUMBER (R_PARISC_PLTOFF14WR, 115)
- RELOC_NUMBER (R_PARISC_PLTOFF14DR, 116)
- RELOC_NUMBER (R_PARISC_PLTOFF16F, 117)
- RELOC_NUMBER (R_PARISC_PLTOFF16WF, 118)
- RELOC_NUMBER (R_PARISC_PLTOFF16DF, 119)
-
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR64, 120)
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR14WR, 123)
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR14DR, 124)
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR16F, 125)
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR16WF, 126)
- RELOC_NUMBER (R_PARISC_LTOFF_FPTR16DF, 127)
-
-
- RELOC_NUMBER (R_PARISC_COPY, 128)
- RELOC_NUMBER (R_PARISC_IPLT, 129)
- RELOC_NUMBER (R_PARISC_EPLT, 130)
-
- RELOC_NUMBER (R_PARISC_TPREL32, 153)
- RELOC_NUMBER (R_PARISC_TPREL21L, 154)
- RELOC_NUMBER (R_PARISC_TPREL14R, 158)
-
- RELOC_NUMBER (R_PARISC_LTOFF_TP21L, 162)
- RELOC_NUMBER (R_PARISC_LTOFF_TP14R, 166)
- RELOC_NUMBER (R_PARISC_LTOFF_TP14F, 167)
-
- RELOC_NUMBER (R_PARISC_TPREL64, 216)
- RELOC_NUMBER (R_PARISC_TPREL14WR, 219)
- RELOC_NUMBER (R_PARISC_TPREL14DR, 220)
- RELOC_NUMBER (R_PARISC_TPREL16F, 221)
- RELOC_NUMBER (R_PARISC_TPREL16WF, 222)
- RELOC_NUMBER (R_PARISC_TPREL16DF, 223)
-
- RELOC_NUMBER (R_PARISC_LTOFF_TP64, 224)
- RELOC_NUMBER (R_PARISC_LTOFF_TP14WR, 227)
- RELOC_NUMBER (R_PARISC_LTOFF_TP14DR, 228)
- RELOC_NUMBER (R_PARISC_LTOFF_TP16F, 229)
- RELOC_NUMBER (R_PARISC_LTOFF_TP16WF, 230)
- RELOC_NUMBER (R_PARISC_LTOFF_TP16DF, 231)
- EMPTY_RELOC (R_PARISC_UNIMPLEMENTED)
-END_RELOC_NUMBERS
+RELOC_NUMBER (R_PARISC_NONE, 0) /* No reloc */
+
+/* Data / Inst. Format Relocation Expression */
+
+RELOC_NUMBER (R_PARISC_DIR32, 1)
+/* 32-bit word symbol + addend */
+
+RELOC_NUMBER (R_PARISC_DIR21L, 2)
+/* long immediate (7) LR(symbol, addend) */
+
+RELOC_NUMBER (R_PARISC_DIR17R, 3)
+/* branch external (19) RR(symbol, addend) */
+
+RELOC_NUMBER (R_PARISC_DIR17F, 4)
+/* branch external (19) symbol + addend */
+
+RELOC_NUMBER (R_PARISC_DIR14R, 6)
+/* load/store (1) RR(symbol, addend) */
+
+RELOC_NUMBER (R_PARISC_DIR14F, 7)
+/* load/store (1) symbol, addend */
+
+/* PC-relative relocation types
+ Typically used for calls.
+ Note PCREL17C and PCREL17F differ only in overflow handling.
+ PCREL17C never reports a relocation error.
+
+ When supporting argument relocations, function calls must be
+ accompanied by parameter relocation information. This information is
+ carried in the ten high-order bits of the addend field. The remaining
+ 22 bits of of the addend field are sign-extended to form the Addend.
+
+ Note the code to build argument relocations depends on the
+ addend being zero. A consequence of this limitation is GAS
+ can not perform relocation reductions for function symbols. */
+
+RELOC_NUMBER (R_PARISC_PCREL12F, 8)
+/* op & branch (17) symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL32, 9)
+/* 32-bit word symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL21L, 10)
+/* long immediate (7) L(symbol - PC - 8 + addend) */
+
+RELOC_NUMBER (R_PARISC_PCREL17R, 11)
+/* branch external (19) R(symbol - PC - 8 + addend) */
+
+RELOC_NUMBER (R_PARISC_PCREL17F, 12)
+/* branch (20) symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL17C, 13)
+/* branch (20) symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL14R, 14)
+/* load/store (1) R(symbol - PC - 8 + addend) */
+
+RELOC_NUMBER (R_PARISC_PCREL14F, 15)
+/* load/store (1) symbol - PC - 8 + addend */
+
+
+/* DP-relative relocation types. */
+RELOC_NUMBER (R_PARISC_DPREL21L, 18)
+/* long immediate (7) LR(symbol - GP, addend) */
+
+RELOC_NUMBER (R_PARISC_DPREL14WR, 19)
+/* load/store mod. comp. (2) RR(symbol - GP, addend) */
+
+RELOC_NUMBER (R_PARISC_DPREL14DR, 20)
+/* load/store doubleword (3) RR(symbol - GP, addend) */
+
+RELOC_NUMBER (R_PARISC_DPREL14R, 22)
+/* load/store (1) RR(symbol - GP, addend) */
+
+RELOC_NUMBER (R_PARISC_DPREL14F, 23)
+/* load/store (1) symbol - GP + addend */
+
+
+/* Data linkage table (DLT) relocation types
+
+ SOM DLT_REL fixup requests are used to for static data references
+ from position-independent code within shared libraries. They are
+ similar to the GOT relocation types in some SVR4 implementations. */
+
+RELOC_NUMBER (R_PARISC_DLTREL21L, 26)
+/* long immediate (7) LR(symbol - GP, addend) */
+
+RELOC_NUMBER (R_PARISC_DLTREL14R, 30)
+/* load/store (1) RR(symbol - GP, addend) */
+
+RELOC_NUMBER (R_PARISC_DLTREL14F, 31)
+/* load/store (1) symbol - GP + addend */
+
+
+/* DLT indirect relocation types */
+RELOC_NUMBER (R_PARISC_DLTIND21L, 34)
+/* long immediate (7) L(ltoff(symbol + addend)) */
+
+RELOC_NUMBER (R_PARISC_DLTIND14R, 38)
+/* load/store (1) R(ltoff(symbol + addend)) */
+
+RELOC_NUMBER (R_PARISC_DLTIND14F, 39)
+/* load/store (1) ltoff(symbol + addend) */
+
+
+/* Base relative relocation types. Ugh. These imply lots of state */
+RELOC_NUMBER (R_PARISC_SETBASE, 40)
+/* none no reloc; base := sym */
+
+RELOC_NUMBER (R_PARISC_SECREL32, 41)
+/* 32-bit word symbol - SECT + addend */
+
+RELOC_NUMBER (R_PARISC_BASEREL21L, 42)
+/* long immediate (7) LR(symbol - base, addend) */
+
+RELOC_NUMBER (R_PARISC_BASEREL17R, 43)
+/* branch external (19) RR(symbol - base, addend) */
+
+RELOC_NUMBER (R_PARISC_BASEREL17F, 44)
+/* branch external (19) symbol - base + addend */
+
+RELOC_NUMBER (R_PARISC_BASEREL14R, 46)
+/* load/store (1) RR(symbol - base, addend) */
+
+RELOC_NUMBER (R_PARISC_BASEREL14F, 47)
+/* load/store (1) symbol - base, addend */
+
+
+/* Segment relative relocation types. */
+RELOC_NUMBER (R_PARISC_SEGBASE, 48)
+/* none no relocation; SB := sym */
+
+RELOC_NUMBER (R_PARISC_SEGREL32, 49)
+/* 32-bit word symbol - SB + addend */
+
+
+/* Offsets from the PLT. */
+RELOC_NUMBER (R_PARISC_PLTOFF21L, 50)
+/* long immediate (7) LR(pltoff(symbol), addend) */
+
+RELOC_NUMBER (R_PARISC_PLTOFF14R, 54)
+/* load/store (1) RR(pltoff(symbol), addend) */
+
+RELOC_NUMBER (R_PARISC_PLTOFF14F, 55)
+/* load/store (1) pltoff(symbol) + addend */
+
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR32, 57)
+/* 32-bit word ltoff(fptr(symbol+addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR21L, 58)
+/* long immediate (7) L(ltoff(fptr(symbol+addend))) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR14R, 62)
+/* load/store (1) R(ltoff(fptr(symbol+addend))) */
+
+
+RELOC_NUMBER (R_PARISC_FPTR64, 64)
+/* 64-bit doubleword fptr(symbol+addend) */
+
+
+/* Plabel relocation types. */
+RELOC_NUMBER (R_PARISC_PLABEL32, 65)
+/* 32-bit word fptr(symbol) */
+
+RELOC_NUMBER (R_PARISC_PLABEL21L, 66)
+/* long immediate (7) L(fptr(symbol)) */
+
+RELOC_NUMBER (R_PARISC_PLABEL14R, 70)
+/* load/store (1) R(fptr(symbol)) */
+
+
+/* PCREL relocations. */
+RELOC_NUMBER (R_PARISC_PCREL64, 72)
+/* 64-bit doubleword symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL22C, 73)
+/* branch & link (21) symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL22F, 74)
+/* branch & link (21) symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL14WR, 75)
+/* load/store mod. comp. (2) R(symbol - PC - 8 + addend) */
+
+RELOC_NUMBER (R_PARISC_PCREL14DR, 76)
+/* load/store doubleword (3) R(symbol - PC - 8 + addend) */
+
+RELOC_NUMBER (R_PARISC_PCREL16F, 77)
+/* load/store (1) symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL16WF, 78)
+/* load/store mod. comp. (2) symbol - PC - 8 + addend */
+
+RELOC_NUMBER (R_PARISC_PCREL16DF, 79)
+/* load/store doubleword (3) symbol - PC - 8 + addend */
+
+
+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) */
+
+RELOC_NUMBER (R_PARISC_DIR14DR, 84)
+/* load/store doubleword (3) RR(symbol, addend) */
+
+RELOC_NUMBER (R_PARISC_DIR16F, 85)
+/* load/store (1) symbol + addend */
+
+RELOC_NUMBER (R_PARISC_DIR16WF, 86)
+/* load/store mod. comp. (2) symbol + addend */
+
+RELOC_NUMBER (R_PARISC_DIR16DF, 87)
+/* load/store doubleword (3) symbol + addend */
+
+RELOC_NUMBER (R_PARISC_GPREL64, 88)
+/* 64-bit doubleword symbol - GP + addend */
+
+RELOC_NUMBER (R_PARISC_DLTREL14WR, 91)
+/* load/store mod. comp. (2) RR(symbol - GP, addend) */
+
+RELOC_NUMBER (R_PARISC_DLTREL14DR, 92)
+/* load/store doubleword (3) RR(symbol - GP, addend) */
+
+RELOC_NUMBER (R_PARISC_GPREL16F, 93)
+/* load/store (1) symbol - GP + addend */
+
+RELOC_NUMBER (R_PARISC_GPREL16WF, 94)
+/* load/store mod. comp. (2) symbol - GP + addend */
+
+RELOC_NUMBER (R_PARISC_GPREL16DF, 95)
+/* load/store doubleword (3) symbol - GP + addend */
+
+
+RELOC_NUMBER (R_PARISC_LTOFF64, 96)
+/* 64-bit doubleword ltoff(symbol + addend) */
+
+RELOC_NUMBER (R_PARISC_DLTIND14WR, 99)
+/* load/store mod. comp. (2) R(ltoff(symbol + addend)) */
+
+RELOC_NUMBER (R_PARISC_DLTIND14DR, 100)
+/* load/store doubleword (3) R(ltoff(symbol + addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF16F, 101)
+/* load/store (1) ltoff(symbol + addend) */
+
+RELOC_NUMBER (R_PARISC_LTOFF16WF, 102)
+/* load/store mod. comp. (2) ltoff(symbol + addend) */
+
+RELOC_NUMBER (R_PARISC_LTOFF16DF, 103)
+/* load/store doubleword (3) ltoff(symbol + addend) */
+
+
+RELOC_NUMBER (R_PARISC_SECREL64, 104)
+/* 64-bit doubleword symbol - SECT + addend */
+
+RELOC_NUMBER (R_PARISC_BASEREL14WR, 107)
+/* load/store mod. comp. (2) RR(symbol - base, addend) */
+
+RELOC_NUMBER (R_PARISC_BASEREL14DR, 108)
+/* load/store doubleword (3) RR(symbol - base, addend) */
+
+
+RELOC_NUMBER (R_PARISC_SEGREL64, 112)
+/* 64-bit doubleword symbol - SB + addend */
+
+RELOC_NUMBER (R_PARISC_PLTOFF14WR, 115)
+/* load/store mod. comp. (2) RR(pltoff(symbol), addend) */
+
+RELOC_NUMBER (R_PARISC_PLTOFF14DR, 116)
+/* load/store doubleword (3) RR(pltoff(symbol), addend) */
+
+RELOC_NUMBER (R_PARISC_PLTOFF16F, 117)
+/* load/store (1) pltoff(symbol) + addend */
+
+RELOC_NUMBER (R_PARISC_PLTOFF16WF, 118)
+/* load/store mod. comp. (2) pltoff(symbol) + addend */
+
+RELOC_NUMBER (R_PARISC_PLTOFF16DF, 119)
+/* load/store doubleword (3) pltoff(symbol) + addend */
+
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR64, 120)
+/* 64-bit doubleword ltoff(fptr(symbol+addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR14WR, 123)
+/* load/store mod. comp. (2) R(ltoff(fptr(symbol+addend))) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR14DR, 124)
+/* load/store doubleword (3) R(ltoff(fptr(symbol+addend))) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR16F, 125)
+/* load/store (1) ltoff(fptr(symbol+addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR16WF, 126)
+/* load/store mod. comp. (2) ltoff(fptr(symbol+addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_FPTR16DF, 127)
+/* load/store doubleword (3) ltoff(fptr(symbol+addend)) */
+
+
+RELOC_NUMBER (R_PARISC_COPY, 128)
+/* data Dynamic relocations only */
+
+RELOC_NUMBER (R_PARISC_IPLT, 129)
+/* plt */
+
+RELOC_NUMBER (R_PARISC_EPLT, 130)
+/* plt */
+
+
+RELOC_NUMBER (R_PARISC_TPREL32, 153)
+/* 32-bit word symbol - TP + addend */
+
+RELOC_NUMBER (R_PARISC_TPREL21L, 154)
+/* long immediate (7) LR(symbol - TP, addend) */
+
+RELOC_NUMBER (R_PARISC_TPREL14R, 158)
+/* load/store (1) RR(symbol - TP, addend) */
+
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP21L, 162)
+/* long immediate (7) L(ltoff(symbol - TP + addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP14R, 166)
+/* load/store (1) R(ltoff(symbol - TP + addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP14F, 167)
+/* load/store (1) ltoff(symbol - TP + addend) */
+
+
+RELOC_NUMBER (R_PARISC_TPREL64, 216)
+/* 64-bit word symbol - TP + addend */
+
+RELOC_NUMBER (R_PARISC_TPREL14WR, 219)
+/* load/store mod. comp. (2) RR(symbol - TP, addend) */
+
+RELOC_NUMBER (R_PARISC_TPREL14DR, 220)
+/* load/store doubleword (3) RR(symbol - TP, addend) */
+
+RELOC_NUMBER (R_PARISC_TPREL16F, 221)
+/* load/store (1) symbol - TP + addend */
+
+RELOC_NUMBER (R_PARISC_TPREL16WF, 222)
+/* load/store mod. comp. (2) symbol - TP + addend */
+
+RELOC_NUMBER (R_PARISC_TPREL16DF, 223)
+/* load/store doubleword (3) symbol - TP + addend */
+
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP64, 224)
+/* 64-bit doubleword ltoff(symbol - TP + addend) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP14WR, 227)
+/* load/store mod. comp. (2) R(ltoff(symbol - TP + addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP14DR, 228)
+/* load/store doubleword (3) R(ltoff(symbol - TP + addend)) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP16F, 229)
+/* load/store (1) ltoff(symbol - TP + addend) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP16WF, 230)
+/* load/store mod. comp. (2) ltoff(symbol - TP + addend) */
+
+RELOC_NUMBER (R_PARISC_LTOFF_TP16DF, 231)
+/* load/store doubleword (3) ltoff(symbol - TP + addend) */
+
+RELOC_NUMBER (R_PARISC_GNU_VTENTRY, 232)
+RELOC_NUMBER (R_PARISC_GNU_VTINHERIT, 233)
+
+END_RELOC_NUMBERS (R_PARISC_UNIMPLEMENTED)
#ifndef RELOC_MACROS_GEN_FUNC
typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
@@ -288,19 +501,22 @@ typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
/* Processor specific dynamic array tags. */
-#define DT_HP_LOAD_MAP (DT_LOOS + 0x0)
-#define DT_HP_DLD_FLAGS (DT_LOOS + 0x1)
-#define DT_HP_DLD_HOOK (DT_LOOS + 0x2)
-#define DT_HP_UX10_INIT (DT_LOOS + 0x3)
-#define DT_HP_UX10_INITSZ (DT_LOOS + 0x4)
-#define DT_HP_PREINIT (DT_LOOS + 0x5)
-#define DT_HP_PREINITSZ (DT_LOOS + 0x6)
-#define DT_HP_NEEDED (DT_LOOS + 0x7)
-#define DT_HP_TIME_STAMP (DT_LOOS + 0x8)
-#define DT_HP_CHECKSUM (DT_LOOS + 0x9)
-#define DT_HP_GST_SIZE (DT_LOOS + 0xa)
-#define DT_HP_GST_VERSION (DT_LOOS + 0xb)
-#define DT_HP_GST_HASHVAL (DT_LOOS + 0xc)
+/* Arggh. HP's tools define these symbols based on the
+ old value of DT_LOOS. So we must do the same to be
+ compatible. */
+#define DT_HP_LOAD_MAP (OLD_DT_LOOS + 0x0)
+#define DT_HP_DLD_FLAGS (OLD_DT_LOOS + 0x1)
+#define DT_HP_DLD_HOOK (OLD_DT_LOOS + 0x2)
+#define DT_HP_UX10_INIT (OLD_DT_LOOS + 0x3)
+#define DT_HP_UX10_INITSZ (OLD_DT_LOOS + 0x4)
+#define DT_HP_PREINIT (OLD_DT_LOOS + 0x5)
+#define DT_HP_PREINITSZ (OLD_DT_LOOS + 0x6)
+#define DT_HP_NEEDED (OLD_DT_LOOS + 0x7)
+#define DT_HP_TIME_STAMP (OLD_DT_LOOS + 0x8)
+#define DT_HP_CHECKSUM (OLD_DT_LOOS + 0x9)
+#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)
/* Values for DT_HP_DLD_FLAGS. */
#define DT_HP_DEBUG_PRIVATE 0x0001 /* Map text private */
diff --git a/gnu/usr.bin/binutils/include/elf/internal.h b/gnu/usr.bin/binutils/include/elf/internal.h
index a9b81a0707b..eb79917f16c 100644
--- a/gnu/usr.bin/binutils/include/elf/internal.h
+++ b/gnu/usr.bin/binutils/include/elf/internal.h
@@ -1,5 +1,6 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000
+ Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -112,7 +113,7 @@ struct elf_internal_sym {
bfd_vma st_size; /* Associated symbol size */
unsigned long st_name; /* Symbol name, index in string tbl */
unsigned char st_info; /* Type and binding attributes */
- unsigned char st_other; /* No defined meaning, 0 */
+ unsigned char st_other; /* Visibilty, and target specific */
unsigned short st_shndx; /* Associated section index */
};
diff --git a/gnu/usr.bin/binutils/include/elf/mips.h b/gnu/usr.bin/binutils/include/elf/mips.h
index 1e2a9f99a70..6ad8d5b96b1 100644
--- a/gnu/usr.bin/binutils/include/elf/mips.h
+++ b/gnu/usr.bin/binutils/include/elf/mips.h
@@ -1,5 +1,6 @@
/* MIPS ELF support for BFD.
- Copyright (C) 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
information in the System V Application Binary Interface, MIPS
@@ -33,16 +34,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
START_RELOC_NUMBERS (elf_mips_reloc_type)
RELOC_NUMBER (R_MIPS_NONE, 0)
RELOC_NUMBER (R_MIPS_16, 1)
- RELOC_NUMBER (R_MIPS_32, 2)
- RELOC_NUMBER (R_MIPS_REL32, 3)
+ RELOC_NUMBER (R_MIPS_32, 2) /* In Elf 64: alias R_MIPS_ADD */
+ RELOC_NUMBER (R_MIPS_REL32, 3) /* In Elf 64: alias R_MIPS_REL */
RELOC_NUMBER (R_MIPS_26, 4)
RELOC_NUMBER (R_MIPS_HI16, 5)
RELOC_NUMBER (R_MIPS_LO16, 6)
- RELOC_NUMBER (R_MIPS_GPREL16, 7)
+ RELOC_NUMBER (R_MIPS_GPREL16, 7) /* In Elf 64: alias R_MIPS_GPREL */
RELOC_NUMBER (R_MIPS_LITERAL, 8)
- RELOC_NUMBER (R_MIPS_GOT16, 9)
+ RELOC_NUMBER (R_MIPS_GOT16, 9) /* In Elf 64: alias R_MIPS_GOT */
RELOC_NUMBER (R_MIPS_PC16, 10)
- RELOC_NUMBER (R_MIPS_CALL16, 11)
+ RELOC_NUMBER (R_MIPS_CALL16, 11) /* In Elf 64: alias R_MIPS_CALL */
RELOC_NUMBER (R_MIPS_GPREL32, 12)
/* The remaining relocs are defined on Irix, although they are not
in the MIPS ELF ABI. */
@@ -84,7 +85,7 @@ START_RELOC_NUMBERS (elf_mips_reloc_type)
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253)
RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254)
-END_RELOC_NUMBERS
+END_RELOC_NUMBERS (R_MIPS_maxext)
/* Processor specific flags for the ELF header e_flags field. */
@@ -98,10 +99,25 @@ END_RELOC_NUMBERS
position independent code. */
#define EF_MIPS_CPIC 0x00000004
+/* Code in file uses UCODE (obsolete) */
+#define EF_MIPS_UCODE 0x00000010
+
/* Code in file uses new ABI (-n32 on Irix 6). */
#define EF_MIPS_ABI2 0x00000020
-/* Indicates code compiled for a 64-bit machine in 32-bit mode.
+/* Process the .MIPS.options section first by ld */
+#define EF_MIPS_OPTIONS_FIRST 0x00000080
+
+/* Architectural Extensions used by this file */
+#define EF_MIPS_ARCH_ASE 0x0f000000
+
+/* Use MDMX multimedia extensions */
+#define EF_MIPS_ARCH_ASE_MDMX 0x08000000
+
+/* Use MIPS-16 ISA extensions */
+#define EF_MIPS_ARCH_ASE_M16 0x04000000
+
+/* Indicates code compiled for a 64-bit machine in 32-bit mode.
(regs are 32-bits wide.) */
#define EF_MIPS_32BITMODE 0x00000100
@@ -120,6 +136,15 @@ END_RELOC_NUMBERS
/* -mips4 code. */
#define E_MIPS_ARCH_4 0x30000000
+/* -mips5 code. */
+#define E_MIPS_ARCH_5 0x40000000
+
+/* -mips32 code. */
+#define E_MIPS_ARCH_32 0x50000000
+
+/* -mips64 code. */
+#define E_MIPS_ARCH_64 0x60000000
+
/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
#define EF_MIPS_ABI 0x0000F000
@@ -152,7 +177,8 @@ END_RELOC_NUMBERS
#define E_MIPS_MACH_4100 0x00830000
#define E_MIPS_MACH_4650 0x00850000
#define E_MIPS_MACH_4111 0x00880000
-
+#define E_MIPS_MACH_MIPS32_4K 0x00890000
+#define E_MIPS_MACH_SB1 0x008a0000
/* Processor specific section indices. These sections do not actually
exist. Symbols with a st_shndx field corresponding to one of these
@@ -254,19 +280,19 @@ END_RELOC_NUMBERS
/* ??? */
#define SHT_MIPS_RFDESC 0x7000001a
-/* ??? */
+/* Delta C++: symbol table */
#define SHT_MIPS_DELTASYM 0x7000001b
-/* ??? */
+/* Delta C++: instance table */
#define SHT_MIPS_DELTAINST 0x7000001c
-/* ??? */
+/* Delta C++: class table */
#define SHT_MIPS_DELTACLASS 0x7000001d
/* DWARF debugging section. */
#define SHT_MIPS_DWARF 0x7000001e
-/* ??? */
+/* Delta C++: declarations */
#define SHT_MIPS_DELTADECL 0x7000001f
/* List of libraries the binary depends on. Includes a time stamp, version
@@ -279,25 +305,25 @@ END_RELOC_NUMBERS
/* ??? */
#define SHT_MIPS_TRANSLATE 0x70000022
-/* ??? */
+/* Special pixie sections */
#define SHT_MIPS_PIXIE 0x70000023
-/* ??? */
+/* Address translation table (for debug info) */
#define SHT_MIPS_XLATE 0x70000024
-/* ??? */
+/* SGI internal address translation table (for debug info) */
#define SHT_MIPS_XLATE_DEBUG 0x70000025
-/* ??? */
+/* Intermediate code */
#define SHT_MIPS_WHIRL 0x70000026
-/* ??? */
+/* C++ exception handling region info */
#define SHT_MIPS_EH_REGION 0x70000027
-/* ??? */
+/* Obsolete address translation table (for debug info) */
#define SHT_MIPS_XLATE_OLD 0x70000028
-/* ??? */
+/* Runtime procedure descriptor table exception information (ucode) ??? */
#define SHT_MIPS_PDR_EXCEPTION 0x70000029
@@ -435,11 +461,12 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* This section should be merged. */
#define SHF_MIPS_MERGE 0x20000000
-/* This section contains 32 bit addresses. */
-#define SHF_MIPS_ADDR32 0x40000000
+/* This section contains address data of size implied by section
+ element size. */
+#define SHF_MIPS_ADDR 0x40000000
-/* This section contains 64 bit addresses. */
-#define SHF_MIPS_ADDR64 0x80000000
+/* This section contains string data. */
+#define SHF_MIPS_STRING 0x80000000
/* This section may not be stripped. */
#define SHF_MIPS_NOSTRIP 0x08000000
@@ -449,6 +476,10 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* Linker should generate implicit weak names for this section. */
#define SHF_MIPS_NAMES 0x02000000
+
+/* Section contais text/data which may be replicated in other sections.
+ Linker should retain only one copy. */
+#define SHF_MIPS_NODUPES 0x01000000
/* Processor specific program header types. */
@@ -458,7 +489,7 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* Runtime procedure table. */
#define PT_MIPS_RTPROC 0x70000001
-/* Options (for what ???). */
+/* .MIPS.options section. */
#define PT_MIPS_OPTIONS 0x70000002
/* Processor specific dynamic array tags. */
@@ -550,19 +581,19 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* Pixie information (???). */
#define DT_MIPS_PIXIE_INIT 0x70000023
-/* ??? */
+/* Address of .MIPS.symlib */
#define DT_MIPS_SYMBOL_LIB 0x70000024
-/* ??? */
+/* The GOT index of the first PTE for a segment */
#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
-/* ??? */
+/* The GOT index of the first PTE for a local symbol */
#define DT_MIPS_LOCAL_GOTIDX 0x70000026
-/* ??? */
+/* The GOT index of the first PTE for a hidden symbol */
#define DT_MIPS_HIDDEN_GOTIDX 0x70000027
-/* ??? */
+/* The GOT index of the first PTE for a protected symbol */
#define DT_MIPS_PROTECTED_GOTIDX 0x70000028
/* Address of `.MIPS.options'. */
@@ -604,20 +635,44 @@ extern void bfd_mips_elf32_swap_reginfo_out
#define RHF_NOTPOT 0x00000002
/* Ignore LD_LIBRARY_PATH. */
-#define RHS_NO_LIBRARY_REPLACEMENT \
- 0x00000004
+#define RHS_NO_LIBRARY_REPLACEMENT 0x00000004
+
+/* DSO address may not be relocated. */
+#define RHF_NO_MOVE 0x00000008
-#define RHF_NO_MOVE 0x00000008
-#define RHF_SGI_ONLY 0x00000010
+/* SGI specific features. */
+#define RHF_SGI_ONLY 0x00000010
+
+/* Guarantee that .init will finish executing before any non-init
+ code in DSO is called. */
#define RHF_GUARANTEE_INIT 0x00000020
+
+/* Contains Delta C++ code. */
#define RHF_DELTA_C_PLUS_PLUS 0x00000040
+
+/* Guarantee that .init will start executing before any non-init
+ code in DSO is called. */
#define RHF_GUARANTEE_START_INIT 0x00000080
+
+/* Generated by pixie. */
#define RHF_PIXIE 0x00000100
+
+/* Delay-load DSO by default. */
#define RHF_DEFAULT_DELAY_LOAD 0x00000200
+
+/* Object may be requickstarted */
#define RHF_REQUICKSTART 0x00000400
+
+/* Object has been requickstarted */
#define RHF_REQUICKSTARTED 0x00000800
+
+/* Generated by cord. */
#define RHF_CORD 0x00001000
+
+/* Object contains no unresolved undef symbols. */
#define RHF_NO_UNRES_UNDEF 0x00002000
+
+/* Symbol table is in a safe order. */
#define RHF_RLD_ORDER_SAFE 0x00004000
/* Special values for the st_other field in the symbol table. These
@@ -711,6 +766,12 @@ typedef struct
bfd_signed_vma r_addend;
} Elf64_Mips_Internal_Rela;
+/* MIPS ELF 64 relocation info access macros. */
+#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff)
+#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff)
+#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff)
+#define ELF64_MIPS_R_TYPE(i) ((i) & 0xff)
+
/* Values found in the r_ssym field of a relocation entry. */
/* No relocation. */
@@ -867,7 +928,8 @@ extern void bfd_mips_elf64_swap_reginfo_out
#define OEX_FPU_MAX 0x1f00 /* FPEs which may be enabled. */
#define OEX_PAGE0 0x10000 /* Page zero must be mapped. */
#define OEX_SMM 0x20000 /* Force sequential memory mode. */
-#define OEX_FPDBUG 0x40000 /* Force floating-point debug mode. */
+#define OEX_FPDBUG 0x40000 /* Force precise floating-point
+ exceptions (debug mode). */
#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults. */
/* Masks of the FP exceptions for OEX_FPU_MIN and OEX_FPU_MAX. */
@@ -883,10 +945,13 @@ extern void bfd_mips_elf64_swap_reginfo_out
#define OPAD_SYMBOL 0x04
/* Masks for the info word of an ODK_HWPATCH descriptor. */
-#define OHW_R4KEOP 0x01 /* R4000 end-of-page patch. */
-#define OHW_R8KPFETCH 0x02 /* May need R8000 prefetch patch. */
-#define OHW_R5KEOP 0x04 /* R5000 end-of-page patch. */
-#define OHW_R5KCVTL 0x08 /* R5000 cvt.[ds].l bug (clean == 1). */
+#define OHW_R4KEOP 0x00000001 /* R4000 end-of-page patch. */
+#define OHW_R8KPFETCH 0x00000002 /* May need R8000 prefetch patch. */
+#define OHW_R5KEOP 0x00000004 /* R5000 end-of-page patch. */
+#define OHW_R5KCVTL 0x00000008 /* R5000 cvt.[ds].l bug
+ (clean == 1). */
+#define OHW_R10KLDL 0x00000010 /* Needs R10K misaligned
+ load patch. */
/* Masks for the info word of an ODK_IDENT/ODK_GP_GROUP descriptor. */
#define OGP_GROUP 0x0000ffff /* GP group number. */
diff --git a/gnu/usr.bin/binutils/include/elf/ppc.h b/gnu/usr.bin/binutils/include/elf/ppc.h
index b3116d8ad01..426961e0908 100644
--- a/gnu/usr.bin/binutils/include/elf/ppc.h
+++ b/gnu/usr.bin/binutils/include/elf/ppc.h
@@ -1,5 +1,5 @@
/* PPC ELF support for BFD.
- Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
in the System V Application Binary Interface, PowerPC Processor Supplement
@@ -96,19 +96,17 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
that may still be in object files. */
RELOC_NUMBER (R_PPC_TOC16, 255)
- EMPTY_RELOC (R_PPC_max)
-END_RELOC_NUMBERS
+END_RELOC_NUMBERS (R_PPC_max)
/* Processor specific flags for the ELF header e_flags field. */
-#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */
+#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag. */
- /* CYGNUS local bits below */
-#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag */
-#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */
+#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag. */
+#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag. */
-/* Processor specific section headers, sh_type field */
+/* Processor specific section headers, sh_type field. */
#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
entries in this section \
@@ -116,7 +114,7 @@ END_RELOC_NUMBERS
specified in the associated \
symbol table entry. */
-/* Processor specific section flags, sh_flags field */
+/* Processor specific section flags, sh_flags field. */
#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
this section from executable \
diff --git a/gnu/usr.bin/binutils/include/elf/sparc.h b/gnu/usr.bin/binutils/include/elf/sparc.h
index 390e4a84496..7c780f7c3b9 100644
--- a/gnu/usr.bin/binutils/include/elf/sparc.h
+++ b/gnu/usr.bin/binutils/include/elf/sparc.h
@@ -1,5 +1,5 @@
/* SPARC ELF support for BFD.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
By Doug Evans, Cygnus Support, <dje@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -86,7 +86,7 @@ START_RELOC_NUMBERS (elf_sparc_reloc_type)
RELOC_NUMBER (R_SPARC_UA32, 23)
/* ??? These 6 relocs are new but not currently used. For binary
- compatility in the sparc64-elf toolchain, we leave them out.
+ compatibility in the sparc64-elf toolchain, we leave them out.
A non-binary upward compatible change is expected for sparc64-elf. */
#ifndef SPARC64_OLD_RELOCS
/* ??? New relocs on the UltraSPARC. Not sure what they're for yet. */
@@ -134,8 +134,7 @@ START_RELOC_NUMBERS (elf_sparc_reloc_type)
RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
- EMPTY_RELOC (R_SPARC_max)
-END_RELOC_NUMBERS
+END_RELOC_NUMBERS (R_SPARC_max)
/* Relocation macros. */
diff --git a/gnu/usr.bin/binutils/include/floatformat.h b/gnu/usr.bin/binutils/include/floatformat.h
index 90daca21bcb..4335401db5f 100644
--- a/gnu/usr.bin/binutils/include/floatformat.h
+++ b/gnu/usr.bin/binutils/include/floatformat.h
@@ -1,5 +1,5 @@
/* IEEE floating point support declarations, for GDB, the GNU Debugger.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright 1991, 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
This file is part of GDB.
@@ -73,6 +73,9 @@ struct floatformat
/* Is the integer bit explicit or implicit? */
enum floatformat_intbit intbit;
+
+ /* Internal name for debugging. */
+ const char *name;
};
/* floatformats for IEEE single and double, big and little endian. */
diff --git a/gnu/usr.bin/binutils/include/fnmatch.h b/gnu/usr.bin/binutils/include/fnmatch.h
index d5eb7000977..37d23ee1b35 100644
--- a/gnu/usr.bin/binutils/include/fnmatch.h
+++ b/gnu/usr.bin/binutils/include/fnmatch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
diff --git a/gnu/usr.bin/binutils/include/getopt.h b/gnu/usr.bin/binutils/include/getopt.h
index fb30719a860..cb5feba1160 100644
--- a/gnu/usr.bin/binutils/include/getopt.h
+++ b/gnu/usr.bin/binutils/include/getopt.h
@@ -1,5 +1,6 @@
/* Declarations for getopt.
- Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
@@ -99,13 +100,20 @@ struct option
#define optional_argument 2
#if defined (__STDC__) && __STDC__
-#ifdef __GNU_LIBRARY__
+/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is
+ undefined, we haven't run the autoconf check so provide the
+ declaration without arguments. If it is 0, we checked and failed
+ 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 defined (__GNU_LIBRARY__) || (defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT)
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern int getopt (int argc, char *const *argv, const char *shortopts);
#else /* not __GNU_LIBRARY__ */
+# if !defined (HAVE_DECL_GETOPT)
extern int getopt ();
+# endif
#endif /* __GNU_LIBRARY__ */
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
diff --git a/gnu/usr.bin/binutils/include/hp-symtab.h b/gnu/usr.bin/binutils/include/hp-symtab.h
index cf626c07343..0c9a48ab559 100644
--- a/gnu/usr.bin/binutils/include/hp-symtab.h
+++ b/gnu/usr.bin/binutils/include/hp-symtab.h
@@ -4,7 +4,7 @@
Written by the Center for Software Science at the University of Utah
and by Cygnus Support.
- Copyright 1994 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnu/usr.bin/binutils/include/ieee.h b/gnu/usr.bin/binutils/include/ieee.h
index 5ade39d33e3..5abc32b62d8 100644
--- a/gnu/usr.bin/binutils/include/ieee.h
+++ b/gnu/usr.bin/binutils/include/ieee.h
@@ -1,138 +1,164 @@
/* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, 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.
+
Contributed by Cygnus Support. */
#define N_W_VARIABLES 8
#define Module_Beginning 0xe0
-typedef struct ieee_module {
- char *processor;
- char *module_name;
-} ieee_module_begin_type;
+typedef struct ieee_module
+ {
+ char *processor;
+ char *module_name;
+ }
+ieee_module_begin_type;
#define Address_Descriptor 0xec
-typedef struct ieee_address {
-bfd_vma number_of_bits_mau;
- bfd_vma number_of_maus_in_address;
+typedef struct ieee_address
+ {
+ bfd_vma number_of_bits_mau;
+ bfd_vma number_of_maus_in_address;
- unsigned char byte_order;
+ unsigned char byte_order;
#define IEEE_LITTLE 0xcc
#define IEEE_BIG 0xcd
-} ieee_address_descriptor_type;
-
-typedef union ieee_w_variable {
- file_ptr offset[N_W_VARIABLES];
- struct {
- file_ptr extension_record;
- file_ptr environmental_record;
- file_ptr section_part;
- file_ptr external_part;
- file_ptr debug_information_part;
- file_ptr data_part;
- file_ptr trailer_part;
- file_ptr me_record;
- } r;
-} ieee_w_variable_type;
-
-
-
-
+ }
+ieee_address_descriptor_type;
+
+typedef union ieee_w_variable
+ {
+ file_ptr offset[N_W_VARIABLES];
+
+ struct
+ {
+ file_ptr extension_record;
+ file_ptr environmental_record;
+ file_ptr section_part;
+ file_ptr external_part;
+ file_ptr debug_information_part;
+ file_ptr data_part;
+ file_ptr trailer_part;
+ file_ptr me_record;
+ }
+ r;
+ }
+ieee_w_variable_type;
typedef enum ieee_record
-{
- ieee_number_start_enum = 0x00,
- ieee_number_end_enum=0x7f,
- ieee_number_repeat_start_enum = 0x80,
- ieee_number_repeat_end_enum = 0x88,
- ieee_number_repeat_4_enum = 0x84,
- ieee_number_repeat_3_enum = 0x83,
- ieee_number_repeat_2_enum = 0x82,
- ieee_number_repeat_1_enum = 0x81,
- ieee_module_beginning_enum = 0xe0,
- ieee_module_end_enum = 0xe1,
- ieee_extension_length_1_enum = 0xde,
- ieee_extension_length_2_enum = 0xdf,
- ieee_section_type_enum = 0xe6,
- ieee_section_alignment_enum = 0xe7,
- ieee_external_symbol_enum = 0xe8,
- ieee_comma = 0x90,
- ieee_external_reference_enum = 0xe9,
- ieee_set_current_section_enum = 0xe5,
- ieee_address_descriptor_enum = 0xec,
- ieee_load_constant_bytes_enum = 0xed,
- ieee_load_with_relocation_enum = 0xe4,
-
- ieee_variable_A_enum = 0xc1,
- ieee_variable_B_enum = 0xc2,
- ieee_variable_C_enum = 0xc3,
- ieee_variable_D_enum = 0xc4,
- ieee_variable_E_enum = 0xc5,
- ieee_variable_F_enum = 0xc6,
- ieee_variable_G_enum = 0xc7,
- ieee_variable_H_enum = 0xc8,
- ieee_variable_I_enum = 0xc9,
- ieee_variable_J_enum = 0xca,
- ieee_variable_K_enum = 0xcb,
- ieee_variable_L_enum = 0xcc,
- ieee_variable_M_enum = 0xcd,
- ieee_variable_N_enum = 0xce,
- ieee_variable_O_enum = 0xcf,
- ieee_variable_P_enum = 0xd0,
- ieee_variable_Q_enum = 0xd1,
- ieee_variable_R_enum = 0xd2,
- ieee_variable_S_enum = 0xd3,
- ieee_variable_T_enum = 0xd4,
- ieee_variable_U_enum = 0xd5,
- ieee_variable_V_enum = 0xd6,
- ieee_variable_W_enum = 0xd7,
- ieee_variable_X_enum = 0xd8,
- ieee_variable_Y_enum = 0xd9,
- ieee_variable_Z_enum = 0xda,
- ieee_function_plus_enum = 0xa5,
- ieee_function_minus_enum = 0xa6,
- ieee_function_signed_open_b_enum = 0xba,
- ieee_function_signed_close_b_enum = 0xbb,
-
- ieee_function_unsigned_open_b_enum = 0xbc,
- ieee_function_unsigned_close_b_enum = 0xbd,
-
- ieee_function_either_open_b_enum = 0xbe,
- ieee_function_either_close_b_enum = 0xbf,
- ieee_record_seperator_enum = 0xdb,
-
- ieee_e2_first_byte_enum = 0xe2,
- ieee_section_size_enum = 0xe2d3,
- ieee_physical_region_size_enum = 0xe2c1,
- ieee_region_base_address_enum = 0xe2c2,
- ieee_mau_size_enum = 0xe2c6,
- ieee_m_value_enum = 0xe2cd,
- ieee_section_base_address_enum = 0xe2cc,
- ieee_asn_record_enum = 0xe2ce,
- ieee_section_offset_enum = 0xe2d2,
- ieee_value_starting_address_enum = 0xe2c7,
- ieee_assign_value_to_variable_enum = 0xe2d7,
- ieee_set_current_pc_enum = 0xe2d0,
- ieee_value_record_enum = 0xe2c9,
- ieee_nn_record = 0xf0,
- ieee_at_record_enum = 0xf1,
- ieee_ty_record_enum = 0xf2,
- ieee_attribute_record_enum = 0xf1c9,
- ieee_atn_record_enum = 0xf1ce,
- ieee_external_reference_info_record_enum = 0xf1d8,
- ieee_weak_external_reference_enum= 0xf4,
- ieee_repeat_data_enum = 0xf7,
- ieee_bb_record_enum = 0xf8,
- ieee_be_record_enum = 0xf9
-} ieee_record_enum_type;
-
-
-typedef struct ieee_section {
- unsigned int section_index;
- unsigned int section_type;
- char *section_name;
- unsigned int parent_section_index;
- unsigned int sibling_section_index;
- unsigned int context_index;
-} ieee_section_type;
+ {
+ ieee_number_start_enum = 0x00,
+ ieee_number_end_enum=0x7f,
+ ieee_number_repeat_start_enum = 0x80,
+ ieee_number_repeat_end_enum = 0x88,
+ ieee_number_repeat_4_enum = 0x84,
+ ieee_number_repeat_3_enum = 0x83,
+ ieee_number_repeat_2_enum = 0x82,
+ ieee_number_repeat_1_enum = 0x81,
+ ieee_module_beginning_enum = 0xe0,
+ ieee_module_end_enum = 0xe1,
+ ieee_extension_length_1_enum = 0xde,
+ ieee_extension_length_2_enum = 0xdf,
+ ieee_section_type_enum = 0xe6,
+ ieee_section_alignment_enum = 0xe7,
+ ieee_external_symbol_enum = 0xe8,
+ ieee_comma = 0x90,
+ ieee_external_reference_enum = 0xe9,
+ ieee_set_current_section_enum = 0xe5,
+ ieee_address_descriptor_enum = 0xec,
+ ieee_load_constant_bytes_enum = 0xed,
+ ieee_load_with_relocation_enum = 0xe4,
+
+ ieee_variable_A_enum = 0xc1,
+ ieee_variable_B_enum = 0xc2,
+ ieee_variable_C_enum = 0xc3,
+ ieee_variable_D_enum = 0xc4,
+ ieee_variable_E_enum = 0xc5,
+ ieee_variable_F_enum = 0xc6,
+ ieee_variable_G_enum = 0xc7,
+ ieee_variable_H_enum = 0xc8,
+ ieee_variable_I_enum = 0xc9,
+ ieee_variable_J_enum = 0xca,
+ ieee_variable_K_enum = 0xcb,
+ ieee_variable_L_enum = 0xcc,
+ ieee_variable_M_enum = 0xcd,
+ ieee_variable_N_enum = 0xce,
+ ieee_variable_O_enum = 0xcf,
+ ieee_variable_P_enum = 0xd0,
+ ieee_variable_Q_enum = 0xd1,
+ ieee_variable_R_enum = 0xd2,
+ ieee_variable_S_enum = 0xd3,
+ ieee_variable_T_enum = 0xd4,
+ ieee_variable_U_enum = 0xd5,
+ ieee_variable_V_enum = 0xd6,
+ ieee_variable_W_enum = 0xd7,
+ ieee_variable_X_enum = 0xd8,
+ ieee_variable_Y_enum = 0xd9,
+ ieee_variable_Z_enum = 0xda,
+ ieee_function_plus_enum = 0xa5,
+ ieee_function_minus_enum = 0xa6,
+ ieee_function_signed_open_b_enum = 0xba,
+ ieee_function_signed_close_b_enum = 0xbb,
+
+ ieee_function_unsigned_open_b_enum = 0xbc,
+ ieee_function_unsigned_close_b_enum = 0xbd,
+
+ ieee_function_either_open_b_enum = 0xbe,
+ ieee_function_either_close_b_enum = 0xbf,
+ ieee_record_seperator_enum = 0xdb,
+
+ ieee_e2_first_byte_enum = 0xe2,
+ ieee_section_size_enum = 0xe2d3,
+ ieee_physical_region_size_enum = 0xe2c1,
+ ieee_region_base_address_enum = 0xe2c2,
+ ieee_mau_size_enum = 0xe2c6,
+ ieee_m_value_enum = 0xe2cd,
+ ieee_section_base_address_enum = 0xe2cc,
+ ieee_asn_record_enum = 0xe2ce,
+ ieee_section_offset_enum = 0xe2d2,
+ ieee_value_starting_address_enum = 0xe2c7,
+ ieee_assign_value_to_variable_enum = 0xe2d7,
+ ieee_set_current_pc_enum = 0xe2d0,
+ ieee_value_record_enum = 0xe2c9,
+ ieee_nn_record = 0xf0,
+ ieee_at_record_enum = 0xf1,
+ ieee_ty_record_enum = 0xf2,
+ ieee_attribute_record_enum = 0xf1c9,
+ ieee_atn_record_enum = 0xf1ce,
+ ieee_external_reference_info_record_enum = 0xf1d8,
+ ieee_weak_external_reference_enum= 0xf4,
+ ieee_repeat_data_enum = 0xf7,
+ ieee_bb_record_enum = 0xf8,
+ ieee_be_record_enum = 0xf9
+ }
+ieee_record_enum_type;
+
+typedef struct ieee_section
+ {
+ unsigned int section_index;
+ unsigned int section_type;
+ char * section_name;
+ unsigned int parent_section_index;
+ unsigned int sibling_section_index;
+ unsigned int context_index;
+ }
+ieee_section_type;
+
#define IEEE_REFERENCE_BASE 11
#define IEEE_PUBLIC_BASE 32
#define IEEE_SECTION_NUMBER_BASE 1
diff --git a/gnu/usr.bin/binutils/include/libiberty.h b/gnu/usr.bin/binutils/include/libiberty.h
index 9a536a4a194..1bc2b7d403b 100644
--- a/gnu/usr.bin/binutils/include/libiberty.h
+++ b/gnu/usr.bin/binutils/include/libiberty.h
@@ -1,4 +1,29 @@
/* Function declarations for libiberty.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ Note - certain prototypes declared in this header file are for
+ functions whoes implementation copyright does not belong to the
+ FSF. Those prototypes are present in this file for reference
+ purposes only and their presence in this file should not construed
+ as an indication of ownership by the FSF of the implementation of
+ those functions in any way or form whatsoever.
+
+ This program is free software; you can redistribute 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.
+
Written by Cygnus Support, 1994.
The libiberty library provides a number of functions which are
@@ -16,6 +41,13 @@ 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
+
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */
@@ -36,10 +68,17 @@ extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
across different systems, sometimes as "char *" and sometimes as
"const char *" */
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__)
+/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is
+ undefined, we haven't run the autoconf check so provide the
+ declaration without arguments. If it is 0, we checked and failed
+ 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 defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || (defined (HAVE_DECL_BASENAME) && !HAVE_DECL_BASENAME)
extern char *basename PARAMS ((const char *));
#else
+# if !defined (HAVE_DECL_BASENAME)
extern char *basename ();
+# endif
#endif
/* Concatenate an arbitrary number of strings, up to (char *) NULL.
@@ -123,16 +162,13 @@ extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN;
extern void xmalloc_set_program_name PARAMS ((const char *));
+/* Report an allocation failure. */
+extern void xmalloc_failed PARAMS ((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. */
-#ifdef ANSI_PROTOTYPES
-/* Get a definition for size_t. */
-#include <stddef.h>
-/* Get a definition for va_list. */
-#include <stdarg.h>
-#endif
extern PTR xmalloc PARAMS ((size_t)) ATTRIBUTE_MALLOC;
/* Reallocate memory without fail. This works like xmalloc. Note,
@@ -193,6 +229,8 @@ extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2;
extern int vasprintf PARAMS ((char **, const char *, va_list))
ATTRIBUTE_PRINTF(2,0);
+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+
#ifdef __cplusplus
}
#endif
diff --git a/gnu/usr.bin/binutils/include/mpw/ChangeLog b/gnu/usr.bin/binutils/include/mpw/ChangeLog
index 8dbad87eab4..dd3e6a51569 100644
--- a/gnu/usr.bin/binutils/include/mpw/ChangeLog
+++ b/gnu/usr.bin/binutils/include/mpw/ChangeLog
@@ -1,3 +1,7 @@
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * mpw.h: Update copyright notice.
+
Tue Feb 27 12:23:04 1996 Raymond Jou <rjou@mexican.cygnus.com>
* mpw.h (HAVE_VPRINTF): Add and define to have the value 1.
diff --git a/gnu/usr.bin/binutils/include/obstack.h b/gnu/usr.bin/binutils/include/obstack.h
index a20ab55967a..d86d9f2c426 100644
--- a/gnu/usr.bin/binutils/include/obstack.h
+++ b/gnu/usr.bin/binutils/include/obstack.h
@@ -1,5 +1,7 @@
/* obstack.h - object stack macros
- Copyright (C) 1988,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
+ 1999, 2000
+ Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
diff --git a/gnu/usr.bin/binutils/include/opcode/ChangeLog b/gnu/usr.bin/binutils/include/opcode/ChangeLog
index 4e8dbf1a6f9..9e40d0ce9ac 100644
--- a/gnu/usr.bin/binutils/include/opcode/ChangeLog
+++ b/gnu/usr.bin/binutils/include/opcode/ChangeLog
@@ -1,17 +1,320 @@
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * mips.h (CPU_R12000): Define.
+
+ 2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * mips.h (INSN_ISA_MASK): Define.
+
+ 2001-03-21 Kazu Hirata <kazu@hxi.com>
+ * h8300.h: Fix formatting.
+
+ 2001-02-28 Igor Shevlyakov <igor@windriver.com>
+ * m68k.h: new defines for Coldfire V4. Update mcf to know
+ about mcf5407.
+
+ 2001-02-10 Nick Clifton <nickc@redhat.com>
+ * mips.h: Remove extraneous whitespace. Formating change to allow
+ for future contribution.
+
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Many files: Update copyright notices.
+
+2001-05-12 Alan Modra <amodra@one.net.au>
+
+ * i386.h (i386_optab): Second operand of cvtps2dq is an xmm reg,
+ not an mmx reg. Swap xmm/mmx regs on both movdq2q and movq2dq,
+ and use InvMem as these insns must have register operands.
+
+2001-05-04 Alan Modra <amodra@one.net.au>
+
+ * i386.h (i386_optab): Move InvMem to first operand of pmovmskb
+ and pextrw to swap reg/rm assignments.
+
+2001-03-24 Alan Modra <alan@linuxcare.com.au>
+
+ * i386.h (i386_optab): Correct entry for "movntdq". Add "punpcklqdq".
+ Add InvMem to first operand of "maskmovdqu".
+
+2001-03-22 Alan Modra <alan@linuxcare.com.au>
+
+ * i386.h (i386_optab): Add paddq, psubq.
+
+2001-03-19 Alan Modra <alan@linuxcare.com.au>
+
+ * i386.h (REGNAM_AL, REGNAM_AX, REGNAM_EAX): Define.
+
+Mon Feb 12 17:39:31 CET 2001 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (i386_optab): SSE integer converison instructions have
+ 64bit versions on x86-64.
+
+2001-01-24 Karsten Keil <kkeil@suse.de>
+
+ * i386.h (i386_optab): Fix swapgs
+
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
+
+ * hppa.h: Describe new '<' and '>' operand types, and tidy
+ existing comments.
+ (pa_opcodes): Add entries for missing wide mode ldi,ldo,ldw,stw.
+ Remove duplicate "ldw j(s,b),x". Sort some entries.
+
+Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (i386_optab): Fix pusha and ret templates.
+
+2001-01-11 Peter Targett <peter.targett@arccores.com>
+
+ * arc.h (ARC_MACH_5, ARC_MACH_6, ARC_MACH_7, ARC_MACH_8): New
+ definitions for masking cpu type.
+ (arc_ext_operand_value) New structure for storing extended
+ operands.
+ (ARC_OPERAND_*) Flags for operand values.
+
+2001-01-10 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (pinsrw): Add.
+ (pshufw): Remove.
+ (cvttpd2dq): Fix operands.
+ (cvttps2dq): Likewise.
+ (movq2q): Rename to movdq2q.
+
+2001-01-10 Richard Schaal <richard.schaal@intel.com>
+
+ * i386.h: Correct movnti instruction.
+
+2001-01-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cgen.h (CGEN_SYNTAX_CHAR_TYPE): New typedef based on max number
+ of operands (unsigned char or unsigned short).
+ (CGEN_SYNTAX): Changed to make array CGEN_SYNTAX_CHAR_TYPE.
+ (CGEN_SYNTAX_CHAR): Changed to cast to unsigned char.
+
+2001-01-05 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (i386_optab): Make [sml]fence template to use immext field.
+
+2001-01-03 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (i386_optab): Fix 64bit pushf template; Add instructions
+ introduced by Pentium4
+
+2000-12-30 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (i386_optab): Add "rex*" instructions;
+ add swapgs; disable jmp/call far direct instructions for
+ 64bit mode; add syscall and sysret; disable registers for 0xc6
+ template. Add 'q' suffixes to extendable instructions, disable
+ obsolete instructions, add new sign/zero extension ones.
+ (i386_regtab): Add extended registers.
+ (*Suf): Add No_qSuf.
+ (q_Suf, wlq_Suf, bwlq_Suf): New.
+
+2000-12-20 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (i386_optab): Replace "Imm" with "EncImm".
+ (i386_regtab): Add flags field.
+
+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * mips.h: Fix formatting.
+
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ mips.h (OP_MASK_SYSCALL, OP_SH_SYSCALL): Delete.
+ (OP_MASK_CODE20, OP_SH_CODE20): Define, with values of old
+ OP_*_SYSCALL definitions.
+ (OP_SH_CODE19, OP_MASK_CODE19): Define, for use as
+ 19 bit wait codes.
+ (MIPS operand specifier comments): Remove 'm', add 'U' and
+ 'J', and update the meaning of 'B' so that it's more general.
+
+ * mips.h (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4,
+ INSN_ISA5): Renumber, redefine to mean the ISA at which the
+ instruction was added.
+ (INSN_ISA32): New constant.
+ (INSN_4650, INSN_4010, INSN_4100, INSN_3900, INSN_GP32):
+ Renumber to avoid new and/or renumbered INSN_* constants.
+ (INSN_MIPS32): Delete.
+ (ISA_UNKNOWN): New constant to indicate unknown ISA.
+ (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
+ ISA_MIPS32): New constants, defined to be the mask of INSN_*
+ constants available at that ISA level.
+ (CPU_UNKNOWN): New constant to indicate unknown CPU.
+ (CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
+ define it with a unique value.
+ (OPCODE_IS_MEMBER): Update for new ISA membership-related
+ constant meanings.
+
+ * mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
+ definitions.
+
+ * mips.h (CPU_SB1): New constant.
+
+2000-10-20 Jakub Jelinek <jakub@redhat.com>
+
+ * sparc.h (enum sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_V9B.
+ Note that '3' is used for siam operand.
+
+2000-09-22 Jim Wilson <wilson@cygnus.com>
+
+ * ia64.h (enum ia64_dependency_semantics): Add IA64_DVS_STOP.
+
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
+
+ * mips.h: Use defines instead of hard-coded processor numbers.
+ (CPU_R2000, CPU_R3000, CPU_R3900, CPU_R4000, CPU_R4010,
+ CPU_VR4100, CPU_R4111, CPU_R4300, CPU_R4400, CPU_R4600, CPU_R4650,
+ CPU_R5000, CPU_R6000, CPU_R8000, CPU_R10000, CPU_MIPS32, CPU_4K,
+ CPU_4KC, CPU_4KM, CPU_4KP): Define..
+ (OPCODE_IS_MEMBER): Use new defines.
+ (OP_MASK_SEL, OP_SH_SEL): Define.
+ (OP_MASK_CODE20, OP_SH_CODE20): Define.
+ Add 'P' to used characters.
+ Use 'H' for coprocessor select field.
+ Use 'm' for 20 bit breakpoint code.
+ Document new arg characters and add to used characters.
+ (INSN_MIPS32): New define for MIPS32 extensions.
+ (OPCODE_IS_MEMBER): Recognize MIPS32 instructions.
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ * hppa.h: Mention cz completer.
+
+2000-08-16 Jim Wilson <wilson@cygnus.com>
+
+ * ia64.h (IA64_OPCODE_POSTINC): New.
+
+2000-08-15 H.J. Lu <hjl@gnu.org>
+
+ * i386.h: Swap the Intel syntax "movsx"/"movzx" due to the
+ IgnoreSize change.
+
+2000-08-08 Jason Eckhardt <jle@cygnus.com>
+
+ * i860.h: Small formatting adjustments.
+
+2000-07-29 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * avr.h (AVR_UNDEF_P, AVR_SKIP_P, AVR_DISP0_P): New macros.
+ Move related opcodes closer to each other.
+ Minor changes in comments, list undefined opcodes.
+
+2000-07-26 Dave Brolley <brolley@redhat.com>
+
+ * cgen.h (cgen_hw_lookup_by_num): Second parameter is unsigned.
+
+2000-07-22 Jason Eckhardt <jle@cygnus.com>
+
+ * i860.h (btne, bte, bla): Changed these opcodes
+ to use sbroff ('r') instead of split16 ('s').
+ (J, K, L, M): New operand types for 16-bit aligned fields.
+ (ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to
+ use I, J, K, L, M instead of just I.
+ (T, U): New operand types for split 16-bit aligned fields.
+ (st.x): Changed these opcodes to use S, T, U instead of just S.
+ (andh, andnoth, orh, xorh): Deleted 3-register forms as they do not
+ exist on the i860.
+ (pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860.
+ (pfeq.ss, pfeq.dd): New opcodes.
+ (st.s): Fixed incorrect mask bits.
+ (fmlow): Fixed incorrect mask bits.
+ (fzchkl, pfzchkl): Fixed incorrect mask bits.
+ (faddz, pfaddz): Fixed incorrect mask bits.
+ (form, pform): Fixed incorrect mask bits.
+ (pfld.l): Fixed incorrect mask bits.
+ (fst.q): Fixed incorrect mask bits.
+ (all floating point opcodes): Fixed incorrect mask bits for
+ handling of dual bit.
+
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
+
+ cris.h: New file.
+
+2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * avr.h (AVR_ISA_WRAP): Remove, now assumed if not AVR_ISA_MEGA.
+ (AVR_ISA_ESPM): Remove, because ESPM removed in databook update.
+ (AVR_ISA_85xx): Remove, all uses changed back to AVR_ISA_2xxx.
+ (AVR_ISA_M83): Define for ATmega83, ATmega85.
+ (espm): Remove, because ESPM removed in databook update.
+ (eicall, eijmp): Move to the end of opcode table.
+
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * m68hc11.h: New file for support of Motorola 68hc11.
+
+Fri Jun 9 21:51:50 2000 Denis Chertykov <denisc@overta.ru>
+
+ * avr.h: clr,lsl,rol, ... moved after add,adc, ...
+
+Wed Jun 7 21:39:54 2000 Denis Chertykov <denisc@overta.ru>
+
+ * avr.h: New file with AVR opcodes.
+
+Wed Apr 12 17:11:20 2000 Donald Lindsay <dlindsay@hound.cygnus.com>
+
+ * d10v.h: added ALONE attribute for d10v_opcode.exec_type.
+
2000-05-23 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* i386.h: Allow d suffix on iret, and add DefaultSize modifier.
-2000-05-23 Alan Modra <alan@linuxcare.com.au>
+2000-05-17 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * i386.h: Use sl_FP, not sl_Suf for fild.
+
+2000-05-16 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen.h (CGEN_MAX_SYNTAX_BYTES): Increase to 32. Check that
+ it exceeds CGEN_ACTUAL_MAX_SYNTAX_BYTES, if set.
+ (CGEN_MAX_IFMT_OPERANDS): Increase to 16. Check that it exceeds
+ CGEN_ACTUAL_MAX_IFMT_OPERANDS, if set.
+
+2000-05-13 Alan Modra <alan@linuxcare.com.au>,
+
+ * i386.h (i386_optab): Cpu686 for sysenter,sysexit,fxsave,fxrestore.
- * i386.h: Delete redundant fp instruction comments.
+2000-05-13 Alan Modra <alan@linuxcare.com.au>,
+ Alexander Sokolov <robocop@netlink.ru>
+
+ * i386.h (i386_optab): Add cpu_flags for all instructions.
+
+2000-05-13 Alan Modra <alan@linuxcare.com.au>
From Gavin Romig-Koch <gavin@cygnus.com>
* i386.h (wld_Suf): Define. Use on pushf, popf, pusha, popa.
-2000-05-17 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+2000-05-04 Timothy Wall <twall@cygnus.com>
- * i386.h: Use sl_FP, not sl_Suf for fild.
+ * tic54x.h: New.
+
+2000-05-03 J.T. Conklin <jtc@redback.com>
+
+ * ppc.h (PPC_OPCODE_ALTIVEC): New opcode flag for vector unit.
+ (PPC_OPERAND_VR): New operand flag for vector registers.
+
+2000-05-01 Kazu Hirata <kazu@hxi.com>
+
+ * h8300.h (EOP): Add missing initializer.
+
+Fri Apr 21 15:03:37 2000 Jason Eckhardt <jle@cygnus.com>
+
+ * hppa.h (pa_opcodes): New opcodes for PA2.0 wide mode
+ forms of ld/st{b,h,w,d} and fld/fst{w,d} (16-bit displacements).
+ New operand types l,y,&,fe,fE,fx added to support above forms.
+ (pa_opcodes): Replaced usage of 'x' as source/target for
+ floating point double-word loads/stores with 'fx'.
+
+Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+ Timothy Wall <twall@cygnus.com>
+ Jim Wilson <wilson@cygnus.com>
+
+ * ia64.h: New file.
2000-03-27 Nick Clifton <nickc@cygnus.com>
@@ -64,6 +367,11 @@
* i370.h: New file.
+2000-02-22 Chandra Chavva <cchavva@cygnus.com>
+
+ * d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation
+ cannot be combined in parallel with ADD/SUBppp.
+
2000-02-22 Andrew Haley <aph@cygnus.com>
* mips.h: (OPCODE_IS_MEMBER): Add comment.
@@ -1583,8 +1891,8 @@ Mon Jan 23 16:45:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
Sat Jan 21 17:50:38 1995 Pat Rankin (rankin@eql.caltech.edu)
- * ../include/opcode/vax.h (struct vot_wot, field `args'): make
- it pointer to const char;
+ * vax.h (struct vot_wot, field `args'): Make it pointer to const
+ char.
(struct vot, field `name'): ditto.
Thu Jan 19 14:47:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
@@ -1905,6 +2213,15 @@ Fri Jun 11 18:38:44 1993 Ken Raeburn (raeburn@cygnus.com)
* hppa.h: Update "free list" of letters and update
comments describing each letter's function.
+Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * h8300.h: Lots of little fixes for the h8/300h.
+
+Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ Support for H8/300-H
+ * h8300.h: Lots of new opcodes.
+
Fri Jun 4 15:41:37 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
* h8300.h: checkpoint, includes H8/300-H opcodes.
@@ -2176,6 +2493,10 @@ Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com)
* sparc.h (nop): Add RD_GO to `lose' so that only %g0 in dest is
disassembled as a nop.
+Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
+
+ * m68k.h, sparc.h: ANSIfy enums.
+
Tue Dec 10 00:22:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
* sparc.h: fix a typo.
@@ -2184,7 +2505,7 @@ Sat Nov 30 20:40:51 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* a29k.h, arm.h, h8300.h, i386.h, i860.h, i960.h , m68k.h,
m88k.h, mips.h , np1.h, ns32k.h, pn.h, pyr.h, sparc.h, tahoe.h,
- vax.h, ChangeLog: renamed from ../<foo>-opcode.h
+ vax.h: Renamed from ../<foo>-opcode.h.
Local Variables:
diff --git a/gnu/usr.bin/binutils/include/opcode/h8300.h b/gnu/usr.bin/binutils/include/opcode/h8300.h
index 3a05e4ee21c..7ea87982ce2 100644
--- a/gnu/usr.bin/binutils/include/opcode/h8300.h
+++ b/gnu/usr.bin/binutils/include/opcode/h8300.h
@@ -1,6 +1,7 @@
-/* Opcode table for the H8-300
- Copyright (C) 1991, 92, 93, 95, 96, 97, 1998 Free Software Foundation.
- Written by Steve Chamberlain, sac@cygnus.com.
+/* Opcode table for the H8/300
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
+ Written by Steve Chamberlain <sac@cygnus.com>.
This file is part of GDB, the GNU Debugger and GAS, the GNU Assembler.
@@ -182,7 +183,7 @@ struct h8_opcode
#define NEW_SOP(code, in,x,name) \
{code, in, x, name
-#define EOP ,0,0,0 }
+#define EOP ,0,0,0,0 }
#define TWOOP(code, name, op1, op2,op3) \
{ code,1, 2,name, {{IMM8, RD8, E}}, {{ op1, RD8, IMM8, IGNORE, E, 0, 0, 0, 0}}, 0, 0, 0, 0},\
@@ -596,9 +597,5 @@ struct h8_opcode h8_opcodes[] =
{ 0 }
};
#else
-extern struct h8_opcode h8_opcodes[] ;
+extern struct h8_opcode h8_opcodes[];
#endif
-
-
-
-
diff --git a/gnu/usr.bin/binutils/include/opcode/hppa.h b/gnu/usr.bin/binutils/include/opcode/hppa.h
index 1c41ff07c25..f409ac94bb4 100644
--- a/gnu/usr.bin/binutils/include/opcode/hppa.h
+++ b/gnu/usr.bin/binutils/include/opcode/hppa.h
@@ -1,5 +1,7 @@
/* Table of opcodes for the PA-RISC.
- Copyright (C) 1990, 1991, 1993, 1995, 1999 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
+ 2001
+ Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -70,15 +72,15 @@ struct pa_opcode
In the args field, the following characters are unused:
- ' " & - / 34 6789:;< > @'
- ' C M [\] '
- ' e g l y } '
+ ' " - / 34 6789:; '
+ '@ C M [\] '
+ '` e g } '
Here are all the characters:
- ' !"#$%&'()*+-,./0123456789:;<=>?@'
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'
- 'abcdefghijklmnopqrstuvwxyz{|}~'
+ ' !"#$%&'()*+-,./0123456789:;<=>?'
+ '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'
+ '`abcdefghijklmnopqrstuvwxyz{|}~ '
Kinds of operands:
x integer register field at 15.
@@ -92,6 +94,7 @@ Kinds of operands:
i 11 bit immediate value at 31
j 14 bit immediate value at 31
k 21 bit immediate value at 31
+ l 16 bit immediate value at 31 (wide mode only, unusual encoding).
n nullification for branch instructions
N nullification for spop and copr instructions
w 12 bit branch displacement
@@ -145,7 +148,7 @@ Also these:
the bb instruction. It's the same as r above, except the
value is in a different location)
B 5 bit immediate value at 10 (a bit position specified in
- the bb instruction. Similar to Q, but 64bit handling is
+ the bb instruction. Similar to Q, but 64 bit handling is
different.
Z %r1 -- implicit target of addil instruction.
L ,%r2 completer for new syntax branch
@@ -153,10 +156,14 @@ Also these:
_ Destination format completer for fcnv
h cbit for fcmp
= gfx tests for ftest
- d 14bit offset for single precision FP long load/store.
- # 14bit offset for double precision FP load long/store.
- J Yet another 14bit offset with an unusual encoding.
- K Yet another 14bit offset with an unusual encoding.
+ d 14 bit offset for single precision FP long load/store.
+ # 14 bit offset for double precision FP load long/store.
+ J Yet another 14 bit offset for load/store with ma,mb completers.
+ K Yet another 14 bit offset for load/store with ma,mb completers.
+ y 16 bit offset for word aligned load/store (PA2.0 wide).
+ & 16 bit offset for dword aligned load/store (PA2.0 wide).
+ < 16 bit offset for load/store with ma,mb completers (PA2.0 wide).
+ > 16 bit offset for load/store with ma,mb completers (PA2.0 wide).
Y %sr0,%r31 -- implicit target of be,l instruction.
@ implicit immediate value of 0
@@ -197,6 +204,7 @@ Completer operands all have 'c' as the prefix:
ch left/right half completer
cH signed/unsigned saturation completer
cS signed/unsigned completer at 21
+ cz zero/sign extension completer.
c* permutation completer
Condition operands all have '?' as the prefix:
@@ -243,6 +251,8 @@ Floating point registers all have 'f' as a prefix:
fB operand 2 register with L/R halves at 15
fC operand 3 register with L/R halves at 16:18,21:23
fe Like fT, but encoding is different.
+ fE Same as fe, except prints a space before register during disasm.
+ fx target register at 15 (only for PA 2.0 long format FLDD/FSTD).
Float registers for fmpyadd and fmpysub:
@@ -257,7 +267,7 @@ Float registers for fmpyadd and fmpysub:
/* List of characters not to put a space after. Note that
"," is included, as the "spopN" operations use literal
- commas in their completer sections. */
+ commas in their completer sections. */
static const char *const completer_chars = ",CcY<>?!@+&U~FfGHINnOoZMadu|/=0123%e$m}";
/* The order of the opcodes in this table is significant:
@@ -270,8 +280,9 @@ static const char *const completer_chars = ",CcY<>?!@+&U~FfGHINnOoZMadu|/=0123%e
static const struct pa_opcode pa_opcodes[] =
{
-/* pseudo-instructions */
+/* Pseudo-instructions. */
+{ "ldi", 0x34000000, 0xffe00000, "l,x", pa20w, 0},/* ldo val(r0),r */
{ "ldi", 0x34000000, 0xffe0c000, "j,x", pa10, 0},/* ldo val(r0),r */
{ "call", 0xe800f000, 0xfc1ffffd, "n(b)", pa20, FLAG_STRICT},
@@ -312,7 +323,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldd", 0x0c0000c0, 0xfc0013c0, "cxccx(b),t", pa20, FLAG_STRICT},
{ "ldd", 0x0c0010c0, 0xfc0013c0, "cmcc5(s,b),t", pa20, FLAG_STRICT},
{ "ldd", 0x0c0010c0, 0xfc0013c0, "cmcc5(b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x50000000, 0xfc000002, "cq#(s,b),x", pa20, FLAG_STRICT},
+{ "ldd", 0x50000000, 0xfc000002, "cq&(b),x", pa20w, FLAG_STRICT},
{ "ldd", 0x50000000, 0xfc000002, "cq#(b),x", pa20, FLAG_STRICT},
{ "ldw", 0x0c000080, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
{ "ldw", 0x0c000080, 0xfc0013c0, "cxccx(b),t", pa10, FLAG_STRICT},
@@ -320,11 +331,13 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldw", 0x0c0010a0, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldw", 0x0c001080, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
{ "ldw", 0x0c001080, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
+{ "ldw", 0x4c000000, 0xfc000000, "ce<(b),x", pa20w, FLAG_STRICT},
{ "ldw", 0x4c000000, 0xfc000000, "ceJ(s,b),x", pa10, FLAG_STRICT},
{ "ldw", 0x4c000000, 0xfc000000, "ceJ(b),x", pa10, FLAG_STRICT},
+{ "ldw", 0x5c000004, 0xfc000006, "ce>(b),x", pa20w, FLAG_STRICT},
{ "ldw", 0x5c000004, 0xfc000006, "ceK(s,b),x", pa20, FLAG_STRICT},
{ "ldw", 0x5c000004, 0xfc000006, "ceK(b),x", pa20, FLAG_STRICT},
-{ "ldw", 0x48000000, 0xfc000000, "j(s,b),x", pa10, 0},
+{ "ldw", 0x48000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
{ "ldw", 0x48000000, 0xfc000000, "j(s,b),x", pa10, 0},
{ "ldw", 0x48000000, 0xfc000000, "j(b),x", pa10, 0},
{ "ldh", 0x0c000040, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
@@ -333,6 +346,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldh", 0x0c001060, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldh", 0x0c001040, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
{ "ldh", 0x0c001040, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
+{ "ldh", 0x44000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
{ "ldh", 0x44000000, 0xfc000000, "j(s,b),x", pa10, 0},
{ "ldh", 0x44000000, 0xfc000000, "j(b),x", pa10, 0},
{ "ldb", 0x0c000000, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
@@ -341,34 +355,40 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldb", 0x0c001020, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldb", 0x0c001000, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
{ "ldb", 0x0c001000, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
+{ "ldb", 0x40000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
{ "ldb", 0x40000000, 0xfc000000, "j(s,b),x", pa10, 0},
{ "ldb", 0x40000000, 0xfc000000, "j(b),x", pa10, 0},
{ "std", 0x0c0012e0, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
{ "std", 0x0c0012e0, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "std", 0x0c0012c0, 0xfc0013c0, "cmcCx,V(s,b)", pa20, FLAG_STRICT},
{ "std", 0x0c0012c0, 0xfc0013c0, "cmcCx,V(b)", pa20, FLAG_STRICT},
-{ "std", 0x70000000, 0xfc000002, "cqx,#(s,b)", pa20, FLAG_STRICT},
+{ "std", 0x70000000, 0xfc000002, "cqx,&(b)", pa20w, FLAG_STRICT},
{ "std", 0x70000000, 0xfc000002, "cqx,#(b)", pa20, FLAG_STRICT},
{ "stw", 0x0c0012a0, 0xfc0013ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
{ "stw", 0x0c0012a0, 0xfc0013ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stw", 0x0c001280, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
{ "stw", 0x0c001280, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
+{ "stw", 0x6c000000, 0xfc000000, "cex,<(b)", pa20w, FLAG_STRICT},
{ "stw", 0x6c000000, 0xfc000000, "cex,J(s,b)", pa10, FLAG_STRICT},
{ "stw", 0x6c000000, 0xfc000000, "cex,J(b)", pa10, FLAG_STRICT},
+{ "stw", 0x7c000004, 0xfc000006, "cex,>(b)", pa20w, FLAG_STRICT},
{ "stw", 0x7c000004, 0xfc000006, "cex,K(s,b)", pa20, FLAG_STRICT},
{ "stw", 0x7c000004, 0xfc000006, "cex,K(b)", pa20, FLAG_STRICT},
+{ "stw", 0x68000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
{ "stw", 0x68000000, 0xfc000000, "x,j(s,b)", pa10, 0},
{ "stw", 0x68000000, 0xfc000000, "x,j(b)", pa10, 0},
{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "sth", 0x0c001240, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
{ "sth", 0x0c001240, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
+{ "sth", 0x64000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
{ "sth", 0x64000000, 0xfc000000, "x,j(s,b)", pa10, 0},
{ "sth", 0x64000000, 0xfc000000, "x,j(b)", pa10, 0},
{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stb", 0x0c001200, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
{ "stb", 0x0c001200, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
+{ "stb", 0x60000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
{ "stb", 0x60000000, 0xfc000000, "x,j(s,b)", pa10, 0},
{ "stb", 0x60000000, 0xfc000000, "x,j(b)", pa10, 0},
{ "ldwm", 0x4c000000, 0xfc000000, "j(s,b),x", pa10, 0},
@@ -426,12 +446,13 @@ static const struct pa_opcode pa_opcodes[] =
{ "stbys", 0x0c001300, 0xfc001fc0, "csx,V(b)", pa10, 0},
/* Immediate instructions. */
+{ "ldo", 0x34000000, 0xfc000000, "l(b),x", pa20w, 0},
{ "ldo", 0x34000000, 0xfc00c000, "j(b),x", pa10, 0},
{ "ldil", 0x20000000, 0xfc000000, "k,b", pa10, 0},
{ "addil", 0x28000000, 0xfc000000, "k,b,Z", pa10, 0},
{ "addil", 0x28000000, 0xfc000000, "k,b", pa10, 0},
-/* Branching instructions. */
+/* Branching instructions. */
{ "b", 0xe8008000, 0xfc00e000, "cpnXL", pa20, FLAG_STRICT},
{ "b", 0xe800a000, 0xfc00e000, "clnXL", pa20, FLAG_STRICT},
{ "b", 0xe8000000, 0xfc00e000, "clnW,b", pa10, FLAG_STRICT},
@@ -471,7 +492,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "pushnom", 0xe8004001, 0xffffffff, "", pa20, FLAG_STRICT},
{ "pushbts", 0xe8004001, 0xffe0ffff, "x", pa20, FLAG_STRICT},
-/* Computation Instructions */
+/* Computation Instructions. */
{ "cmpclr", 0x080008a0, 0xfc000fe0, "?Sx,b,t", pa20, FLAG_STRICT},
{ "cmpclr", 0x08000880, 0xfc000fe0, "?sx,b,t", pa10, FLAG_STRICT},
@@ -540,7 +561,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "sh3addl", 0x08000ac0, 0xfc000fe0, "?ax,b,t", pa10, 0},
{ "sh3addo", 0x08000ec0, 0xfc000fe0, "?ax,b,t", pa10, 0},
-/* Subword Operation Instructions */
+/* Subword Operation Instructions. */
{ "hadd", 0x08000300, 0xfc00ff20, "cHx,b,t", pa20, FLAG_STRICT},
{ "havg", 0x080002c0, 0xfc00ffe0, "x,b,t", pa20, FLAG_STRICT},
@@ -554,7 +575,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "permh", 0xf8000000, 0xfc009020, "c*a,t", pa20, FLAG_STRICT},
-/* Extract and Deposit Instructions */
+/* Extract and Deposit Instructions. */
{ "shrpd", 0xd0000200, 0xfc001fe0, "?Xx,b,!,t", pa20, FLAG_STRICT},
{ "shrpd", 0xd0000400, 0xfc001400, "?Xx,b,~,t", pa20, FLAG_STRICT},
@@ -587,7 +608,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "zdepi", 0xd4001800, 0xfc001c00, "?x5,p,T,b", pa10, 0},
{ "depi", 0xd4001c00, 0xfc001c00, "?x5,p,T,b", pa10, 0},
-/* System Control Instructions */
+/* System Control Instructions. */
{ "break", 0x00000000, 0xfc001fe0, "r,A", pa10, 0},
{ "rfi", 0x00000c00, 0xffffff1f, "cr", pa10, FLAG_STRICT},
@@ -678,7 +699,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "gfr", 0x04001a80, 0xfc003fdf, "cZx(s,b)", pa11, 0},
{ "gfr", 0x04001a80, 0xfc003fdf, "cZx(b)", pa11, 0},
-/* Floating Point Coprocessor Instructions */
+/* Floating Point Coprocessor Instructions. */
{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(s,b),fT", pa20, FLAG_STRICT},
{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(b),fT", pa20, FLAG_STRICT},
@@ -686,36 +707,36 @@ static const struct pa_opcode pa_opcodes[] =
{ "fldw", 0x24000000, 0xfc001380, "cxccx(b),fT", pa10, FLAG_STRICT},
{ "fldw", 0x24001000, 0xfc001380, "cmcc5(s,b),fT", pa10, FLAG_STRICT},
{ "fldw", 0x24001000, 0xfc001380, "cmcc5(b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x5c000000, 0xfc000004, "d(s,b),fe", pa20, FLAG_STRICT},
+{ "fldw", 0x5c000000, 0xfc000004, "y(b),fe", pa20w, FLAG_STRICT},
+{ "fldw", 0x58000000, 0xfc000000, "cJy(b),fe", pa20w, FLAG_STRICT},
{ "fldw", 0x5c000000, 0xfc000004, "d(b),fe", pa20, FLAG_STRICT},
-{ "fldw", 0x58000000, 0xfc000004, "cJd(s,b),fe", pa20, FLAG_STRICT},
-{ "fldw", 0x58000000, 0xfc000004, "cJd(b),fe", pa20, FLAG_STRICT},
+{ "fldw", 0x58000000, 0xfc000000, "cJd(b),fe", pa20, FLAG_STRICT},
{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(s,b),ft", pa20, FLAG_STRICT},
{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(b),ft", pa20, FLAG_STRICT},
{ "fldd", 0x2c000000, 0xfc0013c0, "cxccx(s,b),ft", pa10, FLAG_STRICT},
{ "fldd", 0x2c000000, 0xfc0013c0, "cxccx(b),ft", pa10, FLAG_STRICT},
{ "fldd", 0x2c001000, 0xfc0013c0, "cmcc5(s,b),ft", pa10, FLAG_STRICT},
{ "fldd", 0x2c001000, 0xfc0013c0, "cmcc5(b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x50000002, 0xfc000002, "cq#(s,b),x", pa20, FLAG_STRICT},
-{ "fldd", 0x50000002, 0xfc000002, "cq#(b),x", pa20, FLAG_STRICT},
+{ "fldd", 0x50000002, 0xfc000002, "cq&(b),fx", pa20w, FLAG_STRICT},
+{ "fldd", 0x50000002, 0xfc000002, "cq#(b),fx", pa20, FLAG_STRICT},
{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(s,b)", pa10, FLAG_STRICT},
{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(b)", pa10, FLAG_STRICT},
{ "fstw", 0x24000200, 0xfc001380, "cxcCfT,x(s,b)", pa10, FLAG_STRICT},
{ "fstw", 0x24000200, 0xfc001380, "cxcCfT,x(b)", pa10, FLAG_STRICT},
{ "fstw", 0x24001200, 0xfc001380, "cmcCfT,5(s,b)", pa10, FLAG_STRICT},
{ "fstw", 0x24001200, 0xfc001380, "cmcCfT,5(b)", pa10, FLAG_STRICT},
-{ "fstw", 0x7c000000, 0xfc000004, "fe,d(s,b)", pa20, FLAG_STRICT},
+{ "fstw", 0x7c000000, 0xfc000004, "fE,y(b)", pa20w, FLAG_STRICT},
+{ "fstw", 0x78000000, 0xfc000000, "cJfe,y(b)", pa20w, FLAG_STRICT},
{ "fstw", 0x7c000000, 0xfc000004, "fe,d(b)", pa20, FLAG_STRICT},
-{ "fstw", 0x78000000, 0xfc000004, "cJfe,d(s,b)", pa20, FLAG_STRICT},
-{ "fstw", 0x78000000, 0xfc000004, "cJfe,d(b)", pa20, FLAG_STRICT},
+{ "fstw", 0x78000000, 0xfc000000, "cJfe,d(b)", pa20, FLAG_STRICT},
{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(s,b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c000200, 0xfc0013c0, "cxcCft,x(s,b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c000200, 0xfc0013c0, "cxcCft,x(b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c001200, 0xfc0013c0, "cmcCft,5(s,b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c001200, 0xfc0013c0, "cmcCft,5(b)", pa10, FLAG_STRICT},
-{ "fstd", 0x70000002, 0xfc000002, "cqx,#(s,b)", pa20, FLAG_STRICT},
-{ "fstd", 0x70000002, 0xfc000002, "cqx,#(b)", pa20, FLAG_STRICT},
+{ "fstd", 0x70000002, 0xfc000002, "cqfx,&(b)", pa20w, FLAG_STRICT},
+{ "fstd", 0x70000002, 0xfc000002, "cqfx,#(b)", pa20, FLAG_STRICT},
{ "fldwx", 0x24000000, 0xfc001f80, "cxx(s,b),fT", pa10, 0},
{ "fldwx", 0x24000000, 0xfc001f80, "cxx(b),fT", pa10, 0},
{ "flddx", 0x2c000000, 0xfc001fc0, "cxx(s,b),ft", pa10, 0},
@@ -782,12 +803,12 @@ static const struct pa_opcode pa_opcodes[] =
{ "ftest", 0x30002420, 0xffffffff, "", pa10, 0},
{ "fid", 0x30000000, 0xffffffff, "", pa11, 0},
-/* Performance Monitor Instructions */
+/* Performance Monitor Instructions. */
{ "pmdis", 0x30000280, 0xffffffdf, "N", pa20, FLAG_STRICT},
{ "pmenb", 0x30000680, 0xffffffff, "", pa20, FLAG_STRICT},
-/* Assist Instructions */
+/* Assist Instructions. */
{ "spop0", 0x10000000, 0xfc000600, "v,ON", pa10, 0},
{ "spop1", 0x10000200, 0xfc000600, "v,oNt", pa10, 0},
@@ -830,7 +851,7 @@ static const struct pa_opcode pa_opcodes[] =
#define NUMOPCODES ((sizeof pa_opcodes)/(sizeof pa_opcodes[0]))
-/* SKV 12/18/92. Added some denotations for various operands. */
+/* SKV 12/18/92. Added some denotations for various operands. */
#define PA_IMM11_AT_31 'i'
#define PA_IMM14_AT_31 'j'
diff --git a/gnu/usr.bin/binutils/include/opcode/i386.h b/gnu/usr.bin/binutils/include/opcode/i386.h
index d00d3311cc5..38de44aca0a 100644
--- a/gnu/usr.bin/binutils/include/opcode/i386.h
+++ b/gnu/usr.bin/binutils/include/opcode/i386.h
@@ -1,6 +1,7 @@
/* opcode/i386.h -- Intel 80386 opcode table
- Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
@@ -50,28 +51,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static const template i386_optab[] = {
#define X None
-#define NoSuf (No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_dSuf|No_xSuf)
-#define b_Suf (No_wSuf|No_lSuf|No_sSuf|No_dSuf|No_xSuf)
-#define w_Suf (No_bSuf|No_lSuf|No_sSuf|No_dSuf|No_xSuf)
-#define l_Suf (No_bSuf|No_wSuf|No_sSuf|No_dSuf|No_xSuf)
-#define d_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf|No_xSuf)
-#define x_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf|No_dSuf)
-#define bw_Suf (No_lSuf|No_sSuf|No_dSuf|No_xSuf)
-#define bl_Suf (No_wSuf|No_sSuf|No_dSuf|No_xSuf)
-#define wl_Suf (No_bSuf|No_sSuf|No_dSuf|No_xSuf)
-#define wld_Suf (No_bSuf|No_sSuf|No_xSuf)
-#define sl_Suf (No_bSuf|No_wSuf|No_dSuf|No_xSuf)
-#define sld_Suf (No_bSuf|No_wSuf|No_xSuf)
-#define sldx_Suf (No_bSuf|No_wSuf)
-#define bwl_Suf (No_sSuf|No_dSuf|No_xSuf)
-#define bwld_Suf (No_sSuf|No_xSuf)
+#define NoSuf (No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf)
+#define b_Suf (No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf)
+#define w_Suf (No_bSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf)
+#define l_Suf (No_bSuf|No_wSuf|No_sSuf|No_xSuf|No_qSuf)
+#define q_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf|No_xSuf)
+#define x_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf|No_qSuf)
+#define bw_Suf (No_lSuf|No_sSuf|No_xSuf|No_qSuf)
+#define bl_Suf (No_wSuf|No_sSuf|No_xSuf|No_qSuf)
+#define wl_Suf (No_bSuf|No_sSuf|No_xSuf|No_qSuf)
+#define wlq_Suf (No_bSuf|No_sSuf|No_xSuf)
+#define lq_Suf (No_bSuf|No_wSuf|No_sSuf|No_xSuf)
+#define 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 d_FP (d_Suf|IgnoreSize)
#define x_FP (x_Suf|IgnoreSize)
#define sl_FP (sl_Suf|IgnoreSize)
-#define sld_FP (sld_Suf|IgnoreSize)
-#define sldx_FP (sldx_Suf|IgnoreSize)
#if SYSV386_COMPAT
/* Someone forgot that the FloatR bit reverses the operation when not
equal to the FloatD bit. ie. Changing only FloatD results in the
@@ -83,1013 +81,1260 @@ static const template i386_optab[] = {
/* Move instructions. */
#define MOV_AX_DISP32 0xa0
-{ "mov", 2, 0xa0, X, bwl_Suf|D|W, { Disp16|Disp32, Acc, 0 } },
-{ "mov", 2, 0x88, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{ "mov", 2, 0xb0, X, bwl_Suf|W|ShortForm, { Imm, Reg, 0 } },
-{ "mov", 2, 0xc6, X, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0 } },
-/* The next two instructions accept WordReg so that a segment register
+/* 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 } },
+{ "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. */
+{ "mov", 2, 0xb0, X, 0, bwl_Suf|W|ShortForm, { EncImm, Reg8|Reg16|Reg32, 0 } },
+{ "mov", 2, 0xc6, 0, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0 } },
+{ "mov", 2, 0xb0, X, Cpu64, q_Suf|W|ShortForm, { Imm64, Reg64, 0 } },
+/* The segment register moves accept WordReg so that a segment register
can be copied to a 32 bit register, and vice versa, without using a
size prefix. When moving to a 32 bit register, the upper 16 bits
are set to an implementation defined value (on the Pentium Pro,
the implementation defined value is zero). */
-{ "mov", 2, 0x8c, X, wl_Suf|Modrm, { SReg3|SReg2, WordReg|WordMem, 0 } },
-{ "mov", 2, 0x8e, X, wl_Suf|Modrm|IgnoreSize, { WordReg|WordMem, SReg3|SReg2, 0 } },
-/* Move to/from control debug registers. */
-{ "mov", 2, 0x0f20, X, l_Suf|D|Modrm|IgnoreSize, { Control, Reg32|InvMem, 0} },
-{ "mov", 2, 0x0f21, X, l_Suf|D|Modrm|IgnoreSize, { Debug, Reg32|InvMem, 0} },
-{ "mov", 2, 0x0f24, X, l_Suf|D|Modrm|IgnoreSize, { Test, Reg32|InvMem, 0} },
+{ "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 } },
+/* 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} },
+{ "movabs",2, 0xa0, X, Cpu64, bwlq_Suf|D|W, { Disp64, Acc, 0 } },
+{ "movabs",2, 0xb0, X, Cpu64, q_Suf|W|ShortForm, { Imm64, Reg64, 0 } },
/* Move with sign extend. */
/* "movsbl" & "movsbw" must not be unified into "movsb" to avoid
conflict with the "movs" string move instruction. */
-{"movsbl", 2, 0x0fbe, X, NoSuf|Modrm, { Reg8|ByteMem, Reg32, 0} },
-{"movsbw", 2, 0x0fbe, X, NoSuf|Modrm, { Reg8|ByteMem, Reg16, 0} },
-{"movswl", 2, 0x0fbf, X, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
-/* Intel Syntax next 2 insns */
-{"movsx", 2, 0x0fbf, X, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} },
-{"movsx", 2, 0x0fbe, X, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
+{"movsbl", 2, 0x0fbe, X, Cpu386, NoSuf|Modrm, { Reg8|ByteMem, Reg32, 0} },
+{"movsbw", 2, 0x0fbe, X, Cpu386, NoSuf|Modrm, { Reg8|ByteMem, Reg16, 0} },
+{"movswl", 2, 0x0fbf, X, Cpu386, NoSuf|Modrm, { Reg16|ShortMem,Reg32, 0} },
+{"movsbq", 2, 0x0fbe, X, Cpu64, NoSuf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} },
+{"movswq", 2, 0x0fbf, X, Cpu64, NoSuf|Modrm|Rex64, { Reg16|ShortMem,Reg64, 0} },
+{"movslq", 2, 0x63, X, Cpu64, NoSuf|Modrm|Rex64, { Reg32|WordMem, Reg64, 0} },
+/* Intel Syntax next 5 insns */
+{"movsx", 2, 0x0fbe, X, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
+{"movsx", 2, 0x0fbf, X, Cpu386, w_Suf|Modrm|IgnoreSize, { 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|IgnoreSize|Rex64, { Reg16|ShortMem, Reg64, 0} },
+{"movsx", 2, 0x63, X, Cpu64, l_Suf|Modrm|Rex64, { Reg32|WordMem, Reg64, 0} },
/* Move with zero extend. */
-{"movzb", 2, 0x0fb6, X, wl_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-{"movzwl", 2, 0x0fb7, X, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
-/* Intel Syntax next 2 insns */
-{"movzx", 2, 0x0fb7, X, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} },
-{"movzx", 2, 0x0fb6, X, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
+{"movzb", 2, 0x0fb6, X, Cpu386, wl_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
+{"movzwl", 2, 0x0fb7, X, Cpu386, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
+/* These instructions are not particulary usefull, 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 */
+{"movzx", 2, 0x0fb6, X, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
+{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm|IgnoreSize, { 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|IgnoreSize|Rex64, { Reg16|ShortMem, Reg64, 0} },
/* Push instructions. */
-{"push", 1, 0x50, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
-{"push", 1, 0xff, 6, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
-{"push", 1, 0x6a, X, wl_Suf|DefaultSize, { Imm8S, 0, 0} },
-{"push", 1, 0x68, X, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} },
-{"push", 1, 0x06, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
-{"push", 1, 0x0fa0, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
-{"pusha", 0, 0x60, X, wld_Suf|DefaultSize, { 0, 0, 0 } },
+{"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, 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, q_Suf|ShortForm|DefaultSize|NoRex64, { Reg64, 0, 0 } },
+{"push", 1, 0xff, 6, Cpu64, q_Suf|Modrm|DefaultSize|NoRex64, { Reg64|WordMem, 0, 0 } },
+{"push", 1, 0x6a, X, Cpu186|Cpu64, q_Suf|DefaultSize|NoRex64, { Imm8S, 0, 0} },
+{"push", 1, 0x68, X, Cpu186|Cpu64, q_Suf|DefaultSize|NoRex64, { Imm32S, 0, 0} },
+{"push", 1, 0x06, X, Cpu64, q_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
+{"push", 1, 0x0fa0, X, Cpu386|Cpu64, q_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
+
+{"pusha", 0, 0x60, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0 } },
/* Pop instructions. */
-{"pop", 1, 0x58, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
-{"pop", 1, 0x8f, 0, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
+{"pop", 1, 0x58, X, CpuNo64, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
+{"pop", 1, 0x8f, 0, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
#define POP_SEG_SHORT 0x07
-{"pop", 1, 0x07, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
-{"pop", 1, 0x0fa1, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
-{"popa", 0, 0x61, X, wld_Suf|DefaultSize, { 0, 0, 0 } },
+{"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, q_Suf|ShortForm|DefaultSize|NoRex64, { Reg64, 0, 0 } },
+{"pop", 1, 0x8f, 0, Cpu64, q_Suf|Modrm|DefaultSize|NoRex64, { Reg64|WordMem, 0, 0 } },
+{"pop", 1, 0x07, X, Cpu64, q_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
+{"pop", 1, 0x0fa1, X, Cpu64, q_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
+
+{"popa", 0, 0x61, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0 } },
/* Exchange instructions.
- xchg commutes: we allow both operand orders. */
-{"xchg", 2, 0x90, X, wl_Suf|ShortForm, { WordReg, Acc, 0 } },
-{"xchg", 2, 0x90, X, wl_Suf|ShortForm, { Acc, WordReg, 0 } },
-{"xchg", 2, 0x86, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"xchg", 2, 0x86, X, bwl_Suf|W|Modrm, { Reg|AnyMem, Reg, 0 } },
+ xchg commutes: we allow both operand orders.
+
+ In the 64bit code, xchg eax, eax is reused for new nop instruction.
+ */
+{"xchg", 2, 0x90, X, CpuNo64, wl_Suf|ShortForm, { WordReg, Acc, 0 } },
+{"xchg", 2, 0x90, X, CpuNo64, wl_Suf|ShortForm, { Acc, WordReg, 0 } },
+{"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. */
-{"in", 2, 0xe4, X, bwl_Suf|W, { Imm8, Acc, 0 } },
-{"in", 2, 0xec, X, bwl_Suf|W, { InOutPortReg, Acc, 0 } },
-{"in", 1, 0xe4, X, bwl_Suf|W, { Imm8, 0, 0 } },
-{"in", 1, 0xec, X, bwl_Suf|W, { InOutPortReg, 0, 0 } },
-{"out", 2, 0xe6, X, bwl_Suf|W, { Acc, Imm8, 0 } },
-{"out", 2, 0xee, X, bwl_Suf|W, { Acc, InOutPortReg, 0 } },
-{"out", 1, 0xe6, X, bwl_Suf|W, { Imm8, 0, 0 } },
-{"out", 1, 0xee, X, bwl_Suf|W, { InOutPortReg, 0, 0 } },
+{"in", 2, 0xe4, X, 0, bwlq_Suf|W, { Imm8, Acc, 0 } },
+{"in", 2, 0xec, X, 0, bwlq_Suf|W, { InOutPortReg, Acc, 0 } },
+{"in", 1, 0xe4, X, 0, bwlq_Suf|W, { Imm8, 0, 0 } },
+{"in", 1, 0xec, X, 0, bwlq_Suf|W, { InOutPortReg, 0, 0 } },
+{"out", 2, 0xe6, X, 0, bwlq_Suf|W, { Acc, Imm8, 0 } },
+{"out", 2, 0xee, X, 0, bwlq_Suf|W, { Acc, InOutPortReg, 0 } },
+{"out", 1, 0xe6, X, 0, bwlq_Suf|W, { Imm8, 0, 0 } },
+{"out", 1, 0xee, X, 0, bwlq_Suf|W, { InOutPortReg, 0, 0 } },
/* Load effective address. */
-{"lea", 2, 0x8d, X, wl_Suf|Modrm, { WordMem, WordReg, 0 } },
+{"lea", 2, 0x8d, X, 0, wlq_Suf|Modrm, { WordMem, WordReg, 0 } },
/* Load segment registers from memory. */
-{"lds", 2, 0xc5, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"les", 2, 0xc4, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lfs", 2, 0x0fb4, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lgs", 2, 0x0fb5, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lss", 2, 0x0fb2, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"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} },
/* Flags register instructions. */
-{"clc", 0, 0xf8, X, NoSuf, { 0, 0, 0} },
-{"cld", 0, 0xfc, X, NoSuf, { 0, 0, 0} },
-{"cli", 0, 0xfa, X, NoSuf, { 0, 0, 0} },
-{"clts", 0, 0x0f06, X, NoSuf, { 0, 0, 0} },
-{"cmc", 0, 0xf5, X, NoSuf, { 0, 0, 0} },
-{"lahf", 0, 0x9f, X, NoSuf, { 0, 0, 0} },
-{"sahf", 0, 0x9e, X, NoSuf, { 0, 0, 0} },
-{"pushf", 0, 0x9c, X, wld_Suf|DefaultSize, { 0, 0, 0} },
-{"popf", 0, 0x9d, X, wld_Suf|DefaultSize, { 0, 0, 0} },
-{"stc", 0, 0xf9, X, NoSuf, { 0, 0, 0} },
-{"std", 0, 0xfd, X, NoSuf, { 0, 0, 0} },
-{"sti", 0, 0xfb, X, NoSuf, { 0, 0, 0} },
+{"clc", 0, 0xf8, X, 0, NoSuf, { 0, 0, 0} },
+{"cld", 0, 0xfc, X, 0, NoSuf, { 0, 0, 0} },
+{"cli", 0, 0xfa, X, 0, NoSuf, { 0, 0, 0} },
+{"clts", 0, 0x0f06, X, Cpu286, NoSuf, { 0, 0, 0} },
+{"cmc", 0, 0xf5, X, 0, NoSuf, { 0, 0, 0} },
+{"lahf", 0, 0x9f, X, 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} },
+{"pushf", 0, 0x9c, X, Cpu64, q_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
+{"popf", 0, 0x9d, X, CpuNo64,wlq_Suf|DefaultSize, { 0, 0, 0} },
+{"popf", 0, 0x9d, X, Cpu64, q_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
+{"stc", 0, 0xf9, X, 0, NoSuf, { 0, 0, 0} },
+{"std", 0, 0xfd, X, 0, NoSuf, { 0, 0, 0} },
+{"sti", 0, 0xfb, X, 0, NoSuf, { 0, 0, 0} },
/* Arithmetic. */
-{"add", 2, 0x00, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"add", 2, 0x83, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"add", 2, 0x04, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"add", 2, 0x80, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"inc", 1, 0x40, X, wl_Suf|ShortForm, { WordReg, 0, 0} },
-{"inc", 1, 0xfe, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sub", 2, 0x28, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"sub", 2, 0x83, 5, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sub", 2, 0x2c, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"sub", 2, 0x80, 5, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"dec", 1, 0x48, X, wl_Suf|ShortForm, { WordReg, 0, 0} },
-{"dec", 1, 0xfe, 1, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sbb", 2, 0x18, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"sbb", 2, 0x83, 3, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sbb", 2, 0x1c, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"sbb", 2, 0x80, 3, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"cmp", 2, 0x38, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"cmp", 2, 0x83, 7, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"cmp", 2, 0x3c, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"cmp", 2, 0x80, 7, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"test", 2, 0x84, X, bwl_Suf|W|Modrm, { Reg|AnyMem, Reg, 0} },
-{"test", 2, 0x84, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"test", 2, 0xa8, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"test", 2, 0xf6, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"and", 2, 0x20, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"and", 2, 0x83, 4, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"and", 2, 0x24, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"and", 2, 0x80, 4, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"or", 2, 0x08, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"or", 2, 0x83, 1, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"or", 2, 0x0c, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"or", 2, 0x80, 1, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"xor", 2, 0x30, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"xor", 2, 0x83, 6, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"xor", 2, 0x34, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"xor", 2, 0x80, 6, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+{"add", 2, 0x00, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"add", 2, 0x83, 0, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"add", 2, 0x04, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"add", 2, 0x80, 0, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
+
+{"inc", 1, 0x40, X, CpuNo64,wl_Suf|ShortForm, { WordReg, 0, 0} },
+{"inc", 1, 0xfe, 0, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"sub", 2, 0x28, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"sub", 2, 0x83, 5, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"sub", 2, 0x2c, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"sub", 2, 0x80, 5, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
+
+{"dec", 1, 0x48, X, CpuNo64, wl_Suf|ShortForm, { WordReg, 0, 0} },
+{"dec", 1, 0xfe, 1, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"sbb", 2, 0x18, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"sbb", 2, 0x83, 3, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"sbb", 2, 0x1c, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"sbb", 2, 0x80, 3, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
+
+{"cmp", 2, 0x38, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"cmp", 2, 0x83, 7, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"cmp", 2, 0x3c, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"cmp", 2, 0x80, 7, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
+
+{"test", 2, 0x84, X, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Reg, 0} },
+{"test", 2, 0x84, X, 0, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"test", 2, 0xa8, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"test", 2, 0xf6, 0, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
+
+{"and", 2, 0x20, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"and", 2, 0x83, 4, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"and", 2, 0x24, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"and", 2, 0x80, 4, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
+
+{"or", 2, 0x08, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"or", 2, 0x83, 1, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"or", 2, 0x0c, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"or", 2, 0x80, 1, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
+
+{"xor", 2, 0x30, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"xor", 2, 0x83, 6, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"xor", 2, 0x34, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"xor", 2, 0x80, 6, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
/* clr with 1 operand is really xor with 2 operands. */
-{"clr", 1, 0x30, X, bwl_Suf|W|Modrm|regKludge, { Reg, 0, 0 } },
+{"clr", 1, 0x30, X, 0, bwlq_Suf|W|Modrm|regKludge, { Reg, 0, 0 } },
-{"adc", 2, 0x10, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"adc", 2, 0x83, 2, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"adc", 2, 0x14, X, bwl_Suf|W, { Imm, Acc, 0} },
-{"adc", 2, 0x80, 2, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+{"adc", 2, 0x10, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"adc", 2, 0x83, 2, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"adc", 2, 0x14, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
+{"adc", 2, 0x80, 2, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-{"neg", 1, 0xf6, 3, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"not", 1, 0xf6, 2, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"neg", 1, 0xf6, 3, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"not", 1, 0xf6, 2, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"aaa", 0, 0x37, X, NoSuf, { 0, 0, 0} },
-{"aas", 0, 0x3f, X, NoSuf, { 0, 0, 0} },
-{"daa", 0, 0x27, X, NoSuf, { 0, 0, 0} },
-{"das", 0, 0x2f, X, NoSuf, { 0, 0, 0} },
-{"aad", 0, 0xd50a, X, NoSuf, { 0, 0, 0} },
-{"aad", 1, 0xd5, X, NoSuf, { Imm8S, 0, 0} },
-{"aam", 0, 0xd40a, X, NoSuf, { 0, 0, 0} },
-{"aam", 1, 0xd4, X, NoSuf, { Imm8S, 0, 0} },
+{"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} },
/* Conversion insns. */
/* Intel naming */
-{"cbw", 0, 0x98, X, NoSuf|Size16, { 0, 0, 0} },
-{"cwde", 0, 0x98, X, NoSuf|Size32, { 0, 0, 0} },
-{"cwd", 0, 0x99, X, NoSuf|Size16, { 0, 0, 0} },
-{"cdq", 0, 0x99, X, NoSuf|Size32, { 0, 0, 0} },
+{"cbw", 0, 0x98, X, 0, NoSuf|Size16, { 0, 0, 0} },
+{"cdqe", 0, 0x98, X, Cpu64, NoSuf|Size64, { 0, 0, 0} },
+{"cwde", 0, 0x98, X, 0, NoSuf|Size32, { 0, 0, 0} },
+{"cwd", 0, 0x99, X, 0, NoSuf|Size16, { 0, 0, 0} },
+{"cdq", 0, 0x99, X, 0, NoSuf|Size32, { 0, 0, 0} },
+{"cqo", 0, 0x99, X, Cpu64, NoSuf|Size64, { 0, 0, 0} },
/* AT&T naming */
-{"cbtw", 0, 0x98, X, NoSuf|Size16, { 0, 0, 0} },
-{"cwtl", 0, 0x98, X, NoSuf|Size32, { 0, 0, 0} },
-{"cwtd", 0, 0x99, X, NoSuf|Size16, { 0, 0, 0} },
-{"cltd", 0, 0x99, X, NoSuf|Size32, { 0, 0, 0} },
+{"cbtw", 0, 0x98, X, 0, NoSuf|Size16, { 0, 0, 0} },
+{"cltq", 0, 0x98, X, Cpu64, NoSuf|Size64, { 0, 0, 0} },
+{"cwtl", 0, 0x98, X, 0, NoSuf|Size32, { 0, 0, 0} },
+{"cwtd", 0, 0x99, X, 0, NoSuf|Size16, { 0, 0, 0} },
+{"cltd", 0, 0x99, X, 0, NoSuf|Size32, { 0, 0, 0} },
+{"cqto", 0, 0x99, X, Cpu64, NoSuf|Size64, { 0, 0, 0} },
/* Warning! the mul/imul (opcode 0xf6) must only have 1 operand! They are
expanding 64-bit multiplies, and *cannot* be selected to accomplish
'imul %ebx, %eax' (opcode 0x0faf must be used in this case)
These multiplies can only be selected with single operand forms. */
-{"mul", 1, 0xf6, 4, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"imul", 1, 0xf6, 5, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"imul", 2, 0x0faf, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"imul", 3, 0x6b, X, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, WordReg} },
-{"imul", 3, 0x69, X, wl_Suf|Modrm, { Imm16|Imm32, WordReg|WordMem, WordReg} },
+{"mul", 1, 0xf6, 4, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"imul", 1, 0xf6, 5, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"imul", 2, 0x0faf, X, Cpu386, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"imul", 3, 0x6b, X, Cpu186, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, WordReg} },
+{"imul", 3, 0x69, X, Cpu186, wlq_Suf|Modrm, { Imm16|Imm32S|Imm32, WordReg|WordMem, WordReg} },
/* imul with 2 operands mimics imul with 3 by putting the register in
both i.rm.reg & i.rm.regmem fields. regKludge enables this
transformation. */
-{"imul", 2, 0x6b, X, wl_Suf|Modrm|regKludge,{ Imm8S, WordReg, 0} },
-{"imul", 2, 0x69, X, wl_Suf|Modrm|regKludge,{ Imm16|Imm32, WordReg, 0} },
-
-{"div", 1, 0xf6, 6, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"div", 2, 0xf6, 6, bwl_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
-{"idiv", 1, 0xf6, 7, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"idiv", 2, 0xf6, 7, bwl_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
-
-{"rol", 2, 0xd0, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rol", 2, 0xc0, 0, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rol", 2, 0xd2, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rol", 1, 0xd0, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"ror", 2, 0xd0, 1, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"ror", 2, 0xc0, 1, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"ror", 2, 0xd2, 1, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"ror", 1, 0xd0, 1, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"rcl", 2, 0xd0, 2, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rcl", 2, 0xc0, 2, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rcl", 2, 0xd2, 2, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rcl", 1, 0xd0, 2, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"rcr", 2, 0xd0, 3, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rcr", 2, 0xc0, 3, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rcr", 2, 0xd2, 3, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rcr", 1, 0xd0, 3, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sal", 2, 0xd0, 4, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"sal", 2, 0xc0, 4, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"sal", 2, 0xd2, 4, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"sal", 1, 0xd0, 4, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"shl", 2, 0xd0, 4, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"shl", 2, 0xc0, 4, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"shl", 2, 0xd2, 4, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"shl", 1, 0xd0, 4, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"shr", 2, 0xd0, 5, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"shr", 2, 0xc0, 5, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"shr", 2, 0xd2, 5, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"shr", 1, 0xd0, 5, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sar", 2, 0xd0, 7, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"sar", 2, 0xc0, 7, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"sar", 2, 0xd2, 7, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"sar", 1, 0xd0, 7, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"shld", 3, 0x0fa4, X, wl_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
-{"shld", 3, 0x0fa5, X, wl_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
-{"shld", 2, 0x0fa5, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-
-{"shrd", 3, 0x0fac, X, wl_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
-{"shrd", 3, 0x0fad, X, wl_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
-{"shrd", 2, 0x0fad, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"imul", 2, 0x6b, X, Cpu186, wlq_Suf|Modrm|regKludge,{ Imm8S, WordReg, 0} },
+{"imul", 2, 0x69, X, Cpu186, wlq_Suf|Modrm|regKludge,{ Imm16|Imm32S|Imm32, WordReg, 0} },
+
+{"div", 1, 0xf6, 6, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"div", 2, 0xf6, 6, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
+{"idiv", 1, 0xf6, 7, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"idiv", 2, 0xf6, 7, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
+
+{"rol", 2, 0xd0, 0, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"rol", 2, 0xc0, 0, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"rol", 2, 0xd2, 0, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"rol", 1, 0xd0, 0, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"ror", 2, 0xd0, 1, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"ror", 2, 0xc0, 1, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"ror", 2, 0xd2, 1, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"ror", 1, 0xd0, 1, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"rcl", 2, 0xd0, 2, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"rcl", 2, 0xc0, 2, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"rcl", 2, 0xd2, 2, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"rcl", 1, 0xd0, 2, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"rcr", 2, 0xd0, 3, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"rcr", 2, 0xc0, 3, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"rcr", 2, 0xd2, 3, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"rcr", 1, 0xd0, 3, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"sal", 2, 0xd0, 4, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"sal", 2, 0xc0, 4, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"sal", 2, 0xd2, 4, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"sal", 1, 0xd0, 4, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"shl", 2, 0xd0, 4, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"shl", 2, 0xc0, 4, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"shl", 2, 0xd2, 4, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"shl", 1, 0xd0, 4, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"shr", 2, 0xd0, 5, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"shr", 2, 0xc0, 5, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"shr", 2, 0xd2, 5, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"shr", 1, 0xd0, 5, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"sar", 2, 0xd0, 7, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"sar", 2, 0xc0, 7, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"sar", 2, 0xd2, 7, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"sar", 1, 0xd0, 7, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"shld", 3, 0x0fa4, X, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
+{"shld", 3, 0x0fa5, X, Cpu386, wlq_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
+{"shld", 2, 0x0fa5, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+
+{"shrd", 3, 0x0fac, X, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
+{"shrd", 3, 0x0fad, X, Cpu386, wlq_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
+{"shrd", 2, 0x0fad, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
/* Control transfer instructions. */
-{"call", 1, 0xe8, X, wl_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
-{"call", 1, 0xff, 2, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
+{"call", 1, 0xe8, X, 0, wlq_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
+{"call", 1, 0xff, 2, 0, wlq_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
/* Intel Syntax */
-{"call", 2, 0x9a, X, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
+{"call", 2, 0x9a, X, CpuNo64,wlq_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
/* Intel Syntax */
-{"call", 1, 0xff, 3, x_Suf|Modrm|DefaultSize, { WordMem, 0, 0} },
-{"lcall", 2, 0x9a, X, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
-{"lcall", 1, 0xff, 3, wl_Suf|Modrm|DefaultSize, { WordMem|JumpAbsolute, 0, 0} },
+{"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} },
#define JUMP_PC_RELATIVE 0xeb
-{"jmp", 1, 0xeb, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jmp", 1, 0xff, 4, wl_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} },
+{"jmp", 1, 0xeb, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jmp", 1, 0xff, 4, 0, wlq_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} },
/* Intel Syntax */
-{"jmp", 2, 0xea, X, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
+{"jmp", 2, 0xea, X, CpuNo64,wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
/* Intel Syntax */
-{"jmp", 1, 0xff, 5, x_Suf|Modrm, { WordMem, 0, 0} },
-{"ljmp", 2, 0xea, X, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
-{"ljmp", 1, 0xff, 5, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} },
-
-{"ret", 0, 0xc3, X, wl_Suf|DefaultSize, { 0, 0, 0} },
-{"ret", 1, 0xc2, X, wl_Suf|DefaultSize, { Imm16, 0, 0} },
-{"lret", 0, 0xcb, X, wl_Suf|DefaultSize, { 0, 0, 0} },
-{"lret", 1, 0xca, X, wl_Suf|DefaultSize, { Imm16, 0, 0} },
-{"enter", 2, 0xc8, X, wl_Suf|DefaultSize, { Imm16, Imm8, 0} },
-{"leave", 0, 0xc9, X, wl_Suf|DefaultSize, { 0, 0, 0} },
+{"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} },
+{"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} },
/* Conditional jumps. */
-{"jo", 1, 0x70, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jno", 1, 0x71, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jb", 1, 0x72, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jc", 1, 0x72, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnae", 1, 0x72, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnb", 1, 0x73, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnc", 1, 0x73, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jae", 1, 0x73, X, NoSuf|Jump, { Disp, 0, 0} },
-{"je", 1, 0x74, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jz", 1, 0x74, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jne", 1, 0x75, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnz", 1, 0x75, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jbe", 1, 0x76, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jna", 1, 0x76, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnbe", 1, 0x77, X, NoSuf|Jump, { Disp, 0, 0} },
-{"ja", 1, 0x77, X, NoSuf|Jump, { Disp, 0, 0} },
-{"js", 1, 0x78, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jns", 1, 0x79, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jp", 1, 0x7a, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jpe", 1, 0x7a, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnp", 1, 0x7b, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jpo", 1, 0x7b, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jl", 1, 0x7c, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnge", 1, 0x7c, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnl", 1, 0x7d, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jge", 1, 0x7d, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jle", 1, 0x7e, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jng", 1, 0x7e, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jnle", 1, 0x7f, X, NoSuf|Jump, { Disp, 0, 0} },
-{"jg", 1, 0x7f, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jo", 1, 0x70, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jno", 1, 0x71, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jb", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jc", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnae", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnb", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnc", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jae", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"je", 1, 0x74, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jz", 1, 0x74, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jne", 1, 0x75, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnz", 1, 0x75, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jbe", 1, 0x76, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jna", 1, 0x76, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnbe", 1, 0x77, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"ja", 1, 0x77, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"js", 1, 0x78, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jns", 1, 0x79, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jp", 1, 0x7a, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jpe", 1, 0x7a, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnp", 1, 0x7b, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jpo", 1, 0x7b, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jl", 1, 0x7c, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnge", 1, 0x7c, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnl", 1, 0x7d, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jge", 1, 0x7d, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jle", 1, 0x7e, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jng", 1, 0x7e, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jnle", 1, 0x7f, X, 0, NoSuf|Jump, { Disp, 0, 0} },
+{"jg", 1, 0x7f, X, 0, NoSuf|Jump, { Disp, 0, 0} },
/* jcxz vs. jecxz is chosen on the basis of the address size prefix. */
-{"jcxz", 1, 0xe3, X, NoSuf|JumpByte|Size16, { Disp, 0, 0} },
-{"jecxz", 1, 0xe3, X, NoSuf|JumpByte|Size32, { Disp, 0, 0} },
+{"jcxz", 1, 0xe3, X, 0, NoSuf|JumpByte|Size16, { Disp, 0, 0} },
+{"jecxz", 1, 0xe3, X, 0, NoSuf|JumpByte|Size32, { Disp, 0, 0} },
/* The loop instructions also use the address size prefix to select
%cx rather than %ecx for the loop count, so the `w' form of these
instructions emit an address size prefix rather than a data size
prefix. */
-{"loop", 1, 0xe2, X, wl_Suf|JumpByte, { Disp, 0, 0} },
-{"loopz", 1, 0xe1, X, wl_Suf|JumpByte, { Disp, 0, 0} },
-{"loope", 1, 0xe1, X, wl_Suf|JumpByte, { Disp, 0, 0} },
-{"loopnz", 1, 0xe0, X, wl_Suf|JumpByte, { Disp, 0, 0} },
-{"loopne", 1, 0xe0, X, wl_Suf|JumpByte, { Disp, 0, 0} },
+{"loop", 1, 0xe2, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
+{"loopz", 1, 0xe1, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
+{"loope", 1, 0xe1, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
+{"loopnz", 1, 0xe0, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
+{"loopne", 1, 0xe0, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
/* Set byte on flag instructions. */
-{"seto", 1, 0x0f90, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setno", 1, 0x0f91, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setb", 1, 0x0f92, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setc", 1, 0x0f92, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnae", 1, 0x0f92, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnb", 1, 0x0f93, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnc", 1, 0x0f93, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setae", 1, 0x0f93, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"sete", 1, 0x0f94, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setz", 1, 0x0f94, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setne", 1, 0x0f95, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnz", 1, 0x0f95, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setbe", 1, 0x0f96, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setna", 1, 0x0f96, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnbe", 1, 0x0f97, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"seta", 1, 0x0f97, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"sets", 1, 0x0f98, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setns", 1, 0x0f99, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setp", 1, 0x0f9a, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setpe", 1, 0x0f9a, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnp", 1, 0x0f9b, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setpo", 1, 0x0f9b, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setl", 1, 0x0f9c, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnge", 1, 0x0f9c, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnl", 1, 0x0f9d, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setge", 1, 0x0f9d, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setle", 1, 0x0f9e, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setng", 1, 0x0f9e, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnle", 1, 0x0f9f, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setg", 1, 0x0f9f, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"seto", 1, 0x0f90, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setno", 1, 0x0f91, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setb", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setc", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnae", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnb", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnc", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setae", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"sete", 1, 0x0f94, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setz", 1, 0x0f94, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setne", 1, 0x0f95, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnz", 1, 0x0f95, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setbe", 1, 0x0f96, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setna", 1, 0x0f96, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnbe", 1, 0x0f97, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"seta", 1, 0x0f97, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"sets", 1, 0x0f98, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setns", 1, 0x0f99, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setp", 1, 0x0f9a, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setpe", 1, 0x0f9a, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnp", 1, 0x0f9b, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setpo", 1, 0x0f9b, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setl", 1, 0x0f9c, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnge", 1, 0x0f9c, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnl", 1, 0x0f9d, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setge", 1, 0x0f9d, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setle", 1, 0x0f9e, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setng", 1, 0x0f9e, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnle", 1, 0x0f9f, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setg", 1, 0x0f9f, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
/* String manipulation. */
-{"cmps", 0, 0xa6, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"cmps", 2, 0xa6, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
-{"scmp", 0, 0xa6, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"scmp", 2, 0xa6, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
-{"ins", 0, 0x6c, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"ins", 2, 0x6c, X, bwld_Suf|W|IsString, { InOutPortReg, AnyMem|EsSeg, 0} },
-{"outs", 0, 0x6e, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"outs", 2, 0x6e, X, bwld_Suf|W|IsString, { AnyMem, InOutPortReg, 0} },
-{"lods", 0, 0xac, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"lods", 1, 0xac, X, bwld_Suf|W|IsString, { AnyMem, 0, 0} },
-{"lods", 2, 0xac, X, bwld_Suf|W|IsString, { AnyMem, Acc, 0} },
-{"slod", 0, 0xac, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"slod", 1, 0xac, X, bwld_Suf|W|IsString, { AnyMem, 0, 0} },
-{"slod", 2, 0xac, X, bwld_Suf|W|IsString, { AnyMem, Acc, 0} },
-{"movs", 0, 0xa4, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"movs", 2, 0xa4, X, bwld_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
-{"smov", 0, 0xa4, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"smov", 2, 0xa4, X, bwld_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
-{"scas", 0, 0xae, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"scas", 1, 0xae, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"scas", 2, 0xae, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
-{"ssca", 0, 0xae, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"ssca", 1, 0xae, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"ssca", 2, 0xae, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
-{"stos", 0, 0xaa, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"stos", 1, 0xaa, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"stos", 2, 0xaa, X, bwld_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
-{"ssto", 0, 0xaa, X, bwld_Suf|W|IsString, { 0, 0, 0} },
-{"ssto", 1, 0xaa, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"ssto", 2, 0xaa, X, bwld_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
-{"xlat", 0, 0xd7, X, b_Suf|IsString, { 0, 0, 0} },
-{"xlat", 1, 0xd7, X, b_Suf|IsString, { AnyMem, 0, 0} },
+{"cmps", 0, 0xa6, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"cmps", 2, 0xa6, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
+{"scmp", 0, 0xa6, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"scmp", 2, 0xa6, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
+{"ins", 0, 0x6c, X, Cpu186, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"ins", 2, 0x6c, X, Cpu186, bwlq_Suf|W|IsString, { InOutPortReg, AnyMem|EsSeg, 0} },
+{"outs", 0, 0x6e, X, Cpu186, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"outs", 2, 0x6e, X, Cpu186, bwlq_Suf|W|IsString, { AnyMem, InOutPortReg, 0} },
+{"lods", 0, 0xac, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"lods", 1, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, 0, 0} },
+{"lods", 2, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, Acc, 0} },
+{"slod", 0, 0xac, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"slod", 1, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, 0, 0} },
+{"slod", 2, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, Acc, 0} },
+{"movs", 0, 0xa4, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"movs", 2, 0xa4, X, 0, bwlq_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
+{"smov", 0, 0xa4, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"smov", 2, 0xa4, X, 0, bwlq_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
+{"scas", 0, 0xae, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"scas", 1, 0xae, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
+{"scas", 2, 0xae, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
+{"ssca", 0, 0xae, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"ssca", 1, 0xae, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
+{"ssca", 2, 0xae, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
+{"stos", 0, 0xaa, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"stos", 1, 0xaa, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
+{"stos", 2, 0xaa, X, 0, bwlq_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
+{"ssto", 0, 0xaa, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
+{"ssto", 1, 0xaa, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
+{"ssto", 2, 0xaa, X, 0, bwlq_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
+{"xlat", 0, 0xd7, X, 0, b_Suf|IsString, { 0, 0, 0} },
+{"xlat", 1, 0xd7, X, 0, b_Suf|IsString, { AnyMem, 0, 0} },
/* Bit manipulation. */
-{"bsf", 2, 0x0fbc, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"bsr", 2, 0x0fbd, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"bt", 2, 0x0fa3, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"bt", 2, 0x0fba, 4, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"btc", 2, 0x0fbb, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"btc", 2, 0x0fba, 7, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"btr", 2, 0x0fb3, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"btr", 2, 0x0fba, 6, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"bts", 2, 0x0fab, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"bts", 2, 0x0fba, 5, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
+{"bsf", 2, 0x0fbc, X, Cpu386, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"bsr", 2, 0x0fbd, X, Cpu386, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"bt", 2, 0x0fa3, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"bt", 2, 0x0fba, 4, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
+{"btc", 2, 0x0fbb, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"btc", 2, 0x0fba, 7, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
+{"btr", 2, 0x0fb3, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"btr", 2, 0x0fba, 6, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
+{"bts", 2, 0x0fab, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"bts", 2, 0x0fba, 5, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
/* Interrupts & op. sys insns. */
/* See gas/config/tc-i386.c for conversion of 'int $3' into the special
int 3 insn. */
#define INT_OPCODE 0xcd
#define INT3_OPCODE 0xcc
-{"int", 1, 0xcd, X, NoSuf, { Imm8, 0, 0} },
-{"int3", 0, 0xcc, X, NoSuf, { 0, 0, 0} },
-{"into", 0, 0xce, X, NoSuf, { 0, 0, 0} },
-{"iret", 0, 0xcf, X, wld_Suf|DefaultSize, { 0, 0, 0} },
+{"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} },
+{"iret", 0, 0xcf, X, 0, wlq_Suf|DefaultSize, { 0, 0, 0} },
/* i386sl, i486sl, later 486, and Pentium. */
-{"rsm", 0, 0x0faa, X, NoSuf, { 0, 0, 0} },
+{"rsm", 0, 0x0faa, X, Cpu386, NoSuf, { 0, 0, 0} },
-{"bound", 2, 0x62, X, wl_Suf|Modrm, { WordReg, WordMem, 0} },
+{"bound", 2, 0x62, X, Cpu186, wlq_Suf|Modrm, { WordReg, WordMem, 0} },
-{"hlt", 0, 0xf4, X, NoSuf, { 0, 0, 0} },
+{"hlt", 0, 0xf4, X, 0, NoSuf, { 0, 0, 0} },
/* nop is actually 'xchgl %eax, %eax'. */
-{"nop", 0, 0x90, X, NoSuf, { 0, 0, 0} },
+{"nop", 0, 0x90, X, 0, NoSuf, { 0, 0, 0} },
/* Protection control. */
-{"arpl", 2, 0x63, X, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} },
-{"lar", 2, 0x0f02, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"lgdt", 1, 0x0f01, 2, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"lidt", 1, 0x0f01, 3, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"lldt", 1, 0x0f00, 2, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"lmsw", 1, 0x0f01, 6, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"lsl", 2, 0x0f03, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"ltr", 1, 0x0f00, 3, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-
-{"sgdt", 1, 0x0f01, 0, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"sidt", 1, 0x0f01, 1, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"sldt", 1, 0x0f00, 0, wl_Suf|Modrm, { WordReg|WordMem, 0, 0} },
-{"smsw", 1, 0x0f01, 4, wl_Suf|Modrm, { WordReg|WordMem, 0, 0} },
-{"str", 1, 0x0f00, 1, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-
-{"verr", 1, 0x0f00, 4, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"verw", 1, 0x0f00, 5, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+{"arpl", 2, 0x63, X, Cpu286, 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} },
+{"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} },
+{"sldt", 1, 0x0f00, 0, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, 0, 0} },
+{"smsw", 1, 0x0f01, 4, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, 0, 0} },
+{"str", 1, 0x0f00, 1, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+
+{"verr", 1, 0x0f00, 4, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+{"verw", 1, 0x0f00, 5, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
/* Floating point instructions. */
/* load */
-{"fld", 1, 0xd9c0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fld", 1, 0xd9, 0, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fld", 1, 0xd9c0, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
+{"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} },
/* Intel Syntax */
-{"fld", 1, 0xdb, 5, x_FP|Modrm, { LLongMem, 0, 0} },
-{"fild", 1, 0xdf, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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, FP|Modrm, { LLongMem, 0, 0} },
-{"fildq", 1, 0xdf, 5, FP|Modrm, { LLongMem, 0, 0} },
-{"fildll", 1, 0xdf, 5, FP|Modrm, { LLongMem, 0, 0} },
-{"fldt", 1, 0xdb, 5, FP|Modrm, { LLongMem, 0, 0} },
-{"fbld", 1, 0xdf, 4, FP|Modrm, { LLongMem, 0, 0} },
+{"fildd", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
+{"fildq", 1, 0xdf, 5, 0, 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} },
/* store (no pop) */
-{"fst", 1, 0xddd0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fst", 1, 0xd9, 2, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fst", 1, 0xddd0, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"fist", 1, 0xdf, 2, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
/* store (with pop) */
-{"fstp", 1, 0xddd8, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fstp", 1, 0xd9, 3, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fstp", 1, 0xddd8, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
+{"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} },
/* Intel Syntax */
-{"fstp", 1, 0xdb, 7, x_FP|Modrm, { LLongMem, 0, 0} },
-{"fistp", 1, 0xdf, 3, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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, FP|Modrm, { LLongMem, 0, 0} },
-{"fistpq", 1, 0xdf, 7, FP|Modrm, { LLongMem, 0, 0} },
-{"fistpll",1, 0xdf, 7, FP|Modrm, { LLongMem, 0, 0} },
-{"fstpt", 1, 0xdb, 7, FP|Modrm, { LLongMem, 0, 0} },
-{"fbstp", 1, 0xdf, 6, FP|Modrm, { LLongMem, 0, 0} },
+{"fistpd", 1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
+{"fistpq", 1, 0xdf, 7, 0, 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} },
/* exchange %st<n> with %st0 */
-{"fxch", 1, 0xd9c8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fxch", 1, 0xd9c8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
/* alias for fxch %st(1) */
-{"fxch", 0, 0xd9c9, X, FP, { 0, 0, 0} },
+{"fxch", 0, 0xd9c9, X, 0, FP, { 0, 0, 0} },
/* comparison (without pop) */
-{"fcom", 1, 0xd8d0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fcom", 1, 0xd8d0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
/* alias for fcom %st(1) */
-{"fcom", 0, 0xd8d1, X, FP, { 0, 0, 0} },
-{"fcom", 1, 0xd8, 2, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fcom", 1, 0xd8d0, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"ficom", 1, 0xde, 2, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
/* comparison (with pop) */
-{"fcomp", 1, 0xd8d8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fcomp", 1, 0xd8d8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
/* alias for fcomp %st(1) */
-{"fcomp", 0, 0xd8d9, X, FP, { 0, 0, 0} },
-{"fcomp", 1, 0xd8, 3, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fcomp", 1, 0xd8d8, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"ficomp", 1, 0xde, 3, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-{"fcompp", 0, 0xded9, X, FP, { 0, 0, 0} },
+{"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} },
+{"fcompp", 0, 0xded9, X, 0, FP, { 0, 0, 0} },
/* unordered comparison (with pop) */
-{"fucom", 1, 0xdde0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fucom", 1, 0xdde0, X, Cpu286, FP|ShortForm, { FloatReg, 0, 0} },
/* alias for fucom %st(1) */
-{"fucom", 0, 0xdde1, X, FP, { 0, 0, 0} },
-{"fucomp", 1, 0xdde8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fucom", 0, 0xdde1, X, Cpu286, FP, { 0, 0, 0} },
+{"fucomp", 1, 0xdde8, X, Cpu286, FP|ShortForm, { FloatReg, 0, 0} },
/* alias for fucomp %st(1) */
-{"fucomp", 0, 0xdde9, X, FP, { 0, 0, 0} },
-{"fucompp",0, 0xdae9, X, FP, { 0, 0, 0} },
+{"fucomp", 0, 0xdde9, X, Cpu286, FP, { 0, 0, 0} },
+{"fucompp",0, 0xdae9, X, Cpu286, FP, { 0, 0, 0} },
-{"ftst", 0, 0xd9e4, X, FP, { 0, 0, 0} },
-{"fxam", 0, 0xd9e5, X, FP, { 0, 0, 0} },
+{"ftst", 0, 0xd9e4, X, 0, FP, { 0, 0, 0} },
+{"fxam", 0, 0xd9e5, X, 0, FP, { 0, 0, 0} },
/* load constants into %st0 */
-{"fld1", 0, 0xd9e8, X, FP, { 0, 0, 0} },
-{"fldl2t", 0, 0xd9e9, X, FP, { 0, 0, 0} },
-{"fldl2e", 0, 0xd9ea, X, FP, { 0, 0, 0} },
-{"fldpi", 0, 0xd9eb, X, FP, { 0, 0, 0} },
-{"fldlg2", 0, 0xd9ec, X, FP, { 0, 0, 0} },
-{"fldln2", 0, 0xd9ed, X, FP, { 0, 0, 0} },
-{"fldz", 0, 0xd9ee, X, FP, { 0, 0, 0} },
+{"fld1", 0, 0xd9e8, X, 0, FP, { 0, 0, 0} },
+{"fldl2t", 0, 0xd9e9, X, 0, FP, { 0, 0, 0} },
+{"fldl2e", 0, 0xd9ea, X, 0, FP, { 0, 0, 0} },
+{"fldpi", 0, 0xd9eb, X, 0, FP, { 0, 0, 0} },
+{"fldlg2", 0, 0xd9ec, X, 0, FP, { 0, 0, 0} },
+{"fldln2", 0, 0xd9ed, X, 0, FP, { 0, 0, 0} },
+{"fldz", 0, 0xd9ee, X, 0, FP, { 0, 0, 0} },
/* arithmetic */
/* add */
-{"fadd", 2, 0xd8c0, X, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
+{"fadd", 2, 0xd8c0, X, 0, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
/* alias for fadd %st(i), %st */
-{"fadd", 1, 0xd8c0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fadd", 1, 0xd8c0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
#if SYSV386_COMPAT
/* alias for faddp */
-{"fadd", 0, 0xdec1, X, FP|Ugh, { 0, 0, 0} },
+{"fadd", 0, 0xdec1, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fadd", 1, 0xd8, 0, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fiadd", 1, 0xde, 0, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
-{"faddp", 2, 0xdec0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"faddp", 1, 0xdec0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"faddp", 2, 0xdec0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"faddp", 1, 0xdec0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
/* alias for faddp %st, %st(1) */
-{"faddp", 0, 0xdec1, X, FP, { 0, 0, 0} },
-{"faddp", 2, 0xdec0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
+{"faddp", 0, 0xdec1, X, 0, FP, { 0, 0, 0} },
+{"faddp", 2, 0xdec0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
/* subtract */
-{"fsub", 2, 0xd8e0, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fsub", 1, 0xd8e0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsub", 2, 0xd8e0, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
+{"fsub", 1, 0xd8e0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
#if SYSV386_COMPAT
/* alias for fsubp */
-{"fsub", 0, 0xdee1, X, FP|Ugh, { 0, 0, 0} },
+{"fsub", 0, 0xdee1, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fsub", 1, 0xd8, 4, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fisub", 1, 0xde, 4, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
#if SYSV386_COMPAT
-{"fsubp", 2, 0xdee0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubp", 1, 0xdee0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubp", 0, 0xdee1, X, FP, { 0, 0, 0} },
+{"fsubp", 2, 0xdee0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsubp", 1, 0xdee0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubp", 0, 0xdee1, X, 0, FP, { 0, 0, 0} },
#if OLDGCC_COMPAT
-{"fsubp", 2, 0xdee0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
+{"fsubp", 2, 0xdee0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
#endif
#else
-{"fsubp", 2, 0xdee8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubp", 1, 0xdee8, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubp", 0, 0xdee9, X, FP, { 0, 0, 0} },
+{"fsubp", 2, 0xdee8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsubp", 1, 0xdee8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubp", 0, 0xdee9, X, 0, FP, { 0, 0, 0} },
#endif
/* subtract reverse */
-{"fsubr", 2, 0xd8e8, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fsubr", 1, 0xd8e8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubr", 2, 0xd8e8, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
+{"fsubr", 1, 0xd8e8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
#if SYSV386_COMPAT
/* alias for fsubrp */
-{"fsubr", 0, 0xdee9, X, FP|Ugh, { 0, 0, 0} },
+{"fsubr", 0, 0xdee9, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fsubr", 1, 0xd8, 5, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fisubr", 1, 0xde, 5, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
#if SYSV386_COMPAT
-{"fsubrp", 2, 0xdee8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubrp", 1, 0xdee8, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubrp", 0, 0xdee9, X, FP, { 0, 0, 0} },
+{"fsubrp", 2, 0xdee8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsubrp", 1, 0xdee8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubrp", 0, 0xdee9, X, 0, FP, { 0, 0, 0} },
#if OLDGCC_COMPAT
-{"fsubrp", 2, 0xdee8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
+{"fsubrp", 2, 0xdee8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
#endif
#else
-{"fsubrp", 2, 0xdee0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubrp", 1, 0xdee0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubrp", 0, 0xdee1, X, FP, { 0, 0, 0} },
+{"fsubrp", 2, 0xdee0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsubrp", 1, 0xdee0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubrp", 0, 0xdee1, X, 0, FP, { 0, 0, 0} },
#endif
/* multiply */
-{"fmul", 2, 0xd8c8, X, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"fmul", 1, 0xd8c8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fmul", 2, 0xd8c8, X, 0, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
+{"fmul", 1, 0xd8c8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
#if SYSV386_COMPAT
/* alias for fmulp */
-{"fmul", 0, 0xdec9, X, FP|Ugh, { 0, 0, 0} },
+{"fmul", 0, 0xdec9, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fmul", 1, 0xd8, 1, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fimul", 1, 0xde, 1, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
-{"fmulp", 2, 0xdec8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fmulp", 1, 0xdec8, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fmulp", 0, 0xdec9, X, FP, { 0, 0, 0} },
-{"fmulp", 2, 0xdec8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
+{"fmulp", 2, 0xdec8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fmulp", 1, 0xdec8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fmulp", 0, 0xdec9, X, 0, FP, { 0, 0, 0} },
+{"fmulp", 2, 0xdec8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
/* divide */
-{"fdiv", 2, 0xd8f0, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fdiv", 1, 0xd8f0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdiv", 2, 0xd8f0, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
+{"fdiv", 1, 0xd8f0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
#if SYSV386_COMPAT
/* alias for fdivp */
-{"fdiv", 0, 0xdef1, X, FP|Ugh, { 0, 0, 0} },
+{"fdiv", 0, 0xdef1, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fdiv", 1, 0xd8, 6, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fidiv", 1, 0xde, 6, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
#if SYSV386_COMPAT
-{"fdivp", 2, 0xdef0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivp", 1, 0xdef0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivp", 0, 0xdef1, X, FP, { 0, 0, 0} },
+{"fdivp", 2, 0xdef0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivp", 1, 0xdef0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivp", 0, 0xdef1, X, 0, FP, { 0, 0, 0} },
#if OLDGCC_COMPAT
-{"fdivp", 2, 0xdef0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
+{"fdivp", 2, 0xdef0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
#endif
#else
-{"fdivp", 2, 0xdef8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivp", 1, 0xdef8, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivp", 0, 0xdef9, X, FP, { 0, 0, 0} },
+{"fdivp", 2, 0xdef8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivp", 1, 0xdef8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivp", 0, 0xdef9, X, 0, FP, { 0, 0, 0} },
#endif
/* divide reverse */
-{"fdivr", 2, 0xd8f8, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fdivr", 1, 0xd8f8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivr", 2, 0xd8f8, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
+{"fdivr", 1, 0xd8f8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
#if SYSV386_COMPAT
/* alias for fdivrp */
-{"fdivr", 0, 0xdef9, X, FP|Ugh, { 0, 0, 0} },
+{"fdivr", 0, 0xdef9, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fdivr", 1, 0xd8, 7, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fidivr", 1, 0xde, 7, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
#if SYSV386_COMPAT
-{"fdivrp", 2, 0xdef8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivrp", 1, 0xdef8, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivrp", 0, 0xdef9, X, FP, { 0, 0, 0} },
+{"fdivrp", 2, 0xdef8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivrp", 1, 0xdef8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivrp", 0, 0xdef9, X, 0, FP, { 0, 0, 0} },
#if OLDGCC_COMPAT
-{"fdivrp", 2, 0xdef8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
+{"fdivrp", 2, 0xdef8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
#endif
#else
-{"fdivrp", 2, 0xdef0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivrp", 1, 0xdef0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivrp", 0, 0xdef1, X, FP, { 0, 0, 0} },
+{"fdivrp", 2, 0xdef0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivrp", 1, 0xdef0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivrp", 0, 0xdef1, X, 0, FP, { 0, 0, 0} },
#endif
-{"f2xm1", 0, 0xd9f0, X, FP, { 0, 0, 0} },
-{"fyl2x", 0, 0xd9f1, X, FP, { 0, 0, 0} },
-{"fptan", 0, 0xd9f2, X, FP, { 0, 0, 0} },
-{"fpatan", 0, 0xd9f3, X, FP, { 0, 0, 0} },
-{"fxtract",0, 0xd9f4, X, FP, { 0, 0, 0} },
-{"fprem1", 0, 0xd9f5, X, FP, { 0, 0, 0} },
-{"fdecstp",0, 0xd9f6, X, FP, { 0, 0, 0} },
-{"fincstp",0, 0xd9f7, X, FP, { 0, 0, 0} },
-{"fprem", 0, 0xd9f8, X, FP, { 0, 0, 0} },
-{"fyl2xp1",0, 0xd9f9, X, FP, { 0, 0, 0} },
-{"fsqrt", 0, 0xd9fa, X, FP, { 0, 0, 0} },
-{"fsincos",0, 0xd9fb, X, FP, { 0, 0, 0} },
-{"frndint",0, 0xd9fc, X, FP, { 0, 0, 0} },
-{"fscale", 0, 0xd9fd, X, FP, { 0, 0, 0} },
-{"fsin", 0, 0xd9fe, X, FP, { 0, 0, 0} },
-{"fcos", 0, 0xd9ff, X, FP, { 0, 0, 0} },
-{"fchs", 0, 0xd9e0, X, FP, { 0, 0, 0} },
-{"fabs", 0, 0xd9e1, X, FP, { 0, 0, 0} },
+{"f2xm1", 0, 0xd9f0, X, 0, FP, { 0, 0, 0} },
+{"fyl2x", 0, 0xd9f1, X, 0, FP, { 0, 0, 0} },
+{"fptan", 0, 0xd9f2, X, 0, FP, { 0, 0, 0} },
+{"fpatan", 0, 0xd9f3, X, 0, FP, { 0, 0, 0} },
+{"fxtract",0, 0xd9f4, X, 0, FP, { 0, 0, 0} },
+{"fprem1", 0, 0xd9f5, X, Cpu286, FP, { 0, 0, 0} },
+{"fdecstp",0, 0xd9f6, X, 0, FP, { 0, 0, 0} },
+{"fincstp",0, 0xd9f7, X, 0, FP, { 0, 0, 0} },
+{"fprem", 0, 0xd9f8, X, 0, FP, { 0, 0, 0} },
+{"fyl2xp1",0, 0xd9f9, X, 0, FP, { 0, 0, 0} },
+{"fsqrt", 0, 0xd9fa, X, 0, FP, { 0, 0, 0} },
+{"fsincos",0, 0xd9fb, X, Cpu286, FP, { 0, 0, 0} },
+{"frndint",0, 0xd9fc, X, 0, FP, { 0, 0, 0} },
+{"fscale", 0, 0xd9fd, X, 0, FP, { 0, 0, 0} },
+{"fsin", 0, 0xd9fe, X, Cpu286, FP, { 0, 0, 0} },
+{"fcos", 0, 0xd9ff, X, Cpu286, FP, { 0, 0, 0} },
+{"fchs", 0, 0xd9e0, X, 0, FP, { 0, 0, 0} },
+{"fabs", 0, 0xd9e1, X, 0, FP, { 0, 0, 0} },
/* processor control */
-{"fninit", 0, 0xdbe3, X, FP, { 0, 0, 0} },
-{"finit", 0, 0xdbe3, X, FP|FWait, { 0, 0, 0} },
-{"fldcw", 1, 0xd9, 5, FP|Modrm, { ShortMem, 0, 0} },
-{"fnstcw", 1, 0xd9, 7, FP|Modrm, { ShortMem, 0, 0} },
-{"fstcw", 1, 0xd9, 7, FP|FWait|Modrm, { ShortMem, 0, 0} },
-{"fnstsw", 1, 0xdfe0, X, FP, { Acc, 0, 0} },
-{"fnstsw", 1, 0xdd, 7, FP|Modrm, { ShortMem, 0, 0} },
-{"fnstsw", 0, 0xdfe0, X, FP, { 0, 0, 0} },
-{"fstsw", 1, 0xdfe0, X, FP|FWait, { Acc, 0, 0} },
-{"fstsw", 1, 0xdd, 7, FP|FWait|Modrm, { ShortMem, 0, 0} },
-{"fstsw", 0, 0xdfe0, X, FP|FWait, { 0, 0, 0} },
-{"fnclex", 0, 0xdbe2, X, FP, { 0, 0, 0} },
-{"fclex", 0, 0xdbe2, X, FP|FWait, { 0, 0, 0} },
+{"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} },
+{"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} },
+{"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, sl_Suf|Modrm, { LLongMem, 0, 0} },
-{"fstenv", 1, 0xd9, 6, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
-{"fldenv", 1, 0xd9, 4, sl_Suf|Modrm, { LLongMem, 0, 0} },
-{"fnsave", 1, 0xdd, 6, sl_Suf|Modrm, { LLongMem, 0, 0} },
-{"fsave", 1, 0xdd, 6, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
-{"frstor", 1, 0xdd, 4, sl_Suf|Modrm, { LLongMem, 0, 0} },
-
-{"ffree", 1, 0xddc0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"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} },
+
+{"ffree", 1, 0xddc0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
/* P6:free st(i), pop st */
-{"ffreep", 1, 0xdfc0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fnop", 0, 0xd9d0, X, FP, { 0, 0, 0} },
+{"ffreep", 1, 0xdfc0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
+{"fnop", 0, 0xd9d0, X, 0, FP, { 0, 0, 0} },
#define FWAIT_OPCODE 0x9b
-{"fwait", 0, 0x9b, X, FP, { 0, 0, 0} },
+{"fwait", 0, 0x9b, X, 0, FP, { 0, 0, 0} },
/* Opcode prefixes; we allow them as separate insns too. */
#define ADDR_PREFIX_OPCODE 0x67
-{"addr16", 0, 0x67, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"addr32", 0, 0x67, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"aword", 0, 0x67, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"adword", 0, 0x67, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"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} },
#define DATA_PREFIX_OPCODE 0x66
-{"data16", 0, 0x66, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"data32", 0, 0x66, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"word", 0, 0x66, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"dword", 0, 0x66, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"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} },
#define LOCK_PREFIX_OPCODE 0xf0
-{"lock", 0, 0xf0, X, NoSuf|IsPrefix, { 0, 0, 0} },
-{"wait", 0, 0x9b, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"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, NoSuf|IsPrefix, { 0, 0, 0} },
+{"cs", 0, 0x2e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define DS_PREFIX_OPCODE 0x3e
-{"ds", 0, 0x3e, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"ds", 0, 0x3e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define ES_PREFIX_OPCODE 0x26
-{"es", 0, 0x26, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"es", 0, 0x26, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define FS_PREFIX_OPCODE 0x64
-{"fs", 0, 0x64, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"fs", 0, 0x64, X, Cpu386, NoSuf|IsPrefix, { 0, 0, 0} },
#define GS_PREFIX_OPCODE 0x65
-{"gs", 0, 0x65, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"gs", 0, 0x65, X, Cpu386, NoSuf|IsPrefix, { 0, 0, 0} },
#define SS_PREFIX_OPCODE 0x36
-{"ss", 0, 0x36, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"ss", 0, 0x36, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define REPNE_PREFIX_OPCODE 0xf2
#define REPE_PREFIX_OPCODE 0xf3
-{"rep", 0, 0xf3, X, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repe", 0, 0xf3, X, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repz", 0, 0xf3, X, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repne", 0, 0xf2, X, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repnz", 0, 0xf2, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rep", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"repe", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"repz", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"repne", 0, 0xf2, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"repnz", 0, 0xf2, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex", 0, 0x40, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rexz", 0, 0x41, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rexy", 0, 0x42, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rexyz", 0, 0x43, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rexx", 0, 0x44, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rexxz", 0, 0x45, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rexxy", 0, 0x46, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rexxyz", 0, 0x47, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex64", 0, 0x48, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex64z", 0, 0x49, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex64y", 0, 0x4a, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex64yz",0, 0x4b, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex64x", 0, 0x4c, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex64xz",0, 0x4d, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex64xy",0, 0x4e, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
+{"rex64xyz",0, 0x4f, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
/* 486 extensions. */
-{"bswap", 1, 0x0fc8, X, l_Suf|ShortForm, { Reg32, 0, 0 } },
-{"xadd", 2, 0x0fc0, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"cmpxchg", 2, 0x0fb0, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"invd", 0, 0x0f08, X, NoSuf, { 0, 0, 0} },
-{"wbinvd", 0, 0x0f09, X, NoSuf, { 0, 0, 0} },
-{"invlpg", 1, 0x0f01, 7, NoSuf|Modrm, { AnyMem, 0, 0} },
+{"bswap", 1, 0x0fc8, X, Cpu486, lq_Suf|ShortForm, { Reg32|Reg64, 0, 0 } },
+{"xadd", 2, 0x0fc0, X, Cpu486, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
+{"cmpxchg", 2, 0x0fb0, X, Cpu486, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
+{"invd", 0, 0x0f08, X, Cpu486, NoSuf, { 0, 0, 0} },
+{"wbinvd", 0, 0x0f09, X, Cpu486, NoSuf, { 0, 0, 0} },
+{"invlpg", 1, 0x0f01, 7, Cpu486, NoSuf|Modrm, { AnyMem, 0, 0} },
/* 586 and late 486 extensions. */
-{"cpuid", 0, 0x0fa2, X, NoSuf, { 0, 0, 0} },
+{"cpuid", 0, 0x0fa2, X, Cpu486, NoSuf, { 0, 0, 0} },
/* Pentium extensions. */
-{"wrmsr", 0, 0x0f30, X, NoSuf, { 0, 0, 0} },
-{"rdtsc", 0, 0x0f31, X, NoSuf, { 0, 0, 0} },
-{"rdmsr", 0, 0x0f32, X, NoSuf, { 0, 0, 0} },
-{"cmpxchg8b",1,0x0fc7, 1, NoSuf|Modrm, { LLongMem, 0, 0} },
+{"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} },
/* Pentium II/Pentium Pro extensions. */
-{"sysenter",0, 0x0f34, X, NoSuf, { 0, 0, 0} },
-{"sysexit", 0, 0x0f35, X, NoSuf, { 0, 0, 0} },
-{"fxsave", 1, 0x0fae, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fxrstor", 1, 0x0fae, 1, FP|Modrm, { LLongMem, 0, 0} },
-{"rdpmc", 0, 0x0f33, X, NoSuf, { 0, 0, 0} },
+{"sysenter",0, 0x0f34, X, Cpu686|CpuNo64, NoSuf, { 0, 0, 0} },
+{"sysexit", 0, 0x0f35, X, Cpu686|CpuNo64, NoSuf, { 0, 0, 0} },
+{"fxsave", 1, 0x0fae, 0, Cpu686, FP|Modrm, { LLongMem, 0, 0} },
+{"fxrstor", 1, 0x0fae, 1, Cpu686, FP|Modrm, { LLongMem, 0, 0} },
+{"rdpmc", 0, 0x0f33, X, Cpu686, NoSuf, { 0, 0, 0} },
/* official undefined instr. */
-{"ud2", 0, 0x0f0b, X, NoSuf, { 0, 0, 0} },
+{"ud2", 0, 0x0f0b, X, Cpu686, NoSuf, { 0, 0, 0} },
/* alias for ud2 */
-{"ud2a", 0, 0x0f0b, X, NoSuf, { 0, 0, 0} },
+{"ud2a", 0, 0x0f0b, X, Cpu686, NoSuf, { 0, 0, 0} },
/* 2nd. official undefined instr. */
-{"ud2b", 0, 0x0fb9, X, NoSuf, { 0, 0, 0} },
-
-{"cmovo", 2, 0x0f40, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovno", 2, 0x0f41, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovb", 2, 0x0f42, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovc", 2, 0x0f42, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnae", 2, 0x0f42, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovae", 2, 0x0f43, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnc", 2, 0x0f43, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnb", 2, 0x0f43, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmove", 2, 0x0f44, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovz", 2, 0x0f44, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovne", 2, 0x0f45, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnz", 2, 0x0f45, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovbe", 2, 0x0f46, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovna", 2, 0x0f46, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmova", 2, 0x0f47, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnbe", 2, 0x0f47, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovs", 2, 0x0f48, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovns", 2, 0x0f49, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovp", 2, 0x0f4a, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnp", 2, 0x0f4b, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovl", 2, 0x0f4c, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnge", 2, 0x0f4c, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovge", 2, 0x0f4d, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnl", 2, 0x0f4d, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovle", 2, 0x0f4e, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovng", 2, 0x0f4e, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovg", 2, 0x0f4f, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnle", 2, 0x0f4f, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-
-{"fcmovb", 2, 0xdac0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnae",2, 0xdac0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmove", 2, 0xdac8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovbe", 2, 0xdad0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovna", 2, 0xdad0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovu", 2, 0xdad8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovae", 2, 0xdbc0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnb", 2, 0xdbc0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovne", 2, 0xdbc8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmova", 2, 0xdbd0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnbe",2, 0xdbd0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnu", 2, 0xdbd8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-
-{"fcomi", 2, 0xdbf0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcomi", 0, 0xdbf1, X, FP|ShortForm, { 0, 0, 0} },
-{"fcomi", 1, 0xdbf0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fucomi", 2, 0xdbe8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucomi", 0, 0xdbe9, X, FP|ShortForm, { 0, 0, 0} },
-{"fucomi", 1, 0xdbe8, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fcomip", 2, 0xdff0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcompi", 2, 0xdff0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcompi", 0, 0xdff1, X, FP|ShortForm, { 0, 0, 0} },
-{"fcompi", 1, 0xdff0, X, FP|ShortForm, { FloatReg, 0, 0} },
-{"fucomip", 2, 0xdfe8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucompi", 2, 0xdfe8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucompi", 0, 0xdfe9, X, FP|ShortForm, { 0, 0, 0} },
-{"fucompi", 1, 0xdfe8, X, FP|ShortForm, { FloatReg, 0, 0} },
-
-/* MMX instructions. */
-
-{"emms", 0, 0x0f77, X, FP, { 0, 0, 0 } },
-{"movd", 2, 0x0f6e, X, FP|Modrm, { Reg32|LongMem, RegMMX, 0 } },
-{"movd", 2, 0x0f7e, X, FP|Modrm, { RegMMX, Reg32|LongMem, 0 } },
-{"movq", 2, 0x0f6f, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"movq", 2, 0x0f7f, X, FP|Modrm, { RegMMX, RegMMX|LongMem, 0 } },
-{"packssdw", 2, 0x0f6b, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packsswb", 2, 0x0f63, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packuswb", 2, 0x0f67, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddb", 2, 0x0ffc, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddw", 2, 0x0ffd, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddd", 2, 0x0ffe, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddsb", 2, 0x0fec, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddsw", 2, 0x0fed, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddusb", 2, 0x0fdc, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddusw", 2, 0x0fdd, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pand", 2, 0x0fdb, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pandn", 2, 0x0fdf, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqb", 2, 0x0f74, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqw", 2, 0x0f75, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqd", 2, 0x0f76, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtb", 2, 0x0f64, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtw", 2, 0x0f65, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtd", 2, 0x0f66, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmaddwd", 2, 0x0ff5, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhw", 2, 0x0fe5, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmullw", 2, 0x0fd5, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"por", 2, 0x0feb, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllw", 2, 0x0ff1, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllw", 2, 0x0f71, 6, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"pslld", 2, 0x0ff2, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pslld", 2, 0x0f72, 6, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psllq", 2, 0x0ff3, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllq", 2, 0x0f73, 6, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psraw", 2, 0x0fe1, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psraw", 2, 0x0f71, 4, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrad", 2, 0x0fe2, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrad", 2, 0x0f72, 4, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrlw", 2, 0x0fd1, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrlw", 2, 0x0f71, 2, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrld", 2, 0x0fd2, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrld", 2, 0x0f72, 2, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrlq", 2, 0x0fd3, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrlq", 2, 0x0f73, 2, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psubb", 2, 0x0ff8, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubw", 2, 0x0ff9, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubd", 2, 0x0ffa, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubsb", 2, 0x0fe8, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubsw", 2, 0x0fe9, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubusb", 2, 0x0fd8, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubusw", 2, 0x0fd9, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhbw",2, 0x0f68, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhwd",2, 0x0f69, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhdq",2, 0x0f6a, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpcklbw",2, 0x0f60, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpcklwd",2, 0x0f61, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckldq",2, 0x0f62, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pxor", 2, 0x0fef, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-
+{"ud2b", 0, 0x0fb9, X, Cpu686, NoSuf, { 0, 0, 0} },
+
+{"cmovo", 2, 0x0f40, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovno", 2, 0x0f41, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovb", 2, 0x0f42, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovc", 2, 0x0f42, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnae", 2, 0x0f42, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovae", 2, 0x0f43, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnc", 2, 0x0f43, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnb", 2, 0x0f43, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmove", 2, 0x0f44, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovz", 2, 0x0f44, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovne", 2, 0x0f45, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnz", 2, 0x0f45, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovbe", 2, 0x0f46, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovna", 2, 0x0f46, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmova", 2, 0x0f47, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnbe", 2, 0x0f47, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovs", 2, 0x0f48, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovns", 2, 0x0f49, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovp", 2, 0x0f4a, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnp", 2, 0x0f4b, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovl", 2, 0x0f4c, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnge", 2, 0x0f4c, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovge", 2, 0x0f4d, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnl", 2, 0x0f4d, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovle", 2, 0x0f4e, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovng", 2, 0x0f4e, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovg", 2, 0x0f4f, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnle", 2, 0x0f4f, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+
+{"fcmovb", 2, 0xdac0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovnae",2, 0xdac0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmove", 2, 0xdac8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovbe", 2, 0xdad0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovna", 2, 0xdad0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovu", 2, 0xdad8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovae", 2, 0xdbc0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovnb", 2, 0xdbc0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovne", 2, 0xdbc8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmova", 2, 0xdbd0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovnbe",2, 0xdbd0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovnu", 2, 0xdbd8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+
+{"fcomi", 2, 0xdbf0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcomi", 0, 0xdbf1, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
+{"fcomi", 1, 0xdbf0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
+{"fucomi", 2, 0xdbe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fucomi", 0, 0xdbe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
+{"fucomi", 1, 0xdbe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
+{"fcomip", 2, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcompi", 2, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcompi", 0, 0xdff1, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
+{"fcompi", 1, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
+{"fucomip", 2, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fucompi", 2, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fucompi", 0, 0xdfe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
+{"fucompi", 1, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
+
+/* Pentium4 extensions. */
+
+{"movnti", 2, 0x0fc3, X, CpuP4, 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 } },
+
+/* 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. */
+{"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 } },
+/* In the 64bit mode the short form mov immediate is redefined to have
+ 64bit displacement value. */
+{"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 } },
+/* 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 } },
/* PIII Katmai New Instructions / SIMD instructions. */
-{"addps", 2, 0x0f58, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addss", 2, 0xf30f58, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"andnps", 2, 0x0f55, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"andps", 2, 0x0f54, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpeqps", 2, 0x0fc2, 0, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpeqss", 2, 0xf30fc2, 0, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpleps", 2, 0x0fc2, 2, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpless", 2, 0xf30fc2, 2, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpltps", 2, 0x0fc2, 1, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpltss", 2, 0xf30fc2, 1, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpneqps", 2, 0x0fc2, 4, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpneqss", 2, 0xf30fc2, 4, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpnleps", 2, 0x0fc2, 6, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnless", 2, 0xf30fc2, 6, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpnltps", 2, 0x0fc2, 5, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnltss", 2, 0xf30fc2, 5, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpordps", 2, 0x0fc2, 7, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpordss", 2, 0xf30fc2, 7, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpunordps",2, 0x0fc2, 3, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpunordss",2, 0xf30fc2, 3, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpps", 3, 0x0fc2, X, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"cmpss", 3, 0xf30fc2, X, FP|Modrm, { Imm8, RegXMM|WordMem, RegXMM } },
-{"comiss", 2, 0x0f2f, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cvtpi2ps", 2, 0x0f2a, X, FP|Modrm, { RegMMX|LLongMem, RegXMM, 0 } },
-{"cvtps2pi", 2, 0x0f2d, X, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvtsi2ss", 2, 0xf30f2a, X, FP|Modrm, { Reg32|WordMem, RegXMM, 0 } },
-{"cvtss2si", 2, 0xf30f2d, X, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
-{"cvttps2pi", 2, 0x0f2c, X, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvttss2si", 2, 0xf30f2c, X, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
-{"divps", 2, 0x0f5e, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"divss", 2, 0xf30f5e, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"ldmxcsr", 1, 0x0fae, 2, FP|Modrm, { WordMem, 0, 0 } },
-{"maskmovq", 2, 0x0ff7, X, FP|Modrm, { RegMMX|InvMem, RegMMX, 0 } },
-{"maxps", 2, 0x0f5f, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"maxss", 2, 0xf30f5f, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"minps", 2, 0x0f5d, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"minss", 2, 0xf30f5d, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"movaps", 2, 0x0f28, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movaps", 2, 0x0f29, X, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movhlps", 2, 0x0f12, X, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movhps", 2, 0x0f16, X, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"movhps", 2, 0x0f17, X, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movlhps", 2, 0x0f16, X, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movlps", 2, 0x0f12, X, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"movlps", 2, 0x0f13, X, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movmskps", 2, 0x0f50, X, FP|Modrm, { RegXMM|InvMem, Reg32, 0 } },
-{"movntps", 2, 0x0f2b, X, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movntq", 2, 0x0fe7, X, FP|Modrm, { RegMMX, LLongMem, 0 } },
-{"movss", 2, 0xf30f10, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"movss", 2, 0xf30f11, X, FP|Modrm, { RegXMM, RegXMM|WordMem, 0 } },
-{"movups", 2, 0x0f10, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movups", 2, 0x0f11, X, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"mulps", 2, 0x0f59, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mulss", 2, 0xf30f59, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"orps", 2, 0x0f56, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pavgb", 2, 0x0fe0, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pavgw", 2, 0x0fe3, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pextrw", 3, 0x0fc5, X, FP|Modrm, { Imm8, RegMMX, Reg32|InvMem } },
-{"pinsrw", 3, 0x0fc4, X, FP|Modrm, { Imm8, Reg32|ShortMem, RegMMX } },
-{"pmaxsw", 2, 0x0fee, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmaxub", 2, 0x0fde, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pminsw", 2, 0x0fea, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pminub", 2, 0x0fda, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmovmskb", 2, 0x0fd7, X, FP|Modrm, { RegMMX, Reg32|InvMem, 0 } },
-{"pmulhuw", 2, 0x0fe4, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"prefetchnta", 1, 0x0f18, 0, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht0", 1, 0x0f18, 1, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht1", 1, 0x0f18, 2, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht2", 1, 0x0f18, 3, FP|Modrm, { LLongMem, 0, 0 } },
-{"psadbw", 2, 0x0ff6, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pshufw", 3, 0x0f70, X, FP|Modrm, { Imm8, RegMMX|LLongMem, RegMMX } },
-{"rcpps", 2, 0x0f53, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"rcpss", 2, 0xf30f53, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"rsqrtps", 2, 0x0f52, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"rsqrtss", 2, 0xf30f52, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"sfence", 0, 0x0faef8, X, FP, { 0, 0, 0 } },
-{"shufps", 3, 0x0fc6, X, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"sqrtps", 2, 0x0f51, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"sqrtss", 2, 0xf30f51, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"stmxcsr", 1, 0x0fae, 3, FP|Modrm, { WordMem, 0, 0 } },
-{"subps", 2, 0x0f5c, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"subss", 2, 0xf30f5c, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"ucomiss", 2, 0x0f2e, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"unpckhps", 2, 0x0f15, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"unpcklps", 2, 0x0f14, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"xorps", 2, 0x0f57, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"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 } },
+{"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 } },
+{"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 } },
+{"movmskps", 2, 0x0f50, X, CpuSSE, FP|Modrm, { RegXMM|InvMem, Reg32, 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, FP|Modrm, { Imm8, RegMMX|InvMem, Reg32 } },
+{"pextrw", 3, 0x660fc5, X, CpuSSE2,FP|Modrm, { Imm8, RegXMM|InvMem, Reg32 } },
+{"pinsrw", 3, 0x0fc4, X, CpuSSE, FP|Modrm, { Imm8, Reg32|ShortMem, RegMMX } },
+{"pinsrw", 3, 0x660fc4, X, CpuSSE2, FP|Modrm, { Imm8, Reg32|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, FP|Modrm, { RegMMX|InvMem, Reg32, 0 } },
+{"pmovmskb", 2, 0x660fd7, X, CpuSSE2,FP|Modrm, { RegXMM|InvMem, Reg32, 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 } },
+
+/* 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 } },
+{"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 } },
+{"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 } },
+{"movmskpd", 2, 0x660f50, X, CpuSSE2, FP|Modrm, { RegXMM|InvMem, Reg32, 0 } },
+{"movntpd", 2, 0x660f2b, X, CpuSSE2, FP|Modrm, { RegXMM, LLongMem, 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 } },
+{"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 } },
+{"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 } },
/* AMD 3DNow! instructions. */
-{"prefetch", 1, 0x0f0d, 0, FP|Modrm, { ByteMem, 0, 0 } },
-{"prefetchw",1, 0x0f0d, 1, FP|Modrm, { ByteMem, 0, 0 } },
-{"femms", 0, 0x0f0e, X, FP, { 0, 0, 0 } },
-{"pavgusb", 2, 0x0f0f, 0xbf, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pf2id", 2, 0x0f0f, 0x1d, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pf2iw", 2, 0x0f0f, 0x1c, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
-{"pfacc", 2, 0x0f0f, 0xae, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfadd", 2, 0x0f0f, 0x9e, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpeq", 2, 0x0f0f, 0xb0, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpge", 2, 0x0f0f, 0x90, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpgt", 2, 0x0f0f, 0xa0, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmax", 2, 0x0f0f, 0xa4, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmin", 2, 0x0f0f, 0x94, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmul", 2, 0x0f0f, 0xb4, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfnacc", 2, 0x0f0f, 0x8a, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
-{"pfpnacc", 2, 0x0f0f, 0x8e, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
-{"pfrcp", 2, 0x0f0f, 0x96, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcpit1", 2, 0x0f0f, 0xa6, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcpit2", 2, 0x0f0f, 0xb6, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrsqit1", 2, 0x0f0f, 0xa7, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrsqrt", 2, 0x0f0f, 0x97, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfsub", 2, 0x0f0f, 0x9a, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfsubr", 2, 0x0f0f, 0xaa, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pi2fd", 2, 0x0f0f, 0x0d, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pi2fw", 2, 0x0f0f, 0x0c, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
-{"pmulhrw", 2, 0x0f0f, 0xb7, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pswapd", 2, 0x0f0f, 0xbb, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
+{"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 } },
+
+/* 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} },
/* sentinel */
-{NULL, 0, 0, 0, 0, { 0, 0, 0} }
+{NULL, 0, 0, 0, 0, 0, { 0, 0, 0} }
};
#undef X
#undef NoSuf
#undef b_Suf
#undef w_Suf
#undef l_Suf
-#undef d_Suf
+#undef q_Suf
#undef x_Suf
#undef bw_Suf
#undef bl_Suf
#undef wl_Suf
-#undef wld_Suf
+#undef wlq_Suf
#undef sl_Suf
-#undef sld_Suf
-#undef sldx_Suf
#undef bwl_Suf
-#undef bwld_Suf
+#undef bwlq_Suf
#undef FP
#undef l_FP
-#undef d_FP
#undef x_FP
#undef sl_FP
-#undef sld_FP
-#undef sldx_FP
#define MAX_MNEM_SIZE 16 /* for parsing insn mnemonics from input */
@@ -1098,104 +1343,190 @@ static const template i386_optab[] = {
static const reg_entry i386_regtab[] = {
/* make %st first as we test for it */
- {"st", FloatReg|FloatAcc, 0},
+ {"st", FloatReg|FloatAcc, 0, 0},
/* 8 bit regs */
- {"al", Reg8|Acc, 0},
- {"cl", Reg8|ShiftCount, 1},
- {"dl", Reg8, 2},
- {"bl", Reg8, 3},
- {"ah", Reg8, 4},
- {"ch", Reg8, 5},
- {"dh", Reg8, 6},
- {"bh", Reg8, 7},
+#define REGNAM_AL 1 /* Entry in i386_regtab. */
+ {"al", Reg8|Acc, 0, 0},
+ {"cl", Reg8|ShiftCount, 0, 1},
+ {"dl", Reg8, 0, 2},
+ {"bl", Reg8, 0, 3},
+ {"ah", Reg8, 0, 4},
+ {"ch", Reg8, 0, 5},
+ {"dh", Reg8, 0, 6},
+ {"bh", Reg8, 0, 7},
+ {"axl", Reg8|Acc, RegRex64, 0}, /* Must be in the "al + 8" slot. */
+ {"cxl", Reg8, RegRex64, 1},
+ {"dxl", Reg8, RegRex64, 2},
+ {"bxl", Reg8, RegRex64, 3},
+ {"spl", Reg8, RegRex64, 4},
+ {"bpl", Reg8, RegRex64, 5},
+ {"sil", Reg8, RegRex64, 6},
+ {"dil", Reg8, RegRex64, 7},
+ {"r8b", Reg8, RegRex64|RegRex, 0},
+ {"r9b", Reg8, RegRex64|RegRex, 1},
+ {"r10b", Reg8, RegRex64|RegRex, 2},
+ {"r11b", Reg8, RegRex64|RegRex, 3},
+ {"r12b", Reg8, RegRex64|RegRex, 4},
+ {"r13b", Reg8, RegRex64|RegRex, 5},
+ {"r14b", Reg8, RegRex64|RegRex, 6},
+ {"r15b", Reg8, RegRex64|RegRex, 7},
/* 16 bit regs */
- {"ax", Reg16|Acc, 0},
- {"cx", Reg16, 1},
- {"dx", Reg16|InOutPortReg, 2},
- {"bx", Reg16|BaseIndex, 3},
- {"sp", Reg16, 4},
- {"bp", Reg16|BaseIndex, 5},
- {"si", Reg16|BaseIndex, 6},
- {"di", Reg16|BaseIndex, 7},
+#define REGNAM_AX 25
+ {"ax", Reg16|Acc, 0, 0},
+ {"cx", Reg16, 0, 1},
+ {"dx", Reg16|InOutPortReg, 0, 2},
+ {"bx", Reg16|BaseIndex, 0, 3},
+ {"sp", Reg16, 0, 4},
+ {"bp", Reg16|BaseIndex, 0, 5},
+ {"si", Reg16|BaseIndex, 0, 6},
+ {"di", Reg16|BaseIndex, 0, 7},
+ {"r8w", Reg16, RegRex, 0},
+ {"r9w", Reg16, RegRex, 1},
+ {"r10w", Reg16, RegRex, 2},
+ {"r11w", Reg16, RegRex, 3},
+ {"r12w", Reg16, RegRex, 4},
+ {"r13w", Reg16, RegRex, 5},
+ {"r14w", Reg16, RegRex, 6},
+ {"r15w", Reg16, RegRex, 7},
/* 32 bit regs */
- {"eax", Reg32|BaseIndex|Acc, 0},
- {"ecx", Reg32|BaseIndex, 1},
- {"edx", Reg32|BaseIndex, 2},
- {"ebx", Reg32|BaseIndex, 3},
- {"esp", Reg32, 4},
- {"ebp", Reg32|BaseIndex, 5},
- {"esi", Reg32|BaseIndex, 6},
- {"edi", Reg32|BaseIndex, 7},
+#define REGNAM_EAX 41
+ {"eax", Reg32|BaseIndex|Acc, 0, 0}, /* Must be in ax + 16 slot */
+ {"ecx", Reg32|BaseIndex, 0, 1},
+ {"edx", Reg32|BaseIndex, 0, 2},
+ {"ebx", Reg32|BaseIndex, 0, 3},
+ {"esp", Reg32, 0, 4},
+ {"ebp", Reg32|BaseIndex, 0, 5},
+ {"esi", Reg32|BaseIndex, 0, 6},
+ {"edi", Reg32|BaseIndex, 0, 7},
+ {"r8d", Reg32|BaseIndex, RegRex, 0},
+ {"r9d", Reg32|BaseIndex, RegRex, 1},
+ {"r10d", Reg32|BaseIndex, RegRex, 2},
+ {"r11d", Reg32|BaseIndex, RegRex, 3},
+ {"r12d", Reg32|BaseIndex, RegRex, 4},
+ {"r13d", Reg32|BaseIndex, RegRex, 5},
+ {"r14d", Reg32|BaseIndex, RegRex, 6},
+ {"r15d", Reg32|BaseIndex, RegRex, 7},
+ {"rax", Reg64|BaseIndex|Acc, 0, 0},
+ {"rcx", Reg64|BaseIndex, 0, 1},
+ {"rdx", Reg64|BaseIndex, 0, 2},
+ {"rbx", Reg64|BaseIndex, 0, 3},
+ {"rsp", Reg64, 0, 4},
+ {"rbp", Reg64|BaseIndex, 0, 5},
+ {"rsi", Reg64|BaseIndex, 0, 6},
+ {"rdi", Reg64|BaseIndex, 0, 7},
+ {"r8", Reg64|BaseIndex, RegRex, 0},
+ {"r9", Reg64|BaseIndex, RegRex, 1},
+ {"r10", Reg64|BaseIndex, RegRex, 2},
+ {"r11", Reg64|BaseIndex, RegRex, 3},
+ {"r12", Reg64|BaseIndex, RegRex, 4},
+ {"r13", Reg64|BaseIndex, RegRex, 5},
+ {"r14", Reg64|BaseIndex, RegRex, 6},
+ {"r15", Reg64|BaseIndex, RegRex, 7},
/* segment registers */
- {"es", SReg2, 0},
- {"cs", SReg2, 1},
- {"ss", SReg2, 2},
- {"ds", SReg2, 3},
- {"fs", SReg3, 4},
- {"gs", SReg3, 5},
+ {"es", SReg2, 0, 0},
+ {"cs", SReg2, 0, 1},
+ {"ss", SReg2, 0, 2},
+ {"ds", SReg2, 0, 3},
+ {"fs", SReg3, 0, 4},
+ {"gs", SReg3, 0, 5},
/* control registers */
- {"cr0", Control, 0},
- {"cr1", Control, 1},
- {"cr2", Control, 2},
- {"cr3", Control, 3},
- {"cr4", Control, 4},
- {"cr5", Control, 5},
- {"cr6", Control, 6},
- {"cr7", Control, 7},
+ {"cr0", Control, 0, 0},
+ {"cr1", Control, 0, 1},
+ {"cr2", Control, 0, 2},
+ {"cr3", Control, 0, 3},
+ {"cr4", Control, 0, 4},
+ {"cr5", Control, 0, 5},
+ {"cr6", Control, 0, 6},
+ {"cr7", Control, 0, 7},
+ {"cr8", Control, RegRex, 0},
+ {"cr9", Control, RegRex, 1},
+ {"cr10", Control, RegRex, 2},
+ {"cr11", Control, RegRex, 3},
+ {"cr12", Control, RegRex, 4},
+ {"cr13", Control, RegRex, 5},
+ {"cr14", Control, RegRex, 6},
+ {"cr15", Control, RegRex, 7},
/* debug registers */
- {"db0", Debug, 0},
- {"db1", Debug, 1},
- {"db2", Debug, 2},
- {"db3", Debug, 3},
- {"db4", Debug, 4},
- {"db5", Debug, 5},
- {"db6", Debug, 6},
- {"db7", Debug, 7},
- {"dr0", Debug, 0},
- {"dr1", Debug, 1},
- {"dr2", Debug, 2},
- {"dr3", Debug, 3},
- {"dr4", Debug, 4},
- {"dr5", Debug, 5},
- {"dr6", Debug, 6},
- {"dr7", Debug, 7},
+ {"db0", Debug, 0, 0},
+ {"db1", Debug, 0, 1},
+ {"db2", Debug, 0, 2},
+ {"db3", Debug, 0, 3},
+ {"db4", Debug, 0, 4},
+ {"db5", Debug, 0, 5},
+ {"db6", Debug, 0, 6},
+ {"db7", Debug, 0, 7},
+ {"db8", Debug, RegRex, 0},
+ {"db9", Debug, RegRex, 1},
+ {"db10", Debug, RegRex, 2},
+ {"db11", Debug, RegRex, 3},
+ {"db12", Debug, RegRex, 4},
+ {"db13", Debug, RegRex, 5},
+ {"db14", Debug, RegRex, 6},
+ {"db15", Debug, RegRex, 7},
+ {"dr0", Debug, 0, 0},
+ {"dr1", Debug, 0, 1},
+ {"dr2", Debug, 0, 2},
+ {"dr3", Debug, 0, 3},
+ {"dr4", Debug, 0, 4},
+ {"dr5", Debug, 0, 5},
+ {"dr6", Debug, 0, 6},
+ {"dr7", Debug, 0, 7},
+ {"dr8", Debug, RegRex, 0},
+ {"dr9", Debug, RegRex, 1},
+ {"dr10", Debug, RegRex, 2},
+ {"dr11", Debug, RegRex, 3},
+ {"dr12", Debug, RegRex, 4},
+ {"dr13", Debug, RegRex, 5},
+ {"dr14", Debug, RegRex, 6},
+ {"dr15", Debug, RegRex, 7},
/* test registers */
- {"tr0", Test, 0},
- {"tr1", Test, 1},
- {"tr2", Test, 2},
- {"tr3", Test, 3},
- {"tr4", Test, 4},
- {"tr5", Test, 5},
- {"tr6", Test, 6},
- {"tr7", Test, 7},
+ {"tr0", Test, 0, 0},
+ {"tr1", Test, 0, 1},
+ {"tr2", Test, 0, 2},
+ {"tr3", Test, 0, 3},
+ {"tr4", Test, 0, 4},
+ {"tr5", Test, 0, 5},
+ {"tr6", Test, 0, 6},
+ {"tr7", Test, 0, 7},
/* mmx and simd registers */
- {"mm0", RegMMX, 0},
- {"mm1", RegMMX, 1},
- {"mm2", RegMMX, 2},
- {"mm3", RegMMX, 3},
- {"mm4", RegMMX, 4},
- {"mm5", RegMMX, 5},
- {"mm6", RegMMX, 6},
- {"mm7", RegMMX, 7},
- {"xmm0", RegXMM, 0},
- {"xmm1", RegXMM, 1},
- {"xmm2", RegXMM, 2},
- {"xmm3", RegXMM, 3},
- {"xmm4", RegXMM, 4},
- {"xmm5", RegXMM, 5},
- {"xmm6", RegXMM, 6},
- {"xmm7", RegXMM, 7}
+ {"mm0", RegMMX, 0, 0},
+ {"mm1", RegMMX, 0, 1},
+ {"mm2", RegMMX, 0, 2},
+ {"mm3", RegMMX, 0, 3},
+ {"mm4", RegMMX, 0, 4},
+ {"mm5", RegMMX, 0, 5},
+ {"mm6", RegMMX, 0, 6},
+ {"mm7", RegMMX, 0, 7},
+ {"xmm0", RegXMM, 0, 0},
+ {"xmm1", RegXMM, 0, 1},
+ {"xmm2", RegXMM, 0, 2},
+ {"xmm3", RegXMM, 0, 3},
+ {"xmm4", RegXMM, 0, 4},
+ {"xmm5", RegXMM, 0, 5},
+ {"xmm6", RegXMM, 0, 6},
+ {"xmm7", RegXMM, 0, 7},
+ {"xmm8", RegXMM, RegRex, 0},
+ {"xmm9", RegXMM, RegRex, 1},
+ {"xmm10", RegXMM, RegRex, 2},
+ {"xmm11", RegXMM, RegRex, 3},
+ {"xmm12", RegXMM, RegRex, 4},
+ {"xmm13", RegXMM, RegRex, 5},
+ {"xmm14", RegXMM, RegRex, 6},
+ {"xmm15", RegXMM, RegRex, 7},
+ /* no type will make this register rejected for all purposes except
+ for addressing. This saves creating one extra type for RIP. */
+ {"rip", BaseIndex, 0, 0}
};
static const reg_entry i386_float_regtab[] = {
- {"st(0)", FloatReg|FloatAcc, 0},
- {"st(1)", FloatReg, 1},
- {"st(2)", FloatReg, 2},
- {"st(3)", FloatReg, 3},
- {"st(4)", FloatReg, 4},
- {"st(5)", FloatReg, 5},
- {"st(6)", FloatReg, 6},
- {"st(7)", FloatReg, 7}
+ {"st(0)", FloatReg|FloatAcc, 0, 0},
+ {"st(1)", FloatReg, 0, 1},
+ {"st(2)", FloatReg, 0, 2},
+ {"st(3)", FloatReg, 0, 3},
+ {"st(4)", FloatReg, 0, 4},
+ {"st(5)", FloatReg, 0, 5},
+ {"st(6)", FloatReg, 0, 6},
+ {"st(7)", FloatReg, 0, 7}
};
#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
diff --git a/gnu/usr.bin/binutils/include/opcode/i960.h b/gnu/usr.bin/binutils/include/opcode/i960.h
index b52fc338737..33b56e63561 100644
--- a/gnu/usr.bin/binutils/include/opcode/i960.h
+++ b/gnu/usr.bin/binutils/include/opcode/i960.h
@@ -1,22 +1,38 @@
/* Basic 80960 instruction formats.
- *
- * The 'COJ' instructions are actually COBR instructions with the 'b' in
- * the mnemonic replaced by a 'j'; they are ALWAYS "de-optimized" if necessary:
- * if the displacement will not fit in 13 bits, the assembler will replace them
- * with the corresponding compare and branch instructions.
- *
- * All of the 'MEMn' instructions are the same format; the 'n' in the name
- * indicates the default index scale factor (the size of the datum operated on).
- *
- * The FBRA formats are not actually an instruction format. They are the
- * "convenience directives" for branching on floating-point comparisons,
- * each of which generates 2 instructions (a 'bno' and one other branch).
- *
- * The CALLJ format is not actually an instruction format. It indicates that
- * the instruction generated (a CTRL-format 'call') should have its relocation
- * specially flagged for link-time replacement with a 'bal' or 'calls' if
- * appropriate.
- */
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, 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.
+
+ The 'COJ' instructions are actually COBR instructions with the 'b' in
+ the mnemonic replaced by a 'j'; they are ALWAYS "de-optimized" if necessary:
+ if the displacement will not fit in 13 bits, the assembler will replace them
+ with the corresponding compare and branch instructions.
+
+ All of the 'MEMn' instructions are the same format; the 'n' in the name
+ indicates the default index scale factor (the size of the datum operated on).
+
+ The FBRA formats are not actually an instruction format. They are the
+ "convenience directives" for branching on floating-point comparisons,
+ each of which generates 2 instructions (a 'bno' and one other branch).
+
+ The CALLJ format is not actually an instruction format. It indicates that
+ the instruction generated (a CTRL-format 'call') should have its relocation
+ specially flagged for link-time replacement with a 'bal' or 'calls' if
+ appropriate. */
#define CTRL 0
#define COBR 1
diff --git a/gnu/usr.bin/binutils/include/opcode/m68k.h b/gnu/usr.bin/binutils/include/opcode/m68k.h
index 3208b77f4f0..3371d38a7cd 100644
--- a/gnu/usr.bin/binutils/include/opcode/m68k.h
+++ b/gnu/usr.bin/binutils/include/opcode/m68k.h
@@ -1,5 +1,6 @@
/* Opcode table header for m680[01234]0/m6888[12]/m68851.
- Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 1999 Free Software Foundation.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001
+ Free Software Foundation, Inc.
This file is part of GDB, GAS, and the GNU binutils.
@@ -38,6 +39,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define mcf5200 0x200
#define mcf5206e 0x400
#define mcf5307 0x800
+#define mcf5407 0x1000
/* handy aliases */
#define m68040up (m68040 | m68060)
@@ -45,7 +47,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define m68020up (m68020 | m68030up)
#define m68010up (m68010 | cpu32 | m68020up)
#define m68000up (m68000 | m68010up)
-#define mcf (mcf5200 | mcf5206e | mcf5307)
+#define mcf (mcf5200 | mcf5206e | mcf5307 | mcf5407)
+#define mcf5307up (mcf5307 | mcf5407)
#define mfloat (m68881 | m68882 | m68040 | m68060)
#define mmmu (m68851 | m68030 | m68040 | m68060)
diff --git a/gnu/usr.bin/binutils/include/opcode/mips.h b/gnu/usr.bin/binutils/include/opcode/mips.h
index 68fe57a8aae..7fd4703e53c 100644
--- a/gnu/usr.bin/binutils/include/opcode/mips.h
+++ b/gnu/usr.bin/binutils/include/opcode/mips.h
@@ -1,5 +1,6 @@
/* mips.h. Mips opcode list for GDB, the GNU debugger.
- Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Ralph Campbell and OSF
Commented and modified by Ian Lance Taylor, Cygnus Support
@@ -30,9 +31,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
i = (i &~ (OP_MASK_X << OP_SH_X)) | (j << OP_SH_X)
Make sure you use fields that are appropriate for the instruction,
- of course.
+ of course.
- The 'i' format uses OP, RS, RT and IMMEDIATE.
+ The 'i' format uses OP, RS, RT and IMMEDIATE.
The 'j' format uses OP and TARGET.
@@ -48,9 +49,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
breakpoint instruction are not defined; Kane says the breakpoint
code field in BREAK is 20 bits; yet MIPS assemblers and debuggers
only use ten bits). An optional two-operand form of break/sdbbp
- allows the lower ten bits to be set too.
+ allows the lower ten bits to be set too, and MIPS32 and later
+ architectures allow 20 bits to be set with a signal operand
+ (using CODE20).
- The syscall instruction uses SYSCALL.
+ The syscall instruction uses CODE20.
The general coprocessor instructions use COPZ. */
@@ -82,8 +85,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define OP_SH_PREFX 11
#define OP_MASK_CCC 0x7
#define OP_SH_CCC 8
-#define OP_MASK_SYSCALL 0xfffff
-#define OP_SH_SYSCALL 6
+#define OP_MASK_CODE20 0xfffff /* 20 bit syscall/breakpoint code. */
+#define OP_SH_CODE20 6
#define OP_MASK_SHAMT 0x1f
#define OP_SH_SHAMT 6
#define OP_MASK_FD 0x1f
@@ -100,17 +103,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define OP_SH_FUNCT 0
#define OP_MASK_SPEC 0x3f
#define OP_SH_SPEC 0
-#define OP_SH_LOCC 8 /* FP condition code */
-#define OP_SH_HICC 18 /* FP condition code */
+#define OP_SH_LOCC 8 /* FP condition code. */
+#define OP_SH_HICC 18 /* FP condition code. */
#define OP_MASK_CC 0x7
-#define OP_SH_COP1NORM 25 /* Normal COP1 encoding */
-#define OP_MASK_COP1NORM 0x1 /* a single bit */
-#define OP_SH_COP1SPEC 21 /* COP1 encodings */
+#define OP_SH_COP1NORM 25 /* Normal COP1 encoding. */
+#define OP_MASK_COP1NORM 0x1 /* a single bit. */
+#define OP_SH_COP1SPEC 21 /* COP1 encodings. */
#define OP_MASK_COP1SPEC 0xf
#define OP_MASK_COP1SCLR 0x4
#define OP_MASK_COP1CMP 0x3
#define OP_SH_COP1CMP 4
-#define OP_SH_FORMAT 21 /* FP short format field */
+#define OP_SH_FORMAT 21 /* FP short format field. */
#define OP_MASK_FORMAT 0x7
#define OP_SH_TRUE 16
#define OP_MASK_TRUE 0x1
@@ -120,12 +123,16 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define OP_MASK_UNSIGNED 0x1
#define OP_SH_HINT 16
#define OP_MASK_HINT 0x1f
-#define OP_SH_MMI 0 /* Multimedia (parallel) op */
-#define OP_MASK_MMI 0x3f
+#define OP_SH_MMI 0 /* Multimedia (parallel) op. */
+#define OP_MASK_MMI 0x3f
#define OP_SH_MMISUB 6
#define OP_MASK_MMISUB 0x1f
-#define OP_MASK_PERFREG 0x1f /* Performance monitoring */
+#define OP_MASK_PERFREG 0x1f /* Performance monitoring. */
#define OP_SH_PERFREG 1
+#define OP_SH_SEL 0 /* Coprocessor select field. */
+#define OP_MASK_SEL 0x7 /* The sel field of mfcZ and mtcZ. */
+#define OP_SH_CODE19 6 /* 19 bit wait code. */
+#define OP_MASK_CODE19 0x7ffff
/* This structure holds information for a particular instruction. */
@@ -181,8 +188,11 @@ struct mips_opcode
"u" 16 bit upper 16 bits of address (OP_*_IMMEDIATE)
"v" 5 bit same register used as both source and destination (OP_*_RS)
"w" 5 bit same register used as both target and destination (OP_*_RT)
+ "U" 5 bit same destination register in both OP_*_RD and OP_*_RT
+ (used by clo and clz)
"C" 25 bit coprocessor function code (OP_*_COPZ)
- "B" 20 bit syscall function code (OP_*_SYSCALL)
+ "B" 20 bit syscall/breakpoint function code (OP_*_CODE20)
+ "J" 19 bit wait function code (OP_*_CODE19)
"x" accept and ignore register name
"z" must be zero register
@@ -200,6 +210,7 @@ struct mips_opcode
"E" 5 bit target register (OP_*_RT)
"G" 5 bit destination register (OP_*_RD)
"P" 5 bit performance-monitor register (OP_*_PERFREG)
+ "H" 3 bit sel field (OP_*_SEL)
Macro instructions:
"A" General 32 bit expression
@@ -215,7 +226,7 @@ struct mips_opcode
Characters used so far, for quick reference when adding more:
"<>(),"
- "ABCDEFGILMNSTRVW"
+ "ABCDEFGHIJLMNPRSTUVW"
"abcdfhijklopqrstuvwxz"
*/
@@ -291,281 +302,309 @@ struct mips_opcode
disassembler, and requires special treatment by the assembler. */
#define INSN_MACRO 0xffffffff
+/* Masks used to mark instructions to indicate which MIPS ISA level
+ they were introduced in. ISAs, as defined below, are logical
+ ORs of these bits, indicatingthat they support the instructions
+ defined at the given level. */
-
-
-
-/* MIPS ISA field--CPU level at which insn is supported. */
-#define INSN_ISA 0x0000000F
-/* An instruction which is not part of any basic MIPS ISA.
- (ie it is a chip specific instruction) */
-#define INSN_NO_ISA 0x00000000
-/* MIPS ISA 1 instruction. */
-#define INSN_ISA1 0x00000001
-/* MIPS ISA 2 instruction (R6000 or R4000). */
-#define INSN_ISA2 0x00000002
-/* MIPS ISA 3 instruction (R4000). */
-#define INSN_ISA3 0x00000003
-/* MIPS ISA 4 instruction (R8000). */
-#define INSN_ISA4 0x00000004
-#define INSN_ISA5 0x00000005
+#define INSN_ISA_MASK 0x0000ffff
+#define INSN_ISA1 0x00000010
+#define INSN_ISA2 0x00000020
+#define INSN_ISA3 0x00000040
+#define INSN_ISA4 0x00000080
+#define INSN_ISA5 0x00000100
+#define INSN_ISA32 0x00000200
+#define INSN_ISA64 0x00000400
/* Chip specific instructions. These are bitmasks. */
+
/* MIPS R4650 instruction. */
-#define INSN_4650 0x00000010
+#define INSN_4650 0x00010000
/* LSI R4010 instruction. */
-#define INSN_4010 0x00000020
-/* NEC VR4100 instruction. */
-#define INSN_4100 0x00000040
+#define INSN_4010 0x00020000
+/* NEC VR4100 instruction. */
+#define INSN_4100 0x00040000
/* Toshiba R3900 instruction. */
-#define INSN_3900 0x00000080
-
-/* 32-bit code running on a ISA3+ CPU. */
-#define INSN_GP32 0x00001000
+#define INSN_3900 0x00080000
+/* 32-bit code running on a ISA3+ CPU. */
+#define INSN_GP32 0x00100000
+
+/* MIPS ISA defines, use instead of hardcoding ISA level. */
+
+#define ISA_UNKNOWN 0 /* Gas internal use. */
+#define ISA_MIPS1 (INSN_ISA1)
+#define ISA_MIPS2 (ISA_MIPS1 | INSN_ISA2)
+#define ISA_MIPS3 (ISA_MIPS2 | INSN_ISA3)
+#define ISA_MIPS4 (ISA_MIPS3 | INSN_ISA4)
+#define ISA_MIPS5 (ISA_MIPS4 | INSN_ISA5)
+#define ISA_MIPS32 (ISA_MIPS2 | INSN_ISA32)
+#define ISA_MIPS64 (ISA_MIPS5 | INSN_ISA32 | INSN_ISA64)
+
+/* CPU defines, use instead of hardcoding processor number. Keep this
+ in sync with bfd/archures.c in order for machine selection to work. */
+#define CPU_UNKNOWN 0 /* Gas internal use. */
+#define CPU_R2000 2000
+#define CPU_R3000 3000
+#define CPU_R3900 3900
+#define CPU_R4000 4000
+#define CPU_R4010 4010
+#define CPU_VR4100 4100
+#define CPU_R4111 4111
+#define CPU_R4300 4300
+#define CPU_R4400 4400
+#define CPU_R4600 4600
+#define CPU_R4650 4650
+#define CPU_R5000 5000
+#define CPU_R6000 6000
+#define CPU_R8000 8000
+#define CPU_R10000 10000
+#define CPU_R12000 12000
+#define CPU_MIPS16 16
+#define CPU_MIPS32 32
+#define CPU_MIPS32_4K 3204113 /* 32, 04, octal 'K'. */
+#define CPU_MIPS5 5
+#define CPU_MIPS64 64
+#define CPU_SB1 12310201 /* octal 'SB', 01. */
/* Test for membership in an ISA including chip specific ISAs.
INSN is pointer to an element of the opcode table; ISA is the
specified ISA to test against; and CPU is the CPU specific ISA
- to test, or zero if no CPU specific ISA test is desired.
+ to test, or zero if no CPU specific ISA test is desired.
The gp32 arg is set when you need to force 32-bit register usage on
a machine with 64-bit registers; see the documentation under -mgp32
- in the MIPS gas docs. */
-
-#define OPCODE_IS_MEMBER(insn,isa,cpu,gp32) \
- ((((insn)->membership & INSN_ISA) != 0 \
- && ((insn)->membership & INSN_ISA) <= isa \
- && ((insn)->membership & INSN_GP32 ? gp32 : 1)) \
- || (cpu == 4650 \
- && ((insn)->membership & INSN_4650) != 0) \
- || (cpu == 4010 \
- && ((insn)->membership & INSN_4010) != 0) \
- || ((cpu == 4100 \
- || cpu == 4111 \
- ) \
- && ((insn)->membership & INSN_4100) != 0) \
- || (cpu == 3900 \
- && ((insn)->membership & INSN_3900) != 0))
+ in the MIPS gas docs. */
+
+#define OPCODE_IS_MEMBER(insn, isa, cpu, gp32) \
+ ((((insn)->membership & isa) != 0 \
+ && ((insn)->membership & INSN_GP32 ? gp32 : 1) \
+ ) \
+ || (cpu == CPU_R4650 && ((insn)->membership & INSN_4650) != 0) \
+ || (cpu == CPU_R4010 && ((insn)->membership & INSN_4010) != 0) \
+ || ((cpu == CPU_VR4100 || cpu == CPU_R4111) \
+ && ((insn)->membership & INSN_4100) != 0) \
+ || (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0))
/* This is a list of macro expanded instructions.
- *
- * _I appended means immediate
- * _A appended means address
- * _AB appended means address with base register
- * _D appended means 64 bit floating point constant
- * _S appended means 32 bit floating point constant
- */
-enum {
- M_ABS,
- M_ADD_I,
- M_ADDU_I,
- M_AND_I,
- M_BEQ,
- M_BEQ_I,
- M_BEQL_I,
- M_BGE,
- M_BGEL,
- M_BGE_I,
- M_BGEL_I,
- M_BGEU,
- M_BGEUL,
- M_BGEU_I,
- M_BGEUL_I,
- M_BGT,
- M_BGTL,
- M_BGT_I,
- M_BGTL_I,
- M_BGTU,
- M_BGTUL,
- M_BGTU_I,
- M_BGTUL_I,
- M_BLE,
- M_BLEL,
- M_BLE_I,
- M_BLEL_I,
- M_BLEU,
- M_BLEUL,
- M_BLEU_I,
- M_BLEUL_I,
- M_BLT,
- M_BLTL,
- M_BLT_I,
- M_BLTL_I,
- M_BLTU,
- M_BLTUL,
- M_BLTU_I,
- M_BLTUL_I,
- M_BNE,
- M_BNE_I,
- M_BNEL_I,
- M_DABS,
- M_DADD_I,
- M_DADDU_I,
- M_DDIV_3,
- M_DDIV_3I,
- M_DDIVU_3,
- M_DDIVU_3I,
- M_DIV_3,
- M_DIV_3I,
- M_DIVU_3,
- M_DIVU_3I,
- M_DLA_AB,
- M_DLI,
- M_DMUL,
- M_DMUL_I,
- M_DMULO,
- M_DMULO_I,
- M_DMULOU,
- M_DMULOU_I,
- M_DREM_3,
- M_DREM_3I,
- M_DREMU_3,
- M_DREMU_3I,
- M_DSUB_I,
- M_DSUBU_I,
- M_DSUBU_I_2,
- M_J_A,
- M_JAL_1,
- M_JAL_2,
- M_JAL_A,
- M_L_DOB,
- M_L_DAB,
- M_LA_AB,
- M_LB_A,
- M_LB_AB,
- M_LBU_A,
- M_LBU_AB,
- M_LD_A,
- M_LD_OB,
- M_LD_AB,
- M_LDC1_AB,
- M_LDC2_AB,
- M_LDC3_AB,
- M_LDL_AB,
- M_LDR_AB,
- M_LH_A,
- M_LH_AB,
- M_LHU_A,
- M_LHU_AB,
- M_LI,
- M_LI_D,
- M_LI_DD,
- M_LI_S,
- M_LI_SS,
- M_LL_AB,
- M_LLD_AB,
- M_LS_A,
- M_LW_A,
- M_LW_AB,
- M_LWC0_A,
- M_LWC0_AB,
- M_LWC1_A,
- M_LWC1_AB,
- M_LWC2_A,
- M_LWC2_AB,
- M_LWC3_A,
- M_LWC3_AB,
- M_LWL_A,
- M_LWL_AB,
- M_LWR_A,
- M_LWR_AB,
- M_LWU_AB,
- M_MUL,
- M_MUL_I,
- M_MULO,
- M_MULO_I,
- M_MULOU,
- M_MULOU_I,
- M_NOR_I,
- M_OR_I,
- M_REM_3,
- M_REM_3I,
- M_REMU_3,
- M_REMU_3I,
- M_ROL,
- M_ROL_I,
- M_ROR,
- M_ROR_I,
- M_S_DA,
- M_S_DOB,
- M_S_DAB,
- M_S_S,
- M_SC_AB,
- M_SCD_AB,
- M_SD_A,
- M_SD_OB,
- M_SD_AB,
- M_SDC1_AB,
- M_SDC2_AB,
- M_SDC3_AB,
- M_SDL_AB,
- M_SDR_AB,
- M_SEQ,
- M_SEQ_I,
- M_SGE,
- M_SGE_I,
- M_SGEU,
- M_SGEU_I,
- M_SGT,
- M_SGT_I,
- M_SGTU,
- M_SGTU_I,
- M_SLE,
- M_SLE_I,
- M_SLEU,
- M_SLEU_I,
- M_SLT_I,
- M_SLTU_I,
- M_SNE,
- M_SNE_I,
- M_SB_A,
- M_SB_AB,
- M_SH_A,
- M_SH_AB,
- M_SW_A,
- M_SW_AB,
- M_SWC0_A,
- M_SWC0_AB,
- M_SWC1_A,
- M_SWC1_AB,
- M_SWC2_A,
- M_SWC2_AB,
- M_SWC3_A,
- M_SWC3_AB,
- M_SWL_A,
- M_SWL_AB,
- M_SWR_A,
- M_SWR_AB,
- M_SUB_I,
- M_SUBU_I,
- M_SUBU_I_2,
- M_TEQ_I,
- M_TGE_I,
- M_TGEU_I,
- M_TLT_I,
- M_TLTU_I,
- M_TNE_I,
- M_TRUNCWD,
- M_TRUNCWS,
- M_ULD,
- M_ULD_A,
- M_ULH,
- M_ULH_A,
- M_ULHU,
- M_ULHU_A,
- M_ULW,
- M_ULW_A,
- M_USH,
- M_USH_A,
- M_USW,
- M_USW_A,
- M_USD,
- M_USD_A,
- M_XOR_I,
- M_COP0,
- M_COP1,
- M_COP2,
- M_COP3,
- M_NUM_MACROS
+
+ _I appended means immediate
+ _A appended means address
+ _AB appended means address with base register
+ _D appended means 64 bit floating point constant
+ _S appended means 32 bit floating point constant. */
+
+enum
+{
+ M_ABS,
+ M_ADD_I,
+ M_ADDU_I,
+ M_AND_I,
+ M_BEQ,
+ M_BEQ_I,
+ M_BEQL_I,
+ M_BGE,
+ M_BGEL,
+ M_BGE_I,
+ M_BGEL_I,
+ M_BGEU,
+ M_BGEUL,
+ M_BGEU_I,
+ M_BGEUL_I,
+ M_BGT,
+ M_BGTL,
+ M_BGT_I,
+ M_BGTL_I,
+ M_BGTU,
+ M_BGTUL,
+ M_BGTU_I,
+ M_BGTUL_I,
+ M_BLE,
+ M_BLEL,
+ M_BLE_I,
+ M_BLEL_I,
+ M_BLEU,
+ M_BLEUL,
+ M_BLEU_I,
+ M_BLEUL_I,
+ M_BLT,
+ M_BLTL,
+ M_BLT_I,
+ M_BLTL_I,
+ M_BLTU,
+ M_BLTUL,
+ M_BLTU_I,
+ M_BLTUL_I,
+ M_BNE,
+ M_BNE_I,
+ M_BNEL_I,
+ M_DABS,
+ M_DADD_I,
+ M_DADDU_I,
+ M_DDIV_3,
+ M_DDIV_3I,
+ M_DDIVU_3,
+ M_DDIVU_3I,
+ M_DIV_3,
+ M_DIV_3I,
+ M_DIVU_3,
+ M_DIVU_3I,
+ M_DLA_AB,
+ M_DLI,
+ M_DMUL,
+ M_DMUL_I,
+ M_DMULO,
+ M_DMULO_I,
+ M_DMULOU,
+ M_DMULOU_I,
+ M_DREM_3,
+ M_DREM_3I,
+ M_DREMU_3,
+ M_DREMU_3I,
+ M_DSUB_I,
+ M_DSUBU_I,
+ M_DSUBU_I_2,
+ M_J_A,
+ M_JAL_1,
+ M_JAL_2,
+ M_JAL_A,
+ M_L_DOB,
+ M_L_DAB,
+ M_LA_AB,
+ M_LB_A,
+ M_LB_AB,
+ M_LBU_A,
+ M_LBU_AB,
+ M_LD_A,
+ M_LD_OB,
+ M_LD_AB,
+ M_LDC1_AB,
+ M_LDC2_AB,
+ M_LDC3_AB,
+ M_LDL_AB,
+ M_LDR_AB,
+ M_LH_A,
+ M_LH_AB,
+ M_LHU_A,
+ M_LHU_AB,
+ M_LI,
+ M_LI_D,
+ M_LI_DD,
+ M_LI_S,
+ M_LI_SS,
+ M_LL_AB,
+ M_LLD_AB,
+ M_LS_A,
+ M_LW_A,
+ M_LW_AB,
+ M_LWC0_A,
+ M_LWC0_AB,
+ M_LWC1_A,
+ M_LWC1_AB,
+ M_LWC2_A,
+ M_LWC2_AB,
+ M_LWC3_A,
+ M_LWC3_AB,
+ M_LWL_A,
+ M_LWL_AB,
+ M_LWR_A,
+ M_LWR_AB,
+ M_LWU_AB,
+ M_MUL,
+ M_MUL_I,
+ M_MULO,
+ M_MULO_I,
+ M_MULOU,
+ M_MULOU_I,
+ M_NOR_I,
+ M_OR_I,
+ M_REM_3,
+ M_REM_3I,
+ M_REMU_3,
+ M_REMU_3I,
+ M_ROL,
+ M_ROL_I,
+ M_ROR,
+ M_ROR_I,
+ M_S_DA,
+ M_S_DOB,
+ M_S_DAB,
+ M_S_S,
+ M_SC_AB,
+ M_SCD_AB,
+ M_SD_A,
+ M_SD_OB,
+ M_SD_AB,
+ M_SDC1_AB,
+ M_SDC2_AB,
+ M_SDC3_AB,
+ M_SDL_AB,
+ M_SDR_AB,
+ M_SEQ,
+ M_SEQ_I,
+ M_SGE,
+ M_SGE_I,
+ M_SGEU,
+ M_SGEU_I,
+ M_SGT,
+ M_SGT_I,
+ M_SGTU,
+ M_SGTU_I,
+ M_SLE,
+ M_SLE_I,
+ M_SLEU,
+ M_SLEU_I,
+ M_SLT_I,
+ M_SLTU_I,
+ M_SNE,
+ M_SNE_I,
+ M_SB_A,
+ M_SB_AB,
+ M_SH_A,
+ M_SH_AB,
+ M_SW_A,
+ M_SW_AB,
+ M_SWC0_A,
+ M_SWC0_AB,
+ M_SWC1_A,
+ M_SWC1_AB,
+ M_SWC2_A,
+ M_SWC2_AB,
+ M_SWC3_A,
+ M_SWC3_AB,
+ M_SWL_A,
+ M_SWL_AB,
+ M_SWR_A,
+ M_SWR_AB,
+ M_SUB_I,
+ M_SUBU_I,
+ M_SUBU_I_2,
+ M_TEQ_I,
+ M_TGE_I,
+ M_TGEU_I,
+ M_TLT_I,
+ M_TLTU_I,
+ M_TNE_I,
+ M_TRUNCWD,
+ M_TRUNCWS,
+ M_ULD,
+ M_ULD_A,
+ M_ULH,
+ M_ULH_A,
+ M_ULHU,
+ M_ULHU_A,
+ M_ULW,
+ M_ULW_A,
+ M_USH,
+ M_USH_A,
+ M_USW,
+ M_USW_A,
+ M_USD,
+ M_USD_A,
+ M_XOR_I,
+ M_COP0,
+ M_COP1,
+ M_COP2,
+ M_COP3,
+ M_NUM_MACROS
};
diff --git a/gnu/usr.bin/binutils/include/opcode/mn10300.h b/gnu/usr.bin/binutils/include/opcode/mn10300.h
index 12f03670f6d..0de7f451a4d 100644
--- a/gnu/usr.bin/binutils/include/opcode/mn10300.h
+++ b/gnu/usr.bin/binutils/include/opcode/mn10300.h
@@ -1,5 +1,5 @@
/* mn10300.h -- Header file for Matsushita 10300 opcode table
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Jeff Law, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
diff --git a/gnu/usr.bin/binutils/include/opcode/ppc.h b/gnu/usr.bin/binutils/include/opcode/ppc.h
index 974f0dfa569..d23e1c695e9 100644
--- a/gnu/usr.bin/binutils/include/opcode/ppc.h
+++ b/gnu/usr.bin/binutils/include/opcode/ppc.h
@@ -1,5 +1,5 @@
/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -88,6 +88,9 @@ extern const int powerpc_num_opcodes;
/* Opcode is supported as part of the 64-bit bridge. */
#define PPC_OPCODE_64_BRIDGE (0400)
+/* Opcode is supported by Altivec Vector Unit */
+#define PPC_OPCODE_ALTIVEC (01000)
+
/* A macro to extract the major opcode from an instruction. */
#define PPC_OP(i) (((i) >> 26) & 0x3f)
@@ -221,6 +224,11 @@ extern const struct powerpc_operand powerpc_operands[];
number is allowed). This flag will only be set for a signed
operand. */
#define PPC_OPERAND_NEGATIVE (04000)
+
+/* This operand names a vector unit register. The disassembler
+ prints these with a leading 'v'. */
+#define PPC_OPERAND_VR (010000)
+
/* The POWER and PowerPC assemblers use a few macros. We keep them
with the operands table for simplicity. The macro table is an
diff --git a/gnu/usr.bin/binutils/include/opcode/sparc.h b/gnu/usr.bin/binutils/include/opcode/sparc.h
index 4f159bd896f..5b6b5d14932 100644
--- a/gnu/usr.bin/binutils/include/opcode/sparc.h
+++ b/gnu/usr.bin/binutils/include/opcode/sparc.h
@@ -1,5 +1,5 @@
/* Definitions for opcode table for the sparc.
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 1997
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
@@ -46,6 +46,7 @@ enum sparc_opcode_arch_val {
/* 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 */
};
@@ -141,6 +142,7 @@ Kinds of operands:
h 22 high bits.
X 5 bit unsigned immediate
Y 6 bit unsigned immediate
+ 3 SIAM mode (3 bits). (v9b)
K MEMBAR mask (7 bits). (v9)
j 10 bit Immediate. (v9)
I 11 bit Immediate. (v9)
@@ -187,7 +189,7 @@ Kinds of operands:
/ Ancillary state register in rs1 (v9a)
The following chars are unused: (note: ,[] are used as punctuation)
-[345]
+[45]
*/
diff --git a/gnu/usr.bin/binutils/ld/ChangeLog b/gnu/usr.bin/binutils/ld/ChangeLog
index 39a6b79e377..9f69d0e8f7d 100644
--- a/gnu/usr.bin/binutils/ld/ChangeLog
+++ b/gnu/usr.bin/binutils/ld/ChangeLog
@@ -1,10116 +1,1843 @@
-2000-11-06 Alan Modra <alan@linuxcare.com.au>
+2001-06-07 Andreas Jaeger <aj@suse.de>
- Merge most place_orphan changes from mainline.
- 2000-09-07 Alan Modra <alan@linuxcare.com.au>
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
- broken list handling. Create __start_SECNAME and __stop_SECNAME
- when no place-holder. Add some comments. Test both SEC_CODE and
- SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
- Handle case where no output section statement created.
-
- 2000-09-06 Alan Modra <alan@linuxcare.com.au>
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
- try shuffling sections when the orphan happens to be the place
- holder. Keep count of unique section names generated so we speed
- the search for a new name.
-
- 2000-04-25 Alan Modra <alan@linuxcare.com.au>
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
- (output_rel_find): New function.
- (hold_section, hold_use): Delete.
- (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
- hold_interp): Make local to place_orphan.
- (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
- rather than place_section to find possible previous use of orphan.
- Similarly find the place-holder output sections. Use returned
- value from lang_enter_output_section_statement rather than calling
- lang_output_section_statement_lookup.
- * ldlang.c (lang_enter_output_section_statement): Return output
- section statement.
- * ldlang.h (lang_enter_output_section_statement): Change
- declaration too.
- * ldlang.h (lang_output_section_statement): Export it.
- * ldlang.c (lang_output_section_statement): Ditto.
-
- 2000-04-18 H.J. Lu <hjl@gnu.org>
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
- lang_leave_output_section_statement () after calling
- lang_enter_output_section_statement ().
-
- 2000-04-18 Alan Modra <alan@linuxcare.com.au>
- * emultempl/elf32.em (struct orphan_save): Add section field.
- (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
- better order, and place first orphan section as we did before the
- 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
- Don't call make_bfd_section here, let wild_doit do the job for us.
- Don't build a statement list when we'll only throw it away.
-
- 2000-04-14 Alan Modra <alan@linuxcare.com.au>
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
- ~SEC_ALLOC sections too. Init start address of debug sections.
-
- 2000-04-12 Alan Modra <alan@linuxcare.com.au>
- * emultempl/elf32.em (struct orphan_save): New.
- (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
- hold_interp): Make them struct orphan_save.
- (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
- (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
- the end of the relevant section list. Also add associated section
- statements to the end of any previous orphan statements.
+ * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
+ (TEXT_START_ADDR): Likewise.
-2000-11-05 Alan Modra <alan@linuxcare.com.au>
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
- * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
- yy_is_interactive, yy_at_bol, and yy_fill_buffer.
- * ldlex.c: Regenerate.
+ Merge from mainline.
+ 2001-06-05 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
+ * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
- * Makefile.am (DISTCLEANFILES): Add stringify.sed.
- * Makefile.in: Regenerate.
+ 2001-05-25 Alan Modra <amodra@one.net.au>
+ * configure.host: Replace linuxoldld with linux*oldld.
+ * configure.tgt: Likewise.
-2000-10-16 Philip Blundell <pb@futuretv.com>
+ 2001-05-14 DJ Delorie <dj@delorie.com>
+ * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
+ * Makefile.in: Ditto.
- * configure.in: Set version number to 2.10.1.
+ 2001-04-05 Steven J. Hill <sjhill@cotw.com>
+ * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
+ (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
+ (eelf32ltsmip.c): New target.
+ (eelf64btsmip.c): Likewise.
+ (eelf64ltsmip.c): Likewise.
+ * Makefile.in: Regenerated.
+ * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
+ target.
+ (mips*-*-linux-gnu*): Likewise.
+ * emulparams/elf32ltsmip.sh: New. Traditional little endian
+ MIPS taget.
+ * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
+ target.
+ * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
+ endian target.
+
+ 2001-02-27 Alan Modra <alan@linuxcare.com.au>
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
* configure: Regenerate.
-2000-10-12 Peter Jeremy <peter.jeremy@alcatel.com.au>
-
- From 2000-08-08 Peter Jeremy <peter.jeremy@alcatel.com.au>
- * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
- in error message.
-
-2000-04-14 Matthew Green <mrg@cygnus.com>
-
- * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
-
-2000-06-07 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
- input objects to be ECOFF.
- (check_sections): einfo takes %B, not %P, to print a BFD name.
-
-2000-07-31 Rodney Brown <RodneyBrown@pmsc.com>
-
- * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
- (i586-sco-sysv5uw7.1.0).
-
-2000-06-18 Alan Modra <alan@linuxcare.com.au>
-
- * NEWS: Update list of targets supporting --gc-sections.
-
- * scripttempl/elf.sc: KEEP .eh_frame contents.
- * scripttempl/elfd30v.sc: Same here.
-
-2000-05-22 David O'Brien <obrien@FreeBSD.org>
-
- * configure.tgt: Recognize alpha-*-freebsd*.
+ 2001-02-13 H.J. Lu <hjl@gnu.org>
+ * ldexp.h (node_type): Add etree_provided.
+ * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
+ type to etree_provided if defined by PROVIDE. Allow updating
+ for etree_provided.
+ (exp_print_tree): Handle etree_provided.
+ * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
+ etree_provided.
-2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
+2001-06-10 Philip Blundell <philb@gnu.org>
- * ldmain.c: Include filenames.h.
- (set_scripts_dir): Support backslashes in program name.
-
-2000-05-23 Philip Blundell <pb@futuretv.com>
-
- * configure.in: Set version to 2.10.
+ * configure.in: Set version to 2.11.1.
* configure: Regenerate.
-2000-05-15 David O'Brien <obrien@FreeBSD.org>
+2001-06-08 Alan Modra <amodra@bigpond.net.au>
- * lexsup.c (parse_args): Update the year in the copyright notice.
+ * ldlang.c (record_bfd_errors): Remove.
-2000-05-13 Philip Blundell <pb@futuretv.com>
+ Merge from mainline.
+ 2001-05-31 H.J. Lu <hjl@gnu.org>
+ * ldlang.c (open_input_bfds): Don't change the bfd error
+ handler whilst loading symbols.
- From Joel Sherrill <joel@OARcorp.com>:
- * configure.tgt (sparc-*-rtemsaout*, sparc-*-rtemself*): New.
- (sparc-*-rtems*): Use ELF.
- (i960-*-rtemself*, i960-*-rtemscoff*): New.
- (i[3456]86-*-rtemscoff*): New.
- (i[3456]86-*-rtems*): Use ELF.
- (sh-*-rtemscoff*): New.
- (m68*-*-rtemscoff*, m68*-*-rtemself): New.
- (m68*-*-rtems*): Use ELF.
+ 2001-05-02 Nick Clifton <nickc@redhat.com>
+ * emultempl/aix.em: Replace buystring with xstrdup.
+ * emultempl/beos.em: Replace buystring with xstrdup.
-2000-05-03 Alan Modra <alan@linuxcare.com.au>
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
- From Ulf Carlsson <ulfc@engr.sgi.com> and Andreas Jaeger <aj@suse.de>
- * lexsup.c (set_section_start): Use bfd_scan_vma rather than
- strtoul.
-
-2000-04-29 Andreas Jaeger <aj@suse.de>
-
- * ld.h: Correctly check GCC version.
-
-2000-04-21 Richard Henderson <rth@cygnus.com>
-
- * scripttempl/elfd30v.sc: Place .gcc_except_table.
-
-2000-04-19 Alan Modra <alan@linuxcare.com.au>
-
- * ld.texinfo (Simple Example): Remove extraneous paragraph.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * po/ld.pot: Regenerate.
-
- * lexsup.c (help): Restore translated part of bug string.
-
- * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
- (DEP): Quote when passing vars to sub-make. Add warning message
- to end.
- (DEP1): Rewrite for "gcc -MM".
- (CLEANFILES): Add DEP2.
- Update dependencies.
- * Makefile.in: Regenerate.
-
-2000-04-03 Alan Modra <alan@linuxcare.com.au>
-
- * ld.h: #include "bin-bugs.h"
- * lexsup.c (help): Use REPORT_BUGS_TO.
+ * Many files: Update copyright notices.
-2000-03-27 Denis Chertykov <denisc@overta.ru>
+2001-05-23 Alan Modra <amodra@one.net.au>
- * configure.tgt (avr-*-*): New target support.
- * Makefile.am: Likewise.
- * scripttempl/elf32avr.sc: New script file.
- * emulparams/avr1200.sh: New file.
- * emulparams/avr23xx.sh: New file.
- * emulparams/avr4433.sh New file.
- * emulparams/avr44x4.sh New file.
- * emulparams/avr85xx.sh New file.
- * emulparams/avrmega103.sh New file.
- * emulparams/avrmega161.sh New file.
- * emulparams/avrmega603.sh New file.
- * Makefile.in: Regenerate.
+ * ldlang.c (wild_doit): Use linker_has_input to reliably determine
+ whether an input section is the first one assigned to an output
+ section.
+ Assorted formatting fixes.
+
+ Merge from mainline.
+ 2001-05-03 H.J. Lu <hjl@gnu.org>
+ * emultempl/elf32.em: Include "libiberty.h".
+ (gld${EMULATION_NAME}_vercheck): Call basename () to get the
+ basename of the bfd filename.
+ (gld${EMULATION_NAME}_stat_needed): Likewise.
+ (gld${EMULATION_NAME}_try_needed): Likewise.
+ (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
-2000-03-09 Andreas Jaeger <aj@suse.de>
+ 2001-03-17 Ulrich Drepper <drepper@redhat.com>
+ * emultmpl/elf32.em (OPTION_GROUP): New macro.
+ Add new option Bgroup to longopts.
+ (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
+ (gld*_list_options): Add -Bgroup and -z defs.
+ * ld.1: Document -Bgroup and -z defs.
+ * ld.texinfo: Likewise.
- * Makefile.am (check-DEJAGNU): Also unset LANG.
- * Makefile.in: Rebuild.
+ 2001-02-01 Nick Clifton <nickc@redhat.com>
+ * ld.1: Replace occurances of -oformat with --oformat.
-2000-03-06 Ian Lance Taylor <ian@zembu.com>
+ 2001-05-02 H.J. Lu <hjl@gnu.org>
+ * ldfile.c: Include "libiberty.h".
+ * ldlex.l: Likewise.
+ * ldmisc.c (buystring): Removed.
+ * ldmisc.h: Likewise.
+ * ldfile.c: Replace buystring with xstrdup.
+ * ldlang.c: Likewise.
+ * ldlex.l: Likewise.
+ * ldmain.c: Likewise.
+ * ldmisc.c: Likewise.
+ * lexsup.c: Likewise.
+ * mpw-eppcmac.c: Likewise.
- * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
- archive.
+ 2001-04-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
+ * ldlang.c (load_symbols): Give emulation a chance
+ to process unrecognized file before fatal error is
+ reported, not after.
-2000-03-02 H.J. Lu <hjl@gnu.org>
+ 2001-02-26 H.J. Lu <hjl@gnu.org>
+ * ldlang.c (open_input_bfds): Set the bfd error handler so
+ that problems can be caught whilst loading symbols.
+ (record_bfd_errors): New function: Report BFD errors and mark
+ the executable output as being invalid.
- * emulparams/elf32mcore.sh: Include "getopt.h".
+2001-04-02 Alan Modra <alan@linuxcare.com.au>
-2000-03-01 Ian Lance Taylor <ian@zembu.com>
+ * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
+ (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
- * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
+2001-03-27 Hans-Peter Nilsson <hp@axis.com>
-2000-03-01 H.J. Lu <hjl@gnu.org>
+ * configure.tgt (cris-*-*): Change default emulation to criself.
+ (cris-*-*aout*): New rule.
- * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
- * emulparams/shpe.sh: Likewise.
+2001-03-27 Matthew Wilcox <willy@ldl.fc.hp.com>
-2000-03-01 Nick Clifton <nickc@cygnus.com>
+ * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
+ (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
- * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
- to unused parameters.
-
- * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
- functions only used by DLL code.
- (_place_orphan): Initialise 'dollar'.
+2001-03-17 Ulrich Drepper <drepper@redhat.com>
-2000-03-01 H.J. Lu <hjl@gnu.org>
+ * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
+ is an absolute path look only for this file and not along the path.
- * ldmain.c (undefined_symbol): Take one more arg, fatal, to
- indicate if the undefined symbol is a fatal error or not.
- Don't delete the output file if "fatal" is false.
-
-2000-02-29 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
- Set LC_COLLATE and LC_ALL to null and export them. It is for
- sort which expects the C locale.
- Add $(LIBS) to all $(HOSTING_LIBS).
- * Makefile.in: Rebuild.
-
-2000-02-29 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
- beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
- linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
- (ld_emulation_xfer_struct): Add missing NULL initialiser for
- find_potential_libraries.
+2001-03-16 Philip Blundell <philb@gnu.org>
-2000-02-28 Jim Blandy <jimb@redhat.com>
+ * configure: Regenerate.
- * ldgram.y (exclude_name_list): Don't require a comma to separate
- list entries; the lexer considers commas to be valid part of a
- filename, so in something like `foo, bar' the comma is considered
- part of the first filename, `foo,'.
- * ld.texinfo: Update section on EXCLUDE_FILE lists.
+2001-03-11 Philip Blundell <philb@gnu.org>
-2000-02-27 Loren J. Rittle <ljrittle@acm.org>
+ * configure.in: Set version to 2.11.
- * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
- host "i[3456]86-*-freebsdelf*".
+2001-03-05 Alan Modra <alan@linuxcare.com.au>
-2000-02-27 Mark Elbrecht <snowball3@bigfoot.com>
+ * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
+ after_allocation_default, not gld..._before_allocation.
- * scripttempl/i386go32.sc: Move misplaced semicolons.
+001-02-18 David O'Brien <obrien@FreeBSD.org>
-2000-02-25 Ian Lance Taylor <ian@zembu.com>
+ * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
+ FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
- * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
- (ALL_64_EMULATIONS): Remove eelf64hppa.o.
- (eelf64hppa.c, ehppaelf.c): Remove targets.
- * Makefile.in: Rebuild.
+2001-02-17 David O'Brien <obrien@FreeBSD.org>
-2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+ * configure.host: Add a generic FreeBSD configuration entry such that
+ all [modern] FreeBSD systems on all platforms will look the same.
- * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
- GNU/Linux/sparc, but keep the default as 32.
+2001-02-13 Richard Henderson <rth@redhat.com>
- * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
- it default if sparcv9 or sparc64.
+ * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
-2000-02-24 Nick Clifton <nickc@cygnus.com>
+2001-02-11 Philip Blundell <philb@gnu.org>
- * Makefile.am: Add rules to build emipspe.o and earmpe.o.
+ * Makefile.am: Remove mention of earmelf_linux26.o.
* Makefile.in: Regenerate.
- * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
-
- * ldemul.h (ld_emulation_xfer_struct): Add new field:
- find_potential_libraries.
- * ldemul.c (ldemul_find_potential_libraries): New function.
-
- * ldfile.c (ldfile_open_file_search): Allow function to be
- exported.
- (ldfile_open_file): Call ldemul_find_potential_libraries.
- * ldfile.h: Add prototype for ldfile_open_file_search.
+ * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
+ * emulparams/armelf_linux26.sh: Delete.
+ * configure.tgt: Remove mention of armelf_linux26 emulation.
- * pe-dll.c: Add support for ARM, MIPS and SH targets.
+2001-02-09 David Mosberger <davidm@hpl.hp.com>
- * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
- * emulparams/shpe.sh: New file. Parameters for sh-pe target.
+ * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
+ .IA_64.unwind.* pattern to unwind table section and
+ .IA_64.unwind_info* pattern to unwind info section.
- * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
- (gld_X_find_potential_libraries): New function. Search for
- libraries called "*.lib".
+2001-01-25 Jim Driftmyer <jdrift@stny.rr.com>
- * scriptempl/pe.sc: Add .pdata section.
+ * ldlang.c (lang_leave_overlay): Don't set lma_region when
+ load_base is specified.
-2000-02-23 Richard Henderson <rth@cygnus.com>
+2001-01-24 Hans-Peter Nilsson <hp@axis.com>
- * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
- Add and use memory regions.
+ * emultempl/elf32.em: Correct spelling in comments and listed
+ options.
-2000-02-23 Linas Vepstas (linas@linas.org)
+2001-01-23 Alan Modra <alan@linuxcare.com.au>
- * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
+ * ldlang.c (lang_leave_overlay): Only set lma_region from the
+ default for the first section of a group of overlay sections.
- * Makefile.am: Add support for Linux/IBM 370.
- * configure.tgt: Likewise.
+2001-01-22 Alan Modra <alan@linuxcare.com.au>
+ * Makefile.am (GENSCRIPTS): Pass exec_prefix.
* Makefile.in: Regenerate.
+ * genscripts.sh: Use exec_prefix parameter to specify tool lib.
+ Check for null tool_dir.
-2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * ldlang.c (print_input_section, print_data_statement,
- print_reloc_statement, print_padding_statement, insert_pad,
- size_input_section, lang_check_section_addresses,
- lang_size_sections, lang_do_assignments, lang_set_startof,
- lang_one_common): Change `opb' to unsigned.
- (lang_do_assignments): Also change `size' to unsigned.
-
-2000-02-16 Richard Henderson <rth@cygnus.com>
-
- * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
+2001-01-16 Jim Wilson <wilson@redhat.com>
-2000-02-16 Timothy Wall <twall@cygnus.com>
+ * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
+ and IA_64.unwind.info.
- * mri.c (mri_draw_tree): Add default LMA region argument to call
- to lang_leave_output_section_statement.
- * ldlang.h: Update prototypes with LMA region arguments.
- * ldlang.c (lang_size_sections): Encapsulate region bounds
- checking in os_check_region call.
- (os_check_region): New function.
- (lang_output_section_statement_lookup): Initialize lma_region.
- (lang_leave_output_section_statement): Add LMA region argument.
- (lang_leave_overlay): Ditto.
- * ldgram.y: Handle LMA region syntax.
- * ld.texinfo (Output Section Description): Describe LMA region usage.
- * emultempl/armelf.em (gld$place_orphan): Add default value for
- lma region in call to lang_leave_output_statement.
- * emultempl/elf32.em (gld$place_orphan): Add default value for
- lma region in call to lang_leave_output_statement.
- * emultempl/pe.em (gld$place_orphan): Add default value for
- lma region in call to lang_leave_output_statement.
-
-
-2000-02-04 Timothy Wall <twall@redhat.com>
+2001-01-16 H.J. Lu <hjl@gnu.org>
- * ldlang.c (lang_check_section_addresses): Use bytes instead of
- octets when calculating section end addresses.
+ * ldlang.c (lang_check): Merge the private data only if the
+ input file has contents.
-2000-02-04 Timothy Wall <twall@redhat.com>
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
- * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
+ * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
-2000-02-03 Timothy Wall <twall@redhat.com>
+ * emultempl/hppaelf.em (hppaelf_after_parse): New function,
+ enabling search for libmilli. On a relocatable link, make .text
+ sections unique.
+ (LDEMUL_AFTER_PARSE): Define.
+ (hppaelf_finish): Correct spelling of relocatable in comments.
- * ld/ldexp.c (fold_name): Make SIZEOF operator return byte count, not
- octet count.
- * ld/ldlang.c (print_input_section, print_data_statement,
- print_reloc_statement, print_padding_statement): Print target
- address values and section sizes as bytes, not octets.
- (insert_pad) Calculate padding size in octets, and adjust "dot"
- by bytes.
- (size_input_section) Always adjust "dot" by bytes, not octets.
- (lang_check_section_addresses, lang_do_assignments) Adjust
- "dot" by bytes, not octets. Use the larger of the directive size
- or octets_per_byte for the number of octets actually allocated in
- the output section.
- (lang_set_startof) Make sure STARTOF returns a target address.
- (lang_one_common) Record size changes in octets.
- (lang_abs_symbol_at_end_of) Section end symbol's value is
- recorded in target bytes.
- * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
- to be clear about behavior when an octet is smaller than one byte.
-
-2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * ldcref.c (output_cref): Don't pass message strings to printf
- as format arg.
- Update copyright.
-
- * ldmisc.c (vfinfo): Same here.
- Update copyright.
-
-2000-01-23 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
- generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
- mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
- Add missing NULL initialisers, and comments.
-
- * testsuite/ld-srec/sr3.cc (__rethrow): New.
-
-2000-01-21 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_size_sections): Fix typo in comment.
-
-2000-01-18 H.J. Lu <hjl@gnu.org>
-
- * ldlang.c (lang_size_sections): Also update the current
- address of a region if the SEC_NEVER_LOAD bit is not set.
-
-2000-01-10 Philip Blundell <pb@futuretv.com>
-
- * configure.tgt (arm*-*-conix*): New target.
-
-2000-01-07 Nick Clifton <nickc@cygnus.com>
-
- * ld.texinfo (Options): Remind users to preceed linker command
- line switches with -Wl, (or whatever is appropriate) if it is
- being invoked by a comnpiler driver program.
- Fix description of the behaviour of the -n command line switch.
-
-Wed Jan 5 08:02:12 2000 Catherine Moore <clm@cygnus.com>
-
- * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
- (name_list): New.
- * ld.texinfo (EXCLUDE_FILE): Update documentation.
- * ldgram.y (wildcard_spec): Support a list of excluded_files.
- (exclude_name_list): New.
- ldlang.c (walk_wild_section): Support list of excluded files.
- (print_wild_statement): Likewise.
- (lang_add_wild): Likewise.
- * ldlang.h (lang_wild_statement_type): Likewise.
- * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
-
-2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
-
- * pe-dll.c (pe_dll_warn_dup_exports): New variable.
- (process_def_file): Use.
- (pe_dll_compat_implib): New variable.
- (make_one): Use.
-
- * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
- pe_dll_compat_implib.
-
- * emultempl/pe.em (longopts): Add warn-duplicate-exports and
- compat-implib options.
- (gld_${EMULATION_NAME}_list_options): List new options.
- (gld_${EMULATION_NAME}_parse_args): Handle.
-
- * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
- dll.
-
- * deffilep.y (opt_name): Allow "." in name.
-
-1999-12-02 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Fix arm-epoc-pe dependencies.
- * Makefile.in: Regenerate.
-
- * emulparams/arm_epoc_pe.sh (SCRIPT_NAME): Set to epocpe.
-
- * scripttempl/epocpe.sc: New file: copy of pe.sc, customised for
- EPOC by placing .rdata into .text.
-
-1999-11-26 Andreas Schwab <schwab@suse.de>
-
- * configure.in: Put AC_MSG_CHECKING/AC_MSG_RESULT around check for
- STRINGIFY. Use yes/no instead of true/false as value for cache
- variable.
- * configure: Regenerate.
-
-1999-11-24 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (IGNORE_SECTION): Section must have both ALLOC and LOAD
- attributes in order to be checked.
-
-1999-11-22 Nick Clifton <nickc@cygnus.com>
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
+ rummage through the script for sections on the unique list.
+ Correct length of strncmp for ".note".
+ (gld${EMULATION_NAME}_check_needed): Rearrange function.
- * ldlang.c (lang_check_section_addresses): Fix test to determine
- if a section should be tested.
- (IGNORE_SECTION): New macro.
+ * ldlang.c (unique_section_list): New var.
+ (unique_section_p): New function.
+ (walk_wild_section): Don't match sections on unique_section_list.
+ (lang_add_unique): New function.
+ Correct spelling of relocatable in comments.
-Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com)
+ * ldlang.h (struct unique_sections): Declare.
+ (unique_section_list): Declare.
+ (unique_section_p): Declare.
+ (lang_add_unique): Declare.
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Clean up code to use EXTRA_SHLIB_EXTENSION.
+ * lexsup.c (ld_options): Allow --unique to take an optional arg.
+ (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
-1999-11-03 Nick Clifton <nickc@cygnus.com>
+ * ld.texinfo (--unique): Update.
- * emulparams/elf32mcore.sh (OUTPUT_FORMAT): Change to little endian.
- * emulparams/mcorepe.sh (OUTPUT_FORMAT): Change to little endian.
+2001-01-13 Nick Clifton <nickc@redhat.com>
-1999-11-01 Steve Chamberlain <sac@pobox.com>
+ * lexsup.c (parse_args): Remove spurious white space.
- * ldlang.c (section_already_linked): Rework to use hash table.
- (already_linked_newfunc): New function.
- (already_linked_table_init): New function.
- (already_linked_table_free): New function.
- (lang_process): Initialize and free the already_linked hash table.
+2001-01-12 Nick Clifton <nickc@redhat.com>
-1999-10-27 Andreas Jaeger <aj@suse.de>
+ * lexsup.c (parse_args): Update copyright date.
- * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
- target "mips*-*-linux-gnu*".
+2001-01-12 Philip Blundell <pb@futuretv.com>
-1999-10-27 Scott Bambrough <scottb@netwinder.org>
+ * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
- * emultempl/armelf.em: Include ctype.h to prevent compile time
- warnings.
+2001-01-10 Kazu Hirata <kazu@hxi.com>
-1999-10-26 Nick Clifton <nickc@cygnus.com>
+ * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
+ * scripttempl/h8300h.sc: Fix formatting.
+ * scripttempl/h8300s.sc: Likewise.
+ * scripttempl/h8500.sc: Likewise.
+ * scripttempl/h8500b.sc: Likewise.
+ * scripttempl/h8500c.sc: Likewise.
+ * scripttempl/h8500m.sc: Likewise.
+ * scripttempl/h8500s.sc: Likewise.
- * emultempl/armcoff.em (gld{}_finish): Remove extraneous
- underscore from prototype.
- * emultempl/armelf.em (gld{}_finish): Remove extraneous
- underscore from prototype.
+2000-01-07 David O'Brien <obrien@BSDi.com>
-1999-10-07 Geoffrey Keating <geoffk@cygnus.com>
+ * emultempl/elf32.em: Only perform Linux ld hints processing when
+ targeting Linux.
- * scripttempl/elf.sc (.rel.sdata): Combine all the sdata relocs
- being .rel.sdata, .rel.sdata.*, .rel.gnu.linkonce.s*.
- (.rela.sdata): Likewise for .rela.sdata.* and .rela.gnu.linkonce.s*.
- (.rel.sbss): Make like .rel.bss.
- (.rela.sbss): Make like .rel.bss.
- (.sdata): Don't include .gnu.linkonce.s.* or .sdata.* when
- ld -r.
- (.sbss): Do the same things as for .bss: include SDATA_START_SYMBOLS,
- .dynsbss.
+2001-01-07 Philip Blundell <philb@gnu.org>
-1999-09-29 Andrew Haley <aph@cygnus.com>
+ * ld.texinfo (Bug Reporting): Update email address for reports.
- * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer
- merging sections when not relocating.
+2000-12-31 Nick Clifton <nickc@redhat.com>
-1999-09-28 Mumit Khan <khan@xraylith.wisc.edu>
+ * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
+ options by checking for a return value of '?' not -1.
- * pe-dll.c (process_def_file): Move the offset lookup from here to
- (fill_exported_offsets): here. New static function.
- (fill_edata): Use.
-
-1999-09-28 Mumit Khan <khan@xraylith.wisc.edu>
+2000-12-28 Nick Clifton <nickc@redhat.com>
- * deffilep.y (tokens): Add upper and lower case versions of DATA,
- CONSTANT, NONAME and PRIVATE tokens.
- (command): Use DATAU.
- (expline): Allow for drectve syntax as well.
- (exp_opt_list): Likewise.
- (exp_opt): Likewise.
- * pe-dll.c (make_one): Only generate the idata entries for data
- symbols.
+ * lexsup.c (struct ld_option): Add new enum value:
+ EXACTLY_TWO_DASHES.
+ (ld_options[]): Change -omagic, -output and -oformat options
+ to be EXACTLY_TWO_DASHES.
+ (OUTPUT_COUNT): Use ARRAY_SIZE.
+ (parse_args): Change parameter 'argc' to unsigned.
+ Place EXACTLY_TWO_DASHES options into new really_longopts
+ array.
+ If getopt_long_only fails, try calling getopt_long using the
+ really_longopts array.
+ (help): Print a double dash for both EXACTLY_TWO_DASHES and
+ TWO_DASHES options.
-1999-09-28 Geoffrey Keating <geoffk@cygnus.com>
+ * ldlex.h: Fix prototype of parse_args.
- * scripttempl/elf.sc (.sdata): Include .gnu.linkonce.s.* sections
- in .sdata too.
+ * ld.texinfo: Document that long options starting with 'o'
+ must be preceeded by two dashes. Change example of a single
+ dashed long option from -oformat to -trace-symbol.
-1999-09-26 Nick Clifton <nickc@cygnus.com>
+2000-12-26 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- * scripttempl/elf.sc (.bss): Accept sections named .bss.*
- (.sbss): Accept sections names .sbss.*
+ * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
+ (longopts[]): New --no-default-excludes option.
+ (gld_${EMULATION_NAME}_list_options): Document.
+ (gld_${EMULATION_NAME}_parse_args): Handle.
-1999-09-22 Nick Clifton <nickc@cygnus.com>
+2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * Makefile.am: Add earm_epoc_pe.c build target.
+ * ldlang.c (new_stat): Revert the last beautification with "innocent"
+ whitespace, it breaks the K&R C preprocessor.
-Sat Sep 18 07:57:10 1999 Jeffrey A Law (law@cygnus.com)
+2000-12-11 DJ Delorie <dj@redhat.com>
- * emulparms/elf64hppa.sh (OTHER_READONLY_SYMBOLS): Remove ".stubs",
- they've been renamed to ".stub", which is handled automatically
- by elf.sc.
+ * ld.texinfo: Add notes about --whole-archive and gcc.
-Fri Sep 17 11:00:33 1999 Jeffrey A Law (law@cygnus.com)
+2000-11-18 Fred Fish <fnf@be.com>
- * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Kill completely.
- (DATA_START_SYMBOLS): Kill __hp_load_map definition
+ * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
+ (ld_options): Entry for --allow-shlib-undefined.
+ (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
+ * ldmain.c (main): Initialize link_info.allow_shlib_undefined
+ to false.
+ * ld.texinfo: Document new command line switch.
-Thu Sep 16 10:59:56 1999 Jeffrey A Law (law@cygnus.com)
+2000-12-12 Geoffrey Keating <geoffk@redhat.com>
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Use the same filename extension for the bfd_elf_dt_needed_name call
- as we did for finding the library.
+ * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
+ .fixup is actually read/write.
+ * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
+ * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
+ * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
- * emulparms/elf64hppa.sh (DATA_START_SYMBOLS): Define.
- (OTHER_READWRITE_SECTIONS): No longer define __hp_load_map.
+Mon Dec 11 14:50:33 MET 2000 Jan Hubicka <jh@suse.cz>
- * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Define.
+ * NEWS: Add note about x86_64 architecture.
-Wed Sep 15 02:47:43 1999 Jeffrey A Law (law@cygnus.com)
+2000-12-06 Mark Elbrecht <snowball3@bigfoot.com>
- * emulparms/elf64hppa.sh (SHLIB_TEXT_START_ADDR): Define.
- (SHLIB_DATA_ADDR): Likewise.
+ * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
+ Set DWARF2 sections to a VMA of zero.
- * emulparms/elf64hppa.sh (TEXT_DYNAMIC): Define.
+2000-12-01 Joel Sherrill <joel@OARcorp.com>
- * emulparms/elf64hppa.h (OTHER_READWRITE_SECTIONS): No longer combine
- the .plt, .dlt, .opd into a single output section. Provide values
- for __gp and __hp_load_map.
+ * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
+ New targets.
+ (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
+ (sparc*-*-rtems*): Switched from a.out to ELF.
-1999-09-14 Michael Meissner <meissner@cygnus.com>
+2000-11-30 Jan Hubicka <jh@suse.cz>
- * configure.in (Canonicalization of target names): Remove adding
- ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
- generates $ac_config_sub with a ${CONFIG_SHELL} already.
- * configure: Regenerate.
+ * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
+ (eelf_x86_64.c): New.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add support for x86_64-*-linux-gnu*.
+ * emulparams/elf_x86_64.sh: New.
-1999-09-14 Donn Terry <donn@interix.com>
+2000-11-30 Hans-Peter Nilsson <hp@axis.com>
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for
- terminating null.
+ * emulparams/crislinux.sh (ENTRY): Change back to _start.
+ (TEXT_START_SYMBOLS): Remove conditional setting of __start.
-1999-09-14 Ulrich Drepper <drepper@cygnus.com>
+ * scripttempl/crisaout.sc: Change all RELOCATING not related to
+ merging non-a.out sections into CONSTRUCTING.
- * configure.in: Define EXTRA_SHLIB_EXTENSION to ".sl" for HP target.
- * config.in: Add EXTRA_SHLIB_EXTENSION.
+2000-11-28 Nick Clifton <nickc@redhat.com>
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Search for second shared lib extension only if EXTRA_SHLIB_EXTENSION
- is defined.
+ * ld.1 (COPYING): Mention that the GNU Free Documentation
+ License is present in the sources, but not the output, and
+ also available from the GNU website.
+ (GNU Free Documentation License): Comment out this section.
-1999-09-14 Nick Clifton <nickc@cygnus.com>
+2000-11-28 David O'Brien <obrien@dragon.nuxi.com>
- * Makefile.in: Add earm_epoc_pe.c build target.
+ * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
+ does not use them.
-Tue Sep 14 05:26:34 1999 Jeffrey A Law (law@cygnus.com)
+2000-11-25 David O'Brien <obrien@FreeBSD.org>
- * emulparms/elf64hppa.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.dlt.
+ * ld.1: Remove old date so it does not give the impression the manpage
+ is way out of date.
-1999-09-13 Donn Terry <donn@interix.com>
+2000-11-24 Nick Clifton <nickc@redhat.com>
- * emultempl/pe.em: Remove the output file at the start, in case it
- is not writable.
+ * configure.tgt (xscale-coff): Add target.
+ (xscale-elf): Add target.
-Mon Sep 13 00:17:18 1999 Jeffrey A Law (law@cygnus.com)
+2000-11-24 Fred Fish <fnf@be.com>
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Search for file with .sl extension if no file with a .so extension
- is found.
+ * ldmain.c (main): Remove redundant init of config.make_executable
+ to true.
- * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Put .plt
- at the start of the .dlt output section.
+2000-11-15 Richard Henderson <rth@redhat.com>
-1999-09-12 Ian Lance Taylor <ian@zembu.com>
+ * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
- * pe.em: Don't include "../bfd/libbfd.h".
- (gld_${EMULATION_NAME}_after_open): Use xmalloc rather than
- bfd_alloc.
+2000-11-14 Kazu Hirata <kazu@hxi.com>
- * pe-dll.h: New file.
- * pe-dll.c: Include "pe-dll.h". Mark unused arguments as needed
- to avoid warnings.
- (edata_sz, reloc_sz): Change from int to size_t.
- (pe_details_type): Change type of imagebase_reloc from int to
- unsigned int.
- (pe_detail_list): Fully initialize last entry.
- (pe_dll_id_target): Change parameter to const.
- (pe_dll_generate_def_file): Likewise.
- (pe_dll_generate_implib): Likewise.
- (pe_implied_import_dll): Likewise. Change dll_name to const.
- * emultempl/pe.em: Include "pe-dll.h". Remove declarations now in
- pe-dll.h.
- (init): Fully initialize __dll__ entry.
- (gld_${EMULATION_NAME}_after_open): Remove unused variables
- sequence, elt, and i.
- * deffile.h: Add preprocessor guard.
- * deffilep.y (def_debug): Remove.
- * Makefile.am: Rebuild dependencies.
- (HFILES): Add pe-dll.h.
+ * scripttempl/h8300.sc: Fix formatting.
+ * scripttempl/h8300h.sc: Likewise.
+ * scripttempl/h8300s.sc: Likewise.
-1999-09-12 Donn Terry <donn@interix.com>
+Tue Nov 14 00:59:19 2000 Denis Chertykov <denisc@overta.ru>
- * ld.h (ld_abort): Declare.
- (abort): Define.
- * ldmisc.c (ld_abort): Define.
+ * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
- * scripttempl/pe.sc: Use ${ENTRY} rather than _mainCRTStartup.
- Move .bss section after .rdata. Move .reloc section after .rsrc.
+2000-11-09 Philip Blundell <pb@futuretv.com>
- * lexsup.c (parse_args): Use strtoul for --split-by-reloc
- argument.
+ * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
+ around orphan sections whose names can be represented in C.
- * lexsup.c (parse_args): If we get an unrecognized argument,
- mention --help.
+2000-11-07 Jim Wilson <wilson@redhat.com>
- * ldlang.c (section_already_linked): Use comdat information if it
- is available.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
+ hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
- * emultempl/pe.em (PE_DEF_SECTION_ALIGNMENT): If
- OVERRIDE_SECTION_ALIGNMENT is defined, change to that.
- (gld_${EMULATION_NAME}_before_parse): Use EXECUTABLE_NAME if it is
- defined, rather than a.exe.
- (init): Define __subsystem__ as ${SUBSYSTEM}.
- (set_pe_subsystem): Add ${INITIAL_SYMBOL_CHAR} before entry symbol
- name.
+2000-11-06 Nick Clifton <nickc@redhat.com>
-1999-09-12 Ian Lance Taylor <ian@zembu.com>
+ * ld.texinfo: Add GNU Free Documentation License.
+ * ldint.texinfo: Add GNU Free Documentation License.
+ * ld.1: Add GNU Free Documentation License.
- * ldlang.c (open_output): Change local variable desired_endian
- from int to enum bfd_endian.
+2000-11-05 Alan Modra <alan@linuxcare.com.au>
- * emulparams/arm_epoc_pe.sh: Define ENTRY, SUBSYSTEM and
- INITIAL_SYMBOL_CHAR.
- * emulparams/armpe.sh: Likewise.
- * emulparams/morepe.sh: Likewise.
- * emulparams/ppcpe.sh: Likewise.
- * emulparams/i386pe.sh (ENTRY): Define as _mainCRTStartup.
- (SUBSYSTEM): Define as PE_DEF_SUBSYSTEM.
+ * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
+ yy_is_interactive, yy_at_bol, and yy_fill_buffer.
-Fri Sep 10 00:22:50 1999 Jeffrey A Law (law@cygnus.com)
+ * Makefile.am (DISTCLEANFILES): Add stringify.sed.
+ Move 2000-11-02 Makefile.in changes to this file.
+ * Makefile.in: Regenerate.
- * emulparms/elf64hppa.sh (LIB_PATH): Define.
+2000-11-03 Nick Clifton <nickc@redhat.com>
- * emulparms/elf64hppa.sh (OTHER_READONLY_SECTIONS): Put stubs before
- unwinders so that they are closer to the text section.
- (OTHER_BSS_SECTIONS): Define.
- (EXECUTABLE_SYMBOLS): Provide __SYSTEM_ID and _FPU_STATUS.
- (INIT_START, INIT_END): Define.
- (FINI_START, FINI_END): Define.
- * scripttempl/elf.sc: Add support for INIT_START, INIT_END,
- FINI_START, FINI_END and OTHER_BSS_SECTIONS.
+ * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
+ constructors and destructors.
+ * scripttempl/h8300h.sc: Ditto.
+ * scripttempl/h8300s.sc: Ditto.
+ * scripttempl/h8500.sc: Ditto.
+ * scripttempl/h8500b.sc: Ditto.
+ * scripttempl/h8500c.sc: Ditto.
+ * scripttempl/h8500m.sc: Ditto.
+ * scripttempl/h8500s.sc: Ditto.
+ * scripttempl/v850.sc: Ditto.
+ * scripttempl/w65.sc: Ditto.
+ * scripttempl/z8000.sc: Ditto.
-Thu Sep 9 21:43:58 1999 Jeffrey A Law (law@cygnus.com)
+2000-11-02 Per Lundberg <plundis@chaosdev.org>
- * emulparms/elf64hppa.sh (TEXT_START_ADDR): Move up one page.
- (DATA_ADDR): Define.
+ * Makefile.in (e_i386_chaos.c): New rule.
+ (ALL_EMULATIONS): Added e_i386_chaos.o.
+ * emulparams/elf_i386_chaos.sh: New file.
+ * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
-1999-09-09 Stan Shebs <shebs@andros.cygnus.com>
+2000-10-20 Jakub Jelinek <jakub@redhat.com>
- * emulparams/d10velf.sh (READONLY_START_ADDR): Set to 0x2000004.
+ * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
+ NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
+ Fix sed invocation, so that it coped with '/' in Solaris 64bit
+ library path suffix.
+ Based on patch by Andrew Macleod <amacleod@cygnus.com>.
-1999-09-09 Andreas Schwab <schwab@suse.de>
+2000-10-18 Hans-Peter Nilsson <hp@axis.com>
- * ld.texinfo: Fix arguments of @var to not contain punctuation.
+ * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
+ for consecutive sections.
-Thu Sep 9 05:52:34 1999 Jeffrey A Law (law@cygnus.com)
+2000-10-17 Chandrakala Chavva <cchavva@redhat.com>
- * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Define.
+ * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
+ options.
+ * ld.texinfo: Added notes about this new option.
-1999-09-08 Ulrich Drepper <drepper@cygnus.com>
+2000-10-16 Nick Clifton <nickc@redhat.com>
- * emulparams/elf64hppa.sh (ELFSIZE): New. Set to 64.
+ * emultempl/pe.em (_after_open): Add tests of return values from
+ bfd functions. Emit appropriate error messages if necessary.
-Wed Sep 8 00:07:39 1999 Jeffrey A Law (law@cygnus.com)
+2000-10-13 Nick Clifton <nickc@redhat.com>
- * emulparms/elf64hppa.sh (ENTRY): Define to main.
+ * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
+ local variables - they are not used, but leave in the call to
+ bfd_canonicalize_symtab.
+ (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
+ pe_dll_search_prefix.
-1999-09-03 Scott Bambrough <scottb@netwinder.org>
+2000-10-12 Charles Wilson <cwilson@ece.gatech.edu>
- * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
- target "arm*-*-linux-gnu*"
+ * emultempl/pe.em (pe_dll_search_prefix): New variable,
+ (longopts): New --dll-search-prefix option.
+ (gld_${EMULATION_NAME}_list_options): Document.
+ (gld_${EMULATION_NAME}_parse_args): Handle.
+ (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
+ dynamically, search for a dll named '<prefix><basename>.dll'
+ in preference to 'lib<basename>.dll' if --dll-search-prefix
+ is specified.
-1999-09-04 Steve Chamberlain <sac@pobox.com>
+2000-10-12 Alan Modra <alan@linuxcare.com.au>
- * configure.tgt (pjl-*-*, pj-*-*): New targets.
- * emulparams/pjelf.sh: New file.
- * emulparams/pjlelf.sh: New file.
- * scripttempl/pj.sc: New file.
- * Makefile.am (ALL_EMULATIONS): Add epjelf.o and epjlelf.o.
- (epjelf.o, epjlelf.o): New targets.
- * Makefile.in: Rebuild.
+ * ldlang.c (section_already_linked): Set kept_section instead of
+ sec->comdat->sec.
-Fri Sep 3 20:17:08 1999 Jeffrey A Law (law@cygnus.com)
+2000-10-10 Kazu Hirata <kazu@hxi.com>
- * emulparams/elf64hppa.sh (MAXPAGESIZE): Define.
- (OTHER_READONLY_SECTIONS, DATA_PLT): Likewise.
+ * deffile.h: Fix formatting.
+ * lexsup.c: Likewise.
+ * mri.c: Likewise.
-Thu Sep 2 14:32:03 1999 Jeffrey A Law (law@cygnus.com)
+2000-10-09 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
- * emulparams/elf64hppa.sh: New file.
- * configure.tgt (hppa*w-*-*): Use elf64hppa emulation.
- * Makefile.am (ALL_64_EMULATIONS): Add eelf64hppa.o
- (eelf64hppa.c): Add dependencies.
- * Makefile.in: Rebuilt.
+ * pe-dll.c (make_one): Do not generate code thunk for DATA
+ exports.
+ (process_def_file): deduce DATA flag for auto-export sumbols.
-1999-08-25 Philip Blundell <pb@nexus.co.uk>
+2000-10-09 Kazu Hirata <kazu@hxi.com>
- * emulparams/armelf.sh (OTHER_BSS_SYMBOLS): Add __end__.
- * emulparams/armelf_linux.sh: Likewise.
- * emulparams/armelf_linux26.sh: Likewise.
+ * ld.h: Fix formatting.
+ * ldcref.c: Likewise.
+ * ldctor.h: Likewise.
+ * ldemul.c: Likewise.
+ * ldemul.h: Likewise.
+ * ldexp.c: Likewise.
+ * ldexp.h: Likewise.
+ * ldfile.c: Likewise.
+ * ldfile.h: Likewise.
+ * ldlang.c: Likewise.
+ * ldlang.h: Likewise.
+ * ldmain.c: Likewise.
+ * pe-dll.c: Likewise.
-1999-08-24 Nick Clifton <nickc@cygnus.com>
+ * pe-dll.c: Revert some formatting fixes.
- From a patch submitted by Roland McGrath <roland@baalperazim.frob.com>
+2000-10-08 Kazu Hirata <kazu@hxi.com>
- * configure.tgt (arm-*-netbsd*): New target.
- * Makefile.am (ALL_EMULATIONS): Add earmnbsd.o.
- (earmnbsd.c): New rule with deps.
- * Makefile.on: Regenerate.
- * emulparams/armnbsd.sh: New file.
+ * pe-dll.c: Fix formatting.
-1999-08-23 Nick Clifton <nickc@cygnus.com>
+2000-10-05 Kazu Hirata <kazu@hxi.com>
- * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Define.
- Implement --base-file command line switch.
+ * ldlang.c: Fix formatting.
- * emultempl/elf32.em: Add ability for individual targets to have
- their own command line switches by defining PARSE_AND_LIST_ARGS.
+2000-10-03 DJ Delorie <dj@redhat.com>
-1999-08-19 Andreas Schwab <schwab@suse.de>
+ * pe-dll.c (fill_edata): initialize entire block
+ (make_one): fill in correct section.
- * configure.host: Use ${CC} instead of gcc for finding compiler
- related files.
+2000-10-03 Kazu Hirata <kazu@hxi.com>
-1999-08-11 Nick Clifton <nickc@cygnus.com>
+ * ldexp.c: Fix formatting.
- * scripttempl/mcorepe.sc (OUTPUT_FORMAT): Fix typo.
+2000-10-02 DJ Delorie <dj@redhat.com>
-1999-08-09 Mark Elbrecht <snowball3@bigfoot.com>
+ * emultempl/pe.em (gld_*_after_open): detect case where there two
+ import libraries for same dll; rename one to ensure proper link
+ order.
- * scripttempl/i386go32.sc: Handle g++ exception sections.
+ * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
+ typo
+ (generate_edata): fix typo
-1999-08-09 Ian Lance Taylor <ian@zembu.com>
+2000-09-29 Hans-Peter Nilsson <hp@axis.com>
- From Wally Iimura <iimura@microunity.com>:
- * ldlang.c (lang_size_sections): When checking whether an address
- is within a region, don't get confused by wrapping around at the
- end of the address space.
+ * scripttempl/crisaout.sc (ENTRY): Now __start.
+ (.text): Add default setting for __start.
+ Remove CONSTRUCTORS handling.
+ (/DISCARD/): Add .gnu.warning.*.
+ * emulparams/crislinux.sh (ENTRY): Now __start.
+ (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
+ * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
+ (ENTRY): Now __start.
+ (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
+ (EXECUTABLE_SYMBOLS): Add default setting for __start.
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
+2000-09-29 Kazu Hirata <kazu@hxi.com>
- * ldlang.c (wild_doit): Update for renaming of SEC_SHORT to
- SEC_SMALL_DATA.
+ * deffile.h: Fix formatting.
+ * ld.h: Likewise.
+ * ldcref.c: Likewise.
+ * ldctor.c: Likewise.
+ * ldctor.h: Likewise.
+ * ldemul.c: Likewise.
+ * ldemul.h: Likewise.
+ * ldexp.c: Likewise.
+ * ldexp.h: Likewise.
+ * ldfile.c: Likewise.
+ * ldfile.h: Likewise.
+ * ldlang.c: Likewise.
+ * ldlang.h: Likewise.
+ * lexsup.c: Likewise.
+ * mri.c: Likewise.
+ * pe-dll.c: Likewise.
- * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
- MKDEP. Rebuild dependencies.
- * Makefile.in: Rebuild.
+2000-09-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
-1999-08-08 Jakub Jelinek <jj@ultra.linux.cz>
-
- * configure.host (sparc-*-linux-gnu*): New host.
- (sparc64-*-linux-gnu*): New host.
-
-1999-08-06 Ian Lance Taylor <ian@zembu.com>
-
- * lexsup.c (is_num): Reindent.
- (parse_args): Mention program name in error message.
-
- * emultempl/ostring.sed: Rename from stringify.sed.
- * emultempl/astring.sed: New file.
- * Makefile.am (stringify.sed): New target.
- (GEN_DEPENDS): Change $(srcdir)/emultempl/stringify.sed to
- stringify.sed.
- * configure.in: Define and substitute STRINGIFY.
- * emultempl/*.em: Use stringify.sed from build directory rather
- than source directory.
- * emultempl/elf32.em: Use stringify.sed rather than inline sed
- script.
- * emultempl/gld960.em, emultempl/gld960c.em: Likewise.
- * emultempl/hppaelf.em, emultempl/linux.em: Likewise.
- * emultempl/lnk960.em, emultempl/sunos.em: Likewise.
- * configure, Makefile.in: Rebuild.
-
-1999-08-05 Donn Terry <donn@interix.com>
-
- * emulparams/i386pe.sh: Define ENTRY, SUBSYSTEM, and
- INITIAL_SYMBOL_CHAR.
- * emulparams/i386pe_posix.sh: New file.
- * Makefile.am (YACC): If bison is not in the source tree, use
- @YACC@ rather than bison -y.
- (LEX): If flex is not in the source tree, use @LEX@ rather than
- flex.
- (ALL_EMULATIONS): Add ei386pe_posix.o.
- (ei386pe_posix.c): New target.
- * configure.tgt (i[3456]86-*-interix*): New target.
- * configure.host (i[3456]86-pc-interix*): New host.
- * Makefile.in: Rebuild.
+ * pe-dll.c (process_def_file): Uninitialized data wasn't
+ exported with --export-all-symbols switch.
-1999-08-03 Ian Lance Taylor <ian@zembu.com>
+2000-09-28 DJ Delorie <dj@redhat.com>
- * emulparams/elf32ppc.sh (MAXPAGESIZE): Change to 0x10000.
- * emulparams/elf32ppclinux.sh (MAXPAGESIZE): Likewise.
+ * pe-dll.c (fill_edata): rearrange the data so that ordinals and
+ noname work properly.
-1999-08-03 H.J. Lu <hjl@gnu.org>
+2000-09-28 Alan Modra <alan@linuxcare.com.au>
- * Makefile.am (ALL_EMULATIONS): Remove ego32.o.
- (ego32.c): Remove.
- * Makefile.in: Rebuild.
+ * ld.texinfo (HPPA ELF32): New section.
-1999-07-22 Philip Blundell <pb@nexus.co.uk>
+ * emultempl/hppaelf.em (group_size): New.
+ (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
+ (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
+ (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
+ options to prevent abbreviations matching.
+ (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
+ (PARSE_AND_LIST_ARGS_CASES): Handle it.
- * emulparams/armelf_linux26.sh (DATA_START_SYMBOLS): Define.
- (OTHER_BSS_SYMBOLS, OTHER_BSS_END_SYMBOLS): Likewise.
- * emulparams/armelf_linux.sh (DATA_START_SYMBOLS): Define.
+2000-09-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * configure.tgt (arm*-*-uclinux*, thumb-*-uclinux*,
- thumb-*-linux-gnu*): New targets.
+ * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
+ on the m68*-*-elf target. Make it support COFF input objects.
-1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
+2000-09-21 Kazu Hirata <kazu@hxi.com>
- * scripttempl/i386go32.sc: Add handling of linkonce sections.
+ * ldmain.c: Fix formatting.
+ * ldmisc.c: Likewise.
+ * ldver.c: Likewise.
+ * ldwrite.c: Likewise.
- * configure.bat: Remove; obsolete.
- * emulparams/go32.sh: Remove; obsolete.
- * scripttempl/go32coff.sc: Remove; obsolete.
+2000-09-21 Alan Modra <alan@linuxcare.com.au>
-1999-07-21 H.J. Lu <hjl@gnu.org>
+ * ldwrite.c (clone_section): Silence gcc warnings.
- * configure.tgt (mips*el-*-vxworks*): New target.
+2000-09-20 Alan Modra <alan@linuxcare.com.au>
-1999-07-21 Brad M. Garcia <bgarcia@fore.com>
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
+ out of memory failure.
- * configure.tgt (i[3456]86-*-vxworks*): New target.
+ * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
+ (clone_section): Handle out of memory failures. Rename var to
+ avoid c++ reserved word.
-Tue Jul 20 15:18:46 1999 Bob Manson <manson@charmed.cygnus.com>
+2000-09-18 Alan Modra <alan@linuxcare.com.au>
- * ldlang.c (lang_gc_sections): Only handle the start symbol
- specially if there is one.
+ * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
+ stub_name param to stub_sec_name.
+ (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
-Mon Jul 19 14:19:14 1999 Mark P. Mitchell <mark@codesourcery.com>
+2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * emulparams/elf32bmipn32.sh (OTHER_RELOCATING_SECTIONS): Add
- .MIPS.events and .MIPS.content handling.
- * emulparams/elf64bmip.sh (OTHER_RELOCATING_SECTIONS): Likewise.
+ * emultempl/m68kelf.em: New file.
+ * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
+ * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
+ * Makefile.in: Regenerate.
-1999-07-17 Nick Clifton <nickc@cygnus.com>
+2000-09-15 Alan Modra <alan@linuxcare.com.au>
- * ldlang.c (get_target): New function: Return true iff the
- given target is the target being sought.
- (stricpy): New function: Like strcpy but convert to lower
- case as well.
- (strcut): New function: Like strstr but remove the located
- substring as well.
- (name_compare): New function: Compute a compatability rating
- for two target names.
- (winner): New variable: Best target found by
- closest_target_match() so far.
- (closest_target_match): New function: Find the target which is
- the closest match to the original target.
- (get_first_input_target): New function: Find the target format
- of the first of the linker's input file.
- (open_output): Be more clever about deciding the output target
- format.
+ * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
+ only as needed.
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
+2000-09-13 Nick Clifton <nickc@redhat.com>
- * emulparams/elf64_sparc.sh: Add 64-bit directories to native LIB_PATH.
+ * ldmain.c (multiple_definition): Disable relaxation if
+ multiple symbol definitions are encountered - otherwise the
+ linker could abort with an assertion failure.
-Thu Jul 15 15:55:15 1999 Mark P. Mitchell <mark@codesourcery.com>
+2000-09-10 Nick Clifton <nickc@redhat.com>
- * configure.host: Set up HOSTING_CRT0 and HOSTING_LIBS for IRIX6.
+ * mri.c: Fix formatting.
-1999-07-15 Ian Lance Taylor <ian@zembu.com>
+2000-09-07 H.J. Lu <hjl@gnu.org>
- * configure.in: Bump version number to 2.9.5.
+ * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
* configure: Rebuild.
-1999-07-14 Richard Henderson <rth@cygnus.com>
-
- * ldlang.c (wild_doit): Copy SEC_SHORT to output section.
-
- * scripttempl/elf.sc: Re-order .rel[a].foo outputs to the
- same order seen for the main sections. Add
- OTHER_READONLY_RELOC_SECTIONS and OTHER_GOT_RELOC_SECTIONS.
-
-1999-07-12 Andreas Schwab <schwab@suse.de>
-
- * emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Fill in
- structure initializations.
-
- * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Add missing
- comma in initializer.
-
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
-
- * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
- as appropriate. Fill in structure initializations.
-
-1999-07-10 Ian Lance Taylor <ian@zembu.com>
-
- * ldfile.c: Revert patch of 1999-07-08.
- (ldfile_try_open_bfd): If we are searching for the file, skip
- files with an incompatible architecture.
-
-1999-07-09 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/armcoff.sc (OUTPUT_FORMAT): Include big endian and
- little endian formats.
-
-1999-07-08 Felix Lee <flee@cygnus.com>
-
- * scripttempl/mcorepe.sc: fix quoting problem, for bash 2.x
-
-1999-07-08 Jakub Jelinek <jj@ultra.linux.cz>
-
- * ldfile.c (ldfile_open_file_search): Skip libraries made for
- incompatible architectures in the search path. Let the user know
- about any such skips.
-
-Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * configure.tgt (hppa*-linux-gnu*): New target.
-
-1999-07-07 Mark Mitchell <mark@codesourcery.com>
-
- * Makefile.am (ALL_64_EMULATIONS): Add eelf64bmip.
- (eelf64bmip): New target.
- * Makefile.in: Regenerated.
- * configure.tgt (mips-sgi-irix6*): Add 64-bit emulation.
- * emulparams/elf64bmip.sh: New file.
-
-1999-07-05 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em (after_open): Abort if input format is ARM and
- output format is not.
- * emultempl/armcoff.em (after_open): Abort if input format is ARM
- and output format is not.
- * emultempl/armelf.em (after_open): Abort if input format is ARM
- and output format is not.
-
-1999-07-02 Ian Lance Taylor <ian@zembu.com>
-
- * ldlang.c: Revert change of 1999-06-23.
-
-1999-06-30 Mark Mitchell <mark@codesourcery.com>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf32bmipn32.o.
- (eelf32bmipn32.c): New target.
- * Makefile.in: Regenerated.
- * configure.tgt (mips-sgi-irix6*): Make n32 the default
- emulation.
- * emulparams/elf32bmipn32.sh: New file.
-
-1999-06-28 Jim Pick <jim@jimpick.com>
-
- * emultempl/armelf.em: Added code so that .xs linker scripts are
- called so that ARM shared libraries are built correctly.
-
-1999-06-22 Mark Mitchell <mark@codesourcery.com>
-
- * ldmain.c (main): Initialize link_info.init_function and
- link_info.fini_function.
- * lexsup.c (OPTION_INIT): New macro.
- (OPTION_FINI): Likewise.
- (ld_options): Add descriptions for them.
- (parse_args): Handle them.
-
-1999-06-23 Ian Lance Taylor <ian@zembu.com>
-
- * ldlang.c (section_already_linked): Only discard link once
- sections if we are building constructors.
-
-1999-06-22 Nick Clifton <nickc@cygnus.com>
-
- * ld.texinfo (Location Counter): Describe behaviour of
- location counter inside section statements.
-
-1999-06-20 Mark Mitchell <mark@codesourcery.com>
-
- * scripttempl/elf.sc (WRITABLE_RODATA): New variable for
- controlling whether or not .rodata is in the data segment or the
- text segment.
-
-1999-06-18 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em: Add new command line switch --thumb-entry.
- * emultempl/armelf.em: Add new command line switch --thumb-entry.
- * emultempl/armcoff.em: Add new command line switch --thumb-entry.
- * ld.texinfo: Document new ARM command line switch: --thumb-entry.
-1999-06-20 H.J. Lu <hjl@gnu.org>
-
- * configure.in (all_libpath): Accumulate across all enabled targets.
-
-Sun Jun 20 14:10:33 1999 Richard Henderson <rth@cygnus.com>
-
- * emultempl/armelf.em: Watch EMULATION_LIBPATH instead of
- DEFAULT_EMULATION.
- * emultempl/elf32.em: Likewise.
- * emultempl/sunos.em: Likewise.
-
-Fri Jun 18 15:24:48 1999 Richard Henderson <rth@cygnus.com>
-
- * Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL.
- * configure.in (all_emuls): Add targ_extra_libpath.
- (all_libpath, EMULATION_LIBPATH): Define.
- * configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath.
- * genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH.
-
-Mon Jun 14 10:38:36 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * ld.texinfo: Fix use of @item vs. @itemx.
-
-1999-06-13 Ian Lance Taylor <ian@zembu.com>
-
- From Thomas Zenker <thz@lennartz-electronic.de>:
- * ldgram.y (attributes_opt): Use attributes_list instead of NAME.
- (attributes_list, attributes_string): New nonterminals.
- * ldlang.c (lang_set_flags): Add invert parameter. Don't handle
- '!'.
- * ldlang.c (lang_set_flags): Update declaration.
-
-1999-06-12 Ian Lance Taylor <ian@zembu.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Don't add
- entry_symbol as an undefined symbol when doing a relocateable
- link. From <jeffdb@goodnet.com>.
-
-1999-06-12 David O'Brien <obrien@freebsd.org>
-
- * configure.tgt: (i[3456]86-*-freebsd*): Now defaults to ELF.
+2000-09-07 H.J. Lu <hjl@gnu.org>
-1999-06-09 Nick Clifton <nickc@cygnus.com>
-
- * lexsup.c (help): Restore previous format of output.
-
-1999-06-04 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em: If compiling for arm_epoc_pe rename
- interworking functions to avoid a name space clash.
-
-1999-06-02 Jason Merrill <jason@yorick.cygnus.com>
-
- * scripttempl/v850.sc: Add initp support.
-
-1999-06-02 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em: Rename global arm interworking functions to
- avoid name collision when all targets BFD is built.
-
-1999-05-30 Cort Dougan <cort@attis.cs.nmt.edu>
-
- * Makefile.am (ALL_EMULATIONS): Add eelf32ppclinux.o.
- * configure.tgt (powerpc-*-linux-gnu): Use it.
- * emulparams/elf32ppclinux.sh: New file.
-
-1999-05-29 Ian Lance Taylor <ian@zembu.com>
-
- * ld.texinfo (Options): Clarify that options which refer to files
- must be properly ordered.
-
-1999-05-29 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/armelf.em (..._parse_args): New function: Parse
- command line option. Accept arm-elf specific command line option
- '-p' or '--no-pipeline-knowledge'.
- (..._list_options): New function: Describe the new command line
- option.
- (..._before_allocation): Pass the value of the new variable
- no_pipeline_knowledge to bfd_elf32_arm_process_before_allocation.
-
- * emultemp/armelf_oabi.em (..._before_allocation): Pass zero as
- the third parameter to bfd_elf32_arm_process_before_allocation.
-
-1999-05-28 Nick Clifton <nickc@cygnus.com>
-
- * lexsup.c (help): Minor formatting changes.
-
-1999-05-28 Martin Dorey <mdorey@madge.com>
-
- * configure.tgt (i960-*-elf*): New target.
- * emulparams/elf32_i960.sh: New file.
- * Makefile.am (ALL_EMULATIONS): Add eelf32_i960.o.
- (eelf32_i960.c): New target.
+ * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
* Makefile.in: Rebuild.
-1999-05-26 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/armelf_oabi.sh (TEMPLATE_NAME): Set to armelf_oabi.
-
-1999-05-24 Philip Blundell <philb@gnu.org>
-
- * emultempl/armelf.em (before_parse): Set config.dynamic_link and
- config.has_shared.
- * emulparams/armelf.sh (GENERATE_SHLIB_SCRIPT): Define.
- * emulparams/armelf_linux.sh (GENERATE_SHLIB_SCRIPT): Likewise.
-
-1999-04-13 Philip Blundell <philb@gnu.org>
-
- * emultempl/armelf.em: Add definitions related to shared objects
- (copied from elf32.em).
+2000-09-07 Alan Modra <alan@linuxcare.com.au>
-Wed May 19 12:44:26 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * Makefile.am (ALL_EMULATIONS): Remove earmlinux.o and
- earm26linux.o, add earmelf_linux.o and earmelf_linux26.o.
- * Makefile.in: Regenerated.
-
-1999-05-16 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/elf32mcore.sh (GENERATE_SHLIB_SCRIPT): Define.
- (TEMPLATE_NAME): Define.
-
-Thu May 13 09:48:09 1999 Joel Sherrill (joel@OARcorp.com)
-
- * configure.tgt (i386-*-rtemself*, sh-*-rtemself*): New targets.
- (mips*el-*-rtems*, powerpcle-*-rtems*): New targets.
-
-1999-05-10 DJ Delorie <dj@cygnus.com>
-
- * scripttempl/pe.sc: Specify the output arch, which Ian says is
- the Right Thing to do.
-
- * emultempl/pe.em: various changes to parameterize the
- target-specific information.
- (gld_i386pe_after_open): Detect and fix MS import libraries
- by renaming the member objects (which are all named the same).
-
- * pe-dll.c: various changes to parameterize the target-specific
- information.
- (generate_reloc): support relocs more generically to allow for
- expansion.
- (pe_exe_build_sections): new; used to add .relocs to .exes
- (pe_exe_fill_sections): ditto
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
+ broken list handling. Create __start_SECNAME and __stop_SECNAME
+ when no place-holder. Add some comments. Test both SEC_CODE and
+ SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
+ Handle case where no output section statement created.
-1999-05-10 Catherine Moore <clm@cygnus.com>
+2000-09-07 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
- * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
- Check for TARGET_IS_arm_epoc_pe.
- (gld_${EMULATION_NAME}_before_allocation): Likewise.
+ * configure.tgt (sh-*-linux*): Added.
+ * Makefile.am: Added eshelf_linux and eshlelf_linux.
+ * Makefile.in: Rebuilt.
+ * emulparams/shelf_linux.sh: New file.
+ * emulparams/shlelf_linux.sh: New file.
-1999-05-12 Anthony Green <green@cygnus.com>
+2000-09-06 Alan Modra <alan@linuxcare.com.au>
- * ldlang.c (walk_wild, walk_wild_file, walk_wild_section,
- output_section_callback, gc_section_callback): New functions for
- generic section walks.
- (wild, lang_gc_wild): Use walk_wild.
- (wild_file, lang_gc_wild_file): Deleted. Common logic moved to
- walk_wild_file.
- (wild_section, lang_gc_wild_section): Deleted. Common logic moved
- to walk_fild_section. Unique logic moved into callbacks
- output_section_callback and gc_section_callback.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
+ try shuffling sections when the orphan happens to be the place
+ holder. Keep count of unique section names generated so we speed
+ the search for a new name.
-1999-04-26 Tom Tromey <tromey@cygnus.com>
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
- * aclocal.m4, configure: Updated for new version of libtool.
+ * configure: Rebuilt with new libtool.m4.
-1999-04-12 Philip Blundell <pb@nexus.co.uk>
+2000-09-05 Nick Clifton <nickc@redhat.com>
- * emulparams/armelf_linux.sh: New file. Support for ARM
- GNU/Linux ELF ABI.
- * emulparams/armelf_linux26.sh: New file. APCS-26 version of above.
- * configure.tgt: For arm*-*-linux-gnu*, set default emulation to
- `armelf_linux', and also include `armelf_linux26' and `armelf'.
- * Makefile.am: Add rules to make earmlinux.c and earmlinux26.c.
- (ALL_EMULATIONS): Add earmlinux.o and earmlinux26.o.
* Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * po/ld.pot: Regenerate.
-1999-04-11 Richard Henderson <rth@cygnus.com>
-
- * Makefile.am (ALL_EMULATIONS): Add elf_i386_be.o.
- * configure.tgt (i[3456]86-*-beos*): Use it.
- * emulparams/elf_i386_be.sh: New file.
- * Makefile.in: Rebuild.
-
- * configure.in (environ): Detect declaration.
- * ldmain.c (main): Don't declare environ.
- * sysdep.h (environ): Declare if needed.
- * configure, config.in: Rebuild.
-
-1999-04-11 Richard Henderson <rth@cygnus.com>
-
- * ldgram.y (ldgram_vers_current_lang): New.
- (vers_defns): Accept `extern "lang" { }' syntax.
- * ldlex.l (vers_node_nesting): New.
- (V_IDENTIFIER): Accept . and $ in symbols.
- (VERS_NODE): Accept `extern "lang" { }' tokens. Nest VERS_NODE states.
- * ldlang.c (lang_new_vers_regex): New `lang' argument. Update callers.
- (lang_vers_match_lang_c): New function.
- (lang_vers_match_lang_cplusplus): New function.
- (lang_vers_match_lang_java): New function.
- (lang_do_version_exports_section): Fix iteration. Don't free
- section contents, as it is still in use by the patterns.
-
-1999-04-10 Richard Henderson <rth@cygnus.com>
-
- * ldmain.c (main): Init link_info.no_undefined.
- * lexsup.c: Add command-line option --no-undefined.
-
-1999-04-06 Ian Lance Taylor <ian@zembu.com>
-
- * ld.h (LC_MESSAGES): Never define.
- * ldmain.c (main): Don't pass LC_MESSAGES to setlocale if the
- system does not define it.
-
-1999-04-06 H.J. Lu <hjl@gnu.org>
-
- * ldmain.h (demangling): Declare.
- * ldmain.c (demangling): New global variable.
- (main): Initialize demangling.
- * ldmisc.c (vfinfo): Don't demangle symbol if ! demangling.
- * lexsup.c (ld_options, parse_args): Handle --demangle and
- --no-demangle.
- * ld.texinfo, ld.1: Document --demangle/--no-demangle.
-
- * ldlex.l (V_IDENTIFIER): Allow '.' in symbol.
-
-1999-04-05 Chris Torek <torek@BSDI.COM>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Check that
- a shared library really exists, avoiding broken symlinks.
-
- * ldfile.c (ldfile_open_file): Generate a better error message if
- we can't find a -l file.
-
-1999-04-05 DJ Delorie <dj@cygnus.com>
-
- * configure.tgt (i386-*-pe): add targ_extra_ofiles for other PE
- targets (i386-pe and i386-winnt)
-
-1999-04-04 Ian Lance Taylor <ian@zembu.com>
-
- * deffilep.y: Include "sysdep.h" and "ldmisc.h".
- (def_file_add_directive): Change return type to void. Remove
- unused locals sh_reserve, sh_commit, and j.
- (def_ungetc): Always return a value.
- (def_lex): Correct parenthesization of || within &&.
- * deffile.h (def_file_add_directive): Update declaration.
- * pe-dll.c: Include <time.h>, <ctype.h>, and "ldemul.h".
- (generate_edata): Remove unused local i.
- (quoteput): Add cast to avoid warning.
- (pe_dll_generate_def_file): Fix type in format string.
- (quick_symbol): Remove unused local blhe.
- (pe_dll_generate_implib): Add cast to avoid warning.
- (pe_process_import_defs): Remove unused locals ar_head, ar_tail,
- and n.
- (pe_as16): Comment out.
-
-1999-04-04 Don Bowman <don@pixsci.com>
-
- * configure.tgt: Add mips*-*-vxworks* target.
-
-1999-03-31 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Add earm_epoc_pe.o
- Add build rule and dependencies for earm_epoc_pe.c.
-
- * emulparams/arm_epoc_pe.sh: New file.
-
- * configure.tgt: Add 'targ_extra_ofiles' for ARM based PE
- targets.
-
-1999-03-31 Philip Blundell <pb@nexus.co.uk>
-
- * configure.tgt: Match `arm*-*-linux-gnu*' not
- `armv*-*-linux-gnu'.
-
-1999-03-26 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * scripttempl/elf.sc: Put the .eh_frame and .gcc_except_table
- sections in the data segment.
-
-Fri Mar 26 12:05:51 1999 Catherine Moore <clm@cygnus.com>
-
- * ld.h (wildcard_spec): Add exclude_name.
- * ldgram.y (EXCLUDE_FILE): New token.
- (wildcard_spec): Set exclude_name.
- (file_NAME_list): Recognize EXCLUDE_FILE.
- * ldlang.c (wild_section): Check for excluded files.
- (print_wild_statement): Print excluded files.
- (lang_add_wild): New argument exclude_filename.
- Set exclude_filename.
- * ldlang.h (lang_wild_statement_type): Add exclude_filename.
- * ldlex.l: New token EXCLUDE_FILE.
- * mri.c (mri_draw_tree): Add argument to lang_add_wild.
- * scripttempl/elf.sc (CTOR, DTOR): Exclude crtend.o from ctor wildcard.
- Reorder sorted and unsorted ctors.
- * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise.
- * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise.
- * scripttempl/elfppc.sc (CTOR, DTOR): Likewise.
-
-1999-03-26 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_gc_sections): If entry_symbol is not defined,
- default to "start".
-
-1999-03-03 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/elf.sc: Add explicit placements for the .eh_frame
- and .gcc_except_table sections.
-
-Wed Mar 3 09:13:34 1999 Catherine Moore <clm@cygnus.clm>
-
- * scripttempl/elf.sc: Remove .end.ctors and .end.dtors
- sections. Reorder .ctors section entries.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfppc.sc: Likewise.
-
-1999-02-26 Jim Lemke <jlemke@cygnus.com>
-
- * ldmain.c (main): Wrong error msg for -r and --mpc860c0.
-
-1999-02-25 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_check_section_addresses): Remove extraneous
- backslash.
-
-Thu Feb 25 15:07:24 1999 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elf.sc: Don't gather .ctor and .dtor sections
- for relocateable links.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfppc.sc: Likewise.
-
-1999-02-22 Jim Lemke <jlemke@cygnus.com>
-
- * ldint.texinfo: remove extraneous right brace.
- * ldmain.c (main): initialize and check option "mpc860c0".
- * lexsup.c (ld_options, parse_args): add option "mpc860c0".
-
-Wed Feb 17 12:10:06 1999 Stan Cox <scox@cygnus.com>
-
- * mpw-elfmips.c (gldelf32ebmip_before_allocation): Remove special
- .reginfo section handling.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Likewise.
- * emulparams/elf32elmip.sh (INITIAL_READONLY_SECTIONS): Removed
- * emulparams/elf32ebmip.sh (INITIAL_READONLY_SECTIONS): Removed
-
-1999-02-17 Nick Clifton <nickc@cygnus.com>
-
- Patch from: Scott Bambrough <scottb@corelcomputer.com>
-
- * configure.tgt: Added armv*-*-linux-gnu to $targ_emul
- recognition.
-
-Wed Feb 17 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * emultempl/armelf_oabi.em
- (bfd_elf32_arm_allocate_interworking_sections,
- bfd_elf32_arm_get_bfd_for_interworking,
- bfd_elf32_arm_process_before_allocation): Define them to use the
- old ABI versions of the functions.
-
-Tue Feb 16 16:48:19 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Change AC_PREREQ to 2.13. Change AM_PROG_INSTALL
- to AC_PROG_INSTALL. Change AM_EXEEXT to AC_EXEEXT.
- * Makefile.am (earmelf_oabi.c): Changes spaces to tab.
- * acconfig.h: Remove.
- * aclocal.m4: Rebuild.
- * configure: Rebuild.
- * Makefile.in: Rebuild.
-
-Mon Feb 15 18:21:48 1999 Vladimir N. Makarov <vmakarov@cygnus.com>
-
- * ldexp.h (struct etree_value_type): Change valid onto valid_p.
-
- * ldexp.c (new_abs): Ditto.
- (new_rel, new_rel_from_section, fold_binary, invalid, fold_name,
- exp_fold_tree, exp_binop, exp_trinop, stat_alloc,
- exp_get_abs_int): Ditto
-
- * ldlang.c (print_assignment, lang_size_sections,
- lang_do_assignments): Ditto.
-
-1999-02-11 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_check_section_addresses): New function: Check
- addresses assigned to section for overlaps.
- (lang_process): Call lang_check_section_addresses if suitable.
-
- * ld.h: Add new boolean field to args_type structure:
- 'check_section_addresses'.
-
- * ldmain.c: Initialise check_section_addresses field to true.
-
- * lexsup.c: Add new command line options '--no-check-sections' and
- '--check-sections'.
-
- * ld.texinfo: Document new command line options '--check-sections'
- and '--no-check-sections'.
-
-1999-02-08 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt: Add support for StrongARM target.
-
-Wed Feb 3 19:41:01 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * ldctor.c (ldctor_build_sets): Just set SEC_KEEP once. Check for
- an owner of a section before using it to look up a reloc type.
- Don't set SEC_KEEP for the absolute section.
-
-Mon Feb 1 11:39:46 1999 Catherine Moore <clm@cygnus.com>
-
- * Makefile.am (earmelf_oabi.o): New.
- * Makefile.in: Regenerate.
- * configure.tgt (arm-*-oabi): New.
- (thumb-*-oabi): New.
- * emulparams/armelf_oabi.sh: New.
- * emultempl/armelf_oabi.em: New.
-
-1999-01-31 17:57:31 1998 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfppc.sc: Add support for -fleading-underscores
- switch in all linker generated symbols.
-
- * configure.tgt (powerpc{,le}*-*-vxworks): Add as aliases for
- powerpc{,le}-*-eabi.
-
-Wed Jan 20 17:01:48 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (i[3456]86-*-solaris2*): New target. From Pavel
- Roskin <pavel_roskin@geocities.com>.
-
-1999-01-19 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_size_sections): Count loadable sections as
- contributing to the size of the current segment.
-
-1999-01-15 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_size_sections): Only update the current
- address of a region if the section just placed into it is an
- allocated section.
+ * ldint.texinfo: Remove CVS revision marker - it foils local
+ comparisons.
+
+ * emultempl/ticoff.em: Remove extraneous comma.
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
+ to stub section flags.
+ (hppa_for_each_input_file_wrapper): New.
+ (hppa_lang_for_each_input_file): New.
+ (lang_for_each_input_file): Define to call above.
+ (multi_subspace): New.
+ (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
+ (PARSE_AND_LIST_PROLOGUE): Define.
+ (PARSE_AND_LIST_LONGOPTS): Define.
+ (PARSE_AND_LIST_OPTIONS): Define.
+ (PARSE_AND_LIST_ARGS_CASES): Define.
+ (hppaelf_finish): Call elf32_hppa_set_gp.
+ (hppaelf_set_output_arch): Remove.
+ (LDEMUL_SET_OUTPUT_ARCH): Remove.
+
+ * emulparams/hppalinux.sh (ELFSIZE): Define.
+ (MACHINE): Define.
+ (OTHER_READONLY_SECTIONS): Define.
+ (DATA_PLT): Define.
+ (GENERATE_SHLIB_SCRIPT): Define.
-1999-01-12 Nick Clifton <nickc@cygnus.com>
+ * ldlang.c: Add missing prototypes, and tidy others. Change CONST
+ to const throughout. Change `void *' to `PTR' throughout.
+ (lang_memory_default): Function is local to file, add `static'.
- * Makefile.am: Replace efr30.o with eelf32fr30.o.
+ * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
+ (ehppalinux.c): Likewise.
+ (earmelf.c): Likewise.
+ (earmelf_linux.c): Likewise.
+ (earmelf_linux26.c): Likewise.
* Makefile.in: Regenerate.
- * configure.tgt: Replace fr30 with elf32fr30.
-
- * emulparams/elf32fr30.sh: New file: Replaces fr30.sh, and uses
- generic elf.sc script. Also replaces the .stack section with a
- user definable symbol __stack.
-
-1999-01-11 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/fr30.sc: Fill .init and .fini sections with NOP
- pattern.
-
-1999-01-03 Ken Raeburn <raeburn@cygnus.com>
-
- * Makefile.am (check-DEJAGNU): No longer provide HOSTING_EMU,
- HOSTING_CRT0, HOSTING_LIBS; the test suite can extract them from
- configure.host and configure.tgt now.
- * Makefile.in: Rebuild.
-
-1998-12-27 Ulrich Drepper <drepper@cygnus.com>
-
- * lexsup.c (parse_args, case OPTION_RPATH): Avoid adding duplicate
- elements to rpath.
-
-Thu Dec 10 11:12:28 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * Makefile.am (ALL_EMULATIONS): Remove pe-dll.o and deffilep.o.
- (ALL_EMUL_EXTRA_OFILES): New variable. Put them here instead.
- * configure.in: Set EMUL_EXTRA_OFILES to $(ALL_EMUL_EXTRA_OFILES)
- if configuring with all targets.
- * configure, Makefile.in, aclocal.m4: Rebuild.
-
- * emultempl/pe.em (pe_enable_stdcall_fixup): Make static.
- (pe_dll_do_default_excludes): Removed, unused.
- (pe_def_file, pe_dll_export_everything, pe_dll_kill_ats,
- pe_dll_stdcall_aliases): Don't initialize them, this file may be
- compiled more than once.
- * pe-dll.c (pe_def_file, pe_dll_export_everything,
- pe_dll_do_default_excludes, pe_dll_kill_ats,
- pe_dll_stdcall_aliases): Define and initialize them here instead.
- (generate_reloc): Fix allocation of reloc_addresses array to use
- bfd_vma instead of unsigned long. Fix element size in qsort call.
- (reloc_sort): Compare pointers to bfd_vma instead of unsigned
- long.
-
-Mon Dec 7 21:10:09 1998 J.J. van der Heijden <j.j.vanderheijden@student.utwente.nl>
-
- * configure.tgt (i[3456]86-*-mingw32*): Add cygwin target specific
- files.
-
-Sun Dec 6 16:33:33 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (m68*-*-gnu*): New target. From Aymeric Vincent
- <aymeric.vincent@emi.u-bordeaux.fr>.
-
-1998-12-04 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/fr30.sh (TEXT_START_ADDR): Change TEXT_START_ADDR
- from 0x100000 to 0x10000 so that it fits in 20 bits.
-
-Sat Nov 28 22:32:20 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.h (ldemul_recognized_file): Declare.
-
-Sat Nov 28 22:30:55 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * ldlang.c (lang_add_wild): Don't pretend that there is an input
- file if the filename is a wildcard pattern.
-
-1998-11-25 DJ Delorie <dj@cygnus.com>
-
- * ldemul.h (ld_emulation_xfer_struct): new hook "recognized_file"
- * ldemul.c (ldemul_recognized_file): new function, new hook
- * ldint.texinfo: document new hook.
- * ldlang.c (load_symbols): call recognized_hook for all objects we
- do recognize, in case the emulation needs to handle them
- specially. PE DLLs use this.
- * pe-dll.c (pe_dll_generate_def_file): take out hack and debug
- printfs
- * emultempl/pe.em (gld_i386_recognized_file): new function
- (gld_i486_unrecognized_file): take out hack
-
-1998-11-23 DJ Delorie <dj@cygnus.com>
-
- * pe-dll.c (fill_edata): fill in timestamp
- (make_head): name object files sequentially to ensure
- they link in the right order.
- (make_tail): same here
- (pe_process_import_defs): use sequential names for bfds to ensure
- proper link order.
- (pe_implied_import_dll): new function; handles linking directly
- against DLLs by simulating IMPORTS directives. * emultempl/pe.em
- (gld_i386pe_before_parse): hack bfd to not recognize .dll files
- via bfd_pe_dll_not_recognized_hack
-
-1998-11-23 DJ Delorie <dj@cygnus.com>
-
- * emultempl/pe.em (gld_i386pe_parse_args): Conditionalize call to
- pe_dll_add_excludes
-
-Mon Nov 23 14:36:18 1998 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em (after_parse): Only create an undefined entry
- symbol if one has been specified.
-
-1998-11-23 DJ Delorie <dj@cygnus.com>
-
- * emultempl/pe.em (gld_i386pe_after_open): call
- pe_process_import_defs
- * pe-dll.c (pe_dll_generate_def_file): calculate BASE from
- pe_data, only print if actually set. Print version only if
- set.
- (save_relocs): save relocs for both input and output.
- (make_one): support internal/external different names.
- (pe_dll_generate_implib): support new make_one
- (pe_process_import_defs): new function; handles IMPORT
- directives in .def files.
-
-Fri Nov 20 13:06:49 1998 Nick Clifton <nickc@cygnus.com>
-
- * ldmisc.c (vfinfo): Cope with empty symbol names.
-
-Thu Nov 19 13:31:15 1998 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/pe.sc: Add provision of '_end' symbol.
-
-Wed Nov 18 18:18:43 1998 Geoffrey Noer <noer@cygnus.com>
+ * ld.h (ld_config_type): Add unique_orphan_sections.
+ * lexsup.c (OPTION_UNIQUE): Define.
+ (ld_options): Add "--unique".
+ (parse_args): Handle it.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
+ search for an existing output section if unique_orphan_sections is
+ set. Make use of bfd_get_unique_section_name rather than
+ duplicating code here.
+ * ld.texinfo: Describe --unique.
- * configure.tgt: change refs from cygwin32* to cygwin*.
- * aclocal.m4: regenerate
- * configure.in: don't need to call AM_CYGWIN32.
- * configure: regenerate
+ * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
+ optional arg to split-by-file.
+ (parse_args): Handle them.
+ * ld.texinfo: Update description of these options.
+ * ldwrite.c (clone_section): Pass in the section name. Replace
+ local code with bfd_get_unique_section_name.
+ (split_sections): Tidy code and comments. Use a list traversal
+ more appropriate to the list construction. Handle cooked section
+ sizes. Split when split_by_reloc reached rather than exceeded.
+ Track section size and split when split_by_file reached. Fix
+ link_order_tail (even though it's not used).
+ (ldwrite): Modify condition for calling split_sections to suit
+ changed split_by_reloc and split_by_file.
+ * ldmain.c (main): Init config.split_by_reloc and
+ config.split_by_file to -1.
+ * ld.h (ld_config_type): Change split_by_reloc to unsigned.
+ Change split_by_file to bfd_size_type.
+
+2000-09-02 Nick Clifton <nickc@redhat.com>
+
+ * configure.in: Increase version number to 2.10.91.
+ * NEWS: Mention new ability to support removal of duplicate DWARF2
+ debug information.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
-Mon Nov 16 22:14:07 1998 DJ Delorie <dj@cygnus.com>
+2000-09-02 Daniel Berlin <dberlin@redhat.com>
- * emultempl/pe.em (gld_i386_finish): generate import library
- * deffile.h: add hint member.
- * pe-dll.c (pe_dll_generate_implib): New function with helpers;
- generates the import library directly from the export table.
- (fill_edata): remember the actual hint for the import library.
+ * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
+ sections.
+ * scripttempl/elf32avr.sc: Ditto.
+ * scripttempl/elfd10v.sc: Ditto.
+ * scripttempl/elfd30v.sc: Ditto.
+ * scripttempl/elfi370.sc: Ditto.
+ * scripttempl/elfm68hc11.sc: Ditto.
+ * scripttempl/elfm68hc12.sc: Ditto.
+ * scripttempl/elfi386beos.sc: Ditto.
+ * scripttempl/v850.sc: Ditto.
-Sat Nov 14 14:36:24 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
- * ld.1: Some cleanups from NOKUBI Hirotaka <hnokubi@yyy.or.jp>.
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
-Thu Nov 12 19:21:57 1998 Dave Brolley <brolley@cygnus.com>
+2000-08-25 Nick Clifton <nickc@redhat.com>
- * po/ld.pot: Regenerated.
- * po/POTFILES.in: Regenerated.
- * configure: Regenerated.
- * aclocal.m4: Regenerated.
- * Makefile.in: Regenerated.
+ * ldlang.c (open_output): When choosing the target for a
+ particular endianness, do nothing if the target is not
+ supported.
-Wed Nov 11 18:10:15 1998 DJ Delorie <dj@cygnus.com>
+2000-08-25 H.J. Lu <hjl@gnu.org>
- * pe-dll.c (generate_reloc): don't output PE relocs for sections
- that won't be loaded.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
+ check -rpath nor LD_RUN_PATH for cross link.
+ * ld.texinfo: Document the change.
-Wed Nov 11 13:44:54 1998 DJ Delorie <dj@cygnus.com>
+2000-08-24 Hans-Peter Nilsson <hp@axis.com>
- * pe-dll.c (fill_edata): don't strip underscores
+ * NEWS: Mention support for CRIS.
-Tue Nov 10 21:28:19 1998 DJ Delorie <dj@cygnus.com>
+2000-08-23 H.J. Lu <hjl@gnu.org>
- * ld.texinfo: added i386pe option summary
+ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
+ the current runpath list from bfd_elf_get_runpath_list ()
+ before search.
-Tue Nov 10 17:53:17 1998 DJ Delorie <dj@cygnus.com>
+2000-08-22 H.J. Lu <hjl@gnu.org>
- * pe-dll.c (process_def_file): properly note undefined exported
- symbols, clean up old code.
- (pe_dll_generate_def_file): don't crash if pe_def_file is NULL
- * emultempl/pe.em (gld_i386_parse_args): add
- (en/dis)able-stdcall-fixups
- (pe_fixup_stdcalls): warn about stdcall fixups
- (gld_i386_unrecognized_file): make exported symbols undefs so that
- archive members get pulled in
+ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
+ the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
+ LD_LIBRARY_PATH for native linker. Display the needed DSO if
+ trace_file_tries is non-zero.
+ (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
+ if trace_file_tries is non-zero.
-Tue Nov 10 14:50:51 1998 Catherine Moore <clm@cygnus.com>
+ * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
+ * NEWS: Mention it.
- * scripttempl/elfd10v.sc: Add KEEP attribute to .init,
- .fini, .dtors and .ctors. Add .data and .text
- wildcards to support section garbage collection.
+2000-08-14 Jason Eckhardt <jle@cygnus.com>
-Mon Nov 9 22:52:50 1998 DJ Delorie <dj@indy.delorie.com>
+ * NEWS: Mention i860 support.
- * deffilep.y: properly handle relocs with multiple def_files,
- cache import module names
+2000-08-14 Andreas Schwab <schwab@suse.de>
-Mon Nov 9 22:44:58 1998 DJ Delorie <dj@cygnus.com>
+ * scripttempl/elf.sc: Fix last change to use correct comment
+ syntax.
- * pe-dll.c (process_def_file): don't assume exports won't move
- during a realloc
+2000-08-10 Geoff Keating <geoffk@cygnus.com>
-Mon Nov 9 16:41:30 1998 DJ Delorie <dj@cygnus.com>
+ * scripttempl/elf.sc: Add a comment giving the correspondence
+ between sections, per-datum sections, and linkonce sections. Make
+ the comment true even for .bss, .sdata, .sdata2, .sbss, and
+ .sbss2.
- * pe-dll.c: New file; direct support for PE DLLs
- * deffile.h: New file; direct support for PE DLLs
- * deffilep.y: New file; direct support for PE DLLs
- * emultempl/pe.em: add direct support for PE DLLs
- * configure.tgt: allow target-specific extra files
- * configure.in: allow target-specific extra files
- * ldlang.c (lang_add_assignment): return the assignment so that
- one can change the value later based on the object files (pe-dll
- DEF files do this)
- * ldint.texinfo: add section for emulation walkthrough
- * Makefile.am: add new files and target-specific extra files
- * emultempl/pe.em (gld_i386_list_options): list dll-specific
- options.
- * pe-dll.c (process_def_file): auto-export everything if
- nothing is otherwise exported.
-
-Wed Nov 4 16:39:18 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-10 Jason Eckhardt <jle@cygnus.com>
- * Makefile.am: Add support for FR30 target.
- * configure.tgt: Add support for FR30 target.
+ * emulparams/elf32_i860.sh: New file.
+ * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
+ * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
+ (eelf32_i860.c): New rule.
* Makefile.in: Regenerate.
- * emulparams/fr30.sh: New file.
- * scripttemp/fr30.sc: New file.
-
-Mon Nov 2 14:47:15 1998 Catherine Moore <clm@cygnus.com>
-
- * ldmain.c (main): Don't report error for dynamic links and
- --gc-sections.
-
-1998-10-26 16:05 Ulrich Drepper <drepper@cygnus.com>
-
- * lexsup.c (ld_options): Change text of -O to Optimize output file".
- (parse_args): Set link_info.optimize based on -O argument.
- * ldmain.c (main): Initialize link_info.optimze to false.
- * ld.texinfo: Describe -O option.
- * ld.1: Likewise.
-
-Mon Oct 12 14:29:56 1998 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/v850.sc: Move .sbss and .scommon sections into their
- own segment, so that they can be next to the .bss section and so
- initialised by the same piece of code.
-
-Fri Oct 9 15:59:52 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elf.sc: Merge .sdata.* etc sections.
- * ldctor.c (ldctor_build_sets): Set SEC_KEEP for
- ctor sections.
-
-Mon Oct 5 09:40:43 1998 Catherine Moore <clm@cygnus.com>
-
- * ldmain.c (main): Error if --gc-sections and
- dyanmic linking.
- * scripttempl/v850.sc: Add KEEP attribute to .init,
- .fini, .dtors and .ctors. Add .data and .text
- wildcards to support section garbage collection.
-
-Wed Sep 30 11:19:15 1998 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/v850.sc: Rename .call_table section to
- .call_table_data and create a new section called
- .call_table_text.
-
-Sun Sep 20 00:43:26 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Add alignment at the end of the .bss
- section, so that it is included in the memsize of the segment.
-
-Fri Sep 18 13:42:42 1998 Catherine Moore <clm@cygnus.com>
-
- * emultempl/elf32.em (gld_place_orphan): Don't process for
- sections with SEC_EXCLUDE flag.
-
-Fri Sep 4 09:24:02 1998 Nick Clifton <nickc@cygnus.com>
-
- * emulparams/d30velf.sh (TEXT_SIZE): Increased to 2000K.
- (DATA_SIZE): Increased to 2000K.
-
-Thu Sep 3 17:30:58 1998 Richard Henderson <rth@cygnus.com>
-
- * emulparams/d10velf.sh (TEMPLATE_NAME): Use elf32.
-
-Mon Aug 31 01:06:00 1998 Catherine Moore <clm@cygnus.com>
-
- * Makefile.am: Change armelf.sc to elf.sc
- * Makefile.in: Regenerate.
-
-Mon Aug 31 11:12:04 1998 Catherine Moore <clm@cygnus.com>
-
- * emulparams/armelf.sh: Change SCRIPT_NAME to
- elf. Change TEXT_START_ADDR to 0x8000. Define
- OTHER_TEXT_SECTIONS, OTHER_BSS_SYMBOLS and
- OTHER_BSS_END_SYMBOLS.
- * scripttempl/elf.sc: Modify to use
- OTHER_BSS_END_SYMBOLS.
- * scripttempl/elfarm.sc: Remove file.
-
-Tue Aug 18 12:05:34 1998 Catherine Moore <clm@cygnus.com>
-
- * emultempl/armelf.em (gld_armelf_before_allocation):
- Add bfd_ prefix to elf32_arm_process_before_allocation
- and elf32_arm_allocate_interworking_sections.
- (gld_armelf_after_open): Add bfd_ prefix to
- elf32_arm_get_bfd_for_interworking.
-
-Fri Aug 14 15:34:29 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
-
- * ldgram.y: Include "ldctor.h".
- (statement): Accept SORT around CONSTRUCTORS.
- * ldctor.c: Include <ctype.h>.
- (constructors_sorted): New global variable.
- (ctor_prio, ctor_cmp): New static functions.
- (ldctor_build_sets): Sort constructors if requested.
- * ldctor.h (constructors_sorted): Declare.
- * ldlang.c (print_statement): Print sorted CONSTRUCTORS
- correctly.
- * scripttempl/elf.sc: Add sort around CONSTRUCTORS.
- * ld.texinfo (Output Section Keywords): Document SORT
- (CONSTRUCTORS).
-
-Thu Aug 13 12:20:39 1998 Catherine Moore <clm@cygnus.com>
-
- * emulparams/armelf.sh: Define TEMPLATE_NAME to armelf.
- * scripttempl/elfarm.sc: Include .glue_7t and .glue7
- sections.
- * emultempl/armelf.em: New file.
-
-Thu Aug 13 12:52:45 1998 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (ld.dvi): Use " instead of ' for MAKEINFO.
- * Makefile.in: Rebuild.
-
-Tue Aug 11 16:17:01 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elfarm.sc: Change text start address
- back to zero.
-
-Tue Aug 11 10:01:12 1998 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/mn10200.sh (MAX_PAGESIZE): Define to 1.
- * emulparms/mn10300.sh (MAX_PAGESIZE): Define to 1.
-
-Sun Aug 9 20:31:27 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elfarm.sc: Set text start address to
- 0x8000. Add __bss_end definition.
-
-Sat Aug 1 11:47:37 1998 Catherine Moore <clm@cygnus.com>
-
- * scripttempl/elfarm.sc: New file.
- * emulparams/armelf.sh: Set SCRIPT_NAME to elfarm.
-Fri Jul 31 15:56:16 1998 Catherine Moore <clm@cygnus.com>
+2000-08-10 Nick Clifton <nickc@cygnus.com>
- * emulparams/armelf.sh: New file.
- * configure.tgt: Recognize thumb-elf and arm-elf.
- * Makefile.am (earmelf.o): New.
- * Makefile.in: Rebuild.
+ * emulparams/mipspe.sh (ENTRY): Add definition.
-Fri Jul 24 12:00:57 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-08-08 Peter Jeremy <peter.jeremy@alcatel.com.au>
- * Makefile.am (install-exec-local): Don't remove the file before
- checking whether $(bindir) == $(tooldir)/bin. From Maciej
- W. Rozycki <macro@ds2.pg.gda.pl>.
- * Makefile.in: Rebuild.
-
- * configure.tgt: Recognize h8[35]00*-coff* as well as -hms*.
-
-Thu Jul 23 11:15:12 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/aout.sc: If ALIGNMENT is defined, use it to set
- alignment of end symbol.
- * scripttempl/elf.sc: Likewise.
- * emulparams/sun4.sh (ALIGNMENT): Define.
- * emulparams/elf32_sparc.sh (ALIGNMENT): Define.
- * ldint.texinfo (emulation parameters): Document ALIGNMENT.
+ * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
+ in error message.
- * lexsup.c (parse_args): Add missing break statement.
+2000-08-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
- * ldlang.c (lang_gc_sections_1): Add default case to switch to
- avoid warnings.
+ * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
+ the final size of .bss section.
+ * scripttempl/elfm68hc12.sc: Likewise.
-Tue Jul 14 15:42:17 1998 Richard Henderson <rth@cygnus.com>
+2000-08-04 Alan Modra <alan@linuxcare.com.au>
- * configure.tgt (i?86-*-beos{pe,elf,}*): Recognize.
- * Makefile.am (ei386beos.o): New.
- * emulparams/i386beos.sh: New file.
- * emultempl/beos.em, scripttempl/i386beos.sc: New file.
+ * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
+ gld${EMULATION_NAME}_parse_args for consistency. Combine
+ lastoptind and prevoptind vars, and keep track of last optind.
+ (gld_${EMULATION_NAME}_list_options): Rename to
+ gld${EMULATION_NAME}_list_options.
-Tue Jul 14 15:35:42 1998 Richard Henderson <rth@cygnus.com>
+2000-08-03 Rodney Brown <RodneyBrown@pmsc.com>
- * lexsup.c: New option --version-exports-section.
- * ld.h (struct args_type): Add version_exports_section.
- * ldlang.c (lang_do_version_exports_section): New function.
- (lang_process): Call it.
+ * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
+ (i586-sco-sysv5uw7.1.0).
-Mon Jul 13 13:20:23 1998 Steve Chamberlain <sac@transmeta.com>
+2000-07-27 H.J. Lu <hjl@gnu.org>
- * ldlex.l: Accept ASSERT.
- * ldgram.y (exp): Add ASSERT_K case.
- * ldexp.h (node_type): Add etree_assert to node_class enum.
- (etree_type): Add assert_s field.
- (exp_assert): Declare.
- * ldexp.c (exp_fold_tree): Handle etree_assert.
- (exp_assert): New function.
- (exp_print_tree): Handle etree_assert.
- * ld.texinfo (Miscellaneous Commands): Document ASSERT.
+ * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
+ (PARSE_AND_LIST_PROLOGUE): New.
+ (PARSE_AND_LIST_LONGOPTS): Likewise.
+ (PARSE_AND_LIST_OPTIONS): Likewise.
+ (PARSE_AND_LIST_ARGS_CASES): Likewise.
+ (PARSE_AND_LIST_EPILOGUE): Likewise.
-Wed Jul 8 14:03:12 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-28 Alan Modra <alan@linuxcare.com.au>
- * ldgram.y: Change MAX to MAX_K and MIN to MIN_K, to avoid
- conflicts with system header files. Change all uses.
+ * emultempl/armelf.em: Elide functions common to elf32.em,
+ ie. most of the file.
+ (arm_elf_after_open): New. Do arm specific things then call
+ gld${EMULATION_NAME}_after_open.
+ (arm_elf_before_allocation): New. Call
+ gld${EMULATION_NAME}_before_allocation then do arm specifics.
+ (PARSE_AND_LIST_PROLOGUE): Define.
+ (PARSE_AND_LIST_SHORTOPTS): Define.
+ (PARSE_AND_LIST_LONGOPTS): Define.
+ (PARSE_AND_LIST_OPTIONS): Define.
+ (PARSE_AND_LIST_ARGS_CASES): Define.
+ (LDEMUL_AFTER_OPEN): Define.
+ (LDEMUL_BEFORE_ALLOCATION): Define.
+ (LDEMUL_BEFORE_PARSE): Define.
+ (LDEMUL_FINISH): Define.
+
+ * emultempl/hppaelf.em: Similarly zap most of this file.
+ (hppaelf_add_stub_section): Prototype.
+ (hppaelf_layaout_sections_again): Prototype.
+ (hook_in_stub): Prototype.
+ (LDEMUL_SET_OUTPUT_ARCH): Define.
+ (LDEMUL_FINISH): Define.
+ (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
+
+ * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
+ (EXTRA_EM_FILE): New.
+ * emulparams/armelf_linux.sh: Likewise.
+ * emulparams/armelf_linux26.sh: Likewise.
+ * emulparams/hppalinux.sh: Likewise.
+ * emulparams/hppaelf.sh: Likewise.
+ (NOP): Define.
+
+ * emultempl/elf32.em: Fix formatting.
+ (EXTRA_EM_FILE): Source it.
+ (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
+ LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
+ LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
+ LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
+ LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
+ LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
+ LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
+ LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
+ LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
+ allow functions in this file to be overridden.
+ (PARSE_AND_LIST_SHORTOPTS): Handle it.
+
+ * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
+
+ * emultempl/elf32.em: Reorganize file.
+
+2000-07-27 Ivan Kokshaysky <ink@jurassic.park.msu.ru>
+
+ * emulparams/elf64alpha.sh: Implement "-taso" emulation
+ specific option to fit 64-bit executable in the lower
+ 31-bit address range. This is done by changing start
+ address of .interp (the very first section of executable)
+ and then setting EF_ALPHA_32BIT elf header flag.
+
+2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * emultempl/m68kcoff.em: New file.
+ * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
+ * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
+ generic.em.
+ * Makefile.in: Regenerate.
- * Makefile.am (MAINTAINERCLEANFILES): Define.
- * Makefile.in: Rebuild.
+2000-07-20 H.J. Lu <hjl@gnu.org>
-Tue Jul 7 18:03:22 1998 Ian Lance Taylor <ian@cygnus.com>
+ * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
+ and "disable-new-dtags" to stop getopt from treating -d/-e as
+ abbreviations for these options.
- * Makefile.am (ldver.texi): New target.
- (ld.info, ld.dvi): Depend upon ldver.texi.
- * ld.texinfo: Include ldver.texi. Mention version number on title
- page and in top node.
- * Makefile.in: Rebuild.
+2000-07-20 H.J. Lu <hjl@gnu.org>
-Mon Jul 6 14:55:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (i[3456]86-*-solaris*): New target.
-
-Fri Jul 3 14:19:06 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wild_section): Don't get an assertion failure if the
- section is discarded.
-
- * scripttempl/pe.sc: Use SORT to sort sections appropriately.
- * emultempl/pe.em (sort_by_file_name): Remove.
- (sort_by_section_name): Remove.
- (sort_sections_1, sort_sections): Remove.
- (gld_${EMULATION_NAME}_before_allocation): Don't call
- sort_sections.
- (hold_section, hold_section_name): New static variables.
- (hold_use, hold_text, hold_rdata, hold_data, hold_bss): Likewise.
- (gld_${EMULATION_NAME}_place_orphan): Rewrite. Look for a good
- place to put the section. Align the section. Sort the input
- sections by name.
- (gld_${EMULATION_NAME}_place_section): New static function.
-
- * ldlang.c (wild_sort): When sorting by file name, sort by archive
- name first.
-
- * emultempl/pe.em (set_pe_subsystem): Don't call
- ldlang_add_undef.
- (gld_${EMULATION_NAME}_after_parse): New static function.
- (ld_${EMULATION_NAME}_emulation): Use new after_parse function
- rather than after_parse_default.
-
- * ldgram.y (extern_name_list): Do not require symbols to be
- separated by commas.
- (ifile_p1): Add EXTERN.
- * ldlex.l: Accept EXTERN in BOTH and SCRIPT mode as well as MRI
- mode.
- * ld.texinfo (Options): Mention that EXTERN is equivalent to -u.
- (Miscellaneous Commands): Document EXTERN.
-
-Wed Jul 1 19:40:34 1998 Richard Henderson <rth@cygnus.com>
-
- * ld.h (args_type): Add gc_sections.
- * ldgram.y (ldgram_had_keep, KEEP): New.
- (input_section_spec_no_keep): Rename from old input_section_spec.
- (input_section_spec): New. Recognize KEEP.
- * ldlang.c (wild_section): Handle keep sections.
- (lang_gc_wild_section, lang_gc_wild_file, lang_gc_wild): New.
- (lang_gc_sections_1, lang_gc_sections): New.
- (lang_process): Invoke lang_gc_sections.
- (lang_add_wild): Add keep argument. Update all callers.
- * ldlang.h (lang_wild_statement_struct): Add keep_sections.
- * ldlex.l (KEEP): Match it.
- * ldmain.c (main): Error on -r and --gc-sections.
- * lexsup.c: Add --gc-sections.
-
- * scripttempl/elf.sc: Merge .text.* etc sections appropriately.
- Mark startup sections with KEEP.
- * scripttempl/elfppc.sc: Likewise.
-
- * ld.texinfo: Update for --gc-sections and KEEP.
-
-Wed Jul 1 15:21:20 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From Peter Jordan <pjordan@chla.usc.edu>:
- * scripttempl/i386go32.sc: Correct constructor handling for -u.
-
-Tue Jun 23 15:17:27 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (install-data-local): Make ldscripts subdirectory.
- * Makefile.in: Rebuild.
+ * ld.texinfo: Add documentation for --disable-new-dtags and
+ --enable-new-dtags.
-Tue Jun 23 15:17:04 1998 Mike Stump <mrs@wrs.com>
+ * ldmain.c (main): Initialize link_info.new_dtags to false.
- * Makefile.am (install-exec-local): Don't let EXEEXT interfere
- with the program transform name.
- * Makefile.in: Rebuild.
+ * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
+ --disable-new-dtags and --enable-new-dtags.
+ (gld_${EMULATION_NAME}_list_options): Likewise.
-Sun Jun 21 23:55:16 1998 Jeffrey A Law (law@cygnus.com)
+2000-07-05 Kenneth Block <krblock@computer.org>
- * ld.texinfo: Note that -relax may make symbolic debugging
- impossible on some platforms.
+ * lexsup.c: Add optional style to demangle switch
+ * ld.texinfo: Document optional style to demangle switch.
-Tue Jun 16 12:51:13 1998 Geoff Keating <geoffk@ozemail.com.au>
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
- * Makefile.am (Makefile): Remove target.
- (config.status): New target.
+ * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
+ ecrislinux.o.
+ (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
+ Regenerate dependencies.
* Makefile.in: Rebuild.
+ * configure.tgt (cris-*-*): New target.
+ * emulparams/crisaout.sh, emulparams/criself.sh,
+ emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
+ * po/POTFILES.in, po/ld.pot: Regenerate.
- * configure.host (powerpc*-*-linux-gnu*): New host.
+2000-07-20 H.J. Lu <hjl@gnu.org>
-Fri Jun 12 17:38:07 1998 Doug Evans <devans@seba.cygnus.com>
+ * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
+ Print out ignored -z options.
- * scripttempl/elf.sc (INPUT_FILES): Optional INPUT spec.
+2000-07-19 H.J. Lu <hjl@gnu.org>
- * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Change top of
- stack to 8MB.
+ * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
+ (PARSE_AND_LIST_PROLOGUE): New.
+ (PARSE_AND_LIST_LONGOPTS): Likewise.
+ (PARSE_AND_LIST_OPTIONS): Likewise.
+ (PARSE_AND_LIST_ARGS_CASES): Likewise.
-Fri Jun 12 19:33:17 1998 Ian Lance Taylor <ian@cygnus.com>
+ * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
- * Makefile.am (HFILES): Remove config.h.
- (EMULATION_OFILES, POTFILES): Move patch of May 14 from
- Makefile.in to Makefile.am.
- (earmcoff.c): Depend upon armcoff.em, not generic.em.
- * po/Make-in (all-yes): Correct misspelling in $(PACKAGE).
- ($(srcdir)/$(PACKAGE).pot): Pass -C to $(XGETTEXT).
- * Makefile.in, po/POTFILES.in, po/ld.pot: Rebuild.
+ * lexsup.c (ld_options): Comment out 'z'.
+ (parse_args): Likewise.
-Fri Jun 12 13:43:17 1998 Tom Tromey <tromey@cygnus.com>
+ * emultempl/elf32.em: Include "elf/common.h".
+ (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
+ options.
+ (gld_${EMULATION_NAME}_list_options): Likewise.
- * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
- ($(PACKAGE).pot): Unconditionally depend on POTFILES.
+ * ld.texinfo: Add documentation for the recognized -z options.
-Tue Jun 9 09:36:48 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-19 H.J. Lu <hjl@gnu.org>
- * ldlang.c (lang_finish): Add CONST type modifier to declaration
- of 'send'.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
+ bfd_elf_set_dt_needed_soname ().
-Fri Jun 5 18:19:59 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-18 DJ Delorie <dj@cygnus.com>
- * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Set
- config.has_shared to true.
- * emultempl/linux.em (gld${EMULATION_NAME}_before_parse):
- Likewise.
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse):
- Likewise.
+ * pe-dll.c (pe_dll_id_target): check object target name also
-Tue Jun 2 12:55:03 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-18 Hans-Peter Nilsson <hp@axis.com>
- * ldlang.c (lang_finish): If the entry symbol is not found, try
- parsing it as a number.
- * ld.texinfo (Options): Document this.
+ * scripttempl/elf.sc (.init): Only do ${INIT_START} and
+ ${INIT_END} if relocating.
+ (.fini): Likewise ${FINI_START} and ${FINI_END}.
-Mon Jun 1 14:01:20 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-16 Charles Wilson <cwilson@ece.gatech.edu>
- * ld.texinfo (Input Section Wildcards): Document SORT keyword.
+ * emultempl/pe.em (gld_*_open_dynamic_archive): New search
+ order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
+ foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
+ errors introduced by the old dynamic lib search order.
-Mon May 18 12:42:53 1998 Doug Evans <devans@canuck.cygnus.com>
+2000-07-17 DJ Delorie <dj@cygnus.com>
- * ld.h (ld_config_type): New member has_shared.
- * ldmain.c (main): Initialize it.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set it.
- * lexsup.c (parse_args): Treat -shared as error if not supported.
+ * pe-dll.c (process_def_file): auto-export data items also
+ (pe_process_import_defs): also see if _imp_ form needed
-Mon May 18 13:14:43 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
- From Jason Merrill <jason@cygnus.com>:
- * ldlang.c (wild_sort): Correct order of sort.
- * scripttempl/elf.sc: Put *crtbegin.o before other .ctors and
- .dtors.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfppc.sc: Likewise.
+ * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
+ for dll import libraries
-Fri May 15 00:22:35 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-12 Mark Elbrecht <snowball3@bigfoot.com>
- * ldlex.l: Recognize keyword SORT.
- * ldgram.y (current_file): Change to struct wildcard_spec.
- (%union): Add new fields cname and wildcard.
- (wildcard_name, wildcard_spec): New nonterminals.
- (file_NAME_list): Use wildcard_spec.
- (input_section_spec): Change current_file usage.
- * ld.h (struct wildcard_spec): Define.
- * ldlang.h (lang_wild_statement_struct): Add new fields
- sections_sorted and filenames_sorted.
- (lang_add_wild): Update declaration.
- * ldlang.c (wild_sort): New static function.
- (wild_section): Use wild_sort.
- (print_wild_statement): Print sorting information.
- (lang_add_wild): Add new parameters sections_sorted and
- filenames_sorted. Change all callers.
- * mri.c (mri_draw_tree): Update calls to lang_add_wild.
- * scripttempl/elf.sc: Sort .ctors.* and .dtors.* by section name.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/elfd30v.sc: Likewise.
- * scripttempl/elfppc.sc: Likewise.
+ * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
+ gcc 2.95.2 and later.
-Thu May 14 18:39:16 1998 Richard Henderson <rth@cygnus.com>
+2000-07-11 Kazu Hirata <kazu@hxi.com>
- * emulparams/m32relf.sh (TEMPLATE_NAME): Define.
+ * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
+ message.
-Thu May 14 14:51:24 1998 Nick Clifton <nickc@cygnus.com>
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
- * ldemul.h: Add new prototype: ldemul_list_emulation_options.
- (ld_emulation_xfer_struct): Add new field: list_options.
- * ldemul.c (ldemul_list_options): New function. Call the
- list_options field of the ld_emulation_xfer_struct for each
- supported emulation, if such a function is present.
- * lexsup.c (help): Call ldemul_list_emulation_options.
- * emultempl/pe.em (gld_<>_list_options): New function. Describe
- the pe emulation specific command line options.
- * emultempl/armcoff.em (gld<>_list_options): New function.
- Describe the armcoff emulation specific command line options.
+ * ldemul.h (struct lang_input_statement_struct): Remove forward
+ declaration.
+ (struct search_dirs): Likewise.
+ * ldfile.h (struct lang_input_statement_struct): Likewise.
+ Protect file from multiple inclusion.
+ * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
+ declaration from macro to file scope.
+
+ * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
+ * ldgram.y: Likewise here.
+ * ldlang.c: And here.
+ * ldmain.c: And here.
+ * mpw-elfmips.c: And here.
+ * mpw-eppcmac.c: And here.
+ * emultempl/aix.em: And here.
+ * emultempl/armcoff.em: And here.
+ * emultempl/armelf.em: And here.
+ * emultempl/armelf_oabi.em: And here.
+ * emultempl/beos.em: And here.
+ * emultempl/elf32.em: And here.
+ * emultempl/hppaelf.em: And here.
+ * emultempl/linux.em: And here.
+ * emultempl/lnk960.em: And here.
+ * emultempl/pe.em: And here.
+ * emultempl/sunos.em: And here.
+ * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
+ * mpw-idtmips.c: Ditto.
+ * emultempl/generic.em: Ditto.
+ * emultempl/gld960.em: Ditto.
+ * emultempl/gld960c.em: Ditto.
+ * emultempl/mipsecoff.em: Ditto.
+ * emultempl/ticoff.em: Ditto.
+ * emultempl/vanilla.em: Ditto.
+
+ * pe-dll.c: Include ldfile.h
+ * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
+
+ * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
+ arguments to bfd_elf32_size_dynamic_sections call.
+ (gldelf32ebmip_place_orphan): Add missing arguments to
+ lang_leave_output_section_statement call.
+
+2000-07-10 H.J. Lu <hjl@gnu.org>
+
+ * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
+ DLL_SUPPORT.
+ (strhash): Likewise.
+ (compute_dll_image_base): Likewise.
+ (pe_undef_found_sym): Likewise.
+ (pe_undef_cdecl_match): Likewise.
+ (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
+ argument "arch" with ATTRIBUTE_UNUSED.
+
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
+
+ From Ryan Bradetich <rbradetich@uswest.net>
+ * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
+
+2000-07-09 Alan Modra <alan@linuxcare.com.au>
+
+ Changes to create multiple linker stubs, positioned immediately
+ before the section where they are required.
+ * emultempl/hppaelf.em: Include elf32-hppa.h.
+ (stub_sec, file_chain): Delete.
+ (hppaelf_create_output_section_statements): Don't make a stub
+ section here.
+ (hook_stub_info): New struct.
+ (hook_in_stub): New function.
+ (hppaelf_add_stub_section): New function.
+ (hppaelf_finish): Do nothing for relocateable links. Modify the
+ call to elf32_hppa_size_stubs. Move code for updating section
+ layout from here...
+ (hppaelf_layaout_sections_again): ..to here, a new function.
+
+ * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
+ broken list handling. Pass in a pointer to the list.
+ (hppaelf_finish): Update call to hppaelf_delete_padding_statements
+ for above changes.
+ (hppaelf_before_parse): Prototype.
+ (hppaelf_set_output_arch): Prototype.
+ (hppaelf_create_output_section_statements): Prototype.
+ (hppaelf_delete_padding_statements): Prototype.
+ (hppaelf_finish): Prototype.
+
+ Merge from elf32.em
+ * emultempl/hppaelf.em: Include ctype.h.
+ (struct orphan_save): New.
+ (gld${EMULATION_NAME}_place_orphan): New.
+ (output_rel_find): New.
+ (hppaelf_get_script): Update from elf32.em.
+ (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
+ Change emulation_name field to "${EMULATION_NAME}". Add
+ gld${EMULATION_NAME}_place_orphan.
+
+ * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
+ ehppalinux.o, sort it. Regenerate dependencies.
+ (ehppalinux.c): Depend on hppaelf.em
+ * Makefile.in: Regenerate.
- * emultempl/pe.em: Add a new command line option:
- --support-old-code.
- * emultempl/armcoff.em: Ditto.
- * ld.texinfo: Document the --support-old-code option.
+ * configure.tgt: targ_emul=hppalinux for hppa*linux
- * Makefile.in: Add emulation files for POTFILES.in target.
- * emultempl/pe.em: Internationalise suitable strings.
- * emultempl/armcoff.em: Internationalise suitable strings.
- * po/POTFILES.in: Rebuilt.
+ * emulparams/hppalinux.sh: New.
+ * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
-Sun May 10 22:36:30 1998 Jeffrey A Law (law@cygnus.com)
+2000-07-08 Alan Modra <alan@linuxcare.com.au>
- * po/Make-in (install-info): New target.
+ * lexsup.c (parse_args): Copy section name.
-Tue Apr 28 19:18:30 1998 Tom Tromey <tromey@cygnus.com>
+2000-07-07 Charles Wilson <cwilson@ece.gatech.edu>
- * ldmain.c (main): Conditionally call setlocale.
- * ld.h: Include <locale.h> if HAVE_LOCALE_H.
- (LC_MESSAGES): Now can be defined even when ENABLE_NLS.
-
-Mon Apr 27 11:56:21 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Change version number to 2.9.4
- * configure: Rebuild.
+ * emultempl/pe.em: institute the following search order for
+ dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
+ libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
+ static lib (libfoo.a) if none of the above are found.
- * ld.texinfo (Options) [-rpath-link]: Mention ld.so.conf.
+2000-07-07 Mumit Khan <khan@xraylith.wisc.edu>
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * emultempl/elf32.em (global_vercheck_needed): New file static
- variable.
- (global_vercheck_failed): New file static variable.
- (gld${EMULATION_NAME}_after_open): Check for shared libraries
- twice, once with force set to 0 and once with it set to 1.
- (gld${EMULATION_NAME}_check_ld_so_conf): Add force parameter.
- Change all callers.
- (gld${EMULATION_NAME}_search_needed): Likewise.
- (gld${EMULATION_NAME}_try_needed): Likewise. If not force, check
- whether the libraries needs any incompatible versions.
- (gld${EMULATION_NAME}_vercheck): New static function.
+ * emultempl/pe.em (pe_enable_auto_image_base): New variable.
+ (longopts): New --{enable,disable}-auto-image-base options.
+ (gld_${EMULATION_NAME}_list_options): Document.
+ (gld_${EMULATION_NAME}_parse): Handle.
+ (strhash): New static function.
+ (compute_dll_image_base): New static function.
+ (gld_${EMULATION_NAME}_set_symbols): Use.
-Wed Apr 22 16:01:35 1998 Tom Tromey <tromey@cygnus.com>
+2000-07-05 DJ Delorie <dj@redhat.com>
- * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
+ * MAINTAINERS: new
-Wed Apr 22 12:40:56 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-01 Koundinya K <kk@ddeorg.soft.net>
- * Makefile.am (check-DEJAGNU): Add $(INTLLIBS) to LIBIBERTY when
- invoking runtest.
+ * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
+ * emulparams/elf32btsmip.sh: New file.
+ * Makefile.am: Add traditional mips target.
* Makefile.in: Rebuild.
- * lexsup.c (parse_args): Change -l options into --library options
- to avoid confusion between -li and -library.
-
- * ld.texinfo (MEMORY): Clarify use of >REGION.
-
-Tue Apr 21 23:12:40 1998 Tom Tromey <tromey@scribbles.cygnus.com>
-
- * Many files: Added gettext invocations around user-visible
- strings.
- * ld.h: Added gettext-related includes and defines.
- * ldmain.c: Call setlocale, bindtextdomain, textdomain.
- * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
- HAVE_LC_MESSAGES): Define.
- * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
- po/Makefile. Use AM_PROG_LEX.
- (TDIRS): AC_SUBST early on, to avoid having value split when it
- happens to cross line 90 of the generated sed script.
- * Makefile.am (SUBDIRS): New macro.
- (POTFILES): Likewise.
- (po/POTFILES.in): New target.
- (ld_new_LDADD): Added INTLLIBS.
- (ld_new_DEPENDENCIES): Added INTLDEPS.
- * po/Make-in, po/POTFILES.in, po/gas.pot: New files.
-
-Tue Apr 21 23:07:07 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Simple Example): Rewrite a few things as suggested
- by Nick Clifton <nickc@cygnus.com>.
- (PROVIDE): Likewise.
-
-Tue Apr 21 09:55:06 1998 Nick Clifton <nickc@cygnus.com>
-
- * emultempl/pe.em: Rename external arm interworking functions
- to conform to BFD naming conventions. Add code to _after_open()
- function to obtain a bfd for use by the interworking code.
-
- * emultempl/armcoff.em: Rename external arm interworking functions
- to conform to BFD naming conventions. Add new _after_open()
- function to obtain a bfd for use by the interworking code.
-
-Sun Apr 19 19:23:09 1998 Richard Henderson <rth@cygnus.com>
+2000-07-01 H.J. Lu <hjl@gnu.org>
- * ldlang.c (lang_size_sections) [case lang_assignment_statement_enum]:
- Update dot and the default memory section even when relaxing.
-
-Sat Apr 18 18:41:12 1998 Richard Henderson <rth@cygnus.com>
-
- * ldlang.c (lang_one_common): Manipulate the section's cooked size
- rather than its raw size.
-
-Tue Apr 7 13:35:29 1998 H.J. Lu <hjl@gnu.org>
-
- * configure.in (TESTBFDLIB): New. Defined and substituted.
- * Makefile.am (TESTBFDLIB): Changed to @TESTBFDLIB@.
- * configure, Makefile.in: Rebuild.
-
-Mon Apr 6 15:33:39 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (ld.info): Invoke makeinfo with -I options directly
- rather than relying on default rule. Don't depend upon
- bfdsumm.texi.
- (ld.dvi): Likewise.
- (bfdsumm.texi): Remove target.
- (CLEANFILES): Take bfdsumm.texi out of value.
+ * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
+ automake to use YLWRAP.
* Makefile.in: Rebuild.
-Sun Apr 5 13:07:57 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-07-01 Alan Modra <alan@linuxcare.com.au>
- * scripttempl/pe.sc: Use shell variables to avoid depending upon
- how $ is handled when expanding a shell substitution.
+ * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
+ (CLEANFILES): Add DEPA.
+ * Makefile.in: Regenerate.
-Fri Apr 3 00:56:50 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-30 Timothy Wall <twall@ppc>
- * Makefile.am (MOSTLYCLEANFILES): Add ld.log and ld.sum.
- (DISTCLEANFILES): Add site.exp and site.bak.
- * Makefile.in: Rebuild.
+ * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
+ the page in the upper octet of the address.
- * configure.in: Put the tdirs in a file and use AC_SUBST_FILE,
- rather than in a shell variable and using AC_SUBST.
- * Makefile.am (DISTCLEANFILES): Remove ldscripts. Add tdirs.
- (distclean-local): New target.
- * configure, Makefile.in: Rebuild.
+2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
- * ld.texinfo: Completely rewrite linker script documentation.
+ * emulparams/avrmega161.sh (ARCH): Change to avr:5.
-Mon Mar 30 12:47:33 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-24 Alan Modra <alan@linuxcare.com.au>
- * configure.in: Set version to 2.9.1.
- * configure: Rebuild.
+ * NEWS: arm-elf does --gc-sections too.
- * Branched binutils 2.9.
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
-Sat Mar 28 16:48:19 1998 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
+ find one.
+ * Makefile.in: Regenerate.
- * Makefile.am (MOSTLYCLEANFILES): Remove tmpdir.
- (mostlyclean-local): New target to remove tmpdir.
- * Makefile.in: Rebuild.
+2000-06-21 H.J. Lu <hjl@gnu.org>
- Fix some gcc -Wall warnings:
- * ldcref.c (output_cref): Add casts to avoid warnings.
- * ldfile.c (ldfile_add_arch): Likewise.
- * ldlang.c (lang_leave_overlay_section): Likewise.
- * lexsup.c (OPTION_COUNT): Likewise.
- (parse_args): Likewise.
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan):
- Likewise.
- * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Likewise.
- * ldlang.c (lang_check): Initialize variables to avoid warnings.
- * ldwrite.c (build_link_order): Likewise.
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Likewise.
- * emultempl/armcoff.em (gld${EMULATION_NAME}_before_allocation):
- Remove unused variables.
-
- * Makefile.am (MOSTLYCLEANFILES): Correct name (was
- MOSTCLEANFILES).
+ * Makefile.am: Rebuild dependency.
* Makefile.in: Rebuild.
-Fri Mar 27 16:39:25 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Put
- ARM code inside ifdef TARGET_IS_armpe.
-
-Wed Mar 25 11:34:13 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-20 H.J. Lu <hjl@gnu.org>
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * Makefile.am (LDDISTSTUFF): New variable.
- (diststuff): New target.
+ * Makefile.am: Rebuild dependency.
* Makefile.in: Rebuild.
- * scripttempl/pe.sc: Only include .idata\$[0-7] in .idata when
- relocating.
-
-Tue Mar 24 15:59:29 1998 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/pe.sc (.text): Add .glue_7 and .glue_7t sections to
- hold Arm/Thumb stubs.
-
- * emultempl/pe.em (gld_pe_before_allocation): Call
- arm_process_before_allocation (for ARM/Thumb targets) in order to
- gather interworking stb information.
-
-Mon Mar 23 18:54:15 1998 Joel Sherrill <joel@OARcorp.com>
-
- * configure.tgt: (sh*-*-rtems*): Switched from ELF to COFF.
-
-Fri Mar 20 19:17:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4, configure: Rebuild with libtool 1.2.
-
-Thu Mar 19 14:54:45 1998 Geoffrey Noer <noer@cygnus.com>
-
- * scripttempl/pe.sc: The Cygwin32 library uses a .data$nocopy
- section to avoid copying certain data on fork. The linker used to
- include this between __data_start__ and __data_end__, but that
- breaks building the cygwin32 dll. The fix is to rename the
- section ".data_cygwin_nocopy" and explictly include it after
- __data_end__.
-
-Wed Mar 18 09:42:24 1998 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt (targ_extra_emuls): Add thumb-pe target.
-
-Sun Mar 8 23:34:14 1998 Stan Cox <scox@equinox.cygnus.com>
-
- * configure.tgt (sparclite*-*-elf): Added.
-
-Mon Mar 2 19:24:08 1998 Michael Meissner <meissner@cygnus.com>
-
- * ldlang.c (lang_size_sections): If the default memory region is
- *default*, see if there is a memory region that could be used.
-
-Thu Feb 26 17:09:53 1998 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfd30v.sc: Add support for .eit_v section and put
- it at 0xfffff020.
- * emulparams/d30v{elf,_o,_e}.sh: Ditto.
-
-Mon Feb 23 17:46:51 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (sort_sections): Permit the wildcard to include
- a trailing '*' when sorting grouped sections.
- * scripttempl/pe.sc: Include grouped sections using NAME\$*. Only
- include them when relocating.
+2000-06-20 Timothy Wall <twall@cygnus.com>
-Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com>
+ * scripttempl/tic54xcoff.sc: New.
+ * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
+ * gen-doc.texi: Add flag for TI COFF.
+ * ld.texinfo: Add documentation for TI COFF handling switches.
+ * emultempl/ticoff.em: New. TI COFF handling.
+ * configure.tgt: Add tic54x target.
+ * Makefile.am: Add tic54x target.
+ * Makefile.in: Ditto.
- * Makefile.am (install-exec-local): Install properly when ln
- fails or tooldir == prefix.
+2000-06-20 Alan Modra <alan@linuxcare.com.au>
-Fri Feb 13 15:24:06 1998 Ian Lance Taylor <ian@cygnus.com>
+ * ldmain.c (set_scripts_dir): Correct pointer comparison when
+ checking for backslashes.
- * Makefile.am (AUTOMAKE_OPTIONS): Define.
- * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
+2000-06-19 Alan Modra <alan@linuxcare.com.au>
-Thu Feb 12 14:10:44 1998 Ian Lance Taylor <ian@cygnus.com>
+ * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
- * scripttempl/elf.sc: Align the _end symbol according to the ELF
- format size. From Gordon W. Ross <gwr@mc.com>.
-
- NetBSD patches from Gordon W. Ross <gwr@mc.com>:
- * configure.host (alpha*-*-netbsd*): New host.
- * configure.tgt (alpha*-*-netbsd*, powerpc-*-netbsd*): New
- targets.
-
- * lexsup.c (help): Update bug-gnu-utils address.
- * ld.texinfo (Bug Reporting): Likewise.
-
-Tue Feb 10 18:05:56 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): Warn if some memory regions were
- defined, but a loadable section is going into the default memory
- region.
+2000-06-18 Alan Modra <alan@linuxcare.com.au>
-Tue Feb 10 16:17:20 1998 H.J. Lu <hjl@gnu.org>
+ * NEWS: Update list of targets supporting --gc-sections.
- * ldlex.l (V_IDENTIFIER): Allow '.' as symbol prefix.
+ * scripttempl/elf.sc: KEEP .eh_frame contents.
+ * scripttempl/elfd30v.sc: Same here.
-Tue Feb 10 15:09:45 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
- * Makefile.am (Makefile): Add target, for dependencies on
- configure.host and configure.tgt.
- * configure.host, configure.tgt: Change -linux* to -linux-gnu*.
+ * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
+ and m68hc11 (elf).
* Makefile.in: Rebuild.
+ * configure.tgt: Recognize m68hc12 and m68hc11.
+ * scripttempl/elfm68hc12.sc: New file.
+ * emulparams/m68hc12elfb: New emulation.
+ * emulparams/m68hc12elf: New emulation.
+ * emulparams/m68hc11elfb.sh: New file. User configurable emulation
+ (includes a memory.x script to define the ROM and RAM banks).
+ * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
+ New configuration files for support of Motorola 68hc11
-Mon Feb 9 13:44:40 1998 Andrew Cagney <cagney@b1.cygnus.com>
+2000-06-15 Alan Modra <alan@linuxcare.com.au>
- * scripttempl/elfd10v.sc (.stack): Move stack to 0x00..7FFE.
+ * ldmain.c (main): Only change SEC_READONLY for final link.
- * emulparams/d10velf.sh (READONLY_START_ADDR): Read only section
- moved to 0x00.....4.
+2000-06-13 H.J. Lu <hjl@gnu.org>
-Sat Feb 7 15:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
+ * configure: Regenerate.
- * configure, aclocal.m4: Rebuild with new libtool.
+2000-06-08 David O'Brien <obrien@FreeBSD.org>
-Thu Feb 5 12:16:11 1998 Ian Lance Taylor <ian@cygnus.com>
+ * configure.in (VERSION): Update to show this is the CVS mainline.
- * scripttempl/pe.sc: Remove ${RELOCATING-0} from all sections.
- From Thomas de Lellis <tdel@wrs.com>.
+2000-06-07 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
+ * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
+ input objects to be ECOFF.
+ (check_sections): einfo takes %B, not %P, to print a BFD name.
-Wed Feb 4 13:02:32 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-06-05 Michael Matz <matz@ifh.de>
- * Makefile.am (ld_new_LDADD): Remove @LEXLIB@.
- * Makefile.in: Rebuild.
+ * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
+ version scripts.
-Mon Feb 2 19:34:54 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- Add tms320c30 support:
- * configure.tgt (tic30-*-*aout*, tic30-*-*coff*): New targets.
- * emulparams/tic30aout.sh: New file.
- * emulparams/tic30coff.sh: New file.
- * scripttempl/tic30aout.sc: New file.
- * scripttempl/tic30coff.sc: New file.
- * Makefile.am (ALL_EMULATIONS): Add etic30aout.o and
- etic30coff.o.
- (etic30aout.c, etic30coff.c): New targets.
- * Makefile.in: Rebuild.
+ * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
-Mon Feb 2 14:10:59 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-05-23 Marek Michalkiewicz <marekm@linux.org.pl>
- * configure.host: Correct HOSTING_CRT0 in alpha*-*-linux* case to
- accept either ld.so or ld-linux.so.
+ * emulparams/avr1200.sh (STACK): Define as 0.
+ * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
+ * emulparams/avr4433.sh (STACK): Likewise.
+ * emulparams/avr44x4.sh (STACK): Likewise.
+ * emulparams/avr85xx.sh (STACK): Likewise.
+ * emulparams/avrmega103.sh (STACK): Likewise.
+ * emulparams/avrmega161.sh (STACK): Likewise.
+ * emulparams/avrmega603.sh (STACK): Likewise.
+ * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
+ (__stack): Define from ${STACK} for main().
-Fri Jan 30 19:16:28 1998 Doug Evans <devans@canuck.cygnus.com>
+2000-05-26 Alan Modra <alan@linuxcare.com.au>
- * Makefile.am ({CC,CXX}_FOR_TARGET): Change program_transform_name
- to transform.
+ * Makefile.am: Update dependencies with "make dep-am"
* Makefile.in: Regenerate.
-Fri Jan 30 19:15:17 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * scripttempl/elfppc.sc: Put .dynsbss in .sbss.
-
-Fri Jan 30 11:43:49 1998 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * Makefile.am (eelf32bsmip.c, eelf32lsmip.c): New targets.
- * Makefile.in: Rebuild.
-
-Thu Jan 29 16:04:21 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * ldfile.c (slash): Set to backslash if _WIN32 but not
- __CYGWIN32__.
- (ldfile_open_file_search): If __MSDOS__ or _WIN32, accept a
- leading backslash or a leading x: as an absolute path.
- (ldfile_find_command_file): Use slash rather than / when
- generating name to try.
- * lexsup.c (PATH_SEPARATOR): Define.
- (set_default_dirlist): Use PATH_SEPARATOR rather than ':'.
-
-Wed Jan 28 14:06:30 1998 Richard Henderson <rth@cygnus.com>
-
- * emulparams/elf64_sparc.sh (ELFSIZE): 64
- (TEXT_START_ADDR): Round off, since SIZEOF_HEADERS is added later.
- (DATA_PLT): Needed by v9 abi.
-
-Wed Jan 28 16:37:27 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
-
- * configure.tgt (i[3456]86-*-mingw32*): New entry.
-
-Wed Jan 28 15:51:58 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Only include linkonce sections in final
- sections when relocating.
-
-Wed Jan 28 14:10:01 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Options): Add a brief description of the types of
- information included in a link map.
-
- * ld.texinfo (Options): Mention LDEMULATION in description of -m.
- (Environment): Mention LDEMULATION.
-
- * ld.texinfo (Options): Clarify --export-dynamic a bit.
-
-Thu Jan 22 16:07:23 1998 Richard Henderson <rth@cygnus.com>
-
- * ldlex.l (<SCRIPT>{WILDCHAR}*): Take care for the comments this
- pattern could match.
-
-Wed Jan 21 22:26:46 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): When doing
- a relocateable link, set the image base to 0, and don't define the
- various symbols.
- * emulparams/i386pe.sh (RELOCATEABLE_OUTPUT_FORMAT): Define.
- * scripttempl/pe.sc: Swap the .data and .bss sections so that
- .data comes first. If doing a relocateable link, use
- RELOCATEABLE_OUTPUT_FORMAT if it is defined, and start the
- sections at 0, and don't define any symbols.
-
- * ldlang.c (lang_memory_default): Correct parenthisization of
- expression.
-
-Wed Jan 21 21:20:32 1998 Manfred Hollstein <manfred@s-direktnet.de>
-
- * emultempl/sunos.em: Don't include sys/types.h and sys/stat.h
- here; they are included already via sysdep.h.
-
-Tue Jan 6 13:40:02 1998 Richard Henderson <rth@cygnus.com>
-
- * scripttempl/i960.sc: Don't explicitly set .data and .bss start.
-
-Fri Jan 2 20:15:37 1998 Michael Meissner <meissner@cygnus.com>
-
- * ldgram.y (attributes_opt): Pass region pointer to
- lang_set_flags, not &region->flags.
-
- * ldlang.c (lang_memory_default): New function to figure out a
- default memory region for a section if it was not specified.
- (lang_memory_region_lookup): Zero flags, not_flags field.
- (lang_map{,_flags}): Print attribute flags in memory map.
- (lang_size_sections): Call lang_memory_default to get default
- memory region.
- (lang_set_flags): Implement attribute flags for real. Take new
- argument to give the flags we are to skip for this region.
-
- * ldlang.h (memory_region_struct): Add not_flags field, make both
- flags fields flagword type.
- (lang_output_section_state): Make flags field flagword type.
- (lang_set_flags): Update prototype to match new calling sequence.
- (lang_memory_region_default): Add prototype.
-
- * emulparams/d30v{_e,_o,elf}.sh ({TEXT,DATA,EMEM}_DEF_SECTION):
- Define whether or not the region gets default sections, and if so,
- what sections.
-
- * scripttempl/elfd30v.sc (MEMORY): Set up which of the regions get
- default sections.
-
-Thu Jan 1 22:58:04 1998 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfd30v.sc (.eh_frame): Link into the data section.
-
-Thu Jan 1 18:04:51 1998 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300h.sc: Fix typo.
- * scripttempl/h8300s.sc: Likewise.
-
-Sun Dec 21 12:51:49 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldexp.c (fold_name): Don't crash if the symbol is defined in a
- section with no output section, such as a shared library section.
-
-Wed Dec 17 12:14:11 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Keep track of where we are in the option
- parsing before calling ldemul_parse_args, so that we don't call it
- multiple times on the same argument and confuse the getopt
- internals.
-
-Thu Dec 11 09:00:15 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.tgt (d30v-elf-*): Rename d30velf_e to d30v_e and
- d30velf_o to d30v_o to work in DOS environments.
- * Makefile.{am,in}: Ditto.
-
- * emulparams/d30v_{o,e}: Rename from d30velf_{o,e}.
- * emulparams/d30velf_{o,e}: Deleted.
-
-Wed Dec 10 17:40:08 1997 Nick Clifton <nickc@cygnus.com>
-
- * scripttempl/armcoff.sc: Add glue sections (code taken from Arm
- branch).
-
- * emulparams/armcoff.sh (TEMPLATE_NAME): Set to armcoff.
-
- * emultempl/armcoff.em: New file, imported from Arm branch.
-
-Wed Dec 10 14:10:44 1997 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfd30v.sc: Add .rel and .rela sections for all
- defined sections. Set up __{D,C}TOR_{LIST,END}__. Add onchip and
- external memory sections for rodata. Delete .string, .rodata1,
- and .data1 sections.
-
-Tue Dec 9 15:28:17 1997 Michael Meissner <meissner@cygnus.com>
-
- * Makefile.am: Add Oct 23 changes to Makefile.in here.
-
- * Makefile.{am,in}: (ALL_EMULATIONS): Add ed10velf.o.
-
- * Makefile.{am,in}: (ALL_EMULATIONS): Add etic80coff.o.
-
- * Makefile.{am,in}: (ALL_EMULATIONS): Add ed30velf{,_e,_o}.o.
- (ed30velf_e.c): Like d30velf, except .text/.data/etc always go in
- external memory.
- (ed30velf_o.c): Like d30velf, except .text/.data/etc always go in
- onchip memory.
-
- * emulparams/d30velf.sh (STACK_START_ADDR): Top of default
- stack.
- ({TEXT,DATA,EMEM}_SIZE): Sizes of the 3 memory areas.
- ({TEXT,DATA,BSS}_MEMORY): Which memory region .text, .data, and
- .bss should go in.
-
- * emulparams/d30velf_{e,o}.sh: New files to be explicit whether
- .text, .data, etc go in external memory or onchip memory.
-
- * configure.tgt (d30v-*-*ext*): New configuration to default
- .text, .data, etc. in external memory.
- (d30v-*-*onchip*): New configuration to default .text, .data,
- etc. in onchip memory.
- (d30v-*-*): Add d30velf_{e,o} emulations.
-
- * scripttempl/elfd30v.sc: Allow .text, .data, .bss to be put in
- either the onchip text/data areas or the external memory area.
- (MEMORY): Get sizes from d30velf.sh.
- (.e{data,text,bss}): Put sections in the external memory region.
- (.stext): Put section in the onchip text region.
- (.s{data,bss}): Put sections in the onchip data region.
- (__stack): Assign from ${STACK_START_ADDR}.
- (.text): Put in ${TEXT_MEMORY} memory region.
- (.data{,1}/.strings/.rodata{,1}): Put in ${DATA_MEMORY} memory
- region.
- (.bss): Put in ${BSS_MEMORY} memory region.
+2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
-Tue Dec 2 10:14:47 1997 Nick Clifton <nickc@cygnus.com>
+ * ldmain.c: Include filenames.h.
+ (set_scripts_dir): Support backslashes in program name.
- * configure.tgt (targ_extra_emuls): Add support for Thumb target.
+2000-05-22 Igor Shevlyakov <igor@windriver.com>
-Sat Nov 22 15:23:19 1997 Ian Lance Taylor <ian@cygnus.com>
+ * ldmain.c (main): When deciding if ".text" section should be
+ read-only, don't forget to reset SEC_READONLY because it
+ could be already set.
- * ldlex.l: Don't define hex_mode. Correct number regexp to not
- accept hex digits without a leading $ or 0x. Handle leading $
- correctly. Pass 0 rather than hex_mode to bfd_scan_vma.
- * ldlex.h (hex_mode): Don't declare.
+2000-05-22 Thomas de Lellis <tdel@windriver.com>
-Sun Nov 16 20:16:45 1997 Michael Meissner <meissner@cygnus.com>
+ * ld.1: Add documentation for new command line option:
+ --section-start <sectionname>=<sectionorg>
+ This is a generic version of -Ttext etc. which accepts
+ any section name as a parameter instead of just text/data/
+ bss.
+ * ld.texinfo: More docs.
+ * NEWS: More docs.
+ * lexsup.c: (parse_args): Recognize new command line option.
+ (ld_options): Add new option.
- * emulparams/d30velf.sh ({DATA,EMEM}_START_ADDR): Define as start
- of internal data area and external memory on chip.
+2000-05-18 H.J. Lu <hjl@gnu.org>
- * scripttempl/elfd30v.sc: Define a MEMORY region that describes
- the 3 regions of memory on the chip. Put .text/.init/.fini into
- the text memory region, put other segments into the data memory
- region. Add more of the standard elf sections. Default __stack
- to be 0x20008000, which is 1 byte beyond end of the internal data
- region.
+ * lexsup.c (parse_args): `i' == `r', not `q'.
-Thu Nov 13 13:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
+Thu May 18 10:47:57 2000 Jeffrey A Law (law@cygnus.com)
- * configure.tgt (targ_extra_emuls): Make FreeBSD a i386bsd
- variant.
+ * configure.tgt (hppa*64*-*-*): Enable PA64 target.
-Sun Nov 2 14:51:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
+ Rick Gorton <gorton@scrugs.lkg.dec.com>
- * configure.host (alpha*-*-linux*): Correct HOSTING_CRT0. Set
- HOSTING_LIBS.
+ Add support for '-q' == '--emit-relocs' switch.
+ * ldmain.c (main): Default to false.
+ * lexsup.c (parse_args): Turn on emitrelocations flag if set.
+ * NEWS: Describe the emitrelocations switch.
+ * ld.texinfo: Describe the emitrelocations switch.
-Thu Oct 30 12:25:55 1997 Ian Lance Taylor <ian@cygnus.com>
+2000-05-16 Charles Wilson <cwilson@ece.gatech.edu>
- * ld.h (args_type): Add warn_mismatch field.
- * ldmain.c (main): Initialize warn_mismatch field.
- * lexsup.c (parse_args): Handle --no-warn-mismatch option.
- * ldlang.c (ignore_bfd_error): New static function.
- (lang_check): If warn_mismatch is false, don't warn about
- mismatched input files.
- * ld.texinfo, ld.1: Document new option.
+ * emultempl/pe.em (_open_dynamic_archive): New function: Search
+ the library path for "foo.dll" and "libfoo.dll" dynamic libraries
+ before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
+ link options.
-Thu Oct 23 14:38:18 1997 Nick Clifton <nickc@cygnus.com>
+2000-05-15 David O'Brien <obrien@FreeBSD.org>
- * scripttempl/v850.sc: Rename linker symbol '_stack' to '__stack'
- to avoid conflicts with C code which is defining a variable called
- 'stack'.
+ * lexsup.c (parse_args): Update the year in the copyright notice.
-Thu Oct 23 00:57:45 1997 Richard Henderson <rth@dot.cygnus.com>
+2000-05-13 Alan Modra <alan@linuxcare.com.au>
- * Makefile.in (ALL_EMULATIONS): Move eelf64_sparc.o ...
- (ALL_64_EMULATIONS): ... here.
- (eelf64_sparc.c): Template should be elf32 not generic.
- * emulparams/elf64_sparc.sh (TEMPLATE_NAME): New definition.
+ * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
+ Replace defines with those from intl/libgettext.h to quieten gcc
+ warnings.
-Thu Oct 23 00:44:20 1997 Richard Henderson <rth@dot.cygnus.com>
+2000-05-10 H.J. Lu <hjl@gnu.org>
- * configure.tgt: Add sparc64-*-linux*.
- * emulparams/elf64_sparc.sh (GENERATE_SHLIB_SCRIPT, NOP): New.
+ * ldlang.c (open_input_bfds): Don't load the same file within
+ a group again if the whole archive has been loaded already.
-Wed Oct 22 11:29:25 1997 Ian Lance Taylor <ian@cygnus.com>
+2000-05-03 Alan Modra <alan@linuxcare.com.au>
- * scripttempl/pe.sc: Put .eh_frame in .rdata.
+ From Ulf Carlsson <ulfc@engr.sgi.com> and Andreas Jaeger <aj@suse.de>
+ * lexsup.c (set_section_start): Use bfd_scan_vma rather than
+ strtoul.
-Fri Oct 17 00:00:13 1997 Richard Henderson <rth@cygnus.com>
+Mon May 1 17:34:34 2000 Jim Wilson <wilson@cygnus.com>
- * ldlang.c (lang_register_vers_node): Only check globals<=>locals,
- since we need to be able to export different versions of the same
- symbol.
+ * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
-Wed Oct 15 14:52:36 1997 Ian Lance Taylor <ian@cygnus.com>
+ * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
+ host "ia64-*-linux-gnu*".
- * scripttempl/pe.sc: Put .stab and .stabstr sections at end.
+2000-04-29 Andreas Jaeger <aj@suse.de>
-Wed Oct 8 12:37:05 1997 Richard Henderson <rth@cygnus.com>
+ * ld.h: Correctly check GCC version.
- * configure.tgt, configure.host: Change alpha-*-* to alpha*-*-*;
- config.guess now recognizes alphaev5 etc.
+Tue Apr 25 11:20:43 2000 Jeffrey A Law (law@cygnus.com)
-Fri Oct 3 14:23:02 1997 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am: Add PA64 support. Add missing dependencies for
+ PA32 elf support.
+ * Makefile.in: Rebuilt.
+ * configure.tgt: Add PA64 support (currently disabled).
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Don't treat
- -s and -u as -static and -unix.
+2000-04-25 Alan Modra <alan@linuxcare.com.au>
-Thu Oct 2 18:40:28 1997 Ian Lance Taylor <ian@cygnus.com>
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
+ (output_rel_find): New function.
+ (hold_section, hold_use): Delete.
+ (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
+ hold_interp): Make local to place_orphan.
+ (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
+ rather than place_section to find possible previous use of orphan.
+ Similarly find the place-holder output sections. Use returned
+ value from lang_enter_output_section_statement rather than calling
+ lang_output_section_statement_lookup.
+ * emultempl/armelf.em: Same here.
+ * emultempl/pe.em: Similar to above, but no need for output_rel_find.
- * ldlang.c (wild_doit): Rewrite flag handling for clarity. If we
- are not adding the first input section, and SEC_READONLY is clear
- on the output section, then don't copy it from the input section.
- If SEC_READONLY is not set on the input section, then clear it on
- the output section.
+ * ldlang.c (lang_enter_output_section_statement): Return output
+ section statement.
+ * ldlang.h (lang_enter_output_section_statement): Change
+ declaration too.
- * configure.tgt (mips*-sgi-irix[56]*): Use elf32bsmip rather than
- elf32bmip.
- (mips*el-*-linux*): Change elf32lmip to elf32lsmip and elf32bmip
- to elf32bsmip.
- (mips*-*-linux*): Likewise.
- * emulparams/elf32bsmip.sh: New file; just like elf32bmip.sh, but
- setting ENTRY to __start.
- * emulparams/elf32lsmip.sh: New file; just like elf32lmip.sh, but
- setting ENTRY to __start.
- * scripttempl/elf.sc: Always set ENTRY to _start if it was not
- already set.
+ * ldlang.h (lang_output_section_statement): Export it.
+ * ldlang.c (lang_output_section_statement): Ditto.
-Wed Oct 1 16:41:00 1997 Nick Clifton <nickc@cygnus.com>
+2000-04-24 Nick Clifton <nickc@cygnus.com>
- * emulparams/v850.sh (ROZDATA_START_ADDR, ROSDATA_START_ADDR): New
- Variables.
+ * ld.texinfo (Output Section Data): Add note that section data
+ commands cannot appear outside of section directives.
- * scripttempl/v850.sc: Move read only areas out of zero and small
- data sections and into their own sections.
+2000-04-2 Matthew Green <mrg@cygnus.com>
-Wed Sep 24 16:59:15 1997 Joel Sherrill <joel@oarcorp.com>
+ * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
- * configure.tgt (sh*-*-rtems*): New target, like sh-*-elf*.
+Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
-Wed Sep 24 11:33:14 1997 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
+ (eelf64_ia64.c): New rule.
+ * Makefile.in: Rebuild.
+ * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
+ * emulparams/elf64_ia64.sh: New file.
- * ld.texinfo (Section Options): Improve documentation of NOLOAD
- directive.
+2000-04-21 Richard Henderson <rth@cygnus.com>
- * aclocal.m4: Rebuild with new libtool.
- * configure: Rebuild.
+ * scripttempl/elfd30v.sc: Place .gcc_except_table.
-Mon Sep 22 17:24:06 1997 Ian Lance Taylor <ian@cygnus.com>
+2000-04-19 Alan Modra <alan@linuxcare.com.au>
- * ldlang.c (wild_doit): Revert patch of September 3.
+ * dep-in.sed: Match space at start of file name, not at end.
-Wed Sep 17 16:45:34 1997 Nick Clifton <nickc@cygnus.com>
+2000-04-18 H.J. Lu <hjl@gnu.org>
- * Makefile.am, Makefile.in: Add rule for ev850.c
- * configure.tgt (targ_extra_emuls): Add v850 target.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
+ lang_leave_output_section_statement () after calling
+ lang_enter_output_section_statement ().
+ * emultempl/armelf.em: Likewise.
-Wed Sep 17 16:43:39 1997 Nick Clifton <nickc@cygnus.com>
+2000-04-18 Alan Modra <alan@linuxcare.com.au>
- * emulparams/v850.sh (CALL_TABLE_START_ADDR): New entry.
- * scripttempl/v850.sc: Add call table data area
+ * emultempl/elf32.em (struct orphan_save): Add section field.
+ (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
+ better order, and place first orphan section as we did before the
+ 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
+ Don't call make_bfd_section here, let wild_doit do the job for us.
+ Don't build a statement list when we'll only throw it away.
+ * emultempl/armelf.em: Ditto.
+ * emultempl/pe.em: Similarly.
+
+2000-04-14 Geoff Keating <geoffk@cygnus.com>
+
+ * scripttempl/elfppc.sc: Remove.
+ * emulparams/elf32ppc.sh: Use elf.sc.
+ * emulparams/elf32lppc.sh: Use elf.sc.
+ * emulparams/elf32ppclinux.sh: Use elf.sc.
+ * emulparams/elf32ppcsim.sh: New file.
+ * emulparams/elf32lppcsim.sh: New file.
+ * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
+ (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
+ * Makefile.in: Regenerate.
+ * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
-Mon Sep 15 11:29:13 1997 Ken Raeburn <raeburn@cygnus.com>
+2000-04-14 Alan Modra <alan@linuxcare.com.au>
- Merge change from Martin Hunt:
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
+ ~SEC_ALLOC sections too. Init start address of debug sections.
+ * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
+ * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
+ Also set all relocateable section start addresses.
- * scripttempl/elfd30v.sc: Put .rodata in the .text section.
+2000-04-13 Geoff Keating <geoffk@cygnus.com>
-Tue Sep 9 07:49:56 1997 Fred Fish <fnf@ninemoons.com>
+ * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
+ Add new BSS_PLT variable for when .plt need not be contained in
+ the file. Move _etext so that it is also after .fini, and provide
+ both etext and _etext with a leading underscore. Mark the start
+ and end of .sbss.
- * ldlang.c (lang_memory_region_lookup): Remove extraneous
- initialization of p.
+2000-04-12 Alan Modra <alan@linuxcare.com.au>
-Thu Sep 4 09:03:33 1997 Ian Lance Taylor <ian@cygnus.com>
+ * emultempl/elf32.em (struct orphan_save): New.
+ (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
+ hold_interp): Make them struct orphan_save.
+ (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
+ (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
+ the end of the relevant section list. Also add associated section
+ statements to the end of any previous orphan statements.
+ * emultempl/armelf.em: Similarly.
+ * emultempl/pe.em: Similarly.
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): In
- expression produced for -bpT and -bpD options, align to a 32 byte
- boundary rather than an 8 byte boundary.
- * scripttempl/aix.sc: Put .tocbss at start of .bss section.
+2000-04-11 Alan Modra <alan@linuxcare.com.au>
- * ldmisc.h, ldmisc.c, ldcref.c: Rename finfo to lfinfo, to avoid
- function name conflict with AIX 4.2 unistd.h header file.
+ * ld.texinfo (Simple Example): Remove extraneous paragraph.
-Wed Sep 3 15:12:32 1997 Ian Lance Taylor <ian@cygnus.com>
+Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
- * ldlang.c (wild_doit): Clear SEC_HAS_CONTENTS from a
- noload_section.
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure: Re-generate.
-Fri Aug 29 00:32:31 1997 Ian Lance Taylor <ian@cygnus.com>
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
- * Makefile.am (ld_new_DEPENDENCIES): Remove @LEXLIB@.
- * Makefile.in: Rebuild.
+ * po/ld.pot: Regenerate.
-Thu Aug 28 10:12:10 1997 Doug Evans <dje@canuck.cygnus.com>
+ * lexsup.c (help): Restore translated part of bug string.
- * configure.tgt (arc-*-elf*): Recognize.
- * Makefile.am (ALL_EMULATIONS): Add earcelf.o.
+ * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
+ (DEP): Quote when passing vars to sub-make. Add warning message
+ to end.
+ (DEP1): Rewrite for "gcc -MM".
+ (CLEANFILES): Add DEP2.
+ Update dependencies.
* Makefile.in: Regenerate.
- * emulparams/arcelf.sh: New file.
-
-Wed Aug 20 11:14:13 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wildcardp): Don't let a backslash by itself cause a
- pattern to be treated as a wildcard pattern.
-
- * ldgram.y (atype): Accept parentheses with no type.
-
- * ld.texinfo (Section Definition): Clarify use of whitespace.
- (Section Placement): Likewise.
-Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com>
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
- * configure.tgt (targ_extra_emuls): Add support for v850e target.
+ * ld.h: #include "bin-bugs.h"
+ * lexsup.c (help): Use REPORT_BUGS_TO.
-Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com>
+2000-03-27 Denis Chertykov <denisc@overta.ru>
- * configure.tgt (targ_extra_emuls): Add support for v850e target.
+ * configure.tgt (avr-*-*): New target support.
+ * Makefile.am: Likewise.
+ * scripttempl/elf32avr.sc: New script file.
+ * emulparams/avr1200.sh: New file.
+ * emulparams/avr23xx.sh: New file.
+ * emulparams/avr4433.sh New file.
+ * emulparams/avr44x4.sh New file.
+ * emulparams/avr85xx.sh New file.
+ * emulparams/avrmega103.sh New file.
+ * emulparams/avrmega161.sh New file.
+ * emulparams/avrmega603.sh New file.
+ * Makefile.in: Regenerate.
-Sat Aug 9 00:42:27 1997 Ian Lance Taylor <ian@cygnus.com>
+2000-03-09 Andreas Jaeger <aj@suse.de>
- * Makefile.am (ld.info): Change dependency from
- $(BFDDIR)/doc/bfdsumm.texi to bfdsumm.texi.
- (ld.dvi): Likewise.
- (bfdsumm.texi): New target.
- (CLEANFILES): Add bfdsumm.texi.
+ * Makefile.am (check-DEJAGNU): Also unset LANG.
* Makefile.in: Rebuild.
- * Makefile.am: New file, based on old Makefile.in.
- * acinclude.m4: New file, from old aclocal.m4.
- * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
- shared library handling; now handled by libtool. Replace
- AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
- AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
- AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
- * configure.host: Don't set HLDFLAGS, HLDENV, or RPATH_ENVVAR.
- * acconfig.h: Mention PACKAGE and VERSION.
- * stamp-h.in: New file.
- * ldver.c (ld_program_version): Set ld_program_version from
- VERSION.
- * ldgram.y, ldlex.l: Replace VERSION with VERSIONK.
- * Makefile.in: Now built with automake.
- * aclocal.m4: Now built with aclocal.
- * configure, config.in: Rebuild.
-
-Mon Jul 28 19:04:50 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 executable.
-
-Tue Jul 22 18:50:38 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
-
- * emulparams/i386go32.sh (OUTPUT_FORMAT): Set to "coff-go32".
- (SEGMENT_SIZE): Set to 0x200.
- * scripttempl/i386go32.sc: Rewrite.
- * configure.tgt (i[3456]86-*-msdosdjgpp*): New target.
-
-Mon Jul 7 12:39:42 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Manfred Hollstein <manfred@s-direktnet.de>:
- * configure.host (i[3456]86-*-linux*libc1*): Renamed from
- i[3456]86-*-linux*.
- (i[3456]86-*-linux*): New host.
-
-Thu Jun 26 13:54:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/pe.sc: Put .rsrc after .reloc. Put input .rsrc
- sections in the output .rsrc section.
-
-Wed Jun 25 12:48:41 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * configure.host (m68*-*-linux*libc1*): Renamed from
- `m68*-*-linux*'.
- (m68*-*-linux*): New configuration for use with GNU libc 2.
-
-Mon Jun 16 19:18:21 1997 Geoff Keating <geoffk@ozemail.com.au>
-
- * scripttempl/elfppc.sc: Correct .rela.sdata entries.
-
- * scripttempl/elfppc.sc: Put the PLT between the small and large
- BSS segments.
- * emulparams/elf32ppc.sh (TEXT_START_ADDR): The ABI says `A
- program base of 0x02000000 is recommended...' because otherwise
- shared libraries are less efficient. We use 0x01800000 because
- otherwise it's impossible to branch to location 0, for instance if
- you have an undefined weak symbol.
-
-Mon Jun 16 12:49:36 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+2000-03-06 Ian Lance Taylor <ian@zembu.com>
- * ldlang.c (lang_place_undefineds): Add \n in einfo call.
- (lang_size_sections): Likewise.
- * ldlex.l: Likewise.
- * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Likewise.
- * emultempl/mipsecoff.em (gld${EMULATION_NAME}_after_open):
- Likewise.
- (check_sections): Likewise.
- (gld${EMULATION_NAME}_after_allocation): Likewise.
- * emultempl/pe.em (gld_$${EMULATION_NAME}_before_allocation):
- Likewise.
- * mpw-eppcmac.c (gldppcmacos_read_file): Likewise.
- * mpw-idtmips.c (gldmipsidt_after_open): Likewise.
- (check_sections): Likewise.
- (gldmipsidt_after_allocation): Likewise.
-
- * ldemul.c (ldemul_choose_mode): Remove unused einfo argument.
-
-Fri Jun 6 23:47:42 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/pe.sc: Add zeroes after .idata$3 to mark the end of
- the import list.
-
-Thu May 29 13:13:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Don't
- crash if an output section has no BFD section.
-
-Fri May 23 15:23:25 1997 Fred Fish <fnf@cygnus.com>
-
- * lexsup.c (ld_options): Add entry for the new "task-link" option.
- (parse_args): Handle the "task-link" option.
- (OPTION_TASK_LINK): Add define.
-
-Wed May 21 17:44:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Correct check of fclose return value when
- handling --force-exe-suffix.
-
-Thu May 15 11:35:29 1997 Nick Clifton <nickc@cygnus.com>
-
- * ldlang.c (lang_check): Add test of the return value from the
- call to bfd_merge_private_bfd_data().
-
-Mon May 12 23:22:58 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elfmips.sc: Remove.
- * scripttempl/elf.sc: Set ENTRY based on target. Permit
- TEXT_DYNAMIC to control .dynamic segment. Permit
- SHLIB_TEXT_START_ADDR to set start of shared object. Support
- INITIAL_READONLY_SECTIONS. Put .stub in .text. Only put
- .gnu.linkonce.t* in .text when relocating. Support
- OTHER_TEXT_SECTIONS. Support SHLIB_DATA_ADDR as well as
- DATA_ADDR. Support OTHER_GOT_SYMBOLS and OTHER_GOT_SECTIONS.
- * emulparams/elf32b4300.sh (SCRIPT_NAME): Set to elf.
- (DATA_ADDR): Don't set.
- (INITIAL_READONLY_SECTIONS): Rename from OTHER_READONLY_SECTIONS.
- (OTHER_TEXT_SECTIONS): Set.
- (OTHER_GOT_SECTIONS): Rename from OTHER_READWRITE_SECTIONS.
- (MACHINE): Set to empty string.
- * emulparams/elf32l4300.sh: Likewise.
- * emulparams/elf32ebmip.sh: Likewise.
- * emulparams/elf32elmip.sh: Likewise.
- * emulparams/elf32bmip.sh: Likewise. Also:
- (TEXT_DYNAMIC): Set.
- * emulparams/elf32lmips.sh: Likewise.
- * Makefile.in (eelf32bmips.c): Depend upon elf.sc rather than
- elfmips.sc.
- (eelf32ebmips.c, eelf32elmips.c, eelf32lmip.c): Likewise.
-
-Mon May 12 11:11:06 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * scripttempl/elf.sc: Don't align the data segment on the next 8
- byte boundary, instead let the linker use whatever the individual
- sections require.
-
-Fri May 9 17:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (i[3456]86-*-gnu*): Don't include Mach support.
-
-Tue May 6 13:21:19 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Sean McNeil <sean@mcneil.com>:
- * emultempl/pe.em (sort_by_file_name): Sort by archive name
- first.
- (sort_sections): Sort all sections, not just sections in the same
+ * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
archive.
-Mon May 5 18:19:55 1997 Philip Blundell <pjb27@cam.ac.uk>
-
- * configure.tgt, configure.host: cope with '*-*-linux-gnuaout'
- targets.
-
-Fri May 2 15:54:28 1997 Mike Meissner <meissner@cygnus.com>
-
- * scripttempl/tic80coff.sc (.text): Add a leading underscore to
- __{D,C}TOR_{LIST,END}__ definations. Rearrange the order of items
- in the .text section. Move .const, .ctors, .dtors into separate
- sections.
-
-Wed Apr 30 12:23:21 1997 Manfred Hollstein <manfred@s-direktnet.de>
-
- * scripttempl/m88kbcs.sc (__.initp.end, _etext): Added whitespace
- around assignment of current location pointer.
-
-Thu Apr 17 13:07:18 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldctor.c (ldctor_build_sets): Make sure the set is aligned
- appropriately.
-
-Tue Apr 15 13:19:26 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (INSTALL): Set to @INSTALL@.
- (INSTALL_XFORM, INSTALL_XFORM1): Remove.
- (install): Depend upon ld.new and installdirs. Use
- $(program_transform_name) directly, rather than using
- $(INSTALL_XFORM) and $(INSTALL_XFORM1).
- (installdirs): New target.
- (install-info): Run mkinstalldirs.
-
-Mon Apr 14 12:06:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (INSTALL): Change install.sh to install-sh.
-
- From Thomas Graichen <graichen@rzpd.de>:
- * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
- * configure: Rebuild.
-
-Fri Apr 4 11:42:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em: Include "libiberty.h".
- (sort_sections_1): Use xmalloc rather than alloca.
-
- * ldlex.l: Recognize SQUAD.
- * ldgram.y (length): Add SQUAD.
- * ldctor.c (ldctor_build_sets): Use SQUAD for a signed 8 byte
- reloc.
- * ldlang.c (print_data_statement): Handle SQUAD.
- (lang_size_sections, lang_do_assignments): Likewise.
- * ldexp.c (exp_print_token): Add SQUAD to table.
- * ldwrite.c (build_link_order): Handle SQUAD.
- * ld.texinfo (Section Data Expressions): Document SQUAD.
-
-Thu Apr 3 13:19:40 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldver.c (ld_program_version): Set to 2.8.1.
-
- * Branched binutils 2.8.
-
-Wed Apr 2 11:55:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mpw-idtmips.c: Rename from mpw-emipsidt.c.
- * mpw-elfmips.c: Rename from mpw-emipself.c.
- * mpw-config.in: Update accordingly.
-
- * ldlang.c (lang_process): Call lang_check immediately after
- opening the input files, rather than at the end of the link.
-
-Mon Mar 31 23:44:00 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (init): Fully bracket initializer.
- (set_pe_stack_heap): Remove locals begin_commit and end.
- (gld_${EMULATION_NAME}_after_open): Remove unused local i.
- (gld${EMULATION_NAME}_place_orphan): Remove unused local ptr.
-
-Mon Mar 31 16:35:51 1997 Joel Sherrill <joel@oarcorp.com>
-
- * configure.tgt (hppa*-*-rtems*): New target, like hppa-*-*elf*.
-
-Fri Mar 28 15:29:23 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- Contributed by David S. Miller <davem@caip.rutgers.edu>:
- * configure.tgt (sparc*-*-linuxaout*): New target.
- (sparc*-*-linux*): New target.
- * emulparams/sparclinux.sh: New file.
- * Makefile.in (ALL_EMULATIONS): Add esparclinux.o.
- (esparclinux.c): New target.
-
-Fri Mar 28 14:30:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Ralf Baechle <ralf@gnu.ai.mit.edu>:
- * configure.tgt: Set targ_extra_emuls for mips*el-*-linux* and
- mips*-*-linux*. Use elf32bmip and elf32lmip, not elf32ebmip and
- elf32elmip.
-
-Thu Mar 27 17:14:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Update copyright date in version
- message.
-
-Fri Mar 21 12:28:41 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * emulparams/delta68.sh (OUTPUT_FORMAT): Set to "coff-m68k-sysv".
-
-Tue Mar 18 11:16:23 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in: Rebuild dependencies.
-
- * emultempl/aix.em: Include "obstack.h".
-
-Mon Mar 17 19:26:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c: Include "obstack.h".
-
-Sat Mar 15 23:23:46 1997 Fred Fish <fnf@cygnus.com>
-
- * configure.tgt (powerpc-*-beos*): Use aixppc for targ_emul.
-
-Sat Mar 15 18:10:38 1997 H.J. Lu <hjl@lucon.org>
-
- * ldemul.h (ldemul_list_emulations): Use full prototype.
- * ldlang.c (print_one_symbol): Add declaration.
- * ldlang.h (dprint_statements): Declare.
- * ldmain.c (remove_output): Declare.
- * ldmisc.c (vfinfo): Declare.
- * ldwrite.c (clone_section): Declare.
- (split_sections): Make static. Declare.
- * mri.c: Include libiberty.h.
- (strdup): Don't declare.
- (mri_alias): Use xstrdup rather than strdup.
-
-Fri Mar 14 21:30:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elfmips.sc: Change handling of data area when
- generating a shared library to not skip a large block of memory.
- From Per Fogelstrom <pefo@cvs.openbsd.org>.
-
-Wed Mar 12 21:33:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (multiple_definition): Only skip the warning if the
- output section is absolute when the input section is not
- absolute.
-
- * ldlex.l: Accept whitespace in VERS_START state. Warn about
- invalid characters in VERS_* states.
-
-Tue Mar 11 13:51:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Don't let a
- trailing space lead us to think that there is a zero address.
-
-Sun Mar 9 23:06:35 1997 Eric Youngdale <eric@andante.jic.com>
-
- * ldgram.y (vers_node): Correct typo of '(' for '{'.
-
-Fri Mar 7 18:40:12 1997 Fred Fish <fnf@cygnus.com>
-
- * scripttempl/tic80coff.sc (ENTRY): Entry symbol is __start
- rather than _start.
- (__edata): Define this rather than "edata".
- (__end): Define this rather than "end".
-
-Tue Mar 4 17:18:35 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.tgt (tic80-*-*): Allow dropping of -coff.
-
-Sun Mar 2 22:59:49 1997 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (ld.dvi): Set MAKEINFO environment variable as well
- as TEXINPUTS. Needed for building in separate build dir.
- * ldint.texinfo (SCRIPT_NAME): Fix typo.
- * emulparams/tic80coff.sh: Rewrite to include internal documentation
- about each shell variable that is set (or not set).
- * scripttempl/tic80coff.sc: Complete rewrite.
-
-Fri Feb 28 17:42:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Call bfd_set_default_target.
- * Makefile.in (ldmain.o): Define TARGET when compiling.
-
-Thu Feb 27 11:41:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Don't initialize link_info.lprefix or
- link_info.lprefix_len.
- * emultempl/hppaelf.em (hppaelf_before_parse): Likewise.
-
- * emultempl/m88kbcs.em: Remove.
- * emulparams/m88kbcs.sh (TEMPLATE_NAME): Don't set.
- * Makefile.in (em88kbcs.c): Depend upon generic.em rather than
- m88kbcs.em.
-
- * mri.c (mri_draw_tree): Pass noload_section, not SEC_NEVER_LOAD,
- to lang_enter_output_section_statement. From Mark Rasin
- <mark.rasin@telrad.co.il>.
-
-Wed Feb 26 11:51:44 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_one_common): Clear SEC_IS_COMMON from common
- section.
-
-Tue Feb 25 20:38:11 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (mips*-*-lnews*): New target.
- * Makefile.in (emipslnews.c): New target.
- * emulparams/mipslnews.sh: New file.
-
-Tue Feb 25 16:04:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (hold_interp): New static variable.
- (gld${EMULATION_NAME}_place_orphan): Put loadable .note sections
- after hold_interp. Choose a unique output section name.
- (gld${EMULATION_NAME}_place_section): Don't set hold_use if the
- SEC_LOAD or SEC_ALLOC flags differ. Set hold_interp.
-
-Mon Feb 24 18:16:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Eric Youngdale <eric@andante.jic.com>:
- * ldlex.l (V_TAG, V_IDENTIFIER): New macros.
- (VERS_START, VERS_SCRIPT, VERS_NODE): New states to parse version
- information.
- (ldlex_version_script, ldlex_version_file): New functions.
- * ldlex.h (enum input_enum): Add input_version_script.
- (ldlex_version_script): Declare.
- (ldlex_version_file): Declare.
- * ldgram.y (%union): Add deflist, versyms, and versnode.
- (VERS_TAG, VERS_IDENTIFIER): New terminals.
- (GLOBAL, LOCAL, VERSION, INPUT_VERSION_SCRIPT): New terminals.
- (file): Accept INPUT_VERSION_SCRIPT.
- (ifile_p1): Accept version.
- (version_script_file): New nonterminal.
- (version, vers_nodes, vers_node): Likewise.
- (verdep, vers_tag, ver_defns): Likewise.
- * ldlang.c (lang_elf_version_info): New global variable.
- (lang_new_vers_regex): New function.
- (lang_new_vers_node): New function.
- (version_index): New static variable.
- (lang_register_vers_node): New function.
- (lang_add_vers_depend): New function.
- * ldlang.h (lang_elf_version_info): Declare.
- (lang_new_vers_regex, lang_new_vers_node): Declare.
- (lang_add_vers_depend, lang_register_vers_node): Declare.
- * lexsup.c (OPTION_VERSION_SCRIPT): Define.
- (ld_options): Add "version-script".
- (parse_args): Handle OPTION_VERSION_SCRIPT.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass lang_elf_version_info to size_dynamic_sections.
- * scripttempl/elf.sc: Add .gnu.version sections.
- * ld.texinfo: Document symbol versioning.
-
-Fri Feb 21 17:37:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * Makefile.in (ed30velf.c): New target.
- * configure.tgt (d30v-*-*): New target.
- * emulparams/d30velf.sh: New file.
- * scripttempl/elfd30v.sc: New file.
-
-Fri Feb 14 18:28:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Option Commands): Document the INCLUDE command.
-
-Thu Feb 13 20:31:37 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * configure.in: Call BFD_NEED_DECLARATION on getenv.
- * acconfig.h (NEED_DECLARATION_GETENV): New macro.
- * sysdep.h (getenv): Declare if NEED_DECLARATION_GETENV.
- * ldemul.c (ld_emul_default_target): Do not cast getenv return
- value.
- * ldmain.c (get_emulation): Likewise.
- * configure, config.in: Rebuild.
-
-Tue Feb 11 15:34:26 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elfmips.sc: When relocating, put .mips16.fn.* and
- .mips16.call.* in .text.
-
-Sun Feb 9 18:09:13 1997 Fred Fish <fnf@cygnus.com>
-
- * emulparams/tic80coff.sh: New (dummy) file for TIc80.
- * scripttempl/tic80coff.sc: New (dummy) file for TIc80.
- * Makefile.in (etic80coff.c): Add target and rule to build it.
- * configure.tgt (tic80-*-coff): Set targ_emul to tic80coff.
-
-Fri Jan 31 13:16:53 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Search for
- ".so" in the name, not ".so.".
- (gld${EMULATION_NAME}_search_dir): Accept a plain .so file.
-
- * Makefile.in (ld.info): Add -I$(srcdir). From Alan Modra
- <alan@spri.levels.unisa.edu.au>.
-
-Thu Jan 30 11:31:52 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em: Include <ctype.h>.
- (gld${EMULATION_NAME}_find_so): Skip the directory name when
- searching for ".so.".
- (gld${EMULATION_NAME}_search_dir): Make sure that the library name
- has a version number, and that only version numbers follow .so.
-
-Wed Jan 29 18:15:00 1997 Geoffrey Noer <noer@cygnus.com>
-
- * scripttempl/pe.sc:
- * scripttempl/ppcpe.sc: add *(.gcc_except_table) to the text
- section so Win32 executables are valid.
-
-Mon Jan 27 12:28:43 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Put linkonce reloc section in other
- appropriate reloc sections.
- * scripttempl/elfmips.sc: Add linkonce support.
- * scripttempl/elfppc.sc: Likewise.
-
-Fri Jan 24 10:44:09 1997 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/mn10200.sh (OTHER_RELOCATING_SECTIONS): Move the
- stack up to 0x80000.
- * emulparms/mn10300.sh (OTHER_RELOCATING_SECTIONS): Likewise.
-
-Tue Jan 21 12:11:10 1997 Doug Evans <dje@seba.cygnus.com>
-
- * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Use PROVIDE
- to define `_stack'.
-
-Thu Jan 16 17:07:52 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (args_type): Rename auxiliary_filter_shlib to
- auxiliary_filters, and make it char **.
- * lexsup.c (parse_args): Handle -f by setting up an array.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
- new name of auxiliary_filters.
-
- * ld.texinfo (Options): Improve documentation of --filter and
- --auxiliary.
-
-Tue Jan 14 15:44:28 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Options): Clarify that the normal usage is -T.
- (Commands): Likewise.
-
-Thu Jan 9 11:26:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/armcoff.sc: Correct mask used for .data address.
-
-Wed Jan 8 15:14:59 1997 Geoffrey Noer <noer@cygnus.com>
-
- * emultempl/pe.em: make default executable a.exe instead of
- a.out
-
-Fri Jan 3 17:33:34 1997 Richard Henderson <rth@tamu.edu>
-
- * scripttempl/elf.sc: Move .got closer to .sdata and .sbss by
- shifting .plt back. Rumour has it that the NetBSD ld.so depends
- on .dynamic being after .got, so we leave that.
-
-Fri Jan 3 14:04:40 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (clean): Don't remove configdoc.texi.
- (maintainer-clean): Do remove configdoc.texi.
-
- * ld.texinfo (Operators): Remove '@' from @smallexmple in comment
- to avoid confusing texi2roff.
-
-Fri Jan 3 11:27:02 1997 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/v850.sc (.zdata): Add .zcommon section.
- (.tdata): Add .tcommon and .tcommon_byte sections.
-
-Thu Jan 2 18:14:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (mips*el-*-linux*, mips*-*-linux*): New targets.
- * scripttempl/elfmips.sc: Use __start as the entry address for
- mips*-*-linux*.
-
-Tue Dec 31 14:48:30 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
-
- * ld.h (args_type): Add filter_shlib and auxiliary_filter_shlib
- fields.
- * lexsup.c (parse_args): Recognize --auxiliary/-f and
- --filter/-F.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass filter_shlib and auxiliary_filter_shlib to
- size_dynamic_sections.
- * ld.texinfo, ld.1: Document --filter/-F and --auxiliary/-f.
-
-Mon Dec 30 13:55:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/v850.sc (.tdata) Add .tbss and .tbyte sections.
-
-Wed Dec 18 22:57:35 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Use NewFolderRecursive for installation.
-
-Fri Dec 13 14:08:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/v850.sc: Make sure __{e,g}p start relative to the
- {s,t}data sections. Do not emit any linker generated symbols if
- -r. Use {TEXT,{Z,S,T}DATA}_START_ADDR variables to initialize
- where the different sections go. Change some whitespace.
-
- * emulparams/v850.sh ({TEXT,{Z,S,T}DATA}_START_ADDR): Define
- appropriately. Remove crud not used anymore.
-
-Fri Dec 13 10:19:57 1996 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.in (emn10200.c): Add dependencies.
- * configure.tgt: Handle mn10200.
- * emulparms/mn10200.sh: New file.
-
-Thu Dec 12 17:04:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/gld960c.em: Include <ctype.h>.
- (gld960_set_output_arch): Get the machine type from the -A option
- if there is one, rather than always using core.
-
-Sat Dec 7 10:07:51 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/mn10300.sh: Handle leading underscores.
-
-Thu Dec 5 13:45:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Only
- set hold_rel if SEC_ALLOC is set.
-
-Tue Dec 3 11:29:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (section_already_linked): Set the output_offset as well
- as the output_section when only reading symbols from a file.
-
-Mon Dec 2 11:43:50 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/*.sh: Make sure that each set of parameters which
- uses the elf.sc script sets MACHINE.
-
-Wed Nov 27 03:22:05 1996 Jason Merrill <jason@yorick.cygnus.com>
-
- * scripttempl/elf{,mips,ppc}.sc: Add the remaining DWARF sections.
- * scripttempl/elfd10v.sc: Likewise.
- * scripttempl/v850.sc: Likewise.
-
-Tue Nov 26 16:58:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.12.
-
-Mon Nov 25 12:17:55 1996 Jim Wilson <wilson@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Add case
- for bfd_vma to init loop.
-
-Mon Nov 25 09:55:07 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/mn10300.sh: Remove bogus '_' prefix for
- entry symbol and ctor/dtor stuff.
-
-Fri Nov 15 13:00:18 1996 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.in (emn10300.c): Add dependencies.
- * configure.tgt: Handle mn10300.
- * emulparms/mn10300.sh: New file.
-
-Tue Nov 5 10:57:50 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh (READONLY_START_ADDR): Changed to 0x2000004.
- (EMBEDDED): Define.
-
-Fri Nov 1 10:01:27 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: Add section on reporting bugs.
-
- * scripttempl/m68kcoff.sc: Make sure the etext and __CTOR_LIST__
- symbols are correctly aligned.
-
-Thu Oct 31 09:28:59 1996 Jeffrey A Law (law@cygnus.com)
-
- * scriptempl/v850.sc (zdata): Handle reszdata, romzdata and
- romzbss too.
-
-Tue Oct 29 12:33:05 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh: Changes needed for D10V-EVA board.
- Set TEXT_START_ADDR to 0x1000000. Set READONLY_START_ADDR to
- 0x2000000.
-
- * scripttempl/elfd10v.sc: Fix calculation of .text. Change
- .stack to start at 0x2007ffe.
-
-Mon Oct 28 15:37:00 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.tgt (sparclet*-*-aout*): Delete, use sparc*-*-aout*.
-
-Wed Oct 23 16:17:22 1996 Jeffrey A Law (law@cygnus.com)
-
- * scriptempl/v850.sc (zdata): Fix typo "zrodata" -> "rozdata".
-
- * scriptempl/v850.sc (zdata): Make sure this stays
- in lo-memory.
-
-Tue Oct 22 11:36:47 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc (__ep): Put it at the start
- of the tda section.
-
- * scriptempl/v850.sc: Move all "normal" sections into
- the external memory region (0x100000 - 0x200000).
-
-Mon Oct 21 17:16:59 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * scripttempl/elfd10v.sc: Clone from elf.sc, move .text to
- 0x10000, so that is more room for data.
-
- * emulparams/d10velf.sh (TEXT_START_ADDR): Now 0x100000.
- (READONLY_START_ADDR): Now 0x0.
- (SCRIPT_NAME): Now elfd10v.
-
- * Makefile.in (ed10velf.c): Depend on elfd10v.sc, not elf.sc.
-
-Fri Oct 18 22:12:49 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emulparams/m32relf.sh (TEXT_START_ADDR): Change from 0 to 0x100.
-
-Fri Oct 18 15:43:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Remove eelf64alpha.o.
- (ALL_64_EMULATIONS): New variable.
- * configure.in: Accept --enable-64-bit-bfd option. If it is set
- with --enable-targets=all, include ALL_64_EMULATIONS in
- EMULATION_OFILES.
- * configure: Rebuild.
-
-Fri Oct 18 12:58:35 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc (__gp, __ep): Define.
-
-Thu Oct 17 18:14:07 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: Try to consistently use a single or a double dash
- for each option.
-
-Thu Oct 17 10:17:20 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emulparams/m32relf.sh (EMBEDDED): Define.
-
-Thu Oct 17 10:56:49 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc (.zdata): Add this before .text.
- (.sdata): Also include .rosdata as part of the .sdata.
- (.tdata): Include this just before .sdata.
-
- * emulparms/v850.sh (SCRIPT_NAME): Use "v850" not "elf".
- * scripttempl/v850.sc: Wrap script with a "cat << EOF".
-
-Wed Oct 16 23:10:01 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/v850.sc: New linker script for the V850.
- * Makefile.in: Use it.
-
-Thu Oct 10 17:57:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/elf32b4300.sh: Define _gp in OTHER_GOT_SYMBOLS, not
- OTHER_READWRITE_SECTIONS.
- * emulparams/elf32l4300.sh: Likewise.
-
-Wed Oct 9 14:36:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (ld_config_type): Add warn_section_align field.
- * lexsup.c (OPTION_WARN_SECTION_ALIGN): Define.
- (ld_options): Add --warn-section-align.
- (parse_args): Handle --warn-section-align.
- * ldlang.c (lang_size_sections): If warn_section_align, warn if
- the start of a section changes due to alignment.
- * ld.texinfo, ld.1: Document --warn-section-align.
- * ld.texinfo: Change some single dashes to double dashes.
-
- * emultempl/pe.em (set_pe_subsystem): Record entry symbol for each
- subsystem type. Ifdef out os2 type. Recognize a version number.
-
-Tue Oct 8 12:07:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (set_pe_subsystem): When setting the subsystem
- to windows, set the entry point.
-
- * Makefile.in (ldlex.c): Don't pass any options to $(LEX).
-
-Mon Oct 7 17:29:05 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Options): Mention .so extensions for shared
- libraries.
-
-Sun Oct 6 22:35:36 1996 Jason Merrill <jason@yorick.cygnus.com>
-
- * scripttempl/elf{,mips,ppc}.sc: Add DWARF 2 sections.
-
-Fri Oct 4 18:49:31 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/m68kcoff.sc: Only set the address of .text if
- RELOCATING.
-
-Fri Oct 4 10:59:52 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emulparams/sparcaout.sh ({BIG,LITTLE}_OUTPUT_FORMAT): Define.
- * scripttempl/aout.sc ({BIG,LITTLE}_OUTPUT_FORMAT): Provide default.
- (OUTPUT_FORMAT): Support bi-endian targets.
-
-Thu Oct 3 13:52:03 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * fnmatch.h, fnmatch.c: Remove (now in libiberty).
- * Makefile.in: Rebuild dependencies.
- (CFILES): Remove fnmatch.c.
- (HFILES): Remove fnmatch.h.
- (OFILES): Remove fnmatch.o.
-
-Thu Oct 3 15:41:24 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (mostlyclean): Move config.log to distclean.
-
-Wed Oct 2 23:45:25 1996 Geoffrey Noer <noer@cygnus.com>
-
- * emultmpl/pe.em: increase size of stack reserve to 0x2000000
- (necessary in order to compile parse.c in gcc sources under NT)
-
-Wed Oct 2 14:49:10 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (ld_options): Fix typo in --rpath-link description.
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Suggest
- --rpath if a needed library is not found.
-
-Tue Oct 1 16:17:33 1996 Joel Sherrill <joel@oarcorp.com>
-
- * configure.tgt (mips*-*-rtems*): New target, like mips*-*-elf*.
-
-Tue Oct 1 15:50:34 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo (Options): Give more detail on -l option.
-
- * scripttempl/elfmips.sc: Handle CREATE_SHLIB the same way that
- elf.sc does, so that glibc works better.
-
- * ldver.c (ld_program_version): New variable.
- (ldversion): Use it.
- * ldver.h (ld_program_version): Declare.
- * lexsup.c (ld_options): Handle --dll-verbose like --verbose, not
- --version. Change --version handling to match current GNU
- standards.
- (help): Print bug report address.
-
-Mon Sep 30 12:14:43 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (em32relf.c): Add rule for.
- * configure.tgt (m32r-*-*): Recognize.
- * emulparams/m32relf.sh: New file.
-
-Thu Sep 26 13:58:47 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Add symbolic doublequoting to ldmain compile edit.
- * mpw-config.in: Add mips-*-* case as mips-elf, and use more
- wildcards in matching.
- * mpw-emipself.c: New file, pregenerated mips elf emulation.
-
-Tue Sep 17 12:18:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldint.texinfo: Rewrote.
-
- * configure.tgt: Add cases for MIPS 5000 like MIPS 4300.
-
-Mon Sep 16 17:55:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/armcoff.sc: Only define symbols if RELOCATING. Fix
- syntax error on __end__ line.
-
- * scripttempl/armcoff.sc: For -N or -n, don't align .data. From
- Chris Hadley <Christopher.Hadley@cl.cam.ac.uk>
-
-Sun Sep 15 22:09:56 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/v850.sh: Fix OTHER_RELOCATING_SECTIONS.
-
-Sun Sep 15 10:38:16 1996 Mark Alexander <marka@cygnus.com>
-
- * emulparms/d10v.sh: Set OTHER_RELOCATING_SECTIONS to put
- stack at top of simulator memory.
-
-Fri Sep 13 15:49:45 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlex.l (SYMBOLCHARN): Add $, _, and ~.
-
-Wed Sep 11 23:30:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (get_emulation): Check for -mips4 like -mips1, et. al.
-
-Thu Sep 5 15:24:12 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (section_already_linked): Accept a lang_input_statement
- as the PTR argument. If the file is symbols only, discard all
- input sections.
- (ldlang_add_file): Pass entry to bfd_map_over_sections.
-
-Wed Sep 4 15:53:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (alpha-*-gnu*): New target. From Fila Kolodny
- <fila@ibi.com>.
-
-Tue Sep 3 00:52:54 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/v850.sh: Set OTHER_RELOCATING_SECTIONS
-
-Sun Sep 1 21:48:58 1996 Jeffrey A Law (law@cygnus.com)
-
- * emulparms/v850.sh: Set EMBEDDED.
-
-Fri Aug 30 22:30:30 1996 Jeffrey A Law (law@cygnus.com)
+2000-03-02 H.J. Lu <hjl@gnu.org>
- * emulparms/v850.sh: Entry symbol is "_start", tweak
- ctor/dtor support.
+ * emulparams/elf32mcore.sh: Include "getopt.h".
-Fri Aug 30 18:32:31 1996 Ian Lance Taylor <ian@cygnus.com>
+2000-03-01 Ian Lance Taylor <ian@zembu.com>
- * configure.tgt (sh-*-elf*): New target.
- * emulparams/shelf.sh: New file.
- * emulparams/shlelf.sh: New file.
- * Makefile.in (ALL_EMULATIONS): Add eshelf.o and eshlelf.o.
- (eshelf.c, eshlelf.c): New targets.
- * scripttempl/elf.sc: If EMBEDDED is defined, then don't add
- SIZEOF_HEADERS to TEXT_START_ADDR. Expand CTOR_START and CTOR_END
- around .ctors, and DTOR_START and DTOR_END around .dtors. Expand
- OTHER_RELOCATING_SECTIONS if RELOCATING.
+ * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
-Thu Aug 29 16:57:46 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+2000-03-01 H.J. Lu <hjl@gnu.org>
- * configure.{host,tgt} (i[345]86-*-*): Recognize i686 for pentium
- pro.
+ * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
+ * emulparams/shpe.sh: Likewise.
-Mon Aug 26 12:58:11 1996 Ian Lance Taylor <ian@cygnus.com>
+2000-03-01 Nick Clifton <nickc@cygnus.com>
- * ldgram.y (section): Add opt_nocrossrefs; pass value to
- lang_enter_overlay.
- (opt_nocrossrefs): New nonterminal.
- * ldlex.l: Recognize NOCROSSREFS keyword in EXPRESSION mode.
- * ldlang.c (overlay_nocrossrefs): New static variable.
- (lang_enter_overlay): Add nocrossrefs parameter.
- (lang_leave_overlay): Only add nocrossrefs if overlay_nocrossrefs
- is set. Initialize overlay_nocrossrefs.
- * ldlang.h (lang_enter_overlay): Update declaration.
- * ld.texinfo (Overlays): Update documentation.
+ * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
+ to unused parameters.
- * ldver.c (ldversion): Print GNU ld in the version message.
+ * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
+ functions only used by DLL code.
+ (_place_orphan): Initialise 'dollar'.
-Thu Aug 22 17:10:40 1996 Ian Lance Taylor <ian@cygnus.com>
+2000-03-01 H.J. Lu <hjl@gnu.org>
- * configure.host: Set HLDENV.
- * configure.in: Substitute HLDENV.
- * configure: Rebuild.
- * Makefile.in (HLDENV): New variable.
- ($(LD_PROG)): Use $(HLDENV).
+ * ldmain.c (undefined_symbol): Take one more arg, fatal, to
+ indicate if the undefined symbol is a fatal error or not.
+ Don't delete the output file if "fatal" is false.
-Thu Aug 22 16:29:28 1996 Jeffrey A Law (law@cygnus.com)
+2000-02-29 H.J. Lu <hjl@gnu.org>
- * Makefile.in (ev850.c): New target.
- * configure.tgt (v850-*-*): New target.
- * emulparams/v850.sh: New file.
+ * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
+ Set LC_COLLATE and LC_ALL to null and export them. It is for
+ sort which expects the C locale.
+ Add $(LIBS) to all $(HOSTING_LIBS).
+ * Makefile.in: Rebuild.
-Thu Aug 22 11:16:02 1996 Stan Shebs <shebs@andros.cygnus.com>
+2000-02-29 Alan Modra <alan@spri.levels.unisa.edu.au>
- * mpw-make.sed: Add @DASH_C_FLAG@ to compiler edit.
+ * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
+ beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
+ linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
+ (ld_emulation_xfer_struct): Add missing NULL initialiser for
+ find_potential_libraries.
-Wed Aug 21 11:26:37 1996 Ian Lance Taylor <ian@cygnus.com>
+2000-02-28 Jim Blandy <jimb@redhat.com>
- * scripttempl/elf.sc: Put .gnu.linkonce* sections in appropriate
- containing sections.
+ * ldgram.y (exclude_name_list): Don't require a comma to separate
+ list entries; the lexer considers commas to be valid part of a
+ filename, so in something like `foo, bar' the comma is considered
+ part of the first filename, `foo,'.
+ * ld.texinfo: Update section on EXCLUDE_FILE lists.
-Mon Aug 19 13:01:42 1996 Ian Lance Taylor <ian@cygnus.com>
+2000-02-27 Loren J. Rittle <ljrittle@acm.org>
- * fnmatch.c: Include sysdep.h.
+ * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
+ host "i[3456]86-*-freebsdelf*".
-Mon Aug 19 11:28:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+2000-02-27 Mark Elbrecht <snowball3@bigfoot.com>
- * genscripts.sh: Undo 8/16 change.
+ * scripttempl/i386go32.sc: Move misplaced semicolons.
- * emulparams/d10velf.sh (MACHINE): Explicitly set to nothing.
+2000-02-25 Ian Lance Taylor <ian@zembu.com>
-Fri Aug 16 19:18:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
+ (ALL_64_EMULATIONS): Remove eelf64hppa.o.
+ (eelf64hppa.c, ehppaelf.c): Remove targets.
+ * Makefile.in: Rebuild.
- * genscripts.sh: Explicitly reset any shell variables set or used
- by the various .sc scripts to allow inadvertant use of these
- names as normal environment variables by the person running
- configure.
+2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
- * Makefile.in (ed10velf.c): Use tdir_d10v, not tdir_arcelf.
+ * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
+ GNU/Linux/sparc, but keep the default as 32.
-Fri Aug 16 14:15:41 1996 James G. Smith <jsmith@cygnus.co.uk>
+ * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
+ it default if sparcv9 or sparc64.
- * scripttempl/armcoff.sc (__bss_start__, __bss_end__,
- __data_start__, __data_end__): Added to keep in sync. with the
- default ARM crt0.s. Added __CTOR_LIST__ and __DTOR_LIST__ support.
+2000-02-24 Nick Clifton <nickc@cygnus.com>
-Thu Aug 8 14:24:56 1996 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am: Add rules to build emipspe.o and earmpe.o.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
- * ldcref.c (check_reloc_refs): If info->same, look for any symbol
- defined in info->defsec, not just the section symbol.
+ * ldemul.h (ld_emulation_xfer_struct): Add new field:
+ find_potential_libraries.
+ * ldemul.c (ldemul_find_potential_libraries): New function.
-Wed Aug 7 14:40:48 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
+ * ldfile.c (ldfile_open_file_search): Allow function to be
+ exported.
+ (ldfile_open_file): Call ldemul_find_potential_libraries.
+ * ldfile.h: Add prototype for ldfile_open_file_search.
- * configure.in: Call BFD_NEED_DECLARATION on strstr and sbrk.
- * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
- (NEED_DECLARATION_SBRK): New macro.
- * configure, config.in: Rebuild.
- * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
- * ldmain.c (sbrk): Declare if HAVE_SBRK and
- NEED_DECLARATION_SBRK.
+ * pe-dll.c: Add support for ARM, MIPS and SH targets.
- * ldlang.c (lang_record_phdrs): Cast xmalloc and xrealloc return.
+ * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
+ * emulparams/shpe.sh: New file. Parameters for sh-pe target.
-Mon Aug 5 16:26:14 1996 Ian Lance Taylor <ian@cygnus.com>
+ * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
+ (gld_X_find_potential_libraries): New function. Search for
+ libraries called "*.lib".
- * ldlex.l: Recognize OVERLAY.
- * ldgram.y: Add section_phdr field to %union.
- (section): Handle phdr_opt result. Add OVERLAY case.
- (opt_exp_without_type): New nonterminal.
- (phdr_opt): Return list of phdrs.
- (overlay_section): New nonterminal.
- * ldlang.c: Include <ctype.h>.
- (lang_leave_output_section_statement): Add phdrs parameter.
- Change all callers.
- (lang_section_in_phdr): Remove.
- (overlay_vma, overlay_lmn, overlay_max): New static variables.
- (struct overlay_list): Define.
- (overlay_list): New static variable.
- (lang_enter_overlay, lang_enter_overlay_section): New functions.
- (lang_leave_overlay_section, lang_leave_overlay): New functions.
- * ldlang.h (lang_leave_output_section_statement): Update
- declaration for new parameter.
- (lang_section_in_phdr): Don't declare.
- (lang_enter_overlay, lang_enter_overlay_section): Declare.
- (lang_leave_overlay_section, lang_leave_overlay): Declare.
- * ld.texinfo (Overlays): New node under SECTIONS, documenting
- overlays.
+ * scripttempl/pe.sc: Add .pdata section.
- * ldlex.l: Recognize MAX and MIN.
- * ldgram.y (MAX, MIN): New terminals.
- (exp): Recognize MAX and MIN.
- * ldexp.c (fold_binary): Handle MAX and MIN.
- * ld.texinfo (Arithmetic Functions): Document MAX and MIN.
+2000-02-23 Richard Henderson <rth@cygnus.com>
- * ld.texinfo (PHDRS): Use @cindex, not @kindex, for program header
- index entries.
+ * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
+ Add and use memory regions.
- * ldgram.y (SIZEOF, ADDR): Do not specify type.
+2000-02-23 Linas Vepstas (linas@linas.org)
- * ldcref.c (check_nocrossref): Skip symbols with no output
- sections.
+ * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
-Fri Aug 2 14:57:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (LOADADDR): New terminal.
- (exp): Handle LOADADDR.
- * ldlex.l: Recognize LOADADDR.
- * ldexp.c (exp_print_token): Add LOADADDR.
- (fold_name): Implement LOADADDR.
- * ldlang.c (exp_init_os): Treat LOADADDR like ADDR.
- * ld.texinfo (Arithmetic Functions): Document LOADADDR.
-
-Thu Aug 1 12:52:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (check_nocrossrefs): Declare.
- * ldlang.h (struct lang_nocrossref): Define.
- (struct lang_nocrossrefs): Define.
- (nocrossref_list): Declare.
- (lang_add_nocrossref): Declare.
- * ldlex.l: Recognize NOCROSSREFS keyword.
- * ldgram.y (%union): Add nocrossref field.
- (NOCROSSREFS): New terminal.
- (ifile_p1): Recognize NOCROSSREFS.
- (nocrossref_list): New nonterminal.
- * ldlang.c (nocrossref_list): Define.
- (lang_add_nocrossref): New function.
- * ldmain.c (main): If nocrossref_list is not NULL, call
- check_nocrossrefs.
- (warning_callback): Free symbols if there is no place to store
- them.
- (notice): Call add_cref if nocrossref_list is not NULL.
- * ldcref.c: Include "ldexp.h" and "ldlang.h".
- (check_nocrossrefs): New function.
- (check_nocrossref): New static function.
- (struct check_refs_info): Define.
- (check_refs, check_reloc_refs): New static functions.
- * Makefile.in: Rebuild dependencies.
- * ld.texinfo (Option Commands): Document NOCROSSREFS.
-
- * ld.texinfo (Section Placement): Improve the wording of the
- wildcard documentation. Mention that wildcards are only searched
- for on the command line, not in the file system.
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_after_open): Move
- definition of lib_path inside condition where it is used.
-
-Wed Jul 31 13:17:10 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh: Now works with elf.sc.
-
-Wed Jul 31 11:52:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh (SCRIPT_NAME): Change to vanilla.
-
-Tue Jul 30 14:46:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): Add the section VMA to the result
- value when computing the address of a section.
-
- * ld.h (args_type): Add cref field.
- * lexsup.c (parse_args): Set command_line.cref.
- * ldmain.c (main): Check command_line.cref rather than
- link_info.notice_all.
- (notice): Likewise.
-
- * ldcref.c (output_one_cref): Don't crash if a symbol is defined
- in a section without an owner.
-
-Mon Jul 29 17:23:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * fnmatch.h, fnmatch.c: New files.
- * ldlex.l: Remove unused definition of FILENAME. Add definition
- of WILDCHAR. In SCRIPT mode, accept any sequence of WILDCHAR as a
- NAME.
- * ldgram.y (file_NAME_list): Accept '*' and '?' specially.
- (input_section_spec): Accept '?' specially.
- (statement): Change exp to mustbe_exp in length and FILL cases.
- (section): Call ldlex_script before section statements, and call
- ldlex_popstate after them.
- * ldlang.c: Include "fnmatch.h".
- (wildcardp): New static function.
- (wild_section): Permit the section name to be a wildcard.
- (wild_file): New static function, broken out of wild.
- (wild): Call wild_file. Permit the file name to be a wildcard.
- (open_input_bfds): Don't call lookup_name for a wildcard pattern.
- * Makefile.in: Rebuild dependencies.
- (CFILES): Add fnmatch.c.
- (HFILES): Add fnmatch.h.
- (OFILES): Add fnmatch.o.
- * ld.texinfo: Document that file and section names can now be
- wildcard patterns.
-
- * ldlang.c (lang_place_orphans): Correct condition: place a common
- section if not relocateable or if common definitions are forced.
-
-Wed Jul 24 12:16:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * emulparams/d10velf.sh (SCRIPT_NAME): Change to elf.
-
-Wed Jul 24 13:38:22 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * configure.tgt (d10v-*-*): Don't require the -elf, allow plain d10v.
-
-Tue Jul 23 10:36:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * Makefile.in (ed10velf.c): New target.
- * configure.tgt (d10v-*-elf*): New target.
- * emulparams/d10velf.sh: New file.
-
-Thu Jul 18 16:25:39 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (sparc*-*-sysv4*): New target. From Andrew Gierth
- <ANDREWG@microlise.co.uk>.
-
- * configure.host: Change irix5 to irix[56]*.
+ * Makefile.am: Add support for Linux/IBM 370.
* configure.tgt: Likewise.
-Wed Jul 17 10:52:46 1996 Kim Knuttila <krk@cygnus.com>
-
- * emultempl/pe.em (sort_sections): Pay attention to return code.
-
- * ldmisc.c (demangle): Remove all prefix '.'s from a name.
-
-Mon Jul 15 11:49:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Round
- the value of __start_SECNAME to the alignment required by the
- section to be placed.
-
-Tue Jul 9 12:09:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (mips*el-*-elf*): Use elf32elmip.
- (mips*-*-elf*): Use elf32ebmip.
- * emulparams/elf32bmip.sh (EMBEDDED): Don't define.
- * emulparams/elf32lmip.sh (EMBEDDED): Don't define.
- * emulparams/elf32elmip.sh: New file; copy of elf32lmip.sh with
- EMBEDDED defined.
- * emulparams/elf32ebmip.sh: New file; copy of elf32bmip.sh with
- EMBEDDED defined.
- * emulparams/elf32b4300.sh (EMBEDDED): Define.
- * emulparams/elf32l4300.sh (EMBEDDED): Define.
- * Makefile.in (ALL_EMULATIONS): Add eelf32ebmip.o eelf32elmip.o.
- (eelf32ebmip.c, eelf32elmip.c): New targets.
-
-Thu Jul 4 12:01:03 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldver.c (ldversion): Set version to cygnus-2.7.1.
-
- * Released binutils 2.7.
-
- * emulparams/pc532macha.sh: Rename from pc532machaout.sh to avoid
- System V file name limitations.
- * configure.tgt (nc32k-pc532-mach*, ns32k-pc532-ux*): Use
- pc532macha rather than pc532machaout.
- * Makefile.in (ALL_EMULATIONS): Change epc532machaout.o to
- epc532macha.o.
- (epc532macha.c): Rename target from epc532machaout.c.
-
-Wed Jul 3 11:40:10 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (print_padding_statement): Use %u, not %x, to print
- fill value.
-
-Sun Jun 30 11:16:43 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-eppcmac.c: Update to reflect May 23 change to aix.em.
-
-Thu Jun 27 14:03:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Put the .sa
- file just before the .so file, rather than just after.
-
- * configure.host: Use -print-file-name=FILE rather than piping
- -print-libgcc-file-name through sed.
- (i[345]86*-*-sco*, i[345]86-*-isc*): Create crtbegin.o and
- crtend.o files, in case gcc doesn't use them.
- * Makefile.in (mostlyclean): Remove crtbegin.o and crtend.o.
-
-Wed Jun 26 15:57:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (mips*-dec-osf*): New target.
-
-Tue Jun 25 22:15:29 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
- INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
- (docdir): Removed.
- * configure.in (AC_PREREQ): autoconf 2.5 or higher.
- (AC_PROG_INSTALL): Added.
- * configure: Rebuilt.
-
-Mon Jun 24 18:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc (_GLOBAL_OFFSET_TABLE_): Don't do a
- PROVIDE of _GLOBAL_OFFSET_TABLE_, since it needs to be at a
- non-fixed location.
-
-Mon Jun 24 17:55:31 1996 Jouke Numan <jnuman@bazis.nl>
-
- * ldlang.h (enum section_type): Define.
- (lang_output_section_statement_type): Remove loadable field. Add
- sectype field.
- (lang_enter_output_section_statement): Change flags parameter in
- prototype to sectype.
- * ldgram.y (typebits): Remove.
- (sectype): New static variable.
- (opt_at): Use sectype rather than typebits.
- (type): Set sectype rather than typebits.
- (atype): Likewise.
- * ldlex.l: Recognize DSECT, COPY, INFO, and OVERLAY in
- EXPRESSION mode.
- * ldlang.c (lang_output_section_statement_lookup): Set sectype
- field rather than loadable field.
- (wild_doit): Check sectype rather than loadable.
- (lang_record_phdrs): Likewise.
- (lang_enter_output_section_statement): Rename flags parameter to
- sectype. Set sectype field rather than loadable field. Set flags
- field based on sectype.
-
-Mon Jun 24 12:00:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elf.sc: Force .stab* and .comment sections to start
- at 0.
-
- * configure.in: On alpha*-*-osf*, link against libbfd.a if not
- using shared libraries.
- * configure: Rebuild with autoconf 2.10.
-
-Fri Jun 21 17:40:56 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
-
- * configure.tgt: Add support for *-*-rtems* configurations.
-
-Fri Jun 21 13:05:51 1996 Richard Henderson <rth@tamu.edu>
-
- * configure.tgt (alpha-*-linuxecoff*): New target.
- (alpha-*-linux*): Use elf64alpha.
- * emulparams/elf64alpha.sh: New file.
- * emultempl/elf32.em: If ELFSIZE is not set, set it to 32. Use
- ${ELFSIZE} rather than 32 when calling BFD routines.
- (hold_rodata): New static variable.
- (gld${EMULATION_NAME}_place_orphan): Use hold_rodata for a
- readonly section that is not code.
- (gld${EMULATION_NAME}_place_section): Set hold_rodata. Don't use
- a .rel section unless its bfd_section field is not NULL.
- * Makefile.in (ALL_EMULATIONS): Add eelf64alpha.o.
- (eelf64alpha.c): New target.
-
-Fri Jun 21 12:45:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmisc.c (vfinfo): Correct handling of 0 in %W case.
-
-Thu Jun 20 13:55:28 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Add enough support to understand the gcc svr3.ifile script:
- * ldlex.l: Recognize BLOCK and GROUP in EXPRESSION context. Add
- BIND keyword.
- * ldgram.y: Add BIND token.
- (section): Recognize GROUP.
- (opt_ext_with_type): Recognize a couple of cases of BIND.
- * ldlang.c (init_os): Don't do anything if section is already
- initialized. Call exp_init_os on addr_tree field.
- (exp_init_os): New static function.
- (map_input_to_output_sections): Call exp_init_os on assignment
- expression.
- (lang_place_orphans): Check for common sections by name COMMON
- rather than by common_section field. Don't warn about absence of
- [COMMON] command.
-
- * ldlang.h (lang_input_statement_type): Remove useless fields
- common_section, common_output_section, and complained, as well as
- all references to them.
-
- * ldexp.c: Reindent a lot of code.
- (exp_fold_tree): Call FAIL rather than einfo in default case.
-
-Wed Jun 19 11:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host (m88*-*-dgux*): Quote HOSTING_CRT0. From
- <randall.hron@medaphis.com>.
-
-Tue Jun 18 15:53:09 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * scripttempl/h8300s.sc: New file for H8/S.
- * emulpararms/h8300s.sh: New file for H8/S.
- * Makefile.in (ALL_EMULATIONS): Add H8/S.
- (e_h8300s.c): Add dependencies.
- * configure.tgt: Add H8/S to targ_extra_emuls.
-
-Tue Jun 18 17:55:39 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (i[345]86*-*-isc*): New target. From
- <uddeborg@carmen.se>.
-
-Wed Jun 12 12:46:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c: Include "libiberty.h".
- (parse_args): Copy the -Y argument into memory.
- (set_default_dirlist): Don't put the ':' back into the directory
- list.
-
-Fri Jun 7 11:27:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em: Include libiberty.h.
- (gld${EMULATION_NAME}_set_symbols): New static function to add
- LD_LIBRARY_PATH to the list of search directories.
- (ld_${EMULATION_NAME}_emulation): Add new set_symbols routine.
-
-Thu Jun 6 11:50:31 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/elf32bmip.sh (OTHER_GOT_SYMBOLS): Use ALIGN(16)
- rather than . when computing _gp value. From Per Fogelstrom.
- * emulparams/elf32lmip.sh (OTHER_GOT_SYMBOLS): Likewise.
-
- * ldmain.c (main): Don't close and unlink the file on error, since
- remove_output will do it anyhow.
- * ldlang.c (open_output): Set boolean variable to true, not 1.
-
-Wed Jun 5 18:34:14 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * emulparams/{elf32b4300.sh,elf32l4300.sh} (SCRIPT_NAME): Use
- elfmips instead of elf.
-
-Tue Jun 4 18:43:07 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldcref.c: New file.
- * ld.h (add_cref, output_cref): Declare.
- * ldmain.c (main): Initialize notice_all field. If it is set at
- end of link, call output_cref.
- (notice): Rename from notice_ysym. Check notice_all.
- * ldmisc.c (finfo): Make globally visible.
- * ldmisc.h (finfo): Declare.
- * lexsup.c (OPTION_CREF): Define.
- (ld_options): Add "cref".
- (parse_args): Handle OPTION_CREF.
- * Makefile.in: Rebuild dependencies.
- (CFILES): Add ldcref.c.
- (OFILES): Add ldcref.o.
- * ld.texinfo, ld.1: Document --cref.
-
-Tue Jun 4 12:12:25 1996 Tom Tromey <tromey@csk3.cygnus.com>
-
- * Makefile.in (install): Make $(tooldir) and $(tooldir)/bin.
-
-Fri May 31 12:40:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (sort_sections): Don't assume that a
- wild_statement has a section name.
-
-Wed May 29 13:13:35 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/elfmips.sc: Quote test -z argument.
-
- * ld.texinfo: Clarify the CONSTRUCTORS command.
-
-Thu May 23 16:07:44 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Initialize
- file, not impfile.
-
-Wed May 22 11:31:30 1996 Doug Evans <dje@seba.cygnus.com>
-
- * ldlang.c (wild_doit): Don't copy over SEC_LINK_{ONCE,DUPLICATES}
- if final link.
- * emultempl/pe.em (sfunc): Renamed to sort_by_file_name.
- (sort_by_section_name, sort_sections_1): New functions.
- (sort_sections): Only sort by file name sections in .idata.
- Add "Grouped Sections" support.
- (gld${EMULATION_NAME}_place_orphan): Rewrite to support Grouped
- Sections.
- (gld${EMULATION_NAME}_place_section): Delete.
- * scripttempl/pe.sc (.text,.data,.rdata): Add *(.foo\$).
- (.CRT,.rsrc): Rewrite to use Grouped Section support.
-
-Tue May 21 14:31:48 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-eppcmac.c: Update to reflect changes to aix.em.
-
-Sun May 19 16:59:44 1996 Doug Evans <dje@seba.cygnus.com>
-
- * ldlang.c (dprint_statement): Stop printing at end of list.
-
-Sat May 18 13:12:05 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- Support for --force-exe-suffix
- * ld.h (args_type): Add force_exe_suffix.
- * ld.texinfo: Add documentation.
- * ldmain.c (main): Add support for option.
- * lexsup.c (OPTION_FORCE_EXE_SUFFIX): New.
- (ld_options, parse_args): Add support for option.
-
-Wed May 15 12:50:25 1996 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * emultempl/pe.em (set_pe_value): Pass 0 not 16 to strtoul call.
-
-Fri May 10 16:28:44 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc (__stack): Make __stack 0 if it was
- referenced but not defined.
-
-Thu May 9 08:52:23 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * emulparams/{elf32bmip.sh,elf32lmip.sh,mipsidt.sh,mipsidtl.sh}:
- Set a new variable to signify if the final target is an embedded
- system.
- * scripttempl/{mips.sc,elfmips.sc}: Don't add SIZEOF_HEADERS to
- .text for an embedded system.
-
-Tue May 7 10:56:11 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.em (gld${EMULATION_NAME}_place_orphan): New function.
- (gld${EMULATION_NAME}_place_section): New function.
- (hold_{section,use,text,rdata,data}): New static locals.
- (ld_${EMULATION_NAME}_emulation): Update orphan field.
- * scripttempl/pe.sc: Whitespace cleanup. Semicolon usage cleanup.
- (INIT,FINI): Delete, unused.
- (.text): Document orphan .text.foo sections.
- (.rdata): Document orphan .rdata.foo sections.
- (.data): Document orphan .data.foo sections.
-
-Tue May 7 11:35:46 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300.sc: Place ".tiny" sections right
- after ".data" sections.
- * scripttempl/h8300h.sc: Place ".tiny" sections into
- the "tiny" memory region, 0xff8000 through 0xffff00.
-
- * scripttempl/h8300.sc: Set the entry point to the value of
- "_start" rather than the start of the text segment.
- * scripttempl/h8300h.sc: Likewise.
-
- * scripttempl/h8300.sc: Place .rodata sections before .text
- sections in main ram.
- * scripttempl/h8300h.sc: Likewise.
-
-Mon May 6 23:32:30 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300h.sc: Use "eight", not "eightbit" for the
- 8-bit region and 8-bit sections.
-
-Wed May 1 17:50:06 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * ldlang.c (section_already_linked): Fix typos.
-
-Mon Apr 29 20:31:06 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.sc (.endjunk): Define __end__.
-
-Mon Apr 29 17:05:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (longest_section_name): Remove.
- (SECTION_NAME_MAP_LENGTH): Define.
- (print_size, print_alignment, print_fill, print_section): Remove.
- (print_flags): Remove.
- (lang_map): Rewrite.
- (print_output_section_statement): Rewrite.
- (print_assignment): Rewrite.
- (print_one_symbol): Rewrite.
- (print_input_section): Rewrite.
- (print_fill_statement): Rewrite.
- (print_data_statement): Rewrite.
- (print_address_statement): New static function.
- (print_reloc_statement): Rewrite.
- (print_padding_statement): Rewrite.
- (print_wild_statement): Rewrite.
- (print_statement_list): Clean up.
- (print_statement): Clean up. Some minor output changes.
- (print_statements): Clean up.
- (load_symbols): Put another - before -whole-archive.
- * ldexp.c (exp_print_tree): Change etree_value and etree_rel to
- print 0x and to omit leading zeroes. For etree_rel, use %B to
- print the BFD. For etree_assign, remove the space after the
- destination name.
- * ldwrite.c: Include "libiberty.h".
- (clone_section): Call xstrdup, not strdup.
- (ldwrite): Don't print any map information.
- (print_symbol_table, print_file_stuff, print_symbol): Remove.
- * ldmain.c (main): Call lang_map when appropriate.
- * ldmisc.c (vfinfo): Add support for %W.
- (print_address): Remove.
- * ldmisc.h (print_address): Don't declare.
- * Makefile.in: Rebuild dependencies.
-
-Mon Apr 29 10:29:07 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * configure.host (m68*-*-linux*): Add -dynamic-linker to
- HOSTING_CRT0. Search -lgcc both before and after -lc in
- HOSTING_LIBS. Look for crt{begin,end}.o in the compiler directory
- at first.
- (i[345]86-*-linux*): Look for crt{begin,end}.o in the compiler
- directory at first.
-
-Fri Apr 26 14:42:27 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmisc.h (demangle): Declare.
- * ldmisc.c: Include "libiberty.h". Include demangle.h with "",
- not <>.
- (demangle): Make non-static. Remove remove_underscore paramter.
- Always return an allocated string.
- (vfinfo): Free result of demangle. Add case 'G'. Use %T to print
- functionname, rather than calling demangle. Print a colon between
- the BFD(section+offset) and the line number.
- * ldmain.c (add_archive_element): Improve format of archive
- information in map file.
- (constructor_callback): Don't print anything to the map file.
- * ldlang.c (lang_one_common): Improve format of common symbol
- information in map file.
- * ldctor.c (ldctor_build_sets): If producing a map file, print set
- information.
- * ldwrite.c (print_symbol_table): Print a newline before the
- header in the map file.
- * Makefile.in: Rebuild dependencies.
-
- * ldmisc.c (vfinfo): Reindent.
-
-Mon Apr 22 12:07:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): If _cooked_size is not 0, then
- don't clobber it when not relaxing.
-
- * ld.h (ld_config_type): Remove traditional_format field.
- * ldmain.c (main): Use link_info.traditional_format rather than
- config.traditional_format.
- * ldlang.c (ldlang_open_output): Likewise.
- * lexsup.c (parse_args): Likewise.
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Likewise.
- * mpw-eppcmac.c (gldppcmacos_parse_args): Likewise.
-
- * ldlang.c (wild_doit): Discard debugging sections if we are
- stripping debugging information.
-
- * emulparams/z8002.sh (ARCH): Set to z8002, not z8k.
-
-Tue Apr 16 16:38:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldexp.c (fold_binary): Correct handling of subtraction with
- absolute values.
- (fold_name): Permit symbols in lang_allocating_phase_enum.
-
- * scripttempl/aout.sc: Only PROVIDE __stack when RELOCATING. Undo
- accidental changes in last patch.
-
-Tue Apr 16 10:25:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.tgt (powerpc*-*-{sysv,linux}): Add aliases.
- (powerpcle*-*-{sysv,solaris}): Ditto.
-
-Mon Apr 15 14:50:56 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * scripttempl/aout.sc: Add PROVIDE (__stack = 0) so I can use it
- in m68k/crt0.S without things blowing up.
-
-Fri Apr 12 16:40:56 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * scripttempl/m68kcoff.sc: Remove default address for .data so
- .text, .data, and .bss are all sequential.
-
-Thu Apr 11 12:05:35 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/m68kcoff.sc: Remove regions and simplify.
-
-Wed Apr 10 14:41:53 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300.sc: Add the "8-bit area" in the upper 256
- bytes of the address space. Put data from the ".eight" sections
- into the 8-bit area.
- * scripttempl/h8300h.sc: Likewise.
-
-Tue Apr 9 14:10:42 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * emultempl/generic.em (gld${EMULATION_NAME}_before_parse):
- Pass $ARCH to ldfile_set_output_arch instead of setting
- ldfile_output_architecture directly.
-
-Tue Apr 9 14:22:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc (.init,.fini): Put .init, .fini section
- next to .text. Put _etext after .text, .init, .fini, and
- .rodata{,2} sections.
-
-Tue Apr 9 12:18:57 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: Rearrange option documentation.
-
- * lexsup.c (ld_options): New static array.
- (parse_args): Build shortopts and longopts from ld_options array.
- (help): New static function.
- * ldver.h (help): Don't declare.
- * ldver.c (ldversion): Reindent.
- (help): Remove.
-
- * ld.texinfo, ld.1: Mention -E as a synonym for -export-dynamic.
-
-Mon Apr 8 11:56:23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em: When checking for a native emulation, check
- that the current emulation is the default emulation.
- * emultempl/sunos.em: Likewise.
-
- * configure.in: Permit --enable-shared to specify a list of
- directories.
- * configure: Rebuild.
-
- * lexsup.c (parse_args): Add -E as a synonym for -export-dynamic,
- for HP/UX compatibility.
-
-Fri Apr 5 14:30:14 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): New
- static function, if ${host} = ${target}.
- (gld${EMULATION_NAME}_after_open): Call check_ld_so_conf to find a
- needed shared library if ${host} = $[target}.
-
- * configure.host (i[345]86-*-linux*): Add -dynamic-linker to
- HOSTING_CRT0. Search -lgcc both before and after -lc in
- HOSTING_LIBS.
-
- * configure.tgt: Add i[345]86-*-freebsdelf* target; from John
- Polstra <jdp@polstra.com>.
-
-Fri Apr 5 18:11:25 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * emulparams/elf32{b,l}4300.sh (MACHINE): Add explicit
- architecture number.
- * scripttempl/elf.sc: Use $MACHINE definition if present.
- * configure.tgt (targ_extra_emuls): Force 4100 build to use same
- template as 4300.
-
-Mon Apr 1 17:35:40 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): Change region check to handle
- regions which end at the highest possible address correctly.
- From Roland Weber <roweber@ira.uka.de>.
-
- * ldlang.c (section_already_linked): New static function.
- (wild_doit): Discard sections with SEC_EXCLUDE set if not doing a
- relocateable link. Don't worry about section being NULL, since it
- never should be. Don't call init_os unless the section is going
- to be added.
- (ldlang_add_file): Call section_already_linked for each section.
- * ldmain.c (multiple_definition): Don't warn about multiple
- definitions in sections which are being discarded.
-
-Sun Mar 31 00:30:47 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/{ppcpe.sc, pe.sc} (.junk): Remove and use /DISCARD/.
- * emultempl/pe.em (init): Remove special case PPC code.
-
-Fri Mar 29 00:01:29 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300.sc: Make vectors section 0xc4 bytes long
- so as not to overwrite the magic syscall entry at 0xc4.
- * scripttempl/h8300h.sc: Likewise.
-
-Thu Mar 28 11:05:47 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.tgt (sparc64-*-solaris2*): Delete.
- Stick with sparc-*-solaris2*.
-
-Wed Mar 27 12:33:24 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (DISCARD_SECTION_NAME): Define to "/DISCARD/".
- * ldlang.c (init_os): Fail on an attempt to initialize any section
- named DISCARD_SECTION_NAME.
- (wild_doit): Discard input sections assigned to an output section
- named DISCARD_SECTION_NAME.
- * ld.texinfo: Document use of /DISCARD/.
-
- * ldlang.c: Fix some indentation and comments.
-
-Tue Mar 26 18:14:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Call bfd_set_error_program_name.
-
-Thu Mar 21 13:17:34 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: Fix a couple of indexing entries. Mention that
- --verbose displays builtin linker scripts.
-
- * ldmisc.c (vfinfo): case 'I': If the file is not in an archive,
- and the local symbol name does not match the filename, print the
- filename as well.
-
- Patches from John Polstra <jdp@polstra.com> for FreeBSD ELF:
- * lexsup.c (parse_args): -Bshareable is a synonym for -shared.
- * emulparams/elf_i386.sh (NONPAGED_TEXT_START_ADDR): Make the same
- as TEXT_START_ADDR.
-
-Wed Mar 20 18:18:25 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * ld.texinfo: Fix typos. Use @pxref only inside parentheses.
-
-Wed Mar 20 16:56:15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (add_wrap): New function.
- * ldmain.h (add_wrap): Declare.
- * lexsup.c (parse_args): Call add_wrap.
-
-Tue Mar 19 16:44:20 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.host (sparc*-*-solaris2* host): Accept any sparc variant.
-
-Wed Mar 13 17:47:31 1996 Jeffrey A Law (law@cygnus.com)
-
- * scripttempl/h8300.sc: Change name of page zero memory
- from "null" to "vectors". Create an output section for
- vectors. Add comments on how to explicitly place items
- in the vector table.
- * scripttempl/h8300h.sc: Likewise.
-
-Wed Mar 13 12:40:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/lnk960.em (machine_table): Add jx and hx.
-
- * genscripts.sh: Don't use ${9:-xx}, since Ultrix /bin/sh doesn't
- support it.
-
-Tue Mar 12 12:43:59 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
-
- * ld.h (ld_config_type): Add warn_multiple_gp field.
- * lexsup.c (parse_args): Handle --warn-multiple-gp.
- * ldmain.c (warning_callback): Suppress multiple gp values warning
- if --warn_multiple_gp was not used.
- * ld.texinfo, ld.1: Document --warn-multiple-gp.
-
-Tue Mar 12 12:02:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Handle --wrap.
- * ldmain.c (main): Initialize link_info.wrap_hash.
- * ldexp.c (fold_name): Use bfd_wrapped_link_hash_lookup in DEFINED
- and NAME cases.
- * ld.texinfo, ld.1: Document --wrap.
-
- * configure: Rebuild with autoconf 2.8.
-
- Don't do SunOS style dynamic linking for sparc-aout:
- * configure.tgt (sparc64-*-aout*): Use sparcaout, not sun4.
- (sparclite*-fujitsu-*, sparc*-*-aout): Likewise.
- (sparc*-wrs-vxworks*): Likewise.
- * emulparams/sparcaout.sh: New file.
- * Makefile.in (ALL_EMULATIONS): Add esparcaout.o.
- (esparcaout.c): New target.
-
-Wed Mar 6 16:06:52 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * scripttempl/elfppc.sc (.sdata2, .sbss2): Implement Feb 2 change
- in a different manner to work around differences in shell variable
- expansion.
-
-Wed Mar 6 18:08:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.h (ldemul_unrecognized_file): Declare.
- (ldemulation_xfer_type): Add unrecognized_file field.
- * ldemul.c (ldemul_unrecognized_file): New function.
- * ldlang.c (load_symbols): If a file can not be recognized, call
- ldemul_unrecognized_file before trying it as a linker script.
- * aix.em (gld${EMULATION_NAME}_unrecognized_file): New static
- function.
- (gld${EMULATION_NAME}_read_file): Use FOPEN_RT, not "r".
- (ld_${EMULATION_NAME}_emulation): Initialize unrecognized_file.
-
-Mon Mar 4 14:11:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (wild): Handle foo.a(.text) by mapping each included
- member of foo.a separately. From Jouke Numan <jnuman@bazis.nl>.
-
-Fri Mar 1 10:24:59 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment):
- Search trinary.cond rather than searching trinary.lhs twice.
-
-Tue Feb 27 15:08:43 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Edit out shared library support.
- (@TDIRS@): Edit out, can't use genscripts.
-
-Tue Feb 27 15:09:21 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * configure.tgt (m68k-*-linuxaout*, m68k-*-linux*): New targets.
- * emulparams/m68klinux.sh: New file.
- * emultempl/linux.em (gld${EMULATION_NAME}_before_allocation):
- Call bfd_${EMULATION_NAME}_size_dynamic_sections instead of
- bfd_linux_size_dynamic_sections.
- * Makefile.in (ALL_EMULATIONS): Add em68klinux.o.
- (em68klinux.c): New target.
- * configure.host (m68*-*-linuxaout*, m68*-*-linux*): New hosts.
-
-Tue Feb 27 12:55:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Sort into alphabetical order.
- Fill in missing entries.
-
- * lexsup.c (parse_args): Recognize --no-whole-archive.
- * ldlang.h (lang_input_statement_type): Add whole_archive field.
- * ldlang.c (new_afile): Set whole_archive field.
- (load_symbols): Check input file specific whole_archive field
- rather than global variable.
- * ld.texinfo, ld.1: Document --no-whole-archive.
-
-Tue Feb 20 16:07:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt: Correct gldi960 to gld960.
-
-Mon Feb 19 11:16:44 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Check
- the SONAME if it is available.
- (gld${EMULATION_NAME}_stat_needed): Use the SONAME, not the
- filename, when checking for conflicting library versions. Don't
- assume that the suffix is only numbers and dots.
-
- * ld.texinfo: Mention that -R can be used for -rpath.
-
-Sun Feb 18 15:05:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Check for 'do not mix' from native linker before
- trying to use -rpath.
-
-Thu Feb 15 13:58:06 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Remove explicit substitution of CFLAGS; autoconf
- does it anyhow.
- * configure: Rebuild.
- * Makefile.in (LDFLAGS): Set to @LDFLAGS@.
-
- * configure.in: Call AC_PROG_CC before configure.host.
- * configure: Rebuild.
- * configure.host: Remove go32 host, since it should no longer be
- necessary. Don't set CC for romp host.
-
- * scripttempl/elf.sc: Don't skip a page in virtual memory space if
- the text segment ends exactly on a page boundary.
-
- * configure.in: Substitute RPATH_ENVVAR.
- * configure: Rebuild.
- * configure.host: Set RPATH_ENVVAR.
- * Makefile.in (RPATH_ENVVAR): New variable.
- (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
-
-Wed Feb 14 18:49:01 1996 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * configure.in: Redo emulation handling so that each emulation
- searches the correct tool directory, based on the target alias.
- For example, "configure --enable-targets=m68k-coff i386-linux"
- will search /usr/local/i386-linux/lib for linux and
- /usr/local/m68k-coff/lib for m68k-coff.
- * configure: Rebuild.
- * configure.tgt: Add special tdir settings for Linux.
- * Makefile.in: Add @TDIRS@. Pass "$(tdir_EMUL)" to ${GENSCRIPTS}
- for each eEMUL.c target.
- * genscripts.sh: Accept specific alias as 9th argument, and use it
- in LIB_PATH.
-
-Wed Feb 14 16:38:36 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
-
- * ldlang.c (lang_set_startof): Don't do anything for a
- relocateable link.
-
- * ldgram.y (mri_script_file): Call mri_draw_tree.
- * mri.c (mri_draw_tree): Make globally visible. Don't bother to
- create memory regions.
- (mri_load): Don't call mri_draw_tree.
- * mri.h (mri_draw_tree): Declare.
-
- * configure.tgt (m68*-*-psos): New target.
- * emulparams/m68kpsos.sh: New file.
- * scripttempl/psos.sc: New file.
- * Makefile.in (ALL_EMULATIONS): Add em68kpsos.o.
- (em68kpsos.c): New target.
-
-Wed Feb 14 11:09:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.tgt (*-*-ieee*): New target; use vanilla.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Strip
- `:foo' from ${ARCH}.
-
-Tue Feb 13 15:58:58 1996 Bryan Ford <baford@snake.cs.utah.edu>
-
- * scripttempl/i386msdos.sc: Don't pad the .text section. Put
- .rodata in .data.
-
-Tue Feb 13 14:04:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Warn if
- it looks like we might be linking in two different versions of the
- same shared library. Based on a patch from H J Lu <hjl@zoom.com>.
-
-Thu Feb 8 19:25:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_size_sections): Increment the section size when a
- padding statement is encountered.
-
-Wed Feb 7 14:01:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Look for --enable-shared. Change the value of
- BFDLIB when linking against a shared library on SunOS.
- * configure: Rebuild.
- * configure.host: If using a shared BFD library, try to pass a
- reasonable -rpath option when linking.
- * Makefile.in (BFDLIB): Set to @BFDLIB@.
-
-Tue Feb 6 12:29:14 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * emulparams/elf64_sparc.sh (ARCH): Change to `sparc:v9'.
- * emultempl/generic.em: Strip `:foo' from ${ARCH}.
-
-Mon Feb 5 16:25:30 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Support for building bfd and opcodes as shared libraries, based on
- patches from Alan Modra <alan@spri.levels.unisa.edu.au>:
- * configure.in (HLDFLAGS): New substitution.
- * configure: Rebuild.
- * configure.host: Set HLDFLAGS on SunOS.
- * Makefile.in (HLDFLAGS): New variable.
- (BFDDEP): New variable.
- (BFDLIB): Change to -L../bfd -lbfd.
- ($(LD_PROG)): Depend upon $(BFDDEP) rathern than $(BFDLIB). Use
- $(HLDFLAGS) in link.
- (check): Set LD_LIBRARY_PATH in the environment.
-
-Fri Feb 2 19:26:25 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * scripttempl/elfppc.sc (.sdata2, .sbss2): Put .sdata2 and .sbss
- in the read-only section, not read/write unless we are making a
- shared library.
- (.debug*): Add dwarf debug sections.
- (.rela.{sdata*,sbss*}): Add sections.
-
-Fri Feb 2 16:50:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Regenerate.
-
-Thu Feb 1 10:50:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/elf_i386.sh (TEXT_START_ADDR): Change to 0x8048000,
- for SVR4 compatibility.
-
- * ldexp.c (exp_fold_tree): Correct handling of ABSOLUTE.
-
-Wed Jan 31 17:30:19 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.tgt (i[345]86-*-cygwin32, powerpcle-*-cygwin32): New.
- * emultempl/pe.em (definfo init): Make the default stack reserve
- of a PPC larger.
-
-Wed Jan 31 14:34:23 1996 Richard Henderson <rth@tamu.edu>
-
- * configure.tgt (m68*-apple-aux*): New target.
- * emulparams/m68kaux.sh: New file.
- * scripttempl/m68kaux.sc: New file.
- * Makefile.in (ALL_EMULATIONS): Add em68kaux.o.
- (em68kaux.c): New target.
-
-Tue Jan 30 13:18:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Ignore
- -bnoentry, since the right thing tends to happen anyhow.
-
-Mon Jan 29 12:29:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo, ld.1: Document -export-dynamic.
-
-Fri Jan 26 11:11:55 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * emultempl/sunos.em: Check for native compile by comparing
- ${target} and ${host}.
-
-Thu Jan 25 16:46:58 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * emulparams/{elf32b4300.sh, elf32l4300.sh}: Changed
- TEXT_START_ADDR to allow use on IDT and PMON systems.
-
-Wed Jan 24 20:59:40 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args):
- correct spelling.
-
-Wed Jan 24 16:59:19 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * configure.tgt (sparc64-*-solaris2*): New configuration.
- (sparc64-*-aout*): Renamed from sparc64*.
-
-Mon Jan 22 13:01:35 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * Makefile.in (GENSCRIPTS): Pass @host@ @target@ @target_alias@.
- * genscripts.sh: Set host, target and target_alias variables.
- Check for native compile by comparing ${target} and ${host}.
- * emultempl/elf32.em: Likewise.
- * scripttempl/elfmips.sc: Test ${target}, not ${target_alias}.
-
-Mon Jan 22 11:03:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Refine eabi support to better support
- .sdata, .sdata2, .sbss, etc. sections.
-
-Tue Jan 16 15:16:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (%union): Add phdr field.
- (phdr): Use phdr_qualifiers rather than opt_hdrs and opt_at.
- (phdr_qualifiers): New nonterminal. Add support for FLAGS.
- (opt_hdrs, hdr): Remove.
- (phdr_val): New nonterminal.
- * ldlang.c (lang_new_phdr): Replace hdrs parameter with filehdr
- and phdrs parameters. Add flags parameter.
- (lang_record_phdrs): Update for changes to lang_phdr. Pass flags
- to bfd_record_phdr.
- * ldlang.h (struct lang_phdr): Replace hdrs field with filehdr and
- phdrs fields. Add flags field.
- (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Remove.
- (lang_new_phdr): Update declaration.
- * ld.texinfo: Document FLAGS.
-
-Mon Jan 15 15:07:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation):
- Don't make a shared library because of an undefined reference to
- __GLOBAL_OFFSET_TABLE_.
-
- Add some Irix 5 support, mostly from Kazumoto Kojima
- <kkojima@info.kanagawa-u.ac.jp>:
- * emulparams/elf32bmip.sh (SCRIPT_NAME): Change to elfmips.
- (SHLIB_TEXT_START_ADDR): Define.
- (OTHER_GOT_SYMBOLS): Define.
- (OTHER_READWRITE_SECTIONS): Remove initialization of _gp.
- (EXECUTABLE_SYMBOLS): Don't define.
- (DYNAMIC_LINK): Don't define.
- * emulparams/elf32lmip.sh: Same changes as elf32bmip.sh.
- * scripttempl/elfmips.sc: New file.
- * configure.host (mips*-dec-bsd*): Change mips to mips*.
- (mips*-sgi-irix4*): Likewise.
- (mips*-sgi-irix5*): New entry.
- * Makefile.in (eelf32bmip.c): Depend upon elfmips.sc rather than
- elf.sc.
- (eelf32lmip.c): Likewise.
-
-Sat Jan 13 09:41:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Remove support for .rel.* sections. Add
- .rela.got.neg section.
-
-Fri Jan 12 14:56:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/sh.sc: Only build constructors when CONSTRUCTING.
-
- * ldmisc.c: Include <stdarg.h> rather than <varargs.h> if
- ANSI_PROTOTYPES is defined. Remove special handling of
- WINDOWS_NT. Various indendation fixes.
- (vfinfo): Change fmt parameter to const char *.
- (info_msg): Write <stdarg.h> version.
- (einfo, minfo, finfo): Likewise.
- (info_assert): Change file parameter to const char *.
- * ldmisc.h (einfo, minfo, info_msg): If ANSI_PROTOTYPES is
- defined, use a real prototype.
- (info_assert): Change first parameter to be const char *.
-
-Fri Jan 12 13:29:55 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Add support for .sdata2/.sbss2, etc. Add
- in old support that 2.7.2 needs, but the current compiler does
- not.
-
- * Makefile.in (eelf32{,l}ppc.c): Fix up dependencies to use the
- correct Linker script template.
-
- * emulparams/elf32{,l}ppc.sh (TEXT_START_ADDR): Set to 0x40000,
- not 0x400000.
- (DATA_ADDR,NONPAGED_TEXT_START_ADDR): Delete.
-
-Tue Jan 9 15:53:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/alpha.sc: Put .rconst right after .rdata.
-
-Fri Jan 5 14:07:45 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation):
- sort using right pointer.
-
-Fri Jan 5 12:25:47 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Remove support for creating special
- labels for eabi section begin/end here. The compiler now uses
- crt{i,n}.o to create these symbols.
-
-Thu Jan 4 17:08:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Change existing Linux HOSTING_CRT0 to be used
- for a.out only, and put in appropriate HOSTING_CRT0 and
- HOSTING_LIBS values for Linux ELF.
-
-Thu Jan 4 12:02:05 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/h8300.sc: Use all 64K for ram.
- * scripttempl/h8300h.sc: Define 256K ram size.
-
-Thu Dec 21 15:57:18 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Pass
- export_defines as true to bfd_xcoff_size_dynamic_sections if -unix
- was used, regardless of whether -bE was used.
-
-Tue Dec 19 17:35:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_after_open): Only set
- relocateable before calling ldctor_build_sets if the output file
- is in an XCOFF format.
-
-Fri Dec 15 16:34:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldwrite.c (build_link_order): When handling a data statement, if
- the endianness of the output file is unknown, use the endianness
- of the input file.
-
-Tue Dec 12 13:55:41 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in: Recognize mips-*-* as equivalent to
- mips-idt-ecoff.
- * mpw-eppcmacos.c: Rename to shorter mpw-eppcmac.c.
- * mpw-ld.r: Add version resources.
- (cfrg): Use symbolic instead of literal name for executable.
-
-Mon Dec 11 15:13:41 1995 Kim Knuttila <krk@cygnus.com>
-
- * scripttempl/ppcpe.sc (FINI): Moved the .reloc section.
-
-Wed Dec 6 14:33:50 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * ldlang.c (print_statement{,s}): Delete duplicate prototype.
- (print_statement_list): Renamed from print_statement. All callers
- updated.
- (print_statement): New function to print just one statement.
- (print_{data,reloc,padding}_statement): Don't crash if
- output_section == NULL.
- (dprint_statement): New function.
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix
- call to sort_sections.
-
-Wed Dec 6 14:59:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (unix_ld): New static variable.
- (gld${EMULATION_NAME}_parse_args): Handle -unix.
- (gld${EMULATION_NAME}_before_allocation): If unix_ld, pass
- gc as false and export_defineds as true to size_dynamic_sections.
-
- * ldexp.c (exp_fold_tree): Permit assignments to dot in the final
- phase if the current section is abs_output_section.
-
-
-Tue Dec 5 09:49:39 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix call
- to sort_sections.
-
-Fri Dec 1 16:48:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (PHDRS): New token.
- (ifile_p1): Accept phdrs.
- (section): Accept phdr_opt at the end of the section definition.
- (phdr_op): New nonterminal.
- (phdrs, phdr_list, phdr, phdr_type, opt_hdrs, hdr): Likewise.
- * ldlex.l: Accept PHDRS.
- * ldlang.h (struct lang_output_section_phdr_list): Define.
- (lang_output_section_statement_type): Add phdrs field.
- (struct lang_phdr): Define.
- (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Define.
- (lang_new_phdr): Declare.
- * ldlang.c (lang_phdr_list): New static variable.
- (lang_output_section_statement_lookup): Initialize phdrs field.
- (lang_process): Call lang_record_phdrs.
- (lang_new_phdr): New function.
- (lang_section_in_phdr): New function.
- (lang_record_phdrs): New static function.
- * ld.texinfo: Document PHDRS.
-
-Thu Nov 30 13:14:30 1995 Kim Knuttila <krk@cygnus.com>
-
- * scripttempl/ppcpe.sc: Moved .edata into its own section to
- expose it.
-
-Thu Nov 30 11:32:34 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * configure.host (m68*-motorola-sysv): Define HOSTING_CRT0 and
- HOSTING_LIBS for testing.
- (m88*-motorola-sysv3): Define HOSTING_CRT0 and HOSTING_LIBS for
- testing.
-
-Tue Nov 28 12:14:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Set config.dynamic_link to false for -N
- and -n.
-
-Mon Nov 27 13:12:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.7.
-
-Fri Nov 24 18:35:35 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.sc: Two .junk's is too much junk.
-
-Tue Nov 21 16:14:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Use BFD_NEED_DECLARATION.
- * acconfig.h: Put NEED_DECLARATION_FREE in @TOP@ section.
- * configure, config.in: Rebuild with autoconf 2.6.
-
- * ldmain.c (constructor_callback): Don't warn about BFD_RELOC_CTOR
- being unsupported if this is not a relocateable link and the input
- BFD supports it, since ldctor_build_sets can cope with that case.
-
-Fri Nov 17 16:23:15 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (powerpc-*-macos*): New target.
- * emulparams/ppcmacos.sh: New file, PowerMac emulation.
- * Makefile.in (ALL_EMULATIONS): Add eppcmacos.o.
- (eppcmacos.c): New target.
- * mpw-eppcmacos.c: Update.
- * mpw-make.sed: Edit out attempts to use {GENSCRIPTS}.
-
-Fri Nov 17 10:37:27 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not
- $(host_canonical) and $(target_canonical).
- (CXX_FOR_TARGET): Likewise.
-
-Thu Nov 16 11:23:42 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.sc (.endjunk): Move definition of `end' to here
- so the malloc heap begins at a sane place.
-
-Thu Nov 16 03:09:32 1995 Ken Raeburn <raeburn@cygnus.com>
-
- Version 2.6 released.
- * ldver.c (ldversion): Update to 2.6.
-
- * Makefile.in (mostlyclean): Delete ldemul-list.h here, but not
- $(GENERATED_*FILES), since they need to be retained by distclean.
- (maintainer-clean, realclean): Delete them here.
-
-Tue Nov 14 17:08:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Open the
- base file with FOPEN_WB, not "w".
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Use the
- environment variable LD_RUN_PATH if neither -rpath nor -rpath-link
- were used.
- (gld${EMULATION_NAME}_before_allocation): Use the environment
- variable LD_RUN_PATH if -rpath was not used.
- * ld.texinfo, ld.1: Document LD_RUN_PATH.
-
-Thu Nov 9 13:09:29 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Recognize
- -bl and -bloadmap options.
-
- * ldfile.c (ldfile_try_open_bfd): If bfd_error_invalid_target,
- report a better error.
-
- * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Add
- new local variable special_sections, and pass it to
- size_dynamic_sections. Look through the results, and move the
- sections around in the mapping so that they are defined correctly.
-
-Wed Nov 8 11:40:59 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.c (ldemul_default_target): Cast getenv return value.
-
-Tue Nov 7 11:15:36 1995 Kim Knuttila <krk@cygnus.com>
-
- * emulparams/ppcpe.sh (ARCH): New file for PowerPC Portable
- Executable support.
- * scripttempl/ppcpe.sc: New file for PowerPC Portable Executable
- support.
-
- * configure.tgt (targ_extra_emuls): Added powerpcle-pe target.
- * Makefile.in (ALL_EMULATIONS): Added eppcpe.o target.
-
- * emultempl/pe.em (TARGET_IS_ppcpe): file tailoring macro
- (gld_$_before_allocation): added hooks for toc construction based
- on the above macro.
-
-Tue Nov 7 11:47:23 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.texinfo: The linker does not use _main as an entry point.
-
-Tue Nov 7 11:46:11 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * scripttempl/m88kbcs.sc (.data): Calculate next boundary modulo
- 0x2000 not 0x200.
-
-Mon Nov 6 10:59:21 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add test for whether free must be declared.
- * sysdep.h: Declare free if necessary. Include "ansidecl.h".
- * acconfig.h: Explain NEED_DECLARATION_FREE.
- * configure, config.in: Rebuild.
-
- * lexsup.c (parse_args): Take B:: out of shortopts.
-
-Sun Nov 5 03:08:28 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * emulparams/i386nbsd.sh (EXECUTABLE_SYMBOLS): Set __DYNAMIC to 0
- for now, as with m68k4kbsd, until shared library support gets
- done.
-
- * configure.host: For i386 BSD variants, crt0.o lives in
- /usr/lib. (True for NetBSD at least, unconfirmed for others.)
-
-Wed Nov 1 15:42:45 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * Makefile.in (ALL_EMULATIONS): Add edelta68.o.
- (edelta68.c): New target.
- * configure.tgt (m68*-motorola-sysv*): New target.
- * emulparams/delta68.sh: New file.
- * scripttempl/delta68.sc: New file.
-
- * scripttempl/m88kbcs.sc: Handle .init and .fini. Change section
- addresses.
-
-Wed Nov 1 11:41:56 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (mri_script_command): Accept ',' as well as '=' in
- ALIGN and ALIGNMOD statements.
-
- * emultempl/aix.em: Include ldgram.h.
- (gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on
- AIX 4.1.
- * Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h.
-
-Tue Oct 31 18:22:24 1995 David Mosberger-Tang <davidm@azstarnet.com>
-
- * configure.host (alpha-*-linux*): New host.
- * configure.tgt (alpha-*-linux*): New target.
-
-Tue Oct 31 12:36:52 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (export_files): Remove.
- (import_files): Make static.
- (struct export_symbol_list): Define.
- (export_symbols): New static variable.
- (gld${EMULATION_NAME}_parse_args): Handle an initial -b option
- correctly. Call read_file for an export file.
- (gld${EMULATION_NAME}_before_allocation): Call
- bfd_xcoff_export_symbol for each export symbol, rather than
- calling read_file for each export file.
- (gld${EMULATION_NAME}_read_file): For an export file, make the
- exported symbols undefined, and store them on the export_symbols
- list.
-
-Sat Oct 28 00:10:03 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args):
- Don't hang if last option is unrecognised.
- (gld_${EMULATION_NAME}_set_symbols): Insert created
- symbols into ABS output section.
-
-Fri Oct 27 18:03:17 1995 Niklas Hallqvist <niklas@appli.se>
-
- * Makefile.in (ALL_EMULATIONS): Added support for the NetBSD
- m68k4k arch.
- (em68k4knbsd.c): New rule.
-
- * configure.tgt: Added support for the NetBSD m68k4k arch.
-
- * genscripts.sh, ldint.texinfo,
- emulparams/{a29k,armaoutb,armaoutl,coff_sparc,ebmon29k,gld960,
- gld960coff,go32,h8300,h8300h,h8500,h8500b,h8500c,h8500m,h8500s,
- hp300bsd,hp3hpux,hppaelf.sh,i386aout,i386bsd,i386coff,i386go32,
- i386linux,i386lynx,i386nbsd,lnk960,m68kaout,m68kcoff,m68klynx,
- m88kbcs,mipsbig,mipsbsd,mipsidt,mipsidtl,mipslit,news,ns32knbsd,
- pc532machaout,riscix,sa29200,sh,shl,sparclynx,sparcnbsd,
- st2000,sun3,sun4,vanilla,vax,vsta,w65,z8001,z8002}.sh: Changed
- PAGE_SIZE to TARGET_PAGE_SIZE.
-
- * emulparams/m68knbsd.h: Ditto.
- (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): We have 8K pagesize.
- (EXECUTABLE_SYMBOLS): Hardcode __DYNAMIC to zero for the time
- being.
-
- * emulparams/m68k4knbsd.sh: New file.
-
- * scripttempl/aout.sc: Expand EXECUTABLE_SYMBOLS if relocating.
-
-Fri Oct 27 17:59:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em: Include ldctor.h.
- (gld${EMULATION_NAME}_after_open): New static function.
- (gld${EMULATION_NAME}_before_allocation): Call find_relocs.
- (gld${EMULATION_NAME}_find_relocs): New static function.
- (gld${EMULATION_NAME}_find_exp_assignment): New static function.
- (ld_${EMULATION_NAME}_emulation): Use new after_open function.
- * scripttempl/aix.sc: Use CONSTRUCTORS in .data.
- * ldctor.c (struct set_info): Move definition into ldctor.h.
- (struct set_element): Likewise.
- (sets): Make non-static.
- (ldctor_add_set_entry): Add name parameter. Save it in the new
- set element.
- (ldctor_build_sets): Avoid being called twice. Pass set element
- name to lang_add_reloc.
- * ldctor.h (struct set_info): Move definition here from ldctor.c.
- (struct set_element): Likewise. Add new field name.
- (sets): Declare.
- (ldctor_add_set_entry): Declare new name parameter.
- * ldwrite.c (build_link_order): Don't insist that either name or
- section be NULL in a lang_reloc_statement.
- * ldmain.c (add_to_set): Pass NULL to ldctor_add_new_set_entry for
- new name parameter.
- (constructor_callback): Pass name to ldctor_add_new_set_entry for
- new name parameter.
-
- * ldmisc.c (demangle): Fix indentation. Remove a leading period.
-
-Thu Oct 26 22:22:49 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in: Add PowerMac target support, generate config.h.
- * mac-ld.r: New file, Mac resources.
- * mpw-make.sed: New file, edits Makefile.in into MPW syntax.
- * mpw-make.in: Remove.
- * mpw-eppcmacos.c: Prebuilt version of PowerMac linking script.
-
-Thu Oct 26 14:11:26 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Treat
- -static as a synonym for -bnso.
-
- * scripttempl/aix.sc: Move special symbols inside sections.
- Always start .data at 0.
-
-Wed Oct 25 11:52:12 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * Makefile.in (diststuff): Also make info.
- (maintainer-clean realclean): Also delete *.info*.
-
-Wed Oct 25 11:27:25 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/aix.em: Add support for various AIX linker options,
- for AIX import and export files, and for AIX shared objects.
- * scripttempl/aix.sc: Add .pad. Put .ds just before the TOC.
-
- * ldmain.c (main): Initialize new field link_info.static_link.
-
- * ldmain.c (add_keepsyms_file): Add \n at end of einfo calls.
- (constructor_callback): Likewise.
- * ldmisc.c (vfinfo): Likewise.
- * ldwrite.c (build_link_order): Likewise.
-
- * ld.texinfo: The MRI ALIGN directive is supported.
-
-Mon Oct 23 11:46:43 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * emulparams/elf32vr4300.sh: Deleted.
- * emulparams/elf32vr4300el.sh: Deleted.
- * emulparams/elf32b4300.sh: Added.
- * emulparams/elf32l4300.sh: Added.
- * configure.tgt, Makefile.in: Updated the build to use the
- new 8.3 unique names.
-
-Thu Oct 19 17:41:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (entry_symbol): Make non-static.
- * ldlang.h (entry_symbol): Declare.
-
- * ldlex.l: Treat PROVIDE as a keyword in expression state.
-
-Wed Oct 18 17:34:06 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/pe.sc (.bss): Move to be after .text
-
-Tue Oct 17 12:22:05 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_exp_assignment):
- Search trinary.cond rather than searching trinary.lhs twice. From
- linli@ihp.PHys.ethz.CH.
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Move
- directory searching code into gld${EMULATION_NAME}_search_dir.
- (gld${EMULATION_NAME}_search_dir): New static function, extracted
- from gld${EMULATION_NAME}_find_so.
- (global_needed, global_found): New static variables.
- (gld${EMULATION_NAME}_after_open): New static function.
- (gld${EMULATION_NAME}_search_needed): New static function.
- (gld${EMULATION_NAME}_try_needed): New static function.
- (gld${EMULATION_NAME}_check_needed): New static function.
- (ld_${EMULATION_NAME}_emulation): Use new after_open function.
- * ld.texinfo, ld.1: Mention -rpath-link on SunOS.
-
- * Makefile.in (eelf32ppc.c): Depend upon elf32.em, not generic.em.
- (eelf32lppc.c): Likewise.
- * emulparams/elf32lppc.sh (TEMPLATE_NAME): Define as elf32.
- (GENERATE_SHLIB_SCRIPT): Define as yes.
-
-Mon Oct 16 19:11:13 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em: Struct bfd_elf_link_needed_list is now named
- bfd_link_needed-list; make appropriate changes.
-
- * configure.tgt (powerpc-*-aix*): New target; use aixppc.
- (rs6000-*-aix*): New target; use aixrs6.
- * emulparams/aixppc.sh, emulparams/aixrs6.sh: New files.
- * emultempl/aix.em: New file.
- * scripttempl/aix.sc: New file.
- * Makefile.in (ALL_EMULATIONS): Add eaixppc.o and eaixrs6.o.
- (eaixppc.c, eaixrs6.c): New targets.
-
-Fri Oct 13 14:00:37 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttemp/pe.sc (.reloc): Move to the end.
-
-Tue Oct 10 17:53:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_finish): Don't try to use an entry_symbol from a
- section which was not linked into the final output.
-
-Tue Oct 10 10:17:22 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Fix
- fatal typos.
-
-Tue Oct 10 01:01:51 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (args_type): Add rpath_link field.
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search for
- required dependencies in rpath_link path. Only search
- LD_LIBRARY_PATH when configured native.
- * lexsup.c (parse_args): Recognize -rpath-link.
- * ld.1, ld.texinfo: Document -rpath-link.
-
-Sat Oct 7 17:07:17 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
- bother searching for needed libraries unless doing a final link.
-
-Fri Oct 6 16:26:16 1995 Ken Raeburn <raeburn@cygnus.com>
-
- Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * ld/ld.1: Fix formatting bugs.
-
-Wed Oct 4 17:37:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldexp.c (exp_get_abs_int): Return bfd_vma, not int.
- * ldexp.h (exp_get_abs_int): Update declaration.
- * ldlang.c (print_output_section_statement): Use fprintf_vma to
- print return value of exp_get_abs_int.
-
-Mon Oct 2 13:56:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (global_stat): New file static variable.
- (gld${EMULATION_NAME}_try_needed): Call stat_needed to make sure
- that the file has not already been included under another name.
- (gld${EMULATION_NAME}_stat_needed): New static function.
-
-Fri Sep 29 12:00:18 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * scripttempl/armcoff.sc: Start .text at 0x8000.
- Start .data at 0x40000.
-
-Fri Sep 29 11:09:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): If
- command_line.rpath is set, use it, rather than the -L options, to
- build the rules section.
- * ld.texinfo: Document this use of -rpath.
-
- * lexsup.c (parse_args): Don't set link_info.shared for -assert
- pure-text. Pass true, not 1, to lang_add_entry.
- * emultempl/sunos.em (find_assign): New static variable.
- (found_assign): New static variable.
- (gld${EMULATION_NAME}_before_allocation): Rename local h to hdyn.
- If not a relocateable link, and no start symbol was specified on
- the command line, and there are any undefined symbols, set
- link_info.shared. If link_info.shared is set, set the address of
- the .text section to 0x20.
- (gld${EMULATION_NAME}_find_assignment): Rename from
- gld${EMULATION_NAME}_find_statement_assignment. If find_assign is
- set, then just set found_assign based on whether an assignment is
- found to find_assign.
- (gld${EMULATION_NAME}_get_script): Don't use a special script when
- producing a shared library.
- * emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Remove.
- * scripttempl/aout.sc: Remove CREATE_SHLIB tests.
- * ldlang.c (entry_from_cmdline): New global variable.
- (lang_add_entry): Change cmdline parameter from int to boolean.
- Use global entry_from_cmdline rather than function static
- from_cmdline.
- * ldlang.h (entry_from_cmdline): Declare.
- (lang_add_entry): Change declaration of second parameter from int
- to boolean.
- * ldgram.y: Pass false, not 0, to lang_add_entry.
-
-Thu Sep 28 12:34:13 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (parsing_defsym): Declare.
- * ldlex.h (lex_string): Declare.
- * ldlex.l (lex_string): Define.
- * lexsup.c (parsing_defsym): Define.
- (parse_args): In OPTION_DEFSYM case, set lex_string before calling
- lex_redirect, and clear it after calling yyparse. Set
- parsing_defsym around call to yyparse.
- * ldmain.c (main): Set lex_string before calling lex_redirect, and
- clear it after calling yyparse.
- * ldmisc.c (vfinfo): For %S, handle --defsym arguments and built
- in linker scripts correctly.
-
- * scripttempl/sparccoff.sc: Add .ctors/.dtors handling like other
- COFF targets, allowing for the leading underscore used on SPARC
- COFF.
-
- * lexsup.c (parse_args): Handle -assert.
- * emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Define.
- * emultempl/sunos.em (gld${EMULATION_NAME}_get_script): Use the
- shared library script when appropriate.
- * scripttempl/aout.sc: If CREATE_SHLIB is set, start the .text
- section at SIZEOF_HEADERS.
-
-Thu Sep 28 01:40:37 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * Makefile.in (earmcoff.c): Build.
- * configure.tgt (arm-*-coff): New target
- * emulparms/armcoff.sh: New file.
- * scripttempl/armcoff.sc: New file.
-
-Tue Sep 26 10:59:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/i386coff.sc: Remove .data2; no longer needed.
-
-Fri Sep 22 18:09:02 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldfile.c (ldfile_set_output_arch): Make arch const.
-
-Thu Sep 21 17:55:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc: Correctly locate __bss_start at the
- beginning of the .bss area, not at the end of data. Add
- __sbss_{start,end} symbols.
-
-Wed Sep 20 12:29:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET): Quote $(program_transform_name).
- (CXX_FOR_TARGET, install): Likewise.
-
-Mon Sep 18 14:53:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patches by Alan Modra <alan@spri.levels.unisa.edu.au>:
- * Makefile.in (CC_FOR_TARGET): Remove brokensed stuff.
- (CXX_FOR_TARGET): Likewise.
- (install): Likewise.
- (GENERATED_HFILES): Remove config.h.
- (.dep): Depend upon config.h.
-
-Mon Sep 18 14:39:38 1995 Arne H. Juul <arnej@pvv.unit.no>
-
- * configure.tgt (mips*-dec-netbsd*): New target.
-
-Fri Sep 15 20:01:52 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * configure.host (m88*-*-dgux*): Fix another shell syntax error.
-
-Fri Sep 15 23:28:05 1995 Andrew Cagney <cagney@highland.com.au>
-
- * configure.host (i[345]86-*-bsd*): Fix shell syntax error.
-
-Thu Sep 12 12:50:49 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttemp/pe.sc: Allow both spellings of .ctors/.dtors.
- Start .text section on the right boundary. Always align
- stabs.
-
-Tue Sep 12 12:24:17 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (maintainer-clean): New target.
-
- * ldmain.c (struct warning_callback_info): Define.
- (warning_callback): Add new parameter symbol. Call
- warning_find_reloc to try to find the section and VMA.
- (warning_find_reloc): New static function.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass NULL as symbol parameter to warning callback.
-
- * ld.texinfo: Clarify -L option.
-
- * ldlang.c (lang_one_common): Add cast to avoid warning.
- (topower): Likewise. Also, reindent.
- * ldwrite.c (clone_section): Change i to unsigned int.
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Add
- cast to avoid warning.
-
-Fri Sep 8 16:32:43 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (config.status): Depend upon configure.tgt.
-
- * ldemul.h (ldemul_set_symbols): Declare.
- (ldemul_parse_args): Declare.
- * ldemul.c (ldemul_parse_args): Fix indentation.
-
- * configure.in: Call AC_HEADER_DIRENT.
- * configure, config.in: Rebuild.
- * emultempl/sunos.em: Use autoconf recommend mechanism to define
- DIR and struct dirent.
-
- * configure.tgt (mips*-*-bsd*): New case.
-
- * configure.host (i[345]86-sequent-ptx* | i[345]86-sequent-sysv*)
- New case.
- * configure.tgt (i[345]86-*-ptx*): New case.
-
-Thu Sep 7 10:48:26 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * config.in: Rename from config.h.in.
- * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
- Check for config.h:config.in when creating stamp-h.
- * configure: Rebuild.
- * Makefile.in (stamp-h): Depend upon config.in rather than
- config.h.in. Set CONFIG_HEADERS to config.h:config.in when
- calling config.status.
-
- * Makefile.in (distclean): Remove config.h and stamp-h.
-
- * configure.host (sparc-*-sunos64*): Remove.
- * ldlang.c (lang_map): Check BFD64, not HOST_64_BIT.
-
- * ldexp.c (exp_fold_tree): Don't warn about moving the location
- counter backward in the absolute section.
-
-Wed Sep 6 14:42:11 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Rewrite to use autoconf.
- * configure.host: New file.
- * configure.tgt: New file.
- * aclocal.m4: New file.
- * configure: New file, built by autoconf.
- * acconfig.h: New file.
- * config.h.in: New file, built by autoheader.
- * sysdep.h: New file.
- * ld.h: Incorporate old contents of config.h.
- * config.h: Remove.
- * Makefile.in: Various changes for new configure script. Also:
- (CC_FOR_BUILD): Remove.
- (ldmain.o): Don't bother to ensure that EMUL is non-empty.
- (dep.sed): Use @SRCDIR@, not @srcdir@.
- * dep-in.sed: Use @SRCDIR@, not @srcdir@.
- * genscripts.sh: Create ldscripts if it does not exist.
- * ldemul.c, lexsup.c, mpw-emipsidt.c: Don't include "config.h".
- * mpw-esh.c, emultemp/*.em: Likewise.
- * ldmain.c: Likewise. Include <ctype.h>. Don't try to set
- HAVE_SBRK here.
- * config/*.mt, config/*.mh: Remove.
-
-Tue Sep 5 14:55:24 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * configure.in: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
- ns32k-pc532-lites* like ns32k-pc532-netbsd*. From Ian Dall.
-
-Fri Sep 1 22:29:52 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/pe.sc: Fix typo in spelling of .ctors/.dtors.
-
-Fri Sep 1 13:13:29 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (warning_callback): Add abfd, section, and address
- parameters.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Change call to warning accordingly.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): If not
- relocateable and not shared, put .gnu.warning.SYMBOL sections into
- the .text section.
-
-Fri Sep 1 08:35:16 1995 James G. Smith <jsmith@beauty.cygnus.com>
-
- * configure.in: Added mips*vr4300-idt-elf* and
- mips*vr4300el-idt-elf* targets.
- * Makefile.in: Added eelf32vr4300* targets.
- * emulparams/{elf32vr4300.sh, elf32vr4300el.sh}: Added.
- * config/{mips-vr4300.mt, mips-vr4300el.mt}: Added.
-
-Fri Sep 1 10:51:45 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/a29k.sc: Fix to be reasonable. From Brendan Kehoe
- <brendan@cygnus.com>.
-
-Thu Aug 31 16:37:07 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * ldemul.c (ldemul_parse_args): New.
- * ldemul.h (ld_emulation_xfer_struct): Add parse_args.
- * lexsup.c (all pe stuff): Moved into pe.em
- (parse_args): Call emulation arg parser.
- * emultempl/pe.em (parse_args): handle PE specfic args.
-
-Thu Aug 31 17:01:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_memory_region_lookup): Don't use the first region
- as the default region. Create a new region instead.
-
-Tue Aug 29 14:21:41 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * ldemul.c (ldemul_set_symbols): New function.
- * ldemul.h (ld_emulation_xfer_struct): Add set_symbols.
- * ldmain.c (main): Add call to ldemul_set_symbols.
- * lexsup.c (set_pe_value): New args.
- (set_pe_name): New.
- (parse_args): Cope with new set_pe_value args.
- * emultempl/pe.em (set_symbols): New function.
- (ld_emulation_xfer_struct): Add set_symbols.
- * scripttempl/pe.sc: Use new symbols.
-
-Thu Aug 24 18:12:18 1995 Ian Lance Taylor (ian@cygnus.com)
-
- * lexsup.c (parse_args): Don't call set_default_dirlist for -O.
- For -Y, ignore a leading `P,', and only call set_default_dirlist
- after processing all the other arguments.
-
-Tue Aug 22 07:36:58 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/pe.sc: Keep .edata, don't base stabs at 0.
- * emulparams/armpe.sh: Run PE script.
-
-Mon Aug 21 18:30:42 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * ldmain.c (main): Remove PE stuff.
- * lexsup.c (options): Load more PE options.
- (set_pe_value): New function.
-
-Thu Aug 17 13:35:49 1995 steve chamberlain <sac@slash.cygnus.com>
-
-
- * emultempl/{armpe.sc, i386pe.sc}: Deleted.
- * emultempl/pe.sc: New file performs generic PE support and sorts
- archive members.
- * emulparams/{armpe.sh,i386pe.sh}: Use new file.
- * scripttempl/{armpe.sc, i386pe.sc}: Deleted
- * scripttempl/pe.sc: New.
- * Makefile.in: Use new files.
-
-Thu Aug 17 14:46:34 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/h8500s.sc (.rdata): All data must go in data segment.
- (.strings,.ctors,.dtors): Likewise.
-
-Wed Aug 16 11:38:59 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/armpe.sc: Always start code at 0x401000, even
- if -r.
- * ldwrite.c (strdup): New extern declaration.
- * ldgram.y (atype): New rule to clarify type parsing.
- * ldlang.c (init_os): Remove commented out code.
- (lang_size_sections): Set SEC_ALLOC and SEC_LOAD bits
- unless told not to by the link script.
-
-Wed Aug 16 11:45:11 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_set_startof): New static function.
- (lang_process): Call it.
-
- * ldgram.y: Tweak casesymlist to avoid bison errors.
-
- * lexsup.c (parse_args): Accept -h as a synonym for --soname, for
- Solaris compatibility.
-
-Tue Aug 15 17:31:16 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldgram.y (YYDEBUG): If not defined, define as 1.
- (CASE, EXTERN, START): New tokens.
- (mri_script_command): Handle CASE, EXTERN, INCLUDE, START.
- (casesymlist): New nonterminal.
- (extern_name_list): New nonterminal.
- * ldlex.l: Accept lower case trailing base specifiers. Don't
- ignore the first digit when the base is a suffix. Accept many
- EXPRESSION state tokens in MRI state. Support MRI continuation
- lines and MRI semicolon comments. Accept all MRI keywords in
- lower case. Add CASE, EXTERN, and START MRI keywords.
-
-Tue Aug 8 19:14:58 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Use xmalloc
- instead of alloca.
-
-Tue Aug 8 15:24:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Don't use
- $r/../gcc/xgcc unless it is present.
-
-Thu Aug 3 11:56:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * scripttempl/m68kcoff.sc: Only put .ctors and .dtors in .text
- when CONSTRUCTING.
- * scripttempl/m68klynx.sc: Likewise.
- * scripttempl/nw.sc: Likewise.
- * scripttempl/sa29200.sc: Likewise.
- * scripttempl/sparclynx.sc: Likewise.
-
-Fri Jul 28 12:02:23 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * emulparams/{z8001.sh, z8002.sh}: Fix typo.
-
-Thu Jul 27 21:06:21 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * configure.in (i[345]86-*-linuxoldld): Treat like linuxaout*.
-
-Thu Jul 27 15:26:28 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/i386pe.sc: Cope with constructors.
- * scripttempl/z8ksim.sc: Deleted.
- * scripttempl/z8000.sc: Resurrected as this, but
- can handle z8001 and z8002 formats.
- * emulparams/z8ksim.sh: Deleted.
- * emulparams/{z8001.sh, z8002.sh}: New files.
- * config/z8ksim.mt: Deleted
- * config/z8k-coff.mt: New, generates both emulations.
-
-Tue Jul 25 14:53:02 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmisc.c (vfinfo): In %C and %D case, always print the BFD using
- %B, in case it is in an archive.
-
-Mon Jul 24 15:23:39 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_process): Call reset_memory_regions for each
- relaxation pass.
-
-Fri Jul 21 22:49:44 1995 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfppc.sc: Add support for .sdata, .sbss, and
- _SDA_BASE.
-
-Thu Jul 20 16:26:55 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * ldmain.c (constructor_callback): Allocate set_name in stack
- frame, rather than always calling alloca with a fixed size.
-
-Wed Jul 19 16:21:43 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * emulparams/armpe.sh (OUTPUT_FORMAT): Change to pei-arm-little.
- (LITTLE_OUTPUT_FORMAT, BIG_OUTPUT_FORMAT): Define.
-
-Mon Jul 17 13:57:00 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldwrite.c (clone_section): Set the alignment of the clone
- section to that of the section being cloned.
-
- * ldwrite.c (split_sections): Don't split the first input section
- into a new output section.
-
-Sat Jul 15 00:26:35 1995 Michael Meissner <meissner@cygnus.com>
-
- * emulparams/elf32ppc.sh (TEMPLATE_NAME): Define as elf32.
- (GENERATE_SHLIB_SCRIPT): Define as yes.
-
-Fri Jul 14 12:11:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/mipsecoff.em (check_sections): Use %P, not %F.
-
- * ldver.c (help): Update list of options to match currently
- supported list.
-
-Thu Jul 13 13:52:10 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/lnk960.em (ld_lnk960_emulation): Initialize
- after_open field.
-
- * ldexp.c (exp_intop): Don't cast stat_alloc arg to bfd_size_type;
- it takes a size_t anyhow.
- (exp_binop): Likewise.
- (exp_trinop): Likewise.
- (exp_unop): Likewise.
- (exp_nameop): Likewise.
- (exp_assop): Likewise.
- * ldlang.c (lang_memory_region_lookup): Likewise.
- (init_os): Likewise.
- (ldlang_add_undef): Likewise.
- (insert_pad): Likewise.
- * ldfile.c (ldfile_add_arch): Don't cast xmalloc arg to
- bfd_size_type.
-
- * Makefile.in (ALL_EMULATIONS): It's earmaoutb.o, not earmoutb.o.
-
-Wed Jul 12 11:32:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.h (ldemul_open_dynamic_archive): Add search parameter to
- declaration.
- (ld_emulation_xfer_type): Add search parameter to
- open_dynamic_archive entry point.
- * ldemul.c (ldemul_open_dynamic_archive): Add search parameter.
- * ldfile.c (ldfile_try_open_bfd): Rename from try_open_bfd, and
- make non-static. Change all callers to use new name.
- (ldfile_open_file_search): Make static. If entry is dynamic, call
- ldemul_open_dynamic_archive.
- (ldfile_open_file): Don't call ldemul_open_dynamic_archive.
- * ldfile.h (ldfile_open_file_search): Don't declare.
- (ldfile_try_open_bfd): Declare.
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Accept search parameter. Don't search for a library, just look in
- a single place.
- * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive):
- Likewise.
-
-Tue Jul 11 16:44:21 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (set_scripts_dir): Don't base script directory on
- current directory.
-
-Tue Jul 11 12:29:02 1995 Rick Sladkey <jrs@world.std.com>
-
- * ldmisc.c (vfinfo): Don't print the line number if it isn't
- meaningful.
-
-Mon Jul 10 13:38:28 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ld.h (ld_config_type): Add field warn_constructors.
- * ldmain.c (add_to_set): Warn if config.warn_constructors.
- (constructor_callback): Likewise.
- * lexsup.c (parse_args): Handle -warn-constructors.
- * ld.texinfo, ld.1: Document -warn-constructors.
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Don't
- get confused by directory names if we searched for the file.
-
- Based on patches from H.J. Lu <hjl@nynexst.com>:
- * ldlang.h (lang_input_statement_type): Add new field dynamic.
- * ldlang.c (new_afile): Set dynamic from config.dynamic_link.
- * ldfile.c: Include bfdlink.h.
- (ldfile_open_file): Check dynamic field of entry, not global
- dynamic_link field. Don't do a dynamic search when doing a
- relocateable link.
- * ldmain.c (main): Don't warn about dynamic_link for a
- relocateable link.
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Skip file if
- dynamic is false.
- (gld${EMULATION_NAME}_create_output_section_statements): Always
- loop over input files.
- * Makefile.in: Rebuild dependencies.
-
- * ld.texinfo, ld.1: Document -Bstatic, -Bdynamic, -Bshared, and
- -shared.
-
-Mon Jul 10 13:29:43 1995 Eric Youngdale <eric@aib.com>
-
- * ldmain.c (main): Set link_info.symbolic to false.
- * lexsup.c (parse_args): Handle -Bsymbolic.
-
-Wed Jul 5 00:12:11 1995 Fred Fish (fnf@cygnus.com)
-
- * ldmain.c (HAVE_SBRK): Define for everything except
- specific systems that are known to not support sbrk.
- (main): Use HAVE_SBRK to decide whether or not to use sbrk.
-
-Tue Jul 4 12:55:48 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment):
- Handle etree_provide.
-
- * emultempl/elf32.em (global_needed): New static variable.
- (global_found): Likewise.
- (gld${EMULATION_NAME}_after_open): New static function.
- (gld${EMULATION_NAME}_search_needed): Likewise.
- (gld${EMULATION_NAME}_try_needed): Likewise.
- (gld${EMULATION_NAME}_check_needed): Likewise.
- (ld_${EMULATION_NAME}_emulation): Replace after_open_default with
- gld${EMULATION_NAME}_after_open.
-
-Mon Jul 3 14:26:37 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in (i386-*-win32): New target.
-
-Mon Jul 3 14:39:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Let -G either set the small data size or
- be equivalent to --shared, depending on the next argument. Accept
- and ignore -z for Solaris compatibility.
-
-Sun Jul 2 17:52:34 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * lexsup.c (parse_args): Cast fopen result to PTR before storing
- it in link_info.base_file. Fix indentation.
-
-Wed Jun 28 17:11:25 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ldmain.c (main): Always initialize PE info in link_info.
- * lexsup.c (OPTION_BASE_FILE): New option.
- (parse_args): Handle new option.
- * emulparams/armpe.sh: Output pei.
- * emultempl/i386pe.em: Add newline to end.
- * scripttempl/armpe.sc: Change output and quote the $s.
- * scripttempl/i386pe.sc: Change output and quote the $s.
-
-Thu Jun 22 19:55:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Sun May 7 11:53:41 MDT 1995 Bryan Ford <baford@cs.utah.edu>
-
- * configure.in (i386-*-msdos*, i386-*-moss*): New targets.
- * Makefile.in (ALL_EMULATIONS): Added i386msdos.o.
- (i386msdos.o): New target.
- * config/i386-msdos.mt: Created.
- * emulparams/i386msdos.sh: Created.
- * scripttempl/i386msdos.sc: Created.
-
-Thu Jun 22 15:06:35 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * scripttempl/elfppc.sc (.fixup): Add support for a .fixup section
- that contains pointers to be relocated.
-
-Tue Jun 20 17:47:20 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-esh.c: New file, modified for MPW from esh.c.
- * scripttempl/sh.sc: Reformatted to simplify MPWification,
- use *() to concat stab sections instead of [].
-
-Thu Jun 15 08:48:16 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * scripttempl/armpe.sc: Add constructor support.
-
-Tue Jun 13 09:11:20 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ldlang.c (lang_size_sections): Any section with a DATA
- statement has contents.
-
-Sun Jun 11 15:20:46 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * emulparams/m68kelf.sh (NOP): Define.
- (DYNAMIC_LINK): Don't define.
- (TEXT_START_ADDR): Set to 0x80000000; the extra 0x100 for headers
- will come from the linker script.
-
-Thu Jun 8 14:17:33 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * emulparams/armpe.sh, scriptempl/armpe.sc: Add end and stack.
-
-Mon Jun 5 02:16:24 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- * configure.in (i[345]86-*-gnu*): Use GNU elf config.
-
-Thu May 25 11:49:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- From Andrew Cagney <cagney@highland.com.au>
- * Makefile.in: Fixup more gotchas from renaming elf32ppcle to
- elf32lppc.
-
-Wed May 24 11:23:21 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- Add support for ARM-PE.
- * Makefile.in (ALL_EMULATIONS): Add armpe.o
- * configure.in: Recognize armpe.
- * config/arm-pe.mt: New file.
- * emulparams/armpe.sh: New file.
- * scripttempl/armpe.sc: New file.
-
-
-Mon May 22 15:19:26 1995 Doug Evans <dje@chestnut.cygnus.com>
-
- * configure.in (h8300h-*-hms): Deleted
- * config/cf-h8300h.mt: Deleted.
-
-Thu May 18 04:26:10 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
-
- From David Taylor (dtaylor@armltd.co.uk)
- * Makefile.in (ALL_EMULATIONS): Add earmout[lb].o
- * configure.in: Recognize arm{,e[lb]-*-aout.
- * config/arm[lb]-aout.mt: New files.
- * emulparams/armaout[lb].sh: New files.
- * scripttempl/armaout.sc: New file.
-
-Tue May 16 18:27:11 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/ppcle-elf32.mt (EMUL): Use elf32lppc, not elf32ppcle, to
- be unique in 8 characters for DOS.
-
- * emulparams/elf32lppc.sh: New file, renamed from elf32ppcle.sh.
- * emulparams/elf32ppcle.sh: Deleted.
-
-Fri May 12 11:03:55 1995 Steve Chamberlain <sac@slash.cygnus.com>
- Tom Griest <griest@cs.yale.edu>
-
- Initial support for PE executables (eg NT, win32)
-
- * Makefile.in (configure.in, ei386pe): Add support.
- * ldmain.c (main): Initialize PE argument info.
- * ldwrite.c (print_file_stuff): Don't print out .drectve
- and .debug section info.
- * lexsup.c (set_subsystem, set_stack_heap, OPTION_HEAP,
- OPTION_SUBSYSTEM, parse_argsm set_subsystem, set_stack_heap):
- Handle new arguments.
- * config/i386-pe.mt, emultempl/i386pe.em, scripttempl/i386pe.sc:
- New files
-
-Wed May 10 18:37:59 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * scripttempl/hppaelf.sc: Remove .PARISC.unwind section from text
- segment. This allows ld -r to preserve unwind sections.
-
-Tue May 9 17:19:57 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in: Add little endian PowerPC support.
-
- * Makefile.in (ALL_EMULATIONS): Add eelf32ppcle.o.
- (eelf32ppcle.c): Support for little endian PowerPC.
-
- * config/ppcle-elf32.mt: New file for little endian PowerPC.
- * emulparams/elf32ppcle.sh: Ditto.
-
-Wed May 3 12:56:32 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ldlang.c (print_output_section_statement): Check
- subsection_alignment, instead of checking section_alignment twice.
- Noticed by Alan Modra <alan@spri.levels.unisa.edu.au>.
-
-Tue May 2 16:36:07 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * configure.in (hppa*-*-lites*): Handle like hppa*-*-*elf*.
-
-Mon Apr 24 19:21:02 1995 Michael Meissner <meissner@cygnus.com>
-
- * ldwrite.c (ldwrite): Before doing anything, reset the error
- code. If bfd_final_link returns an error, but the error code is
- unset, don't issue an extra message. Assume a correct error
- message was already set.
-
-Fri Apr 14 16:31:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (ALL_EMULATIONS): Added em68kelf.o.
- (em68kelf.o): New target.
- * config/m68k-elf.mt, emulparams/m68kelf.sh: New files.
- * configure.in: Use them for m68*-*-elf.
-
-Tue Apr 11 12:02:03 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- Merge in support for Mac MPW as a host.
- (Old change descriptions retained for informational value.)
-
- * mpw-config.in (i386-unknown-aout): Change to i386-unknown-go32.
- (i386-unknown-coff): Remove.
- (sh-hitachi-hms): New target.
- (emulation_ofiles): Set correctly for each target.
- (version, TDEFINES): Add to makefile fragment.
- * mpw-make.in (BISON): Use byacc instead of bison.
- (em_*.c): Replace with e*.c everywhere.
- (ldgram.h): Separate action from ldgram.c generation.
- (LD_PROG): Depend on Version.r.
- (Version.r): generate from version info.
- * mpw-emipsidt.c: New file, modified for MPW from emipsidt.c.
-
- * mpw-config.in (m68k-apple-macos, ppc-apple-macos,
- i386-unknown-aout, i386-unknown-coff): New targets.
- (m68k-aout, m68k-coff): Remove targets.
- (mk.tmp): Add definition of EMUL.
-
- * mpw-config.in (emulname): Set based on target.
- (ldemul-list.h): Construct.
- * mpw-make.in (install-only): New target.
- (install): Depend on install-only.
-
- * mpw-make.in (bindir): Fix pathname.
- (install): Move here from mpw-build.in.
-
- * mpw-config.in: New file, MPW configuration fragment.
- * mpw-make.in: New file, MPW makefile fragment.
- (This file is semi-automatically generated from Makefile.in.)
- * ldfile.c (slash): If MPW, set to `:'.
- * ldlex.l (TRUE_FALSE_ALREADY_DEFINED): If MPW, set this to
- prevent redefinition errors.
-
-Tue Apr 4 17:55:18 1995 Steve Chamberlain <sac@bang.hack.com>
-
- * ldwrite.c (clone_section): Align clone sections on even
- boundaries.
-
-Thu Mar 30 14:32:26 1995 H.J. Lu (hjl@nynexst.com)
-
- * configure.in: Change linux to default to elf. Using
- i[345]86-*-linuxaout will build a linker which defaults to a.out.
- * config/i386-laout.mt: Rename from old config/i386-linux.mt.
- * config/i386-linux.mt: Rename from old config/i386-lelf.mt.
- * config/i386-lelf.mt: Remove.
-
-Thu Mar 30 13:09:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): If opening the map file fails, call
- bfd_set_error before calling einfo.
-
- * ld.texinfo, ld.1: Document the -no-keep-memory option.
-
-Mon Mar 27 11:10:08 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Revert patch of March 10, since the SVR4 linker
- does mark shared libraries as executable.
-
-Tue Mar 21 15:15:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_common): Change power to int. Pass larger values
- before smaller values.
- (lang_one_common): Treat info as int *. Don't bother to check for
- last value, since it is now zero.
-
-Sat Mar 18 01:49:14 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (load_symbols): An empty archive is OK.
-
-Fri Mar 17 16:15:31 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * ldmain.c (progress.h): Include.
- (main): Call START_PROGRESS and END_PROGRESS.
-
-Thu Mar 16 17:17:33 1995 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfppc.sc: Move _GOT2_END_ after the .ctors and
- .dtors sections, so that these pointers get relocated also.
- Define the symbols __{C,D}TOR_{LIST,END}__ to mark the beginning
- and end of the constructors/destructors.
-
-Thu Mar 16 13:59:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * ldlang.c (load_symbols): If whole_archive is true and ENTRY
- describes an archive, call bfd_link_add_symbols on each member.
- * ldmain.c (whole_archive): New variable.
- (main): Initialize it to false.
- * ldmain.h: Declare whole_archive.
- * lexsup.c (parse_args): Grok --whole-archive switch.
- * ld.texinfo, ld.1: Document --whole-archive.
-
-Thu Mar 16 11:38:48 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * genscripts.sh (EMULATION_NAME): Set LIB_PATH to empty when not
- using the default emulation.
-
- * config/dgux.mh (HOSTING_EMU): Use -m rather than trying to set
- LDEMULATION.
- * config/hppaelf.mh (HOSTING_EMU): Likewise.
-
-Tue Mar 14 12:28:03 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Set force_maj
- for -lc.N. From H.J. Lu <hjl@nynexst.com>.
-
-Fri Mar 10 14:43:48 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): Don't set EXEC_P if link_info.shared is set.
-
- * ldlex.l: Return -lFILENAME as the token LNAME.
- * ldgram.y: Add token LNAME.
- (input_list): Treat LNAME like NAME, but pass it to
- lang_add_input_file as lang_input_file_is_l_enum.
- * ld.texinfo: Document using -lFILENAME in INPUT.
-
-Thu Mar 9 12:21:51 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ldlang.c (lang_check): If the architectures are compatible call
- bfd_merge_private_bfd_data to let the backend do additional
- checks.
-
-Tue Mar 7 00:53:08 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.c (ldemul_choose_mode): If emulation not recognized, list
- all supported emulations.
-
-Mon Mar 6 14:03:50 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldemul.c (ldemul_list_emulations): New function.
- * ldemul.h (ldemul_list_emulations): Declare.
- * ldver.c (help): List supported targets and emulations.
-
-Fri Mar 3 15:40:36 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * scripttempl/elf.sc (.debug): Relocate to address 0.
- (.debug_srcinfo, .debug_aranges, .debug_pubnames,
- .debug_sfnames, .line): Likewise.
-
-Fri Mar 3 17:07:14 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (hold_rel): New static variable.
- (gld${EMULATION_NAME}_place_orphan): Place readonly sections with
- contents whose names begin with ".rel" after hold_rel. Remove the
- assertion which checked for unplaced .rel sections. Don't try to
- sort the section into place if place->bfd_section is NULL.
- (gld${EMULATION_NAME}_place_section): Set hold_rel to the first
- section beginning with ".rel".
-
-Thu Mar 2 14:34:43 1995 Ian Lance Taylor <ian@cygnus.com>
-
- Doc note from pierre@phi.la.tce.com (Pierre Willard):
- * ld.texinfo: -X and -x work even if -s or -S are not specified.
- * ld.1: Similar change.
-
-Wed Mar 1 13:51:16 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emulparams/gld960coff.sh (COFF_CTORS): Define.
- * scripttempl/i960.sc: Use COFF_CTORS if CONSTRUCTING.
-
-Tue Feb 28 12:42:56 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in (i[345]86-*-linuxelf*): New target. Use i386-lelf.
- (i[345]86-*-gnuelf*): New target. Use i386-gelf.
- * config/i386-lelf.mt: New file.
- * config/i386-gelf.mt: New file.
-
-Tue Feb 28 10:27:54 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * configure.in: Match on mips-ecoff, and default to the IDT
- configuration.
-
-Fri Feb 17 13:06:47 1995 Michael Meissner <meissner@cygnus.com>
-
- * scripttempl/elfppc.sc: Add support for .got1 and .got2 sections.
- Offset _GLOBAL_OFFSET_TABLE_ 32768 from the start of the GOT area
- to double the size of the table.
-
-Thu Feb 9 18:29:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (distclean): Do recursive deletion, since ldscripts
- is a directory.
-
-Thu Feb 9 11:38:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (main): If trace_file_tries is true, and we are using
- an internal linker script, print out the script.
- * ldfile.c (try_open): Reindent function. Make the messages about
- opening script files more informative.
-
- * lexsup.c (parse_args): For -V, call ldversion with 1, not 0.
- * ld.texinfo, ld.1: Update accordingly.
-
-Wed Feb 8 17:34:45 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldlang.c (lang_one_common): Adjust references to common symbol
- information for new structure.
-
-Mon Feb 6 12:17:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldmain.c (undefined_symbol): Handle section being NULL.
-
- * ldctor.c (ldctor_build_sets): Handle bfd_link_hash_defweak.
- * ldexp.c (fold_name): Likewise.
- * ldlang.c (print_one_symbol): Likewise.
- (lang_finish): Likewise.
- * ldmain.c (multiple_common): Likewise.
- * ldwrite.c (print_symbol): Likewise. Also, bfd_link_hash_weak
- renamed to bfd_link_hash_undefweak.
-
- * scripttempl/alpha.sc: Set address of .data section correctly
- when -n or -N is used. Patch from Chris G Demetriou
- <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>.
- * scripttempl/mips.sc: Similar change.
-
-Tue Jan 31 16:20:52 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * ldlang.c (lang_size_sections): Clarify error message when user
- specified start addr conflicts with region. Fix resetting of
- region pointer.
-
-Tue Jan 31 12:37:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ldexp.c (fold_name): In case NAME, permit an absolute symbol
- in lang_allocating_phase_enum.
-
-Mon Jan 30 11:33:25 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (distclean): Depend upon clean. Don't bother to
- remove files which will be removed by clean. From patch by
- alan@SPRI.Levels.UniSA.Edu.Au (Alan Modra).
-
-Fri Jan 27 16:27:34 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): For
- a MIPS target, clobber the size of all but the first input
- .reginfo section to be 0, so that lang_size_sections sets the
- correct size for the output .reginfo section.
-
-Thu Jan 26 19:53:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Remove unused variable is.
-
-Thu Jan 26 12:33:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in: Add support for powerpc-*-eabi.
-
- * scripttempl/elfppc.sc: New file for PowerPC embedded ABI
- support.
-
- * emulparams/elf32ppc.sh (SCRIPT_NAME): Use elfppc.sc instead of
- elf.sc, which defines some new symbols PowerPC elf needs.
-
-Tue Jan 24 10:32:15 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldctor.c (ldctor_add_set_entry): Don't dump core if a
- constructor entry is in the absolute section.
-
-Mon Jan 23 13:58:13 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * configure.in (i[345]86-*-gnu*): Set ld_target to i386-gnu.
- * config/i386-gnu.mt: New file. Include ELF support.
-
-Thu Jan 19 16:22:11 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): If
- there are any input sections named .gnu.warning, treat them as
- containing a warning message to be printed by the linker, and
- clobber the size so that the message is not copied into the output
- file.
- * scripttempl/elf.sc: Put .gnu.warning sections into the .text
- section.
-
-Sun Jan 15 16:45:00 1995 Steve Chamberlain <sac@splat>
-
- * configure.in (w65-*-*): New target.
- * Makefile.in: Update.
- * scripttempl/w65.sc: New.
- * config/coff-w65.mt: New.
-
-Thu Jan 12 01:32:25 1995 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
-
- * ldlang.c (lang_place_orphans): Don't ignore files with
- just_syms_flag set. Instead, put all their sections in
- bfd_abs_section_ptr, using the section VMA as the output_offset.
-
-Wed Jan 11 22:59:09 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ldctor.c (ldctor_build_sets): Don't use `const' with typedef
- name `reloc_howto_type', since it's now defined to be const.
- * ldlang.c (lang_add_reloc): Ditto.
- * ldlang.h (lang_reloc_statement_type, lang_add_reloc): Ditto.
-
-Wed Jan 11 11:24:45 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldexp.c (fold_binary): Adding or subtracting an absolute value
- to a relative value does not require forcing the relative value to
- be absolute. Also, reindent function.
-
-Wed Dec 28 22:05:52 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldwrite.c (clone_section): Create a symbol with the
- same name as the section.
-
-Mon Dec 19 14:02:13 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ld.h (split_by_reloc, split_by_file): New flags.
- * ldwrite.c (clone_section, split_sections): New functions.
- * lexsup.c (parse_args): Understand new split options.
-
-Fri Dec 9 17:22:55 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * scripttempl/elf.sc: Move .ctors and .dtors from .text segment to
- .data segment. They must be writable when creating a shared
- library. From H.J. Lu <hjl@nynexst.com>.
-
-Fri Dec 2 14:09:00 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
-
- * emultempl/miposecoff.em: New file.
- * emulparams/mipsidt.sh (TEMPLATE_NAME): Set to mipsecoff.
- * emulparams/mipsidtl.sh (TEMPLATE_NAME): Likewise.
- * scripttempl/mips.sc: Put .rel.sdata sections in .text, and
- provide __runtime_reloc_start and __runtime_reloc_stop if they are
- used. Align _fdata to a 16 byte boundary.
- * Makefile.in (emipsidt.c): Depend upon mipsecoff.em rather than
- generic.em.
- (emipsidtl.c): Likewise.
- (check): Pass CC_FOR_HOST and CFLAGS_FOR_HOST to runtest.
-
- * ld.h (args_type): Add new field embedded_relocs.
- * ldemul.h (ldemul_after_open, after_open_default): Declare.
- (ld_emulation_xfer_struct): Add new field after_open.
- * ldemul.c (ldemul_after_open): New function.
- (after_open_default): New function.
- * ldlang.c (lang_process): Call ldemul_after_open.
- * lexsup.c (parse_args): Handle --embedded-relocs.
- * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Initialize
- new after_open field to after_open_default.
- * emultempl/generic.em, emultempl/gld960.em: Likewise.
- * emultempl/gld960c.em, emultempl/hppaelf.em: Likewise.
- * emultempl/linux.em, emultempl/m88kbcs.em: Likewise.
- * emultempl/sunos.em, emultempl/vanilla.em: Likewise.
- * ld.texinfo, ld.1: Mention -embedded-relocs.
-
-Wed Nov 23 22:04:47 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * Makefile.in: Add eshl.o.
- * config/coff-sh.mt: Add shl emulation.
-
-Tue Nov 22 11:55:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * scripttempl/elf.sc: Fill .text section with NOPS. From Eric
- Youngdale <eric@aib.com>.
-
-Thu Nov 17 14:39:48 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- Patches from pirker@eiunix.tuwien.ac.at (Martin Pirker).
- * config/i386linux.mh: New file; set HOSTING_CRT0.
- * genscripts.sh: Don't put ${libdir} in LIB_PATH if it is
- /usr/lib, since that is already in LIB_PATH.
-
-Wed Nov 16 10:03:03 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * scripttempl/hppaelf.sc (.text): Handle a use rdefined text start
- address.
- (.data, .bss): If "-N", then place the data/bss just after the end
- of the .text section rather than at the default 0x40000000.
-
- * scripttempl/hppaelf.sc (.text): Place unwind descriptors in the
- text segment.
-
-Sat Nov 12 15:55:56 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Patches from Eric Youngdale <eric@aib.com>:
- * ldlang.c (lang_finish): Don't warn if entry symbol not found
- when generating a shared library.
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Warn if
- attempting to place an orphaned relocation section when generating
- a dynamically linked object.
-
- * scripttempl/elf.sc: Add ENTRY(${ENTRY}), and default ${ENTRY} to
- _start.
-
-Fri Nov 11 14:27:23 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ld.h (args_type): Add field export_dynamic.
- * lexsup.c (parse_args): Recognize --export-dynamic.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass export_dynamic argument to bfd_elf32_size_dynamic_sections.
-
-Wed Nov 9 12:47:11 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldlang.c (lang_one_common): Set SEC_ALLOC in any section where
- we allocate common symbols.
-
-Tue Nov 8 17:50:43 1994 Eric Youngdale (eric@aib.com)
-
- * scripttempl/elf.sc: Add .rel.init, .rela.init, .rel.fini, and
- .rela.fini to the list of .rel* sections.
-
-Tue Nov 8 17:47:45 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldlang.c (load_symbols): Add new argument place. Only accept
- linker scripts if place is not NULL. Put commands found in an
- assumed linker script into place.
- (lookup_name): Pass NULL as place argument to load_symbols.
- (open_input_bfds): In lang_input_statement_enum case, pass a place
- argument to load_symbols, and store any new statements after the
- current one.
-
-Mon Nov 7 15:53:02 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ldver.c (ldversion): Bump to 2.5.3.
-
-Fri Nov 4 15:11:26 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (e*nbsd.c): Fix typo in dependencies.
-
-Thu Nov 3 19:35:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * Makefile.in (check): Add missing "else true" clause.
-
- * emulparams/vax.sh (OUTPUT_FORMAT): Use "a.out".
-
- * scripttempl/go32coff.sc: Changes from DJ Delorie: Change default
- entry point to "start". Align at end of each section to 0x200.
- Start .text section 0x1000 later. Add _etext, _edata, _end
- symbols.
-
-Wed Nov 2 12:17:49 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldctor.c (ldctor_add_set_entry): Don't permit a set to be
- composed of different object file formats.
- (ldctor_build_sets): If the output format does not support the
- reloc, and we are not generating a relocateable link, try getting
- the reloc from the input format.
-
-Tue Nov 1 10:30:19 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Added em68knbsd.o.
- (em68knbsd.c): New target.
-
- * config/m68k-nbsd.mt: New file.
- * emulparams/m68knbsd.sh: New file.
- * configure.in (m68*-*-netbsd*): Use above configs.
-
-Mon Oct 31 19:35:17 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): If we find an
- appropriately named static library, stop the search at that
- directory.
-
-Wed Oct 26 13:59:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o
- and esparcnbsd.o; sorted entries.
- (ei386nbsd.c,ens32knbsd.c,esparcnbsd.c): New targets.
-
- * config/netbsd532.mt: Removed.
- * emulparams/netbsd532.sh: Removed.
-
- * config/{i386-nbsd.mt,ns32k-nbsd.mt,sparc-nbsd.mt}: New files.
- * emulparams/{i386nbsd.sh,ns32knbsd.sh,sparcnbsd.sh}: New files.
- * configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*,
- sparc*-*-netbsd*): Use above configs.
-
-Tue Oct 25 11:47:10 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldmain.c (multiple_common): One of the types may now be
- bfd_link_hash_indirect. The old BFD argument may be NULL.
-
-Thu Oct 20 22:01:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Add * at the end of m68k-hp-hpux.
-
-Tue Oct 18 15:58:39 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * ldlex.l: Cast assignment to yy_ch_buf field to char *, not to
- YY_CHAR *.
-
-Mon Oct 17 14:53:16 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * scripttempl/nw.sc: Gather constructors and destructors and
- define __CTOR__LIST__ and __DTOR_LIST__ appropriately.
-
-Fri Oct 14 14:35:38 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Add ei386nw.o and eppcnw.o.
- (ei386nw.c, eppcnw.c): New targets.
-
- * config/{i386,ppc}-nw.mt, emulparams/{i386,ppc}nw.sh,
- scripttempl/nw.sc: New files, for i386 and powerpc netware.
-
- * configure.in: Changed netware ld_target name to be {i386,ppc}-nw
- instead of {i386,ppc}-elf.
-
- * configure.in (sparc*-*-netware): Removed. There is no such
- thing anymore.
-
- * ldint.texinfo: Move misplaced `@end iftex'.
-
-Fri Oct 14 12:02:18 1994 Eric Youngdale (eric@aib.com)
-
- * scripttempl/elf.sc: Add .rel.ctors, .rela.ctors, .rel.dtors, and
- .rela.dtors to the list of .rel* sections.
-
-Thu Oct 13 14:16:27 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ldver.c (ldversion): Update to version 2.5.
- * Version 2.5 released.
-
- * configure.in (all_targets): Handle i386-linux*.
-
-Thu Oct 13 11:24:33 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * scripttempl/aout.sc: Set _etext and __etext to ., not
- ${DATA_ALIGNMENT}. This is compatible with SunOS, and, with luck,
- will not break any other system. From Eric Valette
- <ev@chorus.fr>.
-
-Wed Oct 12 16:22:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * lexsup.c (parse_args): Change -V to be a synonym for -v. Add
- --verbose to get the old -V behaviour.
- * ld.1, ld.texinfo: Document this change.
-
-Tue Sep 27 14:56:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
- assertion, since it could fail with a user defined linker script.
-
- * ldexp.c (fold_name): For DEFINED case, don't try to look up the
- name in the hash table during the first phase--the hash table does
- not even exist at that point, much less have the right value.
-
- * Makefile.in (CC): Define.
- (CXX): Move definition, change from g++ to gcc.
- (EXPECT, RUNTEST): Copy definitions from top level Makefile.in.
- (RUNTEST_CC, RUNTEST_CFLAGS): Remove.
- (RUNTEST_CXX, RUNTEST_CXXFLAGS): Remove.
- (CC_FOR_TARGET, CXX_FOR_TARGET): Copy from top level Makefile.in.
- (.cc.o): Comment out.
- (testdir): Remove.
- (site.exp): Don't create testdir or set tmpdir.
- (check): Run checks even if not running native. Use CC_FOR_TARGET
- instead of RUNTEST_CC, and likewise for CXX.
- (cdtest targets): Comment out.
- * config/solaris2.mh (HOSTING_LIBS): Only mention crtend.o once.
- * cdtest-bar.cc, cdtest-foo.cc, cdtest-foo.h: Remove.
- * cdtest-main.cc, cdtest.exp: Remove.
-
-Mon Sep 26 11:40:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emulparams/elf32bmip.sh: Rename from elf32mipb.sh to avoid DOS
- file naming problems.
- * emulparams/elf32lmip.sh: Rename from elf32mipl.sh.
- * Makefile.in (ALL_EMULATIONS): Rename eelf32mipb.o to
- eelf32bmip.o and eelf32mipl.o to eelf32lmip.o.
- (eelf32bmip.c): Rename from eelf32mipb.c. Use elf32bmip.sh.
- (eelf32lmip.c): Rename from eelf32mipl.c. Use elf32lmip.sh.
- * config/mipsb-elf32.mt (EMUL): Use elf32bmip, not elf32mipb.
- * config/mipsl-elf32.mt (EMUL): Use elf32lmip, not elf32mipl.
-
- * genscripts.sh: Always search /usr/local/TARGET/lib.
-
- * scripttempl/elf.sc: If -N is set, force DATA_ADDR to be ".".
-
-Fri Sep 23 15:05:49 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * configure.in: Handle i386-bsdi* targets like i386-bsd.
-
-Fri Sep 23 00:06:59 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * lexsup.c (parse_args): Add support for -a for HP/UX
- compatibility.
-
- * lexsup.c (parse_args): -c takes an argument.
-
-Tue Sep 20 14:35:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ld.h (args_type): Add new field endian.
- * lexsup.c (parse_args): Handle -EB and -EL by setting
- command_line.endian.
- * ldgram.y (ifile_p1): Accept OUTPUT_FORMAT with three arguments.
- * ldlang.c (lang_add_output_format): Add arguments big and little.
- If command_line.endian is set, use it to select big or little
- rather than the default. Changed all callers.
- * ldlang.h (lang_add_output_format): Update declaration.
- * emulparams/elf32mipb.sh: Define BIG_OUTPUT_FORMAT and
- LITTLE_OUTPUT_FORMAT.
- * emulparams/elf32mipl.sh: Likewise.
- * emulparams/mipsbig.sh: Likewise.
- * emulparams/mipsbsd.sh: Likewise.
- * emulparams/mipsidt.sh: Likewise.
- * emulparams/mipsidtl.sh: Likewise.
- * emulparams/mipslit.sh: Likewise.
- * scripttempl/elf.sc: Define BIG_OUTPUT_FORMAT and
- LITTLE_OUTPUT_FORMAT if not already defined. Pass them to
- OUTPUT_FORMAT.
- * scripttempl/mips.sc: Pass BIG_OUTPUT_FORMAT and
- LITTLE_OUTPUT_FORMAT to OUTPUT_FORMAT.
- * scripttempl/mipsbsd.sc: Likewise.
-
- * Makefile.in (ldgram.h): Make separate target from ldgram.c,
- depending upon ldgram.c, so that a parallel make does not try to
- build both at once.
-
- * configure.in (mips*el-elf*): New target.
- * Makefile.in (ALL_EMULATIONS): Add eelf32mipb.o and eelf32mipl.o.
- (eelf32mipl.c): New target.
-
- * config/mipsl-elf32.mt: New file.
- * emulparams/elf32mipl.sh: New file.
-
-Fri Sep 16 12:16:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldmain.c (main): Rather than prohibiting ld -r -s, treat it as
- ld -r -S -x.
-
-Thu Sep 15 13:05:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldmisc.c (vfinfo): Print BFD file name as well as file name
- returned by find_nearest_line, in case the file name is something
- unhelpful such as a .h file. Handle %u.
-
-Wed Sep 14 12:49:12 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldlang.c (lang_do_assignments): Make sure output statement
- has an attached bfd_section before trying to dereference it.
-
-Wed Sep 14 12:48:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ld.h (ld_config_type): Add new field warn_once.
- * ldmain.c (undefined_symbol): Handle -warn-once.
- * lexsup.c (parse_args): Recognize -warn-once.
- * ld.texinfo (Options): Document -warn-once.
- * ld.1: Likewise.
-
- * ldmisc.c (vfinfo): Handle %D as %C, but never print the function
- name. For %C, print the function name on a separate line, to keep
- the length of error messages under control.
- * ldmain.c (multiple_definition): Use %D for ``first defined
- here.''
- (undefined_symbol): Use %D for ``more undefined references
- follow''.
-
- * ldmisc.c (multiple_warn): Remove; no longer used.
- * ldmisc.h (multiple_warn): Don't declare.
-
-Tue Sep 13 20:47:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldlang.c (print_output_section_statement): Print all lines
- to the map file.
-
-Tue Sep 13 16:30:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldlang.c (load_symbols): Check for archive before object. Use
- bfd_check_format_matches, and, if ambiguous, print a list of
- matching formats. If file format is not recognized, treat file as
- a linker script.
- * ldgram.y (yyerror): If assuming an object file is a script,
- mention that. Tweak the format of the error messages.
- * ldlex.l (lex_warn_invalid): If assuming an object is a script,
- guess that this is not actually a script, and just report that the
- file format was not recognized.
- * ld.texinfo (Options): Admit that -( may be used more than once.
- Add note that unrecognized object files are now treated as linker
- scripts.
-
- * ldfile.c (ldfile_input_filename): Make const.
- (ldfile_assumed_script): New variable.
- (try_open): Change arguments types to const.
- (ldfile_find_command_file): Likewise.
- (ldfile_open_command_file): Likewise. Also, set lineno to 1.
- * ldfile.h: Update declarations for ldfile.c changes.
- * ldlex.l: Include <ctype.h>.
- (file_name_stack): Change to be const char *.
- (lineno_stack): New static variable.
- (<<EOF>>): Set lineno as well as ldfile_input_filename.
- (lex_push_file): Make name argument const. Initialize
- lineno_stack entry.
- (lex_redirect): Initialize lineno_stack entry.
- (lex_warn_invalid): Handle non printable characters nicely.
- * ldlex.h (lex_push_file): Declare second argument as const.
-
- * ldgram.y (ifile_p1): Recognize GROUP.
- * ldlex.l: Recognize GROUP.
- * ld.texinfo (Option Commands): Document GROUP.
-
-Mon Sep 12 17:04:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * config/m68klynx.mh: New file.
-
-Mon Sep 12 01:50:03 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * emultempl/hppaelf.em: Add newlines to the error messages.
-
-Sat Sep 10 16:05:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * config/i386lynx.mh: New file.
- * scripttempl/i386lynx.sc: Don't put .ctors and .dtors in .text
- unless CONSTRUCTING.
-
-Thu Sep 8 13:25:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emulparams/elf32mipb.sh (TEMPLATE_NAME): Define as elf32.
- (GENERATE_SHLIB_SCRIPT): Define as yes.
- (DYNAMIC_LINK): Define as false.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse):
- Initialize config.dynamic_link to DYNAMIC_LINK if it is defined.
- (gld${EMULATION_NAME}_place_orphan): Reset stat_ptr at end.
- * Makefile.in (eelf32mipb.c): Depend upon elf32.em rather than
- generic.em.
-
-Thu Sep 8 16:30:37 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * scripttempl/h8500b.sc: Put rdata stuff into own segment.
-
-Thu Sep 8 13:25:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Don't define;
- .got section is now explicitly handled in elf.sc.
-
-Wed Sep 7 13:08:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/alpha.sc: Redo script to set . outside of sections
- and not bother to explicitly specify section addresses.
- Explicitly place .sdata section.
-
-Tue Sep 6 23:51:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/m68kcoff.sc: Put .bss in data segment.
-
- * scripttempl/h8300.sc: Change .stab and .stabstr to use a VMA of
- 0, and to only be marked as NOLOAD if relocating.
- * scripttempl/h8500.sc, scripttempl/h8500b.sc: Likewise.
- * scripttempl/h8500c.sc, scripttempl/h8500m.sc: Likewise.
- * scripttempl/h8500s.sc, scripttempl/i386coff.sc: Likewise.
- * scripttempl/i386go32.sc, scripttempl/i386lynx.sc: Likewise.
- * scripttempl/m68kcoff.sc, scripttempl/m68klynx.sc: Likewise.
- * scripttempl/sh.sc, scripttempl/sparccoff.sc: Likewise.
- * scripttempl/sparclynx.sc: Likewise.
-
-Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * Makefile.in, configure.in: Add support (disabled) the ARM/RISCiX.
- * config/riscix.mt, emulparams/riscix.sh, scripttempl/riscix.sc:
- New files.
-
-Tue Aug 30 11:48:08 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * ld.h (args_type): Add field soname.
- * lexsup.c (parse_args): Handle -soname argument.
- * emultempl/elf32.em: In call to bfd_elf32_size_dynamic_sections,
- pass soname.
- * ld.texinfo: Document -soname.
-
-Mon Aug 29 15:21:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldlang.c (lang_check): Don't try to set the architecture if the
- input and output files are incompatible. Just warn.
-
-Wed Aug 24 12:52:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * configure.in: Change i[34]86 to i[345]86.
-
-Sun Aug 21 16:17:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * emulparams/hp3hpux.sh: Define __DYNAMIC to be 0.
-
-Thu Aug 18 15:37:45 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- Make the ELF linker handle orphaned sections reasonably. Also,
- define __start_SECNAME and __stop_SECNAME around sections whose
- names can be represented in C, for the benefit of symbol sets in
- glibc.
- * ldemul.h (ldemul_place_orphan): Declare.
- (ld_emulation_xfer_type): Add place_orphan field.
- * ldemul.c (ldemul_place_orphan): New function.
- * ldlang.h (wild_doit): Declare.
- * ldlang.c (wild_doit): Make nonstatic.
- (lang_place_orphans): Call ldemul_place_orphan.
- * emultempl/elf32.em: Include <ctype.h> and "ldgram.h".
- (hold_section, hold_use, hold_text, hold_data, hold_bss): New
- static variables.
- (gld${EMULATION_NAME}_place_orphan): New static function.
- (gld${EMULATION_NAME}_place_section): New static function.
- (ld_${EMULATION_NAME}_emulation): Initialize place_orphan field.
-
-Tue Aug 16 00:17:20 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * scripttempl/aout.sc: Add .linux-dynamic after .data.
-
-Tue Aug 16 00:08:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * lexsup.c (parse_args) Treat --dll-verbose as --version, for
- Linux compatibility. From hjl@nynexst.com (H.J. Lu).
-
-Mon Aug 15 17:17:33 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldexp.h (exp_get_abs_int): Declare.
-
-Sat Aug 6 01:45:39 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldlang.c (lang_do_assignments): Handle complex AT's better.
- * ldexp.c (exp_get_abs_int): New function.
-
-Fri Aug 5 20:55:55 1994 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in: add i960-nindy-coff support.
-
-Thu Aug 4 14:45:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldlex.l (yy_create_string_buffer): Handle change to internal
- interface in flex 2.4.7.
-
-Tue Aug 2 11:52:06 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * emultempl/linux.em (gld${EMULATION_NAME}_find_address_statement):
- New function; add 0x20 to any use of -Ttext.
- (gld${EMULATION_NAME}_create_output_section_statements): New
- function.
- (ld_${EMULATION_NAME}_emulation): Use the new function
- gld${EMULATION_NAME}_create_output_section_statements.
-
-Mon Aug 1 15:50:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/mips.sc: Redo script to set . outside of sections
- and not bother to explicitly specify section addresses.
-
-Tue Jul 26 11:02:35 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/elf.sc: Copy several more relocation sections into
- the output. Put .got.plt sections into .got.
-
-Fri Jul 22 12:15:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/elf.sc: Use PROVIDE to define etext, edata, and end.
-
- Add a new script operator, PROVIDE, to define a symbol only if it
- is needed.
- * ldgram.y (PROVIDE): New token.
- (assignment): Accept PROVIDE.
- * ldlex.l (PROVIDE): New token.
- * ldexp.h (node_type): Add etree_provide to node_class enum.
- (exp_provide): Declare.
- * ldexp.c (exp_fold_tree): Handle etree_provide.
- (exp_provide): New function.
- (exp_print_tree): Handle etree_provide.
- * ld.texinfo: Document PROVIDE.
-
- * ldlang.c (lang_common): Pass desired alignment to
- lang_one_common as power of two.
- (lang_one_common): Get common symbol alignment from linker hash
- table entry. Treat desired alignment as a power of two.
-
- * ldlang.c (wild_section): Attach all section with the given name,
- not just the first one. If there is no name, attach all sections
- even if the SEC_IS_COMMON flag is set.
-
-Wed Jul 20 15:49:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ld.h (args_type): Add field rpath.
- * lexsup.c (S_ISDIR): Define if not already defined.
- (parse_args): Add support for -rpath. If -R is used to name a
- directory, treat it as -rpath for Solaris compatibility.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
- Pass command_line.rpath to bfd_elf32_size_dynamic_sections.
- * ldmain.c (main): Initialize command_line.rpath to NULL.
- * ld.texinfo: Document -rpath option.
-
-Sun Jul 10 00:33:24 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * emulparams/pc532machaout.sh: New file. Pc532 mach script
- parameters.
-
- * emulparams/netbsd532.sh: New file. Netbsd 532 script parameters.
-
- * config/pc532mach.mt: New file. Pc532 mach target support.
-
- * config/pc532mach.mh: New file. Pc532 mach host support.
-
- * config/netbsd532.mt: New file. Netbsd 532 target support.
-
- * configure.in: Add ns32k-pc532-mach and ns32k-pc532-netbsd support.
-
- * Makefile.in: Add epcmachaout.c dependency and enetbsd532.c
- dependency.
-
-Fri Jul 8 10:57:02 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Use
- bfd_abs_section_ptr, not &bfd_abs_section.
-
- * lexsup.c (parse_args): Changed "retain-symbols-file" from
- no_argument to required_argument. From djm.
-
-Thu Jul 7 12:29:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * scripttempl/elf.sc: Explicitly mention .stab and .stabstr
- sections to force a VMA of 0; needed for ELF backends which have
- not been converted to the new linker style.
-
-Mon Jul 4 19:35:45 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * scripttempl/hppaelf.sc (__stack_zero): Don't define this name,
- it was for the HPUX dynamic loader's use and it creates problems
- with ELF GDB.
-
-Fri Jul 1 12:53:47 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * ldlang.c (lang_do_assignments): No longer static. Delete decl.
- * ldlang.h (lang_do_assignments): Put external decl here.
- * emultempl/hppaelf.em: Minor cleanups throughout file.
- (hppa_elf_create_output_section_statements): Rewrite.
- (hppaelf_finish): Rewrite.
-
-Wed Jun 29 16:50:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * config/solaris2.mh (NATIVE_LIB_DIRS): Define as /usr/ccs/lib.
-
- * lexsup.c (parse_args): Accept -Bstatic and -Bdynamic. Do not
- accept plain -B.
- * ld.texinfo: -Bstatic is not ignored.
-
-Tue Jun 28 12:13:34 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * ldlex.l: Recognize \r the same as \n.
-
-Thu Jun 23 17:53:04 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- Preliminary support for generating shared libraries, from Eric
- Youngdale <ericy@cais.cais.com>.
- * genscripts.sh: If the emulation parameter file sets
- GENERATE_SHLIB_SCRIPT, generate a .xs script file with
- CREATE_SHLIB defined.
- * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): If
- link_info.shared is set, use the .xs script file.
- * scripttempl/elf.sc: If CREATE_SHLIB is set, don't create a
- .interp section, and don't include TEXT_START_ADDR in the starting
- address of the first section.
- * emulparams/elf_i386.sh (GENERATE_SHLIB_SCRIPT): Likewise.
- * emulparams/elf32_sparc.sh (GENERATE_SHLIB_SCRIPT): Define.
-
-Thu Jun 23 12:52:22 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * configure.in: Change --with-targets to --enable-targets.
-
-Wed Jun 22 13:42:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * lexsup.c (parse_args): Add support for new options -( -) with
- synonyms --start-group --end-group.
- * ldlang.h (enum statement_enum): Add lang_group_statement_enum.
- (lang_group_statement_type): Define new struct.
- (lang_statement_union_type): Add group_statement field.
- (lang_enter_group, lang_leave_group): Declare.
- * ldlang.c (lang_for_each_statement_worker): Handle
- lang_group_statement_enum.
- (map_input_to_output_sections, print_statement): Likewise.
- (lang_size_sections, lang_do_assignments): Likewise.
- (open_input_bfds): Completely rewrite. Now does its own looping,
- rather than using lang_for_each_statement. Handle groups.
- (lang_process): Update call to open_input_bfds.
- (print_group): New static function.
- (lang_enter_group, lang_leave_group): New static functions.
- * ldfile.c (ldfile_open_file): If the file has already been
- opened, just return rather than taking an assertion failure.
- * ldver.c (help): Mention new options.
- * ld.texinfo: Document new options.
-
- * ldlang.c (end_of_data_section_statement_list): Don't define.
- (lang_leave_output_section_statement): Don't set obsolete variable
- end_of_data_section_statement_list.
-
- * scripttempl/go32coff.sc: Don't put ${DATA_ALIGNMENT} inside an
- ALIGN.
-
- * ldlang.c (lang_size_sections): Adjust current region address
- even for sections with an explicit address. From
- ralphc@pyramid.com (Ralph Campbell).
-
- * emulparams/i386linux.sh (NONPAGED_TEXT_START_ADDR): Set to 0.
- From jrs@world.std.com (Rick Sladkey).
-
- * scripttempl/mipsbsd.sc: Let sections align to their natural
- boundaries.
-
-Tue Jun 21 11:27:04 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ldlang.c (lang_init): Use new bfd_abs_section_ptr, not
- &bfd_abs_section.
- (lang_abs_symbol_at_beginning_of): Likewise.
- (lang_abs_symbol_at_end_of): Likewise.
- (lang_size_sections): Use bfd_is_abs_section to check for the
- absolute section. Don't try to set the VMA or output_offset or
- size of the absolute section.
- * ldmain.c (notice_ysym): Use bfd_is_und_section to check for the
- undefined section.
-
-Thu Jun 16 22:48:41 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * scripttempl/hppaelf.sc: Place .data and .bss at 0x40000000
- when generating relocatable objects.
-
-Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * emultempl/linux.em: New file providing support for linking
- against Linux shared libraries.
- * config/i386-linux.mt (ei386linux.c): Depend upon linux.em.
- * emulparams/i386linux.sh (TEMPLATE_NAME): Define as linux.
-
-Thu Jun 16 12:22:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * lexsup.c (parse_args): Add -shared to longopts, and handle it.
- * ldmain.c (main): Initialize link_info.shared to false. Give
- error if link_info.relocateable and link_info.shared are both set.
-
- * configure.in: If EMUL_EXTRA* is defined in a config file, treat
- it as naming an emulation to be added to EMULATION_OFILES.
- * config/i386-linux.mt (EMUL_EXTRA1): Define as elf_i386.
-
- * Makefile.in: Rebuilt dependencies.
- (ALL_EMULATIONS): Add ei386linux.o, eelf32_sparc.o,
- eelf64_sparc.o. Remove $(OTHER_EMULATIONS).
- (ei386linux.c, eelf32_sparc.c, eelf64_sparc.c): New targets.
- * config/i386-linux.mt (OTHER_EMULATIONS): Don't define.
- (ei386linux.c): Remove; now in Makefile.in.
- * config/i386-lynx.mt (OTHER_EMULATIONS): Don't define.
- * config/m68k-lynx.mt (OTHER_EMULATIONS): Don't define.
- * config/sparc-lynx.mt (OTHER_EMULATIONS): Don't define.
- * config/sparc64-elf.mt (OTHER_EMULATIONS): Don't define.
- (eelf64_sparc.c): Remove; now in Makefile.in.
- * config/sun4sol2.mt (OTHER_EMULATIONS): Don't define.
- (eelf32_sparc.c): Remove; now in Makefile.in.
-
- * ldexp.c (exp_print_tree): Don't crash if etree_rel section has
- no owner--it might be bfd_abs_section. From Eric Youngdale
- <ericy@cais.cais.com>.
-
- * scripttempl/aout.sc: Let sections align to their natural
- boundaries.
-
-Wed Jun 15 01:54:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldemul.h (ldemul_open_dynamic_archive): Declare.
- (ld_emulation_xfer_type): Add new field open_dynamic_archive.
- * ldemul.c: Include ldexp.h and ldlang.h.
- (ldemul_open_dynamic_archive): New function.
- * ldfile.h (ldfile_open_file_search): Declare.
- * ldfile.c: Include ldemul.h.
- (try_open_bfd): Rename from cache_bfd_openr. Return boolean
- argument, not bfd *. Change all callers.
- (ldfile_open_file_search): Rename from open_a. Return boolean
- argument, not bfd *. Clean up. Change all callers.
- (ldfile_open_file): If doing a dynamic link, call
- ldemul_open_dynamic_archive rather than assuming the extension of
- a dynamic object is ".so".
- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
- New function.
- (ld_${EMULATION_NAME}_emulation): Initialize open_dynamic_archive
- field.
- * emultempl/sunos.em (ld_${EMULATION_NAME}_emulation): Likewise.
-
- * ldmain.c (get_emulation): Ignore -m486 for Linux compatibility.
- * lexsup.c (parse_args): Ignore -qmagic for Linux compatibility.
- Accept -static as a synonym for -non_shared.
-
- Let the user change the dynamic linker used by ELF code.
- * ld.h (args_type): Add new field interpreter.
- * lexsup.c (parse_args): Add dynamic-linker to longopts, and
- handle it.
- * ldmain.c (main): Initialize command_line.interpreter to NULL.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Get
- the ELF backend to return the .interp section. If
- command_line.interpreter is not NULL, set the contents of .interp
- to it.
- * ld.texinfo: Mention -dynamic-linker.
-
- * config/sun4sol2.mt (eelf32_sparc.c): Depend upon elf32.em, not
- generic.em.
-
- * lexsup.c (parse_args): Sort out the option macros and change the
- definitions to make it easier to add a new option.
-
- * scripttempl/aout.sc: Define __etext and __edata to go along with
- _etext and _edata.
-
- * ld.h (ld_config_type): Add new field traditional_format.
- * lexsup.c (parse_args): Add traditional-format to longopts, and
- handle it.
- * ldmain.c (main): Initialize config.traditional_format to false.
- * ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD
- flags of output_bfd according to config.traditional_format.
- * ldver.c (help): Mention -traditional-format.
- * ld.texinfo: Document -traditional-format.
-
-Tue Jun 14 23:10:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldctor.c (ldctor_add_entry): Add entries to a set in the order
- they are encountered.
-
-Tue Jun 14 18:05:09 1994 Eric Youngdale (ericy@cais.cais.com)
-
- * emulparams/i386linux.sh (TEXT_START_ADDR): Define as 0x1000.
- (NONPAGED_TEXT_START_ADDR): Define as 0x20.
-
-Mon Jun 13 15:46:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/alpha.sc: Define _ftext, _etext and _fdata insted of
- _FTEXT, _ETEXT and _FDATA. Dont define _END.
-
- * ldfile.c (open_a): If this is not an archive, try to open it in
- the current directory before searching for it.
-
- * lexsup.c (parse_args): Treat -i as a synonym for -r.
-
- * ldgram.y (exp): Treat BLOCK as a synonym for ALIGN, so that
- BLOCK works in a section address as documented.
-
- * ldgram.y (YYDEBUG): Don't define.
-
-Fri Jun 10 16:45:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * emultempl/gld960.em: Pass false for new argument to
- ldfile_add_library_path.
- * emultempl/gld960c.em, emultempl/lnk960.em: Likewise.
-
- * emultempl/sunos.em: Only look for .so files if doing a dynamic
- link.
-
-Thu Jun 9 08:35:17 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/i960.sc: Add CONSTRUCTORS to .data.
-
-Thu Jun 9 06:52:29 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * Makefile.in (check): Delete ld.new dependency so that a regression
- test doesn't trigger a rebuild of the linker.
-
-Thu Jun 9 00:17:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (map_input_to_output_sections): For lang_address, call
- init_os if it hasn't already been called.
-
-Thu Jun 2 17:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Add support for SunOS shared libraries.
- * aout.sc: Don't define __DYNAMIC here. Add new sections used by
- shared library support code.
- * emultempl/sunos.em: New file.
- * emulparams/sun4.sh (TEMPLATE_NAME): Define as sunos.
- * emulparams/sun3.sh (TEMPLATE_NAME): Likewise.
- * Makefile.in (esun4.c): Depend upon sunos.em, not generic.em.
- (esun3.c): Likewise.
-
- * ldlang.c: Minor formatting cleanups.
- (lang_for_each_input_file): New function.
- * ldlang.h (lang_for_each_input_file): Declare.
-
- * ldfile.h (search_dirs_type): Move from ldfile.c, and add cmdline
- field.
- (search_head): Declare.
- (ldfile_add_library_path): Add new cmdline argument in prototype.
- * ldfile.c (search_head): Make non-static.
- (search_dirs_type): Move to ldfile.h.
- (ldfile_add_library_path): Accept cmdline argument, and save it.
- * lexsup.c (parse_args): Pass true for new cmdline argument of
- ldfile_add_library_path.
- (set_default_dirlist): Likewise.
- * ldmain.c (check_for_scripts_dir): Pass false for new cmdline
- argument of ldfile_add_library_path.
- * ldgram.y (ifile_p1): Likewise.
-
-Wed Jun 1 14:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.h (lang_input_statement_type): Remove fields subfiles,
- total_size, superfile and chain.
- * ldfile.c (open_a): Don't clear search_dirs_flag.
- (ldfile_open_file): Don't try to open superfile. Assert that file
- has not already been opened.
- * ldlang.c (new_afile): Don't initialize superfile.
- * ldmain.c (add_archive_element): Don't initialize subfiles or
- chain or superfile. Initialize search_dirs_flag to false.
-
-Fri May 27 12:25:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ldver.c (ldversion): Changed version to "cygnus-2.4.1".
-
- Changes from binutils-2.4 release:
-
- * genscripts.sh (RELOCATING, CONSTRUCTING): When setting
- variables, use whitespace, so scripts don't break.
-
- * config/alphaosf.mh (HDEFINES, CFLAGS): Deleted.
-
- * emultempl/generic.em: Find emultempl/stringify.sed in ${srcdir}.
-
- * cdtest-bar.cc: Renamed from cdtest-func.cc.
- * Makefile.in: Noted change.
-
- * scripttempl/a29k.sc: Don't include /lab3/u3/..../segments.o; I
- don't know where that's supposed to come from, or why it's
- necessary.
-
- Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
-
- * configure.bat: update to latest makefile.in
- * emulpara/go32.sh: set to coff-go32 not aout
- * emultemp/generic.em: strength-reduce the structure of
- this shell script, since the only available shell for
- DOS can't handle complex syntax.
- * emultemp/stringify.sed: for "sed -f" instead of inline.
- * makefile.in: depend on stringify.sed as well as genscripts.sh
- * scripttemp/go32coff.sc: correct for djgpp 1.11's COFF format
- * genscripts.sh: empty variables aren't always considered "set",
- so set them to "y" instead.
-
-Fri May 27 01:08:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (entry_symbol): Make static.
- (lang_add_entry): Add cmdline argument.
- * ldlang.h (lang_add_entry): Change prototype.
- * ldgram.y (statement_anywhere): Change lang_add_entry call.
- * lexsup.c (parse_args): Likewise.
-
-Tue May 24 16:13:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * emulparams/elf32mipb.sh (OTHER_READONLY_SECTIONS): Don't give
- .reginfo an address.
- (OTHER_READWRITE_SECTIONS): Don't give .lit4 or .lit8 an address.
- (OTHER_SECTIONS): Define for .gptab.sdata and .gptab.sbss.
- * scripttempl/elf.sc: Use OTHER_SECTIONS at end of script.
-
-Thu May 19 13:31:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Add support for ELF shared libraries.
- * ld.h (ld_config_type): Add field dynamic_link.
- * ldmain.c (main): Initialize config.dynamic_link to false. Warn
- on attempts to use -r with -relax, -call_shared or -s.
- * lexsup.c (longopts): Separate OPTION_CALL_SHARED from
- OPTION_NON_SHARED. Add OPTION_IGNORE. Adjust macro values
- accordingly. Add "dy" and "non_shared" options. Change "Qy" to
- OPTION_IGNORE for now. Handle OPTION_CALL_SHARED and
- OPTION_NON_SHARED by setting dynamic_link field accordingly.
- Handle OPTION_IGNORE by ignoring it. Clear dynamic_link field for
- -r and -Ur.
- * ldfile.c (ldfile_open_file): If config.dynamic_link is true, try
- opening a file with a .so extension first.
- * emultempl/elf32.em: New file.
- * emulparams/elf32_sparc.sh (TEXT_START_ADDR): Change to 0x10000.
- (NONPAGED_TEXT_START_ADDR): Likewise.
- (TEMPLATE_NAME): Define as elf32.
- (DATA_PLT): Define.
- * emulparams/elf_i386.sh (TEMPLATE_NAME): Define as elf32.
- * scripttempl/elf.sc: Add placement for new dynamic sections.
- Don't use CREATE_OBJECT_SYMBOLS. Define _etext, _edata and _end
- outside of any section. Don't use ALIGN(8); just let one section
- VMA follow another. Put .dynbss in .bss. Don't mention debugging
- sections; they'll be handled correctly anyhow.
- * Makefile.in (eelf_i386.c): Depend upon elf32.em, not generic.em.
-
-Wed May 18 10:15:39 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): Redirect output of ln to /dev/null.
-
-Mon May 16 13:35:08 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * emultempl/hppaelf.em: Change all references of
- .hppa_linker_stubs to .PARISC.stubs.
- * scripttempl/hppaelf.sc: Likewise.
-
-Fri May 13 13:00:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (print_output_section_statement): Change ``no attached
- output section'' message slightly.
- (lang_do_assignments): Don't recurse down if there is no real
- section.
-
- * config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to
- match corresponding change in emulation templates.
- * config/i386-lynx.mt, config/m68k-lynx.mt: Likewise.
- * config/sparc-lynx.mt, config/sun4sol2.mt: Likewise.
-
-Wed May 11 18:16:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ldver.c (ldversion): Updated version number.
-
- * cdtest-foo.cc: Use explicit "#pragma implementation".
- * cdtest-bar.cc: Renamed from cdtest-func.cc.
- * Makefile.in: References to cdtest-func.o changed to
- cdtest-bar.o.
-
-Wed May 11 16:24:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Don't create unnecessary output sections.
- * ldlang.c (out_bfd_get_section_by_name): Remove.
- (wild_section): Call bfd_get_section_by_name rather than
- our_bfd_get_section_by_name. Don't call wild_doit if there is no
- section.
- (lang_create_output_section_statements): Remove.
- (map_input_to_output_sections): For several cases, call init_os if
- it has not already been called.
- (lang_size_sections): If output section was not created, skip it.
- (lang_process): Don't call lan_create_output_section_statements.
- (lang_place_orphans): Skip files with just_syms_flags set to true.
- * ld.texinfo: Document change.
-
-Tue May 10 14:31:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (wild_doit): Don't bother initializing the vma and
- section size. Don't special case SEC_SHARED_LIBRARY.
- (lang_size_sections): Handle SEC_COFF_SHARED_LIBRARY sections
- specially.
-
-Fri May 6 12:24:27 1994 Steve Chamberlain (sac@cygnus.com)
-
- * config/go32.mh : New file for Xgo32X.
-
-Fri May 6 15:15:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldfile.c (ldfile_open_command_file): Set bfd_error_system_call
- before calling einfo, since we are reporting an fopen failure.
- From jrs@world.std.com (Rick Sladkey).
-
- * configure.in: Use "e" rather than "em_" as prefix for
- emulations.
-
-Fri May 6 01:08:14 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * emultempl/generic.em: Use "e" rather than "em_" as prefix for
- filename.
- * emultempl/gld960.em, emultempl/gld960c.em, emultempl/lnk960.em,
- emultempl/hppaelf.em, emultempl/m88kbcs.em, emultempl/vanilla.em:
- Ditto.
- * Makefile.in: Changed all generated file names.
- (ldemul-list.h): Depend on Makefile, not config.status. Changed
- sed patterns to handle new filenames.
-
- * config/mipsl-idt.mt: Renamed from mips-idtl.mt.
- * configure.in: Adjusted.
-
-Thu May 5 15:07:32 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * Makefile.in (install-info): Don't use "$<*", it doesn't always
- work. Instead, check build dir and $srcdir explicitly, and use
- `echo' to get all the filenames.
-
- * configure.in (h8300h-*-hms): Changed ld_target name to
- cf-h8300h.
- * config/cf-h8300h.mt: Renamed from coff-h8300h.mt, to make it
- unique in 8.3.
-
- * config/i960coff.mt: New file.
- * emulparams/gld960coff.sh: New file.
- * emultempl/gld960c.em: New file.
- * configure.in (i960-*-vxworks5* except -vxworks5.0*): Use
- i960coff configuration.
- * Makefile.in (em_gld960coff.c): Added dependencies, build rule.
-
- * Makefile.in (ALL_EMULATIONS): Remove em_delta68.o, since the
- code isn't included in FSF releases, and it can still be
- explicitly selected.
- (distclean): Remove site.bak and tmpdir.
- (STAGESTUFF): Removed $(GENERATED_CFILES) $(GENERATED_HFILES).
- (mostlyclean): Delete them explicitly here. Also remove tmpdir.
-
- Patches from Ralph Campbell:
- * config/mipsbsd.mh: New file.
- * Makefile.in (em_mipsbsd.c): Use mipsbsd.sc, not aout.sc.
- * scripttempl/mipsbsd.sc: Don't define __DYNAMIC.
- * emulparams/mipsbsd.sh (OUTPUT_FORMAT): Fix name to have `a.out'
- instead of `aout'.
-
- * configure.in (i386-*-gnu*): Treat like i386-*-mach*.
-
-Wed May 4 11:59:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * config/m68k.mt (EMUL): Set to m68kaout.
- * emulparams/m68kaout.sh: New file.
- * Makefile.in (ALL_EMULATIONS): Add em_m68kaout.o.
- (em_m68kaout.c): New target.
-
- * ldlang.c (lang_size_sections): If dot moves because of an
- assignment, don't try to insert a pad into the absolute output
- section, just change the address of the default memory region
- instead.
-
- * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur,
- cdtest-ur.out, and cdtest-ur.tmp.
-
-Wed Apr 27 16:03:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/sa29200.sc: Align all sections to four byte
- boundaries.
-
-Wed Apr 27 10:48:03 1994 Steve Chamberlain (sac@cygnus.com)
-
- * Makefile.in, configure.in: Support for go32 coff.
- * config/i386-go32.mt: New file
- * emulparams/i386go32.sh: New file
- * scripttempl/i386go32.sc: New file
-
-Tue Apr 26 17:20:03 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use
- Lynx-specific script templates.
- * configure.in (sparclite*-*-coff): Use coff-sparc.
- * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx.
- * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx.
- (ENTRY): Set to __main.
- * scripttempl/i386lynx.sc: New file, script for I386 Lynx.
- * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections.
- * scripttempl/sparclynx.sc: New file, script for uSparc Lynx.
-
-Tue Apr 26 12:41:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16
- byte boundary, in case the global constructors do not take up an
- even 16 bytes.
-
- * config/i386v4.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
- exist, get crtbegin based on gcc -print-libgcc-file-name.
- (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
-
-Mon Apr 25 15:27:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (lang_size_sections): When no address is given for a
- section, align it according to its requirements.
-
-Thu Apr 21 17:24:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (clean, distclean): Remove configdoc.texi.
-
-Tue Apr 19 12:12:15 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * configure.in: Add i[34]86-*-bsd386 to the patterns recognized.
-
-Fri Apr 15 14:35:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (lang_size_sections): When relaxing, adjust the
- position of a padding statement, and adjust dot accordingly.
-
-Mon Apr 11 17:37:09 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * Makefile.in (EXPECT, RUNTEST): Set these for the check goal.
-
-Mon Apr 11 12:32:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/i386coff.sc: If relocating, don't put .init and
- .fini sections into .text; keep them separate.
- * config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
- exist, get crtbegin based on gcc -print-libgcc-file-name.
- (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
-
-Mon Apr 11 10:31:00 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * Makefile.in (check): Set TCL_LIBRARY for runtest.
-
-Wed Apr 6 00:09:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
- manufacturer.
-
- * emultempl/hppaelf.em (hppaelf_finish): Only resize sections
- if building a final executable.
-
-Tue Apr 5 12:17:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (main): Check the return value of bfd_close.
-
-Thu Mar 31 18:07:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/alpha.sc: Clean up section alignment to ensure that
- sections never overlap when using -r.
-
-Wed Mar 30 15:51:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmisc.c (vfinfo): Change symbol reading slightly for recent BFD
- changes: get_symtab_upper_bound renamed and returns long,
- bfd_canonicalize_symtab returns long, check for error indications.
-
-Fri Mar 25 17:20:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (print_input_section): For section size, use
- _cooked_size if it is non-zero, size otherwise.
- (size_input_section): Likewise.
- (lang_do_assignments): Likewise (case lang_input_section_enum).
-
-Thu Mar 24 15:20:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (new_afile): Add new argument add_to_list. Don't set
- real to true for lang_input_file_is_marker_enum. Clear the_bfd.
- (lang_add_input_file): Pass true to new_afile for add_to_list.
- (lookup_name): Remove force_load argument. Changed all callers.
- Pass false to new_afile for add_to_list. Split loading of symbols
- out into separate function.
- (load_symbols): New function split out of lookup_name. Don't load
- the symbols if they are already loaded.
- (open_input_bfds): For lang_input_statement_enum call load_symbols
- rather than lookup_name.
- (lang_process): Pass abs_output_section rather than NULL to
- lang_size_sections.
- (lang_startup): Set real field of first_file to true.
-
-Wed Mar 23 14:15:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (had_relax): Removed.
- (relax_again): New static variable.
- (lang_size_sections): Change call to bfd_relax_section to
- correspond to BFD changes. Set relax_again appropriately.
- (lang_process): Remove #if 0 code. When relaxing, keep calling
- lang_do_assignments and lang_size_sections until relax_again
- becomes false.
-
- * emultemp/gld960.em: Include libiberty.h
- (gld960_before_parse): Pass NULL as final argument to concat.
-
-Tue Mar 22 13:08:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/aout.sc: Force _end and __end to be aligned to a
- four byte boundary.
-
- * ldwrite.c (build_link_order): Handle lang_data_statement_enum by
- building a bfd_data_link_order, rather than by setting the section
- contents immediately.
-
-Mon Mar 21 18:28:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Changes to make -Ur work again.
- * ldmain.c (add_to_set): Now takes reloc argument rather than
- bitsize. Check config.build_constructors here. If an new hash
- table entry is created, mark it as undefined.
- (constructor_callback): No longer takes bitsize argument. Pass
- BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the
- BFD backend supports it.
- (reloc_overflow): Handle a NULL abfd argument.
- (reloc_dangerous, unattached_reloc): Likewise.
- * ldctor.c: Include ldmain.h.
- (struct set_info): Change bitsize field to reloc.
- (ldctor_add_set_entry): Now takes reloc argument rather than
- bitsize. Don't bother to check config.build_constructors here.
- (ldctor_build_sets): Get the size from the reloc howto. If
- generating relocateable output, call lang_add_reloc rather than
- lang_add_data.
- * ldctor.h (ldctor_add_set_entry): Change declaration to use reloc
- instead of bitsize.
- * ldlang.h (statement_enum): Add lang_reloc_statement_enum.
- (lang_reloc_statement_type): New structure.
- (lang_statement_union_type): Add reloc_statement field.
- (lang_add_reloc): Declare new function.
- * ldlang.c (lang_for_each_statement_worker): Handle
- lang_reloc_statement_enum.
- (map_input_to_output_sections, print_statement): Likewise.
- (lang_size_sections, lang_do_assignments): Likewise.
- (print_reloc_statement): New function.
- (lang_add_reloc): New function.
- * ldwrite.c (build_link_order): Handle lang_reloc_statement_enum.
-
- * Makefile.in (cdtest.out, cdtest-ur.o): New targets.
- (cdtest-ur, cdtest-ur.out): New targets.
- (check-cdtest): Now also check that -Ur works correctly.
-
- * scripttemp/alpha.sc: Align all sections to 16 byte boundaries.
-
-Thu Mar 17 12:45:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (lang_process): Move lang_common call before
- map_input_to_output_sections, to ensure that any alignment
- constraints set by common symbols are copied over to the output
- sections.
-
-Fri Mar 11 22:17:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * emulparams/elf32ppc.sh (TEMPLATE_NAME): Don't define.
- (OTHER_READWRITE_SECTIONS): Rename .toc to .got.
- * Makefile.in (em_elf32ppc.c): Depend upon generic.em, not ppc.em.
- * emultempl/ppc.em: Remove ugly stub code; turns out not to be
- needed for ELF.
-
-Tue Mar 8 04:22:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * config/i386bsd.mh: New file.
-
-Mon Mar 7 15:23:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * elf.sc: Permit TEXT_START_SYMBOLS and DATA_START_SYMBOLS to be
- defined.
- * emulparams/elf32mipb.s (TEXT_START_SYMBOLS): Define _ftext.
- (DATA_START_SYMBOLS): Define _fdata.
-
-Mon Feb 28 10:59:14 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * ldlang.c (cat): Define using ANSI style if ALMOST_STDC defined.
-
-Sun Feb 27 16:29:38 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * emultempl/hppaelf.em (hppaelf_finish): Update comments. This
- works again. Attach some output symbols to the stub file bfd.
-
- * emultempl/hppaelf.em: Include elf32-hppa.h.
- (file_chain): Add decl.
- (hppa_look_for_stubs_in_section): Delete decl.
- (hppaelf_finish): Reenable code. Do not pass symbols
- down to hppa_look_for_stubs_in_section.
-
-Sat Feb 26 10:58:25 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c (write_map): Don't define. Removed all references.
- Just use map_file or map_filename instead.
- (add_archive_element): Use minfo to write map information, not
- info_msg.
- (constructor_callback): Use fprintf to write map information, not
- info_msg.
- * ldmain.h (write_map): Don't declare.
- * ldgram.y (mri_script_command): Removed reference to write_map.
- * ldlang.c (lang_one_common): Likewise.
- * lexsup.c (parse_args): Likewise.
-
-Fri Feb 25 19:12:03 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * scripttempl/elf.sc: Force all sections to be aligned.
-
- * ldgram.y (section): Reverse the order of memspec_opt and
- fill_opt to avoid an ambiguity when both are used.
- * ld.texinfo: Changed accordingly.
-
- * ldgram.y: Move include of ldlex.h back with other includes.
- * ldlex.h (input_type): Don't initialize enum constants to
- particular values.
- * ldlex.l: Use a switch to return the right token based on
- input_type, rather than knowing that input_type has a value based
- on a token type.
-
- * ldgram.y (dirlist_ptr): Removed; not used.
- * lexsup.c: Include ldver.h.
- * Makefile.in: Rebuilt dependencies.
-
-Fri Feb 25 18:55:54 1994 Ted Lemon (mellon@pepper.ncd.com)
-
- * ldlang.c (lookup_name): don't call bfd_set_gp_size.
- (ldlang_add_file): call it here instead.
-
-Fri Feb 25 18:13:46 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * ldgram.y: Include ldlex.h after %token decls, for byacc.
-
-Fri Feb 25 10:47:25 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * emultempl/hppaelf.em: First attempt to clean this file up.
- Add comments in several functions as to their purpose and
- how they function (or my current best guess). Clean up horrible
- spacing and indention that never should have been accepted in the
- first place. Add FIXMEs for issues which need to be resolved.
- Disable linker-stub generation until it gets fixed. This allows
- the linker to at least work on simple code for testing purposes.
-
- * ldlang.c (lang_size_sections): No longer static (PA ELF calls
- it via hppaelf_finish). Prototype moved into ldlang.h.
- (lang_process): Move problematic extra call to lang_size_sections
- into the PA ELF specific code.
- * emultempl/hppaelf.em (hppaelf_finish): Extra call to
- lang_size_sections moved here.
-
-Thu Feb 24 16:47:33 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in (powerpc-*-elf*): New target; use ppc-elf32.
- * config/ppc-elf32.mt: New file.
- * emulparams/elf32ppc.sh: New file.
- * emultempl/ppc.em: New file.
- * Makefile.in (ALL_EMULATIONS): Added em_elf32ppc.o.
- (em_elf32ppc.c): New target; uses elf32ppc.sh, ppc.em and elf.sc.
- (EMULATION_OFILES): Added dependencies on ldexp.h and ldlang.h.
-
-Thu Feb 24 12:27:07 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * lexsup.c (parse_args): Use symbolic numbers for long options.
- Fix misunderstanding in -Y and -call_shared et al.
-
- Use getopt instead of lex and yacc to parse the command line.
-
- * ld.texinfo (Options): Document changes to option syntax.
- * Makefile.in: Update dependencies.
- * ldver.c (help): Tweak dashes in usage message.
- * ldgram.y (%union): Remove unused members.
- Remove %tokens for command line options; add ones for input types.
- (command_line): Rules removed.
- (file): Instead of command line, recognize an
- input type indicator, then use the nonterminal for that type.
- (defsym_expr): New nonterminal from code formerly in command_line.
- * ldlex.h: Declare parser input type enum and variable.
- Don't declare parse_line.
- * ldlex.l: Remove unused variables. Make some used ones static
- and comment them.
- (COMMAND): Start state and its rules removed.
- At start of yylex, return input state token if at start of input.
- (lex_redirect): Don't need to set yyout.
- (ldlex_command): Function removed.
- * ldmain.c (main): Instead of calling parse_line, set up the
- redirections and call yyparse directly.
- * ldmisc.c (vfinfo): If there's no input filename, print nothing, not
- "command line".
- * lexsup.c: Remove #if 0'd code.
- (parse_line): Function removed.
- (parse_args): Rewrite to use getopt_long_only.
- (set_default_dirlist): New function from code formerly in
- ldgram.y:command_line.
- (set_section_start): New function.
- * emultempl/generic.em, emultempl/gld960.em, emultempl/hppaelf.em,
- emultempl/lnk960.em, emultempl/m88kbcs.em: Don't enclose
- compiled-in link scripts in "{" and "}", as the grammar no longer
- wants them to be.
-
-Thu Feb 24 08:43:26 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * Makefile.in (ld.dvi): Depend on configdoc.texi, but don't
- require that it be in $(srcdir).
-
-Tue Feb 22 09:21:18 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_size_sections): Only align section to alignment
- required by linker script, not to maximum alignment of input
- sections.
-
- * ldlang.h (largest_section): Don't declare.
- * ldlang.c (largest_section): Don't define.
- (size_input_section): Don't set largest_section; not used.
-
-Mon Feb 21 15:15:29 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (new_afile): Pass NULL as last argument to concat.
-
-Thu Feb 17 15:51:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c, ldmain.c: Include libiberty.h.
-
- * ldmisc.h (concat): Don't declare.
- * ldmisc.c (concat): Don't define; just use the one in libiberty.
-
- * ld.h (as_output_section_statement): Removed; not used.
-
-Thu Feb 17 09:32:14 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlang.c, ldmain.c, ldmisc.c: Use bfd_get_error and
- bfd_set_error and new error names.
-
-Tue Feb 15 20:14:53 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ldwrite.c (build_link_order): If the cooked size of the section
- has been set, use it, for determining link_order size.
- (ldwrite): In the error message displayed if bfd_final_link fails,
- indicate that it was in fact the final link step that failed.
-
- * ldlang.c (lang_size_sections): Clear bfd_error before calling
- bfd_relax_section, in case it returns false but doesn't flag an
- error. If an error is returned, indicate which one it is in the
- error message.
-
- * Makefile.in (install-info): Depend on ld.info, and use "$<*" so
- it'll get picked up from $(srcdir) if appropriate.
-
-Tue Feb 15 16:32:04 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * scripttempl/aout.sc: Only pad .text if PAD_TEXT is set.
- * emulparams/i386mach.sh (PAD_TEXT): Set PAD_TEXT.
-
-Fri Feb 11 17:02:49 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlex.l (comment): Increment line number when newline is read.
-
-Fri Feb 11 17:36:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (lookup_name): Take new argument, force_load. If true,
- reload the file even if it is already loaded.
- (wild): Call lookup_name with force_load argument of 0.
- (open_input_bfds): Call lookup_name with force_load argument of 1.
- (print_symbol): Remove declaration of non-existent function.
- (print_one_symbol): Return true rather than falling off end.
-
-Thu Feb 10 11:52:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (main): Use %ld when printing long values.
-
- * scripttempl/elf.sc: Move _edata after the .sdata section.
- Permit OTHER_BSS_SYMBOLS to be defined.
- * emulparams/elf32mipb.s (OTHER_BSS_SYMBOLS): Define _fbss.
-
-Mon Feb 7 16:31:15 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * Rename all "hppaosf" files to "hppaelf".
- * Change all "osf" references to "elf" in hppaelf files.
- * Makefile.in: Likewise.
- * configure.in: Likewise.
-
-Sun Feb 6 20:31:56 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmain.c (main): Call xatexit, not atexit.
- Call xmalloc_set_program_name.
-
- * ldlang.c (lang_size_sections): Check if bfd_relax_section set
- bfd_errno.
-
-Sat Feb 5 03:54:34 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * emultempl/lnk960.em (append), emultempl/hppaosf.em
- (hppaosf_finish): Call xmalloc, not ldmalloc.
- * ldmain.c (preserve_output): Function removed.
- (main): Do it here instead.
-
-Fri Feb 4 23:02:19 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)
- GNU C specific macros.
-
- * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining
- call to LANG_FOR_EACH_INPUT_SECTION.
-
-Fri Feb 4 16:26:08 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions
- deleted; will use libiberty versions instead.
- * ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c
- mri.c Makefile.in: Change callers.
-
- * ldmisc.c (vfinfo): Remove cleanup code.
- * ldmain.c (remove_output): Put it here (new function).
- (preserve_output): New function.
- (main): Register remove_output and preserve_output with atexit.
- * ldmain.c ldgram.y: Call xexit instead of exit.
- * ldmisc.h: Declare xexit.
-
-Fri Feb 4 15:19:01 1994 Steve Chamberlain (sac@cygnus.com)
-
- * Makefile.in: Lots of new H8/500 memory models.
-
-Sun Jan 30 14:33:40 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ldlex.l: Removed duplicate rules.
- (yywrap): Provide default definition, needed with some versions of
- flex.
-
-Fri Jan 28 09:12:56 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmisc.c (vfinfo): For `%I', if the file is in an archive, print
- the archive filename too.
-
- * ldlex.l: Add rule to catch invalid input characters instead of
- printing them. Include "ldmain.h" for program_name decl.
- (lex_warn_invalid): New function.
- * Makefile.in: Add dependency.
-
-Fri Jan 28 12:58:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * Makefile.in (check): Don't bother running any tests of
- cross-linker until the test suite no longer assumes native mode.
-
-Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * ldlang.c (print_one_symbol, print_input_section): Print
- global symbols in symbol table again.
-
-Thu Jan 27 12:35:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,
- exit successfully instead of complaining if no input files are
- given.
-
-Tue Jan 25 13:19:41 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in: Format variable definitions consistently.
- (LD_PROG): Remove unnecessary variables from link command,
- change variable LOADLIBES to EXTRALIBS.
-
- * ldmain.c (main): Compute and display total execution time.
- * ld.texinfo (-stats): Document the option.
-
-Mon Jan 24 12:56:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (reloc_overflow): Added name, reloc_name and addend
- arguments.
-
- * ldlang.c (lookup_name): Set BFD GP size to -G argument value
- after opening BFD.
-
- * ldlang.c (relaxing): Removed global variable.
- (lang_size_sections): If the canonical symbols have not already
- been read in, read them in before relaxing.
- * ldlang.h (relaxing): Removed declaration.
-
-Fri Jan 21 00:44:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (new_afile): Initialize loaded field to false.
- (lookup_name): If file was already loaded, don't call the
- add_symbols entry point again.
-
-Wed Jan 19 13:57:00 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ld.texinfo: Clarify what -T option does.
-
-Tue Jan 18 16:18:15 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * scripttempl/m88kbcs.sc: Don't use CREATE_OBJECT_SYMBOLS, that's
- for a.out.
-
-Tue Jan 11 13:22:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (add_archive_element): If trace_files or
- trace_file_tries, print file name.
- * ldlang.c (lookup_name): Likewise.
- (ldlang_add_file): Don't put files on input_bfds list in reverse
- order.
-
- * scripttempl/elf.sc: Correct typo.
-
-Mon Jan 10 19:49:05 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldgram.y, ldlex.l: Make the space between -e, -u, and -y and
- their arguments optional, for compatibility with the old GNU ld.
-
-Fri Jan 7 20:00:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/elf.c: Define __bss_start before the .sbss section.
-
-Thu Jan 6 00:13:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (add_to_set): Add bitsize argument.
- (constructor_callback): New function.
- (link_callbacks): Add constructor_callback.
- * ldctor.c (struct set_info): Add bitsize field.
- (ldctor_add_set_entry): Add bitsize argument.
- (ldctor_build_sets): Base the size of the elements of the set on
- the bitsize, rather than always using LONG.
- * ldctor.h (ldctor_add_set_entry): Add bitsize to declaration.
-
- * ld.h (QUAD_SIZE): Define.
- * ldgram.y (QUAD): New token.
- (length): Handle it.
- * ldlex.l: Return QUAD.
- * lexsup.c (keywords): Add QUAD.
- * ldwrite.c (build_link_order): Handle QUAD.
- * ldlang.c (print_data_statement): Handle QUAD.
- (lang_size_sections): Likewise.
- (lang_do_assignments): Likewise.
- * ldexp.c (exp_print_token): Add QUAD to table.
- * ld.texinfo: Describe QUAD.
-
- * scripttempl/alpha.sc: Don't create .lit4 or .sdata sections,
- since the Alpha doesn't use them.
-
-Wed Jan 5 17:42:16 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldemul.h (ld_emulation_xfer_struct): Comment the members.
-
-Sat Jan 1 13:39:31 1994 Rob Savoye (rob@darkstar.cygnus.com)
-
- * Makefile.in, configure.in: Add support for VSTa micro-kernel.
- * config/vsta.mt, emulparams/vsta.sh: New files for VSTa.
-
-Sat Jan 1 10:53:35 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * scripttempl/aout.sc: Pad .text to DATA_ALIGNMENT if relocating;
- needed for i386mach. (Should be a no-op on other systems.)
-
- * emulparams/i386mach.sh (SEGMENT_SIZE): Fix again.
- (PAGE_SIZE): Don't define; not used.
-
-Fri Dec 31 16:12:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldgram.y (yyerror): Make argument const char *, and actually
- print it out rather than assuming it is a syntax error.
- * ldmisc.h: Change declaration of yyerror.
- * ldemul.c, ldwrite.c: Add /*ARGSUSED*/ as appropriate.
-
-Fri Dec 31 11:37:28 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * emulparams/i386mach.sh (NONPAGED_TEXT_START_ADDR): Don't include
- exec header offset, since the exec header isn't loaded.
- (PAGE_SIZE, SEGMENT_SIZE): Agree with bfd/i386mach3.c.
-
-Thu Dec 30 13:01:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- A major rewrite to move the bulk of the linker into BFD so that
- more efficient backend code can be written for specific object
- files.
- * lderror.c, lderror.h, ldindr.c, ldindr.h, ldsym.c, ldsym.h,
- ldwarn.c, ldwarn.h, relax.c, relax.h: Removed.
- * ldctor.c, ldctor.h: Complete rewrite.
- * ldwrite.c, ldwrite.h: Complete rewrite.
- * ld.h (strip_symbols_type, strip_symbols): Removed. Use
- link_info.strip instead. Changed all uses.
- (discard_locals_type, discard_locals): Removed. Use
- link_info.discard instead. Changed all uses.
- (ld_config_type): Removed relocateable_output field; use
- link_info.relocateable instead; changed all uses. Added stats
- field.
- (set_asymbol_chain, get_asymbol_chain, get_loader_symbol,
- set_loader_symbol): Removed.
- * ldexp.h (node_class): Added etree_rel.
- (etree_type): Added rel field.
- * ldexp.c (exp_print_token): Bracketed table initialization.
- (exp_relop): New function.
- (fold_name): Use linker hash table rather than ldsym functions.
- (exp_fold_tree): Likewise. Also, handle etree_rel case.
- (exp_print_tree): Handle etree_rel.
- * ldgram.y (strip_symbols, discard_locals): Removed.
- (OPTION_stats, OPTION_no_keep_memory): New tokens. Handle them.
- (REL): New token. Does not appear in grammar, but needed for
- expression code.
- (file): Don't call lang_final; it's called by main anyhow.
- * ldlex.l: Accept -stats and -no-keep-memory options.
- * ldlang.h (fill_type): Make unsigned int, not unsigned short.
- * ldlang.c: Consistently use fill_type for fill argument.
- (lang_init_script_file, script_file): Removed.
- (create_object_symbols): Removed. Use
- link_info.create_object_symbols_section instead. Changed all
- uses.
- (lang_add_keepsyms_file): Removed.
- (lookup_name): Call bfd_link_add_symbols instead of
- ldmain_open_file_read_symbol.
- (wild): Don't iterate over script_file.
- (open_output): Create link hash table.
- (lang_place_undefineds): Rewrote.
- (lang_size_sections): Handle relaxing (doesn't work yet).
- (lang_relocate_globals): Removed.
- (lang_finish): Use link hash table rather than ldsym functions.
- (lang_common): Rewrote.
- (lang_one_common): New function.
- (ldlang_add_file): Add file to link_info.input_bfds list. Set
- usrdata.
- (create_symbol): Removed.
- (lang_process): Don't call lang_init_script_file. Call
- ldctor_build_sets rather than find_constructors. Don't call
- lang_relocate_globals.
- (lang_abs_symbol_at_beginning_of): Rewrote.
- (lang_abs_symbol_at_end_of): Rewrote.
- * ldmain.c (had_y): Removed.
- (lprefix, lprefix_len): Removed; use link_info fields instead.
- Changed all uses.
- (multiple_def_count, commons_pending, undefined_global_sym_count,
- total_symbols_seen, total_files_seen): Removed.
- (link_callbacks, link_info): New variables.
- (main): Initialize link_info. Don't call init_bfd_error_vector or
- ldsym_init. Don't set now unused variables. Handle -stats.
- (get_emulation): Removed obsolete and nonfunctional GNU960 code.
- (add_ysym): Rewrote.
- (read_entry_symbols, refize, enter_global_ref, enter_file_symbols,
- search_library, gnu960_check_format, decode_library_subfile,
- linear_library, symdef_library, clear_syms, subfile_wanted_p):
- Removed.
- (add_keepsyms_file, add_archive_element, multiple_definition,
- multiple_common, add_to_set, warning_callback, undefined_symbol,
- reloc_overflow, reloc_dangerous, unattached_reloc, notice_ysym):
- New functions.
- * ldmisc.c (vfinfo): Accept a string for %T, not a symbol. Don't
- require symbols for %C; look them up instead.
- * emultempl/hppaosf.em: Pass link_info to
- hppa_look_for_stubs_in_section.
- * Makefile.in: Rebuilt dependencies.
- (CFILES): Removed lderror.c, ldindr.c, ldsym.c, ldwarn.c, and
- relax.c.
- (HFILES): Removed lderror.h, ldindr.h, ldsym.h, ldwarn.h, and
- relax.h.
- (EMULATION_OFILES): Depend on bfdlink.h, ldmain.h, ldexp.h,
- ldlang.h and ldctor.h.
-
- * Makefile.in (ldlex.c): Don't depend on ldgram.h. Remove
- declarations of free and malloc from flex output. Change malloc
- to ldmalloc in flex output.
-
-Thu Dec 16 21:19:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * ldmain.c (lprefix): Change default from a char to a string
- with only one character.
- (lprefix_len): Set default to one.
-
- * ldmain.h (lprefix_len): Declare.
-
- * ldsym.c (write_file_locals): Use strncmp rather than a character
- comparison for lprefix.
-
- * emultmpl/m88kbcs.em (before_parse): Set lprefix and lprefix_len
- correctly.
-
- * emultmpl/hppaosf.em: Include ldexp.h.
- (before_parse): Set lprefix and lprefix_len correctly.
-
-Tue Dec 14 17:19:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlex.h: Don't declare yywrap if it is a macro.
- * ldlex.l: Include sysdep.h.
- * ldlang.c (lang_for_each_statement_worker,
- lang_for_each_statement): Forgot to use PARAMS.
-
-Mon Dec 13 14:30:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in: Added .PHONY targets where appropriate. Added some
- comments. Also:
- (gcclibdir, version): Removed unused variables.
- (DEP): New variable, set to mkdep.
- (ALL_CFLAGS): New variable. Used in .c.o target.
- (CFILES, HFILES, GENERATED_CFILES, GENERATED_HFILES): New
- variables.
- (HEADERS, MANSOURCES, LDCSOURCES, GENERATED_SOURCES,
- GENERATED_HEADERS, LDSOURCES, BFD_SOURCES, SOURCES): Removed
- mostly obsolete variables. Adjusted remaining uses.
- (DEF_EMUL): Removed variable.
- (ldmain.o): Handle undefined EMUL error correctly.
- (ldemul-list.h): Depend on config.status rather than Makefile.
- Create via temporary file.
- (ver960.c, roll, make): Removed obsolete targets.
- (.dep, .dep1, dep.sed, dep, dep-in): New targets. Used to rebuild
- dependencies.
- * dep-in.sed: New file, used when rebuilding dependencies.
-
-Sat Dec 11 14:43:44 1993 Ian Lance Taylor (ian@deneb.cygnus.com)
-
- Made many changes to eliminate gcc warnings. Made various
- cosmetic changes, declared various things in header files, removed
- various extern declarations from .c files. No substantive
- changes.
-
- * ldlang.c (lang_process): Ifdef out final call to
- lang_size_sections again (reverting change of Nove 2), since it
- breaks the Sun4 linker.
-
-Thu Dec 2 16:31:47 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (alpha-*-netware*): New target; use alpha.
-
-Wed Dec 1 14:04:20 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * configure.in: Group targets by CPU. Merge some m68k target
- entries with different CPU specs that use the same ld_target
- values.
-
- * configure.in: Add sparc*-*-coff.
- * config/coff-sparc.mt, emulparams/coff_sparc.sh: New files.
- * Makefile.in (ALL_EMULATIONS): Add em_coff_sparc.o.
- (em_coff_sparc.c): Add dependencies and build rules.
-
- * ldmisc.c (errno, sys_nerr, sys_errlist): Don't declare.
-
-Wed Dec 1 12:19:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldgram.y (OPTION_call_shared, OPTION_non_shared, OPTION_Oval):
- New tokens.
- (command_line_option): Accept and ignore them (for now).
- * ldlex.l (<COMMAND>): Handle -non_shared, -call_shared, and -On
- where n is a number.
-
-Mon Nov 22 14:14:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (subfile_wanted_p): If merging a common symbol which is
- not in bfd_com_section, create the section in the BFD so that it
- can be placed in the right output section.
-
-Fri Nov 19 14:12:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (mips*-sgi-irix5*): New target. Use mipsb-elf32.
- * emulparams/elf32mipsb.sh (DATA_ADDR): Define.
- (OTHER_READONLY_SECTIONS): Define for .reginfo.
- (EXECUTABLE_SYMBOLS): Define for _DYNAMIC_LINK.
- * scripttempl/elf.sc: Use EXECUTABLE_SYMBOLS when not relocating.
- Move OTHER_READONLY_SECTIONS after all the other readonly
- sections. Don't use DATA_ADDR twice.
-
- * ldmain.c (enter_file_symbols): Removed duplicate tests of p. If
- p is in a common section, make sure the BFD has a section of that
- name.
-
- * ldlang.c (lang_common): Add newline to error message.
-
-Thu Nov 11 15:54:41 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * emulparams/m68klynx.sh (SCRIPT_NAME): Define to use a
- Lynx-specific script instead of m68kcoff.
- (OUTPUT_FORMAT): Define as "coff-m68k-lynx".
- (ENTRY): Define as __main.
- (TEXT_START_ADDR): Define as 0.
- (PAGE_SIZE): Define as 0x1000.
- * emulparams/i386lynx.sh, emulparams/sparclynx.sh: Fix comment.
- * scripttempl/m68klynx.sc: New file.
-
-Mon Nov 8 12:00:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (get_emulation): Ignore -mips1, -mips2 and -mips3
- arguments rather than treating them as emulation names.
-
-Fri Nov 5 09:02:52 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com)
-
- * configure.in: Support x86 unixware and netware plus generic netware.
-
-Fri Nov 5 21:47:55 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * emulparams/i386mach.sh (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR):
- Correct values (?).
-
-Wed Nov 3 15:10:15 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * Makefile.in (distclean): Don't delete dvi or info files.
- (ld.info): Update dependency list.
- (ld.dvi): Ditto. Extend TEXINPUTS to get bfdsumm.texi.
-
-Wed Nov 3 12:07:39 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlang.c (lang_add_output): Take new arg, FROM_SCRIPT.
- Set output_filename instead of creating a new node.
- (open_output): Don't set output_filename.
- (lang_final): Create the new node here.
- * ldlang.c, ldlang.h, ldgram.y, mri.c: pass FROM_SCRIPT.
-
-Tue Nov 2 15:45:51 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- From Pete Hoogenboom (hoogen@cs.utah.edu):
-
- * scripttempl/hppaosf.sc: (___stack_zero, etext, _etext,
- edata, _edata, end): Add definitions of these symbols.
- (__end): Remove definition of this symbol.
- (__data_start): Move definition of this symbol.
-
- * emultempl/hppaosf.em: Various fixes and support for linker stub
- generation.
- (hppaosf_finish, hppaosf_search_for_padding_statements,
- hppaosf_create_output_section_statements): New functions in
- support of linker stub generation.
- (ld_hppaosf_emulation): Redefine to include new
- emulation-specific routines.
-
- * ldlang.c (lang_process): Re-enable last call lang_size_sections.
- Pass abs_output_section rather than NULL to avoid invalidating
- absolute symbols.
-
-Thu Oct 28 21:16:42 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Add em_i386mach.o.
- (em_i386mach.c): New rule.
- * configure.in (i[34]86-*-mach*): New case.
- * config/i386-mach.mt: New file.
- * emulparams/i386mach.sh: New file.
-
-Fri Oct 29 14:55:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ld.h (flag_is_*): Removed macros.
- * ldmain.c (enter_global_ref), ldsym.c (write_file_locals):
- Consistently check the BFD symbol flags directly, rather than
- using file_is_* macros.
-
-Thu Oct 28 19:08:42 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * configure.in (sparc*-*-lynxos*): New target.
- * Makefile.in: Add rule for em_sparclynx.c.
- (ALL_EMULATIONS): Add Lynx emulations.
- * config/sparc-lynx.mt: New file.
- * emulparams/sparclynx.sh: New file.
- * scripttempl/sparccoff.sc: New file.
-
-Thu Oct 28 13:50:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in: Add dependency for $(EMULATION_OFILES).
-
-Mon Oct 25 16:09:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * relax.c (write_relax): Check return value of bfd_seclet_link.
-
-Mon Oct 25 09:31:21 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * ldlang.c (delete_output_file_on_failure): New variable.
- (open_output): Set it after bfd open succeeds.
- * ldmisc.c (vfinfo): Test it.
-
- Changes from Peter Hoogenboom, hoogen@cs.utah.edu:
-
- * ldsym.c (write_file_locals): Set the BSF_FILE flag for object
- symbols.
-
- * ldemul.c: Support was added to allow emulation-specific
- processing to occur. This support was added primarily for linker
- stub generation in the elf32-hppa gld.
- (ldemul_finish, ldemul_create_output_section_statements): New
- functions.
- * ldemul.h: Support was added to allow emulation-specific
- processing to occur. (As described above.) Added finish and
- create_output_section_statements fields to
- ld_emulation_xfer_struct structure.
- * ldlang.c: Add calls to emulation-specific routines.
- (lang_process): Add call to
- ldemul_create_output_section_statements function.
- (lang_process): Add call to a emulation-specific routine (and
- some processing after the call).
-
-Fri Oct 22 20:54:13 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * configure.in: mips*- instead of mips-, mips*el changes
-
-Tue Oct 19 15:46:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (alpha-*-osf*): New target; use alpha.mt.
- * Makefile.in (ALL_EMULATIONS): Added em_alpha.o.
- (em_alpha.c): New target; use alpha.sh and alpha.sc.
- * config/alphaosf.mh (NATIVE_LIB_DIRS, HOSTING_CRT0): Define.
- * config/alpha.mt: New file.
- * emulparams/alpha.sh: New file.
- * scripttempl/alpha.sc: New file.
-
-Fri Oct 15 02:20:04 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * ldlang.c (lang_size_sections, lang_common): ALIGN_N can't handle
- types of different sizes (eg: 64 and 32 bits), so coerce.
- * ld.h (ALIGN_N): Add warning about usage.
-
-Wed Oct 13 16:02:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldmain.c (enter_global_ref): Just ignore any weak symbol for
- which we already have a definition, rather than checking in
- several different places whether the symbol is weak.
-
-Tue Oct 12 17:30:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (mips-*-elf*): New target; use mipsb-elf32.
- * scripttempl/elf.sc: Only use OTHER_READONLY_SECTIONS and
- OTHER_READWRITE_SECTIONS if relocating. Shell variables are not
- expanded within them.
- * config/mipsb-elf32.mt: New file.
- * emulparams/elf32mipb.sh: New file.
- * Makefile.in (em_elf32mipb.c): New target.
-
-Thu Sep 30 17:00:36 1993 Rob Savoye (rob@darkstar.cygnus.com)
-
- * ldgram.y: In input_list, change lang_input_file_is_file_enum to
- lang_input_file_is_search_file_enum so objects brought in using
- INPUT() do a path lookup.
-
-Tue Sep 28 13:31:23 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * configure.in: Change Lynx ld_target to be {i386,m68k}-lynx
- instead of {i386,m68k}-coff.
- * Makefile.in (em_i386lynx.c, em_m68klynx.c): New targets.
- * config/i386-lynx.mt: New file.
- * config/m68k-lynx.mt: New file.
- * emulparams/i386lynx.sh: New file.
- * emulparams/m68klynx.sh: New file.
-
- * scripttempl/i386coff.sc: Make ENTRY get its value from ${ENTRY},
- but defaulting to _start.
-
- * ldemul.c, ldfile.c, ldlang.c, ldmain.c, ldmisc.c, ldmisc.h,
- ldsym.c, ldwarn.c: Rename info to info_msg, to avoid conflict with
- LynxOS libc.
-
-Thu Sep 23 14:51:03 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * config/solaris2.mh: New file. Define HOSTING_CRT0 and
- HOSTING_LIBS for testing.
-
-Fri Sep 17 17:52:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Finish up support for i386-sysv4 (without shared libraries):
- * ld.h (flag_is_weak): Define.
- * ldlang.c (print_symbol): Mention whether symbol is weak.
- (print_input_section): Print weak symbols as globals.
- * ldmain.c (refize): Do not zero out BSF_WEAK flag.
- (enter_global_ref): Do not warn if a weak symbol redefines a
- global symbol. Do not let a weak symbol redefine a common symbol.
- (enter_file_symbols): Treat weak symbols as global symbols.
- (subfile_wanted_p): Do not pull in an object file from a archive
- just to resolve an undefined weak symbol.
- * ldmisc.c (vfinfo): Don't needlessly malloc space after a fatal
- error; the error might be that malloc has run out of space.
- * ldsym.c (write_file_locals): Treat weak symbols as global.
- * configure.in (i[34]86-*-sysv4*, i[34]86-*-elf*): New targets;
- use i386-elf.
- * config/i386v4.mh: New file; set NATIVE_LIB_DIRS to /usr/ccs/lib.
- * config/i386-elf.mt: New file; set EMUL to elf_i386.
- * emulparams/elf_i386.sh: New file.
- * scripttempl/elf.sc: Use ${NOP} as filler (defaults to 0).
- * Makefile.in (NATIVE_LIB_DIRS): Define to be empty.
- (ALL_EMULATIONS): Add em_elf_i386.o.
- (GENSCRIPTS): Pass NATIVE_LIB_DIRS as sixth argument.
- (em_elf_i386.c): New target, like other em_*.c targets.
- ($(LD_PROG)): Pass $(CFLAGS) to $(CC).
- * genscripts.sh: Accept NATIVE_LIB_DIRS as sixth argument. If
- nonempty, and configured for native, add it to LIB_PATH.
-
-Fri Sep 17 13:07:39 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * scripttempl/{h8300.sc,h8500.sc,i386coff.sc,m68kcoff.sc,sh.sc}:
- Added statements to pass stab and stabstr sections through and
- mark them as NOLOAD, which makes GDB happier.
-
-Wed Sep 15 16:02:29 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * configure.in: Accept m68k-lynx-lynxos config.
-
- * Makefile.in: Use $(SHELL) to run genscripts.sh.
-
-Sun Sep 12 16:04:40 1993 Doug Evans (dje@cygnus.com)
-
- * config/coff-h8300.mt: Add EMUL=h8300h.
-
- * ldmain.c (main): Call set_scripts_dir after argv has been processed.
-
-Fri Sep 10 09:36:29 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: Changed CXX back to g++.
-
-Fri Sep 10 09:34:29 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: Fixed RUNTEST* CXX CXXFLAGS macros and check rule.
-
-Fri Sep 10 07:26:57 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in (TAGS): Use shell wildcards.
-
-Tue Sep 7 18:04:54 1993 Jeffrey Osier (jeffrey@cygnus.com)
-
- * Makefile.in: add TEXINPUTS variable and use it in ld.dvi target
-
-Fri Sep 3 16:46:41 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * ld.texinfo: re-enable included config file; conditionalize doc
- for -oformat to interact properly with SingleFormat doc config
- var; rename @up/@down to @raisesections/@lowersections.
-
-Wed Aug 25 16:29:56 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * configure.in: recognize m88110.
-
-Tue Aug 24 18:49:40 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- From Peter Hoogenboom <hoogen@shafer.cs.utah.edu>:
- * emultempl/hppaosf.em (ld_hppaosf_emulation): Correct name for PA
- ELF emulation is "elf32-hppa" not "elf-big".
- (hppaosf_before_parse): Remove unneeded processing of environment
- variables.
- * scripttempl/hppaosf.sc: Include .hppa_linker_stubs sections in
- .text segment of output file.
- * emulparams/hppaosf.sh (OUTPUT_FORMAT): Use elf32-hppa.
-
-Tue Aug 24 16:17:00 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * ld.h: define BYTE_SIZE, SHORT_SIZE, and LONG_SIZE which are no
- longer in bfd.h.
-
- * ldlang.c, ld.h: updated copyright.
-
-Tue Aug 17 15:22:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldlang.c (open_output, lang_check): Check return value of
- bfd_set_arch_mach.
-
-Tue Aug 17 07:02:19 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * scripttempl/h8500.sc: Start all sections in a different segment.
- * scripttempl/z8ksim.sc: Handle constructors
-
-Thu Aug 12 16:05:37 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: revert earlier changes back to execute runtest
- with make check. cdtest and bootstrap now function as they
- did within the Makefile.
-
-Thu Aug 12 10:20:05 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in: Update dependencies.
-
- * configure.in: Set EMULATION_OFILES in Makefile based on
- --with-targets option.
-
-Thu Aug 12 08:52:29 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: check targets reimplemented to old way.
-
-Wed Aug 11 08:26:11 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * config/i386v.mh, config/irix4.mh: Use gcc
- -print-libgcc-file-name rather than $(libdir)/libgcc.a.
- * config/i386sco.mh: New file; copy of i386v.mh to correspond to
- bfd/configure.host change.
-
-Mon Aug 9 14:25:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * scripttempl/elf.sc: Handle .line and .debug* sections.
-
- * ldlex.l: Use bfd_scan_vma, not strtoul.
-
-Fri Aug 6 08:57:39 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldexp.c, ldfile.c, ldlang.c, lexsup.c, ldmain.c, ldemul.c:
- Remove inital caps in some error messages, change "can't" to
- "cannot", add missing colons.
- * ldmisc.c (vfinfo): Print "%%" as a single %.
- For '%' followed by unrecognized character, print them both
- verbatim instead of expecting a char * arg.
- For '%C', don't put the function name in parens.
-
- * ldexp.c (invalid): Pass "%%", not "% ".
-
-Fri Aug 6 14:31:22 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * scripttempl/mips.sc: Always define _ftext, _fdata, _fbss.
- (BSS_VAR): Removed; now always define _fbss.
- * emulparams/mipsidt.sh, emulparams/mipsidtl.sh (BSS_VAR):
- Removed.
-
-Thu Aug 5 15:55:19 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * configure.in: z8k-coff is the same as z8k-sim
-
-Wed Aug 4 21:00:18 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * testsuite/lib/ld.exp: new file
- * testsuite/config/unix-ld.exp: new file
- * testsuite/ld.bootstrap/bootstrap.exp: new file
- * Makefile.in: add dejagnu support for make check
-
-Wed Aug 4 17:52:32 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlex.l (comment): Add missing newline in message.
- * ldindr.c (add_indirect): Ditto.
- * ldexp.c (exp_fold_tree): Ditto.
-
-Tue Aug 3 10:57:41 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldgram.y, ldlex.l, mri.c, ldwrite.c: Change multiple commons
- into externs.
-
- * ldmisc.c (multiple_warn): New function.
- * ldmisc.h: Declare it.
- * ldmain.c (enter_global_ref): Call it.
- * ld.h (ld_config_type): Add warn_common.
- * ldlex.l, ldgram.y: Set it with -warn-common option.
- * ldver.c (help): Document it.
-
-Mon Aug 2 12:04:36 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * scripttempl/elf.sc: Add hooks for .sdata, .sbss, and
- target-specific sections, and for changing data section vma.
-
-Mon Jul 26 14:00:02 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * ldgram.y (OPTION_Qy, OPTION_Y, OPTION_dn, OPTION_YP): New
- terminals, for Solaris.
- (dirlist_ptr): New static variable.
- (command_line_option): Accept new options.
-
- * ldlex.l: Accept command-line options "-Qy", "-dn", "-Y", and
- "-YP,...".
-
- * config/sun4sol2.mt: Pass emulation name without ".sh".
-
- * emulparams/elf32_sparc.c: Renamed from elf32-sparc.c.
- * config/sun4sol2.mt (em_elf32_sparc.c): Adjusted accordingly.
-
-Fri Jul 23 13:51:09 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * scripttempl/elf.sc: Add support for .init, .fini, .ctors,
- .dtors, .data1, .rodata1 sections, instead of combining them into
- other sections. For `-r', set all section start addresses to
- zero.
-
- * emulparams/elf32-sparc.sh (TEXT_START_ADDR,
- NONPAGED_TEXT_START_ADDR): Value should be 0x10100.
- (MAXPAGESIZE): Renamed from PAGE_SIZE.
-
-Wed Jul 21 14:28:42 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * genscripts.sh: If this is the default emulation, set
- COMPILE_IN.
- * emultempl/*.em: Use it to determine whether to compile in the
- scripts.
-
- * Makefile.in (GENSCRIPTS): Pass the default emulation name to
- genscripts.sh. Pass the current emulation name without ".sh" on
- the end.
- * genscripts.sh: Take an default emulation arg.
- Use the current emulation name as EMULATION_NAME.
- Make default lib path for cross-compiling ':', not null.
- * emulparams/*.sh: Don't set EMULATION_NAME.
- * ldemul.c (ldemul_get_script): Take isfile arg.
- Pass it to emulation's get_script function.
- * ldemul.h: Adjust get_script prototypes.
- * ldfile.c (ldfile_find_command_file): Renamed from find_a_name.
- No longer static.
- * ldfile.h: Declare it.
- * ldgram.y: Accept a script on the command line again,
- for parsing compiled-in scripts.
- * ldmain.c (main): If ld script is a file, parse it as a -T
- option, otherwise parse it directly.
- * emultempl/*.em (*get_script): Return the scripts themselves if
- this is the default emulation; otherwise return their file names.
- * emultempl/m88kbcs.em: New file, to take m88kbcs #ifdef out of
- generic.em.
- * emulparams/m88kbcs.sh: Use it.
-
- * ld.h (ld_config_type::unix_relocate): Remove unused element.
-
-Tue Jul 20 12:01:49 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Delete em_i386linux.o (for which
- there's no change log entry yet, tsk tsk) from the list of
- emulations compiled in until Mark gets around to checking in
- emulparams/i386linux.sh.
- (ldemul-list.h): Depend on Makefile, so if EMULATION_OFILES is
- changed, this file gets updated.
-
-Fri Jul 16 14:14:32 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldgram.y (OPTION_Lfile): New token.
- (command_line_option): Accept OPTION_L NAME (whitespace after -L).
- * ldlex.l (<COMMAND>): Accept -L without FILENAME.
-
-Fri Jul 16 13:44:26 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: h8/300h support needs own .mt file.
- config/coff-h8300h.mt: New file.
-
-Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmain.c: Don't include sys/stat.h; it already got included
- somewhere along the way.
-
-Thu Jul 15 14:43:34 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * Makefile.in: Add h8300h support.
- emulparams/h8300h.sh: New file.
- scripttempl/h8300h.sc: New file.
-
-Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldfile.c (ldfile_open_file): In error message, use the name the
- user gave (e.g., "-lc"), rather than the base file name.
-
- * ldexp.c (exp_fold_tree): Don't assign an int to an enum.
-
- * ldmain.[ch]: Remove initial Q_ from function names.
- * ldexp.c, ldindr.c, ldlang.c: Change callers.
-
- * ldfile.c, ldmain.c, ldgram.y: Rename option_v to trace_file_tries.
-
- * ldlang.c (lang_process): Move loading of default script from
- here to main. Add a "/" to start of script name to prevent
- finding it in "." first.
-
- * ldmain.c (set_scripts_dir): Don't look in "." first.
-
- * ldgram.y, ldlang.c, ldsym.c: Remove traces of unused var
- option_longmap.
-
-Thu Jul 15 10:55:59 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (em_m88kbcs.c): Correct dependency.
- * scripttempl/m88kbcs.sc: It's ARCH, not arch. Removed TARGET
- statement. Changed OUTPUT_FORMAT to use ${OUTPUT_FORMAT}.
- * emulparams/m88kbcs.sh: It's coff-m88kbcs, not m88kbcs.
-
-Wed Jul 14 21:42:53 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldfile.c (ldlang_open_file, ldfile_open_command_file),
- main.c (main): Print the errno string in the error message.
-
-Tue Jul 13 20:00:30 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: Accept h8300h for target cpu.
-
- * ldmisc.c (vfinfo): Have demangle remove leading underscore if
- present (demangle is smart enough to know whether to do it or not).
-
-Mon Jul 12 11:45:48 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldmain.c (set_scripts_dir): Check . and <ld bin dir>/../lib for
- ldscripts, as well as <ld bin dir> and SCRIPTDIR.
-
- * ldlang.c (lang_process): Use sizeof instead of magic constant.
-
- * ldmain.c (get_emulation, check_for_scripts_dir,
- set_scripts_dir): New functions.
- (main): Call them.
-
-Mon Jul 12 10:57:03 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * scripttempl/elf.sc: Include .init, .fini, .rodata sections.
- Create symbol "end" instead of "__end". Comment out some parts
- that may not be needed (yet) for elf.
-
- * configure.in: Accept sparc-elf and sparc-solaris2 configs.
-
-Thu Jul 8 15:33:32 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (ALL_EMULATIONS): Include $(OTHER_EMULATIONS).
-
- * ldmisc.h (einfo, minfo, info): Don't bother with PARAMS macro
- when no prototype is being supplied.
- (ldmalloc, ldrealloc): Size argument is now size_t.
-
- * ldmisc.c (finfo): New function, accepts FILE* argument.
- (vfinfo, case 'v'): New format character; displays bfd_vma in hex
- without leading zeros.
- (vfinfo, cases 'R' and 'C'): Use finfo(%v) when displaying a
- bfd_vma value, instead of fprintf(%x) which won't hold a long long
- value.
- (concat, buystring): String lengths are size_t.
- (ldmalloc, ldrealloc, xrealloc): Size argument is now size_t.
-
- * ldlang.c (new_statement): Size argument is now size_t. Added
- forward declaration with prototype.
-
-Thu Jul 8 10:53:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldgram.y (OPTION_v): Don't turn on verbose output.
-
-Wed Jul 7 17:10:45 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * ldlex.l: Get rid of local typedef for bfd_vma! Get it from
- bfd.h instead.
-
-Wed Jul 7 11:33:12 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): Don't install as $(tooldir)/bin/gld;
- collect2 doesn't look for gld any more anyhow.
-
-Mon Jul 5 14:29:48 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_relocate_globals): Skip indirect symbols, which
- now have a non NULL srefs_chain.
-
- * config/hp300hpux.mt: Use emulation hp3hpux rather than
- hp300hpux, since the latter does not exist.
-
-Fri Jul 2 18:06:05 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * genscripts.sh: Put the scripts in the ldscripts directory, not
- emulations.
- * configure.in (ldscripts): Make, instead of emulations.
- * Makefile.in (scriptdir): Take off the "ld" part.
- (install, clean, distclean): Use ldscripts, not emulations.
- In tests, don't pass -Lemulations.
- Don't pass tooldir/lib to genscripts.sh.
- * genscripts.sh: Don't take tooldir/lib arg.
- * ldlang.c (lang_process): Add "ldscripts/" to the name of the
- default script file.
-
-Fri Jul 2 17:13:35 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * scripttempl/h8300.sc: Add .tors section for constructor/destructors.
-
-Thu Jul 1 16:38:45 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * config/coff-h8300.mt: EMUL=h8300hms -> h8300.
-
-Wed Jun 30 15:45:55 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * Makefile.in (.y.c): skip default .y.c rules. gnu make can now
- run in parallel without colliding on yacc's static file names.
- Without the stub rule, make will try to start two yacc's
- concurrently which fails because of yacc's static file names.
-
-Tue Jun 29 12:20:36 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c (subfile_wanted_p): Don't dump core if there are no
- symbols.
-
-Mon Jun 28 12:22:11 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * genscripts.sh (LIB_PATH): Only add /usr/local/lib if it's
- different from libdir.
-
- * Makefile.in (scriptdir): Base on tooldir, not datadir.
-
-Sat Jun 26 12:03:57 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldver.c (help): New function.
- * ldver.h: Declare it.
- * ldlex.l, ldgram.y: Recognize new options --help and --version.
-
-Mon Jun 21 20:39:48 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * Makefile.in (INCLUDES): Don't need ../include any more.
-
-Mon Jun 21 16:38:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldlex.l, ldgram.y: Support new -oformat option.
- Remove attempt at supporting script fragments on the command line.
- * ldlang.c (lang_add_output_format): Take new arg, FROM_SCRIPT.
- * mri.c (mri_format), ldgram.y: Change callers.
- * ldlang.h: Change prototype.
-
-Thu Jun 17 16:53:56 1993 david d `zoo' zuhn (zoo@cygnus.com)
-
- * Makefile.in: canonicalize install.sh; for use within
- this directory (and subdirs)
-
-Thu Jun 17 14:33:09 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldgram.y: Tweak grammar to make reporting of invalid options work.
-
- * Makefile.in (.cc.o): Restore .SUFFIXES entry for .cc
- and .cc.o rule.
-
-Wed Jun 16 11:45:32 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldfile.c (ldfile_open_command): Don't try .ld extension.
- It wasn't documented (or likely used) and wastes time.
- (try_open): If EXTEN is empty, don't try it.
-
- * ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c,
- ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c,
- ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls
- with normal function declarations.
-
- * Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh.
- Move *.sc-sh to scripttempl/*.sc.
- * {emultempl,emulparams,scripttempl}/README: New files.
- * sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files
- removed, replaced with generic.em.
- * h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from
- h8[35]00hms.s[ch]. Change their contents to omit the "hms".
-
- * *.em (*_get_script): Return script name instead of script contents.
- * ldlang.c (lang_process): Change caller.
-
- * ldlex.l, ldgram.y: Recognize -m option.
- Check for input files after *all* options in grammar.
- * ldmain.c (main): Check for -m options. Add default directory
- for -m.
-
- * mkscript.c: File removed.
- * genscripts.sh: Take two more parameters, tooldirlib and libdir,
- to add to the default LIB_PATH.
- Look for input files in the new subdirectories.
- Create the scripts in emulations subdirectory and don't filter
- them through mkscript.
- * configure.in: Make the emulations subdirectory.
-
- * Makefile.in: Account for all of the above changes.
- Remove unused .SUFFIXES. Get libgcc.a path with gcc
- -print-libgcc-file-name instead of $(libdir)/libgcc.a.
- Put CFLAGS last in the compilation rules.
- Add -I../bfd to INCLUDES so sysdep.h is found.
-
-Tue Jun 15 23:04:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (INCLUDES): Look in ../include, not ../bfd.
-
- * aout.sc-sh: Add SHLIB_PATH like STACKZERO. Make STACKZERO
- dependent on RELOCATING, not RELOCATION.
- * hp3hpux.sh (SHLIB_PATH): Define it.
-
-Mon Jun 14 19:06:15 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * ldfile.c (try_open): If opening without the extension fails,
- try with the extension even if -v or -V was given.
- had_script is imported (from ldgram.y), not exported.
-
-Mon Jun 14 16:26:10 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
-
- * Makefile.in: remove parentdir support, use INSTALL_XFORM
-
-Thu Jun 10 14:00:06 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldexp.c (exp_fold_tree): Don't lose the old flag bits.
- * ldgram.y (statement_list_opt): New nonterminal, either empty or
- statement_list.
- (section): Use statement_list_opt, not statement_list.
- * m68kcoff.sc-sh: Gather constructors and destructors and define
- __CTOR_LIST__ and __DTOR_LIST__ appropriately.
- * sa29200.sc-sh: Gather constructors and destructors and define
- ___CTOR_LIST__ and ___DTOR_LIST__ appropriately.
-
-Mon Jun 7 12:53:28 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
- * configure.in: No longer need to configure to get sysdep.h.
-
-Fri Jun 4 16:18:24 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: remove install:all and install-info:info
- dependencies (these cause some spurious rebuilds at 'make install'
- time)
-
-Fri Jun 4 08:50:14 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in (mips-idt-ecoffl*): New target; use mips-idtl.
- (mips-idt-ecoff*): Added trailing '*'.
- * config/mips-idtl.mt: New file; use EMUL of mipsidtl.
- * mipsidtl.sh: New file; like mipsidt.sh, but little endian.
- * Makefile.in (ALL_EMULATIONS): Added em_mipsidtl.o.
-
- * config/sun3.mh (HOSTING_LIBS, HOSTING_EMU): Removed obsolete and
- incorrect definitions.
-
-Tue Jun 1 14:56:10 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldsym.c (write_file_locals): Write BSF_CONSTRUCTOR
- symbols, unless stripping.
-
-Tue May 25 15:34:25 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: configure looks for ####, so remove lines with many
- '#' characters.
- * config/irix4.mh, config/i386v.mh: New files; set HOSTING_CRT0
- and HOSTING_LIBS correctly so that ``make check'' will work.
-
-Thu May 20 13:56:16 1993 Per Bothner (bothner@deneb.cygnus.com)
-
- * mips.sc-sh: Define _etext, _edata, and _end, in addition
- to etext, edata, and end. Needed for IRIX 4.0.5F.
- Patch from mwp@iconix.oz.au (Michael Paddon).
-
- * Version 2.2.1 released.
-
-Thu May 20 11:42:06 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * mipsbsd.sc-sh: Renamed from aout-mipsbsd.sc-sh.
- * mipsbsd.sh (EMULATION_NAME): Use new file name.
-
-Tue May 18 17:10:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * Makefile.in (LDDISTSTUFF): Remove ld.mm since we can't build it
- properly right now.
-
- * Version 2.2 released.
-
-Mon May 17 15:37:28 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * ldver.c (ldversion): Bump version number to 2.2.
-
-Mon May 17 12:44:31 1993 Per Bothner (bothner@cygnus.com)
-
- * NEWS: New file.
-
-Fri May 14 11:26:24 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.sc-sh: Don't define BSS_VAR unless relocating.
-
-Wed May 12 13:33:29 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (mkscript.o, mkscript): Build mkscript via
- mkscript.o, rather than directly from mkscript.c.
-
-Tue May 4 21:58:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * configure.in: Look for ${target_makefile_frag} relative to
- ${srcdir}, not relative to build directory.
-
- * hppaosf.em, hppaosf.sc-sh, hppaosf.sh: New files.
- * configure.in: Recognize hppa*-hp-osf.
- * Makefile.in (ALL_EMULATIONS): Include hppaosf emulation.
- (em_hppaosf.c): Build it.
- * config/hppaosf.mh, hppaosf.mt: New files.
-
- * ld.h (ALIGN_N): Renamed from ALIGN, because that conflicted with
- some system header files. All uses changed.
-
- * configure.in: Recognize i386-aix configurations as i386-coff
- targets.
-
- * configure.in: Recognize m68*-*-hpux.
- * aout.sc-sh: If STACKZERO and RELOCATING are both defined, output
- the value of STACKZERO.
- * Makefile.in (ALL_EMULATIONS): Include hp300-hpux emulation.
- (em_hp3hpux.c): Build it.
- * hp3hpux.sh, config/hp300hpux.mt: New files.
-
-Tue May 4 12:37:35 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.sc-sh: Put constructors in the .data section.
- * Makefile.in (cdtest): Added dependency on ld.new.
-
-Mon May 3 19:43:39 1993 Per Bothner (bothner@cygnus.com)
-
- * Makefile.in: Change definition of $(tooldir) to match FSF.
- * vax.sh, config/vax.mt, configure.in, Makefile.in:
- Support VAX Ultrix and BSD.
-
-Mon Apr 26 18:35:47 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * sh.em, sh.sh, sh.sc-sh: New files supporting Hitachi SH.
-
-Wed Apr 14 21:01:51 1993 John Gilmore (gnu@cygnus.com)
-
- * ldlang.h (struct memory_region): Change `length' and
- `old_length' fields to bfd_size_type. Eliminate use of bfd_offset.
- * ldlang.c, mri.c: Corresponding changes, plus lint.
-
-Thu Apr 8 22:08:18 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: For all i386 targets, accept i486 as well.
-
-Mon Apr 5 17:33:39 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (wild_doit): Preserve all flags for a
- SEC_SHARED_LIBRARY section.
- (size_input_section): Consider any SEC_HAS_CONTENTS section when
- computing largest_section.
-
-Fri Apr 2 14:33:52 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_output_section_statement_lookup): Initialize all
- fields of newly created structure.
-
-Wed Mar 31 18:19:15 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c (g_switch_value): New variable.
- * ldgram.y (OPTION_G, OPTION_Gval): New tokens.
- (command_line_option): Accept -G and set g_switch_value.
- * ldlex.l (COMMAND): Accept -G.
- * ldlang.c (open_output): Call bfd_set_gp_size on new BFD.
-
-Tue Mar 30 09:40:25 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- Support for linking and loading at different places:
-
- * ldlex.l: Add "AT" keyword.
- * ldgram.y: Cleanup, and parse AT.
- * ldlang.c (print_output_section_statement): Print output address
- of section in map. (lang_size_sections): Fill sections' lma with
- load address.
- * ldlang.h (lang_output_section_statement_type): Add load_base
- information.
-
- * ldindr.c (add_indirect): Keep more information in the alias
- symbol chain.
- * ldlang.c (wild_doit): Don't inherit NEVER_LOAD section
- attribute from an input section.
- * ldmain.c (Q_enter_file_symbols): Common section is NEVER_LOAD by
- default. (Q_enter_file_symbos): Indirect symbols now are known by
- their section, not a special symbol flag.
- * ldsym.c (write_file_locals): Indirect symbols aren't local.
- (write_file_globals): Write the mapping for an indirect symbol.
- * relax.c (build_it): When forced to write a NEVER_LOAD section,
- fill it with zeros.
-
-Tue Mar 23 13:24:10 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
-
- * ld.texinfo: changes for q1
-
-Tue Mar 23 00:13:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: add dvi target, define & use TEXI2DVI, add installcheck
-
-Mon Mar 8 20:30:35 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: rename HOST_CC to CC_FOR_BUILD
-
-Thu Mar 4 12:44:33 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.sc-sh: Added variables which may be overridden by a
- specific emulation.
- * mipsidt.sh: New file; emulation for IDT MIPS board.
- * Makefile.in (ALL_EMULATIONS): Added em_mipsidt.o.
- (em_mipsidt.c): New target. Uses mipsidt.sh and mips.sc-sh.
- * config/mips-idt.mt: New file; sets EMUL to mipsidt.
- * configure.in (mips-idt-ecoff): New target; uses mips-idt.
-
-Sat Feb 27 00:00:14 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * aout-mipsbsd.sc-sh, mipsbsd.sh: New files from Ralph Campbell,
- ralphc@pyramid.com.
- * i386bsd.sh, config/i386bsd.mt: New files.
- * configure.in, Makefile.in: Added support for mipsbsd and 386bsd.
-
-Thu Feb 25 15:33:10 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * mri.c: Add extern declaration of strdup.
- * ldsym.c (KEEP macro): Add spaces around '=' for the
- sake of old (e.g. PCC) compilers.
-
-Wed Feb 24 19:49:31 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldver.c: Bump to version 2.1.
-
-Fri Feb 12 08:09:11 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldgram.y: allow section types without address expressions.
- * ldlang.c (lang_relocate_globals): avoid possible hang with
- undefined but unreferenced symbols.
- * relax.c (relax_section): don't complain if the script file isn't
- relaxable but -relax is set
-
-Thu Feb 18 17:58:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: go32 is the 3rd part of the triple, not the 2nd
-
-Wed Feb 3 09:05:56 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mipsbig.sh: New file. Big endian MIPS emulation.
- * config/mips-big.mt: New file. Use mipsbig emulation.
- * configure.in (mips-sgi-irix*): Use target mips-big.
- * Makefile.in (ALL_EMULATIONS): Added em_mipsbig.o.
- (em_mipsbig.c): New target. Uses mipsbig.sh.
-
-Tue Feb 2 11:32:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.sc-sh: Put .scommon sections into .sbss section.
-
- * ldmain.c (subfile_wanted_p): Preserve section of common symbols,
- rather than always putting them in bfd_com_section.
- * ldlang.c (lang_common): If a common symbol is not in
- bfd_com_section, put in a section of the same name, rather than
- always putting it in section COMMON.
-
-Fri Jan 29 09:57:58 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c (subfile_wanted_p): If we already have a common
- definition of a symbol, don't necessarily pull in an object file
- that provides a non-common definition.
-
- * ldlex.l (COMMAND): Accept -EB and -EL command line arguments,
- returning OPTION_EB and OPTION_EL. gcc passes these to a MIPS
- linker.
- * ldgram.y (OPTION_EB, OPTION_EL): New tokens.
- (command_line_option): Accept and ignore OPTION_EB and OPTION_EL.
-
-Thu Jan 28 15:12:04 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): Remove $(tooldir)/bin/gld before creating
- the link to it.
-
-Tue Jan 26 11:49:50 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ldmain.c, ldsym.c: Use new bfd_is_com_section macro rather than
- checking for equality to bfd_com_section.
-
-Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF
- targets, linker script.
- * mipslit.sh: New file. Little endian MIPS emulation.
- * config/mips-lit.mt: New file. Use mipslit emulation.
- * configure.in (mips-dec-ultrix*): Use target mips-lit.
- * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o.
- (em_mipslit.c): New target. Uses mipslit.sh.
-
-Thu Jan 14 15:30:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): Install ld as both $(tooldir)/bin/ld and
- $(tooldir)/bin/gld, so that gcc can find it with or without
- collect2.
-
-Mon Jan 11 18:50:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ldwrite.c: Removed perform_relocation, copy_and_relocate, and
- write_norel. All linking is now done via write_relax. Call
- ldsym_write before calling write_relax.
- * relax.c: Added copyright.
- (write_relax): Renamed from write_relaxnorel. Added relocateable
- argument. seclet_dump renamed to bfd_seclet_link.
- * relax.h: Added copyright.
-
-Mon Jan 11 15:41:56 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c (decode_library_subfile): Patch from
- hoogen@shafer.cs.utah.edu, don't reread library symbol tables.
-
-Fri Jan 8 18:04:33 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * config/vxworks960.mt renamed to config/i960.mt
-
- * configure.in: sparc-aout emulates a sun4, as does
- sparc*-vxworks, i960-nindy uses gld960 emulation
-
-Fri Jan 8 14:39:07 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- Fix support for NOLOAD, add INCLUDE
- * ldfile.c (ldfile_open_command_file): pass file name to
- lex_push_file.
- * ldlex.l, ldgram.y: tidy up, parse INCLUDE and NOLOAD
- * ldlang.c (wild_doit): make output sections inherit NEVER_LOAD
- attribute.
-
-Thu Jan 7 10:22:19 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in, config.h: no more default emulation. Make the lack
- of emulation a compile time error
-
-Wed Jan 6 01:08:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: recognise all sparclite variants, not just 'sparclite'
-
-Mon Dec 28 11:15:35 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * m68kcoff.sc-sh: define _end as well as end, for consistency with
- aout.sc-sh.
-
- * configure.in: accept *-ericsson-ose for any m68k CPU.
-
- * ldwrite.c (write_rel): don't always set SEC_HAS_CONTENTS flag
- for each output section.
-
-Mon Dec 21 16:06:59 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldexp.c, ldlang.c, ldmain.c, ldsym.c, ldwarn.c: Use new
- macro bfd_asymbol_bfd as appropriate.
- * Makefile.in: Un-duplicate ldlex.c dependency.
- * condigure.in: Replace my_host case table by sourcing
- ../bfd/configure.host. Allow std-host as the default.
- * ldmisc.c: Change logic for C++ name demangling: There is
- no initial '_' to remove from stab-derived function names.
-
-Sun Dec 13 16:31:26 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.c (lang_init_script_file): don't attach the output file
- sections to the script file.
-
-Wed Dec 9 08:38:05 1992 Steve Chamberlain (sac@thepub.cygnus.com)
- * ldlang.c (wild): run expansion loop over command line bfd too.
- (lang_ini_script_file): initialize more parts of the command line
- bfd.
- * ldlex.l: fix DEFINED start states.
-
-Mon Dec 7 08:43:41 1992 Steve Chamberlain (sac@thepub.cygnus.com)
- -y support
- * ld.texinfo: new doc.
- * ldgram.y, ldlex.l: understand -y<symbol>
- * ldmain.c (Q_enter_file_symbols): if had -y, lookup symbol and
- print info. (add_ysym): new function.
- * ldsym.h: (ldsym_type): new define SYM_Y.
-
-Sat Nov 21 03:15:27 1992 John Gilmore (gnu@cygnus.com)
-
- * ldctor.h, lderror.h, ldexp.h, ldfile.h, ldindr.h, ldlang.c,
- ldlang.h, ldlex.h, ldmain.h, ldmisc.h, ldsym.h, ldver.h, ldwarn.h,
- ldwrite.h, relax.h: Replace all uses of EXFUN and PROTO ansi-glue
- macros with PARAMS. Recreational cleanup. Update copyrights.
-
-Tue Nov 10 00:23:37 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: pass down the bfd source directory for includes
-
-Thu Nov 5 15:41:55 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_size_sections): don't change size and address for
- SEC_SHARED_LIBRARY sections rather than for SEC_NEVER_LOAD
- sections.
-
-Thu Nov 5 11:33:57 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * relax.c (build_it): re-enable the processing of data_statements
- in scripts, makes counted contructor lists work again.
-
-Thu Nov 5 05:43:01 1992 John Gilmore (gnu@cygnus.com)
-
- * ldemul.h: Remove uses of SDEF and PROTO macros (use PARAMS).
-
-Tue Oct 20 10:56:06 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * m68kcoff.sc-sh: don't use initial underscores for etext, edata
- and end.
-
-Mon Oct 19 09:45:38 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Support for i386-sysv.
- configure.in: check for i386-*-sysv* and i386-*-sco*.
- i386coff.sc-sh: rewrote to support SVR3 by default.
- ldctor.c (find_constructors): preserve stat_ptr.
- ldlang.c (wild_doit): initialize vma and size of new output
- section to corresponding input section. This is required for
- shared library support.
- (lang_size_sections): don't modify vma and size of sections which
- are never loaded (for shared libraries).
- ldwrite.c (copy_and_relocate): copy the contents of any section
- which has contents, not just sections which are loaded (for shared
- libraries).
-
-Thu Oct 15 15:20:26 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.c (size_input_section): count the sizes of all sections
- we allocate.
-
-Thu Oct 8 09:05:25 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmisc.c (demangle,vfinfo): use the new underscore in bfd to
- to demangle symbols better
-
-Tue Oct 6 13:08:54 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * ldlang.c (lang_finish): don't warn if -e start symbol does not
- exist when linking with -r.
-
-Mon Oct 5 14:07:37 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * aout.sc-sh, m68kcoff.sc-sh: set __bss_start to the start of the
- .bss segment.
-
-Mon Oct 5 08:55:14 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c (linear_library): don't even think about processing
- an object file if it's already been done
-
-Thu Oct 1 23:14:59 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: the hp9000/300 config file is now hp300
-
-Wed Sep 30 07:34:09 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * config/z8ksim.mt: new file
-
-Fri Sep 25 13:49:52 1992 Ken Raeburn (raeburn@kyriath.cygnus.com)
-
- * Makefile.in (ldexp.o, ldctor.o, ldlang.o, ldmain.o, ldwrite.o,
- lexsup.o, mri.o, relax.o): Indicate dependence on ldgram.h.
-
- * ld.h (strip_symbols_type): Add value STRIP_SOME.
- * ldgram.y (OPTION_RETAIN_SYMBOLS_FILE): New terminal token.
- * ldlang.c (lang_add_keepsyms_file): New function.
- * ldlex.l: Handle "-retain-symbols-file".
- * ldsym.c (keepsyms_file, kept_syms): New vars.
- (process_keepsyms): New functihon; reads file, marks symbols for
- saving.
- (write_file_locals): File symbols should always be kept.
- (ldsym_write): Warn about "-retain-symbols-file" overriding "-S"
- and "-s". Process retain-symbols file before setting symtab.
- * ldsym.h (SYM_KEEP): New flag for ldsym_type flags.
- (keepsyms_file, kept_syms): Declare them.
-
- * ldmain.c (main): Non-fatal errors should still cause non-zero
- exit status even with -r.
-
-Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- Added initial support for the z8k
- * z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files
- * configure.in, Makefile.in: modified to reflect above
-
- * ldlang.c (lang_check): when linking conflicting architectures,
- make the output file reflect at least one of the bad inputs.
-
-Tue Sep 15 15:35:38 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): if $(tooldir) exists, install ld in
- $(tooldir)/bin.
-
-Fri Sep 11 10:24:22 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * Makefile.in, configure.in: modified to support i386-coff
- * i386coff.sh: new file
-
-Wed Sep 9 11:52:58 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in, m68kcoff.sh, m68kcoff.sc-sh, config/m68k-coff.mt:
- added m68k-coff emulation mode, stolen from a29k emulation.
- Almost certainly wrong, but perhaps better than sun3.
-
-Thu Sep 3 14:19:30 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in, Makefile.dos, generic.em, genscripts.sh,
- gld960.em, h8300hms.em, h8300xray.em, lnk960.em, st2000.em,
- vanilla.em: Rename all (generated) ld__*.c files to em_.c.
- This is one character shorter, and lets people build on
- SVR3 system. (ld__h8300xray.[co] was the killer there;
- h8300xray.sc-sh is also overlong, but seems harmless.)
- Based on a patch from Jonathan Ryshpan <hitachi!amito!jon>.
- * Makefile.in (clean): Fix typo mostclean -> mostlyclean.
- * configure.in: Add host isc.
-
- * ldver.c: Call it version 2.0.
-
-Wed Sep 2 00:21:33 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldver.c: Bump to version 0.98.
- * TODO: New file.
-
- * Makefile.in: Added mostlyclean, distclean, realclean rules.
-
-Tue Sep 1 23:42:16 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldmisc.c (xrealloc): New (needed by ../libiberty/cplus.dem.c).
- * ldlex.l: Moved comment() to end, since some compilers
- otherwise have problems with input() used before it is defined.
-
-Tue Sep 1 17:45:51 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: added Solaris 2 and Irix 4 host support.
-
-Mon Aug 31 19:27:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: remove -S flag from the FLEX definition
-
- * configure.in: rewrote, using new style case statement. use
- m68k.mt for m68k-aout systems
-
-Sun Aug 30 21:38:53 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: map "ld" through program_transform_name when
- installing.
-
-Sun Aug 30 18:12:13 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * cplus-dem.c: Removed. Use the version in libiberty now.
- * ldmisc.c: Use new libiberty version of cplus_demangle().
-
-Thu Aug 27 16:38:42 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * gld960.em (gld960_choose_target): default to little endian, not
- big endian.
-
-Wed Aug 26 17:28:51 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.c (lang_process): don't pass null pointers when
- abs_output_section is what is required.
- * ldwrite.c (ldwrite): use malloc to allocate the largest space
- used, and pass that down.
- * relax.c,relax.h (write_relaxnorel): use the passed malloc area rather
- than alloca.
-
-Mon Aug 24 14:42:06 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in, config/ose68.mt: renamed OSE to ose.
-
-Thu Aug 20 19:55:22 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * ldsym.c (write_file_locals): Reorder check for common or
- undefined symbols so that it works.
-
-Tue Aug 18 13:41:36 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: accept all m68K family members.
-
- * Makefile.in: always create installation directories.
-
-Thu Aug 13 11:49:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlex.l: now parses comment correctly, added ~ to acceptable
- chars in filenames
-
- * ldexp.c (exp_unop): pass down abs_output_section - now can have
- unary -ve constants.
-
- * ldlang.c (lang_finish): warn when an entry symbol supplied on
- the command line can't be found.
-
-Fri Aug 7 12:31:10 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.h: add new field "loadable" to output_section_statement.
- * ldlang.c (lang_output_section_statement_lookup): initilize new
- field. (wild_doit): if new field is not set, then stop output
- section from being loadable.
- (lang_enter_output_section_statement): set the field from the
- NOLOAD keyword
- * ldgram.y: new synax for NOLOAD. Removes a shift/reduce too.
- * h8300hms.sc-sh, h8300hms.em: get -r right.
-
-Thu Aug 6 18:35:21 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldint.texinfo: New internals manual (beginnings thereof).
- * PORTING: Removed, merged into ldint.texinfo.
-
-Tue Aug 4 21:12:29 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * cdtest-main.cc, cdtest-func.cc, cdtest-foo.h, cdtest-foo.cc,
- cdtest.exp: A test program (copied from libg++/test-install)
- that tests that constructor and destructors are handled
- corrrectly.
-
-Mon Aug 3 14:58:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in (install): install from ld.new, renaming during the
- copy, or else the next 'make install' needs to re-link ld.
-
-Mon Jul 20 03:37:06 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
-
- * configure.in: generalise hp recognition (from sef).
-
-Sat Jul 18 14:46:04 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: recognize bsd and hpux hppa configurations.
- error messages echo to stderr, not stdout
-
-Fri Jul 17 22:06:11 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.dos, gld.1, ld.texinfo, ldemul.c, ldfile.c, ldlang.c,
- ldmisc.c: removed rcsid's.
-
-Tue Jul 14 08:34:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlang.c (lang_map): print changes in sizes due to relaxing
- (size_input_section): maintain the delta information.
- * ldlang.h: add new field to struct to contain delta info.
- * relax.c (relax_section): complain if input not relaxable.
- * ldlex.l : add '_', ',' and '$' to chars which can appear at the
- start of a filename
-
-Mon Jul 13 17:33:00 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c(main): prevent -r and -relax from being on at the same
- time.
-
-Wed Jul 1 17:51:19 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c (Q_enter_global_ref), ldindr.c (add_indirect): fix for
- aliasing problems
-
-
-Thu Jun 18 09:38:56 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * h8300hms.em, h8300hms.sc-sh: do the right thing for -r
- * ldexp.c: lint
- * ldlang.c(open_output): set the target arch and machine as soon
- as we can. (lang_size_sections): use new macros for setting vma
- * ldwrite.c: lint
-
-Mon Jun 15 08:47:43 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
-
- * configure.in (my_target): Accept m680?0 for wrs as vxworks68.
- Also deleted an unreachable path to wrs.
-
-Wed May 27 23:24:19 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
-
- * Makefile.in (install): use -d test for $tooldir before
- installing ld there so that $tooldir can be inherited from
- top-level Makefile.
-
-Wed May 27 16:56:48 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldlang.c: Two non-substantial changes for the sake of
- the old Portable C Compiler.
-
-Wed May 27 15:15:58 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldgram.y, ldlex.l: parse ABSOLUTE
- * ldexp.c: add support for ABSOLUTE
-
-Wed May 27 13:07:20 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Added default definitions for HOSTING_CRT0,
- HOSTING_LIBS, and HOSTING_EMU, based on those in config/*.mh.
- * config/*.mh: Miscellaneous clean-up: Removed definitions
- of YACC (since it is not longer used in the Makefile).
- Remove HOSTING_* definitions that are subsumed by the
- ones added to Makefile.in. Removed most definitions of CC.
- * config/{sparc,news,hp300bsd,decstation}.mh: Removed;
- These are no longer needed.
-
-Fri May 22 13:47:19 1992 Per Bothner (bothner@cygnus.com)
-
- * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex
- rules, since these are used when building a distribution.
- * Makefile.in (ldlex.c): Don't re-direct output, since that
- leaves a bogus output files if it fails.
-
- * config/sparc.mh: Fix HOSTING_LIBS so it has a chance of working.
- * ldlex.c: Fix some unnecessary flex-specific-isms.
-
-Fri May 8 11:49:43 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldgram.y: move spurious semicolon
- * ldexp.h: fix prototype
-
-Thu May 7 17:01:12 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * ld.texinfo: references to linker now say "ld" not "gld".
-
-Wed May 6 13:26:19 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- changed calling convention for Q_enter_global_ref
- * ldexp.c, ldlang.c, ldmain.c: reflect this
- * ldver.c: bump version to 1.97.1
- * ldindr.c (add_indirect): when an edict declaring an indirect
- symbol is found, make sure that any ideas about the symbol being
- common are changed if it now known to be defined.
- * ldmain.c (linear_library): complain once if archive isn't
- ranlibbed.
- * ldlang.h, ldlang.c: make room for and initialize the complain
- once field.
-
-Wed May 6 11:07:35 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: use flex & bison from ../ if they exist.
-
-Tue May 5 17:47:33 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * relax.c (build_it): don't allocate space in the output file for
- stuff if -R flag applys to it.
- * ldfile.c: merge in VMS filename support
- * ldmain.c (main): take out ./ from library path, and close file
- before unlinking. Make multiple defs of a symbol create an
- unexecable file.
- * ldmisc.c: fatal errosrs delete output file
-
-Tue May 5 14:05:05 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * ldver.c: Increase version number to 1.97, for consistency
- with ../binutils.
-
-Tue May 5 12:12:24 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: FLEX -> LEX.
-
- * ld.texinfo: {} -> @{@}.
-
-Mon May 4 17:52:41 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * ld.texinfo: describe alternate, MRI-compatible linker scripts
- (and associated change in -c option, now used for these scripts)
-
-Mon May 4 16:10:10 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldver.c: Bumped version to 1.96 - new release, resync with the
- bfd too #.
- * ldexp.c, ldlang.c: now build memory shape tree in obstacks
- rather than with raw malloc, makes it easier to track where memory
- is going.
- * ldsym.h, ldsym.c: create obstack for all global symbols too.
- * ldwrite.c (ldwrite): moved malloc so only used when needed.
- * sa29200-sc.sh: added support for .lit, data1 and data2 sections.
-
-
-Fri May 1 18:17:52 1992 K. Richard Pixley (rich@cygnus.com)
-
- * config/sparc.mh: use ../gcc/libgcc.a on check if it exists.
-
- * Makefile.in: use bootstrap for check.
-
-Fri May 1 13:03:41 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldgram.y, ldlex.c, mri.c: added more compatible words; BASE, ALIAS and
- PUBLIC.
- * Makefile.in: now use flex, not lex
- * ldlex.l, ldlang.c, ldctor.c: lint
-
-Wed Apr 22 12:48:42 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlex.l: added CMDFILENAMECHAR state so that you can lex
- different sorts of filenames on the command line than in a script.
-
-Mon Apr 20 22:37:04 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: rework CFLAGS so that they can be passed on the
- make command line. Remove MINUS_G. Default CFLAGS to -g.
-
-Fri Apr 17 08:57:17 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * relax.c: added handling for new "padding" seclet type, used to
- fill out gaps between section.
- * ldgram.y, ldlex.l: now -defsym on the command line is done
- properly.
-
-Wed Apr 15 21:20:07 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: the tooldir copy of ld goes directly in tooldir.
-
-Wed Apr 15 16:09:33 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * mri.c, ldgram.y, ldlex.l: added support for minimal strange link
- scripts.
-
-Thu Apr 9 05:52:02 1992 Ken Raeburn (Raeburn@Cygnus.COM)
-
- * Makefile.in (install): Install second copy in $(tooldir)/bin
- without $(program_prefix), since that's what gcc expects.
-
-Sat Apr 4 17:44:06 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldlex.l, ldgram.y, ldlex.h: Rewrote lexer. Now it's much nicer.
- * h8300*: fix bit rot and add support for h8300xray target
- * go32.sh: target emulation for go32.
-
-Mon Mar 16 14:53:29 1992 Steve Chamberlain (sac@rtl.cygnus.com)
-
- * gld960.em, i960.sc-sh. Fix i960 bit rot
-
-Fri Mar 13 19:47:22 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: install man page.
-
-Fri Mar 13 08:23:59 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * config/mt-<foo> renamed to <foo>.mt
- * config/mh-<foo> renamed to <foo>.mt
- * configure.in changed to reflect this
- * genscripts.sh now make .xbn files rather than .xN files
-
-Sat Mar 7 03:40:40 1992 K. Richard Pixley (rich@cygnus.com)
-
- * ldver.h: fix decl of ldversion.
-
-Fri Mar 6 22:00:35 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: added check target.
-
-Fri Mar 6 06:59:04 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldmain.c (Q_enter_file_symbols): now aliases work again
-
-Thu Mar 5 21:39:29 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: added clean-info target.
-
-Thu Mar 5 16:55:56 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * ldexp.c (exp_print_tree): don't try and follow null pointers
- around.
- * ldgram.y: remove 11 shift reduce errors
-
-Tue Mar 3 15:46:39 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * Makefile.in: added tooldir and program_prefix.
-
-Fri Feb 28 08:17:45 1992 Steve Chamberlain (sac at thepub.cygnus.com)
-
- * ldlang.c (size_input_section): don't move absolute sections
- around!
-
-
-Thu Feb 27 09:20:41 1992 Steve Chamberlain (sac at thepub.cygnus.com)
-
- * cplus-dem.c: yet another copy of this - maybe it should go into
- libiberty ?
- * ldgram.y: now -V and -v have different actions
- * ldver.c: if -V, prints list of emulations compiled in
- * ldmisc.c: support for cplus demangling
-
-
-Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in, configure.in: removed traces of namesubdir,
- -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
- copyrights to '92, changed some from Cygnus to FSF.
-
-Thu Feb 20 17:43:46 1992 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Change mkscript rule into one for ./mkscript
- (for the sake of makes that don't realize they're the same).
- * PORTING: Add more details.
- * genscripts.sh: Add more tailorability of DATA_ALIGNMENT.
-
-Mon Feb 17 12:04:36 1992 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in, and new files hp300bsd.sh, config/mh-hp300bsd,
- config/mt-hp300bsd: New port to hp300 running BSD.
-
-Sat Feb 15 13:59:54 1992 Per Bothner (bothner at cygnus.com)
-
- Major rewrite of how ld is configured. The major idea
- is to use shell scripts to generate everything.
- * generic.em replaces ldtemplate.
- * Other *.em files replace various *.c files.
- A *.em file is a shell script that generates the corresponding
- ld__*.c file that implements an emulation. This is usually
- a straight 'cat' of a here-document, possibly with substitutions.
- * Script files (*.sc) are places by *.sc-sh scripts.
- Again, these are simple shell scripts that 'cat'
- here-documents, usually with some substitutions.
- The output a *.sc-sh is a script file.
- * Each emulation is defined by a short shell script with
- extension *.sh that specifies the emulation-specific
- parameters (such as the name of the *.sh-sc and *.em
- files to use).
- * genscript.sh is the master shell script used to generate
- an emulation. It is passed various argument, including
- the name a the emulation-speciic *.sh file that it
- "sources" to set variables to emulation-specifc parameters.
- * config/mt-foo: Changed EMUL=GLDFOO_EMULATION_NAME
- to EMUL=foo. (The GLDFOO_EMULATION_NAMEs have bee removed.)
- * config/mh-foo: Rename LDEMULATION names as appropriate
- (usually 'gldfoo' -> plain 'foo').
- * ldwrite.c: Fixed a typo in a comment.
- * Makefile.in: Major changes. Removed some the sed
- magic to converts scripts, since that is now handled
- by genscripts.sh and the *.sc-sh scipt generators.
- * config.h: Remove a bunch of macros defining emulations
- and targets. This becomes one less file to edit when
- adding emulations or targets.
- * ldemul.h (struct ld_emulation_xfer_struct): Add
- emulation_name and target_name fields.
- * ldemul.c, ldemul.h: Define some default functions used
- by most emulations (and remove from the *.em scripts).
- * ldemul.c (ldemul_choose_target): Search the new
- ld_emulations array using a loop (instead of a hardwired
- nested if statement).
- Define the ld_emulation from the automatically-geenrated
- ldemul-list.h. This means you no longer have to edit ldemul.c
- to add a new emulation.
- * ldmain.c: Replace {GLD,LNK}960_EMULATION_NAME by
- their expansions, since the former no longer exist.
- * PORTING: A very rough first draft of a porting guide.
-
- * ldgram.y, ldlex.l, lexsup.c: Changes to allow an assignment
- to be terminated by a new-line (instead of requiring a semicolon).
-
-Mon Feb 10 16:21:02 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ldexp.c, ldlang.c: added new idea "abs_output_section", removes
- tests for NULL pointers all over the place.
- * ldlang.c (lang_process): remember to relocate global symbols
- *after* relaxing has done it stuff.
-
-Thu Feb 6 11:40:15 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * config/mt-coff-h8300: use EMUL like everything else
- * ldlang.c: (print_padding_statement): print the right address.
- * Makefile.in, config.h, ldemul.c: renamed h8300hds to h8300hms
-
-
-Tue Feb 4 15:28:01 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ldlex.l: Put pack -noinhibit-exec and -sort-common
- * ldlang.c (print_data_statement): print the right address.
-
-Thu Jan 30 17:51:53 1992 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: The rule for testing ld by re-linking itself
- via an intermediate -r link was moved to the ld1 rule
- instead of the ld2 rule. This allows ld2 and ld3 to be identical,
- which allows the bootstrap rule to work.
- * ldctor.c (find_constructors): Don't create a constructor
- list if it is already defined (as would happen if ld is
- invoked by collect).
-
-Wed Jan 29 08:35:39 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * config/mh-sparc.h: now uses libgcc.a
- * ldmain.c: quit using exit
- * *sc: use *(COMMON) rather than [COMMON]
- * ldlex.l, lexsup.c: much thinking moved from .l and put into .c,
- to allow preprocessing of .l file.
- * Makefile.in: New ldlex.l mangling
- * ldexp.c (fold_binary): perform expressions with % and / in
- integer.
- * ldfile.c (open_a): open archives on VMS in a special way
-
-
-Tue Jan 28 10:18:16 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ldgram.y: map -M behave in the same way as -Map (sets file name
- to be "-".
- * ldsym.c, ldlang.c: remember that size of a section is dependent on
- whether or not relaxing has been done.
- * ldmain.c: don't open a map file if it doesn't have a name
- * relax.c: all the brains have moved into bfd.
- * ldwrite.c: ammend comment
-
-Fri Jan 24 14:23:46 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * Makefile.in: added relax, also made three stage go through a
- partial link stage.
- * relax.c : added
- * config.h: if GNU960 defined, then default emulation mode is
- GLD960
- * ldexp.h, ldexp.c: map to file hooks
- * ldlang.c: map to file hooks
- * ldgram.y: added -Map -relax
- * ldlex.l: added -relax, -Map
- * ldmain.c: open map file
- * ldmisc.c: support for map file
- * ldwrite.c: new relax magic
-
-Thu Dec 19 18:49:51 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in, config/tm-*.h: Clean up make output, only
- pass DEFAULT_EMULATION to ldmain.c.
-
-Wed Dec 18 15:02:47 1991 Per Bothner (bothner at cygnus.com)
-
- * ldver.c: Bump to version 1.94.
-
-Tue Dec 10 04:07:23 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: infodir belongs in datadir.
-
-Mon Dec 9 16:26:43 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Pass -y to bison. (Again;
- accidentally deleted by Rich.)
- * news.sc, ldgld68k.sc: Define __end as well as _end.
-
-Sat Dec 7 17:19:26 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ldindr.h: added to contain prototypes of ldindr.c
- * ldfile.c: include ctype.h
- * ldmain.c: include the requried prototype headers
- * ldwrite.c: get_reloc_upper_bound has been renamed
- bfd_get_reloc_upper_bound
-
-Fri Dec 6 23:29:26 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: punt "fundamental" mode because it breaks my emacs
- macros. install using INSTALL_PROGRAM and INSTALL_DATA. remove
- spaces following hyphens, bsd make can't cope. added
- standards.text support and made it look like all the other
- makefiles.
-
- * configure.in: configure now runs entirely in objdir so make file
- existence checks against ${srcdir}. Mark this directory as
- target dependent.
-
-Thu Dec 5 22:46:16 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: idestdir and ddestdir go away. Added copyrights
- and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
- and mandir now keyed off datadir by default.
-
-Wed Dec 4 23:36:55 1991 Per Bothner (bothner at cygnus.com)
-
- * ldver.c: Bumped version to 1.93.
- * Makefile.in: Pass -y to bison.
-
-Mon Nov 25 18:28:40 1991 Steve Chamberlain (sac at cygnus.com)
-
- * config.h: h8 is now coff, not ieee
- * h8300hds.sc: reflect the same
-
-Thu Nov 14 19:55:09 1991 Per Bothner (bothner at cygnus.com)
-
- * ldver.c (ldversion()): Update to 1.92.
- * ldctor.c: There are two places constructor sets
- can be defined. One of them checked for an existing
- duplicate, the other didn't. Unfortunately, the latter
- was called after the former ...
- So, factor out code for inserting a new element into
- constructor_name_list (after checking for a duplicate)
- into a new function add_constructor_name, and call
- it from both aforementioned places (ldlang_add_constructor
- and ldlang_check_for_constructors).
-
-Wed Nov 13 15:17:43 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Rename .c files generated from ldtemplate
- to have names starting with ld__. This helps 'make clean'.
-
-Tue Nov 12 18:36:50 1991 Steve Chamberlain (sac at cygnus.com)
-
- * Makefile.in: Take out the version number for install
- * m88kbcs.sc: put in contructor blocks.
-
-Mon Nov 11 18:47:33 1991 Per Bothner (bothner at cygnus.com)
+ * Makefile.in: Regenerate.
- * ldmisc.c, ldmisc.h: Re-write info() to take a filename
- parameter, a format, and an arg pointer, and rename it to
- vfinfo(). Write info() in terms of new vfinfo().
- New einfo() is the same as info(), except it writes to stderr.
- * ldemul.c, ldexp.c, ldlang.c, ldlnk960.c, ldmain.c, ldwrite.c,
- ldmisc.c: Replace "error" calls to info() by new einfo().
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-Mon Nov 11 09:57:32 1991 Steve Chamberlain (steve at cygnus.com)
+ * ldlang.c (print_input_section, print_data_statement,
+ print_reloc_statement, print_padding_statement, insert_pad,
+ size_input_section, lang_check_section_addresses,
+ lang_size_sections, lang_do_assignments, lang_set_startof,
+ lang_one_common): Change `opb' to unsigned.
+ (lang_do_assignments): Also change `size' to unsigned.
- * ldlex.l ldgram.y: made -V option do same as -v
- * Makefile.in: Added $(MINUS_G) flag so debugging can be
- turned off
+2000-02-16 Richard Henderson <rth@cygnus.com>
-Sun Nov 3 16:37:37 1991 Steve Chamberlain (steve at cygnus.com)
- i386 aout changes from Bob Kukura
- * Makefile.in, config.h: added i386aout support
- * configure.in: fixed /h-{myhost} typo
- * ldgram.y: -MM now gives more boring map.
- * ldlang.c: now does D_PAGED flag the right way.
- * ldsym.c: -MM flags does the right thing.
+ * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
-Sun Nov 3 15:00:03 1991 Per Bothner (bothner at cygnus.com)
+2000-02-16 Timothy Wall <twall@cygnus.com>
- * configure.in: Fixed typo. Also, a fix for hp300bsd.
- * ldlang.c (init_os): Compensate for BFD change,
- where bfd_make_section now returns NULL for a duplicate
- section request, instead of the old section.
+ * mri.c (mri_draw_tree): Add default LMA region argument to call
+ to lang_leave_output_section_statement.
+ * ldlang.h: Update prototypes with LMA region arguments.
+ * ldlang.c (lang_size_sections): Encapsulate region bounds
+ checking in os_check_region call.
+ (os_check_region): New function.
+ (lang_output_section_statement_lookup): Initialize lma_region.
+ (lang_leave_output_section_statement): Add LMA region argument.
+ (lang_leave_overlay): Ditto.
+ * ldgram.y: Handle LMA region syntax.
+ * ld.texinfo (Output Section Description): Describe LMA region usage.
+ * emultempl/armelf.em (gld$place_orphan): Add default value for
+ lma region in call to lang_leave_output_section_statement.
+ * emultempl/elf32.em (gld$place_orphan): Add default value for
+ lma region in call to lang_leave_output_section_statement.
+ * emultempl/pe.em (gld$place_orphan): Add default value for
+ lma region in call to lang_leave_output_section_statement.
-Thu Oct 17 15:27:13 1991 Per Bothner (bothner at cygnus.com)
- * ldver.c: Bump to version 1.91 (consistent with binutils).
+2000-02-04 Timothy Wall <twall@redhat.com>
-Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com)
+ * ldlang.c (lang_check_section_addresses): Use bytes instead of
+ octets when calculating section end addresses.
- * Makefile.in, config.h, ld.h, ldemul.c, ldexp.c, ldexp.h,
- ldgram.y, ldlex.l, ldlnk960.c, ldmain.c, ldmisc.c, ldmisc.h,
- ldsym.c, ldsym.h, ldtemplate, ldvanilla.c, ldver.c, ldver.h,
- ldwarn.c, ldwarn.h, ldwrite.c, ldwrite.h, mkscript.c:
- Add or update copyright notices.
+2000-02-04 Timothy Wall <twall@redhat.com>
-Mon Oct 14 23:55:27 1991 Per Bothner (bothner at cygnus.com)
+ * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
- * README: New file.
- * Makefile.in: Changed installation directory name scheme
- to be consistent with gcc. Also changed 'install'.
+2000-02-03 Timothy Wall <twall@redhat.com>
-Mon Oct 14 17:30:02 1991 Roland H. Pesch (pesch at cygnus.com)
+ * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
+ octet count.
+ * ldlang.c (print_input_section, print_data_statement,
+ print_reloc_statement, print_padding_statement): Print target
+ address values and section sizes as bytes, not octets.
+ (insert_pad) Calculate padding size in octets, and adjust "dot"
+ by bytes.
+ (size_input_section) Always adjust "dot" by bytes, not octets.
+ (lang_check_section_addresses, lang_do_assignments) Adjust
+ "dot" by bytes, not octets. Use the larger of the directive size
+ or octets_per_byte for the number of octets actually allocated in
+ the output section.
+ (lang_set_startof) Make sure STARTOF returns a target address.
+ (lang_one_common) Record size changes in octets.
+ (lang_abs_symbol_at_end_of) Section end symbol's value is
+ recorded in target bytes.
+ * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
+ to be clear about behavior when an octet is smaller than one byte.
- * Makefile.in: new targets ld.mm, ld.me
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-Mon Oct 14 17:27:24 1991 Per Bothner (bothner at cygnus.com)
+ * ldcref.c (output_cref): Don't pass message strings to printf
+ as format arg.
+ Update copyright.
- * Makefile.in, ldtemplate: Need to use separate scripts
- for -n and -N options. Yet more complication.
+ * ldmisc.c (vfinfo): Same here.
+ Update copyright.
-Fri Oct 11 22:40:46 1991 John Gilmore (gnu at cygnus.com)
+2000-01-23 Alan Modra <alan@spri.levels.unisa.edu.au>
- * Makefile.in: Avoid using $< in explicit Make rules (it doesn't
- work). Add some lines to avoid Sun Make VPATH bugs.
+ * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
+ generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
+ mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
+ Add missing NULL initialisers, and comments.
-Fri Oct 11 16:42:22 1991 Per Bothner (bothner at cygnus.com)
+ * testsuite/ld-srec/sr3.cc (__rethrow): New.
- * news.sc: Add alignment for data segment.
- * ldtemplate: Add (yet another) script to get for -n or -N
- options. (These need different alignment than ZMAGIC files.)
- * Makefile.in: Add stuff for new foo.xn scripts.
- These are generated by replacing "ALIGN(0x...00)" by ".".
+2000-01-21 Nick Clifton <nickc@cygnus.com>
-Fri Oct 11 15:43:04 1991 Roland H. Pesch (pesch at cygnus.com)
+ * ldlang.c (lang_size_sections): Fix typo in comment.
- * Makefile.in: new targets ld.ms, ld-index.ms
- ld.texinfo: remove tabs, other cleanups for texi2roff
+2000-01-18 H.J. Lu <hjl@gnu.org>
-Fri Oct 11 13:51:54 1991 Per Bothner (bothner at cygnus.com)
+ * ldlang.c (lang_size_sections): Also update the current
+ address of a region if the SEC_NEVER_LOAD bit is not set.
- * ldmain.c (main): Make config.magic_demand_paged be true
- by default. Don't the WP_TEXT and D_PAGED flags of
- output_bfd here; it's too late, so set it when output_bfd
- is created (in ldlang.c). Also fix setting of EXEC_P flag
- * ldlang.c (ldlang_open_output): Set output_bfd->flags here.
- * ldlang.c: Remove some duplicate extern declarations.
- * ldgram.y: Fixes to -N and -n options.
- * Makefile.in: Recognize upper case letters in sed script
- to remove assignments from script files.
- * ldtemplate: Don't assukme that -N or -n options
- imply use of -r script.
- * mkscript.c: Tweaking to correctly handle \n and \\ in input.
+2000-01-10 Philip Blundell <pb@futuretv.com>
-Fri Oct 11 10:29:27 1991 Steve Chamberlain (steve at cygnus.com)
+ * configure.tgt (arm*-*-conix*): New target.
- * ldtemplate: include bfd.h before sysdep.h.
+2000-01-07 Nick Clifton <nickc@cygnus.com>
-Fri Oct 11 04:24:45 1991 John Gilmore (gnu at cygnus.com)
+ * ld.texinfo (Options): Remind users to preceed linker command
+ line switches with -Wl, (or whatever is appropriate) if it is
+ being invoked by a comnpiler driver program.
+ Fix description of the behaviour of the -n command line switch.
- Restructure configuration scheme for bfd, binutils, ld.
+Wed Jan 5 08:02:12 2000 Catherine Moore <clm@cygnus.com>
- * include/sys/h-*.h: Move to bfd/hosts/h-*.h.
- * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h.
- Change some config names to match other dirs.
- * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO()
- get defined first.
- * config/: Rename some config files to match up h-*.h names.
- Remove all the HOST_SYS definitions from the config files.
+ * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
+ (name_list): New.
+ * ld.texinfo (EXCLUDE_FILE): Update documentation.
+ * ldgram.y (wildcard_spec): Support a list of excluded_files.
+ (exclude_name_list): New.
+ ldlang.c (walk_wild_section): Support list of excluded files.
+ (print_wild_statement): Likewise.
+ (lang_add_wild): Likewise.
+ * ldlang.h (lang_wild_statement_type): Likewise.
+ * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
-Tue Oct 8 16:00:57 1991 Per Bothner (bothner at cygnus.com)
+2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
- * ldexp.h, ldlang.h: Change enum boolean -> enum bfd_boolean.
- * ldtemplate: Remove ldfile_add_library_path calls;
- just use the SEARCH_DIR commands in the script files.
- * Makefile.in: Add LIB_PATH macro, which if set is used to replace
- the SEARCH_DIR commands in the scripts (using ugly sed magic).
- This is primarily intended for cross-linking, where you would
- place libaries in a different place than native libraries.
- Also, emulations made from ldtemplate now use $(srcdir).
- * ldglda29k.sc: Change SEARCH_DIR commands to a conventional
- form; people can use the Makefile's LIB_PATH to override.
+ * pe-dll.c (pe_dll_warn_dup_exports): New variable.
+ (process_def_file): Use.
+ (pe_dll_compat_implib): New variable.
+ (make_one): Use.
-Tue Oct 8 14:51:21 1991 Roland H. Pesch (pesch at cygnus.com)
+ * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
+ pe_dll_compat_implib.
- * Makefile.in: fix target ld.dvi, add target ld.info
- ld.texinfo: make info filename ld.info
+ * emultempl/pe.em (longopts): Add warn-duplicate-exports and
+ compat-implib options.
+ (gld_${EMULATION_NAME}_list_options): List new options.
+ (gld_${EMULATION_NAME}_parse_args): Handle.
-Fri Oct 4 21:51:58 1991 John Gilmore (gnu at cygnus.com)
+ * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
+ dll.
- * Makefile.in: Avoid using $< in non-suffix rules (breaks on Sun
- Make).
- * ldfile.c, ldlang.c, ldmain.c, ldwrite.c: Cope with renames of a
- few BFD types & enums.
+ * deffilep.y (opt_name): Allow "." in name.
+For older changes see ChangeLog-9899
Local Variables:
mode: change-log
diff --git a/gnu/usr.bin/binutils/ld/Makefile.in b/gnu/usr.bin/binutils/ld/Makefile.in
index c6d8eb0fea8..a6ad27905f0 100644
--- a/gnu/usr.bin/binutils/ld/Makefile.in
+++ b/gnu/usr.bin/binutils/ld/Makefile.in
@@ -68,11 +68,14 @@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
+CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EMULATION_LIBPATH = @EMULATION_LIBPATH@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
@@ -90,11 +93,13 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
STRINGIFY = @STRINGIFY@
+STRIP = @STRIP@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
@@ -112,6 +117,9 @@ YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bis
YFLAGS = -d
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
+WARN_CFLAGS = @WARN_CFLAGS@
+AM_CFLAGS = $(WARN_CFLAGS)
+
# 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.
@@ -205,50 +213,58 @@ ALL_EMULATIONS = \
ealpha.o \
ealphabsd.o \
earcelf.o \
- earmelf.o \
- earmelf_oabi.o \
- earmelf_linux.o \
- earmelf_linux26.o \
+ earm_epoc_pe.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
+ earmelf.o \
+ earmelf_linux.o \
+ earmelf_oabi.o \
earmnbsd.o \
earmpe.o \
- earm_epoc_pe.o \
eavr1200.o \
eavr23xx.o \
- eavr44x4.o \
eavr4433.o \
+ eavr44x4.o \
eavr85xx.o \
- eavrmega603.o \
eavrmega103.o \
eavrmega161.o \
+ eavrmega603.o \
ecoff_sparc.o \
+ ecrisaout.o \
+ ecriself.o \
+ ecrislinux.o \
ed10velf.o \
- ed30velf.o \
ed30v_e.o \
ed30v_o.o \
+ ed30velf.o \
edelta68.o \
eebmon29k.o \
- eelf32_sparc.o \
eelf32_i960.o \
+ eelf32_i860.o \
+ eelf32_sparc.o \
eelf32b4300.o \
eelf32bmip.o \
+ eelf32bmipn32.o \
+ eelf32btsmip.o \
+ eelf32ltsmip.o \
eelf32ebmip.o \
eelf32elmip.o \
- eelf32bmipn32.o \
+ eelf32fr30.o \
eelf32i370.o \
eelf32l4300.o \
eelf32lmip.o \
eelf32lppc.o \
+ eelf32lppcsim.o \
+ eelf32mcore.o \
eelf32ppc.o \
eelf32ppclinux.o \
+ eelf32ppcsim.o \
eelf_i386.o \
eelf_i386_be.o \
+ eelf_i386_chaos.o \
egld960.o \
egld960coff.o \
- eelf32fr30.o \
- eelf32mcore.o \
eh8300.o \
eh8300h.o \
eh8300s.o \
@@ -259,6 +275,8 @@ ALL_EMULATIONS = \
eh8500s.o \
ehp300bsd.o \
ehp3hpux.o \
+ ehppaelf.o \
+ ehppalinux.o \
ei386aout.o \
ei386beos.o \
ei386bsd.o \
@@ -274,6 +292,10 @@ ALL_EMULATIONS = \
ei386pe.o \
ei386pe_posix.o \
elnk960.o \
+ em68hc11elf.o \
+ em68hc11elfb.o \
+ em68hc12elf.o \
+ em68hc12elfb.o \
em68k4knbsd.o \
em68kaout.o \
em68kaux.o \
@@ -293,10 +315,10 @@ ALL_EMULATIONS = \
emipslnews.o \
emipspe.o \
enews.o \
- epjelf.o \
- epjlelf.o \
ens32knbsd.o \
epc532macha.o \
+ epjelf.o \
+ epjlelf.o \
eppcmacos.o \
eppcnw.o \
eppcpe.o \
@@ -304,8 +326,10 @@ ALL_EMULATIONS = \
esa29200.o \
esh.o \
eshelf.o \
- eshlelf.o \
+ eshelf_linux.o \
+ eshlelf_linux.o \
eshl.o \
+ eshlelf.o \
eshpe.o \
esparcaout.o \
esparclinux.o \
@@ -316,6 +340,7 @@ ALL_EMULATIONS = \
esun4.o \
etic30aout.o \
etic30coff.o \
+ etic54xcoff.o \
etic80coff.o \
evanilla.o \
evax.o \
@@ -326,14 +351,19 @@ ALL_EMULATIONS = \
ALL_64_EMULATIONS = \
+ eelf64_ia64.o \
+ eelf_x86_64.o \
eelf64_sparc.o \
eelf64alpha.o \
- eelf64bmip.o
+ eelf64bmip.o \
+ eelf64btsmip.o \
+ eelf64ltsmip.o \
+ eelf64hppa.o
ALL_EMUL_EXTRA_OFILES = \
- pe-dll.o \
- deffilep.o
+ deffilep.o \
+ pe-dll.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
@@ -364,9 +394,12 @@ POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
# These all start with e so 'make clean' can find them.
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${exec_prefix} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
+# 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
@@ -381,7 +414,7 @@ MAINTAINERCLEANFILES = ldver.texi
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
-CLEANFILES = dep.sed DEP DEP1 DEP2
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
# Stuff that should be included in a distribution. The diststuff
# target is run by the taz target in ../Makefile.in.
@@ -400,11 +433,14 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-ld_new_OBJECTS = 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
+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)
@@ -421,7 +457,7 @@ 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 \
-ldgram.c ldlex.c
+deffilep.c ldgram.c ldlex.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -432,12 +468,12 @@ INSTALL_MAN = install-man
TAR = tar
GZIP_ENV = --best
-SOURCES = $(ld_new_SOURCES)
+SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
OBJECTS = $(ld_new_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .txi .y
+.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
@@ -490,6 +526,11 @@ maintainer-clean-noinstPROGRAMS:
.c.o:
$(COMPILE) -c $<
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
.s.o:
$(COMPILE) -c $<
@@ -498,6 +539,7 @@ maintainer-clean-noinstPROGRAMS:
mostlyclean-compile:
-rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
clean-compile:
@@ -531,10 +573,8 @@ ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
.l.c:
$(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
.y.c:
- $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
- if test -f y.tab.h; then \
- if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
- else :; fi
+ $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
+deffilep.h: deffilep.c
ldgram.h: ldgram.c
@@ -906,7 +946,7 @@ distclean-generic:
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "ldlexlldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexl ldgramh ldgramc $(MAINTAINERCLEANFILES)
+ -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 \
@@ -1007,17 +1047,16 @@ earcelf.c: $(srcdir)/emulparams/arcelf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} arcelf "$(tdir_arcelf)"
earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf "$(tdir_armelf)"
earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
$(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
-earmelf_linux26.c: $(srcdir)/emulparams/armelf_linux26.sh \
- $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_linux26 "$(tdir_armelf_linux26)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -1071,6 +1110,15 @@ eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
+ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} crisaout "$(tdir_cris)"
+ecriself.c: $(srcdir)/emulparams/criself.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} criself "$(tdir_cris)"
+ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} crislinux "$(tdir_cris)"
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d10velf "$(tdir_d10v)"
@@ -1101,6 +1149,9 @@ em32relf.c: $(srcdir)/emulparams/m32relf.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_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
@@ -1113,6 +1164,12 @@ eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
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)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
+eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
@@ -1129,16 +1186,22 @@ eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
+eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
+eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
@@ -1146,18 +1209,36 @@ eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
+eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
+eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
+eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
+eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
+eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
+eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
egld960.c: $(srcdir)/emulparams/gld960.sh \
$(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} gld960 "$(tdir_gld960)"
@@ -1194,6 +1275,14 @@ ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
+ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
+ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386aout "$(tdir_i386aout)"
@@ -1239,6 +1328,18 @@ ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
elnk960.c: $(srcdir)/emulparams/lnk960.sh \
$(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
+em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
+em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
+em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
+em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68k4knbsd "$(tdir_m68k4knbsd)"
@@ -1249,10 +1350,11 @@ em68kaux.c: $(srcdir)/emulparams/m68kaux.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kaux.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kaux "$(tdir_m68kaux)"
em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -1335,6 +1437,12 @@ esh.c: $(srcdir)/emulparams/sh.sh \
eshelf.c: $(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf "$(tdir_shelf)"
+eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
+eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
@@ -1371,6 +1479,9 @@ etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
+etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \
+ $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)"
etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
@@ -1495,7 +1606,7 @@ ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) $(srcdir)/ld.texinfo
+ MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
# We want to reconfigure if configure.host or configure.tgt changes.
config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
@@ -1534,8 +1645,13 @@ distclean-local:
DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
rm -f DEP1
$(MAKE) MKDEP="$(MKDEP)" DEP1
- sed -f dep.sed < DEP1 > $@
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
+ sed -f dep.sed < DEP1 > DEPA
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
+ if grep ' /' DEPA > /dev/null 2> /dev/null; then \
+ echo 'make DEP failed!'; exit 1; \
+ else \
+ mv -f DEPA $@; \
+ fi
DEP1: $(CFILES) $(GENERATED_CFILES)
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
@@ -1575,7 +1691,7 @@ ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
ldgram.h ldmain.h ldctor.h
ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
- ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h \
ldemul-list.h
ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
@@ -1584,24 +1700,25 @@ ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
- ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h
+ ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h $(INCDIR)/libiberty.h
ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
$(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
- ldmain.h ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h \
- ldmisc.h ldctor.h ldfile.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
+ ldmain.h ldgram.h ldexp.h ldlang.h ldlex.h ldmisc.h \
+ ldctor.h ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
- ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
- ldemul.h ldlex.h ldfile.h ldctor.h
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
+ ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldwrite.h \
+ ldgram.h ldexp.h ldlang.h ldlex.h ldfile.h ldemul.h \
+ ldctor.h
ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
$(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h ldmisc.h \
ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h
ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
- ldver.h ldemul.h ldmain.h
+ ldver.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h
ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
$(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
@@ -1610,7 +1727,7 @@ lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
- ldver.h ldemul.h
+ ldver.h ldemul.h $(INCDIR)/demangle.h
mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
@@ -1621,17 +1738,17 @@ ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
$(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
- ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldemul.h \
- $(INCDIR)/coff/internal.h ../bfd/libcoff.h deffile.h \
- pe-dll.h
+ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldfile.h \
+ ldemul.h $(INCDIR)/coff/internal.h ../bfd/libcoff.h \
+ deffile.h pe-dll.h
ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
ld.h $(INCDIR)/bin-bugs.h ldexp.h ldver.h ldlang.h \
- ldemul.h ldfile.h ldmisc.h ldmain.h mri.h ldctor.h \
+ ldfile.h ldemul.h ldmisc.h ldmain.h mri.h ldctor.h \
ldlex.h
ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \
- ldlang.h ldfile.h ldlex.h ldmain.h
+ ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h
deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h
diff --git a/gnu/usr.bin/binutils/ld/NEWS b/gnu/usr.bin/binutils/ld/NEWS
index 95062014c61..f1e7ece2883 100644
--- a/gnu/usr.bin/binutils/ld/NEWS
+++ b/gnu/usr.bin/binutils/ld/NEWS
@@ -1,5 +1,31 @@
-*- text -*-
+* Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs.
+
+* Support added for eliminating duplicate DWARF2 debug information by
+ having the compiler generate the information in sections called
+ .gnu.linkonce.wi.XXXX where XXXX is a checksum for the contents. The
+ linker then merges these sections together into the normal .debug_info
+ section.
+
+* The native ELF linker now searches the directories in DT_RUNPATH or
+ DT_RPATH of a shared library for shared libraries needed by it.
+
+* TI C54x support, by Timothy Wall.
+
+* Added command line switch --section-start to set the start address of any
+ specified section.
+
+* Added ability to emit full relocation information in linked executables,
+ enabled by --emit-relocs. Some post-linkage optimization tools need
+ this information in order to be able to correctly identify and perform
+ symbol relative addressing in the event of changes in section contents
+ (instructions being added or deleted, extending data sections, etc.)
+
+* Support for i860, by Jason Eckhardt (preliminary, alpha quality).
+
+* Support for CRIS (Axis Communications ETRAX series).
+
Changes in version 2.10:
* Added AT> to the linker script language to allow load-time allocation of
@@ -7,8 +33,8 @@ Changes in version 2.10:
* Added garbage collection of unused sections, enabled by --gc-sections.
It does require a bit of backend support; currently implemented are
- avr-elf, d10v-elf, fr30-elf, i386-elf, m32r-elf, m68k-elf, mcore-elf,
- mips-elf, mn10300-elf, ppc-elf, sh-elf, sparc-elf, and v850-elf.
+ arm-elf, avr-elf, d10v-elf, fr30-elf, i386-elf, m32r-elf, m68k-elf,
+ mcore-elf, mips-elf, mn10300-elf, ppc-elf, sh-elf, sparc-elf, and v850-elf.
Others will ignore the option.
* Added SORT to the linker script language to permit sorting sections by file
diff --git a/gnu/usr.bin/binutils/ld/aclocal.m4 b/gnu/usr.bin/binutils/ld/aclocal.m4
index 8bebfa05f66..b468950d71e 100644
--- a/gnu/usr.bin/binutils/ld/aclocal.m4
+++ b/gnu/usr.bin/binutils/ld/aclocal.m4
@@ -12,6 +12,21 @@ dnl PARTICULAR PURPOSE.
sinclude(../bfd/acinclude.m4)
+dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
+dnl The lines below arrange for aclocal not to bring libtool.m4
+dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
+dnl to add a definition of LIBTOOL to Makefile.in.
+ifelse(yes,no,[
+AC_DEFUN([AM_PROG_LIBTOOL],)
+AC_SUBST(LIBTOOL)
+])
+
+dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
+ifelse(yes,no,[
+AC_DEFUN([CY_WITH_NLS],)
+AC_SUBST(INTLLIBS)
+])
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
@@ -104,415 +119,6 @@ else
fi
AC_SUBST($1)])
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$lt_target" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$lt_target" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
@@ -536,351 +142,6 @@ for am_file in <<$1>>; do
done<<>>dnl>>)
changequote([,]))])
-# This file is derived from `gettext.m4'. The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-AC_DEFUN(CY_WITH_NLS,
- [AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
-
- USE_INCLUDED_LIBINTL=no
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
- AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH(included-gettext,
- [ --with-included-gettext use the GNU gettext library included here],
- nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If gettext or catgets are available (in this order) we
- dnl use this. Else we have to fall back to GNU NLS library.
- dnl catgets is only used if permitted by option --with-catgets.
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- AC_CHECK_HEADER(libintl.h,
- [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
- [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
- gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for gettext in libintl],
- gt_cv_func_gettext_libintl,
- [AC_TRY_LINK([], [return (int) gettext ("")],
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)])])
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT, 1,
- [Define as 1 if you have gettext and don't want to use GNU gettext.])
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- AC_CHECK_FUNCS(dcgettext)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- INSTOBJEXT=.mo
- fi
- fi
- ])
-
- dnl In the standard gettext, we would now check for catgets.
- dnl However, we never want to use catgets for our releases.
-
- if test "$CATOBJEXT" = "NONE"; then
- dnl Neither gettext nor catgets in included in the C library.
- dnl Fall back on GNU gettext library.
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_SUBST(MSGFMT)
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext programs is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLDEPS)
- AC_SUBST(INTLLIBS)
- AC_SUBST(INTLOBJS)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
-
-AC_DEFUN(CY_GNU_GETTEXT,
- [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
-
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h])
- AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- AC_CHECK_FUNCS(stpcpy)
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
- fi
-
- AM_LC_MESSAGES
- CY_WITH_NLS
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- dnl The reference to <locale.h> in the installed <libintl.h> file
- dnl must be resolved because we cannot expect the users of this
- dnl to define HAVE_LOCALE_H.
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
- AC_SUBST(INCLUDE_LOCALE_H)
-
- dnl Determine which catalog format we have (if any is needed)
- dnl For now we know about two different formats:
- dnl Linux libc-5 and the normal X/Open format
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
- dnl Transform the SED scripts while copying because some dumb SEDs
- dnl cannot handle comments.
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- dnl po2tbl.sed is always needed.
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- dnl In the intl/Makefile.in we have a special dependency which makes
- dnl only sense for gettext. We comment this out for non-gettext
- dnl packages.
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
- AC_SUBST(GT_NO)
- AC_SUBST(GT_YES)
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
- AC_SUBST(MKINSTALLDIRS)
-
- dnl *** For now the libtool support in intl/Makefile is not for real.
- l=
- AC_SUBST(l)
-
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile. But only do this if the po directory
- dnl exists in srcdir.
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
- ])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your locale.h file contains LC_MESSAGES.])
- fi
- fi])
-
dnl AM_PROG_LEX
dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
diff --git a/gnu/usr.bin/binutils/ld/configure b/gnu/usr.bin/binutils/ld/configure
index 197893778d7..738a1b9e806 100644
--- a/gnu/usr.bin/binutils/ld/configure
+++ b/gnu/usr.bin/binutils/ld/configure
@@ -22,10 +22,14 @@ ac_help="$ac_help
ac_help="$ac_help
--disable-libtool-lock avoid locking (might break parallel builds)"
ac_help="$ac_help
+ --with-pic try to use only PIC/non-PIC objects [default=use both]"
+ac_help="$ac_help
--enable-targets alternative target configurations"
ac_help="$ac_help
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
ac_help="$ac_help
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
--disable-nls do not use Native Language Support"
ac_help="$ac_help
--with-included-gettext use the GNU gettext library included here"
@@ -49,6 +53,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -163,6 +168,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -333,6 +339,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -498,12 +509,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -541,6 +556,68 @@ else
ac_n= ac_c='\c' ac_t=
fi
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:561: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<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=
@@ -590,7 +667,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:594: checking host system type" >&5
+echo "configure:671: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -611,7 +688,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:615: checking target system type" >&5
+echo "configure:692: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -629,7 +706,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:633: checking build system type" >&5
+echo "configure:710: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -651,7 +728,251 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:735: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:765: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:816: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:848: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 859 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:895: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:923: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:955: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$ac_t""yes" 1>&6
+ ISC=yes # If later tests want to check for ISC.
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
+else
+ echo "$ac_t""no" 1>&6
+ ISC=
+fi
+
+
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -664,7 +985,7 @@ test "$host_alias" != "$target_alias" &&
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:668: checking for a BSD compatible install" >&5
+echo "configure:989: 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
@@ -717,7 +1038,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:721: checking whether build environment is sane" >&5
+echo "configure:1042: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -774,7 +1095,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:778: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1099: 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
@@ -803,7 +1124,7 @@ fi
PACKAGE=ld
-VERSION=2.10.1
+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; }
@@ -820,7 +1141,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:824: checking for working aclocal" >&5
+echo "configure:1145: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -833,7 +1154,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:837: checking for working autoconf" >&5
+echo "configure:1158: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -846,7 +1167,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:850: checking for working automake" >&5
+echo "configure:1171: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -859,7 +1180,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:863: checking for working autoheader" >&5
+echo "configure:1184: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -872,7 +1193,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:876: checking for working makeinfo" >&5
+echo "configure:1197: 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.
@@ -955,258 +1276,6 @@ else
enable_fast_install=yes
fi
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:962: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:992: 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:1022: 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:1073: 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:1105: 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 1116 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1121: \"$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:1147: 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:1152: 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:1161: \"$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:1180: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1219,8 +1288,14 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1223: checking for ld used by GCC" >&5
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
+echo "configure:1292: checking for ld used by GCC" >&5
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
case "$ac_prog" in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
@@ -1243,10 +1318,10 @@ echo "configure:1223: 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:1247: checking for GNU ld" >&5
+echo "configure:1322: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1250: checking for non-GNU ld" >&5
+echo "configure:1325: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1281,7 +1356,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1285: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1360: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1294,10 +1369,23 @@ fi
fi
echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$ac_cv_prog_gnu_ld
+
+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+echo "configure:1377: checking for $LD option to reload object files" >&5
+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+
+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1301: checking for BSD-compatible nm" >&5
+echo "configure:1389: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1308,18 +1396,20 @@ else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ tmp_nm=$ac_dir/${ac_tool_prefix}nm
+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
+ # Tru64's nm complains that /dev/null is an invalid object file
+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
@@ -1333,7 +1423,7 @@ NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1337: checking whether ln -s works" >&5
+echo "configure:1427: 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
@@ -1353,12 +1443,484 @@ else
echo "$ac_t""no" 1>&6
fi
+echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
+echo "configure:1448: checking how to recognise dependant libraries" >&5
+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case "$host_os" in
+aix4*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin* | mingw* |pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+freebsd* )
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case "$host_cpu" in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20*)
+ # TODO: Does this work for hpux-11 too?
+ lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+
+irix5* | irix6*)
+ case "$host_os" in
+ irix5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case "$LD" in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ case "$host_cpu" in
+ alpha* | i*86 | powerpc* | sparc* | ia64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ else
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case "$host_vendor" in
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1591: checking for object suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1617: 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:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# Only perform the check for file, if the check method requires it
+case "$deplibs_check_method" in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+echo "configure:1660: checking for ${ac_tool_prefix}file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo $ac_n "checking for file""... $ac_c" 1>&6
+echo "configure:1722: checking for file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
+ fi
+ ;;
esac
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1793: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1825: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ RANLIB=":"
+fi
+fi
+
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1860: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1892: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ STRIP=":"
+fi
+fi
+
+
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
@@ -1377,13 +1939,24 @@ fi
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
+test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$lt_target" in
+case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1386 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1959 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1404,19 +1977,27 @@ case "$lt_target" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1408: checking whether the C compiler needs -belf" >&5
+echo "configure:1981: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1413 "configure"
+
+ 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 1994 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -1426,6 +2007,13 @@ else
lt_cv_cc_needs_belf=no
fi
rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
fi
echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
@@ -1489,12 +2077,14 @@ rm -f confcache
# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
# Reload cache, that may have been modified by ltconfig
@@ -1508,7 +2098,7 @@ fi
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -1518,6 +2108,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
exec 5>>./config.log
+
+
+
+
+
+
# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
enableval="$enable_targets"
@@ -1540,6 +2136,29 @@ else
want64=false
fi
+build_warnings="-W -Wall"
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+
+
@@ -1556,7 +2175,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1560: checking for $ac_word" >&5
+echo "configure:2179: 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
@@ -1586,7 +2205,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1590: checking for $ac_word" >&5
+echo "configure:2209: 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
@@ -1637,7 +2256,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1641: checking for $ac_word" >&5
+echo "configure:2260: 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
@@ -1669,7 +2288,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1673: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2292: 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.
@@ -1680,12 +2299,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1684 "configure"
+#line 2303 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2308: \"$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
@@ -1711,12 +2330,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2334: 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:1720: checking whether we are using GNU C" >&5
+echo "configure:2339: 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
@@ -1725,7 +2344,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2348: \"$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
@@ -1744,7 +2363,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1748: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2367: 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
@@ -1787,7 +2406,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1791: checking for a BSD compatible install" >&5
+echo "configure:2410: 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
@@ -1842,7 +2461,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
ALL_LINGUAS=
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1846: checking how to run the C preprocessor" >&5
+echo "configure:2465: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1857,13 +2476,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1861 "configure"
+#line 2480 "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:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2486: \"$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
:
@@ -1874,13 +2493,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1878 "configure"
+#line 2497 "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:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2503: \"$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
:
@@ -1891,13 +2510,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1895 "configure"
+#line 2514 "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:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2520: \"$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
:
@@ -1921,34 +2540,43 @@ else
fi
echo "$ac_t""$CPP" 1>&6
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1926: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
- echo "$ac_t""yes" 1>&6
- ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2547: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
- ISC=
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1947: checking for ANSI C header files" >&5
+echo "configure:2575: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1952 "configure"
+#line 2580 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1956,7 +2584,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2588: \"$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*
@@ -1973,7 +2601,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1977 "configure"
+#line 2605 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1991,7 +2619,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1995 "configure"
+#line 2623 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2012,7 +2640,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2016 "configure"
+#line 2644 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2023,7 +2651,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2047,18 +2675,18 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2051: checking for working const" >&5
+echo "configure:2679: 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 2056 "configure"
+#line 2684 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@@ -2101,7 +2729,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2122,21 +2750,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2126: checking for inline" >&5
+echo "configure:2754: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2133 "configure"
+#line 2761 "configure"
#include "confdefs.h"
int main() {
-} int $ac_kw foo() {
+} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2162,12 +2790,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2166: checking for off_t" >&5
+echo "configure:2794: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2171 "configure"
+#line 2799 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2195,12 +2823,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2199: checking for size_t" >&5
+echo "configure:2827: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2204 "configure"
+#line 2832 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2230,19 +2858,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2234: checking for working alloca.h" >&5
+echo "configure:2862: 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 2239 "configure"
+#line 2867 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
-void *p = alloca(2 * sizeof(int));
+char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2874: \"$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
@@ -2263,12 +2891,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2267: checking for alloca" >&5
+echo "configure:2895: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2272 "configure"
+#line 2900 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2296,7 +2924,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2328,12 +2956,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2332: checking whether alloca needs Cray hooks" >&5
+echo "configure:2960: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2337 "configure"
+#line 2965 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2358,12 +2986,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2362: checking for $ac_func" >&5
+echo "configure:2990: 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 2367 "configure"
+#line 2995 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2386,7 +3014,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3018: \"$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
@@ -2413,7 +3041,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2417: checking stack direction for C alloca" >&5
+echo "configure:3045: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2421,7 +3049,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2425 "configure"
+#line 3053 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2440,7 +3068,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2465,17 +3093,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2469: checking for $ac_hdr" >&5
+echo "configure:3097: 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 2474 "configure"
+#line 3102 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3107: \"$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*
@@ -2504,12 +3132,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2508: checking for $ac_func" >&5
+echo "configure:3136: 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 2513 "configure"
+#line 3141 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2532,7 +3160,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2557,7 +3185,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2561: checking for working mmap" >&5
+echo "configure:3189: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2565,7 +3193,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2569 "configure"
+#line 3197 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2592,15 +3220,12 @@ else
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -2655,7 +3280,7 @@ main()
/*
* First, make a file with some known garbage in it.
*/
- data = (char*)malloc(pagesize);
+ data = malloc(pagesize);
if (!data)
exit(1);
for (i = 0; i < pagesize; ++i)
@@ -2676,7 +3301,7 @@ main()
fd = open("conftestmmap", O_RDWR);
if (fd < 0)
exit(1);
- data2 = (char*)malloc(2 * pagesize);
+ data2 = malloc(2 * pagesize);
if (!data2)
exit(1);
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -2694,7 +3319,7 @@ main()
*/
for (i = 0; i < pagesize; ++i)
*(data2 + i) = *(data2 + i) + 1;
- data3 = (char*)malloc(pagesize);
+ data3 = malloc(pagesize);
if (!data3)
exit(1);
if (read(fd, data3, pagesize) != pagesize)
@@ -2708,7 +3333,7 @@ main()
}
EOF
-if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2736,17 +3361,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2740: checking for $ac_hdr" >&5
+echo "configure:3365: 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 2745 "configure"
+#line 3370 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3375: \"$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*
@@ -2776,12 +3401,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2780: checking for $ac_func" >&5
+echo "configure:3405: 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 2785 "configure"
+#line 3410 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2804,7 +3429,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3433: \"$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
@@ -2833,12 +3458,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2837: checking for $ac_func" >&5
+echo "configure:3462: 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 2842 "configure"
+#line 3467 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2861,7 +3486,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3490: \"$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
@@ -2895,19 +3520,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2899: checking for LC_MESSAGES" >&5
+echo "configure:3524: 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 2904 "configure"
+#line 3529 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -2928,7 +3553,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2932: checking whether NLS is requested" >&5
+echo "configure:3557: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -2948,7 +3573,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2952: checking whether included gettext is requested" >&5
+echo "configure:3577: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -2967,17 +3592,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2971: checking for libintl.h" >&5
+echo "configure:3596: 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 2976 "configure"
+#line 3601 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3606: \"$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*
@@ -2994,19 +3619,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2998: checking for gettext in libc" >&5
+echo "configure:3623: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3003 "configure"
+#line 3628 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3022,7 +3647,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3026: checking for bindtextdomain in -lintl" >&5
+echo "configure:3651: 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
@@ -3030,7 +3655,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3034 "configure"
+#line 3659 "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
@@ -3041,7 +3666,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3670: \"$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
@@ -3057,19 +3682,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3061: checking for gettext in libintl" >&5
+echo "configure:3686: 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 3066 "configure"
+#line 3691 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3097,7 +3722,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3101: checking for $ac_word" >&5
+echo "configure:3726: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3131,12 +3756,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3135: checking for $ac_func" >&5
+echo "configure:3760: 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 3140 "configure"
+#line 3765 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3159,7 +3784,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3788: \"$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
@@ -3186,7 +3811,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3190: checking for $ac_word" >&5
+echo "configure:3815: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3222,7 +3847,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3226: checking for $ac_word" >&5
+echo "configure:3851: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3254,7 +3879,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3258 "configure"
+#line 3883 "configure"
#include "confdefs.h"
int main() {
@@ -3262,7 +3887,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3294,7 +3919,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3298: checking for $ac_word" >&5
+echo "configure:3923: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3328,7 +3953,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3332: checking for $ac_word" >&5
+echo "configure:3957: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3364,7 +3989,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3368: checking for $ac_word" >&5
+echo "configure:3993: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3454,7 +4079,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3458: checking for catalogs to be installed" >&5
+echo "configure:4083: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -3482,17 +4107,17 @@ echo "configure:3458: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:3486: checking for linux/version.h" >&5
+echo "configure:4111: 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 3491 "configure"
+#line 4116 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4121: \"$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*
@@ -3554,72 +4179,10 @@ fi
fi
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:3559: 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 3564 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:3575: \"$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:3592: 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 3597 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:3604: \"$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
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3623: checking for executable suffix" >&5
+echo "configure:4186: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3629,10 +4192,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -3655,7 +4218,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3659: checking for $ac_word" >&5
+echo "configure:4222: 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
@@ -3691,7 +4254,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3695: checking for $ac_word" >&5
+echo "configure:4258: 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
@@ -3724,7 +4287,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex""
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3728: checking for $ac_word" >&5
+echo "configure:4291: 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
@@ -3758,7 +4321,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:3762: checking for yywrap in -l$ac_lib" >&5
+echo "configure:4325: 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
@@ -3766,7 +4329,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3770 "configure"
+#line 4333 "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
@@ -3777,7 +4340,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4344: \"$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
@@ -3800,7 +4363,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:3804: checking lex output file root" >&5
+echo "configure:4367: checking lex output file root" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3821,7 +4384,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:3825: checking whether yytext is a pointer" >&5
+echo "configure:4388: checking whether yytext is a pointer" >&5
if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3833,14 +4396,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 3837 "configure"
+#line 4400 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_prog_lex_yytext_pointer=yes
else
@@ -3863,7 +4426,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:3867: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4430: 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"
@@ -3897,17 +4460,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3901: checking for $ac_hdr" >&5
+echo "configure:4464: 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 3906 "configure"
+#line 4469 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4474: \"$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*
@@ -3936,12 +4499,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3940: checking for $ac_func" >&5
+echo "configure:4503: 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 3945 "configure"
+#line 4508 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3964,7 +4527,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4531: \"$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
@@ -3993,12 +4556,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:3997: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4560: 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 4002 "configure"
+#line 4565 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4006,7 +4569,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4031,7 +4594,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4035: checking for opendir in -ldir" >&5
+echo "configure:4598: 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
@@ -4039,7 +4602,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4043 "configure"
+#line 4606 "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
@@ -4050,7 +4613,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4617: \"$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
@@ -4072,7 +4635,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4076: checking for opendir in -lx" >&5
+echo "configure:4639: 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
@@ -4080,7 +4643,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4084 "configure"
+#line 4647 "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
@@ -4091,7 +4654,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4658: \"$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
@@ -4124,12 +4687,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4128: checking whether strstr must be declared" >&5
+echo "configure:4691: 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 4133 "configure"
+#line 4696 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4150,7 +4713,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4171,12 +4734,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4175: checking whether free must be declared" >&5
+echo "configure:4738: 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 4180 "configure"
+#line 4743 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4197,7 +4760,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4218,12 +4781,12 @@ EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:4222: checking whether sbrk must be declared" >&5
+echo "configure:4785: 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 4227 "configure"
+#line 4790 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4244,7 +4807,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -4265,12 +4828,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4269: checking whether getenv must be declared" >&5
+echo "configure:4832: 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 4274 "configure"
+#line 4837 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4291,7 +4854,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -4312,12 +4875,12 @@ EOF
fi
echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:4316: checking whether environ must be declared" >&5
+echo "configure:4879: 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 4321 "configure"
+#line 4884 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4338,7 +4901,7 @@ int main() {
char *(*pfn) = (char *(*)) environ
; return 0; }
EOF
-if { (eval echo configure:4342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_environ=no
else
@@ -4366,19 +4929,19 @@ fi
# constants, while still supporting pre-ANSI compilers which do not
# support string concatenation.
echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
-echo "configure:4370: checking whether ANSI C string concatenation works" >&5
+echo "configure:4933: 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 4375 "configure"
+#line 4938 "configure"
#include "confdefs.h"
int main() {
char *a = "a" "a";
; return 0; }
EOF
-if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ld_cv_string_concatenation=yes
else
@@ -4652,6 +5215,7 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
+s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -4663,10 +5227,13 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@RANLIB@%$RANLIB%g
+s%@STRIP@%$STRIP%g
s%@LIBTOOL@%$LIBTOOL%g
+s%@WARN_CFLAGS@%$WARN_CFLAGS%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@USE_NLS@%$USE_NLS%g
@@ -4689,7 +5256,6 @@ s%@GT_NO@%$GT_NO%g
s%@GT_YES@%$GT_YES%g
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@l@%$l%g
-s%@EXEEXT@%$EXEEXT%g
s%@YACC@%$YACC%g
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
diff --git a/gnu/usr.bin/binutils/ld/configure.host b/gnu/usr.bin/binutils/ld/configure.host
index 2b2f28b9d30..f5d9393c551 100644
--- a/gnu/usr.bin/binutils/ld/configure.host
+++ b/gnu/usr.bin/binutils/ld/configure.host
@@ -35,31 +35,12 @@ alpha*-*-openbsd*)
HOSTING_CRT0=/usr/lib/crt0.o
;;
-alpha*-*-*)
- HOSTING_CRT0=/usr/ccs/lib/crt0.o
- NATIVE_LIB_DIRS=/usr/ccs/lib
- ;;
-
arm*-*-linux-gnu*)
HOSTING_CRT0='-p -dynamic-linker `fgrep ld-linux.so \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
;;
-i[3456]86-*-freebsdelf*)
- # The new BSD `make' has a bug: it doesn't pass empty arguments in
- # shell commands. So we need to make this value non-empty in order
- # for the genscripts.sh call to work. There's nothing magic about
- # the value `/lib'; it's just a dummy.
- NATIVE_LIB_DIRS=/lib
- # Older versions of gcc do not use a specs file. In those cases,
- # gcc -print-file-name=specs will simply print specs. We create a
- # dummy specs files to handle this.
- echo "-dynamic-linker /usr/libexec/ld-elf.so.1" > specs
- HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
- ;;
-
-i[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]86-*-netbsd*)
+i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*)
# The new BSD `make' has a bug: it doesn't pass empty arguments in
# shell commands. So we need to make this value non-empty in order
# for the genscripts.sh call to work. There's nothing magic about
@@ -105,7 +86,7 @@ i[3456]86-*-sco* | i[3456]86-*-isc*)
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o'
;;
-i[3456]86-*-linux*aout* | i[3456]86-*-linuxoldld)
+i[3456]86-*-linux*aout* | i[3456]86-*-linux*oldld)
HOSTING_CRT0=/usr/lib/crt0.o
;;
@@ -130,6 +111,15 @@ i[3456]86-pc-interix*)
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L $$X/local_bin -L $$INTERIX_ROOT/usr/lib -lc -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a'
;;
+i[3456]86-*-cygwin*)
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
+ ;;
+
+ia64-*-linux-gnu*)
+ HOSTING_CRT0='-dynamic-linker `egrep "ld-linux-ia64.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux-ia64.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
+ ;;
+
mips*-dec-bsd*)
HOSTING_CRT0=/usr/lib/crt0.o
;;
@@ -198,10 +188,6 @@ powerpc*-*-linux-gnu*)
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
;;
-romp-*-*)
- HDEFINES=-DNO_VARARGS
- ;;
-
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='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
@@ -218,4 +204,27 @@ sparc64-*-linux-gnu*)
HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
;;
+#
+# Generic configurations:
+#
+
+*-*-freebsd*)
+ NATIVE_LIB_DIRS=/usr/lib
+ # Older versions of gcc do not use a specs file. In those cases,
+ # gcc -print-file-name=specs will simply print specs. We create a
+ # dummy specs files to handle this.
+ echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs
+ HOSTING_CRT0='-dynamic-linker `${CC} --print-file-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
+ HOSTING_LIBS='`${CC} -print-libgcc-file-name` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `${CC} -print-libgcc-file-name` `${CC} --print-file-name=crtend.o` `${CC} --print-file-name=crtn.o`'
+ ;;
+
+alpha*-*-*)
+ HOSTING_CRT0=/usr/ccs/lib/crt0.o
+ NATIVE_LIB_DIRS=/usr/ccs/lib
+ ;;
+
+romp-*-*)
+ HDEFINES=-DNO_VARARGS
+ ;;
+
esac
diff --git a/gnu/usr.bin/binutils/ld/configure.in b/gnu/usr.bin/binutils/ld/configure.in
index d4b67ac680a..6a69408810c 100644
--- a/gnu/usr.bin/binutils/ld/configure.in
+++ b/gnu/usr.bin/binutils/ld/configure.in
@@ -4,8 +4,12 @@ AC_PREREG(2.13)
AC_INIT(ldmain.c)
AC_CANONICAL_SYSTEM
+AC_ISC_POSIX
-AM_INIT_AUTOMAKE(ld, 2.10.1)
+changequote(,)dnl
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+changequote([,])dnl
+AM_INIT_AUTOMAKE(ld, ${BFD_VERSION})
AM_PROG_LIBTOOL
@@ -25,6 +29,27 @@ AC_ARG_ENABLE(64-bit-bfd,
*) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
esac],[want64=false])dnl
+build_warnings="-W -Wall"
+AC_ARG_ENABLE(build-warnings,
+[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi])dnl
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+AC_SUBST(WARN_CFLAGS)
+
AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
diff --git a/gnu/usr.bin/binutils/ld/configure.tgt b/gnu/usr.bin/binutils/ld/configure.tgt
index d0a25dbbd56..e09a6896938 100644
--- a/gnu/usr.bin/binutils/ld/configure.tgt
+++ b/gnu/usr.bin/binutils/ld/configure.tgt
@@ -23,6 +23,12 @@ arm-*-pe) targ_emul=armpe ;
arc-*-elf*) targ_emul=arcelf ;;
avr-*-*) targ_emul=avr85xx
targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161" ;;
+cris-*-*aout*) targ_emul=crisaout
+ targ_extra_emuls="criself crislinux"
+ targ_extra_libpath=$targ_extra_emuls ;;
+cris-*-*) targ_emul=criself
+ targ_extra_emuls="crisaout crislinux"
+ targ_extra_libpath=$targ_extra_emuls ;;
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" ;;
@@ -37,6 +43,12 @@ 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*)
+ 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*-*-linux*aout*) targ_emul=sparclinux
targ_extra_emuls="elf32_sparc sun4"
tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
@@ -75,19 +87,26 @@ sparcv9-*-solaris2* | sparc64-*-solaris2*)
;;
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 ;;
+sparc*-*-rtemsaout*) targ_emul=sparcaout ;;
+sparc*-*-rtemself*) targ_emul=elf32_sparc ;;
+sparc*-*-rtems*) targ_emul=elf32_sparc ;;
+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-*-rtemscoff*) targ_emul=gld960coff ;;
-i960-*-rtemself*) targ_emul=elf32_i960 ;;
i960-*-rtems*) targ_emul=gld960coff ;;
i960-*-elf*) targ_emul=elf32_i960 ;;
+ia64-*-elf*) targ_emul=elf64_ia64 ;;
+ia64-*-freebsd*) targ_emul=elf64_ia64 ;;
+ia64-*-linux*) targ_emul=elf64_ia64 ;;
m32r-*-*) targ_emul=m32relf ;;
+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 ;;
@@ -104,9 +123,8 @@ i[3456]86-*-sco*) targ_emul=i386coff ;;
i[3456]86-*-isc*) targ_emul=i386coff ;;
i[3456]86-*-lynxos*) targ_emul=i386lynx ;;
i[3456]86-*-coff) targ_emul=i386coff ;;
-i[3456]86-*-rtemscoff*) targ_emul=i386coff ;;
i[3456]86-*-rtemself*) targ_emul=elf_i386 ;;
-i[3456]86-*-rtems*) targ_emul=elf_i386 ;;
+i[3456]86-*-rtems*) targ_emul=i386coff ;;
i[3456]86-*-bsd) targ_emul=i386bsd ;;
i[3456]86-*-bsd386) targ_emul=i386bsd ;;
i[3456]86-*-bsdi*) targ_emul=i386bsd ;;
@@ -115,11 +133,15 @@ i[3456]86-*-linux*aout*) targ_emul=i386linux
targ_extra_emuls=elf_i386
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
;;
-i[3456]86-*-linuxoldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
+i[3456]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
i[3456]86-*-linux-gnu*) targ_emul=elf_i386
targ_extra_emuls=i386linux
tdir_i386linux=${targ_alias}aout
;;
+x86_64-*-linux-gnu*) targ_emul=elf_x86_64
+ targ_extra_emuls="elf_i386 i386linux"
+ tdir_i386linux=${targ_alias}aout
+ ;;
i[3456]86-*-sysv[45]*) targ_emul=elf_i386 ;;
i[3456]86-*-solaris2*) targ_emul=elf_i386 ;;
i[3456]86-*-unixware) targ_emul=elf_i386 ;;
@@ -131,6 +153,10 @@ i[3456]86-*-elf*) targ_emul=elf_i386 ;;
i[3456]86-*-freebsdaout* | i[3456]86-*-freebsd[12].* | i[3456]86-*-freebsd[12])
targ_emul=i386bsd ;;
i[3456]86-*-freebsd*) targ_emul=elf_i386 ;;
+x86_64-*-freebsd*) targ_emul=elf_x86_64
+ targ_extra_emuls=elf_i386
+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
+ ;;
i[3456]86-*-sysv*) targ_emul=i386coff ;;
i[3456]86-*-ptx*) targ_emul=i386coff ;;
i[3456]86-*-mach*) targ_emul=i386mach ;;
@@ -150,6 +176,7 @@ i[3456]86-*-interix*) targ_emul=i386pe_posix;
i[3456]86-*-beospe*) targ_emul=i386beos ;;
i[3456]86-*-beos*) targ_emul=elf_i386_be ;;
i[3456]86-*-vxworks*) targ_emul=i386aout ;;
+i[3456]86-*-chaos) targ_emul=elf_i386_chaos ;;
m8*-*-*) targ_emul=m88kbcs ;;
a29k-*-udi) targ_emul=sa29200 ;;
a29k-*-ebmon) targ_emul=ebmon29k ;;
@@ -158,11 +185,14 @@ a29k-*-*) targ_emul=a29k ;;
arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
armeb-*-aout) targ_emul=armaoutb ;;
arm-*-coff) targ_emul=armcoff ;;
+arm-*-vxworks) targ_emul=armcoff ;;
+arm-*-freebsd*) targ_emul=armelf ;;
arm-*-netbsd*) targ_emul=armnbsd ;;
arm-*-openbsd*) targ_emul=armnbsd ;;
+arm-*-rtems*) targ_emul=armelf ;;
arm-*-elf) targ_emul=armelf ;;
arm-*-oabi) targ_emul=armelf_oabi ;;
-arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls="armelf_linux26 armelf" ;;
+arm*-*-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 ;;
@@ -175,21 +205,26 @@ thumb-epoc-pe) targ_emul=arm_epoc_pe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
thumb-*-pe) targ_emul=armpe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-h8300-*-hms* | h8300-*-coff*)
+xscale-*-coff) targ_emul=armcoff ;;
+xscale-*-elf) targ_emul=armelf ;;
+h8300-*-hms* | h8300-*-coff* | h8300-*-rtems*)
targ_emul=h8300; targ_extra_emuls="h8300h h8300s"
;;
h8500-*-hms* | h8500-*-coff*)
targ_emul=h8500
targ_extra_emuls="h8500s h8500b h8500m h8500c"
;;
+sh-*-linux*)
+ targ_emul=shelf_linux
+ targ_extra_emuls=shlelf_linux
+ ;;
sh-*-elf* | sh-*-rtemself*)
targ_emul=shelf
targ_extra_emuls="shlelf sh shl"
;;
sh-*-pe) targ_emul=shpe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-sh-*-rtemscoff* | sh-*-* | sh-*-rtems*)
- targ_emul=sh; targ_extra_emuls=shl ;;
+sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;;
m68k-sony-*) targ_emul=news ;;
m68k-hp-bsd*) targ_emul=hp300bsd ;;
m68*-motorola-sysv*) targ_emul=delta68 ;;
@@ -211,12 +246,10 @@ m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;;
m68*-*-netbsd*) targ_emul=m68knbsd ;;
m68*-*-openbsd*) targ_emul=m68knbsd ;;
m68*-*-psos*) targ_emul=m68kpsos ;;
-m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
-m68*-*-rtemself) targ_emul=m68kelf ;;
-m68*-*-rtems*) targ_emul=m68kelf ;;
-hppa*w*-*) targ_emul=elf64hppa ;;
+m68*-*-rtems*) targ_emul=m68kcoff ;;
+hppa*64*-*) targ_emul=elf64hppa ;;
+hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
hppa*-*-*elf*) targ_emul=hppaelf ;;
-hppa*-*-linux-gnu*) targ_emul=hppaelf ;;
hppa*-*-lites*) targ_emul=hppaelf ;;
hppa*-*-rtems*) targ_emul=hppaelf ;;
vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
@@ -248,16 +281,20 @@ mips*el-*-rtems*) targ_emul=elf32elmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
mips*el-*-vxworks*) targ_emul=elf32elmip ;;
mips*-*-vxworks*) targ_emul=elf32ebmip ;;
-mips*el-*-linux-gnu*) targ_emul=elf32lsmip
- targ_extra_emuls="elf32bsmip mipslit mipsbig"
+mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
+ targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
;;
-mips*-*-linux-gnu*) targ_emul=elf32bsmip
- targ_extra_emuls="elf32lsmip mipsbig mipslit"
+mips*-*-linux-gnu*) targ_emul=elf32btsmip
+ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
;;
mips*-*-lnews*) targ_emul=mipslnews ;;
+mips*-*-sysv4*) targ_emul=elf32btsmip ;;
mn10200-*-*) targ_emul=mn10200 ;;
mn10300-*-*) targ_emul=mn10300 ;;
-alpha-*-freebsd*) targ_emul=elf64alpha ;;
+alpha*-*-freebsd*) targ_emul=elf64alpha
+ targ_extra_emuls=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//'`
;;
@@ -272,28 +309,35 @@ alpha*-*-openbsd*) targ_emul=elf64alpha ;;
z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
-powerpc-*-linux-gnu*) targ_emul=elf32ppclinux; targ_extra_emuls=elf32ppc;
+powerpc-*-freebsd*) targ_emul=elf32ppc;
+ targ_extra_emuls=elf32ppcsim;
+ targ_extra_libpath=elf32ppc;
+ tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'`
+ ;;
+powerpc-*-linux-gnu*) targ_emul=elf32ppclinux;
+ targ_extra_emuls="elf32ppc elf32ppcsim";
targ_extra_libpath=elf32ppc ;;
pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
pj*-*-*) targ_emul=pjelf ;;
powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-sysv* \
| powerpc-*-netbsd* | powerpc-*-openbsd* | powerpc-*-vxworks*)
- targ_emul=elf32ppc ;;
+ targ_emul=elf32ppc targ_extra_emuls="elf32ppclinux elf32ppcsim";;
powerpcle-*-elf* | powerpcle-*-eabi* | powerpcle-*-solaris* \
| powerpcle-*-sysv* | powerpcle-*-vxworks*)
- targ_emul=elf32lppc ;;
+ targ_emul=elf32lppc targ_extra_emuls="elf32ppcsim";;
powerpcle-*-rtems*) targ_emul=elf32leppc ;;
powerpc-*-rtems*) targ_emul=elf32ppc ;;
powerpc-*-macos*) targ_emul=ppcmacos ;;
powerpc-*-netware*) targ_emul=ppcnw ;;
powerpcle-*-pe) targ_emul=ppcpe ;;
powerpcle-*-winnt*) targ_emul=ppcpe ;;
-powerpcle-*-cygwin*) targ_emul=ppcpe ;;
+powerpcle-*-cygwin*) targ_emul=ppcpe ;;
powerpc-*-aix*) targ_emul=aixppc ;;
powerpc-*-beos*) targ_emul=aixppc ;;
rs6000-*-aix*) targ_emul=aixrs6 ;;
tic30-*-*aout*) targ_emul=tic30aout ;;
tic30-*-*coff*) targ_emul=tic30coff ;;
+tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
tic80-*-*) targ_emul=tic80coff ;;
v850-*-*) targ_emul=v850 ;;
v850e-*-*) targ_emul=v850 ;;
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh
index edffc610d49..bc9125d80d3 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh
@@ -1,8 +1,18 @@
TEMPLATE_NAME=elf32
+# If you change this, please also look at:
+# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elfppc
+SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpcle"
-TEXT_START_ADDR=0x40000
-MAXPAGESIZE=0x40000
+TEXT_START_ADDR=0x01800000
+MAXPAGESIZE=0x10000
ARCH=powerpc
MACHINE=
+BSS_PLT=
+EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
+OTHER_BSS_END_SYMBOLS='__end = .;'
+OTHER_READWRITE_SECTIONS='
+ .fixup : { *(.fixup) }
+ .got1 : { *(.got1) }
+ .got2 : { *(.got2) }
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh
index 3e3880c63d2..22208105a70 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh
@@ -1,8 +1,18 @@
TEMPLATE_NAME=elf32
+# If you change this, please also look at:
+# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elfppc
+SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpc"
TEXT_START_ADDR=0x01800000
MAXPAGESIZE=0x10000
ARCH=powerpc
MACHINE=
+BSS_PLT=
+EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
+OTHER_BSS_END_SYMBOLS='__end = .;'
+OTHER_READWRITE_SECTIONS='
+ .fixup : { *(.fixup) }
+ .got1 : { *(.got1) }
+ .got2 : { *(.got2) }
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh
index 2ab2e4fabb9..b0a58eadcb7 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh
@@ -2,15 +2,24 @@ SCRIPT_NAME=elf
ELFSIZE=64
TEMPLATE_NAME=elf32
OUTPUT_FORMAT="elf64-sparc"
-TEXT_START_ADDR=0x100000
MAXPAGESIZE=0x100000
-NONPAGED_TEXT_START_ADDR=0x100000
ARCH="sparc:v9"
MACHINE=
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
NOP=0x01000000
+case "$target" in
+ sparc*-solaris*)
+ TEXT_START_ADDR=0x100000000
+ NONPAGED_TEXT_START_ADDR=0x100000000
+ ;;
+ *)
+ TEXT_START_ADDR=0x100000
+ NONPAGED_TEXT_START_ADDR=0x100000
+ ;;
+esac
+
if [ "x${host}" = "x${target}" ]; then
case " $EMULATION_LIBPATH " in
*" ${EMULATION_NAME} "*)
@@ -31,7 +40,7 @@ if [ "x${host}" = "x${target}" ]; then
LIB_PATH=/lib${suffix}:/lib
LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
if [ -n "${NATIVE_LIB_DIRS}" ]; then
- LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s/:/${suffix}:/g`${suffix}:${NATIVE_LIB_DIRS}
+ LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s_:_${suffix}:_g`${suffix}:${NATIVE_LIB_DIRS}
fi
if [ "${libdir}" != /usr/lib ]; then
LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh
index cb17a22f5b4..5c69816b2b7 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh
@@ -1,4 +1,4 @@
-ENTRY=__start
+ENTRY=_start
SCRIPT_NAME=elf
ELFSIZE=64
TEMPLATE_NAME=elf32
@@ -13,3 +13,54 @@ DATA_PLT=
NOP=0x47ff041f
OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+
+# This code gets inserted into the generic elf32.sc linker script
+# and allows us to define our own command line switches.
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_TASO 300
+/* Set the start address as in the Tru64 ld */
+#define ALPHA_TEXT_START_32BIT 0x12000000
+
+static int elf64alpha_32bit = 0;
+
+struct ld_emulation_xfer_struct ld_elf64alpha_emulation;
+static void gld_elf64alpha_finish ();
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ {"taso", no_argument, NULL, OPTION_TASO},
+'
+
+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"));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+ case EOF:
+ if (elf64alpha_32bit && !link_info.shared && !link_info.relocateable)
+ {
+ lang_section_start (".interp",
+ exp_binop ('\''+'\'',
+ exp_intop (ALPHA_TEXT_START_32BIT),
+ exp_nameop (SIZEOF_HEADERS, NULL)));
+ ld_elf64alpha_emulation.finish = gld_elf64alpha_finish;
+ }
+ return 0;
+
+ case OPTION_TASO:
+ elf64alpha_32bit = 1;
+ break;
+'
+
+PARSE_AND_LIST_EPILOGUE='
+#include "elf/internal.h"
+#include "elf/alpha.h"
+#include "elf-bfd.h"
+
+static void
+gld_elf64alpha_finish()
+{
+ elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;
+}
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh b/gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh
index ad352c585b3..a27f63cff5c 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh
@@ -7,4 +7,5 @@ ARCH=m68k
MACHINE=
NOP=0x4e75
TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=m68kelf
GENERATE_SHLIB_SCRIPT=yes
diff --git a/gnu/usr.bin/binutils/ld/emultempl/aix.em b/gnu/usr.bin/binutils/ld/emultempl/aix.em
index dd81b5f744c..de07f297f47 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/aix.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/aix.em
@@ -4,7 +4,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* AIX emulation code for ${EMULATION_NAME}
- Copyright (C) 1991, 93, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2001
+ Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
AIX support by Ian Lance Taylor <ian@cygnus.com>
@@ -37,11 +38,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
#include "ldmain.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
#include "ldctor.h"
#include "ldgram.h"
@@ -856,7 +857,7 @@ gld${EMULATION_NAME}_read_file (filename, import)
n = ((struct export_symbol_list *)
xmalloc (sizeof (struct export_symbol_list)));
n->next = export_symbols;
- n->name = buystring (symname);
+ n->name = xstrdup (symname);
n->syscall = syscall;
export_symbols = n;
}
diff --git a/gnu/usr.bin/binutils/ld/emultempl/elf32.em b/gnu/usr.bin/binutils/ld/emultempl/elf32.em
index 82d8ba7166f..a575368f716 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/elf32.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/elf32.em
@@ -7,7 +7,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
- Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
ELF support by Ian Lance Taylor <ian@cygnus.com>
@@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
+#include "libiberty.h"
#include <ctype.h>
@@ -39,30 +40,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
#include "ldmain.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
#include "ldgram.h"
+#include "elf/common.h"
static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
-static boolean gld${EMULATION_NAME}_open_dynamic_archive
- PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
-static void gld${EMULATION_NAME}_after_open PARAMS ((void));
-static void gld${EMULATION_NAME}_check_needed
+static void gld${EMULATION_NAME}_vercheck
PARAMS ((lang_input_statement_type *));
static void gld${EMULATION_NAME}_stat_needed
PARAMS ((lang_input_statement_type *));
+static boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, int));
static boolean gld${EMULATION_NAME}_search_needed
PARAMS ((const char *, const char *, int));
-static boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, int));
-static void gld${EMULATION_NAME}_vercheck
+static void gld${EMULATION_NAME}_check_needed
PARAMS ((lang_input_statement_type *));
-static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
+static void gld${EMULATION_NAME}_after_open PARAMS ((void));
+static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *));
static void gld${EMULATION_NAME}_find_statement_assignment
PARAMS ((lang_statement_union_type *));
-static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *));
+static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
+static boolean gld${EMULATION_NAME}_open_dynamic_archive
+ PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
static lang_output_section_statement_type *output_rel_find PARAMS ((void));
static boolean gld${EMULATION_NAME}_place_orphan
PARAMS ((lang_input_statement_type *, asection *));
@@ -217,118 +219,356 @@ EOF
;;
esac
cat >>e${EMULATION_NAME}.c <<EOF
+EOF
+
+# Import any needed special functions and/or overrides.
+#
+if test -n "$EXTRA_EM_FILE" ; then
+. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
+fi
+
+# Functions in this file can be overridden by setting the LDEMUL_* shell
+# variables. If the name of the overriding function is the same as is
+# defined in this file, then don't output this file's version.
+# If a different overriding name is given then output the standard function
+# as presumably it is called from the overriding function.
+#
+if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then
+cat >>e${EMULATION_NAME}.c <<EOF
+
static void
-gld${EMULATION_NAME}_before_parse()
+gld${EMULATION_NAME}_before_parse ()
{
ldfile_output_architecture = bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`;
config.dynamic_link = ${DYNAMIC_LINK-true};
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`;
}
-/* Try to open a dynamic archive. This is where we know that ELF
- dynamic libraries have an extension of .so (or .sl on oddball systems
- like hpux). */
+EOF
+fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+/* These variables are required to pass information back and forth
+ between after_open and check_needed and stat_needed and vercheck. */
+
+static struct bfd_link_needed_list *global_needed;
+static struct stat global_stat;
+static boolean global_found;
+static struct bfd_link_needed_list *global_vercheck_needed;
+static boolean global_vercheck_failed;
+
+
+/* On Linux, it's possible to have different versions of the same
+ shared library linked against different versions of libc. The
+ dynamic linker somehow tags which libc version to use in
+ /etc/ld.so.cache, and, based on the libc that it sees in the
+ executable, chooses which version of the shared library to use.
+
+ We try to do a similar check here by checking whether this shared
+ library needs any other shared libraries which may conflict with
+ libraries we have already included in the link. If it does, we
+ skip it, and try to find another shared library farther on down the
+ link path.
+
+ This is called via lang_for_each_input_file.
+ GLOBAL_VERCHECK_NEEDED is the list of objects needed by the object
+ which we are checking. This sets GLOBAL_VERCHECK_FAILED if we find
+ a conflicting version. */
+
+static void
+gld${EMULATION_NAME}_vercheck (s)
+ lang_input_statement_type *s;
+{
+ const char *soname;
+ struct bfd_link_needed_list *l;
+
+ if (global_vercheck_failed)
+ return;
+ if (s->the_bfd == NULL
+ || (bfd_get_file_flags (s->the_bfd) & DYNAMIC) == 0)
+ return;
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname == NULL)
+ soname = basename (bfd_get_filename (s->the_bfd));
+
+ for (l = global_vercheck_needed; l != NULL; l = l->next)
+ {
+ const char *suffix;
+
+ if (strcmp (soname, l->name) == 0)
+ {
+ /* Probably can't happen, but it's an easy check. */
+ continue;
+ }
+
+ if (strchr (l->name, '/') != NULL)
+ continue;
+
+ suffix = strstr (l->name, ".so.");
+ if (suffix == NULL)
+ continue;
+
+ suffix += sizeof ".so." - 1;
+
+ if (strncmp (soname, l->name, suffix - l->name) == 0)
+ {
+ /* Here we know that S is a dynamic object FOO.SO.VER1, and
+ the object we are considering needs a dynamic object
+ FOO.SO.VER2, and VER1 and VER2 are different. This
+ appears to be a version mismatch, so we tell the caller
+ to try a different version of this library. */
+ global_vercheck_failed = true;
+ return;
+ }
+ }
+}
+
+
+/* See if an input file matches a DT_NEEDED entry by running stat on
+ the file. */
+
+static void
+gld${EMULATION_NAME}_stat_needed (s)
+ lang_input_statement_type *s;
+{
+ struct stat st;
+ const char *suffix;
+ const char *soname;
+
+ if (global_found)
+ return;
+ if (s->the_bfd == NULL)
+ return;
+
+ if (bfd_stat (s->the_bfd, &st) != 0)
+ {
+ einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd);
+ return;
+ }
+
+ if (st.st_dev == global_stat.st_dev
+ && st.st_ino == global_stat.st_ino)
+ {
+ global_found = true;
+ return;
+ }
+
+ /* We issue a warning if it looks like we are including two
+ different versions of the same shared library. For example,
+ there may be a problem if -lc picks up libc.so.6 but some other
+ shared library has a DT_NEEDED entry of libc.so.5. This is a
+ heuristic test, and it will only work if the name looks like
+ NAME.so.VERSION. FIXME: Depending on file names is error-prone.
+ If we really want to issue warnings about mixing version numbers
+ of shared libraries, we need to find a better way. */
+
+ if (strchr (global_needed->name, '/') != NULL)
+ return;
+ suffix = strstr (global_needed->name, ".so.");
+ if (suffix == NULL)
+ return;
+ suffix += sizeof ".so." - 1;
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname == NULL)
+ soname = basename (s->filename);
+
+ if (strncmp (soname, global_needed->name,
+ suffix - global_needed->name) == 0)
+ einfo ("%P: warning: %s, needed by %B, may conflict with %s\n",
+ global_needed->name, global_needed->by, soname);
+}
+
+
+/* This function is called for each possible name for a dynamic object
+ named by a DT_NEEDED entry. The FORCE parameter indicates whether
+ to skip the check for a conflicting version. */
static boolean
-gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
- const char *arch;
- search_dirs_type *search;
- lang_input_statement_type *entry;
+gld${EMULATION_NAME}_try_needed (name, force)
+ const char *name;
+ int force;
{
- const char *filename;
- char *string;
+ bfd *abfd;
+ const char *soname;
- if (! entry->is_archive)
+ abfd = bfd_openr (name, bfd_get_target (output_bfd));
+ if (abfd == NULL)
return false;
+ if (! bfd_check_format (abfd, bfd_object))
+ {
+ (void) bfd_close (abfd);
+ return false;
+ }
+ if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0)
+ {
+ (void) bfd_close (abfd);
+ return false;
+ }
- filename = entry->filename;
+ /* Check whether this object would include any conflicting library
+ versions. If FORCE is set, then we skip this check; we use this
+ the second time around, if we couldn't find any compatible
+ instance of the shared library. */
+
+ if (! force)
+ {
+ struct bfd_link_needed_list *needed;
+
+ if (! bfd_elf_get_bfd_needed_list (abfd, &needed))
+ einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd);
+
+ if (needed != NULL)
+ {
+ global_vercheck_needed = needed;
+ global_vercheck_failed = false;
+ lang_for_each_input_file (gld${EMULATION_NAME}_vercheck);
+ if (global_vercheck_failed)
+ {
+ (void) bfd_close (abfd);
+ /* Return false to force the caller to move on to try
+ another file on the search path. */
+ return false;
+ }
+
+ /* But wait! It gets much worse. On Linux, if a shared
+ library does not use libc at all, we are supposed to skip
+ it the first time around in case we encounter a shared
+ library later on with the same name which does use the
+ version of libc that we want. This is much too horrible
+ to use on any system other than Linux. */
EOF
case ${target} in
- *-*-openbsd*)
- cat >>e${EMULATION_NAME}.c <<EOF
- string = gld${EMULATION_NAME}_search_dir(search->name, filename);
-EOF
- ;;
- *)
+ *-*-linux-gnu*)
cat >>e${EMULATION_NAME}.c <<EOF
- /* This allocates a few bytes too many when EXTRA_SHLIB_EXTENSION
- is defined, but it does not seem worth the headache to optimize
- away those two bytes of space. */
- string = (char *) xmalloc (strlen (search->name)
- + strlen (filename)
- + strlen (arch)
-#ifdef EXTRA_SHLIB_EXTENSION
- + strlen (EXTRA_SHLIB_EXTENSION)
-#endif
- + sizeof "/lib.so");
+ {
+ struct bfd_link_needed_list *l;
- sprintf (string, "%s/lib%s%s.so", search->name, filename, arch);
+ for (l = needed; l != NULL; l = l->next)
+ if (strncmp (l->name, "libc.so", 7) == 0)
+ break;
+ if (l == NULL)
+ {
+ (void) bfd_close (abfd);
+ return false;
+ }
+ }
EOF
;;
esac
cat >>e${EMULATION_NAME}.c <<EOF
-#ifdef EXTRA_SHLIB_EXTENSION
- /* Try the .so extension first. If that fails build a new filename
- using EXTRA_SHLIB_EXTENSION. */
- if (! ldfile_try_open_bfd (string, entry))
- sprintf (string, "%s/lib%s%s%s", search->name,
- filename, arch, EXTRA_SHLIB_EXTENSION);
-#endif
+ }
+ }
- if (! ldfile_try_open_bfd (string, entry))
+ /* We've found a dynamic object matching the DT_NEEDED entry. */
+
+ /* We have already checked that there is no other input file of the
+ same name. We must now check again that we are not including the
+ same file twice. We need to do this because on many systems
+ libc.so is a symlink to, e.g., libc.so.1. The SONAME entry will
+ reference libc.so.1. If we have already included libc.so, we
+ don't want to include libc.so.1 if they are the same file, and we
+ can only check that using stat. */
+
+ if (bfd_stat (abfd, &global_stat) != 0)
+ einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd);
+
+ /* First strip off everything before the last '/'. */
+ soname = basename (abfd->filename);
+
+ if (trace_file_tries)
+ info_msg (_("found %s at %s\n"), soname, name);
+
+ global_found = false;
+ lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed);
+ if (global_found)
{
- free (string);
- return false;
+ /* Return true to indicate that we found the file, even though
+ we aren't going to do anything with it. */
+ return true;
}
- entry->filename = string;
+ /* Tell the ELF backend that we don't want the output file to have a
+ DT_NEEDED entry for this file. */
+ bfd_elf_set_dt_needed_name (abfd, "");
- /* We have found a dynamic object to include in the link. The ELF
- backend linker will create a DT_NEEDED entry in the .dynamic
- section naming this file. If this file includes a DT_SONAME
- entry, it will be used. Otherwise, the ELF linker will just use
- the name of the file. For an archive found by searching, like
- this one, the DT_NEEDED entry should consist of just the name of
- the file, without the path information used to find it. Note
- that we only need to do this if we have a dynamic object; an
- archive will never be referenced by a DT_NEEDED entry.
+ /* Tell the ELF backend that the output file needs a DT_NEEDED
+ entry for this file if it is used to resolve the reference in
+ a regular object. */
+ bfd_elf_set_dt_needed_soname (abfd, soname);
- FIXME: This approach--using bfd_elf_set_dt_needed_name--is not
- very pretty. I haven't been able to think of anything that is
- pretty, though. */
- if (bfd_check_format (entry->the_bfd, bfd_object)
- && (entry->the_bfd->flags & DYNAMIC) != 0)
+ /* Add this file into the symbol table. */
+ if (! bfd_link_add_symbols (abfd, &link_info))
+ einfo ("%F%B: could not read symbols: %E\n", abfd);
+
+ return true;
+}
+
+
+/* Search for a needed file in a path. */
+
+static boolean
+gld${EMULATION_NAME}_search_needed (path, name, force)
+ const char *path;
+ const char *name;
+ int force;
+{
+ const char *s;
+ size_t len;
+
+ if (name[0] == '/')
+ return gld${EMULATION_NAME}_try_needed (name, force);
+
+ if (path == NULL || *path == '\0')
+ return false;
+ len = strlen (name);
+ while (1)
{
- char *needed_name;
+ char *filename, *sset;
- ASSERT (entry->is_archive && entry->search_dirs_flag);
+ s = strchr (path, ':');
+ if (s == NULL)
+ s = path + strlen (path);
- /* Rather than duplicating the logic above. Just use the
- filename we recorded earlier.
+ filename = (char *) xmalloc (s - path + len + 2);
+ if (s == path)
+ sset = filename;
+ else
+ {
+ memcpy (filename, path, s - path);
+ filename[s - path] = '/';
+ sset = filename + (s - path) + 1;
+ }
+ strcpy (sset, name);
+
+ if (gld${EMULATION_NAME}_try_needed (filename, force))
+ return true;
- First strip off everything before the last '/'. */
- filename = strrchr (entry->filename, '/');
- filename++;
+ free (filename);
- needed_name = (char *) xmalloc (strlen (filename) + 1);
- strcpy (needed_name, filename);
- bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name);
+ if (*s == '\0')
+ break;
+ path = s + 1;
}
- return true;
+ return false;
}
EOF
if [ "x${host}" = "x${target}" ] ; then
case " ${EMULATION_LIBPATH} " in
*" ${EMULATION_NAME} "*)
-cat >>e${EMULATION_NAME}.c <<EOF
+ case ${target} in
+ *-*-linux-gnu*)
+ cat >>e${EMULATION_NAME}.c <<EOF
/* For a native linker, check the file /etc/ld.so.conf for directories
in which we may find shared libraries. /etc/ld.so.conf is really
- only meaningful on Linux, but we check it on other systems anyhow. */
+ only meaningful on Linux. */
static boolean gld${EMULATION_NAME}_check_ld_so_conf
PARAMS ((const char *, int));
@@ -408,19 +648,62 @@ gld${EMULATION_NAME}_check_ld_so_conf (name, force)
}
EOF
- ;;
+ # Linux
+ ;;
+ esac
esac
fi
cat >>e${EMULATION_NAME}.c <<EOF
-/* These variables are required to pass information back and forth
- between after_open and check_needed and stat_needed and vercheck. */
+/* See if an input file matches a DT_NEEDED entry by name. */
-static struct bfd_link_needed_list *global_needed;
-static struct stat global_stat;
-static boolean global_found;
-static struct bfd_link_needed_list *global_vercheck_needed;
-static boolean global_vercheck_failed;
+static void
+gld${EMULATION_NAME}_check_needed (s)
+ lang_input_statement_type *s;
+{
+ if (global_found)
+ return;
+
+ if (s->filename != NULL)
+ {
+ const char *f;
+
+ if (strcmp (s->filename, global_needed->name) == 0)
+ {
+ global_found = true;
+ 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 (s->the_bfd != NULL)
+ {
+ const char *soname;
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname != NULL
+ && strcmp (soname, global_needed->name) == 0)
+ {
+ global_found = true;
+ return;
+ }
+ }
+}
+
+EOF
+
+if test x"$LDEMUL_AFTER_OPEN" != xgld"$EMULATION_NAME"_after_open; then
+cat >>e${EMULATION_NAME}.c <<EOF
/* This is called after all the input files have been opened. */
@@ -462,26 +745,46 @@ gld${EMULATION_NAME}_after_open ()
if (global_found)
continue;
+ if (trace_file_tries)
+ info_msg (_("%s needed by %B\n"), l->name, l->by);
+
/* We need to find this file and include the symbol table. We
want to search for the file in the same way that the dynamic
linker will search. That means that we want to use
rpath_link, rpath, then the environment variable
- LD_LIBRARY_PATH (native only), then the linker script
- LIB_SEARCH_DIRS. We look at the -L arguments to build
- search path.
+ LD_LIBRARY_PATH (native only), then the DT_RPATH/DT_RUNPATH
+ entries (native only), then the linker script LIB_SEARCH_DIRS.
+ We look at the -L arguments to build search path.
We search twice. The first time, we skip objects which may
introduce version mismatches. The second time, we force
their use. See gld${EMULATION_NAME}_vercheck comment. */
for (force = 0; force < 2; force++)
{
- char *lib_path;
size_t len;
search_dirs_type *search;
+EOF
+if [ "x${host}" = "x${target}" ] ; then
+ case " ${EMULATION_LIBPATH} " in
+ *" ${EMULATION_NAME} "*)
+cat >>e${EMULATION_NAME}.c <<EOF
+ char *lib_path;
+ struct bfd_link_needed_list *rp;
+ int found;
+EOF
+ ;;
+ esac
+fi
+cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
l->name, force))
break;
+EOF
+if [ "x${host}" = "x${target}" ] ; then
+ case " ${EMULATION_LIBPATH} " in
+ *" ${EMULATION_NAME} "*)
+cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_search_needed (command_line.rpath,
l->name, force))
break;
@@ -492,8 +795,9 @@ gld${EMULATION_NAME}_after_open ()
lib_path = getenv ("LD_RUN_PATH");
if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
force))
- break;
+ break;
}
+
len = strlen(search_head->name);
lib_path = xstrdup(search_head->name);
for (search = search_head->next; search != NULL;
@@ -506,22 +810,31 @@ gld${EMULATION_NAME}_after_open ()
lib_path[len] = ':';
strcpy(lib_path + len + 1, search->name);
len += nlen + 1;
- }
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
- force))
+ }
+
+ if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
{
- free(lib_path);
- break;
+ free(lib_path);
+ break;
}
free(lib_path);
-EOF
-if [ "x${host}" = "x${target}" ] ; then
- case " ${EMULATION_LIBPATH} " in
- *" ${EMULATION_NAME} "*)
-cat >>e${EMULATION_NAME}.c <<EOF
+
lib_path = getenv ("LD_LIBRARY_PATH");
if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
break;
+
+ found = 0;
+ rp = bfd_elf_get_runpath_list (output_bfd, &link_info);
+ for (; !found && rp != NULL; rp = rp->next)
+ {
+ found = (rp->by == l->by
+ && gld${EMULATION_NAME}_search_needed (rp->name,
+ l->name,
+ force));
+ }
+ if (found)
+ break;
+
EOF
;;
esac
@@ -546,10 +859,15 @@ EOF
if [ "x${host}" = "x${target}" ] ; then
case " ${EMULATION_LIBPATH} " in
*" ${EMULATION_NAME} "*)
-cat >>e${EMULATION_NAME}.c <<EOF
+ case ${target} in
+ *-*-linux-gnu*)
+ cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
break;
EOF
+ # Linux
+ ;;
+ esac
;;
esac
fi
@@ -564,342 +882,86 @@ cat >>e${EMULATION_NAME}.c <<EOF
}
}
-/* Search for a needed file in a path. */
-
-static boolean
-gld${EMULATION_NAME}_search_needed (path, name, force)
- const char *path;
- const char *name;
- int force;
-{
- const char *s;
- size_t len;
-
- if (path == NULL || *path == '\0')
- return false;
- len = strlen (name);
- while (1)
- {
- char *filename, *sset;
-
- s = strchr (path, ':');
- if (s == NULL)
- s = path + strlen (path);
-
- filename = (char *) xmalloc (s - path + len + 2);
- if (s == path)
- sset = filename;
- else
- {
- memcpy (filename, path, s - path);
- filename[s - path] = '/';
- sset = filename + (s - path) + 1;
- }
- strcpy (sset, name);
-
- if (gld${EMULATION_NAME}_try_needed (filename, force))
- return true;
-
- free (filename);
-
- if (*s == '\0')
- break;
- path = s + 1;
- }
-
- return false;
-}
-
-/* This function is called for each possible name for a dynamic object
- named by a DT_NEEDED entry. The FORCE parameter indicates whether
- to skip the check for a conflicting version. */
-
-static boolean
-gld${EMULATION_NAME}_try_needed (name, force)
- const char *name;
- int force;
-{
- bfd *abfd;
-
- abfd = bfd_openr (name, bfd_get_target (output_bfd));
- if (abfd == NULL)
- return false;
- if (! bfd_check_format (abfd, bfd_object))
- {
- (void) bfd_close (abfd);
- return false;
- }
- if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0)
- {
- (void) bfd_close (abfd);
- return false;
- }
-
- /* Check whether this object would include any conflicting library
- versions. If FORCE is set, then we skip this check; we use this
- the second time around, if we couldn't find any compatible
- instance of the shared library. */
-
- if (! force)
- {
- struct bfd_link_needed_list *needed;
-
- if (! bfd_elf_get_bfd_needed_list (abfd, &needed))
- einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd);
-
- if (needed != NULL)
- {
- global_vercheck_needed = needed;
- global_vercheck_failed = false;
- lang_for_each_input_file (gld${EMULATION_NAME}_vercheck);
- if (global_vercheck_failed)
- {
- (void) bfd_close (abfd);
- /* Return false to force the caller to move on to try
- another file on the search path. */
- return false;
- }
-
- /* But wait! It gets much worse. On Linux, if a shared
- library does not use libc at all, we are supposed to skip
- it the first time around in case we encounter a shared
- library later on with the same name which does use the
- version of libc that we want. This is much too horrible
- to use on any system other than Linux. */
-
EOF
-case ${target} in
- *-*-linux-gnu*)
- cat >>e${EMULATION_NAME}.c <<EOF
- {
- struct bfd_link_needed_list *l;
-
- for (l = needed; l != NULL; l = l->next)
- if (strncmp (l->name, "libc.so", 7) == 0)
- break;
- if (l == NULL)
- {
- (void) bfd_close (abfd);
- return false;
- }
- }
+fi
-EOF
- ;;
-esac
cat >>e${EMULATION_NAME}.c <<EOF
- }
- }
-
- /* We've found a dynamic object matching the DT_NEEDED entry. */
-
- /* We have already checked that there is no other input file of the
- same name. We must now check again that we are not including the
- same file twice. We need to do this because on many systems
- libc.so is a symlink to, e.g., libc.so.1. The SONAME entry will
- reference libc.so.1. If we have already included libc.so, we
- don't want to include libc.so.1 if they are the same file, and we
- can only check that using stat. */
-
- if (bfd_stat (abfd, &global_stat) != 0)
- einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd);
- global_found = false;
- lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed);
- if (global_found)
- {
- /* Return true to indicate that we found the file, even though
- we aren't going to do anything with it. */
- return true;
- }
-
- /* Tell the ELF backend that don't want the output file to have a
- DT_NEEDED entry for this file. */
- bfd_elf_set_dt_needed_name (abfd, "");
-
- /* Add this file into the symbol table. */
- if (! bfd_link_add_symbols (abfd, &link_info))
- einfo ("%F%B: could not read symbols: %E\n", abfd);
-
- return true;
-}
-/* See if an input file matches a DT_NEEDED entry by name. */
+/* Look through an expression for an assignment statement. */
static void
-gld${EMULATION_NAME}_check_needed (s)
- lang_input_statement_type *s;
+gld${EMULATION_NAME}_find_exp_assignment (exp)
+ etree_type *exp;
{
- if (global_found)
- return;
-
- if (s->filename != NULL
- && strcmp (s->filename, global_needed->name) == 0)
- {
- global_found = true;
- return;
- }
+ struct bfd_link_hash_entry *h;
- if (s->the_bfd != NULL)
+ switch (exp->type.node_class)
{
- const char *soname;
+ case etree_provide:
+ h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst,
+ false, false, false);
+ if (h == NULL)
+ break;
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname != NULL
- && strcmp (soname, global_needed->name) == 0)
- {
- global_found = true;
- return;
- }
- }
-
- if (s->search_dirs_flag
- && s->filename != NULL
- && strchr (global_needed->name, '/') == NULL)
- {
- const char *f;
+ /* We call record_link_assignment even if the symbol is defined.
+ This is because if it is defined by a dynamic object, we
+ actually want to use the value defined by the linker script,
+ not the value from the dynamic object (because we are setting
+ symbols like etext). If the symbol is defined by a regular
+ object, then, as it happens, calling record_link_assignment
+ will do no harm. */
- f = strrchr (s->filename, '/');
- if (f != NULL
- && strcmp (f + 1, global_needed->name) == 0)
+ /* Fall through. */
+ case etree_assign:
+ if (strcmp (exp->assign.dst, ".") != 0)
{
- global_found = true;
- return;
+ if (! (bfd_elf${ELFSIZE}_record_link_assignment
+ (output_bfd, &link_info, exp->assign.dst,
+ exp->type.node_class == etree_provide ? true : false)))
+ einfo ("%P%F: failed to record assignment to %s: %E\n",
+ exp->assign.dst);
}
- }
-}
-
-/* See if an input file matches a DT_NEEDED entry by running stat on
- the file. */
+ gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src);
+ break;
-static void
-gld${EMULATION_NAME}_stat_needed (s)
- lang_input_statement_type *s;
-{
- struct stat st;
- const char *suffix;
- const char *soname;
- const char *f;
+ case etree_binary:
+ gld${EMULATION_NAME}_find_exp_assignment (exp->binary.lhs);
+ gld${EMULATION_NAME}_find_exp_assignment (exp->binary.rhs);
+ break;
- if (global_found)
- return;
- if (s->the_bfd == NULL)
- return;
+ case etree_trinary:
+ gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond);
+ gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs);
+ gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs);
+ break;
- if (bfd_stat (s->the_bfd, &st) != 0)
- {
- einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd);
- return;
- }
+ case etree_unary:
+ gld${EMULATION_NAME}_find_exp_assignment (exp->unary.child);
+ break;
- if (st.st_dev == global_stat.st_dev
- && st.st_ino == global_stat.st_ino)
- {
- global_found = true;
- return;
+ default:
+ break;
}
-
- /* We issue a warning if it looks like we are including two
- different versions of the same shared library. For example,
- there may be a problem if -lc picks up libc.so.6 but some other
- shared library has a DT_NEEDED entry of libc.so.5. This is a
- hueristic test, and it will only work if the name looks like
- NAME.so.VERSION. FIXME: Depending on file names is error-prone.
- If we really want to issue warnings about mixing version numbers
- of shared libraries, we need to find a better way. */
-
- if (strchr (global_needed->name, '/') != NULL)
- return;
- suffix = strstr (global_needed->name, ".so.");
- if (suffix == NULL)
- return;
- suffix += sizeof ".so." - 1;
-
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname == NULL)
- soname = s->filename;
-
- f = strrchr (soname, '/');
- if (f != NULL)
- ++f;
- else
- f = soname;
-
- if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0)
- einfo ("%P: warning: %s, needed by %B, may conflict with %s\n",
- global_needed->name, global_needed->by, f);
}
-/* On Linux, it's possible to have different versions of the same
- shared library linked against different versions of libc. The
- dynamic linker somehow tags which libc version to use in
- /etc/ld.so.cache, and, based on the libc that it sees in the
- executable, chooses which version of the shared library to use.
-
- We try to do a similar check here by checking whether this shared
- library needs any other shared libraries which may conflict with
- libraries we have already included in the link. If it does, we
- skip it, and try to find another shared library farther on down the
- link path.
- This is called via lang_for_each_input_file.
- GLOBAL_VERCHECK_NEEDED is the list of objects needed by the object
- which we ar checking. This sets GLOBAL_VERCHECK_FAILED if we find
- a conflicting version. */
+/* This is called by the before_allocation routine via
+ lang_for_each_statement. It locates any assignment statements, and
+ tells the ELF backend about them, in case they are assignments to
+ symbols which are referred to by dynamic objects. */
static void
-gld${EMULATION_NAME}_vercheck (s)
- lang_input_statement_type *s;
+gld${EMULATION_NAME}_find_statement_assignment (s)
+ lang_statement_union_type *s;
{
- const char *soname, *f;
- struct bfd_link_needed_list *l;
-
- if (global_vercheck_failed)
- return;
- if (s->the_bfd == NULL
- || (bfd_get_file_flags (s->the_bfd) & DYNAMIC) == 0)
- return;
-
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname == NULL)
- soname = bfd_get_filename (s->the_bfd);
-
- f = strrchr (soname, '/');
- if (f != NULL)
- ++f;
- else
- f = soname;
-
- for (l = global_vercheck_needed; l != NULL; l = l->next)
- {
- const char *suffix;
-
- if (strcmp (f, l->name) == 0)
- {
- /* Probably can't happen, but it's an easy check. */
- continue;
- }
-
- if (strchr (l->name, '/') != NULL)
- continue;
-
- suffix = strstr (l->name, ".so.");
- if (suffix == NULL)
- continue;
+ if (s->header.type == lang_assignment_statement_enum)
+ gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp);
+}
- suffix += sizeof ".so." - 1;
+EOF
- if (strncmp (f, l->name, suffix - l->name) == 0)
- {
- /* Here we know that S is a dynamic object FOO.SO.VER1, and
- the object we are considering needs a dynamic object
- FOO.SO.VER2, and VER1 and VER2 are different. This
- appears to be a version mismatch, so we tell the caller
- to try a different version of this library. */
- global_vercheck_failed = true;
- return;
- }
- }
-}
+if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation; then
+cat >>e${EMULATION_NAME}.c <<EOF
/* This is called after the sections have been attached to output
sections, but before any sizes or addresses have been set. */
@@ -975,76 +1037,103 @@ gld${EMULATION_NAME}_before_allocation ()
}
}
-/* This is called by the before_allocation routine via
- lang_for_each_statement. It locates any assignment statements, and
- tells the ELF backend about them, in case they are assignments to
- symbols which are referred to by dynamic objects. */
+EOF
+fi
-static void
-gld${EMULATION_NAME}_find_statement_assignment (s)
- lang_statement_union_type *s;
-{
- if (s->header.type == lang_assignment_statement_enum)
- gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp);
-}
+if test x"$LDEMUL_OPEN_DYNAMIC_ARCHIVE" != xgld"$EMULATION_NAME"_open_dynamic_archive; then
+cat >>e${EMULATION_NAME}.c <<EOF
-/* Look through an expression for an assignment statement. */
+/* Try to open a dynamic archive. This is where we know that ELF
+ dynamic libraries have an extension of .so (or .sl on oddball systems
+ like hpux). */
-static void
-gld${EMULATION_NAME}_find_exp_assignment (exp)
- etree_type *exp;
+static boolean
+gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
+ const char *arch;
+ search_dirs_type *search;
+ lang_input_statement_type *entry;
{
- struct bfd_link_hash_entry *h;
+ const char *filename;
+ char *string;
- 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;
+ if (! entry->is_archive)
+ return false;
- /* We call record_link_assignment even if the symbol is defined.
- This is because if it is defined by a dynamic object, we
- actually want to use the value defined by the linker script,
- not the value from the dynamic object (because we are setting
- symbols like etext). If the symbol is defined by a regular
- object, then, as it happens, calling record_link_assignment
- will do no harm. */
+ filename = entry->filename;
+EOF
+case ${target} in
+ *-*-openbsd*)
+ cat >>e${EMULATION_NAME}.c <<EOF
+ string = gld${EMULATION_NAME}_search_dir(search->name, filename);
+EOF
+ ;;
+ *)
+ cat >>e${EMULATION_NAME}.c <<EOF
+ /* This allocates a few bytes too many when EXTRA_SHLIB_EXTENSION
+ is defined, but it does not seem worth the headache to optimize
+ away those two bytes of space. */
+ string = (char *) xmalloc (strlen (search->name)
+ + strlen (filename)
+ + strlen (arch)
+#ifdef EXTRA_SHLIB_EXTENSION
+ + strlen (EXTRA_SHLIB_EXTENSION)
+#endif
+ + sizeof "/lib.so");
- /* Fall through. */
- case etree_assign:
- if (strcmp (exp->assign.dst, ".") != 0)
- {
- if (! (bfd_elf${ELFSIZE}_record_link_assignment
- (output_bfd, &link_info, exp->assign.dst,
- exp->type.node_class == etree_provide ? true : false)))
- einfo ("%P%F: failed to record assignment to %s: %E\n",
- exp->assign.dst);
- }
- gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src);
- break;
+ sprintf (string, "%s/lib%s%s.so", search->name, filename, arch);
- case etree_binary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->binary.lhs);
- gld${EMULATION_NAME}_find_exp_assignment (exp->binary.rhs);
- break;
+EOF
+ ;;
+esac
+cat >>e${EMULATION_NAME}.c <<EOF
+#ifdef EXTRA_SHLIB_EXTENSION
+ /* Try the .so extension first. If that fails build a new filename
+ using EXTRA_SHLIB_EXTENSION. */
+ if (! ldfile_try_open_bfd (string, entry))
+ sprintf (string, "%s/lib%s%s%s", search->name,
+ filename, arch, EXTRA_SHLIB_EXTENSION);
+#endif
- case etree_trinary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond);
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs);
- gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs);
- break;
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ free (string);
+ return false;
+ }
- case etree_unary:
- gld${EMULATION_NAME}_find_exp_assignment (exp->unary.child);
- break;
+ entry->filename = string;
- default:
- break;
+ /* We have found a dynamic object to include in the link. The ELF
+ backend linker will create a DT_NEEDED entry in the .dynamic
+ section naming this file. If this file includes a DT_SONAME
+ entry, it will be used. Otherwise, the ELF linker will just use
+ the name of the file. For an archive found by searching, like
+ this one, the DT_NEEDED entry should consist of just the name of
+ the file, without the path information used to find it. Note
+ that we only need to do this if we have a dynamic object; an
+ archive will never be referenced by a DT_NEEDED entry.
+
+ FIXME: This approach--using bfd_elf_set_dt_needed_name--is not
+ very pretty. I haven't been able to think of anything that is
+ pretty, though. */
+ if (bfd_check_format (entry->the_bfd, bfd_object)
+ && (entry->the_bfd->flags & DYNAMIC) != 0)
+ {
+ ASSERT (entry->is_archive && entry->search_dirs_flag);
+
+ /* Rather than duplicating the logic above. Just use the
+ filename we recorded earlier. */
+
+ filename = xstrdup (basename (entry->filename));
+ bfd_elf_set_dt_needed_name (entry->the_bfd, filename);
}
+
+ return true;
}
+EOF
+fi
+cat >>e${EMULATION_NAME}.c <<EOF
+
/* A variant of lang_output_section_find. Used by place_orphan. */
static lang_output_section_statement_type *
@@ -1068,6 +1157,11 @@ output_rel_find ()
return (lang_output_section_statement_type *) NULL;
}
+EOF
+
+if test x"$LDEMUL_PLACE_ORPHAN" != xgld"$EMULATION_NAME"_place_orphan; then
+cat >>e${EMULATION_NAME}.c <<EOF
+
/* Place an orphan section. We use this to put random SHF_ALLOC
sections in the right segment. */
@@ -1088,6 +1182,8 @@ gld${EMULATION_NAME}_place_orphan (file, s)
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;
struct orphan_save *place;
lang_statement_list_type *old;
lang_statement_list_type add;
@@ -1099,16 +1195,20 @@ gld${EMULATION_NAME}_place_orphan (file, s)
secname = bfd_get_section_name (s->owner, 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)
+ if (! config.unique_orphan_sections && ! unique_section_p (secname))
{
- /* We have already placed a section with this name. */
- wild_doit (&os->children, s, os, file);
- return true;
+ /* 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)
+ {
+ /* We have already placed a section with this name. */
+ wild_doit (&os->children, s, os, file);
+ return true;
+ }
}
if (hold_text.os == NULL)
@@ -1140,12 +1240,15 @@ gld${EMULATION_NAME}_place_orphan (file, s)
if ((s->flags & SEC_ALLOC) == 0)
;
else if ((s->flags & SEC_LOAD) != 0
- && strncmp (secname, ".note", 4) == 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;
@@ -1164,26 +1267,15 @@ gld${EMULATION_NAME}_place_orphan (file, s)
/* Choose a unique name for the section. This will be needed if the
same section name appears in the input file with different
- loadable or allocateable characteristics. */
+ loadable or allocatable characteristics. */
outsecname = secname;
if (bfd_get_section_by_name (output_bfd, outsecname) != NULL)
{
- unsigned int len;
- char *newname;
- unsigned int i;
-
- len = strlen (outsecname);
- newname = xmalloc (len + 5);
- strcpy (newname, outsecname);
- i = 0;
- do
- {
- sprintf (newname + len, "%d", i);
- ++i;
- }
- while (bfd_get_section_by_name (output_bfd, newname) != NULL);
-
- outsecname = newname;
+ outsecname = bfd_get_unique_section_name (output_bfd,
+ outsecname,
+ &count);
+ if (outsecname == NULL)
+ einfo ("%F%P: place_orphan failed: %E\n");
}
/* Start building a list of statements for this section.
@@ -1324,8 +1416,14 @@ gld${EMULATION_NAME}_place_orphan (file, s)
return true;
}
+EOF
+fi
+
+if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then
+cat >>e${EMULATION_NAME}.c <<EOF
+
static char *
-gld${EMULATION_NAME}_get_script(isfile)
+gld${EMULATION_NAME}_get_script (isfile)
int *isfile;
EOF
@@ -1337,7 +1435,7 @@ then
sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
-{
+{
*isfile = 0;
if (link_info.relocateable == true && config.build_constructors == true)
@@ -1364,7 +1462,7 @@ else
# Scripts read from the filesystem.
cat >>e${EMULATION_NAME}.c <<EOF
-{
+{
*isfile = 1;
if (link_info.relocateable == true && config.build_constructors == true)
@@ -1380,51 +1478,239 @@ cat >>e${EMULATION_NAME}.c <<EOF
else
return "ldscripts/${EMULATION_NAME}.x";
}
+
EOF
+fi
+fi
+if test -n "$PARSE_AND_LIST_ARGS_CASES" -o x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+
+if test x"$LDEMUL_PARSE_ARGS" != xgld"$EMULATION_NAME"_parse_args; then
+
+if test -n "$PARSE_AND_LIST_PROLOGUE" ; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ $PARSE_AND_LIST_PROLOGUE
+EOF
fi
-if test -n "$PARSE_AND_LIST_ARGS" ; then
cat >>e${EMULATION_NAME}.c <<EOF
-static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **));
-static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE * file));
- $PARSE_AND_LIST_ARGS
+#include "getopt.h"
+
+#define OPTION_DISABLE_NEW_DTAGS (400)
+#define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1)
+#define OPTION_GROUP (OPTION_ENABLE_NEW_DTAGS + 1)
+
+static struct option longopts[] =
+{
EOF
-else
+if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
cat >>e${EMULATION_NAME}.c <<EOF
-#define gld_${EMULATION_NAME}_parse_args NULL
-#define gld_${EMULATION_NAME}_list_options NULL
+ /* getopt allows abbreviations, so we do this to stop it from
+ treating -d/-e as abbreviations for these options. */
+ {"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
+ {"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
+ {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
+ {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
+ {"Bgroup", no_argument, NULL, OPTION_GROUP},
+ {"Bgroup", no_argument, NULL, OPTION_GROUP},
EOF
+fi
+
+if test -n "$PARSE_AND_LIST_LONGOPTS" ; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ $PARSE_AND_LIST_LONGOPTS
+EOF
+fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+ {NULL, no_argument, NULL, 0}
+};
+
+
+static int gld${EMULATION_NAME}_parse_args PARAMS ((int, char **));
+
+static int
+gld${EMULATION_NAME}_parse_args (argc, argv)
+ int argc;
+ char ** argv;
+{
+ int longind;
+ int optc;
+ static int prevoptind = -1;
+ int prevopterr = opterr;
+ int wanterror;
+
+ if (prevoptind != optind)
+ opterr = 0;
+
+ wanterror = opterr;
+ prevoptind = optind;
+
+ optc = getopt_long_only (argc, argv,
+ "-${PARSE_AND_LIST_SHORTOPTS}z:", longopts,
+ &longind);
+ opterr = prevopterr;
+ switch (optc)
+ {
+ default:
+ if (wanterror)
+ xexit (1);
+ optind = prevoptind;
+ return 0;
+
+EOF
+
+if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ case OPTION_DISABLE_NEW_DTAGS:
+ link_info.new_dtags = false;
+ break;
+
+ case OPTION_ENABLE_NEW_DTAGS:
+ link_info.new_dtags = true;
+ break;
+
+ case OPTION_GROUP:
+ link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
+ /* Groups must be self-contained. */
+ link_info.no_undefined = true;
+ break;
+
+ case 'z':
+ if (strcmp (optarg, "initfirst") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
+ else if (strcmp (optarg, "interpose") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_INTERPOSE;
+ else if (strcmp (optarg, "loadfltr") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_LOADFLTR;
+ else if (strcmp (optarg, "nodefaultlib") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_NODEFLIB;
+ else if (strcmp (optarg, "nodelete") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_NODELETE;
+ else if (strcmp (optarg, "nodlopen") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_NOOPEN;
+ else if (strcmp (optarg, "nodump") == 0)
+ link_info.flags_1 |= (bfd_vma) DF_1_NODUMP;
+ else if (strcmp (optarg, "now") == 0)
+ {
+ link_info.flags |= (bfd_vma) DF_BIND_NOW;
+ link_info.flags_1 |= (bfd_vma) DF_1_NOW;
+ }
+ else if (strcmp (optarg, "origin") == 0)
+ {
+ link_info.flags |= (bfd_vma) DF_ORIGIN;
+ link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN;
+ }
+ else if (strcmp (optarg, "defs") == 0)
+ link_info.no_undefined = true;
+ /* What about the other Solaris -z options? FIXME. */
+ break;
+EOF
+fi
+
+if test -n "$PARSE_AND_LIST_ARGS_CASES" ; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ $PARSE_AND_LIST_ARGS_CASES
+EOF
+fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+ }
+
+ return 1;
+}
+
+EOF
+fi
+
+if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then
+cat >>e${EMULATION_NAME}.c <<EOF
+
+static void gld${EMULATION_NAME}_list_options PARAMS ((FILE * file));
+
+static void
+gld${EMULATION_NAME}_list_options (file)
+ FILE * file;
+{
+EOF
+
+if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ fprintf (file, _(" -Bgroup\t\tSelects group name lookup rules for DSO\n"));
+ fprintf (file, _(" --disable-new-dtags\tDisable new dynamic tags\n"));
+ fprintf (file, _(" --enable-new-dtags\tEnable new dynamic tags\n"));
+ fprintf (file, _(" -z defs\t\tDisallows undefined symbols\n"));
+ fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n"));
+ fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n"));
+ fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n"));
+ fprintf (file, _(" -z nodefaultlib\tMark object not to use default search paths\n"));
+ fprintf (file, _(" -z nodelete\t\tMark DSO non-deletable at runtime\n"));
+ 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 now\t\tMark object non-lazy runtime binding\n"));
+ fprintf (file, _(" -z origin\t\tMark object requiring immediate \$ORIGIN processing\n"));
+ fprintf (file, _("\t\t\t at runtime\n"));
+ fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n"));
+EOF
+fi
+
+if test -n "$PARSE_AND_LIST_OPTIONS" ; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ $PARSE_AND_LIST_OPTIONS
+EOF
+fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+}
+EOF
+
+if test -n "$PARSE_AND_LIST_EPILOGUE" ; then
+cat >>e${EMULATION_NAME}.c <<EOF
+ $PARSE_AND_LIST_EPILOGUE
+EOF
+fi
+fi
+else
+if test x"$LDEMUL_PARSE_ARGS" != xgld"$EMULATION_NAME"_parse_args; then
+cat >>e${EMULATION_NAME}.c <<EOF
+#define gld${EMULATION_NAME}_parse_args NULL
+EOF
+fi
+if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then
+cat >>e${EMULATION_NAME}.c <<EOF
+#define gld${EMULATION_NAME}_list_options NULL
+EOF
+fi
fi
cat >>e${EMULATION_NAME}.c <<EOF
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
{
- gld${EMULATION_NAME}_before_parse,
- syslib_default,
- 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,
+ ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse},
+ ${LDEMUL_SYSLIB-syslib_default},
+ ${LDEMUL_HLL-hll_default},
+ ${LDEMUL_AFTER_PARSE-after_parse_default},
+ ${LDEMUL_AFTER_OPEN-gld${EMULATION_NAME}_after_open},
+ ${LDEMUL_AFTER_ALLOCATION-after_allocation_default},
+ ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
+ ${LDEMUL_CHOOSE_TARGET-ldemul_default_target},
+ ${LDEMUL_BEFORE_ALLOCATION-gld${EMULATION_NAME}_before_allocation},
+ ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL, /* finish */
- NULL, /* create output section statements */
- gld${EMULATION_NAME}_open_dynamic_archive,
- gld${EMULATION_NAME}_place_orphan,
- NULL, /* set_symbols */
- gld_${EMULATION_NAME}_parse_args,
- NULL, /* unrecognized_file */
- gld_${EMULATION_NAME}_list_options,
- NULL, /* recognized_file */
- NULL /* find_potential_libraries */
+ ${LDEMUL_FINISH-NULL},
+ ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
+ ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-gld${EMULATION_NAME}_open_dynamic_archive},
+ ${LDEMUL_PLACE_ORPHAN-gld${EMULATION_NAME}_place_orphan},
+ ${LDEMUL_SET_SYMBOLS-NULL},
+ ${LDEMUL_PARSE_ARGS-gld${EMULATION_NAME}_parse_args},
+ ${LDEMUL_UNRECOGNIZED_FILE-NULL},
+ ${LDEMUL_LIST_OPTIONS-gld${EMULATION_NAME}_list_options},
+ ${LDEMUL_RECOGNIZED_FILE-NULL},
+ ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL},
};
EOF
diff --git a/gnu/usr.bin/binutils/ld/emultempl/generic.em b/gnu/usr.bin/binutils/ld/emultempl/generic.em
index 6635e09e20a..cb5c30c064f 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/generic.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/generic.em
@@ -4,7 +4,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* emulate the original gld for the given ${EMULATION_NAME}
- Copyright (C) 1991, 93, 94, 95, 96, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1994, 1996, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -31,10 +32,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
#include "ldmain.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
+
static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
diff --git a/gnu/usr.bin/binutils/ld/emultempl/gld960.em b/gnu/usr.bin/binutils/ld/emultempl/gld960.em
index ad8e5bfafa2..8d98355cb13 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/gld960.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/gld960.em
@@ -1,7 +1,7 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
-/* Copyright (C) 1991, 93, 94, 95, 1999 Free Software Foundation, Inc.
+/* Copyright 1991, 1992, 1994, 1999, 2000 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -30,11 +30,14 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307
#include "bfdlink.h"
#include "ld.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
#include "ldmain.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
+
#ifdef GNU960
static void
diff --git a/gnu/usr.bin/binutils/ld/emultempl/gld960c.em b/gnu/usr.bin/binutils/ld/emultempl/gld960c.em
index c7f162455cb..48fd95dafb1 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/gld960c.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/gld960c.em
@@ -1,7 +1,8 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
-/* Copyright (C) 1991, 93, 94, 95, 96, 1999 Free Software Foundation, Inc.
+/* Copyright 1991, 1993, 1994, 1996, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -32,11 +33,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "bfdlink.h"
#include "ld.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
#include "ldmain.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
+
#ifdef GNU960
static void
diff --git a/gnu/usr.bin/binutils/ld/emultempl/hppaelf.em b/gnu/usr.bin/binutils/ld/emultempl/hppaelf.em
index fde43628005..050020028dc 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/hppaelf.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/hppaelf.em
@@ -1,68 +1,73 @@
# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-cat >e${EMULATION_NAME}.c <<EOF
-/* An emulation for HP PA-RISC ELF linkers.
- Copyright (C) 1991, 93, 94, 95, 97, 1999 Free Software Foundation, Inc.
- Written by Steve Chamberlain steve@cygnus.com
-
-This file is part of GLD, the Gnu Linker.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-
-#include "ld.h"
-#include "ldemul.h"
-#include "ldfile.h"
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldmisc.h"
-#include "ldmain.h"
+# Copyright 1991, 1993, 1994, 1997, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+# This file is sourced from elf32.em, and defines extra hppa-elf
+# specific routines.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+
#include "ldctor.h"
+#include "elf32-hppa.h"
-/* Section in which we build stubs. */
-static asection *stub_sec;
-static lang_input_statement_type *stub_file;
+static void hppaelf_after_parse PARAMS((void));
+static void hppaelf_create_output_section_statements PARAMS ((void));
+static void hppaelf_delete_padding_statements
+ PARAMS ((lang_statement_list_type *));
+static asection *hppaelf_add_stub_section
+ PARAMS ((const char *, asection *));
+static void hppaelf_layaout_sections_again PARAMS ((void));
+static void hppaelf_finish PARAMS ((void));
-/* FIXME. This doesn't belong here. */
-extern lang_statement_list_type file_chain;
+/* Fake input file for stubs. */
+static lang_input_statement_type *stub_file;
-/* Perform some emulation specific initialization. For PA ELF we set
- up the local label prefix and the output architecture. */
+/* Type of import/export stubs to build. For a single sub-space model,
+ we can build smaller import stubs and there is no need for export
+ stubs. */
+static int multi_subspace = 0;
-static void
-hppaelf_before_parse ()
-{
- ldfile_output_architecture = bfd_arch_hppa;
-}
+/* Maximum size of a group of input sections that can be handled by
+ one stub section. A value of +/-1 indicates the bfd back-end
+ should use a suitable default size. */
+static bfd_signed_vma group_size = 1;
-/* Set the output architecture and machine. */
+/* Stops the linker merging .text sections on a relocatable link,
+ and adds millicode library to the list of input files. */
static void
-hppaelf_set_output_arch()
+hppaelf_after_parse ()
{
- unsigned long machine = 0;
-
- bfd_set_arch_mach (output_bfd, ldfile_output_architecture, machine);
+ if (link_info.relocateable)
+ lang_add_unique (".text");
+#if 0 /* enable this once we split millicode stuff from libgcc */
+ else
+ lang_add_input_file ("milli",
+ lang_input_file_is_l_enum,
+ NULL);
+#endif
}
/* This is called before the input files are opened. We create a new
- fake input file to hold the stub section. */
+ fake input file to hold the stub sections. */
static void
hppaelf_create_output_section_statements ()
@@ -80,66 +85,46 @@ hppaelf_create_output_section_statements ()
return;
}
- stub_sec = bfd_make_section_old_way (stub_file->the_bfd, ".text");
- /* Don't set SEC_RELOC until we actually have relocations in this
- section. */
- if (stub_sec == NULL
- || ! bfd_set_section_flags (stub_file->the_bfd, stub_sec,
- (SEC_HAS_CONTENTS
- | SEC_ALLOC
- | SEC_LOAD
- | SEC_CODE
- | SEC_IN_MEMORY)))
- {
- einfo ("%X%P: can not create stub section: %E\n");
- return;
- }
-
ldlang_add_file (stub_file);
}
-/* Walk all the lang statements splicing out any padding statements from
+/* Walk all the lang statements splicing out any padding statements from
the list. */
static void
-hppaelf_delete_padding_statements (s, prev)
- lang_statement_union_type *s;
- lang_statement_union_type **prev;
+hppaelf_delete_padding_statements (list)
+ lang_statement_list_type *list;
{
- lang_statement_union_type *sprev = NULL;
- for (; s != NULL; s = s->next)
+ lang_statement_union_type *s;
+ lang_statement_union_type **ps;
+ for (ps = &list->head; (s = *ps) != NULL; ps = &s->next)
{
switch (s->header.type)
{
- /* We want recursively walk these sections. */
+ /* We want to recursively walk these sections. */
case lang_constructors_statement_enum:
- hppaelf_delete_padding_statements (constructor_list.head,
- &constructor_list.head);
+ hppaelf_delete_padding_statements (&constructor_list);
break;
case lang_output_section_statement_enum:
- hppaelf_delete_padding_statements (s->output_section_statement.
- children.head,
- &s->output_section_statement.
- children.head);
+ hppaelf_delete_padding_statements (&s->output_section_statement.children);
+ break;
+
+ case lang_group_statement_enum:
+ hppaelf_delete_padding_statements (&s->group_statement.children);
break;
- /* Huh? What is a lang_wild_statement? */
case lang_wild_statement_enum:
- hppaelf_delete_padding_statements (s->wild_statement.
- children.head,
- &s->wild_statement.
- children.head);
+ hppaelf_delete_padding_statements (&s->wild_statement.children);
break;
/* Here's what we are really looking for. Splice these out of
the list. */
case lang_padding_statement_enum:
- if (sprev)
- sprev->header.next = s->header.next;
- else
- **prev = *s;
+ *ps = s->next;
+ if (*ps == NULL)
+ list->tail = ps;
break;
/* We don't care about these cases. */
@@ -157,132 +142,280 @@ hppaelf_delete_padding_statements (s, prev)
abort ();
break;
}
- sprev = s;
}
}
+
+struct hook_stub_info
+{
+ lang_statement_list_type add;
+ asection *input_section;
+};
+
+/* Traverse the linker tree to find the spot where the stub goes. */
+
+static boolean hook_in_stub
+ PARAMS ((struct hook_stub_info *, lang_statement_union_type **));
+
+static boolean
+hook_in_stub (info, lp)
+ struct hook_stub_info *info;
+ lang_statement_union_type **lp;
+{
+ lang_statement_union_type *l;
+ boolean ret;
+
+ for (; (l = *lp) != NULL; lp = &l->next)
+ {
+ switch (l->header.type)
+ {
+ case lang_constructors_statement_enum:
+ ret = hook_in_stub (info, &constructor_list.head);
+ if (ret)
+ return ret;
+ break;
+
+ case lang_output_section_statement_enum:
+ ret = hook_in_stub (info,
+ &l->output_section_statement.children.head);
+ if (ret)
+ return ret;
+ break;
+
+ case lang_wild_statement_enum:
+ ret = hook_in_stub (info, &l->wild_statement.children.head);
+ if (ret)
+ return ret;
+ break;
+
+ case lang_group_statement_enum:
+ ret = hook_in_stub (info, &l->group_statement.children.head);
+ if (ret)
+ return ret;
+ break;
+
+ case lang_input_section_enum:
+ if (l->input_section.section == info->input_section)
+ {
+ /* We've found our section. Insert the stub immediately
+ before its associated input section. */
+ *lp = info->add.head;
+ *(info->add.tail) = l;
+ return true;
+ }
+ break;
+
+ case lang_data_statement_enum:
+ case lang_reloc_statement_enum:
+ case lang_object_symbols_statement_enum:
+ case lang_output_statement_enum:
+ case lang_target_statement_enum:
+ case lang_input_statement_enum:
+ case lang_assignment_statement_enum:
+ case lang_padding_statement_enum:
+ case lang_address_statement_enum:
+ case lang_fill_statement_enum:
+ break;
+
+ default:
+ FAIL ();
+ break;
+ }
+ }
+ return false;
+}
+
+
+/* Call-back for elf32_hppa_size_stubs. */
+
+/* Create a new stub section, and arrange for it to be linked
+ immediately before INPUT_SECTION. */
+
+static asection *
+hppaelf_add_stub_section (stub_sec_name, input_section)
+ const char *stub_sec_name;
+ asection *input_section;
+{
+ asection *stub_sec;
+ flagword flags;
+ asection *output_section;
+ const char *secname;
+ lang_output_section_statement_type *os;
+ struct hook_stub_info info;
+
+ stub_sec = bfd_make_section_anyway (stub_file->the_bfd, stub_sec_name);
+ if (stub_sec == NULL)
+ goto err_ret;
+
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
+ if (!bfd_set_section_flags (stub_file->the_bfd, stub_sec, flags))
+ goto err_ret;
+
+ output_section = input_section->output_section;
+ secname = bfd_get_section_name (output_section->owner, output_section);
+ os = lang_output_section_find (secname);
+
+ info.input_section = input_section;
+ lang_list_init (&info.add);
+ wild_doit (&info.add, stub_sec, os, stub_file);
+
+ if (info.add.head == NULL)
+ goto err_ret;
+
+ if (hook_in_stub (&info, &os->children.head))
+ return stub_sec;
+
+ err_ret:
+ einfo ("%X%P: can not make stub section: %E\n");
+ return NULL;
+}
+
+
+/* Another call-back for elf32_hppa_size_stubs. */
+
+static void
+hppaelf_layaout_sections_again ()
+{
+ /* If we have changed sizes of the stub sections, then we need
+ to recalculate all the section offsets. This may mean we need to
+ add even more stubs. */
+
+ /* Delete all the padding statements, they're no longer valid. */
+ hppaelf_delete_padding_statements (stat_ptr);
+
+ /* Resize the sections. */
+ lang_size_sections (stat_ptr->head, abs_output_section,
+ &stat_ptr->head, 0, (bfd_vma) 0, false);
+
+ /* Redo special stuff. */
+ ldemul_after_allocation ();
+
+ /* Do the assignments again. */
+ lang_do_assignments (stat_ptr->head, abs_output_section,
+ (fill_type) 0, (bfd_vma) 0);
+}
+
+
/* Final emulation specific call. For the PA we use this opportunity
to build linker stubs. */
static void
hppaelf_finish ()
{
+ /* If generating a relocatable output file, then we don't
+ have to examine the relocs. */
+ if (link_info.relocateable)
+ return;
+
/* Call into the BFD backend to do the real work. */
- if (elf32_hppa_size_stubs (stub_file->the_bfd, output_bfd, &link_info)
- == false)
+ if (! elf32_hppa_size_stubs (output_bfd,
+ stub_file->the_bfd,
+ &link_info,
+ multi_subspace,
+ group_size,
+ &hppaelf_add_stub_section,
+ &hppaelf_layaout_sections_again))
{
einfo ("%X%P: can not size stub section: %E\n");
return;
}
-
- /* If the size of the stub section is nonzero, then we need
- to resize the sections, recompute the assignments, and finally
- build the stubs. */
- if (bfd_section_size (stub_file->the_bfd, stub_file->the_bfd->sections) != 0)
+
+ /* Set the global data pointer. */
+ if (! elf32_hppa_set_gp (output_bfd, &link_info))
{
- /* Delete all the padding statements, they're no longer valid. */
- hppaelf_delete_padding_statements (stat_ptr->head, &stat_ptr->head);
-
- /* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, (bfd_vma) 0, false);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head,
- abs_output_section,
- (fill_type) 0, (bfd_vma) 0);
-
- /* Now build the linker stubs. */
- if (elf32_hppa_build_stubs (stub_file->the_bfd, &link_info) == false)
- {
- einfo ("%X%P: can not build stubs: %E\n");
- return;
- }
+ einfo ("%X%P: can not set gp\n");
+ return;
}
-}
-/* The script itself gets inserted here. */
-
-static char *
-hppaelf_get_script(isfile)
- int *isfile;
-EOF
+ /* Now build the linker stubs. */
+ if (stub_file->the_bfd->sections != NULL)
+ {
+ if (! elf32_hppa_build_stubs (&link_info))
+ einfo ("%X%P: can not build stubs: %E\n");
+ }
+}
-if test -n "$COMPILE_IN"
-then
-# Scripts compiled in.
-# sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
+/* Avoid processing the fake stub_file in vercheck, stat_needed and
+ check_needed routines. */
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 0;
+static void hppa_for_each_input_file_wrapper
+ PARAMS ((lang_input_statement_type *));
+static void hppa_lang_for_each_input_file
+ PARAMS ((void (*) (lang_input_statement_type *)));
- if (link_info.relocateable == true && config.build_constructors == true)
- return
-EOF
-sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
-
-else
-# Scripts read from the filesystem.
+static void (*real_func) PARAMS ((lang_input_statement_type *));
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 1;
-
- if (link_info.relocateable == true && config.build_constructors == true)
- return "ldscripts/${EMULATION_NAME}.xu";
- else if (link_info.relocateable == true)
- return "ldscripts/${EMULATION_NAME}.xr";
- else if (!config.text_read_only)
- return "ldscripts/${EMULATION_NAME}.xbn";
- else if (!config.magic_demand_paged)
- return "ldscripts/${EMULATION_NAME}.xn";
- else
- return "ldscripts/${EMULATION_NAME}.x";
+static void hppa_for_each_input_file_wrapper (l)
+ lang_input_statement_type *l;
+{
+ if (l != stub_file)
+ (*real_func) (l);
}
-EOF
-fi
+static void
+hppa_lang_for_each_input_file (func)
+ void (*func) PARAMS ((lang_input_statement_type *));
+{
+ real_func = func;
+ lang_for_each_input_file (&hppa_for_each_input_file_wrapper);
+}
-cat >>e${EMULATION_NAME}.c <<EOF
+#define lang_for_each_input_file hppa_lang_for_each_input_file
-struct ld_emulation_xfer_struct ld_hppaelf_emulation =
-{
- hppaelf_before_parse,
- syslib_default,
- hll_default,
- after_parse_default,
- after_open_default,
- after_allocation_default,
- hppaelf_set_output_arch,
- ldemul_default_target,
- before_allocation_default,
- hppaelf_get_script,
- "hppaelf",
- "elf32-hppa",
- hppaelf_finish,
- hppaelf_create_output_section_statements,
- NULL, /* open dynamic archive */
- NULL, /* place orphan */
- NULL, /* set symbols */
- NULL, /* parse args */
- NULL, /* unrecognized file */
- NULL, /* list options */
- NULL, /* recognized file */
- NULL /* find_potential_libraries */
-};
EOF
+
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_MULTI_SUBSPACE 301
+#define OPTION_STUBGROUP_SIZE (OPTION_MULTI_SUBSPACE + 1)
+'
+
+# The options are repeated below so that no abbreviations are allowed.
+# Otherwise -s matches stub-group-size
+PARSE_AND_LIST_LONGOPTS='
+ { "multi-subspace", no_argument, NULL, OPTION_MULTI_SUBSPACE },
+ { "multi-subspace", no_argument, NULL, OPTION_MULTI_SUBSPACE },
+ { "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
+ { "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _("\
+ --multi-subspace Generate import and export stubs to support\n\
+ multiple sub-space shared libraries\n"
+ ));
+ fprintf (file, _("\
+ --stub-group-size=N Maximum size of a group of input sections that can be\n\
+ handled by one stub section. A negative value\n\
+ locates all stubs before their branches (with a\n\
+ group size of -N), while a positive value allows\n\
+ two groups of input sections, one before, and one\n\
+ after each stub section. Values of +/-1 indicate\n\
+ the linker should choose suitable defaults."
+ ));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+ case OPTION_MULTI_SUBSPACE:
+ multi_subspace = 1;
+ break;
+
+ case OPTION_STUBGROUP_SIZE:
+ {
+ const char *end;
+ group_size = bfd_scan_vma (optarg, &end, 0);
+ if (*end)
+ einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
+ }
+ break;
+'
+
+# Put these extra hppaelf routines in ld_${EMULATION_NAME}_emulation
+#
+LDEMUL_AFTER_PARSE=hppaelf_after_parse
+LDEMUL_FINISH=hppaelf_finish
+LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=hppaelf_create_output_section_statements
diff --git a/gnu/usr.bin/binutils/ld/emultempl/linux.em b/gnu/usr.bin/binutils/ld/emultempl/linux.em
index dfa855edd07..888a3ddc61c 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/linux.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/linux.em
@@ -4,7 +4,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 (C) 1991, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
Linux support by Eric Youngdale <ericy@cais.cais.com>
@@ -32,11 +33,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
#include "ldmain.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
static boolean gld${EMULATION_NAME}_open_dynamic_archive
diff --git a/gnu/usr.bin/binutils/ld/emultempl/lnk960.em b/gnu/usr.bin/binutils/ld/emultempl/lnk960.em
index a4c32579ee7..ec69b45c740 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/lnk960.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/lnk960.em
@@ -2,7 +2,8 @@
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* intel coff loader emulation specific stuff
- Copyright (C) 1991, 93, 94, 95, 96, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1994, 1995, 1996, 1999, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -28,12 +29,12 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307
/*#include "archures.h"*/
#include "ld.h"
-#include "ldemul.h"
+#include "ldmain.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
#include "ldfile.h"
-#include "ldmain.h"
+#include "ldemul.h"
typedef struct lib_list {
char *name;
diff --git a/gnu/usr.bin/binutils/ld/emultempl/mipsecoff.em b/gnu/usr.bin/binutils/ld/emultempl/mipsecoff.em
index 61ab7d4e91b..205943b69f7 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/mipsecoff.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/mipsecoff.em
@@ -4,7 +4,7 @@ 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, 95, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 2000 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.
@@ -31,10 +31,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
#include "ldmain.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
+
static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
static void gld${EMULATION_NAME}_after_open PARAMS ((void));
static void check_sections PARAMS ((bfd *, asection *, PTR));
diff --git a/gnu/usr.bin/binutils/ld/emultempl/pe.em b/gnu/usr.bin/binutils/ld/emultempl/pe.em
index d13bb40be36..feab3387014 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/pe.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/pe.em
@@ -4,7 +4,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, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 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
@@ -37,11 +38,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldgram.h"
#include "ldexp.h"
#include "ldlang.h"
+#include "ldfile.h"
#include "ldemul.h"
#include "ldlex.h"
#include "ldmisc.h"
#include "ldctor.h"
-#include "ldfile.h"
#include "coff/internal.h"
/* FIXME: This is a BFD internal header file, and we should not be
@@ -102,11 +103,11 @@ static void gld_${EMULATION_NAME}_after_parse PARAMS ((void));
static void gld_${EMULATION_NAME}_before_allocation PARAMS ((void));
static boolean gld_${EMULATION_NAME}_place_orphan
PARAMS ((lang_input_statement_type *, asection *));
-static void gld${EMULATION_NAME}_place_section
- PARAMS ((lang_statement_union_type *));
static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *));
static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **));
static void gld_${EMULATION_NAME}_finish PARAMS ((void));
+static boolean gld_${EMULATION_NAME}_open_dynamic_archive
+ PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
static struct internal_extra_pe_aouthdr pe;
static int dll;
@@ -114,10 +115,12 @@ static int support_old_code = 0;
static char * thumb_entry_symbol = NULL;
static lang_assignment_statement_type *image_base_statement = 0;
-static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
#ifdef DLL_SUPPORT
-static char *pe_out_def_filename = 0;
-static char *pe_implib_filename = 0;
+static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
+static char *pe_out_def_filename = NULL;
+static char *pe_implib_filename = NULL;
+static int pe_enable_auto_image_base = 0;
+static char *pe_dll_search_prefix = NULL;
#endif
extern const char *output_filename;
@@ -169,9 +172,12 @@ gld_${EMULATION_NAME}_before_parse()
#define OPTION_THUMB_ENTRY (OPTION_IMPLIB_FILENAME + 1)
#define OPTION_WARN_DUPLICATE_EXPORTS (OPTION_THUMB_ENTRY + 1)
#define OPTION_IMP_COMPAT (OPTION_WARN_DUPLICATE_EXPORTS + 1)
+#define OPTION_ENABLE_AUTO_IMAGE_BASE (OPTION_IMP_COMPAT + 1)
+#define OPTION_DISABLE_AUTO_IMAGE_BASE (OPTION_ENABLE_AUTO_IMAGE_BASE + 1)
+#define OPTION_DLL_SEARCH_PREFIX (OPTION_DISABLE_AUTO_IMAGE_BASE + 1)
+#define OPTION_NO_DEFAULT_EXCLUDES (OPTION_DLL_SEARCH_PREFIX + 1)
-static struct option longopts[] =
-{
+static struct option longopts[] = {
/* PE options */
{"base-file", required_argument, NULL, OPTION_BASE_FILE},
{"dll", no_argument, NULL, OPTION_DLL},
@@ -203,6 +209,10 @@ static struct option longopts[] =
{"out-implib", required_argument, NULL, OPTION_IMPLIB_FILENAME},
{"warn-duplicate-exports", no_argument, NULL, OPTION_WARN_DUPLICATE_EXPORTS},
{"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT},
+ {"enable-auto-image-base", no_argument, NULL, OPTION_ENABLE_AUTO_IMAGE_BASE},
+ {"disable-auto-image-base", no_argument, NULL, OPTION_DISABLE_AUTO_IMAGE_BASE},
+ {"dll-search-prefix", required_argument, NULL, OPTION_DLL_SEARCH_PREFIX},
+ {"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
#endif
{NULL, no_argument, NULL, 0}
};
@@ -242,7 +252,7 @@ static definfo init[] =
#endif
D(MinorSubsystemVersion,"__minor_subsystem_version__", 0),
D(Subsystem,"__subsystem__", ${SUBSYSTEM}),
- D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x2000000),
+ D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000),
D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000),
D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000),
D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000),
@@ -282,6 +292,12 @@ gld_${EMULATION_NAME}_list_options (file)
fprintf (file, _(" --warn-duplicate-exports Warn about duplicate exports.\n"));
fprintf (file, _(" --compat-implib Create backward compatible import libs;\n"));
fprintf (file, _(" create __imp_<SYMBOL> as well.\n"));
+ fprintf (file, _(" --enable-auto-image-base Automatically choose image base for DLLs\n"));
+ fprintf (file, _(" unless user specifies one\n"));
+ fprintf (file, _(" --disable-auto-image-base Do not auto-choose image base. (default)\n"));
+ fprintf (file, _(" --dll-search-prefix=<string> When linking dynamically to a dll witout an\n"));
+ fprintf (file, _(" importlib, use <string><basename>.dll \n"));
+ fprintf (file, _(" in preference to lib<basename>.dll \n"));
#endif
}
@@ -540,11 +556,57 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
case OPTION_IMP_COMPAT:
pe_dll_compat_implib = 1;
break;
+ case OPTION_ENABLE_AUTO_IMAGE_BASE:
+ pe_enable_auto_image_base = 1;
+ break;
+ case OPTION_DISABLE_AUTO_IMAGE_BASE:
+ pe_enable_auto_image_base = 0;
+ break;
+ case OPTION_DLL_SEARCH_PREFIX:
+ pe_dll_search_prefix = xstrdup( optarg );
+ break;
+ case OPTION_NO_DEFAULT_EXCLUDES:
+ pe_dll_do_default_excludes = 0;
+ break;
#endif
}
return 1;
}
+
+#ifdef DLL_SUPPORT
+static unsigned long
+strhash (const char *str)
+{
+ const unsigned char *s;
+ unsigned long hash;
+ unsigned int c;
+ unsigned int len;
+
+ hash = 0;
+ len = 0;
+ s = (const unsigned char *) str;
+ while ((c = *s++) != '\0')
+ {
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ ++len;
+ }
+ hash += len + (len << 17);
+ hash ^= hash >> 2;
+
+ return hash;
+}
+
+/* Use the output file to create a image base for relocatable DLLs. */
+static unsigned long
+compute_dll_image_base (const char *ofile)
+{
+ unsigned long hash = strhash (ofile);
+ return 0x60000000 | ((hash << 16) & 0x0FFC0000);
+}
+#endif
+
/* Assign values to the special symbols before the linker script is
read. */
@@ -561,7 +623,12 @@ gld_${EMULATION_NAME}_set_symbols ()
if (link_info.relocateable)
init[IMAGEBASEOFF].value = 0;
else if (init[DLLOFF].value || link_info.shared)
+#ifdef DLL_SUPPORT
+ init[IMAGEBASEOFF].value = (pe_enable_auto_image_base) ?
+ compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE;
+#else
init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
+#endif
else
init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
}
@@ -626,6 +693,7 @@ gld_${EMULATION_NAME}_after_parse ()
ldlang_add_undef (entry_symbol);
}
+#ifdef DLL_SUPPORT
static struct bfd_link_hash_entry *pe_undef_found_sym;
static boolean
@@ -644,7 +712,6 @@ pe_undef_cdecl_match (h, string)
return true;
}
-#ifdef DLL_SUPPORT
static void
pe_fixup_stdcalls ()
{
@@ -761,6 +828,116 @@ gld_${EMULATION_NAME}_after_open ()
#endif
{
+ /* This next chunk of code tries to detect the case where you have
+ two import libraries for the same DLL (specifically,
+ symbolically linking libm.a and libc.a in cygwin to
+ libcygwin.a). In those cases, it's possible for function
+ thunks from the second implib to be used but without the
+ head/tail objects, causing an improper import table. We detect
+ those cases and rename the "other" import libraries to match
+ the one the head/tail come from, so that the linker will sort
+ things nicely and produce a valid import table. */
+
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (is->the_bfd->my_archive)
+ {
+ int idata2 = 0, reloc_count=0, is_imp = 0;
+ asection *sec;
+
+ /* See if this is an import library thunk. */
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ if (strcmp (sec->name, ".idata\$2") == 0)
+ idata2 = 1;
+ if (strncmp (sec->name, ".idata\$", 7) == 0)
+ is_imp = 1;
+ reloc_count += sec->reloc_count;
+ }
+
+ if (is_imp && !idata2 && reloc_count)
+ {
+ /* It is, look for the reference to head and see if it's
+ from our own library. */
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ int i;
+ long symsize;
+ long relsize;
+ asymbol **symbols;
+ arelent **relocs;
+ int nrelocs;
+
+ symsize = bfd_get_symtab_upper_bound (is->the_bfd);
+ if (symsize < 1)
+ break;
+ relsize = bfd_get_reloc_upper_bound (is->the_bfd, sec);
+ if (relsize < 1)
+ break;
+
+ symbols = (asymbol **) xmalloc (symsize);
+ symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
+ if (symsize < 0)
+ {
+ einfo ("%X%P: unable to process symbols: %E");
+ return;
+ }
+
+ relocs = (arelent **) xmalloc ((size_t) relsize);
+ nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec,
+ relocs, symbols);
+ if (nrelocs < 0)
+ {
+ free (relocs);
+ einfo ("%X%P: unable to process relocs: %E");
+ return;
+ }
+
+ for (i = 0; i < nrelocs; i++)
+ {
+ struct symbol_cache_entry *s;
+ struct bfd_link_hash_entry * blhe;
+ bfd *other_bfd;
+ char *n;
+
+ s = (relocs[i]->sym_ptr_ptr)[0];
+
+ if (s->flags & BSF_LOCAL)
+ continue;
+
+ /* Thunk section with reloc to another bfd. */
+ blhe = bfd_link_hash_lookup (link_info.hash,
+ s->name,
+ false, false, true);
+
+ if (blhe == NULL
+ || blhe->type != bfd_link_hash_defined)
+ continue;
+
+ other_bfd = blhe->u.def.section->owner;
+
+ if (strcmp (is->the_bfd->my_archive->filename,
+ other_bfd->my_archive->filename) == 0)
+ continue;
+
+ /* Rename this implib to match the other. */
+ n = (char *) xmalloc (strlen (other_bfd->my_archive->filename) + 1);
+
+ strcpy (n, other_bfd->my_archive->filename);
+
+ is->the_bfd->my_archive->filename = n;
+ }
+
+ free (relocs);
+ /* Note - we do not free the symbols,
+ they are now cached in the BFD. */
+ }
+ }
+ }
+ }
+ }
+
+ {
int is_ms_arch = 0;
bfd *cur_arch = 0;
lang_input_statement_type *is2;
@@ -816,7 +993,7 @@ gld_${EMULATION_NAME}_after_open ()
sprintf (new_name, "%s.%c", is->the_bfd->filename, seq);
is->the_bfd->filename = new_name;
- new_name = xmalloc (strlen(is->filename) + 3);
+ new_name = xmalloc (strlen (is->filename) + 3);
sprintf (new_name, "%s.%c", is->filename, seq);
is->filename = new_name;
}
@@ -870,10 +1047,10 @@ gld_${EMULATION_NAME}_before_allocation()
#endif /* TARGET_IS_armpe */
}
-
+#ifdef DLL_SUPPORT
/* This is called when an input file isn't recognized as a BFD. We
check here for .DEF files and pull them in automatically. */
-#ifdef DLL_SUPPORT
+
static int
saw_option(char *option)
{
@@ -883,7 +1060,7 @@ saw_option(char *option)
return init[i].inited;
return 0;
}
-#endif
+#endif /* DLL_SUPPORT */
static boolean
gld_${EMULATION_NAME}_unrecognized_file(entry)
@@ -1049,6 +1226,7 @@ gld_${EMULATION_NAME}_finish ()
pe_dll_generate_implib (pe_def_file, pe_implib_filename);
}
#if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe)
+ /* ARM doesn't need relocs. */
else
{
pe_exe_fill_sections (output_bfd, &link_info);
@@ -1057,7 +1235,7 @@ gld_${EMULATION_NAME}_finish ()
if (pe_out_def_filename)
pe_dll_generate_def_file (pe_out_def_filename);
-#endif
+#endif /* DLL_SUPPORT */
}
@@ -1074,16 +1252,12 @@ gld_${EMULATION_NAME}_finish ()
default linker script using wildcards, and are sorted by
sort_sections. */
-static asection *hold_section;
-static char *hold_section_name;
-static lang_output_section_statement_type *hold_use;
-static lang_output_section_statement_type *hold_text;
-static lang_output_section_statement_type *hold_rdata;
-static lang_output_section_statement_type *hold_data;
-static lang_output_section_statement_type *hold_bss;
-
-/* 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;
+};
/*ARGSUSED*/
static boolean
@@ -1092,17 +1266,16 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
asection *s;
{
const char *secname;
+ char *hold_section_name;
char *dollar = NULL;
-
- if ((s->flags & SEC_ALLOC) == 0)
- return false;
+ 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 = s;
-
hold_section_name = xstrdup (secname);
if (!link_info.relocateable)
{
@@ -1111,34 +1284,51 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
*dollar = '\0';
}
- hold_use = NULL;
- lang_for_each_statement (gld${EMULATION_NAME}_place_section);
+ os = lang_output_section_find (hold_section_name);
- if (hold_use == NULL)
+ lang_list_init (&add_child);
+
+ if (os != NULL
+ && os->bfd_section != NULL
+ && ((s->flags ^ os->bfd_section->flags) & (SEC_LOAD | SEC_ALLOC)) == 0)
+ {
+ wild_doit (&add_child, s, os, file);
+ }
+ else
{
- lang_output_section_statement_type *place;
+ 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;
- asection *snew, **pps;
lang_statement_list_type *old;
lang_statement_list_type add;
etree_type *address;
/* Try to put the new output section in a reasonable place based
on the section name and section flags. */
+#define HAVE_SECTION(hold, name) \
+(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
+
place = NULL;
- if ((s->flags & SEC_HAS_CONTENTS) == 0
- && hold_bss != NULL)
- place = hold_bss;
+ 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
- && hold_data != NULL)
- place = hold_data;
+ && HAVE_SECTION (hold_data, ".data"))
+ place = &hold_data;
else if ((s->flags & SEC_CODE) == 0
&& (s->flags & SEC_READONLY) != 0
- && hold_rdata != NULL)
- place = hold_rdata;
+ && HAVE_SECTION (hold_rdata, ".rdata"))
+ place = &hold_rdata;
else if ((s->flags & SEC_READONLY) != 0
- && hold_text != NULL)
- place = hold_text;
+ && 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
@@ -1165,32 +1355,33 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
outsecname = newname;
}
- /* We don't want to free OUTSECNAME, as it may get attached to
- the output section statement. */
-
- /* Create the section in the output file, and put it in the
- right place. This shuffling is to make the output file look
- neater. */
- snew = bfd_make_section (output_bfd, outsecname);
- if (snew == NULL)
- einfo ("%P%F: output format %s cannot represent section called %s\n",
- output_bfd->xvec->name, outsecname);
- if (place != NULL && place->bfd_section != NULL)
- {
- for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
- ;
- *pps = snew->next;
- snew->next = place->bfd_section->next;
- place->bfd_section->next = snew;
- }
-
/* Start building a list of statements for this section. */
old = stat_ptr;
stat_ptr = &add;
lang_list_init (stat_ptr);
- if (link_info.relocateable)
- address = NULL;
+ 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 = 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 (link_info.relocateable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
+ address = exp_intop ((bfd_vma) 0);
else
{
/* All sections in an executable must be aligned to a page
@@ -1199,105 +1390,226 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
exp_nameop (NAME, "__section_alignment__"));
}
- lang_enter_output_section_statement (outsecname, address, 0,
- (bfd_vma) 0,
- (etree_type *) NULL,
- (etree_type *) NULL,
- (etree_type *) NULL);
+ os = lang_enter_output_section_statement (outsecname, address, 0,
+ (bfd_vma) 0,
+ (etree_type *) NULL,
+ (etree_type *) NULL,
+ (etree_type *) NULL);
- hold_use = lang_output_section_statement_lookup (outsecname);
+ wild_doit (&add_child, s, os, file);
lang_leave_output_section_statement
((bfd_vma) 0, "*default*",
- (struct lang_output_section_phdr_list *) NULL,
- "*default*");
+ (struct lang_output_section_phdr_list *) NULL, "*default*");
- /* Now stick the new statement list right after PLACE. */
- if (place != NULL)
- {
- *add.tail = place->header.next;
- place->header.next = add.head;
+ 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 (dollar == NULL)
- wild_doit (&hold_use->children, s, hold_use, file);
- else
- {
- lang_statement_union_type **pl;
- boolean found_dollar;
- lang_statement_list_type list;
-
- /* The section name has a '$'. Sort it with the other '$'
- sections. */
- found_dollar = false;
- for (pl = &hold_use->children.head; *pl != NULL; pl = &(*pl)->next)
+ if (place != NULL)
{
- lang_input_section_type *ls;
- const char *lname;
+ asection *snew, **pps;
+
+ snew = os->bfd_section;
+ if (place->os->bfd_section != NULL || place->section != NULL)
+ {
+ /* Shuffle the section to make the output file look neater. */
+ if (place->section == NULL)
+ {
+#if 0
+ /* Finding the end of the list is a little tricky. We
+ make a wild stab at it by comparing section flags. */
+ flagword first_flags = place->os->bfd_section->flags;
+ for (pps = &place->os->bfd_section->next;
+ *pps != NULL && (*pps)->flags == first_flags;
+ pps = &(*pps)->next)
+ ;
+ place->section = pps;
+#else
+ /* Put orphans after the first section on the list. */
+ place->section = &place->os->bfd_section->next;
+#endif
+ }
- if ((*pl)->header.type != lang_input_section_enum)
- continue;
+ /* Unlink the section. */
+ for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
+ ;
+ *pps = snew->next;
- ls = &(*pl)->input_section;
+ /* Now tack it on to the "place->os" section list. */
+ snew->next = *place->section;
+ *place->section = snew;
+ }
+ place->section = &snew->next; /* Save the end of this list. */
- lname = bfd_get_section_name (ls->ifile->the_bfd, ls->section);
- if (strchr (lname, '$') == NULL)
+ if (place->stmt == NULL)
{
- if (found_dollar)
- break;
+ /* Put the new statement list right at the head. */
+ *add.tail = place->os->header.next;
+ place->os->header.next = add.head;
}
else
{
- found_dollar = true;
- if (strcmp (secname, lname) < 0)
- break;
+ /* Put it after the last orphan statement we added. */
+ *add.tail = *place->stmt;
+ *place->stmt = add.head;
}
- }
-
- lang_list_init (&list);
- wild_doit (&list, s, hold_use, file);
- if (list.head != NULL)
- {
- ASSERT (list.head->next == NULL);
- list.head->next = *pl;
- *pl = list.head;
+ place->stmt = add.tail; /* Save the end of this list. */
}
}
+ {
+ lang_statement_union_type **pl = &os->children.head;
+
+ if (dollar != NULL)
+ {
+ boolean found_dollar;
+
+ /* The section name has a '$'. Sort it with the other '$'
+ sections. */
+
+ found_dollar = false;
+ for ( ; *pl != NULL; pl = &(*pl)->next)
+ {
+ lang_input_section_type *ls;
+ const char *lname;
+
+ if ((*pl)->header.type != lang_input_section_enum)
+ continue;
+
+ ls = &(*pl)->input_section;
+
+ lname = bfd_get_section_name (ls->ifile->the_bfd, ls->section);
+ if (strchr (lname, '$') == NULL)
+ {
+ if (found_dollar)
+ break;
+ }
+ else
+ {
+ found_dollar = true;
+ if (strcmp (secname, lname) < 0)
+ break;
+ }
+ }
+ }
+
+ if (add_child.head != NULL)
+ {
+ add_child.head->next = *pl;
+ *pl = add_child.head;
+ }
+ }
+
free (hold_section_name);
return true;
}
-static void
-gld${EMULATION_NAME}_place_section (s)
- lang_statement_union_type *s;
+static boolean
+gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
+ const char * arch ATTRIBUTE_UNUSED;
+ search_dirs_type * search;
+ lang_input_statement_type * entry;
{
- lang_output_section_statement_type *os;
+ const char * filename;
+ char * string;
- if (s->header.type != lang_output_section_statement_enum)
- return;
+ if (! entry->is_archive)
+ return false;
- os = &s->output_section_statement;
+ filename = entry->filename;
- if (strcmp (os->name, hold_section_name) == 0
- && os->bfd_section != NULL
- && ((hold_section->flags & (SEC_LOAD | SEC_ALLOC))
- == (os->bfd_section->flags & (SEC_LOAD | SEC_ALLOC))))
- hold_use = os;
-
- if (strcmp (os->name, ".text") == 0)
- hold_text = os;
- else if (strcmp (os->name, ".rdata") == 0)
- hold_rdata = os;
- else if (strcmp (os->name, ".data") == 0)
- hold_data = os;
- else if (strcmp (os->name, ".bss") == 0)
- hold_bss = os;
+ string = (char *) xmalloc (strlen (search->name)
+ + strlen (filename)
+ + sizeof "/lib.a.dll"
+#ifdef DLL_SUPPORT
+ + (pe_dll_search_prefix ? strlen (pe_dll_search_prefix) : 0)
+#endif
+ + 1);
+
+ /* Try "libfoo.dll.a" first (preferred explicit import library for dll's */
+ sprintf (string, "%s/lib%s.dll.a", search->name, filename);
+
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ /* 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,
+ or sometimes errors occur when building legacy packages.
+
+ Putting libfoo.a here means that in a failure case (i.e. the library
+ -lfoo is not found) we will search for libfoo.a twice before
+ giving up -- once here, and once when searching for a "static" lib.
+ for a "static" lib.
+*/
+ /* Try "libfoo.a" (import lib, or static lib, but must
+ take precedence over dll's) */
+ sprintf (string, "%s/lib%s.a", search->name, filename);
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+#ifdef DLL_SUPPORT
+ if (pe_dll_search_prefix)
+ {
+ /* Try "<prefix>foo.dll" (preferred dll name, if specified) */
+ sprintf (string, "%s/%s%s.dll", search->name, pe_dll_search_prefix, filename);
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ /* Try "libfoo.dll" (default preferred dll name) */
+ sprintf (string, "%s/lib%s.dll", search->name, filename);
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ /* Finally, try "foo.dll" (alternate dll name) */
+ sprintf (string, "%s/%s.dll", search->name, filename);
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ free (string);
+ return false;
+ }
+ }
+ }
+ }
+ else /* pe_dll_search_prefix not specified */
+#endif
+ {
+ /* Try "libfoo.dll" (preferred dll name) */
+ sprintf (string, "%s/lib%s.dll", search->name, filename);
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ /* Finally, try "foo.dll" (alternate dll name) */
+ sprintf (string, "%s/%s.dll", search->name, filename);
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ free (string);
+ return false;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ entry->filename = string;
+
+ return true;
}
static int
@@ -1353,7 +1665,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
"${OUTPUT_FORMAT}",
gld_${EMULATION_NAME}_finish, /* finish */
NULL, /* create output section statements */
- NULL, /* open dynamic archive */
+ gld_${EMULATION_NAME}_open_dynamic_archive,
gld_${EMULATION_NAME}_place_orphan,
gld_${EMULATION_NAME}_set_symbols,
gld_${EMULATION_NAME}_parse_args,
diff --git a/gnu/usr.bin/binutils/ld/emultempl/sunos.em b/gnu/usr.bin/binutils/ld/emultempl/sunos.em
index a571b6b3b75..c98d87e1f76 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/sunos.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/sunos.em
@@ -4,7 +4,7 @@ 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 (C) 1991, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
SunOS shared library support by Ian Lance Taylor <ian@cygnus.com>
@@ -36,11 +36,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
#include "ldmain.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
#ifdef HAVE_DIRENT_H
# include <dirent.h>
diff --git a/gnu/usr.bin/binutils/ld/emultempl/vanilla.em b/gnu/usr.bin/binutils/ld/emultempl/vanilla.em
index 0a74abd0e08..3e6aed92e39 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/vanilla.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/vanilla.em
@@ -2,7 +2,7 @@
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* A vanilla emulation with no defaults
- Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1994, 2000 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -26,11 +26,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
#include "ldmain.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
+
static void vanilla_before_parse()
{
}
diff --git a/gnu/usr.bin/binutils/ld/genscripts.sh b/gnu/usr.bin/binutils/ld/genscripts.sh
index e929e437718..bd9db1d1418 100644
--- a/gnu/usr.bin/binutils/ld/genscripts.sh
+++ b/gnu/usr.bin/binutils/ld/genscripts.sh
@@ -1,23 +1,32 @@
#!/bin/sh
# genscripts.sh - generate the ld-emulation-target specific files
#
-# Usage: genscripts.sh srcdir libdir host target target_alias \
-# default_emulation native_lib_dirs this_emulation tool_dir
+# Usage: genscripts.sh srcdir libdir exec_prefix \
+# host target target_alias default_emulation \
+# native_lib_dirs this_emulation tool_dir
#
# Sample usage:
-# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib sparc-sun-sunos4.1.3 \
-# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 "" sun3 sparc-sun-sunos4.1.3
+# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib /usr/local \
+# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 \
+# "" sun3 sparc-sun-sunos4.1.3
# produces sun3.x sun3.xbn sun3.xn sun3.xr sun3.xu em_sun3.c
srcdir=$1
libdir=$2
-host=$3
-target=$4
-target_alias=$5
-EMULATION_LIBPATH=$6
-NATIVE_LIB_DIRS=$7
-EMULATION_NAME=$8
-tool_lib=`echo ${libdir} | sed -e 's|/lib$||'`/${9-$target_alias}/lib
+exec_prefix=$3
+host=$4
+target=$5
+target_alias=$6
+EMULATION_LIBPATH=$7
+NATIVE_LIB_DIRS=$8
+EMULATION_NAME=$9
+shift 9
+# Can't use ${1:-$target_alias} here due to an Ultrix shell bug.
+if [ "x$1" = "x" ] ; then
+ tool_lib=${exec_prefix}/${target_alias}/lib
+else
+ tool_lib=${exec_prefix}/$1/lib
+fi
# Include the emulation-specific parameters:
. ${srcdir}/emulparams/${EMULATION_NAME}.sh
diff --git a/gnu/usr.bin/binutils/ld/ld.1 b/gnu/usr.bin/binutils/ld/ld.1
index 58516b979b2..1cfbbba118e 100644
--- a/gnu/usr.bin/binutils/ld/ld.1
+++ b/gnu/usr.bin/binutils/ld/ld.1
@@ -1,6 +1,7 @@
-.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation
+.\" Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+.\" 2001 Free Software Foundation, Inc.
.\" See section COPYING for conditions for redistribution
-.TH ld 1 "17 August 1992" "cygnus support" "GNU Development Tools"
+.TH ld 1 "" "Free Software Foundation" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -28,6 +29,7 @@ ld \- the GNU linker
.I input-format\c
\&\|]
.RB "[\|" \-Bstatic "\|]"
+.RB "[\|" \-Bgroup "\|]"
.RB "[\|" \-Bdynamic "\|]"
.RB "[\|" \-Bsymbolic "\|]"
.RB "[\|" "\-c\ "\c
@@ -39,7 +41,7 @@ ld \- the GNU linker
.br
.RB "[\|" "\-defsym\ "\c
.I symbol\c
-\& = \c
+\&=\c
.I expression\c
\&\|]
.RB "[\|" \-\-demangle "\|]"
@@ -97,7 +99,7 @@ ld \- the GNU linker
.RB "[\|" \-O\c
.I level\c
\&\|]
-.RB "[\|" "\-oformat\ "\c
+.RB "[\|" "\--oformat\ "\c
.I output-format\c
\&\|]
.RB "[\|" "\-R\ "\c
@@ -122,6 +124,11 @@ ld \- the GNU linker
.RB "[\|" "\-T\ "\c
.I commandfile\c
\&\|]
+.RB "[\|" "\-\-section\-start\ "\c
+.I sectionname\c
+\&=\c
+.I sectionorg\c
+\&\|]
.RB "[\|" "\-Ttext\ "\c
.I textorg\c
\&\|]
@@ -253,8 +260,9 @@ The exceptions\(em\&which may meaningfully be used more than once\(em\&are
.B \-format\c
\&), \c
.B \-defsym\c
-\&,
-\c
+\&, \c
+.B \-\-section\-start\c
+\&, \c
.B \-L\c
\&, \c
.B \-l\c
@@ -400,6 +408,19 @@ for which shared libraries are supported. This option is normally the
default on such platforms.
.TP
+.B \-Bgroup
+Set the \c
+.B DF_1_GROUP
+\c
+flag in the \c
+.B DT_FLAGS_1
+\c
+entry in the dynamic section. This causes the runtime linker to handle
+lookups in this object and its dependencies to be performed only inside
+the group. No undefined symbols are allowed. This option is only
+meaningful on ELF platforms which support shared libraries.
+
+.TP
.B \-Bsymbolic
When creating a shared library, bind references to global symbols to
the definition within the shared library, if any. Normally, it is
@@ -454,7 +475,7 @@ specified (\c
\& has the same effect.
.TP
-.BI "-defsym " "symbol" "\fR = \fP" expression
+.BI "-defsym " "symbol" "\fR=\fP" expression
Create a global symbol in the output file, containing the absolute
address given by \c
.I expression\c
@@ -722,7 +743,7 @@ final binary.
the optimizations.
.TP
-.BI "\-oformat " "output\-format"
+.BI "\--oformat " "output\-format"
Specify the binary format for the output object file.
You don't usually need to specify this, as
\c
@@ -890,6 +911,20 @@ Similar to
but creates a new output section for each input file.
.TP
+.BI "--section-start " "sectionname" "\fR=\fP"org
+Locate a section in the output file at the absolute
+address given by \c
+.I org\c
+\&. \c
+\c
+.I org\c
+\& must be a hexadecimal integer.
+You may use this option as many
+times as necessary to locate multiple sections in the command
+line. If you need more elaborate expressions, consider
+using the linker command language from a script.
+
+.TP
.BI "\-Tbss " "org"\c
.TP
.BI "\-Tdata " "org"\c
@@ -1097,19 +1132,377 @@ The GNU Binary Utilities\c
, Roland H. Pesch.
.SH COPYING
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
-.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc.
.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
+This document is distributed under the terms of the GNU Free
+Documentation License, version 1.1. That license is described in the
+sources for this manual page, but it is not displayed here in order to
+make this manual more consise. Copies of this license can also be
+obtained from: http://www.gnu.org/copyleft/.
+
+\" .SH GNU Free Documentation License
+\" Version 1.1, March 2000
+
+\" Copyright (C) 2000 Free Software Foundation, Inc.
+\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\" Everyone is permitted to copy and distribute verbatim
+\" copies of this license document, but changing it is
+\" not allowed.
+\" .PP
+\" 0. PREAMBLE
+\" .PP
+\" The purpose of this License is to make a manual, textbook, or other
+\" written document "free" in the sense of freedom: to assure everyone
+\" the effective freedom to copy and redistribute it, with or without
+\" modifying it, either commercially or noncommercially. Secondarily,
+\" this License preserves for the author and publisher a way to get
+\" credit for their work, while not being considered responsible for
+\" modifications made by others.
+\" .PP
+\" This License is a kind of "copyleft", which means that derivative
+\" works of the document must themselves be free in the same sense. It
+\" complements the GNU General Public License, which is a copyleft
+\" license designed for free software.
+\" .PP
+\" We have designed this License in order to use it for manuals for free
+\" software, because free software needs free documentation: a free
+\" program should come with manuals providing the same freedoms that the
+\" software does. But this License is not limited to software manuals;
+\" it can be used for any textual work, regardless of subject matter or
+\" whether it is published as a printed book. We recommend this License
+\" principally for works whose purpose is instruction or reference.
+\" .PP
+\" 1. APPLICABILITY AND DEFINITIONS
+\" .PP
+\" This License applies to any manual or other work that contains a
+\" notice placed by the copyright holder saying it can be distributed
+\" under the terms of this License. The "Document", below, refers to any
+\" such manual or work. Any member of the public is a licensee, and is
+\" addressed as "you".
+\" .PP
+\" A "Modified Version" of the Document means any work containing the
+\" Document or a portion of it, either copied verbatim, or with
+\" modifications and/or translated into another language.
+\" .PP
+\" A "Secondary Section" is a named appendix or a front-matter section of
+\" the Document that deals exclusively with the relationship of the
+\" publishers or authors of the Document to the Document's overall subject
+\" (or to related matters) and contains nothing that could fall directly
+\" within that overall subject. (For example, if the Document is in part a
+\" textbook of mathematics, a Secondary Section may not explain any
+\" mathematics.) The relationship could be a matter of historical
+\" connection with the subject or with related matters, or of legal,
+\" commercial, philosophical, ethical or political position regarding
+\" them.
+\" .PP
+\" The "Invariant Sections" are certain Secondary Sections whose titles
+\" are designated, as being those of Invariant Sections, in the notice
+\" that says that the Document is released under this License.
+\" .PP
+\" The "Cover Texts" are certain short passages of text that are listed,
+\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+\" the Document is released under this License.
+\" .PP
+\" A "Transparent" copy of the Document means a machine-readable copy,
+\" represented in a format whose specification is available to the
+\" general public, whose contents can be viewed and edited directly and
+\" straightforwardly with generic text editors or (for images composed of
+\" pixels) generic paint programs or (for drawings) some widely available
+\" drawing editor, and that is suitable for input to text formatters or
+\" for automatic translation to a variety of formats suitable for input
+\" to text formatters. A copy made in an otherwise Transparent file
+\" format whose markup has been designed to thwart or discourage
+\" subsequent modification by readers is not Transparent. A copy that is
+\" not "Transparent" is called "Opaque".
+\" .PP
+\" Examples of suitable formats for Transparent copies include plain
+\" ASCII without markup, Texinfo input format, LaTeX input format, SGML
+\" or XML using a publicly available DTD, and standard-conforming simple
+\" HTML designed for human modification. Opaque formats include
+\" PostScript, PDF, proprietary formats that can be read and edited only
+\" by proprietary word processors, SGML or XML for which the DTD and/or
+\" processing tools are not generally available, and the
+\" machine-generated HTML produced by some word processors for output
+\" purposes only.
+\" .PP
+\" The "Title Page" means, for a printed book, the title page itself,
+\" plus such following pages as are needed to hold, legibly, the material
+\" this License requires to appear in the title page. For works in
+\" formats which do not have any title page as such, "Title Page" means
+\" the text near the most prominent appearance of the work's title,
+\" preceding the beginning of the body of the text.
+\" .PP
+\" 2. VERBATIM COPYING
+\" .PP
+\" You may copy and distribute the Document in any medium, either
+\" commercially or noncommercially, provided that this License, the
+\" copyright notices, and the license notice saying this License applies
+\" to the Document are reproduced in all copies, and that you add no other
+\" conditions whatsoever to those of this License. You may not use
+\" technical measures to obstruct or control the reading or further
+\" copying of the copies you make or distribute. However, you may accept
+\" compensation in exchange for copies. If you distribute a large enough
+\" number of copies you must also follow the conditions in section 3.
+\" .PP
+\" You may also lend copies, under the same conditions stated above, and
+\" you may publicly display copies.
+\" .PP
+\" 3. COPYING IN QUANTITY
+\" .PP
+\" If you publish printed copies of the Document numbering more than 100,
+\" and the Document's license notice requires Cover Texts, you must enclose
+\" the copies in covers that carry, clearly and legibly, all these Cover
+\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+\" the back cover. Both covers must also clearly and legibly identify
+\" you as the publisher of these copies. The front cover must present
+\" the full title with all words of the title equally prominent and
+\" visible. You may add other material on the covers in addition.
+\" Copying with changes limited to the covers, as long as they preserve
+\" the title of the Document and satisfy these conditions, can be treated
+\" as verbatim copying in other respects.
+\" .PP
+\" If the required texts for either cover are too voluminous to fit
+\" legibly, you should put the first ones listed (as many as fit
+\" reasonably) on the actual cover, and continue the rest onto adjacent
+\" pages.
+\" .PP
+\" If you publish or distribute Opaque copies of the Document numbering
+\" more than 100, you must either include a machine-readable Transparent
+\" copy along with each Opaque copy, or state in or with each Opaque copy
+\" a publicly-accessible computer-network location containing a complete
+\" Transparent copy of the Document, free of added material, which the
+\" general network-using public has access to download anonymously at no
+\" charge using public-standard network protocols. If you use the latter
+\" option, you must take reasonably prudent steps, when you begin
+\" distribution of Opaque copies in quantity, to ensure that this
+\" Transparent copy will remain thus accessible at the stated location
+\" until at least one year after the last time you distribute an Opaque
+\" copy (directly or through your agents or retailers) of that edition to
+\" the public.
+\" .PP
+\" It is requested, but not required, that you contact the authors of the
+\" Document well before redistributing any large number of copies, to give
+\" them a chance to provide you with an updated version of the Document.
+\" .PP
+\" 4. MODIFICATIONS
+\" .PP
+\" You may copy and distribute a Modified Version of the Document under
+\" the conditions of sections 2 and 3 above, provided that you release
+\" the Modified Version under precisely this License, with the Modified
+\" Version filling the role of the Document, thus licensing distribution
+\" and modification of the Modified Version to whoever possesses a copy
+\" of it. In addition, you must do these things in the Modified Version:
+\" .PP
+\" A. Use in the Title Page (and on the covers, if any) a title distinct
+\" from that of the Document, and from those of previous versions
+\" (which should, if there were any, be listed in the History section
+\" of the Document). You may use the same title as a previous version
+\" if the original publisher of that version gives permission.
+\" .PP
+\" B. List on the Title Page, as authors, one or more persons or entities
+\" responsible for authorship of the modifications in the Modified
+\" Version, together with at least five of the principal authors of the
+\" Document (all of its principal authors, if it has less than five).
+\" .PP
+\" C. State on the Title page the name of the publisher of the
+\" Modified Version, as the publisher.
+\" .PP
+\" D. Preserve all the copyright notices of the Document.
+\" .PP
+\" E. Add an appropriate copyright notice for your modifications
+\" adjacent to the other copyright notices.
+\" .PP
+\" F. Include, immediately after the copyright notices, a license notice
+\" giving the public permission to use the Modified Version under the
+\" terms of this License, in the form shown in the Addendum below.
+\" Preserve in that license notice the full lists of Invariant Sections
+\" and required Cover Texts given in the Document's license notice.
+\" .PP
+\" H. Include an unaltered copy of this License.
+\" .PP
+\" I. Preserve the section entitled "History", and its title, and add to
+\" it an item stating at least the title, year, new authors, and
+\" publisher of the Modified Version as given on the Title Page. If
+\" there is no section entitled "History" in the Document, create one
+\" stating the title, year, authors, and publisher of the Document as
+\" given on its Title Page, then add an item describing the Modified
+\" Version as stated in the previous sentence.
+\" .PP
+\" J. Preserve the network location, if any, given in the Document for
+\" public access to a Transparent copy of the Document, and likewise
+\" the network locations given in the Document for previous versions
+\" it was based on. These may be placed in the "History" section.
+\" You may omit a network location for a work that was published at
+\" least four years before the Document itself, or if the original
+\" publisher of the version it refers to gives permission.
+\" .PP
+\" K. In any section entitled "Acknowledgements" or "Dedications",
+\" preserve the section's title, and preserve in the section all the
+\" substance and tone of each of the contributor acknowledgements
+\" and/or dedications given therein.
+\" .PP
+\" L. Preserve all the Invariant Sections of the Document,
+\" unaltered in their text and in their titles. Section numbers
+\" or the equivalent are not considered part of the section titles.
+\" .PP
+\" M. Delete any section entitled "Endorsements". Such a section
+\" may not be included in the Modified Version.
+\" .PP
+\" N. Do not retitle any existing section as "Endorsements"
+\" or to conflict in title with any Invariant Section.
+\" .PP
+\" If the Modified Version includes new front-matter sections or
+\" appendices that qualify as Secondary Sections and contain no material
+\" copied from the Document, you may at your option designate some or all
+\" of these sections as invariant. To do this, add their titles to the
+\" list of Invariant Sections in the Modified Version's license notice.
+\" These titles must be distinct from any other section titles.
+\" .PP
+\" You may add a section entitled "Endorsements", provided it contains
+\" nothing but endorsements of your Modified Version by various
+\" parties--for example, statements of peer review or that the text has
+\" been approved by an organization as the authoritative definition of a
+\" standard.
+\" .PP
+\" You may add a passage of up to five words as a Front-Cover Text, and a
+\" passage of up to 25 words as a Back-Cover Text, to the end of the list
+\" of Cover Texts in the Modified Version. Only one passage of
+\" Front-Cover Text and one of Back-Cover Text may be added by (or
+\" through arrangements made by) any one entity. If the Document already
+\" includes a cover text for the same cover, previously added by you or
+\" by arrangement made by the same entity you are acting on behalf of,
+\" you may not add another; but you may replace the old one, on explicit
+\" permission from the previous publisher that added the old one.
+\" .PP
+\" The author(s) and publisher(s) of the Document do not by this License
+\" give permission to use their names for publicity for or to assert or
+\" imply endorsement of any Modified Version.
+\" .PP
+
+\" 5. COMBINING DOCUMENTS
+\" .PP
+\" You may combine the Document with other documents released under this
+\" License, under the terms defined in section 4 above for modified
+\" versions, provided that you include in the combination all of the
+\" Invariant Sections of all of the original documents, unmodified, and
+\" list them all as Invariant Sections of your combined work in its
+\" license notice.
+\" .PP
+\" The combined work need only contain one copy of this License, and
+\" multiple identical Invariant Sections may be replaced with a single
+\" copy. If there are multiple Invariant Sections with the same name but
+\" different contents, make the title of each such section unique by
+\" adding at the end of it, in parentheses, the name of the original
+\" author or publisher of that section if known, or else a unique number.
+\" Make the same adjustment to the section titles in the list of
+\" Invariant Sections in the license notice of the combined work.
+\" .PP
+\" In the combination, you must combine any sections entitled "History"
+\" in the various original documents, forming one section entitled
+\" "History"; likewise combine any sections entitled "Acknowledgements",
+\" and any sections entitled "Dedications". You must delete all sections
+\" entitled "Endorsements."
+\" .PP
+
+\" 6. COLLECTIONS OF DOCUMENTS
+\" .PP
+\" You may make a collection consisting of the Document and other documents
+\" released under this License, and replace the individual copies of this
+\" License in the various documents with a single copy that is included in
+\" the collection, provided that you follow the rules of this License for
+\" verbatim copying of each of the documents in all other respects.
+\" .PP
+\" You may extract a single document from such a collection, and distribute
+\" it individually under this License, provided you insert a copy of this
+\" License into the extracted document, and follow this License in all
+\" other respects regarding verbatim copying of that document.
+\" .PP
+
+\" 7. AGGREGATION WITH INDEPENDENT WORKS
+\" .PP
+\" A compilation of the Document or its derivatives with other separate
+\" and independent documents or works, in or on a volume of a storage or
+\" distribution medium, does not as a whole count as a Modified Version
+\" of the Document, provided no compilation copyright is claimed for the
+\" compilation. Such a compilation is called an "aggregate", and this
+\" License does not apply to the other self-contained works thus compiled
+\" with the Document, on account of their being thus compiled, if they
+\" are not themselves derivative works of the Document.
+\" .PP
+\" If the Cover Text requirement of section 3 is applicable to these
+\" copies of the Document, then if the Document is less than one quarter
+\" of the entire aggregate, the Document's Cover Texts may be placed on
+\" covers that surround only the Document within the aggregate.
+\" Otherwise they must appear on covers around the whole aggregate.
+\" .PP
+
+\" 8. TRANSLATION
+\" .PP
+\" Translation is considered a kind of modification, so you may
+\" distribute translations of the Document under the terms of section 4.
+\" Replacing Invariant Sections with translations requires special
+\" permission from their copyright holders, but you may include
+\" translations of some or all Invariant Sections in addition to the
+\" original versions of these Invariant Sections. You may include a
+\" translation of this License provided that you also include the
+\" original English version of this License. In case of a disagreement
+\" between the translation and the original English version of this
+\" License, the original English version will prevail.
+\" .PP
+
+\" 9. TERMINATION
+\" .PP
+\" You may not copy, modify, sublicense, or distribute the Document except
+\" as expressly provided for under this License. Any other attempt to
+\" copy, modify, sublicense or distribute the Document is void, and will
+\" automatically terminate your rights under this License. However,
+\" parties who have received copies, or rights, from you under this
+\" License will not have their licenses terminated so long as such
+\" parties remain in full compliance.
+\" .PP
+
+\" 10. FUTURE REVISIONS OF THIS LICENSE
+\" .PP
+\" The Free Software Foundation may publish new, revised versions
+\" of the GNU Free Documentation License from time to time. Such new
+\" versions will be similar in spirit to the present version, but may
+\" differ in detail to address new problems or concerns. See
+\" http://www.gnu.org/copyleft/.
+\" .PP
+\" Each version of the License is given a distinguishing version number.
+\" If the Document specifies that a particular numbered version of this
+\" License "or any later version" applies to it, you have the option of
+\" following the terms and conditions either of that specified version or
+\" of any later version that has been published (not as a draft) by the
+\" Free Software Foundation. If the Document does not specify a version
+\" number of this License, you may choose any version ever published (not
+\" as a draft) by the Free Software Foundation.
+\" .PP
+
+\" ADDENDUM: How to use this License for your documents
+\" .PP
+\" To use this License in a document you have written, include a copy of
+\" the License in the document and put the following copyright and
+\" license notices just after the title page:
+\" .PP
+\" Copyright (c) YEAR YOUR NAME.
+\" Permission is granted to copy, distribute and/or
+\" modify this document under the terms of the GNU
+\" Free Documentation License, Version 1.1 or any later
+\" version published by the Free Software Foundation;
+\" with the Invariant Sections being LIST THEIR TITLES,
+\" with the Front-Cover Texts being LIST, and with the
+\" Back-Cover Texts being LIST. A copy of the license
+\" is included in the section entitled "GNU Free
+\" Documentation License".
+\" .PP
+\" If you have no Invariant Sections, write "with no Invariant Sections"
+\" instead of saying which ones are invariant. If you have no
+\" Front-Cover Texts, write "no Front-Cover Texts" instead of
+\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+\" .PP
+\" If your document contains nontrivial examples of program code, we
+\" recommend releasing these examples in parallel under your choice of
+\" free software license, such as the GNU General Public License,
+\" to permit their use in free software.
diff --git a/gnu/usr.bin/binutils/ld/ld.h b/gnu/usr.bin/binutils/ld/ld.h
index e2052a0b445..620c3ba57bd 100644
--- a/gnu/usr.bin/binutils/ld/ld.h
+++ b/gnu/usr.bin/binutils/ld/ld.h
@@ -1,5 +1,5 @@
/* ld.h -- general linker header file
- Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -35,12 +35,11 @@
# define N_(String) (String)
# endif
#else
-/* Stubs that do something close enough. */
-# define textdomain(String) (String)
-# define gettext(String) (String)
-# define dgettext(Domain,Message) (Message)
-# define dcgettext(Domain,Message,Type) (Message)
-# define bindtextdomain(Domain,Directory) (Domain)
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define textdomain(Domainname) while (0) /* nothing */
+# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
# define _(String) (String)
# define N_(String) (String)
#endif
@@ -59,30 +58,27 @@
#define DISCARD_SECTION_NAME "/DISCARD/"
/* A file name list */
-typedef struct name_list
-{
- const char *name;
- struct name_list *next;
-} name_list;
+typedef struct name_list {
+ const char *name;
+ struct name_list *next;
+}
+name_list;
/* A wildcard specification. This is only used in ldgram.y, but it
winds up in ldgram.h, so we need to define it outside. */
-struct wildcard_spec
-{
+struct wildcard_spec {
const char *name;
struct name_list *exclude_name_list;
boolean sorted;
};
/* Extra information we hold on sections */
-typedef struct user_section_struct
-{
+typedef struct user_section_struct {
/* Pointer to the section where this data will go */
struct lang_input_statement_struct *file;
} section_userdata_type;
-
#define get_userdata(x) ((x)->userdata)
#define BYTE_SIZE (1)
@@ -98,8 +94,7 @@ typedef struct user_section_struct
#define ALIGN_N(this, boundary) \
((( (this) + ((boundary) -1)) & (~((boundary)-1))))
-typedef struct
-{
+typedef struct {
/* 1 => assign space to common symbols even if `relocatable_output'. */
boolean force_common_definition;
boolean relax;
@@ -128,7 +123,7 @@ typedef struct
file. */
boolean embedded_relocs;
- /* If true, force generation of a file with a .exe file. */
+ /* If true, force generation of a file with a .exe file. */
boolean force_exe_suffix;
/* If true, generate a cross reference report. */
@@ -156,15 +151,14 @@ typedef struct
/* If true (the default) check section addresses, once compute,
fpor overlaps. */
boolean check_section_addresses;
-
+
} args_type;
extern args_type command_line;
typedef int token_code_type;
-typedef struct
-{
+typedef struct {
bfd_size_type specified_data_size;
boolean magic_demand_paged;
boolean make_executable;
@@ -207,14 +201,17 @@ typedef struct
boolean stats;
- int split_by_reloc;
- boolean split_by_file;
+ /* If set, orphan input sections will be mapped to separate output
+ sections. */
+ boolean unique_orphan_sections;
+
+ unsigned int split_by_reloc;
+ bfd_size_type split_by_file;
} ld_config_type;
extern ld_config_type config;
-typedef enum
-{
+typedef enum {
lang_first_phase_enum,
lang_allocating_phase_enum,
lang_final_phase_enum
diff --git a/gnu/usr.bin/binutils/ld/ld.texinfo b/gnu/usr.bin/binutils/ld/ld.texinfo
index c9d0fc6c735..668c0e92f3b 100644
--- a/gnu/usr.bin/binutils/ld/ld.texinfo
+++ b/gnu/usr.bin/binutils/ld/ld.texinfo
@@ -1,5 +1,7 @@
\input texinfo
@setfilename ld.info
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+@c 2001 Free Software Foundation, Inc.
@syncodeindex ky cp
@include configdoc.texi
@c (configdoc.texi is generated by the Makefile)
@@ -20,19 +22,15 @@ This file documents the @sc{gnu} linker LD version @value{VERSION}.
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
+@ignore
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
-@ignore
Permission is granted to process this file through Tex and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
@@ -52,13 +50,12 @@ notice identical to this one except for the removal of this paragraph
@subtitle Version @value{VERSION}
@author Steve Chamberlain
@author Ian Lance Taylor
-@author Cygnus Solutions
@page
@tex
{\parskip=0pt
-\hfill Cygnus Solutions\par
-\hfill ian\@cygnus.com, doc\@cygnus.com\par
+\hfill Red Hat Inc\par
+\hfill nickc\@credhat.com, doc\@redhat.com\par
\hfill {\it Using LD, the GNU linker}\par
\hfill Edited by Jeffrey Osier (jeffrey\@cygnus.com)\par
}
@@ -66,19 +63,15 @@ notice identical to this one except for the removal of this paragraph
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
@end titlepage
@end iftex
@c FIXME: Talk about importance of *order* of args, cmds to linker!
@@ -88,6 +81,10 @@ into another language, under the above conditions for modified versions.
@top Using ld
This file documents the @sc{gnu} linker ld version @value{VERSION}.
+This document is distributed under the terms of the GNU Free
+Documentation License. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+
@menu
* Overview:: Overview
* Invocation:: Invocation
@@ -105,6 +102,9 @@ This file documents the @sc{gnu} linker ld version @value{VERSION}.
@ifset I960
* i960:: ld and the Intel 960 family
@end ifset
+@ifset TICOFF
+* TI COFF:: ld and the TI COFF
+@end ifset
@end ifclear
@ifclear SingleFormat
* BFD:: BFD
@@ -113,6 +113,7 @@ This file documents the @sc{gnu} linker ld version @value{VERSION}.
* Reporting Bugs:: Reporting Bugs
* MRI:: MRI Compatible Script Files
+* GNU Free Documentation License:: GNU Free Documentation License
* Index:: Index
@end menu
@end ifinfo
@@ -220,13 +221,20 @@ whitespace, or be given as separate arguments immediately following the
option that requires them.
For options whose names are multiple letters, either one dash or two can
-precede the option name; for example, @samp{--oformat} and
-@samp{--oformat} are equivalent. Arguments to multiple-letter options
-must either be separated from the option name by an equals sign, or be
-given as separate arguments immediately following the option that
-requires them. For example, @samp{--oformat srec} and
-@samp{--oformat=srec} are equivalent. Unique abbreviations of the names
-of multiple-letter options are accepted.
+precede the option name; for example, @samp{-trace-symbol} and
+@samp{--trace-symbol} are equivalent. Note - there is one exception to
+this rule. Multiple letter options that start with a lower case 'o' can
+only be preceeded by two dashes. This is to reduce confusion with the
+@samp{-o} option. So for example @samp{-omagic} sets the output file
+name to @samp{magic} whereas @samp{--omagic} sets the NMAGIC flag on the
+output.
+
+Arguments to multiple-letter options must either be separated from the
+option name by an equals sign, or be given as separate arguments
+immediately following the option that requires them. For example,
+@samp{--trace-symbol foo} and @samp{--trace-symbol=foo} are equivalent.
+Unique abbreviations of the names of multiple-letter options are
+accepted.
Note - if the linker is being invoked indirectly, via a compiler driver
(eg @samp{gcc}) then all the linker command line options should be
@@ -293,7 +301,7 @@ You may want to use this option if you are linking files with an unusual
binary format. You can also use @samp{-b} to switch formats explicitly (when
linking object files of different formats), by including
@samp{-b @var{input-format}} before each group of object files in a
-particular format.
+particular format.
The default format is taken from the environment variable
@code{GNUTARGET}.
@@ -321,7 +329,7 @@ specified by any @samp{-L} options.
@kindex -d
@kindex -dc
@kindex -dp
-@item -d
+@item -d
@itemx -dc
@itemx -dp
These three options are equivalent; multiple forms are supported for
@@ -333,7 +341,7 @@ script command @code{FORCE_COMMON_ALLOCATION} has the same effect.
@cindex entry point, from command line
@kindex -e @var{entry}
@kindex --entry=@var{entry}
-@item -e @var{entry}
+@item -e @var{entry}
@itemx --entry=@var{entry}
Use @var{entry} as the explicit symbol for beginning execution of your
program, rather than the default entry point. If there is no symbol
@@ -503,7 +511,7 @@ behaviour of the AIX linker.
@cindex search directory, from cmd line
@kindex -L@var{dir}
@kindex --library-path=@var{dir}
-@item -L@var{searchdir}
+@item -L@var{searchdir}
@itemx --library-path=@var{searchdir}
Add path @var{searchdir} to the list of paths that @code{ld} will search
for archive libraries and @code{ld} control scripts. You may use this
@@ -560,13 +568,13 @@ which caused the archive member to be brought in.
@item -n
@itemx --nmagic
Turn off page alignment of sections, and mark the output as
-@code{NMAGIC} if possible.
+@code{NMAGIC} if possible.
@kindex -N
@kindex --omagic
@cindex read/write from cmd line
@cindex OMAGIC
-@item -N
+@item -N
@itemx --omagic
Set the text and data sections to be readable and writable. Also, do
not page-align the data segment. If the output format supports Unix
@@ -588,6 +596,16 @@ If @var{level} is a numeric values greater than zero @code{ld} optimizes
the output. This might take significantly longer and therefore probably
should only be enabled for the final binary.
+@kindex -q
+@kindex --emit-relocs
+@cindex retain relocations in final executable
+@item -q
+@itemx --emit-relocs
+Leave relocation sections and contents in fully linked exececutables.
+Post link analysis and optimization tools may need this information in
+order to perform correct modifications of executables. This results
+in larger executables.
+
@cindex partial link
@cindex relocatable output
@kindex -r
@@ -599,7 +617,7 @@ turn serve as input to @code{ld}. This is often called @dfn{partial
linking}. As a side effect, in environments that support standard Unix
magic numbers, this option also sets the output file's magic number to
@code{OMAGIC}.
-@c ; see @code{-N}.
+@c ; see @code{-N}.
If this option is not specified, an absolute file is produced. When
linking C++ programs, this option @emph{will not} resolve references to
constructors; to do that, use @samp{-Ur}.
@@ -623,21 +641,21 @@ the @code{-rpath} option.
@kindex -s
@kindex --strip-all
@cindex strip all symbols
-@item -s
+@item -s
@itemx --strip-all
Omit all symbol information from the output file.
@kindex -S
@kindex --strip-debug
@cindex strip debugger symbols
-@item -S
+@item -S
@itemx --strip-debug
Omit debugger symbol information (but not all symbols) from the output file.
@kindex -t
@kindex --trace
@cindex input files, displaying
-@item -t
+@item -t
@itemx --trace
Print the names of the input files as @code{ld} processes them.
@@ -669,7 +687,7 @@ option is equivalent to the @code{EXTERN} linker script command.
@kindex -Ur
@cindex constructors
-@item -Ur
+@item -Ur
For anything other than C++ programs, this option is equivalent to
@samp{-r}: it generates relocatable output---i.e., an output file that can in
turn serve as input to @code{ld}. When linking C++ programs, @samp{-Ur}
@@ -679,6 +697,16 @@ with @samp{-Ur}; once the constructor table has been built, it cannot
be added to. Use @samp{-Ur} only for the last partial link, and
@samp{-r} for the others.
+@kindex --unique[=@var{SECTION}]
+@item --unique[=@var{SECTION}]
+Creates a separate output section for every input section matching
+@var{SECTION}, or if the optional wildcard @var{SECTION} argument is
+missing, for every orphan input section. An orphan section is one not
+specifically mentioned in a linker script. You may use this option
+multiple times on the command line; It prevents the normal merging of
+input sections with the same name, overriding output section assignments
+in a linker script.
+
@kindex -v
@kindex -V
@kindex --version
@@ -700,7 +728,7 @@ Delete all local symbols.
@kindex --discard-locals
@cindex local symbols, deleting
@cindex L, deleting symbols beginning
-@item -X
+@item -X
@itemx --discard-locals
Delete all temporary local symbols. For most targets, this is all local
symbols whose names begin with @samp{L}.
@@ -724,7 +752,22 @@ for Solaris compatibility.
@kindex -z @var{keyword}
@item -z @var{keyword}
-This option is ignored for Solaris compatibility.
+The recognized keywords are @code{initfirst}, @code{interpose},
+@code{loadfltr}, @code{nodefaultlib}, @code{nodelete}, @code{nodlopen},
+@code{nodump}, @code{now} and @code{origin}. The other keywords are
+ignored for Solaris compatibility. @code{initfirst} marks the object
+to be initialized first at runtime before any other objects.
+@code{interpose} marks the object that its symbol table interposes
+before all symbols but the primary executable. @code{loadfltr} marks
+the object that its filtees be processed immediately at runtime.
+@code{nodefaultlib} marks the object that the search for dependencies
+of this object will ignore any default library search paths.
+@code{nodelete} marks the object shouldn't be unloaded at runtime.
+@code{nodlopen} marks the object not available to @code{dlopen}.
+@code{nodump} marks the object can not be dumped by @code{dldump}.
+@code{now} marks the object with the non-lazy runtime binding.
+@code{origin} marks the object may contain $ORIGIN.
+@code{defs} disallows undefined symbols.
@kindex -(
@cindex groups of archives
@@ -763,11 +806,19 @@ for compatibility with various systems. You may use this option
multiple times on the command line: it affects library searching for
@code{-l} options which follow it.
+@kindex -Bgroup
+@item -Bgroup
+Set the @code{DF_1_GROUP} flag in the @code{DT_FLAGS_1} entry in the dynamic
+section. This causes the runtime linker to handle lookups in this
+object and its dependencies to be performed only inside the group.
+@code{--no-undefined} is implied. This option is only meaningful on ELF
+platforms which support shared libraries.
+
@kindex -Bstatic
@kindex -dn
@kindex -non_shared
@kindex -static
-@item -Bstatic
+@item -Bstatic
@itemx -dn
@itemx -non_shared
@itemx -static
@@ -825,17 +876,19 @@ space between @var{symbol}, the equals sign (``@key{=}''), and
@var{expression}.
@cindex demangling, from command line
-@kindex --demangle
+@kindex --demangle[=@var{style}]
@kindex --no-demangle
-@item --demangle
+@item --demangle[=@var{style}]
@itemx --no-demangle
These options control whether to demangle symbol names in error messages
and other output. When the linker is told to demangle, it tries to
present symbol names in a readable fashion: it strips leading
underscores if they are used by the object file format, and converts C++
-mangled symbol names into user readable names. The linker will demangle
-by default unless the environment variable @samp{COLLECT_NO_DEMANGLE} is
-set. These options may be used to override the default.
+mangled symbol names into user readable names. Different compilers have
+different mangling styles. The optional demangling style argument can be used
+to choose an appropriate demangling style for your compiler. The linker will
+demangle by default unless the environment variable @samp{COLLECT_NO_DEMANGLE}
+is set. These options may be used to override the default.
@cindex dynamic linker, from command line
@kindex --dynamic-linker @var{file}
@@ -882,6 +935,10 @@ specifying @samp{--no-gc-sections} on the command line.
@item --help
Print a summary of the command-line options on the standard output and exit.
+@kindex --target-help
+@item --target-help
+Print a summary of all target specific options on the standard output and exit.
+
@kindex -Map
@item -Map @var{mapfile}
Print a link map to the file @var{mapfile}. See the description of the
@@ -897,10 +954,25 @@ necessary. This may be required if @code{ld} runs out of memory space
while linking a large executable.
@kindex --no-undefined
+@kindex -z defs
@item --no-undefined
+@itemx -z defs
Normally when creating a non-symbolic shared library, undefined symbols
-are allowed and left to be resolved by the runtime loader. This option
-disallows such undefined symbols.
+are allowed and left to be resolved by the runtime loader. These options
+disallow such undefined symbols.
+
+@kindex --allow-shlib-undefined
+@item --allow-shlib-undefined
+Allow undefined symbols in shared objects even when --no-undefined is
+set. The net result will be that undefined symbols in regular objects
+will still trigger an error, but undefined symbols in shared objects
+will be ignored. The implementation of no_undefined makes the
+assumption that the runtime linker will choke on undefined symbols.
+However there is at least one system (BeOS) where undefined symbols in
+shared libraries is normal since the kernel patches them at load time to
+select which function is most appropriate for the current architecture.
+I.E. dynamically select an appropriate memset function. Apparently it
+is also normal for HPPA shared libraries to have undefined symbols.
@kindex --no-warn-mismatch
@item --no-warn-mismatch
@@ -953,7 +1025,7 @@ This option is ignored for SVR4 compatibility.
@cindex synthesizing linker
@cindex relaxing addressing modes
@item --relax
-An option with machine dependent effects.
+An option with machine dependent effects.
@ifset GENERIC
This option is only supported on a few targets.
@end ifset
@@ -1045,6 +1117,11 @@ specifies the first set of directories to search. The
either by specifying a list of names separated by colons, or by
appearing multiple times.
+This option should be used with caution as it overrides the search path
+that may have been hard compiled into a shared library. In such a case it
+is possible to use unintentionally a different search path than the
+runtime linker would do.
+
The linker uses the following search paths to locate required shared
libraries.
@enumerate
@@ -1055,11 +1132,11 @@ Any directories specified by @code{-rpath} options. The difference
between @code{-rpath} and @code{-rpath-link} is that directories
specified by @code{-rpath} options are included in the executable and
used at runtime, whereas the @code{-rpath-link} option is only effective
-at link time.
+at link time. It is for the native linker only.
@item
On an ELF system, if the @code{-rpath} and @code{rpath-link} options
were not used, search the contents of the environment variable
-@code{LD_RUN_PATH}.
+@code{LD_RUN_PATH}. It is for the native linker only.
@item
On SunOS, if the @code{-rpath} option was not used, search any
directories specified using @code{-L} options.
@@ -1067,6 +1144,11 @@ directories specified using @code{-L} options.
For a native linker, the contents of the environment variable
@code{LD_LIBRARY_PATH}.
@item
+For a native ELF linker, the directories in @code{DT_RUNPATH} or
+@code{DT_RPATH} of a shared library are searched for shared
+libraries needed by it. The @code{DT_RPATH} entries are ignored if
+@code{DT_RUNPATH} entries exist.
+@item
The default directories, normally @file{/lib} and @file{/usr/lib}.
@item
For a native linker on an ELF system, if the file @file{/etc/ld.so.conf}
@@ -1096,22 +1178,23 @@ everything else. This is to prevent gaps between symbols due to
alignment constraints.
@kindex --split-by-file
-@item --split-by-file
+@item --split-by-file [@var{size}]
Similar to @code{--split-by-reloc} but creates a new output section for
-each input file.
+each input file when @var{size} is reached. @var{size} defaults to a
+size of 1 if not given.
@kindex --split-by-reloc
-@item --split-by-reloc @var{count}
-Trys to creates extra sections in the output file so that no single
+@item --split-by-reloc [@var{count}]
+Tries to creates extra sections in the output file so that no single
output section in the file contains more than @var{count} relocations.
-This is useful when generating huge relocatable for downloading into
+This is useful when generating huge relocatable files for downloading into
certain real time kernels with the COFF object file format; since COFF
cannot represent more than 65535 relocations in a single section. Note
that this will fail to work with object file formats which do not
support arbitrary sections. The linker will not split up individual
input sections for redistribution, so if a single input section contains
more than @var{count} relocations one output section will contain that
-many relocations.
+many relocations. @var{count} defaults to a value of 32768.
@kindex --stats
@item --stats
@@ -1133,6 +1216,18 @@ full debugging information by over 30 percent. Unfortunately, the SunOS
trouble). The @samp{--traditional-format} switch tells @code{ld} to not
combine duplicate entries.
+@kindex --section-start @var{sectionname}=@var{org}
+@item --section-start @var{sectionname}=@var{org}
+Locate a section in the output file at the absolute
+address given by @var{org}. You may use this option as many
+times as necessary to locate multiple sections in the command
+line.
+@var{org} must be a single hexadecimal integer;
+for compatibility with other linkers, you may omit the leading
+@samp{0x} usually associated with hexadecimal values. @emph{Note:} there
+should be no white space between @var{sectionname}, the equals
+sign (``@key{=}''), and @var{org}.
+
@kindex -Tbss @var{org}
@kindex -Tdata @var{org}
@kindex -Ttext @var{org}
@@ -1295,6 +1390,12 @@ files. This is normally used to turn an archive file into a shared
library, forcing every object to be included in the resulting shared
library. This option may be used more than once.
+Two notes when using this option from gcc: First, gcc doesn't know
+about this option, so you have to use @code{-Wl,-whole-archive}.
+Second, don't forget to use @code{-Wl,-no-whole-archive} after your
+list of archives, because gcc will add its own list of archives to
+your link and you may not want this flag to affect those as well.
+
@kindex --wrap
@item --wrap @var{symbol}
Use a wrapper function for @var{symbol}. Any undefined reference to
@@ -1329,6 +1430,17 @@ 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 --enable-new-dtags
+@kindex --disable-new-dtags
+@item --enable-new-dtags
+@itemx --disable-new-dtags
+This linker can create the new dynamic tags in ELF. But the older ELF
+systems may not understand them. If you specify
+@code{--enable-new-dtags}, the dynamic tags will be created as needed.
+If you specify @code{--disable-new-dtags}, no new dynamic tags will be
+created. By default, the new dynamic tags are not created. Note that
+those options are only available for ELF systems.
+
@end table
@subsection Options specific to i386 PE targets
@@ -1748,15 +1860,15 @@ There are several ways to set the entry point. The linker will set the
entry point by trying each of the following methods in order, and
stopping when one of them succeeds:
@itemize @bullet
-@item
+@item
the @samp{-e} @var{entry} command-line option;
-@item
+@item
the @code{ENTRY(@var{symbol})} command in a linker script;
-@item
+@item
the value of the symbol @code{start}, if defined;
-@item
+@item
the address of the first byte of the @samp{.text} section, if present;
-@item
+@item
The address @code{0}.
@end itemize
@@ -2115,7 +2227,7 @@ in the first input file. The first section will be at address zero.
@subsection Output section description
The full description of an output section looks like this:
@smallexample
-@group
+@group
@var{section} [@var{address}] [(@var{type})] : [AT(@var{lma})]
@{
@var{output-section-command}
@@ -2406,7 +2518,7 @@ notation is now considered obsolete. It is equivalent to
@cindex KEEP
@cindex garbage collection
When link-time garbage collection is in use (@samp{--gc-sections}),
-it is often useful to mark sections that should not be eliminated.
+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))}.
@@ -2443,7 +2555,7 @@ SECTIONS @{
@}
@}
@end group
-@end smallexample
+@end smallexample
@node Output Section Data
@subsection Output section data
@@ -2486,6 +2598,16 @@ When the object file format does not have an explicit endianness, as is
true of, for example, S-records, the value will be stored in the
endianness of the first input object file.
+Note - these commands only work inside a section description and not
+between them, so the following will produce an error from the linker:
+@smallexample
+SECTIONS @{@ .text : @{@ *(.text) @}@ LONG(1) .data : @{@ *(.data) @}@ @}@
+@end smallexample
+whereas this will work:
+@smallexample
+SECTIONS @{@ .text : @{@ *(.text) ; LONG(1) @}@ .data : @{@ *(.data) @}@ @}@
+@end smallexample
+
@kindex FILL(@var{expression})
@cindex holes, filling
@cindex unspecified memory
@@ -2620,7 +2742,7 @@ section named @samp{/DISCARD/} are not included in the output file.
We showed above that the full description of an output section looked
like this:
@smallexample
-@group
+@group
@var{section} [@var{address}] [(@var{type})] : [AT(@var{lma})]
@{
@var{output-section-command}
@@ -2633,7 +2755,7 @@ We've already described @var{section}, @var{address}, and
@var{output-section-command}. In this section we will describe the
remaining section attributes.
-@menu
+@menu
* Output Section Type:: Output section type
* Output Section LMA:: Output section LMA
* Output Section Region:: Output section region
@@ -2711,7 +2833,7 @@ counter holds the VMA value, not the LMA value.
SECTIONS
@{
.text 0x1000 : @{ *(.text) _etext = . ; @}
- .mdata 0x2000 :
+ .mdata 0x2000 :
AT ( ADDR (.text) + SIZEOF (.text) )
@{ _data = . ; *(.data); _edata = . ; @}
.bss 0x3000 :
@@ -2938,7 +3060,7 @@ command. However, you can define as many blocks of memory within it as
you wish. The syntax is:
@smallexample
@group
-MEMORY
+MEMORY
@{
@var{name} [(@var{attr})] : ORIGIN = @var{origin}, LENGTH = @var{len}
@dots{}
@@ -3013,7 +3135,7 @@ region.
@smallexample
@group
-MEMORY
+MEMORY
@{
rom (rx) : ORIGIN = 0, LENGTH = 256K
ram (!rx) : org = 0x40000000, l = 4M
@@ -3217,9 +3339,9 @@ VERS_1.1 @{
global:
foo1;
local:
- old*;
- original*;
- new*;
+ old*;
+ original*;
+ new*;
@};
VERS_1.2 @{
@@ -3501,7 +3623,7 @@ precedence associativity Operators Notes
(lowest)
@end smallexample
Notes:
-(1) Prefix operators
+(1) Prefix operators
(2) @xref{Assignments}.
@c TEXI2ROFF-KILL
@end ifinfo
@@ -3519,7 +3641,7 @@ height2pt&\omit&&\omit&&\omit&\cr
height2pt&\omit&&\omit&&\omit&\cr
&highest&&&&&\cr
% '176 is tilde, '~' in tt font
-&1&&left&&\qquad- \char'176\ !\qquad\dag&\cr
+&1&&left&&\qquad- \char'176\ !\qquad\dag&\cr
&2&&left&&* / \%&\cr
&3&&left&&+ -&\cr
&4&&left&&>> <<&\cr
@@ -3574,7 +3696,7 @@ following
@group
SECTIONS
@{
- .text 9+this_isnt_constant :
+ .text 9+this_isnt_constant :
@{ *(.text) @}
@}
@end group
@@ -3649,7 +3771,7 @@ identical values:
@group
SECTIONS @{ @dots{}
.output1 :
- @{
+ @{
start_of_output_1 = ABSOLUTE(.);
@dots{}
@}
@@ -3823,6 +3945,10 @@ functionality are not listed.
* H8/300:: @code{ld} and the H8/300
* i960:: @code{ld} and the Intel 960 family
* ARM:: @code{ld} and the ARM family
+* HPPA ELF32:: @code{ld} and HPPA 32-bit ELF
+@ifset TICOFF
+* TI COFF:: @code{ld} and TI COFF
+@end ifset
@end menu
@end ifset
@@ -3958,11 +4084,55 @@ non-interworking aware Thumb code.
@cindex entry point, thumb
@kindex --thumb-entry=@var{entry}
The @samp{--thumb-entry} switch is a duplicate of the generic
-@samp{--entry} switch, in that it sets the program's starting address.
+@samp{--entry} switch, in that it sets the program's starting address.
But it also sets the bottom bit of the address, so that it can be
branched to using a BX instruction, and the program will start
executing in Thumb mode straight away.
+@node HPPA ELF32
+@section @code{ld} and HPPA 32-bit ELF support
+@cindex HPPA multiple sub-space stubs
+@kindex --multi-subspace
+When generating a shared library, @code{ld} will by default generate
+import stubs suitable for use with a single sub-space application.
+The @samp{--multi-subspace} switch causes @code{ld} to generate export
+stubs, and different (larger) import stubs suitable for use with
+multiple sub-spaces.
+
+@cindex HPPA stub grouping
+@kindex --stub-group-size=@var{N}
+Long branch stubs and import/export stubs are placed by @code{ld} in
+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
+@code{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.
+
+@ifset TICOFF
+@node TI COFF
+@section @code{ld}'s support for various TI COFF versions
+@cindex TI COFF versions
+@kindex --format=@var{version}
+The @samp{--format} switch allows selection of one of the various
+TI COFF versions. The latest of this writing is 2; versions 0 and 1 are
+also supported. The TI COFF versions also vary in header byte-order
+format; @code{ld} will read any version or byte order, but the output
+header format depends on the default specified by the specific target.
+@end ifset
+
@ifclear GENERIC
@lowersections
@end ifclear
@@ -4074,7 +4244,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
Otherwise, send bug reports for @code{ld} to
-@samp{bug-gnu-utils@@gnu.org}.
+@samp{bug-binutils@@gnu.org}.
The fundamental principle of reporting bugs usefully is this:
@strong{report all the facts}. If you are not sure whether to state a
@@ -4292,10 +4462,10 @@ This command does nothing whatever; it's only accepted for compatibility.
@cindex @code{FORMAT} (MRI)
@item FORMAT @var{output-format}
Similar to the @code{OUTPUT_FORMAT} command in the more general linker
-language, but restricted to one of these output formats:
+language, but restricted to one of these output formats:
@enumerate
-@item
+@item
S-records, if @var{output-format} is @samp{S}
@item
@@ -4353,6 +4523,370 @@ If you have more than one @code{SECT} statement for the same
@var{secname}, only the @emph{first} sets the start address.
@end table
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+@cindex GNU Free Documentation License
+
+ GNU Free Documentation License
+
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+@end smallexample
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
@node Index
@unnumbered Index
diff --git a/gnu/usr.bin/binutils/ld/ldcref.c b/gnu/usr.bin/binutils/ld/ldcref.c
index e2081066b01..6b15ffd3ee5 100644
--- a/gnu/usr.bin/binutils/ld/ldcref.c
+++ b/gnu/usr.bin/binutils/ld/ldcref.c
@@ -1,5 +1,5 @@
/* ldcref.c -- output a cross reference table
- Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -36,8 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* We keep an instance of this structure for each reference to a
symbol from a given object. */
-struct cref_ref
-{
+struct cref_ref {
/* The next reference. */
struct cref_ref *next;
/* The object. */
@@ -52,8 +51,7 @@ struct cref_ref
/* We keep a hash table of symbols. Each entry looks like this. */
-struct cref_hash_entry
-{
+struct cref_hash_entry {
struct bfd_hash_entry root;
/* The demangled name. */
char *demangled;
@@ -63,8 +61,7 @@ struct cref_hash_entry
/* This is what the hash table looks like. */
-struct cref_hash_table
-{
+struct cref_hash_table {
struct bfd_hash_table root;
};
@@ -145,7 +142,6 @@ cref_hash_newfunc (entry, table, string)
/* Add a symbol to the cref hash table. This is called for every
symbol that is seen during the link. */
-/*ARGSUSED*/
void
add_cref (name, abfd, section, value)
const char *name;
@@ -242,7 +238,7 @@ output_cref (fp)
len = strlen (msg);
while (len < FILECOL)
{
- putc (' ' , fp);
+ putc (' ', fp);
++len;
}
fprintf (fp, _("File\n"));
@@ -350,7 +346,6 @@ check_nocrossrefs ()
/* Check one symbol to see if it is a prohibited cross reference. */
-/*ARGSUSED*/
static boolean
check_nocrossref (h, ignore)
struct cref_hash_entry *h;
@@ -391,8 +386,7 @@ check_nocrossref (h, ignore)
/* The struct is used to pass information from check_refs to
check_reloc_refs through bfd_map_over_sections. */
-struct check_refs_info
-{
+struct check_refs_info {
struct cref_hash_entry *h;
asection *defsec;
struct lang_nocrossrefs *ncrs;
diff --git a/gnu/usr.bin/binutils/ld/ldctor.c b/gnu/usr.bin/binutils/ld/ldctor.c
index 0a434b812e1..1c8439bc871 100644
--- a/gnu/usr.bin/binutils/ld/ldctor.c
+++ b/gnu/usr.bin/binutils/ld/ldctor.c
@@ -1,8 +1,8 @@
/* ldctor.c -- constructor support routines
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
By Steve Chamberlain <sac@cygnus.com>
-
+
This file is part of GLD, the Gnu Linker.
GLD is free software; you can redistribute it and/or modify
@@ -86,7 +86,8 @@ ldctor_add_set_entry (h, reloc, name, section, value)
{
if (p->reloc != reloc)
{
- einfo (_("%P%X: Different relocs used in set %s\n"), h->root.string);
+ einfo (_("%P%X: Different relocs used in set %s\n"),
+ h->root.string);
return;
}
@@ -136,7 +137,7 @@ ctor_prio (name)
while (*name == '_')
++name;
- if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
+ if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
return -1;
name += sizeof "GLOBAL_" - 1;
@@ -365,7 +366,7 @@ ldctor_build_sets ()
minfo ("%G\n", e->section->owner, e->section, e->value);
}
- /* Need SEC_KEEP for --gc-sections */
+ /* Need SEC_KEEP for --gc-sections. */
if (! bfd_is_abs_section (e->section))
e->section->flags |= SEC_KEEP;
diff --git a/gnu/usr.bin/binutils/ld/ldctor.h b/gnu/usr.bin/binutils/ld/ldctor.h
index d873f77f327..7d8c848829f 100644
--- a/gnu/usr.bin/binutils/ld/ldctor.h
+++ b/gnu/usr.bin/binutils/ld/ldctor.h
@@ -1,6 +1,7 @@
/* ldctor.h - linker constructor support
- Copyright 1991, 92, 93, 94, 95, 1998 Free Software Foundation, Inc.
-
+ Copyright 1991, 1992, 1993, 1994, 1995, 1998, 2000
+ Free Software Foundation, Inc.
+
This file is part of GLD, the Gnu Linker.
GLD is free software; you can redistribute it and/or modify
@@ -31,8 +32,7 @@ extern boolean constructors_sorted;
/* We keep a list of these structures for each set we build. */
-struct set_info
-{
+struct set_info {
struct set_info *next; /* Next set. */
struct bfd_link_hash_entry *h; /* Hash table entry. */
bfd_reloc_code_real_type reloc; /* Reloc to use for an entry. */
@@ -40,8 +40,7 @@ struct set_info
struct set_element *elements; /* Elements in set. */
};
-struct set_element
-{
+struct set_element {
struct set_element *next; /* Next element. */
const char *name; /* Name in set (may be NULL). */
asection *section; /* Section of value in set. */
diff --git a/gnu/usr.bin/binutils/ld/ldemul.c b/gnu/usr.bin/binutils/ld/ldemul.c
index 08a4e47e1cf..44c8c3e7bdd 100644
--- a/gnu/usr.bin/binutils/ld/ldemul.c
+++ b/gnu/usr.bin/binutils/ld/ldemul.c
@@ -1,5 +1,5 @@
/* ldemul.c -- clearing house for ld emulation states
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -15,47 +15,48 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GLD; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "ld.h"
-#include "ldemul.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
#include "ldfile.h"
+#include "ldemul.h"
#include "ldmain.h"
#include "ldemul-list.h"
ld_emulation_xfer_type *ld_emulation;
void
-ldemul_hll(name)
+ldemul_hll (name)
char *name;
{
- ld_emulation->hll(name);
+ ld_emulation->hll (name);
}
-
-void ldemul_syslib(name)
+void
+ldemul_syslib (name)
char *name;
{
- ld_emulation->syslib(name);
+ ld_emulation->syslib (name);
}
void
-ldemul_after_parse()
+ldemul_after_parse ()
{
- ld_emulation->after_parse();
+ ld_emulation->after_parse ();
}
void
-ldemul_before_parse()
+ldemul_before_parse ()
{
- ld_emulation->before_parse();
+ ld_emulation->before_parse ();
}
void
@@ -64,52 +65,51 @@ ldemul_after_open ()
ld_emulation->after_open ();
}
-void
-ldemul_after_allocation()
+void
+ldemul_after_allocation ()
{
- ld_emulation->after_allocation();
+ ld_emulation->after_allocation ();
}
-void
-ldemul_before_allocation()
+void
+ldemul_before_allocation ()
{
if (ld_emulation->before_allocation)
- ld_emulation->before_allocation();
+ ld_emulation->before_allocation ();
}
-
void
-ldemul_set_output_arch()
+ldemul_set_output_arch ()
{
- ld_emulation->set_output_arch();
+ ld_emulation->set_output_arch ();
}
void
-ldemul_finish()
+ldemul_finish ()
{
if (ld_emulation->finish)
- ld_emulation->finish();
+ ld_emulation->finish ();
}
void
-ldemul_set_symbols()
+ldemul_set_symbols ()
{
if (ld_emulation->set_symbols)
- ld_emulation->set_symbols();
+ ld_emulation->set_symbols ();
}
void
-ldemul_create_output_section_statements()
+ldemul_create_output_section_statements ()
{
if (ld_emulation->create_output_section_statements)
- ld_emulation->create_output_section_statements();
+ ld_emulation->create_output_section_statements ();
}
char *
-ldemul_get_script(isfile)
+ldemul_get_script (isfile)
int *isfile;
{
- return ld_emulation->get_script(isfile);
+ return ld_emulation->get_script (isfile);
}
boolean
@@ -138,7 +138,7 @@ ldemul_parse_args (argc, argv)
int argc;
char **argv;
{
- /* Try and use the emulation parser if there is one. */
+ /* Try and use the emulation parser if there is one. */
if (ld_emulation->parse_args)
{
return ld_emulation->parse_args (argc, argv);
@@ -169,26 +169,25 @@ ldemul_recognized_file (entry)
}
char *
-ldemul_choose_target()
+ldemul_choose_target ()
{
- return ld_emulation->choose_target();
+ return ld_emulation->choose_target ();
}
/* The default choose_target function. */
char *
-ldemul_default_target()
+ldemul_default_target ()
{
char *from_outside = getenv (TARGET_ENVIRON);
- if (from_outside != (char *)NULL)
+ if (from_outside != (char *) NULL)
return from_outside;
return ld_emulation->target_name;
}
-void
-after_parse_default()
+void
+after_parse_default ()
{
-
}
void
@@ -197,37 +196,33 @@ after_open_default ()
}
void
-after_allocation_default()
+after_allocation_default ()
{
-
}
void
-before_allocation_default()
+before_allocation_default ()
{
-
}
void
-set_output_arch_default()
+set_output_arch_default ()
{
- /* Set the output architecture and machine if possible */
- bfd_set_arch_mach(output_bfd,
- ldfile_output_architecture, ldfile_output_machine);
+ /* Set the output architecture and machine if possible. */
+ bfd_set_arch_mach (output_bfd,
+ ldfile_output_architecture, ldfile_output_machine);
}
-/*ARGSUSED*/
void
-syslib_default(ignore)
- char *ignore ATTRIBUTE_UNUSED;
+syslib_default (ignore)
+ char *ignore ATTRIBUTE_UNUSED;
{
info_msg (_("%S SYSLIB ignored\n"));
}
-/*ARGSUSED*/
void
-hll_default(ignore)
- char *ignore ATTRIBUTE_UNUSED;
+hll_default (ignore)
+ char *ignore ATTRIBUTE_UNUSED;
{
info_msg (_("%S HLL ignored\n"));
}
@@ -235,25 +230,25 @@ hll_default(ignore)
ld_emulation_xfer_type *ld_emulations[] = { EMULATION_LIST };
void
-ldemul_choose_mode(target)
+ldemul_choose_mode (target)
char *target;
{
- ld_emulation_xfer_type **eptr = ld_emulations;
- /* Ignore "gld" prefix. */
- if (target[0] == 'g' && target[1] == 'l' && target[2] == 'd')
- target += 3;
- for (; *eptr; eptr++)
- {
- if (strcmp(target, (*eptr)->emulation_name) == 0)
- {
- ld_emulation = *eptr;
- return;
- }
- }
- einfo (_("%P: unrecognised emulation mode: %s\n"), target);
- einfo (_("Supported emulations: "));
- ldemul_list_emulations (stderr);
- einfo ("%F\n");
+ ld_emulation_xfer_type **eptr = ld_emulations;
+ /* Ignore "gld" prefix. */
+ if (target[0] == 'g' && target[1] == 'l' && target[2] == 'd')
+ target += 3;
+ for (; *eptr; eptr++)
+ {
+ if (strcmp (target, (*eptr)->emulation_name) == 0)
+ {
+ ld_emulation = *eptr;
+ return;
+ }
+ }
+ einfo (_("%P: unrecognised emulation mode: %s\n"), target);
+ einfo (_("Supported emulations: "));
+ ldemul_list_emulations (stderr);
+ einfo ("%F\n");
}
void
@@ -275,33 +270,33 @@ ldemul_list_emulations (f)
void
ldemul_list_emulation_options (f)
- FILE * f;
+ FILE *f;
{
- ld_emulation_xfer_type ** eptr;
+ ld_emulation_xfer_type **eptr;
int options_found = 0;
-
- for (eptr = ld_emulations; * eptr; eptr ++)
+
+ for (eptr = ld_emulations; *eptr; eptr++)
{
- ld_emulation_xfer_type * emul = * eptr;
-
+ ld_emulation_xfer_type *emul = *eptr;
+
if (emul->list_options)
{
fprintf (f, "%s: \n", emul->emulation_name);
-
+
emul->list_options (f);
options_found = 1;
}
}
-
+
if (! options_found)
fprintf (f, _(" no emulation specific options.\n"));
}
int
ldemul_find_potential_libraries (name, entry)
- char * name;
- lang_input_statement_type * entry;
+ char *name;
+ lang_input_statement_type *entry;
{
if (ld_emulation->find_potential_libraries)
return ld_emulation->find_potential_libraries (name, entry);
diff --git a/gnu/usr.bin/binutils/ld/ldemul.h b/gnu/usr.bin/binutils/ld/ldemul.h
index b2d91031bad..423a9d95527 100644
--- a/gnu/usr.bin/binutils/ld/ldemul.h
+++ b/gnu/usr.bin/binutils/ld/ldemul.h
@@ -1,5 +1,6 @@
/* ld-emul.h - Linker emulation header file
- Copyright 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,11 +17,6 @@
#ifndef LDEMUL_H
#define LDEMUL_H
-#if ANSI_PROTOTYPES
-struct lang_input_statement_struct;
-struct search_dirs;
-#endif
-
extern void ldemul_hll PARAMS ((char *));
extern void ldemul_syslib PARAMS ((char *));
extern void ldemul_after_parse PARAMS ((void));
@@ -58,8 +54,7 @@ extern void hll_default PARAMS ((char*));
extern int ldemul_find_potential_libraries
PARAMS ((char *, struct lang_input_statement_struct *));
-typedef struct ld_emulation_xfer_struct
-{
+typedef struct ld_emulation_xfer_struct {
/* Run before parsing the command line and script file.
Set the architecture, maybe other things. */
void (*before_parse) PARAMS ((void));
@@ -116,12 +111,12 @@ typedef struct ld_emulation_xfer_struct
boolean (*place_orphan)
PARAMS ((struct lang_input_statement_struct *, asection *));
- /* Run after assigning parsing with the args, but before
- reading the script. Used to initialize symbols used in the script. */
+ /* Run after assigning parsing with the args, but before
+ reading the script. Used to initialize symbols used in the script. */
void (*set_symbols) PARAMS ((void));
/* Run to parse args which the base linker doesn't
- understand. Return non zero on sucess. */
+ understand. Return non zero on sucess. */
int (*parse_args) PARAMS ((int, char **));
/* Run to handle files which are not recognized as object files or
@@ -143,13 +138,12 @@ typedef struct ld_emulation_xfer_struct
(For VMS files matching ":lib*.a" have also been scanned). */
int (* find_potential_libraries)
PARAMS ((char *, struct lang_input_statement_struct *));
-
+
} ld_emulation_xfer_type;
-typedef enum
-{
+typedef enum {
intel_ic960_ld_mode_enum,
- default_mode_enum ,
+ default_mode_enum,
intel_gld960_ld_mode_enum
} lang_emulation_mode_enum_type;
diff --git a/gnu/usr.bin/binutils/ld/ldexp.c b/gnu/usr.bin/binutils/ld/ldexp.c
index 0c38314ffa4..ca622f6653a 100644
--- a/gnu/usr.bin/binutils/ld/ldexp.c
+++ b/gnu/usr.bin/binutils/ld/ldexp.c
@@ -1,7 +1,8 @@
/* This module handles expression trees.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
- Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com).
+ Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
This file is part of GLD, the Gnu Linker.
@@ -20,15 +21,12 @@ 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. */
-/*
-This module is in charge of working out the contents of expressions.
-
-It has to keep track of the relative/absness of a symbol etc. This is
-done by keeping all values in a struct (an etree_value_type) which
-contains a value, a section to which it is relative and a valid bit.
-
-*/
+/* This module is in charge of working out the contents of expressions.
+ It has to keep track of the relative/absness of a symbol etc. This
+ is done by keeping all values in a struct (an etree_value_type)
+ which contains a value, a section to which it is relative and a
+ valid bit. */
#include "bfd.h"
#include "sysdep.h"
@@ -69,71 +67,71 @@ static void
exp_print_token (code)
token_code_type code;
{
- static CONST struct
- {
- token_code_type code;
- char *name;
- } table[] =
- {
- { INT, "int" },
- { REL, "relocateable" },
- { NAME,"NAME" },
- { PLUSEQ,"+=" },
- { MINUSEQ,"-=" },
- { MULTEQ,"*=" },
- { DIVEQ,"/=" },
- { LSHIFTEQ,"<<=" },
- { RSHIFTEQ,">>=" },
- { ANDEQ,"&=" },
- { OREQ,"|=" },
- { OROR,"||" },
- { ANDAND,"&&" },
- { EQ,"==" },
- { NE,"!=" },
- { LE,"<=" },
- { GE,">=" },
- { LSHIFT,"<<" },
- { RSHIFT,">>=" },
- { ALIGN_K,"ALIGN" },
- { BLOCK,"BLOCK" },
- { SECTIONS,"SECTIONS" },
- { SIZEOF_HEADERS,"SIZEOF_HEADERS" },
- { NEXT,"NEXT" },
- { SIZEOF,"SIZEOF" },
- { ADDR,"ADDR" },
- { LOADADDR,"LOADADDR" },
- { MEMORY,"MEMORY" },
- { DEFINED,"DEFINED" },
- { TARGET_K,"TARGET" },
- { SEARCH_DIR,"SEARCH_DIR" },
- { MAP,"MAP" },
- { QUAD,"QUAD" },
- { SQUAD,"SQUAD" },
- { LONG,"LONG" },
- { SHORT,"SHORT" },
- { BYTE,"BYTE" },
- { ENTRY,"ENTRY" },
- { 0,(char *)NULL }
- };
+ static CONST struct {
+ token_code_type code;
+ char *name;
+ } table[] = {
+ { INT, "int" },
+ { REL, "relocateable" },
+ { NAME, "NAME" },
+ { PLUSEQ, "+=" },
+ { MINUSEQ, "-=" },
+ { MULTEQ, "*=" },
+ { DIVEQ, "/=" },
+ { LSHIFTEQ, "<<=" },
+ { RSHIFTEQ, ">>=" },
+ { ANDEQ, "&=" },
+ { OREQ, "|=" },
+ { OROR, "||" },
+ { ANDAND, "&&" },
+ { EQ, "==" },
+ { NE, "!=" },
+ { LE, "<=" },
+ { GE, ">=" },
+ { LSHIFT, "<<" },
+ { RSHIFT, ">>=" },
+ { ALIGN_K, "ALIGN" },
+ { BLOCK, "BLOCK" },
+ { SECTIONS, "SECTIONS" },
+ { SIZEOF_HEADERS, "SIZEOF_HEADERS" },
+ { NEXT, "NEXT" },
+ { SIZEOF, "SIZEOF" },
+ { ADDR, "ADDR" },
+ { LOADADDR, "LOADADDR" },
+ { MEMORY, "MEMORY" },
+ { DEFINED, "DEFINED" },
+ { TARGET_K, "TARGET" },
+ { SEARCH_DIR, "SEARCH_DIR" },
+ { MAP, "MAP" },
+ { QUAD, "QUAD" },
+ { SQUAD, "SQUAD" },
+ { LONG, "LONG" },
+ { SHORT, "SHORT" },
+ { BYTE, "BYTE" },
+ { ENTRY, "ENTRY" },
+ { 0, (char *) NULL }
+ };
unsigned int idx;
- for (idx = 0; table[idx].name != (char*)NULL; idx++) {
- if (table[idx].code == code) {
- fprintf(config.map_file, "%s", table[idx].name);
- return;
+ for (idx = 0; table[idx].name != (char *) NULL; idx++)
+ {
+ if (table[idx].code == code)
+ {
+ fprintf (config.map_file, "%s", table[idx].name);
+ return;
+ }
}
- }
/* Not in table, just print it alone */
- fprintf(config.map_file, "%c",code);
+ fprintf (config.map_file, "%c", code);
}
-static void
+static void
make_abs (ptr)
etree_value_type *ptr;
{
- asection *s = ptr->section->bfd_section;
- ptr->value += s->vma;
- ptr->section = abs_output_section;
+ asection *s = ptr->section->bfd_section;
+ ptr->value += s->vma;
+ ptr->section = abs_output_section;
}
static etree_value_type
@@ -147,7 +145,7 @@ new_abs (value)
return new;
}
-static void
+static void
check (os, name, op)
lang_output_section_statement_type *os;
const char *name;
@@ -163,7 +161,7 @@ etree_type *
exp_intop (value)
bfd_vma value;
{
- etree_type *new = (etree_type *) stat_alloc(sizeof(new->value));
+ etree_type *new = (etree_type *) stat_alloc (sizeof (new->value));
new->type.node_code = INT;
new->value.value = value;
new->type.node_class = etree_value;
@@ -208,12 +206,12 @@ new_rel_from_section (value, section)
new.value = value;
new.section = section;
- new.value -= section->bfd_section->vma;
+ new.value -= section->bfd_section->vma;
return new;
}
-static etree_value_type
+static etree_value_type
fold_binary (tree, current_section, allocation_done, dot, dotp)
etree_type *tree;
lang_output_section_statement_type *current_section;
@@ -231,7 +229,7 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
other = exp_fold_tree (tree->binary.rhs,
current_section,
- allocation_done, dot,dotp) ;
+ allocation_done, dot, dotp);
if (other.valid_p)
{
/* If the values are from different sections, or this is an
@@ -260,11 +258,11 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
else if (result.section != other.section
|| current_section == abs_output_section)
{
- make_abs(&result);
- make_abs(&other);
+ make_abs (&result);
+ make_abs (&other);
}
- switch (tree->type.node_code)
+ switch (tree->type.node_code)
{
case '%':
if (other.value == 0)
@@ -281,22 +279,22 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
break;
#define BOP(x,y) case x : result.value = result.value y other.value; break;
- BOP('+',+);
- BOP('*',*);
- BOP('-',-);
- BOP(LSHIFT,<<);
- BOP(RSHIFT,>>);
- BOP(EQ,==);
- BOP(NE,!=);
- BOP('<',<);
- BOP('>',>);
- BOP(LE,<=);
- BOP(GE,>=);
- BOP('&',&);
- BOP('^',^);
- BOP('|',|);
- BOP(ANDAND,&&);
- BOP(OROR,||);
+ BOP ('+', +);
+ BOP ('*', *);
+ BOP ('-', -);
+ BOP (LSHIFT, <<);
+ BOP (RSHIFT, >>);
+ BOP (EQ, ==);
+ BOP (NE, !=);
+ BOP ('<', <);
+ BOP ('>', >);
+ BOP (LE, <=);
+ BOP (GE, >=);
+ BOP ('&', &);
+ BOP ('^', ^);
+ BOP ('|', |);
+ BOP (ANDAND, &&);
+ BOP (OROR, ||);
case MAX_K:
if (result.value < other.value)
@@ -309,7 +307,7 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
break;
default:
- FAIL();
+ FAIL ();
}
}
else
@@ -321,7 +319,7 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
return result;
}
-etree_value_type
+etree_value_type
invalid ()
{
etree_value_type new;
@@ -329,156 +327,157 @@ invalid ()
return new;
}
-static etree_value_type
+static etree_value_type
fold_name (tree, current_section, allocation_done, dot)
etree_type *tree;
lang_output_section_statement_type *current_section;
- lang_phase_type allocation_done;
+ lang_phase_type allocation_done;
bfd_vma dot;
{
etree_value_type result;
- switch (tree->type.node_code)
- {
- case SIZEOF_HEADERS:
- if (allocation_done != lang_first_phase_enum)
- {
- result = new_abs ((bfd_vma)
- bfd_sizeof_headers (output_bfd,
- link_info.relocateable));
- }
- else
- {
- result.valid_p = false;
- }
- break;
- case DEFINED:
- if (allocation_done == lang_first_phase_enum)
+ switch (tree->type.node_code)
+ {
+ case SIZEOF_HEADERS:
+ if (allocation_done != lang_first_phase_enum)
+ {
+ result = new_abs ((bfd_vma)
+ bfd_sizeof_headers (output_bfd,
+ link_info.relocateable));
+ }
+ else
+ {
result.valid_p = false;
- else
- {
- struct bfd_link_hash_entry *h;
-
- h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info,
- tree->name.name,
- false, false, true);
- result.value = (h != (struct bfd_link_hash_entry *) NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak
- || h->type == bfd_link_hash_common));
- result.section = 0;
- result.valid_p = true;
- }
- break;
- case NAME:
+ }
+ break;
+ case DEFINED:
+ if (allocation_done == lang_first_phase_enum)
result.valid_p = false;
- 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
- result = invalid();
- }
- else if (allocation_done != lang_first_phase_enum)
- {
- struct bfd_link_hash_entry *h;
-
- h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info,
- tree->name.name,
- false, false, true);
- if (h != NULL
- && (h->type == bfd_link_hash_defined
- || 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)
- {
- 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),
- os);
- }
- }
- }
- else if (allocation_done == lang_final_phase_enum)
- einfo (_("%F%S: undefined symbol `%s' referenced in expression\n"),
- tree->name.name);
- }
- break;
-
- case ADDR:
- if (allocation_done != lang_first_phase_enum)
- {
- lang_output_section_statement_type *os;
-
- os = lang_output_section_find (tree->name.name);
- check (os, tree->name.name, "ADDR");
+ else
+ {
+ struct bfd_link_hash_entry *h;
+
+ h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info,
+ tree->name.name,
+ false, false, true);
+ result.value = (h != (struct bfd_link_hash_entry *) NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak
+ || h->type == bfd_link_hash_common));
+ result.section = 0;
+ result.valid_p = true;
+ }
+ break;
+ case NAME:
+ result.valid_p = false;
+ 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
+ result = invalid ();
+ }
+ else if (allocation_done != lang_first_phase_enum)
+ {
+ struct bfd_link_hash_entry *h;
+
+ h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info,
+ tree->name.name,
+ false, false, true);
+ if (h != NULL
+ && (h->type == bfd_link_hash_defined
+ || 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)
+ {
+ 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),
+ os);
+ }
+ }
+ }
+ else if (allocation_done == lang_final_phase_enum)
+ einfo (_("%F%S: undefined symbol `%s' referenced in expression\n"),
+ tree->name.name);
+ }
+ break;
+
+ case ADDR:
+ if (allocation_done != lang_first_phase_enum)
+ {
+ lang_output_section_statement_type *os;
+
+ os = lang_output_section_find (tree->name.name);
+ check (os, tree->name.name, "ADDR");
+ result = new_rel (0, os);
+ }
+ else
+ result = invalid ();
+ break;
+
+ case LOADADDR:
+ if (allocation_done != lang_first_phase_enum)
+ {
+ lang_output_section_statement_type *os;
+
+ os = lang_output_section_find (tree->name.name);
+ check (os, tree->name.name, "LOADADDR");
+ if (os->load_base == NULL)
result = new_rel (0, os);
- }
- else
- result = invalid ();
- break;
-
- case LOADADDR:
- if (allocation_done != lang_first_phase_enum)
- {
- lang_output_section_statement_type *os;
-
- os = lang_output_section_find (tree->name.name);
- check (os, tree->name.name, "LOADADDR");
- if (os->load_base == NULL)
- result = new_rel (0, os);
- else
- result = exp_fold_tree_no_dot (os->load_base,
- abs_output_section,
- allocation_done);
- }
- else
- result = invalid ();
- break;
-
- case SIZEOF:
- if (allocation_done != lang_first_phase_enum)
- {
- int opb = bfd_octets_per_byte (output_bfd);
- lang_output_section_statement_type *os;
-
- os = lang_output_section_find (tree->name.name);
- check (os, tree->name.name, "SIZEOF");
- result = new_abs (os->bfd_section->_raw_size / opb);
- }
- else
- result = invalid ();
- break;
-
- default:
- FAIL();
- break;
- }
+ else
+ result = exp_fold_tree_no_dot (os->load_base,
+ abs_output_section,
+ allocation_done);
+ }
+ else
+ result = invalid ();
+ break;
+
+ case SIZEOF:
+ if (allocation_done != lang_first_phase_enum)
+ {
+ int opb = bfd_octets_per_byte (output_bfd);
+ lang_output_section_statement_type *os;
+
+ os = lang_output_section_find (tree->name.name);
+ check (os, tree->name.name, "SIZEOF");
+ result = new_abs (os->bfd_section->_raw_size / opb);
+ }
+ else
+ result = invalid ();
+ break;
+
+ default:
+ FAIL ();
+ break;
+ }
return result;
}
-etree_value_type
+
+etree_value_type
exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
etree_type *tree;
lang_output_section_statement_type *current_section;
- lang_phase_type allocation_done;
+ lang_phase_type allocation_done;
bfd_vma dot;
bfd_vma *dotp;
{
@@ -490,7 +489,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
return result;
}
- switch (tree->type.node_class)
+ switch (tree->type.node_class)
{
case etree_value:
result = new_rel (tree->value.value, current_section);
@@ -508,8 +507,8 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
case etree_assert:
result = exp_fold_tree (tree->assert_s.child,
- current_section,
- allocation_done, dot, dotp);
+ current_section,
+ allocation_done, dot, dotp);
if (result.valid_p)
{
if (! result.value)
@@ -524,7 +523,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
allocation_done, dot, dotp);
if (result.valid_p)
{
- switch (tree->type.node_code)
+ switch (tree->type.node_code)
{
case ALIGN_K:
if (allocation_done != lang_first_phase_enum)
@@ -540,7 +539,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
result.value += result.section->bfd_section->vma;
result.section = abs_output_section;
}
- else
+ else
result.valid_p = false;
break;
@@ -595,10 +594,11 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
case etree_assign:
case etree_provide:
+ case etree_provided:
if (tree->assign.dst[0] == '.' && tree->assign.dst[1] == 0)
{
/* Assignment to dot can only be done during allocation */
- if (tree->type.node_class == etree_provide)
+ 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
@@ -627,7 +627,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
dot, nextdot);
}
else
- *dotp = nextdot;
+ *dotp = nextdot;
}
}
}
@@ -668,6 +668,8 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
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;
}
}
}
@@ -685,14 +687,14 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
return result;
}
-static etree_value_type
+static etree_value_type
exp_fold_tree_no_dot (tree, current_section, allocation_done)
etree_type *tree;
lang_output_section_statement_type *current_section;
lang_phase_type allocation_done;
{
-return exp_fold_tree(tree, current_section, allocation_done, (bfd_vma)
- 0, (bfd_vma *)NULL);
+ return exp_fold_tree (tree, current_section, allocation_done,
+ (bfd_vma) 0, (bfd_vma *) NULL);
}
etree_type *
@@ -708,15 +710,15 @@ exp_binop (code, lhs, rhs)
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 );
+ r = exp_fold_tree_no_dot (&value,
+ abs_output_section,
+ lang_first_phase_enum);
if (r.valid_p)
{
- return exp_intop(r.value);
+ return exp_intop (r.value);
}
new = (etree_type *) stat_alloc (sizeof (new->binary));
- memcpy((char *)new, (char *)&value, sizeof(new->binary));
+ memcpy ((char *) new, (char *) &value, sizeof (new->binary));
return new;
}
@@ -734,17 +736,18 @@ exp_trinop (code, cond, lhs, rhs)
value.trinary.cond = cond;
value.trinary.rhs = rhs;
value.type.node_class = etree_trinary;
- r= exp_fold_tree_no_dot(&value, (lang_output_section_statement_type
- *)NULL,lang_first_phase_enum);
- if (r.valid_p) {
- return exp_intop(r.value);
- }
+ r = exp_fold_tree_no_dot (&value,
+ (lang_output_section_statement_type *) NULL,
+ lang_first_phase_enum);
+ if (r.valid_p)
+ {
+ return exp_intop (r.value);
+ }
new = (etree_type *) stat_alloc (sizeof (new->trinary));
- memcpy((char *)new,(char *) &value, sizeof(new->trinary));
+ memcpy ((char *) new, (char *) &value, sizeof (new->trinary));
return new;
}
-
etree_type *
exp_unop (code, child)
int code;
@@ -756,17 +759,17 @@ exp_unop (code, child)
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);
- }
+ r = exp_fold_tree_no_dot (&value, abs_output_section,
+ lang_first_phase_enum);
+ if (r.valid_p)
+ {
+ return exp_intop (r.value);
+ }
new = (etree_type *) stat_alloc (sizeof (new->unary));
- memcpy((char *)new, (char *)&value, sizeof(new->unary));
+ memcpy ((char *) new, (char *) &value, sizeof (new->unary));
return new;
}
-
etree_type *
exp_nameop (code, name)
int code;
@@ -778,22 +781,19 @@ exp_nameop (code, name)
value.name.name = name;
value.name.type.node_class = etree_name;
-
- r = exp_fold_tree_no_dot(&value,
- (lang_output_section_statement_type *)NULL,
- lang_first_phase_enum);
- if (r.valid_p) {
- return exp_intop(r.value);
- }
+ r = exp_fold_tree_no_dot (&value,
+ (lang_output_section_statement_type *) NULL,
+ lang_first_phase_enum);
+ if (r.valid_p)
+ {
+ return exp_intop (r.value);
+ }
new = (etree_type *) stat_alloc (sizeof (new->name));
- memcpy((char *)new, (char *)&value, sizeof(new->name));
+ memcpy ((char *) new, (char *) &value, sizeof (new->name));
return new;
}
-
-
-
etree_type *
exp_assop (code, dst, src)
int code;
@@ -804,18 +804,18 @@ exp_assop (code, dst, src)
value.assign.type.node_code = code;
-
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);
- }
+ if (exp_fold_tree_no_dot (&value, &result))
+ {
+ return exp_intop (result);
+ }
#endif
- new = (etree_type*) stat_alloc (sizeof (new->assign));
- memcpy((char *)new, (char *)&value, sizeof(new->assign));
+ new = (etree_type *) stat_alloc (sizeof (new->assign));
+ memcpy ((char *) new, (char *) &value, sizeof (new->assign));
return new;
}
@@ -853,86 +853,91 @@ exp_assert (exp, message)
return n;
}
-void
+void
exp_print_tree (tree)
etree_type *tree;
{
- switch (tree->type.node_class) {
- case etree_value:
- minfo ("0x%v", tree->value.value);
- return;
- case etree_rel:
- if (tree->rel.section->owner != NULL)
- minfo ("%B:", tree->rel.section->owner);
- minfo ("%s+0x%v", tree->rel.section->name, tree->rel.value);
- return;
- case etree_assign:
+ switch (tree->type.node_class)
+ {
+ case etree_value:
+ minfo ("0x%v", tree->value.value);
+ return;
+ case etree_rel:
+ if (tree->rel.section->owner != NULL)
+ minfo ("%B:", tree->rel.section->owner);
+ minfo ("%s+0x%v", tree->rel.section->name, tree->rel.value);
+ return;
+ case etree_assign:
#if 0
- if (tree->assign.dst->sdefs != (asymbol *)NULL){
- fprintf(config.map_file,"%s (%x) ",tree->assign.dst->name,
- tree->assign.dst->sdefs->value);
- }
- else {
- fprintf(config.map_file,"%s (UNDEFINED)",tree->assign.dst->name);
- }
+ if (tree->assign.dst->sdefs != (asymbol *) 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);
- exp_print_tree(tree->assign.src);
- break;
- case etree_provide:
- fprintf (config.map_file, "PROVIDE (%s, ", tree->assign.dst);
- exp_print_tree (tree->assign.src);
- fprintf (config.map_file, ")");
- break;
- case etree_binary:
- fprintf(config.map_file,"(");
- exp_print_tree(tree->binary.lhs);
- exp_print_token(tree->type.node_code);
- exp_print_tree(tree->binary.rhs);
- fprintf(config.map_file,")");
- break;
- case etree_trinary:
- exp_print_tree(tree->trinary.cond);
- fprintf(config.map_file,"?");
- exp_print_tree(tree->trinary.lhs);
- fprintf(config.map_file,":");
- exp_print_tree(tree->trinary.rhs);
- break;
- case etree_unary:
- exp_print_token(tree->unary.type.node_code);
- if (tree->unary.child)
- {
- fprintf(config.map_file,"(");
- exp_print_tree(tree->unary.child);
- fprintf(config.map_file,")");
- }
-
- break;
-
- case etree_assert:
- fprintf (config.map_file, "ASSERT (");
- exp_print_tree (tree->assert_s.child);
- fprintf (config.map_file, ", %s)", tree->assert_s.message);
- break;
-
- case etree_undef:
- fprintf(config.map_file,"????????");
- break;
- case etree_name:
- if (tree->type.node_code == NAME) {
- fprintf(config.map_file,"%s", tree->name.name);
- }
- else {
- exp_print_token(tree->type.node_code);
- if (tree->name.name)
- fprintf(config.map_file,"(%s)", tree->name.name);
+ fprintf (config.map_file, "%s", tree->assign.dst);
+ exp_print_token (tree->type.node_code);
+ exp_print_tree (tree->assign.src);
+ break;
+ case etree_provide:
+ case etree_provided:
+ fprintf (config.map_file, "PROVIDE (%s, ", tree->assign.dst);
+ exp_print_tree (tree->assign.src);
+ fprintf (config.map_file, ")");
+ break;
+ case etree_binary:
+ fprintf (config.map_file, "(");
+ exp_print_tree (tree->binary.lhs);
+ exp_print_token (tree->type.node_code);
+ exp_print_tree (tree->binary.rhs);
+ fprintf (config.map_file, ")");
+ break;
+ case etree_trinary:
+ exp_print_tree (tree->trinary.cond);
+ fprintf (config.map_file, "?");
+ exp_print_tree (tree->trinary.lhs);
+ fprintf (config.map_file, ":");
+ exp_print_tree (tree->trinary.rhs);
+ break;
+ case etree_unary:
+ exp_print_token (tree->unary.type.node_code);
+ if (tree->unary.child)
+ {
+ fprintf (config.map_file, "(");
+ exp_print_tree (tree->unary.child);
+ fprintf (config.map_file, ")");
+ }
+ break;
+
+ case etree_assert:
+ fprintf (config.map_file, "ASSERT (");
+ exp_print_tree (tree->assert_s.child);
+ fprintf (config.map_file, ", %s)", tree->assert_s.message);
+ break;
+
+ case etree_undef:
+ fprintf (config.map_file, "????????");
+ break;
+ case etree_name:
+ if (tree->type.node_code == NAME)
+ {
+ fprintf (config.map_file, "%s", tree->name.name);
+ }
+ else
+ {
+ exp_print_token (tree->type.node_code);
+ if (tree->name.name)
+ fprintf (config.map_file, "(%s)", tree->name.name);
+ }
+ break;
+ default:
+ FAIL ();
+ break;
}
- break;
- default:
- FAIL();
- break;
- }
}
bfd_vma
@@ -955,17 +960,16 @@ exp_get_vma (tree, def, name, allocation_done)
return def;
}
-int
-exp_get_value_int (tree,def,name, allocation_done)
+int
+exp_get_value_int (tree, def, name, allocation_done)
etree_type *tree;
int def;
char *name;
lang_phase_type allocation_done;
{
- return (int)exp_get_vma(tree,(bfd_vma)def,name, allocation_done);
+ return (int) exp_get_vma (tree, (bfd_vma) def, name, allocation_done);
}
-
bfd_vma
exp_get_abs_int (tree, def, name, allocation_done)
etree_type *tree;
@@ -980,8 +984,9 @@ exp_get_abs_int (tree, def, name, allocation_done)
{
res.value += res.section->bfd_section->vma;
}
- else {
- einfo (_("%F%S non constant expression for %s\n"),name);
- }
+ else
+ {
+ einfo (_("%F%S non constant expression for %s\n"), name);
+ }
return res.value;
}
diff --git a/gnu/usr.bin/binutils/ld/ldexp.h b/gnu/usr.bin/binutils/ld/ldexp.h
index b8e8ddf6f82..36f88f8b24f 100644
--- a/gnu/usr.bin/binutils/ld/ldexp.h
+++ b/gnu/usr.bin/binutils/ld/ldexp.h
@@ -1,5 +1,6 @@
/* ldexp.h -
- Copyright 1991, 92, 93, 94, 95, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -22,17 +23,13 @@
#define LDEXP_H
/* The result of an expression tree */
-typedef struct
-{
+typedef struct {
bfd_vma value;
struct lang_output_section_statement_struct *section;
boolean valid_p;
} etree_value_type;
-
-
-typedef struct
-{
+typedef struct {
int node_code;
enum { etree_binary,
etree_trinary,
@@ -40,6 +37,7 @@ typedef struct
etree_name,
etree_assign,
etree_provide,
+ etree_provided,
etree_undef,
etree_unspec,
etree_value,
@@ -47,10 +45,7 @@ typedef struct
etree_rel } node_class;
} node_type;
-
-
-typedef union etree_union
-{
+typedef union etree_union {
node_type type;
struct {
node_type type;
@@ -71,11 +66,11 @@ typedef union etree_union
struct {
node_type type;
- union etree_union *child;
+ union etree_union *child;
} unary;
struct {
node_type type;
- CONST char *name;
+ CONST char *name;
} name;
struct {
node_type type;
@@ -93,7 +88,6 @@ typedef union etree_union
} assert_s;
} etree_type;
-
etree_type *exp_intop PARAMS ((bfd_vma));
etree_type *exp_relop PARAMS ((asection *, bfd_vma));
etree_value_type invalid PARAMS ((void));
@@ -110,7 +104,7 @@ etree_type *exp_provide PARAMS ((const char *, etree_type *));
etree_type *exp_assert PARAMS ((etree_type *, const char *));
void exp_print_tree PARAMS ((etree_type *));
bfd_vma exp_get_vma PARAMS ((etree_type *, bfd_vma, char *, lang_phase_type));
-int exp_get_value_int PARAMS ((etree_type *, int, char *,lang_phase_type));
-bfd_vma exp_get_abs_int PARAMS ((etree_type *, int, char *,lang_phase_type));
+int exp_get_value_int PARAMS ((etree_type *, int, char *, lang_phase_type));
+bfd_vma exp_get_abs_int PARAMS ((etree_type *, int, char *, lang_phase_type));
#endif
diff --git a/gnu/usr.bin/binutils/ld/ldfile.c b/gnu/usr.bin/binutils/ld/ldfile.c
index 9613c078384..0e4d0ec3a2e 100644
--- a/gnu/usr.bin/binutils/ld/ldfile.c
+++ b/gnu/usr.bin/binutils/ld/ldfile.c
@@ -1,5 +1,5 @@
/* Linker file opening and searching.
- Copyright (C) 1991, 92, 93, 94, 95, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -19,12 +19,7 @@ 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. */
-/*
- ldfile.c
-
- look after all the file stuff
-
- */
+/* ldfile.c: look after all the file stuff. */
#include "bfd.h"
#include "sysdep.h"
@@ -38,6 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldgram.h"
#include "ldlex.h"
#include "ldemul.h"
+#include "libiberty.h"
#include <ctype.h>
@@ -59,7 +55,7 @@ char *slash = "/";
#endif
#endif
#else /* MPW */
-/* The MPW path char is a colon. */
+/* The MPW path char is a colon. */
char *slash = ":";
#endif /* MPW */
@@ -67,15 +63,14 @@ char *slash = ":";
static search_dirs_type **search_tail_ptr = &search_head;
-typedef struct search_arch
-{
- char *name;
+typedef struct search_arch {
+ char *name;
struct search_arch *next;
} search_arch_type;
static search_arch_type *search_arch_head;
static search_arch_type **search_arch_tail_ptr = &search_arch_head;
-
+
static FILE *try_open PARAMS ((const char *name, const char *exten));
void
@@ -137,7 +132,7 @@ ldfile_try_open_bfd (attempt, entry)
return true;
if (bfd_arch_get_compatible (check, output_bfd) == NULL)
{
- einfo (_("%P: skipping incompatible %s when searching for %s"),
+ einfo (_("%P: skipping incompatible %s when searching for %s\n"),
attempt, entry->local_sym_name);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
@@ -170,8 +165,8 @@ ldfile_open_file_search (arch, entry, lib, suffix)
}
for (search = search_head;
- search != (search_dirs_type *)NULL;
- search = search->next)
+ search != (search_dirs_type *) NULL;
+ search = search->next)
{
char *string;
@@ -194,8 +189,8 @@ ldfile_open_file_search (arch, entry, lib, suffix)
lib, entry->filename, arch, suffix);
else if (entry->filename[0] == '/' || entry->filename[0] == '.'
#if defined (__MSDOS__) || defined (_WIN32)
- || entry->filename[0] == '\\'
- || (isalpha (entry->filename[0])
+ || entry->filename[0] == '\\'
+ || (isalpha (entry->filename[0])
&& entry->filename[1] == ':')
#endif
)
@@ -232,27 +227,37 @@ ldfile_open_file (entry)
einfo (_("%F%P: cannot open %s for %s: %E\n"),
entry->filename, entry->local_sym_name);
else
- einfo(_("%F%P: cannot open %s: %E\n"), entry->local_sym_name);
+ einfo (_("%F%P: cannot open %s: %E\n"), entry->local_sym_name);
}
else
{
search_arch_type *arch;
+ boolean found = false;
/* Try to open <filename><suffix> or lib<filename><suffix>.a */
for (arch = search_arch_head;
arch != (search_arch_type *) NULL;
arch = arch->next)
{
- if (ldfile_open_file_search (arch->name, entry, "lib", ".a"))
- return;
+ found = ldfile_open_file_search (arch->name, entry, "lib", ".a");
+ if (found)
+ break;
#ifdef VMS
- if (ldfile_open_file_search (arch->name, entry, ":lib", ".a"))
- return;
+ found = ldfile_open_file_search (arch->name, entry, ":lib", ".a");
+ if (found)
+ break;
#endif
- if (ldemul_find_potential_libraries (arch->name, entry))
- return;
+ found = ldemul_find_potential_libraries (arch->name, entry);
+ if (found)
+ break;
}
- einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name);
+
+ /* If we have found the file, we don't need to search directories
+ again. */
+ if (found)
+ entry->search_dirs_flag = false;
+ else
+ einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name);
}
}
@@ -267,6 +272,7 @@ try_open (name, exten)
char buff[1000];
result = fopen (name, "r");
+
if (trace_file_tries)
{
if (result == NULL)
@@ -282,6 +288,7 @@ try_open (name, exten)
{
sprintf (buff, "%s%s", name, exten);
result = fopen (buff, "r");
+
if (trace_file_tries)
{
if (result == NULL)
@@ -306,18 +313,23 @@ ldfile_find_command_file (name, extend)
FILE *result;
char buffer[1000];
- /* First try raw name */
- result = try_open(name,"");
- if (result == (FILE *)NULL) {
- /* Try now prefixes */
- for (search = search_head;
- search != (search_dirs_type *)NULL;
- search = search->next) {
- sprintf(buffer,"%s%s%s", search->name, slash, name);
- result = try_open(buffer, extend);
- if (result)break;
+ /* First try raw name. */
+ result = try_open (name, "");
+ if (result == (FILE *) NULL)
+ {
+ /* Try now prefixes. */
+ for (search = search_head;
+ search != (search_dirs_type *) NULL;
+ search = search->next)
+ {
+ sprintf (buffer, "%s%s%s", search->name, slash, name);
+
+ result = try_open (buffer, extend);
+ if (result)
+ break;
+ }
}
- }
+
return result;
}
@@ -326,31 +338,29 @@ ldfile_open_command_file (name)
const char *name;
{
FILE *ldlex_input_stack;
- ldlex_input_stack = ldfile_find_command_file(name, "");
-
- if (ldlex_input_stack == (FILE *)NULL) {
- bfd_set_error (bfd_error_system_call);
- einfo(_("%P%F: cannot open linker script file %s: %E\n"),name);
- }
- lex_push_file(ldlex_input_stack, name);
-
+ ldlex_input_stack = ldfile_find_command_file (name, "");
+
+ if (ldlex_input_stack == (FILE *) NULL)
+ {
+ bfd_set_error (bfd_error_system_call);
+ einfo (_("%P%F: cannot open linker script file %s: %E\n"), name);
+ }
+
+ lex_push_file (ldlex_input_stack, name);
+
ldfile_input_filename = name;
lineno = 1;
had_script = true;
}
-
-
-
-
#ifdef GNU960
-static
-char *
-gnu960_map_archname( name )
-char *name;
+static char *
+gnu960_map_archname (name)
+ char *name;
{
struct tabentry { char *cmd_switch; char *arch; };
- static struct tabentry arch_tab[] = {
+ static struct tabentry arch_tab[] =
+ {
"", "",
"KA", "ka",
"KB", "kb",
@@ -362,60 +372,57 @@ char *name;
NULL, ""
};
struct tabentry *tp;
-
- for ( tp = arch_tab; tp->cmd_switch != NULL; tp++ ){
- if ( !strcmp(name,tp->cmd_switch) ){
- break;
+ 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);
- }
+ if (tp->cmd_switch == NULL)
+ einfo (_("%P%F: unknown architecture: %s\n"), name);
+
return tp->arch;
}
-
-
void
-ldfile_add_arch(name)
-char *name;
+ldfile_add_arch (name)
+ char *name;
{
search_arch_type *new =
- (search_arch_type *)xmalloc((bfd_size_type)(sizeof(search_arch_type)));
+ (search_arch_type *) xmalloc ((bfd_size_type) (sizeof (search_arch_type)));
+ if (*name != '\0')
+ {
+ if (ldfile_output_machine_name[0] != '\0')
+ {
+ einfo (_("%P%F: target architecture respecified\n"));
+ return;
+ }
- if (*name != '\0') {
- if (ldfile_output_machine_name[0] != '\0') {
- einfo(_("%P%F: target architecture respecified\n"));
- return;
+ ldfile_output_machine_name = name;
}
- ldfile_output_machine_name = name;
- }
- new->next = (search_arch_type*)NULL;
- new->name = gnu960_map_archname( name );
+ new->next = (search_arch_type *) NULL;
+ new->name = gnu960_map_archname (name);
*search_arch_tail_ptr = new;
search_arch_tail_ptr = &new->next;
-
}
-#else /* not GNU960 */
-
+#else /* not GNU960 */
void
ldfile_add_arch (in_name)
- CONST char * in_name;
+ CONST char *in_name;
{
- char *name = buystring(in_name);
+ char *name = xstrdup (in_name);
search_arch_type *new =
(search_arch_type *) xmalloc (sizeof (search_arch_type));
ldfile_output_machine_name = in_name;
new->name = name;
- new->next = (search_arch_type*)NULL;
+ new->next = (search_arch_type *) NULL;
while (*name)
{
if (isupper ((unsigned char) *name))
@@ -428,19 +435,22 @@ ldfile_add_arch (in_name)
}
#endif
-/* Set the output architecture */
+/* Set the output architecture. */
+
void
ldfile_set_output_arch (string)
CONST char *string;
{
- const bfd_arch_info_type *arch = bfd_scan_arch(string);
-
- if (arch) {
- ldfile_output_architecture = arch->arch;
- ldfile_output_machine = arch->mach;
- ldfile_output_machine_name = arch->printable_name;
- }
- else {
- einfo(_("%P%F: cannot represent machine `%s'\n"), string);
- }
+ const bfd_arch_info_type *arch = bfd_scan_arch (string);
+
+ if (arch)
+ {
+ ldfile_output_architecture = arch->arch;
+ ldfile_output_machine = arch->mach;
+ ldfile_output_machine_name = arch->printable_name;
+ }
+ else
+ {
+ einfo (_("%P%F: cannot represent machine `%s'\n"), string);
+ }
}
diff --git a/gnu/usr.bin/binutils/ld/ldfile.h b/gnu/usr.bin/binutils/ld/ldfile.h
index 9c9a4d65c2c..ce822e7dee7 100644
--- a/gnu/usr.bin/binutils/ld/ldfile.h
+++ b/gnu/usr.bin/binutils/ld/ldfile.h
@@ -1,5 +1,6 @@
/* ldfile.h -
- Copyright 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -17,6 +18,9 @@
along with GLD; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#ifndef LDFILE_H
+#define LDFILE_H
+
extern const char *ldfile_input_filename;
extern boolean ldfile_assumed_script;
extern unsigned long ldfile_output_machine;
@@ -26,8 +30,7 @@ extern const char *ldfile_output_machine_name;
/* Structure used to hold the list of directories to search for
libraries. */
-typedef struct search_dirs
-{
+typedef struct search_dirs {
/* Next directory on list. */
struct search_dirs *next;
/* Name of directory. */
@@ -38,10 +41,6 @@ typedef struct search_dirs
extern search_dirs_type *search_head;
-#if ANSI_PROTOTYPES
-struct lang_input_statement_struct;
-#endif
-
extern void ldfile_add_arch PARAMS ((CONST char *));
extern void ldfile_add_library_path PARAMS ((const char *, boolean cmdline));
extern void ldfile_open_command_file PARAMS ((const char *name));
@@ -54,3 +53,5 @@ extern void ldfile_set_output_arch PARAMS ((CONST char *));
extern boolean ldfile_open_file_search
PARAMS ((const char *arch, struct lang_input_statement_struct *,
const char *lib, const char *suffix));
+
+#endif
diff --git a/gnu/usr.bin/binutils/ld/ldgram.y b/gnu/usr.bin/binutils/ld/ldgram.y
index 806ea1c5f5c..e7f4a590d4b 100644
--- a/gnu/usr.bin/binutils/ld/ldgram.y
+++ b/gnu/usr.bin/binutils/ld/ldgram.y
@@ -1,6 +1,6 @@
-/* A YACC grammer to parse a superset of the AT&T linker scripting languaue.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation, Inc.
+/* 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 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
This file is part of GNU ld.
@@ -33,8 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldexp.h"
#include "ldver.h"
#include "ldlang.h"
-#include "ldemul.h"
#include "ldfile.h"
+#include "ldemul.h"
#include "ldmisc.h"
#include "ldmain.h"
#include "mri.h"
@@ -619,7 +619,9 @@ memory_spec: NAME
attributes_opt ':'
origin_spec opt_comma length_spec
- ; origin_spec:
+ ;
+
+origin_spec:
ORIGIN '=' mustbe_exp
{ region->current =
region->origin =
@@ -1113,6 +1115,7 @@ vers_defns:
}
vers_defns '}'
{
+ $$ = $5;
ldgram_vers_current_lang = $<name>4;
}
;
diff --git a/gnu/usr.bin/binutils/ld/ldint.texinfo b/gnu/usr.bin/binutils/ld/ldint.texinfo
index 838d0dac1e6..37efae3942b 100644
--- a/gnu/usr.bin/binutils/ld/ldint.texinfo
+++ b/gnu/usr.bin/binutils/ld/ldint.texinfo
@@ -1,5 +1,7 @@
\input texinfo
@setfilename ldint.info
+@c Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+@c Free Software Foundation, Inc.
@ifinfo
@format
@@ -12,12 +14,16 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the internals of the GNU linker ld.
-Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+Free Software Foundation, Inc.
Contributed by Cygnus Support.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
@ignore
Permission is granted to process this file through Tex and print the
@@ -26,9 +32,6 @@ notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
-Permission is granted to copy or distribute modified versions of this
-manual under the terms of the GPL (for which purpose this text may be
-regarded as a program in the language TeX).
@end ifinfo
@iftex
@@ -43,7 +46,7 @@ regarded as a program in the language TeX).
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.3 $} % For use in headers, footers too
+\xdef\manvers{2.10.91} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Support\par
\hfill \manvers\par
@@ -52,12 +55,15 @@ regarded as a program in the language TeX).
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1992, 93, 94, 95, 96, 97, 1998
+Copyright @copyright{} 1992, 93, 94, 95, 96, 97, 1998, 2000
Free Software Foundation, Inc.
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
@end titlepage
@end iftex
@@ -70,10 +76,15 @@ collection of miscellaneous information with little form at this point.
Mostly, it is a repository into which you can put information about
GNU @code{ld} as you discover it (or as you design changes to @code{ld}).
+This document is distributed under the terms of the GNU Free
+Documentation License. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+
@menu
* README:: The README File
* Emulations:: How linker emulations are generated
* Emulation Walkthrough:: A Walkthrough of a Typical Emulation
+* GNU Free Documentation License:: GNU Free Documentation License
@end menu
@node README
@@ -560,5 +571,368 @@ In summary,
@end itemize
+@node GNU Free Documentation License
+@chapter GNU Free Documentation License
+
+ GNU Free Documentation License
+
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+@end smallexample
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
@contents
@bye
diff --git a/gnu/usr.bin/binutils/ld/ldlang.c b/gnu/usr.bin/binutils/ld/ldlang.c
index 8f0c607b7a1..f683abb1405 100644
--- a/gnu/usr.bin/binutils/ld/ldlang.c
+++ b/gnu/usr.bin/binutils/ld/ldlang.c
@@ -1,5 +1,6 @@
/* Linker command language support.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -30,105 +31,100 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldgram.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldemul.h"
#include "ldlex.h"
#include "ldmisc.h"
#include "ldctor.h"
#include "ldfile.h"
+#include "ldemul.h"
#include "fnmatch.h"
#include "demangle.h"
#include <ctype.h>
/* FORWARDS */
-static lang_statement_union_type *new_statement PARAMS ((enum statement_enum,
- size_t,
- lang_statement_list_type*));
-
+static lang_statement_union_type *new_statement
+ PARAMS ((enum statement_enum, size_t, lang_statement_list_type *));
/* LOCALS */
static struct obstack stat_obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-static CONST char *startup_file;
+static const char *startup_file;
static lang_statement_list_type input_file_chain;
static boolean placed_commons = false;
static lang_output_section_statement_type *default_common_section;
static boolean map_option_f;
static bfd_vma print_dot;
static lang_input_statement_type *first_file;
-static CONST char *current_target;
-static CONST char *output_target;
+static const char *current_target;
+static const char *output_target;
static lang_statement_list_type statement_list;
static struct lang_phdr *lang_phdr_list;
static void lang_for_each_statement_worker
- PARAMS ((void (*func) (lang_statement_union_type *),
- lang_statement_union_type *s));
+ PARAMS ((void (*) (lang_statement_union_type *),
+ lang_statement_union_type *));
static lang_input_statement_type *new_afile
- PARAMS ((const char *name, lang_input_file_enum_type file_type,
- const char *target, boolean add_to_list));
-static void init_os PARAMS ((lang_output_section_statement_type *s));
+ PARAMS ((const char *, lang_input_file_enum_type, const char *, boolean));
+static lang_memory_region_type *lang_memory_default PARAMS ((asection *));
+static void lang_map_flags PARAMS ((flagword));
+static void init_os PARAMS ((lang_output_section_statement_type *));
static void exp_init_os PARAMS ((etree_type *));
static void section_already_linked PARAMS ((bfd *, asection *, PTR));
static struct bfd_hash_entry *already_linked_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
- const char *string));
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
static void already_linked_table_init PARAMS ((void));
static void already_linked_table_free PARAMS ((void));
static boolean wildcardp PARAMS ((const char *));
static lang_statement_union_type *wild_sort
PARAMS ((lang_wild_statement_type *, lang_input_statement_type *,
asection *));
-static lang_input_statement_type *lookup_name PARAMS ((const char *name));
-static void load_symbols PARAMS ((lang_input_statement_type *entry,
- lang_statement_list_type *));
-static void wild PARAMS ((lang_wild_statement_type *s,
- const char *section, const char *file,
- const char *target,
- lang_output_section_statement_type *output));
-static bfd *open_output PARAMS ((const char *name));
-static void ldlang_open_output PARAMS ((lang_statement_union_type *statement));
-static void open_input_bfds
- PARAMS ((lang_statement_union_type *statement, boolean));
+static void output_section_callback
+ PARAMS ((lang_wild_statement_type *, asection *,
+ lang_input_statement_type *, PTR));
+static lang_input_statement_type *lookup_name PARAMS ((const char *));
+static void load_symbols
+ PARAMS ((lang_input_statement_type *, lang_statement_list_type *));
+static void wild
+ PARAMS ((lang_wild_statement_type *, const char *, const char *,
+ const char *, lang_output_section_statement_type *));
+static bfd *open_output PARAMS ((const char *));
+static void ldlang_open_output PARAMS ((lang_statement_union_type *));
+static void open_input_bfds PARAMS ((lang_statement_union_type *, boolean));
static void lang_reasonable_defaults PARAMS ((void));
static void lang_place_undefineds PARAMS ((void));
static void map_input_to_output_sections
- PARAMS ((lang_statement_union_type *s,
- const char *target,
- lang_output_section_statement_type *output_section_statement));
+ PARAMS ((lang_statement_union_type *, const char *,
+ lang_output_section_statement_type *));
static void print_output_section_statement
- PARAMS ((lang_output_section_statement_type *output_section_statement));
+ PARAMS ((lang_output_section_statement_type *));
static void print_assignment
- PARAMS ((lang_assignment_statement_type *assignment,
- lang_output_section_statement_type *output_section));
-static void print_input_statement PARAMS ((lang_input_statement_type *statm));
+ PARAMS ((lang_assignment_statement_type *,
+ lang_output_section_statement_type *));
+static void print_input_statement PARAMS ((lang_input_statement_type *));
static boolean print_one_symbol PARAMS ((struct bfd_link_hash_entry *, PTR));
-static void print_input_section PARAMS ((lang_input_section_type *in));
-static void print_fill_statement PARAMS ((lang_fill_statement_type *fill));
-static void print_data_statement PARAMS ((lang_data_statement_type *data));
+static void print_input_section PARAMS ((lang_input_section_type *));
+static void print_fill_statement PARAMS ((lang_fill_statement_type *));
+static void print_data_statement PARAMS ((lang_data_statement_type *));
static void print_address_statement PARAMS ((lang_address_statement_type *));
-static void print_reloc_statement PARAMS ((lang_reloc_statement_type *reloc));
-static void print_padding_statement PARAMS ((lang_padding_statement_type *s));
+static void print_reloc_statement PARAMS ((lang_reloc_statement_type *));
+static void print_padding_statement PARAMS ((lang_padding_statement_type *));
static void print_wild_statement
- PARAMS ((lang_wild_statement_type *w,
- lang_output_section_statement_type *os));
+ PARAMS ((lang_wild_statement_type *, lang_output_section_statement_type *));
static void print_group
PARAMS ((lang_group_statement_type *, lang_output_section_statement_type *));
-static void print_statement PARAMS ((lang_statement_union_type *s,
- lang_output_section_statement_type *os));
-static void print_statement_list PARAMS ((lang_statement_union_type *s,
- lang_output_section_statement_type *os));
+static void print_statement
+ PARAMS ((lang_statement_union_type *, lang_output_section_statement_type *));
+static void print_statement_list
+ PARAMS ((lang_statement_union_type *, lang_output_section_statement_type *));
static void print_statements PARAMS ((void));
-static bfd_vma insert_pad PARAMS ((lang_statement_union_type **this_ptr,
- fill_type fill, unsigned int power,
- asection *output_section_statement,
- bfd_vma dot));
+static bfd_vma insert_pad
+ PARAMS ((lang_statement_union_type **, fill_type,
+ unsigned int, asection *, bfd_vma));
static bfd_vma size_input_section
- PARAMS ((lang_statement_union_type **this_ptr,
- lang_output_section_statement_type *output_section_statement,
- fill_type fill, bfd_vma dot, boolean relax));
+ PARAMS ((lang_statement_union_type **, lang_output_section_statement_type *,
+ fill_type, bfd_vma, boolean));
static void lang_finish PARAMS ((void));
static void ignore_bfd_errors PARAMS ((const char *, ...));
static void lang_check PARAMS ((void));
@@ -138,31 +134,46 @@ static void lang_place_orphans PARAMS ((void));
static int topower PARAMS ((int));
static void lang_set_startof PARAMS ((void));
static void reset_memory_regions PARAMS ((void));
+static void gc_section_callback
+ PARAMS ((lang_wild_statement_type *, asection *,
+ lang_input_statement_type *, PTR));
static void lang_record_phdrs PARAMS ((void));
static void lang_gc_wild
PARAMS ((lang_wild_statement_type *, const char *, const char *));
static void lang_gc_sections_1 PARAMS ((lang_statement_union_type *));
static void lang_gc_sections PARAMS ((void));
+static int lang_vers_match_lang_c
+ PARAMS ((struct bfd_elf_version_expr *, const char *));
+static int lang_vers_match_lang_cplusplus
+ PARAMS ((struct bfd_elf_version_expr *, const char *));
+static int lang_vers_match_lang_java
+ PARAMS ((struct bfd_elf_version_expr *, const char *));
static void lang_do_version_exports_section PARAMS ((void));
static void lang_check_section_addresses PARAMS ((void));
+static void os_region_check
+ PARAMS ((lang_output_section_statement_type *,
+ struct memory_region_struct *, etree_type *, bfd_vma));
typedef void (*callback_t) PARAMS ((lang_wild_statement_type *,
asection *, lang_input_statement_type *,
- void *));
+ PTR));
+static void walk_wild
+ PARAMS ((lang_wild_statement_type *, const char *, const char *,
+ callback_t, PTR));
static void walk_wild_section
PARAMS ((lang_wild_statement_type *, const char *,
- lang_input_statement_type *, callback_t, void *));
+ lang_input_statement_type *, callback_t, PTR));
static void walk_wild_file
PARAMS ((lang_wild_statement_type *, const char *,
- lang_input_statement_type *, callback_t, void *));
+ lang_input_statement_type *, callback_t, PTR));
-static int get_target PARAMS ((const bfd_target *, void *));
+static int get_target PARAMS ((const bfd_target *, PTR));
static void stricpy PARAMS ((char *, char *));
static void strcut PARAMS ((char *, char *));
static int name_compare PARAMS ((char *, char *));
-static int closest_target_match PARAMS ((const bfd_target *, void *));
+static int closest_target_match PARAMS ((const bfd_target *, PTR));
static char * get_first_input_target PARAMS ((void));
-
+
/* EXPORTS */
lang_output_section_statement_type *abs_output_section;
lang_statement_list_type lang_output_section_statement;
@@ -175,21 +186,26 @@ boolean had_output_filename = false;
boolean lang_float_flag = false;
boolean delete_output_file_on_failure = false;
struct lang_nocrossrefs *nocrossref_list;
+struct unique_sections *unique_section_list;
etree_type *base; /* Relocation base - or null */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
+#if defined (__STDC__) || defined (ALMOST_STDC)
#define cat(a,b) a##b
#else
#define cat(a,b) a/**/b
#endif
-#define new_stat(x,y) (cat(x,_type)*) new_statement(cat(x,_enum), sizeof(cat(x,_type)),y)
+/* Don't beautify the line below with "innocent" whitespace, it breaks
+ the K&R C preprocessor! */
+#define new_stat(x, y) \
+ (cat (x,_type)*) new_statement (cat (x,_enum), sizeof (cat (x,_type)), y)
-#define outside_section_address(q) ( (q)->output_offset + (q)->output_section->vma)
+#define outside_section_address(q) \
+ ((q)->output_offset + (q)->output_section->vma)
-#define outside_symbol_address(q) ((q)->value + outside_section_address(q->section))
+#define outside_symbol_address(q) \
+ ((q)->value + outside_section_address (q->section))
#define SECTION_NAME_MAP_LENGTH (16)
@@ -200,9 +216,24 @@ stat_alloc (size)
return obstack_alloc (&stat_obstack, size);
}
-/*----------------------------------------------------------------------
- Generic traversal routines for finding matching sections.
-*/
+boolean
+unique_section_p (secnam)
+ const char *secnam;
+{
+ struct unique_sections *unam;
+
+ for (unam = unique_section_list; unam; unam = unam->next)
+ if (wildcardp (unam->name)
+ ? fnmatch (unam->name, secnam, 0) == 0
+ : strcmp (unam->name, secnam) == 0)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+/* Generic traversal routines for finding matching sections. */
static void
walk_wild_section (ptr, section, file, callback, data)
@@ -210,20 +241,22 @@ walk_wild_section (ptr, section, file, callback, data)
const char *section;
lang_input_statement_type *file;
callback_t callback;
- void *data;
+ PTR data;
{
- /* Don't process sections from files which were excluded. */
+ /* Don't process sections from files which were excluded. */
if (ptr->exclude_filename_list != NULL)
{
struct name_list *list_tmp;
- for (list_tmp = ptr->exclude_filename_list; list_tmp; list_tmp = list_tmp->next)
- {
+ for (list_tmp = ptr->exclude_filename_list;
+ list_tmp;
+ list_tmp = list_tmp->next)
+ {
boolean match;
if (wildcardp (list_tmp->name))
- match = fnmatch (list_tmp->name, file->filename, 0) == 0 ? true : false;
+ match = fnmatch (list_tmp->name, file->filename, 0) == 0;
else
- match = strcmp (list_tmp->name, file->filename) == 0 ? true : false;
+ match = strcmp (list_tmp->name, file->filename) == 0;
if (match)
return;
@@ -233,31 +266,26 @@ walk_wild_section (ptr, section, file, callback, data)
if (file->just_syms_flag == false)
{
register asection *s;
- boolean wildcard;
+ boolean wildcard = false;
- if (section == NULL)
- wildcard = false;
- else
+ if (section != NULL)
wildcard = wildcardp (section);
for (s = file->the_bfd->sections; s != NULL; s = s->next)
{
boolean match;
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
if (section == NULL)
match = true;
+ else if (wildcard)
+ match = fnmatch (section, sname, 0) == 0;
else
- {
- const char *name;
+ match = strcmp (section, sname) == 0;
- name = bfd_get_section_name (file->the_bfd, s);
- if (wildcard)
- match = fnmatch (section, name, 0) == 0 ? true : false;
- else
- match = strcmp (section, name) == 0 ? true : false;
- }
-
- if (match)
+ /* If this is a wild-card output section statement, exclude
+ sections that match UNIQUE_SECTION_LIST. */
+ if (match && (data == NULL || !unique_section_p (sname)))
(*callback) (ptr, s, file, data);
}
}
@@ -271,7 +299,7 @@ walk_wild_file (s, section, f, callback, data)
const char *section;
lang_input_statement_type *f;
callback_t callback;
- void *data;
+ PTR data;
{
if (f->the_bfd == NULL
|| ! bfd_check_format (f->the_bfd, bfd_archive))
@@ -308,7 +336,7 @@ walk_wild (s, section, file, callback, data)
const char *section;
const char *file;
callback_t callback;
- void *data;
+ PTR data;
{
if (file == (char *) NULL)
{
@@ -334,12 +362,10 @@ walk_wild (s, section, file, callback, data)
f = lookup_name (file);
walk_wild_file (s, section, f, callback, data);
}
-}
-
-/*----------------------------------------------------------------------
- lang_for_each_statement walks the parse tree and calls the provided
- function for each node
-*/
+}
+
+/* lang_for_each_statement walks the parse tree and calls the provided
+ function for each node. */
static void
lang_for_each_statement_worker (func, s)
@@ -392,11 +418,11 @@ void
lang_for_each_statement (func)
void (*func) PARAMS ((lang_statement_union_type *));
{
- lang_for_each_statement_worker (func,
- statement_list.head);
+ lang_for_each_statement_worker (func, statement_list.head);
}
/*----------------------------------------------------------------------*/
+
void
lang_list_init (list)
lang_statement_list_type *list;
@@ -405,18 +431,13 @@ lang_list_init (list)
list->tail = &list->head;
}
-/*----------------------------------------------------------------------
+/* Build a new statement node for the parse tree. */
- build a new statement node for the parse tree
-
- */
-
-static
-lang_statement_union_type *
+static lang_statement_union_type *
new_statement (type, size, list)
enum statement_enum type;
size_t size;
- lang_statement_list_type * list;
+ lang_statement_list_type *list;
{
lang_statement_union_type *new = (lang_statement_union_type *)
stat_alloc (size);
@@ -427,22 +448,20 @@ new_statement (type, size, list)
return new;
}
-/*
- Build a new input file node for the language. There are several ways
- in which we treat an input file, eg, we only look at symbols, or
- prefix it with a -l etc.
+/* Build a new input file node for the language. There are several
+ ways in which we treat an input file, eg, we only look at symbols,
+ or prefix it with a -l etc.
- We can be supplied with requests for input files more than once;
- they may, for example be split over serveral lines like foo.o(.text)
- foo.o(.data) etc, so when asked for a file we check that we havn't
- got it already so we don't duplicate the bfd.
+ We can be supplied with requests for input files more than once;
+ they may, for example be split over serveral lines like foo.o(.text)
+ foo.o(.data) etc, so when asked for a file we check that we haven't
+ got it already so we don't duplicate the bfd. */
- */
static lang_input_statement_type *
new_afile (name, file_type, target, add_to_list)
- CONST char *name;
+ const char *name;
lang_input_file_enum_type file_type;
- CONST char *target;
+ const char *target;
boolean add_to_list;
{
lang_input_statement_type *p;
@@ -527,15 +546,16 @@ new_afile (name, file_type, target, add_to_list)
lang_input_statement_type *
lang_add_input_file (name, file_type, target)
- CONST char *name;
+ const char *name;
lang_input_file_enum_type file_type;
- CONST char *target;
+ const char *target;
{
lang_has_input_file = true;
return new_afile (name, file_type, target, true);
}
-/* Build enough state so that the parser can build its tree */
+/* Build enough state so that the parser can build its tree. */
+
void
lang_init ()
{
@@ -551,29 +571,29 @@ lang_init ()
first_file = lang_add_input_file ((char *) NULL,
lang_input_file_is_marker_enum,
(char *) NULL);
- abs_output_section = lang_output_section_statement_lookup (BFD_ABS_SECTION_NAME);
+ abs_output_section =
+ lang_output_section_statement_lookup (BFD_ABS_SECTION_NAME);
abs_output_section->bfd_section = bfd_abs_section_ptr;
}
/*----------------------------------------------------------------------
- A region is an area of memory declared with the
- MEMORY { name:org=exp, len=exp ... }
- syntax.
+ A region is an area of memory declared with the
+ MEMORY { name:org=exp, len=exp ... }
+ syntax.
- We maintain a list of all the regions here
+ We maintain a list of all the regions here.
- If no regions are specified in the script, then the default is used
- which is created when looked up to be the entire data space
-*/
+ If no regions are specified in the script, then the default is used
+ which is created when looked up to be the entire data space. */
static lang_memory_region_type *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 (name)
- CONST char *CONST name;
+ const char *const name;
{
lang_memory_region_type *p;
@@ -607,7 +627,7 @@ lang_memory_region_lookup (name)
lang_memory_region_type *new =
(lang_memory_region_type *) stat_alloc (sizeof (lang_memory_region_type));
- new->name = buystring (name);
+ new->name = xstrdup (name);
new->next = (lang_memory_region_type *) NULL;
*lang_memory_region_list_tail = new;
@@ -615,7 +635,7 @@ lang_memory_region_lookup (name)
new->origin = 0;
new->flags = 0;
new->not_flags = 0;
- new->length = ~(bfd_size_type)0;
+ new->length = ~(bfd_size_type) 0;
new->current = 0;
new->had_full_message = false;
@@ -623,8 +643,7 @@ lang_memory_region_lookup (name)
}
}
-
-lang_memory_region_type *
+static lang_memory_region_type *
lang_memory_default (section)
asection *section;
{
@@ -651,7 +670,7 @@ lang_memory_default (section)
lang_output_section_statement_type *
lang_output_section_find (name)
- CONST char *CONST name;
+ const char *const name;
{
lang_statement_union_type *u;
lang_output_section_statement_type *lookup;
@@ -671,7 +690,7 @@ lang_output_section_find (name)
lang_output_section_statement_type *
lang_output_section_statement_lookup (name)
- CONST char *CONST name;
+ const char *const name;
{
lang_output_section_statement_type *lookup;
@@ -694,7 +713,7 @@ lang_output_section_statement_lookup (name)
lookup->addr_tree = (etree_type *) NULL;
lang_list_init (&lookup->children);
- lookup->memspec = (CONST char *) NULL;
+ lookup->memspec = (const char *) NULL;
lookup->flags = 0;
lookup->subsection_alignment = -1;
lookup->section_alignment = -1;
@@ -809,8 +828,8 @@ init_os (s)
}
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 */
+ /* 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) = (PTR) new;
@@ -883,13 +902,13 @@ exp_init_os (exp)
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 already_linked_hash_entry
{
struct bfd_hash_entry root;
struct already_linked *entry;
};
-struct already_linked
+struct already_linked
{
struct already_linked *next;
asection *sec;
@@ -899,7 +918,6 @@ struct already_linked
static struct bfd_hash_table already_linked_table;
-/*ARGSUSED*/
static void
section_already_linked (abfd, sec, data)
bfd *abfd;
@@ -926,30 +944,30 @@ section_already_linked (abfd, sec, data)
if ((flags & SEC_LINK_ONCE) == 0)
return;
- /* FIXME: When doing a relocateable link, we may have trouble
+ /* 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 relocateable link (technically, they should be discarded
+ 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 relocateable link
+ Also, not merging link once sections in a relocatable link
causes trouble for MIPS ELF, which relies in link once semantics
to handle the .reginfo section correctly. */
name = bfd_get_section_name (abfd, sec);
- already_linked_list =
+ 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)
+ for (l = already_linked_list->entry; l != NULL; l = l->next)
{
if (sec->comdat == NULL
|| l->sec->comdat == NULL
@@ -995,8 +1013,7 @@ section_already_linked (abfd, sec, data)
discarded, we must retain a pointer to the section which
we are really going to use. */
sec->output_section = bfd_abs_section_ptr;
- if (sec->comdat != NULL)
- sec->comdat->sec = l->sec;
+ sec->kept_section = l->sec;
return;
}
@@ -1005,7 +1022,7 @@ section_already_linked (abfd, sec, data)
/* This is the first section with this name. Record it. Allocate
the memory from the same obstack as the hash table is kept in. */
- l = ((struct already_linked *)
+ l = ((struct already_linked *)
bfd_hash_allocate (&already_linked_table, sizeof *l));
l->sec = sec;
@@ -1022,7 +1039,7 @@ already_linked_newfunc (entry, table, string)
struct bfd_hash_table *table;
const char *string ATTRIBUTE_UNUSED;
{
- struct already_linked_hash_entry *ret =
+ struct already_linked_hash_entry *ret =
bfd_hash_allocate (table, sizeof (struct already_linked_hash_entry));
ret->entry = NULL;
@@ -1123,14 +1140,12 @@ wild_doit (ptr, section, output, file)
flagword flags;
if (output->bfd_section == NULL)
- {
- init_os (output);
- first = true;
- }
- else
- first = false;
+ init_os (output);
+
+ first = ! output->bfd_section->linker_has_input;
+ output->bfd_section->linker_has_input = 1;
- /* Add a section reference to the list */
+ /* Add a section reference to the list. */
new = new_stat (lang_input_section, ptr);
new->section = section;
@@ -1196,6 +1211,13 @@ wild_doit (ptr, section, output, file)
/* If supplied an aligment, then force it. */
if (output->section_alignment != -1)
output->bfd_section->alignment_power = output->section_alignment;
+
+ if (section->flags & SEC_BLOCK)
+ {
+ section->output_section->flags |= SEC_BLOCK;
+ /* FIXME: This value should really be obtained from the bfd... */
+ output->block_value = 128;
+ }
}
}
@@ -1308,47 +1330,47 @@ output_section_callback (ptr, section, file, output)
lang_wild_statement_type *ptr;
asection *section;
lang_input_statement_type *file;
- void *output;
+ PTR output;
{
lang_statement_union_type *before;
-
+
/* If the wild pattern was marked KEEP, the member sections
should be as well. */
if (ptr->keep_sections)
section->flags |= SEC_KEEP;
-
+
before = wild_sort (ptr, file, section);
-
+
/* Here BEFORE points to the lang_input_section which
should follow the one we are about to add. If BEFORE
is NULL, then the section should just go at the end
of the current list. */
-
+
if (before == NULL)
- wild_doit (&ptr->children, section,
- (lang_output_section_statement_type *) output,
+ wild_doit (&ptr->children, section,
+ (lang_output_section_statement_type *) output,
file);
else
{
lang_statement_list_type list;
lang_statement_union_type **pp;
-
+
lang_list_init (&list);
- wild_doit (&list, section,
- (lang_output_section_statement_type *) output,
+ wild_doit (&list, section,
+ (lang_output_section_statement_type *) output,
file);
-
+
/* If we are discarding the section, LIST.HEAD will
be NULL. */
if (list.head != NULL)
{
ASSERT (list.head->next == NULL);
-
+
for (pp = &ptr->children.head;
*pp != before;
pp = &(*pp)->next)
ASSERT (*pp != NULL);
-
+
list.head->next = *pp;
*pp = list.head;
}
@@ -1415,6 +1437,11 @@ load_symbols (entry, place)
lang_statement_list_type *hold;
err = bfd_get_error ();
+
+ /* See if the emulation has some special knowledge. */
+ if (ldemul_unrecognized_file (entry))
+ return;
+
if (err == bfd_error_file_ambiguously_recognized)
{
char **p;
@@ -1432,13 +1459,7 @@ load_symbols (entry, place)
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
- /* See if the emulation has some special knowledge. */
-
- if (ldemul_unrecognized_file (entry))
- return;
-
/* Try to interpret the file as a linker script. */
-
ldfile_open_command_file (entry->filename);
hold = stat_ptr;
@@ -1503,8 +1524,6 @@ load_symbols (entry, place)
entry->loaded = true;
}
-
-
/* Handle a wild statement. SECTION or FILE or both may be NULL,
indicating that it is a wildcard. Separate lang_input_section
statements are created for each part of the expansion; they are
@@ -1518,7 +1537,7 @@ wild (s, section, file, target, output)
const char *target ATTRIBUTE_UNUSED;
lang_output_section_statement_type *output;
{
- walk_wild (s, section, file, output_section_callback, (void *) output);
+ walk_wild (s, section, file, output_section_callback, (PTR) output);
if (section != (char *) NULL
&& strcmp (section, "COMMON") == 0
@@ -1531,66 +1550,70 @@ wild (s, section, file, target, output)
}
/* Return true iff target is the sought target. */
+
static int
get_target (target, data)
- const bfd_target * target;
- void * data;
+ const bfd_target *target;
+ PTR data;
{
- const char * sought = (const char *) data;
-
+ const char *sought = (const char *) data;
+
return strcmp (target->name, sought) == 0;
}
/* Like strcpy() but convert to lower case as well. */
+
static void
stricpy (dest, src)
- char * dest;
- char * src;
+ char *dest;
+ char *src;
{
char c;
-
- while ((c = * src ++) != 0)
+
+ while ((c = *src++) != 0)
{
if (isupper ((unsigned char) c))
c = tolower (c);
- * dest ++ = c;
+ *dest++ = c;
}
- * dest = 0;
+ *dest = 0;
}
/* Remove the first occurance of needle (if any) in haystack
from haystack. */
+
static void
strcut (haystack, needle)
- char * haystack;
- char * needle;
+ char *haystack;
+ char *needle;
{
haystack = strstr (haystack, needle);
-
+
if (haystack)
{
- char * src;
+ char *src;
- for (src = haystack + strlen (needle); * src;)
- * haystack ++ = * src ++;
-
- * haystack = 0;
+ for (src = haystack + strlen (needle); *src;)
+ *haystack++ = *src++;
+
+ *haystack = 0;
}
}
/* Compare two target format name strings.
Return a value indicating how "similar" they are. */
+
static int
name_compare (first, second)
- char * first;
- char * second;
+ char *first;
+ char *second;
{
- char * copy1;
- char * copy2;
- int result;
-
+ char *copy1;
+ char *copy2;
+ int result;
+
copy1 = xmalloc (strlen (first) + 1);
copy2 = xmalloc (strlen (second) + 1);
@@ -1607,13 +1630,13 @@ name_compare (first, second)
/* Return a value based on how many characters match,
starting from the beginning. If both strings are
the same then return 10 * their length. */
- for (result = 0; copy1 [result] == copy2 [result]; result ++)
- if (copy1 [result] == 0)
+ for (result = 0; copy1[result] == copy2[result]; result++)
+ if (copy1[result] == 0)
{
result *= 10;
break;
}
-
+
free (copy1);
free (copy2);
@@ -1621,22 +1644,25 @@ name_compare (first, second)
}
/* Set by closest_target_match() below. */
-static const bfd_target * winner;
+static const bfd_target *winner;
/* Scan all the valid bfd targets looking for one that has the endianness
requirement that was specified on the command line, and is the nearest
match to the original output target. */
+
static int
closest_target_match (target, data)
- const bfd_target * target;
- void * data;
+ const bfd_target *target;
+ PTR data;
{
- const bfd_target * original = (const bfd_target *) data;
-
- if (command_line.endian == ENDIAN_BIG && target->byteorder != BFD_ENDIAN_BIG)
+ const bfd_target *original = (const bfd_target *) data;
+
+ if (command_line.endian == ENDIAN_BIG
+ && target->byteorder != BFD_ENDIAN_BIG)
return 0;
-
- if (command_line.endian == ENDIAN_LITTLE && target->byteorder != BFD_ENDIAN_LITTLE)
+
+ if (command_line.endian == ENDIAN_LITTLE
+ && target->byteorder != BFD_ENDIAN_LITTLE)
return 0;
/* Must be the same flavour. */
@@ -1651,8 +1677,9 @@ closest_target_match (target, data)
}
/* Oh dear, we now have two potential candidates for a successful match.
- Compare their names and choose the better one. */
- if (name_compare (target->name, original->name) > name_compare (winner->name, original->name))
+ Compare their names and choose the better one. */
+ if (name_compare (target->name, original->name)
+ > name_compare (winner->name, original->name))
winner = target;
/* Keep on searching until wqe have checked them all. */
@@ -1660,10 +1687,11 @@ closest_target_match (target, data)
}
/* Return the BFD target format of the first input file. */
+
static char *
get_first_input_target ()
{
- char * target = NULL;
+ char *target = NULL;
LANG_FOR_EACH_INPUT_STATEMENT (s)
{
@@ -1671,18 +1699,18 @@ get_first_input_target ()
&& s->real)
{
ldfile_open_file (s);
-
+
if (s->the_bfd != NULL
&& bfd_check_format (s->the_bfd, bfd_object))
{
target = bfd_get_target (s->the_bfd);
-
+
if (target != NULL)
break;
}
}
}
-
+
return target;
}
@@ -1690,18 +1718,19 @@ get_first_input_target ()
static bfd *
open_output (name)
- const char * name;
+ const char *name;
{
- bfd * output;
+ bfd *output;
- /* Has the user told us which output format to use ? */
+ /* Has the user told us which output format to use? */
if (output_target == (char *) NULL)
{
- /* No - has the current target been set to something other than the default ? */
+ /* No - has the current target been set to something other than
+ the default? */
if (current_target != default_target)
output_target = current_target;
- /* No - can we determine the format of the first input file ? */
+ /* No - can we determine the format of the first input file? */
else
{
output_target = get_first_input_target ();
@@ -1711,46 +1740,55 @@ open_output (name)
output_target = default_target;
}
}
-
- /* Has the user requested a particular endianness on the command line ? */
+
+ /* Has the user requested a particular endianness on the command
+ line? */
if (command_line.endian != ENDIAN_UNSET)
{
- const bfd_target * target;
+ const bfd_target *target;
enum bfd_endian desired_endian;
/* Get the chosen target. */
- target = bfd_search_for_target (get_target, (void *) output_target);
+ target = bfd_search_for_target (get_target, (PTR) output_target);
- if (command_line.endian == ENDIAN_BIG)
- desired_endian = BFD_ENDIAN_BIG;
- else
- desired_endian = BFD_ENDIAN_LITTLE;
-
- /* See if the target has the wrong endianness. This should not happen
- if the linker script has provided big and little endian alternatives,
- but some scrips don't do this. */
- if (target->byteorder != desired_endian)
+ /* If the target is not supported, we cannot do anything. */
+ if (target != NULL)
{
- /* If it does, then see if the target provides
- an alternative with the correct endianness. */
- if (target->alternative_target != NULL
- && (target->alternative_target->byteorder == desired_endian))
- output_target = target->alternative_target->name;
+ if (command_line.endian == ENDIAN_BIG)
+ desired_endian = BFD_ENDIAN_BIG;
else
+ desired_endian = BFD_ENDIAN_LITTLE;
+
+ /* See if the target has the wrong endianness. This should
+ not happen if the linker script has provided big and
+ little endian alternatives, but some scrips don't do
+ this. */
+ if (target->byteorder != desired_endian)
{
- /* Try to find a target as similar as possible to the default
- target, but which has the desired endian characteristic. */
- (void) bfd_search_for_target (closest_target_match, (void *) target);
-
- /* Oh dear - we could not find any targets that satisfy our requirements. */
- if (winner == NULL)
- einfo (_("%P: warning: could not find any targets that match endianness requirement\n"));
+ /* If it does, then see if the target provides
+ an alternative with the correct endianness. */
+ if (target->alternative_target != NULL
+ && (target->alternative_target->byteorder == desired_endian))
+ output_target = target->alternative_target->name;
else
- output_target = winner->name;
+ {
+ /* Try to find a target as similar as possible to
+ the default target, but which has the desired
+ endian characteristic. */
+ (void) bfd_search_for_target (closest_target_match,
+ (PTR) target);
+
+ /* Oh dear - we could not find any targets that
+ satisfy our requirements. */
+ if (winner == NULL)
+ einfo (_("%P: warning: could not find any targets that match endianness requirement\n"));
+ else
+ output_target = winner->name;
+ }
}
}
}
-
+
output = bfd_openw (name, output_target);
if (output == (bfd *) NULL)
@@ -1763,7 +1801,9 @@ open_output (name)
delete_output_file_on_failure = true;
- /* output->flags |= D_PAGED;*/
+#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);
@@ -1782,7 +1822,7 @@ open_output (name)
static void
ldlang_open_output (statement)
- lang_statement_union_type * statement;
+ lang_statement_union_type *statement;
{
switch (statement->header.type)
{
@@ -1830,7 +1870,7 @@ open_input_bfds (s, force)
open_input_bfds (s->output_section_statement.children.head, force);
break;
case lang_wild_statement_enum:
- /* Maybe we should load the file's symbols */
+ /* Maybe we should load the file's symbols. */
if (s->wild_statement.filename
&& ! wildcardp (s->wild_statement.filename))
(void) lookup_name (s->wild_statement.filename);
@@ -1841,8 +1881,8 @@ open_input_bfds (s, force)
struct bfd_link_hash_entry *undefs;
/* We must continually search the entries in the group
- until no new symbols are added to the list of undefined
- symbols. */
+ until no new symbols are added to the list of undefined
+ symbols. */
do
{
@@ -1864,8 +1904,10 @@ open_input_bfds (s, force)
/* 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. */
+ force it to be researched unless the whole archive
+ has been loaded already. */
if (force
+ && !s->input_statement.whole_archive
&& s->input_statement.loaded
&& bfd_check_format (s->input_statement.the_bfd,
bfd_archive))
@@ -1888,7 +1930,8 @@ open_input_bfds (s, force)
}
}
-/* If there are [COMMONS] statements, put a wild one into the bss section */
+/* If there are [COMMONS] statements, put a wild one into the bss
+ section. */
static void
lang_reasonable_defaults ()
@@ -1897,9 +1940,7 @@ lang_reasonable_defaults ()
lang_output_section_statement_lookup (".text");
lang_output_section_statement_lookup (".data");
- default_common_section =
- lang_output_section_statement_lookup (".bss");
-
+ default_common_section = lang_output_section_statement_lookup (".bss");
if (placed_commons == false)
{
@@ -1912,13 +1953,10 @@ lang_reasonable_defaults ()
lang_list_init (&new->children);
}
#endif
-
}
-/*
- Add the supplied name to the symbol table as an undefined reference.
- Remove items from the chain as we open input bfds
- */
+/* Add the supplied name to the symbol table as an undefined reference.
+ Remove items from the chain as we open input bfds. */
typedef struct ldlang_undef_chain_list
{
struct ldlang_undef_chain_list *next;
@@ -1929,7 +1967,7 @@ static ldlang_undef_chain_list_type *ldlang_undef_chain_list_head;
void
ldlang_add_undef (name)
- CONST char *CONST name;
+ const char *const name;
{
ldlang_undef_chain_list_type *new =
((ldlang_undef_chain_list_type *)
@@ -1938,13 +1976,13 @@ ldlang_add_undef (name)
new->next = ldlang_undef_chain_list_head;
ldlang_undef_chain_list_head = new;
- new->name = buystring (name);
+ new->name = xstrdup (name);
}
/* Run through the list of undefineds created above and place them
into the linker hash table as undefined symbols belonging to the
- script file.
-*/
+ script file. */
+
static void
lang_place_undefineds ()
{
@@ -1968,19 +2006,19 @@ lang_place_undefineds ()
}
}
-/* Open input files and attatch to output sections */
+/* Open input files and attatch to output sections. */
+
static void
map_input_to_output_sections (s, target, output_section_statement)
- lang_statement_union_type * s;
- CONST char *target;
- lang_output_section_statement_type * output_section_statement;
+ lang_statement_union_type *s;
+ const char *target;
+ lang_output_section_statement_type *output_section_statement;
{
for (; s != (lang_statement_union_type *) NULL; s = s->next)
{
switch (s->header.type)
{
-
case lang_wild_statement_enum:
wild (&s->wild_statement, s->wild_statement.section_name,
s->wild_statement.filename, target,
@@ -2024,14 +2062,14 @@ map_input_to_output_sections (s, target, output_section_statement)
init_os (output_section_statement);
/* Make sure that any sections mentioned in the assignment
- are initialized. */
+ are initialized. */
exp_init_os (s->assignment_statement.exp);
break;
case lang_afile_asection_pair_statement_enum:
FAIL ();
break;
case lang_address_statement_enum:
- /* Mark the specified section with the supplied address */
+ /* Mark the specified section with the supplied address. */
{
lang_output_section_statement_type *os =
lang_output_section_statement_lookup
@@ -2048,7 +2086,7 @@ map_input_to_output_sections (s, target, output_section_statement)
static void
print_output_section_statement (output_section_statement)
- lang_output_section_statement_type * output_section_statement;
+ lang_output_section_statement_type *output_section_statement;
{
asection *section = output_section_statement->bfd_section;
int len;
@@ -2094,8 +2132,8 @@ print_output_section_statement (output_section_statement)
static void
print_assignment (assignment, output_section)
- lang_assignment_statement_type * assignment;
- lang_output_section_statement_type * output_section;
+ lang_assignment_statement_type *assignment;
+ lang_output_section_statement_type *output_section;
{
int i;
etree_value_type result;
@@ -2124,7 +2162,7 @@ print_assignment (assignment, output_section)
static void
print_input_statement (statm)
- lang_input_statement_type * statm;
+ lang_input_statement_type *statm;
{
if (statm->filename != (char *) NULL)
{
@@ -2135,7 +2173,7 @@ print_input_statement (statm)
/* Print all symbols defined in a particular section. This is called
via bfd_link_hash_traverse. */
-static boolean
+static boolean
print_one_symbol (hash_entry, ptr)
struct bfd_link_hash_entry *hash_entry;
PTR ptr;
@@ -2165,11 +2203,11 @@ print_one_symbol (hash_entry, ptr)
static void
print_input_section (in)
- lang_input_section_type * in;
+ lang_input_section_type *in;
{
asection *i = in->section;
bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size;
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
ldfile_output_machine);
if (size != 0)
{
@@ -2223,20 +2261,20 @@ print_input_section (in)
static void
print_fill_statement (fill)
- lang_fill_statement_type * fill;
+ lang_fill_statement_type *fill;
{
fprintf (config.map_file, " FILL mask 0x%x\n", fill->fill);
}
static void
print_data_statement (data)
- lang_data_statement_type * data;
+ lang_data_statement_type *data;
{
int i;
bfd_vma addr;
bfd_size_type size;
const char *name;
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
ldfile_output_machine);
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
@@ -2307,8 +2345,8 @@ print_reloc_statement (reloc)
int i;
bfd_vma addr;
bfd_size_type size;
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
@@ -2331,7 +2369,7 @@ print_reloc_statement (reloc)
print_nl ();
print_dot = addr + size / opb;
-}
+}
static void
print_padding_statement (s)
@@ -2339,8 +2377,8 @@ print_padding_statement (s)
{
int len;
bfd_vma addr;
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
minfo (" *fill*");
@@ -2366,8 +2404,8 @@ print_padding_statement (s)
static void
print_wild_statement (w, os)
- lang_wild_statement_type * w;
- lang_output_section_statement_type * os;
+ lang_wild_statement_type *w;
+ lang_output_section_statement_type *os;
{
print_space ();
@@ -2377,11 +2415,11 @@ print_wild_statement (w, os)
{
name_list *tmp;
minfo ("EXCLUDE_FILE ( %s", w->exclude_filename_list->name);
- for (tmp=w->exclude_filename_list->next; tmp; tmp = tmp->next)
- minfo (", %s", tmp->name);
+ for (tmp = w->exclude_filename_list->next; tmp; tmp = tmp->next)
+ minfo (", %s", tmp->name);
minfo (")");
- }
- if (w->filename != NULL)
+ }
+ if (w->filename != NULL)
minfo ("%s", w->filename);
else
minfo ("*");
@@ -2519,7 +2557,7 @@ print_statements ()
void
dprint_statement (s, n)
- lang_statement_union_type * s;
+ lang_statement_union_type *s;
int n;
{
FILE *map_save = config.map_file;
@@ -2542,10 +2580,10 @@ dprint_statement (s, n)
static bfd_vma
insert_pad (this_ptr, fill, power, output_section_statement, dot)
- lang_statement_union_type ** this_ptr;
+ lang_statement_union_type **this_ptr;
fill_type fill;
unsigned int power;
- asection * output_section_statement;
+ asection *output_section_statement;
bfd_vma dot;
{
/* Align this section first to the
@@ -2553,11 +2591,10 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
to the output section's requirement.
If this alignment is > than any seen before,
then record it too. Perform the alignment by
- inserting a magic 'padding' statement.
- */
+ inserting a magic 'padding' statement. */
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
unsigned int alignment_needed = align_power (dot, power) - dot;
if (alignment_needed != 0)
@@ -2566,7 +2603,7 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
((lang_statement_union_type *)
stat_alloc (sizeof (lang_padding_statement_type)));
- /* Link into existing chain */
+ /* Link into existing chain. */
new->header.next = *this_ptr;
*this_ptr = new;
new->header.type = lang_padding_statement_enum;
@@ -2577,8 +2614,7 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
new->padding_statement.size = alignment_needed * opb;
}
-
- /* Remember the most restrictive alignment */
+ /* Remember the most restrictive alignment. */
if (power > output_section_statement->alignment_power)
{
output_section_statement->alignment_power = power;
@@ -2588,19 +2624,20 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
return dot + alignment_needed;
}
-/* Work out how much this section will move the dot point */
+/* Work out how much this section will move the dot point. */
+
static bfd_vma
size_input_section (this_ptr, output_section_statement, fill, dot, relax)
- lang_statement_union_type ** this_ptr;
- lang_output_section_statement_type * output_section_statement;
+ lang_statement_union_type **this_ptr;
+ lang_output_section_statement_type *output_section_statement;
fill_type fill;
bfd_vma dot;
boolean relax ATTRIBUTE_UNUSED;
{
lang_input_section_type *is = &((*this_ptr)->input_section);
asection *i = is->section;
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
if (is->ifile->just_syms_flag == false)
{
@@ -2611,18 +2648,17 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax)
dot = insert_pad (this_ptr, fill, i->alignment_power,
output_section_statement->bfd_section, dot);
- /* Remember where in the output section this input section goes */
+ /* Remember where in the output section this input section goes. */
i->output_offset = dot - output_section_statement->bfd_section->vma;
- /* Mark how big the output section must be to contain this now
- */
+ /* Mark how big the output section must be to contain this now. */
if (i->_cooked_size != 0)
dot += i->_cooked_size / opb;
else
dot += i->_raw_size / opb;
- output_section_statement->bfd_section->_raw_size =
- (dot - output_section_statement->bfd_section->vma) * opb;
+ output_section_statement->bfd_section->_raw_size =
+ (dot - output_section_statement->bfd_section->vma) * opb;
}
else
{
@@ -2633,27 +2669,29 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax)
}
#define IGNORE_SECTION(bfd, s) \
- (((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_LOAD)) != (SEC_ALLOC | SEC_LOAD)) \
+ (((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_LOAD)) \
+ != (SEC_ALLOC | SEC_LOAD)) \
|| bfd_section_size (bfd, s) == 0)
/* Check to see if any allocated sections overlap with other allocated
sections. This can happen when the linker script specifically specifies
the output section addresses of the two sections. */
+
static void
lang_check_section_addresses ()
{
- asection * s;
+ asection *s;
unsigned opb = bfd_octets_per_byte (output_bfd);
/* Scan all sections in the output list. */
for (s = output_bfd->sections; s != NULL; s = s->next)
{
- asection * os;
-
+ asection *os;
+
/* Ignore sections which are not loaded or which have no contents. */
if (IGNORE_SECTION (output_bfd, s))
continue;
-
+
/* Once we reach section 's' stop our seach. This prevents two
warning messages from being produced, one for 'section A overlaps
section B' and one for 'section B overlaps section A'. */
@@ -2663,7 +2701,7 @@ lang_check_section_addresses ()
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;
@@ -2675,15 +2713,15 @@ lang_check_section_addresses ()
os_start = bfd_section_lma (output_bfd, os);
s_end = s_start + bfd_section_size (output_bfd, s) / opb - 1;
os_end = os_start + bfd_section_size (output_bfd, os) / opb - 1;
-
+
/* Look for an overlap. */
if ((s_end < os_start) || (s_start > os_end))
continue;
-
+
einfo (
_("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
s->name, s_start, s_end, os->name, os_start, os_end);
-
+
/* Once we have found one overlap for this section,
stop looking for others. */
break;
@@ -2699,14 +2737,14 @@ static boolean relax_again;
/* Make sure the new address is within the region. We explicitly permit the
current address to be at the exact end of the region when the address is
non-zero, in case the region is at the end of addressable memory and the
- calculation wraps around. */
+ calculation wraps around. */
static void
os_region_check (os, region, tree, base)
- lang_output_section_statement_type *os;
- struct memory_region_struct *region;
- etree_type *tree;
- bfd_vma base;
+ lang_output_section_statement_type *os;
+ struct memory_region_struct *region;
+ etree_type *tree;
+ bfd_vma base;
{
if ((region->current < region->origin
|| (region->current - region->origin > region->length))
@@ -2737,14 +2775,14 @@ os_region_check (os, region, tree, base)
bfd_vma
lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
- lang_statement_union_type * s;
- lang_output_section_statement_type * output_section_statement;
- lang_statement_union_type ** prev;
+ lang_statement_union_type *s;
+ lang_output_section_statement_type *output_section_statement;
+ lang_statement_union_type **prev;
fill_type fill;
bfd_vma dot;
boolean relax;
{
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
ldfile_output_machine);
/* Size up the sections from their constituent parts. */
@@ -2755,8 +2793,9 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
case lang_output_section_statement_enum:
{
bfd_vma after;
- lang_output_section_statement_type *os = &s->output_section_statement;
+ lang_output_section_statement_type *os;
+ os = &s->output_section_statement;
if (os->bfd_section == NULL)
/* This section was never actually created. */
break;
@@ -2767,7 +2806,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
to do this, but nothing simple comes to mind. */
if ((os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
{
- asection * input;
+ asection *input;
if (os->children.head == NULL
|| os->children.head->next != NULL
@@ -2811,19 +2850,22 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
&& ! link_info.relocateable
&& strcmp (os->region->name, "*default*") == 0
&& lang_memory_region_list != NULL
- && (strcmp (lang_memory_region_list->name, "*default*") != 0
+ && (strcmp (lang_memory_region_list->name,
+ "*default*") != 0
|| lang_memory_region_list->next != NULL))
einfo (_("%P: warning: no memory region specified for section `%s'\n"),
- bfd_get_section_name (output_bfd, os->bfd_section));
+ 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);
+ 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"),
@@ -2845,7 +2887,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
}
dot = r.value + r.section->bfd_section->vma;
}
-
+
/* The section starts here.
First, align to what the section needs. */
@@ -2853,15 +2895,16 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
dot = align_power (dot, os->section_alignment);
bfd_set_section_vma (0, os->bfd_section, dot);
-
+
os->bfd_section->output_offset = 0;
}
- (void) lang_size_sections (os->children.head, os, &os->children.head,
+ (void) lang_size_sections (os->children.head, os,
+ &os->children.head,
os->fill, dot, relax);
-
- /* put the section within the requested block size, or align at
- the block boundary */
+
+ /* Put the section within the requested block size, or
+ align at the block boundary. */
after = ALIGN_N (os->bfd_section->vma
+ os->bfd_section->_raw_size / opb,
/* The coercion here is important, see ld.h. */
@@ -2870,8 +2913,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
if (bfd_is_abs_section (os->bfd_section))
ASSERT (after == os->bfd_section->vma);
else
- os->bfd_section->_raw_size =
- (after - os->bfd_section->vma) * opb;
+ os->bfd_section->_raw_size =
+ (after - os->bfd_section->vma) * opb;
dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb;
os->processed = true;
@@ -2879,7 +2922,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
We only do this if the section is going to be allocated,
since unallocated sections do not contribute to the region's
overall size in memory.
-
+
If the SEC_NEVER_LOAD bit is not set, it will affect the
addresses of sections after it. We have to update
dot. */
@@ -2890,36 +2933,37 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
& (SEC_ALLOC | SEC_LOAD))))
{
os->region->current = dot;
-
+
/* Make sure the new address is within the region. */
- os_region_check (os, os->region, os->addr_tree,
- os->bfd_section->vma);
-
- /* if there's no load address specified, use the run region as
- the load region */
- if (os->lma_region == NULL && os->load_base == NULL)
- os->lma_region = os->region;
-
- if (os->lma_region != NULL)
- {
- if (os->load_base != NULL)
- {
- einfo (_("%X%P: use an absolute load address or a load memory region, not both\n"));
- }
- else
- {
- /* don't allocate twice */
- if (os->lma_region != os->region)
- {
- /* set load_base, which will be handled later */
- os->load_base = exp_intop (os->lma_region->current);
- os->lma_region->current +=
- os->bfd_section->_raw_size / opb;
- os_region_check (os, os->lma_region, NULL,
- os->bfd_section->lma);
- }
- }
- }
+ os_region_check (os, os->region, os->addr_tree,
+ os->bfd_section->vma);
+
+ /* If there's no load address specified, use the run
+ region as the load region. */
+ if (os->lma_region == NULL && os->load_base == NULL)
+ os->lma_region = os->region;
+
+ if (os->lma_region != NULL)
+ {
+ if (os->load_base != NULL)
+ {
+ einfo (_("%X%P: use an absolute load address or a load memory region, not both\n"));
+ }
+ else
+ {
+ /* Don't allocate twice. */
+ if (os->lma_region != os->region)
+ {
+ /* Set load_base, which will be handled later. */
+ os->load_base =
+ exp_intop (os->lma_region->current);
+ os->lma_region->current +=
+ os->bfd_section->_raw_size / opb;
+ os_region_check (os, os->lma_region, NULL,
+ os->bfd_section->lma);
+ }
+ }
+ }
}
}
break;
@@ -2936,14 +2980,15 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
{
unsigned int size = 0;
- s->data_statement.output_vma = dot - output_section_statement->bfd_section->vma;
+ s->data_statement.output_vma =
+ dot - output_section_statement->bfd_section->vma;
s->data_statement.output_section =
output_section_statement->bfd_section;
switch (s->data_statement.type)
{
- default:
- abort();
+ default:
+ abort ();
case QUAD:
case SQUAD:
size = QUAD_SIZE;
@@ -2958,16 +3003,18 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
size = BYTE_SIZE;
break;
}
- if (size < opb)
- size = opb;
+ if (size < opb)
+ size = opb;
dot += size / opb;
output_section_statement->bfd_section->_raw_size += size;
/* The output section gets contents, and then we inspect for
any flags set in the input script which override any ALLOC. */
output_section_statement->bfd_section->flags |= SEC_HAS_CONTENTS;
- if (!(output_section_statement->flags & SEC_NEVER_LOAD)) {
- output_section_statement->bfd_section->flags |= SEC_ALLOC | SEC_LOAD;
- }
+ if (!(output_section_statement->flags & SEC_NEVER_LOAD))
+ {
+ output_section_statement->bfd_section->flags |=
+ SEC_ALLOC | SEC_LOAD;
+ }
}
break;
@@ -2984,13 +3031,12 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
output_section_statement->bfd_section->_raw_size += size;
}
break;
-
+
case lang_wild_statement_enum:
dot = lang_size_sections (s->wild_statement.children.head,
output_section_statement,
&s->wild_statement.children.head,
-
fill, dot, relax);
break;
@@ -3030,7 +3076,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
case lang_input_statement_enum:
break;
case lang_fill_statement_enum:
- s->fill_statement.output_section = output_section_statement->bfd_section;
+ s->fill_statement.output_section =
+ output_section_statement->bfd_section;
fill = s->fill_statement.fill;
break;
@@ -3114,13 +3161,13 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
bfd_vma
lang_do_assignments (s, output_section_statement, fill, dot)
- lang_statement_union_type * s;
- lang_output_section_statement_type * output_section_statement;
+ lang_statement_union_type *s;
+ lang_output_section_statement_type *output_section_statement;
fill_type fill;
bfd_vma dot;
{
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
for (; s != (lang_statement_union_type *) NULL; s = s->next)
{
@@ -3135,9 +3182,9 @@ lang_do_assignments (s, output_section_statement, fill, dot)
case lang_output_section_statement_enum:
{
- lang_output_section_statement_type *os =
- &(s->output_section_statement);
+ lang_output_section_statement_type *os;
+ os = &(s->output_section_statement);
if (os->bfd_section != NULL)
{
dot = os->bfd_section->vma;
@@ -3146,14 +3193,15 @@ lang_do_assignments (s, output_section_statement, fill, dot)
dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb;
}
- if (os->load_base)
+ 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)
+ it won't have a bfd_section. */
+ if (os->bfd_section)
{
- os->bfd_section->lma
- = exp_get_abs_int(os->load_base, 0,"load base", lang_final_phase_enum);
+ os->bfd_section->lma
+ = exp_get_abs_int (os->load_base, 0, "load base",
+ lang_final_phase_enum);
}
}
}
@@ -3186,28 +3234,28 @@ lang_do_assignments (s, output_section_statement, fill, dot)
}
{
unsigned int size;
- switch (s->data_statement.type)
- {
- default:
- abort();
- case QUAD:
- case SQUAD:
- size = QUAD_SIZE;
- break;
- case LONG:
- size = LONG_SIZE;
- break;
- case SHORT:
- size = SHORT_SIZE;
- break;
- case BYTE:
- size = BYTE_SIZE;
- break;
- }
- if (size < opb)
- size = opb;
- dot += size / opb;
- }
+ switch (s->data_statement.type)
+ {
+ default:
+ abort ();
+ case QUAD:
+ case SQUAD:
+ size = QUAD_SIZE;
+ break;
+ case LONG:
+ size = LONG_SIZE;
+ break;
+ case SHORT:
+ size = SHORT_SIZE;
+ break;
+ case BYTE:
+ size = BYTE_SIZE;
+ break;
+ }
+ if (size < opb)
+ size = opb;
+ dot += size / opb;
+ }
break;
case lang_reloc_statement_enum:
@@ -3309,8 +3357,10 @@ lang_set_startof ()
h = bfd_link_hash_lookup (link_info.hash, buf, false, false, true);
if (h != NULL && h->type == bfd_link_hash_undefined)
{
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb;
+
+ opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
h->type = bfd_link_hash_defined;
if (s->_cooked_size != 0)
h->u.def.value = s->_cooked_size / opb;
@@ -3360,7 +3410,7 @@ lang_finish ()
else
{
bfd_vma val;
- CONST char *send;
+ const char *send;
/* We couldn't find the entry symbol. Try parsing it as a
number. */
@@ -3420,7 +3470,7 @@ lang_check ()
{
lang_statement_union_type *file;
bfd *input_bfd;
- CONST bfd_arch_info_type *compatible;
+ const bfd_arch_info_type *compatible;
for (file = file_chain.head;
file != (lang_statement_union_type *) NULL;
@@ -3436,8 +3486,11 @@ lang_check ()
bfd_printable_name (input_bfd), input_bfd,
bfd_printable_name (output_bfd));
}
- else
+ else if (bfd_count_sections (input_bfd))
{
+ /* If the input bfd has no contents, it shouldn't set the
+ private data of the output bfd. */
+
bfd_error_handler_type pfn = NULL;
/* If we aren't supposed to warn about mismatched input
@@ -3492,8 +3545,8 @@ lang_one_common (h, info)
unsigned int power_of_two;
bfd_vma size;
asection *section;
- unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
if (h->type != bfd_link_hash_common)
return true;
@@ -3526,7 +3579,7 @@ lang_one_common (h, info)
/* Make sure the section is allocated in memory, and make sure that
it is no longer a common section. */
section->flags |= SEC_ALLOC;
- section->flags &= ~ SEC_IS_COMMON;
+ section->flags &= ~SEC_IS_COMMON;
if (config.map_file != NULL)
{
@@ -3578,12 +3631,9 @@ lang_one_common (h, info)
return true;
}
-/*
-run through the input files and ensure that every input
-section has somewhere to go. If one is found without
-a destination then create an input request and place it
-into the statement tree.
-*/
+/* Run through the input files and ensure that every input section has
+ somewhere to go. If one is found without a destination then create
+ an input request and place it into the statement tree. */
static void
lang_place_orphans ()
@@ -3599,7 +3649,7 @@ lang_place_orphans ()
if (s->output_section == (asection *) NULL)
{
/* This section of the file is not attatched, root
- around for a sensible place for it to go */
+ around for a sensible place for it to go. */
if (file->just_syms_flag)
{
@@ -3647,11 +3697,10 @@ lang_place_orphans ()
}
}
-
void
lang_set_flags (ptr, flags, invert)
lang_memory_region_type *ptr;
- CONST char *flags;
+ const char *flags;
int invert;
{
flagword *ptr_flags;
@@ -3725,11 +3774,11 @@ lang_for_each_file (func)
void
lang_for_each_input_section (func)
- void (*func) PARAMS ((bfd * ab, asection * as));
+ void (*func) PARAMS ((bfd *ab, asection *as));
{
LANG_FOR_EACH_INPUT_STATEMENT (f)
{
- asection * s;
+ asection *s;
for (s = f->the_bfd->sections;
s != (asection *) NULL;
@@ -3744,7 +3793,7 @@ lang_for_each_input_section (func)
void
ldlang_add_file (entry)
- lang_input_statement_type * entry;
+ lang_input_statement_type *entry;
{
bfd **pp;
@@ -3779,7 +3828,7 @@ ldlang_add_file (entry)
void
lang_add_output (name, from_script)
- CONST char *name;
+ const char *name;
int from_script;
{
/* Make -o on command line override OUTPUT in script. */
@@ -3790,7 +3839,6 @@ lang_add_output (name, from_script)
}
}
-
static lang_output_section_statement_type *current_section;
static int
@@ -3803,7 +3851,7 @@ topower (x)
if (x < 0)
return -1;
- for (l = 0; l < 32; l++)
+ for (l = 0; l < 32; l++)
{
if (i >= (unsigned int) x)
return l;
@@ -3818,7 +3866,7 @@ lang_enter_output_section_statement (output_section_statement_name,
address_exp, sectype, block_value,
align, subalign, ebase)
const char *output_section_statement_name;
- etree_type * address_exp;
+ etree_type *address_exp;
enum section_type sectype;
bfd_vma block_value;
etree_type *align;
@@ -3831,19 +3879,17 @@ lang_enter_output_section_statement (output_section_statement_name,
os =
lang_output_section_statement_lookup (output_section_statement_name);
+ /* 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. */
-
- /* Add this statement to tree */
- /* add_statement(lang_output_section_statement_enum,
- output_section_statement);*/
- /* Make next things chain into subchain of this */
-
- if (os->addr_tree ==
- (etree_type *) NULL)
- {
- os->addr_tree =
- address_exp;
- }
+ if (os->addr_tree == (etree_type *) NULL)
+ {
+ os->addr_tree = address_exp;
+ }
os->sectype = sectype;
if (sectype != noload_section)
os->flags = SEC_NO_FLAGS;
@@ -3852,19 +3898,15 @@ lang_enter_output_section_statement (output_section_statement_name,
os->block_value = block_value ? block_value : 1;
stat_ptr = &os->children;
- os->subsection_alignment = topower(
- exp_get_value_int(subalign, -1,
- "subsection alignment",
- 0));
- os->section_alignment = topower(
- exp_get_value_int(align, -1,
- "section alignment", 0));
+ os->subsection_alignment =
+ topower (exp_get_value_int (subalign, -1, "subsection alignment", 0));
+ os->section_alignment =
+ topower (exp_get_value_int (align, -1, "section alignment", 0));
os->load_base = ebase;
return os;
}
-
void
lang_final ()
{
@@ -3874,7 +3916,8 @@ lang_final ()
new->name = output_filename;
}
-/* Reset the current counters in the regions */
+/* Reset the current counters in the regions. */
+
static void
reset_memory_regions ()
{
@@ -3897,7 +3940,7 @@ gc_section_callback (ptr, section, file, data)
lang_wild_statement_type *ptr;
asection *section;
lang_input_statement_type *file ATTRIBUTE_UNUSED;
- void *data ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
{
/* If the wild pattern was marked KEEP, the member sections
should be as well. */
@@ -3921,7 +3964,7 @@ lang_gc_wild (s, section, file)
static void
lang_gc_sections_1 (s)
- lang_statement_union_type * s;
+ lang_statement_union_type *s;
{
for (; s != (lang_statement_union_type *) NULL; s = s->next)
{
@@ -3959,7 +4002,7 @@ lang_gc_sections ()
/* Keep all sections containing symbols undefined on the command-line.
Handle the entry symbol at the same time. */
-
+
if (entry_symbol != NULL)
{
fake_list_start.next = ldlang_undef_chain_list_head;
@@ -3971,12 +4014,12 @@ lang_gc_sections ()
for (; ulist; ulist = ulist->next)
{
- h = bfd_link_hash_lookup (link_info.hash, ulist->name,
+ h = bfd_link_hash_lookup (link_info.hash, ulist->name,
false, false, false);
if (h != (struct bfd_link_hash_entry *) NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak)
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak)
&& ! bfd_is_abs_section (h->u.def.section))
{
h->u.def.section->flags |= SEC_KEEP;
@@ -3992,16 +4035,17 @@ lang_process ()
lang_reasonable_defaults ();
current_target = default_target;
- lang_for_each_statement (ldlang_open_output); /* Open the output file */
+ /* Open the output file. */
+ lang_for_each_statement (ldlang_open_output);
ldemul_create_output_section_statements ();
- /* Add to the hash table all undefineds on the command line */
+ /* Add to the hash table all undefineds on the command line. */
lang_place_undefineds ();
already_linked_table_init ();
- /* Create a bfd for each input file */
+ /* Create a bfd for each input file. */
current_target = default_target;
open_input_bfds (statement_list.head, false);
@@ -4028,17 +4072,15 @@ lang_process ()
if (command_line.gc_sections)
lang_gc_sections ();
- /* Size up the common data */
+ /* Size up the common data. */
lang_common ();
/* Run through the contours of the script and attach input sections
- to the correct output sections
- */
+ to the correct output sections. */
map_input_to_output_sections (statement_list.head, (char *) NULL,
(lang_output_section_statement_type *) NULL);
-
- /* Find any sections not attached explicitly and handle them */
+ /* Find any sections not attached explicitly and handle them. */
lang_place_orphans ();
ldemul_before_allocation ();
@@ -4047,7 +4089,7 @@ lang_process ()
section positions, since they will affect SIZEOF_HEADERS. */
lang_record_phdrs ();
- /* Now run around and relax if we can */
+ /* Now run around and relax if we can. */
if (command_line.relax)
{
/* First time round is a trial run to get the 'worst case'
@@ -4065,7 +4107,7 @@ lang_process ()
/* 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 */
+ pe-dll.c also. DJ */
/* Do all the assignments with our current guesses as to
section sizes. */
@@ -4096,8 +4138,8 @@ lang_process ()
/* Fix any .startof. or .sizeof. symbols. */
lang_set_startof ();
- /* Do all the assignments, now that we know the final restingplaces
- of all the symbols */
+ /* 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,
@@ -4107,8 +4149,8 @@ lang_process ()
if (! link_info.relocateable
&& command_line.check_section_addresses)
lang_check_section_addresses ();
-
- /* Final stuffs */
+
+ /* Final stuffs. */
ldemul_finish ();
lang_finish ();
@@ -4148,11 +4190,12 @@ lang_add_wild (section_name, sections_sorted, filename, filenames_sorted,
void
lang_section_start (name, address)
- CONST char *name;
- etree_type * address;
+ const char *name;
+ etree_type *address;
{
- lang_address_statement_type *ad = new_stat (lang_address_statement, stat_ptr);
+ lang_address_statement_type *ad;
+ ad = new_stat (lang_address_statement, stat_ptr);
ad->section_name = name;
ad->address = address;
}
@@ -4164,7 +4207,7 @@ lang_section_start (name, address)
void
lang_add_entry (name, cmdline)
- CONST char *name;
+ const char *name;
boolean cmdline;
{
if (entry_symbol == NULL
@@ -4178,7 +4221,7 @@ lang_add_entry (name, cmdline)
void
lang_add_target (name)
- CONST char *name;
+ const char *name;
{
lang_target_statement_type *new = new_stat (lang_target_statement,
stat_ptr);
@@ -4189,13 +4232,13 @@ lang_add_target (name)
void
lang_add_map (name)
- CONST char *name;
+ const char *name;
{
while (*name)
{
switch (*name)
{
- case 'F':
+ case 'F':
map_option_f = true;
break;
}
@@ -4243,7 +4286,7 @@ lang_add_reloc (reloc, howto, section, name, addend)
union etree_union *addend;
{
lang_reloc_statement_type *p = new_stat (lang_reloc_statement, stat_ptr);
-
+
p->reloc = reloc;
p->howto = howto;
p->section = section;
@@ -4257,7 +4300,7 @@ lang_add_reloc (reloc, howto, section, name, addend)
lang_assignment_statement_type *
lang_add_assignment (exp)
- etree_type * exp;
+ etree_type *exp;
{
lang_assignment_statement_type *new = new_stat (lang_assignment_statement,
stat_ptr);
@@ -4275,7 +4318,7 @@ lang_add_attribute (attribute)
void
lang_startup (name)
- CONST char *name;
+ const char *name;
{
if (startup_file != (char *) NULL)
{
@@ -4307,8 +4350,8 @@ lang_leave_output_section_statement (fill, memspec, phdrs, lma_memspec)
if (strcmp (lma_memspec, "*default*") != 0)
{
current_section->lma_region = lang_memory_region_lookup (lma_memspec);
- /* if no runtime region has been given, but the load region has been,
- use the load region */
+ /* If no runtime region has been given, but the load region has
+ been, use the load region. */
if (strcmp (memspec, "*default*") == 0)
current_section->region = lang_memory_region_lookup (lma_memspec);
}
@@ -4316,12 +4359,11 @@ lang_leave_output_section_statement (fill, memspec, phdrs, lma_memspec)
stat_ptr = &statement_list;
}
-/*
- Create an absolute symbol with the given name with the value of the
- address of first byte of the section named.
+/* Create an absolute symbol with the given name with the value of the
+ address of first byte of the section named.
+
+ If the symbol already exists, then do nothing. */
- If the symbol already exists, then do nothing.
-*/
void
lang_abs_symbol_at_beginning_of (secname, name)
const char *secname;
@@ -4350,12 +4392,11 @@ lang_abs_symbol_at_beginning_of (secname, name)
}
}
-/*
- Create an absolute symbol with the given name with the value of the
- address of the first byte after the end of the section named.
+/* Create an absolute symbol with the given name with the value of the
+ address of the first byte after the end of the section named.
+
+ If the symbol already exists, then do nothing. */
- If the symbol already exists, then do nothing.
-*/
void
lang_abs_symbol_at_end_of (secname, name)
const char *secname;
@@ -4388,9 +4429,9 @@ lang_abs_symbol_at_end_of (secname, name)
void
lang_statement_append (list, element, field)
- lang_statement_list_type * list;
- lang_statement_union_type * element;
- lang_statement_union_type ** field;
+ lang_statement_list_type *list;
+ lang_statement_union_type *element;
+ lang_statement_union_type **field;
{
*(list->tail) = element;
list->tail = field;
@@ -4547,9 +4588,7 @@ lang_record_phdrs ()
lang_final_phase_enum);
if (! bfd_record_phdr (output_bfd, l->type,
- l->flags == NULL ? false : true,
- flags,
- l->at == NULL ? false : true,
+ l->flags != NULL, flags, l->at != NULL,
at, l->filehdr, l->phdrs, c, secs))
einfo (_("%F%P: bfd_record_phdr failed: %E\n"));
}
@@ -4608,8 +4647,7 @@ static etree_type *overlay_max;
/* A list of all the sections in this overlay. */
-struct overlay_list
-{
+struct overlay_list {
struct overlay_list *next;
lang_output_section_statement_type *os;
};
@@ -4690,7 +4728,7 @@ lang_leave_overlay_section (fill, phdrs)
name = current_section->name;
- lang_leave_output_section_statement (fill, "*default*",
+ lang_leave_output_section_statement (fill, "*default*",
phdrs, "*default*");
/* Define the magic symbols. */
@@ -4753,8 +4791,15 @@ lang_leave_overlay (fill, memspec, phdrs, lma_memspec)
l->os->fill = fill;
if (region != NULL && l->os->region == NULL)
l->os->region = region;
- if (lma_region != NULL && l->os->lma_region == NULL)
- l->os->lma_region = lma_region;
+ /* We only set lma_region for the first overlay section, as
+ subsequent overlay sections will have load_base set relative
+ to the first section. Also, don't set lma_region if
+ load_base is specified. FIXME: There should really be a test
+ that `AT ( LDADDR )' doesn't conflict with `AT >LMA_REGION'
+ rather than letting LDADDR simply override LMA_REGION. */
+ if (lma_region != NULL && l->os->lma_region == NULL
+ && l->next == NULL && l->os->load_base == NULL)
+ l->os->lma_region = lma_region;
if (phdrs != NULL && l->os->phdrs == NULL)
l->os->phdrs = phdrs;
@@ -4814,7 +4859,7 @@ lang_vers_match_lang_cplusplus (expr, sym)
if (expr->pattern[0] == '*' && expr->pattern[1] == '\0')
return 1;
- alt_sym = cplus_demangle(sym, /* DMGL_NO_TPARAMS */ 0);
+ alt_sym = cplus_demangle (sym, /* DMGL_NO_TPARAMS */ 0);
if (!alt_sym)
{
/* cplus_demangle (also) returns NULL when it is not a C++ symbol.
@@ -4841,7 +4886,7 @@ lang_vers_match_lang_java (expr, sym)
if (expr->pattern[0] == '*' && expr->pattern[1] == '\0')
return 1;
- alt_sym = cplus_demangle(sym, DMGL_JAVA);
+ alt_sym = cplus_demangle (sym, DMGL_JAVA);
if (!alt_sym)
{
/* cplus_demangle (also) returns NULL when it is not a Java symbol.
@@ -5016,7 +5061,7 @@ lang_do_version_exports_section ()
einfo (_("%X%P: unable to read .exports section contents"), sec);
p = contents;
- while (p < contents+len)
+ while (p < contents + len)
{
greg = lang_new_vers_regex (greg, p, NULL);
p = strchr (p, '\0') + 1;
@@ -5033,3 +5078,19 @@ lang_do_version_exports_section ()
lang_register_vers_node (command_line.version_exports_section,
lang_new_vers_node (greg, lreg), NULL);
}
+
+void
+lang_add_unique (name)
+ const char *name;
+{
+ struct unique_sections *ent;
+
+ for (ent = unique_section_list; ent; ent = ent->next)
+ if (strcmp (ent->name, name) == 0)
+ return;
+
+ ent = (struct unique_sections *) xmalloc (sizeof *ent);
+ ent->name = xstrdup (name);
+ ent->next = unique_section_list;
+ unique_section_list = ent;
+}
diff --git a/gnu/usr.bin/binutils/ld/ldlang.h b/gnu/usr.bin/binutils/ld/ldlang.h
index 553db4b2a05..348529ab5ce 100644
--- a/gnu/usr.bin/binutils/ld/ldlang.h
+++ b/gnu/usr.bin/binutils/ld/ldlang.h
@@ -1,19 +1,20 @@
/* ldlang.h - linker command language support
- Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
-
+
This file is part of GLD, the Gnu Linker.
-
+
GLD is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
-
+
GLD is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
@@ -22,8 +23,7 @@
#ifndef LDLANG_H
#define LDLANG_H
-typedef enum
-{
+typedef enum {
lang_input_file_is_l_enum,
lang_input_file_is_symbols_only_enum,
lang_input_file_is_marker_enum,
@@ -33,15 +33,13 @@ typedef enum
} lang_input_file_enum_type;
typedef unsigned int fill_type;
-typedef struct statement_list
-{
+
+typedef struct statement_list {
union lang_statement_union *head;
union lang_statement_union **tail;
} lang_statement_list_type;
-
-typedef struct memory_region_struct
-{
+typedef struct memory_region_struct {
char *name;
struct memory_region_struct *next;
bfd_vma origin;
@@ -51,58 +49,49 @@ typedef struct memory_region_struct
flagword flags;
flagword not_flags;
boolean had_full_message;
-} lang_memory_region_type ;
-
-typedef struct lang_statement_header_struct
-{
- union lang_statement_union *next;
- enum statement_enum
- {
- lang_output_section_statement_enum,
- lang_assignment_statement_enum,
- lang_input_statement_enum,
- lang_address_statement_enum,
- lang_wild_statement_enum,
- lang_input_section_enum,
- lang_object_symbols_statement_enum,
- lang_fill_statement_enum,
- lang_data_statement_enum,
- lang_reloc_statement_enum,
- lang_target_statement_enum,
- lang_output_statement_enum,
- lang_padding_statement_enum,
- lang_group_statement_enum,
-
- lang_afile_asection_pair_statement_enum,
- lang_constructors_statement_enum
- } type;
-} lang_statement_header_type;
+} lang_memory_region_type;
+typedef struct lang_statement_header_struct {
+ union lang_statement_union *next;
+ enum statement_enum {
+ lang_output_section_statement_enum,
+ lang_assignment_statement_enum,
+ lang_input_statement_enum,
+ lang_address_statement_enum,
+ lang_wild_statement_enum,
+ lang_input_section_enum,
+ lang_object_symbols_statement_enum,
+ lang_fill_statement_enum,
+ lang_data_statement_enum,
+ lang_reloc_statement_enum,
+ lang_target_statement_enum,
+ lang_output_statement_enum,
+ lang_padding_statement_enum,
+ lang_group_statement_enum,
+
+ lang_afile_asection_pair_statement_enum,
+ lang_constructors_statement_enum
+ } type;
+} lang_statement_header_type;
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
union etree_union *exp;
} lang_assignment_statement_type;
-
-typedef struct lang_target_statement_struct
-{
+typedef struct lang_target_statement_struct {
lang_statement_header_type header;
const char *target;
} lang_target_statement_type;
-
-typedef struct lang_output_statement_struct
-{
+typedef struct lang_output_statement_struct {
lang_statement_header_type header;
const char *name;
} lang_output_statement_type;
/* Section types specified in a linker script. */
-enum section_type
-{
+enum section_type {
normal_section,
dsect_section,
copy_section,
@@ -114,15 +103,13 @@ enum section_type
/* This structure holds a list of program headers describing segments
in which this section should be placed. */
-struct lang_output_section_phdr_list
-{
+struct lang_output_section_phdr_list {
struct lang_output_section_phdr_list *next;
const char *name;
boolean used;
};
-typedef struct lang_output_section_statement_struct
-{
+typedef struct lang_output_section_statement_struct {
lang_statement_header_type header;
union etree_union *addr_tree;
lang_statement_list_type children;
@@ -131,7 +118,7 @@ typedef struct lang_output_section_statement_struct
const char *name;
boolean processed;
-
+
asection *bfd_section;
flagword flags; /* Or together of all input sections */
enum section_type sectype;
@@ -140,38 +127,33 @@ typedef struct lang_output_section_statement_struct
size_t block_value;
fill_type fill;
- int subsection_alignment; /* alignment of components */
- int section_alignment; /* alignment of start of section */
+ int subsection_alignment; /* alignment of components */
+ int section_alignment; /* alignment of start of section */
union etree_union *load_base;
struct lang_output_section_phdr_list *phdrs;
} lang_output_section_statement_type;
-
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
} lang_common_statement_type;
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
} lang_object_symbols_statement_type;
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
fill_type fill;
int size;
asection *output_section;
} lang_fill_statement_type;
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
unsigned int type;
- union etree_union *exp;
+ union etree_union *exp;
bfd_vma value;
asection *output_section;
bfd_vma output_vma;
@@ -179,8 +161,7 @@ typedef struct
/* Generate a reloc in the output file. */
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
/* Reloc to generate. */
@@ -210,8 +191,7 @@ typedef struct
bfd_vma output_vma;
} lang_reloc_statement_type;
-typedef struct lang_input_statement_struct
-{
+typedef struct lang_input_statement_struct {
lang_statement_header_type header;
/* Name of this file. */
const char *filename;
@@ -219,32 +199,32 @@ typedef struct lang_input_statement_struct
/* Usually the same as filename, but for a file spec'd with -l
this is the -l switch itself rather than the filename. */
const char *local_sym_name;
-
+
bfd *the_bfd;
-
+
boolean closed;
file_ptr passive_position;
-
+
/* Symbol table of the file. */
asymbol **asymbols;
unsigned int symbol_count;
-
+
/* Point to the next file - whatever it is, wanders up and down
archives */
-
- union lang_statement_union *next;
+
+ union lang_statement_union *next;
/* Point to the next file, but skips archive contents */
- union lang_statement_union *next_real_file;
-
+ union lang_statement_union *next_real_file;
+
boolean is_archive;
-
+
/* 1 means search a set of directories for this file. */
boolean search_dirs_flag;
-
+
/* 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. */
-
+ Also default text_start to after this file's bss. */
+
boolean just_syms_flag;
/* Whether to search for this entry as a dynamic archive. */
@@ -254,30 +234,28 @@ typedef struct lang_input_statement_struct
boolean whole_archive;
boolean loaded;
-
- /* unsigned int globals_in_this_file;*/
+
+#if 0
+ unsigned int globals_in_this_file;
+#endif
const char *target;
boolean real;
} lang_input_statement_type;
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
asection *section;
lang_input_statement_type *ifile;
-
-} lang_input_section_type;
+} lang_input_section_type;
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
asection *section;
union lang_statement_union *file;
} lang_afile_asection_pair_statement_type;
-typedef struct lang_wild_statement_struct
-{
+typedef struct lang_wild_statement_struct {
lang_statement_header_type header;
const char *section_name;
boolean sections_sorted;
@@ -288,15 +266,13 @@ typedef struct lang_wild_statement_struct
lang_statement_list_type children;
} lang_wild_statement_type;
-typedef struct lang_address_statement_struct
-{
+typedef struct lang_address_statement_struct {
lang_statement_header_type header;
- const char *section_name;
- union etree_union *address;
+ const char *section_name;
+ union etree_union *address;
} lang_address_statement_type;
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
bfd_vma output_offset;
size_t size;
@@ -309,14 +285,12 @@ typedef struct
symbols are found. The effect is to search a group of libraries as
though they were a single library. */
-typedef struct
-{
+typedef struct {
lang_statement_header_type header;
lang_statement_list_type children;
} lang_group_statement_type;
-typedef union lang_statement_union
-{
+typedef union lang_statement_union {
lang_statement_header_type header;
union lang_statement_union *next;
lang_wild_statement_type wild_statement;
@@ -340,8 +314,7 @@ typedef union lang_statement_union
/* This structure holds information about a program header, from the
PHDRS command in the linker script. */
-struct lang_phdr
-{
+struct lang_phdr {
struct lang_phdr *next;
const char *name;
unsigned long type;
@@ -354,22 +327,30 @@ struct lang_phdr
/* This structure is used to hold a list of sections which may not
cross reference each other. */
-struct lang_nocrossref
-{
+struct lang_nocrossref {
struct lang_nocrossref *next;
const char *name;
};
/* The list of nocrossref lists. */
-struct lang_nocrossrefs
-{
+struct lang_nocrossrefs {
struct lang_nocrossrefs *next;
struct lang_nocrossref *list;
};
extern struct lang_nocrossrefs *nocrossref_list;
+/* This structure is used to hold a list of input section names which
+ will not match an output section in the linker script. */
+
+struct unique_sections {
+ struct unique_sections *next;
+ const char *name;
+};
+
+extern struct unique_sections *unique_section_list;
+
extern lang_output_section_statement_type *abs_output_section;
extern lang_statement_list_type lang_output_section_statement;
extern boolean lang_has_input_file;
@@ -379,6 +360,7 @@ extern boolean delete_output_file_on_failure;
extern const char *entry_symbol;
extern boolean entry_from_cmdline;
+extern lang_statement_list_type file_chain;
extern void lang_init PARAMS ((void));
extern struct memory_region_struct *lang_memory_region_lookup
@@ -430,12 +412,11 @@ extern bfd_vma lang_do_assignments
bfd_vma dot));
#define LANG_FOR_EACH_INPUT_STATEMENT(statement) \
- extern lang_statement_list_type file_chain; \
lang_input_statement_type *statement; \
for (statement = (lang_input_statement_type *)file_chain.head;\
statement != (lang_input_statement_type *)NULL; \
statement = (lang_input_statement_type *)statement->next)\
-
+
extern void lang_process PARAMS ((void));
extern void ldlang_add_file PARAMS ((lang_input_statement_type *));
extern lang_output_section_statement_type *lang_output_section_find
@@ -492,5 +473,7 @@ extern struct bfd_elf_version_deps *lang_add_vers_depend
extern void lang_register_vers_node
PARAMS ((const char *, struct bfd_elf_version_tree *,
struct bfd_elf_version_deps *));
+boolean unique_section_p PARAMS ((const char *));
+extern void lang_add_unique PARAMS ((const char *));
#endif
diff --git a/gnu/usr.bin/binutils/ld/ldlex.h b/gnu/usr.bin/binutils/ld/ldlex.h
index 53444cacad7..36f2ad309b9 100644
--- a/gnu/usr.bin/binutils/ld/ldlex.h
+++ b/gnu/usr.bin/binutils/ld/ldlex.h
@@ -1,5 +1,6 @@
/* ldlex.h -
- Copyright 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -57,6 +58,6 @@ extern void lex_unput PARAMS ((int));
#ifndef yywrap
extern int yywrap PARAMS ((void));
#endif
-extern void parse_args PARAMS ((int, char **));
+extern void parse_args PARAMS ((unsigned, char **));
#endif
diff --git a/gnu/usr.bin/binutils/ld/ldlex.l b/gnu/usr.bin/binutils/ld/ldlex.l
index f3efe77f00f..eecb9022f1a 100644
--- a/gnu/usr.bin/binutils/ld/ldlex.l
+++ b/gnu/usr.bin/binutils/ld/ldlex.l
@@ -1,6 +1,6 @@
%{
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -45,6 +45,7 @@ This was written by steve chamberlain
#include "ldfile.h"
#include "ldlex.h"
#include "ldmain.h"
+#include "libiberty.h"
/* The type of top-level parser input.
yylex and yyparse (indirectly) both check this. */
@@ -115,7 +116,7 @@ WHITE [ \t\n\r]+
NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~]
V_TAG [.$_a-zA-Z][._a-zA-Z0-9]*
-V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
+V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)*
%s SCRIPT
%s EXPRESSION
@@ -147,7 +148,7 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
<DEFSYMEXP>"-" { RTOKEN('-');}
<DEFSYMEXP>"+" { RTOKEN('+');}
-<DEFSYMEXP>{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = buystring(yytext); return NAME; }
+<DEFSYMEXP>{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = xstrdup(yytext); return NAME; }
<DEFSYMEXP>"=" { RTOKEN('='); }
<MRI,EXPRESSION>"$"([0-9A-Fa-f])+ {
@@ -333,17 +334,17 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
<MRI>{FILENAMECHAR1}{NOCFILENAMECHAR}* {
/* Filename without commas, needed to parse mri stuff */
- yylval.name = buystring(yytext);
+ yylval.name = xstrdup(yytext);
return NAME;
}
<BOTH,EXPRESSION>{FILENAMECHAR1}{FILENAMECHAR}* {
- yylval.name = buystring(yytext);
+ yylval.name = xstrdup(yytext);
return NAME;
}
<BOTH,EXPRESSION>"-l"{FILENAMECHAR}+ {
- yylval.name = buystring (yytext + 2);
+ yylval.name = xstrdup (yytext + 2);
return LNAME;
}
<SCRIPT>{WILDCHAR}* {
@@ -358,7 +359,7 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
}
else
{
- yylval.name = buystring(yytext);
+ yylval.name = xstrdup(yytext);
return NAME;
}
}
@@ -366,7 +367,7 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
<EXPRESSION,BOTH,SCRIPT,VERS_NODE>"\""[^\"]*"\"" {
/* No matter the state, quotes
give what's inside */
- yylval.name = buystring(yytext+1);
+ yylval.name = xstrdup(yytext+1);
yylval.name[yyleng-2] = 0;
return NAME;
}
@@ -381,10 +382,10 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
<VERS_NODE>extern { RTOKEN(EXTERN); }
-<VERS_NODE>{V_IDENTIFIER} { yylval.name = buystring (yytext);
+<VERS_NODE>{V_IDENTIFIER} { yylval.name = xstrdup (yytext);
return VERS_IDENTIFIER; }
-<VERS_SCRIPT>{V_TAG} { yylval.name = buystring (yytext);
+<VERS_SCRIPT>{V_TAG} { yylval.name = xstrdup (yytext);
return VERS_TAG; }
<VERS_START>"{" { BEGIN(VERS_SCRIPT); return *yytext; }
diff --git a/gnu/usr.bin/binutils/ld/ldmain.c b/gnu/usr.bin/binutils/ld/ldmain.c
index 676eeba26b7..0b8120ffc9d 100644
--- a/gnu/usr.bin/binutils/ld/ldmain.c
+++ b/gnu/usr.bin/binutils/ld/ldmain.c
@@ -1,5 +1,5 @@
/* Main program of GNU linker.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -36,12 +36,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldgram.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldemul.h"
#include "ldlex.h"
#include "ldfile.h"
+#include "ldemul.h"
#include "ldctor.h"
-/* Somewhere above, sys/stat.h got included . . . . */
+/* Somewhere above, sys/stat.h got included . . . . */
#if !defined(S_ISDIR) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
@@ -65,7 +65,7 @@ const char *output_filename = "a.out";
/* Name this program was invoked by. */
char *program_name;
-/* The file that we're creating */
+/* The file that we're creating. */
bfd *output_bfd = 0;
/* Set by -G argument, for MIPS ECOFF target. */
@@ -130,8 +130,7 @@ static boolean unattached_reloc PARAMS ((struct bfd_link_info *,
static boolean notice PARAMS ((struct bfd_link_info *, const char *,
bfd *, asection *, bfd_vma));
-static struct bfd_link_callbacks link_callbacks =
-{
+static struct bfd_link_callbacks link_callbacks = {
add_archive_element,
multiple_definition,
multiple_common,
@@ -150,10 +149,10 @@ struct bfd_link_info link_info;
static void
remove_output ()
{
- if (output_filename)
+ if (output_filename)
{
if (output_bfd && output_bfd->iostream)
- fclose((FILE *)(output_bfd->iostream));
+ fclose ((FILE *) (output_bfd->iostream));
if (delete_output_file_on_failure)
unlink (output_filename);
}
@@ -200,6 +199,8 @@ main (argc, argv)
config.build_constructors = true;
config.dynamic_link = false;
config.has_shared = false;
+ config.split_by_reloc = (unsigned) -1;
+ config.split_by_file = (bfd_size_type) -1;
command_line.force_common_definition = false;
command_line.interpreter = NULL;
command_line.rpath = NULL;
@@ -215,12 +216,14 @@ main (argc, argv)
link_info.callbacks = &link_callbacks;
link_info.relocateable = false;
+ link_info.emitrelocations = false;
link_info.shared = false;
link_info.symbolic = false;
link_info.static_link = false;
link_info.traditional_format = false;
link_info.optimize = false;
link_info.no_undefined = false;
+ link_info.allow_shlib_undefined = false;
link_info.strip = strip_none;
link_info.discard = discard_none;
link_info.keep_memory = true;
@@ -236,6 +239,9 @@ main (argc, argv)
and _fini symbols. We are compatible. */
link_info.init_function = "_init";
link_info.fini_function = "_fini";
+ link_info.new_dtags = false;
+ link_info.flags = (bfd_vma) 0;
+ link_info.flags_1 = (bfd_vma) 0;
ldfile_add_arch ("");
@@ -243,7 +249,6 @@ main (argc, argv)
force_make_executable = false;
config.magic_demand_paged = true;
config.text_read_only = true;
- config.make_executable = true;
emulation = get_emulation (argc, argv);
ldemul_choose_mode (emulation);
@@ -322,7 +327,6 @@ main (argc, argv)
ldemul_after_parse ();
-
if (config.map_filename)
{
if (strcmp (config.map_filename, "-") == 0)
@@ -341,21 +345,22 @@ main (argc, argv)
}
}
-
lang_process ();
/* Print error messages for any missing symbols, for any warning
- symbols, and possibly multiple definitions */
-
+ symbols, and possibly multiple definitions. */
- if (config.text_read_only)
+ if (! link_info.relocateable)
{
- /* Look for a text section and mark the readonly attribute in it */
+ /* Look for a text section and switch the readonly attribute in it. */
asection *found = bfd_get_section_by_name (output_bfd, ".text");
if (found != (asection *) NULL)
{
- found->flags |= SEC_READONLY;
+ if (config.text_read_only)
+ found->flags |= SEC_READONLY;
+ else
+ found->flags &= ~SEC_READONLY;
}
}
@@ -395,12 +400,12 @@ main (argc, argv)
einfo (_("%F%B: final close failed: %E\n"), output_bfd);
/* If the --force-exe-suffix is enabled, and we're making an
- executable file and it doesn't end in .exe, copy it to one which does. */
-
+ executable file and it doesn't end in .exe, copy it to one
+ which does. */
if (! link_info.relocateable && command_line.force_exe_suffix)
{
int len = strlen (output_filename);
- if (len < 4
+ if (len < 4
|| (strcasecmp (output_filename + len - 4, ".exe") != 0
&& strcasecmp (output_filename + len - 4, ".dll") != 0))
{
@@ -491,7 +496,7 @@ get_emulation (argc, argv)
}
else
{
- einfo(_("%P%F: missing argument to -m\n"));
+ einfo (_("%P%F: missing argument to -m\n"));
}
}
else if (strcmp (argv[i], "-mips1") == 0
@@ -539,7 +544,7 @@ check_for_scripts_dir (dir)
dirlen = strlen (dir);
/* sizeof counts the terminating NUL. */
- buf = (char *) xmalloc (dirlen + sizeof("/ldscripts"));
+ buf = (char *) xmalloc (dirlen + sizeof ("/ldscripts"));
sprintf (buf, "%s/ldscripts", dir);
res = stat (buf, &s) == 0 && S_ISDIR (s.st_mode);
@@ -564,7 +569,8 @@ set_scripts_dir ()
size_t dirlen;
if (check_for_scripts_dir (SCRIPTDIR))
- return; /* We've been installed normally. */
+ /* We've been installed normally. */
+ return;
/* Look for "ldscripts" in the dir where our binary is. */
end = strrchr (program_name, '/');
@@ -572,7 +578,7 @@ set_scripts_dir ()
{
/* We could have \foo\bar, or /foo\bar. */
char *bslash = strrchr (program_name, '\\');
- if (bslash > end)
+ if (end == NULL || (bslash != NULL && bslash > end))
end = bslash;
}
#endif
@@ -592,14 +598,16 @@ set_scripts_dir ()
dir[dirlen] = '\0';
if (check_for_scripts_dir (dir))
- return; /* Don't free dir. */
+ /* Don't free dir. */
+ return;
/* Look for "ldscripts" in <the dir where our binary is>/../lib. */
strcpy (dir + dirlen, "/../lib");
if (check_for_scripts_dir (dir))
return;
- free (dir); /* Well, we tried. */
+ /* Well, we tried. */
+ free (dir);
}
void
@@ -614,7 +622,7 @@ add_ysym (name)
bfd_hash_newfunc,
61))
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
- }
+ }
if (bfd_hash_lookup (link_info.notice_hash, name, true, true)
== (struct bfd_hash_entry *) NULL)
@@ -711,7 +719,6 @@ add_keepsyms_file (filename)
/* This is called when BFD has decided to include an archive member in
a link. */
-/*ARGSUSED*/
static boolean
add_archive_element (info, abfd, name)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@@ -826,7 +833,6 @@ add_archive_element (info, abfd, name)
/* This is called when BFD has discovered a symbol which is defined
multiple times. */
-/*ARGSUSED*/
static boolean
multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@@ -855,6 +861,13 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
nbfd, nsec, nval, name);
if (obfd != (bfd *) NULL)
einfo (_("%D: first defined here\n"), obfd, osec, oval);
+
+ if (command_line.relax)
+ {
+ einfo (_("%P: Disabling relaxation: it will not work with multiple definitions\n"));
+ command_line.relax = 0;
+ }
+
return true;
}
@@ -863,7 +876,6 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
or when two common symbols are found. We only do something if
-warn-common was used. */
-/*ARGSUSED*/
static boolean
multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@@ -930,7 +942,6 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
entry in the linker hash table for the set. SECTION and VALUE
represent a value which should be added to the set. */
-/*ARGSUSED*/
static boolean
add_to_set (info, h, reloc, abfd, section, value)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@@ -1019,8 +1030,7 @@ constructor_callback (info, constructor, name, abfd, section, value)
/* A structure used by warning_callback to pass information through
bfd_map_over_sections. */
-struct warning_callback_info
-{
+struct warning_callback_info {
boolean found;
const char *warning;
const char *symbol;
@@ -1029,7 +1039,6 @@ struct warning_callback_info
/* This is called when there is a reference to a warning symbol. */
-/*ARGSUSED*/
static boolean
warning_callback (info, warning, symbol, abfd, section, address)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@@ -1151,7 +1160,6 @@ warning_find_reloc (abfd, sec, iarg)
/* This is called when an undefined symbol is found. */
-/*ARGSUSED*/
static boolean
undefined_symbol (info, name, abfd, section, address, fatal)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@@ -1159,7 +1167,7 @@ undefined_symbol (info, name, abfd, section, address, fatal)
bfd *abfd;
asection *section;
bfd_vma address;
- boolean fatal;
+ boolean fatal ATTRIBUTE_UNUSED;
{
static char *error_name;
static unsigned int error_count;
@@ -1197,7 +1205,7 @@ undefined_symbol (info, name, abfd, section, address, fatal)
error_count = 0;
if (error_name != (char *) NULL)
free (error_name);
- error_name = buystring (name);
+ error_name = xstrdup (name);
}
if (section != NULL)
@@ -1232,7 +1240,6 @@ undefined_symbol (info, name, abfd, section, address, fatal)
/* This is called when a reloc overflows. */
-/*ARGSUSED*/
static boolean
reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@@ -1256,7 +1263,6 @@ reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
/* This is called when a dangerous relocation is made. */
-/*ARGSUSED*/
static boolean
reloc_dangerous (info, message, abfd, section, address)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@@ -1276,7 +1282,6 @@ reloc_dangerous (info, message, abfd, section, address)
/* This is called when a reloc is being generated attached to a symbol
that is not being output. */
-/*ARGSUSED*/
static boolean
unattached_reloc (info, name, abfd, section, address)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
diff --git a/gnu/usr.bin/binutils/ld/ldmain.h b/gnu/usr.bin/binutils/ld/ldmain.h
index 041bf3d31fb..f5d8b0d177d 100644
--- a/gnu/usr.bin/binutils/ld/ldmain.h
+++ b/gnu/usr.bin/binutils/ld/ldmain.h
@@ -1,5 +1,6 @@
/* ldmain.h -
- Copyright 1991, 92, 93, 94, 95, 96, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
diff --git a/gnu/usr.bin/binutils/ld/ldmisc.c b/gnu/usr.bin/binutils/ld/ldmisc.c
index e3439445c4b..12dbdf3b182 100644
--- a/gnu/usr.bin/binutils/ld/ldmisc.c
+++ b/gnu/usr.bin/binutils/ld/ldmisc.c
@@ -1,5 +1,5 @@
/* ldmisc.c
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -76,10 +76,10 @@ demangle (string)
&& bfd_get_symbol_leading_char (output_bfd) == string[0])
++string;
- /* This is a hack for better error reporting on XCOFF, or the MS PE */
- /* format. Xcoff has a single '.', while the NT PE for PPC has '..'. */
- /* So we remove all of them. */
- while(string[0] == '.')
+ /* This is a hack for better error reporting on XCOFF, or the MS PE
+ format. Xcoff has a single '.', while the NT PE for PPC has
+ '..'. So we remove all of them. */
+ while (string[0] == '.')
++string;
res = cplus_demangle (string, DMGL_ANSI | DMGL_PARAMS);
@@ -96,19 +96,19 @@ vfinfo (fp, fmt, arg)
while (*fmt != '\0')
{
- while (*fmt != '%' && *fmt != '\0')
+ while (*fmt != '%' && *fmt != '\0')
{
putc (*fmt, fp);
fmt++;
}
- if (*fmt == '%')
+ if (*fmt == '%')
{
- fmt ++;
- switch (*fmt++)
+ fmt++;
+ switch (*fmt++)
{
default:
- fprintf (fp,"%%%c", fmt[-1]);
+ fprintf (fp, "%%%c", fmt[-1]);
break;
case '%':
@@ -191,7 +191,7 @@ vfinfo (fp, fmt, arg)
case 'B':
/* filename from a bfd */
- {
+ {
bfd *abfd = va_arg (arg, bfd *);
if (abfd->my_archive)
fprintf (fp, "%s(%s)", abfd->my_archive->filename,
@@ -202,12 +202,12 @@ vfinfo (fp, fmt, arg)
break;
case 'F':
- /* error is fatal */
+ /* Error is fatal. */
fatal = true;
break;
case 'P':
- /* print program name */
+ /* Print program name. */
fprintf (fp, "%s", program_name);
break;
@@ -233,7 +233,7 @@ vfinfo (fp, fmt, arg)
break;
case 'S':
- /* print script file and linenumber */
+ /* Print script file and linenumber. */
if (parsing_defsym)
fprintf (fp, "--defsym %s", lex_string);
else if (ldfile_input_filename != NULL)
@@ -243,17 +243,17 @@ vfinfo (fp, fmt, arg)
break;
case 'R':
- /* Print all that's interesting about a relent */
+ /* Print all that's interesting about a relent. */
{
arelent *relent = va_arg (arg, arelent *);
-
+
lfinfo (fp, "%s+0x%v (type %s)",
(*(relent->sym_ptr_ptr))->name,
relent->addend,
relent->howto->name);
}
break;
-
+
case 'C':
case 'D':
case 'G':
@@ -335,10 +335,10 @@ vfinfo (fp, fmt, arg)
last_bfd = abfd;
if (last_file != NULL)
free (last_file);
- last_file = buystring (filename);
+ last_file = xstrdup (filename);
if (last_function != NULL)
free (last_function);
- last_function = buystring (functionname);
+ last_function = xstrdup (functionname);
}
discard_last = false;
if (linenumber != 0)
@@ -355,7 +355,7 @@ vfinfo (fp, fmt, arg)
if (linenumber != 0)
lfinfo (fp, ":%u", linenumber);
}
- else if (linenumber != 0)
+ else if (linenumber != 0)
lfinfo (fp, "%B:%s:%u", abfd, filename, linenumber);
else
lfinfo (fp, "%B(%s+0x%v):%s", abfd, section->name,
@@ -380,7 +380,7 @@ vfinfo (fp, fmt, arg)
}
}
break;
-
+
case 's':
/* arbitrary string, like printf */
fprintf (fp, "%s", va_arg (arg, char *));
@@ -399,11 +399,11 @@ vfinfo (fp, fmt, arg)
}
}
- if (fatal == true)
- xexit(1);
+ if (fatal == true)
+ xexit (1);
}
-/* Format info message and print on stdout. */
+/* Format info message and print on stdout. */
/* (You would think this should be called just "info", but then you
would hosed by LynxOS, which defines that name in its libc.) */
@@ -431,7 +431,7 @@ info_msg (va_alist)
va_end (arg);
}
-/* ('e' for error.) Format info message and print on stderr. */
+/* ('e' for error.) Format info message and print on stderr. */
void
#if USE_STDARG
@@ -456,7 +456,7 @@ einfo (va_alist)
va_end (arg);
}
-void
+void
info_assert (file, line)
const char *file;
unsigned int line;
@@ -464,17 +464,7 @@ info_assert (file, line)
einfo (_("%F%P: internal error %s %d\n"), file, line);
}
-char *
-buystring (x)
- CONST char *CONST x;
-{
- size_t l = strlen(x)+1;
- char *r = xmalloc(l);
- memcpy(r, x,l);
- return r;
-}
-
-/* ('m' for map) Format info message and print on map. */
+/* ('m' for map) Format info message and print on map. */
void
#if USE_STDARG
@@ -525,13 +515,13 @@ lfinfo (va_alist)
/* Functions to print the link map. */
-void
+void
print_space ()
{
fprintf (config.map_file, " ");
}
-void
+void
print_nl ()
{
fprintf (config.map_file, "\n");
diff --git a/gnu/usr.bin/binutils/ld/ldmisc.h b/gnu/usr.bin/binutils/ld/ldmisc.h
index f5b3b4f35af..998fb4fee85 100644
--- a/gnu/usr.bin/binutils/ld/ldmisc.h
+++ b/gnu/usr.bin/binutils/ld/ldmisc.h
@@ -1,5 +1,6 @@
/* ldmisc.h -
- Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -41,7 +42,6 @@ extern void yyerror PARAMS ((const char *));
extern PTR xmalloc PARAMS ((size_t));
extern PTR xrealloc PARAMS ((PTR, size_t));
extern void xexit PARAMS ((int));
-extern char *buystring PARAMS ((CONST char *CONST));
#define ASSERT(x) \
do { if (!(x)) info_assert(__FILE__,__LINE__); } while (0)
diff --git a/gnu/usr.bin/binutils/ld/ldver.c b/gnu/usr.bin/binutils/ld/ldver.c
index 5b600a2bbd0..a50b5480c49 100644
--- a/gnu/usr.bin/binutils/ld/ldver.c
+++ b/gnu/usr.bin/binutils/ld/ldver.c
@@ -1,5 +1,6 @@
/* ldver.c -- Print linker version.
- Copyright (C) 1991, 92, 93, 94, 95, 1996, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -23,6 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
#include "ldver.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
#include "ldemul.h"
#include "ldmain.h"
@@ -35,12 +39,12 @@ ldversion (noisy)
fprintf (stdout, _("GNU ld version %s (with BFD %s)\n"),
ld_program_version, BFD_VERSION);
- if (noisy)
+ if (noisy)
{
ld_emulation_xfer_type **ptr = ld_emulations;
-
+
printf (_(" Supported emulations:\n"));
- while (*ptr)
+ while (*ptr)
{
printf (" %s\n", (*ptr)->emulation_name);
ptr++;
diff --git a/gnu/usr.bin/binutils/ld/ldver.h b/gnu/usr.bin/binutils/ld/ldver.h
index 697b6bc31b3..a5ba624d9fd 100644
--- a/gnu/usr.bin/binutils/ld/ldver.h
+++ b/gnu/usr.bin/binutils/ld/ldver.h
@@ -1,5 +1,5 @@
/* ldver.h -- Header file for ldver.c.
- Copyright (C) 1991, 92, 93, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
diff --git a/gnu/usr.bin/binutils/ld/ldwrite.c b/gnu/usr.bin/binutils/ld/ldwrite.c
index b56119a39ac..e559825cd3e 100644
--- a/gnu/usr.bin/binutils/ld/ldwrite.c
+++ b/gnu/usr.bin/binutils/ld/ldwrite.c
@@ -1,5 +1,5 @@
/* ldwrite.c -- write out the linked file
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
Free Software Foundation, Inc.
Written by Steve Chamberlain sac@cygnus.com
@@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldmain.h"
static void build_link_order PARAMS ((lang_statement_union_type *));
-static asection *clone_section PARAMS ((bfd *, asection *, int *));
+static asection *clone_section PARAMS ((bfd *, asection *, const char *, int *));
static void split_sections PARAMS ((bfd *, struct bfd_link_info *));
/* Build link_order structures for the BFD linker. */
@@ -290,48 +290,43 @@ build_link_order (statement)
/* Call BFD to write out the linked file. */
-
/**********************************************************************/
-
/* Wander around the input sections, make sure that
we'll never try and create an output section with more relocs
than will fit.. Do this by always assuming the worst case, and
- creating new output sections with all the right bits */
+ creating new output sections with all the right bits. */
#define TESTIT 1
static asection *
-clone_section (abfd, s, count)
+clone_section (abfd, s, name, count)
bfd *abfd;
asection *s;
+ const char *name;
int *count;
{
-#define SSIZE 8
- char sname[SSIZE]; /* ?? find the name for this size */
+ char templ[6];
+ char *sname;
asection *n;
struct bfd_link_hash_entry *h;
- /* Invent a section name - use first five
- chars of base section name and a digit suffix */
- do
+
+ /* Invent a section name from the first five chars of the base
+ section name and a digit suffix. */
+ strncpy (templ, name, sizeof (templ) - 1);
+ templ[sizeof (templ) - 1] = '\0';
+ if ((sname = bfd_get_unique_section_name (abfd, templ, count)) == NULL
+ || (n = bfd_make_section_anyway (abfd, sname)) == NULL
+ || (h = bfd_link_hash_lookup (link_info.hash,
+ sname, true, true, false)) == NULL)
{
- unsigned int i;
- char b[6];
- for (i = 0; i < sizeof (b) - 1 && s->name[i]; i++)
- b[i] = s->name[i];
- b[i] = 0;
- sprintf (sname, "%s%d", b, (*count)++);
+ einfo (_("%F%P: clone section failed: %E\n"));
+ /* Silence gcc warnings. einfo exits, so we never reach here. */
+ return NULL;
}
- while (bfd_get_section_by_name (abfd, sname));
- n = bfd_make_section_anyway (abfd, xstrdup (sname));
-
- /* Create a symbol of the same name */
-
- h = bfd_link_hash_lookup (link_info.hash,
- sname, true, true, false);
+ /* Set up section symbol. */
h->type = bfd_link_hash_defined;
h->u.def.value = 0;
- h->u.def.section = n ;
-
+ h->u.def.section = n;
n->flags = s->flags;
n->vma = s->vma;
@@ -348,7 +343,7 @@ clone_section (abfd, s, count)
}
#if TESTING
-static void
+static void
ds (s)
asection *s;
{
@@ -368,6 +363,7 @@ ds (s)
}
printf ("\n");
}
+
dump (s, a1, a2)
char *s;
asection *a1;
@@ -378,7 +374,7 @@ dump (s, a1, a2)
ds (a2);
}
-static void
+static void
sanity_check (abfd)
bfd *abfd;
{
@@ -402,7 +398,7 @@ sanity_check (abfd)
#define dump(a, b, c)
#endif
-static void
+static void
split_sections (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@@ -410,27 +406,27 @@ split_sections (abfd, info)
asection *original_sec;
int nsecs = abfd->section_count;
sanity_check (abfd);
- /* look through all the original sections */
+ /* Look through all the original sections. */
for (original_sec = abfd->sections;
original_sec && nsecs;
original_sec = original_sec->next, nsecs--)
{
- boolean first = true;
int count = 0;
- int lines = 0;
- int relocs = 0;
- struct bfd_link_order **pp;
+ unsigned int lines = 0;
+ unsigned int relocs = 0;
+ bfd_size_type sec_size = 0;
+ struct bfd_link_order *l;
+ struct bfd_link_order *p;
bfd_vma vma = original_sec->vma;
- bfd_vma shift_offset = 0;
asection *cursor = original_sec;
- /* count up the relocations and line entries to see if
- anything would be too big to fit */
- for (pp = &(cursor->link_order_head); *pp; pp = &((*pp)->next))
+ /* 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)
{
- struct bfd_link_order *p = *pp;
- int thislines = 0;
- int thisrelocs = 0;
+ unsigned int thislines = 0;
+ unsigned int thisrelocs = 0;
+ bfd_size_type thissize = 0;
if (p->type == bfd_indirect_link_order)
{
asection *sec;
@@ -444,77 +440,98 @@ split_sections (abfd, info)
if (info->relocateable)
thisrelocs = sec->reloc_count;
+ if (sec->_cooked_size != 0)
+ thissize = sec->_cooked_size;
+ else
+ thissize = sec->_raw_size;
+
}
else if (info->relocateable
&& (p->type == bfd_section_reloc_link_order
|| p->type == bfd_symbol_reloc_link_order))
thisrelocs++;
- if (! first
- && (thisrelocs + relocs > config.split_by_reloc
- || thislines + lines > config.split_by_reloc
- || config.split_by_file))
+ if (l != NULL
+ && (thisrelocs + relocs >= config.split_by_reloc
+ || thislines + lines >= config.split_by_reloc
+ || thissize + sec_size >= config.split_by_file))
{
- /* create a new section and put this link order and the
- following link orders into it */
- struct bfd_link_order *l = p;
- asection *n = clone_section (abfd, cursor, &count);
- *pp = NULL; /* Snip off link orders from old section */
- n->link_order_head = l; /* attach to new section */
- pp = &n->link_order_head;
+ /* Create a new section and put this link order and the
+ following link orders into it. */
+ bfd_vma shift_offset;
+ asection *n;
- /* change the size of the original section and
- update the vma of the new one */
+ n = clone_section (abfd, cursor, original_sec->name, &count);
- dump ("before snip", cursor, n);
+ /* 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;
+ l->next = NULL;
+ l = p;
- n->_raw_size = cursor->_raw_size - l->offset;
- cursor->_raw_size = l->offset;
+ /* Change the size of the original section and
+ update the vma of the new one. */
- vma += cursor->_raw_size;
- n->lma = n->vma = vma;
+ dump ("before snip", cursor, n);
- shift_offset = l->offset;
+ 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;
- /* run down the chain and change the output section to
- the right one, update the offsets too */
+ vma += shift_offset;
+ n->lma = n->vma = vma;
- while (l)
+ /* Run down the chain and change the output section to
+ the right one, update the offsets too. */
+ do
{
- l->offset -= shift_offset;
- if (l->type == bfd_indirect_link_order)
+ p->offset -= shift_offset;
+ if (p->type == bfd_indirect_link_order)
{
- l->u.indirect.section->output_section = n;
- l->u.indirect.section->output_offset = l->offset;
+ p->u.indirect.section->output_section = n;
+ p->u.indirect.section->output_offset = p->offset;
}
- l = l->next;
+ p = p->next;
}
+ while (p);
+
dump ("after snip", cursor, n);
cursor = n;
relocs = thisrelocs;
lines = thislines;
+ sec_size = thissize;
}
else
{
+ l = p;
relocs += thisrelocs;
lines += thislines;
+ sec_size += thissize;
}
-
- first = false;
}
}
sanity_check (abfd);
}
+
/**********************************************************************/
+
void
ldwrite ()
{
/* Reset error indicator, which can typically something like invalid
- format from openning up the .o files */
+ format from opening up the .o files. */
bfd_set_error (bfd_error_no_error);
lang_for_each_statement (build_link_order);
- if (config.split_by_reloc || config.split_by_file)
+ if (config.split_by_reloc != (unsigned) -1
+ || config.split_by_file != (bfd_size_type) -1)
split_sections (output_bfd, &link_info);
if (!bfd_final_link (output_bfd, &link_info))
{
@@ -523,8 +540,8 @@ ldwrite ()
out. */
if (bfd_get_error () != bfd_error_no_error)
- einfo (_("%F%P: final link failed: %E\n"), output_bfd);
+ einfo (_("%F%P: final link failed: %E\n"));
else
- xexit(1);
+ xexit (1);
}
}
diff --git a/gnu/usr.bin/binutils/ld/lexsup.c b/gnu/usr.bin/binutils/ld/lexsup.c
index e2aac472b35..77a37b2ab65 100644
--- a/gnu/usr.bin/binutils/ld/lexsup.c
+++ b/gnu/usr.bin/binutils/ld/lexsup.c
@@ -1,5 +1,6 @@
/* Parse options for the GNU linker.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -37,6 +38,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldfile.h"
#include "ldver.h"
#include "ldemul.h"
+#include "demangle.h"
#ifndef PATH_SEPARATOR
#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__))
@@ -46,7 +48,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#endif
#endif
-/* Somewhere above, sys/stat.h got included . . . . */
+/* Somewhere above, sys/stat.h got included . . . . */
#if !defined(S_ISDIR) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
@@ -123,6 +125,10 @@ int parsing_defsym = 0;
#define OPTION_NO_UNDEFINED (OPTION_MPC860C0 + 1)
#define OPTION_INIT (OPTION_NO_UNDEFINED + 1)
#define OPTION_FINI (OPTION_INIT + 1)
+#define OPTION_SECTION_START (OPTION_FINI + 1)
+#define OPTION_UNIQUE (OPTION_SECTION_START + 1)
+#define OPTION_TARGET_HELP (OPTION_UNIQUE + 1)
+#define OPTION_ALLOW_SHLIB_UNDEFINED (OPTION_TARGET_HELP + 1)
/* The long options. This structure is used for both the option
parsing and the help text. */
@@ -138,15 +144,24 @@ struct ld_option
/* The documentation string. If this is NULL, this is a synonym for
the previous option. */
const char *doc;
- enum
- {
- /* Use one dash before long option name. */
- ONE_DASH,
- /* Use two dashes before long option name. */
- TWO_DASHES,
- /* Don't mention this option in --help output. */
- NO_HELP
- } control;
+ enum {
+ /* Use one dash before long option name. */
+ ONE_DASH,
+ /* Use two dashes before long option name. */
+ TWO_DASHES,
+ /* Only accept two dashes before the long option name.
+ This is an overloading of the use of this enum, since originally it
+ was only intended to tell the --help display function how to display
+ the long option name. This feature was added in order to resolve
+ the confusion about the -omagic command line switch. Is it setting
+ the output file name to "magic" or is it setting the NMAGIC flag on
+ the output ? It has been decided that it is setting the output file
+ name, and that if you want to set the NMAGIC flag you should use -N
+ or --omagic. */
+ EXACTLY_TWO_DASHES,
+ /* Don't mention this option in --help output. */
+ NO_HELP
+ } control;
};
static const struct ld_option ld_options[] =
@@ -196,13 +211,15 @@ static const struct ld_option ld_options[] =
'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"),
- TWO_DASHES },
+ EXACTLY_TWO_DASHES },
{ {"output", required_argument, NULL, 'o'},
- 'o', N_("FILE"), N_("Set output file name"), 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 },
{ {"Qy", no_argument, NULL, OPTION_IGNORE},
'\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
+ { {"emit-relocs", no_argument, NULL, 'q'},
+ 'q', NULL, "Generate relocations in final output", TWO_DASHES },
{ {"relocateable", no_argument, NULL, 'r'},
'r', NULL, N_("Generate relocateable output"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
@@ -220,6 +237,8 @@ static const struct ld_option ld_options[] =
'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 },
+ { {"unique", optional_argument, NULL, OPTION_UNIQUE},
+ '\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 },
{ {"version", no_argument, NULL, OPTION_VERSION},
@@ -234,8 +253,6 @@ static const struct ld_option ld_options[] =
'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 },
- { {NULL, required_argument, NULL, '\0'},
- 'z', N_("KEYWORD"), N_("Ignored for Solaris compatibility"), ONE_DASH },
{ {"start-group", no_argument, NULL, '('},
'(', NULL, N_("Start a group"), TWO_DASHES },
{ {"end-group", no_argument, NULL, ')'},
@@ -267,8 +284,8 @@ static const struct ld_option ld_options[] =
'\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 },
- { {"demangle", no_argument, NULL, OPTION_DEMANGLE},
- '\0', NULL, N_("Demangle symbol names"), TWO_DASHES },
+ { {"demangle", optional_argument, NULL, OPTION_DEMANGLE},
+ '\0', N_("[=STYLE]"), N_("Demangle symbol names [using STYLE]"), TWO_DASHES },
{ {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
'\0', N_("PROGRAM"), N_("Set the dynamic linker to use"), TWO_DASHES },
{ {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS},
@@ -295,6 +312,8 @@ static const struct ld_option ld_options[] =
'\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
{ {"no-undefined", no_argument, NULL, OPTION_NO_UNDEFINED},
'\0', NULL, N_("Allow no undefined symbols"), TWO_DASHES },
+ { {"allow-shlib-undefined", no_argument, NULL, OPTION_ALLOW_SHLIB_UNDEFINED},
+ '\0', NULL, N_("Allow undefined symbols in shared objects"), TWO_DASHES },
{ {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
'\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
@@ -304,7 +323,7 @@ static const struct ld_option ld_options[] =
{ {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
'\0', NULL, NULL, NO_HELP },
{ {"oformat", required_argument, NULL, OPTION_OFORMAT},
- '\0', N_("TARGET"), N_("Specify target of output file"), 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 },
{ {"relax", no_argument, NULL, OPTION_RELAX},
@@ -324,16 +343,20 @@ static const struct ld_option ld_options[] =
'\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
{ {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
'\0', NULL, NULL, NO_HELP },
- { {"split-by-file", no_argument, NULL, OPTION_SPLIT_BY_FILE},
- '\0', NULL, N_("Split output sections for each file"), TWO_DASHES },
- { {"split-by-reloc", required_argument, NULL, OPTION_SPLIT_BY_RELOC},
- '\0', N_("COUNT"), N_("Split output sections every COUNT relocs"), TWO_DASHES },
+ { {"split-by-file", optional_argument, NULL, OPTION_SPLIT_BY_FILE},
+ '\0', N_("[=SIZE]"), N_("Split output sections every SIZE octets"), TWO_DASHES },
+ { {"split-by-reloc", optional_argument, NULL, OPTION_SPLIT_BY_RELOC},
+ '\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 },
+ { {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
+ '\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 },
{ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
'\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 },
{ {"Tbss", required_argument, NULL, OPTION_TBSS},
'\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH },
{ {"Tdata", required_argument, NULL, OPTION_TDATA},
@@ -370,7 +393,7 @@ static const struct ld_option ld_options[] =
'\0', N_("[=WORDS]"), N_("Modify problematic branches in last WORDS (1-10,\n\t\t\t\tdefault 5) words of a page"), TWO_DASHES }
};
-#define OPTION_COUNT ((int) (sizeof ld_options / sizeof ld_options[0]))
+#define OPTION_COUNT ARRAY_SIZE (ld_options)
/* Test STRING for containing a string of digits that form a number
between MIN and MAX. The return value is the number or ERR. */
@@ -401,14 +424,16 @@ is_num (string, min, max, err)
void
parse_args (argc, argv)
- int argc;
+ unsigned argc;
char **argv;
{
- int i, is, il;
+ unsigned i;
+ int is, il, irl;
int ingroup = 0;
char *default_dirlist = NULL;
char shortopts[OPTION_COUNT * 3 + 2];
struct option longopts[OPTION_COUNT + 1];
+ struct option really_longopts[OPTION_COUNT + 1];
int last_optind;
/* Starting the short option string with '-' is for programs that
@@ -418,6 +443,7 @@ parse_args (argc, argv)
shortopts[0] = '-';
is = 1;
il = 0;
+ irl = 0;
for (i = 0; i < OPTION_COUNT; i++)
{
if (ld_options[i].shortopt != '\0')
@@ -438,12 +464,21 @@ parse_args (argc, argv)
}
if (ld_options[i].opt.name != NULL)
{
- longopts[il] = ld_options[i].opt;
- ++il;
+ if (ld_options[i].control == EXACTLY_TWO_DASHES)
+ {
+ really_longopts[irl] = ld_options[i].opt;
+ ++irl;
+ }
+ else
+ {
+ longopts[il] = ld_options[i].opt;
+ ++il;
+ }
}
}
shortopts[is] = '\0';
longopts[il].name = NULL;
+ really_longopts[irl].name = NULL;
/* The -G option is ambiguous on different platforms. Sometimes it
specifies the largest data size to put into the small data
@@ -509,12 +544,22 @@ parse_args (argc, argv)
/* getopt_long_only is like getopt_long, but '-' as well as '--'
can indicate a long option. */
+ opterr = 0;
optc = getopt_long_only (argc, argv, shortopts, longopts, &longind);
+ if (optc == '?')
+ {
+ --optind;
+ optc = getopt_long (argc, argv, shortopts, really_longopts, &longind);
+ }
if (optc == -1)
break;
+
switch (optc)
{
+ case '?':
+ fprintf (stderr, _("%s: unrecognized option '%s'\n"),
+ program_name, argv[optind - 1]);
default:
fprintf (stderr,
_("%s: use the --help option for usage information\n"),
@@ -587,6 +632,17 @@ parse_args (argc, argv)
break;
case OPTION_DEMANGLE:
demangling = true;
+ if (optarg != NULL)
+ {
+ enum demangling_styles style;
+
+ style = cplus_demangle_name_to_style (optarg);
+ if (style == unknown_demangling)
+ einfo (_("%F%P: unknown demangling style `%s'"),
+ optarg);
+
+ cplus_demangle_set_style (style);
+ }
break;
case OPTION_DYNAMIC_LINKER:
command_line.interpreter = optarg;
@@ -691,6 +747,9 @@ parse_args (argc, argv)
case OPTION_NO_UNDEFINED:
link_info.no_undefined = true;
break;
+ case OPTION_ALLOW_SHLIB_UNDEFINED:
+ link_info.allow_shlib_undefined = true;
+ break;
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = false;
break;
@@ -711,11 +770,14 @@ parse_args (argc, argv)
link_info.optimize = strtoul (optarg, NULL, 0) ? true : false;
break;
case 'o':
- lang_add_output (optarg, 0);
+ lang_add_output (optarg, 0);
break;
case OPTION_OFORMAT:
lang_add_output_format (optarg, (char *) NULL, (char *) NULL, 0);
break;
+ case 'q':
+ link_info.emitrelocations = true;
+ break;
case 'i':
case 'r':
link_info.relocateable = true;
@@ -747,7 +809,7 @@ parse_args (argc, argv)
/* Fall through. */
case OPTION_RPATH:
if (command_line.rpath == NULL)
- command_line.rpath = buystring (optarg);
+ command_line.rpath = xstrdup (optarg);
else
{
size_t rpath_len = strlen (command_line.rpath);
@@ -784,7 +846,7 @@ parse_args (argc, argv)
break;
case OPTION_RPATH_LINK:
if (command_line.rpath_link == NULL)
- command_line.rpath_link = buystring (optarg);
+ command_line.rpath_link = xstrdup (optarg);
else
{
char *buf;
@@ -836,6 +898,48 @@ parse_args (argc, argv)
parser_input = input_script;
yyparse ();
break;
+ case OPTION_SECTION_START:
+ {
+ char *optarg2;
+ char *sec_name;
+ int len;
+
+ /* Check for <something>=<somthing>... */
+ optarg2 = strchr (optarg, '=');
+ if (optarg2 == NULL)
+ {
+ fprintf (stderr,
+ _("%s: Invalid argument to option \"--section-start\"\n"),
+ program_name);
+ xexit (1);
+ }
+
+ optarg2++;
+
+ /* So far so good. Are all the args present? */
+ if ((*optarg == '\0') || (*optarg2 == '\0'))
+ {
+ fprintf (stderr,
+ _("%s: Missing argument(s) to option \"--section-start\"\n"),
+ program_name);
+ xexit (1);
+ }
+
+ /* We must copy the section name as set_section_start
+ doesn't do it for us. */
+ len = optarg2 - optarg;
+ sec_name = xmalloc (len);
+ memcpy (sec_name, optarg, len - 1);
+ sec_name[len - 1] = 0;
+
+ /* Then set it... */
+ set_section_start (sec_name, optarg2);
+ }
+ break;
+ case OPTION_TARGET_HELP:
+ /* Mention any target specific options. */
+ ldemul_list_emulation_options (stdout);
+ exit (0);
case OPTION_TBSS:
set_section_start (".bss", optarg);
break;
@@ -861,6 +965,12 @@ parse_args (argc, argv)
case 'u':
ldlang_add_undef (optarg);
break;
+ case OPTION_UNIQUE:
+ if (optarg != NULL)
+ lang_add_unique (optarg);
+ else
+ config.unique_orphan_sections = true;
+ break;
case OPTION_VERBOSE:
ldversion (1);
version_printed = true;
@@ -877,15 +987,15 @@ parse_args (argc, argv)
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
printf ("GNU ld %s\n", ld_program_version);
- printf (_("Copyright 2000 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2001 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
{
ld_emulation_xfer_type **ptr = ld_emulations;
-
+
printf (_(" Supported emulations:\n"));
- while (*ptr)
+ while (*ptr)
{
printf (" %s\n", (*ptr)->emulation_name);
ptr++;
@@ -948,17 +1058,18 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case 'y':
add_ysym (optarg);
break;
- case 'z':
- /* We accept and ignore this option for Solaris
- compatibility. Actually, on Solaris, optarg is not
- ignored. Someday we should handle it correctly. FIXME. */
- break;
case OPTION_SPLIT_BY_RELOC:
- config.split_by_reloc = strtoul (optarg, NULL, 0);
- break;
+ if (optarg != NULL)
+ config.split_by_reloc = strtoul (optarg, NULL, 0);
+ else
+ config.split_by_reloc = 32768;
+ break;
case OPTION_SPLIT_BY_FILE:
- config.split_by_file = true;
- break;
+ if (optarg != NULL)
+ config.split_by_file = bfd_scan_vma (optarg, NULL, 0);
+ else
+ config.split_by_file = 1;
+ break;
case OPTION_CHECK_SECTIONS:
command_line.check_section_addresses = true;
break;
@@ -987,29 +1098,29 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
lang_leave_group ();
ingroup = 0;
break;
- case OPTION_MPC860C0:
- link_info.mpc860c0 = 20; /* default value (in bytes) */
- if (optarg)
- {
- unsigned words;
+ case OPTION_MPC860C0:
+ link_info.mpc860c0 = 20; /* default value (in bytes) */
+ if (optarg)
+ {
+ unsigned words;
- words = is_num (optarg, 1, 10, 0);
- if (words == 0)
- {
- fprintf (stderr,
+ words = is_num (optarg, 1, 10, 0);
+ if (words == 0)
+ {
+ fprintf (stderr,
_("%s: Invalid argument to option \"mpc860c0\"\n"),
program_name);
- xexit (1);
- }
- link_info.mpc860c0 = words * 4; /* convert words to bytes */
- }
- command_line.relax = true;
- break;
+ xexit (1);
+ }
+ link_info.mpc860c0 = words * 4; /* convert words to bytes */
+ }
+ command_line.relax = true;
+ break;
case OPTION_INIT:
link_info.init_function = optarg;
break;
-
+
case OPTION_FINI:
link_info.fini_function = optarg;
break;
@@ -1062,7 +1173,7 @@ set_section_start (sect, valstr)
static void
help ()
{
- int i;
+ unsigned i;
const char **targets, **pp;
printf (_("Usage: %s [options] file...\n"), program_name);
@@ -1074,7 +1185,7 @@ help ()
{
boolean comma;
int len;
- int j;
+ unsigned j;
printf (" ");
@@ -1111,13 +1222,17 @@ help ()
if (ld_options[j].opt.name != NULL
&& ld_options[j].control != NO_HELP)
{
+ int two_dashes =
+ (ld_options[j].control == TWO_DASHES
+ || ld_options[j].control == EXACTLY_TWO_DASHES);
+
printf ("%s-%s%s",
comma ? ", " : "",
- ld_options[j].control == TWO_DASHES ? "-" : "",
+ two_dashes ? "-" : "",
ld_options[j].opt.name);
len += ((comma ? 2 : 0)
+ 1
- + (ld_options[j].control == TWO_DASHES ? 1 : 0)
+ + (two_dashes ? 1 : 0)
+ strlen (ld_options[j].opt.name));
if (ld_options[j].arg != NULL)
{
diff --git a/gnu/usr.bin/binutils/ld/mpw-eppcmac.c b/gnu/usr.bin/binutils/ld/mpw-eppcmac.c
index ba09a410df2..0cd70fb2abe 100644
--- a/gnu/usr.bin/binutils/ld/mpw-eppcmac.c
+++ b/gnu/usr.bin/binutils/ld/mpw-eppcmac.c
@@ -1,7 +1,8 @@
/* This file is is generated by a shell script. DO NOT EDIT! */
/* AIX emulation code for ppcmacos
- Copyright (C) 1991, 1993, 1995, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 1993, 1995, 1996, 1997, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
AIX support by Ian Lance Taylor <ian@cygnus.com>
@@ -33,13 +34,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ld.h"
#include "ldmain.h"
-#include "ldemul.h"
-#include "ldfile.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
#include "ldctor.h"
#include "ldgram.h"
+#include "ldfile.h"
+#include "ldemul.h"
static void gldppcmacos_before_parse PARAMS ((void));
static int gldppcmacos_parse_args PARAMS ((int, char **));
@@ -842,7 +843,7 @@ gldppcmacos_read_file (filename, import)
n = ((struct export_symbol_list *)
xmalloc (sizeof (struct export_symbol_list)));
n->next = export_symbols;
- n->name = buystring (symname);
+ n->name = xstrdup (symname);
n->syscall = syscall;
export_symbols = n;
}
diff --git a/gnu/usr.bin/binutils/ld/mri.c b/gnu/usr.bin/binutils/ld/mri.c
index d39186c6100..f4094cb4c38 100644
--- a/gnu/usr.bin/binutils/ld/mri.c
+++ b/gnu/usr.bin/binutils/ld/mri.c
@@ -1,5 +1,6 @@
/* mri.c -- handle MRI style linker scripts
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,19 +17,15 @@ 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. */
+02111-1307, USA.
+ This bit does the tree decoration when MRI style link scripts
+ are parsed.
-/* This bit does the tree decoration when MRI style link scripts are parsed */
-
-/*
- contributed by Steve Chamberlain
- sac@cygnus.com
-
-*/
+ Contributed by Steve Chamberlain <sac@cygnus.com>. */
#include "bfd.h"
-#include "sysdep.h"
+#include "sysdep.h"
#include "ld.h"
#include "ldexp.h"
#include "ldlang.h"
@@ -45,7 +42,7 @@ struct section_name_struct {
etree_type *align;
etree_type *subalign;
int ok_to_load;
-} ;
+};
unsigned int symbol_truncate = 10000;
struct section_name_struct *order;
@@ -68,21 +65,19 @@ lookup (name, list)
CONST char *name;
struct section_name_struct **list;
{
-
struct section_name_struct **ptr = list;
- while (*ptr)
- {
- if (strcmp(name, (*ptr)->name) == 0) {
- /* If this is a match, delete it, we only keep the last instance
- of any name */
- *ptr = (*ptr)->next;
- }
- else {
- ptr = &((*ptr)->next);
+
+ while (*ptr)
+ {
+ if (strcmp (name, (*ptr)->name) == 0)
+ /* If this is a match, delete it, we only keep the last instance
+ of any name. */
+ *ptr = (*ptr)->next;
+ else
+ ptr = &((*ptr)->next);
}
- }
- *ptr = (struct section_name_struct *)xmalloc(sizeof(struct section_name_struct));
+ *ptr = (struct section_name_struct *) xmalloc (sizeof (struct section_name_struct));
return ptr;
}
@@ -95,36 +90,35 @@ mri_add_to_list (list, name, vma, zalias, align, subalign)
etree_type *align;
etree_type *subalign;
{
- struct section_name_struct **ptr = lookup(name,list);
+ struct section_name_struct **ptr = lookup (name, list);
+
(*ptr)->name = name;
(*ptr)->vma = vma;
- (*ptr)->next = (struct section_name_struct *)NULL;
+ (*ptr)->next = (struct section_name_struct *) NULL;
(*ptr)->ok_to_load = 0;
(*ptr)->alias = zalias;
(*ptr)->align = align;
(*ptr)->subalign = subalign;
}
-
void
mri_output_section (name, vma)
CONST char *name;
etree_type *vma;
{
- mri_add_to_list(&address, name, vma, 0,0,0);
+ mri_add_to_list (&address, name, vma, 0, 0, 0);
}
-/* if any ABSOLUTE <name> are in the script, only load those files
-marked thus */
+/* If any ABSOLUTE <name> are in the script, only load those files
+ marked thus. */
void
mri_only_load (name)
CONST char *name;
{
- mri_add_to_list(&only_load, name, 0, 0,0,0);
+ mri_add_to_list (&only_load, name, 0, 0, 0, 0);
}
-
void
mri_base (exp)
etree_type *exp;
@@ -137,240 +131,221 @@ static int done_tree = 0;
void
mri_draw_tree ()
{
- if (done_tree) return;
+ if (done_tree)
+ return;
- /* We don't bother with memory regions. */
-#if 0
- /* 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) ~((bfd_size_type)0),
- "length", lang_first_phase_enum);
- }
-#endif
-
- /* Now build the statements for the ldlang machine */
+#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) ~((bfd_size_type)0),
+ "length", lang_first_phase_enum);
+ }
+#endif
- /* Attatch the addresses of any which have addresses, and add the
- ones not mentioned */
- if (address != (struct section_name_struct *)NULL) {
- struct section_name_struct *alist;
- struct section_name_struct *olist;
- if (order == (struct section_name_struct *)NULL) {
- order = address;
- }
+ /* Now build the statements for the ldlang machine. */
- for (alist = address;
- alist != (struct section_name_struct*)NULL;
- alist = alist->next)
+ /* Attatch the addresses of any which have addresses,
+ and add the ones not mentioned. */
+ if (address != (struct section_name_struct *) NULL)
{
- int done = 0;
- for (olist = order;
- done == 0 &&
- olist != (struct section_name_struct *)NULL;
- olist = olist->next)
- {
- if (strcmp(alist->name, olist->name) == 0)
+ struct section_name_struct *alist;
+ struct section_name_struct *olist;
+
+ if (order == (struct section_name_struct *) NULL)
+ order = address;
+
+ for (alist = address;
+ alist != (struct section_name_struct *) NULL;
+ alist = alist->next)
{
- olist->vma = alist->vma;
- done = 1;
+ int done = 0;
+
+ for (olist = order;
+ done == 0 && olist != (struct section_name_struct *) NULL;
+ olist = olist->next)
+ {
+ if (strcmp (alist->name, olist->name) == 0)
+ {
+ olist->vma = alist->vma;
+ done = 1;
+ }
+ }
+
+ if (!done)
+ {
+ /* Add this onto end of order list. */
+ mri_add_to_list (&order, alist->name, alist->vma, 0, 0, 0);
+ }
}
- }
- if (!done) {
- /* add this onto end of order list */
- mri_add_to_list(&order, alist->name, alist->vma, 0,0,0);
- }
-
}
- }
-
/* If we're only supposed to load a subset of them in, then prune
the list. */
-
- if (only_load != (struct section_name_struct *)NULL)
- {
- struct section_name_struct *ptr1;
- struct section_name_struct *ptr2;
- if (order == (struct section_name_struct*)NULL)
- order = only_load;
-
- /* See if this name is in the list, if it is then we can load it
- */
- for (ptr1 = only_load; ptr1; ptr1 = ptr1->next)
+ if (only_load != (struct section_name_struct *) NULL)
{
- for (ptr2= order; ptr2; ptr2=ptr2->next)
- {
- if (strcmp(ptr2->name, ptr1->name)==0) {
- ptr2->ok_to_load = 1;
- }
- }
- }
- }
- else
- {
- /* No only load list, so everything is ok to load */
- struct section_name_struct *ptr;
- for (ptr = order; ptr; ptr=ptr->next) {
- ptr->ok_to_load = 1;
- }
- }
-
+ struct section_name_struct *ptr1;
+ struct section_name_struct *ptr2;
+ if (order == (struct section_name_struct *) NULL)
+ order = only_load;
- /* Create the order of sections to load */
- if (order != (struct section_name_struct *)NULL)
- {
- /* Been told to output the sections in a certain order */
- struct section_name_struct *p = order;
- while (p)
+ /* See if this name is in the list, if it is then we can load it. */
+ for (ptr1 = only_load; ptr1; ptr1 = ptr1->next)
+ for (ptr2 = order; ptr2; ptr2 = ptr2->next)
+ if (strcmp (ptr2->name, ptr1->name) == 0)
+ ptr2->ok_to_load = 1;
+ }
+ else
{
- struct section_name_struct *aptr;
- etree_type *align = 0;
- etree_type *subalign = 0;
- /* See if an alignment has been specified */
-
- for (aptr = alignment; aptr; aptr= aptr->next)
- {
- if (strcmp(aptr->name, p->name)==0) {
- align = aptr->align;
- }
- }
+ /* No only load list, so everything is ok to load. */
+ struct section_name_struct *ptr;
- for (aptr = subalignment; aptr; aptr= aptr->next)
- {
- if (strcmp(aptr->name, p->name)==0) {
- subalign = aptr->subalign;
- }
- }
-
- if (base == 0) {
- base = p->vma ? p->vma :exp_nameop(NAME, ".");
- }
- lang_enter_output_section_statement (p->name, base,
- p->ok_to_load ? 0 : noload_section,
- 1, align, subalign,
- (etree_type *) NULL);
- base = 0;
- lang_add_wild (p->name, false, (char *)NULL, false, false, NULL);
- /* If there is an alias for this section, add it too */
- for (aptr = alias; aptr; aptr = aptr->next) {
-
- if (strcmp(aptr->alias, p->name)== 0) {
- lang_add_wild (aptr->name, false, (char *)NULL, false, false, NULL);
- }
- }
+ for (ptr = order; ptr; ptr = ptr->next)
+ ptr->ok_to_load = 1;
+ }
- lang_leave_output_section_statement
- (0, "*default*", (struct lang_output_section_phdr_list *) NULL,
- "*default*");
+ /* Create the order of sections to load. */
+ if (order != (struct section_name_struct *) NULL)
+ {
+ /* Been told to output the sections in a certain order. */
+ struct section_name_struct *p = order;
- p = p->next;
+ while (p)
+ {
+ struct section_name_struct *aptr;
+ etree_type *align = 0;
+ etree_type *subalign = 0;
+
+ /* See if an alignment has been specified. */
+ for (aptr = alignment; aptr; aptr = aptr->next)
+ if (strcmp (aptr->name, p->name) == 0)
+ align = aptr->align;
+
+ for (aptr = subalignment; aptr; aptr = aptr->next)
+ if (strcmp (aptr->name, p->name) == 0)
+ subalign = aptr->subalign;
+
+ if (base == 0)
+ base = p->vma ? p->vma : exp_nameop (NAME, ".");
+
+ lang_enter_output_section_statement (p->name, base,
+ p->ok_to_load ? 0 : noload_section,
+ 1, align, subalign,
+ (etree_type *) NULL);
+ base = 0;
+ lang_add_wild (p->name, false, (char *) NULL, false, false, NULL);
+
+ /* If there is an alias for this section, add it too. */
+ for (aptr = alias; aptr; aptr = aptr->next)
+ if (strcmp (aptr->alias, p->name) == 0)
+ lang_add_wild (aptr->name, false, (char *) NULL, false, false, NULL);
+
+ lang_leave_output_section_statement
+ (0, "*default*", (struct lang_output_section_phdr_list *) NULL,
+ "*default*");
+
+ p = p->next;
+ }
}
- }
-
done_tree = 1;
-
}
+
void
mri_load (name)
CONST char *name;
{
base = 0;
- lang_add_input_file(name,
- lang_input_file_is_file_enum, (char *)NULL);
- /* lang_leave_output_section_statement(0,"*default*");*/
+ lang_add_input_file (name,
+ lang_input_file_is_file_enum, (char *) NULL);
+#if 0
+ lang_leave_output_section_statement (0, "*default*");
+#endif
}
-
void
mri_order (name)
CONST char *name;
{
- mri_add_to_list(&order, name, 0, 0,0,0);
+ mri_add_to_list (&order, name, 0, 0, 0, 0);
}
-void
+void
mri_alias (want, is, isn)
CONST char *want;
CONST char *is;
int isn;
{
- if (!is) {
- /* Some sections are digits - */
- char buf[20];
- sprintf(buf, "%d", isn);
- is = xstrdup (buf);
- if (is == NULL)
- abort ();
- }
- mri_add_to_list(&alias, is, 0, want,0,0);
+ if (!is)
+ {
+ char buf[20];
-}
+ /* Some sections are digits. */
+ sprintf (buf, "%d", isn);
+ is = xstrdup (buf);
+
+ if (is == NULL)
+ abort ();
+ }
+
+ mri_add_to_list (&alias, is, 0, want, 0, 0);
+}
-void
+void
mri_name (name)
CONST char *name;
{
- lang_add_output(name, 1);
-
+ lang_add_output (name, 1);
}
-
void
mri_format (name)
CONST char *name;
{
- if (strcmp(name, "S") == 0)
- {
- lang_add_output_format("srec", (char *) NULL, (char *) NULL, 1);
- }
- else if (strcmp(name, "IEEE") == 0)
- {
- lang_add_output_format("ieee", (char *) NULL, (char *) NULL, 1);
- }
- else if (strcmp(name, "COFF") == 0)
- {
- lang_add_output_format("coff-m68k", (char *) NULL, (char *) NULL, 1);
- }
- else {
- einfo(_("%P%F: unknown format type %s\n"), name);
- }
-}
+ if (strcmp (name, "S") == 0)
+ lang_add_output_format ("srec", (char *) NULL, (char *) NULL, 1);
+
+ else if (strcmp (name, "IEEE") == 0)
+ lang_add_output_format ("ieee", (char *) NULL, (char *) NULL, 1);
+ else if (strcmp (name, "COFF") == 0)
+ lang_add_output_format ("coff-m68k", (char *) NULL, (char *) NULL, 1);
+
+ else
+ einfo (_("%P%F: unknown format type %s\n"), name);
+}
void
mri_public (name, exp)
CONST char *name;
etree_type *exp;
{
- lang_add_assignment(exp_assop('=', name, exp));
+ lang_add_assignment (exp_assop ('=', name, exp));
}
-void
+void
mri_align (name, exp)
CONST char *name;
etree_type *exp;
{
- mri_add_to_list(&alignment, name,0,0,exp,0);
+ mri_add_to_list (&alignment, name, 0, 0, exp, 0);
}
-void
+void
mri_alignmod (name, exp)
CONST char *name;
etree_type *exp;
{
- mri_add_to_list(&subalignment, name,0,0,0,exp);
+ mri_add_to_list (&subalignment, name, 0, 0, 0, exp);
}
-
-void
+void
mri_truncate (exp)
unsigned int exp;
{
diff --git a/gnu/usr.bin/binutils/ld/mri.h b/gnu/usr.bin/binutils/ld/mri.h
index dc3f0f3a190..e857e3d738c 100644
--- a/gnu/usr.bin/binutils/ld/mri.h
+++ b/gnu/usr.bin/binutils/ld/mri.h
@@ -1,5 +1,5 @@
/* mri.h -- header file for MRI scripting functions
- Copyright 1993, 95, 1996 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
diff --git a/gnu/usr.bin/binutils/ld/scripttempl/elf.sc b/gnu/usr.bin/binutils/ld/scripttempl/elf.sc
index 6c4741b3c55..3c1bfb40c19 100644
--- a/gnu/usr.bin/binutils/ld/scripttempl/elf.sc
+++ b/gnu/usr.bin/binutils/ld/scripttempl/elf.sc
@@ -21,6 +21,7 @@
# 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.
+# BSS_PLT - .plt should be in bss segment
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
@@ -36,6 +37,26 @@
# when specifying the start address of the next.
#
+# Many sections come in three flavours. There is the 'real' section,
+# like ".data". Then there are the per-procedure or per-variable
+# sections, generated by -ffunction-sections and -fdata-sections in GCC,
+# and useful for --gc-sections, which for a variable "foo" might be
+# ".data.foo". Then there are the linkonce sections, for which the linker
+# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
+# The exact correspondences are:
+#
+# Section Linkonce section
+# .text .gnu.linkonce.t.foo
+# .rodata .gnu.linkonce.r.foo
+# .data .gnu.linkonce.d.foo
+# .bss .gnu.linkonce.b.foo
+# .sdata .gnu.linkonce.s.foo
+# .sbss .gnu.linkonce.sb.foo
+# .sdata2 .gnu.linkonce.s2.foo
+# .sbss2 .gnu.linkonce.sb2.foo
+#
+# Each of these can also have corresponding .rel.* and .rela.* sections.
+
test -z "$ENTRY" && ENTRY=_start
test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
@@ -46,7 +67,9 @@ test "$LD_FLAG" = "N" && DATA_ADDR=.
INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
-RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r*)} }"
+RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }"
+SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }"
+SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }"
CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
@@ -127,13 +150,13 @@ SECTIONS
{
*(.rel.text)
${RELOCATING+*(.rel.text.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.t*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.t.*)}
}
.rela.text ${RELOCATING-0} :
{
*(.rela.text)
${RELOCATING+*(.rela.text.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.t*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.t.*)}
}
.rel.fini ${RELOCATING-0} : { *(.rel.fini) }
.rela.fini ${RELOCATING-0} : { *(.rela.fini) }
@@ -141,26 +164,26 @@ SECTIONS
{
*(.rel.rodata)
${RELOCATING+*(.rel.rodata.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.r*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.r.*)}
}
.rela.rodata ${RELOCATING-0} :
{
*(.rela.rodata)
${RELOCATING+*(.rela.rodata.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.r*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.r.*)}
}
${OTHER_READONLY_RELOC_SECTIONS}
.rel.data ${RELOCATING-0} :
{
*(.rel.data)
${RELOCATING+*(.rel.data.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.d*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.d.*)}
}
.rela.data ${RELOCATING-0} :
{
*(.rela.data)
${RELOCATING+*(.rela.data.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.d*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.d.*)}
}
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
.rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
@@ -173,30 +196,74 @@ SECTIONS
{
*(.rel.sdata)
${RELOCATING+*(.rel.sdata.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.s*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.s.*)}
}
.rela.sdata ${RELOCATING-0} :
{
*(.rela.sdata)
${RELOCATING+*(.rela.sdata.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.s*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
+ }
+ .rel.sbss ${RELOCATING-0} :
+ {
+ *(.rel.sbss)
+ ${RELOCATING+*(.rel.sbss.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
+ }
+ .rela.sbss ${RELOCATING-0} :
+ {
+ *(.rela.sbss)
+ ${RELOCATING+*(.rela.sbss.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
+ }
+ .rel.sdata2 ${RELOCATING-0} :
+ {
+ *(.rel.sdata2)
+ ${RELOCATING+*(.rel.sdata2.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.s2.*)}
+ }
+ .rela.sdata2 ${RELOCATING-0} :
+ {
+ *(.rela.sdata2)
+ ${RELOCATING+*(.rela.sdata2.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.s2.*)}
+ }
+ .rel.sbss2 ${RELOCATING-0} :
+ {
+ *(.rel.sbss2)
+ ${RELOCATING+*(.rel.sbss2.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.sb2.*)}
+ }
+ .rela.sbss2 ${RELOCATING-0} :
+ {
+ *(.rela.sbss2)
+ ${RELOCATING+*(.rela.sbss2.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.sb2.*)}
+ }
+ .rel.bss ${RELOCATING-0} :
+ {
+ *(.rel.bss)
+ ${RELOCATING+*(.rel.bss.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
+ }
+ .rela.bss ${RELOCATING-0} :
+ {
+ *(.rela.bss)
+ ${RELOCATING+*(.rela.bss.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
}
- .rel.sbss ${RELOCATING-0} : { *(.rel.sbss) }
- .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) }
- .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
- .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
.rel.plt ${RELOCATING-0} : { *(.rel.plt) }
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS}
.init ${RELOCATING-0} :
{
- ${INIT_START}
+ ${RELOCATING+${INIT_START}}
KEEP (*(.init))
- ${INIT_END}
+ ${RELOCATING+${INIT_END}}
} =${NOP-0}
- ${DATA_PLT-${PLT}}
+ ${DATA_PLT-${BSS_PLT-${PLT}}}
.text ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
@@ -205,19 +272,22 @@ SECTIONS
*(.stub)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
- ${RELOCATING+*(.gnu.linkonce.t*)}
+ ${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
- ${RELOCATING+_etext = .;}
- ${RELOCATING+PROVIDE (etext = .);}
.fini ${RELOCATING-0} :
{
- ${FINI_START}
+ ${RELOCATING+${FINI_START}}
KEEP (*(.fini))
- ${FINI_END}
+ ${RELOCATING+${FINI_END}}
} =${NOP-0}
+ ${RELOCATING+PROVIDE (__etext = .);}
+ ${RELOCATING+PROVIDE (_etext = .);}
+ ${RELOCATING+PROVIDE (etext = .);}
${WRITABLE_RODATA-${RODATA}}
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ ${CREATE_SHLIB-${SDATA2}}
+ ${CREATE_SHLIB-${SBSS2}}
${RELOCATING+${OTHER_READONLY_SECTIONS}}
/* Adjust the address for the data segment. We want to adjust up to
@@ -230,7 +300,7 @@ SECTIONS
${RELOCATING+${DATA_START_SYMBOLS}}
*(.data)
${RELOCATING+*(.data.*)}
- ${RELOCATING+*(.gnu.linkonce.d*)}
+ ${RELOCATING+*(.gnu.linkonce.d.*)}
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
.data1 ${RELOCATING-0} : { *(.data1) }
@@ -243,6 +313,8 @@ SECTIONS
${DATA_PLT+${PLT}}
${RELOCATING+${OTHER_GOT_SYMBOLS}}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
+ ${CREATE_SHLIB+${SDATA2}}
+ ${CREATE_SHLIB+${SBSS2}}
${TEXT_DYNAMIC-${DYNAMIC}}
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
@@ -261,16 +333,23 @@ SECTIONS
${RELOCATING+${OTHER_BSS_SYMBOLS}}
.sbss ${RELOCATING-0} :
{
+ ${RELOCATING+PROVIDE (__sbss_start = .);}
+ ${RELOCATING+PROVIDE (___sbss_start = .);}
*(.dynsbss)
*(.sbss)
${RELOCATING+*(.sbss.*)}
+ ${RELOCATING+*(.gnu.linkonce.sb.*)}
*(.scommon)
+ ${RELOCATING+PROVIDE (__sbss_end = .);}
+ ${RELOCATING+PROVIDE (___sbss_end = .);}
}
+ ${BSS_PLT+${PLT}}
.bss ${RELOCATING-0} :
{
*(.dynbss)
*(.bss)
${RELOCATING+*(.bss.*)}
+ ${RELOCATING+*(.gnu.linkonce.b.*)}
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
@@ -310,7 +389,7 @@ SECTIONS
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info) }
+ .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
diff --git a/gnu/usr.bin/binutils/ld/scripttempl/h8300.sc b/gnu/usr.bin/binutils/ld/scripttempl/h8300.sc
index f2f876e2835..f9120ba80df 100644
--- a/gnu/usr.bin/binutils/ld/scripttempl/h8300.sc
+++ b/gnu/usr.bin/binutils/ld/scripttempl/h8300.sc
@@ -1,3 +1,13 @@
+TORS=".tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ } > ram"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -6,64 +16,72 @@ ENTRY("_start")
MEMORY
{
/* 0xc4 is a magic entry. We should have the linker just
- skip over it one day... */
+ skip over it one day... */
vectors : o = 0x0000, l = 0xc4
magicvectors : o = 0xc4, l = 0x3c
ram : o = 0x0100, l = 0xfdfc
/* The stack starts at the top of main ram. */
topram : o = 0xfefc, l = 0x4
- /* At the very to of the address space is the 8-bit area. */
+ /* At the very top of the address space is the 8-bit area. */
eight : o = 0xff00, l = 0x100
}
-SECTIONS
-{
-.vectors : {
- /* Use something like this to place a specific function's address
- into the vector table.
+SECTIONS
+{
+.vectors :
+ {
+ /* Use something like this to place a specific
+ function's address into the vector table.
- SHORT(ABSOLUTE(_foobar)) */
+ SHORT (ABSOLUTE (_foobar)). */
- *(.vectors)
- } ${RELOCATING+ > vectors}
+ *(.vectors)
+ } ${RELOCATING+ > vectors}
-.text : {
- *(.rodata)
- *(.text)
- *(.strings)
- ${RELOCATING+ _etext = . ; }
- } ${RELOCATING+ > ram}
-.tors : {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
+.text :
+ {
+ *(.rodata)
+ *(.text)
+ *(.strings)
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
-.data : {
- *(.data)
- *(.tiny)
- ${RELOCATING+ _edata = . ; }
+
+${CONSTRUCTING+${TORS}}
+
+.data :
+ {
+ *(.data)
+ *(.tiny)
+ ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
-.bss : {
- ${RELOCATING+ _bss_start = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+
+.bss :
+ {
+ ${RELOCATING+ _bss_start = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
} ${RELOCATING+ >ram}
-.stack : {
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+
+.stack :
+ {
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
} ${RELOCATING+ > topram}
-.eight : {
- *(.eight)
+
+.eight :
+ {
+ *(.eight)
} ${RELOCATING+ > eight}
-.stab 0 ${RELOCATING+(NOLOAD)} : {
- [ .stab ]
+
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
}
-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
- [ .stabstr ]
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
}
}
EOF
diff --git a/gnu/usr.bin/binutils/ld/scripttempl/h8300h.sc b/gnu/usr.bin/binutils/ld/scripttempl/h8300h.sc
index d1cfd860b65..c2bc2e14baa 100644
--- a/gnu/usr.bin/binutils/ld/scripttempl/h8300h.sc
+++ b/gnu/usr.bin/binutils/ld/scripttempl/h8300h.sc
@@ -1,3 +1,13 @@
+TORS=".tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ } > ram"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(h8300h)
@@ -8,10 +18,10 @@ ENTRY("_start")
MEMORY
{
- /* 0xc4 is a magic entry. We should have the linker just
- skip over it one day... */
- vectors : o = 0x0000, l = 0xc4
- magicvectors : o = 0xc4, l = 0x3c
+ /* 0xc4 is a magic entry. We should have the linker just
+ skip over it one day... */
+ vectors : o = 0x0000, l = 0xc4
+ magicvectors : o = 0xc4, l = 0x3c
/* We still only use 256k as the main ram size. */
ram : o = 0x0100, l = 0x3fefc
/* The stack starts at the top of main ram. */
@@ -22,55 +32,66 @@ MEMORY
eight : o = 0xffff00, l = 0x100
}
-SECTIONS
-{
-.vectors : {
- /* Use something like this to place a specific function's address
- into the vector table.
+SECTIONS
+{
+.vectors :
+ {
+ /* Use something like this to place a specific
+ function's address into the vector table.
- LONG(ABSOLUTE(_foobar)) */
+ LONG (ABSOLUTE (_foobar)). */
- *(.vectors)
+ *(.vectors)
} ${RELOCATING+ > vectors}
-.text : {
- *(.rodata)
- *(.text)
- *(.strings)
- ${RELOCATING+ _etext = . ; }
- } ${RELOCATING+ > ram}
-.tors : {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
+
+.text :
+ {
+ *(.rodata)
+ *(.text)
+ *(.strings)
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
-.data : {
- *(.data)
- ${RELOCATING+ _edata = . ; }
+
+${CONSTRUCTING+${TORS}}
+
+.data :
+ {
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
-.bss : {
- ${RELOCATING+ _bss_start = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+
+.bss :
+ {
+ ${RELOCATING+ _bss_start = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
} ${RELOCATING+ >ram}
-.stack : {
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+
+.stack :
+ {
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
} ${RELOCATING+ > topram}
-.tiny : {
- *(.tiny)
+
+.tiny :
+ {
+ *(.tiny)
} ${RELOCATING+ > tiny}
-.eight : {
- *(.eight)
+
+.eight :
+ {
+ *(.eight)
} ${RELOCATING+ > eight}
-.stab 0 ${RELOCATING+(NOLOAD)} : {
- [ .stab ]
+
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
}
-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
- [ .stabstr ]
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
}
}
EOF
diff --git a/gnu/usr.bin/binutils/ld/scripttempl/i386go32.sc b/gnu/usr.bin/binutils/ld/scripttempl/i386go32.sc
index f14aff7b647..ac67b92296c 100644
--- a/gnu/usr.bin/binutils/ld/scripttempl/i386go32.sc
+++ b/gnu/usr.bin/binutils/ld/scripttempl/i386go32.sc
@@ -5,8 +5,14 @@ EXE=${CONSTRUCTING+${RELOCATING+-exe}}
# These are substituted in as variables in order to get '}' in a shell
# conditional expansion.
-CTOR='.ctor : { *(.ctor) }'
-DTOR='.dtor : { *(.dtor) }'
+CTOR='.ctor : {
+ *(SORT(.ctors.*))
+ *(.ctor)
+ }'
+DTOR='.dtor : {
+ *(SORT(.dtors.*))
+ *(.dtor)
+ }'
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
@@ -21,14 +27,16 @@ SECTIONS
*(.const*)
*(.ro*)
${RELOCATING+*(.gnu.linkonce.r*)}
- ${RELOCATING+etext = . ; _etext = . ;}
+ ${RELOCATING+etext = . ; PROVIDE(_etext = .) ;}
${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
}
.data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
${RELOCATING+djgpp_first_ctor = . ;
+ *(SORT(.ctors.*))
*(.ctor)
djgpp_last_ctor = . ;}
${RELOCATING+djgpp_first_dtor = . ;
+ *(SORT(.dtors.*))
*(.dtor)
djgpp_last_dtor = . ;}
*(.data)
@@ -40,7 +48,7 @@ SECTIONS
${RELOCATING+LONG(0);}
${RELOCATING+*(.gnu.linkonce.d*)}
- ${RELOCATING+edata = . ; _edata = . ;}
+ ${RELOCATING+edata = . ; PROVIDE(_edata = .) ;}
${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
}
${CONSTRUCTING+${RELOCATING-$CTOR}}
@@ -49,8 +57,18 @@ SECTIONS
{
*(.bss)
*(COMMON)
- ${RELOCATING+ end = . ; _end = . ;}
+ ${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
}
+ /* DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
}
EOF
diff --git a/gnu/usr.bin/binutils/ld/sysdep.h b/gnu/usr.bin/binutils/ld/sysdep.h
index 2ccc12279ad..24688a6b668 100644
--- a/gnu/usr.bin/binutils/ld/sysdep.h
+++ b/gnu/usr.bin/binutils/ld/sysdep.h
@@ -1,5 +1,5 @@
/* sysdep.h -- handle host dependencies for the GNU linker
- Copyright (C) 1995, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ChangeLog b/gnu/usr.bin/binutils/ld/testsuite/ChangeLog
index d350d66dec8..c4310b02a2f 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ChangeLog
+++ b/gnu/usr.bin/binutils/ld/testsuite/ChangeLog
@@ -1,15 +1,254 @@
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-06-06 H.J. Lu <hjl@gnu.org>
+ * ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with tmpdir/ld3
+ on Linux/mips.
+ * ld-elfvers/vers.exp: Also run on Linux/mips.
+ * ld-elfvsb/elfvsb.exp: Likewise.
+ * ld-shared/shared.exp: Likewise.
+ * ld-selective/selective.exp: Mark selective2, selective3,
+ selective4 and selective5 xfail on Linux/mips.
+ * ld-shared/main.c: Skip invalid -Bsymbolic tests on Linux/mips.
+ * symbolic.dat: Remove invalid -Bsymbolic tests on Linux/mips.
+ * ld-srec/srec.exp: Add Linux/mips to xfail.
+
+ 2001-05-24 H.J. Lu <hjl@gnu.org>
+ * ld-scripts/phdrs.exp: Add sparc64 to 64 bit platform.
+
+ 2001-05-25 Alan Modra <amodra@one.net.au>
+ * ld-elfvers/vers.exp: Replace linuxoldld with linux*oldld and
+ linuxaout with linux*aout.
+
+ 2001-05-01 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
+ * ld-scripts/phdrs.exp: Fix regexp, s390x is 64 bit platform.
+ * ld-scripts/phdrs.t: Use startaddress that's greater than any
+ MAXPAGESIZE used.
+
+ 2001-04-29 H.J. Lu <hjl@gnu.org>
+ * ld-shared/symbolic.dat: New.
+ * ld-shared/shared.exp: Also check -Bsymbolic.
+
+ 2001-03-06 DJ Delorie <dj@redhat.com>
+ * ld-scripts/cross2.t: Support any type of text/data sections, not
+ just the canonical ones.
+
+ 2001-02-28 Matt Hiller <hiller@redhat.com>
+ * ld-scripts/crossref.exp: Initialize flags to [big_or_little_endian].
+ * ld-undefined/undefined.exp: Ditto, and include $flags in ld
+ invocations.
+ * lib/ld-lib.exp (big_or_little_endian): Recognize -EB, -eb, -EL
+ and -el.
+ (is_endian_output_format): New function.
+ (default_ld_link): Set flags to [big_or_little_endian] only if ld
+ is being invoked such that the output format being used is of
+ known endianness.
+ (default_ld_simple_link): Ditto.
+
+ 2001-02-14 H.J. Lu <hjl@gnu.org>
+ * ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with tmpdir/ld3
+ for -static on ia64.
+ * ld-checks/checks.exp: Don't run on ia64-*-elf* nor
+ ia64-*-linux*.
+ * ld-elfvers/vers.exp: Also run ia64-*-elf* and ia64-*-linux*.
+ * ld-elfvsb/elfvsb.exp: Use i?86-*-*. Also run on ia64-*-linux*.
+ Set up expected failures for ia64-*-linux*.
+ * ld-shared/shared.exp: Likewise.
+
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Many files: Update copyright notices.
+
+2001-04-01 David O'Brien <obrien@FreeBSD.org>
+
+ * ld-bootstrap/bootstrap.exp: FreeBSD 4.3+ will fail on the --static test
+ as the static ELF binary needs to have its EI_OSABI set to a supported
+ value. There is no longer a fallback interpretation due to a security
+ issue.
+ * ld-undefined/undefined.exp: XFAIL on FreeBSD/i386 for the usual (even
+ though it doesn't use DWARF2 yet (but its output is identical).
+
+2001-04-01 David O'Brien <obrien@FreeBSD.org>
+
+ * ld-selective/selective.exp: Use -O with gcc rather than -O2.
+ This optimization level is buggy on some platforms, and this test
+ is not intended to test compiler optimizations.
+
+2001-03-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * ld-selective/selective.exp: Don't run test for 68hc11 and 68hc12
+ because selective linking is not yet implemented.
+
+2001-02-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * ld-srec/srec.exp (run_srec_test): m6811 code has references
+ to soft registers, define them with --defsym.
+ * ld-selective/selective.exp: Likewise.
+
+2001-01-14 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * ld-sh/sh.exp: Use --oformat srec, not -oformat srec.
+
+2001-01-03 Philip Blundell <pb@futuretv.com>
+
+ * ld-elfvsb/elfvsb.exp: Run test on Linux/Alpha.
+ * ld-shared/shared.exp: Likewise.
+
+2001-01-01 Philip Blundell <philb@gnu.org>
+
+ * ld-undefined/weak-undef.exp: New test.
+ * ld-undefined/weak-undef.s, ld-undefined/weak-undef.t: Supporting
+ files for above.
+
+ * ld-elfvers/vers.exp: Run test on Linux/ARM.
+ * ld-elfvsb/elfvsb.exp: Likewise.
+ * ld-shared/shared.exp: Likewise.
+
+2000-12-31 Nick Clifton <nickc@redhat.com>
+
+ * ld-srec/srec.exp: Use --oformat instead of -oformat.
+
+2000-12-09 Nick Clifton <nickc@redhat.com>
+
+ * ld-selective/selective.exp: Link in libgcc when target is v850.
+
+ * ld-srec/srec.exp: Expect the srec_test to fail for ARM targets
+ because the -oformat linker command switch cannot be used.
+
2000-11-06 Alan Modra <alan@linuxcare.com.au>
* ld-elfvsb/main.c (PROTECTED_CHECK): Include stdio.h.
(main): Prune unused args.
-2000-10-17 Philip Blundell <pb@futuretv.com>
+2000-10-29 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * ld-selective/selective.exp <no CXX>: Fix typo for argument to
+ "untested".
+
+2000-10-19 H.J. Lu (hjl@gnu.org)
+
+ * ld-elfvsb/elfvsb.exp (visibility_run): Set expected failures
+ for Linux/PPC.
+ * ld-shared/shared.exp: Likewise.
+
+2000-10-09 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * ld-selective/selective.exp: Rearrange to be table-driven.
+
+2000-10-07 Alan Modra <alan@linuxcare.com.au>
+
+ * ld-scripts/phdrs.exp: hppa*64*-*-* is 64-bit ELF too.
+
+2000-10-02 Alan Modra <alan@linuxcare.com.au>
- * lib/ld-lib.exp, ld-elfvsb: Update from trunk version.
+ * ld-scripts/weak.exp: Don't set $global$ for hppa-elf any more.
+ * ld-scripts/crossref.exp: Ditto.
+
+2000-09-29 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * ld-selective/5.cc: New test.
+ * ld-selective/selective.exp: Run it as xfailed.
+
+ * ld-selective/4.cc: Correct spelling of "lose".
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ * ld-selective/selective.exp: Remove the xfails for hppa.
+
+2000-08-30 Alexandre Oliva <aoliva@redhat.com>
+
+ * ld-undefined/undefined.exp (hppa*64*-*-*, mn10300-*-elf,
+ sh-*-*): With dwarf-2, `undefined function' can't pass.
+
+2000-08-03 H.J. Lu (hjl@gnu.org)
+
+ * ld-bootstrap/bootstrap.exp: Add strip.
+
+2000-07-24 H.J. Lu (hjl@gnu.org)
+
+ * ld-elfvsb/elfvsb.exp: Add -g to $CC to get the location of
+ the undefined reference.
+
+2000-07-16 H.J. Lu (hjl@gnu.org)
+
+ * ld-elfvsb/elfvsb.exp (support_protected): New variable. Check
+ and set to "yes" if the protected visibility is expected to
+ pass.
+ (visibility_run): Set expected to fail for the "protected"
+ and "protected_undef_def" tests only if $support_protected is
+ "no".
+
+ * ld-elfvsb/main.c (PROTECTED_CHECK): Check for the protected
+ visibility support if defined.
+
+2000-07-15 H.J. Lu (hjl@gnu.org)
+
+ * ld-elfvsb/elfvsb.exp (visibility_run): Set expected failure
+ for "protected_undef_def".
+
+ * ld-elfvsb/main.c: Don't define HIDDEN_UNDEF_TEST when
+ PROTECTED_WEAK_TEST is defined.
+ Don't define PROTECTED_UNDEF_TEST when PROTECTED_WEAK_TEST is
+ defined.
+ Define PROTECTED_TEST when PROTECTED_UNDEF_TEST is defined.
+
+ * ld-elfvsb/sh1.c (visibility): Mark protected only if
+ PROTECTED_TEST, PROTECTED_UNDEF_TEST or PROTECTED_WEAK_TEST
+ is defined.
+ (visibility_var): Likewise.
+
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
+
+ * ld-srec/srec.exp: xfail hppa.
+
+ * ld-scripts/weak.exp: Define $global$ for hppa.
+
+ * ld-scripts/crossref.exp: Fix string quoting.
+
+2000-06-05 H.J. Lu (hjl@gnu.org)
+
+ * lib/ld-lib.exp (default_ld_link): Redirect the linker output
+ to link_output and make it global.
+
+ * ld-elfvsb/elfvsb.exp (visibility_test): Add "hidden_undef",
+ "hidden_undef_def", "hidden_weak", "protected_undef",
+ "protected_undef_def" and "protected_weak".
+ (visibility_run): Likewise.
+ * ld-elfvsb/main.c: Likewise.
+ * ld-elfvsb/sh1.c: Likewise.
+ * ld-elfvsb/sh2.c: Likewise.
+
+ * ld-elfvsb/elfvsb.dat: Updated.
+
+2000-05-21 H.J. Lu (hjl@gnu.org)
+
+ * ld-elfvsb/main.c (main_visibility_check): Fix the protected
+ visibility test.
+
+2000-05-13 H.J. Lu (hjl@gnu.org)
+
+ * lib/ld-lib.exp (default_ld_link): Redirect the linker output
+ to link_output and make it global.
+
+ * ld-elfvsb/elf-offset.ld: New. ELF visibility fearture
+ tests.
+ * ld-elfvsb/elfvsb.dat: Likewise.
+ * ld-elfvsb/elfvsb.exp: Likewise.
+ * ld-elfvsb/main.c: Likewise.
+ * ld-elfvsb/sh1.c: Likewise.
+ * ld-elfvsb/sh2.c: Likewise.
+
+Fri Apr 21 15:16:07 2000 Richard Henderson <rth@cygnus.com>
+
+ * testsuite/ld-scripts/phdrs.exp: IA-64 is 64-bit ELF too.
2000-04-12 Alan Modra <alan@linuxcare.com.au>
- * ld-selective/selective.exp (test4): Delete incorrect foo__1B test.
+ * ld-selective/3.cc (_start): Add cheat for gcc-2.95.2 failure.
+
+ * ld-selective/selective.exp (test4): Test for presence of
+ foo__1B, not absence. Also check for foo__1A and _start.
+ White space changes throughout file.
2000-03-13 Nick Clifton <nickc@cygnus.com>
diff --git a/gnu/usr.bin/binutils/ld/testsuite/config/default.exp b/gnu/usr.bin/binutils/ld/testsuite/config/default.exp
index 0a0fdea16d5..2cc82a3731e 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/config/default.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/config/default.exp
@@ -1,5 +1,6 @@
# Basic expect script for LD Regression Tests
-# Copyright (C) 1993, 94, 95, 97, 98, 1999 Free Software Foundation
+# Copyright 1993, 1994, 1995, 1997, 1998, 1999
+# 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
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp
index 0e4b820cb20..3a654ec0ad7 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -1,5 +1,6 @@
# Expect script for LD Bootstrap Tests
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998 Free Software Foundation
+# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
+# Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,12 +32,17 @@ if ![isnative] {
# really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a
# new ld, ld3. ld2 and ld3 should be identical.
-foreach flags {"" "--static" "--traditional-format" "--no-keep-memory"} {
- if {"$flags" != ""} {
+foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory"} {
+ set do_strip "no"
+ if {"$flags" == "strip"} {
+ set testname "bootstrap with $flags"
+ set flags ""
+ set do_strip "yes"
+ } else { if {"$flags" != ""} {
set testname "bootstrap with $flags"
} else {
set testname "bootstrap"
- }
+ }}
# This test can only be run if we have the ld build directory,
# since we need the object files.
@@ -66,6 +72,14 @@ foreach flags {"" "--static" "--traditional-format" "--no-keep-memory"} {
}
}
+ # On FreeBSD, running static ELF binaries requires that they have their
+ # EI_OSABI set to a supported value. There is no longer a fallback
+ # interpretation.
+ if {"$flags" == "--static"} {
+ setup_xfail "*-*-freebsd4*"
+ setup_xfail "*-*-freebsd5*"
+ }
+
# On Irix 5, linking with --static only works if all the files are
# compiled using -non_shared.
if {"$flags" == "--static"} {
@@ -77,6 +91,16 @@ foreach flags {"" "--static" "--traditional-format" "--no-keep-memory"} {
continue
}
+ if {"$do_strip" == "yes"} {
+ verbose -log "$strip tmpdir/ld1"
+ catch "exec $strip tmpdir/ld1" exec_output
+ if ![string match "" $exec_output] then {
+ verbose -log "$exec_output"
+ fail $testname
+ continue
+ }
+ }
+
if ![ld_link tmpdir/ld1 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] {
fail $testname
continue
@@ -87,6 +111,29 @@ foreach flags {"" "--static" "--traditional-format" "--no-keep-memory"} {
continue
}
+ if {"$flags" == "--static"} {
+ if { [istarget ia64-*-elf*]
+ || [istarget ia64-*-linux*] } {
+ # On ia64, tmpdir/ld2 != tmpdir/ld3 is normal since they are
+ # generated by different linkers, tmpdir/ld1 and tmpdir/ld2.
+ # So we rebuild tmpdir/ld2 with tmpdir/ld3.
+ if ![ld_link tmpdir/ld3 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] {
+ fail $testname
+ continue
+ }
+ }
+ } else {
+ if { [istarget mips*-*-linux*] } {
+ # On Linux/mips, tmpdir/ld2 != tmpdir/ld3 is normal since
+ # they are generated by different linkers, tmpdir/ld1 and
+ # tmpdir/ld2. So we rebuild tmpdir/ld2 with tmpdir/ld3.
+ if ![ld_link tmpdir/ld3 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] {
+ fail $testname
+ continue
+ }
+ }
+ }
+
send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
verbose "cmp tmpdir/ld2 tmpdir/ld3"
catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-cdtest/cdtest.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-cdtest/cdtest.exp
index ccbe35e3709..76f82916773 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-cdtest/cdtest.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-cdtest/cdtest.exp
@@ -1,5 +1,5 @@
# Expect script for LD cdtest Tests
-# Copyright (C) 1993,1994,1995, 1997 Free Software Foundation
+# Copyright 1993, 1994, 1995, 1997 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
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-empic/empic.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-empic/empic.exp
index 2d528bef1f6..2046970d1e3 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-empic/empic.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-empic/empic.exp
@@ -1,5 +1,5 @@
# Expect script for ld-empic tests
-# Copyright (C) 1994,1995, 1996, 1997 Free Software Foundation
+# Copyright 1994, 1995, 1996 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
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/defined.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/defined.exp
index 6da26bc3bc2..eb416df3f91 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/defined.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/defined.exp
@@ -1,5 +1,21 @@
# Test DEFINED in a linker script.
# By Ian Lance Taylor, Cygnus Support.
+# Copyright 2001
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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.
set testname "DEFINED"
set prms_id 5699
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/script.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/script.exp
index 9b6617412ae..d81085119f0 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/script.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/script.exp
@@ -1,5 +1,21 @@
# Test basic linker script functionality
# By Ian Lance Taylor, Cygnus Support
+# Copyright 2001
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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.
set testname "script"
@@ -24,11 +40,17 @@ proc check_script { } {
verbose "bad output from nm"
fail $testname
} else {
+ set text_end 0x104
+ set data_end 0x1004
+ if [istarget *c54x*-*-*] then {
+ set text_end 0x102
+ set data_end 0x1002
+ }
if {$nm_output(text_start) != 0x100} {
send_log "text_start == $nm_output(text_start)\n"
verbose "text_start == $nm_output(text_start)"
fail $testname
- } else { if {$nm_output(text_end) < 0x104 \
+ } else { if {$nm_output(text_end) < $text_end \
|| $nm_output(text_end) > 0x110} {
send_log "text_end == $nm_output(text_end)\n"
verbose "text_end == $nm_output(text_end)"
@@ -37,7 +59,7 @@ proc check_script { } {
send_log "data_start == $nm_output(data_start)\n"
verbose "data_start == $nm_output(data_start)"
fail $testname
- } else { if {$nm_output(data_end) < 0x1004 \
+ } else { if {$nm_output(data_end) < $data_end \
|| $nm_output(data_end) > 0x1010} {
send_log "data_end == $nm_output(data_end)\n"
verbose "data_end == $nm_output(data_end)"
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/sizeof.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/sizeof.exp
index 3bdefd4f0dc..4b7b024481f 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/sizeof.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-scripts/sizeof.exp
@@ -1,6 +1,22 @@
# Test SIZEOF in a linker script.
# By Ian Lance Taylor, Cygnus Support
# Based on a bug report from anders.blomdell@control.lth.se.
+# Copyright 2001
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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.
set testname "SIZEOF"
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-sh/sh.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-sh/sh.exp
index c646d269a89..41ca8095edf 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-sh/sh.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-sh/sh.exp
@@ -1,5 +1,5 @@
# Expect script for ld-sh tests
-# Copyright (C) 1995, 1996, 1997 Free Software Foundation
+# Copyright 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -56,7 +56,7 @@ if ![ld_assemble $as "-relax $srcdir/$subdir/sh1.s" tmpdir/sh1.o] {
set testsrec "SH relaxing to S-records"
-if ![ld_simple_link $ld tmpdir/sh1.s1 "-relax -oformat srec tmpdir/sh1.o"] {
+if ![ld_simple_link $ld tmpdir/sh1.s1 "-relax --oformat srec tmpdir/sh1.o"] {
fail $testsrec
} else {
# The file name is embedded in the S-records, so create both
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-shared/main.c b/gnu/usr.bin/binutils/ld/testsuite/ld-shared/main.c
index fe5c78ae423..ce06261eb7a 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-shared/main.c
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-shared/main.c
@@ -55,6 +55,7 @@ main ()
printf ("shlib_maincall () == %d\n", shlib_maincall ());
#endif
printf ("main_called () == %d\n", main_called ());
+#ifndef SYMBOLIC_TEST
printf ("shlib_checkfunptr1 (shlib_shlibvar1) == %d\n",
shlib_checkfunptr1 (shlib_shlibvar1));
#ifndef XCOFF_TEST
@@ -77,6 +78,7 @@ main ()
printf ("!=");
printf (" main_called\n");
#endif
+#endif
printf ("shlib_check () == %d\n", shlib_check ());
return 0;
}
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-shared/shared.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-shared/shared.exp
index 6eb0a8c5a73..256c8623b59 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-shared/shared.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-shared/shared.exp
@@ -1,5 +1,6 @@
# Expect script for ld-shared tests
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,20 +28,15 @@ if ![isnative] then {return}
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
-if { ![istarget i386-*-sysv4*] \
- && ![istarget i486-*-sysv4*] \
- && ![istarget i586-*-sysv4*] \
- && ![istarget i386-*-unixware] \
- && ![istarget i486-*-unixware] \
- && ![istarget i586-*-unixware] \
- && ![istarget i386-*-elf*] \
- && ![istarget i486-*-elf*] \
- && ![istarget i586-*-elf*] \
- && ![istarget i386-*-linux*] \
- && ![istarget i486-*-linux*] \
- && ![istarget i586-*-linux*] \
+if { ![istarget i?86-*-sysv4*] \
+ && ![istarget i?86-*-unixware] \
+ && ![istarget i?86-*-elf*] \
+ && ![istarget i?86-*-linux*] \
+ && ![istarget ia64-*-elf*] \
+ && ![istarget ia64-*-linux*] \
&& ![istarget m68k-*-linux*] \
&& ![istarget mips*-*-irix5*] \
+ && ![istarget mips*-*-linux*] \
&& ![istarget powerpc-*-elf*] \
&& ![istarget powerpc-*-linux*] \
&& ![istarget powerpc-*-sysv4*] \
@@ -48,6 +44,8 @@ if { ![istarget i386-*-sysv4*] \
&& ![istarget sparc*-*-solaris2*] \
&& ![istarget sparc*-*-sunos4*] \
&& ![istarget sparc*-*-linux*] \
+ && ![istarget arm*-*-linux*] \
+ && ![istarget alpha*-*-linux*] \
&& ![istarget rs6000*-*-aix*] \
&& ![istarget powerpc*-*-aix*] } {
return
@@ -196,6 +194,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
# SunOS non PIC shared libraries don't permit some cases of
# overriding.
setup_xfail "*-*-sunos4*"
+ setup_xfail "ia64-*-linux*"
shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
# Test ELF shared library relocations with a non-zero load
@@ -204,6 +203,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
# the load address is not zero (which is the default).
setup_xfail "*-*-sunos4*"
setup_xfail "*-*-linux*libc1"
+ setup_xfail "powerpc-*-linux*"
+ setup_xfail "ia64-*-linux*"
+ setup_xfail "mips*-*-linux*"
shared_test shnp "shared (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o shared \
"-T $srcdir/$subdir/elf-offset.ld"
@@ -222,6 +224,11 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
shared_test shp "shared" mainnp.o sh1p.o sh2p.o xcoff
} else {
shared_test shp "shared" mainnp.o sh1p.o sh2p.o shared
+ ld_compile "$CC $CFLAGS -DSYMBOLIC_TEST -DXCOFF_TEST $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o
+ ld_compile "$CC $CFLAGS -DSYMBOLIC_TEST -DXCOFF_TEST $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o
+ shared_test shp "shared -Bsymbolic" mainnp.o sh1p.o sh2p.o symbolic "-Bsymbolic"
+ ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o
+ ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o
} }
}
}
@@ -238,6 +245,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m
# SunOS non PIC shared libraries don't permit some cases of
# overriding.
setup_xfail "*-*-sunos4*"
+ setup_xfail "ia64-*-linux*"
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
}
} else {
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-srec/srec.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-srec/srec.exp
index ca38a00484c..75eb3040526 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-srec/srec.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-srec/srec.exp
@@ -1,6 +1,21 @@
# Test linking directly to S-records.
# By Ian Lance Taylor, Cygnus Support.
-# Public domain.
+# Copyright 2001
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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.
# Get the offset from an S-record line to the start of the data.
@@ -228,18 +243,19 @@ proc run_srec_test { test objs } {
set flags "$flags --defsym V_SPILL=0 --defsym V_FILL=0"
}
- # ARM targets call __gccmain
- if [istarget arm*-*-*] {
- set flags "$flags --defsym ___gccmain=0"
- }
-
- if [istarget strongarm*-*-*] {
- set flags "$flags --defsym __gccmain=0"
- }
+ if {[istarget arm*-*-*] || \
+ [istarget strongarm*-*-*] || \
+ [istarget xscale*-*-*] || \
+ [istarget thumb-*-*] } {
- # Thumb targets call __gccmain
- if [istarget thumb-*-*] {
- set flags "$flags --defsym ___gccmain=0"
+ # ARM targets call __gccmain
+ set flags "$flags --defsym __gccmain=0"
+
+ # ARM targets cannot convert format in the linker
+ # using the --oformat command line switch
+ setup_xfail "*arm*-*-*"
+ setup_xfail "xscale-*-*"
+ setup_xfail "thumb-*-*"
}
# PowerPC EABI code calls __eabi.
@@ -252,13 +268,20 @@ proc run_srec_test { test objs } {
set flags "$flags --defsym __truncsipsi2_d0_d2=0"
}
+ # m6811/m6812 code has references to soft registers.
+ if {[istarget m6811-*-*] || [istarget m6812-*-*]} {
+ set flags "$flags --defsym _.frame=0 --defsym _.d1=0 --defsym _.d2=0"
+ set flags "$flags --defsym _.d3=0 --defsym _.d4=0"
+ set flags "$flags --defsym _.tmp=0 --defsym _.xy=0"
+ }
+
# V850 targets need libgcc.a
if [istarget v850*-*-elf] {
set objs "$objs -L ../gcc -lgcc"
}
if { ![ld_simple_link $ld tmpdir/sr1 "$flags $objs"] \
- || ![ld_simple_link $ld tmpdir/sr2.sr "$flags -oformat srec $objs"] } {
+ || ![ld_simple_link $ld tmpdir/sr2.sr "$flags --oformat srec $objs"] } {
setup_xfail "hppa*-*-*elf*"
fail $test
return
@@ -318,7 +341,7 @@ setup_xfail "i*86-*-aout*"
# These tests fail on the native MIPS ELF targets because the GP value
# in the .reginfo section is not updated when the S-record version is
# written out. The mips-elf target itself does not use a .reginfo section.
-setup_xfail "mips*-*-irix5*" "mips*-*-irix6*"
+setup_xfail "mips*-*-irix5*" "mips*-*-irix6*" "mips*-*-linux*"
# The S-record linker doesn't do the magic TOC handling that XCOFF
# linkers do.
@@ -326,7 +349,8 @@ setup_xfail "*-*-aix*" "*-*-xcoff*"
# The S-record linker doesn't build ARM/Thumb stubs.
setup_xfail "arm-*-coff"
-setup_xfail "strongarm*-*-*"
+setup_xfail "strongarm*-*-coff"
+setup_xfail "xscale*-*-coff"
setup_xfail "arm-*-pe*"
# setup_xfail "arm-*elf*"
setup_xfail "thumb-*-coff*"
@@ -344,6 +368,9 @@ setup_xfail "v850*-*-elf"
setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*"
setup_xfail "alpha*-*-netbsd*"
+# The S-record linker hasn't any hope of coping with HPPA relocs.
+setup_xfail "hppa*-*-*"
+
# The S-record linker doesn't support the special PE headers - the PE
# emulation tries to write pe-specific information to the PE headers
# in the output bfd, but it's not a PE bfd (it's an srec bfd)
@@ -367,7 +394,7 @@ if ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/sr3.cc tmpdir/sr3.
# See above.
setup_xfail "i*86-*-aout*"
-setup_xfail "mips*-*-irix5*" "mips*-*-irix6*"
+setup_xfail "mips*-*-irix5*" "mips*-*-irix6*" "mips*-*-linux*"
setup_xfail "*-*-aix*" "*-*-xcoff*"
setup_xfail "arm*-*-*"
setup_xfail "strongarm*-*-*"
@@ -376,6 +403,7 @@ setup_xfail "powerpc*-*-eabi*"
setup_xfail "v850*-*-elf"
setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*"
setup_xfail "alpha*-*-netbsd*"
+setup_xfail "hppa*-*-*"
setup_xfail "*-*-cygwin*" "*-*-mingw*" "*-*-pe*" "*-*-winnt*"
run_srec_test $test2 "tmpdir/sr3.o"
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-undefined/undefined.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-undefined/undefined.exp
index 5f551924a3b..93136a2ccc2 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-undefined/undefined.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-undefined/undefined.exp
@@ -1,7 +1,8 @@
# Test that the linker reports undefined symbol errors correctly.
# By Ian Lance Taylor, Cygnus Support
#
-# Copyright (C) 1995, 1996, 1997 Free Software Foundation
+# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,12 +40,14 @@ if ![ld_compile "$CC -g" $srcdir/$subdir/undefined.c tmpdir/undefined.o] {
catch "exec rm -f tmpdir/undefined" exec_output
+set flags [big_or_little_endian]
+
# Using -e start prevents the SunOS linker from trying to build a
# shared library.
-send_log "$ld -e start -o tmpdir/undefined tmpdir/undefined.o\n"
-verbose "$ld -e start -o tmpdir/undefined tmpdir/undefined.o"
+send_log "$ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o\n"
+verbose "$ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o"
-catch "exec $ld -e start -o tmpdir/undefined tmpdir/undefined.o" exec_output
+catch "exec $ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o" exec_output
send_log "$exec_output\n"
verbose "$exec_output"
@@ -69,6 +72,12 @@ checkund $mu $testund
# Just doesn't work for PA ELF. No clue why.
setup_xfail "hppa*-*-*elf*"
+# With dwarf-2, we can't get the function in which the reference
+# occurs; see below.
+setup_xfail "hppa*64*-*-*"
+setup_xfail "mn10300-*-elf"
+setup_xfail "sh-*-*"
+
set mf "tmpdir/undefined.o: In function `function':"
checkund $mf $testfn
@@ -120,6 +129,7 @@ set ml "undefined.c:9: undefined reference to `this_function_is_not_defined'"
# hence the xfails below.
#setup_xfail arm-*-elf
+setup_xfail i?86-*-freebsd*
#setup_xfail strongarm-*-elf
#setup_xfail thumb-*-elf
setup_xfail mcore-*-elf
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-versados/versados.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-versados/versados.exp
index 2d2c0663bed..b08d7edb591 100644
--- a/gnu/usr.bin/binutils/ld/testsuite/ld-versados/versados.exp
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-versados/versados.exp
@@ -1,5 +1,5 @@
# Expect script for ld-versados tests
-# Copyright (C) 1995, 1996, 1997 Free Software Foundation
+# Copyright 1995, 1997 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
diff --git a/gnu/usr.bin/binutils/opcodes/ChangeLog b/gnu/usr.bin/binutils/opcodes/ChangeLog
index e329df2dd90..593bec9de1a 100644
--- a/gnu/usr.bin/binutils/opcodes/ChangeLog
+++ b/gnu/usr.bin/binutils/opcodes/ChangeLog
@@ -1,5731 +1,1274 @@
-2000-05-26 Scott Bambrough <scottb@netwinder.org>
-
- Port of patch to mainline by Nick Clifton <nickc@cygnus.com>:
- * arm-opc.h: Use upper case for flags in MSR and MRS
- instructions. Allow any bit to be set in the field_mask of
- the MSR instruction.
-
- Port of patch to mainline by Nick Clifton <nickc@cygnus.com>:
- * arm-dis.c (print_insn_arm): Decode _x and _s bits of
- the field_mask of an MSR instruction.
-
-2000-05-26 Scott Bambrough <scottb@netwinder.org>
-
- Port of patch to mainline by Thomas de Lellis <tdel@windriver.com>:
- * arm-opc.h: Disassembly of thumb ldsb/ldsh
- instructions changed to ldrsb/ldrsh.
-
-2000-04-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * a29k-dis.c, alpha-dis.c, alpha-opc.c, arc-dis.c, arc-opc.c,
- avr-dis.c, d10v-dis.c, d10v-opc.c, d30v-dis.c, d30v-opc.c,
- disassemble.c, h8300-dis.c, h8500-dis.c, hppa-dis.c, i370-dis.c,
- i370-opc.c, i960-dis.c, m10200-dis.c, m10200-opc.c, m10300-dis.c,
- m10300-opc.c, m68k-dis.c, m68k-opc.c, m88k-dis.c, mcore-dis.c,
- mips-dis.c, mips-opc.c, mips16-opc.c, pj-dis.c, pj-opc.c, ppc-dis.c,
- ppc-opc.c, sh-dis.c, sparc-dis.c, sparc-opc.c, tic80-dis.c,
- tic80-opc.c, v850-dis.c, v850-opc.c, vax-dis.c, w65-dis.c, z8k-dis.c,
- z8kgen.c: Everyone includes sysdep.h. Remove ansidecl.h as sysdep.h
- includes it.
-
-2000-04-20 Alexandre Oliva <aoliva@cygnus.com>
-
- * m10300-dis.c (HAVE_AM30, HAVE_AM33): Define.
- (disassemble): Use them.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * po/opcodes.pot: Regenerate.
-
- * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
- (DEP): Quote when passing vars to sub-make. Add warning message
- to end.
- (DEP1): Rewrite for "gcc -MM".
- (CLEANFILES): Add DEP2.
- Update dependencies.
- * Makefile.in: Regenerate.
-
-2000-04-03 Denis Chertykov <denisc@overta.ru>
-
- * avr-dis.c: Syntax cleanup.
- (add0fff): Print the pc relative address as a signed number.
- (add03f8): Likewise.
-
-2000-04-01 Ian Lance Taylor <ian@zembu.com>
-
- * disassemble.c (disassembler_usage): Don't use a prototype. Mark
- the parameter ATTRIBUTE_UNUSED.
- * ppc-opc.c: Add ATTRIBUTE_UNUSED as needed.
-
-2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
-
- * m10300-opc.c: SP-based offsets are always unsigned.
-
-2000-03-29 Thomas de Lellis <tdel@windriver.com>
-
- * arm-opc.h (thumb_opcodes): Disassemble 0xde.. to "bal"
- [branch always] instead of "undefined".
-
-2000-03-27 Nick Clifton <nickc@cygnus.com>
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ Merge from mainline.
+ 2001-06-06 Peter Jakubek <pjak@snafu.de>
+ * m68k-dis.c (print_insn_m68k): Fix typo.
+ * m68k-opc.c (m68k_opcodes): Correct allowed operands for
+ mcf (ColdFire) div, rem and moveb instructions.
+
+ 2001-06-06 Alan Modra <amodra@bigpond.net.au>
+ * i386-dis.c (cond_jump_flag, loop_jcxz_flag): Define.
+ (cond_jump_mode, loop_jcxz_mode): Define.
+ (dis386_att): Add cond_jump_flag and loop_jcxz_flag as
+ appropriate, and 'F' suffix to loop insns.
+ (disx86_64_att): Likewise.
+ (dis386_twobyte_att): Likewise.
+ (print_insn_i386): Don't output addr prefix for loop, jcxz insns.
+ Output data size prefix for long conditional jumps. Output cs and
+ ds branch hints.
+ (putop): Handle 'F', and mark PREFIX_ADDR used for case 'E'.
+ (OP_J): Don't make PREFIX_DATA used.
+
+ 2001-05-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * mips-dis.c (mips_isa_type): Add MIPS r12k support.
+
+ 2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * mips-dis.c (INSNLEN): Rename MAXLEN.
+ (std_reg_names): Replace by mips32_reg_names and mips64_reg_names.
+ (print_insn_arg): Remove $ prefix of register names.
+ (set_mips_isa_type): Remove.
+ (mips_isa_type): New function.
+ (get_mips_isa): New Function.
+ (print_insn_mips): Rename _print_insn_mips.
+ (_print_insn_mips): New function, contains code which was
+ duplicated in print_insn_big_mips and print_insn_little_mips.
+ (print_insn_big_mips): Moved code to _print_insn_mips.
+ (print_insn_little_mips): Likewise.
+ (print_mips16_insn_arg): Remove $ prefix of register names.
+ Print error message before abort.
- * d30v-opc.c (d30v_format_table): Move SHORT_AR to end of list of
- short instructions, from end of list of long instructions.
+ 2001-05-14 J.T. Conklin <jtc@redback.com>
+ * ppc-opc.c (powerpc_opcodes): Fixed extended opcode field of
+ simplified mnemonics used for setting PPC750-specific special
+ purpose registers.
-2000-03-27 Ian Lance Taylor <ian@zembu.com>
+ 2001-03-23 Nick Clifton <nickc@redhat.com>
+ * mips-opc.c: Remove extraneous whitespace.
+ * mips-dis.c: Remove extraneous whitespace.
- * Makefile.am (CFILES): Add avr-dis.c.
- (ALL_MACHINES): Add avr-dis.lo.
+ 2001-03-06 Igor Shevlyakov <igor@windriver.com>
+ * m68k-dis.c (print_insn_m68k): Recognize Coldfire CPUs
+ so command line switches will work.
-2000-03-27 Alan Modra <alan@linuxcare.com>
+ 2001-02-28 Igor Shevlyakov <igor@windriver.com>
+ * m68k-opc.c: fix cpushl according to Motorola. Enable
+ bunch of instructions for Coldfire 5407 and add all new.
- * avr-dis.c (add0fff, add03f8): Don't use structure bitfields to
- truncate integers.
- (print_insn_avr): Call function via pointer in K&R compatible way.
- (dispLDD, regPP, reg50, reg104, reg40, reg20w, lit404, lit204,
- add0fff, add03f8): Convert to old style function declaration and
- add prototype.
- (avrdis_opcode): Add prototype.
-
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * avr-dis.c: New file. AVR disassembler.
- * configure.in (bfd_avr_arch): New architecture support.
- * disassemble.c: Likewise.
+ 2001-02-27 Alan Modra <alan@linuxcare.com.au>
+ * configure.in (BFD_VERSION): Do without grep.
* configure: Regenerate.
-
-Mon Mar 6 19:52:05 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh-opc.h (sh_table): ldre and ldrs have a *signed* displacement.
-
-2000-03-02 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * d30v-dis.c (print_insn): Remove d*i hacks. Use per-operand
- flag to determine if operand is pc-relative.
- * d30v-opc.c:
- (d30v_format_table):
- (REL6S3): Renamed from IMM6S3.
- Added flag OPERAND_PCREL.
- (REL12S3, REL18S3, REL32): Split from IMM12S3, IMM18S3, REL32, with
- added flag OPERAND_PCREL.
- (IMM12S3U): Replaced with REL12S3.
- (SHORT_D2, LONG_D): Delay target is pc-relative.
- (SHORT_B2r, SHORT_B3r, SHORT_B3br, SHORT_D2r, LONG_Ur, LONG_2r):
- Split from SHORT_B2, SHORT_D2, SHORT_B3b, SHORT_D2, LONG_U, LONG_2r,
- using the REL* operands.
- (LONG_2br, LONG_Dr): Likewise, from LONG_2b, LONG_D.
- (SHORT_D1r, SHORT_D2Br, LONG_Dbr): Renamed from SHORT_D1, SHORT_D2B,
- LONG_Db, using REL* operands.
- (SHORT_U, SHORT_A5S): Removed stray alternatives.
- (d30v_opcode_table): Use new *r formats.
-
-2000-02-28 Nick Clifton <nickc@cygnus.com>
-
- * m32r-desc.c (m32r_cgen_cpu_open): Replace 'flags' with
- 'signed_overflow_ok_p'.
-
-2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
-
- * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
- name of the libtool directory.
- * Makefile.in: Rebuild.
-
-2000-02-24 Nick Clifton <nickc@cygnus.com>
-
- * cgen-opc.c (cgen_set_signed_overflow_ok): New function.
- (cgen_clear_signed_overflow_ok): New function.
- (cgen_signed_overflow_ok_p): New function.
-
-2000-02-23 Andrew Haley <aph@cygnus.com>
-
- * m32r-asm.c, m32r-desc.c, m32r-desc.h, m32r-dis.c,
- m32r-ibld.c,m32r-opc.h: Rebuild.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * i370-dis.c, i370-opc.c: New.
-
- * disassemble.c (ARCH_i370): Define.
- (disassembler): Handle it.
-
- * Makefile.am: Add support for Linux/IBM 370.
- * configure.in: Likewise.
-
+ * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
- * configure: Likewise.
-
-2000-02-22 Chandra Chavva <cchavva@cygnus.com>
-
- * d30v-opc.c (d30v_opcode_tab) : Added FLAG_NOT_WITH_ADDSUBppp to
- ST2H, STB, STH, STHH, STW and ST2H opcodes to prohibit parallel
- procedure.
-
-1999-12-30 Andrew Haley <aph@cygnus.com>
-
- * mips-dis.c (_print_insn_mips): New arg for OPCODE_IS_MEMBER:
- force gp32 to zero.
- * mips-opc.c (G6): New define.
- (mips_builtin_op): Add "move" definition for -gp32.
-2000-02-22 Ian Lance Taylor <ian@zembu.com>
-
- From Grant Erickson <gerickso@Brocade.COM>:
- * ppc-opc.c: Correct dcread--it takes 3 arguments, not 2.
-
-2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * dis-buf.c (buffer_read_memory): Change `length' param and all int
- vars to unsigned.
-
-Thu Feb 17 00:18:12 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh-dis.c (print_movxy, print_insn_ddt, print_dsp_reg): New functions.
- (print_insn_ppi): Likewise.
- (print_insn_shx): Use info->mach to select appropriate insn set.
- Add support for sh-dsp. Remove FD_REG_N support.
- * sh-opc.h (sh_nibble_type): Add new values for sh-dsp support.
- (sh_arg_type): Likewise. Remove FD_REG_N.
- (sh_dsp_reg_nums): New enum.
- (arch_sh1, arch_sh2, arch_sh3, arch_sh3e, arch_sh4): New macros.
- (arch_sh_dsp, arch_sh3_dsp, arch_sh1_up, arch_sh2_up): Likewise.
- (arch_sh3_up, arch_sh3e_up, arch_sh4_up, arch_sh_dsp_up): Likewise.
- (arch_sh3_dsp_up): Likewise.
- (sh_opcode_info): New field: arch.
- (sh_table): Split up insn with FD_REG_N into ones with F_REG_N and
- D_REG_N. Fill in arch field. Add sh-dsp insns.
-
-2000-02-14 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * arm-dis.c: Change flavor name from atpcs-special to
- special-atpcs to prevent name conflict in gdb.
- (get_arm_regname_num_options, set_arm_regname_option,
- get_arm_regnames): New functions. API to access the several
- flavor of register names. Note: Used by gdb.
- (print_insn_thumb): Use the register name entry from the currently
- selected flavor for LR and PC.
-
-2000-02-10 Nick Clifton <nickc@cygnus.com>
-
- * mcore-opc.h (enum mcore_opclass): Add MULSH and OPSR
- classes.
- (mcore_table): Add "idly4", "psrclr", "psrset", "mulsh" and
- "mulsh.h" instructions.
- * mcore-dis.c (imsk array): Add masks for MULSH and OPSR
- classes.
- (print_insn_mcore): Add support for little endian targets.
- Add support for MULSH and OPSR classes.
-
-2000-02-07 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c (parse_arm_diassembler_option): Rename again.
- Previous delat did not take.
-
-2000-02-03 Timothy Wall <twall@redhat.com>
-
- * dis-buf.c (buffer_read_memory): Use octets_per_byte field
- to adjust target address bounds checking and calculate the
- appropriate octet offset into data.
-
-2000-01-27 Nick Clifton <nickc@redhat.com>
-
- * arm-dis.c: (parse_disassembler_option): Rename to
- parse_arm_disassembler_option and allow to be exported.
-
- * disassemble.c (disassembler_usage): New function: Print out any
- target specific disassembler options.
- Call arm_disassembler_options() if the ARM architecture is being
- supported.
-
- * arm-dis.c (NUM_ELEM): Define this macro if not already
- defined.
- (arm_regname): New struct type for ARM register names.
- (arm_toggle_regnames): Delete.
- (parse_disassembler_option): Use register name structure.
- (print_insn): New function: Combines duplicate code found in
- print_insn_big_arm and print_insn_little_arm.
- (print_insn_big_arm): Call print_insn.
- (print_insn_little_arm): Call print_insn.
- (print_arm_disassembler_options): Display list of supported,
- ARM specific disassembler options.
-
-2000-01-27 Thomas de Lellis <tdel@windriver.com>
-
- * arm-dis.c (printf_insn_big_arm): Treat ELF symbols with the
- ARM_STT_16BIT flag as Thumb code symbols.
-
- * arm-dis.c (printf_insn_little_arm): Ditto.
-
-2000-01-25 Thomas de Lellis <tdel@windriver.com>
-
- * arm-dis.c (printf_insn_thumb): Prevent double dumping
- of raw thumb instructions.
-
-2000-01-20 Nick Clifton <nickc@cygnus.com>
-
- * mcore-opc.h (mcore_table): Add "add" as an alias for "addu".
-
-2000-01-03 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c (streq): New macro.
- (strneq): New macro.
- (force_thumb): ew local variable.
- (parse_disassembler_option): New function: Parse a single, ARM
- specific disassembler command line switch.
- (parse_disassembler_option): Call parse_disassembler_option to
- parse individual command line switches.
- (print_insn_big_arm): Check force_thumb.
- (print_insn_little_arm): Check force_thumb.
-
-1999-12-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c (grps[]): Correct GRP5 FF/3 from "call" to "lcall".
-
-Wed Dec 1 03:34:53 1999 Jeffrey A Law (law@cygnus.com)
-
- * m10300-opc.c, m10300-dis.c: Add am33 support.
-
-Wed Nov 24 20:29:58 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-dis.c (unit_cond_names): Add PA2.0 unit condition names.
- (print_insn_hppa): Handle 'B' operand.
-
-1999-11-22 Nick Clifton <nickc@cygnus.com>
-
- * d10v-opc.c: Fix pattern for "cpfg,f{0|1},c" instruction.
+ 2001-02-20 H.J. Lu <hjl@gnu.org>
+ * Makefile.am (ia64-ic.tbl): Remove the target.
+ (ia64-raw.tbl): Likewise.
+ (ia64-waw.tbl): Likewise.
+ (ia64-war.tbl): Likewise.
+ (ia64-asmtab.c): Generate it in the source directory.
+ * Makefile.in: Regenerated.
-1999-11-18 Gavin Romig-Koch <gavin@cygnus.com>
+ 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * mips-dis.c (print_insn_arg): Use top four bits of the address of
+ the following instruction not of the jump itself for the jump
+ target.
+ (print_mips16_insn_arg): Likewise.
- * mips-opc.c (I5): New.
- (abs.ps,add.ps,alnv.ps,c.COND.ps,cvt.s.pl,cvt.s.pu,cvt.ps.s
- madd.ps,movf.ps,movt.ps,mul.ps,net.ps,nmadd.ps,nmsub.ps,
- pll.ps,plu.ps,pul.ps,puu.ps,sub.ps,suxc1,luxc1): New.
+ 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+ * Makefile.am (stamp-lib): ranlib the libopcodes.a in the build
+ directory.
+ * Makefile.in: Regenerate.
-Mon Nov 15 19:34:58 1999 Donald Lindsay <dlindsay@cygnus.com>
+2001-06-07 Alan Modra <amodra@bigpond.net.au>
- * arm-dis.c (print_insn_arm): Added general purpose 'X' format.
- * arm-opc.h (print_insn_arm): Added comment documenting
- the 'X' format just added to arm-dis.c.
+ * Many files: Update copyright notices.
-1999-11-15 Gavin Romig-Koch <gavin@cygnus.com>
+2001-05-23 Alan Modra <amodra@one.net.au>
- * mips-opc.c (la): Create a version that just uses addiu directly.
- (dla): Expand to daddiu if possible.
+ * arc-opc.c: Whitespace changes.
-1999-11-11 Nick Clifton <nickc@cygnus.com>
+ Merge from mainline
+ 2001-05-12 Peter Targett <peter.targett@arccores.com>
+ * arc-opc.c (arc_reg_names): Correct attribute for lp_count
+ register to r/w. Formatting fixes throughout file.
- * mips-opc.c: Add ssnop pattern.
+2001-05-12 Alan Modra <amodra@one.net.au>
-1999-11-01 Gavin Romig-Koch <gavin@cygnus.com>
+ * i386-dis.c (prefix_user_table): Correct movq2dq, movdq2q, and
+ movq operands.
+ (twobyte_has_modrm): Update table.
+ (need_modrm): Give it file scope.
+ (MODRM_CHECK): Define.
+ (dofloat): Use MODRM_CHECK.
+ (OP_E): Likewise.
+ (OP_EM): Likewise.
+ (OP_EX): Likewise.
- * mips-dis.c (_print_insn_mips): Use OPCODE_IS_MEMBER.
+2001-05-04 Alan Modra <amodra@one.net.au>
-1999-10-29 Nick Clifton <nickc@cygnus.com>
+ * i386-dis.c (Ev, Ed): Remove duplicate define.
+ (Gd): Define.
+ (XS): Define.
+ (OP_XS): New function.
+ (dis386_twobyte_att): Correct pinsrw, pextrw, pmovmskb, and
+ movmskp operands.
+ (dis386_twobyte_intel): Likewise.
+ (prefix_user_table): Use MS for maskmovq operand.
- * d30v-opc.c (mvtacc): Use format SHORT_AR not SHORT_AA
- (d30v_format_tab): Define the SHORT_AR format.
+ Merge mainline: 2001-04-06 Andreas Jaeger <aj@suse.de>
+ * i386-dis.c: Add ffreep instruction.
-1999-10-28 Nick Clifton <nickc@cygnus.com>
+2001-03-30 Alexandre Oliva <aoliva@redhat.com>
- * mcore-dis.c: Remove spurious code introduced in previous delta.
+ * ppc-opc.c (insert_mbe): Shift mask initializer as long.
-1999-10-27 Scott Bambrough <scottb@netwinder.org>
+2001-03-24 Alan Modra <alan@linuxcare.com.au>
- * arm-dis.c: Include sysdep.h to prevent compile time warnings.
+ * i386-dis.c (PREGRP25): Define.
+ (dis386_twobyte_att): Use here in place of "movntq" entry.
+ (dis386_twobyte_intel): Likewise.
+ (prefix_user_table): Add PREGRP25 entry for "movntq" and "movntdq".
+ (PREGRP26): Define.
+ (dis386_twobyte_att): Use here.
+ (dis386_twobyte_intel): Likewise.
+ (prefix_user_table): Add PREGRP26 entry for "punpcklqdq".
+ (prefix_user_table <maskmovdqu>): XM operand, not MX.
+ (prefix_user_table): Cosmetic changes to "bad" entries.
-1999-10-18 Michael Meissner <meissner@cygnus.com>
+2001-03-22 Alan Modra <alan@linuxcare.com.au>
- * alpha-opc.c (alpha_operands): Fill in missing initializer.
- (alpha_num_operands): Convert to unsigned.
- (alpha_num_opcodes): Ditto.
- (insert_rba): Declare unused arguments ATTRIBUTE_UNUSED.
- (insert_rca): Ditto.
- (insert_za): Ditto.
- (insert_zb): Ditto.
- (insert_zc): Ditto.
- (extract_bdisp): Ditto.
- (extract_jhint): Ditto.
- (extract_ev6hwjhint): Ditto.
+ * i386-dis.c (dis386_twobyte_att): Add entries for paddq, psubq.
+ (dis386_twobyte_intel): Likewise.
+ (twobyte_has_modrm): Set entry for paddq, psubq.
-Sun Oct 10 01:48:01 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org>
+2001-03-19 Jim Wilson <wilson@redhat.com>
- * hppa-dis.c (print_insn_hppa): Add new codes 'cc', 'cd', 'cC',
- 'co', '@'.
+ * ia64-gen.c (fetch_insn_class): If xsect, then ignore comment and
+ notestr if larger than xsect.
+ (in_class): Handle format M5.
+ * ia64-asmtab.c: Regnerate.
- * hppa-dis.c (print_insn_hppa): Removed unused args. Fix '?W'.
+2001-03-19 John David Anglin <dave@hiauly1.hia.nrc.ca>
- * hppa-dis.c (print_insn_hppa): Implement codes "?N", "?Q".
+ * vax-dis.c (print_insn_vax): Only fetch two bytes if the info buffer
+ has more than one byte left to read.
-Thu Oct 7 00:12:43 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
+2001-02-23 David Mosberger <davidm@hpl.hp.com>
- * d10v-opc.c (d10v_operands): Add RESTRICTED_NUM3 flag for
- rac/rachi instructions.
- (d10v_opcodes): Added seven new instructions ld, ld2w, sac, sachi,
- slae, st and st2w.
+ * ia64-opc-a.c: Add missing pseudo-ops for "cmp" and "cmp4".
+ * ia64-asmtab.c: Regenerate.
-1999-10-04 Doug Evans <devans@casey.cygnus.com>
+2001-02-21 David Mosberger <davidm@hpl.hp.com>
- * fr30-asm.c,fr30-desc.h: Rebuild.
- * m32r-asm.c,m32r-desc.c,m32r-desc.h: Rebuild. Add m32rx support.
- * m32r-dis.c,m32r-ibld.c,m32r-opc.c,m32r-opc.h,m32r-opinst.c: Ditto.
+ * ia64-opc-d.c (ia64_opcodes_d): Break the "add" pattern into two
+ separate variants: one for IMM22 and the other for IMM14.
+ * ia64-asmtab.c: Regenerate.
+
+2001-02-14 Jim Wilson <wilson@redhat.com>
-1999-09-29 Nick Clifton <nickc@cygnus.com>
+ * ia64-ic.tbl: Update from Intel. Add setf to fr-writers.
+ * ia64-asmtab.c: Regenerate.
- * sh-opc.h: Fix bit patterns for several load and store
- instructions.
+Mon Feb 12 17:38:59 CET 2001 Jan Hubicka <jh@suse.cz>
-Thu Sep 23 08:27:20 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org
+ * i386-dis.c (prefix_user_t): Add 'Y' to SSE ineger converison
+ instructions.
+ (putop): Handle 'Y'
- * hppa-dis.c (print_insn_hppa): Replace 'B', 'M', 'g' and 'l' with
- cleaner code using completer prefixes. Add 'Y'.
+2001-02-05 Jim Wilson <wilson@redhat.com>
-Sun Sep 19 10:41:27 1999 Jeffrey A Law (law@cygnus.com)
+ * ia64-asmtab.c: Revert 2000-12-16 change.
- * hppa-dis.c: (print_insn_hppa): Correct 'cJ', 'cc'.
+Thu Feb 1 16:41:58 MET 2001 Jan Hubicka <jh@suse.cz>
- * hppa-dis.c (extract_22): New function.
+ * i387-dis.c (dis386_att, grps): Use 'T' for push/pop
+ (putop): Handle 'T', alphabetize order, fix 'I' handling in Intel syntax
- * hppa-dis.c (print_insn_hppa): Handle 'J', 'K', and 'cc'.
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
- * hppa-dis.c (print_insn_hppa): Handle 'fe' and 'cJ'.
+ * hppa-dis.c (print_insn_hppa): Handle '>' and '<' arg types.
- * hppa-dis.c (print_insn_hppa): Handle '#', 'd', and 'cq'.
+2001-01-13 Nick Clifton <nickc@redhat.com>
- * hppa-dis.c (print_insn_hppa): Handle 'm', 'h', '='.
+ * disassemble.c: Remove spurious white space.
- * hppa-dis.c (print_insn_hppa): Handle 'X' operand.
+Sat Jan 13 01:48:24 MET 2001 Jan Hubicka <jh@suse.cz>
- * hppa-dis.c (print_insn_hppa): Handle 'B' operand.
+ * i386-dis.c (dis386_att, disx86_64_att): Fix ret, lret and iret
+ templates.
- * hppa-dis.c (print_insn_hppa): Handle 'M' and 'L' operands.
+2001-01-11 Peter Targett <peter.targett@arccores.com>
- * hppa-dis.c (print_insn_hppa): Handle 'l' operand.
+ * configure.in: Add arc-ext.lo for bfd_arc_arch selection.
+ * Makefile.am (C_FILES): Add arc-ext.c.
+ (ALL_MACHINES) Add arc-ext.lo.
+ (INCLUDES) Add opcode directory to list.
+ New dependency entry for arc-ext.lo.
+ * disassemble.c (disassembler): Correct call to
+ arc_get_disassembler.
+ * arc-opc.c: New update for ARC, including full base
+ instructions for ARC variants.
+ * arc-dis.h, arc-dis.c: New update for ARC, including
+ extensibility functionality.
+ * arc-ext.h, arc-ext.c: New files for handling extensibility.
- * hppa-dis.c (print_insn_hppa): Handle 'g' operand.
+2001-01-10 Jan Hubicka <jh@suse.cz>
-Sat Sep 18 11:36:12 1999 Jeffrey A Law (law@cygnus.com)
+ * i386-dis.c (PREGRP15 - PREGRP24): New.
+ (dis386_twobyt): Add SSE2 instructions.
+ (twobyte_uses_SSE_prefix: Rename from ... ; add new SSE instructions.
+ (twobyte_uses_f3_prefix): ... this one.
+ (grps): Add SSE instructions.
+ (prefix_user_table): Add two new slots; add SSE2 instructions.
+ (print_insn_i386): Rename uses_f3_prefix to uses_SSE_prefix;
+ Handle the REPNZ and Data16 prefixes as well; do proper lookup
+ to prefix_user_table.
+ (OP_E): Accept mfence and lfence as well.
+ (OP_MMX): Data16 prefix turns MMX to SSE; support REX extensions.
+ (OP_XMM): Support REX extensions.
+ (OP_EM): Likewise.
+ (OP_EX): Likewise.
- * hppa-dis.c (print_insn_hppa): Output a space after 'X' completer.
+2001-01-09 Nick Clifton <nickc@redhat.com>
- * hppa-dis.c: (print_insn_hppa): Do output a space before a 'v'
- operand.
+ * arm-dis.c (print_insn): Set pc to zero for instructions with
+ a reloc associated with them.
- * hppa-dis.c: (print_insn_hppa): Handle 'fX'.
+2001-01-09 Jeff Johnston <jjohnstn@redhat.com>
- * hppa-dis.c: (print_insn_hppa): Add missing break after
- FP register case.
+ * cgen-asm.in (parse_insn_normal): Changed syn to be
+ CGEN_SYNTAX_CHAR_TYPE. Changed all references to *syn
+ as character to use CGEN_SYNTAX_CHAR macro and all comparisons
+ to '\0' to use 0 instead.
+ * cgen-dis.in (print_insn_normal): Ditto.
+ * cgen-ibld.in (insert_insn_normal, extract_insn_normal): Ditto.
- * hppa-dis.c: Finish constifying various completers, register
- names, etc etc.
+2001-01-05 Jan Hubicka <jh@suse.cz>
-1999-09-14 Michael Meissner <meissner@cygnus.com>
+ * i386-dis.c: Add x86_64 support.
+ (rex): New static variable.
+ (REX_MODE64, REX_EXTX, REX_EXTY, REX_EXTZ): New constants.
+ (USED_REX): New macro.
+ (Ev, Ed, Rm, Iq, Iv64, Cm, Dm, Rm*, Ob64, Ov64): New macros.
+ (OP_I64, OP_OFF64, OP_IMREG): New functions.
+ (OP_REG, OP_OFF): Declare.
+ (get64, get32, get32s): New functions.
+ (r??_reg): New constants.
+ (dis386_att): Change templates of instruction implicitly promoted
+ to 64bit; change e?? to RMe?? for unwind RM byte instructions.
+ (grps): Likewise.
+ (dis386_intel): Likewise.
+ (dixx86_64_att): New table based on dis386_att.
+ (dixx86_64_intel): New table based on dis386_intel.
+ (names64, names8rex): New global variable.
+ (names32, names16): Add extended registers.
+ (prefix_user_t): Recognize rex prefixes.
+ (prefix_name): Print REX prefixes nicely.
+ (op_riprel): New global variable.
+ (start_pc): Set type to bfd_vma.
+ (print_insn_i386): Detect the 64bit mode and use proper table;
+ move ckprefix after initializing the buffer; output unused rex prefixes;
+ output information about target of RIP relative addresses.
+ (putop): Support 'O' and 'I'. Update handling of "P', 'Q', 'R' and 'S';
+ (print_operand_value): New function.
+ (OP_E, OP_G, OP_REG, OP_I, OP_J, OP_DIR, OP_OFF, OP_D): Add support for
+ REX prefix and new modes.
+ (get64, get32s): New.
+ (get32): Return bfd_signed_vma type.
+ (set_op): Initialize the op_riprel.
+ * disassemble.c (disassembler): Recognize the x86-64 disassembly.
+
+2001-01-03 Richard Sandiford <r.sandiford@redhat.com>
+
+ cgen-dis.in (read_insn): Use bfd_get_bits()
+
+2001-01-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * cgen-dis.c (hash_insn_array): Use bfd_put_bits().
+ (hash_insn_list): Likewise
+ * cgen-ibld.in (insert_1): Use bfd_put_bits() and bfd_get_bits().
+ (extract_1): Use bfd_get_bits().
+ (extract_normal): Apply sign extension to both extraction
+ methods.
+ * cgen-opc.c (cgen_get_insn_value): Use bfd_get_bits()
+ (cgen_put_insn_value): Use bfd_put_bits()
+
+2000-12-28 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen-asm.in (parse_insn_normal): Print better error message for
+ instructions with missing operands.
+
+2000-12-21 Santeri Paavolainen <santtu@ssh.com>
+
+ * cgen-opc.c: Include alloca.h if HAVE_ALLOCA_H is defined.
+
+2000-12-16 Nick Clifton <nickc@redhat.com>
- * configure.in (Canonicalization of target names): Remove adding
- ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
- generates $ac_config_sub with a ${CONFIG_SHELL} already.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure.in: Add spacing.
* configure: Regenerate.
+ * ia64-asmtab.c: Regenerate.
+ * po/opcodes.pot: Regenerate.
-Tue Sep 7 13:50:32 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-dis.c (print_insn_hppa): Escape '%' in output strings.
-
- * hppa-dis.c (print_insn_hppa): Handle 'Z' argument.
-
-1999-09-07 Nick Clifton <nickc@cygnus.com>
-
- * sh-opc.h: Add mulu.w and muls.w patterns. These are the correct
- names for the mulu and muls patterns.
-
-1999-09-04 Steve Chamberlain <sac@pobox.com>
-
- * pj-opc.c: New file.
- * pj-dis.c: New file.
- * disassemble.c (disassembler): Handle bfd_arch_pj.
- * configure.in: Handle bfd_pj_arch.
- * Makefile.am: Rebuild dependencies.
- (CFILES): Add pj-dis.c and pj-opc.c.
- (ALL_MACHINES): Add pj-dis.lo and pj-opc.lo.
- * configure, Makefile.in: Rebuild.
-
-1999-09-04 H.J. Lu <hjl@gnu.org>
-
- * i386-dis.c (print_insn_i386): Set bytes_per_line to 7.
-
-Mon Aug 30 18:56:14 1999 Richard Henderson <rth@cygnus.com>
-
- * alpha-opc.c (fetch, fetch_m, ecb, wh64): RA must be R31.
+2000-12-12 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen-asm.in (@arch@_cgen_assemble_insn): Prefer printing insert-time
+ error messages over later parse-time ones.
+
+2000-12-12 Jim Wilson <wilson@redhat.com>
+
+ * ia64-dis.c (print_insn_ia64): Cast away const on ia64_free_opcode
+ argument.
+ * ia64-gen.c (insert_deplist): Cast sizeof result to int.
+ (print_dependency_table): Print NULL if semantics field not set.
+ (insert_opcode_dependencies): Mark cmp parameter as unused.
+ (print_main_table): Use fprintf_vma to print long long fields.
+ (main): Mark argv paramter as unused. Convert to old style definition.
+ * ia64-opc.c (ia64_find_dependency): Cast sizeof result to int.
+ * ia64-asmtab.c: Regnerate.
-1999-08-04 Doug Evans <devans@casey.cygnus.com>
+2000-12-09 Nick Clifton <nickc@redhat.com>
- * fr30-asm.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c: Rebuild.
- * m32r-asm.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c: Rebuild.
- * m32r-opinst.c: Rebuild.
+ * m32r-dis.c (print_insn): Prevent re-read of instruction from
+ wrong address.
-Sat Aug 28 00:27:24 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+ * fr30-dis.c: Regenerate.
- * hppa-dis.c (print_insn_hppa): Replace 'f' by 'v'. Prefix float
- register args by 'f'.
+2000-12-08 Peter Targett <peter.targett@arccores.com>
- * hppa-dis.c (print_insn_hppa): Add args q, %, !, and |.
+ * configure.in: Add arc-ext.lo for bfd_arc_arch selection.
+ * Makefile.am (C_FILES): Add arc-ext.c.
+ (ALL_MACHINES) Add arc-ext.lo.
+ (INCLUDES) Add opcode directory to list.
+ New dependency entry for arc-ext.lo.
+ * disassemble.c (disassembler): Correct call to
+ arc_get_disassembler.
+ * arc-opc.c: New update for ARC, including full base
+ instructions for ARC variants.
+ * arc-dis.h, arc-dis.c: New update for ARC, including
+ extensibility functionality.
+ * arc-ext.h, arc-ext.c: New files for handling extensibility.
- * hppa-dis.c (MASK_10, read_write_names, add_compl_names,
- extract_10U_store): New.
- (print_insn_hppa): Add new completers.
+2000-12-03 Chris Demetriou cgd@sibyte.com
- * hppa-dis.c (signed_unsigned_names,mix_half_names,
- saturation_names): New.
- (print_insn_hppa): Add completer codes 'a', 'ch', 'cH', 'cS', and 'c*'.
+ * mips-opc.c (mips_builtin_opcodes): Use the WR_HILO, RD_HILO,
+ MOD_HILO, and MOD_LO macros.
- * hppa-dis.c (print_insn_hppa): Place completers behind prefix 'c'.
+ * mips-opc.c (M1, M2): Delete.
+ (mips_builtin_opcodes): Remove all uses of M1.
- * hppa-dis.c (print_insn_hppa): Add cases for '.', '~'. '$'. and '!'
+ * mips-opc.c (mips_builtin_opcodes): Make the dmfc2 and dmtc2
+ instructions take "G" format second operands and use the
+ correct flags.
+ There are mfc3 and mtc3 opcodes, so add dmfc3 and dmtc3 opcodes to
+ match.
+ Delete "sel" code operands from mfc1 and mtc1.
+ Add MIPS64 opcode changes (dclo, dclz), and "sel" code variants
+ for dm[ft]c[023].
- * hppa-dis.c (print_insn_hppa): Look at next arg instead of bits
- to decide to print a space.
+2000-12-03 Ed Satterthwaite ehs@sibyte.com and
+ Chris Demetriou cgd@sibyte.com
-1999-08-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * mips-opc.c (mips_builtin_opcodes): Finish additions
+ for MIPS32 support, and clean up existing entries for
+ aesthetics, consistency with the MIPS32 ISA, and
+ with consistency the rest of the table.
- * i386-dis.c: Add AMD athlon instruction support.
+2000-12-01 Nick Clifton <nickc@redhat.com>
-1999-08-10 Ian Lance Taylor <ian@zembu.com>
+ * mips16-opc.c (mips16_opcodes): Add initialiser for membership
+ field.
- From Wally Iimura <iimura@microunity.com>:
- * dis-buf.c (buffer_read_memory): Rewrite expression to avoid
- overflow at end of address space.
- (generic_print_address): Use sprintf_vma.
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
-1999-08-08 Ian Lance Taylor <ian@zembu.com>
+ mips-dis.c (print_insn_arg): Handle new 'U' and 'J' argument
+ specifiers. Update 'B' for new constant names, and remove
+ 'm'.
+ mips-opc.c (mips_builtin_opcodes): Place "pref" and "ssnop"
+ near the top of the array, so they are disassembled properly.
+ Enable "ssnop" for MIPS32. Add "break" variant with 20 bit
+ code for MIPS32. Update "clo" and "clz" to use 'U' operand
+ specifier. Add 'H' format specifier variants for "mfc1,"
+ "mfc2," "mfc3," "mtc1," "mtc2," and "mtc3" for MIPS32. Update
+ MIPS32 "sdbbp" to use 'B' operand specifier. Add MIPS32
+ "wait" variant which uses 'J' operand specifier.
- * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
- MKDEP. Rebuild dependencies.
- * Makefile.in: Rebuild.
+ * mips-dis.c (set_mips_isa_type): Update to use
+ CPU_UNKNOWN and ISA_* constants. Add bfd_mach_mips32 case.
+ Replace bfd_mach_mips4K with bfd_mach_mips32_4k case.
+ * mips-opc.c (I32): New constant for instructions added in
+ MIPS32.
+ (P4): Delete.
+ (mips_builtin_opcodes) Replace all uses of P4 with I32.
-Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+ * mips-dis.c (set_mips_isa_type): Add cases for
+ bfd_mach_mips5 and bfd_mach_mips64.
+ * mips-opc.c (I64): New definitions.
- * hppa-dis.c (compare_cond_64_names, cmpib_cond_64_names,
- add_cond_64_names, wide_add_cond_names, logical_cond_64_names,
- unit_cond_64_names, shift_cond_64_names, bb_cond_64_names): New.
- (print_insn_hppa): Add 64 bit condition completers.
+ * mips-dis.c (set_mips_isa_type): Add case for
+ bfd_mach_mips_sb1.
-Thu Aug 5 16:59:58 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
- * hppa-dis.c (print_insn_hppa): Change condition args to use
- '?' prefix.
+ * sh-dis.c (print_insn_ddt): Make insn_x, insn_y unsigned.
+ (print_insn_ppi): Make nib1, nib2, nib3 unsigned.
+ Initialize variable dc to NULL.
+ (print_insn_shx): Remove unused label d_reg_n.
-Wed Jul 28 04:33:58 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+2000-11-24 Nick Clifton <nickc@redhat.com>
- * hppa-dis.c (print_insn_hppa): Remove unnecessary test in 'E'
- code.
+ * arm-opc.h: Add new opcode formatting parameter 'B'.
+ (arm_opcodes): Add XScale, v5, and v5te instructions.
+ (thumb_opcodes): Add v5t instructions.
-1999-07-21 Ian Lance Taylor <ian@zembu.com>
+ * arm-dis.c (print_insn_arm): Handle new 'B' format
+ parameter.
+ (print_insn_thumb): Decode BLX(1) instruction.
- From Mark Elbrecht:
- * configure.bat: Remove; obsolete.
+2000-11-21 Chris Demetriou <cgd@sibyte.com>
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
+ * mips-opc.c: Fix file header comment.
- * dis-buf.c: Add ATTRIBUTE_UNUSED as appropriate.
- (generic_strcat_address): Add cast to avoid warning.
- * i386-dis.c: Initialize all structure fields to avoid warnings.
- Add ATTRIBUTE_UNUSED as appropriate.
+2000-11-14 Hans-Peter Nilsson <hp@axis.com>
-1999-07-08 Jakub Jelinek <jj@ultra.linux.cz>
+ * cris-dis.c (cris_get_disassembler): If abfd is NULL, return
+ print_insn_cris_with_register_prefix.
- * sparc-dis.c (print_insn_sparc): Differentiate between
- addition and oring when guessing symbol for comment.
+2000-11-11 Alexandre Oliva <aoliva@redhat.com>
-1999-07-05 Nick Clifton <nickc@cygnus.com>
+ * sh-opc.h: The operand of `mov.w r0, (<disp>,GBR)' is IMM1, not 0.
- * arm-dis.c (print_insn_arm): Display hex equivalent of rotated
- constant.
+2000-11-07 Matthew Green <mrg@redhat.com>
-1999-06-23 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * cgen-dis.in (print_insn): All insns which can fit into insn_value
+ must be loaded there in their entirety.
- * i386-dis.c: Mention intel mode specials in macro char comment.
+2000-10-20 Jakub Jelinek <jakub@redhat.com>
-1999-06-21 Ian Lance Taylor <ian@zembu.com>
+ * sparc-dis.c (v9a_asr_reg_names): Add v9b ASRs.
+ (compute_arch_mask): Add v8plusb and v9b machines.
+ (print_insn_sparc): siam mode decoding, accept ASRs up to 25.
+ * sparc-opc.c: Support for Cheetah instruction set.
+ (prefetch_table): Add #invalidate.
- * alpha-dis.c: Don't include <stdlib.h>.
- * arm-dis.c: Include "sysdep.h".
- * tic30-dis.c: Don't include <stdlib.h> or <string.h>. Include
- "sysdep.h".
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
+2000-10-16 Nick Clifton <nickc@redhat.com>
-1999-06-16 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c (print_insn_arm): Add detection of IMB and IMBRange
- SWIs.
-
-1999-06-14 Nick Clifton <nickc@cygnus.com> & Drew Mosley <dmoseley@cygnus.com>
-
- * arm-dis.c (arm_regnames): Turn into a pointer to a register
- name set.
- (arm_regnames_standard): New variable: Array of ARM register
- names according to ARM instruction set nomenclature.
- (arm_regnames_apcs): New variable: Array of ARM register names
- according to ARM Procedure Call Standard.
- (arm_regnames_raw): New variable: Array of ARM register names
- using just 'r' and the register number.
- (arm_toggle_regnames): New function: Toggle the chosen register set
- naming scheme.
- (parse_disassembler_options): New function: Parse any target
- disassembler command line options.
- (print_insn_big_arm): Call parse_disassembler_options if any
- are defined.
- (print_insn_little_arm): Call parse_disassembler_options if any
- are defined.
-
-1999-06-13 Ian Lance Taylor <ian@zembu.com>
-
- * i386-dis.c (FWAIT_OPCODE): Define.
- (used_prefixes): New static variable.
- (fetch_data): Don't print an error message if we have already
- fetched some bytes successfully.
- (ckprefix): Clear used_prefixes. Use FWAIT_OPCODE, not 0x9b.
- (prefix_name): New static function.
- (print_insn_i386): If setjmp fails, indicating a data error, but
- we have managed to fetch some bytes, print the first one as a
- prefix or a .byte pseudo-op. If fwait is followed by a non
- floating point instruction, print the first prefix. Set
- used_prefixes when prefixes are used. If any prefixes were not
- used after disassembling the instruction, print the first prefix
- instead of printing the instruction.
- (putop): Set used_prefixes when prefixes are used.
- (append_seg, OP_E, OP_G, OP_REG, OP_I, OP_sI, OP_J): Likewise.
- (OP_DIR, OP_SIMD_Suffix): Likewise.
-
-1999-06-07 Jakub Jelinek <jj@ultra.linux.cz>
-
- * sparc-opc.c: Fix up set, setsw, setuw operand kinds.
- Support signx %reg, clruw %reg.
-
-1999-06-07 Jakub Jelinek <jj@ultra.linux.cz>
-
- * sparc-opc.c: Add aliases Solaris as supports.
-
-Mon Jun 7 12:04:52 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * Makefile.am (CFILES): Add arc-{dis,opc}.c and v850-{dis,opc}.c.
- * Makefile.in: Regenerated.
+ * mcore-dis.c (imsk): Change mask for OC to 0xFE00.
-1999-06-03 Philip Blundell <philb@gnu.org>
-
- * arm-dis.c (print_insn_arm): Make LDRH/LDRB consistent with LDR
- when target is PC-relative.
-
-1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
-
- * m68k-opc.c: Rename MACL/MSACL to MAC/MSAC. Add MACM/MSACM. Add
- MOVE MACSR,CCR.
-
- * m68k-dis.c (fetch_arg): Add places `n', `o'.
-
- * m68k-opc.c: Add MSAC, MACL, MOVE to/from ACC, MACSR, MASK.
- Add mcf5206e to appropriate instructions.
- Add alias for MAC, MSAC.
-
- * m68k-dis.c (print_insn_arg): Add formats `E', `G', `H' and place
- `N'.
-
- * m68k-opc.c (m68k_opcodes): Add divsw, divsl, divuw, divul, macl,
- macw, remsl, remul for mcf5307. Change mcf5200 --> mcf.
-
- * m68k-dis.c: Add format `u' and places `h', `m', `M'.
-
-1999-05-18 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c (Ed): Define.
- (dis386_twobyte_att, dis386_twobyte_intel): Use Ed for movd.
- (Rw): Remove.
- (OP_rm): Rename to OP_Rd.
- (ONE): Remove.
- (OP_ONE): Remove.
- (putop): Add const to template and p.
- (print_insn_x86): Delete.
- (print_insn_i386): Merge old function print_insn_x86. Add const
- to dp.
- (struct dis386): Add const to name.
- (dis386_att, dis386_intel): Add const.
- (dis386_twobyte_att, dis386_twobyte_intel): Add const.
- (names32, names16, names8, names_seg, index16): Add const.
- (grps, prefix_user_table, float_reg): Add const.
- (float_mem_att, float_mem_intel): Add const.
- (oappend): Add const to s.
- (OP_REG): Add const to s.
- (ptr_reg): Add const to s.
- (dofloat): Add const to dp.
- (OP_C): Don't skip modrm, it's now done in OP_Rd.
- (OP_D): Ditto.
- (OP_T): Ditto.
- (OP_Rd): Check for valid mod. Call Op_E to print.
- (OP_E): Handle d_mode arg. Check for bad sfence,lea,lds etc.
- (OP_MS): Check for valid mod. Call Op_EM to print.
- (OP_3DNowSuffix): Set obufp and use oappend rather than
- strcat. Call BadOp() for errors.
- (OP_SIMD_Suffix): Likewise.
- (BadOp): New function.
-
-1999-05-12 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c (dis386_intel): Remove macro chars, except for
- jEcxz. Change cWtR and cRtd to cW and cR.
- (dis386_twobyte_intel): Remove macro chars here too.
- (putop): Handle R and W macros for intel mode.
-
- * i386-dis.c (SIMD_Fixup): New function.
- (dis386_twobyte_att): Use it on movlps and movhps, and change
- Ev to EX on these insns. Change movmskps Ev, XM to Gv, EX.
- (dis386_twobyte_intel): Same here.
-
- * i386-dis.c (Av): Remove.
- (Ap): remove lptr.
- (lptr): Remove.
- (OPSIMD): Define.
- (OP_SIMD_Suffix): New function.
- (OP_DIR): Remove dead code.
- (eAX_reg..eDI_reg): Renumber.
- (onebyte_has_modrm): Table numbering comments.
- (INTERNAL_DISASSEMBLER_ERROR): Move to before print_insn_x86.
- (print_insn_x86): Move all prefix oappends to after uses_f3_prefix
- checks. Print error on invalid dp->bytemode2. Remove simd_cmp,
- and handle SIMD cmp insns in OP_SIMD_Suffix.
- (info->bytes_per_line): Bump from 5 to 6.
- (OP_None): Remove.
- (OP_E): Use INTERNAL_DISASSEMBLER_ERROR. Handle sfence.
- (OP_3DNowSuffix): Ensure mnemonic index unsigned.
-
- PIII SIMD support from Doug Ledford <dledford@redhat.com>
- * i386-dis.c (XM, EX, None): Define.
- (OP_XMM, OP_EX, OP_None): New functions.
- (USE_GROUPS, USE_PREFIX_USER_TABLE): Define.
- (GRP14): Rename to GRPAMD.
- (GRP*): Add USE_GROUPS flag.
- (PREGRP*): Define.
- (dis386_twobyte_att, dis386_twobyte_intel): Add SIMD insns.
- (twobyte_has_modrm): Add SIMD entries.
- (twobyte_uses_f3_prefix, simd_cmp_op, prefix_user_table): New.
- (grps): Add SIMD insns.
- (print_insn_x86): New vars uses_f3_prefix and simd_cmp. Don't
- oappend repz if uses_f3_prefix. Add code to handle new groups for
- SIMD insns.
-
- From Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- * i386-dis.c (dis386_att, dis386_intel): Change 0xE8 call insn
- operand from Av to Jv.
-
-1999-05-07 Nick Clifton <nickc@cygnus.com>
-
- * mcore-dis.c (print_insn_mcore): Use .short to display
- unidentified instructions, not .word.
-
-1999-04-26 Tom Tromey <tromey@cygnus.com>
-
- * aclocal.m4, configure: Updated for new version of libtool.
-
-1999-04-14 Doug Evans <devans@casey.cygnus.com>
-
- * fr30-desc.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c: Rebuild.
- * m32r-desc.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c: Rebuild.
-
-Mon Apr 12 23:46:17 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-dis.c (print_insn_hppa, case '3'): New case for PA2.0
- instructions.
-
-1999-04-10 Doug Evans <devans@casey.cygnus.com>
+2000-10-06 Dave Brolley <brolley@redhat.com>
- * fr30-desc.c,fr30-desc.h,fr30-ibld.c: Rebuild.
- * m32r-desc.c,m32r-desc.h,m32r-opinst.c: Rebuild.
+ * fr30-desc.h: Regenerate.
+ * m32r-desc.h: Regenerate.
+ * m32r-ibld.c: Regenerate.
-1999-04-06 Ian Lance Taylor <ian@zembu.com>
+2000-10-05 Jim Wilson <wilson@redhat.com>
- * opintl.h (LC_MESSAGES): Never define.
+ * ia64-ic.tbl: Update from Intel.
+ * ia64-asmtab.c: Regenerate.
-1999-04-04 Ian Lance Taylor <ian@zembu.com>
+2000-10-04 Kazu Hirata <kazu@hxi.com>
- * i386-dis.c (intel_syntax, open_char, close_char): Make static.
- (separator_char, scale_char): Likewise.
- (print_insn_x86): Likewise.
- (print_insn_i386): Likewise. Add declaration.
+ * ia64-gen.c: Convert C++-style comments to C-style comments.
+ * tic54x-dis.c: Likewise.
-1999-03-26 Doug Evans <devans@casey.cygnus.com>
+2000-09-29 Hans-Peter Nilsson <hp@axis.com>
- * fr30-dis.c: Rebuild.
- * m32r-dis.c: Rebuild.
+ Changes to add dollar prefix to registers for files where user symbols
+ don't have a leading underscore. Fix formatting.
+ * cris-dis.c (REGISTER_PREFIX_CHAR): New.
+ (format_reg): Add parameter with_reg_prefix. All callers changed.
+ (print_with_operands): Ditto.
+ (print_insn_cris_generic): Renamed from print_insn_cris, add
+ parameter with_reg_prefix.
+ (print_insn_cris_with_register_prefix,
+ print_insn_cris_without_register_prefix, cris_get_disassembler):
+ New.
+ * disassemble.c (disassembler) [ARCH_cris]: Call cris_get_disassembler.
-1999-03-23 Ian Lance Taylor <ian@zembu.com>
+2000-09-22 Jim Wilson <wilson@redhat.com>
- * m68k-opc.c: Change compare instructions to use "@s" rather than
- ";s" when used with an immediate operand.
+ * ia64-opc-f.c (ia64_opcodes_f): Add fpcmp pseudo-ops for
+ gt, ge, ngt, and nge.
+ * ia64-asmtab.c: Regenerate.
-1999-03-22 Doug Evans <devans@casey.cygnus.com>
+ * ia64-dis.c (print_insn_ia64): Revert Aug 7 byte skip count change.
+ * ia64-gen.c (parse_semantics): Handle IA64_DVS_STOP.
+ (lookup_specifier): Handle "PR%, 1 to 15" and "PR%, 16 to 62".
+ * ia64-ic.tbl, ia64-raw.tbl, ia64-war.tbl, ia64-waw.tbl: Update.
+ * ia64-asmtab.c: Regnerate.
- * cgen-opc.c (cgen_set_cpu): Delete.
- (cgen_lookup_insn): max_insn_size renamed to max_insn_bitsize.
- * fr30-desc.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c,fr30-opc.h:
- Rebuild.
- * m32r-desc.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c,m32r-opc.h:
- Rebuild.
- * po/opcodes.pot: Rebuild.
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
-1999-03-16 Martin Hunt <hunt@cygnus.com>
+ * mips-opc.c (mips_builtin_opcodes): Support cache instruction on 4K cores.
+ Add mfc0 and mtc0 with sub-selection values.
+ Add clo and clz opcodes.
+ Add msub and msubu instructions for MIPS32.
+ Add madd/maddu aliases for mad/madu for MIPS32.
+ Support wait, deret, eret, movn, pref for MIPS32.
+ Support tlbp, tlbr, tlbwi, tlbwr.
+ (P4): New define.
- * d30v-opc.c (mvtsys): Remove FLAG_LKR.
+ * mips-dis.c (print_insn_arg): Print sdbbp 'm' args.
+ (print_insn_arg): Handle 'H' args.
+ (set_mips_isa_type): Recognize 4K.
+ Use CPU_* defines instead of hardcoded numbers.
-1999-03-11 Doug Evans <devans@casey.cygnus.com>
+2000-09-11 Catherine Moore <clm@redhat.com>
- * cgen-opc.c (cgen_set_cpu): New arg `isa'. All callers updated.
- (cgen_operand_lookup_by_name,cgen_operand_lookup_by_num): New fns.
- (cgen_get_insn_operands): Rewrite test for hardcoded/operand index.
- * fr30-asm.c,fr30-desc.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c: Rebuild.
- * m32r-asm.c,m32r-desc.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c: Rebuild.
- * m32r-opinst.c: Rebuild.
+ * d30v-opc.c (d30v_operand_t): New operand type Rb2.
+ (d30v_format_tab): Use Rb2 for modinc and moddec.
-1999-02-25 Doug Evans <devans@casey.cygnus.com>
+2000-09-07 Catherine Moore <clm@redhat.com>
- * cgen-opc.c (cgen_hw_lookup_by_name): Rewrite.
- (cgen_hw_lookup_by_num): Rewrite.
- * fr30-desc.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c: Rebuild.
- * m32r-desc.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c: Rebuild.
- * m32r-opinst.c: Rebuild.
+ * d30v-opc.c (d30v_format_tab): Use format Ra for
+ modinc and moddec.
-Sat Feb 13 14:06:19 1999 Richard Henderson <rth@cygnus.com>
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
- * alpha-opc.c: Add sqrt+flags patterns. Add EV6 PALcode insns.
- (insert_jhint): Fix insertion mask.
- * alpha-dis.c (print_insn_alpha): Disassemble EV6 PALcode insns.
+ * configure: Rebuilt with new libtool.m4.
-1999-02-10 Doug Evans <devans@casey.cygnus.com>
+2000-09-05 Nick Clifton <nickc@redhat.com>
- * Makefile.in: Rebuild.
-
-1999-02-09 Doug Evans <devans@casey.cygnus.com>
-
- * i960c-asm.c,i960c-dis.c,i960c-opc.c,i960c-opc.h: Delete.
- * i960-dis.c (print_insn_i960): Rename from print_insn_i960_orig.
- * Makefile.am: Remove references to them.
- (HFILES): Add fr30-desc.h,m32r-desc.h.
- (CFILES): Add fr30-desc.c,fr30-ibld.c,m32r-desc.c,m32r-ibld.c,
- m32r-opinst.c.
- (ALL_MACHINES): Update.
- * configure.in: Redo handling of cgen_files.
- (bfd_i960_arch): Delete i960c-*.lo files.
* configure: Regenerate.
- * cgen-asm.c (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
- (hash_insn_array): Rewrite.
- * cgen-dis.c (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
- (hash_insn_array): Rewrite.
- * cgen-opc.c (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
- (cgen_lookup_insn,cgen_get_insn_operands): Define here.
- (cgen_lookup_get_insn_operands): Ditto.
- * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerate.
- * m32r-asm.c,m32r-dis.c,m32r-opc.c,m32r-opc.h: Regenerate.
- * po/POTFILES.in: Rebuild.
- * po/opcodes.pot: Rebuild.
-
-Fri Feb 5 00:04:24 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am: Rebuild dependencies.
- (HFILES): Add fr30-opc.h.
- (CFILES): Add fr30-asm.c, fr30-dis.c, fr30-opc.c.
- * Makefile.in: Rebuild.
-
- * configure.in: Change AC_PREREQ to 2.13. Remove AM_CYGWIN32.
- Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to
- AC_PROG_INSTALL.
- * acconfig.h: Remove.
- * configure: Rebuild with current autoconf/automake.
- * aclocal.m4: Likewise.
- * config.in: Likewise.
- * Makefile.in: Likewise.
-
-Thu Feb 4 13:48:52 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: Correct move (not movew) to status word on 5200.
-
-Mon Feb 1 20:54:36 1999 Catherine Moore <clm@cygnus.com>
-
- * disassemble.c (disassembler): Handle bfd_mach_i386_i386_intel_syntax.
- * i386-dis.c (x_mode): Define.
- (dis386): Remove.
- (dis386_att): New.
- (dis386_intel): New.
- (dis386_twobyte): Remove.
- (dis386_twobyte_att): New.
- (dis386_twobyte_intel): New.
- (print_insn_x86): Use new arrays.
- (float_mem): Remove.
- (float_mem_intel): New.
- (float_mem_att): New.
- (dofloat): Use new float_mem arrays.
- (print_insn_i386_att): New.
- (print_insn_i386_intel): New.
- (print_insn_i386): Handle bfd_mach_i386_i386_intel_syntax.
- (putop): Handle intel syntax.
- (OP_indirE): Handle intel syntax.
- (OP_E): Handle intel syntax.
- (OP_I): Handle intel syntax.
- (OP_sI): Handle intel syntax.
- (OP_OFF): Handle intel syntax.
-
-
-
-1999-01-27 Doug Evans <devans@casey.cygnus.com>
-
- * fr30-opc.h,fr30-opc.c: Rebuild.
- * i960c-opc.h,i960c-opc.c: Rebuild.
- * m32r-opc.c: Rebuild.
-
-Tue Jan 19 18:01:54 1999 David Taylor <taylor@texas.cygnus.com>
-
- * hppa-dis.c: revert HP merge changes until HP gives us
- an updated file.
-
-1999-01-19 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c (print_insn_arm): Display ARM syntax for PC relative
- offsets as well as symbloic address.
-
-Tue Jan 19 10:51:01 1999 David Taylor <taylor@texas.cygnus.com>
-
- * hppa-dis.c: fix comments and some indentation.
-
-1999-01-12 Doug Evans <devans@casey.cygnus.com>
-
- * fr30-opc.c,i960c-opc.c: Regenerate.
-
-1999-01-11 Doug Evans <devans@casey.cygnus.com>
-
- * fr30-opc.c: Regenerate.
-
-1999-01-06 Doug Evans <devans@casey.cygnus.com>
-
- * m32r-dis.c: Regenerate.
-
-1999-01-05 Doug Evans <devans@casey.cygnus.com>
-
- * fr30-asm.c,fr30-dis.c,fr30-opc.h,fr30-opc.c: Regenerate.
- * i960c-asm.c,i960c-dis.c,i960c-opc.h,i960c-opc.c: Regenerate.
- * m32r-asm.c,m32r-dis.c,m32r-opc.h,m32r-opc.c: Regenerate.
-
-1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Require autoconf 2.12.1 or higher.
-
-1998-12-30 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips16-opc.c: Mark branch insns with MIPS16_INSN_BRANCH.
-
-Wed Dec 16 16:17:49 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-opc.c: Regenerated.
-
-1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips-dis.c (set_mips_isa_type): Handle bfd_mach_mips4111.
-
-1998-12-15 Dave Brolley <brolley@cygnus.com>
-
- * fr30-opc.c,fr30-opc.h: Regenerated.
-
-1998-12-14 Dave Brolley <brolley@cygnus.com>
-
- * fr30-opc.c,fr30-opc.h: Regenerated.
-
-Thu Dec 10 18:39:46 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-opc.c,fr30-opc.h: Regenerated.
-
-Thu Dec 10 12:49:24 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.c: Regenerate.
-
-Tue Dec 8 13:56:18 1998 David Taylor <taylor@texas.cygnus.com>
-
- * dis-buf.c (generic_strcat_address): reformat to GNU coding
- conventions. change sprintf call to an sprintf_vma call.
-
-Tue Dec 8 13:12:44 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
-
-Tue Dec 8 10:50:46 1998 David Taylor <taylor@texas.cygnus.com>
-
- The following changes were made by
- Elena Zannoni <ezannoni@kwikemart.cygnus.com>,
- David Taylor <taylor@texas.cygnus.com>, and
- Edith Epstein <eepstein@sophia.cygnus.com> as part of a project to
- merge in changes by HP; HP did not create ChangeLog entries.
-
- * dis-buf.c (generic_strcat_address): new function.
-
- * hppa-dis.c: Changes to improve hppa disassembly.
- Changed formatting in : reg_names, fp_reg_names,control_reg,
- New variables : sign_extension_names, deposit_names, conversion_names
- float_test_names, compare_cond_names_double, add_cond_names_double,
- logical_cond_names_double, unit_cond_names_double,
- branch_push_pop_names, saturation_names, shift_names, mix_names,
- New Macros : GET_COMPL_O, GET_PUSH_POP,MERGED_REG
- Move some definitions to libhppa.h: GET_FIELD, GET_BIT
- (fput_const): renamed as fput_hex_const
- (print_insn_hppa):
- - use the macros fputs_filtered and
- fput_decimal_const whenever possible; calls to sign_extend require
- 2 params -- add a missing second param of 0.
- - Some new code ifdefed for LOCAL_ONLY, all related to figuring out
- architecture version number of current machine. HP folks are
- trying to handle situation where the target program was compiled
- for PA 1.x (32-bit), but is running on a PA 2.0 machine and
- visa versa.
- - added new cases : 'g', 'B', 'm'
- - added cases specifically for PA 2.0
- - changed the following cases : '"', 'n', 'N', 'p', 'Z',
- - calls to fput_const become calls to fput_hex_const
-
-1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
-
- * Makefile.am (CFILES): Add i960c-asm, i960c-dis.c, i960c-opc.c.
- (ALL_MACHINES): Add i960c-asm.lo, i960c-dis.lo, i960-opc.lo.
- (i960-asm.lo, i960c-dis.lo, i960c-opc.lo): New Makefile rules.
- * Makefile.in: Rebuilt.
- * configure.in (bfd_i960_arch): Add i960c-opc.lo, i960-asm.o,
- i960-dis.c to ta.
- * i960-dis.c (print_insn_i960): Rename to print_insn_i960_orig.
- * i960c-asm.c, i960c-dis.c, i960c-opc.c, i960c-opc.h: New files.
-
-Mon Dec 7 14:33:44 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
-
-Sun Dec 6 14:06:48 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-opc.c (mips_builtin_opcodes): Add dmfc2 and dmtc2.
-
- * ppc-opc.c (powerpc_opcodes): Add PowerPC403 GC[X] instructions.
- From Saitoh Masanobu <msaitoh@spa.is.uec.ac.jp>.
-
-Fri Dec 4 17:45:51 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * fr30-opc.c: Regenerate.
-
-Fri Dec 4 17:08:08 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
-
-Thu Dec 3 14:26:20 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
-
-Thu Dec 3 00:09:17 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerate.
+ * po/opcodes.pot: Regenerate.
-1998-11-30 Doug Evans <devans@casey.cygnus.com>
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
- * cgen-dis.c (hash_insn_array): CGEN_INSN_VALUE ->
- CGEN_INSN_BASE_VALUE.
- * m32r-opc.c,m32r-opc.h,m32r-asm.c,m32r-dis.c: Regenerate.
- * fr30-opc.c,fr30-opc.h,fr30-asm.c,fr30-dis.c: Regenerate.
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
-Thu Nov 26 11:26:32 1998 Dave Brolley <brolley@cygnus.com>
+2000-08-30 Kazu Hirata <kazu@hxi.com>
- * fr30-asm.c,fr30-dis.c,fr30-opc.c: Regenerated.
+ * tic80-dis.c: Fix formatting.
-Tue Nov 24 11:20:54 1998 Dave Brolley <brolley@cygnus.com>
+2000-08-29 Kazu Hirata <kazu@hxi.com>
- * fr30-asm.c,fr30-dis.c: Regenerated.
+ * w65-dis.c: Fix formatting.
-Mon Nov 23 18:28:48 1998 Dave Brolley <brolley@cygnus.com>
+2000-08-28 Mark Hatle <mhatle@mvista.com>
- * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
+ * ppc-opc.c: Add XTLB macro for a few PPC 4xx extended mnemonics.
+ (powerpc_opcodes): Add table entries for PPC 405 instructions.
+ Changed rfci, icbt, mfdcr, dccci, mtdcr, iccci from PPC to PPC403
+ instructions. Added extended mnemonic mftbl as defined in the
+ 405GP manual for all PPCs.
-1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
+2000-08-28 Jim Wilson <wilson@redhat.com>
- * fr30-opc.c: Regenerated.
+ * ia64-dis.c (print_insn_ia64): Add failed label after ia64_free_opcode
+ call. Change last goto to use failed instead of done.
-Thu Nov 19 16:02:46 1998 Dave Brolley <brolley@cygnus.com>
+2000-08-28 Dave Brolley <brolley@redhat.com>
- * fr30-opc.c: Regenerated.
- * fr30-opc.h: Regenerated.
- * fr30-dis.c: Regenerated.
+ * cgen-ibld.in (cgen_put_insn_int_value): New function.
+ (insert_normal): Allow for non-zero word_offset with CGEN_INT_INSN_P.
+ (insert_insn_normal): Use cgen_put_insn_int_value with CGEN_INT_INSN_P.
+ (extract_normal): Allow for non-zero word_offset with CGEN_INT_INSN_P.
+ * cgen-dis.in (read_insn): New static function.
+ (print_insn): Use read_insn to read the insn into the buffer and set
+ up for disassembly.
+ (print_insn): in CGEN_INT_INSN_P, make sure that the entire insn is
+ in the buffer.
* fr30-asm.c: Regenerated.
-
-Thu Nov 19 07:54:15 1998 Doug Evans <devans@charmed.cygnus.com>
-
- * mips-opc.c (sync.p,sync.l): Swap insn values.
-
-1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
-
- * fr30-opc.c: Regenerate.
-
-Wed Nov 18 21:36:37 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-opc.c: Regenerated.
- * fr30-opc.h: Regenerated.
-
-1998-11-18 Doug Evans <devans@casey.cygnus.com>
-
- * m32r-asm.c,m32r-dis.c,m32r-opc.c: Rebuild.
- * fr30-asm.c,fr30-dis.c,fr30-opc.c: Rebuild.
-
-Wed Nov 18 11:30:04 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-opc.c: Regenerated.
-
-Mon Nov 16 19:21:48 1998 Dave Brolley <brolley@cygnus.com>
-
- * fr30-opc.c: Regenerated.
- * fr30-opc.h: Regenerated.
+ * fr30-desc.c: Regenerated.
+ * fr30-desc.h: Regenerated.
* fr30-dis.c: Regenerated.
- * fr30-asm.c: Regenerated.
-
-Thu Nov 12 19:24:18 1998 Dave Brolley <brolley@cygnus.com>
-
- * po/opcodes.pot: Regenerated.
+ * fr30-ibld.c: Regenerated.
* fr30-opc.c: Regenerated.
* fr30-opc.h: Regenerated.
- * fr30-dis.c: Regenerated.
- * fr30-asm.c: Regenerated.
-
-Tue Nov 10 15:26:27 1998 Nick Clifton <nickc@cygnus.com>
-
- * disassemble.c (disassembler): Add support for FR30 target.
-
-Tue Nov 10 11:00:04 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-dis.c,m32r-opc.c,m32r-opc.h: Rebuild.
- * fr30-dis.c,fr30-opc.c,fr30-opc.h: Rebuild.
-
-Mon Nov 9 18:22:55 1998 Dave Brolley <brolley@cygnus.com>
-
- * po/opcodes.pot: Regenerate.
- * po/POTFILES.in: Regenerate.
- * fr30-opc.c: Regenerate.
- * fr30-opc.h: Regenerate.
-
-Fri Nov 6 17:21:38 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-asm.c: Regenerate.
-
-Wed Nov 4 18:46:47 1998 Dave Brolley <brolley@cygnus.com>
-
- * configure.in: Added case for bfd_fr30_arch.
- * Makefile.am (CFILES): Added fr30-asm.c, fr30-dis.c, fr30-opc.c.
- (ALL_MACHINES): Added fr30-asm.lo, fr30-dis.lo, fr30-opc.lo.
- (CLEANFILES): Added stamp-fr30.
- (FR30_DEPS): Added.
- * fr30-asm.c: New file.
- * fr30-dis.c: New file.
- * fr30-opc.c: New file.
- * fr30-opc.h: New file.
- * po/POTFILES.in: Regenerated
- * po/opcodes.pot: Regenerated
-
-Mon Nov 2 15:05:33 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: detect cygwin* instead of cygwin32*
- * configure: regenerate
-
-Tue Oct 27 08:58:37 1998 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips-opc.c (IS_M): Added.
-
-Mon Oct 19 13:03:19 1998 Doug Evans <devans@seba.cygnus.com>
+ * m32r-asm.c: Regenerated.
+ * m32r-desc.c: Regenerated.
+ * m32r-desc.h: Regenerated.
+ * m32r-dis.c: Regenerated.
+ * m32r-ibld.c: Regenerated.
+ * m32r-opc.c: Regenerated.
- * m32r-opc.c,m32r-opc.h,m32r-asm.c,m32r-dis.c: Regenerate.
+2000-08-28 Kazu Hirata <kazu@hxi.com>
-Fri Oct 9 14:01:56 1998 Doug Evans <devans@seba.cygnus.com>
+ * tic30-dis.c: Fix formatting.
- * m32r-opc.h,m32r-opc.c: Regenerate.
+2000-08-27 Kazu Hirata <kazu@hxi.com>
-Sun Oct 4 21:01:44 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * sh-dis.c: Fix formatting.
- * i386-dis.c (OP_3DNowSuffix): New static function.
- (OPSUF): Define.
- (GRP14): Define.
- (dis386_twobyte): Add GRP14, femms, and 3DNow entries.
- (twobyte_has_modrm): Set entries corresponding to GRP14, 3DNow.
- (insn_codep): New static variable.
- (print_insn_x86): Init insn_codep after prefixes.
- (grps): Add GRP14 entries for prefetch, prefetchw.
- (OP_REG): Reformat.
+2000-08-24 David Edelsohn <dje@watson.ibm.com>
- From Jeff B Epler <jepler@usgs.gov>
- * i386-dis.c (Suffix3DNow): New table.
+ * ppc-opc.c (powerpc_opcodes): Add rfid, mtsrd, mtsrdin, mtmsrd.
-Wed Sep 30 10:17:50 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-24 Kazu Hirata <kazu@hxi.com>
- * d10v-opc.c: Treat TRAP as if it were a branch type instruction.
+ * z8k-dis.c: Fix formatting.
-Mon Sep 28 14:35:43 1998 Martin M. Hunt <hunt@cygnus.com>
+2000-08-16 Jim Wilson <wilson@redhat.com>
- * d10v-dis.c (print_operand): If num is nonzero, then
- add OPERAND_ACC1, not OPERAND_ACC0.
+ * ia64-ic.tbl (pr-readers-nobr-nomovpr): Add addl, adds. Delete
+ break, mov-immediate, nop.
+ * ia64-opc-f.c: Delete fpsub instructions.
+ * ia64-opc-m.c: Add POSTINC to all instructions with postincrement
+ address operand. Rewrite using macros to avoid long lines.
+ * ia64-opc.h (POSTINC): Define.
+ * ia64-asmtab.c: Regenerate.
-Thu Sep 24 09:20:03 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-15 Jim Wilson <wilson@redhat.com>
- * d30v-opc.c: Add FLAG_JSR attribute to DBT, REIT, RTD, and TRAP
- insns.
+ * ia64-ic.tbl: Add missing entries.
-Tue Sep 22 17:55:14 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-08 Jason Eckhardt <jle@redhat.com>
- * d30v-opc.c: Add use of EITHER_BUT_PREFER_MU execution unit
- class.
+ * i860-dis.c (print_br_address): Change third argument from int
+ to long.
-Tue Sep 15 15:14:45 1998 Doug Evans <devans@canuck.cygnus.com>
+2000-08-07 Richard Henderson <rth@redhat.com>
- * m32r-opc.h,m32r-opc.c: Add bbpc,bbpsw support.
+ * ia64-dis.c (print_insn_ia64): Get byte skip count correct
+ for MLI templates. Handle IA64_OPND_TGT64.
-1998-09-09 Michael Meissner <meissner@cygnus.com>
+2000-08-04 Ben Elliston <bje@redhat.com>
- * ppc-opc.c (powerpc_opcodes): Add support for PowerPC 750 move
- to/from SPRs.
+ * cgen-dis.in, cgen-asm.in, cgen-ibld.in: New files.
+ * cgen.sh: Likewise.
-Fri Sep 4 19:42:59 1998 Nick Clifton <nickc@cygnus.com>
+2000-08-02 Jim Wilson <wilson@redhat.com>
- * arm-dis.c (print_insn_big_arm): Detect Thumb symbols in elf
- object files.
- (print_insn_little_arm): Detect Thumb symbols in elf object
- files.
+ * ia64-dis.c (print_insn_ia64): Call ia64_free_opcode at end.
-Sat Aug 29 22:24:09 1998 Richard Henderson <rth@cygnus.com>
+2000-07-29 Marek Michalkiewicz <marekm@linux.org.pl>
- * alpha-dis.c (print_insn_alpha): Use the machine type to
- decide which PALcode set to include.
+ * avr-dis.c (avr_operand): Use PARAMS macro in declaration.
+ Change return type from void to int. Check the combination
+ of operands, return 1 if valid. Fix to avoid BUF overflow.
+ Report undefined combinations of operands in COMMENT.
+ Report internal errors to stderr. Output the adiw/sbiw
+ constant operand in both decimal and hex.
+ (print_insn_avr): Disassemble ldd/std with displacement of 0
+ as ld/st. Check avr_operand () return value, handle invalid
+ combinations of operands like unknown opcodes.
-Sun Aug 23 02:16:18 1998 Richard Henderson <rth@cygnus.com>
+2000-07-28 Ben Elliston <bje@redhat.com>
- * sparc-opc.c (FBRX): Fix typo in ",a,pn %fcc3" case.
-
-Fri Aug 21 16:07:52 1998 Nick Clifton <nickc@cygnus.com>
-
- * d30v-opc.c (d30v_opcode_table): Add FLAG_MUL32 to MAC, MACS,
- MSUB and MSUBS instructions.
-
-Thu Aug 13 16:23:04 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * ppc-opc.c (powerpc_operands): Omit parens around additions in
- operand name macros.
-
-Wed Aug 12 14:00:38 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>:
- * m68k-opc.c: Correct mulsl and mulul to use q rather than D, a,
- +, -, and d for ColdFire.
-
- From Peter Thiemann <thiemann@informatik.uni-tuebingen.de>:
- * ppc-opc.c (insert_mbe): Handle wrapping bitmasks.
- (extract_mbe): Likewise.
-
-Wed Aug 12 11:11:34 1998 Jeffrey A Law (law@cygnus.com)
-
- * m10300-opc.c: Fix typo in udf20 .. udf25 instruction opcodes.
-
- * m10300-opc.c: First cut at UDF instructions.
-
-Mon Aug 10 14:08:22 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.c: Regenerate (remove semantic descriptions).
-
-Mon Aug 10 12:51:12 1998 Catherine Moore <clm@cygnus.com>
-
- * arm-dis.c (print_insn_big_arm): Fix indentation.
- (print_insn_little_arm): Likewise.
-
-Sun Aug 9 20:17:28 1998 Catherine Moore <clm@cygnus.com>
-
- * arm-dis.c (print_insn_big_arm): Check for thumb symbol
- attributes.
- (print_insn_little_arm): Likewise.
-
-Mon Aug 3 12:43:16 1998 Doug Evans <devans@seba.cygnus.com>
-
- Move all global state data into opcode table struct, and treat
- opcode table as something that is "opened/closed".
- * cgen-asm.c (all fns): New first arg of opcode table descriptor.
- (cgen_asm_init): Delete.
- (cgen_set_parse_operand_fn): New function.
- * cgen-dis.c (all fns): New first arg of opcode table descriptor.
- (cgen_dis_init): Delete.
- * cgen-opc.c (all fns): New first arg of opcode table descriptor.
- (cgen_current_{opcode_table_mach,endian}): Delete.
- * m32r-asm.c,m32r-dis.c,m32r-opc.c,m32r-opc.h: Regenerate.
-
-Thu Jul 30 21:41:10 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * d30v-opc.c (d30v_opcode_table): Add new "LKR" flag to some
- instructions.
-
-Tue Jul 28 11:00:09 1998 Jeffrey A Law (law@cygnus.com)
-
- * m10300-opc.c: Add entries for "no_match_operands" field in
- the opcode table.
-
-Fri Jul 24 11:41:37 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-asm.c,m32r-opc.c: Regenerate (-Wall cleanups).
-
-Tue Jul 21 13:41:07 1998 Doug Evans <devans@seba.cygnus.com>
-
- * m32r-opc.h,m32r-opc.c,m32r-asm.c,m32r-dis.c: Regenerate.
-
-Mon Jul 13 14:53:59 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c (ckprefix): Handle fwait specially only when it isn't
- the first prefix.
- (dofloat): Correct test for fnstsw. Print `fnstsw %ax' rather
- than `fnstsw %eax'.
- (OP_J): Remove unnecessary subtraction when 16-bit displacement
- will be masked later.
-
-Thu Jul 2 17:11:27 1998 Doug Evans <devans@seba.cygnus.com>
-
- * m32r-opc.h (CGEN_MIN_INSN_SIZE): New #define.
-
-Wed Jul 1 16:11:16 1998 Doug Evans <devans@seba.cygnus.com>
-
- * m32r-asm.c,m32r-dis.c,m32r-opc.c,m32r-opc.h: Regenerate.
-
-Fri Jun 26 11:08:55 1998 Jeffrey A Law (law@cygnus.com)
-
- * m10300-dis.c: Only recognize instructions from the currently
- selected machine.
- * m10300-opc.c: Add field indicating the particular variant of
- the mn10300 each instruction is available on.
-
-Fri Jun 26 12:04:21 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: For bfd_vax_arch, build vax-dis.lo.
- * Makefile.am: Rebuild dependencies.
- (CFILES): Add vax-dis.c.
- (ALL_MACHINES): Add vax-dis.lo.
- * aclocal.m4: Rebuild with current libtool.
- * configure, Makefile.in: Rebuild.
-
-Fri Jun 26 12:03:20 1998 Klaus Kaempf <kkaempf@progis.de>
-
- * vax-dis.c: New file, from work by Pauline Middelink
- <middelin@polyware.iaf.nl>.
- * disassemble.c (ARCH_vax): Define if ARCH_all.
- (disassembler): Add case for ARCH_vax.
- * makefile.vms: Support compilation on vms/vax.
-
-Tue Jun 23 19:42:18 1998 Mark Alexander <marka@cygnus.com>
-
- * m10200-dis.c (print_insn_mn10200): Fix various non-portabilities
- related to sign extension and the size of ints.
-
-Tue Jun 23 10:59:26 1998 Jeffrey A Law (law@cygnus.com)
-
- * m10300-opc.c: Support one operand "asr", "lsr" and "asl"
- instructions. Support (sp) addressing mode by expanding it into
- (0,sp).
-
-Sat Jun 20 14:46:20 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * mips-dis.c (_print_insn_mips): Fix argument interchange typo.
-
-Fri Jun 19 09:16:42 1998 Mark Alexander <marka@cygnus.com>
-
- * m10200-dis.c (print_insn_mn10200): Recognize 'break' pseudo-op.
-
-1998-06-18 Ulrich Drepper <drepper@cygnus.com>
-
- * i386-dis.c: Add support for fxsave, fxrstor, sysenter and
- sysexit.
-
-Thu Jun 18 10:22:24 1998 John Metzler <jmetzler@cygnus.com>
-
- * mips-dis.c (print_insn_little_mips): Previously, instruction
- printing references the symbol table to determine whether the
- instruction resides in a block regular instructions or mips16
- instructions. However, when the disassembler gets used in other
- environments where the symbol table is not present, we no longer
- rely in the symbol table, rather, use the low bit of the
- instructions address to guess. There should be no change for usage
- of the disassembler in host based programs, gdb, objdump.
- (print_insn_big_mips): ditto.
- (print_insn_mips): ditto
-
-Wed Jun 17 21:19:01 1998 Mark Alexander <marka@cygnus.com>
-
- * m10200-dis.c (print_insn_mn10200): Don't bomb on unknown opcodes.
-
-Wed Jun 17 17:49:23 1998 Jeffrey A Law (law@cygnus.com)
-
- * m10300-opc.c (mn10300_opcodes): Change opcode for "syscall".
-
-Tue Jun 16 13:10:51 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c (index16): Add '%' to register names. Use ','
- instead of '+'.
-
-Sat Jun 13 11:33:55 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c: Don't print opcode suffix when we can figure out the
- size (and gas can!) by register operands, or from the default
- size.
- (putop): Handle 'A', 'B', 'L', 'P', 'Q', 'R' macros. Rename 'C'
- macro to 'E'.
- (dis386, dis386_twobyte, grps): Use new suffix macros.
- (dis386): Correct imul Ib to imul sIb. Change jnl to jge to be
- consistent. Add suffix for call, jmp, lcall, ljmp, iret. Reverse
- order of cmps operands to agree with Intel docs. Correct operand
- of aad and aam (Ib -> sIb). Change ud2b from 0fb8 to 0fb9 to
- agree with Intel docs.
- (print_insn_x86): Print orphan fwait before other prefixes.
- Return correct byte count for orphan fwait with prefixes. Don't
- print `bound' operands in reverse order.
- (ckprefix): Stop accumulating prefixes if we get fwait.
- (OP_DIR): Print `$' before Ap operands of ljmp, lcall.
-
-Fri Jun 12 13:40:38 1998 Tom Tromey <tromey@cygnus.com>
-
- * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
- ($(PACKAGE).pot): Unconditionally depend on POTFILES.
-
-Fri Jun 12 11:04:06 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- Fix problems when bfd_vma is wider than long.
- * i386-dis.c: Make op_address and start_pc unsigned.
- (set_op): Make parameter unsigned.
- (print_insn_x86): Cast to bfd_vma when passing a value to
- print_address_func.
- * ns32k-dis.c (CORE_ADDR): Don't define.
- (print_insn_ns32k): Change type of addr to bfd_vma. Use
- bfd_scan_vma to read back address.
- (print_insn_arg): Change type of addr to bfd_vma. Use sprintf_vma
- to format it.
- * m68k-dis.c (COERCE32): Cast to bfd_signed_vma to avoid overflow.
- (NEXTULONG): New definition.
- (print_insn_m68k): Avoid overflow when computing third argument of
- print_insn_arg.
- (print_insn_arg): Use NEXTULONG to fetch 32 bit address values.
- Use disp instead of val to store offset values.
- (print_indexed): Use base_disp instead of word to store base
- displacement, to avoid overflow.
- * m10300-dis.c (disassemble): Cast value to long when computing
- pc-relative address, to get correct sign extension.
-
-Wed Jun 10 15:58:37 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.c: Regenerate.
-
-Tue Jun 9 14:27:57 1998 Nick Clifton <nickc@cygnus.com>
-
- * arm-opc.h (thumb_opcodes): Display 'add rx, rY, #0' insns as
- 'mov rX, rY'. Patch courtesy of Tony Thompson <Tony.Thompson@arm.com>
-
-Mon Jun 8 18:17:21 1998 Nick Clifton <nickc@cygnus.com>
-
- * d30v-opc.c: Remove FALG_MUL32 attribyte from MULX2H insn.
-
-Fri Jun 5 23:47:55 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c: Combine aflag and dflag into sizeflag. Change OP_*
- functions to void.
- (OP_DSreg): Rename from OP_DSSI.
- (OP_ESreg): Rename from OP_ESDI.
- (Xb, Xv, Yb, Yv): Use index reg code, not b_mode or v_mode.
- (DSBX): Define.
- (append_seg): Rename from append_prefix.
- (ptr_reg): New function.
- (dis386): Add S suffix to pushf, popf, ret, lret, enter, leave.
- Add DSBX for xlat.
- (PREFIX_ADDR): Rename from PREFIX_ADR.
- (float_reg): Add non-broken opcodes for people who don't want
- UNIXWARE_COMPAT.
-
-Fri Jun 5 19:15:04 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-opc.c (tstb, tstw, tstl): Don't allow pcrel on
- 68000/68008/68010.
-
-Wed Jun 3 18:56:22 1998 H.J. Lu <hjl@gnu.org>
-
- * i386-dis.c (dis386): Change 0x60 to "pushaS", 0x61 to "popaS".
-
-Tue Jun 2 15:06:46 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * ppc-opc.c (powerpc_macros): Support shifts and rotates of size
- 0; produce error message for shifts of size 32 (or 64 for 64-bit
- shifts), because the hardware doesn't support them.
-
-Wed May 27 15:29:13 1998 Nick Clifton <nickc@cygnus.com>
-
- * d30v-opc.c: Add new operand: Ra3. Change SHORT_B3, SHORT_B3b,
- LONG_2, LONG_2b formats to use this new operand.
-
-Tue May 26 20:47:48 1998 Stan Cox <scox@cygnus.com>
-
- * sparc-dis.c (compute_arch_mask): Added bfd_mach_sparc_sparclite_le.
-
-Tue May 26 20:45:33 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc-dis.c (print_insn_sparc): big endian instruction / little
- endian data support.
-
-Tue May 26 16:14:39 1998 Nick Clifton <nickc@cygnus.com>
-
- * d30v-opc.c (d30v_format_table): Change definition of SHORT_B3
- and SHORT_B3b formats to use Rb instead of Ra.
-
- Add FLAG_MUL16 to MUL2XH opcode.
-
- Add FLAG_ADDSUBppp to SRC and SATHp opcodes to implement extension
- to existing 1.1.1 parallelisation prohibition procedure.
-
-Fri May 22 16:00:00 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-asm.c,m32r-dis.c: Regenerate.
-
-Tue May 19 17:36:08 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (print_mips16_insn_arg): Handle type ']' correctly
- with a shift count of 0.
-
-Fri May 15 14:58:31 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen-opc.c (cgen_hw_lookup_by_name): Renamed from cgen_hw_lookup.
- (cgen_hw_lookup_by_num): New function.
-
-Wed May 13 17:03:59 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-asm.c: Regenerate (handle uppercase HIGH/SHIGH/LOW/SDA).
-
-Wed May 13 14:34:31 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc-dis.c (print_insn_sparc): Always fetch instructions
- as big-endian on SPARClite.
-
-Tue May 12 11:46:31 1998 Richard Henderson <rth@cygnus.com>
-
- * d30v-opc.c (pre_defined_register): Remove alias for r0.
-
-Sun May 10 22:37:22 1998 Jeffrey A Law (law@cygnus.com)
-
- * po/Make-in (install-info): New target.
-
-Thu May 7 17:15:59 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
- * configure: Rebuild.
-
-Thu May 7 12:49:46 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * mips-opc.c (teq,tge,tgeu,tlt,tltu,tne): Added three-operand
- variety of ISA2 instructions to set bottom ten bits of trap code.
-
-Thu May 7 11:54:25 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (config.status): Add explicit target so that
- config.status depends upon bfd/configure.in.
- * Makefile.in: Rebuild.
-
-Thu May 7 09:33:02 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * mips-opc.c (break, sdbbp): Added two-operand variety of ISA1
- instructions to set bottom ten bits of break code.
- * mips-dis.c (print_insn_arg): Implement 'q' operand format used
- for above optional argument.
+ * Makefile.am (CGEN, CGENDEPS, CGENDIR, CGENFLAGS): New.
+ (run-cgen, stamp-m32r, stamp-fr30): New targets.
+ * Makefile.in: Regenerate.
+ * configure.in: Add --enable-cgen-maint option.
+ * configure: Regenerate.
-Wed May 6 15:30:06 1998 Klaus Kaempf <kkaempf@progis.de>
+2000-07-26 Dave Brolley <brolley@redhat.com>
- * makefile.vms: Run dec c with /nodebug.
+ * cgen-opc.c (cgen_hw_lookup_by_name): 'i' is now unsigned.
+ (cgen_hw_lookup_by_num): Ditto.
+ (cgen_operand_lookup_by_name): Ditto.
+ (print_address): Ditto.
+ (print_keyword): Ditto.
+ * cgen-dis.c (hash_insn_array): Mark unused parameters with
+ ATTRIBUTE_UNUSED.
+ * cgen-asm.c (hash_insn_array): Mark unused parameters with
+ ATTRIBUTE_UNUSED.
+ (cgen_parse_keyword): Ditto.
-Mon May 4 10:19:57 1998 Tom Tromey <tromey@cygnus.com>
+2000-07-22 Jason Eckhardt <jle@redhat.com>
- * Makefile.in: Rebuilt.
- * Makefile.am: Regenerated dependencies with mkdep.
+ * i860-dis.c: New file.
+ (print_insn_i860): New function.
+ (print_br_address): New function.
+ (sign_extend): New function.
+ (BITWISE_OP): New macro.
+ (I860_REG_PREFIX): New macro.
+ (grnames, frnames, crnames): New structures.
- * opintl.h (_): Define as dgettext.
+ * disassemble.c (ARCH_i860): Define.
+ (disassembler): Add check for bfd_arch_i860 to set disassemble
+ function to print_insn_i860.
-Tue Apr 28 14:12:12 1998 Nick Clifton <nickc@cygnus.com>
+ * Makefile.in (CFILES): Added i860-dis.c.
+ (ALL_MACHINES): Added i860-dis.lo.
+ (i860-dis.lo): New dependences.
- * cgen-asm.c: Internationalised.
- * m32r-asm.c: Internationalised.
- * m32r-dis.c: Internationalised.
- * m32r-opc.c: Internationalised.
+ * configure.in: New bits for bfd_i860_arch.
- * aclocal.m4: Regenerated.
* configure: Regenerated.
- * Makefile.am (POTFILES): Remove inclusion of BFD_H.
- * Makefile.in: Rebuild.
- * po/POTFILES.in: Rebuilt using rule in Makefile.in.
- * po/opcodes.pot: Rebuilt after changing POTFILES.in.
-
-Tue Apr 28 13:13:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Call AC_ISC_POSIX near start. Move CY_GNU_GETTEXT
- after AC_PROG_CC.
- * aclocal.m4, configure: Rebuild with current tools.
-
-Mon Apr 27 14:31:00 1998 Nick Clifton <nickc@cygnus.com>
-
- * opintl.h: New file - contains internationalisation macros used
- by source files in this directory.
- * po/: New subdirectory - contains internationalisation files.
- * po/Make-in: New file - Makefile constructor.
- * po/POTFILES.in: New file - list of files in opcodes directory
- that should be scan for internationalisation macros.
- * po/opcodes.pot: New file - list of internationisation strings
- found in files mentioned in po/POTFILES.in.
- * Makefile.am: Add rule to build po/POTFILES.in. Add SUBDIRS
- entry. Add intl directory to include paths.
- * acconfig.h: Add ENABLE_NLS, HAVE_CATGETS, HAVE_GETEXT,
- HAVE_STRCPY, HAVE_LC_MESSAGES
- * configure.in: Add rule to build Makefile in po subdirectory.
- * Makefile.in: Rebuilt.
- * aclocal.m4: Rebuilt.
- * config.in: Rebuilt.
- * configure: Rebuilt.
- * alpha-opc.c: Internationalised.
- * arc-dis.c: Internationalised.
- * arc-opc.c: Internationalised.
- * arm-dis.c: Internationalised.
- * cgen-asm.c: Internationalised.
- * d30v-dis.c: Internationalised.
- * dis-buf.c: Internationalised.
- * h8300-dis.c: Internationalised.
- * h8500-dis.c: Internationalised.
- * i386-dis.c: Internationalised.
- * m10200-dis.c: Internationalised.
- * m10300-dis.c: Internationalised.
- * m68k-dis.c: Internationalised.
- * m88k-dis.c: Internationalised.
- * mips-dis.c: Internationalised.
- * ns32k-dis.c: Internationalised.
- * opintl.h: Internationalised.
- * ppc-opc.c: Internationalised.
- * sparc-dis.c: Internationalised.
- * v850-dis.c: Internationalised.
- * v850-opc.c: Internationalised.
-
-Mon Apr 27 10:33:56 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen-asm.c (cgen_current_opcode_table): Renamed from ..._data.
- (asm_hash_table_entries): New variable.
- (cgen_asm_init): Free asm_hash_table_entries.
- (hash_insn_array,hash_insn_list): New functions.
- (build_asm_hash_table): Use them. Hash macro insns as well.
- (cgen_asm_lookup_insn): Update.
- * cgen_dis.c (cgen_current_opcode_table): Renamed from ..._data.
- (dis_hash_table_entries): New variable.
- (cgen_dis_init): Free dis_hash_table_entries.
- (hash_insn_array,hash_insn_list): New functions.
- (build_dis_hash_table): Use them. Hash macro insns as well.
- (cgen_dis_lookup_insn): Update.
- * cgen-opc.c (cgen_current_opcode_table): Renamed from ..._data.
- (cgen_set_cpu,cgen_hw_lookup,cgen_insn_count): Update.
- (cgen_macro_insn_count): New function.
- * m32r-opc.h,m32r-opc.c,m32r-asm.c,m32r-dis.c: Regenerate.
-
-Fri Apr 24 16:07:57 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c (OP_DSSI): Print segment override.
-
-Mon Apr 13 16:59:39 1998 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c (print_insn_arm): Add "_all" extension to 'C'
- operator.
-
-Mon Apr 13 16:50:27 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (libopcodes_la_LIBADD): Add @WIN32LIBADD@.
- (libopcodes_la_LDFLAGS): Add @WIN32LDFLAGS@.
- * configure.in: Define and substitute WIN32LDFLAGS and
- WIN32LIBADD.
- * aclocal.m4: Rebuild with new libtool.
- * configure, Makefile.in: Rebuild.
-
-Fri Apr 10 18:14:31 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.c: Regenerate.
-
-Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am (stamp-lib): Check that .libs/libopcodes.a exists
- before trying to copy it.
- * Makefile.in: Rebuild.
-
-Thu Apr 2 17:25:49 1998 Nick Clifton <nickc@cygnus.com>
-
- * m32r-opc.c: Use signed immediate values for CMPUI instruction.
-
-Wed Apr 1 16:20:27 1998 Ian Dall <Ian.Dall@dsto.defence.gov.au>
-
- * ns32k-dis.c (bit_extract_simple): New function to extract bits
- from an arbitrary valid buffer instead of fetching them on demand
- using fetch_data().
- (invalid_float): use bit_extract_simple() instead of bit_extract().
-
-Tue Mar 31 11:09:08 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From H.J. Lu <hjl@gnu.org>:
- * i386-dis.c (dis386): Change 0x8c and 0x8e to movS, and change Ew
- to Ev for both.
-
-Mon Mar 30 17:32:03 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Branched binutils 2.9.
-
-Mon Mar 30 15:18:00 1998 Ken Raeburn <raeburn@cygnus.com>
-
- * d30v-dis.c (print_insn_d30v): Don't use uninitialized "num" when
- disassembling last 4 bytes of a section.
-
-Fri Mar 27 18:08:13 1998 Ian Lance Taylor <ian@cygnus.com>
-
- Fix some gcc -Wall warnings:
- * arc-dis.c (print_insn): Add casts to avoid warnings.
- * cgen-opc.c (cgen_keyword_lookup_name): Likewise.
- * d10v-dis.c (dis_long, dis_2_short): Likewise.
- * m10200-dis.c (disassemble): Likewise.
- * m10300-dis.c (disassemble): Likewise.
- * ns32k-dis.c (print_insn_ns32k): Likewise.
- * ppc-opc.c (insert_ral, insert_ram): Likewise.
- * cgen-dis.c (build_dis_hash_table): Remove used local variables.
- * cgen-opc.c (cgen_keyword_search_next): Likewise.
- * d10v-dis.c (dis_long, dis_2_short): Likewise.
- * d30v-dis.c (print_insn_d30v, lookup_opcode): Likewise.
- * ns32k-dis.c (bit_extract, print_insn_ns32k): Likewise.
- * tic80-dis.c (print_one_instruction): Likewise.
- * w65-dis.c (print_operand): Likewise.
- * z8k-dis.c (fetch_data): Likewise.
- * a29k-dis.c: Add return type for find_byte_func_type.
- * arc-opc.c: Include <stdio.h>. Remove declarations of
- insert_multshift and extract_multshift.
- * d30v-dis.c (lookup_opcode): Parenthesize assignments in
- conditionals.
- (extract_value): Fully parenthesize expression.
- * h8500-dis.c (print_insn_h8500): Initialize local variables.
- * h8500-opc.h (h8500_table): Fully bracket initializer.
- * w65-opc.h (optable): Likewise.
- * i386-dis.c (print_insn_x86): Declare aflag and flag parameters.
- * i386-dis.c (OP_E): Initialize local variables.
- * m10200-dis.c (print_insn_mn10200): Likewise.
- * mips-dis.c (print_insn_mips16): Likewise.
- * sh-dis.c (print_insn_shx): Likewise.
- * v850-dis.c (print_insn_v850): Likewise.
- * ns32k-dis.c (print_insn_arg): Declare.
- (get_displacement, invalid_float): Declare.
- (list_search, sign_extend, flip_bytes): Declare return type.
- (get_displacement): Likewise.
- (print_insn_arg): Likewise. Make d int. Fix sprintf format
- string.
- (print_insn_ns32k): Make i unsigned.
- (invalid_float): Make static. Declare type of val.
- * tic30-dis.c (print_par_insn): Make i size_t. Don't check strlen
- on each for iteration.
- * tic30-dis.c (get_indirect_operand): Likewise.
- * z8k-dis.c (print_insn_z8001): Declare return type.
- (print_insn_z8002): Likewise.
- (unparse_instr): Fix sprintf format strings.
-
-Fri Mar 27 00:05:23 1998 Jeffrey A Law (law@cygnus.com)
-
- * mips-opc.c: Add "sync.l" and "sync.p".
-
-Wed Mar 25 14:32:48 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-dis.c (print_insn_m68k): Use info->mach to select the
- default m68k variant to recognize.
-
- * i960-dis.c (pinsn): Change type of first argument to bfd_vma.
- (ctrl, cobr, mem, ea): Likewise.
- (print_addr): Likewise. Remove cast.
- (ea): Cast argument of print_addr to bfd_vma.
-
- * cgen-asm.c (cgen_parse_signed_integer): Fix type of local
- variable value.
- (cgen_parse_unsigned_integer): Likewise.
- (cgen_parse_address): Likewise.
-
-Wed Mar 25 14:31:31 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * i960-dis.c (ctrl): Add full braces to structure initialization.
- (cobr, mem, reg): Likewise.
- (ea): Correct parenthesization in expression.
-
- * cgen-asm.c: Include <ctype.h>.
- (build_asm_hash_table): Remove unused local variable i.
- (cgen_parse_keyword): Add casts to avoid warnings.
-
- * arm-dis.c (print_insn_big_arm): Only call coffsymbol for a COFF
- symbol. Fix indentation.
- (print_insn_little_arm): Likewise.
-
-Fri Mar 20 18:55:18 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Use AM_DISABLE_SHARED.
- * aclocal.m4, configure: Rebuild with libtool 1.2.
-
-Thu Mar 19 15:46:53 1998 Nick Clifton <nickc@cygnus.com>
-
- These patches are courtesy of Jonathan Walton and Tony Thompson
- (athompso@cambridge.arm.com).
-
- * arm-dis.c (print_insn_thumb): Ignore bottom two bits of PC
- relative addresses.
-
- * arm-opc.h (thumb_opcodes): Annotate PC relative addresses with
- both the offset and the label closest to the destination.
-
-Sat Mar 14 23:47:14 1998 Doug Evans <devans@seba.cygnus.com>
-
- * m32r-opc.h: Regenerate.
-
-Wed Mar 4 12:08:14 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.h,m32r-opc.c,m32r-asm.c,m32r-dis.c: Regenerate.
-
-Sat Feb 28 16:02:34 1998 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c (print_insn_big_arm, print_insn_little_arm): Do not
- assume that info->symbols is non-empty.
-
-Sat Feb 28 12:19:05 1998 Richard Henderson <rth@cygnus.com>
-
- * alpha-opc.c (cvtqs) There is no such thing.
- (cvttq): Missing most of the /*d variants.
-
-Thu Feb 26 15:53:09 1998 Michael Meissner <meissner@cygnus.com>
-
- * d30v-opc.c (d30v_opcode_table): Indicate which instructions are
- delayed branches or jumps.
-Tue Feb 24 10:46:44 1998 Doug Evans <devans@canuck.cygnus.com>
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
- * arm-dis.c (print_insn_{big,little}_arm): info->symbol changed
- to *info->symbols.
- * mips-dis.c (print_insn_{big,little}_mips): Likewise.
- * tic30-dis.c (print_branch): Likewise.
-
-Tue Feb 24 11:06:18 1998 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c (print_insn_big_arm, print_insn_little_arm): Remove
- saved_symbol code as it is no longer needed.
-
-Mon Feb 23 13:16:17 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen-asm.c: Include symcat.h.
- * cgen-dis.c,cgen-opc.c: Ditto.
- * m32r-asm.c,m32r-dis.c,m32r-opc.h,m32r-opc.c: Regenerate.
-
-Mon Feb 23 10:34:58 1998 Jeffrey A Law (law@cygnus.com)
-
- * mips-dis.c (print_insn_arg): Do not prefix 'P' arguments with '$'.
-
-Thu Feb 19 16:51:13 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.[ch]: Regenerate.
-
-Tue Feb 17 17:14:50 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen-asm.c (cgen_parse_{signed,unsigned}_integer): Delete min,max
- arguments. Don't perform validation here.
- * m32r-asm.c,m32r-dis.c,m32r-opc.c: Regenerate.
-
-Fri Feb 13 14:26:06 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.c: Regenerate.
-
-Fri Feb 13 14:53:02 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (AUTOMAKE_OPTIONS): Define.
- * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
-
-Fri Feb 13 10:21:09 1998 Mark Alexander <marka@cygnus.com>
-
- * m10300-dis.c (print_insn_mn10300): Recognize break instruction.
-
-Fri Feb 13 13:12:14 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Get the version number from BFD.
- * configure: Rebuild.
-
- From H.J. Lu <hjl@gnu.org>:
- * Makefile.am (libopcodes_la_LDFLAGS): Define.
+ * Makefile.am (CFILES): Add cris-dis.c and cris-opc.c.
+ (ALL_MACHINES): Add cris-dis.lo and cris-opc.lo.
+ (cris-dis.lo, cris-opc.lo): New rules.
* Makefile.in: Rebuild.
-
-Fri Feb 13 09:50:32 1998 Nick Clifton <nickc@cygnus.com>
-
- * m32r-opc.c: Regenerate.
- * m32r-opc.h: Regenerate.
-
-Thu Feb 12 11:01:40 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.c: Regenerate.
-
-Thu Feb 12 03:41:00 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- Fix rac to accept only a0:
- * d10v-opc.c (d10v_predefined_registers, d10v_operands, d10v_opcodes):
- Split OPERAND_ACC into OPERAND_ACC0 and OPERAND_ACC1.
- Introduce OPERAND_GPR.
- * d10v-dis.c (print_operand): Likewise.
-
-Wed Feb 11 18:58:34 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen-opc.c (cgen_set_cpu): Delete init of hw list `next' chain.
- (cgen_hw_lookup): Make result const.
- * m32r-opc.h, m32r-opc.c, m32r-asm.c, m32r-dis.c: Regenerate.
-
-Sat Feb 7 15:30:27 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure, aclocal.m4: Rebuild with new libtool.
-
-Thu Feb 5 17:56:10 1998 Michael Meissner <meissner@cygnus.com>
-
- * d30v-opc.c (repeat{,i} instructions): Repeat/repeati
- instructions use a PC relative branch, not absolute.
-
-Wed Feb 4 19:17:37 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Set libtool_enable_shared rather than
- libtool_shared. Remove diversion hack.
- * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
-
-Tue Feb 3 17:19:40 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen-opc.c (cgen_set_cpu): Initialize hardware table.
- * m32r-opc.h, m32r-opc.c, m32r-asm.c, m32r-dis.c: Regenerate.
-
-Mon Feb 2 19:22:15 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- * tic30-dis.c: New file.
- * disassemble.c (disassembler): Add bfd_arch_tic30 case.
- * configure.in: Handle bfd_tic30_arch.
- * Makefile.am: Rebuild dependencies.
- (CFILES): Add tic30-dis.c
- (ALL_MACHINES): Add tic30-dis.lo.
- * configure, Makefile.in: Rebuild.
-
-Thu Jan 29 13:02:56 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r-opc.h (HAVE_CPU_M32R): Define.
-
-Wed Jan 28 09:55:03 1998 Nick Clifton <nickc@cygnus.com>
-
- * v850-opc.c (insertion routines): If both alignment and size is
- wrong then report this.
-
-Tue Jan 27 21:52:59 1998 Jeffrey A Law (law@cygnus.com)
-
- * mips-dis.c (_print_insn_mips): Set target_processor as appropriate.
- Only recognize instructions for the current target_processor.
-
-Thu Jan 22 16:20:17 1998 Fred Fish <fnf@cygnus.com>
-
- * d10v-dis.c (PC_MASK): Correct value.
- (print_operand): If there's a reloc, don't calculate the
- address because they could be in different sections.
-
-Fri Jan 16 15:29:11 1998 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * mips-opc.c (mips_builtin_opcodes): Move 4010's "addciu"
- instruction after the 4650's "mul" instruction; nobody's using the
- 4010 these days. If object files someday indicate which processor
- variant they're intended for, we can do a better job at this.
-
-Mon Jan 12 14:43:54 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen-asm.c (build_asm_hash_table): Traverse compiled in table using
- table provided entry size. Use CGEN_INSN_MNEMONIC.
- (cgen_parse_keyword): Rewrite.
- * cgen-dis.c (build_dis_hash_table): Traverse compiled in table using
- table provided entry size. Use CGEN_INSN_MASK_BITSIZE.
- * cgen-opc.c: Clean up pass over `struct foo' usage.
- (cgen_keyword_lookup_value): Handle "" entry.
- (cgen_keyword_add): Likewise.
-
-Mon Dec 22 12:37:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-opc.c: Add FP_D to s.d instruction flags.
-
-Wed Dec 17 11:38:29 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-opc.c (halt, pulse): Enable them on the 68060.
-
-Tue Dec 16 15:22:53 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_opcodes): Revert change that put the 32 bit
- PC relative offset forms before the 15 bit forms. An assembler command
- line option now chooses the default.
-
-Tue Dec 16 15:22:51 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v-opc.c (d30v_opcode_table): Set new flags bits
- FLAG_{2WORD,MUL{16,32},ADDSUBppp}, in appropriate instructions.
-
-1997-12-15 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * configure: Only build libopcodes shared if --enable-shared's value
- was `yes', or was set to `*opcodes*'.
- * aclocal.m4: Likewise.
- * NOTE: this really needs to be fixed in libtool/libtool.m4, the
- original source of this bit of code. It's not clear what the best fix
- would be, though.
-
-Fri Dec 12 11:57:04 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (OFF_SL_PC, OFF_SL_BR): Minor formatting change.
- (tic80_opcodes): Reorder table entries to put the 32 bit PC relative
- offset forms before the 15 bit forms, to default to the long forms.
-
-Fri Dec 12 01:32:30 1997 Richard Henderson <rth@cygnus.com>
-
- * alpha-opc.c (cvttq/*u*): Remove, as that suffix is invalid.
-
-Wed Dec 10 17:42:35 1997 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c (print_insn_little_arm): Prevent examination of stored
- symbol if none is present.
- (print_insn_big_arm): Prevent examination of stored symbol if
- none is present.
-
-Thu Oct 23 21:13:37 1997 Fred Fish <fnf@cygnus.com>
-
- * d10v-opc.c (d10v_opcodes): Correct entry for RTE.
-
-Mon Dec 8 11:21:07 1997 Nick Clifton <nickc@cygnus.com>
-
- * disassemble.c: Remove disasm_symaddr() function.
-
- * arm-dis.c: Use info->symbol instead of info->flags to determine
- if disassmbly should be in Thumb or Arm mode.
-
-Tue Dec 2 09:54:27 1997 Nick Clifton <nickc@cygnus.com>
-
- * arm-dis.c: Add support for disassembling Thumb opcodes.
- (print_insn_thumb): New function.
-
- * disassemble.c (disasm_symaddr): New function.
-
- * arm-opc.h: Display nop pseudo ops alongside equivalent disassembly.
- (thumb_opcodes): Table of Thumb opcodes.
-
-Mon Dec 1 12:25:57 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-opc.c (btst): Change Dd@s to Dd;b.
-
- * m68k-dis.c (print_insn_arg): Recognize 'm', 'n', 'o', 'p', 'q',
- and 'v' as operand types.
-
-Mon Dec 1 11:56:50 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: Add argument for lpstop. From Olivier Carmona
- <olivier.carmona@di.epfl.ch>.
- * m68k-dis.c (print_insn_m68k): Handle special case of lpstop,
- which has a two word opcode with a one word argument.
-
-Sun Nov 23 22:25:21 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v-opc.c (d30v_opcode_table, case cmpu): Immediate field is
- unsigned, not signed.
- (d30v_format_table): Add SHORT_CMPU cases for cmpu.
-
-Tue Nov 18 23:10:03 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * d10v-dis.c (print_operand):
- Split OPERAND_FLAG into OPERAND_FFLAG and OPERAND_CFLAG.
-
-Tue Nov 18 18:45:14 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * d10v-opc.c (OPERAND_FLAG): Split into:
- (OPERAND_FFLAG, OPERAND_CFLAG) .
- (FSRC): Split into:
- (FFSRC, CFSRC).
-
-Thu Nov 13 11:05:33 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips-opc.c: Move the INSN_MACRO ISA value to the membership
- field for all INSN_MACRO's.
- * mips16-opc.c: same
-
-Wed Nov 12 10:16:57 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips-opc.c (sync,cache): These are 3900 insns.
-
-Tue Nov 11 23:53:41 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- sh-opc.h (sh_table): Remove ftst/nan.
-
-Tue Oct 28 17:59:32 1997 Ken Raeburn <raeburn@cygnus.com>
-
- * mips-opc.c (ffc, ffs): Fix mask.
-
-Tue Oct 28 16:34:54 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v-opc.c (pre_defined_registers): Add eit_vb, int_s, and int_m
- control registers.
-
-Mon Oct 27 22:34:03 1997 Ken Raeburn <raeburn@cygnus.com>
-
- * mips-opc.c: Fix bug in mask for "not" pseudo-instruction.
- (WR_HILO, RD_HILO, MOD_HILO): New macros.
-
-Mon Oct 27 22:34:03 1997 Ken Raeburn <raeburn@cygnus.com>
-
- * mips-opc.c: Fix bug in mask for "not" pseudo-instruction.
- (WR_HILO, RD_HILO, MOD_HILO): New macros.
-
-Thu Oct 23 14:57:58 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-dis.c (disassemble): Replace // with /* ... */
-
-Wed Oct 22 17:33:21 1997 Richard Henderson <rth@cygnus.com>
-
- * sparc-opc.c: Add wr & rd for v9a asr's.
- * sparc-dis.c (print_insn_sparc): Recognize '_' and '/' for v9a asr's.
- (v9a_asr_reg_names): New variable.
- Patch from David Miller <davem@vger.rutgers.edu>.
-
-Wed Oct 22 17:18:02 1997 Richard Henderson <rth@cygnus.com>
-
- * sparc-opc.c (v9notv9a): New insn type.
- (IMPDEP): Move to the end to not conflict with edge8 et al.
- Patch from David Miller <davem@vger.rutgers.edu>.
-
-Fri Oct 17 13:18:53 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips-opc.c (bnezl,beqzl): Mark these as also tx39.
-
-Thu Oct 16 11:55:20 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips-opc.c: Note that 'jalx' is (probably incorrectly) marked I1.
-
-Tue Oct 14 16:10:31 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-dis.c (disassemble): Use new symbol_at_address_func() field
- of disassemble_info structure to determine if an overlay address
- has a matching symbol in low memory.
-
- * dis-buf.c (generic_symbol_at_address): New (dummy) function for
- new symbol_at_address_func field in disassemble_info structure.
-
-Fri Oct 10 16:44:52 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-opc.c (extract_d22): Use signed arithmatic.
-
-Tue Oct 7 23:40:43 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips-opc.c: Three op mult is not an ISA insn.
-
-Tue Oct 7 23:37:21 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips-opc.c: Fix formatting.
-
-Fri Oct 3 17:26:54 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386-dis.c (OP_E): Explicitly sign extend 8 bit values, rather
- than assuming that char is signed. Explicitly sign extend 16 bit
- values, rather than assuming that short is 16 bits.
- (OP_sI, OP_J, OP_DIR): Likewise.
-
-Thu Oct 2 13:36:45 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-dis.c (v850_sreg_names): Use symbolic names for higher
- system registers.
-
-Wed Oct 1 16:58:54 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-opc.c: Fix typo in comment.
-
- * v850-dis.c (disassemble): Add test of processor type when
- determining opcodes.
-
-Wed Oct 1 14:10:20 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Use a diversion to set enable_shared before the
- arguments are parsed.
- * configure: Rebuild.
-
-Thu Sep 25 13:04:59 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c (TBL1): Use ! rather than `.
- * m68k-dis.c (print_insn_arg): Remove ` operand specifier.
-
-Wed Sep 24 11:29:35 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: Correct bchg, bclr, bset, and btst on ColdFire.
-
- * m68k-opc.c: Accept tst{b,w,l} with immediate operands on cpu32.
-
- * m68k-opc.c: Correct movew of an immediate operand to %sr or %ccr
- for mcf5200.
-
- * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
- * aclocal.m4: Rebuild with new libtool.
+ * configure.in (bfd_cris_arch): New target.
* configure: Rebuild.
+ * disassemble.c (ARCH_cris): Define.
+ (disassembler): Support ARCH_cris.
+ * cris-dis.c, cris-opc.c: New files.
+ * po/POTFILES.in, po/opcodes.pot: Regenerate.
-Fri Sep 19 11:45:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * v850-opc.c ("cmov"): Order reg param r1, r2 not r2, r2.
-
-Thu Sep 18 11:21:43 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparclet_cpreg_table): Add %ccsr2, %cccrr, %ccrstr.
-
-Tue Sep 16 15:18:20 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-opc.c (v850_opcodes): Further rearrangements.
+2000-07-11 Jakub Jelinek <jakub@redhat.com>
-Tue Sep 16 16:12:11 1997 Ken Raeburn <raeburn@cygnus.com>
+ * sparc-opc.c (sparc_opcodes): popc has 0 in rs1, not rs2.
+ Reported by Bill Clarke <llib@computer.org>.
- * d30v-opc.c (rot2h, sra2h, srl2h insns): Revert last change.
+2000-07-09 Geoffrey Keating <geoffk@redhat.com>
-Tue Sep 16 09:48:50 1997 Nick Clifton <nickc@cygnus.com>
+ * ppc-opc.c (powerpc_opcodes): Correct suffix for vslw.
+ Patch by Randall J Fisher <rfisher@ecn.purdue.edu>.
- * v850-opc.c (v850_opcodes): Fields reordered to allow assembler
- parser to work.
+2000-07-09 Alan Modra <alan@linuxcare.com.au>
-Tue Sep 16 10:01:00 1997 Gavin Koch <gavin@cygnus.com>
+ * hppa-dis.c (fput_reg, fput_fp_reg, fput_fp_reg_r, fput_creg,
+ fput_const, extract_3, extract_5_load, extract_5_store,
+ extract_5r_store, extract_5R_store, extract_10U_store,
+ extract_5Q_store, extract_11, extract_14, extract_16, extract_21,
+ extract_12, extract_17, extract_22): Prototype.
+ (print_insn_hppa): Rename inner block opcode -> opc to avoid
+ shadowing outer block.
+ (GET_BIT): Define.
- * mips-opc.c: Added tx39 insns sdbbp, rfe, and deret.
+2000-07-05 DJ Delorie <dj@redhat.com>
-Mon Sep 15 18:31:52 1997 Nick Clifton <nickc@cygnus.com>
+ * MAINTAINERS: new
- * v850-opc.c: Initialise processors field of v850_opcode structure.
+2000-07-04 Alexandre Oliva <aoliva@redhat.com>
-Wed Aug 27 21:42:39 1997 Ken Raeburn <raeburn@cygnus.com>
+ * arm-dis.c (print_insn_arm): Output combinations of PSR flags.
- Merge changes from Martin Hunt:
+2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
- * d30v-opc.c: Change mvfacc to accept 6-bit unsigned values.
+ * avr-dis.c (avr_operand): Change _ () to _() around all strings
+ marked for translation (exception from the usual coding style).
+ (print_insn_avr): Initialize insn2 to avoid warnings.
- * d30v-opc.c (pre_defined_registers): Add control registers from 0-63.
- (d30v_opcode_tabel): Add dbt, rtd, srah, and srlh instructions. Fix
- rot2h, sra2h, and srl2h to use new SHORT_A5S format.
+2000-07-03 Kazu Hirata <kazu@hxi.com>
- * d30v-dis.c (print_insn): Fix disassembly of SHORT_D2 opcodes.
+ * h8300-dis.c (bfd_h8_disassemble): Improve readability.
+ * h8500-dis.c: Fix formatting.
- * d30v-dis.c (print_insn): First operand of d*i (delayed
- branch) instructions is relative.
+2000-07-01 Alan Modra <alan@linuxcare.com.au>
- * d30v-opc.c (d30v_opcode_table): Change form for repeati.
- (d30v_operand_table): Add IMM6S3 type.
- (d30v_format_table): Change SHORT_D2. Add LONG_Db.
-
- * d30v-dis.c: Fix bug with ".s" and ".l" extensions
- and cmp instructions.
-
- * d30v-opc.c: Correct entries for repeat*, and sat*.
- Make IMM5 unsigned. Create IMM6U and IMM12S3U operand
- types. Correct several formats.
-
- * d30v-opc.c: (pre_defined_registers): Add dpsw and dpc.
-
- * d30v-opc.c (pre_defined_registers): Change control registers.
-
- * d30v-opc.c (d30v_format_table): Correct SHORT_C1 and
- SHORT_C2. Manual was incorrect.
-
- * d30v-dis.c (lookup_opcode): Return value now indicates
- if an opcode has a short and a long form. Used for deciding
- to append a ".s" or ".l".
- (print_insn): Append a ".s" to an instruction if it is
- the short form and ".l" if it is a long form. Do not append
- anything if the instruction has only one possible size.
-
- * d30v-opc.c: Change mulx2h to require an even register.
- New form: SHORT_A2; a SHORT_A form that needs an even
- register as the first operand.
-
- * d30v-dis.c (print_insn_d30v): Fix problem where the last
- instruction was not being disassembled if there were an odd
- number of instructions.
-
- * d30v-opc.c (SHORT_M2, LONG_M2): Two new forms.
-
-Fri Sep 12 11:43:54 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-dis.c (disassemble): Improved display of register lists.
-
-Thu Sep 11 17:35:10 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparc_opcodes): Fix assembler args to
- fzeros, fones, fsrc1, fsrc1s, fsrc2s, fnot1, fnot1s, fnot2s,
- fors, fnors, fands, fnands, fxors, fxnors, fornot1s, fornot2s,
- fandnot1s, fandnot2s.
-
-Tue Sep 9 10:03:49 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparc_opcodes): Fix op3 field for fcmpq/fcmpeq.
-
-Mon Sep 8 14:06:59 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * cgen-asm.c (cgen_parse_address): New argument resultp.
- All callers updated.
- * m32r-asm.c (parse_h_hi16): Right shift numbers by 16.
-
-Tue Sep 2 18:39:08 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-dis.c (disassemble): PC relative instructions are
- relative to the next instruction, not the current instruction.
-
-Tue Sep 2 15:41:55 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-dis.c (disassemble): Only signed extend values that are not
- returned by extract functions.
- Remove use of V850_OPERAND_ADJUST_SHORT_MEMORY flag.
-
-Tue Sep 2 15:39:40 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-opc.c: Update comments. Remove use of
- V850_OPERAND_ADJUST_SHORT_MEMORY. Fix several operand patterns.
-
-Tue Aug 26 09:42:28 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-opc.c (MOVHI): Immediate parameter is unsigned.
-
-Mon Aug 25 15:58:07 1997 Christopher Provenzano <proven@cygnus.com>
-
- * configure: Rebuilt with latest devo autoconf for NT support.
-
-Fri Aug 22 10:35:15 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-dis.c (disassemble): Use curly brace syntax for register
- lists.
-
- * v850-opc.c (v850_opcodes[]): Add NOT_R0 flag to decect cases
- where r0 is being used as a destination register.
-
-Thu Aug 21 11:09:09 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-opc.c (v850_opcodes[]): Move divh opcodes next to each other.
-
-Tue Aug 19 10:59:59 1997 Richard Henderson <rth@cygnus.com>
-
- * alpha-opc.c (alpha_opcodes): Fix hw_rei_stall mungage.
-
-Mon Aug 18 11:10:03 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-opc.c (v850_opcodes[]): Remove use of flag field.
- * v850-opc.c (v850_opcodes[]): Add support for reversed short load
- opcodes..
+ * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
+ (CLEANFILES): Add DEPA.
+ * Makefile.in: Regenerate.
-Mon Aug 18 11:08:25 1997 Nick Clifton <nickc@cygnus.com>
+2000-06-26 Scott Bambrough <scottb@netwinder.org>
- * configure (cgen_files): Add support for v850e target.
- * configure.in (cgen_files): Add support for v850e target.
+ * arm-dis.c (regnames): Add an additional register set to match
+ the set used by GCC. Make it the default.
-Mon Aug 18 11:08:25 1997 Nick Clifton <nickc@cygnus.com>
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
- * configure (cgen_files): Add support for v850ea target.
- * configure.in (cgen_files): Add support for v850ea target.
+ * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
+ find one.
+ * Makefile.in: Regenerate.
-Fri Aug 15 05:17:48 1997 Doug Evans <dje@canuck.cygnus.com>
+2000-06-20 H.J. Lu <hjl@gnu.org>
- * configure.in (bfd_arc_arch): Add.
- * configure: Rebuild.
- * Makefile.am (ALL_MACHINES): Add arc-dis.lo, arc-opc.lo.
+ * Makefile.am: Rebuild dependency.
* Makefile.in: Rebuild.
- * arc-dis.c, arc-opc.c: New files.
- * disassemble.c (ARCH_all): Define ARCH_arc.
- (disassembler): Add ARC support.
-
-Wed Aug 13 18:52:11 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850-dis.c (disassemble): Add support for v850EA instructions.
-
- * v850-opc.c (insert_i5div, extract_i5div): New Functions.
- (v850_opcodes): Add v850EA instructions.
-
- * v850-dis.c (disassemble): Add support for v850E instructions.
-
- * v850-opc.c (insert_d5_4, extract_d5_4, insert_d16_16,
- extract_d16_16, insert_i9, extract_i9, insert_u9, extract_u9,
- insert_spe, extract_spe): New Functions.
- (v850_opcodes): Add v850E instructions.
-
- * v850-opc.c: Reorganised and re-layed out to improve readability
- and portability.
-
-Tue Aug 5 23:09:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.12.1.
-
-Mon Aug 4 12:02:16 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4, configure: Rebuild with new automake patches.
-
-Fri Aug 1 13:02:04 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
- * acinclude.m4: Just include acinclude.m4 from BFD.
- * aclocal.m4, configure: Rebuild.
-
-Thu Jul 31 21:44:42 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am: New file, based on old Makefile.in.
- * acconfig.h: New file.
- * acinclude.m4: New file.
- * stamp-h.in: New file.
- * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL.
- Removed shared library handling; now handled by libtool. Replace
- AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AM_MAINTAINER_MODE,
- AM_CYGWIN32, and AM_EXEEXT. Replace AC_PROG_INSTALL with
- AM_PROG_INSTALL. Change all .o files to .lo. Remove stamp-h
- handling in AC_OUTPUT.
- * dep-in.sed: Change .o to .lo.
- * Makefile.in: Now built with automake.
- * aclocal.m4: Now built with aclocal.
- * config.in, configure: Rebuild.
-
-Mon Jul 28 21:52:24 1997 Jeffrey A Law (law@cygnus.com)
-
- * mips-opc.c: Fix typo/thinko in "eret" instruction.
-
-Thu Jul 24 13:03:26 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparc_opcodes): Fix spelling on fpaddX, fpsubX insns.
- Make array const.
- * sparc-dis.c (sorted_opcodes): New static local.
- (struct opcode_hash): `opcode' is pointer to const element.
- (build_hash): First arg is now table of sorted pointers.
- (print_insn_sparc): Sort opcodes by sorting table of pointers.
- (compare_opcodes): Update.
-
-Tue Jul 15 12:05:23 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * cgen-opc.c: #include <ctype.h>.
- (hash_keyword_name): New arg `case_sensitive_p'. Callers updated.
- Handle case insensitive hashing.
- (hash_keyword_value): Change type of `value' to unsigned int.
-
-Thu Jul 10 12:56:10 1997 Jeffrey A Law (law@cygnus.com)
-
- * mips-opc.c (mips_builtin_opcodes): If an insn uses single
- precision FP, mark it as such. Likewise for double precision
- FP. Mark ISA1 insns. Consolidate duplicate opcodes where
- possible.
-
-Wed Jun 25 15:25:57 1997 Felix Lee <flee@cirdan.cygnus.com>
-
- * ppc-opc.c (extract_nsi): make unsigned expression signed before
- negating it.
- (UNUSED): remove one level of parens, so MSVC doesn't choke on
- nesting depth when all the macros are expanded.
-
-Tue Jun 17 17:02:17 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * sparc-opc.c: The fcmp v9a instructions take an integer register
- as a destination, not a floating point register. From Christian
- Kuehnke <Christian.Kuehnke@arbi.Informatik.Uni-Oldenburg.DE>.
-
-Mon Jun 16 14:13:18 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-dis.c (print_insn_arg): Print case 7.2 using %pc@()
- syntax. From Roman Hodek
- <rnhodek@faui22c.informatik.uni-erlangen.de>.
-
- * i386-dis.c (twobyte_has_modrm): Fix pand.
-
-Mon Jun 16 14:08:38 1997 Michael Taylor <mbt@mit.edu>
-
- * i386-dis.c (dis386_twobyte): Fix pand and pandn.
-
-Tue Jun 10 11:26:47 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * arm-dis.c: Add prototypes for arm_decode_shift and
- print_insn_arm.
-
-Mon Jun 2 11:39:04 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips-opc.c: Add r3900 insns.
-
-Tue May 27 15:55:44 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * sh-dis.c (print_insn_shx): Change relmask to bfd_vma. Don't
- print delay slot instructions on the same line. When using a PC
- relative load, add a comment with the value being loaded if it can
- be obtained.
-
-Tue May 27 11:02:08 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c (dis386[], dis386_twobyte[]): change pushl/popl
- to pushS/popS for segment regs and byte constant so that
- pushw/popw printed when in 16 bit data mode.
-
- * i386-dis.c (dis386[]): change cwtl, cltd to cWtS, cStd to
- print cbtw, cwtd in 16 bit data mode.
- * i386-dis.c (putop): extra case W to support above.
-
- * i386-dis.c (print_insn_x86): print addr32 prefix when given
- address size prefix in 16 bit address mode.
-
-Fri May 23 16:47:23 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * sh-dis.c: Reindent. Rename local variable fprintf to
- fprintf_fn.
-
-Thu May 22 14:06:02 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r-opc.c (m32r_cgen_insn_table, cmpui): Undo patch of May 2.
-
-Tue May 20 11:26:27 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips-opc.c (mips_builtin_opcodes): Moved INSN_ISA field into new
- field membership.
- * mips16-opc.c (mip16_opcodes): same.
-
-Mon May 12 15:10:53 1997 Jim Wilson <wilson@cygnus.com>
-
- * m68k-opc.c (moveb): Change $d to %d.
-
-Mon May 5 14:28:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386-dis.c: (dis386_twobyte): Add MMX instructions.
- (twobyte_has_modrm): Likewise.
- (grps): Likewise.
- (OP_MMX, OP_EM, OP_MS): New static functions.
-
- * i386-dis.c: Revert patch of April 4. The output now matches
- what gcc generates.
-
-Fri May 2 12:48:37 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r-opc.c (m32r_cgen_insn_table, cmpui): Use $uimm16 instead
- of $simm16.
-
-Thu May 1 15:34:15 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r-opc.h (CGEN_ARCH): Renamed from CGEN_CPU.
-
-Tue Apr 15 12:40:08 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (install): Depend upon installdirs.
- (installdirs): New target.
-
-Mon Apr 14 12:13:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Thomas Graichen <graichen@rzpd.de>:
- * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
- * configure: Rebuild.
-
-Sun Apr 13 17:50:41 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * cgen-*.c, m32r-*.c: #include sysdep.h instead of config.h.
- Delete string{,s}.h support.
-
-Thu Apr 10 14:44:56 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * cgen-asm.c (cgen_parse_operand_fn): New global.
- (cgen_parse_{{,un}signed_integer,address}): Update call to
- cgen_parse_operand_fn.
- (cgen_init_parse_operand): New function.
- * m32r-asm.c (parse_insn_normal): cgen_init_parse_operand renamed
- from cgen_asm_init_parse.
- (m32r_cgen_assemble_insn): New operand `errmsg'.
- Delete call to as_bad, return error message to caller.
- (m32r_cgen_asm_hash_keywords): #if 0 out.
-
-Wed Apr 9 12:05:25 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-dis.c (print_insn_arg) [case 'd']: Print as address register,
- not data register.
- [case 'J']: Fix typo in register name.
-
-Mon Apr 7 16:48:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Substitute SHLIB_LIBS.
- * configure: Rebuild.
- * Makefile.in (SHLIB_LIBS): New variable.
- ($(SHLIB)): Use $(SHLIB_LIBS).
-
-Mon Apr 7 11:45:44 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * cgen-dis.c (build_dis_hash_table): Fix xmalloc size computation.
-
- * cgen-opc.c (hash_keyword_name): Improve algorithm.
-
- * disassemble.c (disassembler): Handle m32r.
-
-Fri Apr 4 12:29:38 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r-asm.c, m32r-dis.c, m32r-opc.c, m32r-opc.h: New files.
- * cgen-asm.c, cgen-dis.c, cgen-opc.c: New files.
- * Makefile.in (CFILES): Add them.
- (ALL_MACHINES): Add them.
- (dependencies): Regenerate.
- * configure.in (cgen_files): New variable.
- (bfd_m32r_arch): Add entry.
- * configure: Regenerate.
-
-Fri Apr 4 14:04:16 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Correct file names for bfd_mn10[23]00_arch.
- * configure: Rebuild.
-
- * Makefile.in: Rebuild dependencies.
-
- * d10v-dis.c: Include "ansidecl.h" before "opcode/d10v.h".
-
- * i386-dis.c (float_reg): Swap fsubrp and fsubp. Swap fdivrp and
- fdivp.
-
-Thu Apr 3 13:22:45 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Branched binutils 2.8.
-
-Wed Apr 2 12:23:53 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m10200-dis.c: Rename from mn10200-dis.c.
- * m10200-opc.c: Rename from mn10200-opc.c.
- * m10300-dis.c: Rename from mn10300-dis.c
- * m10300-opc.c: Rename from mn10300-opc.c.
- * Makefile.in: Update accordingly.
-
- * mips16-opc.c: Add mul and dmul macros.
-
-Tue Apr 1 16:27:45 1997 Klaus Kaempf <kkaempf@progis.de>
-
- * makefile.vms: Update CFLAGS, add clean target.
-
-Fri Mar 28 12:10:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-opc.c: Add "wait". From Ralf Baechle
- <ralf@gnu.ai.mit.edu>.
-
- * configure.in: Add stdlib.h to AC_CHECK_HEADERS list.
- * configure, config.in: Rebuild.
- * sysdep.h: Include <stdlib.h> if it exists.
- * sparc-dis.c: Include <stdio.h> and "sysdep.h". Don't include
- <string.h>.
- * Makefile.in: Rebuild dependencies.
-
-Thu Mar 27 14:24:43 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ppc-opc.c: Add PPC 403 instructions and extended opcodes. From
- Andrew Bray <andy@madhouse.demon.co.uk>.
-
- * mips-opc.c: Add cast when setting mips_opcodes.
-
-Tue Mar 25 23:04:00 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * v850-dis.c (disassemble): Fix sign extension problem.
- * v850-opc.c (extract_d*): Fix sign extension problems to make
- disassembly calculate branch offsets correctly.
-
-Mon Mar 24 13:22:13 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * sh-opc.h: Add bf/s and bt/s as synonyms for bf.s and bt.s.
-
- * mips-opc.c: Add dctr and dctw.
-
-Sun Mar 23 18:08:10 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d30v-dis.c (print_insn): Change the way signed constants
- are displayed.
-
-Fri Mar 21 14:37:52 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (BFD_H): New variable.
- (HFILES): New variable.
- (CFILES): Add all C files.
- (.dep, .dep1, dep.sed, dep, dep-in): New targets.
- Delete old dependencies, and build new ones.
- * dep-in.sed: New file.
-
-Thu Mar 20 19:03:30 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * m68k-opc.c (m68k_opcode_aliases): Added blo and blo{s,b,w,l}.
-
-Tue Mar 18 14:17:03 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-opc.c: Change "trap" to "syscall".
- * mn10300-opc.c: Add new "syscall" instruction.
-
-Mon Mar 17 08:48:03 1997 J.T. Conklin <jtc@beauty.cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): Provide correct entries for mulsl and
- mulul insns on the coldfire.
-
-Sat Mar 15 17:13:05 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * arm-dis.c (print_insn_arm): Don't print instruction bytes.
- (print_insn_big_arm): Set bytes_per_chunk and display_endian.
- (print_insn_little_arm): Likewise.
-
-Fri Mar 14 15:08:59 1997 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patches from H.J. Lu <hjl@lucon.org>:
- * i386-dis.c (fetch_data): Add prototype.
- * m68k-dis.c (fetch_data): Add prototype.
- (dummy_print_address): Add prototype. Make static.
- * ppc-opc.c (valid_bo): Add prototype.
- * sparc-dis.c (build_hash_table): Add prototype.
- (is_delayed_branch, compute_arch_mask): Add prototypes.
- (print_insn_sparc): Make several local variables const.
- (compare_opcodes): Change arguments to const PTR. Add prototype.
- * sparc-opc.c (arg): Change name field to be const.
- (lookup_name, lookup_value): Add prototypes. Change table and
- name parameters to be const.
- (sparc_encode_asi): Change name parameter to be const.
- (sparc_encode_membar, sparc_encode_prefetch): Likewise.
- (sparc_encode_sparclet_cpreg): Likewise.
- (sparc_decode_asi): Change return type to be const.
- (sparc_decode_membar, sparc_decode_prefetch): Likewise.
- (sparc_decode_sparclet_cpreg): Likewise.
-
-Fri Mar 7 10:51:49 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
- Solaris doesn't like the combined options, and the -f is
- unnecessary.
- (stamp-tshlink, install): Likewise.
-
-Thu Mar 6 16:51:11 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (IMM16_PCREL, SD8N_PCREL, D16_SHIFT): Mark these
- as relaxable.
-
-Tue Mar 4 06:10:36 1997 J.T. Conklin <jtc@cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): Fix last change for the mc68010.
-
-Mon Mar 3 07:45:20 1997 J.T. Conklin <jtc@cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): Added entries for the tst insns on
- the mc68000.
-
-Thu Feb 27 14:04:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * m68k-opc.c (m68k_opcodes): Added swbegl pseudo-instruction.
-
-Thu Feb 27 11:36:41 1997 Michael Meissner <meissner@cygnus.com>
-
- * tic80-dis.c (print_insn_tic80): Set info->bytes_per_line to 8.
-
-Wed Feb 26 15:34:48 1997 Michael Meissner <meissner@cygnus.com>
-
- * tic80-opc.c (tic80_predefined_symbols): Define r25 properly.
-
-Wed Feb 26 13:38:30 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-dis.c (NEXTSINGLE, NEXTDOUBLE, NEXTEXTEND): Use
- floatformat_to_double to make portable.
- (print_insn_arg): Use NEXTEXTEND macro when extracting extended
- precision float.
-
-Mon Feb 24 19:26:12 1997 Dawn Perchik <dawn@cygnus.com>
-
- * mips-opc.c: Initialize mips_opcodes to mips_builtin_opcodes,
- and bfd_mips_num_opcodes to bfd_mips_num_builtin_opcodes.
-
-Mon Feb 24 15:19:01 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-dis.c, d10v-opc.c: Change pre_defined_registers to
- d10v_predefined_registers and reg_name_cnt to d10v_reg_name_cnt.
-
-Mon Feb 24 14:33:26 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (LSI_SCALED): Renamed from this ...
- (OFF_SL_BR_SCALED): ... to this, and added the flag
- TIC80_OPERAND_BASEREL to the flags word.
- (tic80_opcodes): Replace all occurances of LSI_SCALED with
- OFF_SL_BR_SCALED.
-
-Sat Feb 22 21:25:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * mips-opc.c: Add macros for cop0, cop1 cop2 and cop3.
- Change mips_opcodes from const array to a pointer,
- and change bfd_mips_num_opcodes from const int to int,
- so that we can increase the size of the mips opcodes table
- dynamically.
-
-Sat Feb 22 21:03:47 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_predefined_symbols): Revert change to
- store BITNUM values in the table in one's complement form
- to match behavior when assembler is given a raw numeric
- value for a BITNUM operand.
- * tic80-dis.c (print_operand_bitnum): Ditto.
-
-Fri Feb 21 16:31:18 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d30v-opc.c: Removed references to FLAG_X.
-
-Wed Feb 19 14:51:20 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in: Add dependencies on ../bfd/bfd.h as required.
-
-Tue Feb 18 17:43:43 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * Makefile.in: Added d30v object files.
- * configure: (bfd_d30v_arch) Rebuilt.
- * configure.in: (bfd_d30v_arch) Added new case.
- * d30v-dis.c: New file.
- * d30v-opc.c: New file.
- * disassemble.c (disassembler) Add entry for d30v.
-
-Tue Feb 18 16:32:08 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_predefined_symbols): Add symbolic
- representations for the floating point BITNUM values.
-
-Fri Feb 14 12:14:05 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_predefined_symbols): Store BITNUM values
- in the table in one's complement form, as they appear in the
- actual instruction.
- (tic80_symbol_to_value): Use macros to access predefined
- symbol fields.
- (tic80_value_to_symbol): Ditto.
- (tic80_next_predefined_symbol): New function.
- * tic80-dis.c (print_operand_bitnum): Remove code that did
- one's complement for BITNUM values.
-
-Thu Feb 13 21:56:51 1997 Klaus Kaempf <kkaempf@progis.de>
-
- * makefile.vms: Remove 8 bit characters. Update to latest
- gcc release.
-
-Thu Feb 13 20:41:22 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * m68k-opc.c (m68k_opcodes): Add swbeg pseudo-instruction.
-
-Thu Feb 13 16:30:02 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-opc.c (IMM16_PCREL): This is a signed operand.
- (IMM24_PCREL): Likewise.
-
-Thu Feb 13 13:28:43 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (print_mips16_insn_arg): Use memaddr - 2 as the base
- address for an extended PC relative instruction that is not a
- branch.
-
-Wed Feb 12 12:27:40 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-dis.c (print_insn_m68k): Set bytes_per_chunk and
- bytes_per_line.
-
-Tue Feb 11 16:36:31 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_operands): Fix typo '+' -> '|'.
- (tic80_opcodes): Sort entries so that long immediate forms
- come after short immediate forms, making it easier for
- assembler to select the right one for a given operand.
-
-Tue Feb 11 15:26:47 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (_print_insn_mips): Set bytes_per_chunk and
- display_endian.
- (print_insn_mips16): Likewise.
-
-Mon Feb 10 10:12:41 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_symbol_to_value): Changed to accept
- a symbol class that restricts translation to just that
- class (general register, condition code, etc).
-
-Thu Feb 6 17:34:09 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_operands): Add REG_0_E, REG_22_E,
- and REG_DEST_E for register operands that have to be
- an even numbered register. Add REG_FPA for operands that
- are one of the floating point accumulator registers.
- Add TIC80_OPERAND_MASK to flags for ENDMASK operand.
- (tic80_opcodes): Change entries that need even numbered
- register operands to use the new operand table entries.
- Add "or" entries that are identical to "or.tt" entries.
-
-Wed Feb 5 11:12:44 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips16-opc.c: Add new cases of exit instruction for
- disassembler.
- * mips-dis.c (print_mips16_insn_arg): Display floating point
- registers in operands of exit instruction. Print `$' before
- register names in operands of entry and exit instructions.
-
-Thu Jan 30 14:09:03 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_predefined_symbols): Table of name/value
- pairs for all predefined symbols recognized by the assembler.
- Also used by the disassembling routines.
- (tic80_symbol_to_value): New function.
- (tic80_value_to_symbol): New function.
- * tic80-dis.c (print_operand_control_register,
- print_operand_condition_code, print_operand_bitnum):
- Remove private tables and use tic80_value_to_symbol function.
-
-Thu Jan 30 11:30:45 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-dis.c (print_operand): Change address printing
- to correctly handle PC wrapping. Fixes PR11490.
-
-Wed Jan 29 09:39:17 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-opc.c (mn10200_operands): Make 8 and 16 bit pc-relative
- branches relaxable.
-
-Tue Jan 28 15:57:34 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (print_insn_mips16): Set insn_info information.
- (print_mips16_insn_arg): Likewise.
-
- * mips-dis.c (print_insn_mips16): Better handling of an extend
- opcode followed by an instruction which can not be extended.
-
-Fri Jan 24 12:08:21 1997 J.T. Conklin <jtc@cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): Changed operand specifier for the
- coldfire moveb instruction to not allow an address register as
- destination. Although the documentation does not indicate that
- this is invalid, experiments uncovered unexpected behavior.
- Added a comment explaining the situation. Thanks to Andreas
- Schwab for pointing this out to me.
-
-Wed Jan 22 20:13:51 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_opcodes): Expand comment to note that the
- entries are presorted so that entries with the same mnemonic are
- adjacent to each other in the table. Sort the entries for each
- instruction so that this is true.
-
-Mon Jan 20 12:48:57 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-dis.c: Include <libiberty.h>.
- (print_insn_m68k): Sort the opcode table on the most significant
- nibble of the opcode.
-
-Sat Jan 18 15:15:05 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-dis.c (tic80_opcodes): Add "wrcr", "vmpy", "vrnd",
- "vsub", "vst", "xnor", and "xor" instructions.
- (V_a1): Renamed from V_a, msb of accumulator reg number.
- (V_a0): Add macro, lsb of accumulator reg number.
-
-Fri Jan 17 18:24:31 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-dis.c (print_insn_tic80): Broke excessively long
- function up into several smaller ones and arranged for
- the instruction printing function to be callable recursively
- to print vector instructions that have both a load and a
- math instruction packed into a single opcode.
- * tic80-opc.c (tic80_opcodes): Expand comment for vld opcode
- to explain why it comes after the other vector opcodes.
-
-Fri Jan 17 16:19:15 1997 J.T. Conklin <jtc@beauty.cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): add b, w, or l specifier to coldfire
- move insns to handle immediate operands.
-
-Thu Jan 17 16:19:00 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-opc.c (m68k_opcodes): Delete duplicate entry for "cmpil".
- fix operand mask in the "moveml" entries for the coldfire.
-
-Thu Jan 16 20:54:40 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (V_a, V_m, V_S, V_Z, V_p, OP_V, MASK_V):
- New macros for building vector instruction opcodes.
- (tic80_opcodes): Remove all uses of FMT_SI, FMT_REG, and
- FMT_LI, which were unused. The field is now a flags field.
- Remove some opcodes that are possible, but illegal, such
- as long immediate instructions with doubles for immediate
- values. Add "vadd" and "vld" instructions.
-
-Wed Jan 15 18:59:51 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (tic80_operands): Reorder some table entries to make
- the order more logical. Move the shift alias instructions ("rotl",
- "shl", "ins", "rotr", "extu", "exts", "srl", and "sra" to be
- interspersed with the regular sr.x and sl.x instructions. Add
- and test new instruction opcodes for "sl", "sli", "sr", "sri", "st",
- "sub", "subu", "swcr", and "trap".
-
-Tue Jan 14 19:42:50 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-opc.c (OFF_SS_PC): Renamed from OFF_SS.
- (OFF_SL_PC): Renamed from OFF_SL.
- (OFF_SS_BR): New operand type for base relative operand.
- (OFF_SL_BR): New operand type for base relative operand.
- (REG_BASE): New operand type for base register operand.
- (tic80_opcodes): Add and test "fmpy", "frndm", "frndn", "frndp",
- "frndz", "fsqrt", "fsub", "illop0", "illopF", "ins", "jsr",
- "ld", "ld.u", "lmo", "or", "rdcr", "rmo", "rotl", and "rotr"
- instructions.
- * tic80-dis.c (print_insn_tic80): Print opcode name with fixed width
- 10 char field, padded with spaces on rhs, rather than a string
- followed by a tab. Use renamed TIC80_OPERAND_PCREL flag bit rather
- than old TIC80_OPERAND_RELATIVE. Add support for new
- TIC80_OPERAND_BASEREL flag bit.
-
-Mon Jan 13 15:58:56 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-dis.c (print_insn_tic80): Print floating point operands
- as floats.
- * tic80-opc.c (SPFI): Add single precision floating point
- immediate operand type.
- (ROTATE): Add rotate operand type for shifts.
- (ENDMASK): Add for shifts.
- (n): Macro for the 'n' bit.
- (i): Macro for the 'i' bit.
- (PD): Macro for the 'PD' field.
- (P2): Macro for the 'P2' field.
- (P1): Macro for the 'P1' field.
- (tic80_opcodes): Add entries for "exts", "extu", "fadd",
- "fcmp", and "fdiv".
-
-Mon Jan 6 15:06:55 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-dis.c (disassemble): Mask off unwanted bits after
- adding in current address for pc-relative operands.
-
-Mon Jan 6 10:56:25 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-dis.c (R_SCALED): Add macro to test for ":s" modifier bit.
- (print_insn_tic80): If R_SCALED then print ":s" modifier for operand.
- * tic80-opc.c (REG0, REG22, REG27, SSOFF, LSOFF): Names
- changed to REG_0, REG_22, REG_DEST, OFF_SS, OFF_SL respectively.
- (SICR, LICR, REGM_SI, REGM_LI): Names changed to CR_SI, CR_LI,
- REG_BASE_M_SI, REG_BASE_M_LI respectively.
- (REG_SCALED, LSI_SCALED): New operand types.
- (E): New macro for 'E' bit at bit 27.
- (tic80_opcodes): Add and test dld, dld.u, dst, estop, and etrap
- opcodes, including the various size flavors (b,h,w,d) for
- the direct load and store instructions.
-
-Sun Jan 5 12:18:14 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-dis.c (M_SI, M_LI): Add macros to test for ":m" modifier bit
- in an instruction.
- * tic80-dis.c (print_insn_tic80): Change comma and paren handling.
- Use M_SI and M_LI macros to check for ":m" modifier for GPR operands.
- * tic80-opc.c (tic80_operands): Add REGM_SI and REGM_LI operands.
- (F, M_REG, M_LI, M_SI, SZ_REG, SZ_LI, SZ_SI, D, S): New bit-twiddlers.
- (MASK_LI_M, MASK_SI_M, MASK_REG_M): Remove and replace in opcode
- masks with "MASK_* & ~M_*" to get the M bit reset.
- (tic80_opcodes): Add bsr, bsr.a, cmnd, cmp, dcachec, and dcachef.
-
-Sat Jan 4 19:05:05 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80-dis.c (print_insn_tic80): Print TIC80_OPERAND_RELATIVE
- correctly. Add support for printing TIC80_OPERAND_BITNUM and
- TIC80_OPERAND_CC, and TIC80_OPERAND_CR operands in symbolic
- form.
- * tic80-opc.c (tic80_operands): Add SSOFF, LSOFF, BITNUM,
- CC, SICR, and LICR table entries.
- (tic80_opcodes): Add and test "nop", "br", "bbo", "bbz",
- "bcnd", and "brcr" opcodes.
-
-Fri Jan 3 18:32:11 1997 Fred Fish <fnf@cygnus.com>
-
- * ppc-opc.c (powerpc_operands): Make comment match the
- actual fields (no shift field).
- * sparc-opc.c (sparc_opcodes): Document why this cannot be "const".
- * tic80-dis.c (print_insn_tic80): Replace abort stub with a
- partial implementation, work in progress.
- * tic80-opc.c (tic80_operands): Begin construction operands table.
- (tic80_opcodes): Continue populating opcodes table and start
- filling in the operand indices.
- (tic80_num_opcodes): Add this.
-
-Fri Jan 3 12:13:52 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: Add #B case for moveq.
-
-Thu Jan 2 12:14:29 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-dis.c (disassemble): Make sure all variables are initialized
- before they are used.
-
-Tue Dec 31 12:20:38 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (v850_opcodes): Put curly-braces around operands
- for "breakpoint" instruction.
-
-Tue Dec 31 15:38:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
- (dep): Use ALL_CFLAGS rather than CFLAGS.
-
-Tue Dec 31 15:09:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * v850-opc.c (D8_{6,7}): Set V850_OPERAND_ADJUST_SHORT_MEMORY
- flag.
-
-Mon Dec 30 17:02:11 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (m68k-opc.o, alpha-opc.o): Remove dis-asm.h dependency.
- (tic80-dis.o, tic80-opc.o): Add rules per comment in Makefile.in.
-
-Mon Dec 30 11:38:01 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips16-opc.c: Add "abs".
-
-Sun Dec 29 10:58:22 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (ALL_MACHINES): Add tic80-dis.o and tic80-opc.o.
- * disassemble.c (ARCH_tic80): Define if ARCH_all is defined.
- (disassembler): Add bfd_arch_tic80 support to set disassemble
- to print_insn_tic80.
- * tic80-dis.c (print_insn_tic80): Add stub.
-
-Fri Dec 27 22:30:57 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in (arch in $selarchs): Add bfd_tic80_arch entry.
- * configure: Regenerate with autoconf.
- * tic80-dis.c: Add file.
- * tic80-opc.c: Add file.
-
-Fri Dec 20 14:30:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c (pre_defined_registers): Add cr[0-15], dpc, dpsw, link.
-
-Mon Dec 16 13:00:15 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-opc.c (mn10200_operands): Add SIMM16N.
- (mn10200_opcodes): Use it for some logicals and btst insns.
- Add "break" and "trap" instructions.
-
- * mn10300-opc.c (mn10300_opcodes): Add "break" instruction.
-
- * mn10200-opc.c: Add pseudo-ops for "mov (an),am" and "mov an,(am)".
-
-Sat Dec 14 22:36:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (print_mips16_insn_arg): The base address of a PC
- relative load or add now depends upon whether the instruction is
- in a delay slot.
-
-Wed Dec 11 09:23:46 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-dis.c: Finish writing disassembler.
- * mn10200-opc.c (mn10200_opcodes): Fix mask for "mov imm8,dn".
- Fix mask for "jmp (an)".
-
- * mn10300-dis.c (disassemble, print_insn_mn10300): Corrently
- handle endianness issues for mn10300.
-
- * mn10200-opc.c (mn10200_opcodes): Fix operands for "movb dm,(an)".
-Tue Dec 10 12:08:05 1996 Jeffrey A Law (law@cygnus.com)
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
- * mn10200-opc.c (mn10200_opcodes): "mov imm8,d0" is a format 2
- instruction. Fix opcode field for "movb (imm24),dn".
+ * Makefile.in, configure: regenerate
+ * disassemble.c (disassembler): Recognize ARCH_m68hc12,
+ ARCH_m68hc11.
+ * m68hc11-dis.c (read_memory, print_insn, print_insn_m68hc12):
+ New functions.
+ * configure.in: Recognize m68hc12 and m68hc11.
+ * m68hc11-dis.c, m68hc11-opc.c: New files for support of m68hc1x
+ * Makefile.am (CFILES, ALL_MACHINES): New files for disassembly
+ and opcode generation for m68hc11 and m68hc12.
- * mn10200-opc.c (mn10200_operands): Fix insertion position
- for DI operand.
+2000-06-16 Nick Duffek <nsd@redhat.com>
-Mon Dec 9 16:42:43 1996 Jeffrey A Law (law@cygnus.com)
+ * disassemble.c (disassembler): Refer to the PowerPC 620 using
+ bfd_mach_ppc_620 instead of 620.
- * mn10200-opc.c: Create mn10200 opcode table.
- * mn10200-dis.c: Flesh out mn10200 disassembler. Not ready,
- but moving along nicely.
+2000-06-12 Kazu Hirata <kazu@hxi.com>
-Sun Dec 8 04:28:31 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+ * h8300-dis.c: Fix formatting.
+ (bfd_h8_disassemble): Distinguish adds/subs, inc/dec.[wl]
+ correctly.
- * Makefile.in (ALL_MACHINES): Add mips16-opc.o.
+2000-06-09 Denis Chertykov <denisc@overta.ru>
-Fri Dec 6 16:47:40 1996 J.T. Conklin <jtc@rhino.cygnus.com>
+ * avr-dis.c (avr_operand): Bugfix for jmp/call address.
- * m68k-opc.c (m68k_opcodes): Revert change to use < and >
- specifiers for fmovem* instructions.
+2000-06-07 Denis Chertykov <denisc@overta.ru>
-Fri Dec 6 14:48:09 1996 Jeffrey A Law (law@cygnus.com)
+ * avr-dis.c: completely rewritten.
- * mn10300-dis.c (disassemble): Remove '$' register prefixing.
+2000-06-02 Kazu Hirata <kazu@hxi.com>
-Fri Dec 6 17:34:39 1996 Ian Lance Taylor <ian@cygnus.com>
+ * h8300-dis.c: Follow the GNU coding style.
+ (bfd_h8_disassemble) Fix a typo.
- * mips16-opc.c: Change opcode for entry/exit to avoid conflicting
- with dsrl.
+2000-06-01 Kazu Hirata <kazu@hxi.com>
-Fri Dec 6 14:48:09 1996 Jeffrey A Law (law@cygnus.com)
+ * h8300-dis.c (bfd_h8_disassemble_init): Fix a typo.
+ (bfd_h8_disassemble): Distinguish the operand size of inc/dev.[wl]
+ correctly. Fix a typo.
- * mn10300-opc.c: Add some comments explaining the various
- operands and such.
+2000-05-31 Nick Clifton <nickc@redhat.com>
- * mn10300-dis.c (disassemble): Fix minor gcc -Wall warnings.
+ * opintl.h (_(String)): Explain why dgettext is used instead of
+ gettext.
-Thu Dec 5 12:09:48 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+2000-05-30 Nick Clifton <nickc@redhat.com>
- * m68k-dis.c (print_insn_arg): Handle new < and > operand
- specifiers.
+ * opintl.h (gettext, dgettext, dcgettext, textdomain,
+ bindtextdomain): Replace defines with those from intl/libgettext.h
+ to quieten gcc warnings.
- * m68k-opc.c (m68k_opcodes): Simplify table by using < and >
- operand specifiers in fmovm* instructions.
+2000-05-26 Alan Modra <alan@linuxcare.com.au>
-Wed Dec 4 14:52:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ppc-opc.c (insert_li): Give an error if the offset has the two
- least significant bits set.
-
-Wed Nov 27 13:09:01 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (print_insn_mips16): Separate the instruction from
- the arguments with a tab, not a space.
-
-Tue Nov 26 13:24:17 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-dis.c (disasemble): Finish conversion to '$' as
- register prefix.
-
- * mn10300-opc.c (mn10300_opcodes): Fix mask field for
- mov am,(imm32,sp).
-
-Tue Nov 26 10:53:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.12.
-
- Add support for mips16 (16 bit MIPS implementation):
- * mips16-opc.c: New file.
- * mips-dis.c: Include "elf-bfd.h" and "elf/mips.h".
- (mips16_reg_names): New static array.
- (print_insn_big_mips): Use print_insn_mips16 in 16 bit mode or
- after seeing a 16 bit symbol.
- (print_insn_little_mips): Likewise.
- (print_insn_mips16): New static function.
- (print_mips16_insn_arg): New static function.
- * mips-opc.c: Add jalx instruction.
- * Makefile.in (mips16-opc.o): New target.
- * configure.in: Use mips16-opc.o for bfd_mips_arch.
- * configure: Rebuild.
-
-Mon Nov 25 16:15:17 1996 J.T. Conklin <jtc@cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): Simplify table by using < and >
- operand specifiers in *save, *restore and movem* instructions.
-
- * m68k-opc.c (m68k_opcodes): Fix move and movem instructions for
- the coldfire.
-
- * m68k-opc.c (m68k_opcodes): The coldfire (mcf5200) can only use
- register operands for immediate arithmetic, not, neg, negx, and
- set according to condition instructions.
-
- * m68k-opc.c (m68k_opcodes): Consistantly Use "s" as the storage
- specifier of the effective-address operand in immediate forms of
- arithmetic instructions. The specifier for the immediate operand
- notes how and where the constant will be stored.
-
-Mon Nov 25 11:17:01 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_opcodes): Remove redundant "lcc"
- opcode.
-
- * mn10300-dis.c (disassemble): Use '$' instead of '%' for
- register prefix.
-
- * mn10300-dis.c (disassemble): Prefix registers with '%'.
-
-Wed Nov 20 10:37:13 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-dis.c (disassemble): Handle register lists.
-
- * mn10300-opc.c: Fix handling of register list operand for
- "call", "ret", and "rets" instructions.
-
- * mn10300-dis.c (disassemble): Print PC-relative and memory
- addresses symbolically if possible.
- * mn10300-opc.c: Distinguish between absolute memory addresses,
- pc-relative offsets & random immediates.
-
- * mn10300-dis.c (print_insn_mn10300): Fix fetch of last byte
- in 7 byte insns.
- (disassemble): Handle SPLIT and EXTENDED operands.
-
-Tue Nov 19 13:33:01 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-dis.c: Rough cut at printing some operands.
-
- * mn10300-dis.c: Start working on disassembler support.
- * mn10300-opc.c (mn10300_opcodes): Fix masks on several insns.
-
- * mn10300-opc.c (mn10300_operands): Add "REGS" for a register
- list.
- (mn10300_opcodes): Use REGS for register list in "movm" instructions.
-
-Mon Nov 18 15:20:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * d10v-opc.c (d10v_opcodes): Add3 sets the carry.
-
-Fri Nov 15 13:43:19 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_opcodes): Demand parens around
- register argument is calls and jmp instructions.
-
-Thu Nov 7 00:26:05 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_opcodes): Use DN01 for putx and
- getx operand. Fix opcode for mulqu imm,dn.
-
-Wed Nov 6 13:42:32 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_operands): Hijack "bits" field
- in MN10300_OPERAND_SPLIT operands for how many bits
- appear in the basic insn word. Add IMM32_HIGH24,
- IMM32_HIGH24_LOWSHIFT8, IMM8E_SHIFT8.
- (mn10300_opcodes): Use new operands as needed.
-
- * mn10300-opc.c (mn10300_operands): Add IMM32_LOWSHIFT8
- for bset, bclr, btst instructions.
- (mn10300_opcodes): Use new IMM32_LOWSHIFT8 as needed.
-
- * mn10300-opc.c (mn10300_operands): Remove many redundant
- operands. Update opcode table as appropriate.
- (IMM32): Add MN10300_OPERAND_SPLIT flag.
- (mn10300_opcodes): Fix single bit error in mov imm32,dn insn.
-
-Tue Nov 5 13:26:58 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_operands): Add DN2, DM2, AN2, AM2
- operands (for indexed load/stores). Fix bitpos for DI
- operand. Add SN8N_SHIFT8, IMM8_SHIFT8, and D16_SHIFT for the
- few instructions that insert immediates/displacements in the
- middle of the instruction. Add IMM8E for 8 bit immediate in
- the extended part of an instruction.
- (mn10300_operands): Use new opcodes as appropriate.
-
-Tue Nov 5 10:30:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c (d10v_opcodes): Declare the trap instruction
- sequential so the assembler never parallelizes it with
- other instructions.
-
-Mon Nov 4 12:50:40 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_operands): Add DN01 and AN01 for
- a data/address register that appears in register field 0
- and register field 1.
- (mn10300_opcodes): Use DN01 and AN01 for mov/cmp imm8,DN/AN
-
-Fri Nov 1 10:29:11 1996 Richard Henderson <rth@tamu.edu>
-
- * alpha-dis.c (print_insn_alpha): Use new NOPAL mask for
- standard disassembly.
-
- * alpha-opc.c (alpha_operands): Rearrange flags slot.
- (alpha_opcodes): Add new BWX, CIX, and MAX instructions.
- Recategorize PALcode instructions.
-
-Wed Oct 30 16:46:58 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (v850_opcodes): Add relaxing "jbr".
-
-Tue Oct 29 16:30:28 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (_print_insn_mips): Don't print a trailing tab if
- there are no operand types.
-
-Tue Oct 29 12:22:21 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (D9_RELAX): Renamed from D9, all references
- changed.
- (v850_operands): Make sure D22 immediately follows D9_RELAX.
-
-Fri Oct 25 12:12:53 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i386-dis.c (print_insn_x86): Set info->bytes_per_line to 5.
-
-Thu Oct 24 17:53:52 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (insert_d8_6): Fix operand insertion for sld.w
- and sst.w instructions.
-
- * v850-opc.c (v850_opcodes): Add "jCC" instructions (aliases for
- "bCC"instructions).
-
-Thu Oct 24 17:21:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (_print_insn_mips): Use a tab between the instruction
- and the arguments.
-
-Tue Oct 22 23:32:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ppc-opc.c (PPCPWR2): Define.
- (powerpc_opcodes): Use PPCPWR2 for fsqrt, rather than duplicating
- it.
-
-Fri Oct 11 16:03:49 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_opcodes): Fix typo in opcode
- field for movhu instruction.
-
- * v850-dis.c (disassemble): For V850_OPERAND_SIGNED operands,
- cast value to "long" not "signed long" to keep hpux10
- compiler quiet.
-
-Thu Oct 10 10:25:58 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_opcodes): Fix typo in opcode field
- for mov (abs16),DN.
-
- * mn10300-opc.c (FMT*): Remove definitions.
-
- * mn10300-opc.c (mn10300_opcodes): Fix destination register
- for shift-by-register opcodes.
-
- * mn10300-opc.c (mn10300_operands): Break DN, DM, AN, AM
- into [AD][MN][01] for encoding the position of the register
- in the opcode.
-
-Wed Oct 9 11:19:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_opcodes): Add "extended" instructions,
- "putx", "getx", "mulq", "mulqu", "sat16", "sat24", "bsch".
-
-Tue Oct 8 11:55:35 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (mn10300_operands): Remove "REGS" operand.
- Fix various typos. Add "PAREN" operand.
- (MEM, MEM2): Define.
- (mn10300_opcodes): Surround all memory addresses with "PAREN"
- operands. Fix several typos.
-
- * mn10300-opc.c (mn10300_opcodes): Fix typos in yesterday's
- changes.
-
-Mon Oct 7 16:48:45 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-opc.c (FMT_XX): Renumber starting at one.
- (mn10300_operands): Rough cut. Enough to parse "mov" instructions
- at this time.
- (mn10300_opcodes): Break opcode format out into its own field.
- Update many operand fields to deal with signed vs unsigned
- issues. Fix one or two typos in the "mov" instruction
- opcode, mask and/or operand fields.
-
-Mon Oct 7 11:39:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-opc.c (plusha): Prefer encoding for m68040up, in case
- m68851 wasn't reset.
-
-Thu Oct 3 17:17:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mn10300-opc.c (mn10300_opcodes): Add opcode & masks for
- all opcodes. Very rough cut at operands for all opcodes.
-
- * mn10300-opc.c (mn10300_opcodes): Start fleshing out the
- opcode table.
-
-Thu Oct 3 10:06:07 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-opc.c, mn10300-opc.c: New files.
- * mn10200-dis.c, mn10300-dis.c: New files.
- * mn10x00-opc.c, mn10x00-dis.c: Deleted.
- * disassemble.c: Break mn10x00 support into 10200 and 10300
- support.
- * configure.in: Likewise.
- * configure: Rebuilt.
-
-Thu Oct 3 15:59:12 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (MOSTLYCLEAN): Move config.log to distclean.
-
-Wed Oct 2 23:28:42 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10x00-opc.c, mn10x00-dis.c: New files for Matsushita
- MN10x00 processors.
- * disassemble (ARCH_mn10x00): Define.
- (disassembler): Handle bfd_arch_mn10x00.
- * configure.in: Recognize bfd_mn10x00_arch.
- * configure: Rebuilt.
-
-Tue Oct 1 10:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i386-dis.c (op_rtn): Change to be a pointer. Adjust uses
- accordingly. Don't declare functions using op_rtn.
-
-Fri Sep 27 18:28:59 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * v850-dis.c (disassemble): Add memaddr argument. Re-arrange
- params to be more standard.
- * (disassemble): Print absolute addresses and symbolic names for
- branch and jump targets.
- * v850-opc.c (v850_operand): Add displacement flag to 9 and 22
- bit operands.
- * (v850_opcodes): Add breakpoint insn.
-
-Mon Sep 23 12:32:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: Move the fmovemx data register cases before the
- other cases, so that they get recognized before the data register
- does gets treated as a degenerate register list.
-
-Tue Sep 17 12:06:51 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-opc.c: Add a case for "div" and "divu" with two registers
- and a destination of $0.
-
-Tue Sep 10 16:12:39 1996 Fred Fish <fnf@rtl.cygnus.com>
-
- * mips-dis.c (print_insn_arg): Add prototype.
- (_print_insn_mips): Ditto.
-
-Mon Sep 9 14:26:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (print_insn_arg): Print condition code registers as
- $fccN.
-
-Tue Sep 3 12:09:46 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparc_opcodes): Add setuw, setsw, setx.
-
-Tue Sep 3 12:05:25 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-dis.c (disassemble): Make static. Provide prototype.
-
-Sun Sep 1 22:30:40 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (insert_d9, insert_d22): Fix boundary case
- in range checks.
-
-Sat Aug 31 01:27:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-dis.c (disassemble): Handle insertion of ',', '[' and
- ']' characters into the output stream.
- * v850-opc.c (v850_opcodes: Remove size field from all opcodes.
- Add "memop" field to all opcodes (for the disassembler).
- Reorder opcodes so that "nop" comes before "mov" and "jr"
- comes before "jarl".
-
- * v850-dis.c (print_insn_v850): Fix typo in last change.
-
- * v850-dis.c (print_insn_v850): Properly handle disassembling
- a two byte insn at the end of a memory region when the memory
- region's size is only two byte aligned.
-
- * v850-dis.c (v850_cc_names): Fix stupid thinkos.
-
- * v850-dis.c (v850_reg_names): Define.
- (v850_sreg_names, v850_cc_names): Likewise.
- (disassemble): Very rough cut at printing operands (unformatted).
-
- * v850-opc.c (BOP_MASK): Fix.
- (v850_opcodes): Fix mask for jarl and jr.
-
- * v850-dis.c: New file. Skeleton for disassembler support.
- * Makefile.in Remove v850 references, they're not needed here.
- * configure.in: Add v850-dis.o when building v850 toolchains.
- * configure: Rebuilt.
- * disassemble.c (disassembler): Call v850 disassembler.
-
- * v850-opc.c (insert_d8_7, extract_d8_7): New functions.
- (insert_d8_6, extract_d8_6): New functions.
- (v850_operands): Rename D7S to D7; operand for D7 is unsigned.
- Rename D8 to D8_7, use {insert,extract}_d8_7 routines.
- Add D8_6.
- (IF4A, IF4B): Use "D7" instead of "D7S".
- (IF4C, IF4D): Use "D8_7" instead of "D8".
- (IF4E, IF4F): New. Use "D8_6".
- (v850_opcodes): Use IF4A/IF4B for sld.b/sst.b. Use IF4C/IF4D for
- sld.h/sst.h. Use IF4E/IF4F for sld.w/sst.w.
-
- * v850-opc.c (insert_d16_15, extract_d16_15): New functions.
- (v850_operands): Change D16 to D16_15, use special insert/extract
- routines. New new D16 that uses the generic insert/extract code.
- (IF7A, IF7B): Use D16_15.
- (IF7C, IF7D): New. Use D16.
- (v850_opcodes): Use IF7C and IF7D for ld.b and st.b.
-
- * v850-opc.c (insert_d9, insert_d22): Slightly improve error
- message. Issue an error if the branch offset is odd.
-
- * v850-opc.c: Add notes about needing special insert/extract
- for all the load/store insns, except "ld.b" and "st.b".
-
- * v850-opc.c (insert_d22, extract_d22): New functions.
- (v850_operands): Use insert_d22 and extract_d22 for
- D22 operands.
- (insert_d9): Fix range check.
-
-Fri Aug 30 18:01:02 1996 J.T. Conklin <jtc@hippo.cygnus.com>
-
- * v850-opc.c (v850_operands): Add V850_OPERAND_SIGNED flag
- and set bits field to D9 and D22 operands.
-
-Thu Aug 29 11:10:46 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (v850_operands): Define SR2 operand.
- (v850_opcodes): "ldsr" uses R1,SR2.
-
- * v850-opc.c (v850_opcodes): Fix opcode specs for
- sld.w, sst.b, sst.h, sst.w, and nop.
-
-Wed Aug 28 15:55:43 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (v850_opcodes): Add null opcode to mark the
- end of the opcode table.
-
-Mon Aug 26 13:35:53 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c (pre_defined_registers): Added register pairs,
- "r0-r1", "r2-r3", etc.
-
-Fri Aug 23 00:27:01 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (v850_operands): Make I16 be a signed operand.
- Create I16U for an unsigned 16bit mmediate operand.
- (v850_opcodes): Use I16U for "ori", "andi" and "xori".
-
- * v850-opc.c (v850_operands): Define EP operand.
- (IF4A, IF4B, IF4C, IF4D): Use EP.
-
- * v850-opc.c (v850_opcodes): Fix opcode numbers for "mov"
- with immediate operand, "movhi". Tweak "ldsr".
-
- * v850-opc.c (v850_opcodes): Get ld.[bhw] and st.[bhw]
- correct. Get sld.[bhw] and sst.[bhw] closer.
-
- * v850-opc.c (v850_operands): "not" is a two byte insn
-
- * v850-opc.c (v850_opcodes): Correct bit pattern for setf.
-
- * v850-opc.c (v850_operands): D16 inserts at offset 16!
-
- * v850-opc.c (two): Get order of words correct.
-
- * v850-opc.c (v850_operands): I16 inserts at offset 16!
-
- * v850-opc.c (v850_operands): Add "SR1" and "SR2" for system
- register source and destination operands.
- (v850_opcodes): Use SR1 and SR2 for "ldsr" and "stsr".
-
- * v850-opc.c (v850_opcodes): Fix thinko in "jmp" opcode. Fix
- same thinko in "trap" opcode.
-
- * v850-opc.c (v850_opcodes): Add initializer for size field
- on all opcodes.
-
- * v850-opc.c (v850_operands): D6 -> DS7. References changed.
- Add D8 for 8-bit unsigned field in short load/store insns.
- (IF4A, IF4D): These both need two registers.
- (IF4C, IF4D): Define. Use 8-bit unsigned field.
- (v850_opcodes): For "sld.h", "sld.w", "sst.h", "sst.w", use
- IF4C & IF4D. For "trap" use I5U, not I5. Add IF1 operand
- for "ldsr" and "stsr".
- * v850-opc.c (v850_operands): 3-bit immediate for bit insns
- is unsigned.
-
- * v850-opc.c (v850_opcodes): Correct short store half (sst.h) and
- short store word (sst.w).
-
-Thu Aug 22 16:57:27 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * v850-opc.c (v850_operands): Added insert and extract fields,
- pointers to functions that handle unusual operand encodings.
-
-Thu Aug 22 01:05:24 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (v850_opcodes): Enable "trap".
-
- * v850-opc.c (v850_opcodes): Fix order of displacement
- and register for "set1", "clr1", "not1", and "tst1".
-
-Wed Aug 21 18:46:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850-opc.c (v850_operands): Add "B3" support.
- (v850_opcodes): Fix and enable "set1", "clr1", "not1"
- and "tst1".
-
- * v850-opc.c (v850_opcodes): "jmp" has only an R1 operand.
-
- * v850-opc.c: Close unterminated comment.
-
-Wed Aug 21 17:31:26 1996 J.T. Conklin <jtc@hippo.cygnus.com>
-
- * v850-opc.c (v850_operands): Add flags field.
- (v850_opcodes): add move opcodes.
-
-Tue Aug 20 14:41:03 1996 J.T. Conklin <jtc@hippo.cygnus.com>
-
- * Makefile.in (ALL_MACHINES): Add v850-opc.o.
- * configure: (bfd_v850v_arch) Add new case.
- * configure.in: (bfd_v850_arch) Add new case.
- * v850-opc.c: New file.
-
-Mon Aug 19 15:21:38 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-dis.c (print_insn_sparc): Handle little endian sparcs.
-
-Thu Aug 15 13:14:43 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c: Add additional information to the opcode
- table to help determinine which instructions can be done
- in parallel.
-
-Thu Aug 15 13:11:13 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Update editing of include pathnames to be
- more general.
-
-Thu Aug 15 16:28:41 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * arm-opc.h: Added "bx" instruction definition.
-
-Wed Aug 14 17:00:04 1996 Richard Henderson <rth@tamu.edu>
-
- * alpha-opc.c (EV4EXTHWINDEX): Field width should be 8 not 5.
-
-Mon Aug 12 14:30:37 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c (d10v_opcodes): Minor fixes to addi and bl.l.
-
-Fri Aug 9 13:21:59 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c (d10v_opcodes): Correct 'mv' unit entry to EITHER.
-
-Thu Aug 8 12:43:52 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * makefile.vms: Update for alpha-opc changes.
-
-Wed Aug 7 11:55:10 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i386-dis.c (print_insn_i386): Actually return the correct value.
- (ONE, OP_ONE): #ifdef out; not used.
-
-Fri Aug 2 17:47:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c (d10v_opcodes): Added 2 accumulator sub instructions.
- Changed subi operand type to treat 0 as 16.
-
-Wed Jul 31 16:21:41 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: Add cpushl for the mcf5200. From Ken Rose
- <rose@netcom.com>.
-
-Wed Jul 31 14:39:27 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * arm-opc.h: (arm_opcodes): Added halfword and sign-extension
- memory transfer instructions. Add new format string entries %h and %s.
- * arm-dis.c: (print_insn_arm): Provide decoding of the new
- formats %h and %s.
-
-Fri Jul 26 11:45:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c (d10v_operands): Added UNUM4S; a 4-bit accumulator shift.
- (d10v_opcodes): Modified accumulator shift instructions to use UNUM4S.
-
-Fri Jul 26 14:01:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * alpha-dis.c (print_insn_alpha_osf): Remove.
- (print_insn_alpha_vms): Remove.
- (print_insn_alpha): Make globally visible. Chose the register
- names based on info->flavour.
- * disassemble.c: Always return print_insn_alpha for the alpha.
-
-Thu Jul 25 15:24:17 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-dis.c (dis_long): Handle unknown opcodes.
-
-Thu Jul 25 12:08:09 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-opc.c: Changes to support signed and unsigned numbers.
- All instructions with the same name that have long and short forms
- now end in ".l" or ".s". Divs added.
- * d10v-dis.c: Changes to support signed and unsigned numbers.
-
-Tue Jul 23 11:02:53 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-dis.c: Change all functions to use info->print_address_func.
-
-Mon Jul 22 15:38:53 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-opc.c (m68k_opcodes): Make opcode masks for the ColdFire
- move ccr/sr insns more strict so that the disassembler only
- selects them when the addressing mode is data register.
-
-Mon Jul 22 11:25:24 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * d10v-opc.c (pre_defined_registers): Declare.
- * d10v-dis.c (print_operand): Now uses pre_defined_registers
- to pick a better name for the registers.
-
-Mon Jul 22 13:47:23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * sparc-opc.c: Fix opcode values for fpack16, and fpackfix. Fix
- operands for fexpand and fpmerge. From Christian Kuehnke
- <Christian.Kuehnke@arbi.informatik.uni-oldenburg.de>.
-
-Mon Jul 22 13:17:06 1996 Richard Henderson <rth@tamu.edu>
-
- * alpha-dis.c (print_insn_alpha): No longer the user-visible
- print routine. Take new regnames and cpumask arguments.
- Kill the environment variable nonsense.
- (print_insn_alpha_osf): New function. Do OSF/1 style regnames.
- (print_insn_alpha_vms): New function. Do VMS style regnames.
- * disassemble.c (disassembler): Test bfd flavour to pick
- between OSF and VMS routines. Default to OSF.
-
-Thu Jul 18 17:19:34 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Call AC_SUBST (INSTALL_SHLIB).
- * configure: Rebuild.
- * Makefile.in (install): Use @INSTALL_SHLIB@.
-
-Wed Jul 17 14:39:05 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * configure: (bfd_d10v_arch) Add new case.
- * configure.in: (bfd_d10v_arch) Add new case.
- * d10v-dis.c: New file.
- * d10v-opc.c: New file.
- * disassemble.c (disassembler) Add entry for d10v.
-
-Wed Jul 17 10:12:05 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): Fix bugs in coldfire insns relating
- to bcc, trapfl, subxl, and wddata discovered by Andreas Schwab.
-
-Mon Jul 15 16:59:55 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * i386-dis.c: Get rid of print_insn_i8086. Use info.mach to
- distinguish between variants of the instruction set.
- * sparc-dis.c: Get rid of print_insn_sparclite. Use info.mach to
- distinguish between variants of the instruction set.
-
-Fri Jul 12 10:12:01 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * i386-dis.c (print_insn_i8086): New routine to disassemble using
- the 8086 instruction set.
- * i386-dis.c: General cleanups. Make most things static. Add
- prototypes. Get rid of static variables aflags and dflags. Pass
- them as args (to almost everything).
-
-Thu Jul 11 11:58:44 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300-dis.c (bfd_h8_disassemble): Handle macregs in ldmac insns.
-
- * h8300-dis.c (bfd_h8_disassemble): Handle "ldm.l" and "stm.l".
-
- * h8300-dis.c (bfd_h8_disassemble): "abs" is implicitly two
- if the next arg is marked with SRC_IN_DST. Gross.
-
- * h8300-dis.c (bfd_h8_disassemble): Print "exr" when
- we're looking for and find EXR.
-
- * h8300-dis.c (bfd_h8_disassemble): We don't have a match
- if we're looking for KBIT and we don't find it.
-
- * h8300-dis.c (bfd_h8_disassemble): Mask off unwanted bits
- for L_3 and L_2.
-
- * h8300-dis.c (bfd_h8_disassemble): Don't set plen for
- 3bit immediate operands.
-
-Tue Jul 9 10:55:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Released binutils 2.7.
-
- * alpha-opc.c: Add new case of "mov". From Klaus Kaempf
- <kkaempf@progis.ac-net.de>.
-
-Thu Jul 4 11:42:51 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * alpha-opc.c: Correct second case of "mov" to use OPRL.
-
-Wed Jul 3 16:03:47 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * sparc-dis.c (print_insn_sparclite): New routine to print
- sparclite instructions.
-
-Wed Jul 3 14:21:18 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): Add coldfire support.
-
-Fri Jun 28 15:53:51 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (asi_table): Add #ASI_N, #ASI_N_L, #ASI_NUCLEUS,
- #ASI_NUCLEUS_LITTLE. Rename #ASI_AS_IF_USER_{PRIMARY,SECONDARY}_L
- to #ASI_AS_IF_USER_{PRIMARY,SECONDARY}_LITTLE.
-
-Tue Jun 25 22:58:31 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir):
- Use autoconf-set values.
- (docdir, oldincludedir): Removed.
- * configure.in (AC_PREREQ): autoconf 2.5 or higher.
-
-Fri Jun 21 13:53:36 1996 Richard Henderson <rth@tamu.edu>
-
- * alpha-opc.c: New file.
- * alpha-opc.h: Remove.
- * alpha-dis.c: Complete rewrite to use new opcode table.
- * configure.in: For bfd_alpha_arch, use alpha-opc.o.
- * configure: Rebuild with autoconf 2.10.
- * Makefile.in (ALL_MACHINES): Add alpha-opc.o.
- (alpha-dis.o): Depend upon $(INCDIR)/opcode/alpha.h, not
- alpha-opc.h.
- (alpha-opc.o): New target.
-
-Wed Jun 19 15:55:12 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * sparc-dis.c (print_insn_sparc): Remove unused local variable i.
- Set imm_added_to_rs1 even if the source and destination register
- are not the same.
-
- * sparc-opc.c: Add some two operand forms of the wr instruction.
-
-Tue Jun 18 15:58:27 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * h8300-dis.c (bfd_h8_disassemble): Rename "hmode" argument
- to just "mode".
-
- * disassemble.c (disassembler): Handle H8/S.
- * h8300-dis.c (print_insn_h8300s): New function for H8/S.
-
-Tue Jun 18 18:06:50 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * sparc-opc.c: Add beq/teq as aliases for be/te.
-
- * ppc-opc.c: Fix fcmpo opcode. From Sergei Steshenko
- <sergei@msil.sps.mot.com>.
-
-Tue Jun 18 15:08:54 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * makefile.vms: New file.
-
- * alpha-dis.c (print_insn_alpha): Print lda ra,lit(rz) as mov.
-
-Mon Jun 10 18:50:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * h8300-dis.c (bfd_h8_disassemble): Always print ABS8MEM with :8,
- regardless of plen.
-
-Tue Jun 4 09:15:53 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * i386-dis.c (OP_OFF): Call append_prefix.
-
-Thu May 23 15:18:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc-opc.c (instruction encoding macros): Add explicit casts to
- unsigned long to silence a warning from the Solaris PowerPC
- compiler.
-
-Thu Apr 25 19:33:32 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparc_opcodes): Add ultrasparc vis extensions.
-
-Mon Apr 22 17:12:35 1996 Doug Evans <dje@blues.cygnus.com>
-
- * sparc-dis.c (X_IMM,X_SIMM): New macros.
- (X_IMM13): Delete.
- (print_insn_sparc): Merge cases i,I,j together. New cases X,Y.
- * sparc-opc.c (sparc_opcodes): Use X for 5 bit shift constants,
- Y for 6 bit shift constants. Rewrite entries for crdcxt, cwrcxt,
- cpush, cpusha, cpull sparclet insns.
-
-Wed Apr 17 14:20:22 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-dis.c (compute_arch_mask): Replace ANSI style def with K&R.
-
-Thu Apr 11 17:30:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * sparc-opc.c: Set F_FBR on floating point branch instructions.
- Set F_FLOAT on other floating point instructions.
-
-Mon Apr 8 17:02:48 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc-opc.c (PPC860): Macro for 860/821 specific instructions and
- registers.
- (powerpc_opcodes): Add 860/821 specific SPRs.
-
-Mon Apr 8 14:00:44 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Permit --enable-shared to specify a list of
- directories. Set and substitute BFD_PICLIST.
- * configure: Rebuild.
- * Makefile.in (BFD_PICLIST): Rename from BFD_LIST. Change all
- uses. Set to @BFD_PICLIST@.
-
-Fri Apr 5 17:12:27 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300-dis.c (bfd_h8_disassemble): Use "bit" for L_3 immediates,
- not "abs", which may be needed for the absolute in something
- like btst #0,@10:8. Print L_3 immediates separately from other
- immediates. Change ABSMOV reference to ABS8MEM.
-
-Wed Apr 3 10:40:45 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-dis.c (opcodes_initialized): Move inside print_insn_sparc.
- (current_arch_mask): New static global.
- (compute_arch_mask): New static function.
- (print_insn_sparc): Delete sparc_v9_p. New static local
- current_mach. Resort opcode table if current_mach changes.
- Generalize "insn not supported" test.
- (compare_opcodes): Prefer supported opcodes to nonsupported ones.
- Delete test for v9/!v9.
- * sparc-opc.c (MASK_*): Use SPARC_OPCODE_ARCH_MASK.
- (v6notlet): Define.
- (brfc): Split into CBR and FBR for coprocessor/fp branches.
- (brfcx): Renamed to FBRX.
- (condfc): Renamed to CONDFC. Pass v6notlet to CBR (standard
- coprocessor mnemonics are not supported on the sparclet).
- (condf): Renamed to CONDF.
- (SLCBCC2): Delete F_ALIAS flag.
-
-Sat Mar 30 21:45:59 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparc_opcodes): rd must be 0 for
- mov foo,{%y,%psr,%wim,%tbr}. Support mov foo,%asrX.
-
-Fri Mar 29 13:02:40 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (config.status): Depend upon BFD VERSION file, so
- that the shared library version number is set correctly.
-
-Tue Mar 26 15:47:14 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
- Miles Bader <miles@gnu.ai.mit.edu>.
- * configure: Rebuild.
-
-Sat Mar 16 13:04:07 1996 Fred Fish <fnf@cygnus.com>
-
- * z8kgen.c (internal, gas): Call xmalloc rather than unchecked
- malloc.
-
-Tue Mar 12 12:14:10 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.8.
-
-Thu Mar 7 15:11:10 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc-dis.c (print_insn_sparc): Handle 'O' operand char like 'r'.
- * sparc-opc.c (sparc_opcodes): Use 'O' operand char for `neg reg'.
-
-Tue Mar 5 15:51:57 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Don't set SHLIB or SHLINK to an empty string,
- since they appear as targets in Makefile.in.
- * configure: Rebuild.
-
-Mon Feb 26 13:03:40 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Edit out shared library support bits.
-
-Tue Feb 20 20:48:28 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc-opc.c (v8,v6notv9): Add MASK_SPARCLET.
- (sparc_opcode_archs): Add MASK_V8 to sparclet entry.
- (sparc_opcodes): Add sparclet insns.
- (sparclet_cpreg_table): New static local.
- (sparc_{encode,decode}_sparclet_cpreg): New functions.
- * sparc-dis.c (print_insn_sparc): Handle sparclet cpregs.
-
-Tue Feb 20 11:02:44 1996 Alan Modra <alan@mullet.Levels.UniSA.Edu.Au>
-
- * i386-dis.c (index16): New static variable.
- (putop): Print jecxz for 32 bit case, jcxz for 16 bit, not the
- other way around.
- (OP_indirE): Return result of OP_E.
- (OP_E): Check for 16 bit addressing mode, and disassemble
- correctly. Optimised 32 bit case a little. Don't print
- "(base,index,scale)" when sib specifies only an offset.
-
-Mon Feb 19 12:32:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Set and substitute SHLIB_DEP.
- * configure: Rebuild.
- * Makefile.in (SHLIB_DEP): New variable.
- (LIBIBERTY_LISTS, BFD_LIST): New variables.
- (stamp-piclist): Depend upon LIBIBERTY_LISTS and BFD_LIST. If
- COMMON_SHLIB, add them to piclist with appropriate modifications.
- ($(SHLIB)): Depend upon $(SHLIB_DEP). Don't check COMMON_SHLIB
- here: just use piclist.
-
-Mon Feb 19 02:03:50 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc-dis.c (MASK_V9,V9_ONLY_P,V9_P): Define.
- (print_insn_sparc): Rewrite v9/not-v9 tests.
- (compare_opcodes): Likewise.
- * sparc-opc.c (MASK_<ARCH>): Define.
- (v6,v7,v8,sparclite,v9,v9a): Redefine.
- (sparclet,v6notv9): Define.
- (sparc_opcode_archs): Delete member `conflicts'. Add `supported'.
- (sparc_opcodes): Delete F_NOTV9, use v6notv9 instead.
-
-Thu Feb 15 14:45:05 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Call AC_PROG_CC before configure.host.
- * configure: Rebuild.
-
- * Makefile.in (SONAME): Remove leading ../bfd/ from $(SHLIB).
-
-Wed Feb 14 19:01:27 1996 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386-dis.c (onebyte_has_modrm): New static array.
- (twobyte_has_modrm): New static array.
- (print_insn_i386): Only fetch the mod/reg/rm byte if it is needed.
-
-Tue Feb 13 15:15:01 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
- $(SHLINK).
-
-Mon Feb 12 16:26:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc-opc.c (PPC): Undef, so default defination on Windows NT
- doesn't conflict.
-
-Wed Feb 7 13:59:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): The bkpt instruction is supported on
- m68010up, not just m68020up | cpu32.
-
- * Makefile.in (SONAME): New variable.
- ($(SHLINK)): Make a link to the transformed name, as well.
- (stamp-tshlink): New target.
- (install): Skip stamp-tshlink during install.
-
-Tue Feb 6 12:28:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Call AC_ARG_PROGRAM.
- * configure: Rebuild.
- * Makefile.in (program_transform_name): New variable.
- (install): Transform library name before installing it.
-
-Mon Feb 5 16:14:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i960-dis.c (mem): Add HX dcinva instruction.
-
- Support for building as a shared library, based on patches from
- Alan Modra <alan@spri.levels.unisa.edu.au>:
- * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
- New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
- SHLIB_CFLAGS, COMMON_SHLIB, SHLINK.
- * configure: Rebuild.
- * Makefile.in (ALLLIBS): New variable.
- (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
- (COMMON_SHLIB, SHLINK): New variables.
- (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
- (STAGESTUFF): Remove variable.
- (all): Depend upon $(ALLLIBS) rather than $(TARGETLIB).
- (stamp-piclist, piclist): New targets.
- ($(SHLIB), $(SHLINK)): New targets.
- ($(OFILES)): Depend upon stamp-picdir.
- (disassemble.o): Build twice if PICFLAG is set.
- (MOSTLYCLEAN): Add pic/*.o.
- (clean): Remove $(SHLIB), $(SHLINK), piclist, and stamp-piclist.
- (distclean): Remove pic and stamp-picdir.
- (install): Install shared libraries.
- (stamp-picdir): New target.
-
-Fri Feb 2 17:15:25 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc-dis.c (print_insn_sparc): Delete DISASM_RAW_INSN support.
- Print unknown instruction as "unknown", rather than in hex.
-
-Tue Jan 30 14:06:08 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * dis-buf.c: Include "sysdep.h" before "dis-asm.h".
-
-Thu Jan 25 20:24:07 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc-opc.c (sparc_opcode_archs): Mark v8/sparclite as conflicting.
-
-Thu Jan 25 11:56:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i386-dis.c (print_insn_i386): Only fetch the mod/reg/rm byte
- when necessary. From Ulrich Drepper
- <drepper@myware.rz.uni-karlsruhe.de>.
-
-Thu Jan 25 03:39:10 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc-dis.c (print_insn_sparc): NUMOPCODES replaced with
- sparc_num_opcodes. Update architecture enum values.
- * sparc-opc.c (sparc_opcode_archs): Replaces architecture_pname.
- (sparc_opcode_lookup_arch): New function.
- (sparc_num_opcodes): Renamed from bfd_sparc_num_opcodes.
- (sparc_opcodes): Add v9a shutdown insn.
-
-Mon Jan 22 08:29:59 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc-dis.c (print_insn_sparc): Renamed from print_insn.
- If DISASM_RAW_INSN, print insn in hex. Handle v9a as opcode
- architecture.
- (print_insn_sparc64): Deleted.
- * disassemble.c (disassembler, case bfd_arch_sparc): Always use
- print_insn_sparc.
-
- * sparc-opc.c (architecture_pname): Add v9a.
-
-Fri Jan 12 14:35:58 1996 David Mosberger-Tang <davidm@AZStarNet.com>
-
- * alpha-opc.h (alpha_insn_set): VAX floating point opcode was
- incorrectly defined as 0x16 when it should be 0x15.
- (FLOAT_FORMAT_MASK): function code is 11 bits, not just 7 bits!
- (alpha_insn_set): added cvtst and cvttq float ops. Also added
- excb (exception barrier) which is defined in the Alpha
- Architecture Handbook version 2.
- * alpha-dis.c (print_insn_alpha): Fixed special-case decoding for
- OPERATE_FORMAT_CODE type instructions. The bug caused mulq to be
- disassembled as or, for example.
-
-Wed Jan 10 12:37:22 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-dis.c (print_insn_arg): Print cases 'i' and 'u' in hex.
- (_print_insn_mips): Change i from int to unsigned int.
-
-Thu Jan 4 17:21:10 1996 David Edelsohn <edelsohn@mhpcc.edu>
-
- * ppc-opc.c (powerpc_opcodes): tlbi POWER opcode form different
- from tlbie PowerPC opcode. Add PPC603 tlbld and tlbli.
-
-Thu Dec 28 13:29:19 1995 John Hassey <hassey@rtp.dg.com>
-
- * i386-dis.c: Added Pentium Pro instructions.
-
-Tue Dec 19 22:56:35 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc-opc.c (fsqrt{,.}): Duplicate for PowerPC in addition to
- being for Power2.
-
-Fri Dec 15 14:14:15 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * sh-opc.h (sh_nibble_type): Added REG_B.
- (sh_arg_type): Added A_REG_B.
- (sh_table): Added pref and bank reg versions of ldc, ldc.l, stc
- and stc.l opcodes.
- * sh-dis.c (print_insn_shx): Added cases for REG_B and A_REG_B.
-
-Fri Dec 15 16:44:31 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * disassemble.c (disassembler): Use new bfd_big_endian macro.
-
-Tue Dec 12 12:22:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (distclean): Remove stamp-h. From Ronald
- F. Guilmette <rfg@monkeys.com>.
-
-Tue Dec 5 13:42:44 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- From David Mosberger-Tang <davidm@azstarnet.com>:
- * alpha-dis.c (print_insn_alpha): fixed decoding of cpys
- instruction.
-
-Mon Dec 4 12:29:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * sh-opc.h (sh_arg_type): Added A_SSR and A_SPC.
- (sh_table): Added many SH3 opcodes.
- * sh-dis.c (print_insn_shx): Added cases for A_SSR and A_SPC.
-
-Fri Dec 1 07:42:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc-opc.c (subfc., subfco): Mark this PPCCOM, not PPC.
- (subco,subco.): Mark this PPC, not PPCCOM.
-
-Mon Nov 27 13:09:52 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.7.
-
-Tue Nov 21 18:28:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.6.
-
-Wed Nov 15 19:02:53 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * configure.in: Sort list of architectures. Accept but do nothing
- for alliant, convex, pyramid, romp, and tahoe.
-
-Wed Nov 8 20:18:59 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * a29k-dis.c (print_special): Change num to unsigned int.
-
-Wed Nov 8 20:10:35 1995 Eric Freudenthal <freudenthal@nyu.edu>
-
- * a29k-dis.c (print_insn): Cast insn24 to unsigned long when
- shifting it.
-
-Tue Nov 7 15:21:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Call AC_CHECK_PROG to find and cache AR.
- * configure: Rebuilt.
-
-Mon Nov 6 17:39:47 1995 Harry Dolan <dolan@ssd.intel.com>
-
- * configure.in: Add case for bfd_i860_arch.
- * configure: Rebuild.
-
-Fri Nov 3 12:45:31 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c (m68k_opcodes): Correct fmoveml operands.
- * m68k-dis.c (NEXTSINGLE): Change i to unsigned int.
- (NEXTDOUBLE): Likewise.
- (print_insn_m68k): Don't match fmoveml if there is more than one
- register in the list.
- (print_insn_arg): Handle a place of '8' for a type of 'L'.
-
-Thu Nov 2 23:06:33 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: Use #W rather than #w.
- * m68k-dis.c (print_insn_arg): Handle new 'W' place.
-
-Wed Nov 1 13:30:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c (m68k_opcode_aliases): Add dbfw as an alias for dbf,
- and likewise for all the dbxx opcodes.
-
-Mon Oct 30 20:50:40 1995 Fred Fish <fnf@cygnus.com>
-
- * arc-dis.c: Include elf-bfd.h rather than libelf.h.
-
-Mon Oct 23 11:11:34 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * mips-opc.c: Added shorthand (V1) for INSN_4100 manifest. Added
- the VR4100 specific instructions to the mips_opcodes structure.
-
-Thu Oct 19 11:05:23 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in, mpw-make.sed: Remove ugly workaround for
- ugly Metrowerks bug in CW6, is fixed in CW7.
-
-Mon Oct 16 12:59:01 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc-opc.c (whole file): Add flags for common/any support.
-
-Tue Oct 10 11:06:07 1995 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (BISON): Remove macro.
- (FLAGS_TO_PASS): Remove BISON.
-
-Fri Oct 6 16:26:45 1995 Ken Raeburn <raeburn@cygnus.com>
-
- Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k-dis.c (print_insn_m68k): Recognize all two-word
- instructions that take no args by looking at the match mask.
- (print_insn_arg): Always print "%" before register names.
- [case 'c']: Use "nc" for the no-cache case, as recognized by gas.
- [case '_']: Don't print "@#" before address.
- [case 'J']: Use "%s" as format string, not register name.
- [case 'B']: Treat place == 'C' like 'l' and 'L'.
-
-Thu Oct 5 22:16:20 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * i386-dis.c: Describe cmpxchg8b operand, and spell the opcode
- name correctly.
-
-Tue Oct 3 08:30:20 1995 steve chamberlain <sac@slash.cygnus.com>
-
- From David Mosberger-Tang <davidm@azstarnet.com>
-
- * alpha-opc.h (MEMORY_FUNCTION_FORMAT_MASK): added.
- (alpha_insn_set): added definitions for VAX floating point
- instructions (Unix compilers don't generate these, but handcoded
- assembly might still use them).
-
- * alpha-dis.c (print_insn_alpha): added support for disassembling
- the miscellaneous instructions in the Alpha instruction set.
-
-Tue Sep 26 18:47:20 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in: Add m68k-opc.c.o to BFD_MACHINES for m68k,
- no longer create sysdep.h, sed ppc-opc.c to work around a
- serious Metrowerks C bug.
- * mpw-make.in: Remove.
- * mpw-make.sed: New file, used by mpw-configure to edit
- Makefile.in into an MPW makefile.
-
-Wed Sep 20 12:55:28 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (maintainer-clean): New synonym for realclean.
-
-Tue Sep 19 15:28:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: Split pmove patterns which use 'P' into patterns
- which use '0', '1', and '2' instead. Specify the proper size for
- a pmove immediate operand. Correct the pmovefd patterns to be
- moves to a register, not from a register.
- * m68k-dis.c (print_insn_arg): Replace 'P' with '0', '1', '2'.
-
-Thu Sep 14 11:58:22 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparc_opcodes): Mark all insns that reference
- %psr, %wim, %tbr as F_NOTV9.
-
-Fri Sep 8 01:07:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (Makefile): Just rebuild Makefile when running
- config.status.
- (config.h, stamp-h): New targets.
- * configure.in: Call AC_CONFIG_HEADER and AC_CANONICAL_SYSTEM
- earlier. Don't bother to call AC_ARG_PROGRAM. Touch stamp-h when
- rebuilding config.h.
- * configure: Rebuild.
-
- * mips-opc.c: Change unaligned loads and stores with "t,A"
- operands to use "t,A(b)".
-
-Thu Sep 7 19:02:46 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * sh-dis.c (print_insn_shx): Add F_FR0 support.
-
-Thu Sep 7 19:02:46 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * sh-dis.c (print_insn_shx): Change loop over op->arg[n] to iterate
- until 3 instead of until 2.
-
-Wed Sep 6 21:21:33 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (ALL_CFLAGS): Define.
- (.c.o, disassemble.o): Use $(ALL_CFLAGS).
- (MOSTLYCLEAN): Add config.log.
- (distclean): Don't remove config.log.
- * configure.in: Substitute HDEFINES.
- * configure: Rebuild.
-
-Wed Sep 6 15:08:09 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * sh-opc.h (sh_arg_type): Add F_FR0.
- (sh_table, case fmac): Add F_FR0 as first argument.
-
-Wed Sep 6 15:08:09 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * sh-opc.h (sh_opcode_info): Increase arg array size to 4.
-
-Tue Sep 5 18:28:10 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-dis.c: Remove all references to NO_V9.
-
-Tue Sep 5 20:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4: Just include ../bfd/aclocal.m4.
- * configure: Rebuild.
-
-Tue Sep 5 16:09:59 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-dis.c (X_DISP19): Define.
- (print_insn, case 'G'): Use it.
- (print_insn, case 'L'): Sign extend displacement.
-
-Mon Sep 4 14:28:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Run ../bfd/configure.host before AC_PROG_CC.
- Subsitute CFLAGS and AR. Call AC_PROG_INSTALL. Don't substitute
- host_makefile_frag or frags.
- * aclocal.m4: New file.
- * configure: Rebuild.
- * Makefile.in (INSTALL): Set to @INSTALL@.
- (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
- (INSTALL_DATA): Set to @INSTALL_DATA@.
- (AR): Set to @AR@.
- (AR_FLAGS): Set to rc rather than qc.
- (CC): Define as @CC@.
- (CFLAGS): Set to @CFLAGS@.
- (@host_makefile_frag@): Remove.
- (config.status): Remove dependency upon @frags@.
-
- * configure.in: ../bfd/config.bfd now just sets shell variables.
- Use them rather than looking through target Makefile fragments.
- * configure: Rebuild.
-
-Thu Aug 31 12:35:32 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * sh-opc.h (ftrc): Change FPUL_N to FPUL_M.
-
-Wed Aug 30 13:52:28 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sparc_opcodes): Delete duplicate wr %y insn.
- Add clrx, iprefetch, signx, clruw, cas, casl, casx, casxl synthetic
- sparc64 insns.
-
- * sparc-opc.c (sparc_opcodes): Fix prefetcha insn.
- (lookup_{name,value}): New functions.
- (prefetch_table): New static local.
- (sparc_{encode,decode}_prefetch): New functions.
- * sparc-dis.c (print_insn): Handle '*' arg (prefetch function).
-
-Wed Aug 30 11:11:58 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * sh-opc.h: Add blank lines to improve readabililty of sh3e
- instructions.
-
-Wed Aug 30 11:09:38 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * sh-dis.c: Correct comment on first line of file.
-
-Tue Aug 29 15:37:18 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * disassemble.c (disassembler): Handle bfd_mach_sparc64.
-
- * sparc-opc.c (asi, membar): New static locals.
- (sparc_{encode,decode}_{asi,membar}): New functions.
- (sparc_opcodes, membar insn): Fix.
- * sparc-dis.c (print_insn): Call sparc_decode_asi.
- Support decoding of membar masks.
- (X_MEMBAR): Define.
-
-Sat Aug 26 21:22:48 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c (m68k_opcode_aliases): Add br, brs, brb, brw, brl.
-
-Mon Aug 21 17:33:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c (m68k_opcode_aliases): Add bhib as an alias for bhis,
- and likewise for the other branches. Add bhs as an alias for bcc,
- and likewise for the size variants. Add dbhs as an alias for
- dbcc.
-
-Fri Aug 11 13:40:24 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * sh-opc.h (FP sts instructions): Update to match reality.
-
-Mon Aug 7 16:12:58 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-dis.c: (fpcr_names): Add % before all register names.
- (reg_names): Likewise.
- (print_insn_arg): Don't explicitly print % before register names.
- Add % before register names in static array names. In case 'r',
- print data registers as `@(Dn)', not `Dn@'. When printing a
- memory address, don't print @# before it.
- (print_indexed): Change base_disp and outer_disp from int to
- bfd_vma. Print using MIT syntax, not mutant invalid Motorola
- syntax. Sign extend 8 byte displacement correctly.
- (print_base): Print using MIT syntax. Print zpc when appropriate.
- Change parameter disp from int to bfd_vma.
-
- * m68k-opc.c (m68k_opcode_aliases): Add jsrl and jsrs as aliases
- for jsr.
-
-Mon Aug 7 02:21:40 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * sh-dis.c (print_insn_shx): Handle new operand types F_REG_N,
- F_REG_M, FPSCR_M, FPSCR_N, FPUL_M and FPUL_N.
- * sh-opc.h (sh_arg_type): Add new operand types.
- (sh_table): Add new opcodes from SH3E Floating Point ISA.
-
-Sat Aug 5 16:50:14 1995 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (distclean): Remove generated file config.h.
-
-Sat Aug 5 16:50:14 1995 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (distclean): Remove generated file config.h.
-
-Wed Aug 2 18:33:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k-opc.c: New file, holding tables from include/opcode/m68k.h.
- Clean up tables.
- * m68k-dis.c: Remove BREAK_UP_BIG_DECL stuff.
- (opcode): Remove.
- (print_insn_m68k): Change d to be const. Use m68k_numopcodes
- rather than numopcodes. Use m68k_opcodes rather than removed
- opcode function. Don't check F_ALIAS.
- (print_insn_arg): Change first parameter to be const char *.
- * Makefile.in (ALL_MACHINES): Add m68k-opc.o.
- (m68k-opc.o): New target.
- * configure.in: Build m68k-opc.o for bfd_m68k_arch.
- * configure: Rebuild.
-
-Wed Aug 2 08:23:38 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-dis.c (HASH_SIZE, HASH_INSN): Define.
- (opcode_bits, opcode_hash_table): New variables.
- (opcodes_initialized): Renamed from opcodes_sorted.
- (build_hash_table): New function.
- (is_delayed_branch): Use hash table.
- (print_insn): Renamed from print_insn_sparc, made static.
- Build and use hash table. If !sparc64, ignore sparc64 insns,
- and vice-versa if sparc64.
- (print_insn_sparc, print_insn_sparc64): New functions.
- (compare_opcodes): Move sparc64 opcodes to end.
- Print commutative insns with constant second.
- * sparc-opc.c (all non-v9 insns): Use flag F_NOTV9 instead of F_ALIAS.
-
-Tue Aug 1 00:12:49 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * sh-dis.c (print_insn_shx): Remove unused local dslot. Use
- print_address_func for A_BDISP12 and A_BDISP8. Correct test which
- avoids printing a delay slot in a delay slot.
- * sh-opc.h (sh_table): Fully bracket last entry.
-
-Mon Jul 31 12:04:47 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-opc.c (sllx, srax, srlx): Fix disassembly.
-
-Wed Jul 12 00:59:34 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
-
- * configure.in: Get host_makefile_frag from ${srcdir}.
-
- * configure.in: Autoconfiscated. Check for string[s].h. Create
- config.h from config.in. Don't set up sysdep.h link.
- * sysdep.h: New file.
- * configure, config.in: New files, generated from configure.in.
- * Makefile.in: Updated to be processed autoconf-style.
- (distclean): Keep sysdep.h. Remove config.log and config.cache.
- (Makefile): Depend on config.status.
- (config.status): New rule.
- * configure.bat: Update Makefile substitutions.
-
-Tue Jul 11 14:23:37 1995 Jeff Spiegel <jeffs@lsil.com>
-
- * mips-opc.c (L1): Define.
- (mips_opcodes): Add R4010 instructions: flushi, flushd, flushid,
- addciu, madd, maddu, ffc, ffs, msub, msubu, selsi, selsr, waiti,
- and wb.
-
-Tue Jul 11 11:49:49 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-opc.c (mips_opcodes): For the move pseudo-op, prefer daddu
- if ISA 3 and addu otherwise, replacing or, since some MIPS chips
- have multiple add units but only a single logical unit.
-
- * ppc-opc.c (powerpc_operands): Change CR to use a bitsize of 3,
- shifted by 18, without any insertion or extraction function.
- (insert_cr, extract_cr): Remove.
-
-Wed Jun 21 20:05:39 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k-dis.c (print_insn_arg, print_indexed): Print "%" before
- register names.
+ * Makefile.am: Update dependencies with "make dep-am"
+ * Makefile.in: Regenerate.
-Thu Jun 15 17:23:31 1995 Stan Shebs <shebs@andros.cygnus.com>
+2000-05-25 Alexandre Oliva <aoliva@redhat.com>
- * mpw-config.in: Add sh and i386 configs, remove sparc config.
- * sh-opc.h: Add copyright.
+ * m10300-dis.c (disassemble): Don't assume 32-bit longs when
+ sign-extending operands.
-Mon Jun 5 03:30:43 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+2000-05-15 Donald Lindsay <dlindsay@redhat.com>
- * Makefile.in (crunch-m68k): Delete extra target accidentally
- checked in a while ago.
+ * d10v-opc.c (d10v_opcodes): add ALONE tag to all short branches
+ except brf's.
-Wed May 24 16:22:13 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+2000-05-21 Nick Clifton <nickc@redhat.com>
- * sh-opc.h (sh_table): Add SH3 support.
+ * Makefile.am (LIBIBERTY): Define.
-Wed May 24 14:16:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
+2000-05-19 Diego Novillo <dnovillo@redhat.com>
- * sh-opc.h: Added bsrf and braf.
+ * mips-dis.c (REGISTER_NAMES): Rename to STD_REGISTER_NAMES.
+ (STD_REGISTER_NAMES): New name for REGISTER_NAMES.
+ (reg_names): Rename to std_reg_names. Change it to a char **
+ static variable.
+ (std_reg_names): New name for reg_names.
+ (set_mips_isa_type): Set reg_names to point to std_reg_names by
+ default.
-Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+2000-05-16 Frank Ch. Eigler <fche@redhat.com>
- * arm-opc.h (arm_opcodes): Add 64-bit multiply patterns. Delete
- bogus [ls]fm{ea,fd} patterns.
+ * fr30-desc.h: Partially regenerated to account for changed
+ CGEN_MAX_* -> CGEN_ACTUAL_MAX_* macros.
+ * m32r-desc.h: Ditto.
- * arm-opc.h (arm_opcodes): Correct typos in stm, ldm, std, and ldc.
- * arm-dis.c (print_insn_arm): Make GIVEN a parameter, don't try and
- initialize it from memory. Make function static.
- (print_insn_{big,little}_arm): New functions.
- * disassemble.c (disassembler, case bfd_arch_arm): Disassemble for
- the correct endianness.
+2000-05-15 Nick Clifton <nickc@redhat.com>
-Mon Apr 24 14:18:05 1995 Jason Molenda (crash@phydeaux.cygnus.com>
+ * arm-opc.h: Use upper case for flasg in MSR and MRS
+ instructions. Allow any bit to be set in the field_mask of
+ the MSR instruction.
- * sh-opc.h (sh_nibble_type, sh_arg_type): remove trailing , from
- enum list.
+ * arm-dis.c (print_insn_arm): Decode _x and _s bits of the
+ field_mask of an MSR instruction.
-Wed Apr 19 14:07:03 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+2000-05-11 Thomas de Lellis <tdel@windriver.com>
- * m68k-dis.c (opcode): Finish change made by Kung Hsu on April
- 17th, so that it builds again using GCC as the compiler.
+ * arm-opc.h: Disassembly of thumb ldsb/ldsh
+ instructions changed to ldrsb/ldrsh.
-Tue Apr 18 12:14:51 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+2000-05-11 Ulf Carlsson <ulfc@engr.sgi.com>
- * mips-dis.c (print_insn_little_mips): Cast return value from
- bfd_getl32 from bfd_vma to unsigned long, because _print_insn_mips
- expects an unsigned long, and that might be fewer words of
- argument storage (e.g., if bfd_vma is long long on a 32-bit
- machine).
- (print_insn_big_mips): Likewise with bfd_getb32 value.
- (_print_insn_mips): Now static.
+ * mips-dis.c (print_insn_arg): Don't mask top 32 bits of 64-bit
+ target addresses for 'jal' and 'j'.
-Mon Apr 17 12:23:28 1995 Kung Hsu <kung@rtl.cygnus.com>
+2000-05-10 Geoff Keating <geoffk@redhat.com>
- * m68k-dis.c: Take out #define BREAK_UP_BIG_DECL kludge, because
- gcc memory hog problem with initializer is fixed.
+ * ppc-opc.c (powerpc_opcodes): Make the predicted-branch opcodes
+ also available in common mode when powerpc syntax is being used.
-Mon Apr 10 15:55:01 1995 Stan Shebs <shebs@andros.cygnus.com>
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
- Merge in support for Mac MPW as a host.
- (Old change descriptions retained for informational value.)
+ * m68k-dis.c (dummy_printer): Add ATTRIBUTE_UNUSED to args.
+ (dummy_print_address): Ditto.
- * mpw-config.in (archname): Compute from the config.
- (BFD_MACHINES, ARCHDEFS): Put into mk.tmp.
+2000-05-04 Timothy Wall <twall@redhat.com>
- * mpw-config.in (target_arch): Compute from canonical target.
- (m68k, mips, powerpc, sparc): Add architectures.
- * mpw-make.in (disassemble.c.o): Add.
- (ALL_CFLAGS): Remove special flags (-mc68020 -mc68881 -model far).
+ * tic54x-opc.c: New.
+ * tic54x-dis.c: New.
+ * disassemble.c (disassembler): Add ARCH_tic54x.
+ * configure.in: Added tic54x target.
+ * configure: Ditto.
+ * Makefile.am: Add tic54x dependencies.
+ * Makefile.in: Ditto.
- * mpw-config.in (BFD_MACHINES): Set to a default value.
- * mpw-make.in (BFD_MACHINES): Remove wired-in value.
+2000-05-03 J.T. Conklin <jtc@redback.com>
- * mpw-make.in (CSEARCH): Add extra-include to search path.
+ * ppc-opc.c (VA, VB, VC, VD, VS, SIMM, UIMM, SHB): New macros, for
+ vector unit operands.
+ (VX, VX_MASK, VXA, VXA_MASK, VXR, VXR_MASK): New macros, for vector
+ unit instruction formats.
+ (PPCVEC): New macro, mask for vector instructions.
+ (powerpc_operands): Add table entries for above operand types.
+ (powerpc_opcodes): Add table entries for vector instructions.
- * mpw-config.in (varargs.h): Don't create.
- (sysdep.h): Create using forward-include.
- * mpw-make.in (CSEARCH): Add include/mpw to search path.
+ * ppc-dis.c (print_insn_big_powerpc): Add PPC_OPCODE_ALTIVEC to mask.
+ (print_insn_little_powerpc): Likewise.
+ (print_insn_powerpc): Prepend 'v' when printing vector registers.
- * mpw-config.in: New file, MPW version of configure.in.
- * mpw-make.in: New file, MPW version of Makefile.in.
+2000-04-24 Clinton Popetz <cpopetz@redhat.com>
-Fri Mar 31 14:23:38 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+ * configure.in: Add bfd_powerpc_64_arch.
+ * disassemble.c (disassembler): Use print_insn_big_powerpc for
+ 64 bit code.
- * alpha-dis.c (print_insn_alpha): Put empty statement after
- default label.
+2000-04-24 Nick Clifton <nickc@redhat.com>
-Tue Mar 21 10:51:40 1995 Jeff Law (law@snake.cs.utah.edu)
+ * fr30-desc.c (fr30_cgen_cpu_open): Initialise signed_overflow
+ field.
- * hppa-dis.c (sign_extend): Delete, redundant with libhppa.h version.
- (low_sign_extend): Likewise.
- (get_field): Delete unused function.
- (set_field, deposit_14, deposit_21): Likewise.
+2000-04-23 Denis Chertykov <denisc@overta.ru>
-Fri Mar 17 15:55:53 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+ * avr-dis.c (reg_fmul_d): New. Extract destination register from
+ FMUL instruction.
+ (reg_fmul_r): New. Extract source register from FMUL instruction.
+ (reg_muls_d): New. Extract destination register from MULS instruction.
+ (reg_muls_r): New. Extract source register from MULS instruction.
+ (reg_movw_d): New. Extract destination register from MOVW instruction.
+ (reg_movw_r): New. Extract source register from MOVW instruction.
+ (print_insn_avr): Handle MOVW, MULS, MULSU, FMUL, FMULS, FMULSU,
+ EICALL, EIJMP, LPM r,Z, ELPM r,Z, SPM, ESPM instructions.
- * i386-dis.c: Support for more pentium opcodes. From Guy Harris
- (guy@netapp.com).
+2000-04-22 Timothy Wall <twall@redhat.com>
-Tue Mar 14 00:52:57 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+ * ia64-gen.c (general): Add an ordered table of primary
+ opcode names, as well as priority fields to disassembly data
+ structures to enforce a preferred disassembly format based on the
+ ordering of the opcode tables.
+ (load_insn_classes): Show a useful message if IC tables are missing.
+ (load_depfile): Ditto.
+ * ia64-asmtab.h (struct ia64_dis_names ): Add priority flag to
+ distinguish preferred disassembly.
+ * ia64-opc-f.c: Reorder some insn for preferred disassembly
+ format. Fix incorrect flag on fma.s/fma.s.s0.
+ * ia64-opc.c: Scan *all* disassembly matches and use the one with
+ the highest priority.
+ * ia64-opc-b.c: Use more abbreviations.
+ * ia64-asmtab.c: Regenerate.
- Sat Feb 11 17:22:41 1995 Klaus Kaempf (kkaempf@didymus.rmi.de)
+2000-04-21 Jason Eckhardt <jle@redhat.com>
- * alpha-opc.h (OSF_ASMCODE): define
- print pal-code names as defined in App C of the
- Alpha Architecture Reference Manual
+ * hppa-dis.c (extract_16): New function.
+ (print_insn_hppa): Fix incorrect handling of 'fe'. Added handling of
+ new operand types l,y,&,fe,fE,fx.
- * alpha-dis.c: cleaned up output
- print stylized code forms as defined in App A.4.3 of the
- Alpha Architecture Reference Manual
+2000-04-21 Richard Henderson <rth@redhat.com>
+ David Mosberger <davidm@hpl.hp.com>
+ Timothy Wall <twall@redhat.com>
+ Bob Manson <manson@charmed.cygnus.com>
+ Jim Wilson <wilson@redhat.com>
-Wed Mar 8 15:21:14 1995 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am (HFILES): Add ia64-asmtab.h, ia64-opc.h.
+ (CFILES): Add ia64-dis.c, ia64-opc-a.c, ia64-opc-b.c, ia64-opc-f.c,
+ ia64-opc-i.c, ia64-opc-m.c, ia64-opc-d.c, ia64-opc.c, ia64-gen.c,
+ ia64-asmtab.c.
+ (ALL_MACHINES): Add ia64-dis.lo, ia64-opc.lo.
+ (ia64-ic.tbl, ia64-raw.tbl, ia64-waw.tbl, ia64-war.tbl, ia64-gen,
+ ia64-gen.o, ia64-asmtab.c, ia64-dis.lo, ia64-opc.lo): New rules.
+ * Makefile.in: Rebuild.
+ * configure Rebuild.
+ * configure.in (bfd_ia64_arch): New target.
+ * disassemble.c (ARCH_ia64): Define.
+ (disassembler): Support ARCH_ia64.
+ * ia64-asmtab.c, ia64-asmtab.h, ia64-dis.c, ia64-gen.c ia64-ic.tbl,
+ ia64-opc-a.c, ia64-opc-b.c, ia64-opc-d.c ia64-opc-f.c, ia64-opc-i.c,
+ ia64-opc-m.c, ia64-opc-x.c, ia64-opc.c, ia64-opc.h, ia64-raw.tbl,
+ ia64-war.tbl, ia64-waw.tbl: New files.
- * mips-opc.c: Add new mips4 instructions. Don't set INSN_RFE for
- `rfe'.
- * mips-dis.c (print_insn_arg): Handle new argument types 'h', 'R',
- 'N', and 'M'.
+2000-04-20 Alexandre Oliva <aoliva@redhat.com>
-Wed Mar 8 02:54:05 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+ * m10300-dis.c (HAVE_AM30, HAVE_AM33): Define.
+ (disassemble): Use them.
- * m68k-dis.c (opcode): New function. Returns address of opcode
- table entry given index, even if the opcode table was split to
- work around gcc bugs.
- (print_insn_m68k): Call opcode instead of referencing m68k_opcodes
- directly.
- (BREAK_UP_BIG_DECL): Make secondary array static and const.
- (reg_names): Now const.
- (print_insn_arg): Arrays cacheFieldName and names now const.
- (print_indexed): Array scales now const.
+2000-04-14 Alan Modra <alan@linuxcare.com.au>
-Tue Mar 7 16:41:21 1995 Ian Lance Taylor <ian@cygnus.com>
+ * sysdep.h: Include "ansidecl.h" not <ansidecl.h>
+ * Makefile.am: Update dependencies.
+ * Makefile.in: Regenerate.
- * ppc-opc.c: Sort recently added instructions by minor opcode
- number within major opcode number.
+2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-Mon Mar 6 10:04:36 1995 Jeff Law (law@snake.cs.utah.edu)
+ * a29k-dis.c, alpha-dis.c, alpha-opc.c, arc-dis.c, arc-opc.c,
+ avr-dis.c, d10v-dis.c, d10v-opc.c, d30v-dis.c, d30v-opc.c,
+ disassemble.c, h8300-dis.c, h8500-dis.c, hppa-dis.c, i370-dis.c,
+ i370-opc.c, i960-dis.c, m10200-dis.c, m10200-opc.c, m10300-dis.c,
+ m10300-opc.c, m68k-dis.c, m68k-opc.c, m88k-dis.c, mcore-dis.c,
+ mips-dis.c, mips-opc.c, mips16-opc.c, pj-dis.c, pj-opc.c,
+ ppc-dis.c, ppc-opc.c, sh-dis.c, sparc-dis.c, sparc-opc.c,
+ tic80-dis.c, tic80-opc.c, v850-dis.c, v850-opc.c, vax-dis.c,
+ w65-dis.c, z8k-dis.c, z8kgen.c: Include sysdep.h. Remove
+ ansidecl.h as sysdep.h includes it.
- * hppa-dis.c: Include libhppa.h.
+2000-04-7 Andrew Cagney <cagney@b1.redhat.com>
-Fri Feb 24 19:15:36 1995 Ian Lance Taylor <ian@cygnus.com>
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure: Re-generate.
- * mips-opc.c: Change dli to use M_DLI, and add dla.
+2000-04-05 J"orn Rennecke <amylaar@redhat.com>
-Mon Feb 20 23:54:38 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+ * sh-opc.h (sh_table): Use A_DISP_PC / PCRELIMM_8BY2 for ldre & ldrs.
+ stc GBR,@-<REG_N> is available for arch_sh1_up.
+ Group parallel processing insn with identical mnemonics together.
+ Make three-operand psha / pshl come first.
- * Makefile.in (ALL_MACHINES): Add w65-dis.o.
+2000-04-05 J"orn Rennecke <amylaar@redhat.co.uk>
-Thu Feb 16 17:34:41 1995 Ian Lance Taylor <ian@cygnus.com>
+ * sh-opc.h (sh_nibble_type): Remove DISP_8 and DISP_4.
+ Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}. Add REPEAT.
+ (sh_arg_type): Add A_PC.
+ (sh_table): Update entries using immediates. Add repeat.
+ * sh-dis.c (print_insn_shx): Remove DISP_8 and DISP_4.
+ Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}. Add REPEAT.
- * mips-opc.c: Add r4650 mul instruction.
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
-Wed Feb 15 15:45:20 1995 Ian Lance Taylor <ian@cygnus.com>
+ * po/opcodes.pot: Regenerate.
- * mips-opc.c: Add uld and usd macros for unaligned double load and
- store.
+ * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
+ (DEP): Quote when passing vars to sub-make. Add warning message
+ to end.
+ (DEP1): Rewrite for "gcc -MM".
+ (CLEANFILES): Add DEP2.
+ Update dependencies.
+ * Makefile.in: Regenerate.
-Tue Feb 14 13:17:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+2000-04-03 Denis Chertykov <denisc@overta.ru>
- * ppc-opc.c (powerpc_opcodes): Add 403GA opcodes rfci, dccci,
- mfdcr, mtdcr, icbt, iccci.
+ * avr-dis.c: Syntax cleanup.
+ (add0fff): Print the pc relative address as a signed number.
+ (add03f8): Likewise.
-Thu Feb 9 12:28:13 1995 Stan Shebs <shebs@andros.cygnus.com>
+2000-04-01 Ian Lance Taylor <ian@zembu.com>
- * i960-dis.c (struct tabent, struct sparse_tabent): Change the
- signed char fields to shorts, more portable.
+ * disassemble.c (disassembler_usage): Don't use a prototype. Mark
+ the parameter ATTRIBUTE_UNUSED.
+ * ppc-opc.c: Add ATTRIBUTE_UNUSED as needed.
-Wed Feb 8 17:29:29 1995 Stan Shebs <shebs@andros.cygnus.com>
+2000-04-01 Alexandre Oliva <aoliva@redhat.com>
- * i960-dis.c (struct tabent, struct sparse_tabent): Declare the
- char fields as signed chars, since they may have negative values.
+ * m10300-opc.c: SP-based offsets are always unsigned.
-Mon Feb 6 10:52:06 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+2000-03-29 Thomas de Lellis <tdel@windriver.com>
- * i386-dis.c (dis386_twobyte): Add cpuid, From Charles Hannum
- (mycroft@netbsd.org).
+ * arm-opc.h (thumb_opcodes): Disassemble 0xde.. to "bal"
+ [branch always] instead of "undefined".
-Mon Jan 30 12:38:00 1995 Ian Lance Taylor <ian@cygnus.com>
+2000-03-27 Nick Clifton <nickc@redhat.com>
- From "Logg, Ed" <elogg@ea.com>:
- * ppc-opc.c (extract_bdm): Correct parenthezisation.
- * ppc-dis.c (print_insn_powerpc): Print .long before unrecognized
- value.
+ * d30v-opc.c (d30v_format_table): Move SHORT_AR to end of list of
+ short instructions, from end of list of long instructions.
-Thu Jan 26 18:32:08 1995 Ian Lance Taylor <ian@cygnus.com>
+2000-03-27 Ian Lance Taylor <ian@zembu.com>
- * ppc-opc.c: Changes based on patch from David Edelsohn
- <edelsohn@mhpcc.edu>.
- (powerpc_operands): Add operands SPRBAT and SPRG. Split TBR out of
- SPR.
- (FXM_MASK): Define.
- (insert_tbr): New static function.
- (extract_tbr): New static function.
- (XFXFXM_MASK, XFXM): Define.
- (XSPRBAT_MASK, XSPRG_MASK): Define.
- (powerpc_opcodes): Add instructions to access special registers by
- name. Add mtcr and mftbu.
+ * Makefile.am (CFILES): Add avr-dis.c.
+ (ALL_MACHINES): Add avr-dis.lo.
-Tue Jan 17 10:56:43 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+2000-03-27 Alan Modra <alan@linuxcare.com>
- * mips-opc.c (P3): Define.
- (mips_opcodes): Add mad and madu.
+ * avr-dis.c (add0fff, add03f8): Don't use structure bitfields to
+ truncate integers.
+ (print_insn_avr): Call function via pointer in K&R compatible way.
+ (dispLDD, regPP, reg50, reg104, reg40, reg20w, lit404, lit204,
+ add0fff, add03f8): Convert to old style function declaration and
+ add prototype.
+ (avrdis_opcode): Add prototype.
-Sun Jan 15 16:32:59 1995 Steve Chamberlain <sac@splat>
+2000-03-27 Denis Chertykov <denisc@overta.ru>
- * configure.in: Add W65 support.
+ * avr-dis.c: New file. AVR disassembler.
+ * configure.in (bfd_avr_arch): New architecture support.
* disassemble.c: Likewise.
- * w65-opc.h, w65-dis.c: New files.
-
-Wed Dec 28 22:15:33 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * h8300-dis.c (bfd_h8_disassemble): Add support for 2 bit
- immediates.
-
-Tue Dec 20 11:25:12 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * mips-opc.c: Add dli as a synonym for li.
-
-Thu Dec 8 18:23:31 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * alpha-dis.c (print_insn_alpha): Handle call_pal instruction, and
- print something for reserved opcode values, even if it won't
- assemble again.
-
- * mips-dis.c (_print_insn_mips): When initializing, shift right
- and mask, to avoid sign extension problems on the Alpha.
-
- * m68k-dis.c (print_insn_arg, case 'J'): Handle buscr and pcr
- control registers.
-
-Wed Nov 23 22:34:51 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * sh-opc.h (mov.l gbr): Get direction right.
- * sh-dis.c (print_insn_shx): New function.
- (print_insn_shl, print_insn_sh): Call print_insn_shx to
- print opcodes with right byte order.
-
-Thu Nov 3 19:32:22 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * ns32k-dis.c (struct ns32k_option): Renamed from struct option,
- to avoid conflicts with getopt.
-
-Mon Oct 31 18:48:10 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * hppa-dis.c (print_insn_hppa): Read the instruction using
- bfd_getb32, so that it works on a little endian or 64 bit host.
- Remove unused local variable op.
-
-Tue Oct 25 17:07:57 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * mips-opc.c: Use or instead of addu for pseudo-op move, since
- addu does not work correctly if -mips3.
-
-Wed Oct 19 13:40:16 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * a29k-dis.c (print_special): Add special register names defined
- on 29030, 29040 and 29050.
- (print_insn): Handle new operand type 'I'.
-
-Wed Oct 12 11:59:55 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * Makefile.in (INSTALL): Use top level install.sh script.
-
-Wed Oct 5 19:16:29 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * sparc-dis.c: Rewrite to use bitfields, rather than a union, so
- that it works on a little endian host.
-
-Tue Oct 4 12:14:21 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * configure.in: Use ${config_shell} when running config.bfd.
-
-Wed Sep 21 18:49:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mips-opc.c (mips_opcodes): "dabs" is only available with -mips3.
-
-Thu Sep 15 16:30:22 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * a29k-dis.c (print_insn): Print the opcode.
-
-Wed Sep 14 17:52:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mips-opc.c (mips_opcodes): Set WR_t for sc and scd.
-
-Sun Sep 11 22:32:17 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-dis.c (reg_names): Use r26-r23 for arg0-arg3.
-
-Tue Sep 6 11:37:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mips-opc.c: Set INSN_STORE_MEMORY flag for all instructions
- which store a value into memory.
-
-Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * configure.in, Makefile.in, disassemble.c: Add support for the ARM.
- * arm-dis.c, arm-opc.h: New files.
-
-Fri Aug 5 14:00:05 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (ns32k-dis.o): Add dependency.
- * ns32k-dis.c (print_insn_arg): Declare initialized local as
- string, not as array of chars.
-
-Thu Jul 28 18:14:16 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * sparc-dis.c (print_insn_sparc): Handle new operand type 'x'.
-
- * sparc-opc.c: Added sparclite extended FP operations, and
- versions of v9 impdep* instructions permitting specification of
- the OPF field.
-
-Tue Jul 26 16:36:03 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i960-dis.c (reg_names): Now const.
- (struct sparse_tabent): New type, copied from array type in mem
- function.
- (ctrl): Local static array ctrl_tab now const.
- (cobr): Local static array cobr_tab now const.
- (mem): Local variables reg1, reg2, reg3 now point to const. Local
- static variable mem_tab no longer explicitly initialized. Changed
- mem_init to const array of struct sparse_tabent.
- (reg): Local static variable reg_tab no longer explicitly
- initialized. Changed reg_init to const array of struct
- sparse_tabent.
- (ea): Local static array scale_tab now const.
-
- * i960-dis.c (reg): Added i960JX instructions to reg_init table.
- (REG_MAX): Updated.
-
-Tue Jul 19 21:00:00 1994 DJ Delorie (dj@ctron.com)
-
- * configure.bat: the disassember needs to be enabled for
- "objdump -d" to work in djgpp.
-
-Wed Jul 13 18:01:58 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ns32k-dis.c: Deleted all code in "#ifdef GDB".
- (invalid_float): Enabled general version, doesn't require running
- on ns32k host. Changed to take char* argument, and test for
- explicitly specified sizes, instead of using sizeof() on host CPU
- types.
- (INVALID_FLOAT): Cast first argument.
- (opt_u, opt_U, opt_O, opt_C, opt_S, list_P532, list_M532,
- list_P032, list_M032): Now const.
- (optlist, list_search): Made appropriate arguments now point to
- const.
- (print_insn_arg): Changed static array of one-character-string
- pointers into a static const array of characters; fixed sprintf
- statement accordingly.
-
-Sun Jul 10 00:27:47 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * opcodes/ns32k-dis.c: Semi-new file. Had apparently been dropped
- from distribution. A ns32k-dis.c from a previous distribution has
- been brought up to date and supports the new interface.
-
- * disassemble.c: define ARCH_ns32k and add case bfd_arch_ns32k.
-
- * configure.in: add bfd_ns32k_arch target support.
-
- * Makefile.in: add ns32k-dis.o to ALL_MACHINES.
- Add ns32k-dis.c to CFILES. Add dependencies for ns32k-dis.o.
-
-Wed Jun 29 22:10:37 1994 Steve Chamberlain (sac@cygnus.com)
-
- * h8300-dis.c (bfd_h8_disassemble): Get 16bit branch
- disassembly right.
-
-Tue Jun 28 13:22:06 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * h8300-dis.c, mips-dis.c: Don't use true and false.
-
-Thu Jun 23 12:53:19 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * configure.in: Change --with-targets to --enable-targets.
-
-Wed Jun 22 13:38:32 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mips-dis.c (_print_insn_mips): Build a static hash table mapping
- opcodes to the first instruction with that opcode, to speed
- disassembly of large files. From ralphc@pyramid.com (Ralph
- Campbell).
-
-Tue Jun 7 12:49:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (mostlyclean): Fix typo (was mostyclean).
-
-Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
-
- * configure.bat: update to latest makefile.in
-
-Sat May 7 17:13:21 1994 Steve Chamberlain (sac@cygnus.com)
-
- * a29k-dis.c (print_insn): Print 'x' type operand in hex.
- * h8300-dis.c (bfd_h8_disassemble): Print 16bit rels correctly.
- * sh-dis.c (print_insn_sh): Don't recur endlessly if delay
- slot insn is in a delay slot.
- * z8k-opc.h: (resflg): Fix patterns.
- * h8500-opc.h Fix CR insn patterns.
-
-Fri May 6 14:34:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc-opc.c (powerpc_opcodes): Put PowerPC versions of "cmp" and
- "cmpl" before POWER versions, so that gas -many uses them.
-
-Thu Apr 28 18:32:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * disassemble.c: New file.
- * Makefile.in (OFILES): Add disassemble.o.
- (disassemble.o): Provide dependencies; compile with $(ARCHDEFS).
- * configure.in: Define ARCHDEFS in Makefile. Code taken from
- binutils/configure.in.
-
- * m68k-dis.c (print_insn_m68k): If F_ALIAS flag is set, skip the
- opcode being examined.
-
-Thu Apr 21 17:08:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc-opc.c (powerpc_operands): Added RAL, RAM and RAS.
- (insert_ral, insert_ram, insert_ras): New functions.
- (powerpc_opcodes): Use RAL for load with update, RAM for lmw, and
- RAS for store with update.
-
-Sat Apr 16 23:41:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc-opc.c (powerpc_opcodes): Correct fcir. From David Edelsohn
- (edelsohn@npac.syr.edu).
-
-Wed Apr 6 17:11:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c (mips_opcodes): Correct operands of "nor" with an
- immediate argument.
-
-Mon Apr 4 16:30:46 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * sparc-opc.c (sparc_opcodes): Fix "rd %fprs,%l0".
-
-Mon Apr 4 13:22:00 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc-opc.c (powerpc_operands): The signedp field has been
- removed, so don't initialize it. Set the PPC_OPERAND_SIGNED flag
- instead. Add new operand SISIGNOPT.
- (powerpc_opcodes): For lis, liu, addis, and cau use SISIGNOPT.
- Based on patch from David Edelsohn (edelsohn@npac.syr.edu).
- * ppc-dis.c (print_insn_powerpc): Check PPC_OPERAND_SIGNED rather
- than signedp field.
-
-Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * i386-dis.c (struct private): Renamed to dis_private. `private'
- is a reserved word for dynix cc.
-
-Mon Mar 28 13:00:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Change error message to refer to bfd/config.bfd
- rather than bfd/configure.in.
-
-Mon Mar 28 12:28:30 1994 David Edelsohn (edelsohn@npac.syr.edu)
-
- * ppc-opc.c: Define POWER2 as short alias flag.
- (powerpc_opcodes): Add POWER/2 opcodes lfq*, stfq*, fcir[z], and
- fsqrt.
-
-Wed Mar 23 12:23:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i960-dis.c (print_insn_i960): Don't read a second word for
- opcodes 0, 1, 2 and 3.
-
-Wed Mar 16 15:37:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Don't build m68881-ext.o for bfd_m68k_arch.
-
-Mon Mar 14 14:53:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m68881-ext.c: Removed; no longer used.
- * Makefile.in: Changed accordingly.
-
- * m68k-dis.c (ext_format_68881): Don't declare.
- (print_insn_m68k): If an instruction uses place 'i', it uses at
- least four fixed bytes.
- (print_insn_arg): Don't bump p by 2 for case 'I', place 'i'. For
- extended float, convert to double using floatformat_to_double, not
- ieee_extended_to_double, and fetch the data before converting it.
-
-Tue Mar 8 18:12:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: It's sqrt.s, not sqrt.w. From
- davidj@ICSI.Berkeley.EDU (David Johnson).
-
-Tue Feb 8 16:55:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc-opc.c (powerpc_opcodes): The POWER uses bdn[l][a] where the
- PowerPC uses bdnz[l][a].
-
-Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dis-buf.c, i386-dis.c: Include sysdep.h.
-
-Mon Feb 7 19:22:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in (bfd_powerpc_arch): Use ppc-dis.o and ppc-opc.o.
-
- * ppc-opc.c (powerpc_opcodes): Mark POWER instructions supported
- by Motorola PowerPC 601 with PPC_OPCODE_601.
- * ppc-dis.c (print_insn_big_powerpc, print_insn_little_powerpc):
- Disassemble Motorola PowerPC 601 instructions as well as normal
- PowerPC instructions.
-
-Sun Feb 6 07:45:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * i960-dis.c (reg, mem): Just use a static array instead of
- calling xmalloc.
-
-Sat Feb 5 00:04:02 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-dis.c (print_insn_hppa): For '?' and '@' only adjust the
- condition name index if this is for a negated condition.
-
- * hppa-dis.c (print_insn_hppa): No space before 'H' operand.
- Floating point format for 'H' operand is backwards from normal
- case (0 == double, 1 == single). For '4', '6', '7', '9', and '8'
- operands (fmpyadd and fmpysub), handle bizarre register
- translation correctly for single precision format.
-
- * hppa-dis.c (print_insn_hppa): Do not emit a space after 'F'
- or 'I' operands if the next format specifier is 'M' (fcmp
- condition completer).
-
-Feb 4 23:38:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc-opc.c (powerpc_operands): New operand type MBE to handle a
- single number giving a bitmask for the MB and ME fields of an M
- form instruction. Change NB to accept 32, and turn it into 0;
- also turn 0 into 32 when disassembling. Seperated SH from NB.
- (insert_mbe, extract_mbe): New functions.
- (insert_nb, extract_nb): New functions.
- (SC_MASK): Mask out SA and LK bits.
- (powerpc_opcodes): Change "cal" to use RT, D, RA rather than RT,
- RA, SI. Change "liu" and "cau" to use UI rather than SI. Mark
- "bctr" and "bctrl" as accepted by POWER. Change "rlwimi",
- "rlimi", "rlwimi.", "rlimi.", "rlwinm", "rlinm", "rlwinm.",
- "rlinm.", "rlmi", "rlmi.", "rlwnm", "rlnm", "rlwnm.", "rlnm." to
- use MBE rather than MB. Add "mfmq" and "mtmq" POWER instructions.
- (powerpc_macros): Define table of macro definitions.
- (powerpc_num_macros): Define.
-
- * ppc-dis.c (print_insn_powerpc): Don't skip optional operands
- if PPC_OPERAND_NEXT is set.
-
-Sat Jan 22 23:10:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i960-dis.c (print_insn_i960): Make buffer bfd_byte instead of
- char. Retrieve contents using bfd_getl32 instead of shifting.
-
-Fri Jan 21 19:01:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc-opc.c: New file. Opcode table for PowerPC, including
- opcodes for POWER (RS/6000).
- * ppc-dis.c: New file. PowerPC and Power (RS/6000) disassembler.
- * Makefile.in (ALL_MACHINES): Add ppc-dis.o and ppc-opc.o.
- (CFILES): Add ppc-dis.c.
- (ppc-dis.o, ppc-opc.o): New targets.
- * configure.in: Build ppc-dis.o and ppc-opc.o for bfd_rs6000_arch.
-
-Mon Jan 17 20:05:49 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-dis.c (print_insn_hppa): Handle 'N' in assembler template.
- No space before 'u', 'f', or 'N'.
-
-Sun Jan 16 14:20:16 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * i386-dis.c (print_insn_i386): Add FIXME comment regarding reading
- farther than we should.
-
- * i386-dis.c (dis386): Use Yb and Yv for scasb and scasS.
-
-Thu Jan 6 12:38:05 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * sparc-dis.c m68k-dis.c alpha-dis.c a29k-dis.c: Fix comments.
-
-Wed Jan 5 11:56:21 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * i960-dis.c (print_insn_i960): Only read word2 if the instruction
- needs it, to prevent reading past the end of a section.
-
-Wed Nov 17 17:20:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.h: Use macro for j instruction, to support SVR4 PIC.
- Removed t,A case for la; always use t,A(b) case.
-
-Mon Nov 8 12:37:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- From Ted Lemen <mellon@pepper.ncd.com>
- * mips-dis.c (print_insn_arg): Handle 'k'.
- * mips-opc.c: Make cache use k, not t.
-
-Sun Nov 7 23:52:34 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-opc.h, alpha-dis.c (print_insn_alpha): Add
- FLOAT_MEMORY_FORMAT_CODE, FLOAT_BRANCH_FORMAT_CODE, correct
- FLOAT_FORMAT_CODE to put out floating point register names.
-
-Mon Nov 1 18:17:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: Use macros for jal variants, to support SVR4 PIC.
-
-Thu Oct 28 17:42:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * a29k-dis.c (print_insn): Use 0x%08x, not 0x%8x.
-
-Wed Oct 27 11:48:01 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c (dsll, dsra, dsrl): Added '>' cases for shift counts
- larger than 32. Moved dsxx32 variants first for disassembler.
-
-Mon Oct 25 11:33:14 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * z8kgen.c, z8k-opc.h: Add full lda information.
-
-Tue Oct 19 12:39:25 1993 Jeffrey A Law (law@cs.utah.edu)
-
- * hppa-dis.c (print_insn_hppa): Do not emit a space after
- movb instructions. Any necessary space will be emitted by
- the code to handle nullification completers.
-
-Wed Oct 13 16:19:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: Moved l.d down so that it disassembles as ldc1.
-
-Fri Oct 8 02:34:21 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-opc.h: Add ldl_l, fix typo for ldq_u.
- * alpha-dis.c (print_insn_alpha): Add code for PAL_FORMAT_CODE.
-
-Tue Oct 5 17:47:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: Correct lwu opcode value (book had it wrong).
-
-Thu Sep 30 11:26:18 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * z8k-dis.c (FETCH_DATA): get just the right amount of data.
- (unpack_instr): Cope with ARG_IMM4M1 type instructions.
-
-Wed Sep 29 16:24:49 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * m88k-dis.c (m88kdis): comment change. Remove space after
- printing mnemonic.
- (printop): handle new arg types DEC and XREG for m88110.
-
-Tue Sep 28 19:20:16 1993 Jeffrey A Law (law@snake.cs.utah.edu)
-
- * hppa-dis.c (print_insn_hppa): Handle 'z' operand
- type for absolute branch addresses. Delete special
- "ble" and "be" code in 'W' operand code.
-
-Fri Sep 24 14:08:33 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: Set hazard information correctly for branch
- likely instructions.
-
-Fri Sep 17 04:41:17 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-dis.c (print_insn_alpha), alpha-opc.h: Fix bugs, use
- info->fprintf_func for printing and info->print_address_func for
- address output.
-
-Wed Sep 15 12:12:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: Set INSN_TRAP for tXX instructions.
-
-Thu Sep 9 10:11:27 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: From davidj@ICSI.Berkeley.EDU (David Johnson):
- Corrected second case of "b" for disassembler.
-
-Tue Sep 7 14:25:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-dis.c, m88k-dis.c: Don't include libbfd.h. Changed calls
- to BFD swapping routines to correspond to BFD name changes.
-
-Thu Sep 2 10:35:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: Change div machine instruction to be z,s,t rather
- than s,t. Change div macro to be d,v,t rather than d,s,t.
- Likewise for divu, ddiv, ddivu. Added z,s,t case for drem, dremu,
- rem and remu which generates only the corresponding div
- instruction. This is for compatibility with the MIPS assembler,
- which only generates the simple machine instruction when an
- explicit destination of $0 is used.
- * mips-dis.c (print_insn_arg): Handle 'z' (always register zero).
-
-Thu Aug 26 17:41:44 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: From davidj@ICSI.Berkeley.EDU (David Johnson): Set
- WR_31 hazard for bal, bgezal, bltzal.
-
-Thu Aug 26 17:20:02 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * hppa-dis.c (print_insn_hppa): Use print function
- from within the disassemble_info, not fprintf_filtered.
-
-Wed Aug 25 13:51:40 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * hppa-dis.c (print_insn_hppa): Handle '|' like '>'. (From Jeff
- Law, law@cs.utah.edu.)
-
-Mon Aug 23 12:44:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c ("absu"): Removed.
- ("dabs"): Added.
-
-Fri Aug 20 10:52:52 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: Added r6000 and r4000 instructions and macros.
- Changed hazard information to distinguish between memory load
- delays and coprocessor load delays.
-
-Wed Aug 18 15:39:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: li.d uses "T,L", not "S,F". Added li.s.
-
-Tue Aug 17 09:44:42 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * configure.in: Don't pass cpu to config.bfd.
-
-Tue Aug 17 12:23:52 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m88k-dis.c (m88kdis): Make class unsigned.
-
-Thu Aug 12 15:08:18 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * alpha-dis.c (print_insn_alpha): One branch format case was
- missing the instruction name.
-
-Wed Aug 11 19:29:39 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * Makefile.in (ALL_MACHINES): Renamed from DIS_LIBS.
- Add the arch-specific auxiliary files.
- (OFILES): Remove the arch-specific auxiliary files
- and use BFD_MACHINES instead of DIS_LIBS.
- * configure.in: Set BFD_MACHINES based on --with-targets option.
-
-Thu Aug 12 12:04:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: Added lwc1 E,A(b) to go with lwc1 T,A(b). Similarly
- for swc1.
-
-Sun Aug 8 15:09:30 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * sparc-opc.c: Change CONST to const to deal with gcc
- -Dconst=__const -traditional.
-
-Fri Aug 6 10:58:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-opc.c: From davidj@ICSI.Berkeley.EDU (David Johnson): Took
- coprocessor instructions out of #if 0, and made them use new
- argument type "C".
-
-Thu Aug 5 17:11:06 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * sparc-dis.c: Include ansidecl.h before opcodes/sparc.h.
-
-Fri Jul 30 18:48:15 1993 John Gilmore (gnu@cygnus.com)
-
- * sparc-opc.c: Add F_JSR, F_UNBR, or F_CONDBR flags to each branch
- instruction, for use by the disassembler.
-
- * sparc-dis.c (SEX): Add sign extension macro. Replace many
- hand-coded sign extensions that depended on 32-bit host ints.
- FIXME, we still depend on big-endian host bitfield ordering.
- (sparc_print_insn): Set the insn_info_valid field, and the
- other fields that describe the instruction being printed.
-
-Tue Jul 27 17:04:58 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * sparc-opc.c (call): Accept all 6 addressing modes valid for
- `jmp' instead of just one of them.
-
-Wed Jul 21 11:43:32 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * hppa-dis.c: Move floating registers from reg_names to fp_reg_names.
- (fput_fp_reg_r): Renamed from fput_reg_r.
- (fput_fp_reg): New function.
- (print_insn_hppa): Use fput_fp_reg{,_r} where appropriate.
-
- * hppa-dis.c (print_insn_hppa, cases 'a', 'd'): Print space afterwards.
-
- * hppa-dis.c (print_insn_hppa, case 'd'): Use GET_COND not GET_FIELD.
-
-Mon Jul 19 13:52:21 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * hppa-dis.c (print_insn_hppa): Use extract_5r_store for 'r'.
-
- * hppa-dis.c (print_insn_hppa, case '>'): If next character is 'n',
- don't output a space.
-
- * hppa-dis.c (float_format_names): 10 is undefined, and 11 is quad.
-
-Sun Jul 18 16:30:02 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * mips-opc.c: New file, containing opcode table from
- ../include/opcode/mips.h.
- * Makefile.in: Add it.
-
-Thu Jul 15 12:37:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m88k-dis.c: New file, moved in from gdb and changed to use the
- new dis-asm.h disassembler interface.
- * Makefile.in (DIS_LIBS): Added m88k-dis.o.
- (m88k-dis.o): New target.
-
-Tue Jul 13 10:04:16 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips-dis.c (print_insn_arg, _print_insn_mips): Made pointer to
- argument string const char * to correspond to opcode/mips.h.
-
-Tue Jul 6 15:18:37 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips-dis.c: Updated to account for name changes in new version
- of opcode/mips.h.
- * Makefile.in: Added header file dependencies.
-
-Sat Jul 3 23:47:56 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * h8300-dis.c (bfd_h8_disassemble): Correct fetching of instruction.
-
-Thu Jul 1 12:23:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m68k-dis.c (NEXTWORD, NEXTLONG): Use ((x) ^ 0x8000) - 0x8000 to sign
- extend, rather than shifts.
-
-Sun Jun 20 20:56:56 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * Makefile.in: Undo 15 June change.
-
-Fri Jun 18 14:15:15 1993 Per Bothner (bothner@deneb.cygnus.com)
-
- * m68k-dis.c (print_insn_arg): Change return value to byte count
- or error code.
- * m68k-dis.c: Re-write to detect invalid operands before
- printing anything, so we can handle this the same way we
- handle invalid opcodes.
-
-Thu Jun 17 15:01:36 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * sh-dis.c, sh-opc.h: Understand some more opcodes.
-
-Wed Jun 16 13:48:05 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * hppa-dis.c: Include <ansidecl.h> and sysdep.h before other
- header files.
-
-Tue Jun 15 21:45:26 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * sparc-dis.c: Don't declare qsort, since sysdep.h might.
-
- * configure.in: Do make sysdep.h link.
- * Makefile.in: Search ../include. Don't search ../bfd.
-
-Tue Jun 15 13:36:10 1993 Stu Grossman (grossman@cygnus.com)
-
- Changes from Jeff Law, law@cs.utah.edu:
- * hppa-dis.c: Fix typo. 'a' and 'd' were reversed.
- Do not print a space before the completers specified by
- 'a' and 'd'.
-
-Fri Jun 11 18:40:21 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * mips-dis.c: No longer need to bomb out if HOST_64_BIT is
- defined, since gdb has been fixed.
-
- Changes from Jeff Law, law@cs.utah.edu:
- * hppa-dis.c (print_insn_hppa): Last argument to fput_reg,
- fput_reg_r, fput_creg, fput_const, and fputs_filtered should
- be a *disassemble_info, not a *FILE.
- * hppa-dis.c: Support 'd', '!', and 'a'.
- * hppa-dis.c: Support 's' to extract a 2 bit space register.
- * hppa-dis.c: Delete cases which are no longer needed.
-
-Fri Jun 11 07:53:48 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * m68k-dis.c (print_insn_{m68k,arg}): Add MMU codes.
-
-Tue Jun 8 12:25:01 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * h8300-dis.c: New file, removed from bfd/cpu-h8300.c, with
- H8/300-H opcodes.
-
-Mon Jun 7 12:58:49 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in (CSEARCH): Add -I../bfd for sysdep.h and bfd.h.
- * configure.in: No longer need to configure to get sysdep.h.
-
-Thu Jun 3 15:56:49 1993 Stu Grossman (grossman@cygnus.com)
-
- * Patches from Jeffrey Law <law@cs.utah.edu>.
- * hppa-dis.c: Support 'I', 'J', and 'K' in output
- templates for 1.1 FP computational instructions.
-
-Tue May 25 13:05:48 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * h8500-dis.c (print_insn_h8500): Address argument is type
- bfd_vma.
- * z8k-dis.c (print_insn_z8k, print_insn_z8001, print_insn_z8002):
- Ditto.
-
- * h8500-opc.h (addr_class_type): No comma at end of enumerator.
- * sh-opc.h (sh_nibble_type, sh_arg_type): Ditto.
-
- * sparc-dis.c (compare_opcodes): Move static declaration to
- top-level.
-
-Fri May 21 14:17:37 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * sparc-dis.c (print_insn_sparc): Implement 'n' argument for unimp
- instruction, remove unimp hack from 'l' argument.
-
-Wed May 19 15:35:54 1993 Stu Grossman (grossman@cygnus.com)
-
- * z8k-dis.c (fetch_data): Use unsigned char to make ancient gcc's
- happy.
-
-Fri May 14 15:22:46 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Based on patches from davidj@ICSI.Berkeley.EDU (David Johnson):
- * mips-dis.c (print_insn_arg): Handle 'C' for general coprocessor
- instructions.
-
-Fri May 14 00:09:14 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * hppa-dis.c: Include dis-asm.h before sysdep.h. Changed some
- arrays of string pointers to 2-d arrays of chars, to save
- space.
-
-Thu May 6 20:51:17 1993 Fred Fish (fnf@cygnus.com)
-
- * a29k-dis.c, alpha-dis.c, i960-dis.c, sparc-dis.c, z8k-dis.c:
- Cast second arg to read_memory_func to "bfd_byte *", as necessary.
-
-Tue May 4 20:31:10 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * hppa-dis.c: New file from Utah, adapted to new disassembler
- calling interface.
- * Makefile.in: Include it.
-
-Mon Apr 26 18:17:42 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * sh-dis.c, sh-opc.h: New files.
-
-Fri Apr 23 18:51:22 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * alpha-dis.c, alpha-opc.h: New files.
-
-Tue Apr 6 12:54:08 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips-dis.c: Sign extend 'j' and 'b' arguments, delta is a signed
- value.
-
-Mon Apr 5 17:37:37 1993 John Gilmore (gnu@cygnus.com)
-
- * sparc-dis.c: Make "ta" the default trap instruction, "t" the alias.
-
-Fri Apr 2 07:24:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * a29k-dis.c, sparc-dis.c, sparc-opc.c: Use CONST rather than
- const.
-
-Thu Apr 1 11:20:43 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * sparc-dis.c: Use fprintf_func a few places where I forgot,
- and double percent signs a few places.
-
- * a29k-dis.c, i960-dis.c: New, merged from gdb and binutils.
-
- * i386-dis.c, m68k-dis.c, mips-dis.c, sparc-dis.c:
- Use info->print_address_func not print_address.
-
- * dis-buf.c (generic_print_address): New function.
-
-Wed Mar 31 10:07:04 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in: Add sparc-dis.c.
- sparc-dis.c: New file, merges binutils and gdb versions as follows:
- From GDB:
- Add `add' instruction to the set that get checked
- for a preceding `sethi' in order to print an absolute address.
- * (print_insn): Disassembly prefers real instructions.
- (is_delayed_branch): Speed up.
- * sparc-opcode.h: Add ALIAS bit to aliases. Fix up opcode tables.
- Still missing some float ops, and needs testing.
- * sparc-pinsn.c (print_insn): Eliminate 'set' test, subsumed by
- F_ALIAS. Use printf, not fprintf, when not passing a file
- pointer...
- (compare_opcodes): Check that identical instructions have
- identical opcodes, complain otherwise.
- From binutils:
- * New 'm' arg.
- * Include reg_names.
- From neither:
- Use dis-asm.h/read_memory_func interface.
-
-Wed Mar 31 20:49:06 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * h8500-dis.c, i386-dis.c, m68k-dis.c, z8k-dis.c (fetch_data):
- deliberately return non-zero to setjmp from longjmp. Otherwise
- this code fails to compile.
-
-Wed Mar 31 17:04:31 1993 Stu Grossman (grossman@cygnus.com)
-
- * m68k-dis.c: Fix prototype for fetch_arg().
-
-Wed Mar 31 10:07:04 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-buf.c: New file, for new read_memory_func interface.
- Makefile.in (OFILES): Include it.
- m68k-dis.c, i386-dis.c, h8500-dis.c, mips-dis.c, z8k-dis.c:
- Use new read_memory_func interface.
-
-Mon Mar 29 14:02:17 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * h8500-dis.c (print_insn_h8500): Get sign of fp offsets right.
- * h8500-opc.h: Fix couple of opcodes.
-
-Wed Mar 24 02:03:36 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
-
- * Makefile.in: add dvi & installcheck targets
-
-Mon Mar 22 18:55:04 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in: Update for h8500-dis.c.
-
-Fri Mar 19 14:27:17 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+ * configure: Regenerate.
- * h8500-dis.c, h8500-opc.h: New files
+2000-03-06 J"oern Rennecke <amylaar@redhat.com>
-Thu Mar 18 14:12:37 1993 Per Bothner (bothner@rtl.cygnus.com)
+ * sh-opc.h (sh_table): ldre and ldrs have a *signed* displacement.
- * mips-dis.c, z8k-dis.c: Converted to use interface defined in
- ../include/dis-asm.h.
- * m68k-dis.c: New file (merge of ../binutils/m68k-pinsn.c
- and ../gdb/m68k-pinsn.c).
- * i386-dis.c: New file (merge of ../binutils/i386-pinsn.c
- and ../gdb/i386-pinsn.c).
- * m68881-ext.c: New file. Moved definition of
- ext_format ext_format_68881 from ../gdb/m68k-tdep.c.
- * Makefile.in: Adjust for new files.
- * i386-dis.c: Patches from John Hassey (hassey@dg-rtp.dg.com).
- * m68k-dis.c: Recognize '9' placement code, so (say) pflush
- can be dis-assembled.
+2000-03-02 J"orn Rennecke <amylaar@redhat.co.uk>
+
+ * d30v-dis.c (print_insn): Remove d*i hacks. Use per-operand
+ flag to determine if operand is pc-relative.
+ * d30v-opc.c:
+ (d30v_format_table):
+ (REL6S3): Renamed from IMM6S3.
+ Added flag OPERAND_PCREL.
+ (REL12S3, REL18S3, REL32): Split from IMM12S3, IMM18S3, REL32, with
+ added flag OPERAND_PCREL.
+ (IMM12S3U): Replaced with REL12S3.
+ (SHORT_D2, LONG_D): Delay target is pc-relative.
+ (SHORT_B2r, SHORT_B3r, SHORT_B3br, SHORT_D2r, LONG_Ur, LONG_2r):
+ Split from SHORT_B2, SHORT_D2, SHORT_B3b, SHORT_D2, LONG_U, LONG_2r,
+ using the REL* operands.
+ (LONG_2br, LONG_Dr): Likewise, from LONG_2b, LONG_D.
+ (SHORT_D1r, SHORT_D2Br, LONG_Dbr): Renamed from SHORT_D1, SHORT_D2B,
+ LONG_Db, using REL* operands.
+ (SHORT_U, SHORT_A5S): Removed stray alternatives.
+ (d30v_opcode_table): Use new *r formats.
+
+2000-02-28 Nick Clifton <nickc@redhat.com>
-Wed Feb 17 09:19:47 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+ * m32r-desc.c (m32r_cgen_cpu_open): Replace 'flags' with
+ 'signed_overflow_ok_p'.
- * mips-dis.c (print_insn_arg): Now returns void.
+2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
-Mon Jan 11 16:09:16 1993 Fred Fish (fnf@cygnus.com)
+ * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
+ name of the libtool directory.
+ * Makefile.in: Rebuild.
- * mips-dis.c (ansidecl.h): Include for benefit of sysdep.h
- files that use the macros.
+2000-02-24 Nick Clifton <nickc@redhat.com>
-Thu Jan 7 13:15:17 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+ * cgen-opc.c (cgen_set_signed_overflow_ok): New function.
+ (cgen_clear_signed_overflow_ok): New function.
+ (cgen_signed_overflow_ok_p): New function.
- * mips-dis.c: New file, from gdb/mips-pinsn.c.
- * Makefile.in (DIS_LIBS): Added mips-dis.o.
- (CFILES): Added mips-dis.c.
+2000-02-23 Andrew Haley <aph@redhat.com>
-Thu Jan 7 07:36:33 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+ * m32r-asm.c, m32r-desc.c, m32r-desc.h, m32r-dis.c,
+ m32r-ibld.c, m32r-opc.h: Rebuild.
- * z8k-dis.c (print_insn_z8001, print_insn_z8002): new routines
- * z8kgen.c, z8k-opc.h: fix sizes of some shifts.
+2000-02-23 Linas Vepstas <linas@linas.org>
-Tue Dec 22 15:42:44 1992 Per Bothner (bothner@rtl.cygnus.com)
+ * i370-dis.c, i370-opc.c: New.
- * Makefile.in: Improve *clean rules.
- * configure.in: Allow a default host.
+ * disassemble.c (ARCH_i370): Define.
+ (disassembler): Handle it.
-Tue Nov 17 19:53:54 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+ * Makefile.am: Add support for Linux/IBM 370.
+ * configure.in: Likewise.
- * Makefile.in: also use -I$(srcdir)/../bfd, since some sysdep
- files include other sysdep files
+ * Makefile.in: Regenerate.
+ * configure: Likewise.
-Thu Nov 12 16:10:37 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+2000-02-22 Chandra Chavva <cchavva@redhat.com>
- * z8k-dis.c z8k-opc.h z8kgen.c: checkpoint
+ * d30v-opc.c (d30v_opcode_tab) : Added FLAG_NOT_WITH_ADDSUBppp to
+ ST2H, STB, STH, STHH, STW and ST2H opcodes to prohibit parallel
+ procedure.
-Fri Oct 9 04:56:05 1992 John Gilmore (gnu@cygnus.com)
+2000-02-22 Andrew Haley <aph@redhat.com>
- * configure.in: For host support, use ../bfd/configure.host
- so it stays in sync with the ../bfd/hosts database.
+ * mips-dis.c (_print_insn_mips): New arg for OPCODE_IS_MEMBER:
+ force gp32 to zero.
+ * mips-opc.c (G6): New define.
+ (mips_builtin_op): Add "move" definition for -gp32.
-Thu Oct 1 23:38:54 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
- * configure.in: use cpu-vendor-os triple instead of nested cases
+ From Grant Erickson <gerickso@Brocade.COM>:
+ * ppc-opc.c: Correct dcread--it takes 3 arguments, not 2.
-Wed Sep 30 16:09:20 1992 Michael Werner (mtw@cygnus.com)
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
- * z8k-dis.c (unparse_instr): fix bug where opcode returned was
- *always* the wrong one.
+ * dis-buf.c (buffer_read_memory): Change `length' param and all int
+ vars to unsigned.
-Wed Sep 30 07:42:17 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+2000-02-17 J"orn Rennecke <amylaar@redhat.co.uk>
- * z8kgen.c: added copyright info
+ * sh-dis.c (print_movxy, print_insn_ddt, print_dsp_reg): New functions.
+ (print_insn_ppi): Likewise.
+ (print_insn_shx): Use info->mach to select appropriate insn set.
+ Add support for sh-dsp. Remove FD_REG_N support.
+ * sh-opc.h (sh_nibble_type): Add new values for sh-dsp support.
+ (sh_arg_type): Likewise. Remove FD_REG_N.
+ (sh_dsp_reg_nums): New enum.
+ (arch_sh1, arch_sh2, arch_sh3, arch_sh3e, arch_sh4): New macros.
+ (arch_sh_dsp, arch_sh3_dsp, arch_sh1_up, arch_sh2_up): Likewise.
+ (arch_sh3_up, arch_sh3e_up, arch_sh4_up, arch_sh_dsp_up): Likewise.
+ (arch_sh3_dsp_up): Likewise.
+ (sh_opcode_info): New field: arch.
+ (sh_table): Split up insn with FD_REG_N into ones with F_REG_N and
+ D_REG_N. Fill in arch field. Add sh-dsp insns.
-Tue Sep 29 12:20:21 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+2000-02-14 Fernando Nasser <fnasser@totem.to.redhat.com>
- * z8k-dis.c (unparse_instr): prettier tabs
- * z8kgen.c -> z8k-opc.h: bug fixes in tables
+ * arm-dis.c: Change flavor name from atpcs-special to
+ special-atpcs to prevent name conflict in gdb.
+ (get_arm_regname_num_options, set_arm_regname_option,
+ get_arm_regnames): New functions. API to access the several
+ flavor of register names. Note: Used by gdb.
+ (print_insn_thumb): Use the register name entry from the currently
+ selected flavor for LR and PC.
-Fri Sep 25 12:50:32 1992 Stu Grossman (grossman at cygnus.com)
+2000-02-10 Nick Clifton <nickc@redhat.com>
- * configure.in: Add ncr* configuration.
- * z8k-dis.c (struct instr_data_s): Make instr_asmsrc char to make
- picayune ANSI compilers happy.
+ * mcore-opc.h (enum mcore_opclass): Add MULSH and OPSR
+ classes.
+ (mcore_table): Add "idly4", "psrclr", "psrset", "mulsh" and
+ "mulsh.h" instructions.
+ * mcore-dis.c (imsk array): Add masks for MULSH and OPSR
+ classes.
+ (print_insn_mcore): Add support for little endian targets.
+ Add support for MULSH and OPSR classes.
-Sep 20 08:50:55 1992 Fred Fish (fnf@cygnus.com)
+2000-02-07 Nick Clifton <nickc@redhat.com>
- * configure.in (i386): Make i386 and i486 synonymous for now.
- * configure.in (i[34]86-*-sysv4): Add my_host definition.
+ * arm-dis.c (parse_arm_diassembler_option): Rename again.
+ Previous delat did not take.
-Fri Sep 18 17:01:23 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+2000-02-03 Timothy Wall <twall@redhat.com>
- * Makefile.in (install): Fix typo.
+ * dis-buf.c (buffer_read_memory): Use octets_per_byte field
+ to adjust target address bounds checking and calculate the
+ appropriate octet offset into data.
-Fri Sep 18 02:04:24 1992 John Gilmore (gnu@cygnus.com)
+2000-01-27 Nick Clifton <nickc@redhat.com>
- * Makefile.in (make): Remove obsolete crud.
- (sparc-opc.o): Avoid Sun Make VPATH bug.
+ * arm-dis.c: (parse_disassembler_option): Rename to
+ parse_arm_disassembler_option and allow to be exported.
-Tue Sep 8 17:29:27 1992 K. Richard Pixley (rich@sendai.cygnus.com)
+ * disassemble.c (disassembler_usage): New function: Print out any
+ target specific disassembler options.
+ Call arm_disassembler_options() if the ARM architecture is being
+ supported.
- * Makefile.in: since there are no SUBDIRS, remove rule and
- references of subdir_do.
+ * arm-dis.c (NUM_ELEM): Define this macro if not already
+ defined.
+ (arm_regname): New struct type for ARM register names.
+ (arm_toggle_regnames): Delete.
+ (parse_disassembler_option): Use register name structure.
+ (print_insn): New function: Combines duplicate code found in
+ print_insn_big_arm and print_insn_little_arm.
+ (print_insn_big_arm): Call print_insn.
+ (print_insn_little_arm): Call print_insn.
+ (print_arm_disassembler_options): Display list of supported,
+ ARM specific disassembler options.
-Tue Sep 8 17:02:58 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
- * Makefile.in (install): Get the library name right here too.
- Don't install bfd.h, since it's unrelated to this library. No
- subdirs to recurse into, either.
- (CFILES): The source file has a .c suffix, not .o.
+ * arm-dis.c (printf_insn_big_arm): Treat ELF symbols with the
+ ARM_STT_16BIT flag as Thumb code symbols.
- * sparc-opc.c: New file, moved from BFD.
- * Makefile.in (OFILES): Build it.
+ * arm-dis.c (printf_insn_little_arm): Ditto.
-Thu Sep 3 16:59:20 1992 Michael Werner (mtw@cygnus.com)
+2000-01-25 Thomas de Lellis <tdel@windriver.com>
- * z8k-dis.c: fixed forward refferences of some declarations.
+ * arm-dis.c (printf_insn_thumb): Prevent double dumping
+ of raw thumb instructions.
-Mon Aug 31 16:09:45 1992 Michael Werner (mtw@cygnus.com)
+2000-01-20 Nick Clifton <nickc@redhat.com>
- * Makefile.in: get the name of the library right
+ * mcore-opc.h (mcore_table): Add "add" as an alias for "addu".
-Mon Aug 31 13:47:35 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+2000-01-03 Nick Clifton <nickc@cygnus.com>
- * z8k-dis.c: knows how to disassemble z8k stuff
- * z8k-opc.h: new file full of z8000 opcodes
+ * arm-dis.c (streq): New macro.
+ (strneq): New macro.
+ (force_thumb): ew local variable.
+ (parse_disassembler_option): New function: Parse a single, ARM
+ specific disassembler command line switch.
+ (parse_disassembler_option): Call parse_disassembler_option to
+ parse individual command line switches.
+ (print_insn_big_arm): Check force_thumb.
+ (print_insn_little_arm): Check force_thumb.
+For older changes see ChangeLog-9899
Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
version-control: never
End:
diff --git a/gnu/usr.bin/binutils/opcodes/Makefile.in b/gnu/usr.bin/binutils/opcodes/Makefile.in
index 1d78dfb2d16..e8f4fe1a239 100644
--- a/gnu/usr.bin/binutils/opcodes/Makefile.in
+++ b/gnu/usr.bin/binutils/opcodes/Makefile.in
@@ -70,10 +70,14 @@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
@@ -91,16 +95,19 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+STRIP = @STRIP@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
archdefs = @archdefs@
+cgendir = @cgendir@
l = @l@
AUTOMAKE_OPTIONS = cygnus
@@ -111,11 +118,17 @@ INCDIR = $(srcdir)/../include
BFDDIR = $(srcdir)/../bfd
MKDEP = gcc -MM
+WARN_CFLAGS = @WARN_CFLAGS@
+AM_CFLAGS = $(WARN_CFLAGS)
+
lib_LTLIBRARIES = libopcodes.la
# This is where bfd.h lives.
BFD_H = ../bfd/bfd.h
+# This is where libiberty lives.
+LIBIBERTY = ../libiberty/libiberty.a
+
# Header files.
HFILES = \
arm-opc.h \
@@ -125,6 +138,8 @@ HFILES = \
mcore-opc.h \
sh-opc.h \
sysdep.h \
+ ia64-asmtab.h \
+ ia64-opc.h \
w65-opc.h \
z8k-opc.h
@@ -136,11 +151,14 @@ CFILES = \
alpha-opc.c \
arc-dis.c \
arc-opc.c \
+ arc-ext.c \
arm-dis.c \
avr-dis.c \
cgen-asm.c \
cgen-dis.c \
cgen-opc.c \
+ cris-dis.c \
+ cris-opc.c \
d10v-dis.c \
d10v-opc.c \
d30v-dis.c \
@@ -158,13 +176,26 @@ CFILES = \
i370-dis.c \
i370-opc.c \
i386-dis.c \
+ i860-dis.c \
i960-dis.c \
+ ia64-dis.c \
+ ia64-opc-a.c \
+ ia64-opc-b.c \
+ ia64-opc-f.c \
+ ia64-opc-i.c \
+ ia64-opc-m.c \
+ ia64-opc-d.c \
+ ia64-opc.c \
+ ia64-gen.c \
+ ia64-asmtab.c \
m32r-asm.c \
m32r-desc.c \
m32r-dis.c \
m32r-ibld.c \
m32r-opc.c \
m32r-opinst.c \
+ m68hc11-dis.c \
+ m68hc11-opc.c \
m68k-dis.c \
m68k-opc.c \
m88k-dis.c \
@@ -185,6 +216,8 @@ CFILES = \
sparc-dis.c \
sparc-opc.c \
tic30-dis.c \
+ tic54x-dis.c \
+ tic54x-opc.c \
tic80-dis.c \
tic80-opc.c \
v850-dis.c \
@@ -201,11 +234,14 @@ ALL_MACHINES = \
alpha-opc.lo \
arc-dis.lo \
arc-opc.lo \
+ arc-ext.lo \
arm-dis.lo \
avr-dis.lo \
cgen-asm.lo \
cgen-dis.lo \
cgen-opc.lo \
+ cris-dis.lo \
+ cris-opc.lo \
d10v-dis.lo \
d10v-opc.lo \
d30v-dis.lo \
@@ -221,13 +257,18 @@ ALL_MACHINES = \
i386-dis.lo \
i370-dis.lo \
i370-opc.lo \
+ i860-dis.lo \
i960-dis.lo \
+ ia64-dis.lo \
+ ia64-opc.lo \
m32r-asm.lo \
m32r-desc.lo \
m32r-dis.lo \
m32r-ibld.lo \
m32r-opc.lo \
m32r-opinst.lo \
+ m68hc11-dis.lo \
+ m68hc11-opc.lo \
m68k-dis.lo \
m68k-opc.lo \
m88k-dis.lo \
@@ -239,15 +280,17 @@ ALL_MACHINES = \
mips-dis.lo \
mips-opc.lo \
mips16-opc.lo \
+ ns32k-dis.lo \
pj-dis.lo \
pj-opc.lo \
ppc-dis.lo \
ppc-opc.lo \
- ns32k-dis.lo \
sh-dis.lo \
sparc-dis.lo \
sparc-opc.lo \
tic30-dis.lo \
+ tic54x-dis.lo \
+ tic54x-opc.lo \
tic80-dis.lo \
tic80-opc.lo \
v850-dis.lo \
@@ -276,8 +319,25 @@ noinst_LIBRARIES = libopcodes.a
POTFILES = $(HFILES) $(CFILES)
CLEANFILES = \
- libopcodes.a stamp-lib dep.sed DEP DEP1 DEP2
+ stamp-m32r stamp-fr30 \
+ libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
+
+CGENDIR = @cgendir@
+CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+CGENFLAGS = -v
+
+CGENDEPS = ../cgen/stamp-cgen \
+ $(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
+ $(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
+ $(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \
+ $(CGENDIR)/opc-opinst.scm \
+ cgen-asm.in cgen-dis.in cgen-ibld.in
+
+@CGEN_MAINT_TRUE@M32R_DEPS = @CGEN_MAINT_TRUE@stamp-m32r
+@CGEN_MAINT_FALSE@M32R_DEPS =
+@CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30
+@CGEN_MAINT_FALSE@FR30_DEPS =
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
@@ -291,7 +351,7 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libopcodes_a_LIBADD =
libopcodes_a_SOURCES = libopcodes.a.c
-libopcodes_a_OBJECTS = libopcodes.a.o
+libopcodes_a_OBJECTS = libopcodes.a.$(OBJEXT)
LTLIBRARIES = $(lib_LTLIBRARIES)
libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo
@@ -309,11 +369,11 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
-OBJECTS = libopcodes.a.o $(libopcodes_la_OBJECTS)
+OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .s
+.SUFFIXES: .S .c .lo .o .obj .s
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
@@ -366,6 +426,11 @@ maintainer-clean-noinstLIBRARIES:
.c.o:
$(COMPILE) -c $<
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
.s.o:
$(COMPILE) -c $<
@@ -374,6 +439,7 @@ maintainer-clean-noinstLIBRARIES:
mostlyclean-compile:
-rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
clean-compile:
@@ -682,6 +748,7 @@ stamp-lib: libopcodes.la
libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
if [ -f $$libtooldir/libopcodes.a ]; then \
cp $$libtooldir/libopcodes.a libopcodes.tmp; \
+ $(RANLIB) libopcodes.tmp; \
$(SHELL) $(srcdir)/../move-if-change libopcodes.tmp libopcodes.a; \
else true; fi
touch stamp-lib
@@ -696,15 +763,45 @@ po/POTFILES.in: @MAINT@ Makefile
config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in
$(SHELL) ./config.status --recheck
-# The start marker is written this way to pass through automake unscathed.
+run-cgen:
+ $(SHELL) $(srcdir)/cgen.sh opcodes $(srcdir) $(CGEN) \
+ $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) \
+ "$(options)" $(extrafiles)
+ touch stamp-${prefix}
+.PHONY: run-cgen
+
+# For now, require developers to configure with --enable-cgen-maint.
+$(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
+ @true
+stamp-m32r: $(CGENDEPS) $(CGENDIR)/m32r.cpu $(CGENDIR)/m32r.opc
+ $(MAKE) run-cgen arch=m32r prefix=m32r options=opinst extrafiles=opinst
+
+$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
+ @true
+stamp-fr30: $(CGENDEPS) $(CGENDIR)/fr30.cpu $(CGENDIR)/fr30.opc
+ $(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles=
+
+ia64-gen: ia64-gen.o
+ $(LINK) ia64-gen.o $(LIBIBERTY)
+
+ia64-gen.o: ia64-gen.c ia64-opc.c ia64-opc-a.c ia64-opc-b.c ia64-opc-f.c \
+ ia64-opc-i.c ia64-opc-m.c ia64-opc-d.c ia64-opc.h
+
+ia64-asmtab.c: @MAINT@ ia64-gen ia64-ic.tbl ia64-raw.tbl ia64-waw.tbl ia64-war.tbl
+ here=`pwd`; cd $(srcdir); $$here/ia64-gen > ia64-asmtab.c
# This dependency stuff is copied from BFD.
DEP: dep.sed $(CFILES) $(HFILES) config.h
rm -f DEP1
$(MAKE) MKDEP="$(MKDEP)" DEP1
- sed -f dep.sed < DEP1 > $@
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
+ sed -f dep.sed < DEP1 > DEPA
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
+ if grep ' /' DEPA > /dev/null 2> /dev/null; then \
+ echo 'make DEP failed!'; exit 1; \
+ else \
+ mv -f DEPA $@; \
+ fi
DEP1: $(CFILES)
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
@@ -740,141 +837,191 @@ 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 $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/a29k.h
-alpha-dis.lo: alpha-dis.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/alpha.h
-alpha-opc.lo: alpha-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/alpha.h \
- $(BFD_H) opintl.h
+a29k-dis.lo: a29k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/a29k.h
+alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/alpha.h
+alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/alpha.h $(BFD_H) opintl.h
arc-dis.lo: arc-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/opcode/arc.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h opintl.h \
+ arc-dis.h arc-ext.h
+arc-opc.lo: arc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h
+arc-ext.lo: arc-ext.c $(BFD_H) $(INCDIR)/ansidecl.h \
+ arc-ext.h $(INCDIR)/libiberty.h
+arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) arm-opc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h opintl.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h
+avr-dis.lo: avr-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) opintl.h $(INCDIR)/opcode/avr.h
+cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h \
opintl.h
-arc-opc.lo: arc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h \
+cgen-dis.lo: cgen-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
+cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
+cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h sysdep.h config.h $(INCDIR)/opcode/cris.h \
+ $(INCDIR)/libiberty.h
+cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
+d10v-dis.lo: d10v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H)
+d10v-opc.lo: d10v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/d10v.h
+d30v-dis.lo: d30v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/d30v.h $(INCDIR)/dis-asm.h $(BFD_H) \
opintl.h
-arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) arm-opc.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/arm.h \
- $(INCDIR)/elf/reloc-macros.h
-avr-dis.lo: avr-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h opintl.h
-cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/libiberty.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h \
- opintl.h
-cgen-dis.lo: cgen-dis.c sysdep.h config.h $(INCDIR)/libiberty.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
-cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/libiberty.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
-d10v-dis.lo: d10v-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
-d10v-opc.lo: d10v-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h
-d30v-dis.lo: d30v-dis.c $(INCDIR)/opcode/d30v.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
-d30v-opc.lo: d30v-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d30v.h
-dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) opintl.h
-disassemble.lo: disassemble.c $(INCDIR)/ansidecl.h \
+d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/d30v.h
+dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
+disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H)
-fr30-asm.lo: fr30-asm.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h
-fr30-desc.lo: fr30-desc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h
-fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h opintl.h
-fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.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
-fr30-opc.lo: fr30-opc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h
-h8300-dis.lo: h8300-dis.c $(INCDIR)/opcode/h8300.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
-h8500-dis.lo: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
-hppa-dis.lo: hppa-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
-i370-dis.lo: i370-dis.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/i370.h
-i370-opc.lo: i370-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/i370.h
+ fr30-opc.h opintl.h $(INCDIR)/libiberty.h
+fr30-dis.lo: fr30-dis.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
+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
+fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h $(INCDIR)/libiberty.h
+h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ opintl.h
+h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
+hppa-dis.lo: hppa-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
+i370-dis.lo: i370-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/i370.h
+i370-opc.lo: i370-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/i370.h
i386-dis.lo: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h sysdep.h config.h opintl.h
-i960-dis.lo: i960-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h
-m32r-asm.lo: m32r-asm.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h
-m32r-desc.lo: m32r-desc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h
-m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/i860.h
+i960-dis.lo: i960-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H)
+ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ia64.h
+ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h
+ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h
+ia64-opc-f.lo: ia64-opc-f.c ia64-opc.h $(INCDIR)/opcode/ia64.h
+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
+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-asmtab.c
+ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ sysdep.h config.h ia64-opc.h $(INCDIR)/opcode/ia64.h \
+ ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
+ ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
+ia64-asmtab.lo: ia64-asmtab.c
+m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h
-m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.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
+m32r-dis.lo: m32r-dis.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
+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
+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
+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 opintl.h
-m32r-opc.lo: m32r-opc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h
-m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h
-m68k-dis.lo: m68k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h opintl.h \
+m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H)
+m68hc11-opc.lo: m68hc11-opc.c $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/m68hc11.h
+m68k-dis.lo: m68k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/floatformat.h \
+ opintl.h $(INCDIR)/opcode/m68k.h
+m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68k.h
-m68k-opc.lo: m68k-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m68k.h
-m88k-dis.lo: m88k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m88k.h opintl.h
-mcore-dis.lo: mcore-dis.c mcore-opc.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
-mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/opcode/mips.h opintl.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
-mips-opc.lo: mips-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h
-mips16-opc.lo: mips16-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h
-m10200-dis.lo: m10200-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h \
- $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
-m10200-opc.lo: m10200-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h
-m10300-dis.lo: m10300-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h \
- $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
-m10300-opc.lo: m10300-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h
+m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/m88k.h \
+ opintl.h
+mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/mips.h \
+ opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
+mips-opc.lo: mips-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/mips.h
+mips16-opc.lo: mips16-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/mips.h
+m10200-dis.lo: m10200-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/mn10200.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ opintl.h
+m10200-opc.lo: m10200-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/mn10200.h
+m10300-dis.lo: m10300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/mn10300.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ opintl.h
+m10300-opc.lo: m10300-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/mn10300.h
ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h \
opintl.h
-pj-dis.lo: pj-dis.c $(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h
-pj-opc.lo: pj-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/pj.h
-ppc-dis.lo: ppc-dis.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ppc.h
-ppc-opc.lo: ppc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ppc.h \
- opintl.h
-sh-dis.lo: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h
-sparc-dis.lo: sparc-dis.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/libiberty.h opintl.h
-sparc-opc.lo: sparc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/sparc.h
-tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/opcode/tic30.h
-tic80-dis.lo: tic80-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/tic80.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
-tic80-opc.lo: tic80-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/tic80.h
-v850-dis.lo: v850-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/v850.h \
- $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
-v850-opc.lo: v850-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/v850.h \
+pj-dis.lo: pj-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h $(BFD_H)
+pj-opc.lo: pj-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/pj.h
+ppc-dis.lo: ppc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ppc.h
+ppc-opc.lo: ppc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/ppc.h opintl.h
+sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/libiberty.h opintl.h
+sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/sparc.h
+tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic30.h
+tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic54x.h \
+ $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
+tic54x-opc.lo: tic54x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/tic54x.h
+tic80-dis.lo: tic80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/tic80.h $(INCDIR)/dis-asm.h $(BFD_H)
+tic80-opc.lo: tic80-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/tic80.h
+v850-dis.lo: v850-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/v850.h $(INCDIR)/dis-asm.h $(BFD_H) \
opintl.h
-vax-dis.lo: vax-dis.c $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h
-w65-dis.lo: w65-dis.c w65-opc.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h
-z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) z8k-opc.h
-z8kgen.lo: z8kgen.c sysdep.h config.h
+v850-opc.lo: v850-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/v850.h opintl.h
+vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H)
+w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) z8k-opc.h
+z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/gnu/usr.bin/binutils/opcodes/a29k-dis.c b/gnu/usr.bin/binutils/opcodes/a29k-dis.c
index 7b8b1b775a9..3c861677f9b 100644
--- a/gnu/usr.bin/binutils/opcodes/a29k-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/a29k-dis.c
@@ -1,5 +1,6 @@
/* Instruction printing code for the AMD 29000
- Copyright (C) 1990, 93, 94, 95, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1993, 1994, 1995, 1998, 2000
+ Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Jim Kingdon.
This file is part of GDB.
diff --git a/gnu/usr.bin/binutils/opcodes/aclocal.m4 b/gnu/usr.bin/binutils/opcodes/aclocal.m4
index 7ba1f4ecb7b..a3aa924df30 100644
--- a/gnu/usr.bin/binutils/opcodes/aclocal.m4
+++ b/gnu/usr.bin/binutils/opcodes/aclocal.m4
@@ -12,6 +12,22 @@ 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)
+])
+
+dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
+ifelse(yes,no,[
+AC_DEFUN([CY_WITH_NLS],)
+AC_SUBST(INTLLIBS)
+])
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
@@ -104,415 +120,6 @@ else
fi
AC_SUBST($1)])
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$lt_target" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$lt_target" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
@@ -569,348 +176,3 @@ else
$1_FALSE=
fi])
-# This file is derived from `gettext.m4'. The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-AC_DEFUN(CY_WITH_NLS,
- [AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
-
- USE_INCLUDED_LIBINTL=no
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
- AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH(included-gettext,
- [ --with-included-gettext use the GNU gettext library included here],
- nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If gettext or catgets are available (in this order) we
- dnl use this. Else we have to fall back to GNU NLS library.
- dnl catgets is only used if permitted by option --with-catgets.
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- AC_CHECK_HEADER(libintl.h,
- [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
- [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
- gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for gettext in libintl],
- gt_cv_func_gettext_libintl,
- [AC_TRY_LINK([], [return (int) gettext ("")],
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)])])
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT, 1,
- [Define as 1 if you have gettext and don't want to use GNU gettext.])
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- AC_CHECK_FUNCS(dcgettext)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- INSTOBJEXT=.mo
- fi
- fi
- ])
-
- dnl In the standard gettext, we would now check for catgets.
- dnl However, we never want to use catgets for our releases.
-
- if test "$CATOBJEXT" = "NONE"; then
- dnl Neither gettext nor catgets in included in the C library.
- dnl Fall back on GNU gettext library.
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_SUBST(MSGFMT)
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext programs is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLDEPS)
- AC_SUBST(INTLLIBS)
- AC_SUBST(INTLOBJS)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
-
-AC_DEFUN(CY_GNU_GETTEXT,
- [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
-
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h])
- AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- AC_CHECK_FUNCS(stpcpy)
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
- fi
-
- AM_LC_MESSAGES
- CY_WITH_NLS
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- dnl The reference to <locale.h> in the installed <libintl.h> file
- dnl must be resolved because we cannot expect the users of this
- dnl to define HAVE_LOCALE_H.
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
- AC_SUBST(INCLUDE_LOCALE_H)
-
- dnl Determine which catalog format we have (if any is needed)
- dnl For now we know about two different formats:
- dnl Linux libc-5 and the normal X/Open format
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
- dnl Transform the SED scripts while copying because some dumb SEDs
- dnl cannot handle comments.
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- dnl po2tbl.sed is always needed.
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- dnl In the intl/Makefile.in we have a special dependency which makes
- dnl only sense for gettext. We comment this out for non-gettext
- dnl packages.
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
- AC_SUBST(GT_NO)
- AC_SUBST(GT_YES)
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
- AC_SUBST(MKINSTALLDIRS)
-
- dnl *** For now the libtool support in intl/Makefile is not for real.
- l=
- AC_SUBST(l)
-
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile. But only do this if the po directory
- dnl exists in srcdir.
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
- ])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your locale.h file contains LC_MESSAGES.])
- fi
- fi])
-
diff --git a/gnu/usr.bin/binutils/opcodes/alpha-dis.c b/gnu/usr.bin/binutils/opcodes/alpha-dis.c
index ce770bb41c8..8633d7bb5b3 100644
--- a/gnu/usr.bin/binutils/opcodes/alpha-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/alpha-dis.c
@@ -1,5 +1,5 @@
/* alpha-dis.c -- Disassemble Alpha AXP instructions
- Copyright 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>,
patterned after the PPC opcode handling written by Ian Lance Taylor.
diff --git a/gnu/usr.bin/binutils/opcodes/arm-dis.c b/gnu/usr.bin/binutils/opcodes/arm-dis.c
index a3e7112b3fc..b90f820602f 100644
--- a/gnu/usr.bin/binutils/opcodes/arm-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/arm-dis.c
@@ -1,5 +1,6 @@
/* Instruction printing code for the ARM
- Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modification by James G. Smith (jsmith@cygnus.co.uk)
@@ -60,6 +61,8 @@ static arm_regname regnames[] =
{
{ "raw" , "Select raw register names",
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}},
+ { "gcc", "Select register names used by GCC",
+ { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc" }},
{ "std", "Select register names used in ARM's ISA documentation",
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc" }},
{ "apcs", "Select register names used in the APCS",
@@ -70,7 +73,7 @@ static arm_regname regnames[] =
{ "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL", "FP", "IP", "SP", "LR", "PC" }}
};
-/* Default to standard register name set. */
+/* Default to GCC register name set. */
static unsigned int regname_selected = 1;
#define NUM_ARM_REGNAMES NUM_ELEM (regnames)
@@ -419,28 +422,39 @@ 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);
+ }
+ break;
+
case 'C':
- switch (given & 0x000f0000)
- {
- default:
- func (stream, "_???");
- break;
- case 0x90000:
- func (stream, "_all");
- break;
- case 0x10000:
- func (stream, "_c");
- break;
- case 0x20000:
- func (stream, "_x");
- break;
- case 0x40000:
- func (stream, "_s");
- break;
- case 0x80000:
- func (stream, "_f");
- break;
- }
+ 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':
@@ -658,6 +672,9 @@ print_insn_thumb (pc, info, given)
info->bytes_per_chunk = 4;
info->bytes_per_line = 4;
+ if ((given & 0x10000000) == 0)
+ func (stream, "blx\t");
+ else
func (stream, "bl\t");
info->print_address_func (BDISP23 (given) * 2 + pc + 4, info);
@@ -1027,6 +1044,14 @@ print_insn (pc, info, little)
given = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3]);
}
+ 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
+ addend for the reloc. (We are using REL type relocs).
+ In such cases, we can ignore the pc when computing
+ addresses, since the addend is not currently pc-relative. */
+ pc = 0;
+
if (is_thumb)
status = print_insn_thumb (pc, info, given);
else
diff --git a/gnu/usr.bin/binutils/opcodes/arm-opc.h b/gnu/usr.bin/binutils/opcodes/arm-opc.h
index 5ecde4be6ad..36b1809aad4 100644
--- a/gnu/usr.bin/binutils/opcodes/arm-opc.h
+++ b/gnu/usr.bin/binutils/opcodes/arm-opc.h
@@ -1,6 +1,7 @@
/* Opcode table for the ARM.
- Copyright 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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
@@ -51,6 +52,7 @@ struct thumb_opcode
%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.
@@ -75,7 +77,7 @@ Thumb specific format options:
static struct arm_opcode arm_opcodes[] =
{
- /* ARM instructions */
+ /* 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"},
@@ -83,6 +85,59 @@ static struct arm_opcode arm_opcodes[] =
{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"},
+
+ /* 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"},
+
+ /* 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"},
+
+ {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"},
+
+ /* ARM Instructions. */
{0x00000090, 0x0e100090, "str%c%6's%h\t%12-15r, %s"},
{0x00100090, 0x0e100090, "ldr%c%6's%h\t%12-15r, %s"},
{0x00000000, 0x0de00000, "and%c%20's\t%12-15r, %16-19r, %o"},
@@ -174,10 +229,21 @@ static struct arm_opcode arm_opcodes[] =
static struct thumb_opcode thumb_opcodes[] =
{
- /* Thumb instructions */
- {0x46C0, 0xFFFF, "nop\t\t\t(mov r8,r8)"}, /* format 5 instructions do not update the PSR */
+ /* Thumb instructions. */
+
+ /* 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 */
+ /* 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"},
diff --git a/gnu/usr.bin/binutils/opcodes/configure b/gnu/usr.bin/binutils/opcodes/configure
index e868e217de3..a38b19c4d99 100644
--- a/gnu/usr.bin/binutils/opcodes/configure
+++ b/gnu/usr.bin/binutils/opcodes/configure
@@ -22,16 +22,22 @@ ac_help="$ac_help
ac_help="$ac_help
--disable-libtool-lock avoid locking (might break parallel builds)"
ac_help="$ac_help
+ --with-pic try to use only PIC/non-PIC objects [default=use both]"
+ac_help="$ac_help
--enable-targets alternative target configurations"
ac_help="$ac_help
--enable-commonbfdlib build shared BFD/opcodes/libiberty library"
ac_help="$ac_help
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
ac_help="$ac_help
--disable-nls do not use Native Language Support"
ac_help="$ac_help
--with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
+ --enable-cgen-maint[=dir] build cgen generated files"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -552,6 +558,68 @@ else
ac_n= ac_c='\c' ac_t=
fi
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:563: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 568 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:579: \"$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:596: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 601 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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=
@@ -601,7 +669,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:605: checking host system type" >&5
+echo "configure:673: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -622,7 +690,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:626: checking target system type" >&5
+echo "configure:694: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -640,7 +708,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:644: checking build system type" >&5
+echo "configure:712: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -665,7 +733,7 @@ test "$host_alias" != "$target_alias" &&
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:669: checking for $ac_word" >&5
+echo "configure:737: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -695,7 +763,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:699: checking for $ac_word" >&5
+echo "configure:767: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -746,7 +814,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:750: checking for $ac_word" >&5
+echo "configure:818: 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
@@ -778,7 +846,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:782: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -789,12 +857,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 793 "configure"
+#line 861 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -820,12 +888,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:829: checking whether we are using GNU C" >&5
+echo "configure:897: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -834,7 +902,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -853,7 +921,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:857: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:925: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -885,7 +953,7 @@ else
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:889: checking for POSIXized ISC" >&5
+echo "configure:957: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -909,7 +977,7 @@ fi
# We currently only use the version number for the name of any shared
# library. For user convenience, we always use the same version
# number that BFD is using.
-BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir}/../bfd/configure.in | sed -n -e 's/[ ]//g' -e 's/^.*,\(.*\)).*$/\1/p'`
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -923,7 +991,7 @@ BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir}/../bfd/configure.in | sed -n -e 's/[
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:927: checking for a BSD compatible install" >&5
+echo "configure:995: 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
@@ -976,7 +1044,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:980: checking whether build environment is sane" >&5
+echo "configure:1048: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1033,7 +1101,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1037: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1105: 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
@@ -1079,7 +1147,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1083: checking for working aclocal" >&5
+echo "configure:1151: 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.
@@ -1092,7 +1160,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1096: checking for working autoconf" >&5
+echo "configure:1164: 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.
@@ -1105,7 +1173,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1109: checking for working automake" >&5
+echo "configure:1177: 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.
@@ -1118,7 +1186,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1122: checking for working autoheader" >&5
+echo "configure:1190: 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.
@@ -1131,7 +1199,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1135: checking for working makeinfo" >&5
+echo "configure:1203: 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.
@@ -1154,7 +1222,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1158: checking for $ac_word" >&5
+echo "configure:1226: 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
@@ -1186,7 +1254,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1190: checking for $ac_word" >&5
+echo "configure:1258: 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
@@ -1218,7 +1286,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1222: checking for $ac_word" >&5
+echo "configure:1290: 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
@@ -1321,36 +1389,6 @@ else
enable_fast_install=yes
fi
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1328: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1363,8 +1401,14 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1367: checking for ld used by GCC" >&5
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
+echo "configure:1405: checking for ld used by GCC" >&5
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
case "$ac_prog" in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
@@ -1387,10 +1431,10 @@ echo "configure:1367: 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:1391: checking for GNU ld" >&5
+echo "configure:1435: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1394: checking for non-GNU ld" >&5
+echo "configure:1438: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1425,7 +1469,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1429: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1473: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1438,10 +1482,23 @@ fi
fi
echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$ac_cv_prog_gnu_ld
+
+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+echo "configure:1490: checking for $LD option to reload object files" >&5
+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+
+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1445: checking for BSD-compatible nm" >&5
+echo "configure:1502: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1452,18 +1509,20 @@ else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ tmp_nm=$ac_dir/${ac_tool_prefix}nm
+ if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
+ # Tru64's nm complains that /dev/null is an invalid object file
+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -B"
break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
@@ -1477,7 +1536,7 @@ NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1481: checking whether ln -s works" >&5
+echo "configure:1540: 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
@@ -1497,12 +1556,478 @@ else
echo "$ac_t""no" 1>&6
fi
+echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
+echo "configure:1561: checking how to recognise dependant libraries" >&5
+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case "$host_os" in
+aix4*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin* | mingw* |pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+freebsd* )
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case "$host_cpu" in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20*)
+ # TODO: Does this work for hpux-11 too?
+ lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+
+irix5* | irix6*)
+ case "$host_os" in
+ irix5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case "$LD" in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ case "$host_cpu" in
+ alpha* | i*86 | powerpc* | sparc* | ia64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ else
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case "$host_vendor" in
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1704: checking for object suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1730: 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:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# Only perform the check for file, if the check method requires it
+case "$deplibs_check_method" in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+echo "configure:1767: checking for ${ac_tool_prefix}file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo $ac_n "checking for file""... $ac_c" 1>&6
+echo "configure:1829: checking for file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MAGIC_CMD" in
+ /*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD="$MAGIC_CMD"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ MAGIC_CMD="$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
+ fi
+ ;;
esac
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1900: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1932: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ RANLIB=":"
+fi
+fi
+
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1967: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1999: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_STRIP="strip"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ STRIP=":"
+fi
+fi
+
+
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
@@ -1521,13 +2046,24 @@ fi
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
+test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$lt_target" in
+case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1530 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2066 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1548,19 +2084,27 @@ case "$lt_target" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1552: checking whether the C compiler needs -belf" >&5
+echo "configure:2088: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1557 "configure"
+
+ 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 2101 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -1570,6 +2114,13 @@ else
lt_cv_cc_needs_belf=no
fi
rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
fi
echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
@@ -1633,12 +2184,14 @@ rm -f confcache
# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
# Reload cache, that may have been modified by ltconfig
@@ -1652,7 +2205,7 @@ fi
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -1662,6 +2215,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
exec 5>>./config.log
+
+
+
+
+
+
# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
enableval="$enable_targets"
@@ -1682,6 +2241,29 @@ if test "${enable_commonbfdlib+set}" = set; then
esac
fi
+build_warnings="-W -Wall"
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+
+
@@ -1710,7 +2292,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1714: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2296: 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"
@@ -1732,72 +2314,10 @@ fi
MAINT=$MAINTAINER_MODE_TRUE
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1737: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1742 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1753: \"$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:1770: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1775 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1782: \"$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
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1801: checking for executable suffix" >&5
+echo "configure:2321: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1807,7 +2327,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -1833,7 +2353,7 @@ ac_exeext=$EXEEXT
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1837: checking for $ac_word" >&5
+echo "configure:2357: 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
@@ -1863,7 +2383,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1867: checking for $ac_word" >&5
+echo "configure:2387: 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
@@ -1914,7 +2434,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1918: checking for $ac_word" >&5
+echo "configure:2438: 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
@@ -1946,7 +2466,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1950: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2470: 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.
@@ -1957,12 +2477,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1961 "configure"
+#line 2481 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2486: \"$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
@@ -1988,12 +2508,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1992: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2512: 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:1997: checking whether we are using GNU C" >&5
+echo "configure:2517: 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
@@ -2002,7 +2522,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2021,7 +2541,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2025: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2545: 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
@@ -2055,7 +2575,7 @@ fi
ALL_LINGUAS=
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2059: checking how to run the C preprocessor" >&5
+echo "configure:2579: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2070,13 +2590,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2074 "configure"
+#line 2594 "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:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2600: \"$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
:
@@ -2087,13 +2607,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2091 "configure"
+#line 2611 "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:2097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2617: \"$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
:
@@ -2104,13 +2624,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2108 "configure"
+#line 2628 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2134,13 +2654,43 @@ else
fi
echo "$ac_t""$CPP" 1>&6
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2661: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2139: checking for ANSI C header files" >&5
+echo "configure:2689: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2144 "configure"
+#line 2694 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2148,7 +2698,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2702: \"$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*
@@ -2165,7 +2715,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2169 "configure"
+#line 2719 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2183,7 +2733,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2187 "configure"
+#line 2737 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2204,7 +2754,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2208 "configure"
+#line 2758 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2215,7 +2765,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2239,12 +2789,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2243: checking for working const" >&5
+echo "configure:2793: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2248 "configure"
+#line 2798 "configure"
#include "confdefs.h"
int main() {
@@ -2293,7 +2843,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2314,21 +2864,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2318: checking for inline" >&5
+echo "configure:2868: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2325 "configure"
+#line 2875 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2354,12 +2904,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2358: checking for off_t" >&5
+echo "configure:2908: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2363 "configure"
+#line 2913 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2387,12 +2937,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2391: checking for size_t" >&5
+echo "configure:2941: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2396 "configure"
+#line 2946 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2422,19 +2972,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2426: checking for working alloca.h" >&5
+echo "configure:2976: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2431 "configure"
+#line 2981 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2988: \"$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
@@ -2455,12 +3005,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2459: checking for alloca" >&5
+echo "configure:3009: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2464 "configure"
+#line 3014 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2488,7 +3038,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2520,12 +3070,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2524: checking whether alloca needs Cray hooks" >&5
+echo "configure:3074: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2529 "configure"
+#line 3079 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2550,12 +3100,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2554: checking for $ac_func" >&5
+echo "configure:3104: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2559 "configure"
+#line 3109 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2578,7 +3128,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3132: \"$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
@@ -2605,7 +3155,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2609: checking stack direction for C alloca" >&5
+echo "configure:3159: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2613,7 +3163,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
+#line 3167 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2632,7 +3182,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2657,17 +3207,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2661: checking for $ac_hdr" >&5
+echo "configure:3211: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2666 "configure"
+#line 3216 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3221: \"$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*
@@ -2696,12 +3246,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2700: checking for $ac_func" >&5
+echo "configure:3250: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2705 "configure"
+#line 3255 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2724,7 +3274,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3278: \"$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
@@ -2749,7 +3299,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2753: checking for working mmap" >&5
+echo "configure:3303: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2757,7 +3307,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2761 "configure"
+#line 3311 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2897,7 +3447,7 @@ main()
}
EOF
-if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2925,17 +3475,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2929: checking for $ac_hdr" >&5
+echo "configure:3479: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2934 "configure"
+#line 3484 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3489: \"$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*
@@ -2965,12 +3515,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2969: checking for $ac_func" >&5
+echo "configure:3519: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2974 "configure"
+#line 3524 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2993,7 +3543,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3547: \"$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
@@ -3022,12 +3572,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3026: checking for $ac_func" >&5
+echo "configure:3576: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3031 "configure"
+#line 3581 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3050,7 +3600,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3604: \"$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
@@ -3084,19 +3634,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3088: checking for LC_MESSAGES" >&5
+echo "configure:3638: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3093 "configure"
+#line 3643 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3117,7 +3667,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3121: checking whether NLS is requested" >&5
+echo "configure:3671: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3137,7 +3687,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3141: checking whether included gettext is requested" >&5
+echo "configure:3691: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3156,17 +3706,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3160: checking for libintl.h" >&5
+echo "configure:3710: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3165 "configure"
+#line 3715 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3720: \"$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*
@@ -3183,19 +3733,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3187: checking for gettext in libc" >&5
+echo "configure:3737: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3192 "configure"
+#line 3742 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3211,7 +3761,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3215: checking for bindtextdomain in -lintl" >&5
+echo "configure:3765: 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
@@ -3219,7 +3769,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3223 "configure"
+#line 3773 "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
@@ -3230,7 +3780,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3784: \"$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
@@ -3246,19 +3796,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3250: checking for gettext in libintl" >&5
+echo "configure:3800: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3255 "configure"
+#line 3805 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3286,7 +3836,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3290: checking for $ac_word" >&5
+echo "configure:3840: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3320,12 +3870,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3324: checking for $ac_func" >&5
+echo "configure:3874: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3329 "configure"
+#line 3879 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3348,7 +3898,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3902: \"$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
@@ -3375,7 +3925,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3379: checking for $ac_word" >&5
+echo "configure:3929: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3411,7 +3961,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3415: checking for $ac_word" >&5
+echo "configure:3965: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3443,7 +3993,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3447 "configure"
+#line 3997 "configure"
#include "confdefs.h"
int main() {
@@ -3451,7 +4001,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3483,7 +4033,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3487: checking for $ac_word" >&5
+echo "configure:4037: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3517,7 +4067,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3521: checking for $ac_word" >&5
+echo "configure:4071: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3553,7 +4103,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3557: checking for $ac_word" >&5
+echo "configure:4107: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3643,7 +4193,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3647: checking for catalogs to be installed" >&5
+echo "configure:4197: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -3671,17 +4221,17 @@ echo "configure:3647: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:3675: checking for linux/version.h" >&5
+echo "configure:4225: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3680 "configure"
+#line 4230 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4235: \"$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*
@@ -3758,7 +4308,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3762: checking for a BSD compatible install" >&5
+echo "configure:4312: 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
@@ -3815,17 +4365,17 @@ for ac_hdr in string.h strings.h stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3819: checking for $ac_hdr" >&5
+echo "configure:4369: 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 3824 "configure"
+#line 4374 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4379: \"$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*
@@ -3852,6 +4402,34 @@ fi
done
+cgen_maint=no
+cgendir='$(srcdir)/../cgen'
+
+# Check whether --enable-cgen-maint or --disable-cgen-maint was given.
+if test "${enable_cgen_maint+set}" = set; then
+ enableval="$enable_cgen_maint"
+ case "${enableval}" in
+ yes) cgen_maint=yes ;;
+ no) cgen_maint=no ;;
+ *)
+ # argument is cgen install directory (not implemented yet).
+ # Having a `share' directory might be more appropriate for the .scm,
+ # .cpu, etc. files.
+ cgen_maint=yes
+ cgendir=${cgen_maint}/lib/cgen
+ ;;
+esac
+fi
+
+
+if test x${cgen_maint} = xyes; then
+ CGEN_MAINT_TRUE=
+ CGEN_MAINT_FALSE='#'
+else
+ CGEN_MAINT_TRUE='#'
+ CGEN_MAINT_FALSE=
+fi
+
using_cgen=no
@@ -3916,10 +4494,11 @@ if test x${all_targets} = xfalse ; then
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" ;;
+ 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_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;;
@@ -3928,9 +4507,12 @@ if test x${all_targets} = xfalse ; then
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;;
bfd_i386_arch) ta="$ta i386-dis.lo" ;;
- bfd_i860_arch) ;;
+ bfd_i860_arch) ta="$ta i860-dis.lo" ;;
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
+ bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
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_mcore_arch) ta="$ta mcore-dis.lo" ;;
@@ -3940,13 +4522,16 @@ if test x${all_targets} = xfalse ; then
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;;
bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
+ bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_pyramid_arch) ;;
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
- bfd_sh_arch) ta="$ta sh-dis.lo" ;;
+ bfd_sh_arch)
+ ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
+ bfd_tic54x_arch) ta="$ta tic54x-dis.lo tic54x-opc.lo" ;;
bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
@@ -4158,11 +4743,14 @@ s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@LN_S@%$LN_S%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@STRIP@%$STRIP%g
s%@LIBTOOL@%$LIBTOOL%g
+s%@WARN_CFLAGS@%$WARN_CFLAGS%g
s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@USE_NLS@%$USE_NLS%g
@@ -4186,6 +4774,9 @@ s%@GT_YES@%$GT_YES%g
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@l@%$l%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
diff --git a/gnu/usr.bin/binutils/opcodes/configure.in b/gnu/usr.bin/binutils/opcodes/configure.in
index 6ef461f9a49..28f12ede14d 100644
--- a/gnu/usr.bin/binutils/opcodes/configure.in
+++ b/gnu/usr.bin/binutils/opcodes/configure.in
@@ -11,7 +11,7 @@ AC_ISC_POSIX
# library. For user convenience, we always use the same version
# number that BFD is using.
changequote(,)dnl
-BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir}/../bfd/configure.in | sed -n -e 's/[ ]//g' -e 's/^.*,\(.*\)).*$/\1/p'`
+BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
changequote([,])dnl
AM_INIT_AUTOMAKE(opcodes, ${BFD_VERSION})
@@ -43,6 +43,27 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
esac])dnl
+build_warnings="-W -Wall"
+AC_ARG_ENABLE(build-warnings,
+[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting warning flags = $build_warnings" 6>&1
+fi])dnl
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+ WARN_CFLAGS="${build_warnings}"
+fi
+AC_SUBST(WARN_CFLAGS)
+
AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
@@ -67,6 +88,24 @@ AC_PROG_INSTALL
AC_CHECK_HEADERS(string.h strings.h stdlib.h)
+cgen_maint=no
+cgendir='$(srcdir)/../cgen'
+
+AC_ARG_ENABLE(cgen-maint,
+[ --enable-cgen-maint[=dir] build cgen generated files],
+[case "${enableval}" in
+ yes) cgen_maint=yes ;;
+ no) cgen_maint=no ;;
+ *)
+ # argument is cgen install directory (not implemented yet).
+ # Having a `share' directory might be more appropriate for the .scm,
+ # .cpu, etc. files.
+ cgen_maint=yes
+ cgendir=${cgen_maint}/lib/cgen
+ ;;
+esac])dnl
+AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} = xyes)
+AC_SUBST(cgendir)
using_cgen=no
@@ -131,10 +170,11 @@ if test x${all_targets} = xfalse ; then
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" ;;
+ 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_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;;
@@ -143,9 +183,12 @@ if test x${all_targets} = xfalse ; then
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;;
bfd_i386_arch) ta="$ta i386-dis.lo" ;;
- bfd_i860_arch) ;;
+ bfd_i860_arch) ta="$ta i860-dis.lo" ;;
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
+ bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
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_mcore_arch) ta="$ta mcore-dis.lo" ;;
@@ -155,13 +198,16 @@ if test x${all_targets} = xfalse ; then
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;;
bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
+ bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_pyramid_arch) ;;
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
- bfd_sh_arch) ta="$ta sh-dis.lo" ;;
+ bfd_sh_arch)
+ ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
+ bfd_tic54x_arch) ta="$ta tic54x-dis.lo tic54x-opc.lo" ;;
bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
diff --git a/gnu/usr.bin/binutils/opcodes/dis-buf.c b/gnu/usr.bin/binutils/opcodes/dis-buf.c
index b828206d43f..46ac2f7724b 100644
--- a/gnu/usr.bin/binutils/opcodes/dis-buf.c
+++ b/gnu/usr.bin/binutils/opcodes/dis-buf.c
@@ -1,5 +1,6 @@
/* Disassemble from a buffer, for GNU.
- Copyright (C) 1993, 1994, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 1997, 1998, 1999, 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
diff --git a/gnu/usr.bin/binutils/opcodes/disassemble.c b/gnu/usr.bin/binutils/opcodes/disassemble.c
index 373b6526cb1..3a76d55ce52 100644
--- a/gnu/usr.bin/binutils/opcodes/disassemble.c
+++ b/gnu/usr.bin/binutils/opcodes/disassemble.c
@@ -1,5 +1,5 @@
/* Select disassembly routine for specified architecture.
- Copyright (C) 1994, 95, 96, 97, 98, 99, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_arc
#define ARCH_arm
#define ARCH_avr
+#define ARCH_cris
#define ARCH_d10v
#define ARCH_d30v
#define ARCH_h8300
@@ -32,10 +33,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_hppa
#define ARCH_i370
#define ARCH_i386
+#define ARCH_i860
#define ARCH_i960
+#define ARCH_ia64
#define ARCH_fr30
#define ARCH_m32r
#define ARCH_m68k
+#define ARCH_m68hc11
+#define ARCH_m68hc12
#define ARCH_m88k
#define ARCH_mcore
#define ARCH_mips
@@ -48,6 +53,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_sh
#define ARCH_sparc
#define ARCH_tic30
+#define ARCH_tic54x
#define ARCH_tic80
#define ARCH_v850
#define ARCH_vax
@@ -81,8 +87,7 @@ disassembler (abfd)
#ifdef ARCH_arc
case bfd_arch_arc:
{
- disassemble = arc_get_disassembler (bfd_get_mach (abfd),
- bfd_big_endian (abfd));
+ disassemble = arc_get_disassembler (abfd);
break;
}
#endif
@@ -99,6 +104,11 @@ disassembler (abfd)
disassemble = print_insn_avr;
break;
#endif
+#ifdef ARCH_cris
+ case bfd_arch_cris:
+ disassemble = cris_get_disassembler (abfd);
+ break;
+#endif
#ifdef ARCH_d10v
case bfd_arch_d10v:
disassemble = print_insn_d10v;
@@ -115,7 +125,7 @@ disassembler (abfd)
disassemble = print_insn_h8300h;
else if (bfd_get_mach(abfd) == bfd_mach_h8300s)
disassemble = print_insn_h8300s;
- else
+ else
disassemble = print_insn_h8300;
break;
#endif
@@ -136,17 +146,28 @@ disassembler (abfd)
#endif
#ifdef ARCH_i386
case bfd_arch_i386:
- if (bfd_get_mach (abfd) == bfd_mach_i386_i386_intel_syntax)
+ if (bfd_get_mach (abfd) == bfd_mach_i386_i386_intel_syntax
+ || bfd_get_mach (abfd) == bfd_mach_x86_64_intel_syntax)
disassemble = print_insn_i386_intel;
else
disassemble = print_insn_i386_att;
break;
#endif
+#ifdef ARCH_i860
+ case bfd_arch_i860:
+ disassemble = print_insn_i860;
+ break;
+#endif
#ifdef ARCH_i960
case bfd_arch_i960:
disassemble = print_insn_i960;
break;
#endif
+#ifdef ARCH_ia64
+ case bfd_arch_ia64:
+ disassemble = print_insn_ia64;
+ break;
+#endif
#ifdef ARCH_fr30
case bfd_arch_fr30:
disassemble = print_insn_fr30;
@@ -157,6 +178,14 @@ disassembler (abfd)
disassemble = print_insn_m32r;
break;
#endif
+#if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
+ case bfd_arch_m68hc11:
+ disassemble = print_insn_m68hc11;
+ break;
+ case bfd_arch_m68hc12:
+ disassemble = print_insn_m68hc12;
+ break;
+#endif
#ifdef ARCH_m68k
case bfd_arch_m68k:
disassemble = print_insn_m68k;
@@ -210,7 +239,10 @@ disassembler (abfd)
#endif
#ifdef ARCH_rs6000
case bfd_arch_rs6000:
- disassemble = print_insn_rs6000;
+ if (bfd_get_mach (abfd) == bfd_mach_ppc_620)
+ disassemble = print_insn_big_powerpc;
+ else
+ disassemble = print_insn_rs6000;
break;
#endif
#ifdef ARCH_sh
@@ -231,6 +263,11 @@ disassembler (abfd)
disassemble = print_insn_tic30;
break;
#endif
+#ifdef ARCH_tic54x
+ case bfd_arch_tic54x:
+ disassemble = print_insn_tic54x;
+ break;
+#endif
#ifdef ARCH_tic80
case bfd_arch_tic80:
disassemble = print_insn_tic80;
@@ -250,7 +287,7 @@ disassembler (abfd)
case bfd_arch_z8k:
if (bfd_get_mach(abfd) == bfd_mach_z8001)
disassemble = print_insn_z8001;
- else
+ else
disassemble = print_insn_z8002;
break;
#endif
@@ -267,11 +304,11 @@ disassembler (abfd)
void
disassembler_usage (stream)
- FILE *stream ATTRIBUTE_UNUSED;
+ FILE * stream ATTRIBUTE_UNUSED;
{
#ifdef ARCH_arm
print_arm_disassembler_options (stream);
#endif
-
+
return;
}
diff --git a/gnu/usr.bin/binutils/opcodes/h8300-dis.c b/gnu/usr.bin/binutils/opcodes/h8300-dis.c
index 84f4aadc72d..ab95db42caa 100644
--- a/gnu/usr.bin/binutils/opcodes/h8300-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/h8300-dis.c
@@ -1,5 +1,5 @@
/* Disassemble h8300 instructions.
- Copyright (C) 1993, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 1998, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,16 +23,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "dis-asm.h"
#include "opintl.h"
-
/* Run through the opcodes and sort them into order to make them easy
- to disassemble
- */
+ to disassemble. */
static void
bfd_h8_disassemble_init ()
{
unsigned int i;
-
-
struct h8_opcode *p;
for (p = h8_opcodes; p->name; p++)
@@ -41,55 +37,49 @@ bfd_h8_disassemble_init ()
int n2 = 0;
if ((int) p->data.nib[0] < 16)
- {
- n1 = (int) p->data.nib[0];
- }
+ n1 = (int) p->data.nib[0];
else
n1 = 0;
+
if ((int) p->data.nib[1] < 16)
- {
- n2 = (int) p->data.nib[1];
- }
+ n2 = (int) p->data.nib[1];
else
n2 = 0;
/* Just make sure there are an even number of nibbles in it, and
- that the count is the same s the length */
+ that the count is the same as the length. */
for (i = 0; p->data.nib[i] != E; i++)
- /*EMPTY*/ ;
+ ;
+
if (i & 1)
abort ();
+
p->length = i / 2;
}
-
}
-
unsigned int
bfd_h8_disassemble (addr, info, mode)
bfd_vma addr;
disassemble_info *info;
int mode;
{
- /* Find the first entry in the table for this opcode */
+ /* Find the first entry in the table for this opcode. */
static CONST char *regnames[] =
{
"r0h", "r1h", "r2h", "r3h", "r4h", "r5h", "r6h", "r7h",
- "r0l", "r1l", "r2l", "r3l", "r4l", "r5l", "r6l", "r7l"};
-
+ "r0l", "r1l", "r2l", "r3l", "r4l", "r5l", "r6l", "r7l"
+ };
static CONST char *wregnames[] =
{
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"
- };
-
+ };
static CONST char *lregnames[] =
{
"er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7",
"er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"
- }
- ;
-
+ };
int rs = 0;
int rd = 0;
int rdisp = 0;
@@ -97,12 +87,11 @@ bfd_h8_disassemble (addr, info, mode)
int bit = 0;
int plen = 0;
static boolean init = 0;
- struct h8_opcode *q = h8_opcodes;
+ struct h8_opcode *q;
char CONST **pregnames = mode != 0 ? lregnames : wregnames;
int status;
int l;
-
- unsigned char data[20];
+ unsigned char data[20];
void *stream = info->stream;
fprintf_ftype fprintf = info->fprintf_func;
@@ -112,111 +101,103 @@ bfd_h8_disassemble (addr, info, mode)
init = 1;
}
- status = info->read_memory_func(addr, data, 2, info);
- if (status != 0)
+ status = info->read_memory_func (addr, data, 2, info);
+ if (status != 0)
{
- info->memory_error_func(status, addr, info);
+ info->memory_error_func (status, addr, info);
return -1;
}
- for (l = 2; status == 0 && l < 10; l+=2)
- {
- status = info->read_memory_func(addr+l, data+l, 2, info);
- }
-
-
- /* Find the exact opcode/arg combo */
- while (q->name)
+ for (l = 2; status == 0 && l < 10; l += 2)
+ status = info->read_memory_func (addr + l, data + l, 2, info);
+
+ /* Find the exact opcode/arg combo. */
+ for (q = h8_opcodes; q->name; q++)
{
- op_type *nib;
+ op_type *nib = q->data.nib;
unsigned int len = 0;
- nib = q->data.nib;
-
while (1)
{
op_type looking_for = *nib;
int thisnib = data[len >> 1];
-
+
thisnib = (len & 1) ? (thisnib & 0xf) : ((thisnib >> 4) & 0xf);
-
- if (looking_for < 16 && looking_for >=0)
+
+ if (looking_for < 16 && looking_for >= 0)
{
-
- if (looking_for != thisnib)
+ if (looking_for != thisnib)
goto fail;
}
-
- else
+ else
{
-
if ((int) looking_for & (int) B31)
{
- if (! (((int) thisnib & 0x8) != 0))
+ if (!(((int) thisnib & 0x8) != 0))
goto fail;
+
looking_for = (op_type) ((int) looking_for & ~(int) B31);
}
+
if ((int) looking_for & (int) B30)
{
- if (!(((int) thisnib & 0x8) == 0))
+ if (!(((int) thisnib & 0x8) == 0))
goto fail;
+
looking_for = (op_type) ((int) looking_for & ~(int) B30);
}
if (looking_for & DBIT)
{
- if ((looking_for & 5) != (thisnib &5)) goto fail;
+ /* Exclude adds/subs by looking at bit 0 and 2, and
+ make sure the operand size, either w or l,
+ matches by looking at bit 1. */
+ if ((looking_for & 7) != (thisnib & 7))
+ goto fail;
+
abs = (thisnib & 0x8) ? 2 : 1;
- }
-
- else if (looking_for & (REG | IND|INC|DEC))
+ }
+ else if (looking_for & (REG | IND | INC | DEC))
{
if (looking_for & SRC)
- {
- rs = thisnib;
- }
+ rs = thisnib;
else
- {
- rd = thisnib;
- }
+ rd = thisnib;
}
else if (looking_for & L_16)
{
abs = (data[len >> 1]) * 256 + data[(len + 2) >> 1];
plen = 16;
-
}
- else if(looking_for & ABSJMP)
+ else if (looking_for & ABSJMP)
{
- abs =
- (data[1] << 16)
- | (data[2] << 8)
- | (data[3]);
+ abs = (data[1] << 16) | (data[2] << 8) | (data[3]);
}
- else if(looking_for & MEMIND)
+ else if (looking_for & MEMIND)
{
abs = data[1];
}
else if (looking_for & L_32)
{
int i = len >> 1;
+
abs = (data[i] << 24)
| (data[i + 1] << 16)
- | (data[i + 2] << 8)
- | (data[i+ 3]);
+ | (data[i + 2] << 8)
+ | (data[i + 3]);
- plen =32;
-
+ plen = 32;
}
else if (looking_for & L_24)
{
int i = len >> 1;
- abs = (data[i] << 16) | (data[i + 1] << 8)| (data[i+2]);
- plen =24;
+
+ abs = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
+ plen = 24;
}
else if (looking_for & IGNORE)
{
-
+ ;
}
else if (looking_for & DISPREG)
{
@@ -224,7 +205,7 @@ bfd_h8_disassemble (addr, info, mode)
}
else if (looking_for & KBIT)
{
- switch (thisnib)
+ switch (thisnib)
{
case 9:
abs = 4;
@@ -241,7 +222,7 @@ bfd_h8_disassemble (addr, info, mode)
}
else if (looking_for & L_8)
{
- plen = 8;
+ plen = 8;
abs = data[len >> 1];
}
else if (looking_for & L_3)
@@ -259,19 +240,14 @@ bfd_h8_disassemble (addr, info, mode)
}
else if (looking_for == E)
{
+ int i;
- {
- int i;
+ for (i = 0; i < q->length; i++)
+ fprintf (stream, "%02x ", data[i]);
+
+ for (; i < 6; i++)
+ fprintf (stream, " ");
- for (i = 0; i < q->length; i++)
- {
- fprintf (stream, "%02x ", data[i]);
- }
- for (; i < 6; i++)
- {
- fprintf (stream, " ");
- }
- }
fprintf (stream, "%s\t", q->name);
/* Gross. Disgusting. */
@@ -297,27 +273,26 @@ bfd_h8_disassemble (addr, info, mode)
return q->length;
}
- /* Fill in the args */
+ /* Fill in the args. */
{
op_type *args = q->args.nib;
int hadone = 0;
-
while (*args != E)
{
int x = *args;
+
if (hadone)
fprintf (stream, ",");
-
if (x & L_3)
{
fprintf (stream, "#0x%x", (unsigned) bit);
}
- else if (x & (IMM|KBIT|DBIT))
+ else if (x & (IMM | KBIT | DBIT))
{
/* Bletch. For shal #2,er0 and friends. */
- if (*(args+1) & SRC_IN_DST)
+ if (*(args + 1) & SRC_IN_DST)
abs = 2;
fprintf (stream, "#0x%x", (unsigned) abs);
@@ -325,6 +300,7 @@ bfd_h8_disassemble (addr, info, mode)
else if (x & REG)
{
int rn = (x & DST) ? rd : rs;
+
switch (x & SIZE)
{
case L_8:
@@ -337,7 +313,6 @@ bfd_h8_disassemble (addr, info, mode)
case L_32:
fprintf (stream, "%s", lregnames[rn]);
break;
-
}
}
else if (x & MACREG)
@@ -352,46 +327,46 @@ bfd_h8_disassemble (addr, info, mode)
{
fprintf (stream, "@-%s", pregnames[rd]);
}
-
else if (x & IND)
{
int rn = (x & DST) ? rd : rs;
fprintf (stream, "@%s", pregnames[rn]);
}
-
else if (x & ABS8MEM)
{
fprintf (stream, "@0x%x:8", (unsigned) abs);
}
-
- else if (x & (ABS|ABSJMP))
+ else if (x & (ABS | ABSJMP))
{
fprintf (stream, "@0x%x:%d", (unsigned) abs, plen);
}
-
else if (x & MEMIND)
{
fprintf (stream, "@@%d (%x)", abs, abs);
}
-
else if (x & PCREL)
{
- if (x & L_16)
+ if (x & L_16)
{
- abs +=2;
- fprintf (stream, ".%s%d (%x)", (short) abs > 0 ? "+" : "", (short) abs,
- addr + (short) abs + 2);
+ abs += 2;
+ fprintf (stream,
+ ".%s%d (%x)",
+ (short) abs > 0 ? "+" : "",
+ (short) abs, addr + (short) abs + 2);
+ }
+ else
+ {
+ fprintf (stream,
+ ".%s%d (%x)",
+ (char) abs > 0 ? "+" : "",
+ (char) abs, addr + (char) abs + 2);
}
- else {
- fprintf (stream, ".%s%d (%x)", (char) abs > 0 ? "+" : "", (char) abs,
- addr + (char) abs + 2);
- }
}
else if (x & DISP)
{
- fprintf (stream, "@(0x%x:%d,%s)", abs,plen, pregnames[rdisp]);
+ fprintf (stream, "@(0x%x:%d,%s)",
+ abs, plen, pregnames[rdisp]);
}
-
else if (x & CCR)
{
fprintf (stream, "ccr");
@@ -403,56 +378,54 @@ bfd_h8_disassemble (addr, info, mode)
else
/* xgettext:c-format */
fprintf (stream, _("Hmmmm %x"), x);
+
hadone = 1;
args++;
}
}
+
return q->length;
}
-
-
else
- {
- /* xgettext:c-format */
- fprintf (stream, _("Don't understand %x \n"), looking_for);
- }
+ /* xgettext:c-format */
+ fprintf (stream, _("Don't understand %x \n"), looking_for);
}
-
+
len++;
nib++;
}
-
+
fail:
- q++;
+ ;
}
- /* Fell of the end */
+ /* Fell off the end. */
fprintf (stream, "%02x %02x .word\tH'%x,H'%x",
data[0], data[1],
data[0], data[1]);
return 2;
}
-int
+int
print_insn_h8300 (addr, info)
-bfd_vma addr;
-disassemble_info *info;
+ bfd_vma addr;
+ disassemble_info *info;
{
- return bfd_h8_disassemble (addr, info , 0);
+ return bfd_h8_disassemble (addr, info, 0);
}
-int
+int
print_insn_h8300h (addr, info)
-bfd_vma addr;
-disassemble_info *info;
+ bfd_vma addr;
+ disassemble_info *info;
{
- return bfd_h8_disassemble (addr, info , 1);
+ return bfd_h8_disassemble (addr, info, 1);
}
-int
+int
print_insn_h8300s (addr, info)
-bfd_vma addr;
-disassemble_info *info;
+ bfd_vma addr;
+ disassemble_info *info;
{
- return bfd_h8_disassemble (addr, info , 2);
+ return bfd_h8_disassemble (addr, info, 2);
}
diff --git a/gnu/usr.bin/binutils/opcodes/h8500-dis.c b/gnu/usr.bin/binutils/opcodes/h8500-dis.c
index d5e15d4fdb6..437207c7bff 100644
--- a/gnu/usr.bin/binutils/opcodes/h8500-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/h8500-dis.c
@@ -1,5 +1,5 @@
/* Disassemble h8500 instructions.
- Copyright (C) 1993, 94, 95, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1998, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -69,8 +69,7 @@ fetch_data (info, addr)
return 1;
}
-static char *crname[] =
-{"sr", "ccr", "*", "br", "ep", "dp", "*", "tp"};
+static char *crname[] = { "sr", "ccr", "*", "br", "ep", "dp", "*", "tp" };
int
print_insn_h8500 (addr, info)
@@ -91,21 +90,22 @@ print_insn_h8500 (addr, info)
/* Error return. */
return -1;
-if (0) {
- static int one;
- if (!one )
- {
- one = 1;
- for (opcode = h8500_table; opcode->name; opcode++)
- {
- if ((opcode->bytes[0].contents & 0x8) == 0)
- printf("%s\n", opcode->name);
- }
- }
- }
+ if (0)
+ {
+ static int one;
+ if (!one)
+ {
+ one = 1;
+ for (opcode = h8500_table; opcode->name; opcode++)
+ {
+ if ((opcode->bytes[0].contents & 0x8) == 0)
+ printf ("%s\n", opcode->name);
+ }
+ }
+ }
- /* Run down the table to find the one which matches */
+ /* Run down the table to find the one which matches. */
for (opcode = h8500_table; opcode->name; opcode++)
{
int byte;
@@ -119,6 +119,7 @@ if (0) {
int qim = 0;
int i;
int cr = 0;
+
for (byte = 0; byte < opcode->length; byte++)
{
FETCH_DATA (info, buffer + byte + 1);
@@ -129,7 +130,7 @@ if (0) {
}
else
{
- /* extract any info parts */
+ /* Extract any info parts. */
switch (opcode->bytes[byte].insert)
{
case 0:
@@ -221,8 +222,8 @@ if (0) {
}
}
}
- /* We get here when all the masks have passed so we can output the
- operands*/
+ /* We get here when all the masks have passed so we can output
+ the operands. */
FETCH_DATA (info, buffer + opcode->length);
for (i = 0; i < opcode->length; i++)
{
@@ -322,7 +323,8 @@ if (0) {
func (stream, "#0x%0x:8", imm & 0xff);
break;
case PCREL16:
- func (stream, "0x%0x:16", (pcrel + addr + opcode->length) & 0xffff);
+ func (stream, "0x%0x:16",
+ (pcrel + addr + opcode->length) & 0xffff);
break;
case PCREL8:
func (stream, "#0x%0x:8",
@@ -337,12 +339,12 @@ if (0) {
}
}
return opcode->length;
- next:;
+ next:
+ ;
}
- /* Couldn't understand anything */
+ /* Couldn't understand anything. */
/* xgettext:c-format */
func (stream, _("%02x\t\t*unknown*"), buffer[0]);
return 1;
-
}
diff --git a/gnu/usr.bin/binutils/opcodes/h8500-opc.h b/gnu/usr.bin/binutils/opcodes/h8500-opc.h
index d4949af34d0..62b60397de9 100644
--- a/gnu/usr.bin/binutils/opcodes/h8500-opc.h
+++ b/gnu/usr.bin/binutils/opcodes/h8500-opc.h
@@ -1,3 +1,25 @@
+/* Instruction opcode header for Hitachi 8500.
+
+Copyright 2001 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
typedef enum
{
GR0,GR1,GR2,GR3,GR4,GR5,GR6,GR7,
diff --git a/gnu/usr.bin/binutils/opcodes/hppa-dis.c b/gnu/usr.bin/binutils/opcodes/hppa-dis.c
index 94d05561a79..6d7c54deb9e 100644
--- a/gnu/usr.bin/binutils/opcodes/hppa-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/hppa-dis.c
@@ -1,5 +1,6 @@
/* Disassembler for the PA-RISC. Somewhat derived from sparc-pinsn.c.
- Copyright 1989, 1990, 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -42,19 +43,23 @@ static const char *const fp_reg_names[] =
typedef unsigned int CORE_ADDR;
-/* Get at various relevent fields of an instruction word. */
+/* Get at various relevent fields of an instruction word. */
#define MASK_5 0x1f
#define MASK_10 0x3ff
#define MASK_11 0x7ff
#define MASK_14 0x3fff
+#define MASK_16 0xffff
#define MASK_21 0x1fffff
-/* This macro gets bit fields using HP's numbering (MSB = 0) */
+/* These macros get bit fields using HP's numbering (MSB = 0) */
#define GET_FIELD(X, FROM, TO) \
((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
+#define GET_BIT(X, WHICH) \
+ GET_FIELD (X, WHICH, WHICH)
+
/* Some of these have been converted to 2-d arrays because they
consume less storage this way. If the maintenance becomes a
problem, convert them back to const 1-d pointer arrays. */
@@ -132,13 +137,33 @@ static const char *const read_write_names[] = {",r", ",w"};
static const char *const add_compl_names[] = { 0, "", ",l", ",tsv" };
/* For a bunch of different instructions form an index into a
- completer name table. */
+ completer name table. */
#define GET_COMPL(insn) (GET_FIELD (insn, 26, 26) | \
GET_FIELD (insn, 18, 18) << 1)
#define GET_COND(insn) (GET_FIELD ((insn), 16, 18) + \
(GET_FIELD ((insn), 19, 19) ? 8 : 0))
+static void fput_reg PARAMS ((unsigned int, disassemble_info *));
+static void fput_fp_reg PARAMS ((unsigned int, disassemble_info *));
+static void fput_fp_reg_r PARAMS ((unsigned int, disassemble_info *));
+static void fput_creg PARAMS ((unsigned int, disassemble_info *));
+static void fput_const PARAMS ((unsigned int, disassemble_info *));
+static int extract_3 PARAMS ((unsigned int));
+static int extract_5_load PARAMS ((unsigned int));
+static int extract_5_store PARAMS ((unsigned int));
+static unsigned extract_5r_store PARAMS ((unsigned int));
+static unsigned extract_5R_store PARAMS ((unsigned int));
+static unsigned extract_10U_store PARAMS ((unsigned int));
+static unsigned extract_5Q_store PARAMS ((unsigned int));
+static int extract_11 PARAMS ((unsigned int));
+static int extract_14 PARAMS ((unsigned int));
+static int extract_16 PARAMS ((unsigned int));
+static int extract_21 PARAMS ((unsigned int));
+static int extract_12 PARAMS ((unsigned int));
+static int extract_17 PARAMS ((unsigned int));
+static int extract_22 PARAMS ((unsigned int));
+
/* Utility function to print registers. Put these first, so gcc's function
inlining can do its stuff. */
@@ -181,7 +206,7 @@ fput_creg (reg, info)
(*info->fprintf_func) (info->stream, control_reg[reg]);
}
-/* print constants with sign */
+/* Print constants with sign. */
static void
fput_const (num, info)
@@ -195,9 +220,9 @@ fput_const (num, info)
}
/* Routines to extract various sized constants out of hppa
- instructions. */
+ instructions. */
-/* extract a 3-bit space register number from a be, ble, mtsp or mfsp */
+/* Extract a 3-bit space register number from a be, ble, mtsp or mfsp. */
static int
extract_3 (word)
unsigned word;
@@ -212,7 +237,7 @@ extract_5_load (word)
return low_sign_extend (word >> 16 & MASK_5, 5);
}
-/* extract the immediate field from a st{bhw}s instruction */
+/* Extract the immediate field from a st{bhw}s instruction. */
static int
extract_5_store (word)
unsigned word;
@@ -220,7 +245,7 @@ extract_5_store (word)
return low_sign_extend (word & MASK_5, 5);
}
-/* extract the immediate field from a break instruction */
+/* Extract the immediate field from a break instruction. */
static unsigned
extract_5r_store (word)
unsigned word;
@@ -228,7 +253,7 @@ extract_5r_store (word)
return (word & MASK_5);
}
-/* extract the immediate field from a {sr}sm instruction */
+/* Extract the immediate field from a {sr}sm instruction. */
static unsigned
extract_5R_store (word)
unsigned word;
@@ -236,7 +261,7 @@ extract_5R_store (word)
return (word >> 16 & MASK_5);
}
-/* extract the 10 bit immediate field from a {sr}sm instruction */
+/* Extract the 10 bit immediate field from a {sr}sm instruction. */
static unsigned
extract_10U_store (word)
unsigned word;
@@ -244,7 +269,7 @@ extract_10U_store (word)
return (word >> 16 & MASK_10);
}
-/* extract the immediate field from a bb instruction */
+/* Extract the immediate field from a bb instruction. */
static unsigned
extract_5Q_store (word)
unsigned word;
@@ -252,7 +277,7 @@ extract_5Q_store (word)
return (word >> 21 & MASK_5);
}
-/* extract an 11 bit immediate field */
+/* Extract an 11 bit immediate field. */
static int
extract_11 (word)
unsigned word;
@@ -260,7 +285,7 @@ extract_11 (word)
return low_sign_extend (word & MASK_11, 11);
}
-/* extract a 14 bit immediate field */
+/* Extract a 14 bit immediate field. */
static int
extract_14 (word)
unsigned word;
@@ -268,7 +293,21 @@ extract_14 (word)
return low_sign_extend (word & MASK_14, 14);
}
-/* extract a 21 bit constant */
+/* Extract a 16 bit immediate field (PA2.0 wide only). */
+static int
+extract_16 (word)
+ unsigned word;
+{
+ int m15, m0, m1;
+ m0 = GET_BIT (word, 16);
+ m1 = GET_BIT (word, 17);
+ m15 = GET_BIT (word, 31);
+ word = (word >> 1) & 0x1fff;
+ word = word | (m15 << 15) | ((m15 ^ m0) << 14) | ((m15 ^ m1) << 13);
+ return sign_extend (word, 16);
+}
+
+/* Extract a 21 bit constant. */
static int
extract_21 (word)
@@ -290,7 +329,7 @@ extract_21 (word)
return sign_extend (val, 21) << 11;
}
-/* extract a 12 bit constant from branch instructions */
+/* Extract a 12 bit constant from branch instructions. */
static int
extract_12 (word)
@@ -301,8 +340,8 @@ extract_12 (word)
(word & 0x1) << 11, 12) << 2;
}
-/* extract a 17 bit constant from branch instructions, returning the
- 19 bit signed value. */
+/* Extract a 17 bit constant from branch instructions, returning the
+ 19 bit signed value. */
static int
extract_17 (word)
@@ -352,7 +391,10 @@ print_insn_hppa (memaddr, info)
if ((insn & opcode->mask) == opcode->match)
{
register const char *s;
-
+#ifndef BFD64
+ if (opcode->arch == pa20w)
+ continue;
+#endif
(*info->fprintf_func) (info->stream, "%s", opcode->name);
if (!strchr ("cfCY?-+nHNZFIuv", opcode->args[0]))
@@ -473,13 +515,25 @@ print_insn_hppa (memaddr, info)
fput_fp_reg (reg, info);
break;
}
+
+ /* 'fe' will not generate a space before the register
+ name. Normally that is fine. Except that it
+ causes problems with fstw fe,y(b) which has no FP
+ format completer. */
+ case 'E':
+ fputs_filtered (" ", info);
+
+ /* FALLTHRU */
+
case 'e':
- if (GET_FIELD (insn, 25, 25))
+ if (GET_FIELD (insn, 30, 30))
fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
else
fput_fp_reg (GET_FIELD (insn, 11, 15), info);
break;
-
+ case 'x':
+ fput_fp_reg (GET_FIELD (insn, 11, 15), info);
+ break;
}
break;
@@ -660,9 +714,9 @@ print_insn_hppa (memaddr, info)
case 'J':
{
- int opcode = GET_FIELD (insn, 0, 5);
+ int opc = GET_FIELD (insn, 0, 5);
- if (opcode == 0x16 || opcode == 0x1e)
+ if (opc == 0x16 || opc == 0x1e)
{
if (GET_FIELD (insn, 29, 29) == 0)
fputs_filtered (",ma ", info);
@@ -676,16 +730,16 @@ print_insn_hppa (memaddr, info)
case 'e':
{
- int opcode = GET_FIELD (insn, 0, 5);
+ int opc = GET_FIELD (insn, 0, 5);
- if (opcode == 0x13 || opcode == 0x1b)
+ if (opc == 0x13 || opc == 0x1b)
{
if (GET_FIELD (insn, 18, 18) == 1)
fputs_filtered (",mb ", info);
else
fputs_filtered (",ma ", info);
}
- else if (opcode == 0x17 || opcode == 0x1f)
+ else if (opc == 0x17 || opc == 0x1f)
{
if (GET_FIELD (insn, 31, 31) == 1)
fputs_filtered (",ma ", info);
@@ -835,6 +889,11 @@ print_insn_hppa (memaddr, info)
case 'k':
fput_const (extract_21 (insn), info);
break;
+ case '<':
+ case 'l':
+ /* 16-bit long disp., PA2.0 wide only. */
+ fput_const (extract_16 (insn), info);
+ break;
case 'n':
if (insn & 0x2)
(*info->fprintf_func) (info->stream, ",n ");
@@ -1041,6 +1100,25 @@ print_insn_hppa (memaddr, info)
break;
}
+ case '>':
+ case 'y':
+ {
+ /* 16-bit long disp., PA2.0 wide only. */
+ int disp = extract_16 (insn);
+ disp &= ~3;
+ fput_const (disp, info);
+ break;
+ }
+
+ case '&':
+ {
+ /* 16-bit long disp., PA2.0 wide only. */
+ int disp = extract_16 (insn);
+ disp &= ~7;
+ fput_const (disp, info);
+ break;
+ }
+
/* ?!? FIXME */
case '_':
case '{':
diff --git a/gnu/usr.bin/binutils/opcodes/i386-dis.c b/gnu/usr.bin/binutils/opcodes/i386-dis.c
index a75d6e316c3..5621d8afadf 100644
--- a/gnu/usr.bin/binutils/opcodes/i386-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/i386-dis.c
@@ -1,5 +1,6 @@
/* Print i386 instructions for GDB, the GNU debugger.
- Copyright (C) 1988, 89, 91, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2001
Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
*/
/*
@@ -62,9 +64,32 @@ struct dis_private
when we can. */
#define FWAIT_OPCODE (0x9b)
+/* Set to 1 for 64bit mode disassembly. */
+static int mode_64bit;
+
/* Flags for the prefixes for the current instruction. See below. */
static int prefixes;
+/* REX prefix the current instruction. See below. */
+static int rex;
+/* Bits of REX we've already used. */
+static int rex_used;
+#define REX_MODE64 8
+#define REX_EXTX 4
+#define REX_EXTY 2
+#define REX_EXTZ 1
+/* Mark parts used in the REX prefix. When we are testing for
+ empty prefix (for 8bit register REX extension), just mask it
+ out. Otherwise test for REX bit is excuse for existence of REX
+ only in case value is nonzero. */
+#define USED_REX(value) \
+ { \
+ if (value) \
+ rex_used |= (rex & value) ? (value) | 0x40 : 0; \
+ else \
+ rex_used |= 0x40; \
+ }
+
/* Flags for prefixes which we somehow handled when printing the
current instruction. */
static int used_prefixes;
@@ -121,52 +146,87 @@ fetch_data (info, addr)
#define XX NULL, 0
#define Eb OP_E, b_mode
-#define indirEb OP_indirE, b_mode
-#define Gb OP_G, b_mode
#define Ev OP_E, v_mode
#define Ed OP_E, d_mode
+#define indirEb OP_indirE, b_mode
#define indirEv OP_indirE, v_mode
#define Ew OP_E, w_mode
#define Ma OP_E, v_mode
#define M OP_E, 0 /* lea */
#define Mp OP_E, 0 /* 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 Gw OP_G, w_mode
#define Rd OP_Rd, d_mode
+#define Rm OP_Rd, m_mode
#define Ib OP_I, b_mode
#define sIb OP_sI, b_mode /* sign extened byte */
#define Iv OP_I, v_mode
+#define Iq OP_I, q_mode
+#define Iv64 OP_I64, v_mode
#define Iw OP_I, w_mode
#define Jb OP_J, b_mode
#define Jv OP_J, v_mode
-#define Cd OP_C, d_mode
-#define Dd OP_D, d_mode
+#define Cm OP_C, m_mode
+#define Dm OP_D, m_mode
#define Td OP_T, d_mode
-#define eAX OP_REG, eAX_reg
-#define eBX OP_REG, eBX_reg
-#define eCX OP_REG, eCX_reg
-#define eDX OP_REG, eDX_reg
-#define eSP OP_REG, eSP_reg
-#define eBP OP_REG, eBP_reg
-#define eSI OP_REG, eSI_reg
-#define eDI OP_REG, eDI_reg
-#define AL OP_REG, al_reg
-#define CL OP_REG, cl_reg
-#define DL OP_REG, dl_reg
-#define BL OP_REG, bl_reg
-#define AH OP_REG, ah_reg
-#define CH OP_REG, ch_reg
-#define DH OP_REG, dh_reg
-#define BH OP_REG, bh_reg
-#define AX OP_REG, ax_reg
-#define DX OP_REG, dx_reg
-#define indirDX OP_REG, indir_dx_reg
+#define RMeAX OP_REG, eAX_reg
+#define RMeBX OP_REG, eBX_reg
+#define RMeCX OP_REG, eCX_reg
+#define RMeDX OP_REG, eDX_reg
+#define RMeSP OP_REG, eSP_reg
+#define RMeBP OP_REG, eBP_reg
+#define RMeSI OP_REG, eSI_reg
+#define RMeDI OP_REG, eDI_reg
+#define RMrAX OP_REG, rAX_reg
+#define RMrBX OP_REG, rBX_reg
+#define RMrCX OP_REG, rCX_reg
+#define RMrDX OP_REG, rDX_reg
+#define RMrSP OP_REG, rSP_reg
+#define RMrBP OP_REG, rBP_reg
+#define RMrSI OP_REG, rSI_reg
+#define RMrDI OP_REG, rDI_reg
+#define RMAL OP_REG, al_reg
+#define RMAL OP_REG, al_reg
+#define RMCL OP_REG, cl_reg
+#define RMDL OP_REG, dl_reg
+#define RMBL OP_REG, bl_reg
+#define RMAH OP_REG, ah_reg
+#define RMCH OP_REG, ch_reg
+#define RMDH OP_REG, dh_reg
+#define RMBH OP_REG, bh_reg
+#define RMAX OP_REG, ax_reg
+#define RMDX OP_REG, dx_reg
+
+#define eAX OP_IMREG, eAX_reg
+#define eBX OP_IMREG, eBX_reg
+#define eCX OP_IMREG, eCX_reg
+#define eDX OP_IMREG, eDX_reg
+#define eSP OP_IMREG, eSP_reg
+#define eBP OP_IMREG, eBP_reg
+#define eSI OP_IMREG, eSI_reg
+#define eDI OP_IMREG, eDI_reg
+#define AL OP_IMREG, al_reg
+#define AL OP_IMREG, al_reg
+#define CL OP_IMREG, cl_reg
+#define DL OP_IMREG, dl_reg
+#define BL OP_IMREG, bl_reg
+#define AH OP_IMREG, ah_reg
+#define CH OP_IMREG, ch_reg
+#define DH OP_IMREG, dh_reg
+#define BH OP_IMREG, bh_reg
+#define AX OP_IMREG, ax_reg
+#define DX OP_IMREG, dx_reg
+#define indirDX OP_IMREG, indir_dx_reg
#define Sw OP_SEG, w_mode
#define Ap OP_DIR, 0
#define Ob OP_OFF, b_mode
+#define Ob64 OP_OFF64, b_mode
#define Ov OP_OFF, v_mode
+#define Ov64 OP_OFF64, v_mode
#define Xb OP_DSreg, eSI_reg
#define Xv OP_DSreg, eSI_reg
#define Yb OP_ESreg, eDI_reg
@@ -185,10 +245,14 @@ fetch_data (info, addr)
#define EM OP_EM, v_mode
#define EX OP_EX, v_mode
#define MS OP_MS, v_mode
+#define XS OP_XS, v_mode
#define None OP_E, 0
#define OPSUF OP_3DNowSuffix, 0
#define OPSIMD OP_SIMD_Suffix, 0
+#define cond_jump_flag NULL, cond_jump_mode
+#define loop_jcxz_flag NULL, loop_jcxz_mode
+
/* bits in sizeflag */
#if 0 /* leave undefined until someone adds the extra flag to objdump */
#define SUFFIX_ALWAYS 4
@@ -201,6 +265,11 @@ typedef void (*op_rtn) PARAMS ((int bytemode, int sizeflag));
static void OP_E PARAMS ((int, int));
static void OP_G PARAMS ((int, int));
static void OP_I PARAMS ((int, int));
+static void OP_I64 PARAMS ((int, int));
+static void OP_OFF PARAMS ((int, int));
+static void OP_REG PARAMS ((int, int));
+static void OP_IMREG PARAMS ((int, int));
+static void OP_OFF64 PARAMS ((int, int));
static void OP_indirE PARAMS ((int, int));
static void OP_sI PARAMS ((int, int));
static void OP_REG PARAMS ((int, int));
@@ -221,26 +290,33 @@ static void OP_XMM PARAMS ((int, int));
static void OP_EM PARAMS ((int, int));
static void OP_EX PARAMS ((int, int));
static void OP_MS PARAMS ((int, int));
+static void OP_XS PARAMS ((int, int));
static void OP_3DNowSuffix PARAMS ((int, int));
static void OP_SIMD_Suffix PARAMS ((int, int));
static void SIMD_Fixup PARAMS ((int, int));
static void append_seg PARAMS ((void));
-static void set_op PARAMS ((unsigned int op));
+static void set_op PARAMS ((unsigned int op, int));
static void putop PARAMS ((const char *template, int sizeflag));
static void dofloat PARAMS ((int sizeflag));
static int get16 PARAMS ((void));
-static int get32 PARAMS ((void));
+static bfd_vma get64 PARAMS ((void));
+static bfd_signed_vma get32 PARAMS ((void));
+static bfd_signed_vma get32s PARAMS ((void));
static void ckprefix PARAMS ((void));
static const char *prefix_name PARAMS ((int, int));
static void ptr_reg PARAMS ((int, int));
static void BadOp PARAMS ((void));
-#define b_mode 1
-#define v_mode 2
-#define w_mode 3
-#define d_mode 4
-#define x_mode 5
+#define b_mode 1 /* byte operand */
+#define v_mode 2 /* operand size depends on prefixes */
+#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 es_reg 100
#define cs_reg 101
@@ -276,6 +352,15 @@ static void BadOp PARAMS ((void));
#define si_reg 130
#define di_reg 131
+#define rAX_reg 132
+#define rCX_reg 133
+#define rDX_reg 134
+#define rBX_reg 135
+#define rSP_reg 136
+#define rBP_reg 137
+#define rSI_reg 138
+#define rDI_reg 139
+
#define indir_dx_reg 150
#define USE_GROUPS 1
@@ -320,6 +405,18 @@ static void BadOp PARAMS ((void));
#define PREGRP12 NULL, NULL, 12, NULL, USE_PREFIX_USER_TABLE, NULL, 0
#define PREGRP13 NULL, NULL, 13, NULL, USE_PREFIX_USER_TABLE, NULL, 0
#define PREGRP14 NULL, NULL, 14, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP15 NULL, NULL, 15, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP16 NULL, NULL, 16, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP17 NULL, NULL, 17, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP18 NULL, NULL, 18, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP19 NULL, NULL, 19, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP20 NULL, NULL, 20, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP21 NULL, NULL, 21, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP22 NULL, NULL, 22, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP23 NULL, NULL, 23, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP24 NULL, NULL, 24, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP25 NULL, NULL, 25, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP26 NULL, NULL, 26, NULL, USE_PREFIX_USER_TABLE, NULL, 0
#define FLOATCODE 50
#define FLOAT NULL, NULL, FLOATCODE, NULL, 0, NULL, 0
@@ -338,14 +435,21 @@ struct dis386 {
'A' => print 'b' if no register operands or suffix_always is true
'B' => print 'b' if suffix_always is true
'E' => print 'e' if 32-bit form of jcxz
+ 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
'L' => print 'l' if suffix_always is true
'N' => print 'n' if instruction has no wait "prefix"
- 'P' => print 'w' or 'l' if instruction has an operand size prefix,
+ 'O' => print 'd', or 'o'
+ 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
or suffix_always is true
- 'Q' => print 'w' or 'l' if no register operands or suffix_always is true
- 'R' => print 'w' or 'l' ("wd" or "dq" in intel mode)
- 'S' => print 'w' or 'l' if suffix_always is true
+ print 'q' if rex prefix is present.
+ 'I' => print 'q' in 64bit mode and behave as 'P' otherwise
+ 'Q' => print 'w', 'l' or 'q' if no register operands or suffix_always is true
+ 'R' => print 'w', 'l' or 'q' ("wd" or "dq" in intel mode)
+ 'S' => print 'w', 'l' or 'q' if suffix_always is true
+ 'T' => print 'q' in 64bit mode and behave as 'I' otherwise
+ 'X' => print 's', 'd' depending on data16 prefix (for XMM)
'W' => print 'b' or 'w' ("w" or "de" in intel mode)
+ 'Y' => 'q' if instruction has an REX 64bit overwrite prefix
*/
static const struct dis386 dis386_att[] = {
@@ -356,8 +460,8 @@ static const struct dis386 dis386_att[] = {
{ "addS", Gv, Ev, XX },
{ "addB", AL, Ib, XX },
{ "addS", eAX, Iv, XX },
- { "pushP", es, XX, XX },
- { "popP", es, XX, XX },
+ { "pushI", es, XX, XX },
+ { "popI", es, XX, XX },
/* 08 */
{ "orB", Eb, Gb, XX },
{ "orS", Ev, Gv, XX },
@@ -365,7 +469,7 @@ static const struct dis386 dis386_att[] = {
{ "orS", Gv, Ev, XX },
{ "orB", AL, Ib, XX },
{ "orS", eAX, Iv, XX },
- { "pushP", cs, XX, XX },
+ { "pushI", cs, XX, XX },
{ "(bad)", XX, XX, XX }, /* 0x0f extended opcode escape */
/* 10 */
{ "adcB", Eb, Gb, XX },
@@ -374,8 +478,8 @@ static const struct dis386 dis386_att[] = {
{ "adcS", Gv, Ev, XX },
{ "adcB", AL, Ib, XX },
{ "adcS", eAX, Iv, XX },
- { "pushP", ss, XX, XX },
- { "popP", ss, XX, XX },
+ { "pushI", ss, XX, XX },
+ { "popI", ss, XX, XX },
/* 18 */
{ "sbbB", Eb, Gb, XX },
{ "sbbS", Ev, Gv, XX },
@@ -383,8 +487,8 @@ static const struct dis386 dis386_att[] = {
{ "sbbS", Gv, Ev, XX },
{ "sbbB", AL, Ib, XX },
{ "sbbS", eAX, Iv, XX },
- { "pushP", ds, XX, XX },
- { "popP", ds, XX, XX },
+ { "pushI", ds, XX, XX },
+ { "popI", ds, XX, XX },
/* 20 */
{ "andB", Eb, Gb, XX },
{ "andS", Ev, Gv, XX },
@@ -422,41 +526,41 @@ static const struct dis386 dis386_att[] = {
{ "(bad)", XX, XX, XX }, /* SEG DS prefix */
{ "aas", XX, XX, XX },
/* 40 */
- { "incS", eAX, XX, XX },
- { "incS", eCX, XX, XX },
- { "incS", eDX, XX, XX },
- { "incS", eBX, XX, XX },
- { "incS", eSP, XX, XX },
- { "incS", eBP, XX, XX },
- { "incS", eSI, XX, XX },
- { "incS", eDI, XX, XX },
+ { "incS", RMeAX, XX, XX },
+ { "incS", RMeCX, XX, XX },
+ { "incS", RMeDX, XX, XX },
+ { "incS", RMeBX, XX, XX },
+ { "incS", RMeSP, XX, XX },
+ { "incS", RMeBP, XX, XX },
+ { "incS", RMeSI, XX, XX },
+ { "incS", RMeDI, XX, XX },
/* 48 */
- { "decS", eAX, XX, XX },
- { "decS", eCX, XX, XX },
- { "decS", eDX, XX, XX },
- { "decS", eBX, XX, XX },
- { "decS", eSP, XX, XX },
- { "decS", eBP, XX, XX },
- { "decS", eSI, XX, XX },
- { "decS", eDI, XX, XX },
+ { "decS", RMeAX, XX, XX },
+ { "decS", RMeCX, XX, XX },
+ { "decS", RMeDX, XX, XX },
+ { "decS", RMeBX, XX, XX },
+ { "decS", RMeSP, XX, XX },
+ { "decS", RMeBP, XX, XX },
+ { "decS", RMeSI, XX, XX },
+ { "decS", RMeDI, XX, XX },
/* 50 */
- { "pushS", eAX, XX, XX },
- { "pushS", eCX, XX, XX },
- { "pushS", eDX, XX, XX },
- { "pushS", eBX, XX, XX },
- { "pushS", eSP, XX, XX },
- { "pushS", eBP, XX, XX },
- { "pushS", eSI, XX, XX },
- { "pushS", eDI, XX, XX },
+ { "pushS", RMeAX, XX, XX },
+ { "pushS", RMeCX, XX, XX },
+ { "pushS", RMeDX, XX, XX },
+ { "pushS", RMeBX, XX, XX },
+ { "pushS", RMeSP, XX, XX },
+ { "pushS", RMeBP, XX, XX },
+ { "pushS", RMeSI, XX, XX },
+ { "pushS", RMeDI, XX, XX },
/* 58 */
- { "popS", eAX, XX, XX },
- { "popS", eCX, XX, XX },
- { "popS", eDX, XX, XX },
- { "popS", eBX, XX, XX },
- { "popS", eSP, XX, XX },
- { "popS", eBP, XX, XX },
- { "popS", eSI, XX, XX },
- { "popS", eDI, XX, XX },
+ { "popS", RMeAX, XX, XX },
+ { "popS", RMeCX, XX, XX },
+ { "popS", RMeDX, XX, XX },
+ { "popS", RMeBX, XX, XX },
+ { "popS", RMeSP, XX, XX },
+ { "popS", RMeBP, XX, XX },
+ { "popS", RMeSI, XX, XX },
+ { "popS", RMeDI, XX, XX },
/* 60 */
{ "pushaP", XX, XX, XX },
{ "popaP", XX, XX, XX },
@@ -467,32 +571,32 @@ static const struct dis386 dis386_att[] = {
{ "(bad)", XX, XX, XX }, /* op size prefix */
{ "(bad)", XX, XX, XX }, /* adr size prefix */
/* 68 */
- { "pushP", Iv, XX, XX }, /* 386 book wrong */
+ { "pushI", Iv, XX, XX }, /* 386 book wrong */
{ "imulS", Gv, Ev, Iv },
- { "pushP", sIb, XX, XX }, /* push of byte really pushes 2 or 4 bytes */
+ { "pushI", sIb, XX, XX }, /* push of byte really pushes 2 or 4 bytes */
{ "imulS", Gv, Ev, sIb },
{ "insb", Yb, indirDX, XX },
{ "insR", Yv, indirDX, XX },
{ "outsb", indirDX, Xb, XX },
{ "outsR", indirDX, Xv, XX },
/* 70 */
- { "jo", Jb, XX, XX },
- { "jno", Jb, XX, XX },
- { "jb", Jb, XX, XX },
- { "jae", Jb, XX, XX },
- { "je", Jb, XX, XX },
- { "jne", Jb, XX, XX },
- { "jbe", Jb, XX, XX },
- { "ja", Jb, XX, XX },
+ { "jo", Jb, cond_jump_flag, XX },
+ { "jno", Jb, cond_jump_flag, XX },
+ { "jb", Jb, cond_jump_flag, XX },
+ { "jae", Jb, cond_jump_flag, XX },
+ { "je", Jb, cond_jump_flag, XX },
+ { "jne", Jb, cond_jump_flag, XX },
+ { "jbe", Jb, cond_jump_flag, XX },
+ { "ja", Jb, cond_jump_flag, XX },
/* 78 */
- { "js", Jb, XX, XX },
- { "jns", Jb, XX, XX },
- { "jp", Jb, XX, XX },
- { "jnp", Jb, XX, XX },
- { "jl", Jb, XX, XX },
- { "jge", Jb, XX, XX },
- { "jle", Jb, XX, XX },
- { "jg", Jb, XX, XX },
+ { "js", Jb, cond_jump_flag, XX },
+ { "jns", Jb, cond_jump_flag, XX },
+ { "jp", Jb, cond_jump_flag, XX },
+ { "jnp", Jb, cond_jump_flag, XX },
+ { "jl", Jb, cond_jump_flag, XX },
+ { "jge", Jb, cond_jump_flag, XX },
+ { "jle", Jb, cond_jump_flag, XX },
+ { "jg", Jb, cond_jump_flag, XX },
/* 80 */
{ GRP1b },
{ GRP1S },
@@ -510,23 +614,24 @@ static const struct dis386 dis386_att[] = {
{ "movQ", Ev, Sw, XX },
{ "leaS", Gv, M, XX },
{ "movQ", Sw, Ev, XX },
- { "popQ", Ev, XX, XX },
+ { "popT", Ev, XX, XX },
/* 90 */
{ "nop", XX, XX, XX },
- { "xchgS", eCX, eAX, XX },
- { "xchgS", eDX, eAX, XX },
- { "xchgS", eBX, eAX, XX },
- { "xchgS", eSP, eAX, XX },
- { "xchgS", eBP, eAX, XX },
- { "xchgS", eSI, eAX, XX },
- { "xchgS", eDI, eAX, XX },
+ /* FIXME: NOP with REPz prefix is called PAUSE. */
+ { "xchgS", RMeCX, eAX, XX },
+ { "xchgS", RMeDX, eAX, XX },
+ { "xchgS", RMeBX, eAX, XX },
+ { "xchgS", RMeSP, eAX, XX },
+ { "xchgS", RMeBP, eAX, XX },
+ { "xchgS", RMeSI, eAX, XX },
+ { "xchgS", RMeDI, eAX, XX },
/* 98 */
{ "cWtR", XX, XX, XX },
- { "cRtd", XX, XX, XX },
- { "lcallP", Ap, XX, XX },
+ { "cRtO", XX, XX, XX },
+ { "lcallI", Ap, XX, XX },
{ "(bad)", XX, XX, XX }, /* fwait */
- { "pushfP", XX, XX, XX },
- { "popfP", XX, XX, XX },
+ { "pushfI", XX, XX, XX },
+ { "popfI", XX, XX, XX },
{ "sahf", XX, XX, XX },
{ "lahf", XX, XX, XX },
/* a0 */
@@ -548,35 +653,35 @@ static const struct dis386 dis386_att[] = {
{ "scasB", AL, Yb, XX },
{ "scasS", eAX, Yv, XX },
/* b0 */
- { "movB", AL, Ib, XX },
- { "movB", CL, Ib, XX },
- { "movB", DL, Ib, XX },
- { "movB", BL, Ib, XX },
- { "movB", AH, Ib, XX },
- { "movB", CH, Ib, XX },
- { "movB", DH, Ib, XX },
- { "movB", BH, Ib, XX },
+ { "movB", RMAL, Ib, XX },
+ { "movB", RMCL, Ib, XX },
+ { "movB", RMDL, Ib, XX },
+ { "movB", RMBL, Ib, XX },
+ { "movB", RMAH, Ib, XX },
+ { "movB", RMCH, Ib, XX },
+ { "movB", RMDH, Ib, XX },
+ { "movB", RMBH, Ib, XX },
/* b8 */
- { "movS", eAX, Iv, XX },
- { "movS", eCX, Iv, XX },
- { "movS", eDX, Iv, XX },
- { "movS", eBX, Iv, XX },
- { "movS", eSP, Iv, XX },
- { "movS", eBP, Iv, XX },
- { "movS", eSI, Iv, XX },
- { "movS", eDI, Iv, XX },
+ { "movS", RMeAX, Iv, XX },
+ { "movS", RMeCX, Iv, XX },
+ { "movS", RMeDX, Iv, XX },
+ { "movS", RMeBX, Iv, XX },
+ { "movS", RMeSP, Iv, XX },
+ { "movS", RMeBP, Iv, XX },
+ { "movS", RMeSI, Iv, XX },
+ { "movS", RMeDI, Iv, XX },
/* c0 */
{ GRP2b },
{ GRP2S },
- { "retP", Iw, XX, XX },
- { "retP", XX, XX, XX },
+ { "retI", Iw, XX, XX },
+ { "retI", XX, XX, XX },
{ "lesS", Gv, Mp, XX },
{ "ldsS", Gv, Mp, XX },
{ "movA", Eb, Ib, XX },
{ "movQ", Ev, Iv, XX },
/* c8 */
- { "enterP", Iw, Ib, XX },
- { "leaveP", XX, XX, XX },
+ { "enterI", Iw, Ib, XX },
+ { "leaveI", XX, XX, XX },
{ "lretP", Iw, XX, XX },
{ "lretP", XX, XX, XX },
{ "int3", XX, XX, XX },
@@ -602,18 +707,18 @@ static const struct dis386 dis386_att[] = {
{ FLOAT },
{ FLOAT },
/* e0 */
- { "loopne", Jb, XX, XX },
- { "loope", Jb, XX, XX },
- { "loop", Jb, XX, XX },
- { "jEcxz", Jb, XX, XX },
+ { "loopneF", Jb, loop_jcxz_flag, XX },
+ { "loopeF", Jb, loop_jcxz_flag, XX },
+ { "loopF", Jb, loop_jcxz_flag, XX },
+ { "jEcxz", Jb, loop_jcxz_flag, XX },
{ "inB", AL, Ib, XX },
{ "inS", eAX, Ib, XX },
{ "outB", Ib, AL, XX },
{ "outS", Ib, eAX, XX },
/* e8 */
- { "callP", Jv, XX, XX },
- { "jmpP", Jv, XX, XX },
- { "ljmpP", Ap, XX, XX },
+ { "callI", Jv, XX, XX },
+ { "jmpI", Jv, XX, XX },
+ { "ljmpI", Ap, XX, XX },
{ "jmp", Jb, XX, XX },
{ "inB", AL, indirDX, XX },
{ "inS", eAX, indirDX, XX },
@@ -713,41 +818,41 @@ static const struct dis386 dis386_intel[] = {
{ "(bad)", XX, XX, XX }, /* SEG DS prefix */
{ "aas", XX, XX, XX },
/* 40 */
- { "inc", eAX, XX, XX },
- { "inc", eCX, XX, XX },
- { "inc", eDX, XX, XX },
- { "inc", eBX, XX, XX },
- { "inc", eSP, XX, XX },
- { "inc", eBP, XX, XX },
- { "inc", eSI, XX, XX },
- { "inc", eDI, XX, XX },
+ { "inc", RMeAX, XX, XX },
+ { "inc", RMeCX, XX, XX },
+ { "inc", RMeDX, XX, XX },
+ { "inc", RMeBX, XX, XX },
+ { "inc", RMeSP, XX, XX },
+ { "inc", RMeBP, XX, XX },
+ { "inc", RMeSI, XX, XX },
+ { "inc", RMeDI, XX, XX },
/* 48 */
- { "dec", eAX, XX, XX },
- { "dec", eCX, XX, XX },
- { "dec", eDX, XX, XX },
- { "dec", eBX, XX, XX },
- { "dec", eSP, XX, XX },
- { "dec", eBP, XX, XX },
- { "dec", eSI, XX, XX },
- { "dec", eDI, XX, XX },
+ { "dec", RMeAX, XX, XX },
+ { "dec", RMeCX, XX, XX },
+ { "dec", RMeDX, XX, XX },
+ { "dec", RMeBX, XX, XX },
+ { "dec", RMeSP, XX, XX },
+ { "dec", RMeBP, XX, XX },
+ { "dec", RMeSI, XX, XX },
+ { "dec", RMeDI, XX, XX },
/* 50 */
- { "push", eAX, XX, XX },
- { "push", eCX, XX, XX },
- { "push", eDX, XX, XX },
- { "push", eBX, XX, XX },
- { "push", eSP, XX, XX },
- { "push", eBP, XX, XX },
- { "push", eSI, XX, XX },
- { "push", eDI, XX, XX },
+ { "push", RMeAX, XX, XX },
+ { "push", RMeCX, XX, XX },
+ { "push", RMeDX, XX, XX },
+ { "push", RMeBX, XX, XX },
+ { "push", RMeSP, XX, XX },
+ { "push", RMeBP, XX, XX },
+ { "push", RMeSI, XX, XX },
+ { "push", RMeDI, XX, XX },
/* 58 */
- { "pop", eAX, XX, XX },
- { "pop", eCX, XX, XX },
- { "pop", eDX, XX, XX },
- { "pop", eBX, XX, XX },
- { "pop", eSP, XX, XX },
- { "pop", eBP, XX, XX },
- { "pop", eSI, XX, XX },
- { "pop", eDI, XX, XX },
+ { "pop", RMeAX, XX, XX },
+ { "pop", RMeCX, XX, XX },
+ { "pop", RMeDX, XX, XX },
+ { "pop", RMeBX, XX, XX },
+ { "pop", RMeSP, XX, XX },
+ { "pop", RMeBP, XX, XX },
+ { "pop", RMeSI, XX, XX },
+ { "pop", RMeDI, XX, XX },
/* 60 */
{ "pusha", XX, XX, XX },
{ "popa", XX, XX, XX },
@@ -804,13 +909,14 @@ static const struct dis386 dis386_intel[] = {
{ "pop", Ev, XX, XX },
/* 90 */
{ "nop", XX, XX, XX },
- { "xchg", eCX, eAX, XX },
- { "xchg", eDX, eAX, XX },
- { "xchg", eBX, eAX, XX },
- { "xchg", eSP, eAX, XX },
- { "xchg", eBP, eAX, XX },
- { "xchg", eSI, eAX, XX },
- { "xchg", eDI, eAX, XX },
+ /* FIXME: NOP with REPz prefix is called PAUSE. */
+ { "xchg", RMeCX, eAX, XX },
+ { "xchg", RMeDX, eAX, XX },
+ { "xchg", RMeBX, eAX, XX },
+ { "xchg", RMeSP, eAX, XX },
+ { "xchg", RMeBP, eAX, XX },
+ { "xchg", RMeSI, eAX, XX },
+ { "xchg", RMeDI, eAX, XX },
/* 98 */
{ "cW", XX, XX, XX }, /* cwde and cbw */
{ "cR", XX, XX, XX }, /* cdq and cwd */
@@ -839,23 +945,23 @@ static const struct dis386 dis386_intel[] = {
{ "scas", AL, Yb, XX },
{ "scas", eAX, Yv, XX },
/* b0 */
- { "mov", AL, Ib, XX },
- { "mov", CL, Ib, XX },
- { "mov", DL, Ib, XX },
- { "mov", BL, Ib, XX },
- { "mov", AH, Ib, XX },
- { "mov", CH, Ib, XX },
- { "mov", DH, Ib, XX },
- { "mov", BH, Ib, XX },
+ { "mov", RMAL, Ib, XX },
+ { "mov", RMCL, Ib, XX },
+ { "mov", RMDL, Ib, XX },
+ { "mov", RMBL, Ib, XX },
+ { "mov", RMAH, Ib, XX },
+ { "mov", RMCH, Ib, XX },
+ { "mov", RMDH, Ib, XX },
+ { "mov", RMBH, Ib, XX },
/* b8 */
- { "mov", eAX, Iv, XX },
- { "mov", eCX, Iv, XX },
- { "mov", eDX, Iv, XX },
- { "mov", eBX, Iv, XX },
- { "mov", eSP, Iv, XX },
- { "mov", eBP, Iv, XX },
- { "mov", eSI, Iv, XX },
- { "mov", eDI, Iv, XX },
+ { "mov", RMeAX, Iv, XX },
+ { "mov", RMeCX, Iv, XX },
+ { "mov", RMeDX, Iv, XX },
+ { "mov", RMeBX, Iv, XX },
+ { "mov", RMeSP, Iv, XX },
+ { "mov", RMeBP, Iv, XX },
+ { "mov", RMeSI, Iv, XX },
+ { "mov", RMeDI, Iv, XX },
/* c0 */
{ GRP2b },
{ GRP2S },
@@ -930,6 +1036,592 @@ static const struct dis386 dis386_intel[] = {
{ GRP5 },
};
+/* 64bit mode is having some instruction set differences, so separate table is
+ needed. */
+static const struct dis386 disx86_64_att[] = {
+ /* 00 */
+ { "addB", Eb, Gb, XX },
+ { "addS", Ev, Gv, XX },
+ { "addB", Gb, Eb, XX },
+ { "addS", Gv, Ev, XX },
+ { "addB", AL, Ib, XX },
+ { "addS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 08 */
+ { "orB", Eb, Gb, XX },
+ { "orS", Ev, Gv, XX },
+ { "orB", Gb, Eb, XX },
+ { "orS", Gv, Ev, XX },
+ { "orB", AL, Ib, XX },
+ { "orS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* 0x0f extended opcode escape */
+ /* 10 */
+ { "adcB", Eb, Gb, XX },
+ { "adcS", Ev, Gv, XX },
+ { "adcB", Gb, Eb, XX },
+ { "adcS", Gv, Ev, XX },
+ { "adcB", AL, Ib, XX },
+ { "adcS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 18 */
+ { "sbbB", Eb, Gb, XX },
+ { "sbbS", Ev, Gv, XX },
+ { "sbbB", Gb, Eb, XX },
+ { "sbbS", Gv, Ev, XX },
+ { "sbbB", AL, Ib, XX },
+ { "sbbS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 20 */
+ { "andB", Eb, Gb, XX },
+ { "andS", Ev, Gv, XX },
+ { "andB", Gb, Eb, XX },
+ { "andS", Gv, Ev, XX },
+ { "andB", AL, Ib, XX },
+ { "andS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG ES prefix */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 28 */
+ { "subB", Eb, Gb, XX },
+ { "subS", Ev, Gv, XX },
+ { "subB", Gb, Eb, XX },
+ { "subS", Gv, Ev, XX },
+ { "subB", AL, Ib, XX },
+ { "subS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG CS prefix */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 30 */
+ { "xorB", Eb, Gb, XX },
+ { "xorS", Ev, Gv, XX },
+ { "xorB", Gb, Eb, XX },
+ { "xorS", Gv, Ev, XX },
+ { "xorB", AL, Ib, XX },
+ { "xorS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG SS prefix */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 38 */
+ { "cmpB", Eb, Gb, XX },
+ { "cmpS", Ev, Gv, XX },
+ { "cmpB", Gb, Eb, XX },
+ { "cmpS", Gv, Ev, XX },
+ { "cmpB", AL, Ib, XX },
+ { "cmpS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG DS prefix */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 40 */
+ { "(bad)", XX, XX, XX }, /* REX prefix area. */
+ { "(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 },
+ /* 48 */
+ { "(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 },
+ /* 50 */
+ { "pushI", RMrAX, XX, XX },
+ { "pushI", RMrCX, XX, XX },
+ { "pushI", RMrDX, XX, XX },
+ { "pushI", RMrBX, XX, XX },
+ { "pushI", RMrSP, XX, XX },
+ { "pushI", RMrBP, XX, XX },
+ { "pushI", RMrSI, XX, XX },
+ { "pushI", RMrDI, XX, XX },
+ /* 58 */
+ { "popI", RMrAX, XX, XX },
+ { "popI", RMrCX, XX, XX },
+ { "popI", RMrDX, XX, XX },
+ { "popI", RMrBX, XX, XX },
+ { "popI", RMrSP, XX, XX },
+ { "popI", RMrBP, XX, XX },
+ { "popI", RMrSI, XX, XX },
+ { "popI", RMrDI, XX, XX },
+ /* 60 */
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "movslR", Gv, Ed, XX },
+ { "(bad)", XX, XX, XX }, /* seg fs */
+ { "(bad)", XX, XX, XX }, /* seg gs */
+ { "(bad)", XX, XX, XX }, /* op size prefix */
+ { "(bad)", XX, XX, XX }, /* adr size prefix */
+ /* 68 */
+ { "pushI", Iq, XX, XX }, /* 386 book wrong */
+ { "imulS", Gv, Ev, Iv },
+ { "pushI", sIb, XX, XX }, /* push of byte really pushes 2 or 4 bytes */
+ { "imulS", Gv, Ev, sIb },
+ { "insb", Yb, indirDX, XX },
+ { "insR", Yv, indirDX, XX },
+ { "outsb", indirDX, Xb, XX },
+ { "outsR", indirDX, Xv, XX },
+ /* 70 */
+ { "jo", Jb, cond_jump_flag, XX },
+ { "jno", Jb, cond_jump_flag, XX },
+ { "jb", Jb, cond_jump_flag, XX },
+ { "jae", Jb, cond_jump_flag, XX },
+ { "je", Jb, cond_jump_flag, XX },
+ { "jne", Jb, cond_jump_flag, XX },
+ { "jbe", Jb, cond_jump_flag, XX },
+ { "ja", Jb, cond_jump_flag, XX },
+ /* 78 */
+ { "js", Jb, cond_jump_flag, XX },
+ { "jns", Jb, cond_jump_flag, XX },
+ { "jp", Jb, cond_jump_flag, XX },
+ { "jnp", Jb, cond_jump_flag, XX },
+ { "jl", Jb, cond_jump_flag, XX },
+ { "jge", Jb, cond_jump_flag, XX },
+ { "jle", Jb, cond_jump_flag, XX },
+ { "jg", Jb, cond_jump_flag, XX },
+ /* 80 */
+ { GRP1b },
+ { GRP1S },
+ { "(bad)", XX, XX, XX },
+ { GRP1Ss },
+ { "testB", Eb, Gb, XX },
+ { "testS", Ev, Gv, XX },
+ { "xchgB", Eb, Gb, XX },
+ { "xchgS", Ev, Gv, XX },
+ /* 88 */
+ { "movB", Eb, Gb, XX },
+ { "movS", Ev, Gv, XX },
+ { "movB", Gb, Eb, XX },
+ { "movS", Gv, Ev, XX },
+ { "movQ", Ev, Sw, XX },
+ { "leaS", Gv, M, XX },
+ { "movQ", Sw, Ev, XX },
+ { "popI", Ev, XX, XX },
+ /* 90 */
+ { "nop", XX, XX, XX },
+ /* FIXME: NOP with REPz prefix is called PAUSE. */
+ { "xchgS", RMeCX, eAX, XX },
+ { "xchgS", RMeDX, eAX, XX },
+ { "xchgS", RMeBX, eAX, XX },
+ { "xchgS", RMeSP, eAX, XX },
+ { "xchgS", RMeBP, eAX, XX },
+ { "xchgS", RMeSI, eAX, XX },
+ { "xchgS", RMeDI, eAX, XX },
+ /* 98 */
+ { "cWtR", XX, XX, XX },
+ { "cRtO", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "(bad)", XX, XX, XX }, /* fwait */
+ { "pushfI", XX, XX, XX },
+ { "popfI", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ /* a0 */
+ { "movB", AL, Ob64, XX },
+ { "movS", eAX, Ov64, XX },
+ { "movB", Ob64, AL, XX },
+ { "movS", Ov64, eAX, XX },
+ { "movsb", Yb, Xb, XX },
+ { "movsR", Yv, Xv, XX },
+ { "cmpsb", Xb, Yb, XX },
+ { "cmpsR", 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 },
+ { "scasB", AL, Yb, XX },
+ { "scasS", eAX, Yv, XX },
+ /* b0 */
+ { "movB", RMAL, Ib, XX },
+ { "movB", RMCL, Ib, XX },
+ { "movB", RMDL, Ib, XX },
+ { "movB", RMBL, Ib, XX },
+ { "movB", RMAH, Ib, XX },
+ { "movB", RMCH, Ib, XX },
+ { "movB", RMDH, Ib, XX },
+ { "movB", RMBH, Ib, XX },
+ /* b8 */
+ { "movS", RMeAX, Iv64, XX },
+ { "movS", RMeCX, Iv64, XX },
+ { "movS", RMeDX, Iv64, XX },
+ { "movS", RMeBX, Iv64, XX },
+ { "movS", RMeSP, Iv64, XX },
+ { "movS", RMeBP, Iv64, XX },
+ { "movS", RMeSI, Iv64, XX },
+ { "movS", RMeDI, Iv64, XX },
+ /* c0 */
+ { GRP2b },
+ { GRP2S },
+ { "retI", Iw, XX, XX },
+ { "retI", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "ldsS", Gv, Mp, XX },
+ { "movA", Eb, Ib, XX },
+ { "movQ", Ev, Iv, XX },
+ /* c8 */
+ { "enterI", Iw, Ib, XX },
+ { "leaveI", XX, XX, XX },
+ { "lretP", Iw, XX, XX },
+ { "lretP", XX, XX, XX },
+ { "int3", XX, XX, XX },
+ { "int", Ib, XX, XX },
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "iretP", XX, XX, XX },
+ /* d0 */
+ { GRP2b_one },
+ { GRP2S_one },
+ { GRP2b_cl },
+ { GRP2S_cl },
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "xlat", DSBX, XX, XX },
+ /* d8 */
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ /* e0 */
+ { "loopneF", Jb, loop_jcxz_flag, XX },
+ { "loopeF", Jb, loop_jcxz_flag, XX },
+ { "loopF", Jb, loop_jcxz_flag, XX },
+ { "jEcxz", Jb, loop_jcxz_flag, XX },
+ { "inB", AL, Ib, XX },
+ { "inS", eAX, Ib, XX },
+ { "outB", Ib, AL, XX },
+ { "outS", Ib, eAX, XX },
+ /* e8 */
+ { "callI", Jv, XX, XX },
+ { "jmpI", Jv, XX, XX },
+ { "(bad)", XX, XX, XX }, /* reserved. */
+ { "jmp", Jb, XX, XX },
+ { "inB", AL, indirDX, XX },
+ { "inS", eAX, indirDX, XX },
+ { "outB", indirDX, AL, XX },
+ { "outS", indirDX, eAX, XX },
+ /* f0 */
+ { "(bad)", XX, XX, XX }, /* lock prefix */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* repne */
+ { "(bad)", XX, XX, XX }, /* repz */
+ { "hlt", XX, XX, XX },
+ { "cmc", XX, XX, XX },
+ { GRP3b },
+ { GRP3S },
+ /* f8 */
+ { "clc", XX, XX, XX },
+ { "stc", XX, XX, XX },
+ { "cli", XX, XX, XX },
+ { "sti", XX, XX, XX },
+ { "cld", XX, XX, XX },
+ { "std", XX, XX, XX },
+ { GRP4 },
+ { GRP5 },
+};
+
+static const struct dis386 dis386_64_intel[] = {
+ /* 00 */
+ { "add", Eb, Gb, XX },
+ { "add", Ev, Gv, XX },
+ { "add", Gb, Eb, XX },
+ { "add", Gv, Ev, XX },
+ { "add", AL, Ib, XX },
+ { "add", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 08 */
+ { "or", Eb, Gb, XX },
+ { "or", Ev, Gv, XX },
+ { "or", Gb, Eb, XX },
+ { "or", Gv, Ev, XX },
+ { "or", AL, Ib, XX },
+ { "or", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* 0x0f extended opcode escape */
+ /* 10 */
+ { "adc", Eb, Gb, XX },
+ { "adc", Ev, Gv, XX },
+ { "adc", Gb, Eb, XX },
+ { "adc", Gv, Ev, XX },
+ { "adc", AL, Ib, XX },
+ { "adc", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 18 */
+ { "sbb", Eb, Gb, XX },
+ { "sbb", Ev, Gv, XX },
+ { "sbb", Gb, Eb, XX },
+ { "sbb", Gv, Ev, XX },
+ { "sbb", AL, Ib, XX },
+ { "sbb", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 20 */
+ { "and", Eb, Gb, XX },
+ { "and", Ev, Gv, XX },
+ { "and", Gb, Eb, XX },
+ { "and", Gv, Ev, XX },
+ { "and", AL, Ib, XX },
+ { "and", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG ES prefix */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 28 */
+ { "sub", Eb, Gb, XX },
+ { "sub", Ev, Gv, XX },
+ { "sub", Gb, Eb, XX },
+ { "sub", Gv, Ev, XX },
+ { "sub", AL, Ib, XX },
+ { "sub", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG CS prefix */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 30 */
+ { "xor", Eb, Gb, XX },
+ { "xor", Ev, Gv, XX },
+ { "xor", Gb, Eb, XX },
+ { "xor", Gv, Ev, XX },
+ { "xor", AL, Ib, XX },
+ { "xor", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG SS prefix */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 38 */
+ { "cmp", Eb, Gb, XX },
+ { "cmp", Ev, Gv, XX },
+ { "cmp", Gb, Eb, XX },
+ { "cmp", Gv, Ev, XX },
+ { "cmp", AL, Ib, XX },
+ { "cmp", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG DS prefix */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* 40 */
+ { "(bad)", XX, XX, XX }, /* REX prefix area. */
+ { "(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 },
+ /* 48 */
+ { "(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 },
+ /* 50 */
+ { "push", RMrAX, XX, XX },
+ { "push", RMrCX, XX, XX },
+ { "push", RMrDX, XX, XX },
+ { "push", RMrBX, XX, XX },
+ { "push", RMrSP, XX, XX },
+ { "push", RMrBP, XX, XX },
+ { "push", RMrSI, XX, XX },
+ { "push", RMrDI, XX, XX },
+ /* 58 */
+ { "pop", RMrAX, XX, XX },
+ { "pop", RMrCX, XX, XX },
+ { "pop", RMrDX, XX, XX },
+ { "pop", RMrBX, XX, XX },
+ { "pop", RMrSP, XX, XX },
+ { "pop", RMrBP, XX, XX },
+ { "pop", RMrSI, XX, XX },
+ { "pop", RMrDI, XX, XX },
+ /* 60 */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "movsx", Gv, Ed, XX },
+ { "(bad)", XX, XX, XX }, /* seg fs */
+ { "(bad)", XX, XX, XX }, /* seg gs */
+ { "(bad)", XX, XX, XX }, /* op size prefix */
+ { "(bad)", XX, XX, XX }, /* adr size prefix */
+ /* 68 */
+ { "push", Iq, XX, XX }, /* 386 book wrong */
+ { "imul", Gv, Ev, Iv },
+ { "push", sIb, XX, XX }, /* push of byte really pushes 2 or 4 bytes */
+ { "imul", Gv, Ev, sIb },
+ { "ins", Yb, indirDX, XX },
+ { "ins", Yv, indirDX, XX },
+ { "outs", indirDX, Xb, XX },
+ { "outs", indirDX, Xv, XX },
+ /* 70 */
+ { "jo", Jb, XX, XX },
+ { "jno", Jb, XX, XX },
+ { "jb", Jb, XX, XX },
+ { "jae", Jb, XX, XX },
+ { "je", Jb, XX, XX },
+ { "jne", Jb, XX, XX },
+ { "jbe", Jb, XX, XX },
+ { "ja", Jb, XX, XX },
+ /* 78 */
+ { "js", Jb, XX, XX },
+ { "jns", Jb, XX, XX },
+ { "jp", Jb, XX, XX },
+ { "jnp", Jb, XX, XX },
+ { "jl", Jb, XX, XX },
+ { "jge", Jb, XX, XX },
+ { "jle", Jb, XX, XX },
+ { "jg", Jb, XX, XX },
+ /* 80 */
+ { GRP1b },
+ { GRP1S },
+ { "(bad)", XX, XX, XX },
+ { GRP1Ss },
+ { "test", Eb, Gb, XX },
+ { "test", Ev, Gv, XX },
+ { "xchg", Eb, Gb, XX },
+ { "xchg", Ev, Gv, XX },
+ /* 88 */
+ { "mov", Eb, Gb, XX },
+ { "mov", Ev, Gv, XX },
+ { "mov", Gb, Eb, XX },
+ { "mov", Gv, Ev, XX },
+ { "mov", Ev, Sw, XX },
+ { "lea", Gv, M, XX },
+ { "mov", Sw, Ev, XX },
+ { "pop", Ev, XX, XX },
+ /* 90 */
+ { "nop", XX, XX, XX },
+ /* FIXME: NOP with REPz prefix is called PAUSE. */
+ { "xchg", RMeCX, eAX, XX },
+ { "xchg", RMeDX, eAX, XX },
+ { "xchg", RMeBX, eAX, XX },
+ { "xchg", RMeSP, eAX, XX },
+ { "xchg", RMeBP, eAX, XX },
+ { "xchg", RMeSI, eAX, XX },
+ { "xchg", RMeDI, eAX, XX },
+ /* 98 */
+ { "cW", XX, XX, XX }, /* cwde and cbw */
+ { "cR", XX, XX, XX }, /* cdq and cwd */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* fwait */
+ { "pushf", XX, XX, XX },
+ { "popf", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ /* a0 */
+ { "mov", AL, Ob, XX },
+ { "mov", eAX, Ov, XX },
+ { "mov", Ob, AL, XX },
+ { "mov", Ov, eAX, XX },
+ { "movs", Yb, Xb, XX },
+ { "movs", Yv, Xv, XX },
+ { "cmps", Xb, Yb, XX },
+ { "cmps", Xv, Yv, XX },
+ /* a8 */
+ { "test", AL, Ib, XX },
+ { "test", eAX, Iv, XX },
+ { "stos", Yb, AL, XX },
+ { "stos", Yv, eAX, XX },
+ { "lods", AL, Xb, XX },
+ { "lods", eAX, Xv, XX },
+ { "scas", AL, Yb, XX },
+ { "scas", eAX, Yv, XX },
+ /* b0 */
+ { "mov", RMAL, Ib, XX },
+ { "mov", RMCL, Ib, XX },
+ { "mov", RMDL, Ib, XX },
+ { "mov", RMBL, Ib, XX },
+ { "mov", RMAH, Ib, XX },
+ { "mov", RMCH, Ib, XX },
+ { "mov", RMDH, Ib, XX },
+ { "mov", RMBH, Ib, XX },
+ /* b8 */
+ { "mov", RMeAX, Iv, XX },
+ { "mov", RMeCX, Iv, XX },
+ { "mov", RMeDX, Iv, XX },
+ { "mov", RMeBX, Iv, XX },
+ { "mov", RMeSP, Iv, XX },
+ { "mov", RMeBP, Iv, XX },
+ { "mov", RMeSI, Iv, XX },
+ { "mov", RMeDI, Iv, XX },
+ /* c0 */
+ { GRP2b },
+ { GRP2S },
+ { "ret", Iw, XX, XX },
+ { "ret", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "lds", Gv, Mp, XX },
+ { "mov", Eb, Ib, XX },
+ { "mov", Ev, Iv, XX },
+ /* c8 */
+ { "enter", Iw, Ib, XX },
+ { "leave", XX, XX, XX },
+ { "lret", Iw, XX, XX },
+ { "lret", XX, XX, XX },
+ { "int3", XX, XX, XX },
+ { "int", Ib, XX, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "iret", XX, XX, XX },
+ /* d0 */
+ { GRP2b_one },
+ { GRP2S_one },
+ { GRP2b_cl },
+ { GRP2S_cl },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "xlat", DSBX, XX, XX },
+ /* d8 */
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ /* e0 */
+ { "loopne", Jb, XX, XX },
+ { "loope", Jb, XX, XX },
+ { "loop", Jb, XX, XX },
+ { "jEcxz", Jb, XX, XX },
+ { "in", AL, Ib, XX },
+ { "in", eAX, Ib, XX },
+ { "out", Ib, AL, XX },
+ { "out", Ib, eAX, XX },
+ /* e8 */
+ { "call", Jv, XX, XX },
+ { "jmp", Jv, XX, XX },
+ { "(bad)", XX, XX, XX }, /* Reserved. */
+ { "jmp", Jb, XX, XX },
+ { "in", AL, indirDX, XX },
+ { "in", eAX, indirDX, XX },
+ { "out", indirDX, AL, XX },
+ { "out", indirDX, eAX, XX },
+ /* f0 */
+ { "(bad)", XX, XX, XX }, /* lock prefix */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* repne */
+ { "(bad)", XX, XX, XX }, /* repz */
+ { "hlt", XX, XX, XX },
+ { "cmc", XX, XX, XX },
+ { GRP3b },
+ { GRP3S },
+ /* f8 */
+ { "clc", XX, XX, XX },
+ { "stc", XX, XX, XX },
+ { "cli", XX, XX, XX },
+ { "sti", XX, XX, XX },
+ { "cld", XX, XX, XX },
+ { "std", XX, XX, XX },
+ { GRP4 },
+ { GRP5 },
+};
+
static const struct dis386 dis386_twobyte_att[] = {
/* 00 */
{ GRP6 },
@@ -937,9 +1629,9 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "larS", Gv, Ew, XX },
{ "lslS", Gv, Ew, XX },
{ "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "syscall", XX, XX, XX },
{ "clts", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "sysretP", XX, XX, XX },
/* 08 */
{ "invd", XX, XX, XX },
{ "wbinvd", XX, XX, XX },
@@ -952,12 +1644,12 @@ static const struct dis386 dis386_twobyte_att[] = {
/* 10 */
{ PREGRP8 },
{ PREGRP9 },
- { "movlps", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
- { "movlps", EX, XM, SIMD_Fixup, 'h' },
- { "unpcklps", XM, EX, XX },
- { "unpckhps", XM, EX, XX },
- { "movhps", XM, EX, SIMD_Fixup, 'l' },
- { "movhps", EX, XM, SIMD_Fixup, 'l' },
+ { "movlpX", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
+ { "movlpX", EX, XM, SIMD_Fixup, 'h' },
+ { "unpcklpX", XM, EX, XX },
+ { "unpckhpX", XM, EX, XX },
+ { "movhpX", XM, EX, SIMD_Fixup, 'l' },
+ { "movhpX", EX, XM, SIMD_Fixup, 'l' },
/* 18 */
{ GRP14 },
{ "(bad)", XX, XX, XX },
@@ -969,23 +1661,23 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "(bad)", XX, XX, XX },
/* 20 */
/* these are all backward in appendix A of the intel book */
- { "movL", Rd, Cd, XX },
- { "movL", Rd, Dd, XX },
- { "movL", Cd, Rd, XX },
- { "movL", Dd, Rd, XX },
+ { "movL", Rm, Cm, XX },
+ { "movL", Rm, Dm, XX },
+ { "movL", Cm, Rm, XX },
+ { "movL", Dm, Rm, XX },
{ "movL", Rd, Td, XX },
{ "(bad)", XX, XX, XX },
{ "movL", Td, Rd, XX },
{ "(bad)", XX, XX, XX },
/* 28 */
- { "movaps", XM, EX, XX },
- { "movaps", EX, XM, XX },
+ { "movapX", XM, EX, XX },
+ { "movapX", EX, XM, XX },
{ PREGRP2 },
- { "movntps", Ev, XM, XX },
+ { "movntpX", Ev, XM, XX },
{ PREGRP4 },
{ PREGRP3 },
- { "ucomiss", XM, EX, XX },
- { "comiss", XM, EX, XX },
+ { "ucomisX", XM,EX, XX },
+ { "comisX", XM,EX, XX },
/* 30 */
{ "wrmsr", XX, XX, XX },
{ "rdtsc", XX, XX, XX },
@@ -1023,19 +1715,19 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "cmovle", Gv, Ev, XX },
{ "cmovg", Gv, Ev, XX },
/* 50 */
- { "movmskps", Gv, EX, XX },
+ { "movmskpX", Gd, XS, XX },
{ PREGRP13 },
{ PREGRP12 },
{ PREGRP11 },
- { "andps", XM, EX, XX },
- { "andnps", XM, EX, XX },
- { "orps", XM, EX, XX },
- { "xorps", XM, EX, XX },
+ { "andpX", XM, EX, XX },
+ { "andnpX", XM, EX, XX },
+ { "orpX", XM, EX, XX },
+ { "xorpX", XM, EX, XX },
/* 58 */
{ PREGRP0 },
{ PREGRP10 },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { PREGRP17 },
+ { PREGRP16 },
{ PREGRP14 },
{ PREGRP7 },
{ PREGRP5 },
@@ -1054,12 +1746,12 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "punpckhwd", MX, EM, XX },
{ "punpckhdq", MX, EM, XX },
{ "packssdw", MX, EM, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { PREGRP26 },
+ { PREGRP24 },
{ "movd", MX, Ed, XX },
- { "movq", MX, EM, XX },
+ { PREGRP19 },
/* 70 */
- { "pshufw", MX, EM, Ib },
+ { PREGRP22 },
{ GRP10 },
{ GRP11 },
{ GRP12 },
@@ -1074,26 +1766,26 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
- { "movd", Ed, MX, XX },
- { "movq", EM, MX, XX },
+ { PREGRP23 },
+ { PREGRP20 },
/* 80 */
- { "jo", Jv, XX, XX },
- { "jno", Jv, XX, XX },
- { "jb", Jv, XX, XX },
- { "jae", Jv, XX, XX },
- { "je", Jv, XX, XX },
- { "jne", Jv, XX, XX },
- { "jbe", Jv, XX, XX },
- { "ja", Jv, XX, XX },
+ { "jo", Jv, cond_jump_flag, XX },
+ { "jno", Jv, cond_jump_flag, XX },
+ { "jb", Jv, cond_jump_flag, XX },
+ { "jae", Jv, cond_jump_flag, XX },
+ { "je", Jv, cond_jump_flag, XX },
+ { "jne", Jv, cond_jump_flag, XX },
+ { "jbe", Jv, cond_jump_flag, XX },
+ { "ja", Jv, cond_jump_flag, XX },
/* 88 */
- { "js", Jv, XX, XX },
- { "jns", Jv, XX, XX },
- { "jp", Jv, XX, XX },
- { "jnp", Jv, XX, XX },
- { "jl", Jv, XX, XX },
- { "jge", Jv, XX, XX },
- { "jle", Jv, XX, XX },
- { "jg", Jv, XX, XX },
+ { "js", Jv, cond_jump_flag, XX },
+ { "jns", Jv, cond_jump_flag, XX },
+ { "jp", Jv, cond_jump_flag, XX },
+ { "jnp", Jv, cond_jump_flag, XX },
+ { "jl", Jv, cond_jump_flag, XX },
+ { "jge", Jv, cond_jump_flag, XX },
+ { "jle", Jv, cond_jump_flag, XX },
+ { "jg", Jv, cond_jump_flag, XX },
/* 90 */
{ "seto", Eb, XX, XX },
{ "setno", Eb, XX, XX },
@@ -1113,8 +1805,8 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "setle", Eb, XX, XX },
{ "setg", Eb, XX, XX },
/* a0 */
- { "pushP", fs, XX, XX },
- { "popP", fs, XX, XX },
+ { "pushI", fs, XX, XX },
+ { "popI", fs, XX, XX },
{ "cpuid", XX, XX, XX },
{ "btS", Ev, Gv, XX },
{ "shldS", Ev, Gv, Ib },
@@ -1122,8 +1814,8 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
/* a8 */
- { "pushP", gs, XX, XX },
- { "popP", gs, XX, XX },
+ { "pushI", gs, XX, XX },
+ { "popI", gs, XX, XX },
{ "rsm", XX, XX, XX },
{ "btsS", Ev, Gv, XX },
{ "shrdS", Ev, Gv, Ib },
@@ -1152,29 +1844,29 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "xaddB", Eb, Gb, XX },
{ "xaddS", Ev, Gv, XX },
{ PREGRP1 },
- { "(bad)", XX, XX, XX },
- { "pinsrw", MX, Ev, Ib },
- { "pextrw", Ev, MX, Ib },
- { "shufps", XM, EX, Ib },
+ { "movntiS", Ev, Gv, XX },
+ { "pinsrw", MX, Ed, Ib },
+ { "pextrw", Gd, MS, Ib },
+ { "shufpX", XM, EX, Ib },
{ GRP9 },
/* c8 */
- { "bswap", eAX, XX, XX }, /* bswap doesn't support 16 bit regs */
- { "bswap", eCX, XX, XX },
- { "bswap", eDX, XX, XX },
- { "bswap", eBX, XX, XX },
- { "bswap", eSP, XX, XX },
- { "bswap", eBP, XX, XX },
- { "bswap", eSI, XX, XX },
- { "bswap", eDI, XX, XX },
+ { "bswap", RMeAX, XX, XX }, /* bswap doesn't support 16 bit regs */
+ { "bswap", RMeCX, XX, XX },
+ { "bswap", RMeDX, XX, XX },
+ { "bswap", RMeBX, XX, XX },
+ { "bswap", RMeSP, XX, XX },
+ { "bswap", RMeBP, XX, XX },
+ { "bswap", RMeSI, XX, XX },
+ { "bswap", RMeDI, XX, XX },
/* d0 */
{ "(bad)", XX, XX, XX },
{ "psrlw", MX, EM, XX },
{ "psrld", MX, EM, XX },
{ "psrlq", MX, EM, XX },
- { "(bad)", XX, XX, XX },
+ { "paddq", MX, EM, XX },
{ "pmullw", MX, EM, XX },
- { "(bad)", XX, XX, XX },
- { "pmovmskb", Ev, MX, XX },
+ { PREGRP21 },
+ { "pmovmskb", Gd, MS, XX },
/* d8 */
{ "psubusb", MX, EM, XX },
{ "psubusw", MX, EM, XX },
@@ -1191,8 +1883,8 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "pavgw", MX, EM, XX },
{ "pmulhuw", MX, EM, XX },
{ "pmulhw", MX, EM, XX },
- { "(bad)", XX, XX, XX },
- { "movntq", Ev, MX, XX },
+ { PREGRP15 },
+ { PREGRP25 },
/* e8 */
{ "psubsb", MX, EM, XX },
{ "psubsw", MX, EM, XX },
@@ -1207,15 +1899,15 @@ static const struct dis386 dis386_twobyte_att[] = {
{ "psllw", MX, EM, XX },
{ "pslld", MX, EM, XX },
{ "psllq", MX, EM, XX },
- { "(bad)", XX, XX, XX },
+ { "pmuludq", MX, EM, XX },
{ "pmaddwd", MX, EM, XX },
{ "psadbw", MX, EM, XX },
- { "maskmovq", MX, EM, XX },
+ { PREGRP18 },
/* f8 */
{ "psubb", MX, EM, XX },
{ "psubw", MX, EM, XX },
{ "psubd", MX, EM, XX },
- { "(bad)", XX, XX, XX },
+ { "psubq", MX, EM, XX },
{ "paddb", MX, EM, XX },
{ "paddw", MX, EM, XX },
{ "paddd", MX, EM, XX },
@@ -1229,9 +1921,9 @@ static const struct dis386 dis386_twobyte_intel[] = {
{ "lar", Gv, Ew, XX },
{ "lsl", Gv, Ew, XX },
{ "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "syscall", XX, XX, XX },
{ "clts", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "sysretP", XX, XX, XX },
/* 08 */
{ "invd", XX, XX, XX },
{ "wbinvd", XX, XX, XX },
@@ -1244,12 +1936,12 @@ static const struct dis386 dis386_twobyte_intel[] = {
/* 10 */
{ PREGRP8 },
{ PREGRP9 },
- { "movlps", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
- { "movlps", EX, XM, SIMD_Fixup, 'h' },
- { "unpcklps", XM, EX, XX },
- { "unpckhps", XM, EX, XX },
- { "movhps", XM, EX, SIMD_Fixup, 'l' },
- { "movhps", EX, XM, SIMD_Fixup, 'l' },
+ { "movlpX", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
+ { "movlpX", EX, XM, SIMD_Fixup, 'h' },
+ { "unpcklpX", XM, EX, XX },
+ { "unpckhpX", XM, EX, XX },
+ { "movhpX", XM, EX, SIMD_Fixup, 'l' },
+ { "movhpX", EX, XM, SIMD_Fixup, 'l' },
/* 18 */
{ GRP14 },
{ "(bad)", XX, XX, XX },
@@ -1261,23 +1953,23 @@ static const struct dis386 dis386_twobyte_intel[] = {
{ "(bad)", XX, XX, XX },
/* 20 */
/* these are all backward in appendix A of the intel book */
- { "mov", Rd, Cd, XX },
- { "mov", Rd, Dd, XX },
- { "mov", Cd, Rd, XX },
- { "mov", Dd, Rd, XX },
+ { "mov", Rm, Cm, XX },
+ { "mov", Rm, Dm, XX },
+ { "mov", Cm, Rm, XX },
+ { "mov", Dm, Rm, XX },
{ "mov", Rd, Td, XX },
{ "(bad)", XX, XX, XX },
{ "mov", Td, Rd, XX },
{ "(bad)", XX, XX, XX },
/* 28 */
- { "movaps", XM, EX, XX },
- { "movaps", EX, XM, XX },
+ { "movapX", XM, EX, XX },
+ { "movapX", EX, XM, XX },
{ PREGRP2 },
- { "movntps", Ev, XM, XX },
+ { "movntpX", Ev, XM, XX },
{ PREGRP4 },
{ PREGRP3 },
- { "ucomiss", XM, EX, XX },
- { "comiss", XM, EX, XX },
+ { "ucomisX", XM,EX, XX },
+ { "comisX", XM,EX, XX },
/* 30 */
{ "wrmsr", XX, XX, XX },
{ "rdtsc", XX, XX, XX },
@@ -1315,19 +2007,19 @@ static const struct dis386 dis386_twobyte_intel[] = {
{ "cmovle", Gv, Ev, XX },
{ "cmovg", Gv, Ev, XX },
/* 50 */
- { "movmskps", Gv, EX, XX },
+ { "movmskpX", Gd, XS, XX },
{ PREGRP13 },
{ PREGRP12 },
{ PREGRP11 },
- { "andps", XM, EX, XX },
- { "andnps", XM, EX, XX },
- { "orps", XM, EX, XX },
- { "xorps", XM, EX, XX },
+ { "andpX", XM, EX, XX },
+ { "andnpX", XM, EX, XX },
+ { "orpX", XM, EX, XX },
+ { "xorpX", XM, EX, XX },
/* 58 */
{ PREGRP0 },
{ PREGRP10 },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { PREGRP17 },
+ { PREGRP16 },
{ PREGRP14 },
{ PREGRP7 },
{ PREGRP5 },
@@ -1346,12 +2038,12 @@ static const struct dis386 dis386_twobyte_intel[] = {
{ "punpckhwd", MX, EM, XX },
{ "punpckhdq", MX, EM, XX },
{ "packssdw", MX, EM, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { PREGRP26 },
+ { PREGRP24 },
{ "movd", MX, Ed, XX },
- { "movq", MX, EM, XX },
+ { PREGRP19 },
/* 70 */
- { "pshufw", MX, EM, Ib },
+ { PREGRP22 },
{ GRP10 },
{ GRP11 },
{ GRP12 },
@@ -1366,8 +2058,8 @@ static const struct dis386 dis386_twobyte_intel[] = {
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
- { "movd", Ed, MX, XX },
- { "movq", EM, MX, XX },
+ { PREGRP23 },
+ { PREGRP20 },
/* 80 */
{ "jo", Jv, XX, XX },
{ "jno", Jv, XX, XX },
@@ -1444,29 +2136,29 @@ static const struct dis386 dis386_twobyte_intel[] = {
{ "xadd", Eb, Gb, XX },
{ "xadd", Ev, Gv, XX },
{ PREGRP1 },
- { "(bad)", XX, XX, XX },
- { "pinsrw", MX, Ev, Ib },
- { "pextrw", Ev, MX, Ib },
- { "shufps", XM, EX, Ib },
+ { "movnti", Ev, Gv, XX },
+ { "pinsrw", MX, Ed, Ib },
+ { "pextrw", Gd, MS, Ib },
+ { "shufpX", XM, EX, Ib },
{ GRP9 },
/* c8 */
- { "bswap", eAX, XX, XX }, /* bswap doesn't support 16 bit regs */
- { "bswap", eCX, XX, XX },
- { "bswap", eDX, XX, XX },
- { "bswap", eBX, XX, XX },
- { "bswap", eSP, XX, XX },
- { "bswap", eBP, XX, XX },
- { "bswap", eSI, XX, XX },
- { "bswap", eDI, XX, XX },
+ { "bswap", RMeAX, XX, XX }, /* bswap doesn't support 16 bit regs */
+ { "bswap", RMeCX, XX, XX },
+ { "bswap", RMeDX, XX, XX },
+ { "bswap", RMeBX, XX, XX },
+ { "bswap", RMeSP, XX, XX },
+ { "bswap", RMeBP, XX, XX },
+ { "bswap", RMeSI, XX, XX },
+ { "bswap", RMeDI, XX, XX },
/* d0 */
{ "(bad)", XX, XX, XX },
{ "psrlw", MX, EM, XX },
{ "psrld", MX, EM, XX },
{ "psrlq", MX, EM, XX },
- { "(bad)", XX, XX, XX },
+ { "paddq", MX, EM, XX },
{ "pmullw", MX, EM, XX },
- { "(bad)", XX, XX, XX },
- { "pmovmskb", Ev, MX, XX },
+ { PREGRP21 },
+ { "pmovmskb", Gd, MS, XX },
/* d8 */
{ "psubusb", MX, EM, XX },
{ "psubusw", MX, EM, XX },
@@ -1483,8 +2175,8 @@ static const struct dis386 dis386_twobyte_intel[] = {
{ "pavgw", MX, EM, XX },
{ "pmulhuw", MX, EM, XX },
{ "pmulhw", MX, EM, XX },
- { "(bad)", XX, XX, XX },
- { "movntq", Ev, MX, XX },
+ { PREGRP15 },
+ { PREGRP25 },
/* e8 */
{ "psubsb", MX, EM, XX },
{ "psubsw", MX, EM, XX },
@@ -1499,15 +2191,15 @@ static const struct dis386 dis386_twobyte_intel[] = {
{ "psllw", MX, EM, XX },
{ "pslld", MX, EM, XX },
{ "psllq", MX, EM, XX },
- { "(bad)", XX, XX, XX },
+ { "pmuludq", MX, EM, XX },
{ "pmaddwd", MX, EM, XX },
{ "psadbw", MX, EM, XX },
- { "maskmovq", MX, EM, XX },
+ { PREGRP18 },
/* f8 */
{ "psubb", MX, EM, XX },
{ "psubw", MX, EM, XX },
{ "psubd", MX, EM, XX },
- { "(bad)", XX, XX, XX },
+ { "psubq", MX, EM, XX },
{ "paddb", MX, EM, XX },
{ "paddw", MX, EM, XX },
{ "paddd", MX, EM, XX },
@@ -1542,25 +2234,25 @@ 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,1,1,1,1,1,1,1,1,1,1,1, /* 2f */
+ /* 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 */
/* 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,0,0,1,1,1,1, /* 5f */
- /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1, /* 6f */
+ /* 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,0,0,1,1, /* 7f */
/* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
/* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
- /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
+ /* a0 */ 0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1, /* af */
/* b0 */ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, /* bf */
/* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1, /* df */
- /* e0 */ 1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1, /* ef */
- /* f0 */ 0,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0 /* ff */
+ /* d0 */ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
+ /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
+ /* f0 */ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
/* ------------------------------- */
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
-static const unsigned char twobyte_uses_f3_prefix[256] = {
+static const unsigned char twobyte_uses_SSE_prefix[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
/* ------------------------------- */
/* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
@@ -1568,17 +2260,17 @@ static const unsigned char twobyte_uses_f3_prefix[256] = {
/* 20 */ 0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0, /* 2f */
/* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
/* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,1,1,1,0,0,0,0,1,1,0,0,1,1,1,1, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
- /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
+ /* 50 */ 0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1, /* 6f */
+ /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, /* 7f */
/* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
/* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
/* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
/* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
/* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* ff */
+ /* d0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 /* ff */
/* ------------------------------- */
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
@@ -1593,17 +2285,33 @@ static disassemble_info *the_info;
static int mod;
static int rm;
static int reg;
+static unsigned char need_modrm;
static void oappend PARAMS ((const char *s));
-static const char *names32[]={
+/* If we are accessing mod/rm/reg without need_modrm set, then the
+ values are stale. Hitting this abort likely indicates that you
+ need to update onebyte_has_modrm or twobyte_has_modrm. */
+#define MODRM_CHECK if (!need_modrm) abort ()
+
+static const char *names64[] = {
+ "%rax","%rcx","%rdx","%rbx", "%rsp","%rbp","%rsi","%rdi",
+ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
+};
+static const char *names32[] = {
"%eax","%ecx","%edx","%ebx", "%esp","%ebp","%esi","%edi",
+ "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
};
static const char *names16[] = {
"%ax","%cx","%dx","%bx","%sp","%bp","%si","%di",
+ "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
};
static const char *names8[] = {
"%al","%cl","%dl","%bl","%ah","%ch","%dh","%bh",
};
+static const char *names8rex[] = {
+ "%al","%cl","%dl","%bl","%spl", "%bpl", "%sil", "%dil",
+ "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
+};
static const char *names_seg[] = {
"%es","%cs","%ss","%ds","%fs","%gs","%?","%?",
};
@@ -1748,11 +2456,11 @@ static const struct dis386 grps[][8] = {
{
{ "incQ", Ev, XX, XX },
{ "decQ", Ev, XX, XX },
- { "callP", indirEv, XX, XX },
- { "lcallP", indirEv, XX, XX },
- { "jmpP", indirEv, XX, XX },
- { "ljmpP", indirEv, XX, XX },
- { "pushQ", Ev, XX, XX },
+ { "callI", indirEv, XX, XX },
+ { "lcallI", indirEv, XX, XX },
+ { "jmpI", indirEv, XX, XX },
+ { "ljmpI", indirEv, XX, XX },
+ { "pushT", Ev, XX, XX },
{ "(bad)", XX, XX, XX },
},
/* GRP6 */
@@ -1826,11 +2534,11 @@ static const struct dis386 grps[][8] = {
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
{ "psrlq", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
+ { "psrldq", MS, Ib, XX },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
{ "psllq", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
+ { "pslldq", MS, Ib, XX },
},
/* GRP13 */
{
@@ -1839,9 +2547,10 @@ static const struct dis386 grps[][8] = {
{ "ldmxcsr", Ev, XX, XX },
{ "stmxcsr", Ev, XX, XX },
{ "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "lfence", None, XX, XX },
+ { "mfence", None, XX, XX },
{ "sfence", None, XX, XX },
+ /* FIXME: the sfence with memory operand is clflush! */
},
/* GRP14 */
{
@@ -1868,82 +2577,196 @@ static const struct dis386 grps[][8] = {
};
-static const struct dis386 prefix_user_table[][2] = {
+static const struct dis386 prefix_user_table[][4] = {
/* PREGRP0 */
{
{ "addps", XM, EX, XX },
{ "addss", XM, EX, XX },
+ { "addpd", XM, EX, XX },
+ { "addsd", XM, EX, XX },
},
/* PREGRP1 */
{
{ "", XM, EX, OPSIMD }, /* See OP_SIMD_SUFFIX */
{ "", XM, EX, OPSIMD },
+ { "", XM, EX, OPSIMD },
+ { "", XM, EX, OPSIMD },
},
/* PREGRP2 */
{
{ "cvtpi2ps", XM, EM, XX },
- { "cvtsi2ss", XM, Ev, XX },
+ { "cvtsi2ssY", XM, Ev, XX },
+ { "cvtpi2pd", XM, EM, XX },
+ { "cvtsi2sdY", XM, Ev, XX },
},
/* PREGRP3 */
{
{ "cvtps2pi", MX, EX, XX },
- { "cvtss2si", Gv, EX, XX },
+ { "cvtss2siY", Gv, EX, XX },
+ { "cvtpd2pi", MX, EX, XX },
+ { "cvtsd2siY", Gv, EX, XX },
},
/* PREGRP4 */
{
{ "cvttps2pi", MX, EX, XX },
- { "cvttss2si", Gv, EX, XX },
+ { "cvttss2siY", Gv, EX, XX },
+ { "cvttpd2pi", MX, EX, XX },
+ { "cvttsd2siY", Gv, EX, XX },
},
/* PREGRP5 */
{
{ "divps", XM, EX, XX },
{ "divss", XM, EX, XX },
+ { "divpd", XM, EX, XX },
+ { "divsd", XM, EX, XX },
},
/* PREGRP6 */
{
{ "maxps", XM, EX, XX },
{ "maxss", XM, EX, XX },
+ { "maxpd", XM, EX, XX },
+ { "maxsd", XM, EX, XX },
},
/* PREGRP7 */
{
{ "minps", XM, EX, XX },
{ "minss", XM, EX, XX },
+ { "minpd", XM, EX, XX },
+ { "minsd", XM, EX, XX },
},
/* PREGRP8 */
{
{ "movups", XM, EX, XX },
{ "movss", XM, EX, XX },
+ { "movupd", XM, EX, XX },
+ { "movsd", XM, EX, XX },
},
/* PREGRP9 */
{
{ "movups", EX, XM, XX },
{ "movss", EX, XM, XX },
+ { "movupd", EX, XM, XX },
+ { "movsd", EX, XM, XX },
},
/* PREGRP10 */
{
{ "mulps", XM, EX, XX },
{ "mulss", XM, EX, XX },
+ { "mulpd", XM, EX, XX },
+ { "mulsd", XM, EX, XX },
},
/* PREGRP11 */
{
{ "rcpps", XM, EX, XX },
{ "rcpss", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
},
/* PREGRP12 */
{
{ "rsqrtps", XM, EX, XX },
{ "rsqrtss", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
},
/* PREGRP13 */
{
{ "sqrtps", XM, EX, XX },
{ "sqrtss", XM, EX, XX },
+ { "sqrtpd", XM, EX, XX },
+ { "sqrtsd", XM, EX, XX },
},
/* PREGRP14 */
{
{ "subps", XM, EX, XX },
{ "subss", XM, EX, XX },
- }
+ { "subpd", XM, EX, XX },
+ { "subsd", XM, EX, XX },
+ },
+ /* PREGRP15 */
+ {
+ { "(bad)", XM, EX, XX },
+ { "cvtdq2pd", XM, EX, XX },
+ { "cvttpd2dq", XM, EX, XX },
+ { "cvtpd2dq", XM, EX, XX },
+ },
+ /* PREGRP16 */
+ {
+ { "cvtdq2ps", XM, EX, XX },
+ { "cvttps2dq",XM, EX, XX },
+ { "cvtps2dq",XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP17 */
+ {
+ { "cvtps2pd", XM, EX, XX },
+ { "cvtss2sd", XM, EX, XX },
+ { "cvtpd2ps", XM, EX, XX },
+ { "cvtsd2ss", XM, EX, XX },
+ },
+ /* PREGRP18 */
+ {
+ { "maskmovq", MX, MS, XX },
+ { "(bad)", XM, EX, XX },
+ { "maskmovdqu", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP19 */
+ {
+ { "movq", MX, EM, XX },
+ { "movdqu", XM, EX, XX },
+ { "movdqa", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP20 */
+ {
+ { "movq", EM, MX, XX },
+ { "movdqu", EX, XM, XX },
+ { "movdqa", EX, XM, XX },
+ { "(bad)", EX, XM, XX },
+ },
+ /* PREGRP21 */
+ {
+ { "(bad)", EX, XM, XX },
+ { "movq2dq", XM, MS, XX },
+ { "movq", EX, XM, XX },
+ { "movdq2q", MX, XS, XX },
+ },
+ /* PREGRP22 */
+ {
+ { "pshufw", MX, EM, Ib },
+ { "pshufhw", XM, EX, Ib },
+ { "pshufd", XM, EX, Ib },
+ { "pshuflw", XM, EX, Ib },
+ },
+ /* PREGRP23 */
+ {
+ { "movd", Ed, MX, XX },
+ { "movq", XM, EX, XX },
+ { "movd", Ed, XM, XX },
+ { "(bad)", Ed, XM, XX },
+ },
+ /* PREGRP24 */
+ {
+ { "(bad)", MX, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "punpckhqdq", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP25 */
+ {
+ { "movntq", Ev, MX, XX },
+ { "(bad)", Ev, XM, XX },
+ { "movntdq", Ev, XM, XX },
+ { "(bad)", Ev, XM, XX },
+ },
+ /* PREGRP26 */
+ {
+ { "(bad)", MX, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "punpcklqdq", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
};
#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
@@ -1951,13 +2774,39 @@ static const struct dis386 prefix_user_table[][2] = {
static void
ckprefix ()
{
+ int newrex;
+ rex = 0;
prefixes = 0;
used_prefixes = 0;
+ rex_used = 0;
while (1)
{
FETCH_DATA (the_info, codep + 1);
+ newrex = 0;
switch (*codep)
{
+ /* REX prefixes family. */
+ case 0x40:
+ case 0x41:
+ case 0x42:
+ case 0x43:
+ case 0x44:
+ case 0x45:
+ case 0x46:
+ case 0x47:
+ case 0x48:
+ case 0x49:
+ case 0x4a:
+ case 0x4b:
+ case 0x4c:
+ case 0x4d:
+ case 0x4e:
+ case 0x4f:
+ if (mode_64bit)
+ newrex = *codep;
+ else
+ return;
+ break;
case 0xf3:
prefixes |= PREFIX_REPZ;
break;
@@ -2006,6 +2855,13 @@ ckprefix ()
default:
return;
}
+ /* Rex is ignored when followed by another prefix. */
+ if (rex)
+ {
+ oappend (prefix_name (rex, 0));
+ oappend (" ");
+ }
+ rex = newrex;
codep++;
}
}
@@ -2020,6 +2876,39 @@ prefix_name (pref, sizeflag)
{
switch (pref)
{
+ /* REX prefixes family. */
+ case 0x40:
+ return "rex";
+ case 0x41:
+ return "rexZ";
+ case 0x42:
+ return "rexY";
+ case 0x43:
+ return "rexYZ";
+ case 0x44:
+ return "rexX";
+ case 0x45:
+ return "rexXZ";
+ case 0x46:
+ return "rexXY";
+ case 0x47:
+ return "rexXYZ";
+ case 0x48:
+ return "rex64";
+ case 0x49:
+ return "rex64Z";
+ case 0x4a:
+ return "rex64Y";
+ case 0x4b:
+ return "rex64YZ";
+ case 0x4c:
+ return "rex64X";
+ case 0x4d:
+ return "rex64XZ";
+ case 0x4e:
+ return "rex64XY";
+ case 0x4f:
+ return "rex64XYZ";
case 0xf3:
return "repz";
case 0xf2:
@@ -2052,7 +2941,8 @@ prefix_name (pref, sizeflag)
static char op1out[100], op2out[100], op3out[100];
static int op_ad, op_index[3];
static unsigned int op_address[3];
-static unsigned int start_pc;
+static unsigned int op_riprel[3];
+static bfd_vma start_pc;
/*
@@ -2111,16 +3001,20 @@ print_insn_i386 (pc, info)
int two_source_ops;
char *first, *second, *third;
int needcomma;
- unsigned char need_modrm;
- unsigned char uses_f3_prefix;
+ unsigned char uses_SSE_prefix;
VOLATILE int sizeflag;
VOLATILE int orig_sizeflag;
struct dis_private priv;
bfd_byte *inbuf = priv.the_buffer;
+ mode_64bit = (info->mach == bfd_mach_x86_64_intel_syntax
+ || info->mach == bfd_mach_x86_64);
+
if (info->mach == bfd_mach_i386_i386
- || info->mach == bfd_mach_i386_i386_intel_syntax)
+ || info->mach == bfd_mach_x86_64
+ || info->mach == bfd_mach_i386_i386_intel_syntax
+ || info->mach == bfd_mach_x86_64_intel_syntax)
sizeflag = AFLAG|DFLAG;
else if (info->mach == bfd_mach_i386_i8086)
sizeflag = 0;
@@ -2173,6 +3067,7 @@ print_insn_i386 (pc, info)
return -1;
}
+ obufp = obuf;
ckprefix ();
insn_codep = codep;
@@ -2180,8 +3075,6 @@ print_insn_i386 (pc, info)
FETCH_DATA (info, codep + 1);
two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
- obufp = obuf;
-
if ((prefixes & PREFIX_FWAIT)
&& ((*codep < 0xd8) || (*codep > 0xdf)))
{
@@ -2204,25 +3097,31 @@ print_insn_i386 (pc, info)
else
dp = &dis386_twobyte_att[*++codep];
need_modrm = twobyte_has_modrm[*codep];
- uses_f3_prefix = twobyte_uses_f3_prefix[*codep];
+ uses_SSE_prefix = twobyte_uses_SSE_prefix[*codep];
}
else
{
if (intel_syntax)
- dp = &dis386_intel[*codep];
+ if (mode_64bit)
+ dp = &dis386_64_intel[*codep];
+ else
+ dp = &dis386_intel[*codep];
else
- dp = &dis386_att[*codep];
+ if (mode_64bit)
+ dp = &disx86_64_att[*codep];
+ else
+ dp = &dis386_att[*codep];
need_modrm = onebyte_has_modrm[*codep];
- uses_f3_prefix = 0;
+ uses_SSE_prefix = 0;
}
codep++;
- if (!uses_f3_prefix && (prefixes & PREFIX_REPZ))
+ if (!uses_SSE_prefix && (prefixes & PREFIX_REPZ))
{
oappend ("repz ");
used_prefixes |= PREFIX_REPZ;
}
- if (prefixes & PREFIX_REPNZ)
+ if (!uses_SSE_prefix && (prefixes & PREFIX_REPNZ))
{
oappend ("repnz ");
used_prefixes |= PREFIX_REPNZ;
@@ -2233,17 +3132,44 @@ print_insn_i386 (pc, info)
used_prefixes |= PREFIX_LOCK;
}
- if (prefixes & PREFIX_DATA)
- sizeflag ^= DFLAG;
-
if (prefixes & PREFIX_ADDR)
{
sizeflag ^= AFLAG;
- if (sizeflag & AFLAG)
- oappend ("addr32 ");
- else
- oappend ("addr16 ");
- used_prefixes |= PREFIX_ADDR;
+ if (dp->bytemode2 != loop_jcxz_mode)
+ {
+ if (sizeflag & AFLAG)
+ oappend ("addr32 ");
+ else
+ oappend ("addr16 ");
+ used_prefixes |= PREFIX_ADDR;
+ }
+ }
+
+ if (!uses_SSE_prefix && (prefixes & PREFIX_DATA))
+ {
+ sizeflag ^= DFLAG;
+ if (dp->bytemode2 == cond_jump_mode && dp->bytemode1 == v_mode)
+ {
+ if (sizeflag & DFLAG)
+ oappend ("data32 ");
+ else
+ oappend ("data16 ");
+ used_prefixes |= PREFIX_DATA;
+ }
+ }
+
+ if (dp->bytemode2 == cond_jump_mode || dp->bytemode2 == loop_jcxz_mode)
+ {
+ if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS)
+ {
+ oappend ("cs ");
+ used_prefixes |= PREFIX_CS;
+ }
+ if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
+ {
+ oappend ("ds ");
+ used_prefixes |= PREFIX_DS;
+ }
}
if (need_modrm)
@@ -2260,6 +3186,7 @@ print_insn_i386 (pc, info)
}
else
{
+ int index;
if (dp->name == NULL)
{
switch(dp->bytemode2)
@@ -2268,8 +3195,23 @@ print_insn_i386 (pc, info)
dp = &grps[dp->bytemode1][reg];
break;
case USE_PREFIX_USER_TABLE:
- dp = &prefix_user_table[dp->bytemode1][prefixes & PREFIX_REPZ ? 1 : 0];
+ index = 0;
used_prefixes |= (prefixes & PREFIX_REPZ);
+ if (prefixes & PREFIX_REPZ)
+ index = 1;
+ else
+ {
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ index = 2;
+ else
+ {
+ used_prefixes |= (prefixes & PREFIX_REPNZ);
+ if (prefixes & PREFIX_REPNZ)
+ index = 3;
+ }
+ }
+ dp = &prefix_user_table[dp->bytemode1][index];
break;
default:
oappend (INTERNAL_DISASSEMBLER_ERROR);
@@ -2309,6 +3251,14 @@ print_insn_i386 (pc, info)
(*info->fprintf_func) (info->stream, "%s", name);
return 1;
}
+ if (rex & ~rex_used)
+ {
+ const char *name;
+ name = prefix_name (rex | 0x40, orig_sizeflag);
+ if (name == NULL)
+ name = INTERNAL_DISASSEMBLER_ERROR;
+ (*info->fprintf_func) (info->stream, "%s ", name);
+ }
obufp = obuf + strlen (obuf);
for (i = strlen (obuf); i < 6; i++)
@@ -2336,7 +3286,7 @@ print_insn_i386 (pc, info)
needcomma = 0;
if (*first)
{
- if (op_index[0] != -1)
+ if (op_index[0] != -1 && !op_riprel[0])
(*info->print_address_func) ((bfd_vma) op_address[op_index[0]], info);
else
(*info->fprintf_func) (info->stream, "%s", first);
@@ -2346,7 +3296,7 @@ print_insn_i386 (pc, info)
{
if (needcomma)
(*info->fprintf_func) (info->stream, ",");
- if (op_index[1] != -1)
+ if (op_index[1] != -1 && !op_riprel[1])
(*info->print_address_func) ((bfd_vma) op_address[op_index[1]], info);
else
(*info->fprintf_func) (info->stream, "%s", second);
@@ -2356,11 +3306,18 @@ print_insn_i386 (pc, info)
{
if (needcomma)
(*info->fprintf_func) (info->stream, ",");
- if (op_index[2] != -1)
+ if (op_index[2] != -1 && !op_riprel[2])
(*info->print_address_func) ((bfd_vma) op_address[op_index[2]], info);
else
(*info->fprintf_func) (info->stream, "%s", third);
}
+ for (i = 0; i < 3; i++)
+ if (op_index[i] != -1 && op_riprel[i])
+ {
+ (*info->fprintf_func) (info->stream, " # ");
+ (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
+ + op_address[op_index[i]]), info);
+ }
return codep - inbuf;
}
@@ -2621,7 +3578,7 @@ static const struct dis386 float_reg[][8] = {
},
/* df */
{
- { "(bad)", XX, XX, XX },
+ { "ffreep", STi, XX, XX },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
@@ -2705,6 +3662,8 @@ dofloat (sizeflag)
OP_E (v_mode, sizeflag);
return;
}
+ /* skip mod/rm byte */
+ MODRM_CHECK;
codep++;
dp = &float_reg[floatop - 0xd8][reg];
@@ -2785,6 +3744,42 @@ putop (template, sizeflag)
case 'E': /* For jcxz/jecxz */
if (sizeflag & AFLAG)
*obufp++ = 'e';
+ used_prefixes |= (prefixes & PREFIX_ADDR);
+ break;
+ case 'F':
+ if ((prefixes & PREFIX_ADDR)
+#ifdef SUFFIX_ALWAYS
+ || (sizeflag & SUFFIX_ALWAYS)
+#endif
+ )
+ {
+ if (sizeflag & AFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_ADDR);
+ }
+ break;
+ case 'I':
+ if (intel_syntax)
+ break;
+ if (mode_64bit)
+ *obufp++ = 'q';
+ else
+ {
+ if ((prefixes & PREFIX_DATA)
+#ifdef SUFFIX_ALWAYS
+ || (sizeflag & SUFFIX_ALWAYS)
+#endif
+ )
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ }
break;
case 'L':
if (intel_syntax)
@@ -2800,42 +3795,68 @@ putop (template, sizeflag)
else
used_prefixes |= PREFIX_FWAIT;
break;
+ case 'O':
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ *obufp++ = 'o';
+ else
+ *obufp++ = 'd';
+ break;
case 'P':
if (intel_syntax)
break;
if ((prefixes & PREFIX_DATA)
+ || (rex & REX_MODE64)
#ifdef SUFFIX_ALWAYS
|| (sizeflag & SUFFIX_ALWAYS)
#endif
)
{
- if (sizeflag & DFLAG)
- *obufp++ = 'l';
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ *obufp++ = 'q';
else
- *obufp++ = 'w';
- used_prefixes |= (prefixes & PREFIX_DATA);
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
}
break;
case 'Q':
if (intel_syntax)
break;
+ USED_REX (REX_MODE64);
if (mod != 3
#ifdef SUFFIX_ALWAYS
|| (sizeflag & SUFFIX_ALWAYS)
#endif
)
{
- if (sizeflag & DFLAG)
- *obufp++ = 'l';
+ if (rex & REX_MODE64)
+ *obufp++ = 'q';
else
- *obufp++ = 'w';
- used_prefixes |= (prefixes & PREFIX_DATA);
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
}
break;
case 'R':
+ USED_REX (REX_MODE64);
if (intel_syntax)
{
- if (sizeflag & DFLAG)
+ if (rex & REX_MODE64)
+ {
+ *obufp++ = 'q';
+ *obufp++ = 't';
+ }
+ else if (sizeflag & DFLAG)
{
*obufp++ = 'd';
*obufp++ = 'q';
@@ -2848,12 +3869,15 @@ putop (template, sizeflag)
}
else
{
- if (sizeflag & DFLAG)
+ if (rex & REX_MODE64)
+ *obufp++ = 'q';
+ else if (sizeflag & DFLAG)
*obufp++ = 'l';
else
*obufp++ = 'w';
}
- used_prefixes |= (prefixes & PREFIX_DATA);
+ if (!(rex & REX_MODE64))
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
case 'S':
if (intel_syntax)
@@ -2861,22 +3885,70 @@ putop (template, sizeflag)
#ifdef SUFFIX_ALWAYS
if (sizeflag & SUFFIX_ALWAYS)
{
+ if (rex & REX_MODE64)
+ *obufp++ = 'q';
+ else
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ }
+#endif
+ break;
+ case 'T':
+ if (intel_syntax)
+ break;
+ if (mode_64bit)
+ *obufp++ = 'q';
+ else if (mod != 3
+#ifdef SUFFIX_ALWAYS
+ || (sizeflag & SUFFIX_ALWAYS)
+#endif
+ )
+ {
if (sizeflag & DFLAG)
*obufp++ = 'l';
else
*obufp++ = 'w';
used_prefixes |= (prefixes & PREFIX_DATA);
}
-#endif
break;
+ case 'X':
+ if (prefixes & PREFIX_DATA)
+ *obufp++ = 'd';
+ else
+ *obufp++ = 's';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case 'Y':
+ if (intel_syntax)
+ break;
+ if (rex & REX_MODE64)
+ {
+ USED_REX (REX_MODE64);
+ *obufp++ = 'q';
+ }
+ break;
+ /* implicit operand size 'l' for i386 or 'q' for x86-64 */
case 'W':
/* operand size flag for cwtl, cbtw */
- if (sizeflag & DFLAG)
+ USED_REX (0);
+ if (rex)
+ *obufp++ = 'l';
+ else if (sizeflag & DFLAG)
*obufp++ = 'w';
else
*obufp++ = 'b';
if (intel_syntax)
{
+ if (rex)
+ {
+ *obufp++ = 'q';
+ *obufp++ = 'e';
+ }
if (sizeflag & DFLAG)
{
*obufp++ = 'd';
@@ -2887,7 +3959,8 @@ putop (template, sizeflag)
*obufp++ = 'w';
}
}
- used_prefixes |= (prefixes & PREFIX_DATA);
+ if (!rex)
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
}
}
@@ -2948,13 +4021,79 @@ OP_indirE (bytemode, sizeflag)
}
static void
+print_operand_value (buf, hex, disp)
+ char *buf;
+ int hex;
+ bfd_vma disp;
+{
+ if (mode_64bit)
+ {
+ if (hex)
+ {
+ char tmp[30];
+ int i;
+ buf[0] = '0';
+ buf[1] = 'x';
+ sprintf_vma (tmp, disp);
+ for (i = 0; tmp[i] == '0' && tmp[i+1]; i++);
+ strcpy (buf + 2, tmp + i);
+ }
+ else
+ {
+ bfd_signed_vma v = disp;
+ char tmp[30];
+ int i;
+ if (v < 0)
+ {
+ *(buf++) = '-';
+ v = -disp;
+ /* Check for possible overflow on 0x8000000000000000 */
+ if (v < 0)
+ {
+ strcpy (buf, "9223372036854775808");
+ return;
+ }
+ }
+ if (!v)
+ {
+ strcpy (buf, "0");
+ return;
+ }
+
+ i = 0;
+ tmp[29] = 0;
+ while (v)
+ {
+ tmp[28-i] = (v % 10) + '0';
+ v /= 10;
+ i++;
+ }
+ strcpy (buf, tmp + 29 - i);
+ }
+ }
+ else
+ {
+ if (hex)
+ sprintf (buf, "0x%x", (unsigned int) disp);
+ else
+ sprintf (buf, "%d", (int) disp);
+ }
+}
+
+static void
OP_E (bytemode, sizeflag)
int bytemode;
int sizeflag;
{
- int disp;
+ bfd_vma disp;
+ int add = 0;
+ int riprel = 0;
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add += 8;
/* skip mod/rm byte */
+ MODRM_CHECK;
codep++;
if (mod == 3)
@@ -2962,23 +4101,41 @@ OP_E (bytemode, sizeflag)
switch (bytemode)
{
case b_mode:
- oappend (names8[rm]);
+ USED_REX (0);
+ if (rex)
+ oappend (names8rex[rm + add]);
+ else
+ oappend (names8[rm + add]);
break;
case w_mode:
- oappend (names16[rm]);
+ oappend (names16[rm + add]);
break;
case d_mode:
- oappend (names32[rm]);
+ oappend (names32[rm + add]);
+ break;
+ case q_mode:
+ oappend (names64[rm + add]);
+ break;
+ case m_mode:
+ if (mode_64bit)
+ oappend (names64[rm + add]);
+ else
+ oappend (names32[rm + add]);
break;
case v_mode:
- if (sizeflag & DFLAG)
- oappend (names32[rm]);
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ oappend (names64[rm + add]);
+ else if (sizeflag & DFLAG)
+ oappend (names32[rm + add]);
else
- oappend (names16[rm]);
+ oappend (names16[rm + add]);
used_prefixes |= (prefixes & PREFIX_DATA);
break;
case 0:
- if ( !(codep[-2] == 0xAE && codep[-1] == 0xF8 /* sfence */))
+ if ( !(codep[-2] == 0xAE && codep[-1] == 0xF8 /* sfence */)
+ && !(codep[-2] == 0xAE && codep[-1] == 0xF0 /* mfence */)
+ && !(codep[-2] == 0xAE && codep[-1] == 0xe8 /* lfence */))
BadOp(); /* bad sfence,lea,lds,les,lfs,lgs,lss modrm */
break;
default:
@@ -3010,16 +4167,24 @@ OP_E (bytemode, sizeflag)
scale = (*codep >> 6) & 3;
index = (*codep >> 3) & 7;
base = *codep & 7;
+ USED_REX (REX_EXTY);
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTY)
+ index += 8;
+ if (rex & REX_EXTZ)
+ base += 8;
codep++;
}
switch (mod)
{
case 0:
- if (base == 5)
+ if ((base & 7) == 5)
{
havebase = 0;
- disp = get32 ();
+ if (mode_64bit && !havesib)
+ riprel = 1;
+ disp = get32s ();
}
break;
case 1:
@@ -3029,15 +4194,20 @@ OP_E (bytemode, sizeflag)
disp -= 0x100;
break;
case 2:
- disp = get32 ();
+ disp = get32s ();
break;
}
if (!intel_syntax)
- if (mod != 0 || base == 5)
+ if (mod != 0 || (base & 7) == 5)
{
- sprintf (scratchbuf, "0x%x", disp);
+ print_operand_value (scratchbuf, !riprel, disp);
oappend (scratchbuf);
+ if (riprel)
+ {
+ set_op (disp, 1);
+ oappend ("(%rip)");
+ }
}
if (havebase || (havesib && (index != 4 || scale != 0)))
@@ -3047,28 +4217,39 @@ OP_E (bytemode, sizeflag)
switch (bytemode)
{
case b_mode:
- oappend("BYTE PTR ");
+ oappend ("BYTE PTR ");
break;
case w_mode:
- oappend("WORD PTR ");
+ oappend ("WORD PTR ");
break;
case v_mode:
- oappend("DWORD PTR ");
+ oappend ("DWORD PTR ");
break;
case d_mode:
- oappend("QWORD PTR ");
+ oappend ("QWORD PTR ");
break;
+ case m_mode:
+ if (mode_64bit)
+ oappend ("DWORD PTR ");
+ else
+ oappend ("QWORD PTR ");
+ break;
case x_mode:
- oappend("XWORD PTR ");
+ 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 (names32[base]);
+ oappend (mode_64bit ? names64[base] : names32[base]);
if (havesib)
{
if (index != 4)
@@ -3080,10 +4261,10 @@ OP_E (bytemode, sizeflag)
*obufp++ = separator_char;
*obufp = '\0';
}
- sprintf (scratchbuf, "%s", names32[index]);
+ sprintf (scratchbuf, "%s", mode_64bit ? names64[index] : names32[index]);
}
else
- sprintf (scratchbuf, ",%s", names32[index]);
+ sprintf (scratchbuf, ",%s", mode_64bit ? names64[index] : names32[index]);
oappend (scratchbuf);
}
if (!intel_syntax
@@ -3099,17 +4280,12 @@ OP_E (bytemode, sizeflag)
}
}
if (intel_syntax)
- if (mod != 0 || base == 5)
+ if (mod != 0 || (base & 7) == 5)
{
/* Don't print zero displacements */
- if (disp > 0)
+ if (disp != 0)
{
- sprintf (scratchbuf, "+%d", disp);
- oappend (scratchbuf);
- }
- else if (disp < 0)
- {
- sprintf (scratchbuf, "%d", disp);
+ print_operand_value (scratchbuf, 0, disp);
oappend (scratchbuf);
}
}
@@ -3119,7 +4295,7 @@ OP_E (bytemode, sizeflag)
}
else if (intel_syntax)
{
- if (mod != 0 || base == 5)
+ if (mod != 0 || (base & 7) == 5)
{
if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
| PREFIX_ES | PREFIX_FS | PREFIX_GS))
@@ -3129,7 +4305,7 @@ OP_E (bytemode, sizeflag)
oappend (names_seg[3]);
oappend (":");
}
- sprintf (scratchbuf, "0x%x", disp);
+ print_operand_value (scratchbuf, 1, disp);
oappend (scratchbuf);
}
}
@@ -3139,7 +4315,7 @@ OP_E (bytemode, sizeflag)
switch (mod)
{
case 0:
- if (rm == 6)
+ if ((rm & 7) == 6)
{
disp = get16 ();
if ((disp & 0x8000) != 0)
@@ -3160,17 +4336,17 @@ OP_E (bytemode, sizeflag)
}
if (!intel_syntax)
- if (mod != 0 || rm == 6)
+ if (mod != 0 || (rm & 7) == 6)
{
- sprintf (scratchbuf, "%d", disp);
+ print_operand_value (scratchbuf, 0, disp);
oappend (scratchbuf);
}
- if (mod != 0 || rm != 6)
+ if (mod != 0 || (rm & 7) != 6)
{
*obufp++ = open_char;
*obufp = '\0';
- oappend (index16[rm]);
+ oappend (index16[rm + add]);
*obufp++ = close_char;
*obufp = '\0';
}
@@ -3182,22 +4358,36 @@ OP_G (bytemode, sizeflag)
int bytemode;
int sizeflag;
{
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add += 8;
switch (bytemode)
{
case b_mode:
- oappend (names8[reg]);
+ USED_REX (0);
+ if (rex)
+ oappend (names8rex[reg + add]);
+ else
+ oappend (names8[reg + add]);
break;
case w_mode:
- oappend (names16[reg]);
+ oappend (names16[reg + add]);
break;
case d_mode:
- oappend (names32[reg]);
+ oappend (names32[reg + add]);
+ break;
+ case q_mode:
+ oappend (names64[reg + add]);
break;
case v_mode:
- if (sizeflag & DFLAG)
- oappend (names32[reg]);
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ oappend (names64[reg + add]);
+ else if (sizeflag & DFLAG)
+ oappend (names32[reg + add]);
else
- oappend (names16[reg]);
+ oappend (names16[reg + add]);
used_prefixes |= (prefixes & PREFIX_DATA);
break;
default:
@@ -3206,16 +4396,56 @@ OP_G (bytemode, sizeflag)
}
}
-static int
+static bfd_vma
+get64 ()
+{
+ unsigned int a = 0;
+ unsigned int b = 0;
+ bfd_vma x = 0;
+
+#ifdef BFD64
+ FETCH_DATA (the_info, codep + 8);
+ a = *codep++ & 0xff;
+ a |= (*codep++ & 0xff) << 8;
+ a |= (*codep++ & 0xff) << 16;
+ a |= (*codep++ & 0xff) << 24;
+ b |= (*codep++ & 0xff);
+ b |= (*codep++ & 0xff) << 8;
+ b |= (*codep++ & 0xff) << 16;
+ b |= (*codep++ & 0xff) << 24;
+ x = a + ((bfd_vma) b << 32);
+#else
+ abort();
+#endif
+ return x;
+}
+
+static bfd_signed_vma
get32 ()
{
- int x = 0;
+ bfd_signed_vma x = 0;
FETCH_DATA (the_info, codep + 4);
- x = *codep++ & 0xff;
- x |= (*codep++ & 0xff) << 8;
- x |= (*codep++ & 0xff) << 16;
- x |= (*codep++ & 0xff) << 24;
+ x = *codep++ & (bfd_signed_vma) 0xff;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
+ return x;
+}
+
+static bfd_signed_vma
+get32s ()
+{
+ bfd_signed_vma x = 0;
+
+ FETCH_DATA (the_info, codep + 4);
+ x = *codep++ & (bfd_signed_vma) 0xff;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
+
+ x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
+
return x;
}
@@ -3231,11 +4461,13 @@ get16 ()
}
static void
-set_op (op)
+set_op (op, riprel)
unsigned int op;
+ int riprel;
{
op_index[op_ad] = op_ad;
op_address[op_ad] = op;
+ op_riprel[op_ad] = riprel;
}
static void
@@ -3244,6 +4476,60 @@ OP_REG (code, sizeflag)
int sizeflag;
{
const char *s;
+ int add = 0;
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add = 8;
+
+ switch (code)
+ {
+ case indir_dx_reg:
+ s = "(%dx)";
+ break;
+ case ax_reg: case cx_reg: case dx_reg: case bx_reg:
+ case sp_reg: case bp_reg: case si_reg: case di_reg:
+ s = names16[code - ax_reg + add];
+ break;
+ case es_reg: case ss_reg: case cs_reg:
+ case ds_reg: case fs_reg: case gs_reg:
+ s = names_seg[code - es_reg + add];
+ break;
+ case al_reg: case ah_reg: case cl_reg: case ch_reg:
+ case dl_reg: case dh_reg: case bl_reg: case bh_reg:
+ USED_REX (0);
+ if (rex)
+ s = names8rex[code - al_reg + add];
+ else
+ s = names8[code - al_reg];
+ break;
+ case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
+ case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ s = names64[code - eAX_reg + add];
+ else if (sizeflag & DFLAG)
+ s = names32[code - eAX_reg + add];
+ else
+ s = names16[code - eAX_reg + add];
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ 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:
+ s = names64[code - rAX_reg + add];
+ break;
+ default:
+ s = INTERNAL_DISASSEMBLER_ERROR;
+ break;
+ }
+ oappend (s);
+}
+
+static void
+OP_IMREG (code, sizeflag)
+ int code;
+ int sizeflag;
+{
+ const char *s;
switch (code)
{
@@ -3260,11 +4546,18 @@ OP_REG (code, sizeflag)
break;
case al_reg: case ah_reg: case cl_reg: case ch_reg:
case dl_reg: case dh_reg: case bl_reg: case bh_reg:
- s = names8[code - al_reg];
+ USED_REX (0);
+ if (rex)
+ s = names8rex[code - al_reg];
+ else
+ s = names8[code - al_reg];
break;
case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
- if (sizeflag & DFLAG)
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ s = names64[code - eAX_reg];
+ else if (sizeflag & DFLAG)
s = names32[code - eAX_reg];
else
s = names16[code - eAX_reg];
@@ -3282,22 +4575,37 @@ OP_I (bytemode, sizeflag)
int bytemode;
int sizeflag;
{
- int op;
+ bfd_signed_vma op;
+ bfd_signed_vma mask = -1;
switch (bytemode)
{
case b_mode:
FETCH_DATA (the_info, codep + 1);
- op = *codep++ & 0xff;
+ op = *codep++;
+ mask = 0xff;
+ break;
+ case q_mode:
+ op = get32s ();
break;
case v_mode:
- if (sizeflag & DFLAG)
- op = get32 ();
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ op = get32s ();
+ else if (sizeflag & DFLAG)
+ {
+ op = get32 ();
+ mask = 0xffffffff;
+ }
else
- op = get16 ();
+ {
+ op = get16 ();
+ mask = 0xfffff;
+ }
used_prefixes |= (prefixes & PREFIX_DATA);
break;
case w_mode:
+ mask = 0xfffff;
op = get16 ();
break;
default:
@@ -3305,10 +4613,56 @@ OP_I (bytemode, sizeflag)
return;
}
- if (intel_syntax)
- sprintf (scratchbuf, "0x%x", op);
- else
- sprintf (scratchbuf, "$0x%x", op);
+ op &= mask;
+ scratchbuf[0] = '$';
+ print_operand_value (scratchbuf + !intel_syntax, 1, op);
+ oappend (scratchbuf);
+ scratchbuf[0] = '\0';
+}
+
+static void
+OP_I64 (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ bfd_signed_vma op;
+ bfd_signed_vma mask = -1;
+
+ switch (bytemode)
+ {
+ case b_mode:
+ FETCH_DATA (the_info, codep + 1);
+ op = *codep++;
+ mask = 0xff;
+ break;
+ case v_mode:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ op = get64 ();
+ else if (sizeflag & DFLAG)
+ {
+ op = get32 ();
+ mask = 0xffffffff;
+ }
+ else
+ {
+ op = get16 ();
+ mask = 0xfffff;
+ }
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case w_mode:
+ mask = 0xfffff;
+ op = get16 ();
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ return;
+ }
+
+ op &= mask;
+ scratchbuf[0] = '$';
+ print_operand_value (scratchbuf + !intel_syntax, 1, op);
oappend (scratchbuf);
scratchbuf[0] = '\0';
}
@@ -3318,7 +4672,8 @@ OP_sI (bytemode, sizeflag)
int bytemode;
int sizeflag;
{
- int op;
+ bfd_signed_vma op;
+ bfd_signed_vma mask = -1;
switch (bytemode)
{
@@ -3327,12 +4682,20 @@ OP_sI (bytemode, sizeflag)
op = *codep++;
if ((op & 0x80) != 0)
op -= 0x100;
+ mask = 0xffffffff;
break;
case v_mode:
- if (sizeflag & DFLAG)
- op = get32 ();
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ op = get32s ();
+ else if (sizeflag & DFLAG)
+ {
+ op = get32s ();
+ mask = 0xffffffff;
+ }
else
{
+ mask = 0xffffffff;
op = get16();
if ((op & 0x8000) != 0)
op -= 0x10000;
@@ -3341,6 +4704,7 @@ OP_sI (bytemode, sizeflag)
break;
case w_mode:
op = get16 ();
+ mask = 0xffffffff;
if ((op & 0x8000) != 0)
op -= 0x10000;
break;
@@ -3348,10 +4712,9 @@ OP_sI (bytemode, sizeflag)
oappend (INTERNAL_DISASSEMBLER_ERROR);
return;
}
- if (intel_syntax)
- sprintf (scratchbuf, "%d", op);
- else
- sprintf (scratchbuf, "$0x%x", op);
+
+ scratchbuf[0] = '$';
+ print_operand_value (scratchbuf + 1, 1, op);
oappend (scratchbuf);
}
@@ -3360,7 +4723,7 @@ OP_J (bytemode, sizeflag)
int bytemode;
int sizeflag;
{
- int disp;
+ bfd_vma disp;
int mask = -1;
switch (bytemode)
@@ -3373,7 +4736,7 @@ OP_J (bytemode, sizeflag)
break;
case v_mode:
if (sizeflag & DFLAG)
- disp = get32 ();
+ disp = get32s ();
else
{
disp = get16 ();
@@ -3382,15 +4745,14 @@ OP_J (bytemode, sizeflag)
displacement is added! */
mask = 0xffff;
}
- used_prefixes |= (prefixes & PREFIX_DATA);
break;
default:
oappend (INTERNAL_DISASSEMBLER_ERROR);
return;
}
disp = (start_pc + codep - start_codep + disp) & mask;
- set_op (disp);
- sprintf (scratchbuf, "0x%x", disp);
+ set_op (disp, 0);
+ print_operand_value (scratchbuf, 1, disp);
oappend (scratchbuf);
}
@@ -3432,11 +4794,11 @@ OP_DIR (dummy, sizeflag)
/* ARGSUSED */
static void
-OP_OFF (ignore, sizeflag)
- int ignore ATTRIBUTE_UNUSED;
+OP_OFF (ignored, sizeflag)
+ int ignored ATTRIBUTE_UNUSED;
int sizeflag;
{
- int off;
+ bfd_vma off;
append_seg ();
@@ -3454,7 +4816,31 @@ OP_OFF (ignore, sizeflag)
oappend (":");
}
}
- sprintf (scratchbuf, "0x%x", off);
+ print_operand_value (scratchbuf, 1, off);
+ oappend (scratchbuf);
+}
+/* ARGSUSED */
+static void
+OP_OFF64 (ignored, sizeflag)
+ int ignored ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ bfd_vma off;
+
+ append_seg ();
+
+ off = get64();
+
+ if (intel_syntax)
+ {
+ if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
+ {
+ oappend (names_seg[3]);
+ oappend (":");
+ }
+ }
+ print_operand_value (scratchbuf, 1, off);
oappend (scratchbuf);
}
@@ -3465,7 +4851,10 @@ ptr_reg (code, sizeflag)
{
const char *s;
oappend ("(");
- if (sizeflag & AFLAG)
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ s = names64[code - eAX_reg];
+ else if (sizeflag & AFLAG)
s = names32[code - eAX_reg];
else
s = names16[code - eAX_reg];
@@ -3505,7 +4894,11 @@ OP_C (dummy, sizeflag)
int dummy ATTRIBUTE_UNUSED;
int sizeflag ATTRIBUTE_UNUSED;
{
- sprintf (scratchbuf, "%%cr%d", reg);
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ sprintf (scratchbuf, "%%cr%d", reg+add);
oappend (scratchbuf);
}
@@ -3515,7 +4908,11 @@ OP_D (dummy, sizeflag)
int dummy ATTRIBUTE_UNUSED;
int sizeflag ATTRIBUTE_UNUSED;
{
- sprintf (scratchbuf, "%%db%d", reg);
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ sprintf (scratchbuf, "%%db%d", reg+add);
oappend (scratchbuf);
}
@@ -3545,7 +4942,15 @@ OP_MMX (ignore, sizeflag)
int ignore ATTRIBUTE_UNUSED;
int sizeflag ATTRIBUTE_UNUSED;
{
- sprintf (scratchbuf, "%%mm%d", reg);
+ 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);
+ else
+ sprintf (scratchbuf, "%%mm%d", reg + add);
oappend (scratchbuf);
}
@@ -3554,7 +4959,11 @@ OP_XMM (bytemode, sizeflag)
int bytemode ATTRIBUTE_UNUSED;
int sizeflag ATTRIBUTE_UNUSED;
{
- sprintf (scratchbuf, "%%xmm%d", reg);
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ sprintf (scratchbuf, "%%xmm%d", reg + add);
oappend (scratchbuf);
}
@@ -3563,14 +4972,24 @@ OP_EM (bytemode, sizeflag)
int bytemode;
int sizeflag;
{
+ int add = 0;
if (mod != 3)
{
OP_E (bytemode, sizeflag);
return;
}
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add = 8;
+ /* skip mod/rm byte */
+ MODRM_CHECK;
codep++;
- sprintf (scratchbuf, "%%mm%d", rm);
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ sprintf (scratchbuf, "%%xmm%d", rm + add);
+ else
+ sprintf (scratchbuf, "%%mm%d", rm + add);
oappend (scratchbuf);
}
@@ -3579,14 +4998,20 @@ OP_EX (bytemode, sizeflag)
int bytemode;
int sizeflag;
{
+ int add = 0;
if (mod != 3)
{
OP_E (bytemode, sizeflag);
return;
}
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add = 8;
+ /* skip mod/rm byte */
+ MODRM_CHECK;
codep++;
- sprintf (scratchbuf, "%%xmm%d", rm);
+ sprintf (scratchbuf, "%%xmm%d", rm + add);
oappend (scratchbuf);
}
@@ -3601,6 +5026,17 @@ OP_MS (bytemode, sizeflag)
BadOp();
}
+static void
+OP_XS (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ if (mod == 3)
+ OP_EX (bytemode, sizeflag);
+ else
+ BadOp();
+}
+
static const char *Suffix3DNow[] = {
/* 00 */ NULL, NULL, NULL, NULL,
/* 04 */ NULL, NULL, NULL, NULL,
@@ -3719,9 +5155,24 @@ OP_SIMD_Suffix (bytemode, sizeflag)
cmp_type = *codep++ & 0xff;
if (cmp_type < 8)
{
- sprintf (scratchbuf, "cmp%s%cs",
- simd_cmp_op[cmp_type],
- prefixes & PREFIX_REPZ ? 's' : 'p');
+ char suffix1 = 'p', suffix2 = 's';
+ used_prefixes |= (prefixes & PREFIX_REPZ);
+ if (prefixes & PREFIX_REPZ)
+ suffix1 = 's';
+ else
+ {
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ suffix2 = 'd';
+ else
+ {
+ used_prefixes |= (prefixes & PREFIX_REPNZ);
+ if (prefixes & PREFIX_REPNZ)
+ suffix1 = 's', suffix2 = 'd';
+ }
+ }
+ sprintf (scratchbuf, "cmp%s%c%c",
+ simd_cmp_op[cmp_type], suffix1, suffix2);
used_prefixes |= (prefixes & PREFIX_REPZ);
oappend (scratchbuf);
}
diff --git a/gnu/usr.bin/binutils/opcodes/i960-dis.c b/gnu/usr.bin/binutils/opcodes/i960-dis.c
index 79820850b4f..90b170a3bb8 100644
--- a/gnu/usr.bin/binutils/opcodes/i960-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/i960-dis.c
@@ -1,5 +1,6 @@
/* Disassemble i80960 instructions.
- Copyright (C) 1990, 91, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 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
diff --git a/gnu/usr.bin/binutils/opcodes/m68k-dis.c b/gnu/usr.bin/binutils/opcodes/m68k-dis.c
index 10c461dae59..fd7d912aec1 100644
--- a/gnu/usr.bin/binutils/opcodes/m68k-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/m68k-dis.c
@@ -1,5 +1,6 @@
/* Print Motorola 68k instructions.
- Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify
@@ -45,14 +46,18 @@ static int
print_insn_arg PARAMS ((const char *, unsigned char *, unsigned char *,
bfd_vma, disassemble_info *));
-CONST char * CONST fpcr_names[] = {
- "", "%fpiar", "%fpsr", "%fpiar/%fpsr", "%fpcr",
- "%fpiar/%fpcr", "%fpsr/%fpcr", "%fpiar/%fpsr/%fpcr"};
+CONST char * CONST fpcr_names[] =
+ {
+ "", "%fpiar", "%fpsr", "%fpiar/%fpsr", "%fpcr",
+ "%fpiar/%fpcr", "%fpsr/%fpcr", "%fpiar/%fpsr/%fpcr"
+ };
-static char *const reg_names[] = {
- "%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",
- "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp",
- "%ps", "%pc"};
+static char *const reg_names[] =
+ {
+ "%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",
+ "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp",
+ "%ps", "%pc"
+ };
/* Sign-extend an (unsigned char). */
#if __STDC__ == 1
@@ -151,16 +156,17 @@ fetch_data (info, addr)
/* This function is used to print to the bit-bucket. */
static int
#ifdef __STDC__
-dummy_printer (FILE * file, const char * format, ...)
+dummy_printer (FILE * file ATTRIBUTE_UNUSED,
+ const char * format ATTRIBUTE_UNUSED, ...)
#else
-dummy_printer (file) FILE *file;
+dummy_printer (file) FILE *file ATTRIBUTE_UNUSED;
#endif
{ return 0; }
static void
dummy_print_address (vma, info)
- bfd_vma vma;
- struct disassemble_info *info;
+ bfd_vma vma ATTRIBUTE_UNUSED;
+ struct disassemble_info *info ATTRIBUTE_UNUSED;
{
}
@@ -177,7 +183,7 @@ print_insn_m68k (memaddr, info)
unsigned char *save_p;
register const char *d;
register unsigned long bestmask;
- const struct m68k_opcode *best = 0;
+ const struct m68k_opcode *best;
unsigned int arch_mask;
struct private priv;
bfd_byte *buffer = priv.the_buffer;
@@ -227,6 +233,7 @@ print_insn_m68k (memaddr, info)
/* Error return. */
return -1;
+ best = NULL;
switch (info->mach)
{
default:
@@ -254,6 +261,18 @@ print_insn_m68k (memaddr, info)
case bfd_mach_m68060:
arch_mask = m68060;
break;
+ case bfd_mach_mcf5200:
+ arch_mask = mcf5200;
+ break;
+ case bfd_mach_mcf5206e:
+ arch_mask = mcf5206e;
+ break;
+ case bfd_mach_mcf5307:
+ arch_mask = mcf5307;
+ break;
+ case bfd_mach_mcf5407:
+ arch_mask = mcf5407;
+ break;
}
arch_mask |= m68881 | m68851;
@@ -318,7 +337,7 @@ print_insn_m68k (memaddr, info)
}
}
- if (best == 0)
+ if (best == NULL)
goto invalid;
/* Point at first word of argument data,
diff --git a/gnu/usr.bin/binutils/opcodes/m68k-opc.c b/gnu/usr.bin/binutils/opcodes/m68k-opc.c
index 49ce5de704b..84451fbe30c 100644
--- a/gnu/usr.bin/binutils/opcodes/m68k-opc.c
+++ b/gnu/usr.bin/binutils/opcodes/m68k-opc.c
@@ -1,6 +1,7 @@
/* Opcode table for m680[012346]0/m6888[12]/m68851/mcf5200.
- Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 98, 1999
- Free Software Foundation.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GDB, GAS, and the GNU binutils.
@@ -130,20 +131,20 @@ const struct m68k_opcode m68k_opcodes[] =
{"bgtw", one(0067000), one(0177777), "BW", m68000up | mcf },
{"blew", one(0067400), one(0177777), "BW", m68000up | mcf },
-{"bhil", one(0061377), one(0177777), "BL", m68020up | cpu32 },
-{"blsl", one(0061777), one(0177777), "BL", m68020up | cpu32 },
-{"bccl", one(0062377), one(0177777), "BL", m68020up | cpu32 },
-{"bcsl", one(0062777), one(0177777), "BL", m68020up | cpu32 },
-{"bnel", one(0063377), one(0177777), "BL", m68020up | cpu32 },
-{"beql", one(0063777), one(0177777), "BL", m68020up | cpu32 },
-{"bvcl", one(0064377), one(0177777), "BL", m68020up | cpu32 },
-{"bvsl", one(0064777), one(0177777), "BL", m68020up | cpu32 },
-{"bpll", one(0065377), one(0177777), "BL", m68020up | cpu32 },
-{"bmil", one(0065777), one(0177777), "BL", m68020up | cpu32 },
-{"bgel", one(0066377), one(0177777), "BL", m68020up | cpu32 },
-{"bltl", one(0066777), one(0177777), "BL", m68020up | cpu32 },
-{"bgtl", one(0067377), one(0177777), "BL", m68020up | cpu32 },
-{"blel", one(0067777), one(0177777), "BL", m68020up | cpu32 },
+{"bhil", one(0061377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"blsl", one(0061777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bccl", one(0062377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bcsl", one(0062777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bnel", one(0063377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"beql", one(0063777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bvcl", one(0064377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bvsl", one(0064777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bpll", one(0065377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bmil", one(0065777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bgel", one(0066377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bltl", one(0066777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"bgtl", one(0067377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"blel", one(0067777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
{"bhis", one(0061000), one(0177400), "BB", m68000up | mcf },
{"blss", one(0061400), one(0177400), "BB", m68000up | mcf },
@@ -198,7 +199,7 @@ const struct m68k_opcode m68k_opcodes[] =
{"bkpt", one(0044110), one(0177770), "ts", m68010up },
{"braw", one(0060000), one(0177777), "BW", m68000up | mcf },
-{"bral", one(0060377), one(0177777), "BL", m68020up | cpu32 },
+{"bral", one(0060377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
{"bras", one(0060000), one(0177400), "BB", m68000up | mcf },
{"bset", one(0000700), one(0170700), "Dd$s", m68000up },
@@ -207,7 +208,7 @@ const struct m68k_opcode m68k_opcodes[] =
{"bset", one(0004300), one(0177700), "#bqs", mcf },
{"bsrw", one(0060400), one(0177777), "BW", m68000up | mcf },
-{"bsrl", one(0060777), one(0177777), "BL", m68020up | cpu32 },
+{"bsrl", one(0060777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
{"bsrs", one(0060400), one(0177400), "BB", m68000up | mcf },
{"btst", one(0000400), one(0170700), "Dd;b", m68000up | mcf },
@@ -241,8 +242,7 @@ const struct m68k_opcode m68k_opcodes[] =
{"cinvp", one(0xf400|SCOPE_PAGE), one(0xff38), "ceas", m68040up },
{"cpusha", one(0xf420|SCOPE_ALL), one(0xff38), "ce", m68040up },
-{"cpushl", one(0xf420|SCOPE_LINE), one(0xff38), "ceas", m68040up },
-{"cpushl", one(0x04e8), one(0xfff8), "as", mcf },
+{"cpushl", one(0xf420|SCOPE_LINE), one(0xff38), "ceas", m68040up | mcf },
{"cpushp", one(0xf420|SCOPE_PAGE), one(0xff38), "ceas", m68040up },
#undef SCOPE_LINE
@@ -261,7 +261,9 @@ const struct m68k_opcode m68k_opcodes[] =
{"cmpal", one(0130700), one(0170700), "*lAd", m68000up | mcf },
{"cmpib", one(0006000), one(0177700), "#b@s", m68000up },
+{"cmpib", one(0006000), one(0177700), "#bDs", mcf5407 },
{"cmpiw", one(0006100), one(0177700), "#w@s", m68000up },
+{"cmpiw", one(0006100), one(0177700), "#wDs", mcf5407 },
{"cmpil", one(0006200), one(0177700), "#l@s", m68000up },
{"cmpil", one(0006200), one(0177700), "#lDs", mcf },
@@ -271,12 +273,15 @@ const struct m68k_opcode m68k_opcodes[] =
/* The cmp opcode can generate the cmpa, cmpm, and cmpi instructions. */
{"cmpb", one(0006000), one(0177700), "#b@s", m68000up },
+{"cmpb", one(0006000), one(0177700), "#bDs", mcf5407 },
{"cmpb", one(0130410), one(0170770), "+s+d", m68000up },
{"cmpb", one(0130000), one(0170700), ";bDd", m68000up },
+{"cmpb", one(0130000), one(0170700), "*bDd", mcf5407 },
{"cmpw", one(0130300), one(0170700), "*wAd", m68000up },
{"cmpw", one(0006100), one(0177700), "#w@s", m68000up },
+{"cmpw", one(0006100), one(0177700), "#wDs", mcf5407 },
{"cmpw", one(0130510), one(0170770), "+s+d", m68000up },
-{"cmpw", one(0130100), one(0170700), "*wDd", m68000up },
+{"cmpw", one(0130100), one(0170700), "*wDd", m68000up | mcf5407 },
{"cmpl", one(0130700), one(0170700), "*lAd", m68000up | mcf },
{"cmpl", one(0006200), one(0177700), "#l@s", m68000up },
{"cmpl", one(0006200), one(0177700), "#lDs", mcf },
@@ -300,22 +305,20 @@ const struct m68k_opcode m68k_opcodes[] =
{"dbvc", one(0054310), one(0177770), "DsBw", m68000up },
{"dbvs", one(0054710), one(0177770), "DsBw", m68000up },
-{"divsw", one(0100700), one(0170700), ";wDd", m68000up },
-{"divsw", one(0100700), one(0170700), "vsDd", mcf5307 | mcf5206e },
+{"divsw", one(0100700), one(0170700), ";wDd", m68000up | mcf5307up | mcf5206e },
{"divsl", two(0046100,0006000),two(0177700,0107770),";lD3D1", m68020up|cpu32 },
{"divsl", two(0046100,0004000),two(0177700,0107770),";lDD", m68020up|cpu32 },
-{"divsl", two(0046100,0004000),two(0177700,0107770),"vsDD", mcf5307 | mcf5206e },
+{"divsl", two(0046100,0004000),two(0177700,0107770),"qsDD", mcf5307up | mcf5206e },
{"divsll", two(0046100,0004000),two(0177700,0107770),";lD3D1",m68020up|cpu32 },
{"divsll", two(0046100,0004000),two(0177700,0107770),";lDD", m68020up|cpu32 },
-{"divuw", one(0100300), one(0170700), ";wDd", m68000up },
-{"divuw", one(0100300), one(0170700), "vsDd", mcf5307 | mcf5206e },
+{"divuw", one(0100300), one(0170700), ";wDd", m68000up | mcf5307up | mcf5206e },
{"divul", two(0046100,0002000),two(0177700,0107770),";lD3D1", m68020up|cpu32 },
{"divul", two(0046100,0000000),two(0177700,0107770),";lDD", m68020up|cpu32 },
-{"divul", two(0046100,0000000),two(0177700,0107770),"vsDD", mcf5307 | mcf5206e },
+{"divul", two(0046100,0000000),two(0177700,0107770),"qsDD", mcf5307up | mcf5206e },
{"divull", two(0046100,0000000),two(0177700,0107770),";lD3D1",m68020up|cpu32 },
{"divull", two(0046100,0000000),two(0177700,0107770),";lDD", m68020up|cpu32 },
@@ -1242,43 +1245,43 @@ const struct m68k_opcode m68k_opcodes[] =
{"lsrl", one(0160250), one(0170770), "DdDs", m68000up | mcf },
/* FIXME: add MAM mode (`&' after <ea> operand) / remove MACM */
-{"macw", two(0120000, 0000000), two(0170660, 0005400), "uMum", mcf5307 | mcf5206e },
-{"macw", two(0120000, 0001000), two(0170660, 0005400), "uMumMh", mcf5307 | mcf5206e },
-{"macw", two(0120220, 0000000), two(0170670, 0005460), "uNuoasRn", mcf5307 | mcf5206e },
-{"macw", two(0120230, 0000000), two(0170670, 0005460), "uNuo+sRn", mcf5307 | mcf5206e },
-{"macw", two(0120240, 0000000), two(0170670, 0005460), "uNuo-sRn", mcf5307 | mcf5206e },
-{"macw", two(0120250, 0000000), two(0170670, 0005460), "uNuodsRn", mcf5307 | mcf5206e },
-{"macw", two(0120220, 0001000), two(0170670, 0005460), "uNuoMhasRn", mcf5307 | mcf5206e },
-{"macw", two(0120230, 0001000), two(0170670, 0005460), "uNuoMh+sRn", mcf5307 | mcf5206e },
-{"macw", two(0120240, 0001000), two(0170670, 0005460), "uNuoMh-sRn", mcf5307 | mcf5206e },
-{"macw", two(0120250, 0001000), two(0170670, 0005460), "uNuoMhdsRn", mcf5307 | mcf5206e },
-{"macmw", two(0120220, 0000040), two(0170670, 0005460), "uNuoasRn", mcf5307 | mcf5206e },
-{"macmw", two(0120230, 0000040), two(0170670, 0005460), "uNuo+sRn", mcf5307 | mcf5206e },
-{"macmw", two(0120240, 0000040), two(0170670, 0005460), "uNuo-sRn", mcf5307 | mcf5206e },
-{"macmw", two(0120250, 0000040), two(0170670, 0005460), "uNuodsRn", mcf5307 | mcf5206e },
-{"macmw", two(0120220, 0001040), two(0170670, 0005460), "uNuoMhasRn", mcf5307 | mcf5206e },
-{"macmw", two(0120230, 0001040), two(0170670, 0005460), "uNuoMh+sRn", mcf5307 | mcf5206e },
-{"macmw", two(0120240, 0001040), two(0170670, 0005460), "uNuoMh-sRn", mcf5307 | mcf5206e },
-{"macmw", two(0120250, 0001040), two(0170670, 0005460), "uNuoMhdsRn", mcf5307 | mcf5206e },
-
-{"macl", two(0120000, 0004000), two(0170660, 0005400), "RsRm", mcf5307 | mcf5206e },
-{"macl", two(0120000, 0005000), two(0170660, 0005400), "RsRmMh", mcf5307 | mcf5206e },
-{"macl", two(0120220, 0004000), two(0170670, 0005460), "R3R1asRn", mcf5307 | mcf5206e },
-{"macl", two(0120230, 0004000), two(0170670, 0005460), "R3R1+sRn", mcf5307 | mcf5206e },
-{"macl", two(0120240, 0004000), two(0170670, 0005460), "R3R1-sRn", mcf5307 | mcf5206e },
-{"macl", two(0120250, 0004000), two(0170670, 0005460), "R3R1dsRn", mcf5307 | mcf5206e },
-{"macl", two(0120220, 0005000), two(0170670, 0005460), "R3R1MhasRn", mcf5307 | mcf5206e },
-{"macl", two(0120230, 0005000), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307 | mcf5206e },
-{"macl", two(0120240, 0005000), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307 | mcf5206e },
-{"macl", two(0120250, 0005000), two(0170670, 0005460), "R3R1MhdsRn", mcf5307 | mcf5206e },
-{"macml", two(0120220, 0004040), two(0170670, 0005460), "R3R1asRn", mcf5307 | mcf5206e },
-{"macml", two(0120230, 0004040), two(0170670, 0005460), "R3R1+sRn", mcf5307 | mcf5206e },
-{"macml", two(0120240, 0004040), two(0170670, 0005460), "R3R1-sRn", mcf5307 | mcf5206e },
-{"macml", two(0120250, 0004040), two(0170670, 0005460), "R3R1dsRn", mcf5307 | mcf5206e },
-{"macml", two(0120220, 0005040), two(0170670, 0005460), "R3R1MhasRn", mcf5307 | mcf5206e },
-{"macml", two(0120230, 0005040), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307 | mcf5206e },
-{"macml", two(0120240, 0005040), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307 | mcf5206e },
-{"macml", two(0120250, 0005040), two(0170670, 0005460), "R3R1MhdsRn", mcf5307 | mcf5206e },
+{"macw", two(0120000, 0000000), two(0170660, 0005400), "uMum", mcf5307up | mcf5206e },
+{"macw", two(0120000, 0001000), two(0170660, 0005400), "uMumMh", mcf5307up | mcf5206e },
+{"macw", two(0120220, 0000000), two(0170670, 0005460), "uNuoasRn", mcf5307up | mcf5206e },
+{"macw", two(0120230, 0000000), two(0170670, 0005460), "uNuo+sRn", mcf5307up | mcf5206e },
+{"macw", two(0120240, 0000000), two(0170670, 0005460), "uNuo-sRn", mcf5307up | mcf5206e },
+{"macw", two(0120250, 0000000), two(0170670, 0005460), "uNuodsRn", mcf5307up | mcf5206e },
+{"macw", two(0120220, 0001000), two(0170670, 0005460), "uNuoMhasRn", mcf5307up | mcf5206e },
+{"macw", two(0120230, 0001000), two(0170670, 0005460), "uNuoMh+sRn", mcf5307up | mcf5206e },
+{"macw", two(0120240, 0001000), two(0170670, 0005460), "uNuoMh-sRn", mcf5307up | mcf5206e },
+{"macw", two(0120250, 0001000), two(0170670, 0005460), "uNuoMhdsRn", mcf5307up | mcf5206e },
+{"macmw", two(0120220, 0000040), two(0170670, 0005460), "uNuoasRn", mcf5307up | mcf5206e },
+{"macmw", two(0120230, 0000040), two(0170670, 0005460), "uNuo+sRn", mcf5307up | mcf5206e },
+{"macmw", two(0120240, 0000040), two(0170670, 0005460), "uNuo-sRn", mcf5307up | mcf5206e },
+{"macmw", two(0120250, 0000040), two(0170670, 0005460), "uNuodsRn", mcf5307up | mcf5206e },
+{"macmw", two(0120220, 0001040), two(0170670, 0005460), "uNuoMhasRn", mcf5307up | mcf5206e },
+{"macmw", two(0120230, 0001040), two(0170670, 0005460), "uNuoMh+sRn", mcf5307up | mcf5206e },
+{"macmw", two(0120240, 0001040), two(0170670, 0005460), "uNuoMh-sRn", mcf5307up | mcf5206e },
+{"macmw", two(0120250, 0001040), two(0170670, 0005460), "uNuoMhdsRn", mcf5307up | mcf5206e },
+
+{"macl", two(0120000, 0004000), two(0170660, 0005400), "RsRm", mcf5307up | mcf5206e },
+{"macl", two(0120000, 0005000), two(0170660, 0005400), "RsRmMh", mcf5307up | mcf5206e },
+{"macl", two(0120220, 0004000), two(0170670, 0005460), "R3R1asRn", mcf5307up | mcf5206e },
+{"macl", two(0120230, 0004000), two(0170670, 0005460), "R3R1+sRn", mcf5307up | mcf5206e },
+{"macl", two(0120240, 0004000), two(0170670, 0005460), "R3R1-sRn", mcf5307up | mcf5206e },
+{"macl", two(0120250, 0004000), two(0170670, 0005460), "R3R1dsRn", mcf5307up | mcf5206e },
+{"macl", two(0120220, 0005000), two(0170670, 0005460), "R3R1MhasRn", mcf5307up | mcf5206e },
+{"macl", two(0120230, 0005000), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307up | mcf5206e },
+{"macl", two(0120240, 0005000), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307up | mcf5206e },
+{"macl", two(0120250, 0005000), two(0170670, 0005460), "R3R1MhdsRn", mcf5307up | mcf5206e },
+{"macml", two(0120220, 0004040), two(0170670, 0005460), "R3R1asRn", mcf5307up | mcf5206e },
+{"macml", two(0120230, 0004040), two(0170670, 0005460), "R3R1+sRn", mcf5307up | mcf5206e },
+{"macml", two(0120240, 0004040), two(0170670, 0005460), "R3R1-sRn", mcf5307up | mcf5206e },
+{"macml", two(0120250, 0004040), two(0170670, 0005460), "R3R1dsRn", mcf5307up | mcf5206e },
+{"macml", two(0120220, 0005040), two(0170670, 0005460), "R3R1MhasRn", mcf5307up | mcf5206e },
+{"macml", two(0120230, 0005040), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307up | mcf5206e },
+{"macml", two(0120240, 0005040), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307up | mcf5206e },
+{"macml", two(0120250, 0005040), two(0170670, 0005460), "R3R1MhdsRn", mcf5307up | mcf5206e },
/* NOTE: The mcf5200 family programmer's reference manual does not
indicate the byte form of the movea instruction is invalid (as it
@@ -1335,14 +1338,22 @@ const struct m68k_opcode m68k_opcodes[] =
/* The move opcode can generate the movea and moveq instructions. */
{"moveb", one(0010000), one(0170000), ";b$d", m68000up },
-{"moveb", one(0010000), one(0170000), "ms%d", mcf },
-{"moveb", one(0010000), one(0170000), "nspd", mcf },
-{"moveb", one(0010000), one(0170000), "obmd", mcf },
+{"moveb", one(0010000), one(0170070), "Ds$d", mcf },
+{"moveb", one(0010020), one(0170070), "as$d", mcf },
+{"moveb", one(0010030), one(0170070), "+s$d", mcf },
+{"moveb", one(0010040), one(0170070), "-s$d", mcf },
+{"moveb", one(0010000), one(0170000), "nsqd", mcf },
+{"moveb", one(0010000), one(0170700), "obDd", mcf },
+{"moveb", one(0010200), one(0170700), "obad", mcf },
+{"moveb", one(0010300), one(0170700), "ob+d", mcf },
+{"moveb", one(0010400), one(0170700), "ob-d", mcf },
+{"moveb", one(0010000), one(0170000), "obnd", mcf5407 },
{"movew", one(0030000), one(0170000), "*w%d", m68000up },
{"movew", one(0030000), one(0170000), "ms%d", mcf },
{"movew", one(0030000), one(0170000), "nspd", mcf },
{"movew", one(0030000), one(0170000), "owmd", mcf },
+{"movew", one(0030000), one(0170000), "ownd", mcf5407 },
{"movew", one(0040300), one(0177700), "Ss$s", m68000up },
{"movew", one(0040300), one(0177770), "SsDs", mcf },
{"movew", one(0041300), one(0177700), "Cs$s", m68010up },
@@ -1359,23 +1370,25 @@ const struct m68k_opcode m68k_opcodes[] =
{"movel", one(0020000), one(0170000), "ms%d", mcf },
{"movel", one(0020000), one(0170000), "nspd", mcf },
{"movel", one(0020000), one(0170000), "olmd", mcf },
+{"movel", one(0020000), one(0170000), "olnd", mcf5407 },
{"movel", one(0047140), one(0177770), "AsUd", m68000up },
{"movel", one(0047150), one(0177770), "UdAs", m68000up },
-{"movel", one(0120600), one(0177760), "EsRs", mcf5307 | mcf5206e },
-{"movel", one(0120400), one(0177760), "RsEs", mcf5307 | mcf5206e },
-{"movel", one(0120474), one(0177777), "#lEs", mcf5307 | mcf5206e },
-{"movel", one(0124600), one(0177760), "GsRs", mcf5307 | mcf5206e },
-{"movel", one(0124400), one(0177760), "RsGs", mcf5307 | mcf5206e },
-{"movel", one(0124474), one(0177777), "#lGs", mcf5307 | mcf5206e },
-{"movel", one(0126600), one(0177760), "HsRs", mcf5307 | mcf5206e },
-{"movel", one(0126400), one(0177760), "RsHs", mcf5307 | mcf5206e },
-{"movel", one(0126474), one(0177777), "#lHs", mcf5307 | mcf5206e },
-{"movel", one(0124700), one(0177777), "GsCs", mcf5307 | mcf5206e },
+{"movel", one(0120600), one(0177760), "EsRs", mcf5307up | mcf5206e },
+{"movel", one(0120400), one(0177760), "RsEs", mcf5307up | mcf5206e },
+{"movel", one(0120474), one(0177777), "#lEs", mcf5307up | mcf5206e },
+{"movel", one(0124600), one(0177760), "GsRs", mcf5307up | mcf5206e },
+{"movel", one(0124400), one(0177760), "RsGs", mcf5307up | mcf5206e },
+{"movel", one(0124474), one(0177777), "#lGs", mcf5307up | mcf5206e },
+{"movel", one(0126600), one(0177760), "HsRs", mcf5307up | mcf5206e },
+{"movel", one(0126400), one(0177760), "RsHs", mcf5307up | mcf5206e },
+{"movel", one(0126474), one(0177777), "#lHs", mcf5307up | mcf5206e },
+{"movel", one(0124700), one(0177777), "GsCs", mcf5307up | mcf5206e },
{"move", one(0030000), one(0170000), "*w%d", m68000up },
{"move", one(0030000), one(0170000), "ms%d", mcf },
{"move", one(0030000), one(0170000), "nspd", mcf },
{"move", one(0030000), one(0170000), "owmd", mcf },
+{"move", one(0030000), one(0170000), "ownd", mcf5407 },
{"move", one(0040300), one(0177700), "Ss$s", m68000up },
{"move", one(0040300), one(0177770), "SsDs", mcf },
{"move", one(0041300), one(0177700), "Cs$s", m68010up },
@@ -1390,6 +1403,12 @@ const struct m68k_opcode m68k_opcodes[] =
{"move", one(0047140), one(0177770), "AsUd", m68000up },
{"move", one(0047150), one(0177770), "UdAs", m68000up },
+{"mov3ql", one(0120500), one(0170700), "Qd%s", mcf5407 },
+{"mvsb", one(0070400), one(0170700), "*bDd", mcf5407 },
+{"mvsw", one(0070500), one(0170700), "*wDd", mcf5407 },
+{"mvzb", one(0070600), one(0170700), "*bDd", mcf5407 },
+{"mvzw", one(0070700), one(0170700), "*wDd", mcf5407 },
+
{"movesb", two(0007000, 0), two(0177700, 07777), "~sR1", m68010up },
{"movesb", two(0007000, 04000), two(0177700, 07777), "R1~s", m68010up },
{"movesw", two(0007100, 0), two(0177700, 07777), "~sR1", m68010up },
@@ -1404,43 +1423,43 @@ const struct m68k_opcode m68k_opcodes[] =
{"move16", one(0xf618), one(0xfff8), "_Las", m68040up },
/* FIXME: add MAM mode (`&' after <ea> operand) / remove MSACM */
-{"msacw", two(0120000, 0000400), two(0170660, 0005400), "uMum", mcf5307 | mcf5206e },
-{"msacw", two(0120000, 0001400), two(0170660, 0005400), "uMumMh", mcf5307 | mcf5206e },
-{"msacw", two(0120220, 0000400), two(0170670, 0005460), "uNuoasRn", mcf5307 | mcf5206e },
-{"msacw", two(0120230, 0000400), two(0170670, 0005460), "uNuo+sRn", mcf5307 | mcf5206e },
-{"msacw", two(0120240, 0000400), two(0170670, 0005460), "uNuo-sRn", mcf5307 | mcf5206e },
-{"msacw", two(0120250, 0000400), two(0170670, 0005460), "uNuodsRn", mcf5307 | mcf5206e },
-{"msacw", two(0120220, 0001400), two(0170670, 0005460), "uNuoMhasRn", mcf5307 | mcf5206e },
-{"msacw", two(0120230, 0001400), two(0170670, 0005460), "uNuoMh+sRn", mcf5307 | mcf5206e },
-{"msacw", two(0120240, 0001400), two(0170670, 0005460), "uNuoMh-sRn", mcf5307 | mcf5206e },
-{"msacw", two(0120250, 0001400), two(0170670, 0005460), "uNuoMhdsRn", mcf5307 | mcf5206e },
-{"msacmw", two(0120220, 0000440), two(0170670, 0005460), "uNuoasRn", mcf5307 | mcf5206e },
-{"msacmw", two(0120230, 0000440), two(0170670, 0005460), "uNuo+sRn", mcf5307 | mcf5206e },
-{"msacmw", two(0120240, 0000440), two(0170670, 0005460), "uNuo-sRn", mcf5307 | mcf5206e },
-{"msacmw", two(0120250, 0000440), two(0170670, 0005460), "uNuodsRn", mcf5307 | mcf5206e },
-{"msacmw", two(0120220, 0001440), two(0170670, 0005460), "uNuoMhasRn", mcf5307 | mcf5206e },
-{"msacmw", two(0120230, 0001440), two(0170670, 0005460), "uNuoMh+sRn", mcf5307 | mcf5206e },
-{"msacmw", two(0120240, 0001440), two(0170670, 0005460), "uNuoMh-sRn", mcf5307 | mcf5206e },
-{"msacmw", two(0120250, 0001440), two(0170670, 0005460), "uNuoMhdsRn", mcf5307 | mcf5206e },
-
-{"msacl", two(0120000, 0004400), two(0170660, 0005400), "RsRm", mcf5307 | mcf5206e },
-{"msacl", two(0120000, 0005400), two(0170660, 0005400), "RsRmMh", mcf5307 | mcf5206e },
-{"msacl", two(0120220, 0004400), two(0170670, 0005460), "R3R1asRn", mcf5307 | mcf5206e },
-{"msacl", two(0120230, 0004400), two(0170670, 0005460), "R3R1+sRn", mcf5307 | mcf5206e },
-{"msacl", two(0120240, 0004400), two(0170670, 0005460), "R3R1-sRn", mcf5307 | mcf5206e },
-{"msacl", two(0120250, 0004400), two(0170670, 0005460), "R3R1dsRn", mcf5307 | mcf5206e },
-{"msacl", two(0120220, 0005400), two(0170670, 0005460), "R3R1MhasRn", mcf5307 | mcf5206e },
-{"msacl", two(0120230, 0005400), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307 | mcf5206e },
-{"msacl", two(0120240, 0005400), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307 | mcf5206e },
-{"msacl", two(0120250, 0005400), two(0170670, 0005460), "R3R1MhdsRn", mcf5307 | mcf5206e },
-{"msacml", two(0120220, 0004440), two(0170670, 0005460), "R3R1asRn", mcf5307 | mcf5206e },
-{"msacml", two(0120230, 0004440), two(0170670, 0005460), "R3R1+sRn", mcf5307 | mcf5206e },
-{"msacml", two(0120240, 0004440), two(0170670, 0005460), "R3R1-sRn", mcf5307 | mcf5206e },
-{"msacml", two(0120250, 0004440), two(0170670, 0005460), "R3R1dsRn", mcf5307 | mcf5206e },
-{"msacml", two(0120220, 0005440), two(0170670, 0005460), "R3R1MhasRn", mcf5307 | mcf5206e },
-{"msacml", two(0120230, 0005440), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307 | mcf5206e },
-{"msacml", two(0120240, 0005440), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307 | mcf5206e },
-{"msacml", two(0120250, 0005440), two(0170670, 0005460), "R3R1MhdsRn", mcf5307 | mcf5206e },
+{"msacw", two(0120000, 0000400), two(0170660, 0005400), "uMum", mcf5307up | mcf5206e },
+{"msacw", two(0120000, 0001400), two(0170660, 0005400), "uMumMh", mcf5307up | mcf5206e },
+{"msacw", two(0120220, 0000400), two(0170670, 0005460), "uNuoasRn", mcf5307up | mcf5206e },
+{"msacw", two(0120230, 0000400), two(0170670, 0005460), "uNuo+sRn", mcf5307up | mcf5206e },
+{"msacw", two(0120240, 0000400), two(0170670, 0005460), "uNuo-sRn", mcf5307up | mcf5206e },
+{"msacw", two(0120250, 0000400), two(0170670, 0005460), "uNuodsRn", mcf5307up | mcf5206e },
+{"msacw", two(0120220, 0001400), two(0170670, 0005460), "uNuoMhasRn", mcf5307up | mcf5206e },
+{"msacw", two(0120230, 0001400), two(0170670, 0005460), "uNuoMh+sRn", mcf5307up | mcf5206e },
+{"msacw", two(0120240, 0001400), two(0170670, 0005460), "uNuoMh-sRn", mcf5307up | mcf5206e },
+{"msacw", two(0120250, 0001400), two(0170670, 0005460), "uNuoMhdsRn", mcf5307up | mcf5206e },
+{"msacmw", two(0120220, 0000440), two(0170670, 0005460), "uNuoasRn", mcf5307up | mcf5206e },
+{"msacmw", two(0120230, 0000440), two(0170670, 0005460), "uNuo+sRn", mcf5307up | mcf5206e },
+{"msacmw", two(0120240, 0000440), two(0170670, 0005460), "uNuo-sRn", mcf5307up | mcf5206e },
+{"msacmw", two(0120250, 0000440), two(0170670, 0005460), "uNuodsRn", mcf5307up | mcf5206e },
+{"msacmw", two(0120220, 0001440), two(0170670, 0005460), "uNuoMhasRn", mcf5307up | mcf5206e },
+{"msacmw", two(0120230, 0001440), two(0170670, 0005460), "uNuoMh+sRn", mcf5307up | mcf5206e },
+{"msacmw", two(0120240, 0001440), two(0170670, 0005460), "uNuoMh-sRn", mcf5307up | mcf5206e },
+{"msacmw", two(0120250, 0001440), two(0170670, 0005460), "uNuoMhdsRn", mcf5307up | mcf5206e },
+
+{"msacl", two(0120000, 0004400), two(0170660, 0005400), "RsRm", mcf5307up | mcf5206e },
+{"msacl", two(0120000, 0005400), two(0170660, 0005400), "RsRmMh", mcf5307up | mcf5206e },
+{"msacl", two(0120220, 0004400), two(0170670, 0005460), "R3R1asRn", mcf5307up | mcf5206e },
+{"msacl", two(0120230, 0004400), two(0170670, 0005460), "R3R1+sRn", mcf5307up | mcf5206e },
+{"msacl", two(0120240, 0004400), two(0170670, 0005460), "R3R1-sRn", mcf5307up | mcf5206e },
+{"msacl", two(0120250, 0004400), two(0170670, 0005460), "R3R1dsRn", mcf5307up | mcf5206e },
+{"msacl", two(0120220, 0005400), two(0170670, 0005460), "R3R1MhasRn", mcf5307up | mcf5206e },
+{"msacl", two(0120230, 0005400), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307up | mcf5206e },
+{"msacl", two(0120240, 0005400), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307up | mcf5206e },
+{"msacl", two(0120250, 0005400), two(0170670, 0005460), "R3R1MhdsRn", mcf5307up | mcf5206e },
+{"msacml", two(0120220, 0004440), two(0170670, 0005460), "R3R1asRn", mcf5307up | mcf5206e },
+{"msacml", two(0120230, 0004440), two(0170670, 0005460), "R3R1+sRn", mcf5307up | mcf5206e },
+{"msacml", two(0120240, 0004440), two(0170670, 0005460), "R3R1-sRn", mcf5307up | mcf5206e },
+{"msacml", two(0120250, 0004440), two(0170670, 0005460), "R3R1dsRn", mcf5307up | mcf5206e },
+{"msacml", two(0120220, 0005440), two(0170670, 0005460), "R3R1MhasRn", mcf5307up | mcf5206e },
+{"msacml", two(0120230, 0005440), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307up | mcf5206e },
+{"msacml", two(0120240, 0005440), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307up | mcf5206e },
+{"msacml", two(0120250, 0005440), two(0170670, 0005460), "R3R1MhdsRn", mcf5307up | mcf5206e },
{"mulsw", one(0140700), one(0170700), ";wDd", m68000up|mcf },
{"mulsl", two(0046000,004000), two(0177700,0107770), ";lD1", m68020up|cpu32 },
@@ -1717,8 +1736,8 @@ const struct m68k_opcode m68k_opcodes[] =
{"pvalid", two(0xf000, 0x2c00), two(0xffc0, 0xfff8), "A3&s", m68851 },
/* FIXME: don't allow Dw==Dx. */
-{"remsl", two(0x4c40, 0x0800), two(0xffc0, 0x8ff8), "vsD3D1", mcf5307 | mcf5206e },
-{"remul", two(0x4c40, 0x0000), two(0xffc0, 0x8ff8), "vsD3D1", mcf5307 | mcf5206e },
+{"remsl", two(0x4c40, 0x0800), two(0xffc0, 0x8ff8), "qsD3D1", mcf5307up | mcf5206e },
+{"remul", two(0x4c40, 0x0000), two(0xffc0, 0x8ff8), "qsD3D1", mcf5307up | mcf5206e },
{"reset", one(0047160), one(0177777), "", m68000up },
@@ -1756,18 +1775,19 @@ const struct m68k_opcode m68k_opcodes[] =
{"rtd", one(0047164), one(0177777), "#w", m68010up },
-{"rte", one(0047163), one(0177777), "", m68000up|mcf },
+{"rte", one(0047163), one(0177777), "", m68000up | mcf },
{"rtm", one(0003300), one(0177760), "Rs", m68020 },
{"rtr", one(0047167), one(0177777), "", m68000up },
-{"rts", one(0047165), one(0177777), "", m68000up|mcf },
+{"rts", one(0047165), one(0177777), "", m68000up | mcf },
+
+{"satsl", one(0046200), one(0177770), "Ds", mcf5407 },
{"sbcd", one(0100400), one(0170770), "DsDd", m68000up },
{"sbcd", one(0100410), one(0170770), "-s-d", m68000up },
-
{"scc", one(0052300), one(0177700), "$s", m68000up },
{"scc", one(0052300), one(0177700), "Ds", mcf },
{"scs", one(0052700), one(0177700), "$s", m68000up },
@@ -1850,7 +1870,7 @@ const struct m68k_opcode m68k_opcodes[] =
{"swbeg", one(0045374), one(0177777), "#w", m68000up | mcf },
{"swbegl", one(0045375), one(0177777), "#l", m68000up | mcf },
-{"tas", one(0045300), one(0177700), "$s", m68000up },
+{"tas", one(0045300), one(0177700), "$s", m68000up | mcf5407 },
#define TBL1(name,signed,round,size) \
{name, two(0174000, (signed<<11)|(!round<<10)|(size<<6)|0000400), \
@@ -2089,6 +2109,7 @@ const struct m68k_opcode_alias m68k_opcode_aliases[] =
{ "ror", "rorw", },
{ "roxl", "roxlw", },
{ "roxr", "roxrw", },
+ { "sats", "satsl", },
{ "sbcdb", "sbcd", },
{ "sccb", "scc", },
{ "scsb", "scs", },
@@ -2150,6 +2171,7 @@ const struct m68k_opcode_alias m68k_opcode_aliases[] =
{ "movsb", "movesb", },
{ "movsl", "movesl", },
{ "movsw", "movesw", },
+ { "mov3q", "mov3ql", },
{ "tdivul", "divul", }, /* for m68k-svr4 */
{ "fmovb", "fmoveb", },
diff --git a/gnu/usr.bin/binutils/opcodes/m88k-dis.c b/gnu/usr.bin/binutils/opcodes/m88k-dis.c
index ef3f32a284b..f0336c7bd5f 100644
--- a/gnu/usr.bin/binutils/opcodes/m88k-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/m88k-dis.c
@@ -1,5 +1,5 @@
/* Print instructions for the Motorola 88000, for GDB and GNU Binutils.
- Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 2000
Free Software Foundation, Inc.
Contributed by Data General Corporation, November 1989.
Partially derived from an earlier printcmd.c.
diff --git a/gnu/usr.bin/binutils/opcodes/mips-dis.c b/gnu/usr.bin/binutils/opcodes/mips-dis.c
index 9ab9f98690c..3d737f67c31 100644
--- a/gnu/usr.bin/binutils/opcodes/mips-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/mips-dis.c
@@ -1,5 +1,7 @@
/* Print mips instructions for GDB, the GNU debugger, or for objdump.
- Copyright (c) 1989, 91-97, 1998 Free Software Foundation, Inc.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Nobuyuki Hikichi(hikichi@sra.co.jp).
This file is part of GDB, GAS, and the GNU binutils.
@@ -34,44 +36,65 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf/mips.h"
#endif
-static int print_insn_mips16 PARAMS ((bfd_vma, struct disassemble_info *));
+/* Mips instructions are at maximum this many bytes long. */
+#define INSNLEN 4
+
+static int _print_insn_mips
+ PARAMS ((bfd_vma, struct disassemble_info *, enum bfd_endian));
+static int print_insn_mips
+ PARAMS ((bfd_vma, unsigned long int, struct disassemble_info *));
+static void print_insn_arg
+ PARAMS ((const char *, unsigned long, bfd_vma, struct disassemble_info *));
+static int print_insn_mips16
+ PARAMS ((bfd_vma, struct disassemble_info *));
static void print_mips16_insn_arg
PARAMS ((int, const struct mips_opcode *, int, boolean, int, bfd_vma,
struct disassemble_info *));
-
-/* Mips instructions are never longer than this many bytes. */
-#define MAXLEN 4
-
-static void print_insn_arg PARAMS ((const char *, unsigned long, bfd_vma,
- struct disassemble_info *));
-static int _print_insn_mips PARAMS ((bfd_vma, unsigned long int,
- struct disassemble_info *));
-
-/* FIXME: This should be shared with gdb somehow. */
-#define REGISTER_NAMES \
- { "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", \
- "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", \
- "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \
- "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra", \
- "sr", "lo", "hi", "bad", "cause","pc", \
- "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",\
- "fsr", "fir", "fp", "inx", "rand", "tlblo","ctxt", "tlbhi",\
- "epc", "prid"\
- }
-
-static CONST char * CONST reg_names[] = REGISTER_NAMES;
+/* FIXME: These should be shared with gdb somehow. */
/* The mips16 register names. */
static const char * const mips16_reg_names[] =
{
"s0", "s1", "v0", "v1", "a0", "a1", "a2", "a3"
};
+
+static const char * const mips32_reg_names[] =
+{
+ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
+ "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
+ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
+ "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra",
+ "sr", "lo", "hi", "bad", "cause", "pc",
+ "fv0", "$f1", "fv1", "$f3", "ft0", "$f5", "ft1", "$f7",
+ "ft2", "$f9", "ft3", "$f11", "fa0", "$f13", "fa1", "$f15",
+ "ft4", "f17", "ft5", "f19", "fs0", "f21", "fs1", "f23",
+ "fs2", "$f25", "fs3", "$f27", "fs4", "$f29", "fs5", "$f31",
+ "fsr", "fir", "fp", "inx", "rand", "tlblo", "ctxt", "tlbhi",
+ "epc", "prid"
+};
+
+static const char * const mips64_reg_names[] =
+{
+ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
+ "a4", "a5", "a6", "a7", "t0", "t1", "t2", "t3",
+ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
+ "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra",
+ "sr", "lo", "hi", "bad", "cause", "pc",
+ "fv0", "$f1", "fv1", "$f3", "ft0", "ft1", "ft2", "ft3",
+ "ft4", "ft5", "ft6", "ft7", "fa0", "fa1", "fa2", "fa3",
+ "fa4", "fa5", "fa6", "fa7", "ft8", "ft9", "ft10", "ft11",
+ "fs0", "fs1", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7",
+ "fsr", "fir", "fp", "inx", "rand", "tlblo", "ctxt", "tlbhi",
+ "epc", "prid"
+};
+
+/* Scalar register names. _print_insn_mips() decides which register name
+ table to use. */
+static const char * const *reg_names = NULL;
-/* subroutine */
+/* Print insn arguments for 32/64-bit code */
+
static void
print_insn_arg (d, l, pc, info)
const char *d;
@@ -93,13 +116,13 @@ print_insn_arg (d, l, pc, info)
case 'b':
case 'r':
case 'v':
- (*info->fprintf_func) (info->stream, "$%s",
+ (*info->fprintf_func) (info->stream, "%s",
reg_names[(l >> OP_SH_RS) & OP_MASK_RS]);
break;
case 't':
case 'w':
- (*info->fprintf_func) (info->stream, "$%s",
+ (*info->fprintf_func) (info->stream, "%s",
reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
break;
@@ -132,7 +155,8 @@ print_insn_arg (d, l, pc, info)
case 'a':
(*info->print_address_func)
- (((pc & 0xF0000000) | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2)),
+ ((((pc + 4) & ~ (bfd_vma) 0x0fffffff)
+ | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2)),
info);
break;
@@ -142,17 +166,41 @@ print_insn_arg (d, l, pc, info)
if (delta & 0x8000)
delta |= ~0xffff;
(*info->print_address_func)
- ((delta << 2) + pc + 4,
+ ((delta << 2) + pc + INSNLEN,
info);
break;
case 'd':
- (*info->fprintf_func) (info->stream, "$%s",
+ (*info->fprintf_func) (info->stream, "%s",
reg_names[(l >> OP_SH_RD) & OP_MASK_RD]);
break;
+ case 'U':
+ {
+ /* First check for both rd and rt being equal. */
+ unsigned int reg = (l >> OP_SH_RD) & OP_MASK_RD;
+ if (reg == ((l >> OP_SH_RT) & OP_MASK_RT))
+ (*info->fprintf_func) (info->stream, "%s",
+ reg_names[reg]);
+ else
+ {
+ /* If one is zero use the other. */
+ if (reg == 0)
+ (*info->fprintf_func) (info->stream, "%s",
+ reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+ else if (((l >> OP_SH_RT) & OP_MASK_RT) == 0)
+ (*info->fprintf_func) (info->stream, "%s",
+ reg_names[reg]);
+ else /* Bogus, result depends on processor. */
+ (*info->fprintf_func) (info->stream, "%s or %s",
+ reg_names[reg],
+ reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+ }
+ }
+ break;
+
case 'z':
- (*info->fprintf_func) (info->stream, "$%s", reg_names[0]);
+ (*info->fprintf_func) (info->stream, "%s", reg_names[0]);
break;
case '<':
@@ -165,7 +213,6 @@ print_insn_arg (d, l, pc, info)
(l >> OP_SH_CODE) & OP_MASK_CODE);
break;
-
case 'q':
(*info->fprintf_func) (info->stream, "0x%x",
(l >> OP_SH_CODE2) & OP_MASK_CODE2);
@@ -178,7 +225,12 @@ print_insn_arg (d, l, pc, info)
case 'B':
(*info->fprintf_func) (info->stream, "0x%x",
- (l >> OP_SH_SYSCALL) & OP_MASK_SYSCALL);
+ (l >> OP_SH_CODE20) & OP_MASK_CODE20);
+ break;
+
+ case 'J':
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_CODE19) & OP_MASK_CODE19);
break;
case 'S':
@@ -187,7 +239,6 @@ print_insn_arg (d, l, pc, info)
(l >> OP_SH_FS) & OP_MASK_FS);
break;
-
case 'T':
case 'W':
(*info->fprintf_func) (info->stream, "$f%d",
@@ -205,13 +256,13 @@ print_insn_arg (d, l, pc, info)
break;
case 'E':
- (*info->fprintf_func) (info->stream, "$%d",
- (l >> OP_SH_RT) & OP_MASK_RT);
+ (*info->fprintf_func) (info->stream, "%s",
+ reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
break;
case 'G':
- (*info->fprintf_func) (info->stream, "$%d",
- (l >> OP_SH_RD) & OP_MASK_RD);
+ (*info->fprintf_func) (info->stream, "%s",
+ reg_names[(l >> OP_SH_RD) & OP_MASK_RD]);
break;
case 'N':
@@ -229,6 +280,10 @@ print_insn_arg (d, l, pc, info)
(l >> OP_SH_PERFREG) & OP_MASK_PERFREG);
break;
+ case 'H':
+ (*info->fprintf_func) (info->stream, "%d",
+ (l >> OP_SH_SEL) & OP_MASK_SEL);
+ break;
default:
/* xgettext:c-format */
@@ -239,102 +294,127 @@ print_insn_arg (d, l, pc, info)
}
}
-#if SYMTAB_AVAILABLE
-
-/* Figure out the MIPS ISA and CPU based on the machine number.
- FIXME: What does this have to do with SYMTAB_AVAILABLE? */
+/* Figure out the MIPS ISA and CPU based on the machine number. */
static void
-set_mips_isa_type (mach, isa, cputype)
+mips_isa_type (mach, isa, cputype)
int mach;
int *isa;
int *cputype;
{
- int target_processor = 0;
- int mips_isa = 0;
-
switch (mach)
{
- case bfd_mach_mips3000:
- target_processor = 3000;
- mips_isa = 1;
- break;
- case bfd_mach_mips3900:
- target_processor = 3900;
- mips_isa = 1;
- break;
- case bfd_mach_mips4000:
- target_processor = 4000;
- mips_isa = 3;
- break;
- case bfd_mach_mips4010:
- target_processor = 4010;
- mips_isa = 2;
- break;
- case bfd_mach_mips4100:
- target_processor = 4100;
- mips_isa = 3;
- break;
- case bfd_mach_mips4111:
- target_processor = 4100;
- mips_isa = 3;
- break;
- case bfd_mach_mips4300:
- target_processor = 4300;
- mips_isa = 3;
- break;
- case bfd_mach_mips4400:
- target_processor = 4400;
- mips_isa = 3;
- break;
- case bfd_mach_mips4600:
- target_processor = 4600;
- mips_isa = 3;
- break;
- case bfd_mach_mips4650:
- target_processor = 4650;
- mips_isa = 3;
- break;
- case bfd_mach_mips5000:
- target_processor = 5000;
- mips_isa = 4;
- break;
- case bfd_mach_mips6000:
- target_processor = 6000;
- mips_isa = 2;
- break;
- case bfd_mach_mips8000:
- target_processor = 8000;
- mips_isa = 4;
- break;
- case bfd_mach_mips10000:
- target_processor = 10000;
- mips_isa = 4;
- break;
- case bfd_mach_mips16:
- target_processor = 16;
- mips_isa = 3;
- break;
- default:
- target_processor = 3000;
- mips_isa = 3;
- break;
-
+ case bfd_mach_mips3000:
+ *cputype = CPU_R3000;
+ *isa = ISA_MIPS1;
+ break;
+ case bfd_mach_mips3900:
+ *cputype = CPU_R3900;
+ *isa = ISA_MIPS1;
+ break;
+ case bfd_mach_mips4000:
+ *cputype = CPU_R4000;
+ *isa = ISA_MIPS3;
+ break;
+ case bfd_mach_mips4010:
+ *cputype = CPU_R4010;
+ *isa = ISA_MIPS2;
+ break;
+ case bfd_mach_mips4100:
+ *cputype = CPU_VR4100;
+ *isa = ISA_MIPS3;
+ break;
+ case bfd_mach_mips4111:
+ *cputype = CPU_R4111;
+ *isa = ISA_MIPS3;
+ break;
+ case bfd_mach_mips4300:
+ *cputype = CPU_R4300;
+ *isa = ISA_MIPS3;
+ break;
+ case bfd_mach_mips4400:
+ *cputype = CPU_R4400;
+ *isa = ISA_MIPS3;
+ break;
+ case bfd_mach_mips4600:
+ *cputype = CPU_R4600;
+ *isa = ISA_MIPS3;
+ break;
+ case bfd_mach_mips4650:
+ *cputype = CPU_R4650;
+ *isa = ISA_MIPS3;
+ break;
+ case bfd_mach_mips5000:
+ *cputype = CPU_R5000;
+ *isa = ISA_MIPS4;
+ break;
+ case bfd_mach_mips6000:
+ *cputype = CPU_R6000;
+ *isa = ISA_MIPS2;
+ break;
+ case bfd_mach_mips8000:
+ *cputype = CPU_R8000;
+ *isa = ISA_MIPS4;
+ break;
+ case bfd_mach_mips10000:
+ *cputype = CPU_R10000;
+ *isa = ISA_MIPS4;
+ break;
+ case bfd_mach_mips12000:
+ *cputype = CPU_R12000;
+ *isa = ISA_MIPS4;
+ break;
+ case bfd_mach_mips16:
+ *cputype = CPU_MIPS16;
+ *isa = ISA_MIPS3;
+ break;
+ case bfd_mach_mips32:
+ *cputype = CPU_MIPS32;
+ *isa = ISA_MIPS32;
+ break;
+ case bfd_mach_mips32_4k:
+ *cputype = CPU_MIPS32_4K;
+ *isa = ISA_MIPS32;
+ break;
+ case bfd_mach_mips5:
+ *cputype = CPU_MIPS5;
+ *isa = ISA_MIPS5;
+ break;
+ case bfd_mach_mips64:
+ *cputype = CPU_MIPS64;
+ *isa = ISA_MIPS64;
+ break;
+ case bfd_mach_mips_sb1:
+ *cputype = CPU_SB1;
+ *isa = ISA_MIPS64;
+ break;
+ default:
+ *cputype = CPU_R3000;
+ *isa = ISA_MIPS3;
+ break;
}
-
- *isa = mips_isa;
- *cputype = target_processor;
}
-#endif /* SYMTAB_AVAILABLE */
+/* Figure out ISA from disassemble_info data */
+static int
+get_mips_isa (info)
+ struct disassemble_info *info;
+{
+ int isa;
+ int cpu;
+
+ mips_isa_type (info->mach, &isa, &cpu);
+ return isa;
+}
+
/* Print the mips instruction at address MEMADDR in debugged memory,
on using INFO. Returns length of the instruction, in bytes, which is
- always 4. BIGENDIAN must be 1 if this is big-endian code, 0 if
+ always INSNLEN. BIGENDIAN must be 1 if this is big-endian code, 0 if
this is little-endian code. */
static int
-_print_insn_mips (memaddr, word, info)
+print_insn_mips (memaddr, word, info)
bfd_vma memaddr;
unsigned long int word;
struct disassemble_info *info;
@@ -371,11 +451,11 @@ _print_insn_mips (memaddr, word, info)
FIXME: Where does mips_target_info come from? */
target_processor = mips_target_info.processor;
mips_isa = mips_target_info.isa;
-#else
- set_mips_isa_type (info->mach, &mips_isa, &target_processor);
-#endif
+#else
+ mips_isa_type (info->mach, &mips_isa, &target_processor);
+#endif
- info->bytes_per_chunk = 4;
+ info->bytes_per_chunk = INSNLEN;
info->display_endian = info->endian;
op = mips_hash[(word >> OP_SH_OP) & OP_MASK_OP];
@@ -400,29 +480,29 @@ _print_insn_mips (memaddr, word, info)
print_insn_arg (d, word, memaddr, info);
}
- return 4;
+ return INSNLEN;
}
}
}
/* Handle undefined instructions. */
(*info->fprintf_func) (info->stream, "0x%x", word);
- return 4;
+ return INSNLEN;
}
-
-
+
/* In an environment where we do not know the symbol type of the
instruction we are forced to assume that the low order bit of the
instructions' address may mark it as a mips16 instruction. If we
are single stepping, or the pc is within the disassembled function,
this works. Otherwise, we need a clue. Sometimes. */
-int
-print_insn_big_mips (memaddr, info)
+static int
+_print_insn_mips (memaddr, info, endianness)
bfd_vma memaddr;
struct disassemble_info *info;
+ enum bfd_endian endianness;
{
- bfd_byte buffer[4];
+ bfd_byte buffer[INSNLEN];
int status;
#if 1
@@ -430,7 +510,7 @@ print_insn_big_mips (memaddr, info)
/* Only a few tools will work this way. */
if (memaddr & 0x01)
return print_insn_mips16 (memaddr, info);
-#endif
+#endif
#if SYMTAB_AVAILABLE
if (info->mach == 16
@@ -439,12 +519,30 @@ print_insn_big_mips (memaddr, info)
&& ((*(elf_symbol_type **) info->symbols)->internal_elf_sym.st_other
== STO_MIPS16)))
return print_insn_mips16 (memaddr, info);
-#endif
+#endif
- status = (*info->read_memory_func) (memaddr, buffer, 4, info);
+ /* Use mips64_reg_names for new ABI. */
+ if (info->flavour == bfd_target_elf_flavour
+ && info->symbols != NULL
+ && (((get_mips_isa(info) | INSN_ISA_MASK) & ISA_MIPS2) != 0)
+ && ((elf_elfheader (bfd_asymbol_bfd(*(info->symbols)))->e_flags
+ & EF_MIPS_ABI2) != 0))
+ reg_names = mips64_reg_names;
+ else
+ reg_names = mips32_reg_names;
+
+ status = (*info->read_memory_func) (memaddr, buffer, INSNLEN, info);
if (status == 0)
- return _print_insn_mips (memaddr, (unsigned long) bfd_getb32 (buffer),
- info);
+ {
+ unsigned long insn;
+
+ if (endianness == BFD_ENDIAN_BIG)
+ insn = (unsigned long) bfd_getb32 (buffer);
+ else
+ insn = (unsigned long) bfd_getl32 (buffer);
+
+ return print_insn_mips (memaddr, insn, info);
+ }
else
{
(*info->memory_error_func) (status, memaddr, info);
@@ -453,37 +551,19 @@ print_insn_big_mips (memaddr, info)
}
int
-print_insn_little_mips (memaddr, info)
+print_insn_big_mips (memaddr, info)
bfd_vma memaddr;
struct disassemble_info *info;
{
- bfd_byte buffer[4];
- int status;
-
-
-#if 1
- if (memaddr & 0x01)
- return print_insn_mips16 (memaddr, info);
-#endif
-
-#if SYMTAB_AVAILABLE
- if (info->mach == 16
- || (info->flavour == bfd_target_elf_flavour
- && info->symbols != NULL
- && ((*(elf_symbol_type **) info->symbols)->internal_elf_sym.st_other
- == STO_MIPS16)))
- return print_insn_mips16 (memaddr, info);
-#endif
+ return _print_insn_mips (memaddr, info, BFD_ENDIAN_BIG);
+}
- status = (*info->read_memory_func) (memaddr, buffer, 4, info);
- if (status == 0)
- return _print_insn_mips (memaddr, (unsigned long) bfd_getl32 (buffer),
- info);
- else
- {
- (*info->memory_error_func) (status, memaddr, info);
- return -1;
- }
+int
+print_insn_little_mips (memaddr, info)
+ bfd_vma memaddr;
+ struct disassemble_info *info;
+{
+ return _print_insn_mips (memaddr, info, BFD_ENDIAN_LITTLE);
}
/* Disassemble mips16 instructions. */
@@ -503,7 +583,6 @@ print_insn_mips16 (memaddr, info)
info->bytes_per_chunk = 2;
info->display_endian = info->endian;
-
info->insn_info_valid = 1;
info->branch_delay_insns = 0;
info->data_size = 0;
@@ -647,7 +726,7 @@ print_insn_mips16 (memaddr, info)
static void
print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
- int type;
+ char type;
const struct mips_opcode *op;
int l;
boolean use_extend;
@@ -665,36 +744,36 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
case 'y':
case 'w':
- (*info->fprintf_func) (info->stream, "$%s",
+ (*info->fprintf_func) (info->stream, "%s",
mips16_reg_names[((l >> MIPS16OP_SH_RY)
& MIPS16OP_MASK_RY)]);
break;
case 'x':
case 'v':
- (*info->fprintf_func) (info->stream, "$%s",
+ (*info->fprintf_func) (info->stream, "%s",
mips16_reg_names[((l >> MIPS16OP_SH_RX)
& MIPS16OP_MASK_RX)]);
break;
case 'z':
- (*info->fprintf_func) (info->stream, "$%s",
+ (*info->fprintf_func) (info->stream, "%s",
mips16_reg_names[((l >> MIPS16OP_SH_RZ)
& MIPS16OP_MASK_RZ)]);
break;
case 'Z':
- (*info->fprintf_func) (info->stream, "$%s",
+ (*info->fprintf_func) (info->stream, "%s",
mips16_reg_names[((l >> MIPS16OP_SH_MOVE32Z)
& MIPS16OP_MASK_MOVE32Z)]);
break;
case '0':
- (*info->fprintf_func) (info->stream, "$%s", reg_names[0]);
+ (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[0]);
break;
case 'S':
- (*info->fprintf_func) (info->stream, "$%s", reg_names[29]);
+ (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[29]);
break;
case 'P':
@@ -702,18 +781,18 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
break;
case 'R':
- (*info->fprintf_func) (info->stream, "$%s", reg_names[31]);
+ (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[31]);
break;
case 'X':
- (*info->fprintf_func) (info->stream, "$%s",
- reg_names[((l >> MIPS16OP_SH_REGR32)
+ (*info->fprintf_func) (info->stream, "%s",
+ mips32_reg_names[((l >> MIPS16OP_SH_REGR32)
& MIPS16OP_MASK_REGR32)]);
break;
case 'Y':
- (*info->fprintf_func) (info->stream, "$%s",
- reg_names[MIPS16OP_EXTRACT_REG32R (l)]);
+ (*info->fprintf_func) (info->stream, "%s",
+ mips32_reg_names[MIPS16OP_EXTRACT_REG32R (l)]);
break;
case '<':
@@ -979,9 +1058,9 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
if (! use_extend)
extend = 0;
l = ((l & 0x1f) << 23) | ((l & 0x3e0) << 13) | (extend << 2);
- (*info->print_address_func) ((memaddr & 0xf0000000) | l, info);
+ (*info->print_address_func) (((memaddr + 4) & 0xf0000000) | l, info);
info->insn_type = dis_jsr;
- info->target = (memaddr & 0xf0000000) | l;
+ info->target = ((memaddr + 4) & 0xf0000000) | l;
info->branch_delay_insns = 1;
break;
@@ -998,10 +1077,10 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
if (amask > 0 && amask < 5)
{
- (*info->fprintf_func) (info->stream, "$%s", reg_names[4]);
+ (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[4]);
if (amask > 1)
- (*info->fprintf_func) (info->stream, "-$%s",
- reg_names[amask + 3]);
+ (*info->fprintf_func) (info->stream, "-%s",
+ mips32_reg_names[amask + 3]);
need_comma = 1;
}
@@ -1014,20 +1093,20 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
}
else if (smask > 0)
{
- (*info->fprintf_func) (info->stream, "%s$%s",
+ (*info->fprintf_func) (info->stream, "%s%s",
need_comma ? "," : "",
- reg_names[16]);
+ mips32_reg_names[16]);
if (smask > 1)
- (*info->fprintf_func) (info->stream, "-$%s",
- reg_names[smask + 15]);
+ (*info->fprintf_func) (info->stream, "-%s",
+ mips32_reg_names[smask + 15]);
need_comma = 1;
}
if (l & 1)
{
- (*info->fprintf_func) (info->stream, "%s$%s",
+ (*info->fprintf_func) (info->stream, "%s%s",
need_comma ? "," : "",
- reg_names[31]);
+ mips32_reg_names[31]);
need_comma = 1;
}
@@ -1042,6 +1121,11 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
break;
default:
+ /* xgettext:c-format */
+ (*info->fprintf_func)
+ (info->stream,
+ _("# internal disassembler error, unrecognised modifier (%c)"),
+ type);
abort ();
}
}
diff --git a/gnu/usr.bin/binutils/opcodes/mips-opc.c b/gnu/usr.bin/binutils/opcodes/mips-opc.c
index b1000db069c..5fc17ba5652 100644
--- a/gnu/usr.bin/binutils/opcodes/mips-opc.c
+++ b/gnu/usr.bin/binutils/opcodes/mips-opc.c
@@ -1,7 +1,9 @@
-/* mips.h. Mips opcode list for GDB, the GNU debugger.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* mips-opc.c -- MIPS opcode list.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Contributed by Ralph Campbell and OSF
Commented and modified by Ian Lance Taylor, Cygnus Support
+ Extended for MIPS32 support by Anders Norlander, and by SiByte, Inc.
This file is part of GDB, GAS, and the GNU binutils.
@@ -37,15 +39,15 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define WR_d INSN_WRITE_GPR_D
#define WR_t INSN_WRITE_GPR_T
-#define WR_31 INSN_WRITE_GPR_31
-#define WR_D INSN_WRITE_FPR_D
+#define WR_31 INSN_WRITE_GPR_31
+#define WR_D INSN_WRITE_FPR_D
#define WR_T INSN_WRITE_FPR_T
#define WR_S INSN_WRITE_FPR_S
-#define RD_s INSN_READ_GPR_S
-#define RD_b INSN_READ_GPR_S
-#define RD_t INSN_READ_GPR_T
-#define RD_S INSN_READ_FPR_S
-#define RD_T INSN_READ_FPR_T
+#define RD_s INSN_READ_GPR_S
+#define RD_b INSN_READ_GPR_S
+#define RD_t INSN_READ_GPR_T
+#define RD_S INSN_READ_FPR_S
+#define RD_T INSN_READ_FPR_T
#define RD_R INSN_READ_FPR_R
#define WR_CC INSN_WRITE_COND_CODE
#define RD_CC INSN_READ_COND_CODE
@@ -77,12 +79,15 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define I3 INSN_ISA3
#define I4 INSN_ISA4
#define I5 INSN_ISA5
+#define I32 INSN_ISA32
+#define I64 INSN_ISA64
+
#define P3 INSN_4650
#define L1 INSN_4010
#define V1 INSN_4100
#define T3 INSN_3900
-#define G1 (T3 \
+#define G1 (T3 \
)
#define G2 (T3 \
@@ -93,9 +98,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define G6 INSN_GP32
-#define M1 0
-#define M2 0
-
/* The order of overloaded instructions matters. Label arguments and
register arguments look the same. Instructions that can have either
for arguments must apear in the correct order in this table for the
@@ -106,721 +108,750 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
Many instructions are short hand for other instructions (i.e., The
jal <register> instruction is short for jalr <register>). */
-const struct mips_opcode mips_builtin_opcodes[] = {
+const struct mips_opcode mips_builtin_opcodes[] =
+{
/* These instructions appear first so that the disassembler will find
them first. The assemblers uses a hash table based on the
instruction name anyhow. */
-/* name, args, mask, match, pinfo */
-{"nop", "", 0x00000000, 0xffffffff, 0, I1 },
-{"li", "t,j", 0x24000000, 0xffe00000, WR_t, I1 }, /* addiu */
-{"li", "t,i", 0x34000000, 0xffe00000, WR_t, I1 }, /* ori */
-{"li", "t,I", 0, (int) M_LI, INSN_MACRO, I1 },
-{"move", "d,s", 0x00000025, 0xfc1f07ff, WR_d|RD_s, I1|G6 },/* or */
-{"move", "d,s", 0x0000002d, 0xfc1f07ff, WR_d|RD_s, I3 },/* daddu */
-{"move", "d,s", 0x00000021, 0xfc1f07ff, WR_d|RD_s, I1 },/* addu */
-{"move", "d,s", 0x00000025, 0xfc1f07ff, WR_d|RD_s, I1 },/* or */
-{"b", "p", 0x10000000, 0xffff0000, UBD, I1 },/* beq 0,0 */
-{"b", "p", 0x04010000, 0xffff0000, UBD, I1 },/* bgez 0 */
-{"bal", "p", 0x04110000, 0xffff0000, UBD|WR_31, I1 },/* bgezal 0*/
-
-{"abs", "d,v", 0, (int) M_ABS, INSN_MACRO, I1 },
-{"abs.s", "D,V", 0x46000005, 0xffff003f, WR_D|RD_S|FP_S, I1 },
-{"abs.d", "D,V", 0x46200005, 0xffff003f, WR_D|RD_S|FP_D, I1 },
-{"abs.ps", "D,V", 0x46c00005, 0xffff003f, WR_D|RD_S|FP_D, I5 },
-{"add", "d,v,t", 0x00000020, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"add", "t,r,I", 0, (int) M_ADD_I, INSN_MACRO, I1 },
-{"add.s", "D,V,T", 0x46000000, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, I1},
-{"add.d", "D,V,T", 0x46200000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I1},
-{"add.ps", "D,V,T", 0x46c00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5},
-{"addi", "t,r,j", 0x20000000, 0xfc000000, WR_t|RD_s, I1 },
-{"addiu", "t,r,j", 0x24000000, 0xfc000000, WR_t|RD_s, I1 },
-{"addu", "d,v,t", 0x00000021, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"addu", "t,r,I", 0, (int) M_ADDU_I, INSN_MACRO, I1 },
-{"alnv.ps", "D,V,T,s", 0x4c00001e, 0xfc00003f, WR_D|RD_S|RD_T|FP_D, I5},
-{"and", "d,v,t", 0x00000024, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"and", "t,r,I", 0, (int) M_AND_I, INSN_MACRO, I1 },
-{"andi", "t,r,i", 0x30000000, 0xfc000000, WR_t|RD_s, I1 },
+/* name, args, match, mask, pinfo, membership */
+{"pref", "k,o(b)", 0xcc000000, 0xfc000000, RD_b, I32|G3 },
+{"nop", "", 0x00000000, 0xffffffff, 0, I1 },
+{"ssnop", "", 0x00000040, 0xffffffff, 0, I32 },
+{"li", "t,j", 0x24000000, 0xffe00000, WR_t, I1 }, /* addiu */
+{"li", "t,i", 0x34000000, 0xffe00000, WR_t, I1 }, /* ori */
+{"li", "t,I", 0, (int) M_LI, INSN_MACRO, I1 },
+{"move", "d,s", 0x00000025, 0xfc1f07ff, WR_d|RD_s, I1|G6 },/* or */
+{"move", "d,s", 0x0000002d, 0xfc1f07ff, WR_d|RD_s, I3 },/* daddu */
+{"move", "d,s", 0x00000021, 0xfc1f07ff, WR_d|RD_s, I1 },/* addu */
+{"move", "d,s", 0x00000025, 0xfc1f07ff, WR_d|RD_s, I1 },/* or */
+{"b", "p", 0x10000000, 0xffff0000, UBD, I1 },/* beq 0,0 */
+{"b", "p", 0x04010000, 0xffff0000, UBD, I1 },/* bgez 0 */
+{"bal", "p", 0x04110000, 0xffff0000, UBD|WR_31, I1 },/* bgezal 0*/
+
+{"abs", "d,v", 0, (int) M_ABS, INSN_MACRO, I1 },
+{"abs.s", "D,V", 0x46000005, 0xffff003f, WR_D|RD_S|FP_S, I1 },
+{"abs.d", "D,V", 0x46200005, 0xffff003f, WR_D|RD_S|FP_D, I1 },
+{"abs.ps", "D,V", 0x46c00005, 0xffff003f, WR_D|RD_S|FP_D, I5 },
+{"add", "d,v,t", 0x00000020, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"add", "t,r,I", 0, (int) M_ADD_I, INSN_MACRO, I1 },
+{"add.s", "D,V,T", 0x46000000, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, I1 },
+{"add.d", "D,V,T", 0x46200000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I1 },
+{"add.ps", "D,V,T", 0x46c00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"addi", "t,r,j", 0x20000000, 0xfc000000, WR_t|RD_s, I1 },
+{"addiu", "t,r,j", 0x24000000, 0xfc000000, WR_t|RD_s, I1 },
+{"addu", "d,v,t", 0x00000021, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"addu", "t,r,I", 0, (int) M_ADDU_I, INSN_MACRO, I1 },
+{"alnv.ps", "D,V,T,s", 0x4c00001e, 0xfc00003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"and", "d,v,t", 0x00000024, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"and", "t,r,I", 0, (int) M_AND_I, INSN_MACRO, I1 },
+{"andi", "t,r,i", 0x30000000, 0xfc000000, WR_t|RD_s, I1 },
/* b is at the top of the table. */
/* bal is at the top of the table. */
-{"bc0f", "p", 0x41000000, 0xffff0000, CBD|RD_CC, I1 },
-{"bc0fl", "p", 0x41020000, 0xffff0000, CBL|RD_CC, I2|T3 },
-{"bc1f", "p", 0x45000000, 0xffff0000, CBD|RD_CC|FP_S, I1|M1 },
-{"bc1f", "N,p", 0x45000000, 0xffe30000, CBD|RD_CC|FP_S, I4|M1 },
-{"bc1fl", "p", 0x45020000, 0xffff0000, CBL|RD_CC|FP_S, I2|T3|M1},
-{"bc1fl", "N,p", 0x45020000, 0xffe30000, CBL|RD_CC|FP_S, I4|M1 },
-{"bc2f", "p", 0x49000000, 0xffff0000, CBD|RD_CC, I1 },
-{"bc2fl", "p", 0x49020000, 0xffff0000, CBL|RD_CC, I2|T3 },
-{"bc3f", "p", 0x4d000000, 0xffff0000, CBD|RD_CC, I1 },
-{"bc3fl", "p", 0x4d020000, 0xffff0000, CBL|RD_CC, I2|T3 },
-{"bc0t", "p", 0x41010000, 0xffff0000, CBD|RD_CC, I1 },
-{"bc0tl", "p", 0x41030000, 0xffff0000, CBL|RD_CC, I2|T3 },
-{"bc1t", "p", 0x45010000, 0xffff0000, CBD|RD_CC|FP_S, I1 },
-{"bc1t", "N,p", 0x45010000, 0xffe30000, CBD|RD_CC|FP_S, I4 },
-{"bc1tl", "p", 0x45030000, 0xffff0000, CBL|RD_CC|FP_S, I2|T3 },
-{"bc1tl", "N,p", 0x45030000, 0xffe30000, CBL|RD_CC|FP_S, I4 },
-{"bc2t", "p", 0x49010000, 0xffff0000, CBD|RD_CC, I1 },
-{"bc2tl", "p", 0x49030000, 0xffff0000, CBL|RD_CC, I2|T3 },
-{"bc3t", "p", 0x4d010000, 0xffff0000, CBD|RD_CC, I1 },
-{"bc3tl", "p", 0x4d030000, 0xffff0000, CBL|RD_CC, I2|T3 },
-{"beqz", "s,p", 0x10000000, 0xfc1f0000, CBD|RD_s, I1 },
-{"beqzl", "s,p", 0x50000000, 0xfc1f0000, CBL|RD_s, I2|T3 },
-{"beq", "s,t,p", 0x10000000, 0xfc000000, CBD|RD_s|RD_t, I1 },
-{"beq", "s,I,p", 0, (int) M_BEQ_I, INSN_MACRO, I1 },
-{"beql", "s,t,p", 0x50000000, 0xfc000000, CBL|RD_s|RD_t, I2|T3 },
-{"beql", "s,I,p", 0, (int) M_BEQL_I, INSN_MACRO, I2 },
-{"bge", "s,t,p", 0, (int) M_BGE, INSN_MACRO, I1 },
-{"bge", "s,I,p", 0, (int) M_BGE_I, INSN_MACRO, I1 },
-{"bgel", "s,t,p", 0, (int) M_BGEL, INSN_MACRO, I2 },
-{"bgel", "s,I,p", 0, (int) M_BGEL_I, INSN_MACRO, I2 },
-{"bgeu", "s,t,p", 0, (int) M_BGEU, INSN_MACRO, I1 },
-{"bgeu", "s,I,p", 0, (int) M_BGEU_I, INSN_MACRO, I1 },
-{"bgeul", "s,t,p", 0, (int) M_BGEUL, INSN_MACRO, I2 },
-{"bgeul", "s,I,p", 0, (int) M_BGEUL_I, INSN_MACRO, I2 },
-{"bgez", "s,p", 0x04010000, 0xfc1f0000, CBD|RD_s, I1 },
-{"bgezl", "s,p", 0x04030000, 0xfc1f0000, CBL|RD_s, I2|T3 },
-{"bgezal", "s,p", 0x04110000, 0xfc1f0000, CBD|RD_s|WR_31, I1 },
-{"bgezall", "s,p", 0x04130000, 0xfc1f0000, CBL|RD_s, I2|T3 },
-{"bgt", "s,t,p", 0, (int) M_BGT, INSN_MACRO, I1 },
-{"bgt", "s,I,p", 0, (int) M_BGT_I, INSN_MACRO, I1 },
-{"bgtl", "s,t,p", 0, (int) M_BGTL, INSN_MACRO, I2 },
-{"bgtl", "s,I,p", 0, (int) M_BGTL_I, INSN_MACRO, I2 },
-{"bgtu", "s,t,p", 0, (int) M_BGTU, INSN_MACRO, I1 },
-{"bgtu", "s,I,p", 0, (int) M_BGTU_I, INSN_MACRO, I1 },
-{"bgtul", "s,t,p", 0, (int) M_BGTUL, INSN_MACRO, I2 },
-{"bgtul", "s,I,p", 0, (int) M_BGTUL_I, INSN_MACRO, I2 },
-{"bgtz", "s,p", 0x1c000000, 0xfc1f0000, CBD|RD_s, I1 },
-{"bgtzl", "s,p", 0x5c000000, 0xfc1f0000, CBL|RD_s, I2|T3 },
-{"ble", "s,t,p", 0, (int) M_BLE, INSN_MACRO, I1 },
-{"ble", "s,I,p", 0, (int) M_BLE_I, INSN_MACRO, I1 },
-{"blel", "s,t,p", 0, (int) M_BLEL, INSN_MACRO, I2 },
-{"blel", "s,I,p", 0, (int) M_BLEL_I, INSN_MACRO, I2 },
-{"bleu", "s,t,p", 0, (int) M_BLEU, INSN_MACRO, I1 },
-{"bleu", "s,I,p", 0, (int) M_BLEU_I, INSN_MACRO, I1 },
-{"bleul", "s,t,p", 0, (int) M_BLEUL, INSN_MACRO, I2 },
-{"bleul", "s,I,p", 0, (int) M_BLEUL_I, INSN_MACRO, I2 },
-{"blez", "s,p", 0x18000000, 0xfc1f0000, CBD|RD_s, I1 },
-{"blezl", "s,p", 0x58000000, 0xfc1f0000, CBL|RD_s, I2|T3 },
-{"blt", "s,t,p", 0, (int) M_BLT, INSN_MACRO, I1 },
-{"blt", "s,I,p", 0, (int) M_BLT_I, INSN_MACRO, I1 },
-{"bltl", "s,t,p", 0, (int) M_BLTL, INSN_MACRO, I2 },
-{"bltl", "s,I,p", 0, (int) M_BLTL_I, INSN_MACRO, I2 },
-{"bltu", "s,t,p", 0, (int) M_BLTU, INSN_MACRO, I1 },
-{"bltu", "s,I,p", 0, (int) M_BLTU_I, INSN_MACRO, I1 },
-{"bltul", "s,t,p", 0, (int) M_BLTUL, INSN_MACRO, I2 },
-{"bltul", "s,I,p", 0, (int) M_BLTUL_I, INSN_MACRO, I2 },
-{"bltz", "s,p", 0x04000000, 0xfc1f0000, CBD|RD_s, I1 },
-{"bltzl", "s,p", 0x04020000, 0xfc1f0000, CBL|RD_s, I2|T3 },
-{"bltzal", "s,p", 0x04100000, 0xfc1f0000, CBD|RD_s|WR_31, I1 },
-{"bltzall", "s,p", 0x04120000, 0xfc1f0000, CBL|RD_s, I2|T3 },
-{"bnez", "s,p", 0x14000000, 0xfc1f0000, CBD|RD_s, I1 },
-{"bnezl", "s,p", 0x54000000, 0xfc1f0000, CBL|RD_s, I2|T3 },
-{"bne", "s,t,p", 0x14000000, 0xfc000000, CBD|RD_s|RD_t, I1 },
-{"bne", "s,I,p", 0, (int) M_BNE_I, INSN_MACRO, I1 },
-{"bnel", "s,t,p", 0x54000000, 0xfc000000, CBL|RD_s|RD_t, I2|T3 },
-{"bnel", "s,I,p", 0, (int) M_BNEL_I, INSN_MACRO, I2 },
-{"break", "", 0x0000000d, 0xffffffff, TRAP, I1 },
-{"break", "c", 0x0000000d, 0xfc00ffff, TRAP, I1 },
-{"break", "c,q", 0x0000000d, 0xfc00003f, TRAP, I1 },
+{"bc0f", "p", 0x41000000, 0xffff0000, CBD|RD_CC, I1 },
+{"bc0fl", "p", 0x41020000, 0xffff0000, CBL|RD_CC, I2|T3 },
+{"bc1f", "p", 0x45000000, 0xffff0000, CBD|RD_CC|FP_S, I1 },
+{"bc1f", "N,p", 0x45000000, 0xffe30000, CBD|RD_CC|FP_S, I4|I32 },
+{"bc1fl", "p", 0x45020000, 0xffff0000, CBL|RD_CC|FP_S, I2|T3 },
+{"bc1fl", "N,p", 0x45020000, 0xffe30000, CBL|RD_CC|FP_S, I4|I32 },
+{"bc2f", "p", 0x49000000, 0xffff0000, CBD|RD_CC, I1 },
+{"bc2fl", "p", 0x49020000, 0xffff0000, CBL|RD_CC, I2|T3 },
+{"bc3f", "p", 0x4d000000, 0xffff0000, CBD|RD_CC, I1 },
+{"bc3fl", "p", 0x4d020000, 0xffff0000, CBL|RD_CC, I2|T3 },
+{"bc0t", "p", 0x41010000, 0xffff0000, CBD|RD_CC, I1 },
+{"bc0tl", "p", 0x41030000, 0xffff0000, CBL|RD_CC, I2|T3 },
+{"bc1t", "p", 0x45010000, 0xffff0000, CBD|RD_CC|FP_S, I1 },
+{"bc1t", "N,p", 0x45010000, 0xffe30000, CBD|RD_CC|FP_S, I4|I32 },
+{"bc1tl", "p", 0x45030000, 0xffff0000, CBL|RD_CC|FP_S, I2|T3 },
+{"bc1tl", "N,p", 0x45030000, 0xffe30000, CBL|RD_CC|FP_S, I4|I32 },
+{"bc2t", "p", 0x49010000, 0xffff0000, CBD|RD_CC, I1 },
+{"bc2tl", "p", 0x49030000, 0xffff0000, CBL|RD_CC, I2|T3 },
+{"bc3t", "p", 0x4d010000, 0xffff0000, CBD|RD_CC, I1 },
+{"bc3tl", "p", 0x4d030000, 0xffff0000, CBL|RD_CC, I2|T3 },
+{"beqz", "s,p", 0x10000000, 0xfc1f0000, CBD|RD_s, I1 },
+{"beqzl", "s,p", 0x50000000, 0xfc1f0000, CBL|RD_s, I2|T3 },
+{"beq", "s,t,p", 0x10000000, 0xfc000000, CBD|RD_s|RD_t, I1 },
+{"beq", "s,I,p", 0, (int) M_BEQ_I, INSN_MACRO, I1 },
+{"beql", "s,t,p", 0x50000000, 0xfc000000, CBL|RD_s|RD_t, I2|T3 },
+{"beql", "s,I,p", 0, (int) M_BEQL_I, INSN_MACRO, I2 },
+{"bge", "s,t,p", 0, (int) M_BGE, INSN_MACRO, I1 },
+{"bge", "s,I,p", 0, (int) M_BGE_I, INSN_MACRO, I1 },
+{"bgel", "s,t,p", 0, (int) M_BGEL, INSN_MACRO, I2 },
+{"bgel", "s,I,p", 0, (int) M_BGEL_I, INSN_MACRO, I2 },
+{"bgeu", "s,t,p", 0, (int) M_BGEU, INSN_MACRO, I1 },
+{"bgeu", "s,I,p", 0, (int) M_BGEU_I, INSN_MACRO, I1 },
+{"bgeul", "s,t,p", 0, (int) M_BGEUL, INSN_MACRO, I2 },
+{"bgeul", "s,I,p", 0, (int) M_BGEUL_I, INSN_MACRO, I2 },
+{"bgez", "s,p", 0x04010000, 0xfc1f0000, CBD|RD_s, I1 },
+{"bgezl", "s,p", 0x04030000, 0xfc1f0000, CBL|RD_s, I2|T3 },
+{"bgezal", "s,p", 0x04110000, 0xfc1f0000, CBD|RD_s|WR_31, I1 },
+{"bgezall", "s,p", 0x04130000, 0xfc1f0000, CBL|RD_s, I2|T3 },
+{"bgt", "s,t,p", 0, (int) M_BGT, INSN_MACRO, I1 },
+{"bgt", "s,I,p", 0, (int) M_BGT_I, INSN_MACRO, I1 },
+{"bgtl", "s,t,p", 0, (int) M_BGTL, INSN_MACRO, I2 },
+{"bgtl", "s,I,p", 0, (int) M_BGTL_I, INSN_MACRO, I2 },
+{"bgtu", "s,t,p", 0, (int) M_BGTU, INSN_MACRO, I1 },
+{"bgtu", "s,I,p", 0, (int) M_BGTU_I, INSN_MACRO, I1 },
+{"bgtul", "s,t,p", 0, (int) M_BGTUL, INSN_MACRO, I2 },
+{"bgtul", "s,I,p", 0, (int) M_BGTUL_I, INSN_MACRO, I2 },
+{"bgtz", "s,p", 0x1c000000, 0xfc1f0000, CBD|RD_s, I1 },
+{"bgtzl", "s,p", 0x5c000000, 0xfc1f0000, CBL|RD_s, I2|T3 },
+{"ble", "s,t,p", 0, (int) M_BLE, INSN_MACRO, I1 },
+{"ble", "s,I,p", 0, (int) M_BLE_I, INSN_MACRO, I1 },
+{"blel", "s,t,p", 0, (int) M_BLEL, INSN_MACRO, I2 },
+{"blel", "s,I,p", 0, (int) M_BLEL_I, INSN_MACRO, I2 },
+{"bleu", "s,t,p", 0, (int) M_BLEU, INSN_MACRO, I1 },
+{"bleu", "s,I,p", 0, (int) M_BLEU_I, INSN_MACRO, I1 },
+{"bleul", "s,t,p", 0, (int) M_BLEUL, INSN_MACRO, I2 },
+{"bleul", "s,I,p", 0, (int) M_BLEUL_I, INSN_MACRO, I2 },
+{"blez", "s,p", 0x18000000, 0xfc1f0000, CBD|RD_s, I1 },
+{"blezl", "s,p", 0x58000000, 0xfc1f0000, CBL|RD_s, I2|T3 },
+{"blt", "s,t,p", 0, (int) M_BLT, INSN_MACRO, I1 },
+{"blt", "s,I,p", 0, (int) M_BLT_I, INSN_MACRO, I1 },
+{"bltl", "s,t,p", 0, (int) M_BLTL, INSN_MACRO, I2 },
+{"bltl", "s,I,p", 0, (int) M_BLTL_I, INSN_MACRO, I2 },
+{"bltu", "s,t,p", 0, (int) M_BLTU, INSN_MACRO, I1 },
+{"bltu", "s,I,p", 0, (int) M_BLTU_I, INSN_MACRO, I1 },
+{"bltul", "s,t,p", 0, (int) M_BLTUL, INSN_MACRO, I2 },
+{"bltul", "s,I,p", 0, (int) M_BLTUL_I, INSN_MACRO, I2 },
+{"bltz", "s,p", 0x04000000, 0xfc1f0000, CBD|RD_s, I1 },
+{"bltzl", "s,p", 0x04020000, 0xfc1f0000, CBL|RD_s, I2|T3 },
+{"bltzal", "s,p", 0x04100000, 0xfc1f0000, CBD|RD_s|WR_31, I1 },
+{"bltzall", "s,p", 0x04120000, 0xfc1f0000, CBL|RD_s, I2|T3 },
+{"bnez", "s,p", 0x14000000, 0xfc1f0000, CBD|RD_s, I1 },
+{"bnezl", "s,p", 0x54000000, 0xfc1f0000, CBL|RD_s, I2|T3 },
+{"bne", "s,t,p", 0x14000000, 0xfc000000, CBD|RD_s|RD_t, I1 },
+{"bne", "s,I,p", 0, (int) M_BNE_I, INSN_MACRO, I1 },
+{"bnel", "s,t,p", 0x54000000, 0xfc000000, CBL|RD_s|RD_t, I2|T3 },
+{"bnel", "s,I,p", 0, (int) M_BNEL_I, INSN_MACRO, I2 },
+{"break", "", 0x0000000d, 0xffffffff, TRAP, I1 },
+{"break", "B", 0x0000000d, 0xfc00003f, TRAP, I32 },
+{"break", "c", 0x0000000d, 0xfc00ffff, TRAP, I1 },
+{"break", "c,q", 0x0000000d, 0xfc00003f, TRAP, I1 },
{"c.f.d", "S,T", 0x46200030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.f.d", "M,S,T", 0x46200030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.f.s", "S,T", 0x46000030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.f.s", "M,S,T", 0x46000030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.f.d", "M,S,T", 0x46200030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.f.s", "S,T", 0x46000030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.f.s", "M,S,T", 0x46000030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.f.ps", "S,T", 0x46c00030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.f.ps", "M,S,T", 0x46c00030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.un.d", "S,T", 0x46200031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.un.d", "M,S,T", 0x46200031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.un.s", "S,T", 0x46000031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.un.s", "M,S,T", 0x46000031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.un.d", "M,S,T", 0x46200031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.un.s", "S,T", 0x46000031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.un.s", "M,S,T", 0x46000031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.un.ps", "S,T", 0x46c00031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.un.ps", "M,S,T", 0x46c00031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.eq.d", "S,T", 0x46200032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.eq.d", "M,S,T", 0x46200032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.eq.s", "S,T", 0x46000032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.eq.s", "M,S,T", 0x46000032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.eq.d", "M,S,T", 0x46200032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.eq.s", "S,T", 0x46000032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.eq.s", "M,S,T", 0x46000032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.eq.ps", "S,T", 0x46c00032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.eq.ps", "M,S,T", 0x46c00032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ueq.d", "S,T", 0x46200033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.ueq.d", "M,S,T", 0x46200033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.ueq.s", "S,T", 0x46000033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.ueq.s", "M,S,T", 0x46000033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.ueq.d", "M,S,T", 0x46200033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.ueq.s", "S,T", 0x46000033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.ueq.s", "M,S,T", 0x46000033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.ueq.ps","S,T", 0x46c00033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ueq.ps","M,S,T", 0x46c00033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.lt.s", "S,T", 0x4600003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.lt.s", "M,S,T", 0x4600003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
-{"c.olt.d", "S,T", 0x46200034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.olt.d", "M,S,T", 0x46200034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
+{"c.lt.s", "M,S,T", 0x4600003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
+{"c.olt.d", "S,T", 0x46200034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
+{"c.olt.d", "M,S,T", 0x46200034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.olt.s", "S,T", 0x46000034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.olt.s", "M,S,T", 0x46000034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.olt.s", "M,S,T", 0x46000034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.olt.ps","S,T", 0x46c00034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.olt.ps","M,S,T", 0x46c00034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ult.d", "S,T", 0x46200035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.ult.d", "M,S,T", 0x46200035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.ult.s", "S,T", 0x46000035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.ult.s", "M,S,T", 0x46000035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.ult.d", "M,S,T", 0x46200035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.ult.s", "S,T", 0x46000035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.ult.s", "M,S,T", 0x46000035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.ult.ps","S,T", 0x46c00035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ult.ps","M,S,T", 0x46c00035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.le.s", "S,T", 0x4600003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.le.s", "M,S,T", 0x4600003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
-{"c.ole.d", "S,T", 0x46200036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.ole.d", "M,S,T", 0x46200036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.ole.s", "S,T", 0x46000036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.ole.s", "M,S,T", 0x46000036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.le.s", "M,S,T", 0x4600003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
+{"c.ole.d", "S,T", 0x46200036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
+{"c.ole.d", "M,S,T", 0x46200036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.ole.s", "S,T", 0x46000036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.ole.s", "M,S,T", 0x46000036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.ole.ps","S,T", 0x46c00036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ole.ps","M,S,T", 0x46c00036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ule.d", "S,T", 0x46200037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.ule.d", "M,S,T", 0x46200037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.ule.s", "S,T", 0x46000037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.ule.s", "M,S,T", 0x46000037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.ule.d", "M,S,T", 0x46200037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.ule.s", "S,T", 0x46000037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.ule.s", "M,S,T", 0x46000037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.ule.ps","S,T", 0x46c00037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ule.ps","M,S,T", 0x46c00037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.sf.d", "S,T", 0x46200038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.sf.d", "M,S,T", 0x46200038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.sf.s", "S,T", 0x46000038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.sf.s", "M,S,T", 0x46000038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.sf.d", "M,S,T", 0x46200038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.sf.s", "S,T", 0x46000038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.sf.s", "M,S,T", 0x46000038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.sf.ps", "S,T", 0x46c00038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.sf.ps", "M,S,T", 0x46c00038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ngle.d","S,T", 0x46200039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.ngle.d","M,S,T", 0x46200039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.ngle.s","S,T", 0x46000039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.ngle.s","M,S,T", 0x46000039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.ngle.d","M,S,T", 0x46200039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.ngle.s","S,T", 0x46000039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.ngle.s","M,S,T", 0x46000039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.ngle.ps","S,T", 0x46c00039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ngle.ps","M,S,T", 0x46c00039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.seq.d", "S,T", 0x4620003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.seq.d", "M,S,T", 0x4620003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.seq.s", "S,T", 0x4600003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.seq.s", "M,S,T", 0x4600003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.seq.d", "M,S,T", 0x4620003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.seq.s", "S,T", 0x4600003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.seq.s", "M,S,T", 0x4600003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.seq.ps","S,T", 0x46c0003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.seq.ps","M,S,T", 0x46c0003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ngl.d", "S,T", 0x4620003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.ngl.d", "M,S,T", 0x4620003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.ngl.s", "S,T", 0x4600003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.ngl.s", "M,S,T", 0x4600003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.ngl.d", "M,S,T", 0x4620003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.ngl.s", "S,T", 0x4600003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.ngl.s", "M,S,T", 0x4600003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.ngl.ps","S,T", 0x46c0003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ngl.ps","M,S,T", 0x46c0003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.lt.d", "S,T", 0x4620003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.lt.d", "M,S,T", 0x4620003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
+{"c.lt.d", "M,S,T", 0x4620003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.lt.ps", "S,T", 0x46c0003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.lt.ps", "M,S,T", 0x46c0003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.nge.d", "S,T", 0x4620003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.nge.d", "M,S,T", 0x4620003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.nge.s", "S,T", 0x4600003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.nge.s", "M,S,T", 0x4600003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.nge.d", "M,S,T", 0x4620003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.nge.s", "S,T", 0x4600003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.nge.s", "M,S,T", 0x4600003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.nge.ps","S,T", 0x46c0003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.nge.ps","M,S,T", 0x46c0003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.le.d", "S,T", 0x4620003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.le.d", "M,S,T", 0x4620003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
+{"c.le.d", "M,S,T", 0x4620003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.le.ps", "S,T", 0x46c0003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.le.ps", "M,S,T", 0x46c0003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ngt.d", "S,T", 0x4620003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
-{"c.ngt.d", "M,S,T", 0x4620003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4 },
-{"c.ngt.s", "S,T", 0x4600003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
-{"c.ngt.s", "M,S,T", 0x4600003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4 },
+{"c.ngt.d", "M,S,T", 0x4620003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
+{"c.ngt.s", "S,T", 0x4600003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
+{"c.ngt.s", "M,S,T", 0x4600003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
{"c.ngt.ps","S,T", 0x46c0003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.ngt.ps","M,S,T", 0x46c0003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
-{"cache", "k,o(b)", 0xbc000000, 0xfc000000, RD_b, I3|T3|M1 },
-{"ceil.l.d", "D,S", 0x4620000a, 0xffff003f, WR_D|RD_S|FP_D, I3 },
-{"ceil.l.s", "D,S", 0x4600000a, 0xffff003f, WR_D|RD_S|FP_S, I3 },
-{"ceil.w.d", "D,S", 0x4620000e, 0xffff003f, WR_D|RD_S|FP_D, I2 },
-{"ceil.w.s", "D,S", 0x4600000e, 0xffff003f, WR_D|RD_S|FP_S, I2 },
-{"cfc0", "t,G", 0x40400000, 0xffe007ff, LCD|WR_t|RD_C0, I1 },
+{"cache", "k,o(b)", 0xbc000000, 0xfc000000, RD_b, I3|I32|T3},
+{"ceil.l.d", "D,S", 0x4620000a, 0xffff003f, WR_D|RD_S|FP_D, I3 },
+{"ceil.l.s", "D,S", 0x4600000a, 0xffff003f, WR_D|RD_S|FP_S, I3 },
+{"ceil.w.d", "D,S", 0x4620000e, 0xffff003f, WR_D|RD_S|FP_D, I2 },
+{"ceil.w.s", "D,S", 0x4600000e, 0xffff003f, WR_D|RD_S|FP_S, I2 },
+{"cfc0", "t,G", 0x40400000, 0xffe007ff, LCD|WR_t|RD_C0, I1 },
{"cfc1", "t,G", 0x44400000, 0xffe007ff, LCD|WR_t|RD_C1|FP_S, I1 },
{"cfc1", "t,S", 0x44400000, 0xffe007ff, LCD|WR_t|RD_C1|FP_S, I1 },
-{"cfc2", "t,G", 0x48400000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
-{"cfc3", "t,G", 0x4c400000, 0xffe007ff, LCD|WR_t|RD_C3, I1 },
-{"ctc0", "t,G", 0x40c00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
+{"cfc2", "t,G", 0x48400000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
+{"cfc3", "t,G", 0x4c400000, 0xffe007ff, LCD|WR_t|RD_C3, I1 },
+{"clo", "U,s", 0x70000021, 0xfc0007ff, WR_d|WR_t|RD_s, I32 },
+{"clz", "U,s", 0x70000020, 0xfc0007ff, WR_d|WR_t|RD_s, I32 },
+{"ctc0", "t,G", 0x40c00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
{"ctc1", "t,G", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, I1 },
{"ctc1", "t,S", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, I1 },
-{"ctc2", "t,G", 0x48c00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
-{"ctc3", "t,G", 0x4cc00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
-{"cvt.d.l", "D,S", 0x46a00021, 0xffff003f, WR_D|RD_S|FP_D, I3 },
+{"ctc2", "t,G", 0x48c00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
+{"ctc3", "t,G", 0x4cc00000, 0xffe007ff, COD|RD_t|WR_CC, I1 },
+{"cvt.d.l", "D,S", 0x46a00021, 0xffff003f, WR_D|RD_S|FP_D, I3 },
{"cvt.d.s", "D,S", 0x46000021, 0xffff003f, WR_D|RD_S|FP_D|FP_S, I1 },
-{"cvt.d.w", "D,S", 0x46800021, 0xffff003f, WR_D|RD_S|FP_D, I1 },
-{"cvt.l.d", "D,S", 0x46200025, 0xffff003f, WR_D|RD_S|FP_D, I3 },
-{"cvt.l.s", "D,S", 0x46000025, 0xffff003f, WR_D|RD_S|FP_S, I3 },
-{"cvt.s.l", "D,S", 0x46a00020, 0xffff003f, WR_D|RD_S|FP_S, I3 },
+{"cvt.d.w", "D,S", 0x46800021, 0xffff003f, WR_D|RD_S|FP_D, I1 },
+{"cvt.l.d", "D,S", 0x46200025, 0xffff003f, WR_D|RD_S|FP_D, I3 },
+{"cvt.l.s", "D,S", 0x46000025, 0xffff003f, WR_D|RD_S|FP_S, I3 },
+{"cvt.s.l", "D,S", 0x46a00020, 0xffff003f, WR_D|RD_S|FP_S, I3 },
{"cvt.s.d", "D,S", 0x46200020, 0xffff003f, WR_D|RD_S|FP_S|FP_D, I1 },
-{"cvt.s.w", "D,S", 0x46800020, 0xffff003f, WR_D|RD_S|FP_S, I1 },
+{"cvt.s.w", "D,S", 0x46800020, 0xffff003f, WR_D|RD_S|FP_S, I1 },
{"cvt.s.pl","D,S", 0x46c00028, 0xffff003f, WR_D|RD_S|FP_S|FP_D, I5 },
{"cvt.s.pu","D,S", 0x46c00020, 0xffff003f, WR_D|RD_S|FP_S|FP_D, I5 },
-{"cvt.w.d", "D,S", 0x46200024, 0xffff003f, WR_D|RD_S|FP_D, I1 },
-{"cvt.w.s", "D,S", 0x46000024, 0xffff003f, WR_D|RD_S|FP_S, I1 },
-{"cvt.ps.s","D,V,T", 0x46000026, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5},
-{"dabs", "d,v", 0, (int) M_DABS, INSN_MACRO, I3 },
-{"dadd", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
-{"dadd", "t,r,I", 0, (int) M_DADD_I, INSN_MACRO, I3 },
-{"daddi", "t,r,j", 0x60000000, 0xfc000000, WR_t|RD_s, I3 },
-{"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_t|RD_s, I3 },
-{"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
-{"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, I3 },
+{"cvt.w.d", "D,S", 0x46200024, 0xffff003f, WR_D|RD_S|FP_D, I1 },
+{"cvt.w.s", "D,S", 0x46000024, 0xffff003f, WR_D|RD_S|FP_S, I1 },
+{"cvt.ps.s","D,V,T", 0x46000026, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"dabs", "d,v", 0, (int) M_DABS, INSN_MACRO, I3 },
+{"dadd", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
+{"dadd", "t,r,I", 0, (int) M_DADD_I, INSN_MACRO, I3 },
+{"daddi", "t,r,j", 0x60000000, 0xfc000000, WR_t|RD_s, I3 },
+{"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_t|RD_s, I3 },
+{"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
+{"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, I3 },
+{"dclo", "U,s", 0x70000025, 0xfc0007ff, RD_s|WR_d|WR_t, I64 },
+{"dclz", "U,s", 0x70000024, 0xfc0007ff, RD_s|WR_d|WR_t, I64 },
/* dctr and dctw are used on the r5000. */
-{"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_b, I3 },
-{"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_b, I3 },
-{"deret", "", 0x4200001f, 0xffffffff, 0, G2|M1 },
+{"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_b, I3 },
+{"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_b, I3 },
+{"deret", "", 0x4200001f, 0xffffffff, 0, I32|G2 },
/* For ddiv, see the comments about div. */
-{"ddiv", "z,s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I3 },
-{"ddiv", "d,v,t", 0, (int) M_DDIV_3, INSN_MACRO, I3 },
-{"ddiv", "d,v,I", 0, (int) M_DDIV_3I, INSN_MACRO, I3 },
+{"ddiv", "z,s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO, I3 },
+{"ddiv", "d,v,t", 0, (int) M_DDIV_3, INSN_MACRO, I3 },
+{"ddiv", "d,v,I", 0, (int) M_DDIV_3I, INSN_MACRO, I3 },
/* For ddivu, see the comments about div. */
-{"ddivu", "z,s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I3 },
-{"ddivu", "d,v,t", 0, (int) M_DDIVU_3, INSN_MACRO, I3 },
-{"ddivu", "d,v,I", 0, (int) M_DDIVU_3I, INSN_MACRO, I3 },
+{"ddivu", "z,s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, I3 },
+{"ddivu", "d,v,t", 0, (int) M_DDIVU_3, INSN_MACRO, I3 },
+{"ddivu", "d,v,I", 0, (int) M_DDIVU_3I, INSN_MACRO, I3 },
/* The MIPS assembler treats the div opcode with two operands as
though the first operand appeared twice (the first operand is both
a source and a destination). To get the div machine instruction,
you must use an explicit destination of $0. */
-{"div", "z,s,t", 0x0000001a, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I1 },
-{"div", "z,t", 0x0000001a, 0xffe0ffff, RD_s|RD_t|WR_HI|WR_LO, I1 },
-{"div", "d,v,t", 0, (int) M_DIV_3, INSN_MACRO, I1 },
-{"div", "d,v,I", 0, (int) M_DIV_3I, INSN_MACRO, I1 },
+{"div", "z,s,t", 0x0000001a, 0xfc00ffff, RD_s|RD_t|WR_HILO, I1 },
+{"div", "z,t", 0x0000001a, 0xffe0ffff, RD_s|RD_t|WR_HILO, I1 },
+{"div", "d,v,t", 0, (int) M_DIV_3, INSN_MACRO, I1 },
+{"div", "d,v,I", 0, (int) M_DIV_3I, INSN_MACRO, I1 },
{"div.d", "D,V,T", 0x46200003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I1 },
{"div.s", "D,V,T", 0x46000003, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, I1 },
/* For divu, see the comments about div. */
-{"divu", "z,s,t", 0x0000001b, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I1 },
-{"divu", "z,t", 0x0000001b, 0xffe0ffff, RD_s|RD_t|WR_HI|WR_LO, I1 },
-{"divu", "d,v,t", 0, (int) M_DIVU_3, INSN_MACRO, I1 },
-{"divu", "d,v,I", 0, (int) M_DIVU_3I, INSN_MACRO, I1 },
-{"dla", "t,o(b)", 0x64000000, 0xfc000000, WR_t|RD_s, I3 }, /* daddiu */
-{"dla", "t,A(b)", 0, (int) M_DLA_AB, INSN_MACRO, I3 },
-{"dli", "t,j", 0x24000000, 0xffe00000, WR_t, I3 }, /* addiu */
-{"dli", "t,i", 0x34000000, 0xffe00000, WR_t, I3 }, /* ori */
-{"dli", "t,I", 0, (int) M_DLI, INSN_MACRO, I3 },
-
-{"dmadd16", "s,t", 0x00000029, 0xfc00ffff, RD_s|RD_t|WR_LO|RD_LO, V1 },
-{"dmfc0", "t,G", 0x40200000, 0xffe007ff, LCD|WR_t|RD_C0, I3 },
+{"divu", "z,s,t", 0x0000001b, 0xfc00ffff, RD_s|RD_t|WR_HILO, I1 },
+{"divu", "z,t", 0x0000001b, 0xffe0ffff, RD_s|RD_t|WR_HILO, I1 },
+{"divu", "d,v,t", 0, (int) M_DIVU_3, INSN_MACRO, I1 },
+{"divu", "d,v,I", 0, (int) M_DIVU_3I, INSN_MACRO, I1 },
+{"dla", "t,o(b)", 0x64000000, 0xfc000000, WR_t|RD_s, I3 }, /* daddiu */
+{"dla", "t,A(b)", 0, (int) M_DLA_AB, INSN_MACRO, I3 },
+{"dli", "t,j", 0x24000000, 0xffe00000, WR_t, I3 }, /* addiu */
+{"dli", "t,i", 0x34000000, 0xffe00000, WR_t, I3 }, /* ori */
+{"dli", "t,I", 0, (int) M_DLI, INSN_MACRO, I3 },
+
+{"dmadd16", "s,t", 0x00000029, 0xfc00ffff, RD_s|RD_t|MOD_LO, V1 },
+{"dmfc0", "t,G", 0x40200000, 0xffe007ff, LCD|WR_t|RD_C0, I3 },
+{"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, LCD|WR_t|RD_C0, I64 },
{"dmtc0", "t,G", 0x40a00000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC, I3 },
+{"dmtc0", "t,G,H", 0x40a00000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC, I64 },
{"dmfc1", "t,S", 0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I3 },
+{"dmfc1", "t,G", 0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I3 },
{"dmtc1", "t,S", 0x44a00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I3 },
-{"dmfc2", "t,S", 0x48200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I3 },
-{"dmtc2", "t,S", 0x48a00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I3 },
-{"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, I3 },
-{"dmul", "d,v,I", 0, (int) M_DMUL_I, INSN_MACRO, I3 },
-{"dmulo", "d,v,t", 0, (int) M_DMULO, INSN_MACRO, I3 },
-{"dmulo", "d,v,I", 0, (int) M_DMULO_I, INSN_MACRO, I3 },
-{"dmulou", "d,v,t", 0, (int) M_DMULOU, INSN_MACRO, I3 },
-{"dmulou", "d,v,I", 0, (int) M_DMULOU_I, INSN_MACRO, I3 },
-{"dmult", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I3},
-{"dmultu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I3},
-{"dneg", "d,w", 0x0000002e, 0xffe007ff, WR_d|RD_t, I3 }, /* dsub 0 */
-{"dnegu", "d,w", 0x0000002f, 0xffe007ff, WR_d|RD_t, I3 }, /* dsubu 0*/
-{"drem", "z,s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I3 },
-{"drem", "d,v,t", 3, (int) M_DREM_3, INSN_MACRO, I3 },
-{"drem", "d,v,I", 3, (int) M_DREM_3I, INSN_MACRO, I3 },
-{"dremu", "z,s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I3 },
-{"dremu", "d,v,t", 3, (int) M_DREMU_3, INSN_MACRO, I3 },
-{"dremu", "d,v,I", 3, (int) M_DREMU_3I, INSN_MACRO, I3 },
-{"dsllv", "d,t,s", 0x00000014, 0xfc0007ff, WR_d|RD_t|RD_s, I3 },
-{"dsll32", "d,w,<", 0x0000003c, 0xffe0003f, WR_d|RD_t, I3 },
-{"dsll", "d,w,s", 0x00000014, 0xfc0007ff, WR_d|RD_t|RD_s, I3 }, /* dsllv */
-{"dsll", "d,w,>", 0x0000003c, 0xffe0003f, WR_d|RD_t, I3 }, /* dsll32 */
-{"dsll", "d,w,<", 0x00000038, 0xffe0003f, WR_d|RD_t, I3 },
-{"dsrav", "d,t,s", 0x00000017, 0xfc0007ff, WR_d|RD_t|RD_s, I3 },
-{"dsra32", "d,w,<", 0x0000003f, 0xffe0003f, WR_d|RD_t, I3 },
-{"dsra", "d,w,s", 0x00000017, 0xfc0007ff, WR_d|RD_t|RD_s, I3 }, /* dsrav */
-{"dsra", "d,w,>", 0x0000003f, 0xffe0003f, WR_d|RD_t, I3 }, /* dsra32 */
-{"dsra", "d,w,<", 0x0000003b, 0xffe0003f, WR_d|RD_t, I3 },
-{"dsrlv", "d,t,s", 0x00000016, 0xfc0007ff, WR_d|RD_t|RD_s, I3 },
-{"dsrl32", "d,w,<", 0x0000003e, 0xffe0003f, WR_d|RD_t, I3 },
-{"dsrl", "d,w,s", 0x00000016, 0xfc0007ff, WR_d|RD_t|RD_s, I3 }, /* dsrlv */
-{"dsrl", "d,w,>", 0x0000003e, 0xffe0003f, WR_d|RD_t, I3 }, /* dsrl32 */
-{"dsrl", "d,w,<", 0x0000003a, 0xffe0003f, WR_d|RD_t, I3 },
-{"dsub", "d,v,t", 0x0000002e, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
-{"dsub", "d,v,I", 0, (int) M_DSUB_I, INSN_MACRO, I3 },
-{"dsubu", "d,v,t", 0x0000002f, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
-{"dsubu", "d,v,I", 0, (int) M_DSUBU_I, INSN_MACRO, I3 },
-{"eret", "", 0x42000018, 0xffffffff, 0, I3|M1 },
-{"floor.l.d", "D,S", 0x4620000b, 0xffff003f, WR_D|RD_S|FP_D, I3 },
-{"floor.l.s", "D,S", 0x4600000b, 0xffff003f, WR_D|RD_S|FP_S, I3 },
-{"floor.w.d", "D,S", 0x4620000f, 0xffff003f, WR_D|RD_S|FP_D, I2 },
-{"floor.w.s", "D,S", 0x4600000f, 0xffff003f, WR_D|RD_S|FP_S, I2 },
-{"flushi", "", 0xbc010000, 0xffffffff, 0, L1 },
-{"flushd", "", 0xbc020000, 0xffffffff, 0, L1 },
-{"flushid", "", 0xbc030000, 0xffffffff, 0, L1 },
-{"hibernate","", 0x42000023, 0xffffffff, 0, V1 },
-{"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, I1 },
-{"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, I1 }, /* jr */
+{"dmtc1", "t,G", 0x44a00000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I3 },
+{"dmfc2", "t,G", 0x48200000, 0xffe007ff, LCD|WR_t|RD_C2, I3 },
+{"dmfc2", "t,G,H", 0x48200000, 0xffe007f8, LCD|WR_t|RD_C2, I64 },
+{"dmtc2", "t,G", 0x48a00000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, I3 },
+{"dmtc2", "t,G,H", 0x48a00000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, I64 },
+{"dmfc3", "t,G", 0x4c200000, 0xffe007ff, LCD|WR_t|RD_C3, I3 },
+{"dmfc3", "t,G,H", 0x4c200000, 0xffe007f8, LCD|WR_t|RD_C3, I64 },
+{"dmtc3", "t,G", 0x4ca00000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, I3 },
+{"dmtc3", "t,G,H", 0x4ca00000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, I64 },
+{"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, I3 },
+{"dmul", "d,v,I", 0, (int) M_DMUL_I, INSN_MACRO, I3 },
+{"dmulo", "d,v,t", 0, (int) M_DMULO, INSN_MACRO, I3 },
+{"dmulo", "d,v,I", 0, (int) M_DMULO_I, INSN_MACRO, I3 },
+{"dmulou", "d,v,t", 0, (int) M_DMULOU, INSN_MACRO, I3 },
+{"dmulou", "d,v,I", 0, (int) M_DMULOU_I, INSN_MACRO, I3 },
+{"dmult", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO, I3 },
+{"dmultu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO, I3 },
+{"dneg", "d,w", 0x0000002e, 0xffe007ff, WR_d|RD_t, I3 }, /* dsub 0 */
+{"dnegu", "d,w", 0x0000002f, 0xffe007ff, WR_d|RD_t, I3 }, /* dsubu 0*/
+{"drem", "z,s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO, I3 },
+{"drem", "d,v,t", 3, (int) M_DREM_3, INSN_MACRO, I3 },
+{"drem", "d,v,I", 3, (int) M_DREM_3I, INSN_MACRO, I3 },
+{"dremu", "z,s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, I3 },
+{"dremu", "d,v,t", 3, (int) M_DREMU_3, INSN_MACRO, I3 },
+{"dremu", "d,v,I", 3, (int) M_DREMU_3I, INSN_MACRO, I3 },
+{"dsllv", "d,t,s", 0x00000014, 0xfc0007ff, WR_d|RD_t|RD_s, I3 },
+{"dsll32", "d,w,<", 0x0000003c, 0xffe0003f, WR_d|RD_t, I3 },
+{"dsll", "d,w,s", 0x00000014, 0xfc0007ff, WR_d|RD_t|RD_s, I3 }, /* dsllv */
+{"dsll", "d,w,>", 0x0000003c, 0xffe0003f, WR_d|RD_t, I3 }, /* dsll32 */
+{"dsll", "d,w,<", 0x00000038, 0xffe0003f, WR_d|RD_t, I3 },
+{"dsrav", "d,t,s", 0x00000017, 0xfc0007ff, WR_d|RD_t|RD_s, I3 },
+{"dsra32", "d,w,<", 0x0000003f, 0xffe0003f, WR_d|RD_t, I3 },
+{"dsra", "d,w,s", 0x00000017, 0xfc0007ff, WR_d|RD_t|RD_s, I3 }, /* dsrav */
+{"dsra", "d,w,>", 0x0000003f, 0xffe0003f, WR_d|RD_t, I3 }, /* dsra32 */
+{"dsra", "d,w,<", 0x0000003b, 0xffe0003f, WR_d|RD_t, I3 },
+{"dsrlv", "d,t,s", 0x00000016, 0xfc0007ff, WR_d|RD_t|RD_s, I3 },
+{"dsrl32", "d,w,<", 0x0000003e, 0xffe0003f, WR_d|RD_t, I3 },
+{"dsrl", "d,w,s", 0x00000016, 0xfc0007ff, WR_d|RD_t|RD_s, I3 }, /* dsrlv */
+{"dsrl", "d,w,>", 0x0000003e, 0xffe0003f, WR_d|RD_t, I3 }, /* dsrl32 */
+{"dsrl", "d,w,<", 0x0000003a, 0xffe0003f, WR_d|RD_t, I3 },
+{"dsub", "d,v,t", 0x0000002e, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
+{"dsub", "d,v,I", 0, (int) M_DSUB_I, INSN_MACRO, I3 },
+{"dsubu", "d,v,t", 0x0000002f, 0xfc0007ff, WR_d|RD_s|RD_t, I3 },
+{"dsubu", "d,v,I", 0, (int) M_DSUBU_I, INSN_MACRO, I3 },
+{"eret", "", 0x42000018, 0xffffffff, 0, I3|I32 },
+{"floor.l.d", "D,S", 0x4620000b, 0xffff003f, WR_D|RD_S|FP_D, I3 },
+{"floor.l.s", "D,S", 0x4600000b, 0xffff003f, WR_D|RD_S|FP_S, I3 },
+{"floor.w.d", "D,S", 0x4620000f, 0xffff003f, WR_D|RD_S|FP_D, I2 },
+{"floor.w.s", "D,S", 0x4600000f, 0xffff003f, WR_D|RD_S|FP_S, I2 },
+{"flushi", "", 0xbc010000, 0xffffffff, 0, L1 },
+{"flushd", "", 0xbc020000, 0xffffffff, 0, L1 },
+{"flushid", "", 0xbc030000, 0xffffffff, 0, L1 },
+{"hibernate","", 0x42000023, 0xffffffff, 0, V1 },
+{"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, I1 },
+{"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, I1 }, /* jr */
/* SVR4 PIC code requires special handling for j, so it must be a
macro. */
-{"j", "a", 0, (int) M_J_A, INSN_MACRO, I1 },
+{"j", "a", 0, (int) M_J_A, INSN_MACRO, I1 },
/* This form of j is used by the disassembler and internally by the
assembler, but will never match user input (because the line above
will match first). */
-{"j", "a", 0x08000000, 0xfc000000, UBD, I1 },
-{"jalr", "s", 0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d, I1 },
-{"jalr", "d,s", 0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d, I1 },
+{"j", "a", 0x08000000, 0xfc000000, UBD, I1 },
+{"jalr", "s", 0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d, I1 },
+{"jalr", "d,s", 0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d, I1 },
/* SVR4 PIC code requires special handling for jal, so it must be a
macro. */
-{"jal", "d,s", 0, (int) M_JAL_2, INSN_MACRO, I1 },
-{"jal", "s", 0, (int) M_JAL_1, INSN_MACRO, I1 },
-{"jal", "a", 0, (int) M_JAL_A, INSN_MACRO, I1 },
+{"jal", "d,s", 0, (int) M_JAL_2, INSN_MACRO, I1 },
+{"jal", "s", 0, (int) M_JAL_1, INSN_MACRO, I1 },
+{"jal", "a", 0, (int) M_JAL_A, INSN_MACRO, I1 },
/* This form of jal is used by the disassembler and internally by the
assembler, but will never match user input (because the line above
will match first). */
-{"jal", "a", 0x0c000000, 0xfc000000, UBD|WR_31, I1 },
+{"jal", "a", 0x0c000000, 0xfc000000, UBD|WR_31, I1 },
/* jalx really should only be avaliable if mips16 is available,
but for now make it I1. */
-{"jalx", "a", 0x74000000, 0xfc000000, UBD|WR_31, I1 },
-{"la", "t,o(b)", 0x24000000, 0xfc000000, WR_t|RD_s, I1 }, /* addiu */
-{"la", "t,A(b)", 0, (int) M_LA_AB, INSN_MACRO, I1 },
-{"lb", "t,o(b)", 0x80000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
-{"lb", "t,A(b)", 0, (int) M_LB_AB, INSN_MACRO, I1 },
-{"lbu", "t,o(b)", 0x90000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
-{"lbu", "t,A(b)", 0, (int) M_LBU_AB, INSN_MACRO, I1 },
-{"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_t|RD_b, I3 },
-{"ld", "t,o(b)", 0, (int) M_LD_OB, INSN_MACRO, I1 },
-{"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, I1 },
+{"jalx", "a", 0x74000000, 0xfc000000, UBD|WR_31, I1 },
+{"la", "t,o(b)", 0x24000000, 0xfc000000, WR_t|RD_s, I1 }, /* addiu */
+{"la", "t,A(b)", 0, (int) M_LA_AB, INSN_MACRO, I1 },
+{"lb", "t,o(b)", 0x80000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
+{"lb", "t,A(b)", 0, (int) M_LB_AB, INSN_MACRO, I1 },
+{"lbu", "t,o(b)", 0x90000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
+{"lbu", "t,A(b)", 0, (int) M_LBU_AB, INSN_MACRO, I1 },
+{"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_t|RD_b, I3 },
+{"ld", "t,o(b)", 0, (int) M_LD_OB, INSN_MACRO, I1 },
+{"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, I1 },
{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, I2 },
{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, I2 },
-{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, I2 },
-{"ldc1", "E,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, I2 },
+{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, I2 },
+{"ldc1", "E,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, I2 },
{"l.d", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, I2 }, /* ldc1 */
-{"l.d", "T,o(b)", 0, (int) M_L_DOB, INSN_MACRO, I1 },
-{"l.d", "T,A(b)", 0, (int) M_L_DAB, INSN_MACRO, I1 },
-{"ldc2", "E,o(b)", 0xd8000000, 0xfc000000, CLD|RD_b|WR_CC, I2 },
-{"ldc2", "E,A(b)", 0, (int) M_LDC2_AB, INSN_MACRO, I2 },
-{"ldc3", "E,o(b)", 0xdc000000, 0xfc000000, CLD|RD_b|WR_CC, I2 },
-{"ldc3", "E,A(b)", 0, (int) M_LDC3_AB, INSN_MACRO, I2 },
-{"ldl", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, I3 },
-{"ldl", "t,A(b)", 0, (int) M_LDL_AB, INSN_MACRO, I3 },
-{"ldr", "t,o(b)", 0x6c000000, 0xfc000000, LDD|WR_t|RD_b, I3 },
-{"ldr", "t,A(b)", 0, (int) M_LDR_AB, INSN_MACRO, I3 },
+{"l.d", "T,o(b)", 0, (int) M_L_DOB, INSN_MACRO, I1 },
+{"l.d", "T,A(b)", 0, (int) M_L_DAB, INSN_MACRO, I1 },
+{"ldc2", "E,o(b)", 0xd8000000, 0xfc000000, CLD|RD_b|WR_CC, I2 },
+{"ldc2", "E,A(b)", 0, (int) M_LDC2_AB, INSN_MACRO, I2 },
+{"ldc3", "E,o(b)", 0xdc000000, 0xfc000000, CLD|RD_b|WR_CC, I2 },
+{"ldc3", "E,A(b)", 0, (int) M_LDC3_AB, INSN_MACRO, I2 },
+{"ldl", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, I3 },
+{"ldl", "t,A(b)", 0, (int) M_LDL_AB, INSN_MACRO, I3 },
+{"ldr", "t,o(b)", 0x6c000000, 0xfc000000, LDD|WR_t|RD_b, I3 },
+{"ldr", "t,A(b)", 0, (int) M_LDR_AB, INSN_MACRO, I3 },
{"ldxc1", "D,t(b)", 0x4c000001, 0xfc00f83f, LDD|WR_D|RD_t|RD_b, I4 },
-{"lh", "t,o(b)", 0x84000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
-{"lh", "t,A(b)", 0, (int) M_LH_AB, INSN_MACRO, I1 },
-{"lhu", "t,o(b)", 0x94000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
-{"lhu", "t,A(b)", 0, (int) M_LHU_AB, INSN_MACRO, I1 },
+{"lh", "t,o(b)", 0x84000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
+{"lh", "t,A(b)", 0, (int) M_LH_AB, INSN_MACRO, I1 },
+{"lhu", "t,o(b)", 0x94000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
+{"lhu", "t,A(b)", 0, (int) M_LHU_AB, INSN_MACRO, I1 },
/* li is at the start of the table. */
-{"li.d", "t,F", 0, (int) M_LI_D, INSN_MACRO, I1 },
-{"li.d", "T,L", 0, (int) M_LI_DD, INSN_MACRO, I1 },
-{"li.s", "t,f", 0, (int) M_LI_S, INSN_MACRO, I1 },
-{"li.s", "T,l", 0, (int) M_LI_SS, INSN_MACRO, I1 },
-{"ll", "t,o(b)", 0xc0000000, 0xfc000000, LDD|RD_b|WR_t, I2 },
-{"ll", "t,A(b)", 0, (int) M_LL_AB, INSN_MACRO, I2 },
-{"lld", "t,o(b)", 0xd0000000, 0xfc000000, LDD|RD_b|WR_t, I3 },
-{"lld", "t,A(b)", 0, (int) M_LLD_AB, INSN_MACRO, I3 },
-{"lui", "t,u", 0x3c000000, 0xffe00000, WR_t, I1 },
+{"li.d", "t,F", 0, (int) M_LI_D, INSN_MACRO, I1 },
+{"li.d", "T,L", 0, (int) M_LI_DD, INSN_MACRO, I1 },
+{"li.s", "t,f", 0, (int) M_LI_S, INSN_MACRO, I1 },
+{"li.s", "T,l", 0, (int) M_LI_SS, INSN_MACRO, I1 },
+{"ll", "t,o(b)", 0xc0000000, 0xfc000000, LDD|RD_b|WR_t, I2 },
+{"ll", "t,A(b)", 0, (int) M_LL_AB, INSN_MACRO, I2 },
+{"lld", "t,o(b)", 0xd0000000, 0xfc000000, LDD|RD_b|WR_t, I3 },
+{"lld", "t,A(b)", 0, (int) M_LLD_AB, INSN_MACRO, I3 },
+{"lui", "t,u", 0x3c000000, 0xffe00000, WR_t, I1 },
{"luxc1", "D,t(b)", 0x4c000005, 0xfc00f83f, LDD|WR_D|RD_t|RD_b, I5 },
-{"lw", "t,o(b)", 0x8c000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
-{"lw", "t,A(b)", 0, (int) M_LW_AB, INSN_MACRO, I1 },
-{"lwc0", "E,o(b)", 0xc0000000, 0xfc000000, CLD|RD_b|WR_CC, I1 },
-{"lwc0", "E,A(b)", 0, (int) M_LWC0_AB, INSN_MACRO, I1 },
+{"lw", "t,o(b)", 0x8c000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
+{"lw", "t,A(b)", 0, (int) M_LW_AB, INSN_MACRO, I1 },
+{"lwc0", "E,o(b)", 0xc0000000, 0xfc000000, CLD|RD_b|WR_CC, I1 },
+{"lwc0", "E,A(b)", 0, (int) M_LWC0_AB, INSN_MACRO, I1 },
{"lwc1", "T,o(b)", 0xc4000000, 0xfc000000, CLD|RD_b|WR_T|FP_S, I1 },
{"lwc1", "E,o(b)", 0xc4000000, 0xfc000000, CLD|RD_b|WR_T|FP_S, I1 },
-{"lwc1", "T,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, I1 },
-{"lwc1", "E,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, I1 },
+{"lwc1", "T,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, I1 },
+{"lwc1", "E,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, I1 },
{"l.s", "T,o(b)", 0xc4000000, 0xfc000000, CLD|RD_b|WR_T|FP_S, I1 }, /* lwc1 */
-{"l.s", "T,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, I1 },
-{"lwc2", "E,o(b)", 0xc8000000, 0xfc000000, CLD|RD_b|WR_CC, I1 },
-{"lwc2", "E,A(b)", 0, (int) M_LWC2_AB, INSN_MACRO, I1 },
-{"lwc3", "E,o(b)", 0xcc000000, 0xfc000000, CLD|RD_b|WR_CC, I1 },
-{"lwc3", "E,A(b)", 0, (int) M_LWC3_AB, INSN_MACRO, I1 },
-{"lwl", "t,o(b)", 0x88000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
-{"lwl", "t,A(b)", 0, (int) M_LWL_AB, INSN_MACRO, I1 },
-{"lcache", "t,o(b)", 0x88000000, 0xfc000000, LDD|RD_b|WR_t, I2 }, /* same */
-{"lcache", "t,A(b)", 0, (int) M_LWL_AB, INSN_MACRO, I2 }, /* as lwl */
-{"lwr", "t,o(b)", 0x98000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
-{"lwr", "t,A(b)", 0, (int) M_LWR_AB, INSN_MACRO, I1 },
-{"flush", "t,o(b)", 0x98000000, 0xfc000000, LDD|RD_b|WR_t, I2 }, /* same */
-{"flush", "t,A(b)", 0, (int) M_LWR_AB, INSN_MACRO, I2 }, /* as lwr */
-{"lwu", "t,o(b)", 0x9c000000, 0xfc000000, LDD|RD_b|WR_t, I3 },
-{"lwu", "t,A(b)", 0, (int) M_LWU_AB, INSN_MACRO, I3 },
+{"l.s", "T,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, I1 },
+{"lwc2", "E,o(b)", 0xc8000000, 0xfc000000, CLD|RD_b|WR_CC, I1 },
+{"lwc2", "E,A(b)", 0, (int) M_LWC2_AB, INSN_MACRO, I1 },
+{"lwc3", "E,o(b)", 0xcc000000, 0xfc000000, CLD|RD_b|WR_CC, I1 },
+{"lwc3", "E,A(b)", 0, (int) M_LWC3_AB, INSN_MACRO, I1 },
+{"lwl", "t,o(b)", 0x88000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
+{"lwl", "t,A(b)", 0, (int) M_LWL_AB, INSN_MACRO, I1 },
+{"lcache", "t,o(b)", 0x88000000, 0xfc000000, LDD|RD_b|WR_t, I2 }, /* same */
+{"lcache", "t,A(b)", 0, (int) M_LWL_AB, INSN_MACRO, I2 }, /* as lwl */
+{"lwr", "t,o(b)", 0x98000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
+{"lwr", "t,A(b)", 0, (int) M_LWR_AB, INSN_MACRO, I1 },
+{"flush", "t,o(b)", 0x98000000, 0xfc000000, LDD|RD_b|WR_t, I2 }, /* same */
+{"flush", "t,A(b)", 0, (int) M_LWR_AB, INSN_MACRO, I2 }, /* as lwr */
+{"lwu", "t,o(b)", 0x9c000000, 0xfc000000, LDD|RD_b|WR_t, I3 },
+{"lwu", "t,A(b)", 0, (int) M_LWU_AB, INSN_MACRO, I3 },
{"lwxc1", "D,t(b)", 0x4c000000, 0xfc00f83f, LDD|WR_D|RD_t|RD_b, I4 },
-
-
-{"mad", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO|RD_HI|RD_LO, P3 },
-{"madu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO|RD_HI|RD_LO, P3 },
-{"madd.d", "D,R,S,T", 0x4c000021, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
-{"madd.s", "D,R,S,T", 0x4c000020, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
-{"madd.ps", "D,R,S,T", 0x4c000026, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
-{"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, L1 },
-{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO|IS_M, G1|M1 },
-{"madd", "d,s,t", 0x70000000, 0xfc0007ff, RD_s|RD_t|WR_HI|WR_LO|WR_d|IS_M, G1 },
-{"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, L1 },
-{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO|IS_M, G1|M1},
-{"maddu", "d,s,t", 0x70000001, 0xfc0007ff, RD_s|RD_t|WR_HI|WR_LO|WR_d|IS_M, G1},
-{"madd16", "s,t", 0x00000028, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO|RD_HI|RD_LO, V1 },
-{"mfc0", "t,G", 0x40000000, 0xffe007ff, LCD|WR_t|RD_C0, I1 },
+{"mad", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|MOD_HILO, P3 },
+{"madu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO, P3 },
+{"madd.d", "D,R,S,T", 0x4c000021, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
+{"madd.s", "D,R,S,T", 0x4c000020, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
+{"madd.ps", "D,R,S,T", 0x4c000026, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
+{"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO, L1 },
+{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|MOD_HILO, I32},
+{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, G1 },
+{"madd", "d,s,t", 0x70000000, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, G1 },
+{"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO, L1 },
+{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO, I32},
+{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, G1 },
+{"maddu", "d,s,t", 0x70000001, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, G1 },
+{"madd16", "s,t", 0x00000028, 0xfc00ffff, RD_s|RD_t|MOD_HILO, V1 },
+{"mfc0", "t,G", 0x40000000, 0xffe007ff, LCD|WR_t|RD_C0, I1 },
+{"mfc0", "t,G,H", 0x40000000, 0xffe007f8, LCD|WR_t|RD_C0, I32 },
{"mfc1", "t,S", 0x44000000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I1 },
{"mfc1", "t,G", 0x44000000, 0xffe007ff, LCD|WR_t|RD_S|FP_S, I1 },
-{"mfc2", "t,G", 0x48000000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
-{"mfc3", "t,G", 0x4c000000, 0xffe007ff, LCD|WR_t|RD_C3, I1 },
-{"mfhi", "d", 0x00000010, 0xffff07ff, WR_d|RD_HI, I1 },
-{"mflo", "d", 0x00000012, 0xffff07ff, WR_d|RD_LO, I1 },
-{"mov.d", "D,S", 0x46200006, 0xffff003f, WR_D|RD_S|FP_D, I1 },
-{"mov.s", "D,S", 0x46000006, 0xffff003f, WR_D|RD_S|FP_S, I1 },
-{"mov.ps", "D,S", 0x46c00006, 0xffff003f, WR_D|RD_S|FP_D, I5 },
-{"movf", "d,s,N", 0x00000001, 0xfc0307ff, WR_d|RD_s|RD_CC|FP_D|FP_S, I4|M1},
-{"movf.d", "D,S,N", 0x46200011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I4|M1 },
-{"movf.s", "D,S,N", 0x46000011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, I4|M1 },
+{"mfc2", "t,G", 0x48000000, 0xffe007ff, LCD|WR_t|RD_C2, I1 },
+{"mfc2", "t,G,H", 0x48000000, 0xffe007f8, LCD|WR_t|RD_C2, I32 },
+{"mfc3", "t,G", 0x4c000000, 0xffe007ff, LCD|WR_t|RD_C3, I1 },
+{"mfc3", "t,G,H", 0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, I32 },
+{"mfhi", "d", 0x00000010, 0xffff07ff, WR_d|RD_HI, I1 },
+{"mflo", "d", 0x00000012, 0xffff07ff, WR_d|RD_LO, I1 },
+{"mov.d", "D,S", 0x46200006, 0xffff003f, WR_D|RD_S|FP_D, I1 },
+{"mov.s", "D,S", 0x46000006, 0xffff003f, WR_D|RD_S|FP_S, I1 },
+{"mov.ps", "D,S", 0x46c00006, 0xffff003f, WR_D|RD_S|FP_D, I5 },
+{"movf", "d,s,N", 0x00000001, 0xfc0307ff, WR_d|RD_s|RD_CC|FP_D|FP_S, I4|I32},
+{"movf.d", "D,S,N", 0x46200011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I4|I32 },
+{"movf.s", "D,S,N", 0x46000011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, I4|I32 },
{"movf.ps", "D,S,N", 0x46c00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I5 },
-{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, I4|M1 },
-{"ffc", "d,v", 0x0000000b, 0xfc1f07ff, WR_d|RD_s,L1 },
-{"movn.d", "D,S,t", 0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I4|M1 },
-{"movn.s", "D,S,t", 0x46000013, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, I4|M1 },
-{"movt", "d,s,N", 0x00010001, 0xfc0307ff, WR_d|RD_s|RD_CC, I4|M1 },
-{"movt.d", "D,S,N", 0x46210011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I4|M1 },
-{"movt.s", "D,S,N", 0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, I4|M1 },
-{"movt.ps", "D,S,N", 0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I5},
-{"movz", "d,v,t", 0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, I4|M1 },
-{"ffs", "d,v", 0x0000000a, 0xfc1f07ff, WR_d|RD_s,L1 },
-{"movz.d", "D,S,t", 0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I4|M1 },
-{"movz.s", "D,S,t", 0x46000012, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, I4|M1 },
+{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, I4|I32 },
+{"ffc", "d,v", 0x0000000b, 0xfc1f07ff, WR_d|RD_s, L1 },
+{"movn.d", "D,S,t", 0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I4|I32 },
+{"movn.s", "D,S,t", 0x46000013, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, I4|I32 },
+{"movt", "d,s,N", 0x00010001, 0xfc0307ff, WR_d|RD_s|RD_CC, I4|I32 },
+{"movt.d", "D,S,N", 0x46210011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I4|I32 },
+{"movt.s", "D,S,N", 0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, I4|I32 },
+{"movt.ps", "D,S,N", 0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I5 },
+{"movz", "d,v,t", 0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, I4|I32 },
+{"ffs", "d,v", 0x0000000a, 0xfc1f07ff, WR_d|RD_s, L1 },
+{"movz.d", "D,S,t", 0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I4|I32 },
+{"movz.s", "D,S,t", 0x46000012, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, I4|I32 },
/* move is at the top of the table. */
-{"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
-{"msub.s", "D,R,S,T", 0x4c000028, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
-{"msub.ps", "D,R,S,T", 0x4c00002e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
-{"msub", "s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO,L1 },
-{"msubu", "s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO,L1 },
+{"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
+{"msub.s", "D,R,S,T", 0x4c000028, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
+{"msub.ps", "D,R,S,T", 0x4c00002e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
+{"msub", "s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO, L1 },
+{"msub", "s,t", 0x70000004, 0xfc00ffff, RD_s|RD_t|MOD_HILO, I32 },
+{"msubu", "s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, L1 },
+{"msubu", "s,t", 0x70000005, 0xfc00ffff, RD_s|RD_t|MOD_HILO, I32 },
{"mtc0", "t,G", 0x40800000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC, I1 },
+{"mtc0", "t,G,H", 0x40800000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC, I32 },
{"mtc1", "t,S", 0x44800000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I1 },
{"mtc1", "t,G", 0x44800000, 0xffe007ff, COD|RD_t|WR_S|FP_S, I1 },
{"mtc2", "t,G", 0x48800000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, I1 },
+{"mtc2", "t,G,H", 0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, I32 },
{"mtc3", "t,G", 0x4c800000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, I1 },
-{"mthi", "s", 0x00000011, 0xfc1fffff, RD_s|WR_HI, I1 },
-{"mtlo", "s", 0x00000013, 0xfc1fffff, RD_s|WR_LO, I1 },
+{"mtc3", "t,G,H", 0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, I32 },
+{"mthi", "s", 0x00000011, 0xfc1fffff, RD_s|WR_HI, I1 },
+{"mtlo", "s", 0x00000013, 0xfc1fffff, RD_s|WR_LO, I1 },
{"mul.d", "D,V,T", 0x46200002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I1 },
{"mul.s", "D,V,T", 0x46000002, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, I1 },
{"mul.ps", "D,V,T", 0x46c00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
-{"mul", "d,v,t", 0x70000002, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HI|WR_LO,P3},
-{"mul", "d,v,t", 0, (int) M_MUL, INSN_MACRO, I1 },
-{"mul", "d,v,I", 0, (int) M_MUL_I, INSN_MACRO, I1 },
-{"mulo", "d,v,t", 0, (int) M_MULO, INSN_MACRO, I1 },
-{"mulo", "d,v,I", 0, (int) M_MULO_I, INSN_MACRO, I1 },
-{"mulou", "d,v,t", 0, (int) M_MULOU, INSN_MACRO, I1 },
-{"mulou", "d,v,I", 0, (int) M_MULOU_I, INSN_MACRO, I1 },
-{"mult", "s,t", 0x00000018, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO|IS_M, I1},
-{"mult", "d,s,t", 0x00000018, 0xfc0007ff, RD_s|RD_t|WR_HI|WR_LO|WR_d|IS_M, G1},
-{"multu", "s,t", 0x00000019, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO|IS_M, I1},
-{"multu", "d,s,t", 0x00000019, 0xfc0007ff, RD_s|RD_t|WR_HI|WR_LO|WR_d|IS_M, G1},
-{"neg", "d,w", 0x00000022, 0xffe007ff, WR_d|RD_t, I1 }, /* sub 0 */
-{"negu", "d,w", 0x00000023, 0xffe007ff, WR_d|RD_t, I1 }, /* subu 0 */
-{"neg.d", "D,V", 0x46200007, 0xffff003f, WR_D|RD_S|FP_D, I1 },
-{"neg.s", "D,V", 0x46000007, 0xffff003f, WR_D|RD_S|FP_S, I1 },
-{"neg.ps", "D,V", 0x46c00007, 0xffff003f, WR_D|RD_S|FP_D,I5 },
-{"nmadd.d", "D,R,S,T", 0x4c000031, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
-{"nmadd.s", "D,R,S,T", 0x4c000030, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
-{"nmadd.ps","D,R,S,T", 0x4c000036, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
-{"nmsub.d", "D,R,S,T", 0x4c000039, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
-{"nmsub.s", "D,R,S,T", 0x4c000038, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
-{"nmsub.ps","D,R,S,T", 0x4c00003e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
+{"mul", "d,v,t", 0x70000002, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, I32|P3 },
+{"mul", "d,v,t", 0, (int) M_MUL, INSN_MACRO, I1 },
+{"mul", "d,v,I", 0, (int) M_MUL_I, INSN_MACRO, I1 },
+{"mulo", "d,v,t", 0, (int) M_MULO, INSN_MACRO, I1 },
+{"mulo", "d,v,I", 0, (int) M_MULO_I, INSN_MACRO, I1 },
+{"mulou", "d,v,t", 0, (int) M_MULOU, INSN_MACRO, I1 },
+{"mulou", "d,v,I", 0, (int) M_MULOU_I, INSN_MACRO, I1 },
+{"mult", "s,t", 0x00000018, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, I1 },
+{"mult", "d,s,t", 0x00000018, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, G1 },
+{"multu", "s,t", 0x00000019, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, I1 },
+{"multu", "d,s,t", 0x00000019, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, G1 },
+{"neg", "d,w", 0x00000022, 0xffe007ff, WR_d|RD_t, I1 }, /* sub 0 */
+{"negu", "d,w", 0x00000023, 0xffe007ff, WR_d|RD_t, I1 }, /* subu 0 */
+{"neg.d", "D,V", 0x46200007, 0xffff003f, WR_D|RD_S|FP_D, I1 },
+{"neg.s", "D,V", 0x46000007, 0xffff003f, WR_D|RD_S|FP_S, I1 },
+{"neg.ps", "D,V", 0x46c00007, 0xffff003f, WR_D|RD_S|FP_D, I5 },
+{"nmadd.d", "D,R,S,T", 0x4c000031, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
+{"nmadd.s", "D,R,S,T", 0x4c000030, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
+{"nmadd.ps","D,R,S,T", 0x4c000036, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
+{"nmsub.d", "D,R,S,T", 0x4c000039, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
+{"nmsub.s", "D,R,S,T", 0x4c000038, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
+{"nmsub.ps","D,R,S,T", 0x4c00003e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
/* nop is at the start of the table. */
-{"nor", "d,v,t", 0x00000027, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"nor", "t,r,I", 0, (int) M_NOR_I, INSN_MACRO, I1 },
-{"not", "d,v", 0x00000027, 0xfc1f07ff, WR_d|RD_s|RD_t, I1 },/*nor d,s,0*/
-{"or", "d,v,t", 0x00000025, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"or", "t,r,I", 0, (int) M_OR_I, INSN_MACRO, I1 },
-{"ori", "t,r,i", 0x34000000, 0xfc000000, WR_t|RD_s, I1 },
-
-{"pll.ps", "D,V,T", 0x46c0002c, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5},
-{"plu.ps", "D,V,T", 0x46c0002d, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5},
-
-{"pref", "k,o(b)", 0xcc000000, 0xfc000000, RD_b, G3|M1 },
-{"prefx", "h,t(b)", 0x4c00000f, 0xfc0007ff, RD_b|RD_t, I4 },
-
-{"pul.ps", "D,V,T", 0x46c0002e, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5},
-{"puu.ps", "D,V,T", 0x46c0002f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5},
-
-{"recip.d", "D,S", 0x46200015, 0xffff003f, WR_D|RD_S|FP_D, I4 },
-{"recip.s", "D,S", 0x46000015, 0xffff003f, WR_D|RD_S|FP_S, I4 },
-{"rem", "z,s,t", 0x0000001a, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I1 },
-{"rem", "d,v,t", 0, (int) M_REM_3, INSN_MACRO, I1 },
-{"rem", "d,v,I", 0, (int) M_REM_3I, INSN_MACRO, I1 },
-{"remu", "z,s,t", 0x0000001b, 0xfc00ffff, RD_s|RD_t|WR_HI|WR_LO, I1 },
-{"remu", "d,v,t", 0, (int) M_REMU_3, INSN_MACRO, I1 },
-{"remu", "d,v,I", 0, (int) M_REMU_3I, INSN_MACRO, I1 },
-{"rfe", "", 0x42000010, 0xffffffff, 0, I1|T3 },
-{"rol", "d,v,t", 0, (int) M_ROL, INSN_MACRO, I1 },
-{"rol", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, I1 },
-{"ror", "d,v,t", 0, (int) M_ROR, INSN_MACRO, I1 },
-{"ror", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, I1 },
-{"round.l.d", "D,S", 0x46200008, 0xffff003f, WR_D|RD_S|FP_D, I3 },
-{"round.l.s", "D,S", 0x46000008, 0xffff003f, WR_D|RD_S|FP_S, I3 },
-{"round.w.d", "D,S", 0x4620000c, 0xffff003f, WR_D|RD_S|FP_D, I2 },
-{"round.w.s", "D,S", 0x4600000c, 0xffff003f, WR_D|RD_S|FP_S, I2 },
-{"rsqrt.d", "D,S", 0x46200016, 0xffff003f, WR_D|RD_S|FP_D, I4 },
-{"rsqrt.s", "D,S", 0x46000016, 0xffff003f, WR_D|RD_S|FP_S, I4 },
-{"sb", "t,o(b)", 0xa0000000, 0xfc000000, SM|RD_t|RD_b, I1 },
-{"sb", "t,A(b)", 0, (int) M_SB_AB, INSN_MACRO, I1 },
+{"nor", "d,v,t", 0x00000027, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"nor", "t,r,I", 0, (int) M_NOR_I, INSN_MACRO, I1 },
+{"not", "d,v", 0x00000027, 0xfc1f07ff, WR_d|RD_s|RD_t, I1 },/*nor d,s,0*/
+{"or", "d,v,t", 0x00000025, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"or", "t,r,I", 0, (int) M_OR_I, INSN_MACRO, I1 },
+{"ori", "t,r,i", 0x34000000, 0xfc000000, WR_t|RD_s, I1 },
+
+{"pll.ps", "D,V,T", 0x46c0002c, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"plu.ps", "D,V,T", 0x46c0002d, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+
+/* pref is at the start of the table. */
+{"prefx", "h,t(b)", 0x4c00000f, 0xfc0007ff, RD_b|RD_t, I4 },
+
+{"pul.ps", "D,V,T", 0x46c0002e, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"puu.ps", "D,V,T", 0x46c0002f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+
+{"recip.d", "D,S", 0x46200015, 0xffff003f, WR_D|RD_S|FP_D, I4 },
+{"recip.s", "D,S", 0x46000015, 0xffff003f, WR_D|RD_S|FP_S, I4 },
+{"rem", "z,s,t", 0x0000001a, 0xfc00ffff, RD_s|RD_t|WR_HILO, I1 },
+{"rem", "d,v,t", 0, (int) M_REM_3, INSN_MACRO, I1 },
+{"rem", "d,v,I", 0, (int) M_REM_3I, INSN_MACRO, I1 },
+{"remu", "z,s,t", 0x0000001b, 0xfc00ffff, RD_s|RD_t|WR_HILO, I1 },
+{"remu", "d,v,t", 0, (int) M_REMU_3, INSN_MACRO, I1 },
+{"remu", "d,v,I", 0, (int) M_REMU_3I, INSN_MACRO, I1 },
+{"rfe", "", 0x42000010, 0xffffffff, 0, I1|T3 },
+{"rol", "d,v,t", 0, (int) M_ROL, INSN_MACRO, I1 },
+{"rol", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, I1 },
+{"ror", "d,v,t", 0, (int) M_ROR, INSN_MACRO, I1 },
+{"ror", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, I1 },
+{"round.l.d", "D,S", 0x46200008, 0xffff003f, WR_D|RD_S|FP_D, I3 },
+{"round.l.s", "D,S", 0x46000008, 0xffff003f, WR_D|RD_S|FP_S, I3 },
+{"round.w.d", "D,S", 0x4620000c, 0xffff003f, WR_D|RD_S|FP_D, I2 },
+{"round.w.s", "D,S", 0x4600000c, 0xffff003f, WR_D|RD_S|FP_S, I2 },
+{"rsqrt.d", "D,S", 0x46200016, 0xffff003f, WR_D|RD_S|FP_D, I4 },
+{"rsqrt.s", "D,S", 0x46000016, 0xffff003f, WR_D|RD_S|FP_S, I4 },
+{"sb", "t,o(b)", 0xa0000000, 0xfc000000, SM|RD_t|RD_b, I1 },
+{"sb", "t,A(b)", 0, (int) M_SB_AB, INSN_MACRO, I1 },
{"sc", "t,o(b)", 0xe0000000, 0xfc000000, SM|RD_t|WR_t|RD_b, I2 },
-{"sc", "t,A(b)", 0, (int) M_SC_AB, INSN_MACRO, I2 },
+{"sc", "t,A(b)", 0, (int) M_SC_AB, INSN_MACRO, I2 },
{"scd", "t,o(b)", 0xf0000000, 0xfc000000, SM|RD_t|WR_t|RD_b, I3 },
-{"scd", "t,A(b)", 0, (int) M_SCD_AB, INSN_MACRO, I3 },
-{"sd", "t,o(b)", 0xfc000000, 0xfc000000, SM|RD_t|RD_b, I3 },
-{"sd", "t,o(b)", 0, (int) M_SD_OB, INSN_MACRO, I1 },
-{"sd", "t,A(b)", 0, (int) M_SD_AB, INSN_MACRO, I1 },
-{"sdbbp", "", 0x0000000e, 0xffffffff, TRAP, G2|M1 },
-{"sdbbp", "c", 0x0000000e, 0xfc00ffff, TRAP, G2|M1 },
-{"sdbbp", "c,q", 0x0000000e, 0xfc00003f, TRAP, G2|M1 },
+{"scd", "t,A(b)", 0, (int) M_SCD_AB, INSN_MACRO, I3 },
+{"sd", "t,o(b)", 0xfc000000, 0xfc000000, SM|RD_t|RD_b, I3 },
+{"sd", "t,o(b)", 0, (int) M_SD_OB, INSN_MACRO, I1 },
+{"sd", "t,A(b)", 0, (int) M_SD_AB, INSN_MACRO, I1 },
+{"sdbbp", "", 0x0000000e, 0xffffffff, TRAP, G2 },
+{"sdbbp", "c", 0x0000000e, 0xfc00ffff, TRAP, G2 },
+{"sdbbp", "c,q", 0x0000000e, 0xfc00003f, TRAP, G2 },
+{"sdbbp", "", 0x7000003f, 0xffffffff, TRAP, I32 },
+{"sdbbp", "B", 0x7000003f, 0xfc00003f, TRAP, I32 },
{"sdc1", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, I2 },
{"sdc1", "E,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, I2 },
-{"sdc1", "T,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, I2 },
-{"sdc1", "E,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, I2 },
-{"sdc2", "E,o(b)", 0xf8000000, 0xfc000000, SM|RD_C2|RD_b, I2 },
-{"sdc2", "E,A(b)", 0, (int) M_SDC2_AB, INSN_MACRO, I2 },
-{"sdc3", "E,o(b)", 0xfc000000, 0xfc000000, SM|RD_C3|RD_b, I2 },
-{"sdc3", "E,A(b)", 0, (int) M_SDC3_AB, INSN_MACRO, I2 },
+{"sdc1", "T,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, I2 },
+{"sdc1", "E,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, I2 },
+{"sdc2", "E,o(b)", 0xf8000000, 0xfc000000, SM|RD_C2|RD_b, I2 },
+{"sdc2", "E,A(b)", 0, (int) M_SDC2_AB, INSN_MACRO, I2 },
+{"sdc3", "E,o(b)", 0xfc000000, 0xfc000000, SM|RD_C3|RD_b, I2 },
+{"sdc3", "E,A(b)", 0, (int) M_SDC3_AB, INSN_MACRO, I2 },
{"s.d", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, I2 },
-{"s.d", "T,o(b)", 0, (int) M_S_DOB, INSN_MACRO, I1 },
-{"s.d", "T,A(b)", 0, (int) M_S_DAB, INSN_MACRO, I1 },
-{"sdl", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, I3 },
-{"sdl", "t,A(b)", 0, (int) M_SDL_AB, INSN_MACRO, I3 },
-{"sdr", "t,o(b)", 0xb4000000, 0xfc000000, SM|RD_t|RD_b, I3 },
-{"sdr", "t,A(b)", 0, (int) M_SDR_AB, INSN_MACRO, I3 },
+{"s.d", "T,o(b)", 0, (int) M_S_DOB, INSN_MACRO, I1 },
+{"s.d", "T,A(b)", 0, (int) M_S_DAB, INSN_MACRO, I1 },
+{"sdl", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, I3 },
+{"sdl", "t,A(b)", 0, (int) M_SDL_AB, INSN_MACRO, I3 },
+{"sdr", "t,o(b)", 0xb4000000, 0xfc000000, SM|RD_t|RD_b, I3 },
+{"sdr", "t,A(b)", 0, (int) M_SDR_AB, INSN_MACRO, I3 },
{"sdxc1", "S,t(b)", 0x4c000009, 0xfc0007ff, SM|RD_S|RD_t|RD_b, I4 },
-{"selsl", "d,v,t", 0x00000005, 0xfc0007ff, WR_d|RD_s|RD_t,L1 },
-{"selsr", "d,v,t", 0x00000001, 0xfc0007ff, WR_d|RD_s|RD_t,L1 },
-{"seq", "d,v,t", 0, (int) M_SEQ, INSN_MACRO, I1 },
-{"seq", "d,v,I", 0, (int) M_SEQ_I, INSN_MACRO, I1 },
-{"sge", "d,v,t", 0, (int) M_SGE, INSN_MACRO, I1 },
-{"sge", "d,v,I", 0, (int) M_SGE_I, INSN_MACRO, I1 },
-{"sgeu", "d,v,t", 0, (int) M_SGEU, INSN_MACRO, I1 },
-{"sgeu", "d,v,I", 0, (int) M_SGEU_I, INSN_MACRO, I1 },
-{"sgt", "d,v,t", 0, (int) M_SGT, INSN_MACRO, I1 },
-{"sgt", "d,v,I", 0, (int) M_SGT_I, INSN_MACRO, I1 },
-{"sgtu", "d,v,t", 0, (int) M_SGTU, INSN_MACRO, I1 },
-{"sgtu", "d,v,I", 0, (int) M_SGTU_I, INSN_MACRO, I1 },
-{"sh", "t,o(b)", 0xa4000000, 0xfc000000, SM|RD_t|RD_b, I1 },
-{"sh", "t,A(b)", 0, (int) M_SH_AB, INSN_MACRO, I1 },
-{"sle", "d,v,t", 0, (int) M_SLE, INSN_MACRO, I1 },
-{"sle", "d,v,I", 0, (int) M_SLE_I, INSN_MACRO, I1 },
-{"sleu", "d,v,t", 0, (int) M_SLEU, INSN_MACRO, I1 },
-{"sleu", "d,v,I", 0, (int) M_SLEU_I, INSN_MACRO, I1 },
-{"sllv", "d,t,s", 0x00000004, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
-{"sll", "d,w,s", 0x00000004, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* sllv */
-{"sll", "d,w,<", 0x00000000, 0xffe0003f, WR_d|RD_t, I1 },
-{"slt", "d,v,t", 0x0000002a, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"slt", "d,v,I", 0, (int) M_SLT_I, INSN_MACRO, I1 },
-{"slti", "t,r,j", 0x28000000, 0xfc000000, WR_t|RD_s, I1 },
-{"sltiu", "t,r,j", 0x2c000000, 0xfc000000, WR_t|RD_s, I1 },
-{"sltu", "d,v,t", 0x0000002b, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"sltu", "d,v,I", 0, (int) M_SLTU_I, INSN_MACRO, I1 },
-{"sne", "d,v,t", 0, (int) M_SNE, INSN_MACRO, I1 },
-{"sne", "d,v,I", 0, (int) M_SNE_I, INSN_MACRO, I1 },
-{"sqrt.d", "D,S", 0x46200004, 0xffff003f, WR_D|RD_S|FP_D, I2 },
-{"sqrt.s", "D,S", 0x46000004, 0xffff003f, WR_D|RD_S|FP_S, I2 },
-{"srav", "d,t,s", 0x00000007, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
-{"sra", "d,w,s", 0x00000007, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* srav */
-{"sra", "d,w,<", 0x00000003, 0xffe0003f, WR_d|RD_t, I1 },
-{"srlv", "d,t,s", 0x00000006, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
-{"srl", "d,w,s", 0x00000006, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* srlv */
-{"srl", "d,w,<", 0x00000002, 0xffe0003f, WR_d|RD_t, I1 },
-{"ssnop", "", 0x00000040, 0xffffffff, 0, M1 },
-{"standby", "", 0x42000021, 0xffffffff, 0, V1 },
-{"sub", "d,v,t", 0x00000022, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"sub", "d,v,I", 0, (int) M_SUB_I, INSN_MACRO, I1 },
+{"selsl", "d,v,t", 0x00000005, 0xfc0007ff, WR_d|RD_s|RD_t, L1 },
+{"selsr", "d,v,t", 0x00000001, 0xfc0007ff, WR_d|RD_s|RD_t, L1 },
+{"seq", "d,v,t", 0, (int) M_SEQ, INSN_MACRO, I1 },
+{"seq", "d,v,I", 0, (int) M_SEQ_I, INSN_MACRO, I1 },
+{"sge", "d,v,t", 0, (int) M_SGE, INSN_MACRO, I1 },
+{"sge", "d,v,I", 0, (int) M_SGE_I, INSN_MACRO, I1 },
+{"sgeu", "d,v,t", 0, (int) M_SGEU, INSN_MACRO, I1 },
+{"sgeu", "d,v,I", 0, (int) M_SGEU_I, INSN_MACRO, I1 },
+{"sgt", "d,v,t", 0, (int) M_SGT, INSN_MACRO, I1 },
+{"sgt", "d,v,I", 0, (int) M_SGT_I, INSN_MACRO, I1 },
+{"sgtu", "d,v,t", 0, (int) M_SGTU, INSN_MACRO, I1 },
+{"sgtu", "d,v,I", 0, (int) M_SGTU_I, INSN_MACRO, I1 },
+{"sh", "t,o(b)", 0xa4000000, 0xfc000000, SM|RD_t|RD_b, I1 },
+{"sh", "t,A(b)", 0, (int) M_SH_AB, INSN_MACRO, I1 },
+{"sle", "d,v,t", 0, (int) M_SLE, INSN_MACRO, I1 },
+{"sle", "d,v,I", 0, (int) M_SLE_I, INSN_MACRO, I1 },
+{"sleu", "d,v,t", 0, (int) M_SLEU, INSN_MACRO, I1 },
+{"sleu", "d,v,I", 0, (int) M_SLEU_I, INSN_MACRO, I1 },
+{"sllv", "d,t,s", 0x00000004, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
+{"sll", "d,w,s", 0x00000004, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* sllv */
+{"sll", "d,w,<", 0x00000000, 0xffe0003f, WR_d|RD_t, I1 },
+{"slt", "d,v,t", 0x0000002a, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"slt", "d,v,I", 0, (int) M_SLT_I, INSN_MACRO, I1 },
+{"slti", "t,r,j", 0x28000000, 0xfc000000, WR_t|RD_s, I1 },
+{"sltiu", "t,r,j", 0x2c000000, 0xfc000000, WR_t|RD_s, I1 },
+{"sltu", "d,v,t", 0x0000002b, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"sltu", "d,v,I", 0, (int) M_SLTU_I, INSN_MACRO, I1 },
+{"sne", "d,v,t", 0, (int) M_SNE, INSN_MACRO, I1 },
+{"sne", "d,v,I", 0, (int) M_SNE_I, INSN_MACRO, I1 },
+{"sqrt.d", "D,S", 0x46200004, 0xffff003f, WR_D|RD_S|FP_D, I2 },
+{"sqrt.s", "D,S", 0x46000004, 0xffff003f, WR_D|RD_S|FP_S, I2 },
+{"srav", "d,t,s", 0x00000007, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
+{"sra", "d,w,s", 0x00000007, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* srav */
+{"sra", "d,w,<", 0x00000003, 0xffe0003f, WR_d|RD_t, I1 },
+{"srlv", "d,t,s", 0x00000006, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
+{"srl", "d,w,s", 0x00000006, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* srlv */
+{"srl", "d,w,<", 0x00000002, 0xffe0003f, WR_d|RD_t, I1 },
+/* ssnop is at the start of the table. */
+{"standby", "", 0x42000021, 0xffffffff, 0, V1 },
+{"sub", "d,v,t", 0x00000022, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"sub", "d,v,I", 0, (int) M_SUB_I, INSN_MACRO, I1 },
{"sub.d", "D,V,T", 0x46200001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I1 },
{"sub.s", "D,V,T", 0x46000001, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, I1 },
{"sub.ps", "D,V,T", 0x46c00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
-{"subu", "d,v,t", 0x00000023, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"subu", "d,v,I", 0, (int) M_SUBU_I, INSN_MACRO, I1 },
-{"suspend", "", 0x42000022, 0xffffffff, 0, V1 },
+{"subu", "d,v,t", 0x00000023, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"subu", "d,v,I", 0, (int) M_SUBU_I, INSN_MACRO, I1 },
+{"suspend", "", 0x42000022, 0xffffffff, 0, V1 },
{"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, SM|RD_S|RD_t|RD_b, I5 },
-{"sw", "t,o(b)", 0xac000000, 0xfc000000, SM|RD_t|RD_b, I1 },
-{"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, I1 },
-{"swc0", "E,o(b)", 0xe0000000, 0xfc000000, SM|RD_C0|RD_b, I1 },
-{"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, I1 },
+{"sw", "t,o(b)", 0xac000000, 0xfc000000, SM|RD_t|RD_b, I1 },
+{"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, I1 },
+{"swc0", "E,o(b)", 0xe0000000, 0xfc000000, SM|RD_C0|RD_b, I1 },
+{"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, I1 },
{"swc1", "T,o(b)", 0xe4000000, 0xfc000000, SM|RD_T|RD_b|FP_S, I1 },
{"swc1", "E,o(b)", 0xe4000000, 0xfc000000, SM|RD_T|RD_b|FP_S, I1 },
-{"swc1", "T,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, I1 },
-{"swc1", "E,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, I1 },
+{"swc1", "T,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, I1 },
+{"swc1", "E,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, I1 },
{"s.s", "T,o(b)", 0xe4000000, 0xfc000000, SM|RD_T|RD_b|FP_S, I1 }, /* swc1 */
-{"s.s", "T,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, I1 },
-{"swc2", "E,o(b)", 0xe8000000, 0xfc000000, SM|RD_C2|RD_b, I1 },
-{"swc2", "E,A(b)", 0, (int) M_SWC2_AB, INSN_MACRO, I1 },
-{"swc3", "E,o(b)", 0xec000000, 0xfc000000, SM|RD_C3|RD_b, I1 },
-{"swc3", "E,A(b)", 0, (int) M_SWC3_AB, INSN_MACRO, I1 },
-{"swl", "t,o(b)", 0xa8000000, 0xfc000000, SM|RD_t|RD_b, I1 },
-{"swl", "t,A(b)", 0, (int) M_SWL_AB, INSN_MACRO, I1 },
-{"scache", "t,o(b)", 0xa8000000, 0xfc000000, RD_t|RD_b, I2 }, /* same */
-{"scache", "t,A(b)", 0, (int) M_SWL_AB, INSN_MACRO, I2 }, /* as swl */
-{"swr", "t,o(b)", 0xb8000000, 0xfc000000, SM|RD_t|RD_b, I1 },
-{"swr", "t,A(b)", 0, (int) M_SWR_AB, INSN_MACRO, I1 },
-{"invalidate", "t,o(b)",0xb8000000, 0xfc000000, RD_t|RD_b, I2 }, /* same */
-{"invalidate", "t,A(b)",0, (int) M_SWR_AB, INSN_MACRO, I2 }, /* as swr */
+{"s.s", "T,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, I1 },
+{"swc2", "E,o(b)", 0xe8000000, 0xfc000000, SM|RD_C2|RD_b, I1 },
+{"swc2", "E,A(b)", 0, (int) M_SWC2_AB, INSN_MACRO, I1 },
+{"swc3", "E,o(b)", 0xec000000, 0xfc000000, SM|RD_C3|RD_b, I1 },
+{"swc3", "E,A(b)", 0, (int) M_SWC3_AB, INSN_MACRO, I1 },
+{"swl", "t,o(b)", 0xa8000000, 0xfc000000, SM|RD_t|RD_b, I1 },
+{"swl", "t,A(b)", 0, (int) M_SWL_AB, INSN_MACRO, I1 },
+{"scache", "t,o(b)", 0xa8000000, 0xfc000000, RD_t|RD_b, I2 }, /* same */
+{"scache", "t,A(b)", 0, (int) M_SWL_AB, INSN_MACRO, I2 }, /* as swl */
+{"swr", "t,o(b)", 0xb8000000, 0xfc000000, SM|RD_t|RD_b, I1 },
+{"swr", "t,A(b)", 0, (int) M_SWR_AB, INSN_MACRO, I1 },
+{"invalidate", "t,o(b)",0xb8000000, 0xfc000000, RD_t|RD_b, I2 }, /* same */
+{"invalidate", "t,A(b)",0, (int) M_SWR_AB, INSN_MACRO, I2 }, /* as swr */
{"swxc1", "S,t(b)", 0x4c000008, 0xfc0007ff, SM|RD_S|RD_t|RD_b, I4 },
-{"sync", "", 0x0000000f, 0xffffffff, INSN_SYNC, I2|G1 },
-{"sync.p", "", 0x0000040f, 0xffffffff, INSN_SYNC, I2 },
-{"sync.l", "", 0x0000000f, 0xffffffff, INSN_SYNC, I2 },
-{"syscall", "", 0x0000000c, 0xffffffff, TRAP, I1 },
-{"syscall", "B", 0x0000000c, 0xfc00003f, TRAP, I1 },
-{"teqi", "s,j", 0x040c0000, 0xfc1f0000, RD_s|TRAP, I2 },
-{"teq", "s,t", 0x00000034, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
-{"teq", "s,t,q", 0x00000034, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
-{"teq", "s,j", 0x040c0000, 0xfc1f0000, RD_s|TRAP, I2 }, /* teqi */
-{"teq", "s,I", 0, (int) M_TEQ_I, INSN_MACRO, I2 },
-{"tgei", "s,j", 0x04080000, 0xfc1f0000, RD_s|TRAP, I2 },
-{"tge", "s,t", 0x00000030, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
-{"tge", "s,t,q", 0x00000030, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
-{"tge", "s,j", 0x04080000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tgei */
-{"tge", "s,I", 0, (int) M_TGE_I, INSN_MACRO, I2 },
-{"tgeiu", "s,j", 0x04090000, 0xfc1f0000, RD_s|TRAP, I2 },
-{"tgeu", "s,t", 0x00000031, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
-{"tgeu", "s,t,q", 0x00000031, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
-{"tgeu", "s,j", 0x04090000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tgeiu */
-{"tgeu", "s,I", 0, (int) M_TGEU_I, INSN_MACRO, I2 },
-{"tlbp", "", 0x42000008, 0xffffffff, INSN_TLB, I1|M1 },
-{"tlbr", "", 0x42000001, 0xffffffff, INSN_TLB, I1|M1 },
-{"tlbwi", "", 0x42000002, 0xffffffff, INSN_TLB, I1|M1 },
-{"tlbwr", "", 0x42000006, 0xffffffff, INSN_TLB, I1|M1 },
-{"tlti", "s,j", 0x040a0000, 0xfc1f0000, RD_s|TRAP, I2 },
-{"tlt", "s,t", 0x00000032, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
-{"tlt", "s,t,q", 0x00000032, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
-{"tlt", "s,j", 0x040a0000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tlti */
-{"tlt", "s,I", 0, (int) M_TLT_I, INSN_MACRO, I2 },
-{"tltiu", "s,j", 0x040b0000, 0xfc1f0000, RD_s|TRAP, I2 },
-{"tltu", "s,t", 0x00000033, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
-{"tltu", "s,t,q", 0x00000033, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
-{"tltu", "s,j", 0x040b0000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tltiu */
-{"tltu", "s,I", 0, (int) M_TLTU_I, INSN_MACRO, I2 },
-{"tnei", "s,j", 0x040e0000, 0xfc1f0000, RD_s|TRAP, I2 },
-{"tne", "s,t", 0x00000036, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
-{"tne", "s,t,q", 0x00000036, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
-{"tne", "s,j", 0x040e0000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tnei */
-{"tne", "s,I", 0, (int) M_TNE_I, INSN_MACRO, I2 },
-{"trunc.l.d", "D,S", 0x46200009, 0xffff003f, WR_D|RD_S|FP_D, I3 },
-{"trunc.l.s", "D,S", 0x46000009, 0xffff003f, WR_D|RD_S|FP_S, I3 },
-{"trunc.w.d", "D,S", 0x4620000d, 0xffff003f, WR_D|RD_S|FP_D, I2 },
-{"trunc.w.d", "D,S,x", 0x4620000d, 0xffff003f, WR_D|RD_S|FP_D, I2 },
-{"trunc.w.d", "D,S,t", 0, (int) M_TRUNCWD, INSN_MACRO, I1 },
-{"trunc.w.s", "D,S", 0x4600000d, 0xffff003f, WR_D|RD_S|FP_S, I2 },
-{"trunc.w.s", "D,S,x", 0x4600000d, 0xffff003f, WR_D|RD_S|FP_S, I2 },
-{"trunc.w.s", "D,S,t", 0, (int) M_TRUNCWS, INSN_MACRO, I1 },
-{"uld", "t,o(b)", 0, (int) M_ULD, INSN_MACRO, I3 },
-{"uld", "t,A(b)", 0, (int) M_ULD_A, INSN_MACRO, I3 },
-{"ulh", "t,o(b)", 0, (int) M_ULH, INSN_MACRO, I1 },
-{"ulh", "t,A(b)", 0, (int) M_ULH_A, INSN_MACRO, I1 },
-{"ulhu", "t,o(b)", 0, (int) M_ULHU, INSN_MACRO, I1 },
-{"ulhu", "t,A(b)", 0, (int) M_ULHU_A, INSN_MACRO, I1 },
-{"ulw", "t,o(b)", 0, (int) M_ULW, INSN_MACRO, I1 },
-{"ulw", "t,A(b)", 0, (int) M_ULW_A, INSN_MACRO, I1 },
-{"usd", "t,o(b)", 0, (int) M_USD, INSN_MACRO, I3 },
-{"usd", "t,A(b)", 0, (int) M_USD_A, INSN_MACRO, I3 },
-{"ush", "t,o(b)", 0, (int) M_USH, INSN_MACRO, I1 },
-{"ush", "t,A(b)", 0, (int) M_USH_A, INSN_MACRO, I1 },
-{"usw", "t,o(b)", 0, (int) M_USW, INSN_MACRO, I1 },
-{"usw", "t,A(b)", 0, (int) M_USW_A, INSN_MACRO, I1 },
-{"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"xor", "t,r,I", 0, (int) M_XOR_I, INSN_MACRO, I1 },
-{"xori", "t,r,i", 0x38000000, 0xfc000000, WR_t|RD_s, I1 },
-{"wait", "", 0x42000020, 0xffffffff, TRAP, I3|M1 },
-{"waiti", "", 0x42000020, 0xffffffff, TRAP, L1 },
-{"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, L1 },
+{"sync", "", 0x0000000f, 0xffffffff, INSN_SYNC, I2|G1 },
+{"sync.p", "", 0x0000040f, 0xffffffff, INSN_SYNC, I2 },
+{"sync.l", "", 0x0000000f, 0xffffffff, INSN_SYNC, I2 },
+{"syscall", "", 0x0000000c, 0xffffffff, TRAP, I1 },
+{"syscall", "B", 0x0000000c, 0xfc00003f, TRAP, I1 },
+{"teqi", "s,j", 0x040c0000, 0xfc1f0000, RD_s|TRAP, I2 },
+{"teq", "s,t", 0x00000034, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
+{"teq", "s,t,q", 0x00000034, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
+{"teq", "s,j", 0x040c0000, 0xfc1f0000, RD_s|TRAP, I2 }, /* teqi */
+{"teq", "s,I", 0, (int) M_TEQ_I, INSN_MACRO, I2 },
+{"tgei", "s,j", 0x04080000, 0xfc1f0000, RD_s|TRAP, I2 },
+{"tge", "s,t", 0x00000030, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
+{"tge", "s,t,q", 0x00000030, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
+{"tge", "s,j", 0x04080000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tgei */
+{"tge", "s,I", 0, (int) M_TGE_I, INSN_MACRO, I2 },
+{"tgeiu", "s,j", 0x04090000, 0xfc1f0000, RD_s|TRAP, I2 },
+{"tgeu", "s,t", 0x00000031, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
+{"tgeu", "s,t,q", 0x00000031, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
+{"tgeu", "s,j", 0x04090000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tgeiu */
+{"tgeu", "s,I", 0, (int) M_TGEU_I, INSN_MACRO, I2 },
+{"tlbp", "", 0x42000008, 0xffffffff, INSN_TLB, I1 },
+{"tlbr", "", 0x42000001, 0xffffffff, INSN_TLB, I1 },
+{"tlbwi", "", 0x42000002, 0xffffffff, INSN_TLB, I1 },
+{"tlbwr", "", 0x42000006, 0xffffffff, INSN_TLB, I1 },
+{"tlti", "s,j", 0x040a0000, 0xfc1f0000, RD_s|TRAP, I2 },
+{"tlt", "s,t", 0x00000032, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
+{"tlt", "s,t,q", 0x00000032, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
+{"tlt", "s,j", 0x040a0000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tlti */
+{"tlt", "s,I", 0, (int) M_TLT_I, INSN_MACRO, I2 },
+{"tltiu", "s,j", 0x040b0000, 0xfc1f0000, RD_s|TRAP, I2 },
+{"tltu", "s,t", 0x00000033, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
+{"tltu", "s,t,q", 0x00000033, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
+{"tltu", "s,j", 0x040b0000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tltiu */
+{"tltu", "s,I", 0, (int) M_TLTU_I, INSN_MACRO, I2 },
+{"tnei", "s,j", 0x040e0000, 0xfc1f0000, RD_s|TRAP, I2 },
+{"tne", "s,t", 0x00000036, 0xfc00ffff, RD_s|RD_t|TRAP, I2 },
+{"tne", "s,t,q", 0x00000036, 0xfc00003f, RD_s|RD_t|TRAP, I2 },
+{"tne", "s,j", 0x040e0000, 0xfc1f0000, RD_s|TRAP, I2 }, /* tnei */
+{"tne", "s,I", 0, (int) M_TNE_I, INSN_MACRO, I2 },
+{"trunc.l.d", "D,S", 0x46200009, 0xffff003f, WR_D|RD_S|FP_D, I3 },
+{"trunc.l.s", "D,S", 0x46000009, 0xffff003f, WR_D|RD_S|FP_S, I3 },
+{"trunc.w.d", "D,S", 0x4620000d, 0xffff003f, WR_D|RD_S|FP_D, I2 },
+{"trunc.w.d", "D,S,x", 0x4620000d, 0xffff003f, WR_D|RD_S|FP_D, I2 },
+{"trunc.w.d", "D,S,t", 0, (int) M_TRUNCWD, INSN_MACRO, I1 },
+{"trunc.w.s", "D,S", 0x4600000d, 0xffff003f, WR_D|RD_S|FP_S, I2 },
+{"trunc.w.s", "D,S,x", 0x4600000d, 0xffff003f, WR_D|RD_S|FP_S, I2 },
+{"trunc.w.s", "D,S,t", 0, (int) M_TRUNCWS, INSN_MACRO, I1 },
+{"uld", "t,o(b)", 0, (int) M_ULD, INSN_MACRO, I3 },
+{"uld", "t,A(b)", 0, (int) M_ULD_A, INSN_MACRO, I3 },
+{"ulh", "t,o(b)", 0, (int) M_ULH, INSN_MACRO, I1 },
+{"ulh", "t,A(b)", 0, (int) M_ULH_A, INSN_MACRO, I1 },
+{"ulhu", "t,o(b)", 0, (int) M_ULHU, INSN_MACRO, I1 },
+{"ulhu", "t,A(b)", 0, (int) M_ULHU_A, INSN_MACRO, I1 },
+{"ulw", "t,o(b)", 0, (int) M_ULW, INSN_MACRO, I1 },
+{"ulw", "t,A(b)", 0, (int) M_ULW_A, INSN_MACRO, I1 },
+{"usd", "t,o(b)", 0, (int) M_USD, INSN_MACRO, I3 },
+{"usd", "t,A(b)", 0, (int) M_USD_A, INSN_MACRO, I3 },
+{"ush", "t,o(b)", 0, (int) M_USH, INSN_MACRO, I1 },
+{"ush", "t,A(b)", 0, (int) M_USH_A, INSN_MACRO, I1 },
+{"usw", "t,o(b)", 0, (int) M_USW, INSN_MACRO, I1 },
+{"usw", "t,A(b)", 0, (int) M_USW_A, INSN_MACRO, I1 },
+{"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"xor", "t,r,I", 0, (int) M_XOR_I, INSN_MACRO, I1 },
+{"xori", "t,r,i", 0x38000000, 0xfc000000, WR_t|RD_s, I1 },
+{"wait", "", 0x42000020, 0xffffffff, TRAP, I3|I32 },
+{"wait", "J", 0x42000020, 0xfe00003f, TRAP, I32 },
+{"waiti", "", 0x42000020, 0xffffffff, TRAP, L1 },
+{"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, L1 },
/* No hazard protection on coprocessor instructions--they shouldn't
change the state of the processor and if they do it's up to the
user to put in nops as necessary. These are at the end so that the
disasembler recognizes more specific versions first. */
-{"c0", "C", 0x42000000, 0xfe000000, 0, I1 },
-{"c1", "C", 0x46000000, 0xfe000000, 0, I1 },
-{"c2", "C", 0x4a000000, 0xfe000000, 0, I1 },
-{"c3", "C", 0x4e000000, 0xfe000000, 0, I1 },
-{"cop0", "C", 0, (int) M_COP0, INSN_MACRO, I1 },
-{"cop1", "C", 0, (int) M_COP1, INSN_MACRO, I1 },
-{"cop2", "C", 0, (int) M_COP2, INSN_MACRO, I1 },
-{"cop3", "C", 0, (int) M_COP3, INSN_MACRO, I1 },
+{"c0", "C", 0x42000000, 0xfe000000, 0, I1 },
+{"c1", "C", 0x46000000, 0xfe000000, 0, I1 },
+{"c2", "C", 0x4a000000, 0xfe000000, 0, I1 },
+{"c3", "C", 0x4e000000, 0xfe000000, 0, I1 },
+{"cop0", "C", 0, (int) M_COP0, INSN_MACRO, I1 },
+{"cop1", "C", 0, (int) M_COP1, INSN_MACRO, I1 },
+{"cop2", "C", 0, (int) M_COP2, INSN_MACRO, I1 },
+{"cop3", "C", 0, (int) M_COP3, INSN_MACRO, I1 },
/* Conflicts with the 4650's "mul" instruction. Nobody's using the
4010 any more, so move this insn out of the way. If the object
format gave us more info, we could do this right. */
-{"addciu", "t,r,j", 0x70000000, 0xfc000000, WR_t|RD_s,L1 },
+{"addciu", "t,r,j", 0x70000000, 0xfc000000, WR_t|RD_s, L1 },
};
#define MIPS_NUM_OPCODES \
diff --git a/gnu/usr.bin/binutils/opcodes/ns32k-dis.c b/gnu/usr.bin/binutils/opcodes/ns32k-dis.c
index 050266be849..610e37305f7 100644
--- a/gnu/usr.bin/binutils/opcodes/ns32k-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/ns32k-dis.c
@@ -1,5 +1,6 @@
/* Print National Semiconductor 32000 instructions.
- Copyright (c) 1986, 88, 91, 92, 94, 95, 1998 Free Software Foundation, Inc.
+ Copyright 1986, 1988, 1991, 1992, 1994, 1998
+ Free Software Foundation, Inc.
This file is part of opcodes library.
diff --git a/gnu/usr.bin/binutils/opcodes/ppc-dis.c b/gnu/usr.bin/binutils/opcodes/ppc-dis.c
index f2566328548..c59a9201f67 100644
--- a/gnu/usr.bin/binutils/opcodes/ppc-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/ppc-dis.c
@@ -1,5 +1,5 @@
/* ppc-dis.c -- Disassemble PowerPC instructions
- Copyright 1994 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -33,7 +33,8 @@ static int print_insn_powerpc PARAMS ((bfd_vma, struct disassemble_info *,
int bigendian, int dialect));
/* Print a big endian PowerPC instruction. For convenience, also
- disassemble instructions supported by the Motorola PowerPC 601. */
+ disassemble instructions supported by the Motorola PowerPC 601
+ and the Altivec vector unit. */
int
print_insn_big_powerpc (memaddr, info)
@@ -41,11 +42,13 @@ print_insn_big_powerpc (memaddr, info)
struct disassemble_info *info;
{
return print_insn_powerpc (memaddr, info, 1,
- PPC_OPCODE_PPC | PPC_OPCODE_601);
+ PPC_OPCODE_PPC | PPC_OPCODE_601 |
+ PPC_OPCODE_ALTIVEC);
}
/* Print a little endian PowerPC instruction. For convenience, also
- disassemble instructions supported by the Motorola PowerPC 601. */
+ disassemble instructions supported by the Motorola PowerPC 601
+ and the Altivec vector unit. */
int
print_insn_little_powerpc (memaddr, info)
@@ -53,7 +56,8 @@ print_insn_little_powerpc (memaddr, info)
struct disassemble_info *info;
{
return print_insn_powerpc (memaddr, info, 0,
- PPC_OPCODE_PPC | PPC_OPCODE_601);
+ PPC_OPCODE_PPC | PPC_OPCODE_601 |
+ PPC_OPCODE_ALTIVEC);
}
/* Print a POWER (RS/6000) instruction. */
@@ -181,6 +185,8 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
(*info->fprintf_func) (info->stream, "r%ld", value);
else if ((operand->flags & PPC_OPERAND_FPR) != 0)
(*info->fprintf_func) (info->stream, "f%ld", value);
+ else if ((operand->flags & PPC_OPERAND_VR) != 0)
+ (*info->fprintf_func) (info->stream, "v%ld", value);
else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0)
(*info->print_address_func) (memaddr + value, info);
else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)
diff --git a/gnu/usr.bin/binutils/opcodes/ppc-opc.c b/gnu/usr.bin/binutils/opcodes/ppc-opc.c
index 02fb7a4edf6..aa9616f2499 100644
--- a/gnu/usr.bin/binutils/opcodes/ppc-opc.c
+++ b/gnu/usr.bin/binutils/opcodes/ppc-opc.c
@@ -1,5 +1,6 @@
/* ppc-opc.c -- PowerPC opcode list
- Copyright (c) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -396,6 +397,39 @@ const struct powerpc_operand powerpc_operands[] =
/* The UI field in a D form instruction. */
#define UI U + 1
{ 16, 0, 0, 0, 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},
+
+ /* 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},
+
+ /* The VC field in a VA form instruction. */
+#define VC VB + 1
+#define VC_MASK (0x1f << 6)
+ {5, 6, 0, 0, PPC_OPERAND_VR},
+
+ /* The VD or VS field in a VA, VX, VXR or X form instruction. */
+#define VD VC + 1
+#define VS VD
+#define VD_MASK (0x1f << 21)
+ {5, 21, 0, 0, PPC_OPERAND_VR},
+
+ /* The SIMM field in a VX form instruction. */
+#define SIMM VD + 1
+ { 5, 16, 0, 0, PPC_OPERAND_SIGNED},
+
+ /* The UIMM field in a VX form instruction. */
+#define UIMM SIMM + 1
+ { 5, 16, 0, 0, 0 },
+
+ /* The SHB field in a VA form instruction. */
+#define SHB UIMM + 1
+ { 4, 6, 0, 0, 0 },
};
/* The functions used to insert and extract complicated operands. */
@@ -722,7 +756,7 @@ insert_mbe (insn, value, errmsg)
/* me: location of last 1->0 transition */
/* count: # transitions */
- for (mx = 0, mask = 1 << 31; mx < 32; ++mx, mask >>= 1)
+ for (mx = 0, mask = (long) 1 << 31; mx < 32; ++mx, mask >>= 1)
{
if ((uval & mask) && !last)
{
@@ -1105,6 +1139,24 @@ extract_tbr (insn, invalid)
#define SC(op, sa, lk) (OP (op) | ((((unsigned long)(sa)) & 1) << 1) | ((lk) & 1))
#define SC_MASK (OP_MASK | (((unsigned long)0x3ff) << 16) | (((unsigned long)1) << 1) | 1)
+/* An VX form instruction. */
+#define VX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x7ff))
+
+/* The mask for an VX form instruction. */
+#define VX_MASK VX(0x3f, 0x7ff)
+
+/* An VA form instruction. */
+#define VXA(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x07f))
+
+/* The mask for an VA form instruction. */
+#define VXA_MASK VXA(0x3f, 0x7f)
+
+/* An VXR form instruction. */
+#define VXR(op, xop, rc) (OP (op) | (((rc) & 1) << 10) | (((unsigned long)(xop)) & 0x3ff))
+
+/* The mask for a VXR form instruction. */
+#define VXR_MASK VXR(0x3f, 0x3ff, 1)
+
/* An X form instruction. */
#define X(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
@@ -1143,6 +1195,10 @@ extract_tbr (insn, invalid)
#define XTO(op, xop, to) (X ((op), (xop)) | ((((unsigned long)(to)) & 0x1f) << 21))
#define XTO_MASK (X_MASK | TO_MASK)
+/* An X form tlb instruction with the SH field specified. */
+#define XTLB(op, xop, sh) (X ((op), (xop)) | ((((unsigned long)(sh)) & 0x1f) << 11))
+#define XTLB_MASK (X_MASK | SH_MASK)
+
/* An XFL form instruction. */
#define XFL(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1) | (((unsigned long)(rc)) & 1))
#define XFL_MASK (XFL (0x3f, 0x3ff, 1) | (((unsigned long)1) << 25) | (((unsigned long)1) << 16))
@@ -1270,8 +1326,10 @@ extract_tbr (insn, invalid)
#define PPC64 PPC_OPCODE_PPC | PPC_OPCODE_64 | PPC_OPCODE_ANY
#define PPCONLY PPC_OPCODE_PPC
#define PPC403 PPC
+#define PPC405 PPC403
#define PPC750 PPC
#define PPC860 PPC
+#define PPCVEC PPC_OPCODE_ALTIVEC | PPC_OPCODE_ANY
#define POWER PPC_OPCODE_POWER | PPC_OPCODE_ANY
#define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_ANY
#define PPCPWR2 PPC_OPCODE_PPC | PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_ANY
@@ -1349,6 +1407,248 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "twi", OP(3), OP_MASK, PPCCOM, { TO, RA, SI } },
{ "ti", OP(3), OP_MASK, PWRCOM, { TO, RA, SI } },
+{ "macchw", XO(4,172,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchw.", XO(4,172,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwo", XO(4,172,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwo.", XO(4,172,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchws", XO(4,236,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchws.", XO(4,236,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwso", XO(4,236,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwso.", XO(4,236,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwsu", XO(4,204,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwsu.", XO(4,204,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwsuo", XO(4,204,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwsuo.", XO(4,204,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwu", XO(4,140,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwu.", XO(4,140,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwuo", XO(4,140,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchwuo.", XO(4,140,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhw", XO(4,44,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhw.", XO(4,44,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwo", XO(4,44,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwo.", XO(4,44,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhws", XO(4,108,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhws.", XO(4,108,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwso", XO(4,108,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwso.", XO(4,108,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwsu", XO(4,76,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwsu.", XO(4,76,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwsuo", XO(4,76,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwsuo.", XO(4,76,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwu", XO(4,12,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwu.", XO(4,12,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwuo", XO(4,12,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "machhwuo.", XO(4,12,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhw", XO(4,428,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhw.", XO(4,428,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwo", XO(4,428,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwo.", XO(4,428,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhws", XO(4,492,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhws.", XO(4,492,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwso", XO(4,492,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwso.", XO(4,492,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwsu", XO(4,460,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwsu.", XO(4,460,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwsuo", XO(4,460,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwsuo.", XO(4,460,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwu", XO(4,396,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwu.", XO(4,396,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwuo", XO(4,396,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "maclhwuo.", XO(4,396,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "mulchw", XRC(4,168,0), X_MASK, PPC405, { RT, RA, RB } },
+{ "mulchw.", XRC(4,168,1), X_MASK, PPC405, { RT, RA, RB } },
+{ "mulchwu", XRC(4,136,0), X_MASK, PPC405, { RT, RA, RB } },
+{ "mulchwu.", XRC(4,136,1), X_MASK, PPC405, { RT, RA, RB } },
+{ "mulhhw", XRC(4,40,0), X_MASK, PPC405, { RT, RA, RB } },
+{ "mulhhw.", XRC(4,40,1), X_MASK, PPC405, { RT, RA, RB } },
+{ "mulhhwu", XRC(4,8,0), X_MASK, PPC405, { RT, RA, RB } },
+{ "mulhhwu.", XRC(4,8,1), X_MASK, PPC405, { RT, RA, RB } },
+{ "mullhw", XRC(4,424,0), X_MASK, PPC405, { RT, RA, RB } },
+{ "mullhw.", XRC(4,424,1), X_MASK, PPC405, { RT, RA, RB } },
+{ "mullhwu", XRC(4,392,0), X_MASK, PPC405, { RT, RA, RB } },
+{ "mullhwu.", XRC(4,392,1), X_MASK, PPC405, { RT, RA, RB } },
+{ "nmacchw", XO(4,174,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmacchw.", XO(4,174,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmacchwo", XO(4,174,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmacchwo.", XO(4,174,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmacchws", XO(4,238,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmacchws.", XO(4,238,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmacchwso", XO(4,238,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmacchwso.", XO(4,238,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmachhw", XO(4,46,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmachhw.", XO(4,46,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmachhwo", XO(4,46,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmachhwo.", XO(4,46,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmachhws", XO(4,110,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmachhws.", XO(4,110,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmachhwso", XO(4,110,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmachhwso.", XO(4,110,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmaclhw", XO(4,430,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmaclhw.", XO(4,430,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmaclhwo", XO(4,430,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmaclhwo.", XO(4,430,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmaclhws", XO(4,494,0,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmaclhws.", XO(4,494,0,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmaclhwso", XO(4,494,1,0), XO_MASK, PPC405, { RT, RA, RB } },
+{ "nmaclhwso.", XO(4,494,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "mfvscr", VX(4, 1540), VX_MASK, PPCVEC, { VD } },
+{ "mtvscr", VX(4, 1604), VX_MASK, PPCVEC, { VD } },
+{ "vaddcuw", VX(4, 384), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vaddfp", VX(4, 10), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vaddsbs", VX(4, 768), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vaddshs", VX(4, 832), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vaddsws", VX(4, 896), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vaddubm", VX(4, 0), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vaddubs", VX(4, 512), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vadduhm", VX(4, 64), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vadduhs", VX(4, 576), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vadduwm", VX(4, 128), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vadduws", VX(4, 640), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vand", VX(4, 1028), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vandc", VX(4, 1092), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vavgsb", VX(4, 1282), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vavgsh", VX(4, 1346), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vavgsw", VX(4, 1410), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vavgub", VX(4, 1026), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vavguh", VX(4, 1090), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vavguw", VX(4, 1154), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcfsx", VX(4, 842), VX_MASK, PPCVEC, { VD, VB, UIMM } },
+{ "vcfux", VX(4, 778), VX_MASK, PPCVEC, { VD, VB, UIMM } },
+{ "vcmpbfp", VXR(4, 966, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpbfp.", VXR(4, 966, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpeqfp", VXR(4, 198, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpeqfp.", VXR(4, 198, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpequb", VXR(4, 6, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpequb.", VXR(4, 6, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpequh", VXR(4, 70, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpequh.", VXR(4, 70, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpequw", VXR(4, 134, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpequw.", VXR(4, 134, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgefp", VXR(4, 454, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgefp.", VXR(4, 454, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtfp", VXR(4, 710, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtfp.", VXR(4, 710, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtsb", VXR(4, 774, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtsb.", VXR(4, 774, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtsh", VXR(4, 838, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtsh.", VXR(4, 838, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtsw", VXR(4, 902, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtsw.", VXR(4, 902, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtub", VXR(4, 518, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtub.", VXR(4, 518, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtuh", VXR(4, 582, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtuh.", VXR(4, 582, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtuw", VXR(4, 646, 0), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vcmpgtuw.", VXR(4, 646, 1), VXR_MASK, PPCVEC, { VD, VA, VB } },
+{ "vctsxs", VX(4, 970), VX_MASK, PPCVEC, { VD, VB, UIMM } },
+{ "vctuxs", VX(4, 906), VX_MASK, PPCVEC, { VD, VB, UIMM } },
+{ "vexptefp", VX(4, 394), VX_MASK, PPCVEC, { VD, VB } },
+{ "vlogefp", VX(4, 458), VX_MASK, PPCVEC, { VD, VB } },
+{ "vmaddfp", VXA(4, 46), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmaxfp", VX(4, 1034), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmaxsb", VX(4, 258), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmaxsh", VX(4, 322), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmaxsw", VX(4, 386), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmaxub", VX(4, 2), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmaxuh", VX(4, 66), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmaxuw", VX(4, 130), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmhaddshs", VXA(4, 32), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmhraddshs", VXA(4, 33), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vminfp", VX(4, 1098), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vminsb", VX(4, 770), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vminsh", VX(4, 834), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vminsw", VX(4, 898), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vminub", VX(4, 514), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vminuh", VX(4, 578), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vminuw", VX(4, 642), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmladduhm", VXA(4, 34), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmrghb", VX(4, 12), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmrghh", VX(4, 76), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmrghw", VX(4, 140), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmrglb", VX(4, 268), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmrglh", VX(4, 332), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmrglw", VX(4, 396), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmsummbm", VXA(4, 37), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmsumshm", VXA(4, 40), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmsumshs", VXA(4, 41), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmsumubm", VXA(4, 36), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmsumuhm", VXA(4, 38), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmsumuhs", VXA(4, 39), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vmulesb", VX(4, 776), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmulesh", VX(4, 840), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmuleub", VX(4, 520), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmuleuh", VX(4, 584), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmulosb", VX(4, 264), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmulosh", VX(4, 328), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmuloub", VX(4, 8), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vmulouh", VX(4, 72), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vnmsubfp", VXA(4, 47), VXA_MASK, PPCVEC, { VD, VA, VC, VB } },
+{ "vnor", VX(4, 1284), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vor", VX(4, 1156), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vperm", VXA(4, 43), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vpkpx", VX(4, 782), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vpkshss", VX(4, 398), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vpkshus", VX(4, 270), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vpkswss", VX(4, 462), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vpkswus", VX(4, 334), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vpkuhum", VX(4, 14), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vpkuhus", VX(4, 142), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vpkuwum", VX(4, 78), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vpkuwus", VX(4, 206), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vrefp", VX(4, 266), VX_MASK, PPCVEC, { VD, VB } },
+{ "vrfim", VX(4, 714), VX_MASK, PPCVEC, { VD, VB } },
+{ "vrfin", VX(4, 522), VX_MASK, PPCVEC, { VD, VB } },
+{ "vrfip", VX(4, 650), VX_MASK, PPCVEC, { VD, VB } },
+{ "vrfiz", VX(4, 586), VX_MASK, PPCVEC, { VD, VB } },
+{ "vrlb", VX(4, 4), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vrlh", VX(4, 68), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vrlw", VX(4, 132), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vrsqrtefp", VX(4, 330), VX_MASK, PPCVEC, { VD, VB } },
+{ "vsel", VXA(4, 42), VXA_MASK, PPCVEC, { VD, VA, VB, VC } },
+{ "vsl", VX(4, 452), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vslb", VX(4, 260), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsldoi", VXA(4, 44), VXA_MASK, PPCVEC, { VD, VA, VB, SHB } },
+{ "vslh", VX(4, 324), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vslo", VX(4, 1036), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vslw", VX(4, 388), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vspltb", VX(4, 524), VX_MASK, PPCVEC, { VD, VB, UIMM } },
+{ "vsplth", VX(4, 588), VX_MASK, PPCVEC, { VD, VB, UIMM } },
+{ "vspltisb", VX(4, 780), VX_MASK, PPCVEC, { VD, SIMM } },
+{ "vspltish", VX(4, 844), VX_MASK, PPCVEC, { VD, SIMM } },
+{ "vspltisw", VX(4, 908), VX_MASK, PPCVEC, { VD, SIMM } },
+{ "vspltw", VX(4, 652), VX_MASK, PPCVEC, { VD, VB, UIMM } },
+{ "vsr", VX(4, 708), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsrab", VX(4, 772), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsrah", VX(4, 836), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsraw", VX(4, 900), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsrb", VX(4, 516), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsrh", VX(4, 580), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsro", VX(4, 1100), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsrw", VX(4, 644), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubcuw", VX(4, 1408), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubfp", VX(4, 74), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubsbs", VX(4, 1792), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubshs", VX(4, 1856), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubsws", VX(4, 1920), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsububm", VX(4, 1024), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsububs", VX(4, 1536), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubuhm", VX(4, 1088), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubuhs", VX(4, 1600), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubuwm", VX(4, 1152), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsubuws", VX(4, 1664), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsumsws", VX(4, 1928), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsum2sws", VX(4, 1672), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsum4sbs", VX(4, 1800), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsum4shs", VX(4, 1608), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vsum4ubs", VX(4, 1544), VX_MASK, PPCVEC, { VD, VA, VB } },
+{ "vupkhpx", VX(4, 846), VX_MASK, PPCVEC, { VD, VB } },
+{ "vupkhsb", VX(4, 526), VX_MASK, PPCVEC, { VD, VB } },
+{ "vupkhsh", VX(4, 590), VX_MASK, PPCVEC, { VD, VB } },
+{ "vupklpx", VX(4, 974), VX_MASK, PPCVEC, { VD, VB } },
+{ "vupklsb", VX(4, 654), VX_MASK, PPCVEC, { VD, VB } },
+{ "vupklsh", VX(4, 718), VX_MASK, PPCVEC, { VD, VB } },
+{ "vxor", VX(4, 1220), VX_MASK, PPCVEC, { VD, VA, VB } },
+
{ "mulli", OP(7), OP_MASK, PPCCOM, { RT, RA, SI } },
{ "muli", OP(7), OP_MASK, PWRCOM, { RT, RA, SI } },
@@ -1388,269 +1688,269 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "cau", OP(15), OP_MASK, PWRCOM, { RT,RA,SISIGNOPT } },
{ "subis", OP(15), OP_MASK, PPCCOM, { RT, RA, NSI } },
-{ "bdnz-", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPC, { BDM } },
-{ "bdnz+", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPC, { BDP } },
+{ "bdnz-", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPCCOM, { BDM } },
+{ "bdnz+", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPCCOM, { BDP } },
{ "bdnz", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPCCOM, { BD } },
{ "bdn", BBO(16,BODNZ,0,0), BBOYBI_MASK, PWRCOM, { BD } },
-{ "bdnzl-", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPC, { BDM } },
-{ "bdnzl+", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPC, { BDP } },
+{ "bdnzl-", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPCCOM, { BDM } },
+{ "bdnzl+", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPCCOM, { BDP } },
{ "bdnzl", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPCCOM, { BD } },
{ "bdnl", BBO(16,BODNZ,0,1), BBOYBI_MASK, PWRCOM, { BD } },
-{ "bdnza-", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPC, { BDMA } },
-{ "bdnza+", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdnza-", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPCCOM, { BDMA } },
+{ "bdnza+", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPCCOM, { BDPA } },
{ "bdnza", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPCCOM, { BDA } },
{ "bdna", BBO(16,BODNZ,1,0), BBOYBI_MASK, PWRCOM, { BDA } },
-{ "bdnzla-", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPC, { BDMA } },
-{ "bdnzla+", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdnzla-", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPCCOM, { BDMA } },
+{ "bdnzla+", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPCCOM, { BDPA } },
{ "bdnzla", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPCCOM, { BDA } },
{ "bdnla", BBO(16,BODNZ,1,1), BBOYBI_MASK, PWRCOM, { BDA } },
-{ "bdz-", BBO(16,BODZ,0,0), BBOYBI_MASK, PPC, { BDM } },
-{ "bdz+", BBO(16,BODZ,0,0), BBOYBI_MASK, PPC, { BDP } },
+{ "bdz-", BBO(16,BODZ,0,0), BBOYBI_MASK, PPCCOM, { BDM } },
+{ "bdz+", BBO(16,BODZ,0,0), BBOYBI_MASK, PPCCOM, { BDP } },
{ "bdz", BBO(16,BODZ,0,0), BBOYBI_MASK, COM, { BD } },
-{ "bdzl-", BBO(16,BODZ,0,1), BBOYBI_MASK, PPC, { BDM } },
-{ "bdzl+", BBO(16,BODZ,0,1), BBOYBI_MASK, PPC, { BDP } },
+{ "bdzl-", BBO(16,BODZ,0,1), BBOYBI_MASK, PPCCOM, { BDM } },
+{ "bdzl+", BBO(16,BODZ,0,1), BBOYBI_MASK, PPCCOM, { BDP } },
{ "bdzl", BBO(16,BODZ,0,1), BBOYBI_MASK, COM, { BD } },
-{ "bdza-", BBO(16,BODZ,1,0), BBOYBI_MASK, PPC, { BDMA } },
-{ "bdza+", BBO(16,BODZ,1,0), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdza-", BBO(16,BODZ,1,0), BBOYBI_MASK, PPCCOM, { BDMA } },
+{ "bdza+", BBO(16,BODZ,1,0), BBOYBI_MASK, PPCCOM, { BDPA } },
{ "bdza", BBO(16,BODZ,1,0), BBOYBI_MASK, COM, { BDA } },
-{ "bdzla-", BBO(16,BODZ,1,1), BBOYBI_MASK, PPC, { BDMA } },
-{ "bdzla+", BBO(16,BODZ,1,1), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdzla-", BBO(16,BODZ,1,1), BBOYBI_MASK, PPCCOM, { BDMA } },
+{ "bdzla+", BBO(16,BODZ,1,1), BBOYBI_MASK, PPCCOM, { BDPA } },
{ "bdzla", BBO(16,BODZ,1,1), BBOYBI_MASK, COM, { BDA } },
-{ "blt-", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "blt+", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "blt", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bltl-", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bltl+", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bltl", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "blta-", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "blta+", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "blta", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bltla-", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bltla+", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bltla", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bgt-", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bgt+", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bgt", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bgtl-", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bgtl+", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bgtl", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bgta-", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bgta+", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bgta", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bgtla-", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bgtla+", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bgtla", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "beq-", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "beq+", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "beq", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "beql-", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "beql+", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "beql", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "beqa-", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "beqa+", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "beqa", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "beqla-", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "beqla+", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "beqla", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bso-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bso+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bso", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bsol-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bsol+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bsol", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bsoa-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bsoa+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bsoa", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bsola-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bsola+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bsola", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bun-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bun+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bun", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BD } },
-{ "bunl-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bunl+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bunl", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BD } },
-{ "buna-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "buna+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "buna", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDA } },
-{ "bunla-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bunla+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bunla", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDA } },
-{ "bge-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bge+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bge", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bgel-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bgel+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bgel", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bgea-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bgea+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bgea", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bgela-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bgela+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bgela", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnl-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bnl+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bnl", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnll-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bnll+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bnll", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnla-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnla+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnla", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnlla-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnlla+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnlla", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "ble-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "ble+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "ble", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "blel-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "blel+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "blel", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "blea-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "blea+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "blea", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "blela-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "blela+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "blela", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bng-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bng+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bng", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bngl-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bngl+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bngl", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnga-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnga+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnga", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bngla-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bngla+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bngla", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bne-", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bne+", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bne", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnel-", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bnel+", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bnel", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnea-", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnea+", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnea", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnela-", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnela+", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnela", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bns-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bns+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bns", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnsl-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bnsl+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bnsl", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnsa-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnsa+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnsa", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnsla-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnsla+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnsla", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnu-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bnu+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bnu", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BD } },
-{ "bnul-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
-{ "bnul+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
-{ "bnul", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BD } },
-{ "bnua-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnua+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnua", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDA } },
-{ "bnula-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
-{ "bnula+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
-{ "bnula", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDA } },
-{ "bdnzt-", BBO(16,BODNZT,0,0), BBOY_MASK, PPC, { BI, BDM } },
-{ "bdnzt+", BBO(16,BODNZT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "blt-", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "blt+", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "blt", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bltl-", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bltl+", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bltl", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "blta-", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "blta+", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "blta", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bltla-", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bltla+", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bltla", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bgt-", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bgt+", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bgt", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bgtl-", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bgtl+", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bgtl", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bgta-", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bgta+", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bgta", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bgtla-", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bgtla+", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bgtla", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "beq-", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "beq+", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "beq", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "beql-", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "beql+", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "beql", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "beqa-", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "beqa+", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "beqa", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "beqla-", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "beqla+", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "beqla", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bso-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bso+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bso", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bsol-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bsol+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bsol", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bsoa-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bsoa+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bsoa", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bsola-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bsola+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bsola", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bun-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bun+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bun", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BD } },
+{ "bunl-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bunl+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bunl", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BD } },
+{ "buna-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "buna+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "buna", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDA } },
+{ "bunla-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bunla+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bunla", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDA } },
+{ "bge-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bge+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bge", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bgel-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bgel+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bgel", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bgea-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bgea+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bgea", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bgela-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bgela+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bgela", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnl-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnl+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnl", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnll-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnll+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnll", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnla-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnla+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnla", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnlla-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnlla+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnlla", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "ble-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "ble+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "ble", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "blel-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "blel+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "blel", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "blea-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "blea+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "blea", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "blela-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "blela+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "blela", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bng-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bng+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bng", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bngl-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bngl+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bngl", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnga-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnga+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnga", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bngla-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bngla+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bngla", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bne-", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bne+", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bne", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnel-", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnel+", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnel", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnea-", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnea+", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnea", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnela-", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnela+", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnela", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bns-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bns+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bns", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnsl-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnsl+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnsl", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnsa-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnsa+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnsa", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnsla-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnsla+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnsla", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnu-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnu+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnu", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BD } },
+{ "bnul-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnul+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnul", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BD } },
+{ "bnua-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnua+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnua", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDA } },
+{ "bnula-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnula+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnula", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDA } },
+{ "bdnzt-", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bdnzt+", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bdnzt", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdnztl-", BBO(16,BODNZT,0,1), BBOY_MASK, PPC, { BI, BDM } },
-{ "bdnztl+", BBO(16,BODNZT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnztl-", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bdnztl+", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bdnztl", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdnzta-", BBO(16,BODNZT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bdnzta+", BBO(16,BODNZT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzta-", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bdnzta+", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bdnzta", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdnztla-",BBO(16,BODNZT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bdnztla+",BBO(16,BODNZT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnztla-",BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bdnztla+",BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bdnztla", BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdnzf-", BBO(16,BODNZF,0,0), BBOY_MASK, PPC, { BI, BDM } },
-{ "bdnzf+", BBO(16,BODNZF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnzf-", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bdnzf+", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bdnzf", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdnzfl-", BBO(16,BODNZF,0,1), BBOY_MASK, PPC, { BI, BDM } },
-{ "bdnzfl+", BBO(16,BODNZF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnzfl-", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bdnzfl+", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bdnzfl", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdnzfa-", BBO(16,BODNZF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bdnzfa+", BBO(16,BODNZF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzfa-", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bdnzfa+", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bdnzfa", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdnzfla-",BBO(16,BODNZF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bdnzfla+",BBO(16,BODNZF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzfla-",BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bdnzfla+",BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bdnzfla", BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bt-", BBO(16,BOT,0,0), BBOY_MASK, PPC, { BI, BDM } },
-{ "bt+", BBO(16,BOT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bt-", BBO(16,BOT,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bt+", BBO(16,BOT,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bt", BBO(16,BOT,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
{ "bbt", BBO(16,BOT,0,0), BBOY_MASK, PWRCOM, { BI, BD } },
-{ "btl-", BBO(16,BOT,0,1), BBOY_MASK, PPC, { BI, BDM } },
-{ "btl+", BBO(16,BOT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "btl-", BBO(16,BOT,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "btl+", BBO(16,BOT,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "btl", BBO(16,BOT,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
{ "bbtl", BBO(16,BOT,0,1), BBOY_MASK, PWRCOM, { BI, BD } },
-{ "bta-", BBO(16,BOT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bta+", BBO(16,BOT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bta-", BBO(16,BOT,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bta+", BBO(16,BOT,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bta", BBO(16,BOT,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
{ "bbta", BBO(16,BOT,1,0), BBOY_MASK, PWRCOM, { BI, BDA } },
-{ "btla-", BBO(16,BOT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
-{ "btla+", BBO(16,BOT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "btla-", BBO(16,BOT,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "btla+", BBO(16,BOT,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "btla", BBO(16,BOT,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
{ "bbtla", BBO(16,BOT,1,1), BBOY_MASK, PWRCOM, { BI, BDA } },
-{ "bf-", BBO(16,BOF,0,0), BBOY_MASK, PPC, { BI, BDM } },
-{ "bf+", BBO(16,BOF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bf-", BBO(16,BOF,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bf+", BBO(16,BOF,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bf", BBO(16,BOF,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
{ "bbf", BBO(16,BOF,0,0), BBOY_MASK, PWRCOM, { BI, BD } },
-{ "bfl-", BBO(16,BOF,0,1), BBOY_MASK, PPC, { BI, BDM } },
-{ "bfl+", BBO(16,BOF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bfl-", BBO(16,BOF,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bfl+", BBO(16,BOF,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bfl", BBO(16,BOF,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
{ "bbfl", BBO(16,BOF,0,1), BBOY_MASK, PWRCOM, { BI, BD } },
-{ "bfa-", BBO(16,BOF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bfa+", BBO(16,BOF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bfa-", BBO(16,BOF,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bfa+", BBO(16,BOF,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bfa", BBO(16,BOF,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
{ "bbfa", BBO(16,BOF,1,0), BBOY_MASK, PWRCOM, { BI, BDA } },
-{ "bfla-", BBO(16,BOF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bfla+", BBO(16,BOF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bfla-", BBO(16,BOF,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bfla+", BBO(16,BOF,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bfla", BBO(16,BOF,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
{ "bbfla", BBO(16,BOF,1,1), BBOY_MASK, PWRCOM, { BI, BDA } },
-{ "bdzt-", BBO(16,BODZT,0,0), BBOY_MASK, PPC, { BI, BDM } },
-{ "bdzt+", BBO(16,BODZT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzt-", BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bdzt+", BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bdzt", BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdztl-", BBO(16,BODZT,0,1), BBOY_MASK, PPC, { BI, BDM } },
-{ "bdztl+", BBO(16,BODZT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdztl-", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bdztl+", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bdztl", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdzta-", BBO(16,BODZT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bdzta+", BBO(16,BODZT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzta-", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bdzta+", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bdzta", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdztla-", BBO(16,BODZT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bdztla+", BBO(16,BODZT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdztla-", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bdztla+", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bdztla", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdzf-", BBO(16,BODZF,0,0), BBOY_MASK, PPC, { BI, BDM } },
-{ "bdzf+", BBO(16,BODZF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzf-", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bdzf+", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bdzf", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdzfl-", BBO(16,BODZF,0,1), BBOY_MASK, PPC, { BI, BDM } },
-{ "bdzfl+", BBO(16,BODZF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzfl-", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
+{ "bdzfl+", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
{ "bdzfl", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdzfa-", BBO(16,BODZF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bdzfa+", BBO(16,BODZF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzfa-", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bdzfa+", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bdzfa", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdzfla-", BBO(16,BODZF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
-{ "bdzfla+", BBO(16,BODZF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzfla-", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
+{ "bdzfla+", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
{ "bdzfla", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bc-", B(16,0,0), B_MASK, PPC, { BOE, BI, BDM } },
-{ "bc+", B(16,0,0), B_MASK, PPC, { BOE, BI, BDP } },
+{ "bc-", B(16,0,0), B_MASK, PPCCOM, { BOE, BI, BDM } },
+{ "bc+", B(16,0,0), B_MASK, PPCCOM, { BOE, BI, BDP } },
{ "bc", B(16,0,0), B_MASK, COM, { BO, BI, BD } },
-{ "bcl-", B(16,0,1), B_MASK, PPC, { BOE, BI, BDM } },
-{ "bcl+", B(16,0,1), B_MASK, PPC, { BOE, BI, BDP } },
+{ "bcl-", B(16,0,1), B_MASK, PPCCOM, { BOE, BI, BDM } },
+{ "bcl+", B(16,0,1), B_MASK, PPCCOM, { BOE, BI, BDP } },
{ "bcl", B(16,0,1), B_MASK, COM, { BO, BI, BD } },
-{ "bca-", B(16,1,0), B_MASK, PPC, { BOE, BI, BDMA } },
-{ "bca+", B(16,1,0), B_MASK, PPC, { BOE, BI, BDPA } },
+{ "bca-", B(16,1,0), B_MASK, PPCCOM, { BOE, BI, BDMA } },
+{ "bca+", B(16,1,0), B_MASK, PPCCOM, { BOE, BI, BDPA } },
{ "bca", B(16,1,0), B_MASK, COM, { BO, BI, BDA } },
-{ "bcla-", B(16,1,1), B_MASK, PPC, { BOE, BI, BDMA } },
-{ "bcla+", B(16,1,1), B_MASK, PPC, { BOE, BI, BDPA } },
+{ "bcla-", B(16,1,1), B_MASK, PPCCOM, { BOE, BI, BDMA } },
+{ "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 } },
@@ -1671,163 +1971,165 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "blrl", XLO(19,BOU,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "brl", XLO(19,BOU,16,1), XLBOBIBB_MASK, PWRCOM, { 0 } },
{ "bdnzlr", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdnzlr-", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPC, { 0 } },
-{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlr-", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "bdnzlrl", XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdnzlrl-",XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPC, { 0 } },
-{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlrl-",XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "bdzlr", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlr-", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPC, { 0 } },
-{ "bdzlr+", XLO(19,BODZP,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlr-", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdzlr+", XLO(19,BODZP,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "bdzlrl", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlrl-", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPC, { 0 } },
-{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlrl-", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "bltlr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltlr-", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bltlr+", XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltlr-", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltlr+", XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bltr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bltlrl", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltlrl-", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltlrl-", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bltrl", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bgtlr", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtlr-", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bgtlr+", XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtlr-", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtlr+", XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgtr", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bgtlrl", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtlrl-", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtlrl-", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgtrl", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "beqlr", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqlr-", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "beqlr+", XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqlr-", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqlr+", XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "beqr", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "beqlrl", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqlrl-", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqlrl-", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "beqrl", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bsolr", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsolr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bsolr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsolr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsolr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bsor", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bsolrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsolrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsolrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bsorl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bunlr", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bunlr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunlr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bunlrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgelr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bgelr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgelr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bger", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bgelrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgerl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnllr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnllr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnllr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnllr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnllr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnlr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnllrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnllrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnllrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnlrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "blelr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blelr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "blelr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blelr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blelr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bler", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "blelrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blelrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blelrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "blerl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnglr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnglr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnglr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnglr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnglr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bngr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnglrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnglrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnglrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bngrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnelr", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnelr-", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnelr+", XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnelr-", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnelr+", XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bner", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnelrl", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnelrl-", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnelrl-", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnerl", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnslr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnslr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnslr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnslr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnslr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnsr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnslrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnslrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnslrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnsrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnulr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnulr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnulr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnulrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "btlr", XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btlr-", XLO(19,BOT,16,0), XLBOBB_MASK, PPC, { BI } },
-{ "btlr+", XLO(19,BOTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "btlr-", XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btlr+", XLO(19,BOTP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bbtr", XLO(19,BOT,16,0), XLBOBB_MASK, PWRCOM, { BI } },
{ "btlrl", XLO(19,BOT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btlrl-", XLO(19,BOT,16,1), XLBOBB_MASK, PPC, { BI } },
-{ "btlrl+", XLO(19,BOTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "btlrl-", XLO(19,BOT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btlrl+", XLO(19,BOTP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bbtrl", XLO(19,BOT,16,1), XLBOBB_MASK, PWRCOM, { BI } },
{ "bflr", XLO(19,BOF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bflr-", XLO(19,BOF,16,0), XLBOBB_MASK, PPC, { BI } },
-{ "bflr+", XLO(19,BOFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bflr-", XLO(19,BOF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bflr+", XLO(19,BOFP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bbfr", XLO(19,BOF,16,0), XLBOBB_MASK, PWRCOM, { BI } },
{ "bflrl", XLO(19,BOF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bflrl-", XLO(19,BOF,16,1), XLBOBB_MASK, PPC, { BI } },
-{ "bflrl+", XLO(19,BOFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bflrl-", XLO(19,BOF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bflrl+", XLO(19,BOFP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bbfrl", XLO(19,BOF,16,1), XLBOBB_MASK, PWRCOM, { BI } },
{ "bdnztlr", XLO(19,BODNZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnztlr-",XLO(19,BODNZT,16,0), XLBOBB_MASK, PPC, { BI } },
-{ "bdnztlr+",XLO(19,BODNZTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlr-",XLO(19,BODNZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnztlr+",XLO(19,BODNZTP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bdnztlrl",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnztlrl-",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPC, { BI } },
-{ "bdnztlrl+",XLO(19,BODNZTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlrl-",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnztlrl+",XLO(19,BODNZTP,16,1), XLBOBB_MASK, PPCCOM,{ BI } },
{ "bdnzflr", XLO(19,BODNZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflr-",XLO(19,BODNZF,16,0), XLBOBB_MASK, PPC, { BI } },
-{ "bdnzflr+",XLO(19,BODNZFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflr-",XLO(19,BODNZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnzflr+",XLO(19,BODNZFP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bdnzflrl",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflrl-",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPC, { BI } },
-{ "bdnzflrl+",XLO(19,BODNZFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflrl-",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnzflrl+",XLO(19,BODNZFP,16,1), XLBOBB_MASK, PPCCOM,{ BI } },
{ "bdztlr", XLO(19,BODZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdztlr-", XLO(19,BODZT,16,0), XLBOBB_MASK, PPC, { BI } },
-{ "bdztlr+", XLO(19,BODZTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlr-", XLO(19,BODZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdztlr+", XLO(19,BODZTP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bdztlrl", XLO(19,BODZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdztlrl-",XLO(19,BODZT,16,1), XLBOBB_MASK, PPC, { BI } },
-{ "bdztlrl+",XLO(19,BODZTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlrl-",XLO(19,BODZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdztlrl+",XLO(19,BODZTP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bdzflr", XLO(19,BODZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdzflr-", XLO(19,BODZF,16,0), XLBOBB_MASK, PPC, { BI } },
-{ "bdzflr+", XLO(19,BODZFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflr-", XLO(19,BODZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdzflr+", XLO(19,BODZFP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bdzflrl", XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, PPC, { BI } },
-{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bclr", XLLK(19,16,0), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bclrl", XLLK(19,16,1), XLYBB_MASK, PPCCOM, { BO, BI } },
-{ "bclr+", XLYLK(19,16,1,0), XLYBB_MASK, PPC, { BOE, BI } },
-{ "bclrl+", XLYLK(19,16,1,1), XLYBB_MASK, PPC, { BOE, BI } },
-{ "bclr-", XLYLK(19,16,0,0), XLYBB_MASK, PPC, { BOE, BI } },
-{ "bclrl-", XLYLK(19,16,0,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "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 } },
{ "bcr", XLLK(19,16,0), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bcrl", XLLK(19,16,1), XLBB_MASK, PWRCOM, { BO, BI } },
+{ "rfid", XL(19,18), 0xffffffff, PPC64, { 0 } },
+
{ "crnot", XL(19,33), XL_MASK, PPCCOM, { BT, BA, BBA } },
{ "crnor", XL(19,33), XL_MASK, COM, { BT, BA, BB } },
{ "rfi", XL(19,50), 0xffffffff, COM, { 0 } },
-{ "rfci", XL(19,51), 0xffffffff, PPC, { 0 } },
+{ "rfci", XL(19,51), 0xffffffff, PPC403, { 0 } },
{ "rfsvc", XL(19,82), 0xffffffff, POWER, { 0 } },
@@ -1854,95 +2156,95 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bctr", XLO(19,BOU,528,0), XLBOBIBB_MASK, COM, { 0 } },
{ "bctrl", XLO(19,BOU,528,1), XLBOBIBB_MASK, COM, { 0 } },
{ "bltctr", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctr-", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctr-", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bltctrl", XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctrl-",XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctrl-",XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgtctr", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctr-", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctr-", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgtctrl", XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctrl-",XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctrl-",XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "beqctr", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctr-", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctr-", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "beqctrl", XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctrl-",XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctrl-",XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bsoctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bsoctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bunctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bunctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgectr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgectrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnlctr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnlctrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "blectr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "blectrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bngctr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bngctrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnectr", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectr-", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectr-", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnectrl", XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectrl-",XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectrl-",XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnsctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnsctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnuctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnuctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
-{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "btctr", XLO(19,BOT,528,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btctr-", XLO(19,BOT,528,0), XLBOBB_MASK, PPC, { BI } },
-{ "btctr+", XLO(19,BOTP,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "btctr-", XLO(19,BOT,528,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btctr+", XLO(19,BOTP,528,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "btctrl", XLO(19,BOT,528,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btctrl-", XLO(19,BOT,528,1), XLBOBB_MASK, PPC, { BI } },
-{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "btctrl-", XLO(19,BOT,528,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bfctr", XLO(19,BOF,528,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bfctr-", XLO(19,BOF,528,0), XLBOBB_MASK, PPC, { BI } },
-{ "bfctr+", XLO(19,BOFP,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "bfctr-", XLO(19,BOF,528,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bfctr+", XLO(19,BOFP,528,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bfctrl", XLO(19,BOF,528,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bfctrl-", XLO(19,BOF,528,1), XLBOBB_MASK, PPC, { BI } },
-{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "bfctrl-", XLO(19,BOF,528,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bcctr", XLLK(19,528,0), XLYBB_MASK, PPCCOM, { BO, BI } },
-{ "bcctr-", XLYLK(19,528,0,0), XLYBB_MASK, PPC, { BOE, BI } },
-{ "bcctr+", XLYLK(19,528,1,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "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, PPC, { BOE, BI } },
-{ "bcctrl+", XLYLK(19,528,1,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcctrl-", XLYLK(19,528,0,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
+{ "bcctrl+", XLYLK(19,528,1,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bcc", XLLK(19,528,0), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bccl", XLLK(19,528,1), XLBB_MASK, PWRCOM, { BO, BI } },
@@ -2156,6 +2458,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mulhw", XO(31,75,0,0), XO_MASK, PPC, { RT, RA, RB } },
{ "mulhw.", XO(31,75,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "mtsrd", X(31,82), XRB_MASK|(1<<20), PPC64, { SR, RS } },
+
{ "mfmsr", X(31,83), XRARB_MASK, COM, { RT } },
{ "ldarx", X(31,84), X_MASK, PPC64, { RT, RA, RB } },
@@ -2174,6 +2478,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mulo", XO(31,107,1,0), XO_MASK, M601, { RT, RA, RB } },
{ "mulo.", XO(31,107,1,1), XO_MASK, M601, { RT, RA, RB } },
+{ "mtsrdin", X(31,114), XRA_MASK, PPC64, { RS, RB } },
+
{ "clf", X(31,118), XRB_MASK, POWER, { RT, RA } },
{ "lbzux", X(31,119), X_MASK, COM, { RT, RAL, RB } },
@@ -2223,6 +2529,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "wrteei", X(31,163), XE_MASK, PPC403, { E } },
+{ "mtmsrd", X(31,178), XRARB_MASK, PPC64, { RS } },
+
{ "stdux", X(31,181), X_MASK, PPC64, { RS, RAS, RB } },
{ "stwux", X(31,183), X_MASK, PPCCOM, { RS, RAS, RB } },
@@ -2324,7 +2632,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lhzx", X(31,279), X_MASK, COM, { RT, RA, RB } },
-{ "icbt", X(31,262), XRT_MASK, PPC, { RA, RB } },
+{ "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } },
{ "eqv", XRC(31,284,0), X_MASK, COM, { RA, RS, RB } },
{ "eqv.", XRC(31,284,1), X_MASK, COM, { RA, RS, RB } },
@@ -2373,7 +2681,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfdmasa3", XSPR(31,323,219), XSPR_MASK, PPC403, { RT } },
{ "mfdmacc3", XSPR(31,323,220), XSPR_MASK, PPC403, { RT } },
{ "mfdmasr", XSPR(31,323,224), XSPR_MASK, PPC403, { RT } },
-{ "mfdcr", X(31,323), X_MASK, PPC, { RT, SPR } },
+{ "mfdcr", X(31,323), X_MASK, PPC403, { RT, SPR } },
{ "div", XO(31,331,0,0), XO_MASK, M601, { RT, RA, RB } },
{ "div.", XO(31,331,0,1), XO_MASK, M601, { RT, RA, RB } },
@@ -2411,6 +2719,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mflctrl2", XSPR(31,339,157), XSPR_MASK, PPC860, { RT } },
{ "mfictrl", XSPR(31,339,158), XSPR_MASK, PPC860, { RT } },
{ "mfbar", XSPR(31,339,159), XSPR_MASK, PPC860, { RT } },
+{ "mfsprg4", XSPR(31,339,260), XSPR_MASK, PPC405, { RT } },
+{ "mfsprg5", XSPR(31,339,261), XSPR_MASK, PPC405, { RT } },
+{ "mfsprg6", XSPR(31,339,262), XSPR_MASK, PPC405, { RT } },
+{ "mfsprg7", XSPR(31,339,263), XSPR_MASK, PPC405, { RT } },
{ "mfsprg", XSPR(31,339,272), XSPRG_MASK, PPC, { RT, SPRG } },
{ "mfsprg0", XSPR(31,339,272), XSPR_MASK, PPC, { RT } },
{ "mfsprg1", XSPR(31,339,273), XSPR_MASK, PPC, { RT } },
@@ -2451,9 +2763,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfmd_dbcam", XSPR(31,339,824), XSPR_MASK, PPC860, { RT } },
{ "mfmd_dbram0",XSPR(31,339,825), XSPR_MASK, PPC860, { RT } },
{ "mfmd_dbram1",XSPR(31,339,826), XSPR_MASK, PPC860, { RT } },
-{ "mfzpr", XSPR(31,339,944), XSPR_MASK, PPC403, { RT } },
-{ "mfpid", XSPR(31,339,945), XSPR_MASK, PPC403, { RT } },
-{ "mficdbdr",XSPR(31,339,979), XSPR_MASK, PPC403, { RT } },
+{ "mfzpr", XSPR(31,339,944), XSPR_MASK, PPC403, { RT } },
+{ "mfpid", XSPR(31,339,945), XSPR_MASK, PPC403, { RT } },
+{ "mfccr0", XSPR(31,339,947), XSPR_MASK, PPC405, { RT } },
+{ "mficdbdr", XSPR(31,339,979), XSPR_MASK, PPC403, { RT } },
{ "mfummcr0", XSPR(31,339,936), XSPR_MASK, PPC750, { RT } },
{ "mfupmc1", XSPR(31,339,937), XSPR_MASK, PPC750, { RT } },
{ "mfupmc2", XSPR(31,339,938), XSPR_MASK, PPC750, { RT } },
@@ -2461,12 +2774,21 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfummcr1", XSPR(31,339,940), XSPR_MASK, PPC750, { RT } },
{ "mfupmc3", XSPR(31,339,941), XSPR_MASK, PPC750, { RT } },
{ "mfupmc4", XSPR(31,339,942), XSPR_MASK, PPC750, { RT } },
+{ "mfiac3", XSPR(31,339,948), XSPR_MASK, PPC405, { RT } },
+{ "mfiac4", XSPR(31,339,949), XSPR_MASK, PPC405, { RT } },
+{ "mfdvc1", XSPR(31,339,950), XSPR_MASK, PPC405, { RT } },
+{ "mfdvc2", XSPR(31,339,951), XSPR_MASK, PPC405, { RT } },
{ "mfmmcr0", XSPR(31,339,952), XSPR_MASK, PPC750, { RT } },
{ "mfpmc1", XSPR(31,339,953), XSPR_MASK, PPC750, { RT } },
+{ "mfsgr", XSPR(31,339,953), XSPR_MASK, PPC403, { RT } },
{ "mfpmc2", XSPR(31,339,954), XSPR_MASK, PPC750, { RT } },
+{ "mfdcwr", XSPR(31,339,954), XSPR_MASK, PPC403, { RT } },
{ "mfsia", XSPR(31,339,955), XSPR_MASK, PPC750, { RT } },
+{ "mfsler", XSPR(31,339,955), XSPR_MASK, PPC405, { RT } },
{ "mfmmcr1", XSPR(31,339,956), XSPR_MASK, PPC750, { RT } },
+{ "mfsu0r", XSPR(31,339,956), XSPR_MASK, PPC405, { RT } },
{ "mfpmc3", XSPR(31,339,957), XSPR_MASK, PPC750, { RT } },
+{ "mfdbcr1", XSPR(31,339,957), XSPR_MASK, PPC405, { RT } },
{ "mfpmc4", XSPR(31,339,958), XSPR_MASK, PPC750, { RT } },
{ "mfesr", XSPR(31,339,980), XSPR_MASK, PPC403, { RT } },
{ "mfdear", XSPR(31,339,981), XSPR_MASK, PPC403, { RT } },
@@ -2480,6 +2802,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfsrr2", XSPR(31,339,990), XSPR_MASK, PPC403, { RT } },
{ "mfsrr3", XSPR(31,339,991), XSPR_MASK, PPC403, { RT } },
{ "mfdbsr", XSPR(31,339,1008), XSPR_MASK, PPC403, { RT } },
+{ "mfdbcr0", XSPR(31,339,1010), XSPR_MASK, PPC405, { RT } },
{ "mfiac1", XSPR(31,339,1012), XSPR_MASK, PPC403, { RT } },
{ "mfiac2", XSPR(31,339,1013), XSPR_MASK, PPC403, { RT } },
{ "mfdac1", XSPR(31,339,1014), XSPR_MASK, PPC403, { RT } },
@@ -2501,7 +2824,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lhax", X(31,343), X_MASK, COM, { RT, RA, RB } },
-{ "dccci", X(31,454), XRT_MASK, PPC, { RA, RB } },
+{ "dccci", X(31,454), XRT_MASK, PPC403, { RA, RB } },
{ "abs", XO(31,360,0,0), XORB_MASK, M601, { RT, RA } },
{ "abs.", XO(31,360,0,1), XORB_MASK, M601, { RT, RA } },
@@ -2515,6 +2838,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbia", X(31,370), 0xffffffff, PPC, { 0 } },
+{ "mftbl", XSPR(31,371,268), XSPR_MASK, PPC, { RT } },
{ "mftbu", XSPR(31,371,269), XSPR_MASK, PPC, { RT } },
{ "mftb", X(31,371), X_MASK, PPC, { RT, TBR } },
@@ -2583,26 +2907,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtdmasa3", XSPR(31,451,219), XSPR_MASK, PPC403, { RT } },
{ "mtdmacc3", XSPR(31,451,220), XSPR_MASK, PPC403, { RT } },
{ "mtdmasr", XSPR(31,451,224), XSPR_MASK, PPC403, { RT } },
-{ "mtummcr0", XSPR(31,451,936), XSPR_MASK, PPC750, { RT } },
-{ "mtupmc1", XSPR(31,451,937), XSPR_MASK, PPC750, { RT } },
-{ "mtupmc2", XSPR(31,451,938), XSPR_MASK, PPC750, { RT } },
-{ "mtusia", XSPR(31,451,939), XSPR_MASK, PPC750, { RT } },
-{ "mtummcr1", XSPR(31,451,940), XSPR_MASK, PPC750, { RT } },
-{ "mtupmc3", XSPR(31,451,941), XSPR_MASK, PPC750, { RT } },
-{ "mtupmc4", XSPR(31,451,942), XSPR_MASK, PPC750, { RT } },
-{ "mtmmcr0", XSPR(31,451,952), XSPR_MASK, PPC750, { RT } },
-{ "mtpmc1", XSPR(31,451,953), XSPR_MASK, PPC750, { RT } },
-{ "mtpmc2", XSPR(31,451,954), XSPR_MASK, PPC750, { RT } },
-{ "mtsia", XSPR(31,451,955), XSPR_MASK, PPC750, { RT } },
-{ "mtmmcr1", XSPR(31,451,956), XSPR_MASK, PPC750, { RT } },
-{ "mtpmc3", XSPR(31,451,957), XSPR_MASK, PPC750, { RT } },
-{ "mtpmc4", XSPR(31,451,958), XSPR_MASK, PPC750, { RT } },
-{ "mtl2cr", XSPR(31,451,1017), XSPR_MASK, PPC750, { RT } },
-{ "mtictc", XSPR(31,451,1019), XSPR_MASK, PPC750, { RT } },
-{ "mtthrm1", XSPR(31,451,1020), XSPR_MASK, PPC750, { RT } },
-{ "mtthrm2", XSPR(31,451,1021), XSPR_MASK, PPC750, { RT } },
-{ "mtthrm3", XSPR(31,451,1022), XSPR_MASK, PPC750, { RT } },
-{ "mtdcr", X(31,451), X_MASK, PPC, { SPR, RS } },
+{ "mtdcr", X(31,451), X_MASK, PPC403, { SPR, RS } },
{ "divdu", XO(31,457,0,0), XO_MASK, PPC64, { RT, RA, RB } },
{ "divdu.", XO(31,457,0,1), XO_MASK, PPC64, { RT, RA, RB } },
@@ -2649,6 +2954,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtsprg1", XSPR(31,467,273), XSPR_MASK, PPC, { RT } },
{ "mtsprg2", XSPR(31,467,274), XSPR_MASK, PPC, { RT } },
{ "mtsprg3", XSPR(31,467,275), XSPR_MASK, PPC, { RT } },
+{ "mtsprg4", XSPR(31,467,276), XSPR_MASK, PPC405, { RT } },
+{ "mtsprg5", XSPR(31,467,277), XSPR_MASK, PPC405, { RT } },
+{ "mtsprg6", XSPR(31,467,278), XSPR_MASK, PPC405, { RT } },
+{ "mtsprg7", XSPR(31,467,279), XSPR_MASK, PPC405, { RT } },
{ "mtasr", XSPR(31,467,280), XSPR_MASK, PPC64, { RS } },
{ "mtear", XSPR(31,467,282), XSPR_MASK, PPC, { RS } },
{ "mttbl", XSPR(31,467,284), XSPR_MASK, PPC, { RS } },
@@ -2659,8 +2968,19 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtdbatl", XSPR(31,467,537), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
{ "mtzpr", XSPR(31,467,944), XSPR_MASK, PPC403, { RT } },
{ "mtpid", XSPR(31,467,945), XSPR_MASK, PPC403, { RT } },
+{ "mtccr0", XSPR(31,467,947), XSPR_MASK, PPC405, { RT } },
+{ "mtiac3", XSPR(31,467,948), XSPR_MASK, PPC405, { RT } },
+{ "mtiac4", XSPR(31,467,949), XSPR_MASK, PPC405, { RT } },
+{ "mtdvc1", XSPR(31,467,950), XSPR_MASK, PPC405, { RT } },
+{ "mtdvc2", XSPR(31,467,951), XSPR_MASK, PPC405, { RT } },
+{ "mtsgr", XSPR(31,467,953), XSPR_MASK, PPC403, { RT } },
+{ "mtdcwr", XSPR(31,467,954), XSPR_MASK, PPC403, { RT } },
+{ "mtsler", XSPR(31,467,955), XSPR_MASK, PPC405, { RT } },
+{ "mtsu0r", XSPR(31,467,956), XSPR_MASK, PPC405, { RT } },
+{ "mtdbcr1", XSPR(31,467,957), XSPR_MASK, PPC405, { RT } },
{ "mticdbdr",XSPR(31,467,979), XSPR_MASK, PPC403, { RT } },
{ "mtesr", XSPR(31,467,980), XSPR_MASK, PPC403, { RT } },
+{ "mtdear", XSPR(31,467,981), XSPR_MASK, PPC403, { RT } },
{ "mtevpr", XSPR(31,467,982), XSPR_MASK, PPC403, { RT } },
{ "mtcdbcr", XSPR(31,467,983), XSPR_MASK, PPC403, { RT } },
{ "mttsr", XSPR(31,467,984), XSPR_MASK, PPC403, { RT } },
@@ -2671,6 +2991,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtsrr2", XSPR(31,467,990), XSPR_MASK, PPC403, { RT } },
{ "mtsrr3", XSPR(31,467,991), XSPR_MASK, PPC403, { RT } },
{ "mtdbsr", XSPR(31,467,1008), XSPR_MASK, PPC403, { RT } },
+{ "mtdbcr0", XSPR(31,467,1010), XSPR_MASK, PPC405, { RT } },
{ "mtiac1", XSPR(31,467,1012), XSPR_MASK, PPC403, { RT } },
{ "mtiac2", XSPR(31,467,1013), XSPR_MASK, PPC403, { RT } },
{ "mtdac1", XSPR(31,467,1014), XSPR_MASK, PPC403, { RT } },
@@ -2681,6 +3002,25 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtpbu1", XSPR(31,467,1021), XSPR_MASK, PPC403, { RT } },
{ "mtpbl2", XSPR(31,467,1022), XSPR_MASK, PPC403, { RT } },
{ "mtpbu2", XSPR(31,467,1023), XSPR_MASK, PPC403, { RT } },
+{ "mtummcr0", XSPR(31,467,936), XSPR_MASK, PPC750, { RT } },
+{ "mtupmc1", XSPR(31,467,937), XSPR_MASK, PPC750, { RT } },
+{ "mtupmc2", XSPR(31,467,938), XSPR_MASK, PPC750, { RT } },
+{ "mtusia", XSPR(31,467,939), XSPR_MASK, PPC750, { RT } },
+{ "mtummcr1", XSPR(31,467,940), XSPR_MASK, PPC750, { RT } },
+{ "mtupmc3", XSPR(31,467,941), XSPR_MASK, PPC750, { RT } },
+{ "mtupmc4", XSPR(31,467,942), XSPR_MASK, PPC750, { RT } },
+{ "mtmmcr0", XSPR(31,467,952), XSPR_MASK, PPC750, { RT } },
+{ "mtpmc1", XSPR(31,467,953), XSPR_MASK, PPC750, { RT } },
+{ "mtpmc2", XSPR(31,467,954), XSPR_MASK, PPC750, { RT } },
+{ "mtsia", XSPR(31,467,955), XSPR_MASK, PPC750, { RT } },
+{ "mtmmcr1", XSPR(31,467,956), XSPR_MASK, PPC750, { RT } },
+{ "mtpmc3", XSPR(31,467,957), XSPR_MASK, PPC750, { RT } },
+{ "mtpmc4", XSPR(31,467,958), XSPR_MASK, PPC750, { RT } },
+{ "mtl2cr", XSPR(31,467,1017), XSPR_MASK, PPC750, { RT } },
+{ "mtictc", XSPR(31,467,1019), XSPR_MASK, PPC750, { RT } },
+{ "mtthrm1", XSPR(31,467,1020), XSPR_MASK, PPC750, { RT } },
+{ "mtthrm2", XSPR(31,467,1021), XSPR_MASK, PPC750, { RT } },
+{ "mtthrm3", XSPR(31,467,1022), XSPR_MASK, PPC750, { RT } },
{ "mtspr", X(31,467), X_MASK, COM, { SPR, RS } },
{ "dcbi", X(31,470), XRT_MASK, PPC, { RA, RB } },
@@ -2787,6 +3127,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sreq", XRC(31,729,0), X_MASK, M601, { RA, RS, RB } },
{ "sreq.", XRC(31,729,1), X_MASK, M601, { RA, RS, RB } },
+{ "dcba", X(31,758), XRT_MASK, PPC405, { RA, RB } },
+
{ "stfdux", X(31,759), X_MASK, COM, { FRS, RAS, RB } },
{ "srliq", XRC(31,760,0), X_MASK, M601, { RA, RS, SH } },
@@ -2827,6 +3169,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "extsh.", XRC(31,922,1), XRB_MASK, PPCCOM, { RA, RS } },
{ "exts.", XRC(31,922,1), XRB_MASK, PWRCOM, { RA, RS } },
+{ "tlbrehi", XTLB(31,946,0), XTLB_MASK, PPC403, { RT, RA } },
+{ "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbre", X(31,946), X_MASK, PPC403, { RT, RA, SH } },
{ "sraiq", XRC(31,952,0), X_MASK, M601, { RA, RS, SH } },
@@ -2835,9 +3179,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "extsb", XRC(31,954,0), XRB_MASK, PPC, { RA, RS} },
{ "extsb.", XRC(31,954,1), XRB_MASK, PPC, { RA, RS} },
-{ "iccci", X(31,966), XRT_MASK, PPC, { RA, RB } },
+{ "iccci", X(31,966), XRT_MASK, PPC403, { RA, RB } },
{ "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } },
+
+{ "tlbwehi", XTLB(31,978,0), XTLB_MASK, PPC403, { RT, RA } },
+{ "tlbwelo", XTLB(31,978,1), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbwe", X(31,978), X_MASK, PPC403, { RS, RA, SH } },
{ "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } },
@@ -2854,6 +3201,19 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "dcbz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
{ "dclz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
+{ "lvebx", X(31, 7), X_MASK, PPCVEC, { VD, RA, RB } },
+{ "lvehx", X(31, 39), X_MASK, PPCVEC, { VD, RA, RB } },
+{ "lvewx", X(31, 71), X_MASK, PPCVEC, { VD, RA, RB } },
+{ "lvsl", X(31, 6), X_MASK, PPCVEC, { VD, RA, RB } },
+{ "lvsr", X(31, 38), X_MASK, PPCVEC, { VD, RA, RB } },
+{ "lvx", X(31, 103), X_MASK, PPCVEC, { VD, RA, RB } },
+{ "lvxl", X(31, 359), X_MASK, PPCVEC, { VD, RA, RB } },
+{ "stvebx", X(31, 135), X_MASK, PPCVEC, { VS, RA, RB } },
+{ "stvehx", X(31, 167), X_MASK, PPCVEC, { VS, RA, RB } },
+{ "stvewx", X(31, 199), X_MASK, PPCVEC, { VS, RA, RB } },
+{ "stvx", X(31, 231), X_MASK, PPCVEC, { VS, RA, RB } },
+{ "stvxl", X(31, 487), X_MASK, PPCVEC, { VS, RA, RB } },
+
{ "lwz", OP(32), OP_MASK, PPCCOM, { RT, D, RA } },
{ "l", OP(32), OP_MASK, PWRCOM, { RT, D, RA } },
diff --git a/gnu/usr.bin/binutils/opcodes/sh-dis.c b/gnu/usr.bin/binutils/opcodes/sh-dis.c
index c4e960c24e8..80ccfdc000d 100644
--- a/gnu/usr.bin/binutils/opcodes/sh-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/sh-dis.c
@@ -1,5 +1,6 @@
/* Disassemble SH instructions.
- Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1998, 2000
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,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. */
-#include "sysdep.h"
#include <stdio.h>
+#include "sysdep.h"
#define STATIC_TABLE
#define DEFINE_TABLE
@@ -34,22 +35,22 @@ print_movxy (op, rn, rm, fprintf_fn, stream)
{
int n;
- fprintf_fn (stream,"%s\t", op->name);
+ fprintf_fn (stream, "%s\t", op->name);
for (n = 0; n < 2; n++)
{
switch (op->arg[n])
{
case A_IND_N:
- fprintf_fn (stream, "@r%d", rn);
+ fprintf_fn (stream, "@r%d", rn);
break;
case A_INC_N:
- fprintf_fn (stream, "@r%d+", rn);
+ fprintf_fn (stream, "@r%d+", rn);
break;
case A_PMOD_N:
- fprintf_fn (stream, "@r%d+r8", rn);
+ fprintf_fn (stream, "@r%d+r8", rn);
break;
case A_PMODY_N:
- fprintf_fn (stream, "@r%d+r9", rn);
+ fprintf_fn (stream, "@r%d+r9", rn);
break;
case DSP_REG_M:
fprintf_fn (stream, "a%c", '0' + rm);
@@ -64,7 +65,7 @@ print_movxy (op, rn, rm, fprintf_fn, stream)
abort ();
}
if (n == 0)
- fprintf_fn (stream, ",");
+ fprintf_fn (stream, ",");
}
}
@@ -72,6 +73,7 @@ print_movxy (op, rn, rm, fprintf_fn, stream)
nibbles of the insn, i.e. field a and the bit that indicates if
a parallel processing insn follows.
Return nonzero if a field b of a parallel processing insns follows. */
+
static void
print_insn_ddt (insn, info)
int insn;
@@ -97,19 +99,20 @@ print_insn_ddt (insn, info)
{
static sh_opcode_info *first_movx, *first_movy;
sh_opcode_info *opx, *opy;
- int insn_x, insn_y;
+ unsigned int insn_x, insn_y;
if (! first_movx)
{
- for (first_movx = sh_table; first_movx->nibbles[1] != MOVX; )
+ for (first_movx = sh_table; first_movx->nibbles[1] != MOVX;)
first_movx++;
- for (first_movy = first_movx; first_movy->nibbles[1] != MOVY; )
+ for (first_movy = first_movx; first_movy->nibbles[1] != MOVY;)
first_movy++;
}
insn_x = (insn >> 2) & 0xb;
if (insn_x)
{
- for (opx = first_movx; opx->nibbles[2] != insn_x; ) opx++;
+ for (opx = first_movx; opx->nibbles[2] != insn_x;)
+ opx++;
print_movxy (opx, ((insn >> 9) & 1) + 4, (insn >> 7) & 1,
fprintf_fn, stream);
}
@@ -118,7 +121,8 @@ print_insn_ddt (insn, info)
{
if (insn_x)
fprintf_fn (stream, "\t");
- for (opy = first_movy; opy->nibbles[2] != insn_y; ) opy++;
+ for (opy = first_movy; opy->nibbles[2] != insn_y;)
+ opy++;
print_movxy (opy, ((insn >> 8) & 1) + 6, (insn >> 6) & 1,
fprintf_fn, stream);
}
@@ -174,12 +178,12 @@ print_insn_ppi (field_b, info)
int field_b;
struct disassemble_info *info;
{
- static char *sx_tab[] = {"x0","x1","a0","a1"};
- static char *sy_tab[] = {"y0","y1","m0","m1"};
+ static char *sx_tab[] = { "x0", "x1", "a0", "a1" };
+ static char *sy_tab[] = { "y0", "y1", "m0", "m1" };
fprintf_ftype fprintf_fn = info->fprintf_func;
void *stream = info->stream;
- int nib1, nib2, nib3;
- char *dc;
+ unsigned int nib1, nib2, nib3;
+ char *dc = NULL;
sh_opcode_info *op;
if ((field_b & 0xe800) == 0)
@@ -192,10 +196,10 @@ print_insn_ppi (field_b, info)
}
if ((field_b & 0xc000) == 0x4000 && (field_b & 0x3000) != 0x1000)
{
- static char *du_tab[] = {"x0","y0","a0","a1"};
- static char *se_tab[] = {"x0","x1","y0","a1"};
- static char *sf_tab[] = {"y0","y1","x0","a1"};
- static char *sg_tab[] = {"m0","m1","a0","a1"};
+ static char *du_tab[] = { "x0", "y0", "a0", "a1" };
+ static char *se_tab[] = { "x0", "x1", "y0", "a1" };
+ static char *sf_tab[] = { "y0", "y1", "x0", "a1" };
+ static char *sg_tab[] = { "m0", "m1", "a0", "a1" };
if (field_b & 0x2000)
{
@@ -243,11 +247,11 @@ print_insn_ppi (field_b, info)
int n;
fprintf_fn (stream, "%s%s\t", dc, op->name);
- for (n = 0; n < 3 && op->arg[n] != A_END; n++)
+ for (n = 0; n < 3 && op->arg[n] != A_END; n++)
{
if (n && op->arg[1] != A_END)
fprintf_fn (stream, ",");
- switch (op->arg[n])
+ switch (op->arg[n])
{
case DSP_REG_N:
print_dsp_reg (field_b & 0xf, fprintf_fn, stream);
@@ -262,7 +266,7 @@ print_insn_ppi (field_b, info)
fprintf_fn (stream, "mach");
break;
case A_MACL:
- fprintf_fn (stream ,"macl");
+ fprintf_fn (stream, "macl");
break;
default:
abort ();
@@ -275,7 +279,7 @@ print_insn_ppi (field_b, info)
fprintf_fn (stream, ".word 0x%x", field_b);
}
-static int
+static int
print_insn_shx (memaddr, info)
bfd_vma memaddr;
struct disassemble_info *info;
@@ -285,7 +289,7 @@ print_insn_shx (memaddr, info)
unsigned char insn[2];
unsigned char nibs[4];
int status;
- bfd_vma relmask = ~ (bfd_vma) 0;
+ bfd_vma relmask = ~(bfd_vma) 0;
sh_opcode_info *op;
int target_arch;
@@ -318,13 +322,13 @@ print_insn_shx (memaddr, info)
status = info->read_memory_func (memaddr, insn, 2, info);
- if (status != 0)
+ if (status != 0)
{
info->memory_error_func (status, memaddr, info);
return -1;
}
- if (info->flags & LITTLE_BIT)
+ if (info->flags & LITTLE_BIT)
{
nibs[0] = (insn[1] >> 4) & 0xf;
nibs[1] = insn[1] & 0xf;
@@ -332,7 +336,7 @@ print_insn_shx (memaddr, info)
nibs[2] = (insn[0] >> 4) & 0xf;
nibs[3] = insn[0] & 0xf;
}
- else
+ else
{
nibs[0] = (insn[0] >> 4) & 0xf;
nibs[1] = insn[0] & 0xf;
@@ -349,13 +353,13 @@ print_insn_shx (memaddr, info)
status = info->read_memory_func (memaddr + 2, insn, 2, info);
- if (status != 0)
+ if (status != 0)
{
info->memory_error_func (status, memaddr + 2, info);
return -1;
}
- if (info->flags & LITTLE_BIT)
+ if (info->flags & LITTLE_BIT)
field_b = insn[1] << 8 | insn[0];
else
field_b = insn[0] << 8 | insn[1];
@@ -367,7 +371,7 @@ print_insn_shx (memaddr, info)
print_insn_ddt ((nibs[1] << 8) | (nibs[2] << 4) | nibs[3], info);
return 2;
}
- for (op = sh_table; op->name; op++)
+ for (op = sh_table; op->name; op++)
{
int n;
int imm = 0;
@@ -383,7 +387,7 @@ print_insn_shx (memaddr, info)
{
int i = op->nibbles[n];
- if (i < 16)
+ if (i < 16)
{
if (nibs[n] == i)
continue;
@@ -392,10 +396,10 @@ print_insn_shx (memaddr, info)
switch (i)
{
case BRANCH_8:
- imm = (nibs[2] << 4) | (nibs[3]);
+ imm = (nibs[2] << 4) | (nibs[3]);
if (imm & 0x80)
imm |= ~0xff;
- imm = ((char)imm) * 2 + 4 ;
+ imm = ((char) imm) * 2 + 4;
goto ok;
case BRANCH_12:
imm = ((nibs[1]) << 8) | (nibs[2] << 4) | (nibs[3]);
@@ -403,37 +407,37 @@ print_insn_shx (memaddr, info)
imm |= ~0xfff;
imm = imm * 2 + 4;
goto ok;
- case IMM_4:
+ case IMM0_4:
+ case IMM1_4:
imm = nibs[3];
goto ok;
- case IMM_4BY2:
- imm = nibs[3] <<1;
+ case IMM0_4BY2:
+ case IMM1_4BY2:
+ imm = nibs[3] << 1;
goto ok;
- case IMM_4BY4:
- imm = nibs[3] <<2;
+ case IMM0_4BY4:
+ case IMM1_4BY4:
+ imm = nibs[3] << 2;
goto ok;
- case IMM_8:
+ case IMM0_8:
+ case IMM1_8:
imm = (nibs[2] << 4) | nibs[3];
goto ok;
case PCRELIMM_8BY2:
- imm = ((nibs[2] << 4) | nibs[3]) <<1;
- relmask = ~ (bfd_vma) 1;
+ imm = ((nibs[2] << 4) | nibs[3]) << 1;
+ relmask = ~(bfd_vma) 1;
goto ok;
case PCRELIMM_8BY4:
- imm = ((nibs[2] << 4) | nibs[3]) <<2;
- relmask = ~ (bfd_vma) 3;
- goto ok;
- case IMM_8BY2:
- imm = ((nibs[2] << 4) | nibs[3]) <<1;
+ imm = ((nibs[2] << 4) | nibs[3]) << 2;
+ relmask = ~(bfd_vma) 3;
goto ok;
- case IMM_8BY4:
- imm = ((nibs[2] << 4) | nibs[3]) <<2;
+ case IMM0_8BY2:
+ case IMM1_8BY2:
+ imm = ((nibs[2] << 4) | nibs[3]) << 1;
goto ok;
- case DISP_8:
- imm = (nibs[2] << 4) | (nibs[3]);
- goto ok;
- case DISP_4:
- imm = nibs[3];
+ case IMM0_8BY4:
+ case IMM1_8BY4:
+ imm = ((nibs[2] << 4) | nibs[3]) << 2;
goto ok;
case REG_N:
rn = nibs[n];
@@ -447,7 +451,7 @@ print_insn_shx (memaddr, info)
break;
case REG_B:
rb = nibs[n] & 0x07;
- break;
+ break;
case SDT_REG_N:
/* sh-dsp: single data transfer. */
rn = nibs[n];
@@ -457,23 +461,24 @@ print_insn_shx (memaddr, info)
rn |= (rn & 2) << 1;
break;
case PPI:
+ case REPEAT:
goto fail;
default:
- abort();
+ abort ();
}
}
ok:
- fprintf_fn (stream,"%s\t", op->name);
+ fprintf_fn (stream, "%s\t", op->name);
disp_pc = 0;
- for (n = 0; n < 3 && op->arg[n] != A_END; n++)
+ for (n = 0; n < 3 && op->arg[n] != A_END; n++)
{
if (n && op->arg[1] != A_END)
fprintf_fn (stream, ",");
- switch (op->arg[n])
+ switch (op->arg[n])
{
case A_IMM:
- fprintf_fn (stream, "#%d", (char)(imm));
+ fprintf_fn (stream, "#%d", (char) (imm));
break;
case A_R0:
fprintf_fn (stream, "r0");
@@ -482,34 +487,34 @@ print_insn_shx (memaddr, info)
fprintf_fn (stream, "r%d", rn);
break;
case A_INC_N:
- fprintf_fn (stream, "@r%d+", rn);
+ fprintf_fn (stream, "@r%d+", rn);
break;
case A_DEC_N:
- fprintf_fn (stream, "@-r%d", rn);
+ fprintf_fn (stream, "@-r%d", rn);
break;
case A_IND_N:
- fprintf_fn (stream, "@r%d", rn);
+ 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)", imm, rn);
break;
case A_PMOD_N:
- fprintf_fn (stream, "@r%d+r8", rn);
+ fprintf_fn (stream, "@r%d+r8", rn);
break;
case A_REG_M:
fprintf_fn (stream, "r%d", rm);
break;
case A_INC_M:
- fprintf_fn (stream, "@r%d+", rm);
+ fprintf_fn (stream, "@r%d+", rm);
break;
case A_DEC_M:
- fprintf_fn (stream, "@-r%d", rm);
+ fprintf_fn (stream, "@-r%d", rm);
break;
case A_IND_M:
- fprintf_fn (stream, "@r%d", rm);
+ 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)", imm, rm);
break;
case A_REG_B:
fprintf_fn (stream, "r%d_bank", rb);
@@ -521,12 +526,12 @@ print_insn_shx (memaddr, info)
break;
case A_IND_R0_REG_N:
fprintf_fn (stream, "@(r0,r%d)", rn);
- break;
+ break;
case A_IND_R0_REG_M:
fprintf_fn (stream, "@(r0,r%d)", rm);
- break;
+ break;
case A_DISP_GBR:
- fprintf_fn (stream, "@(%d,gbr)",imm);
+ fprintf_fn (stream, "@(%d,gbr)", imm);
break;
case A_R0_GBR:
fprintf_fn (stream, "@(r0,gbr)");
@@ -584,7 +589,7 @@ print_insn_shx (memaddr, info)
fprintf_fn (stream, "mach");
break;
case A_MACL:
- fprintf_fn (stream ,"macl");
+ fprintf_fn (stream, "macl");
break;
case A_PR:
fprintf_fn (stream, "pr");
@@ -607,7 +612,6 @@ print_insn_shx (memaddr, info)
fprintf_fn (stream, "xd%d", rn & ~1);
break;
}
- d_reg_n:
case D_REG_N:
fprintf_fn (stream, "dr%d", rn);
break;
@@ -632,16 +636,16 @@ print_insn_shx (memaddr, info)
fprintf_fn (stream, "fr0");
break;
case V_REG_N:
- fprintf_fn (stream, "fv%d", rn*4);
+ fprintf_fn (stream, "fv%d", rn * 4);
break;
case V_REG_M:
- fprintf_fn (stream, "fv%d", rm*4);
+ fprintf_fn (stream, "fv%d", rm * 4);
break;
case XMTRX_M4:
fprintf_fn (stream, "xmtrx");
break;
default:
- abort();
+ abort ();
}
}
@@ -654,7 +658,7 @@ print_insn_shx (memaddr, info)
if (!(info->flags & 1)
&& (op->name[0] == 'j'
|| (op->name[0] == 'b'
- && (op->name[1] == 'r'
+ && (op->name[1] == 'r'
|| op->name[1] == 's'))
|| (op->name[0] == 'r' && op->name[1] == 't')
|| (op->name[0] == 'b' && op->name[2] == '.')))
@@ -673,7 +677,7 @@ print_insn_shx (memaddr, info)
int size;
bfd_byte bytes[4];
- if (relmask == ~ (bfd_vma) 1)
+ if (relmask == ~(bfd_vma) 1)
size = 2;
else
size = 4;
@@ -709,7 +713,7 @@ print_insn_shx (memaddr, info)
return 2;
}
-int
+int
print_insn_shl (memaddr, info)
bfd_vma memaddr;
struct disassemble_info *info;
@@ -721,7 +725,7 @@ print_insn_shl (memaddr, info)
return r;
}
-int
+int
print_insn_sh (memaddr, info)
bfd_vma memaddr;
struct disassemble_info *info;
diff --git a/gnu/usr.bin/binutils/opcodes/sh-opc.h b/gnu/usr.bin/binutils/opcodes/sh-opc.h
index 38bfbcde4b6..a2822f51fdc 100644
--- a/gnu/usr.bin/binutils/opcodes/sh-opc.h
+++ b/gnu/usr.bin/binutils/opcodes/sh-opc.h
@@ -1,5 +1,6 @@
/* Definitions for SH opcodes.
- Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1999, 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
@@ -39,16 +40,20 @@ typedef enum {
REG_B,
BRANCH_12,
BRANCH_8,
- DISP_8,
- DISP_4,
- IMM_4,
- IMM_4BY2,
- IMM_4BY4,
+ IMM0_4,
+ IMM0_4BY2,
+ IMM0_4BY4,
+ IMM1_4,
+ IMM1_4BY2,
+ IMM1_4BY4,
PCRELIMM_8BY2,
PCRELIMM_8BY4,
- IMM_8,
- IMM_8BY2,
- IMM_8BY4,
+ IMM0_8,
+ IMM0_8BY2,
+ IMM0_8BY4,
+ IMM1_8,
+ IMM1_8BY2,
+ IMM1_8BY4,
PPI,
NOPX,
NOPY,
@@ -58,7 +63,8 @@ typedef enum {
PMUL,
PPI3,
PDC,
- PPIC
+ PPIC,
+ REPEAT
} sh_nibble_type;
typedef enum {
@@ -68,6 +74,7 @@ typedef enum {
A_DEC_M,
A_DEC_N,
A_DISP_GBR,
+ A_PC,
A_DISP_PC,
A_DISP_REG_M,
A_DISP_REG_N,
@@ -164,7 +171,7 @@ typedef struct {
sh_opcode_info sh_table[] = {
-/* 0111nnnni8*1.... add #<imm>,<REG_N> */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM_8}, arch_sh1_up},
+/* 0111nnnni8*1.... add #<imm>,<REG_N> */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM0_8}, arch_sh1_up},
/* 0011nnnnmmmm1100 add <REG_M>,<REG_N> */{"add",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_C}, arch_sh1_up},
@@ -172,11 +179,11 @@ sh_opcode_info sh_table[] = {
/* 0011nnnnmmmm1111 addv <REG_M>,<REG_N>*/{"addv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_F}, arch_sh1_up},
-/* 11001001i8*1.... and #<imm>,R0 */{"and",{A_IMM,A_R0},{HEX_C,HEX_9,IMM_8}, arch_sh1_up},
+/* 11001001i8*1.... and #<imm>,R0 */{"and",{A_IMM,A_R0},{HEX_C,HEX_9,IMM0_8}, arch_sh1_up},
/* 0010nnnnmmmm1001 and <REG_M>,<REG_N> */{"and",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_9}, arch_sh1_up},
-/* 11001101i8*1.... and.b #<imm>,@(R0,GBR)*/{"and.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_D,IMM_8}, arch_sh1_up},
+/* 11001101i8*1.... and.b #<imm>,@(R0,GBR)*/{"and.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_D,IMM0_8}, arch_sh1_up},
/* 1010i12......... bra <bdisp12> */{"bra",{A_BDISP12},{HEX_A,BRANCH_12}, arch_sh1_up},
@@ -200,7 +207,7 @@ sh_opcode_info sh_table[] = {
/* 0000000000001000 clrt */{"clrt",{0},{HEX_0,HEX_0,HEX_0,HEX_8}, arch_sh1_up},
-/* 10001000i8*1.... cmp/eq #<imm>,R0 */{"cmp/eq",{A_IMM,A_R0},{HEX_8,HEX_8,IMM_8}, arch_sh1_up},
+/* 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_sh1_up},
@@ -276,9 +283,9 @@ sh_opcode_info sh_table[] = {
/* 0100nnnn1xxx0111 ldc.l <REG_N>,Rn_BANK */{"ldc.l",{A_INC_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_7}, arch_sh3_up},
-/* 10001110i8p2.... ldre @(<disp>,PC) */{"ldre",{A_BDISP8},{HEX_8,HEX_E,BRANCH_8}, arch_sh_dsp_up},
+/* 10001110i8p2.... ldre @(<disp>,PC) */{"ldre",{A_DISP_PC},{HEX_8,HEX_E,PCRELIMM_8BY2}, arch_sh_dsp_up},
-/* 10001100i8p2.... ldrs @(<disp>,PC) */{"ldrs",{A_BDISP8},{HEX_8,HEX_C,BRANCH_8}, arch_sh_dsp_up},
+/* 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},
@@ -328,7 +335,7 @@ sh_opcode_info sh_table[] = {
/* 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},
-/* 1110nnnni8*1.... mov #<imm>,<REG_N> */{"mov",{A_IMM,A_REG_N},{HEX_E,REG_N,IMM_8}, arch_sh1_up},
+/* 1110nnnni8*1.... mov #<imm>,<REG_N> */{"mov",{A_IMM,A_REG_N},{HEX_E,REG_N,IMM0_8}, 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_sh1_up},
@@ -338,9 +345,9 @@ sh_opcode_info sh_table[] = {
/* 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},
-/* 10000100mmmmi4*1 mov.b @(<disp>,<REG_M>),R0*/{"mov.b",{A_DISP_REG_M,A_R0},{HEX_8,HEX_4,REG_M,IMM_4}, arch_sh1_up},
+/* 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},
-/* 11000100i8*1.... mov.b @(<disp>,GBR),R0*/{"mov.b",{A_DISP_GBR,A_R0},{HEX_C,HEX_4,IMM_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_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_sh1_up},
@@ -348,11 +355,11 @@ sh_opcode_info sh_table[] = {
/* 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},
-/* 10000000mmmmi4*1 mov.b R0,@(<disp>,<REG_M>)*/{"mov.b",{A_R0,A_DISP_REG_M},{HEX_8,HEX_0,REG_M,IMM_4}, arch_sh1_up},
+/* 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},
-/* 11000000i8*1.... mov.b R0,@(<disp>,GBR)*/{"mov.b",{A_R0,A_DISP_GBR},{HEX_C,HEX_0,IMM_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_sh1_up},
-/* 0001nnnnmmmmi4*4 mov.l <REG_M>,@(<disp>,<REG_N>)*/{"mov.l",{ A_REG_M,A_DISP_REG_N},{HEX_1,REG_N,REG_M,IMM_4BY4}, arch_sh1_up},
+/* 0001nnnnmmmmi4*4 mov.l <REG_M>,@(<disp>,<REG_N>)*/{"mov.l",{ A_REG_M,A_DISP_REG_N},{HEX_1,REG_N,REG_M,IMM1_4BY4}, 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_sh1_up},
@@ -360,9 +367,9 @@ sh_opcode_info sh_table[] = {
/* 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},
-/* 0101nnnnmmmmi4*4 mov.l @(<disp>,<REG_M>),<REG_N>*/{"mov.l",{A_DISP_REG_M,A_REG_N},{HEX_5,REG_N,REG_M,IMM_4BY4}, arch_sh1_up},
+/* 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},
-/* 11000110i8*4.... mov.l @(<disp>,GBR),R0*/{"mov.l",{A_DISP_GBR,A_R0},{HEX_C,HEX_6,IMM_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_sh1_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},
@@ -372,7 +379,7 @@ sh_opcode_info sh_table[] = {
/* 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},
-/* 11000010i8*4.... mov.l R0,@(<disp>,GBR)*/{"mov.l",{A_R0,A_DISP_GBR},{HEX_C,HEX_2,IMM_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_sh1_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},
@@ -380,9 +387,9 @@ sh_opcode_info sh_table[] = {
/* 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},
-/* 10000101mmmmi4*2 mov.w @(<disp>,<REG_M>),R0*/{"mov.w",{A_DISP_REG_M,A_R0},{HEX_8,HEX_5,REG_M,IMM_4BY2}, arch_sh1_up},
+/* 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},
-/* 11000101i8*2.... mov.w @(<disp>,GBR),R0*/{"mov.w",{A_DISP_GBR,A_R0},{HEX_C,HEX_5,IMM_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_sh1_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},
@@ -392,9 +399,9 @@ sh_opcode_info sh_table[] = {
/* 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},
-/* 10000001mmmmi4*2 mov.w R0,@(<disp>,<REG_M>)*/{"mov.w",{A_R0,A_DISP_REG_M},{HEX_8,HEX_1,REG_M,IMM_4BY2}, arch_sh1_up},
+/* 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},
-/* 11000001i8*2.... mov.w R0,@(<disp>,GBR)*/{"mov.w",{A_R0,A_DISP_GBR},{HEX_C,HEX_1,IMM_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_sh1_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_up},
@@ -424,11 +431,11 @@ sh_opcode_info sh_table[] = {
/* 0000nnnn10110011 ocbwb @<REG_N> */{"ocbwb",{A_IND_N},{HEX_0,REG_N,HEX_B,HEX_3}, arch_sh4_up},
-/* 11001011i8*1.... or #<imm>,R0 */{"or",{A_IMM,A_R0},{HEX_C,HEX_B,IMM_8}, arch_sh1_up},
+/* 11001011i8*1.... or #<imm>,R0 */{"or",{A_IMM,A_R0},{HEX_C,HEX_B,IMM0_8}, 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_sh1_up},
-/* 11001111i8*1.... or.b #<imm>,@(R0,GBR)*/{"or.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_F,IMM_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_sh1_up},
/* 0000nnnn10000011 pref @<REG_N> */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}, arch_sh4_up},
@@ -449,7 +456,11 @@ sh_opcode_info sh_table[] = {
/* 0100nnnn00010100 setrc <REG_N> */{"setrc",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_4}, arch_sh_dsp_up},
-/* 10000010i8*1.... setrc #<imm> */{"setrc",{A_IMM},{HEX_8,HEX_2,IMM_8}, arch_sh_dsp_up},
+/* 10000010i8*1.... setrc #<imm> */{"setrc",{A_IMM},{HEX_8,HEX_2,IMM0_8}, arch_sh_dsp_up},
+
+/* repeat start end <REG_N> */{"repeat",{A_DISP_PC,A_DISP_PC,A_REG_N},{REPEAT,REG_N,HEX_1,HEX_4}, arch_sh_dsp_up},
+
+/* 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},
@@ -513,7 +524,7 @@ sh_opcode_info sh_table[] = {
/* 0100nnnn01000011 stc.l SPC,@-<REG_N> */{"stc.l",{A_SPC,A_DEC_N},{HEX_4,REG_N,HEX_4,HEX_3}, arch_sh3_up},
-/* 0100nnnn00010011 stc.l GBR,@-<REG_N> */{"stc.l",{A_GBR,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_3}, arch_sh4_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},
/* 0100nnnn00110010 stc.l SGR,@-<REG_N> */{"stc.l",{A_SGR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_2}, arch_sh4_up},
@@ -577,19 +588,19 @@ sh_opcode_info sh_table[] = {
/* 0100nnnn00011011 tas.b @<REG_N> */{"tas.b",{A_IND_N},{HEX_4,REG_N,HEX_1,HEX_B}, arch_sh1_up},
-/* 11000011i8*1.... trapa #<imm> */{"trapa",{A_IMM},{HEX_C,HEX_3,IMM_8}, arch_sh1_up},
+/* 11000011i8*1.... trapa #<imm> */{"trapa",{A_IMM},{HEX_C,HEX_3,IMM0_8}, arch_sh1_up},
-/* 11001000i8*1.... tst #<imm>,R0 */{"tst",{A_IMM,A_R0},{HEX_C,HEX_8,IMM_8}, arch_sh1_up},
+/* 11001000i8*1.... tst #<imm>,R0 */{"tst",{A_IMM,A_R0},{HEX_C,HEX_8,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_sh1_up},
-/* 11001100i8*1.... tst.b #<imm>,@(R0,GBR)*/{"tst.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_C,IMM_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_sh1_up},
-/* 11001010i8*1.... xor #<imm>,R0 */{"xor",{A_IMM,A_R0},{HEX_C,HEX_A,IMM_8}, arch_sh1_up},
+/* 11001010i8*1.... xor #<imm>,R0 */{"xor",{A_IMM,A_R0},{HEX_C,HEX_A,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_sh1_up},
-/* 11001110i8*1.... xor.b #<imm>,@(R0,GBR)*/{"xor.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_E,IMM_8}, arch_sh1_up},
+/* 11001110i8*1.... xor.b #<imm>,@(R0,GBR)*/{"xor.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_E,IMM0_8}, 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_sh1_up},
@@ -667,22 +678,22 @@ sh_opcode_info sh_table[] = {
{"pwad", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_B,HEX_4}, arch_sh_dsp_up},
/* 10001000xxyynnnn pabs <DSP_REG_X>,<DSP_REG_N> */
{"pabs", {DSP_REG_X,DSP_REG_N},{PPI,PPI3,HEX_8,HEX_8}, arch_sh_dsp_up},
-/* 10011000xxyynnnn prnd <DSP_REG_X>,<DSP_REG_N> */
-{"prnd", {DSP_REG_X,DSP_REG_N},{PPI,PPI3,HEX_9,HEX_8}, arch_sh_dsp_up},
/* 10101000xxyynnnn pabs <DSP_REG_Y>,<DSP_REG_N> */
{"pabs", {DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_A,HEX_8}, arch_sh_dsp_up},
+/* 10011000xxyynnnn prnd <DSP_REG_X>,<DSP_REG_N> */
+{"prnd", {DSP_REG_X,DSP_REG_N},{PPI,PPI3,HEX_9,HEX_8}, arch_sh_dsp_up},
/* 10111000xxyynnnn prnd <DSP_REG_Y>,<DSP_REG_N> */
{"prnd", {DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_B,HEX_8}, arch_sh_dsp_up},
{"dct",{0},{PPI,PDC,HEX_1}, arch_sh_dsp_up},
{"dcf",{0},{PPI,PDC,HEX_2}, arch_sh_dsp_up},
-/* 00000iiiiiiinnnn pshl #<imm>,<DSP_REG_N> */ {"pshl",{A_IMM,DSP_REG_N},{PPI,PSH,HEX_0}, arch_sh_dsp_up},
/* 10000001xxyynnnn pshl <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
{"pshl", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_8,HEX_1}, arch_sh_dsp_up},
-/* 00010iiiiiiinnnn psha #<imm>,<DSP_REG_N> */ {"psha",{A_IMM,DSP_REG_N},{PPI,PSH,HEX_1}, arch_sh_dsp_up},
+/* 00000iiiiiiinnnn pshl #<imm>,<DSP_REG_N> */ {"pshl",{A_IMM,DSP_REG_N},{PPI,PSH,HEX_0}, arch_sh_dsp_up},
/* 10010001xxyynnnn psha <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
{"psha", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_9,HEX_1}, arch_sh_dsp_up},
+/* 00010iiiiiiinnnn psha #<imm>,<DSP_REG_N> */ {"psha",{A_IMM,DSP_REG_N},{PPI,PSH,HEX_1}, arch_sh_dsp_up},
/* 10100001xxyynnnn psub <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
{"psub", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_A,HEX_1}, arch_sh_dsp_up},
/* 10110001xxyynnnn padd <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
@@ -695,10 +706,10 @@ sh_opcode_info sh_table[] = {
{"por", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_5}, arch_sh_dsp_up},
/* 10001001xxyynnnn pdec <DSP_REG_X>,<DSP_REG_N> */
{"pdec", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_8,HEX_9}, arch_sh_dsp_up},
-/* 10011001xxyynnnn pinc <DSP_REG_X>,<DSP_REG_N> */
-{"pinc", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_9,HEX_9}, arch_sh_dsp_up},
/* 10101001xxyynnnn pdec <DSP_REG_Y>,<DSP_REG_N> */
{"pdec", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_A,HEX_9}, arch_sh_dsp_up},
+/* 10011001xxyynnnn pinc <DSP_REG_X>,<DSP_REG_N> */
+{"pinc", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_9,HEX_9}, arch_sh_dsp_up},
/* 10111001xxyynnnn pinc <DSP_REG_Y>,<DSP_REG_N> */
{"pinc", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_9}, arch_sh_dsp_up},
/* 10001101xxyynnnn pclr <DSP_REG_N> */
@@ -709,10 +720,10 @@ sh_opcode_info sh_table[] = {
{"pdmsb", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_D}, arch_sh_dsp_up},
/* 11001001xxyynnnn pneg <DSP_REG_X>,<DSP_REG_N> */
{"pneg", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_C,HEX_9}, arch_sh_dsp_up},
-/* 11011001xxyynnnn pcopy <DSP_REG_X>,<DSP_REG_N> */
-{"pcopy", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_D,HEX_9}, arch_sh_dsp_up},
/* 11101001xxyynnnn pneg <DSP_REG_Y>,<DSP_REG_N> */
{"pneg", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_E,HEX_9}, arch_sh_dsp_up},
+/* 11011001xxyynnnn pcopy <DSP_REG_X>,<DSP_REG_N> */
+{"pcopy", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_D,HEX_9}, arch_sh_dsp_up},
/* 11111001xxyynnnn pcopy <DSP_REG_Y>,<DSP_REG_N> */
{"pcopy", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_F,HEX_9}, arch_sh_dsp_up},
/* 11001101xxyynnnn psts MACH,<DSP_REG_N> */
diff --git a/gnu/usr.bin/binutils/opcodes/sparc-dis.c b/gnu/usr.bin/binutils/opcodes/sparc-dis.c
index a595d0f3835..359050723d4 100644
--- a/gnu/usr.bin/binutils/opcodes/sparc-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/sparc-dis.c
@@ -1,5 +1,6 @@
/* Print SPARC instructions.
- Copyright (C) 1989, 91-97, 1998 Free Software Foundation, Inc.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 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
@@ -25,7 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Bitmask of v9 architectures. */
#define MASK_V9 ((1 << SPARC_OPCODE_ARCH_V9) \
- | (1 << SPARC_OPCODE_ARCH_V9A))
+ | (1 << SPARC_OPCODE_ARCH_V9A) \
+ | (1 << SPARC_OPCODE_ARCH_V9B))
/* 1 if INSN is for v9 only. */
#define V9_ONLY_P(insn) (! ((insn)->architecture & ~MASK_V9))
/* 1 if INSN is for v9. */
@@ -95,7 +97,7 @@ static char *v9_priv_reg_names[] =
static char *v9a_asr_reg_names[] =
{
"pcr", "pic", "dcr", "gsr", "set_softint", "clear_softint",
- "softint", "tick_cmpr"
+ "softint", "tick_cmpr", "sys_tick", "sys_tick_cmpr"
};
/* Macros used to extract instruction fields. Not all fields have
@@ -463,6 +465,10 @@ print_insn_sparc (memaddr, info)
}
break;
+ case '3':
+ (info->fprintf_func) (stream, "%d", X_IMM (insn, 3));
+ break;
+
case 'K':
{
int mask = X_MEMBAR (insn);
@@ -551,7 +557,7 @@ print_insn_sparc (memaddr, info)
break;
case '/':
- if (X_RS1 (insn) < 16 || X_RS1 (insn) > 23)
+ if (X_RS1 (insn) < 16 || X_RS1 (insn) > 25)
(*info->fprintf_func) (stream, "%%reserved");
else
(*info->fprintf_func) (stream, "%%%s",
@@ -559,7 +565,7 @@ print_insn_sparc (memaddr, info)
break;
case '_':
- if (X_RD (insn) < 16 || X_RD (insn) > 23)
+ if (X_RD (insn) < 16 || X_RD (insn) > 25)
(*info->fprintf_func) (stream, "%%reserved");
else
(*info->fprintf_func) (stream, "%%%s",
@@ -770,6 +776,9 @@ compute_arch_mask (mach)
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 ();
}
diff --git a/gnu/usr.bin/binutils/opcodes/sparc-opc.c b/gnu/usr.bin/binutils/opcodes/sparc-opc.c
index a7132bb61f7..5c06d01df14 100644
--- a/gnu/usr.bin/binutils/opcodes/sparc-opc.c
+++ b/gnu/usr.bin/binutils/opcodes/sparc-opc.c
@@ -1,5 +1,6 @@
/* Table of opcodes for the sparc.
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000
Free Software Foundation, Inc.
This file is part of the BFD library.
@@ -35,27 +36,30 @@ Boston, MA 02111-1307, USA. */
#define MASK_SPARCLITE SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLITE)
#define MASK_V9 SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9)
#define MASK_V9A SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A)
+#define MASK_V9B SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9B)
/* Bit masks of architectures supporting the insn. */
#define v6 (MASK_V6 | MASK_V7 | MASK_V8 | MASK_SPARCLET \
- | MASK_SPARCLITE | MASK_V9 | MASK_V9A)
+ | MASK_SPARCLITE | MASK_V9 | MASK_V9A | MASK_V9B)
/* v6 insns not supported on the sparclet */
#define v6notlet (MASK_V6 | MASK_V7 | MASK_V8 \
- | MASK_SPARCLITE | MASK_V9 | MASK_V9A)
+ | MASK_SPARCLITE | MASK_V9 | MASK_V9A | MASK_V9B)
#define v7 (MASK_V7 | MASK_V8 | MASK_SPARCLET \
- | MASK_SPARCLITE | MASK_V9 | MASK_V9A)
+ | MASK_SPARCLITE | MASK_V9 | MASK_V9A | MASK_V9B)
/* Although not all insns are implemented in hardware, sparclite is defined
to be a superset of v8. Unimplemented insns trap and are then theoretically
implemented in software.
It's not clear that the same is true for sparclet, although the docs
suggest it is. Rather than complicating things, the sparclet assembler
recognizes all v8 insns. */
-#define v8 (MASK_V8 | MASK_SPARCLET | MASK_SPARCLITE | MASK_V9 | MASK_V9A)
+#define v8 (MASK_V8 | MASK_SPARCLET | MASK_SPARCLITE \
+ | MASK_V9 | MASK_V9A | MASK_V9B)
#define sparclet (MASK_SPARCLET)
#define sparclite (MASK_SPARCLITE)
-#define v9 (MASK_V9 | MASK_V9A)
-#define v9a (MASK_V9A)
+#define v9 (MASK_V9 | MASK_V9A | MASK_V9B)
+#define v9a (MASK_V9A | MASK_V9B)
+#define v9b (MASK_V9B)
/* v6 insns not supported by v9 */
#define v6notv9 (MASK_V6 | MASK_V7 | MASK_V8 \
| MASK_SPARCLET | MASK_SPARCLITE)
@@ -76,6 +80,8 @@ const struct sparc_opcode_arch sparc_opcode_archs[] = {
{ "v9", MASK_V6 | MASK_V7 | MASK_V8 | MASK_V9 },
/* v9 with ultrasparc additions */
{ "v9a", MASK_V6 | MASK_V7 | MASK_V8 | MASK_V9 | MASK_V9A },
+ /* v9 with cheetah additions */
+ { "v9b", MASK_V6 | MASK_V7 | MASK_V8 | MASK_V9 | MASK_V9A | MASK_V9B },
{ NULL, 0 }
};
@@ -755,8 +761,8 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "scan", F3(2, 0x2c, 0), F3(~2, ~0x2c, ~0)|ASI(~0), "1,2,d", 0, sparclet|sparclite },
{ "scan", F3(2, 0x2c, 1), F3(~2, ~0x2c, ~1), "1,i,d", 0, sparclet|sparclite },
-{ "popc", F3(2, 0x2e, 0), F3(~2, ~0x2e, ~0)|RS2_G0|ASI(~0),"2,d", 0, v9 },
-{ "popc", F3(2, 0x2e, 1), F3(~2, ~0x2e, ~1)|RS2_G0, "i,d", 0, v9 },
+{ "popc", F3(2, 0x2e, 0), F3(~2, ~0x2e, ~0)|RS1_G0|ASI(~0),"2,d", 0, v9 },
+{ "popc", F3(2, 0x2e, 1), F3(~2, ~0x2e, ~1)|RS1_G0, "i,d", 0, v9 },
{ "clr", F3(2, 0x02, 0), F3(~2, ~0x02, ~0)|RD_G0|RS1_G0|ASI_RS2(~0), "d", F_ALIAS, v6 }, /* or %g0,%g0,d */
{ "clr", F3(2, 0x02, 1), F3(~2, ~0x02, ~1)|RS1_G0|SIMM13(~0), "d", F_ALIAS, v6 }, /* or %g0,0,d */
@@ -843,6 +849,10 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "wr", F3(2, 0x30, 1)|RD(22), F3(~2, ~0x30, ~1)|RD(~22), "1,i,_", 0, v9a }, /* wr r,i,%softint */
{ "wr", F3(2, 0x30, 0)|RD(23), F3(~2, ~0x30, ~0)|RD(~23)|ASI(~0), "1,2,_", 0, v9a }, /* wr r,r,%tick_cmpr */
{ "wr", F3(2, 0x30, 1)|RD(23), F3(~2, ~0x30, ~1)|RD(~23), "1,i,_", 0, v9a }, /* wr r,i,%tick_cmpr */
+{ "wr", F3(2, 0x30, 0)|RD(24), F3(~2, ~0x30, ~0)|RD(~24)|ASI(~0), "1,2,_", 0, v9b }, /* wr r,r,%sys_tick */
+{ "wr", F3(2, 0x30, 1)|RD(24), F3(~2, ~0x30, ~1)|RD(~24), "1,i,_", 0, v9b }, /* wr r,i,%sys_tick */
+{ "wr", F3(2, 0x30, 0)|RD(25), F3(~2, ~0x30, ~0)|RD(~25)|ASI(~0), "1,2,_", 0, v9b }, /* wr r,r,%sys_tick_cmpr */
+{ "wr", F3(2, 0x30, 1)|RD(25), F3(~2, ~0x30, ~1)|RD(~25), "1,i,_", 0, v9b }, /* wr r,i,%sys_tick_cmpr */
{ "rd", F3(2, 0x28, 0), F3(~2, ~0x28, ~0)|SIMM13(~0), "M,d", 0, v8 }, /* rd %asrX,r */
{ "rd", F3(2, 0x28, 0), F3(~2, ~0x28, ~0)|RS1_G0|SIMM13(~0), "y,d", 0, v6 }, /* rd %y,r */
@@ -862,6 +872,8 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "rd", F3(2, 0x28, 0)|RS1(19), F3(~2, ~0x28, ~0)|RS1(~19)|SIMM13(~0), "/,d", 0, v9a }, /* rd %gsr,r */
{ "rd", F3(2, 0x28, 0)|RS1(22), F3(~2, ~0x28, ~0)|RS1(~22)|SIMM13(~0), "/,d", 0, v9a }, /* rd %softint,r */
{ "rd", F3(2, 0x28, 0)|RS1(23), F3(~2, ~0x28, ~0)|RS1(~23)|SIMM13(~0), "/,d", 0, v9a }, /* rd %tick_cmpr,r */
+{ "rd", F3(2, 0x28, 0)|RS1(24), F3(~2, ~0x28, ~0)|RS1(~24)|SIMM13(~0), "/,d", 0, v9b }, /* rd %sys_tick,r */
+{ "rd", F3(2, 0x28, 0)|RS1(25), F3(~2, ~0x28, ~0)|RS1(~25)|SIMM13(~0), "/,d", 0, v9b }, /* rd %sys_tick_cmpr,r */
{ "rdpr", F3(2, 0x2a, 0), F3(~2, ~0x2a, ~0)|SIMM13(~0), "?,d", 0, v9 }, /* rdpr %priv,r */
{ "wrpr", F3(2, 0x32, 0), F3(~2, ~0x32, ~0), "1,2,!", 0, v9 }, /* wrpr r1,r2,%priv */
@@ -1814,6 +1826,19 @@ SLCBCC("cbnefr", 15),
{ "array16", F3F(2, 0x36, 0x012), F3F(~2, ~0x36, ~0x012), "1,2,d", 0, v9a },
{ "array32", F3F(2, 0x36, 0x014), F3F(~2, ~0x36, ~0x014), "1,2,d", 0, v9a },
+/* Cheetah instructions */
+{ "edge8n", F3F(2, 0x36, 0x001), F3F(~2, ~0x36, ~0x001), "1,2,d", 0, v9b },
+{ "edge8ln", F3F(2, 0x36, 0x003), F3F(~2, ~0x36, ~0x003), "1,2,d", 0, v9b },
+{ "edge16n", F3F(2, 0x36, 0x005), F3F(~2, ~0x36, ~0x005), "1,2,d", 0, v9b },
+{ "edge16ln", F3F(2, 0x36, 0x007), F3F(~2, ~0x36, ~0x007), "1,2,d", 0, v9b },
+{ "edge32n", F3F(2, 0x36, 0x009), F3F(~2, ~0x36, ~0x009), "1,2,d", 0, v9b },
+{ "edge32ln", F3F(2, 0x36, 0x00b), F3F(~2, ~0x36, ~0x00b), "1,2,d", 0, v9b },
+
+{ "bmask", F3F(2, 0x36, 0x019), F3F(~2, ~0x36, ~0x019), "1,2,d", 0, v9b },
+{ "bshuffle", F3F(2, 0x36, 0x04c), F3F(~2, ~0x36, ~0x04c), "v,B,H", 0, v9b },
+
+{ "siam", F3F(2, 0x36, 0x081), F3F(~2, ~0x36, ~0x081)|RD_G0|RS1_G0|RS2(~7), "3", 0, v9b },
+
/* More v9 specific insns, these need to come last so they do not clash
with v9a instructions such as "edge8" which looks like impdep1. */
@@ -1976,6 +2001,7 @@ static arg prefetch_table[] =
{ 2, "#n_writes" },
{ 3, "#one_write" },
{ 4, "#page" },
+ { 16, "#invalidate" },
{ 0, 0 }
};
diff --git a/gnu/usr.bin/binutils/opcodes/sysdep.h b/gnu/usr.bin/binutils/opcodes/sysdep.h
index bb23e5fcf5d..ce9adde399e 100644
--- a/gnu/usr.bin/binutils/opcodes/sysdep.h
+++ b/gnu/usr.bin/binutils/opcodes/sysdep.h
@@ -1,5 +1,5 @@
/* Random host-dependent support code.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 1997, 2000 Free Software Foundation, Inc.
Written by Ken Raeburn.
This file is part of libopcodes, the opcodes library.
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
-#include <ansidecl.h>
+#include "ansidecl.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
diff --git a/gnu/usr.bin/binutils/opcodes/w65-dis.c b/gnu/usr.bin/binutils/opcodes/w65-dis.c
index 09a17bbb8e7..8f08d6310cb 100644
--- a/gnu/usr.bin/binutils/opcodes/w65-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/w65-dis.c
@@ -1,5 +1,5 @@
/* Disassemble WDC 65816 instructions.
- Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 1998, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,21 +15,22 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include "sysdep.h"
#include <stdio.h>
+#include "sysdep.h"
#define STATIC_TABLE
#define DEFINE_TABLE
#include "w65-opc.h"
#include "dis-asm.h"
-static fprintf_ftype fpr;
-static void *stream;
-static struct disassemble_info *local_info;
+static fprintf_ftype fpr;
+static void *stream;
+static struct disassemble_info *local_info;
#if 0
-static char *lname[] = {"r0","r1","r2","r3","r4","r5","r6","r7","s0"};
+static char *lname[] = { "r0","r1","r2","r3","r4","r5","r6","r7","s0" };
-static char *findname (val)
+static char *
+findname (val)
unsigned int val;
{
if (val >= 0x10 && val <= 0x20)
@@ -41,79 +42,77 @@ static void
print_operand (lookup, format, args)
int lookup;
char *format;
- unsigned int *args;
+ unsigned int *args;
{
int val;
int c;
while (*format)
{
- switch ( c = *format++)
+ switch (c = *format++)
{
case '$':
val = args[(*format++) - '0'];
- if (lookup)
+ if (lookup)
{
#if 0
- name = findname(val);
+ name = findname (val);
if (name)
- fpr(stream, "%s", name);
+ fpr (stream, "%s", name);
else
#endif
- local_info->print_address_func (val, local_info);
+ local_info->print_address_func (val, local_info);
}
else
fpr (stream, "0x%x", val);
break;
default:
- fpr(stream,"%c", c);
+ fpr (stream, "%c", c);
break;
}
}
}
-int
-print_insn_w65(memaddr, info)
+
+int
+print_insn_w65 (memaddr, info)
bfd_vma memaddr;
struct disassemble_info *info;
{
-
-
int status = 0;
unsigned char insn[4];
register struct opinfo *op;
int i;
- int X =0;
+ int X = 0;
int M = 0;
int args[2];
-stream = info->stream;
+ stream = info->stream;
fpr = info->fprintf_func;
-local_info = info;
- for (i = 0; i <4 && status == 0; i++)
+ local_info = info;
+ for (i = 0; i < 4 && status == 0; i++)
{
- status = info->read_memory_func(memaddr+i, insn + i, 1, info);
- }
-
+ status = info->read_memory_func (memaddr + i, insn + i, 1, info);
+ }
- for (op = optable; op->val != insn[0]; op++)
+ for (op = optable; op->val != insn[0]; op++)
;
- fpr(stream,"%s", op->name);
-
- /* Prepare all the posible operand values */
+ fpr (stream, "%s", op->name);
+
+ /* Prepare all the posible operand values. */
{
int size = 1;
int asR_W65_ABS8 = insn[1];
int asR_W65_ABS16 = (insn[2] << 8) + asR_W65_ABS8;
int asR_W65_ABS24 = (insn[3] << 16) + asR_W65_ABS16;
- int asR_W65_PCR8 = ((char)(asR_W65_ABS8)) + memaddr + 2;
- int asR_W65_PCR16 = ((short)(asR_W65_ABS16)) + memaddr + 3;
+ int asR_W65_PCR8 = ((char) (asR_W65_ABS8)) + memaddr + 2;
+ int asR_W65_PCR16 = ((short) (asR_W65_ABS16)) + memaddr + 3;
- switch (op->amode) {
- DISASM();
- }
+ switch (op->amode)
+ {
+ DISASM ();
+ }
- return size;
+ return size;
}
-
}
diff --git a/gnu/usr.bin/binutils/opcodes/w65-opc.h b/gnu/usr.bin/binutils/opcodes/w65-opc.h
index 9dc3535c787..a6e17df2ce5 100644
--- a/gnu/usr.bin/binutils/opcodes/w65-opc.h
+++ b/gnu/usr.bin/binutils/opcodes/w65-opc.h
@@ -1,5 +1,26 @@
- /* WDC 65816 Assembler opcode table */
- /* (generated by the program sim/w65/gencode -a) */
+/* Instruction opcode header for WDC 65816
+ (generated by the program sim/w65/gencode -a)
+
+Copyright 2001 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
#define ADDR_IMMTOA 1 /* #a */
#define ADDR_IMMCOP 2 /* #c */
#define ADDR_IMMTOI 3 /* #i */
diff --git a/gnu/usr.bin/binutils/opcodes/z8k-dis.c b/gnu/usr.bin/binutils/opcodes/z8k-dis.c
index 590f9d30bf0..825950059da 100644
--- a/gnu/usr.bin/binutils/opcodes/z8k-dis.c
+++ b/gnu/usr.bin/binutils/opcodes/z8k-dis.c
@@ -1,5 +1,6 @@
/* Disassemble z8000 code.
- Copyright 1992, 1993, 1995, 1998 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -22,10 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DEFINE_TABLE
#include "z8k-opc.h"
-
#include <setjmp.h>
-
typedef struct
{
@@ -67,7 +66,7 @@ fetch_data (info, nibble)
{
unsigned char mybuf[20];
int status;
- instr_data_s *priv = (instr_data_s *)info->private_data;
+ instr_data_s *priv = (instr_data_s *) info->private_data;
if ((nibble % 4) != 0)
abort ();
@@ -84,15 +83,15 @@ fetch_data (info, nibble)
{
int i;
- unsigned char *p = mybuf ;
-
+ unsigned char *p = mybuf;
+
for (i = 0; i < nibble;)
{
priv->words[i] = (p[0] << 8) | p[1];
-
+
priv->bytes[i] = *p;
priv->nibbles[i++] = *p >> 4;
- priv->nibbles[i++] = *p &0xf;
+ priv->nibbles[i++] = *p & 0xf;
++p;
priv->bytes[i] = *p;
@@ -126,7 +125,7 @@ static char *codes[16] =
"nc/uge"
};
-int z8k_lookup_instr PARAMS ((unsigned char*, disassemble_info *));
+int z8k_lookup_instr PARAMS ((unsigned char *, disassemble_info *));
static void output_instr
PARAMS ((instr_data_s *, unsigned long, disassemble_info *));
static void unpack_instr PARAMS ((instr_data_s *, int, disassemble_info *));
@@ -196,7 +195,9 @@ z8k_lookup_instr (nibbles, info)
while (!nibl_matched && z8k_table[tabl_index].name)
{
nibl_matched = 1;
- for (nibl_index = 0; nibl_index < z8k_table[tabl_index].length * 2 && nibl_matched; nibl_index++)
+ for (nibl_index = 0;
+ nibl_index < z8k_table[tabl_index].length * 2 && nibl_matched;
+ nibl_index++)
{
if ((nibl_index % 4) == 0)
/* Fetch one word at a time. */
@@ -439,7 +440,7 @@ unpack_instr (instr_data, is_segmented, info)
instr_data->interrupts = instr_nibl & 0x3;
break;
case CLASS_BIT:
- /* do nothing */
+ /* Do nothing. */
break;
case CLASS_IR:
instr_data->arg_reg[datum_value] = instr_nibl;
diff --git a/gnu/usr.bin/binutils/opcodes/z8kgen.c b/gnu/usr.bin/binutils/opcodes/z8kgen.c
index 44df0b2ec0d..c8f3970d096 100644
--- a/gnu/usr.bin/binutils/opcodes/z8kgen.c
+++ b/gnu/usr.bin/binutils/opcodes/z8kgen.c
@@ -1,20 +1,21 @@
/*
-This file is part of GNU Binutils.
+ Copyright 2001 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This file is part of GNU Binutils.
-This program is distributed in the hope that it will be useful,
-but WITHOUT 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 free software; you can redistribute 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.
-You should have received a copy of the GNU General Public 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This program generates z8k-opc.h */
diff --git a/gnu/usr.bin/binutils/symlink-tree b/gnu/usr.bin/binutils/symlink-tree
index 096582db6eb..8f11c087932 100644
--- a/gnu/usr.bin/binutils/symlink-tree
+++ b/gnu/usr.bin/binutils/symlink-tree
@@ -10,6 +10,11 @@ prog=$0
srcdir=$1
ignore="$2"
+if test $# -lt 1; then
+ echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\""
+ exit 1
+fi
+
ignore_additional=". .. CVS"
# If we were invoked with a relative path name, adjust ${prog} to work